Forráskód Böngészése

库存导入报表

lilei 2 éve
szülő
commit
57ce37f8d7

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1657591326326
+  "version": 1657593303793
 }

+ 29 - 0
src/api/reportData.js

@@ -650,4 +650,33 @@ export const reportStockImportCount = (params) => {
     data: params,
     method: 'post'
   })
+}
+
+// 库存导入详细报表
+export const reportStockImportDetailList = (params) => {
+  const url = `/report/reportStockImportDetail/reportPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+export const reportStockImportDetailCount = (params) => {
+  const url = `/report/reportStockImportDetail/reportCount`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+export const reportStockImportDetailExport  = (params) => {
+  const url = `/report/reportStockImportDetail/export `
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
 }

+ 27 - 19
src/views/reportData/stockImportReport/detailList.vue

@@ -15,7 +15,7 @@
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
             <a-form-model-item label="库存导入单号">
-              <a-input v-model.trim="queryParam.salesReturnNo" allowClear placeholder="请输入库存导入单号"/>
+              <a-input v-model.trim="queryParam.stockImportNo" allowClear placeholder="请输入库存导入单号"/>
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
@@ -35,8 +35,9 @@
           <a-col :md="6" :sm="24">
             <a-form-model-item label="供应商">
               <supplier
+                v-model="supplierSn"
                 placeholder="请选择供应商"
-                v-model="queryParam.supplierSn"
+                @change="supplierChange"
               ></supplier>
             </a-form-model-item>
           </a-col>
@@ -90,7 +91,7 @@
     <!-- 合计 -->
     <a-alert type="info" style="margin-bottom:10px">
       <div class="ftext" slot="message">
-        产品总数量:<strong>{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</strong>;
+        产品总数量:<strong>{{ (totalData && (totalData.putQty || totalData.putQty==0)) ? totalData.putQty : '--' }}</strong>;
         <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
           总成本:<strong>{{ (totalData && (totalData.cost || totalData.cost==0)) ? '¥'+totalData.cost : '--' }}</strong>。
         </div>
@@ -118,7 +119,7 @@ import { downloadExcel } from '@/libs/JGPrint.js'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import supplier from '@/views/common/supplier'
-import { reportSalesReturnDetailPageList, reportSalesReturnDetailTotal, reportSalesReturnDetailExport } from '@/api/reportData'
+import { reportStockImportDetailList, reportStockImportDetailCount, reportStockImportDetailExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier },
   mixins: [commonMixin],
@@ -129,12 +130,13 @@ export default {
       wrapperCol: { span: 16 },
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
+      supplierSn: undefined,
       queryParam: { //  查询条件
         time: [],
         beginDate: '',
         endDate: '',
         productType: undefined,
-        buyerName: '',
+        importType: undefined,
         productEntity: {
           productBrandSn: undefined, //  产品品牌
           productTypeSn1: '', //  产品一级分类
@@ -143,7 +145,8 @@ export default {
           code: '', //  产品编码
           name: '' //  产品名称
         },
-        salesReturnNo: ''
+        stockImportNo: '',
+        supplierName: ''
       },
       rules: {
         'time': [{ required: true, message: '请选择导入时间', trigger: 'change' }]
@@ -156,7 +159,7 @@ export default {
         const params = Object.assign(parameter, this.queryParam)
         this.spinning = true
         delete params.time
-        return reportSalesReturnDetailPageList(params).then(res => {
+        return reportStockImportDetailList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -180,17 +183,17 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '库存导入单号', dataIndex: 'salesReturnNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '导入类型', dataIndex: 'buyerName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '库存导入单号', dataIndex: 'stockImportNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '导入类型', dataIndex: 'importTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '供应商', dataIndex: 'supplierName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '单位', dataIndex: 'productEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '数量', dataIndex: 'qty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品编码', dataIndex: 'productCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', dataIndex: 'putQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '成本', dataIndex: 'cost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '仓位', dataIndex: 'warehouseLocationName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '导入时间', dataIndex: 'auditTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '导入时间', dataIndex: 'importTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(8, 0, { title: '成本', dataIndex: 'cost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
@@ -199,9 +202,12 @@ export default {
     }
   },
   methods: {
+    supplierChange (val, row) {
+      this.queryParam.supplierName = row.supplierName
+    },
     // 合计
     getCount (params) {
-      reportSalesReturnDetailTotal(params).then(res => {
+      reportStockImportDetailCount(params).then(res => {
         if (res.status == 200) {
           this.totalData = res.data
         } else {
@@ -231,11 +237,13 @@ export default {
       if (this.advanced) {
         this.$refs.rangeDate.resetDate()
       }
+      this.supplierSn = undefined
       this.queryParam.time = []
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
-      this.queryParam.salesReturnNo = ''
-      this.queryParam.buyerName = ''
+      this.queryParam.stockImportNo = ''
+      this.queryParam.supplierName = ''
+      this.queryParam.importType = undefined
       this.queryParam.productEntity.productBrandSn = undefined
       this.queryParam.productEntity.productTypeSn1 = ''
       this.queryParam.productEntity.productTypeSn2 = ''
@@ -257,8 +265,8 @@ export default {
           params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
           _this.exportLoading = true
           _this.spinning = true
-          reportSalesReturnDetailExport(params).then(res => {
-            downloadExcel(res, '销售退货明细报表')
+          reportStockImportDetailExport(params).then(res => {
+            downloadExcel(res, '库存导入明细报表')
             _this.exportLoading = false
             _this.spinning = false
           })