|
|
|
@ -9,12 +9,13 @@
|
|
|
|
|
</view>
|
|
|
|
|
<u-form class="form" ref="form" :model="form">
|
|
|
|
|
<u-row>
|
|
|
|
|
<u-col :span="12">
|
|
|
|
|
<!-- MRP -->
|
|
|
|
|
<u-form-item :required="true" label-width="120rpx" label="MRP" prop="mrpScope">
|
|
|
|
|
<!-- MRP -->
|
|
|
|
|
<!-- <u-col :span="12">
|
|
|
|
|
|
|
|
|
|
<u-form-item :required="false" label-width="120rpx" label="MRP" prop="mrpScope">
|
|
|
|
|
<u-input v-model="form.mrpScope" :border="border" :placeholder="$t('message.po_PleaseInput')" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-col> -->
|
|
|
|
|
<!-- 工厂 -->
|
|
|
|
|
<u-col :span="12">
|
|
|
|
|
<u-form-item label-width="120rpx" :required="true" :label="$t('message.Pi_factory')" prop="sapFactoryCode">
|
|
|
|
@ -41,9 +42,16 @@
|
|
|
|
|
<!-- 时间 -->
|
|
|
|
|
<u-col :span="12">
|
|
|
|
|
<view style="display: flex">
|
|
|
|
|
<u-field style="background: white; border-radius: 10rpx; padding-left: 0" v-model="form.requestTime" :placeholder="$t('message.SelectTime')" :label="$t('message.NowTime')"> </u-field>
|
|
|
|
|
<u-picker :confirm-text="$t('message.product_Confirm')" :cancel-text="$t('message.product_Cancel')" v-model="startShow" :params="startParams" mode="time" @confirm="startConfirm"></u-picker>
|
|
|
|
|
<u-button @click="startShow = true" type="primary">{{ $t('message.workArea_Selelct') }}</u-button>
|
|
|
|
|
<u-field style="background: white; border-radius: 10rpx; padding-left: 0" v-model="form.requestTimeFrom" :placeholder="'StartTime'" :label="'Start'"> </u-field>
|
|
|
|
|
<u-picker :confirm-text="$t('message.product_Confirm')" :cancel-text="$t('message.product_Cancel')" v-model="startShowFrom" :params="startParams" mode="time" @confirm="startConfirmFrom"></u-picker>
|
|
|
|
|
<u-button @click="startShowFrom = true" type="primary">{{ $t('message.workArea_Selelct') }}</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col :span="12">
|
|
|
|
|
<view style="display: flex">
|
|
|
|
|
<u-field style="background: white; border-radius: 10rpx; padding-left: 0" v-model="form.requestTimeTo" :placeholder="'EndTime'" :label="'End'"> </u-field>
|
|
|
|
|
<u-picker :confirm-text="$t('message.product_Confirm')" :cancel-text="$t('message.product_Cancel')" v-model="startShowTo" :params="startParams" mode="time" @confirm="startConfirmTo"></u-picker>
|
|
|
|
|
<u-button @click="startShowTo = true" type="primary">{{ $t('message.workArea_Selelct') }}</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col :span="12">
|
|
|
|
@ -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);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|