Explorar o código

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

chenrui hai 1 ano
pai
achega
b153f9c592

+ 30 - 2
src/views/dealerManagement/rebateBinding/categoryList.vue

@@ -13,6 +13,7 @@
         :table-data="list"
         row-key-field-name="id"
         :cell-span-option="cellSpanOption"
+        :cell-style-option="cellStyleOption"
       />
       <div v-show="showEmpty" class="empty-data" :style="{height:maxHeight+'px'}"><a-empty description="暂无数据" :image="simpleImage"/></div>
     </a-spin>
@@ -56,6 +57,16 @@ export default {
       cellSpanOption: {
         bodyCellSpan: this.bodyCellSpan
       },
+      cellStyleOption: {
+        bodyCellClass: ({ row, column, rowIndex }) => {
+          if (column.field === 'superDealerName') {
+            return 'table-body-cell-1'
+          }
+          if (column.field === 'productTypeName3') {
+            return 'table-body-cell-2'
+          }
+        }
+      },
       showEmpty: true,
       checkedDealerSn: []
     }
@@ -155,14 +166,25 @@ export default {
         const rebateScopeList = item.rebateScopeList ? this.filterData(item.rebateScopeList, queryParam) : [{ productBrandName: null, productTypeName1: null, productTypeName2: null, productTypeName3: null }]
         const supDealerList = item.rebateDealerList.find(b => b.rebateParentType == 'SUPERIORS')
         const headDealerList = item.rebateDealerList.find(b => b.rebateParentType == 'HEAD')
-        const zdDealerList = item.rebateDealerList.find(b => b.rebateParentType == 'ASSIGN')
+        const zdDealerList = item.rebateDealerList.filter(b => b.rebateParentType == 'ASSIGN')
         // this.checkedDealerSn.push(rebateScopeList)
+        // 差价归属组合
+        const rebateDealerList = []
+        if (supDealerList) {
+          rebateDealerList.push(supDealerList)
+        }
+        zdDealerList && zdDealerList.map(zd => {
+          rebateDealerList.push(zd)
+        })
+        if (headDealerList) {
+          rebateDealerList.push(headDealerList)
+        }
 
         for (let j = 0; j < rebateScopeList.length; j++) {
           rebateScopeList[j].no = no + j + 1
           if (j == 0) {
             rebateScopeList[j].rowspan = rebateScopeList.length
-            rebateScopeList[j].rebateDealerList = [...supDealerList, ...zdDealerList, ...headDealerList]
+            rebateScopeList[j].rebateDealerList = rebateDealerList
           }
           rebateScopeList[j].dealerUpsSn = item.dealerUpsSn
           rebateScopeList[j].dealerSn = item.dealerSn
@@ -249,4 +271,10 @@ export default {
     .ve-table .ve-table-container .ve-table-content-wrapper{
       border-bottom: 1px solid #ddd;
     }
+    .table-body-cell-1 {
+            border-left: 1px solid #ddd !important;
+        }
+    .table-body-cell-2 {
+            border-right: none !important;
+        }
   </style>

+ 27 - 26
src/views/salesManagement/salesQueryNew/comps/activeQueryPart.vue

@@ -78,7 +78,7 @@
       </template>
       <!-- 价格 -->
       <template slot="productPrice" slot-scope="text, record">
-         {{ text||text==0 ? toThousands(text) : '--' }} <span title="原价" v-if="promoProductClz == 'GIFT' || promoProductClz == 'DISCOUNT'">({{ record.origPrice||record.origPrice==0 ? toThousands(record.origPrice) : '--' }})</span>
+        {{ text||text==0 ? toThousands(text) : '--' }} <span title="原价" v-if="promoProductClz == 'GIFT' || promoProductClz == 'DISCOUNT'">({{ record.origPrice||record.origPrice==0 ? toThousands(record.origPrice) : '--' }})</span>
       </template>
       <!-- 产品名称 -->
       <template slot="productName" slot-scope="text, record">
@@ -143,7 +143,7 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       promoProductClz: 'GATE',
       promoRuleData: null,
-      tabList:[],
+      tabList: [],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -163,10 +163,10 @@ export default {
               const productUnit = data.list[i].productUnit || '--'
               const productPackQtyUnit = data.list[i].productPackQtyUnit || '--'
               data.list[i].packQtyV = productPackQty + productUnit + '/' + productPackQtyUnit
-              if(data.list[i].unitType=='SL'){
+              if (data.list[i].unitType == 'SL') {
                 data.list[i].unitQtyV = data.list[i].unitQty ? (data.list[i].unitQty + data.list[i].productUnit) : '--'
-              }else{
-                data.list[i].unitQtyV = data.list[i].productPackQty&&data.list[i].unitQty ? ((data.list[i].productPackQty*data.list[i].unitQty) + data.list[i].productUnit) : '--'
+              } else {
+                data.list[i].unitQtyV = data.list[i].productPackQty && data.list[i].unitQty ? ((data.list[i].productPackQty * data.list[i].unitQty) + data.list[i].productUnit) : '--'
               }
             }
             this.disabled = false
@@ -195,14 +195,15 @@ export default {
       let idx = 7
       if (this.$hasPermissions('B_salesEdit_salesPrice')) { // 售价权限
         arr.splice(idx, 0, { title: '售价', dataIndex: 'productPrice', width: '100px', align: 'right', scopedSlots: { customRender: 'productPrice' } })
-        idx = idx + 1
+        arr.splice(idx + 1, 0, { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
+        idx = idx + 2
       }
-      arr.splice(idx+1, 0,{ title: '起订量', dataIndex: 'unitQtyV', width: '60px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      arr.splice(idx + 1, 0, { title: '起订量', dataIndex: 'unitQtyV', width: '60px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       return arr
     }
   },
-  watch:{
-    advanced(a,b){
+  watch: {
+    advanced (a, b) {
       this.tableHeight = window.innerHeight - (a ? 375 : 330)
     }
   },
@@ -210,12 +211,12 @@ export default {
     loadWarehouse (sn) {
       this.defaultWarehouseSn = sn
       this.queryParam.warehouseSn = sn
-      if(this.buyerSn){
+      if (this.buyerSn) {
         this.resetSearchForm()
       }
     },
     // 切换tab
-    changeTab(e){ 
+    changeTab (e) {
       this.promoProductClz = e
       this.resetSearchForm()
     },
@@ -257,32 +258,32 @@ export default {
       this.queryParam.dealerLevel = data.buyerLevel
       this.queryParam.promoRuleSn = promo.promoRuleSn
       this.queryParam.salesPromoSn = promo.salesPromoSn
-      
+
       // 是否是买产品送产品
-      const isMcpScp = this.promoRuleData&&this.promoRuleData.convertExpenseFlag==1&&this.promoRuleData.promotionRuleType=='BUY_PROD_GIVE_PROD'
+      const isMcpScp = this.promoRuleData && this.promoRuleData.convertExpenseFlag == 1 && this.promoRuleData.promotionRuleType == 'BUY_PROD_GIVE_PROD'
       // 是否卖产品送采购额
-      const isMcpScge = this.promoRuleData.promotionRuleType=='BUY_PROD_GIVE_MONEY'&&this.promoRuleData.scopeFlag==='1'
-      
+      const isMcpScge = this.promoRuleData.promotionRuleType == 'BUY_PROD_GIVE_MONEY' && this.promoRuleData.scopeFlag === '1'
+
       const tabList = []
-      if(this.promoRuleData){ 
-        if(this.promoRuleData.gateFlag==='1'){
-          tabList.push({text:'门槛产品',val:'GATE'})
+      if (this.promoRuleData) {
+        if (this.promoRuleData.gateFlag === '1') {
+          tabList.push({ text: '门槛产品', val: 'GATE' })
         }
-        if(this.promoRuleData.promotionRuleType!='PROMO_PROD'){
-          tabList.push({text:'正价产品',val:'REGULAR'})
+        if (this.promoRuleData.promotionRuleType != 'PROMO_PROD') {
+          tabList.push({ text: '正价产品', val: 'REGULAR' })
         }
-        if(this.promoRuleData.regularPromotionSameFlag==='0'||this.promoRuleData.scopeFlag==='0'||isMcpScge){
-          const levelText = promo.countData.scopeLevelFlag && isMcpScp ? '(阶梯'+promo.countData.scopeLevel+')' : ''
-          tabList.push({text:'促销产品'+ levelText ,val:'GIFT'})
+        if (this.promoRuleData.regularPromotionSameFlag === '0' || this.promoRuleData.scopeFlag === '0' || isMcpScge) {
+          const levelText = promo.countData.scopeLevelFlag && isMcpScp ? '(阶梯' + promo.countData.scopeLevel + ')' : ''
+          tabList.push({ text: '促销产品' + levelText, val: 'GIFT' })
         }
-        if(this.promoRuleData.promotionRuleType=='PROMO_PROD'){
-          tabList.push({text:'特价产品',val:'DISCOUNT'})
+        if (this.promoRuleData.promotionRuleType == 'PROMO_PROD') {
+          tabList.push({ text: '特价产品', val: 'DISCOUNT' })
         }
       }
       this.tabList = tabList
       this.promoProductClz = tabList[0].val
       this.tableHeight = window.innerHeight - 330
-      
+
       this.queryParam.scopeLevel = promo.countData.scopeLevel
       this.resetSearchForm()
     },

+ 2 - 1
src/views/salesManagement/salesQueryNew/comps/productList.vue

@@ -416,11 +416,12 @@ export default {
       ]
       if (this.$hasPermissions('B_salesEdit_salesPrice')) { // 售价权限
         arr.splice(3, 0, { title: '售价', dataIndex: 'price', width: '6%', align: 'right', scopedSlots: { customRender: 'price' } })
+        arr.splice(4, 0, { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
         let idx = 0
         // 如果是特价活动
         if (this.promo.promotionRule.promotionRuleType == 'PROMO_PROD') {
           idx = idx + 1
-          arr.splice(4, 0, { title: '折扣', dataIndex: 'discountPrice', width: '6%', align: 'right', scopedSlots: { customRender: 'discountPrice' } })
+          arr.splice(5, 0, { title: '折扣', dataIndex: 'discountPrice', width: '6%', align: 'right', scopedSlots: { customRender: 'discountPrice' } })
         }
         arr.splice(8 + idx, 0, { title: '售价小计', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }

+ 2 - 1
src/views/salesManagement/salesQueryNew/comps/productNormalList.vue

@@ -298,7 +298,8 @@ export default {
       ]
       if (this.$hasPermissions('B_salesEdit_salesPrice')) { // 售价权限
         arr.splice(3, 0, { title: '售价', dataIndex: 'price', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
-        arr.splice(7, 0, { title: '售价小计', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(4, 0, { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } })
+        arr.splice(8, 0, { title: '售价小计', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
       return arr
     }

+ 4 - 3
src/views/salesManagement/salesQueryNew/comps/queryPart.vue

@@ -176,12 +176,13 @@ export default {
       ]
       if (this.$hasPermissions('B_salesEdit_salesPrice')) { // 售价权限
         arr.splice(6, 0, { title: '售价', dataIndex: 'productPrice', width: '80px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(7, 0, { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '80px', align: 'center', customRender: function (text) { return text || '--' } })
       }
       return arr
     }
   },
-  watch:{
-    advanced(a,b){
+  watch: {
+    advanced (a, b) {
       this.tableHeight = window.innerHeight - (a ? 325 : 280)
     }
   },
@@ -189,7 +190,7 @@ export default {
     loadWarehouse (sn) {
       this.defaultWarehouseSn = sn
       this.queryParam.warehouseSn = sn
-      if(this.buyerSn){
+      if (this.buyerSn) {
         this.resetSearchForm()
       }
     },

+ 2 - 2
src/views/salesManagement/salesQueryNew/list.vue

@@ -478,10 +478,10 @@ export default {
       const _this = this
       const arr = [
         { title: '创建时间', dataIndex: 'createDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
-        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '7%', align: 'center' },
+        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '8%', align: 'center' },
         { title: <a-tooltip placement='top' title='第一次提交时间'>提交时间&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'firstSubmitDate', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') }, sorter: true },
         { title: '客户名称', dataIndex: 'buyerName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '8%', align: 'center', ellipsis: true },
+        { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '7%', align: 'center', ellipsis: true },
         { title: '总数量', dataIndex: 'totalQty', scopedSlots: { customRender: 'totalQty' }, width: '4%', align: 'center' },
         { title: '总售价', dataIndex: 'totalAmount', width: '4%', align: 'right', isShow: false, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '已下推数量', dataIndex: 'totalPushedQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

+ 2 - 1
src/views/salesReturnManagement/salesReturn/queryPart.vue

@@ -192,7 +192,8 @@ export default {
       ]
       let i = 5
       if (this.$hasPermissions('B_salesReturnEdit_salesPrice') && this.isShowPrice) { //  售价权限
-        arr.splice(4, 0, { title: '当前售价', dataIndex: 'productPrice', width: '9%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(4, 0, { title: '当前售价', dataIndex: 'productPrice', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(5, 0, { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
         i = 6
       }
       // 实收数量是否显示

+ 1 - 0
src/views/salesReturnManagement/salesReturn/salesReturnEdit.vue

@@ -481,6 +481,7 @@ export default {
         'salesReturnBillSn': this.orderSn,
         'salesReturnBillNo': this.ordeDetail.salesReturnBillNo,
         'price': row.productPrice,
+        'priceLevel': row.priceLevel,
         'returnReasonCode': row.returnReasonCode,
         'returnReason': rows ? rows.dispName : '',
         'goodFlag': this.goodFlag,