瀏覽代碼

数据统计中数据显示为0提交

chenrui 2 年之前
父節點
當前提交
97b5e5558c

+ 21 - 16
src/views/dataStatistics/orderDataSummary/list.vue

@@ -21,14 +21,14 @@
                 </a-form-item>
               </a-col>
               <a-col :md="4" :sm="24">
-                <a-form-item label="所在地">
-                  <areaList level="2" placeholder="请选择所在地"></areaList>
+                <a-form-item label="所在地" >
+                  <areaList level="2" placeholder="请选择所在地" @change="areaChange"></areaList>
                 </a-form-item>
               </a-col>
               <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.state" allowClear placeholder="请选择状态"></v-select>
+                    <v-select id="userd-state" code="SHELF_STATE" v-model="queryParam.shelfState" allowClear placeholder="请选择状态"></v-select>
                   </a-form-item>
                 </a-col>
                 <a-col :md="5" :sm="24">
@@ -163,7 +163,7 @@ export default {
         shelfCreateEndDate: '',
         storeSn: undefined,
         dealerSn: undefined,
-        state: undefined,
+        shelfState: undefined,
         dealerProvinceSn: undefined,
         dealerCitySn: undefined
       },
@@ -178,33 +178,33 @@ export default {
         { title: '汽车修理厂', dataIndex: 'storeName', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '配件经销商', dataIndex: 'dealerName', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '所在地', scopedSlots: { customRender: 'area' }, width: '11%', align: 'center' },
-        { title: '货架状态', dataIndex: 'shelfState', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '货架状态', dataIndex: 'shelfStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         {
           slots: { title: 'customTitle' },
           children: [
-            { title: '铺货数量', dataIndex: 'totalShelfMaxQty', width: '6%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
-            { title: '铺货金额', dataIndex: 'totalShelfMaxCost', width: '6%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true }
+            { title: '铺货数量', dataIndex: 'totalShelfMaxQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '铺货金额', dataIndex: 'totalShelfMaxCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } }
           ]
         },
         {
           title: '货架订单',
           children: [
-            { title: '取货数量', dataIndex: 'totalOrderQty', width: '6%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
-            { title: '取货金额', dataIndex: 'totalOrderAmount', width: '6%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true }
+            { title: '取货数量', dataIndex: 'totalOrderQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '取货金额', dataIndex: 'totalOrderAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } }
           ]
         },
         {
           title: '急送订单',
           children: [
-            { title: '急送数量', dataIndex: 'tempOrderQty', width: '6%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
-            { title: '急送金额', dataIndex: 'tempOrderAmount', width: '6%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true }
+            { title: '急送数量', dataIndex: 'tempOrderQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '急送金额', dataIndex: 'tempOrderAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } }
           ]
         },
         {
           title: '销售单',
           children: [
-            { title: '销售数量', dataIndex: 'saleOrderQty', width: '6%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
-            { title: '销售金额', dataIndex: 'saleOrderAmount', width: '6%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true }
+            { title: '销售数量', dataIndex: 'saleOrderQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '销售金额', dataIndex: 'saleOrderAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } }
           ]
         }
       ],
@@ -234,8 +234,8 @@ export default {
     },
     //  时间  change
     dateChange (date) {
-      this.queryParam.beginDate = date[0]
-      this.queryParam.endDate = date[1]
+      this.queryParam.shelfCreateBeginDate = date[0]
+      this.queryParam.shelfCreateEndDate = date[1]
     },
     //  时间  change
     orderDateChange (date) {
@@ -250,6 +250,11 @@ export default {
     storeChange (obj) {
       this.queryParam.storeSn = obj.key || undefined
     },
+    // 地区
+    areaChange (val, opts) {
+      this.queryParam.dealerProvinceSn = val && val[0] ? val[0] : ''
+      this.queryParam.dealerCitySn = val && val[1] ? val[1] : ''
+    },
     // 重置
     reset () {
       this.queryParam = {
@@ -259,7 +264,7 @@ export default {
         shelfCreateEndDate: '',
         storeSn: undefined,
         dealerSn: undefined,
-        state: undefined,
+        shelfState: undefined,
         dealerProvinceSn: undefined,
         dealerCitySn: undefined
       }

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

@@ -215,10 +215,10 @@ 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: '近30天货架取货数量', dataIndex: 'totalOrderQty', width: '11%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
-        { title: '近30天货架取货金额', dataIndex: 'totalOrderAmount', width: '11%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
-        { title: '近30天销售数量', dataIndex: 'saleOrderQty', width: '11%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
-        { title: '近30天销售金额', dataIndex: 'saleOrderAmount', width: '11%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true }
+        { title: '近30天货架取货数量', dataIndex: 'totalOrderQty', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') }, sorter: true },
+        { title: '近30天货架取货金额', dataIndex: 'totalOrderAmount', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') }, sorter: true },
+        { title: '近30天销售数量', dataIndex: 'saleOrderQty', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') }, sorter: true },
+        { title: '近30天销售金额', dataIndex: 'saleOrderAmount', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') }, sorter: true }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

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

@@ -4,7 +4,7 @@
       <div class="s-row">
         <div class="c-1">
           <div>
-            <span>{{ countData?countData.activeRate:0 }}%</span>
+            <span>{{ countData?countData.useRate:0 }}%</span>
             <span>转化率 ◕</span>
           </div>
         </div>
@@ -25,7 +25,7 @@
       <div class="s-row">
         <div class="c-1">
           <div>
-            <span>{{ countData?countData.useRate:0 }}%</span>
+            <span>{{ countData?countData.activeRate:0 }}%</span>
             <span>转化率 ◕</span>
           </div>
         </div>