فهرست منبع

修改起止日期传值

chenrui 2 سال پیش
والد
کامیت
97f925df29

+ 7 - 1
src/views/dataStatistics/orderDataSummary/list.vue

@@ -22,7 +22,7 @@
               </a-col>
               <a-col :md="4" :sm="24">
                 <a-form-item label="所在地" >
-                  <areaList level="2" placeholder="请选择所在地" @change="areaChange"></areaList>
+                  <areaList level="2" placeholder="请选择所在地" v-model="areaArr" @change="areaChange"></areaList>
                 </a-form-item>
               </a-col>
               <template v-if="advanced">
@@ -171,6 +171,7 @@ export default {
       itemData: null, // 编辑行数据
       openStatusModal: false, // 货架状态弹窗初始状态
       statisticsObj: null,
+      areaArr:[],
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
@@ -268,6 +269,11 @@ export default {
         dealerProvinceSn: undefined,
         dealerCitySn: undefined
       }
+      this.areaArr=[];
+      this.$refs.rangeDate.resetDate()
+      if(this.advanced){
+        this.$refs.orderDate.resetDate();
+      }
       this.$refs.dealerList.resetForm()
       this.$refs.storeList.resetForm()
       this.$refs.table.refresh(true)

+ 8 - 8
src/views/dataStatistics/userAnalysis/activeUser.vue

@@ -110,7 +110,7 @@
               </a-col>
               <a-col :md="4" :sm="24">
                 <a-form-item label="所在地">
-                  <areaList level="2" placeholder="请选择所在地" @change="areaChange"></areaList>
+                  <areaList level="2" placeholder="请选择所在地" v-model="areaArr" @change="areaChange"></areaList>
                 </a-form-item>
               </a-col>
               <template v-if="advanced">
@@ -177,6 +177,7 @@ import storeList from '@/views/common/storeList.vue'
 import { toThousands } from '@/libs/tools.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import setModal from './setModal.vue'
+import { dealChooseDate } from '@/utils/util'
 // import { forEach } from 'core-js/js/array'
 // import { assign } from 'core-js/es7/object'
 export default {
@@ -207,6 +208,7 @@ export default {
       getShelfLeveData: [], // 货架等级数据
       statisticsObj: null,
       cardIndex: null,
+      areaArr: [],
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
@@ -247,14 +249,10 @@ export default {
     },
     //  时间  change
     dateChange (date) {
-      this.queryParam.beginDate = date[0]
-      this.queryParam.endDate = date[1]
-    },
-    //  时间  change
-    orderDateChange (date) {
-      this.queryParam.beginDate = date[0]
-      this.queryParam.endDate = date[1]
+      this.queryParam.beginDate = date[0] ? dealChooseDate(date[0], 'start') : ''
+      this.queryParam.endDate = date[1] ? dealChooseDate(date[1], 'end') : ''
     },
+
     // 经销商 change
     dealerChange (obj) {
       this.queryParam.dealerSn = obj.key || undefined
@@ -288,6 +286,8 @@ export default {
         dealerProvinceSn: undefined,
         dealerCitySn: undefined
       }
+      this.areaArr = []
+      this.$refs.rangeDate.resetDate()
       this.$refs.dealerList.resetForm()
       this.$refs.storeList.resetForm()
       this.$refs.table.refresh(true)

+ 1 - 1
src/views/dataStatistics/userAnalysis/list.vue

@@ -54,7 +54,7 @@
           </div>
         </div>
         <div class="c-3">
-          <p>● 使用用户中,最近30天内,有产生货架订单的汽修店定义为活跃门店</p>
+          <p>● 使用用户中,最近30天内,有产生销售单的汽修店定义为活跃门店</p>
           <p>● 这些活跃门店的员工为活跃用户</p>
         </div>
         <div class="c-4">

+ 4 - 4
src/views/dataStatistics/userAnalysis/registeredUser.vue

@@ -97,7 +97,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import { registerUserQueryPage, queryStatistics } from '@/api/report.js'
 import dealerList from '@/views/common/dealerList.vue'
 import storeList from '@/views/common/storeList.vue'
-import { toThousands } from '@/libs/tools.js'
+import { dealChooseDate } from '@/utils/util'
 export default {
   name: 'UserList',
   components: { STable, VSelect, rangeDate, dealerList, storeList },
@@ -130,7 +130,7 @@ export default {
         { title: '汽车修理厂', dataIndex: 'storeName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '职位', dataIndex: 'storeManagerFlagDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '配件经销商', dataIndex: 'dealerName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { slots: { title: 'customTitle' }, dataIndex: 'vinCount', width: '10%', align: 'center', customRender: function (text) { return toThousands(text, 2) || '--' } }
+        { slots: { title: 'customTitle' }, dataIndex: 'vinCount', width: '10%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -164,8 +164,8 @@ export default {
     },
     //  时间  change
     dateChange (date) {
-      this.queryParam.beginDate = date[0]
-      this.queryParam.endDate = date[1]
+      this.queryParam.beginDate = date[0] ? dealChooseDate(date[0], 'start') : ''
+      this.queryParam.endDate = date[1] ? dealChooseDate(date[1], 'ends') : ''
     },
     // 经销商 change
     dealerChange (obj) {

+ 19 - 7
src/views/dataStatistics/userAnalysis/usedUser.vue

@@ -35,7 +35,13 @@
               <template v-if="advanced">
                 <a-col :md="4" :sm="24">
                   <a-form-item label="货架状态">
-                    <v-select id="userd-state" code="SHELF_STATE" v-model="queryParam.shelfState" allowClear placeholder="请选择状态"></v-select>
+                    <v-select
+                      id="userd-state"
+                      code="SHELF_STATE"
+                      v-model="queryParam.shelfState"
+                      allowClear
+                      placeholder="请选择状态"
+                      :notIn="['NOT_ENABLE']"></v-select>
                   </a-form-item>
                 </a-col>
                 <a-col :md="5" :sm="24">
@@ -104,6 +110,7 @@ import dealerList from '@/views/common/dealerList.vue'
 import storeList from '@/views/common/storeList.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { toThousands } from '@/libs/tools.js'
+import { dealChooseDate } from '@/utils/util'
 export default {
   name: 'UserList',
   components: { STable, VSelect, rangeDate, dealerList, storeList, areaList },
@@ -139,8 +146,8 @@ export default {
         { title: '配件经销商', dataIndex: 'dealerName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '所在地', scopedSlots: { customRender: 'area' }, width: '11%', align: 'center' },
         { title: '货架状态', dataIndex: 'shelfStateDictValue', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '铺货数量', dataIndex: 'totalShelfMaxQty', width: '11%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' } },
-        { title: '铺货金额', dataIndex: 'totalShelfMaxCost', width: '11%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' } },
+        { title: '铺货数量', dataIndex: 'totalShelfMaxQty', width: '11%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
+        { title: '铺货金额', dataIndex: 'totalShelfMaxCost', width: '11%', align: 'center', customRender: function (text) { return (text || text == 0) ? toThousands(text, 2) : '--' } },
         { slots: { title: 'customTitle' }, dataIndex: 'lastOrderDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -180,13 +187,13 @@ export default {
     },
     //  时间  change
     dateChange (date) {
-      this.queryParam.shelfCreateBeginDate = date[0]
-      this.queryParam.shelfCreateEndDate = date[1]
+      this.queryParam.shelfCreateBeginDate = date[0] ? dealChooseDate(date[0], 'start') : ''
+      this.queryParam.shelfCreateEndDate = date[1] ? dealChooseDate(date[1], 'end') : ''
     },
     //  时间  change
     orderDateChange (date) {
-      this.queryParam.lastOrderBeginDate = date[0]
-      this.queryParam.lastOrderEndDate = date[1]
+      this.queryParam.lastOrderBeginDate = date[0] ? dealChooseDate(date[0], 'start') : ''
+      this.queryParam.lastOrderEndDate = date[1] ? dealChooseDate(date[1], 'end') : ''
     },
     // 经销商 change
     dealerChange (obj) {
@@ -217,6 +224,11 @@ export default {
         dealerProvinceSn: undefined,
         dealerCitySn: undefined
       }
+      this.areaArr = []
+      this.$refs.rangeDate.resetDate()
+      if (this.advanced) {
+        this.$refs.orderDate.resetDate()
+      }
       this.$refs.dealerList.resetForm()
       this.$refs.storeList.resetForm()
       this.$refs.table.refresh(true)