Browse Source

修改bug

chenrui 1 year ago
parent
commit
9281b5869a

+ 7 - 7
src/views/promotionRulesManagement/dealerPromotions/chooseImportModal.vue

@@ -90,10 +90,6 @@ export default {
       default: () => {
         return {}
       }
-    },
-    goodsFlag: {
-      type: [String, Number],
-      default: '0'
     }
   },
   data () {
@@ -101,7 +97,8 @@ export default {
       isShow: this.openModal, //  是否打开弹框
       loadData: [],
       unLoadData: [],
-      loading: false
+      loading: false,
+      goodsFlag: ''
     }
   },
   computed: {
@@ -112,7 +109,7 @@ export default {
         { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'product.name', width: '70%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
-      if (_this.goodsFlag == '1') {
+      if (_this.goodsFlag == '0') {
         const arr = [
           { title: '省价特价', dataIndex: 'provinceDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
           { title: '市价特价', dataIndex: 'cityDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
@@ -130,7 +127,7 @@ export default {
         { title: '产品名称', dataIndex: 'product.name', width: '60%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '错误说明', scopedSlots: { customRender: 'errorMsg' }, width: '20%', align: 'center' }
       ]
-      if (_this.goodsFlag == '1') {
+      if (_this.goodsFlag == '0') {
         const arr = [
           { title: '省价特价', dataIndex: 'provinceDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
           { title: '市价特价', dataIndex: 'cityDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
@@ -142,6 +139,9 @@ export default {
     }
   },
   methods: {
+    setFlag (val) {
+      this.goodsFlag = val
+    },
     getData () {
       const paramsData = JSON.parse(JSON.stringify(this.paramsData))
       this.loadData = paramsData.rightList || []

+ 2 - 2
src/views/promotionRulesManagement/dealerPromotions/importGuideModal.vue

@@ -62,7 +62,7 @@
       </div>
     </div>
     <!-- 导入 -->
-    <chooseImportModal :goodsFlag="goodFlag" :openModal="openImportModal" :paramsData="paramsData" @close="handleClose" @ok="hanldeOk" />
+    <chooseImportModal ref="chooseImportBox" :openModal="openImportModal" :paramsData="paramsData" @close="handleClose" @ok="hanldeOk" />
   </a-modal>
 </template>
 
@@ -106,13 +106,13 @@ export default {
     handlerNextStep () {
       if (this.paramsData) {
         this.openImportModal = true
+        this.$refs.chooseImportBox.setFlag(this.goodFlag)
       } else {
         this.$message.warning('添加文件后再进行下一步操作!')
       }
     },
     // 上传文件  change
     changeImport (file) {
-      // console.log(file, JSON.parse(file))
       if (file && JSON.parse(file).length > 0) {
         this.paramsData = Object.assign({}, JSON.parse(file)[0] || null, this.params)
       } else {

+ 6 - 4
src/views/promotionRulesManagement/dealerPromotions/sendAmountModal.vue

@@ -89,7 +89,7 @@
               :max="999999"
               :precision="2"
               size="small"/>
-            元{{ scaleNum }}%促销品采购额
+            元{{ scaleNum }}%促销品采购额
           </div>
         </a-form-model-item>
         <a-form-model-item label="金额叠加" prop="accrualFlag">
@@ -245,11 +245,11 @@ export default {
         giveAmount: undefined,
         restrictCategory: '',
         accrualFlag: '1', // 数量叠加
-        minOrderFlag: '1', // 起订金额
+        minOrderFlag: '0', // 起订金额
         minOrderAmount: undefined,
-        upperLimitFlag: '1', // 活动经费上限
+        upperLimitFlag: '0', // 活动经费上限
         upperLimitAmount: undefined,
-        scopeFlag: undefined
+        scopeFlag: '1'
       },
       rules: {
         description: [ { required: true, message: '请输入规则简称', trigger: 'blur' } ],
@@ -287,6 +287,8 @@ export default {
       const _this = this
       if (_this.form.regularAmount && _this.form.giveAmount) {
         _this.scaleNum = Math.floor(((_this.form.giveAmount / _this.form.regularAmount) * 100).toFixed(2))
+      } else {
+        _this.scaleNum = 0
       }
     },
     // 门槛切换  tab 按钮默认显示问题

+ 5 - 5
src/views/promotionRulesManagement/dealerPromotions/sendProductsModal.vue

@@ -250,10 +250,10 @@ export default {
         promotionQty: undefined,
         restrictFlag: undefined, // 限制正价产品款数
         restrictCategory: '',
-        accrualFlag: '1', // 数量叠加
-        minOrderFlag: '1', // 起订金额
+        accrualFlag: undefined, // 数量叠加
+        minOrderFlag: '0', // 起订金额
         minOrderAmount: undefined,
-        upperLimitFlag: '1', // 活动经费上限
+        upperLimitFlag: '0', // 活动经费上限
         upperLimitAmount: undefined,
         regularPromotionSameFlag: undefined
       },
@@ -389,9 +389,9 @@ export default {
         restrictFlag: undefined, // 限制正价产品款数
         restrictCategory: '',
         accrualFlag: '1', // 数量叠加
-        minOrderFlag: '1', // 起订金额
+        minOrderFlag: '0', // 起订金额
         minOrderAmount: undefined,
-        upperLimitFlag: '1', // 活动经费上限
+        upperLimitFlag: '0', // 活动经费上限
         upperLimitAmount: undefined,
         regularPromotionSameFlag: undefined,
         gateProductList: undefined,

+ 2 - 2
src/views/promotionRulesManagement/dealerPromotions/specialOfferModal.vue

@@ -203,9 +203,9 @@ export default {
         gateType: undefined,
         gateAmount: undefined,
         quotaAmount: undefined,
-        minOrderFlag: '1', // 起订金额
+        minOrderFlag: '0', // 起订金额
         minOrderAmount: undefined,
-        upperLimitFlag: '1', // 活动经费上限
+        upperLimitFlag: '0', // 活动经费上限
         upperLimitAmount: undefined
       },
       rules: {