From 86a68f1c31305b3673c710ce1df3c4c9855f3f0c Mon Sep 17 00:00:00 2001 From: "zhaoxingchang.sd" Date: Tue, 20 Aug 2024 11:33:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=A2=9E=E5=8A=A0=E7=94=A8=E5=8F=8B?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=BB=E5=85=A5=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 13 + src/router/order/index.js | 9 +- src/views/order/orderReading.vue | 44 +- src/views/order/orderReadingSK.vue | 676 +++++++++++++++++++++++++++++ 4 files changed, 729 insertions(+), 13 deletions(-) create mode 100644 src/views/order/orderReadingSK.vue diff --git a/src/App.vue b/src/App.vue index 84d2ce4..1a8a393 100644 --- a/src/App.vue +++ b/src/App.vue @@ -316,6 +316,19 @@ export default { systemSign: "XXGL", children: [], }, + { + id: 5047, + parentId: 145, + parentName: null, + name: "时空订单读入", + url: "/order/orderReadingSK", + perms: "/order/orderReadingSK", + type: 2, + icon: null, + orderNum: 4, + systemSign: "XXGL", + children: [], + }, ], }, { diff --git a/src/router/order/index.js b/src/router/order/index.js index e92913c..4a02135 100644 --- a/src/router/order/index.js +++ b/src/router/order/index.js @@ -134,5 +134,12 @@ export default [ keepAlive: false } }, - + { + path: '/order/orderReadingSK', + name: "orderReadingSK", + component: () => import(/* webpackChunkName: "orderReading" */ '@views/order/orderReadingSK'), + meta: { + keepAlive: false + } + }, ] diff --git a/src/views/order/orderReading.vue b/src/views/order/orderReading.vue index e092fae..485dc06 100644 --- a/src/views/order/orderReading.vue +++ b/src/views/order/orderReading.vue @@ -23,8 +23,14 @@ - - + + + + + + + + @@ -62,7 +68,8 @@ export default { searchIsShow: false, SAPReadingShow: false, ReadingData: { - date: [], + date1: '', + date2: '', ddh:'', pzh:'' }, @@ -157,7 +164,7 @@ export default { placeholder: "请输入凭证号", }, { - label: "订单读入时间", + label: "订单时间", key: "time", type: "date", isHide: false, @@ -179,7 +186,7 @@ export default { }, }, { - label: "订单时间", + label: "订单读入时间", key: "time1", type: "date", isHide: false, @@ -333,9 +340,7 @@ export default { ); - let showBtn = []; - this.buttonCode('common_hover_color') ? showBtn.push(save) : '' - this.buttonCode('common_hover_color') ? showBtn.push(del) : '' + let showBtn = [save,del]; return showBtn; }, }, @@ -412,17 +417,32 @@ export default { this.SAPReadingShow = true; this.$nextTick(() => { this.$refs.SAPReadingFormData.resetFields(); - console.log(common.formatDate()) - this.$set(this.ReadingData, 'date', common.formatDate()); + this.$set(this.ReadingData, 'date1', this.getOneWeekAgo()); + this.$set(this.ReadingData, 'date2', this.getToday()); }) }, + getToday() { + const today = new Date(); + const year = today.getFullYear(); + const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以加1 + const day = String(today.getDate()).padStart(2, '0'); + return `${year}-${month}-${day}`; + }, + getOneWeekAgo() { + const oneWeekAgo = new Date(); + oneWeekAgo.setDate(oneWeekAgo.getDate() - 7); // 减去7天得到一周前的日期 + const year = oneWeekAgo.getFullYear(); + const month = String(oneWeekAgo.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以加1 + const day = String(oneWeekAgo.getDate()).padStart(2, '0'); + return `${year}-${month}-${day}`; + }, ReadingSubmitFn () { this.$refs.SAPReadingFormData.validate((valid) => { if (valid) { showLoading() readIn({ - readTimeStart: this.ReadingData.date[0] + ' ' + '00:00:00', - readTimeEnd: this.ReadingData.date[1] + ' ' + '23:59:59', + readTimeStart: this.ReadingData.date1 + ' ' + '00:00:00', + readTimeEnd: this.ReadingData.date2 + ' ' + '23:59:59', pzh: this.ReadingData.pzh, ddh: this.ReadingData.ddh, orgId: this.$store.state.system.userInfo.dept.enterpriseNumbers, diff --git a/src/views/order/orderReadingSK.vue b/src/views/order/orderReadingSK.vue new file mode 100644 index 0000000..3da9ede --- /dev/null +++ b/src/views/order/orderReadingSK.vue @@ -0,0 +1,676 @@ + + +