Procházet zdrojové kódy

Merge branch 'develop_szhj05' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_szhj05

lilei před 2 roky
rodič
revize
321c73b725

+ 4 - 4
src/views/numsGoodsShelves/customerAnalysis/list.vue

@@ -168,28 +168,28 @@ export default {
           slots: { title: 'customTitle' },
           children: [
             { title: '铺货数量', dataIndex: 'totalShelfMaxQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-            { title: '铺货金额', dataIndex: 'totalShelfMaxCost', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? toThousands(text, 2) : '--' } }
+            { title: '铺货金额', dataIndex: 'totalShelfMaxCost', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } }
           ]
         },
         {
           title: '货架订单',
           children: [
             { title: '取货数量', dataIndex: 'totalOrderQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-            { title: '取货金额', dataIndex: 'totalOrderAmount', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? toThousands(text, 2) : '--' } }
+            { title: '取货金额', dataIndex: 'totalOrderAmount', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } }
           ]
         },
         {
           title: '急送订单',
           children: [
             { title: '急送数量', dataIndex: 'tempOrderQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-            { title: '急送金额', dataIndex: 'tempOrderAmount', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? toThousands(text, 2) : '--' } }
+            { title: '急送金额', dataIndex: 'tempOrderAmount', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } }
           ]
         },
         {
           title: '销售单',
           children: [
             { title: '销售数量', dataIndex: 'saleOrderQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-            { title: '销售金额', dataIndex: 'saleOrderAmount', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? toThousands(text, 2) : '--' } }
+            { title: '销售金额', dataIndex: 'saleOrderAmount', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } }
           ]
         }
       ],

+ 5 - 5
src/views/numsGoodsShelves/vinAnalysis/detailModal.vue

@@ -29,12 +29,12 @@
         </tr>
         <!-- 空调滤清器 -->
         <tr v-for="(item,index) in itemData.airConditionerFilter" :key="index">
-          <td v-if="index==0" colSpan="1" :rowSpan="itemData.airFilterFlag.length">空调滤清器</td>
+          <td v-if="index==0" colSpan="1" :rowSpan="itemData.airConditionerFilter.length">空调滤清器</td>
           <td>{{ item.productCode|| '--' }}</td>
           <td>{{ item.productName|| '--' }}</td>
           <td>{{ item.origCode || '--' }}</td>
           <td>{{ item.isShelfProduct|| '--' }}</td>
-          <td>{{ (item.currQty||item.currQty==0) ? item.currQty :'--' }}</td>
+          <td>{{ (item.qty||item.qty==0) ? item.qty :'--' }}</td>
         </tr>
         <!-- 空气滤清器 -->
         <tr v-for="(item,index) in itemData.airFilterFlag" :key="index">
@@ -43,16 +43,16 @@
           <td>{{ item.productName|| '--' }}</td>
           <td>{{ item.origCode || '--' }}</td>
           <td>{{ item.isShelfProduct|| '--' }}</td>
-          <td>{{ (item.currQty||item.currQty==0) ? item.currQty :'--' }}</td>
+          <td>{{ (item.qty||item.qty==0) ? item.qty :'--' }}</td>
         </tr>
         <!-- 机油滤清器 -->
         <tr v-for="(item,index) in itemData.engineOilFilterFlag" :key="index">
-          <td v-if="index==0" colSpan="1" :rowSpan="itemData.airFilterFlag.length">机油滤清器</td>
+          <td v-if="index==0" colSpan="1" :rowSpan="itemData.engineOilFilterFlag.length">机油滤清器</td>
           <td>{{ item.productCode|| '--' }}</td>
           <td>{{ item.productName|| '--' }}</td>
           <td>{{ item.origCode || '--' }}</td>
           <td>{{ item.isShelfProduct|| '--' }}</td>
-          <td>{{ (item.currQty||item.currQty==0) ? item.currQty : '--' }}</td>
+          <td>{{ (item.qty||item.qty==0) ? item.qty : '--' }}</td>
         </tr>
       </table>
     </div>

+ 27 - 3
src/views/numsGoodsShelves/vinAnalysis/spList.vue

@@ -138,11 +138,34 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
+      order_by: '',
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.spinning = true
         this.disabled = true
-        const params = Object.assign(parameter, this.queryParam)
+        const newParameter = parameter
+        if (newParameter.sortField && newParameter.sortField == 'inStockCount') { // 有货
+          if (newParameter.sortOrder != 'ascend') { // 降序
+            newParameter.orderBy = 'xvfp.in_stock_count desc,xp.code asc'
+          } else {
+            newParameter.orderBy = 'xvfp.in_stock_count asc,xp.code asc'
+          }
+          this.order_by = newParameter.orderBy
+        } else {
+          this.order_by = ''
+        }
+        if (newParameter.sortField && newParameter.sortField == 'notStockCount') { // 无货
+          if (newParameter.sortOrder != 'ascend') { // 降序
+            newParameter.orderBy = 'xvfp.not_stock_count desc,xp.code asc'
+          } else {
+            newParameter.orderBy = 'xvfp.not_stock_count asc,xp.code asc'
+          }
+          this.order_by = newParameter.orderBy
+        } else {
+          this.order_by = ''
+        }
+
+        const params = Object.assign(newParameter, this.queryParam, { orderBy: this.order_by })
 
         delete params.time
         return reportPage(params).then(res => {
@@ -172,8 +195,8 @@ export default {
         { title: '原厂编码', dataIndex: 'origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品品牌', dataIndex: 'brandName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', slots: { title: 'type' }, scopedSlots: { customRender: 'type' }, width: '10%', align: 'center' },
-        { title: '适配有货次数', dataIndex: 'inStockCount', width: '10%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' }, sorter: true },
-        { title: '适配缺货次数', dataIndex: 'notStockCount', width: '10%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' }, sorter: true }
+        { title: '适配有货次数', dataIndex: 'inStockCount', width: '10%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' }, sorter: (a, b) => a.inStockCount - b.inStockCount },
+        { title: '适配缺货次数', dataIndex: 'notStockCount', width: '10%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' }, sorter: (a, b) => a.notStockCount - b.notStockCount }
         // { title: '最近VIN扫描时间', dataIndex: 'scanVinDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true }
       ]
       return arr
