Ver Fonte

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

lilei há 1 ano atrás
pai
commit
f0a6887891

+ 1 - 0
src/views/promotionRulesManagement/dealerPromotions/sendAmountModal.vue

@@ -590,6 +590,7 @@ export default {
           const brandList = []
           con.productBrandList.forEach(item => {
             item.brandName = item.productBrandName
+            item.brandSn = item.productBrandSn
             const brandObj = {
               productBrandSn: item.productBrandSn
             }

+ 34 - 22
src/views/promotionRulesManagement/dealerPromotions/sendProductsModal.vue

@@ -628,6 +628,7 @@ export default {
           const brandList = []
           con.productBrandList.forEach(item => {
             item.brandName = item.productBrandName
+            item.brandSn = item.productBrandSn
             const brandObj = {
               productBrandSn: item.productBrandSn
             }
@@ -694,7 +695,7 @@ export default {
         dataList.forEach(con => {
           if (con.productThisList) {
             con.productThisList.forEach((item, i) => {
-              item.unitTypeInfo = con.unitTypeDictValue + con.unitQty
+              item.unitTypeInfo = (con.unitType === 'SL' ? '按数量设置' : '按整箱设置') + con.unitQty
               item.productTypeInfo = con.promotionProductType
             })
             newList = [ ...newList, ...con.productThisList ]
@@ -707,38 +708,49 @@ export default {
     },
     // 预览
     handlePreview () {
-      const dataName = this.chooseVal === 'a' ? 'gate' : this.chooseVal === 'b' ? 'regular' : this.chooseVal === 'c' ? 'gift' : 'giftGroup'
+      const dataName = this.chooseVal === 'a' ? 'gate' : this.chooseVal === 'b' ? 'regular' : 'giftGroup'
       const titName = this.chooseVal === 'a' ? '门槛产品' : this.chooseVal === 'b' ? '正价产品' : '促销产品'
       if (dataName != 'giftGroup') {
-        const newPreviewList = this.getPreviewList(this.form[dataName + 'ProductList'])
-        if (newPreviewList && newPreviewList.length > 0) {
-          this.previewList = newPreviewList
-          const resuleObj = {
-            tit: titName
+        if (!this.itemSn) {
+          if (this.chooseVal === 'a') {
+            this.form.gateProductList = this.$refs.cillProduct.getResultVal()
+          } else if (this.chooseVal === 'b') {
+            this.form.regularProductList = this.$refs.normalPriceProduct.getResultVal()
           }
-          this.$refs.previewModal.pageInit(resuleObj)
-        } else {
-          this.$message.warning('暂时没有可预览的产品')
-          return
         }
-      } else {
-        // 阶梯数据处理
-        const idInfo = this.chooseVal.split('c')[1]
-        const stepIndex = this.fullGiftRuleList.findIndex(item => item.id === idInfo)
-        if (this.form.giftProductMap && Object.keys(this.form.giftProductMap).length > 0 && stepIndex > -1) {
-          const stepPreviewList = this.getPreviewList(this.form.giftProductMap['GIFT' + (stepIndex * 1 + 1)])
-
-          if (stepPreviewList && stepPreviewList.length > 0) {
-            this.previewList = stepPreviewList
+        this.$nextTick(() => {
+          const newPreviewList = this.getPreviewList(this.form[dataName + 'ProductList'])
+          if (newPreviewList && newPreviewList.length > 0) {
+            this.previewList = newPreviewList
             const resuleObj = {
-              tit: '促销产品(阶梯' + (stepIndex * 1 + 1) + ')'
+              tit: titName
             }
             this.$refs.previewModal.pageInit(resuleObj)
           } else {
             this.$message.warning('暂时没有可预览的产品')
-            return
           }
+        })
+      } else {
+        // 阶梯数据处理
+        const idInfo = this.chooseVal.split('c')[1]
+        const stepIndex = this.fullGiftRuleList.findIndex(item => item.id === idInfo)
+        if (stepIndex > -1 && !this.itemSn) {
+          this.form.giftProductMap['GIFT' + (stepIndex * 1 + 1)] = this.$refs['offerProduct' + stepIndex][0].getResultVal()
         }
+        this.$nextTick(() => {
+          if (this.form.giftProductMap && Object.keys(this.form.giftProductMap).length > 0) {
+            const stepPreviewList = this.getPreviewList(this.form.giftProductMap['GIFT' + (stepIndex * 1 + 1)])
+            if (stepPreviewList && stepPreviewList.length > 0) {
+              this.previewList = stepPreviewList
+              const resuleObj = {
+                tit: '促销产品(阶梯' + (stepIndex * 1 + 1) + ')'
+              }
+              this.$refs.previewModal.pageInit(resuleObj)
+            } else {
+              this.$message.warning('暂时没有可预览的产品')
+            }
+          }
+        })
       }
       this.openProductModal = true
     },

+ 1 - 0
src/views/promotionRulesManagement/dealerPromotions/specialOfferModal.vue

@@ -581,6 +581,7 @@ export default {
           const brandList = []
           con.productBrandList.forEach(item => {
             item.brandName = item.productBrandName
+            item.brandSn = item.productBrandSn
             const brandObj = {
               productBrandSn: item.productBrandSn
             }

+ 2 - 3
src/views/promotionRulesManagement/dealerPromotions/tableType1.vue

@@ -52,7 +52,7 @@
         <div style="max-height:126px;overflow-y:scroll;" v-if="!record.productThisList || record.productThisList.length==0">
           <a-row v-if="record.productBrandArr && record.productBrandArr.length>0">
             <a-col :span="18">
-              <a-tag v-for="item in record.productBrandArr" :key="item.productBrandSn" style="margin-bottom:10px;" closable @close.prevent="delLabel(record.productScopeSn,item,'brandList')">
+              <a-tag v-for="item in record.productBrandArr" :key="item.brandSn" style="margin-bottom:10px;" closable @close.prevent="delLabel(record.productScopeSn,item,'brandList')">
                 {{ item.brandName }}
               </a-tag>
             </a-col>
@@ -175,7 +175,6 @@ import { VSelect } from '@/components'
 import ChooseBrandModal from '@/views/common/chooseBrandModal.vue'
 import ChooseTypeModal from '@/views/common/chooseTypeModal.vue'
 import chooseProductsModal from './chooseProductsModal.vue'
-import { forEach } from 'core-js/library/es6/array'
 export default {
   name: 'TableType1',
   mixins: [commonMixin],
@@ -576,7 +575,7 @@ export default {
         if (isRepeatTypeFlag.flag && isRepeatTypeFlag.noTypeFlag && uniqueArr.length == 1) {
           this.dataSource.splice(pos, 1)
         } else {
-          const j = this.dataSource[pos].productBrandArr.findIndex(con => con.productBrandSn == row.productBrandSn)
+          const j = this.dataSource[pos].productBrandArr.findIndex(con => con.brandSn == row.brandSn)
           this.dataSource[pos].productBrandArr.splice(j, 1)
           this.dataSource[pos].productBrandList.splice(j, 1)
         }

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

@@ -48,7 +48,7 @@
         <div style="max-height:126px;overflow-y:scroll;" v-if="record.dataSourceOrigin=='0'">
           <a-row v-if="record.productBrandArr && record.productBrandArr.length>0">
             <a-col :span="17">
-              <div v-for="item in record.productBrandArr" :key="item.productBrandSn">
+              <div v-for="item in record.productBrandArr" :key="item.brandSn">
                 <a-tooltip v-if="item.brandName&&item.brandName.length > 7" :title="item.brandName">
                   <a-tag style="margin-bottom:10px;" closable @close.prevent="delLabel(record.productScopeSn,item,'brandList')">
                     {{ `${item.brandName.slice(0, 7)}...` }}
@@ -718,7 +718,7 @@ export default {
         if (isRepeatTypeFlag.flag && isRepeatTypeFlag.noTypeFlag && uniqueArr.length == 1) {
           this.dataSource.splice(pos, 1)
         } else {
-          const j = this.dataSource[pos].productBrandArr.findIndex(con => con.productBrandSn == row.productBrandSn)
+          const j = this.dataSource[pos].productBrandArr.findIndex(con => con.brandSn == row.brandSn)
           this.dataSource[pos].productBrandArr.splice(j, 1)
           this.dataSource[pos].productBrandList.splice(j, 1)
         }

+ 4 - 4
src/views/reportData/tireSalesReport/detailList.vue

@@ -45,7 +45,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="区域负责人">
-                  <BizUser v-model="queryParam.bizUserSn"></BizUser>
+                  <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -194,9 +194,9 @@ export default {
         dealerSn: undefined,
         subareaArea: {// 区域分区
           subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaAreaSn: undefined,
+          bizUserSn: undefined // 区域负责人
         },
-        bizUserSn: undefined, // 区域负责人
         productWord: '', // 产品编码/原厂编码
         productName: '' // 产品名称
       },
@@ -361,7 +361,7 @@ export default {
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
       this.queryParam.dealerLevel = undefined
-      this.queryParam.bizUserSn = undefined
+      this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.productWord = undefined
       this.queryParam.productName = undefined
       this.$refs.subarea.clearData()

+ 5 - 5
src/views/reportData/tireSalesReport/list.vue

@@ -45,7 +45,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="区域负责人">
-                  <BizUser v-model="queryParam.bizUserSn"></BizUser>
+                  <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
             </template>
@@ -160,9 +160,9 @@ export default {
         dealerSn: undefined,
         subareaArea: {// 区域分区
           subareaSn: undefined,
-          subareaAreaSn: undefined
-        },
-        bizUserSn: undefined // 区域负责人
+          subareaAreaSn: undefined,
+          bizUserSn: undefined // 区域负责人
+        }
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
@@ -314,7 +314,7 @@ export default {
       this.queryParam.dealerSn = undefined
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
-      this.queryParam.bizUserSn = undefined
+      this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealerLevel = undefined
       this.totalData = null
       this.$refs.areaList.clearData()

+ 14 - 6
src/views/reportData/tireSalesReport/outDetailModal.vue

@@ -43,17 +43,11 @@ export default {
     }
   },
   data () {
-    const _this = this
     return {
       spinning: false,
       isShow: this.openModal,
       titleInfo: '出库明细',
       queryParam: {},
-      columns: [{ title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
-        { title: '类型', width: '15%', dataIndex: 'customTypeDictValue', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '加盟商/终端', dataIndex: 'customName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '数量', dataIndex: 'outQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '金额', dataIndex: 'outAmount', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.spinning = true
@@ -74,6 +68,20 @@ export default {
       }
     }
   },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [{ title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
+        { title: '类型', width: '15%', dataIndex: 'customTypeDictValue', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '加盟商/终端', dataIndex: 'customName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '数量', dataIndex: 'outQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ]
+      if (this.$hasPermissions('B_outDetailShow_salesPrice')) {
+        arr.push({ title: '金额', dataIndex: 'outAmount', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
     getAjaxData (obj, titObj) {
       this.queryParam = obj