chenrui hai 1 ano
pai
achega
7551aba8eb
Modificáronse 1 ficheiros con 33 adicións e 6 borrados
  1. 33 6
      src/views/reportData/tireSalesReport/subareaList.vue

+ 33 - 6
src/views/reportData/tireSalesReport/subareaList.vue

@@ -11,6 +11,11 @@
           :model="queryParam"
           @keyup.enter.native="handleSearch">
           <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="下推时间" prop="time">
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+              </a-form-model-item>
+            </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="区域/分区">
                 <subarea id="allocateBillList-subarea" ref="subarea" @change="subareaChange"></subarea>
@@ -66,9 +71,8 @@
           <template slot="footer">
             <a-row :gutter="15">
               <a-col :md="4" :sm="24">采购数量:{{ (totalData && (totalData.totalbuyAmount || totalData.totalbuyAmount==0)) ? totalData.totalbuyAmount : '--' }}</a-col>
-              <a-col :md="4" :sm="24">库存数量:{{ (totalData && (totalData.totalstoreAmount || totalData.totalstoreAmount==0)) ? totalData.totalstoreAmount: '--' }}</a-col>
-              <a-col :md="4" :sm="24">售出数量:{{ (totalData && (totalData.totalsellAmount || totalData.totalsellAmount==0)) ?totalData.totalsellAmount: '--' }}</a-col>
-              <a-col :md="4" :sm="24">已绑质保单数量:{{ (totalData && (totalData.totalwarrantyAmount || totalData.totalwarrantyAmount==0)) ?totalData.totalwarrantyAmount: '--' }}</a-col>
+              <a-col :md="4" :sm="24">库存数量:{{ (totalData && (totalData.totalstoreAmount || totalData.totalsellAmount==0)) ? totalData.totalsellAmount: '--' }}</a-col>
+              <a-col :md="4" :sm="24">已售出数量:{{ (totalData && (totalData.totalsellAmount || totalData.totalsellAmount==0)) ?totalData.totalsellAmount: '--' }}</a-col>
             </a-row>
           </template>
         </s-table>
@@ -79,6 +83,7 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import getDate from '@/libs/getDate.js'
 import { STable } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
@@ -93,7 +98,13 @@ export default {
     return {
       spinning: false,
       tableHeight: 0,
+      time: [
+        getDate.getThreeMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ],
       queryParam: { //  查询条件
+        beginDate: getDate.getThreeMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         subareaSn: undefined,
         subareaAreaSn: undefined,
         bizUserSn: undefined
@@ -128,8 +139,7 @@ export default {
         { title: '区域负责人', dataIndex: 'userNameQyfzrs', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '采购数量', dataIndex: 'buyAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '库存数量', dataIndex: 'storeAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '售出数量', dataIndex: 'sellAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '已绑质保单数量', dataIndex: 'warrantyAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '已售出数量', dataIndex: 'sellAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
     }
   },
@@ -147,18 +157,35 @@ export default {
     handleSearch () {
       this.$refs.table.refresh(true)
     },
+    //  下推时间  change
+    dateChange (date) {
+      if (date[0] && date[1]) {
+        this.time = date
+      } else {
+        this.time = []
+      }
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
     subareaChange (val) {
       this.queryParam.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaAreaSn = val[1] ? val[1] : undefined
     },
     //  重置
     resetSearchForm () {
+      this.time = [
+        getDate.getThreeMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ]
+      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.subareaSn = undefined
       this.queryParam.subareaAreaSn = undefined
       this.queryParam.bizUserSn = undefined
       this.totalData = null
       this.$refs.subarea.clearData()
-      this.$refs.table.refresh()
+      this.$refs.table.clearTable()
     },
     //  导出
     handleExport () {