瀏覽代碼

修改bug

chenrui 1 年之前
父節點
當前提交
6296038522
共有 1 個文件被更改,包括 31 次插入20 次删除
  1. 31 20
      src/views/reportData/promotionSalesOrderReport/list.vue

+ 31 - 20
src/views/reportData/promotionSalesOrderReport/list.vue

@@ -56,8 +56,14 @@
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="客户类型">
-                  <v-select code="DEALER_TYPE" id="promotionSalesList-dealerType" v-model="queryParam.dealerType" allowClear placeholder="请选择客户类型"></v-select>
+                <a-form-item label="客户级别">
+                  <v-select
+                    v-model="queryParam.dealerLevel"
+                    ref="dealerLevel"
+                    id="promotionSalesList-dealerLevel"
+                    code="DEALER_LEVEL"
+                    placeholder="请选择客户级别"
+                    allowClear></v-select>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -67,7 +73,14 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品分类">
-                  <productTypeAll placeholder="请选择产品分类" :level="2" @change="changeProductType" v-model="productType" id="productInfoList-productType"></productTypeAll>
+                  <productTypeAll
+                    expandType="click"
+                    :changeOnSelect="true"
+                    placeholder="请选择产品分类"
+                    :level="2"
+                    @change="changeProductType"
+                    v-model="productType"
+                    id="productInfoList-productType"></productTypeAll>
                 </a-form-item>
               </a-col>
             </template>
@@ -135,13 +148,15 @@
                   <a-col
                     span="4">未参与活动销售额:{{ (totalData.notpromotionSale || totalData.notpromotionSale==0) ? toThousands(totalData.notpromotionSale) : '--' }}</a-col>
                   <a-col
-                    span="4">调拨物料费用:{{ (totalData.allocateAmount || totalData.allocateAmount==0) ? toThousands(totalData.allocateAmount) : '--' }}</a-col>
+                    span="4">调拨物料成本费用:{{ (totalData.allocateAmount || totalData.allocateAmount==0) ? toThousands(totalData.allocateAmount) : '--' }}</a-col>
                   <a-col
-                    span="4">促销成本费用+物料费用合计:{{ (totalData.promoCostFeeAndAllocateCost || totalData.promoCostFeeAndAllocateCost==0)? toThousands(totalData.promoCostFeeAndAllocateCost) : '--' }}</a-col>
+                    span="4">调拨物料销售费用:{{ (totalData.allocateAmount || totalData.allocateAmount==0) ? toThousands(totalData.allocateAmount) : '--' }}</a-col>
+                  <a-col
+                    span="4">促销成本费用+物料成本费用合计:{{ (totalData.promoCostFeeAndAllocateCost || totalData.promoCostFeeAndAllocateCost==0)? toThousands(totalData.promoCostFeeAndAllocateCost) : '--' }}</a-col>
                   <a-col
                     span="4">成本合计占比:{{ totalData.totalCostRate ? toThousands(totalData.totalCostRate*100)+'%' : '--' }}</a-col>
                   <a-col
-                    span="4">促销销售费用+物料费用合计:{{ (totalData.promoSaleFeeAndAllocateAmount || totalData.promoSaleFeeAndAllocateAmount==0) ? toThousands(totalData.promoSaleFeeAndAllocateAmount) : '--' }}</a-col>
+                    span="4">促销销售费用+物料销售费用合计:{{ (totalData.promoSaleFeeAndAllocateAmount || totalData.promoSaleFeeAndAllocateAmount==0) ? toThousands(totalData.promoSaleFeeAndAllocateAmount) : '--' }}</a-col>
                   <a-col
                     span="4">销售合计占比:{{ totalData.totalSaleRate ? toThousands(totalData.totalSaleRate*100)+'%' : '--' }}</a-col>
                 </a-row>
