From aa4946003cb08cdbecf0431e37fa48e95f774459 Mon Sep 17 00:00:00 2001 From: suiwei <136693118@qq.com> Date: Sun, 21 May 2023 22:46:29 +0800 Subject: [PATCH] =?UTF-8?q?overseamom-285=20feat=20=E4=BA=A4=E6=8E=A5?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E9=BB=98=E8=AE=A4=E4=B8=80=E4=B8=AA=E6=9C=88?= =?UTF-8?q?=EF=BC=8Cmrp=E5=8F=96=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.json | 32 ++++++++++++ .../raw/handover/aggregating-Vn/index.vue | 51 ++++++++++++++----- .../raw/handover/aggregating-Vn/order.vue | 2 +- .../raw/handover/aggregating-Vn/result.vue | 6 +-- .../raw/handover/aggregating-Vn/summary.vue | 2 +- .../raw/handover/aggregating-vn/index.vue | 51 ++++++++++++++----- .../raw/handover/aggregating-vn/order.vue | 2 +- .../raw/handover/aggregating-vn/result.vue | 6 +-- .../raw/handover/aggregating-vn/summary.vue | 2 +- src/utils/page.ts | 4 ++ 10 files changed, 124 insertions(+), 34 deletions(-) diff --git a/src/pages.json b/src/pages.json index 6f1009a..501ca8f 100644 --- a/src/pages.json +++ b/src/pages.json @@ -754,6 +754,38 @@ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 } }, + { + "path": "pages/raw/handover/aggregating-Vn/result", + "style": { + "navigationBarTitleText": "汇总交接", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/aggregating-Vn/summary", + "style": { + "navigationBarTitleText": "汇总交接", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/aggregating-Vn/order", + "style": { + "navigationBarTitleText": "按单交接", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, + { + "path": "pages/raw/handover/aggregating-Vn/accessory", + "style": { + "navigationBarTitleText": "辅料交接", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, { "path": "pages/raw/handover/virtual/index", "style": { diff --git a/src/pages/raw/handover/aggregating-Vn/index.vue b/src/pages/raw/handover/aggregating-Vn/index.vue index 3a74349..cd7416a 100644 --- a/src/pages/raw/handover/aggregating-Vn/index.vue +++ b/src/pages/raw/handover/aggregating-Vn/index.vue @@ -9,12 +9,13 @@ - - - + + @@ -41,9 +42,16 @@ - - - {{ $t('message.workArea_Selelct') }} + + + {{ $t('message.workArea_Selelct') }} + + + + + + + {{ $t('message.workArea_Selelct') }} @@ -83,6 +91,7 @@ import jPicker from '@/components/J-Picker/jPicker.vue'; import { VForm } from 'vue/types/form'; import model from './model'; import { headers } from './config'; +import moment from 'moment'; import { session } from '@/store/modules/session'; interface OptionType { label: string; @@ -115,6 +124,8 @@ export default class Aggregating extends BasePage { */ headers = headers; startShow = false; + startShowFrom = false; + startShowTo = false; /** * 表单数据 */ @@ -129,6 +140,8 @@ export default class Aggregating extends BasePage { batchNumberList: '', materialCodeList: '', requestTime: '', + requestTimeFrom: '', + requestTimeTo: '', sendSpotList: '', }; startParams = { @@ -157,7 +170,7 @@ export default class Aggregating extends BasePage { * 表单校验 */ rules = { - mrpScope: [{ required: true, message: this.$t('message.Pi_InputMrp') as string }], + //mrpScope: [{ required: true, message: this.$t('message.Pi_InputMrp') as string }], sapFactoryCode: [{ required: true, message: this.$t('message.Pi_InputFactory') as string }], }; /** @@ -194,10 +207,13 @@ export default class Aggregating extends BasePage { } else { delete params.sendSpotList; } - if (this.form.requestTime) { - params.requestTime = this.form.requestTime.split('-').join('').toString(); + + if (this.form.requestTimeFrom && this.form.requestTimeTo) { + params.requestTimeFrom = this.form.requestTimeFrom.split('-').join('').toString(); + params.requestTimeTo = this.form.requestTimeTo.split('-').join('').toString(); + params.requestTime = params.requestTimeFrom + '@' + params.requestTimeTo; } else { - delete params.sendSpotList; + delete params.requestTime; } return params; } @@ -207,6 +223,11 @@ export default class Aggregating extends BasePage { model.clearProOrderList(); this.form.sapFactoryCode = session.factoryCode; //this.form.requestTime = this.getNowFormatDate(); + //设置开始时间,结束时间 + const today = moment(); // 获取当前时间 + const last_month = today.clone().subtract(1, 'month'); // 获取一个月前的日期 + this.form.requestTimeFrom = last_month.format('YYYY-MM-DD'); + this.form.requestTimeTo = moment().format('YYYY-MM-DD'); } bookTypeChange(e: any) { console.log('///', e); @@ -230,6 +251,12 @@ export default class Aggregating extends BasePage { startConfirm(startParams: any) { this.form.requestTime = startParams.year + '-' + startParams.month + '-' + startParams.day; } + startConfirmFrom(startParams: any) { + this.form.requestTimeFrom = startParams.year + '-' + startParams.month + '-' + startParams.day; + } + startConfirmTo(startParams: any) { + this.form.requestTimeTo = startParams.year + '-' + startParams.month + '-' + startParams.day; + } ondelete() { this.formone.aimWl.value = ''; this.CategoryList = [ @@ -268,7 +295,7 @@ export default class Aggregating extends BasePage { }; await this.model.queryProOrderResult(params); this.model.param = params; - this.toPage(this.page.raw.handover.aggregating.result); + this.toPage(this.page.raw.handover.aggregatingVn.result); }); } /** diff --git a/src/pages/raw/handover/aggregating-Vn/order.vue b/src/pages/raw/handover/aggregating-Vn/order.vue index d784a62..4abd308 100644 --- a/src/pages/raw/handover/aggregating-Vn/order.vue +++ b/src/pages/raw/handover/aggregating-Vn/order.vue @@ -296,7 +296,7 @@ export default class AggregatingOrder extends BasePage { icon: 'none', }); setTimeout(() => { - this.toPage(this.page.raw.handover.aggregating.index); + this.toPage(this.page.raw.handover.aggregatingVn.index); }, 2000); //this.empty(); diff --git a/src/pages/raw/handover/aggregating-Vn/result.vue b/src/pages/raw/handover/aggregating-Vn/result.vue index 949e159..0015189 100644 --- a/src/pages/raw/handover/aggregating-Vn/result.vue +++ b/src/pages/raw/handover/aggregating-Vn/result.vue @@ -66,7 +66,7 @@ export default class AggregatingResult extends BasePage { }; await this.model.queryAggregateList(params); this.model.orderOutIdListParams = params; - this.toPage(this.page.raw.handover.aggregating.summary); + this.toPage(this.page.raw.handover.aggregatingVn.summary); } /** @@ -84,7 +84,7 @@ export default class AggregatingResult extends BasePage { proOrderResultList: this.model.proOrderResultList, }); this.model.orderOutIdListParams = params; - this.toPage(this.page.raw.handover.aggregating.order); + this.toPage(this.page.raw.handover.aggregatingVn.order); } /** @@ -98,7 +98,7 @@ export default class AggregatingResult extends BasePage { orderOutIdList, }; await this.model.queryAccessoryList(params); - this.toPage(this.page.raw.handover.aggregating.accessory); + this.toPage(this.page.raw.handover.aggregatingVn.accessory); } } diff --git a/src/pages/raw/handover/aggregating-Vn/summary.vue b/src/pages/raw/handover/aggregating-Vn/summary.vue index c138e30..078b81c 100644 --- a/src/pages/raw/handover/aggregating-Vn/summary.vue +++ b/src/pages/raw/handover/aggregating-Vn/summary.vue @@ -338,7 +338,7 @@ export default class AggregatingSummary extends BasePage { icon: 'none', }); setTimeout(() => { - this.toPage(this.page.raw.handover.aggregating.index); + this.toPage(this.page.raw.handover.aggregatingVn.index); }, 2000); //this.empty(); //this.form.documentNo = ''; diff --git a/src/pages/raw/handover/aggregating-vn/index.vue b/src/pages/raw/handover/aggregating-vn/index.vue index 3a74349..cd7416a 100644 --- a/src/pages/raw/handover/aggregating-vn/index.vue +++ b/src/pages/raw/handover/aggregating-vn/index.vue @@ -9,12 +9,13 @@ - - - + + @@ -41,9 +42,16 @@ - - - {{ $t('message.workArea_Selelct') }} + + + {{ $t('message.workArea_Selelct') }} + + + + + + + {{ $t('message.workArea_Selelct') }} @@ -83,6 +91,7 @@ import jPicker from '@/components/J-Picker/jPicker.vue'; import { VForm } from 'vue/types/form'; import model from './model'; import { headers } from './config'; +import moment from 'moment'; import { session } from '@/store/modules/session'; interface OptionType { label: string; @@ -115,6 +124,8 @@ export default class Aggregating extends BasePage { */ headers = headers; startShow = false; + startShowFrom = false; + startShowTo = false; /** * 表单数据 */ @@ -129,6 +140,8 @@ export default class Aggregating extends BasePage { batchNumberList: '', materialCodeList: '', requestTime: '', + requestTimeFrom: '', + requestTimeTo: '', sendSpotList: '', }; startParams = { @@ -157,7 +170,7 @@ export default class Aggregating extends BasePage { * 表单校验 */ rules = { - mrpScope: [{ required: true, message: this.$t('message.Pi_InputMrp') as string }], + //mrpScope: [{ required: true, message: this.$t('message.Pi_InputMrp') as string }], sapFactoryCode: [{ required: true, message: this.$t('message.Pi_InputFactory') as string }], }; /** @@ -194,10 +207,13 @@ export default class Aggregating extends BasePage { } else { delete params.sendSpotList; } - if (this.form.requestTime) { - params.requestTime = this.form.requestTime.split('-').join('').toString(); + + if (this.form.requestTimeFrom && this.form.requestTimeTo) { + params.requestTimeFrom = this.form.requestTimeFrom.split('-').join('').toString(); + params.requestTimeTo = this.form.requestTimeTo.split('-').join('').toString(); + params.requestTime = params.requestTimeFrom + '@' + params.requestTimeTo; } else { - delete params.sendSpotList; + delete params.requestTime; } return params; } @@ -207,6 +223,11 @@ export default class Aggregating extends BasePage { model.clearProOrderList(); this.form.sapFactoryCode = session.factoryCode; //this.form.requestTime = this.getNowFormatDate(); + //设置开始时间,结束时间 + const today = moment(); // 获取当前时间 + const last_month = today.clone().subtract(1, 'month'); // 获取一个月前的日期 + this.form.requestTimeFrom = last_month.format('YYYY-MM-DD'); + this.form.requestTimeTo = moment().format('YYYY-MM-DD'); } bookTypeChange(e: any) { console.log('///', e); @@ -230,6 +251,12 @@ export default class Aggregating extends BasePage { startConfirm(startParams: any) { this.form.requestTime = startParams.year + '-' + startParams.month + '-' + startParams.day; } + startConfirmFrom(startParams: any) { + this.form.requestTimeFrom = startParams.year + '-' + startParams.month + '-' + startParams.day; + } + startConfirmTo(startParams: any) { + this.form.requestTimeTo = startParams.year + '-' + startParams.month + '-' + startParams.day; + } ondelete() { this.formone.aimWl.value = ''; this.CategoryList = [ @@ -268,7 +295,7 @@ export default class Aggregating extends BasePage { }; await this.model.queryProOrderResult(params); this.model.param = params; - this.toPage(this.page.raw.handover.aggregating.result); + this.toPage(this.page.raw.handover.aggregatingVn.result); }); } /** diff --git a/src/pages/raw/handover/aggregating-vn/order.vue b/src/pages/raw/handover/aggregating-vn/order.vue index d784a62..4abd308 100644 --- a/src/pages/raw/handover/aggregating-vn/order.vue +++ b/src/pages/raw/handover/aggregating-vn/order.vue @@ -296,7 +296,7 @@ export default class AggregatingOrder extends BasePage { icon: 'none', }); setTimeout(() => { - this.toPage(this.page.raw.handover.aggregating.index); + this.toPage(this.page.raw.handover.aggregatingVn.index); }, 2000); //this.empty(); diff --git a/src/pages/raw/handover/aggregating-vn/result.vue b/src/pages/raw/handover/aggregating-vn/result.vue index 949e159..0015189 100644 --- a/src/pages/raw/handover/aggregating-vn/result.vue +++ b/src/pages/raw/handover/aggregating-vn/result.vue @@ -66,7 +66,7 @@ export default class AggregatingResult extends BasePage { }; await this.model.queryAggregateList(params); this.model.orderOutIdListParams = params; - this.toPage(this.page.raw.handover.aggregating.summary); + this.toPage(this.page.raw.handover.aggregatingVn.summary); } /** @@ -84,7 +84,7 @@ export default class AggregatingResult extends BasePage { proOrderResultList: this.model.proOrderResultList, }); this.model.orderOutIdListParams = params; - this.toPage(this.page.raw.handover.aggregating.order); + this.toPage(this.page.raw.handover.aggregatingVn.order); } /** @@ -98,7 +98,7 @@ export default class AggregatingResult extends BasePage { orderOutIdList, }; await this.model.queryAccessoryList(params); - this.toPage(this.page.raw.handover.aggregating.accessory); + this.toPage(this.page.raw.handover.aggregatingVn.accessory); } } diff --git a/src/pages/raw/handover/aggregating-vn/summary.vue b/src/pages/raw/handover/aggregating-vn/summary.vue index c138e30..078b81c 100644 --- a/src/pages/raw/handover/aggregating-vn/summary.vue +++ b/src/pages/raw/handover/aggregating-vn/summary.vue @@ -338,7 +338,7 @@ export default class AggregatingSummary extends BasePage { icon: 'none', }); setTimeout(() => { - this.toPage(this.page.raw.handover.aggregating.index); + this.toPage(this.page.raw.handover.aggregatingVn.index); }, 2000); //this.empty(); //this.form.documentNo = ''; diff --git a/src/utils/page.ts b/src/utils/page.ts index 49896cb..e56768b 100644 --- a/src/utils/page.ts +++ b/src/utils/page.ts @@ -124,6 +124,10 @@ export const page = { }, aggregatingVn: { index: '/pages/raw/handover/aggregating-Vn/index', + result: '/pages/raw/handover/aggregating-Vn/result', + order: '/pages/raw/handover/aggregating-Vn/order', + summary: '/pages/raw/handover/aggregating-Vn/summary', + accessory: '/pages/raw/handover/aggregating-Vn/accessory', }, RUSaggregating: { index: '/pages/raw/handover/RUS-aggregating/index',