From a36cde663f382132cdb4d156e903e8641d871e62 Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Fri, 27 Sep 2024 18:47:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=A5=E5=BA=93=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../warehouse/warehouseWarehousingEntry.js | 10 +--- .../warehouseWarehouseingAddReceipt.vue | 5 +- .../warehouseWarehousingEntry.vue | 60 ++++++++++++++++++- 3 files changed, 63 insertions(+), 12 deletions(-) diff --git a/src/api/warehouse/warehouseWarehousingEntry.js b/src/api/warehouse/warehouseWarehousingEntry.js index 45b5dafc..9f154bbf 100644 --- a/src/api/warehouse/warehouseWarehousingEntry.js +++ b/src/api/warehouse/warehouseWarehousingEntry.js @@ -1,14 +1,10 @@ import request from '@/axios'; -export const getList = (current, size, params) => { +export const getList = (data) => { return request({ url: '/api/logpm-warehouse/warehouseWarehousingEntry/list', - method: 'get', - params: { - ...params, - current, - size, - }, + method: 'post', + data, }); }; diff --git a/src/views/warehouse/warehousingentry/warehouseWarehouseingAddReceipt.vue b/src/views/warehouse/warehousingentry/warehouseWarehouseingAddReceipt.vue index 9a610fdd..1bc7e117 100644 --- a/src/views/warehouse/warehousingentry/warehouseWarehouseingAddReceipt.vue +++ b/src/views/warehouse/warehousingentry/warehouseWarehouseingAddReceipt.vue @@ -19,9 +19,10 @@ + - + + + + @@ -272,7 +287,7 @@ export default { { label: '入库时间', prop: 'receiptDate', - type: 4, + type: 1, values: '', width: '130', checkarr: [], @@ -414,6 +429,36 @@ export default { }, // 更多列的配置... + ], + /** 时间快捷选择设置 */ + shortcuts: [ + { + text: '最近一周', + value: () => { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); + return [start, end]; + }, + }, + { + text: '最近一个月', + value: () => { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); + return [start, end]; + }, + }, + { + text: '最近三个月', + value: () => { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); + return [start, end]; + }, + }, ], height: 0, excelBox: false, @@ -848,8 +893,17 @@ export default { }, onLoad(page, params = {}) { this.loading = true; + + const submitData = {query: this.page, warehouseWarehousingEntry: {...params, ...this.query} } + + if (getObjType(submitData.warehouseWarehousingEntry.receiptDate) === 'array' && submitData.warehouseWarehousingEntry.receiptDate.length > 0) { + submitData.warehouseWarehousingEntry.receiptDateStart = submitData.warehouseWarehousingEntry.receiptDate[0] + submitData.warehouseWarehousingEntry.receiptDateStartEnd = submitData.warehouseWarehousingEntry.receiptDate[1] + } + delete submitData.query.total + delete submitData.warehouseWarehousingEntry.receiptDate // 获取列表数据 - getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { + getList(submitData).then(res => { const data = res.data.data; console.log('data :>> ', data); this.page.total = data.total;