瀏覽代碼

差价明细报表

chenrui 3 年之前
父節點
當前提交
239e368835

+ 9 - 8
src/views/reportData/hPriceDifferenceDetailReport/list.vue

@@ -99,6 +99,7 @@
         :rowKey="(record) => record.id"
         :rowKey="(record) => record.id"
         :columns="columns"
         :columns="columns"
         :data="loadData"
         :data="loadData"
+        :defaultLoadData="false"
         :scroll="{ x: 2800 }"
         :scroll="{ x: 2800 }"
         bordered>
         bordered>
         <template slot="footer">
         <template slot="footer">
@@ -243,14 +244,14 @@ export default {
     //  查询
     //  查询
     handleSearch () {
     handleSearch () {
       const _this = this
       const _this = this
-      // this.$refs.ruleForm.validate(valid => {
-      //   if (valid) {
-      _this.$refs.table.refresh(true)
-      //   } else {
-      //     console.log('error submit!!')
-      //     return false
-      //   }
-      // })
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.$refs.table.refresh(true)
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
     },
     },
     custChange (val) {
     custChange (val) {
       this.queryParam.dealer.dealerSn = val.key
       this.queryParam.dealer.dealerSn = val.key

+ 34 - 56
src/views/reportData/priceDifferenceDetailReport/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="priceDifferenceDetailList-wrap">
   <a-card size="small" :bordered="false" class="priceDifferenceDetailList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form-model
         <a-form-model
           id="priceDifferenceDetailList-form"
           id="priceDifferenceDetailList-form"
           ref="ruleForm"
           ref="ruleForm"
@@ -14,7 +14,7 @@
           <a-row :gutter="15">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="日期" prop="month">
               <a-form-model-item label="日期" prop="month">
-                <a-date-picker v-model="queryParam.month" format="YYYY-MM" @change="onChange" />
+                <a-month-picker v-model="queryParam.month" @change="onChange" />
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="5" :sm="24">
             <a-col :md="5" :sm="24">
@@ -63,18 +63,19 @@
         :rowKey="(record) => record.id"
         :rowKey="(record) => record.id"
         :columns="columns"
         :columns="columns"
         :data="loadData"
         :data="loadData"
-        :scroll="{ x: 2800 }"
+        :defaultLoadData="false"
+        :scroll="{ x: 1060 }"
         bordered>
         bordered>
         <template slot="footer">
         <template slot="footer">
           <a-row :gutter="15">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              实售金额:{{ (totalData && (totalData.wholesalePrice1 || totalData.wholesalePrice1==0)) ? totalData.wholesalePrice1 : '--' }}
+              实售金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? totalData.totalRealAmount : '--' }}
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              开单金额:{{ (totalData && (totalData.wholesalePrice2 || totalData.wholesalePrice2==0)) ? totalData.wholesalePrice2 : '--' }}
+              开单金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              直接差额:{{ (totalData && (totalData.wholesalePrice3 || totalData.wholesalePrice3==0)) ? totalData.wholesalePrice3 : '--' }}
+              直接差额:{{ (totalData && (totalData.rebateAmount || totalData.rebateAmount==0)) ? totalData.rebateAmount : '--' }}
             </a-col>
             </a-col>
           </a-row>
           </a-row>
         </template>
         </template>
@@ -111,15 +112,15 @@ export default {
       addrProvinceList: [], //  省下拉
       addrProvinceList: [], //  省下拉
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: 70, align: 'center', fixed: 'left' },
         { title: '序号', dataIndex: 'no', width: 70, align: 'center', fixed: 'left' },
-        { title: '月份', dataIndex: 'dealer.subareaNameSet', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '省份', dataIndex: 'bizNo', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '记账门店', dataIndex: 'bizCreateDate', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'dealer.provinceName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌+二级分类', dataIndex: 'directDealerName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '实售金额', dataIndex: 'qty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '开单金额', dataIndex: 'wholesalePrice1', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '直接差额', dataIndex: 'wholesalePrice2', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '类型', dataIndex: 'bizTypeValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '月份', dataIndex: 'month', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '省份', dataIndex: 'provinceName', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '记账门店', dataIndex: 'rebateDealerName', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌+二级分类', dataIndex: 'productBrandAndType2', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '实售金额', dataIndex: 'totalRealAmount', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '开单金额', dataIndex: 'totalAmount', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '直接差额', dataIndex: 'rebateAmount', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '类型', dataIndex: 'bizType', width: 80, align: 'center', customRender: function (text) { return text || '--' } }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
@@ -146,13 +147,7 @@ export default {
   methods: {
   methods: {
     // 月份  change
     // 月份  change
     onChange (date, dateString) {
     onChange (date, dateString) {
-      console.log(date, dateString)
-    },
-    //  创建时间  change
-    dateChange (date) {
-      this.queryParam.time = date
-      this.queryParam.beginDate = date[0] || ''
-      this.queryParam.endDate = date[1] || ''
+      this.queryParam.month = dateString || null
     },
     },
     // 合计
     // 合计
     getCount (params) {
     getCount (params) {
@@ -167,23 +162,20 @@ export default {
     //  查询
     //  查询
     handleSearch () {
     handleSearch () {
       const _this = this
       const _this = this
-      // this.$refs.ruleForm.validate(valid => {
-      //   if (valid) {
-      _this.$refs.table.refresh(true)
-      //   } else {
-      //     console.log('error submit!!')
-      //     return false
-      //   }
-      // })
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.$refs.table.refresh(true)
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
     },
     },
-    custChange (val) {
-      this.queryParam.dealer.dealerSn = val.key
+    rebateDealerChange (val) {
+      this.queryParam.rebateDealerSn = val.key
     },
     },
-    //  产品分类  change
-    changeProductType (val, opt) {
-      this.queryParam.product.productTypeSn1 = val[0] ? val[0] : ''
-      this.queryParam.product.productTypeSn2 = val[1] ? val[1] : ''
-      this.queryParam.product.productTypeSn3 = val[2] ? val[2] : ''
+    custChange (val) {
+      this.queryParam.dealerSn = val.key
     },
     },
     //  省/市/区
     //  省/市/区
     getArea (leve, sn) {
     getArea (leve, sn) {
@@ -215,25 +207,11 @@ export default {
     },
     },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
-      this.queryParam.time = [
-        getDate.getCurrMonthDays().starttime,
-        getDate.getCurrMonthDays().endtime
-      ]
-      this.$refs.rangeDate.resetDate(this.queryParam.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
-      this.queryParam.bizNo = ''
-      this.queryParam.dealer.dealerSn = undefined
-      this.queryParam.dealer.dealerLevel = undefined
-      this.queryParam.dealer.subareaSn = undefined
-      this.queryParam.dealer.provinceSn = undefined
-      this.queryParam.product.brandType = ''
-      this.queryParam.product.productBrandSn = ''
-      this.queryParam.product.productTypeSn1 = ''
-      this.queryParam.product.productTypeSn2 = ''
-      this.queryParam.product.productTypeSn3 = ''
-      this.queryParam.bizType = undefined
-      this.productType = []
+      this.queryParam.month = undefined
+      this.queryParam.provinceSn = undefined
+      this.queryParam.rebateDealerSn = undefined
+      this.queryParam.dealerSn = undefined
+      this.$refs.rebateDealerList.resetForm()
       this.totalData = null
       this.totalData = null
       if (this.advanced) {
       if (this.advanced) {
         this.$refs.custList.resetForm()
         this.$refs.custList.resetForm()