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 @@ + + + + + 删除 + 保存 + 订单读入 + + + + + + + + + + + + + + + + + + + + + + + + + + + 读入 + 取消 + + + + + + + + {{index + 1 + '、'+ item }} + + + 确认 + + + + + +