@@ -237,6 +260,7 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const params = _this.queryParam
+          params.orderBy = this.order_by
           _this.exportLoading = true
           _this.spinning = true
           exportReport(params).then(res => {

+ 18 - 14
src/views/numsGoodsShelves/vinAnalysis/vinList.vue

@@ -36,7 +36,7 @@
             </a-col>
             <a-col :md="4" :sm="24">
               <a-form-model-item label="车型">
-                <a-input id="vinAnaly-salesManName" v-model.trim="queryParam.modelName" allowClear placeholder="请输入车型"/>
+                <a-input id="vinAnaly-salesManName" v-model.trim="queryParam.modelInfo" allowClear placeholder="请输入车型"/>
               </a-form-model-item>
             </a-col>
           </template>
@@ -134,8 +134,11 @@ export default {
         vinCode: undefined,
         shelfSn: undefined,
         brandName: undefined,
-        modelName: undefined
+        modelInfo: undefined
       },
+      airConditionerFilterData: null,
+      airFilterFlagData: null,
+      engineOilFilterFlagData: null,
       isSearch: false,
       time: [],
       rules: {
@@ -148,22 +151,25 @@ export default {
         const dataObj = parameter
         if (dataObj.airConditionerFilterFlagDesc) {
           dataObj.airConditionerFilterFlag = dataObj.airConditionerFilterFlagDesc.toString()
-          this.oneData = dataObj.airConditionerFilterFlagDesc.toString()
+          this.airConditionerFilterData = dataObj.airConditionerFilterFlagDesc.toString()
           delete dataObj.airConditionerFilterFlagDesc
         }
         if (dataObj.airFilterFlagDesc) {
           dataObj.airFilterFlag = dataObj.airFilterFlagDesc.toString()
-          this.towData = dataObj.airFilterFlagDesc.toString()
+          this.airFilterFlagData = dataObj.airFilterFlagDesc.toString()
           delete dataObj.airFilterFlagDesc
         }
         if (dataObj.engineOilFilterFlagDesc) {
           dataObj.engineOilFilterFlag = dataObj.engineOilFilterFlagDesc.toString()
-          this.threeData = dataObj.engineOilFilterFlagDesc.toString()
+          this.engineOilFilterFlagData = dataObj.engineOilFilterFlagDesc.toString()
           delete dataObj.engineOilFilterFlagDesc
         }
         this.disabled = true
-        const params = Object.assign(dataObj, this.queryParam)
+        const params = Object.assign(dataObj, this.queryParam, { airConditionerFilterFlag: this.airConditionerFilterData,
+          airFilterFlag: this.airFilterFlagData,
+          engineOilFilterFlag: this.engineOilFilterFlagData })
         this.spinning = true
+
         return queryPage(params).then(res => {
           let data
           if (res.status == 200) {
@@ -188,10 +194,7 @@ export default {
       showCol: ['kt', 'kq', 'jy'],
       filters: [{ text: '有', value: 1 }, { text: '无', value: 2 }, { text: '空(--)', value: 0 }],
       showDetail: false,
-      curItem: null,
-      oneData: undefined,
-      towData: undefined,
-      threeData: undefined
+      curItem: null
     }
   },
   computed: {
@@ -258,7 +261,7 @@ export default {
       this.queryParam.vinCode = undefined
       this.queryParam.shelfSn = undefined
       this.queryParam.brandName = undefined
-      this.queryParam.modelName = undefined
+      this.queryParam.modelInfo = undefined
       this.time = []
       this.$refs.rangeDate.resetDate(this.time)
       this.$refs.ruleForm.resetFields()
@@ -275,9 +278,10 @@ export default {
             exportAirConditionerFilterFlag: this.showCol.includes('kt') ? 1 : 0,
             exportAirFilterFlag: this.showCol.includes('kq') ? 1 : 0,
             exportEngineOilFilterFlag: this.showCol.includes('jy') ? 1 : 0,
-            airConditionerFilterFlag: this.oneData,
-            airFilterFlag: this.towData,
-            engineOilFilterFlag: this.towData
+
+            airConditionerFilterFlag: this.airConditionerFilterData,
+            airFilterFlag: this.airFilterFlagData,
+            engineOilFilterFlag: this.engineOilFilterFlagData
           }
           const params = Object.assign(this.queryParam, newFilterObj)
           _this.exportLoading = true