瀏覽代碼

修改bug

chenrui 8 月之前
父節點
當前提交
d56eae03d3

+ 6 - 0
src/views/easyPassManagement/homepageCarouselImg/chooseDealer.vue

@@ -140,6 +140,7 @@ export default {
           if (res.status == 200) {
           if (res.status == 200) {
             data = res.data
             data = res.data
             const no = (data.pageNo - 1) * data.pageSize
             const no = (data.pageNo - 1) * data.pageSize
+            const chooseArr = []
             for (var i = 0; i < data.list.length; i++) {
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
               data.list[i].no = no + i + 1
               if (data.list[i].dealerTypeName1) {
               if (data.list[i].dealerTypeName1) {
@@ -148,11 +149,16 @@ export default {
               if (this.disabledList && this.disabledList.length > 0) {
               if (this.disabledList && this.disabledList.length > 0) {
                 if (this.disabledList.includes(data.list[i].dealerSn)) {
                 if (this.disabledList.includes(data.list[i].dealerSn)) {
                   data.list[i].isDisabled = true
                   data.list[i].isDisabled = true
+                  chooseArr.push(data.list[i])
                 } else {
                 } else {
                   data.list[i].isDisabled = false
                   data.list[i].isDisabled = false
                 }
                 }
               }
               }
             }
             }
+            if (this.disabledList && chooseArr) {
+              // 勾选回显
+              this.$refs.table.setTableSelected(this.disabledList, chooseArr)
+            }
             this.disabled = false
             this.disabled = false
           }
           }
           this.spinning = false
           this.spinning = false

+ 19 - 2
src/views/easyPassManagement/homepageCarouselImg/edit.vue

@@ -79,7 +79,7 @@
                   </a-col>
                   </a-col>
                   <a-col :md="24" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
                   <a-col :md="24" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
                     <div class="buyerBox">
                     <div class="buyerBox">
-                      <a-tag :closable="isDisabled" v-for="con in chooseDealerList" id="promotionList-dealerSn" :key="con.dealerSn" @close="delBuyerName(con)">
+                      <a-tag :closable="!isDisabled" v-for="con in chooseDealerList" id="promotionList-dealerSn" :key="con.dealerSn" @close="delBuyerName(con)">
                         {{ con.dealerName }}
                         {{ con.dealerName }}
                       </a-tag>
                       </a-tag>
                     </div>
                     </div>
@@ -250,6 +250,7 @@ export default {
     },
     },
     // 打开 选择经销商弹窗
     // 打开 选择经销商弹窗
     handleDealerModal () {
     handleDealerModal () {
+      console.log('111111111111:', this.chooseDealerList)
       this.chooseSnList = this.chooseDealerList.map(item => item.dealerSn)
       this.chooseSnList = this.chooseDealerList.map(item => item.dealerSn)
       this.openDealerModal = true
       this.openDealerModal = true
     },
     },
@@ -258,8 +259,21 @@ export default {
       this.chooseSnList = []
       this.chooseSnList = []
       this.openDealerModal = false
       this.openDealerModal = false
     },
     },
+    // 部分经销商 删除
+    delBuyerName (row) {
+      const pos = this.chooseDealerList.findIndex(item => item.dealerSn == row.dealerSn)
+      if (pos > 0) {
+        this.chooseDealerList.splice(pos, 1)
+      }
+      console.log('222222:', pos, this.chooseDealerList)
+    },
     // 参与经销商 change
     // 参与经销商 change
-    changeDealerScope () {},
+    changeDealerScope (val) {
+      this.form.allDealerFlag = val
+      if (val == '1') {
+        this.chooseDealerList = []
+      }
+    },
     // 返回列表
     // 返回列表
     handleBack () {
     handleBack () {
       this.$router.push({ name: 'carouselImageList', query: { closeLastOldTab: true } })
       this.$router.push({ name: 'carouselImageList', query: { closeLastOldTab: true } })
@@ -277,6 +291,9 @@ export default {
           } else if (res.data.contentType == 'LINK') {
           } else if (res.data.contentType == 'LINK') {
             _this.form.contentLink = res.data.content
             _this.form.contentLink = res.data.content
           }
           }
+          if (res.data.allDealerFlag == '0') {
+            this.chooseDealerList = res.data.dealerList
+          }
           _this.$refs.imageSet.setFileList(res.data.imageUrl)
           _this.$refs.imageSet.setFileList(res.data.imageUrl)
           _this.form = res.data
           _this.form = res.data
           _this.form.time = [res.data.bannerStartDate, res.data.bannerEndDate]
           _this.form.time = [res.data.bannerStartDate, res.data.bannerEndDate]

+ 1 - 1
src/views/easyPassManagement/promotionalActivities/detailModal.vue

@@ -224,7 +224,7 @@ export default {
         { title: '产品编码', dataIndex: 'productCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: '18%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品名称', dataIndex: 'productName', width: '18%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productOrigCode', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productOrigCode', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '商城售价', dataIndex: 'productPrice', width: '10%', align: 'right', customRender: text => { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+        { title: '商城售价', dataIndex: 'shopProductPrice', width: '10%', align: 'right', customRender: text => { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ]
       ]
       if (_this.form.promoType === 'BUY_PROD_GIVE_PROD') {
       if (_this.form.promoType === 'BUY_PROD_GIVE_PROD') {
         arr.splice(4, 0, { title: '买', dataIndex: 'conditionValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
         arr.splice(4, 0, { title: '买', dataIndex: 'conditionValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })

+ 1 - 0
src/views/easyPassManagement/promotionalActivities/edit.vue

@@ -652,6 +652,7 @@ export default {
     },
     },
     // 初始化
     // 初始化
     pageInit () {
     pageInit () {
+      this.form.discountType = ''
       if (this.$route.params.pageType === 'edit') {
       if (this.$route.params.pageType === 'edit') {
         this.getDetail({ sn: this.$route.params.sn })
         this.getDetail({ sn: this.$route.params.sn })
       } else {
       } else {