@@ -193,11 +208,11 @@ export default {
         productBrand: undefined,
         productTypeSn1: '', //  产品一级分类
         productType: '', //  产品二级分类
-        dealerType: undefined
+        dealerLevel: undefined
       },
       productType: [],
       form: {
-        monthInfo: [moment().format('YYYY-MM'), moment().format('YYYY-MM')]
+        monthInfo: []
       },
       columns: [
         { title: '区域', dataIndex: 'subareaArea.subareaName', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
@@ -205,7 +220,7 @@ export default {
         { title: '区域负责人', dataIndex: 'bizUserName', width: '90px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '省份', dataIndex: 'dealerInfo.provinceName', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'dealerInfo.dealerName', width: '130px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户类型', dataIndex: 'dealerInfo.dealerTypeDictValue', width: '90px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户级别', dataIndex: 'dealerInfo.dealerLevelDictValue', width: '90px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'brandName', width: '90px', align: 'center', scopedSlots: { customRender: 'brandName' } },
         { title: '二级分类', dataIndex: 'brandtypeName', width: '90px', align: 'center', scopedSlots: { customRender: 'brandtypeName' } },
         { title: '销售额', dataIndex: 'totalSaleAmount', width: '90px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
@@ -215,10 +230,11 @@ export default {
         { title: '促销销售费用比', dataIndex: 'promoSaleFeeRate', width: '96px', align: 'right', customRender: text => (text ? this.toThousands(text * 100) + '%' : '--') },
         { title: '参与活动销售额', dataIndex: 'promoSaleAmount', width: '96px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '未参与活动销售额', dataIndex: 'notpromotionSale', width: '90px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
-        { title: '调拨物料费用', dataIndex: 'allocateAmount', width: '90px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
-        { title: '促销成本费用+物料费用合计', dataIndex: 'promoCostFeeAndAllocateCost', width: '100px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '调拨物料成本费用', dataIndex: 'allocateAmount', width: '90px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '调拨物料销售费用', dataIndex: 'allocateAmount1', width: '90px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '促销成本费用+物料成本费用合计', dataIndex: 'promoCostFeeAndAllocateCost', width: '100px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '成本合计占比', dataIndex: 'totalCostRate', width: '90px', align: 'right', customRender: text => (text ? this.toThousands(text * 100) + '%' : '--') },
-        { title: '促销销售费用+物料费用合计', dataIndex: 'promoSaleFeeAndAllocateAmount', width: '100px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '促销销售费用+物料销售费用合计', dataIndex: 'promoSaleFeeAndAllocateAmount', width: '100px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '销售合计占比', dataIndex: 'totalSaleRate', width: '90px', align: 'right', customRender: text => (text ? this.toThousands(text * 100) + '%' : '--') }
       ],
       rules: {
@@ -334,6 +350,7 @@ export default {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
+          console.log('11111111111:', valid)
           _this.$refs.table.refresh(true)
         } else {
           _this.$message.error('请选择统计月份')
@@ -352,18 +369,12 @@ export default {
     },
     //  产品分类  change
     changeProductType (val, opt) {
-      if (val.length < 2) {
-        this.$message.error('请选择二级分类')
-        this.disabled = true
-        return
-      }
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
       this.queryParam.productType = val[1] ? val[1] : ''
-      this.disabled = false
     },
     //  重置
     resetSearchForm () {
-      this.form.monthInfo = [this.moment().format('YYYY-MM'), this.moment().format('YYYY-MM')]
+      this.form.monthInfo = []
       this.startValue = this.moment().format('YYYY-MM')
       this.endValue = this.moment().format('YYYY-MM')
       this.queryParam.brandTypeBeginDate = this.moment().format('YYYYMM')
@@ -376,7 +387,7 @@ export default {
       this.queryParam.productBrand = undefined
       this.queryParam.productTypeSn1 = undefined
       this.queryParam.productType = undefined
-      this.queryParam.dealerType = undefined
+      this.queryParam.dealerLevel = undefined
 
       this.productType = []
       this.totalData = null