Explorar el Código

轮胎统计报表

chenrui hace 1 año
padre
commit
c521171312

+ 1 - 1
src/api/reportData.js

@@ -1232,7 +1232,7 @@ export const getWarrantyInfo = (params) => {
 
 // 轮胎统计报表   列表
 export const tireReportList = (params) => {
-  const url = `/report/tireRptDealerDayOutStock/queryPage/${params.pageNo}/${params.pageSize}`
+  const url = `/report/tireRptDealerProductDay/queryPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize
   return axios({

+ 30 - 28
src/views/reportData/tireSalesReport/detailList.vue

@@ -185,18 +185,20 @@ export default {
       ],
       queryParam: { //  查询条件
         bizBeginDate: getDate.getThreeMonthDaysInfo().starttime.replace(/-/g, ''),
-        bizEndDate: getDate.getCurrMonthDaysInfo().endtime.replace(/-/g, '')
-        // provinceSn: undefined,
-        // citySn: undefined,
-        // districtSn: undefined,
-        // dealerName: '',
-        // dealerSn: '',
-        // subareaSn: undefined,
-        // subareaAreaSn: undefined,
-        // bizUserSn: undefined,
-        // productWord: '', // 产品编码/原厂编码
-        // productName: '', // 产品名称
-        // dealerLevel: undefined
+        bizEndDate: getDate.getCurrMonthDaysInfo().endtime.replace(/-/g, ''),
+        provinceSn: undefined,
+        citySn: undefined,
+        districtSn: undefined,
+        dealerLevel: undefined,
+        dealerName: '',
+        dealerSn: '',
+        subareaArea: {// 区域分区
+          subareaSn: undefined,
+          subareaAreaSn: undefined
+        },
+        bizUserSn: undefined, // 区域负责人
+        productWord: '', // 产品编码/原厂编码
+        productName: '' // 产品名称
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
@@ -272,9 +274,9 @@ export default {
         { title: <div>已绑质保单<div>数量</div></div>, dataIndex: 'warrantyAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
-      if (this.$hasPermissions('M_tireSalesReportList_salesPrice')) {
-        arr.splice(11, 0, { title: '订货金额', dataIndex: 'buyPriceAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-      }
+      // if (this.$hasPermissions('M_tireSalesReportList_salesPrice')) {
+      //   arr.splice(11, 0, { title: '订货金额', dataIndex: 'buyPriceAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      // }
       return arr
     }
   },
@@ -323,8 +325,8 @@ export default {
       this.queryParam.bizEndDate = date[1].replace(/-/g, '') || ''
     },
     subareaChange (val) {
-      this.queryParam.subareaSn = val[0] ? val[0] : undefined
-      this.queryParam.subareaAreaSn = val[1] ? val[1] : undefined
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
     //  重置
     resetSearchForm () {
@@ -335,17 +337,17 @@ export default {
       this.$refs.rangeDate.resetDate(this.time)
       this.queryParam.bizBeginDate = getDate.getThreeMonthDaysInfo().starttime.replace(/-/g, '')
       this.queryParam.bizEndDate = getDate.getCurrMonthDaysInfo().endtime.replace(/-/g, '')
-      // this.queryParam.provinceSn = undefined
-      // this.queryParam.citySn = undefined
-      // this.queryParam.districtSn = undefined
-      // this.queryParam.dealerName = ''
-      // this.queryParam.dealerSn = ''
-      // this.queryParam.subareaSn = undefined
-      // this.queryParam.subareaAreaSn = undefined
-      // this.queryParam.bizUserSn = undefined
-      // this.queryParam.productWord = undefined
-      // this.queryParam.productName = undefined
-      // this.queryParam.dealerLevel = undefined
+      this.queryParam.provinceSn = undefined
+      this.queryParam.citySn = undefined
+      this.queryParam.districtSn = undefined
+      this.queryParam.dealerName = ''
+      this.queryParam.dealerSn = ''
+      this.queryParam.subareaArea.subareaSn = undefined
+      this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.bizUserSn = undefined
+      this.queryParam.productWord = undefined
+      this.queryParam.productName = undefined
+      this.queryParam.dealerLevel = undefined
       this.totalData = null
       this.$refs.areaList.clearData()
       if (this.advanced) {

+ 25 - 27
src/views/reportData/tireSalesReport/list.vue

@@ -12,7 +12,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="日期">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate ref="rangeDate" :showTime="false" :value="time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -149,23 +149,23 @@ export default {
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
       time: [
-        getDate.getThreeMonthDays().starttime,
-        getDate.getCurrMonthDays().endtime
+        getDate.getThreeMonthDaysInfo().starttime,
+        getDate.getCurrMonthDaysInfo().endtime
       ],
       queryParam: { //  查询条件
-        beginDate: getDate.getThreeMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
+        bizBeginDate: getDate.getThreeMonthDaysInfo().starttime.replace(/-/g, ''),
+        bizEndDate: getDate.getCurrMonthDaysInfo().endtime.replace(/-/g, ''),
         provinceSn: undefined,
         citySn: undefined,
         districtSn: undefined,
+        dealerLevel: undefined,
         dealerName: '',
         dealerSn: '',
-        subareaSn: undefined,
-        subareaAreaSn: undefined,
-        bizUserSn: undefined,
-        productWord: '', // 产品编码/原厂编码
-        productName: '', // 产品名称
-        dealerLevel: undefined
+        subareaArea: {// 区域分区
+          subareaSn: undefined,
+          subareaAreaSn: undefined
+        },
+        bizUserSn: undefined // 区域负责人
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
@@ -177,7 +177,7 @@ export default {
         const params = Object.assign(parameter, this.queryParam)
         return tireReportList(params).then(res => {
           let data
-          if (res.status == 200) {
+          if (res.status == 200 && res.data) {
             data = res.data
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
@@ -235,9 +235,9 @@ export default {
         { title: '累计出库金额', dataIndex: 'outAmount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: <div>已绑质保单<div>数量</div></div>, dataIndex: 'warrantyAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
-      if (this.$hasPermissions('M_tireSalesReportList_salesPrice')) {
-        arr.splice(11, 0, { title: '订货金额', dataIndex: 'buyPriceAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-      }
+      // if (this.$hasPermissions('M_tireSalesReportList_salesPrice')) {
+      //   arr.splice(11, 0, { title: '订货金额', dataIndex: 'buyPriceAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      // }
       return arr
     }
   },
@@ -269,32 +269,30 @@ export default {
       } else {
         this.time = []
       }
-      this.queryParam.beginDate = date[0] || ''
-      this.queryParam.endDate = date[1] || ''
+      this.queryParam.bizBeginDate = date[0].replace(/-/g, '') || ''
+      this.queryParam.bizEndDate = date[1].replace(/-/g, '') || ''
     },
     subareaChange (val) {
-      this.queryParam.subareaSn = val[0] ? val[0] : undefined
-      this.queryParam.subareaAreaSn = val[1] ? val[1] : undefined
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
     //  重置
     resetSearchForm () {
       this.time = [
-        getDate.getThreeMonthDays().starttime,
-        getDate.getCurrMonthDays().endtime
+        getDate.getThreeMonthDaysInfo().starttime,
+        getDate.getCurrMonthDaysInfo().endtime
       ]
       this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.bizBeginDate = getDate.getThreeMonthDaysInfo().starttime.replace(/-/g, '')
+      this.queryParam.bizEndDate = getDate.getCurrMonthDaysInfo().endtime.replace(/-/g, '')
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.districtSn = undefined
       this.queryParam.dealerName = ''
       this.queryParam.dealerSn = ''
-      this.queryParam.subareaSn = undefined
-      this.queryParam.subareaAreaSn = undefined
+      this.queryParam.subareaArea.subareaSn = undefined
+      this.queryParam.subareaArea.subareaAreaSn = undefined
       this.queryParam.bizUserSn = undefined
-      this.queryParam.productWord = undefined
-      this.queryParam.productName = undefined
       this.queryParam.dealerLevel = undefined
       this.totalData = null
       this.$refs.areaList.clearData()