瀏覽代碼

轮胎统计报表

chenrui 1 年之前
父節點
當前提交
4e659b1a67

+ 10 - 41
src/api/reportData.js

@@ -1005,12 +1005,12 @@ export const getWarrantyInfo = (params) => {
   })
 }
 /*
-*   轮胎销售统计报表
+*   轮胎统计报表
 */
 
-// 轮胎销售报表(经销商)   列表
-export const querybyDealerList = (params) => {
-  const url = `/report/tracecode/querySaleDealerPage/${params.pageNo}/${params.pageSize}`
+// 轮胎统计报表   列表
+export const queryTireList = (params) => {
+  const url = `/report/tire/queryTirePage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize
   return axios({
@@ -1020,49 +1020,18 @@ export const querybyDealerList = (params) => {
   })
 }
 
-// 轮胎销售报表(经销商)  统计
-export const querySaleDealercount = (params) => {
-  const url = '/report/tracecode/querySaleDealercount'
+// 轮胎统计报表  统计
+export const queryTireCount = (params) => {
   return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-// 轮胎销售报表(经销商)  导出
-export const excelSaleOnlineExport = (params) => {
-  return axios({
-    url: '/report/tracecode/excelSaleOnlineList',
-    data: params,
-    method: 'post',
-    responseType: 'blob'
-  })
-}
-
-// 轮胎销售报表(区域/分区)  列表
-export const querySaleAreaPage = (params) => {
-  const url = `/report/tracecode/querySaleAreaPage/${params.pageNo}/${params.pageSize}`
-  delete params.pageNo
-  delete params.pageSize
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-// 轮胎销售报表(区域/分区)  统计
-export const querySaleAreaCount = (params) => {
-  const url = '/report/tracecode/querySaleAreaCount'
-  return axios({
-    url: url,
+    url: '/report/tire/queryTireCount',
     data: params,
     method: 'post'
   })
 }
-// 轮胎销售报表(区域/分区)  导出
-export const excelSaleAreaOnlineExport = (params) => {
+// 轮胎统计报表  导出
+export const excelTireOnlineExport = (params) => {
   return axios({
-    url: '/report/tracecode/excelSaleAreaOnlineList',
+    url: '/report/tire/excelTireOnlineList',
     data: params,
     method: 'post',
     responseType: 'blob'

二進制
src/assets/img/finishImg.png


二進制
src/assets/img/outOfDateImg.png


+ 7 - 1
src/views/productManagement/productSourcePath/warrantyInfoModal.vue

@@ -47,7 +47,13 @@
               align="middle"
               @click="viewLargeImg"/>
             <div style="text-align:right;">
-              <img v-if="detailsData.state ==='END'" src="@/assets/img/finishImg.png" alt="" width="50" height="50">
+              <img
+                v-if="detailsData.state ==='END'"
+                src="@/assets/img/outOfDateImg.png"
+                alt=""
+                width="55"
+                height="55"
+                style="transform:rotate(-46deg);">
               <img v-if="detailsData.state ==='RUN'" src="@/assets/img/ongoing.png" alt="" width="50" height="50">
             </div>
           </div>

+ 36 - 16
src/views/reportData/tireSalesReport/list.vue

@@ -36,6 +36,16 @@
                   <BizUser v-model="queryParam.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="产品编码/原厂编码">
+                  <a-input id="tireSalesDealerList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="产品名称">
+                  <a-input id="tireSalesDealerList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
+                </a-form-model-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24">
               <a-button
@@ -56,7 +66,7 @@
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
-                v-if="$hasPermissions('B_tireSalesDealerReportExport')"
+                v-if="$hasPermissions('B_tireSalesReportExport')"
                 id="tireSalesDealerList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
@@ -88,14 +98,16 @@
           <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)) ? toThousands(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.totalbuyPriceAmount || totalData.totalbuyPriceAmount==0)) ? toThousands(totalData.totalbuyPriceAmount): '--' }}</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.totalwarrantyAmount || totalData.totalwarrantyAmount==0)) ?totalData.totalwarrantyAmount: '--' }}</a-col>
             </a-row>
           </template>
         </s-table>
       </a-spin>
     </a-card>
+    <!-- 导出提示框 -->
+    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
   </div>
 </template>
 
@@ -107,13 +119,14 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
 import AreaList from '@/views/common/areaList.js'
 import BizUser from '@/views/common/bizUser.js'
+import reportModal from '@/views/common/reportModal.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
-import { querySaleDealercount, excelSaleOnlineExport, querybyDealerList } from '@/api/reportData'
+import { queryTireList, queryTireCount, excelTireOnlineExport } from '@/api/reportData'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 export default {
   name: 'TireSalesDealerList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList },
+  components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
   data () {
     const _this = this
     return {
@@ -134,16 +147,19 @@ export default {
         dealerSn: '',
         subareaSn: undefined,
         subareaAreaSn: undefined,
-        bizUserSn: undefined
+        bizUserSn: undefined,
+        queryWord: '', // 产品编码
+        productName: ''// 产品名称
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
+      showExport: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
-        return querybyDealerList(params).then(res => {
+        return queryTireList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -168,12 +184,12 @@ export default {
         { title: '客户名称', dataIndex: 'dealerName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '商户类型', dataIndex: 'dealerTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'buyAmount', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'storeAmount', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'sellAmount', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '订货数量', dataIndex: 'sellAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '订货金额', dataIndex: 'sellAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '客户现有库存数量', dataIndex: 'sellAmount', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productOrgiCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '订货数量', dataIndex: 'buyAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '订货金额', dataIndex: 'buyPriceAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '客户现有库存数量', dataIndex: 'storeAmount', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '已绑质保单数量', dataIndex: 'warrantyAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
     }
@@ -196,7 +212,7 @@ export default {
     },
     // 统计
     getCount (params) {
-      querySaleDealercount(params).then(res => {
+      queryTireCount(params).then(res => {
         if (res.status == 200 && res.data) {
           this.totalData = res.data
         } else {
@@ -241,6 +257,8 @@ export default {
       this.queryParam.subareaSn = undefined
       this.queryParam.subareaAreaSn = undefined
       this.queryParam.bizUserSn = undefined
+      this.queryParam.queryWord = undefined
+      this.queryParam.productName = undefined
       this.totalData = null
       this.$refs.areaList.clearData()
       if (this.advanced) {
@@ -255,8 +273,10 @@ export default {
       const params = _this.queryParam
       _this.exportLoading = true
       _this.spinning = true
-      hdExportExcel(excelSaleOnlineExport, params, '轮胎销售报表(客户)', function () {
+      _this.showExport = true
+      hdExportExcel(excelTireOnlineExport, params, '轮胎统计报表', function () {
         _this.exportLoading = false
+        _this.showExport = false
         _this.spinning = false
       })
     },
@@ -269,7 +289,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 245
+      this.tableHeight = window.innerHeight - tableSearchH - 198
     }
   },
   mounted () {