Sfoglia il codice sorgente

Merge branch 'feature/v2.4.46' of https://jygit.jydev.jianyu360.cn/jianyu/qmx_page_admin into feature/v2.4.46

tangshizhe 1 mese fa
parent
commit
940c75e8bb

+ 9 - 0
src/views/create-order/components/schema-form/params/marketing.js

@@ -1,5 +1,6 @@
 import { SimpleParameters } from './base'
 import { getCommonParams } from "./common";
+import { mul } from '@/utils/number'
 import { productTypeMap, productKeyMap, productGroupKeyMap } from '@/views/create-order/data'
 
 export class MarketingGroup extends SimpleParameters {
@@ -13,6 +14,10 @@ export class MarketingGroup extends SimpleParameters {
   // Source string `json:"source"`
   // Num    int64  `json:"num"`
 
+  get isXSFY() {
+    return this.type === productKeyMap.xsfy
+  }
+
   getProductArrParams({ pageForm, productInfo, type }) {
     const commonParams = getCommonParams(pageForm, productInfo)
     const productForm = productInfo?.productCardInfo?.form || {}
@@ -26,6 +31,10 @@ export class MarketingGroup extends SimpleParameters {
       num: productForm.giftNum - 0 || undefined,
     }
 
+    if (this.isXSFY) {
+      p.filter.num = mul(p.filter.num || 0, 100)
+    }
+
     return p
   }
 }

+ 5 - 1
src/views/create-order/components/schema-form/products/data-count-pack.js

@@ -19,13 +19,17 @@ import {
 
 function createValidityCountSchema() {
   const key = schemaKeyMap.validityCount
+  const defaultValue = {
+    payCount: '',
+    freeCount: '',
+  }
 
   return createSchemaItem({
     label: '数据条数',
     key,
     className: 'validity-count',
     component: ValidityCount, // component和slot二选一,component优先级高
-    defaultValue: {},
+    defaultValue,
     required: true,
     changedSchema: true,
   })

+ 3 - 0
src/views/create-order/components/schema-form/resort/common.js

@@ -40,6 +40,9 @@ export function sortCommonForm(product, order) {
     map[schemaKeyMap.payment] = product.service_type - 0
   }
   // 关联订单relatedOrders
+  if (product.service_type) {
+    map[schemaKeyMap.relatedOrders] = [product.linked_detail_id]
+  }
 
   // 产品规格spec
   if (product.product_code) {