Parcourir la source

Merge branch 'develop_yh31' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh31

lilei il y a 1 an
Parent
commit
a470ddc463

+ 11 - 9
src/views/common/chooseBrandModal.vue

@@ -229,13 +229,12 @@ export default {
       const _this = this
       productBrandQuery({}).then(res => {
         if (res.status == 200) {
-          _this.brandList = res.data
           if (_this.chooseData && _this.chooseData.length > 0) {
             const checkedList = []
             _this.chooseData.map(item => {
               checkedList.push(item.goodsSn)
             })
-            this.brandList.map(item => {
+            res.data.map(item => {
               if (checkedList.includes(item.brandSn)) {
                 item.checked = true
               } else {
@@ -243,6 +242,16 @@ export default {
               }
             })
           }
+          if (_this.disabledList && _this.disabledList.length > 0) {
+            res.data.map(item => {
+              if (_this.disabledList.includes(item.brandSn)) {
+                item.isDisabled = true
+              } else {
+                item.isDisabled = false
+              }
+            })
+          }
+          _this.brandList = res.data
         } else {
           this.brandList = []
         }
@@ -251,13 +260,6 @@ export default {
     // 禁用
     handleDisabled (list) {
       this.disabledList = list
-      this.brandList.map(item => {
-        if (list.includes(item.brandSn)) {
-          item.isDisabled = true
-        } else {
-          item.isDisabled = false
-        }
-      })
     }
   },
   watch: {

+ 4 - 4
src/views/promotionRulesManagement/dealerPromotions/tableType3.vue

@@ -117,10 +117,10 @@ export default {
                   {record.productTypeArr.map(con =>
                     <div>
                       {con.title && con.title.length > 7 ? <a-tooltip title={con.title}>
-                        <a-tag style="margin-bottom:10px;" closable onclick={() => _this.delLabel(record.productScopeSn, con, 'typeList')}>
+                        <a-tag style="margin-bottom:10px;" closable onclose={() => _this.delLabel(record.productScopeSn, con, 'typeList')}>
                           { con.title.slice(0, 7) + '...' }
                         </a-tag>
-                      </a-tooltip> : <a-tag style="margin-bottom:10px;" closable onclick={() => _this.delLabel(record.productScopeSn, con, 'typeList')}>
+                      </a-tooltip> : <a-tag style="margin-bottom:10px;" closable onclose={() => _this.delLabel(record.productScopeSn, con, 'typeList')}>
                         {con.title }
                       </a-tag>}
                     </div>
@@ -160,7 +160,7 @@ export default {
               <a-row>
                 <a-col span={17}>
                   {record.productBrandArr.map(item => {
-                    return <div>{item.brandName && item.brandName.length > 7 ? <a-tooltip title={item.brandName}><a-tag style="margin-bottom:10px;" closable onclick={() => _this.delLabel(record.productScopeSn, item, 'brandList')}>{ item.brandName.slice(0, 7) + '...' }</a-tag></a-tooltip> : <a-tag v-else style="margin-bottom:10px;" closable onclick={() => _this.delLabel(record.productScopeSn, item, 'brandList')}>{item.brandName } </a-tag>}</div>
+                    return <div>{item.brandName && item.brandName.length > 7 ? <a-tooltip title={item.brandName}><a-tag style="margin-bottom:10px;" closable onclose={() => _this.delLabel(record.productScopeSn, item, 'brandList')}>{ item.brandName.slice(0, 7) + '...' }</a-tag></a-tooltip> : <a-tag style="margin-bottom:10px;" closable onclose={() => _this.delLabel(record.productScopeSn, item, 'brandList')}>{item.brandName } </a-tag>}</div>
                   })}
                 </a-col>
                 <a-col span={6} style="text-align:right;">
@@ -174,7 +174,7 @@ export default {
             return (
               <a-row>
                 <a-col span={24}>
-                  <a-tag style="background: #fff; borderStyle: dashed;" onClick={() => _this.addBrandTag(index, record)} color="blue">
+                  <a-tag style="background: #fff; borderStyle: dashed;" onclick={() => _this.addBrandTag(index, record)} color="blue">
                     <a-icon type="plus" />
                   </a-tag>
                 </a-col>