|
|
|
@ -10,35 +10,18 @@
|
|
|
|
|
<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">
|
|
|
|
|
<u-input v-model="form.mrpScope" :border="border" :placeholder="$t('message.po_PleaseInput')" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-col>
|
|
|
|
|
<!-- <u-col :span="6">
|
|
|
|
|
<u-form-item label-width="120rpx" :label="this.$t('message.Summary_Contain')">
|
|
|
|
|
<u-input
|
|
|
|
|
v-model="form.mrpContain"
|
|
|
|
|
:placeholder="this.$t('message.po_PleaseInput')"
|
|
|
|
|
style="margin-left: 12px"
|
|
|
|
|
/>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-col> -->
|
|
|
|
|
<!-- <u-col :span="6">
|
|
|
|
|
<u-form-item label-width="120rpx" :label="this.$t('message.Summary_Exclude')">
|
|
|
|
|
<u-input
|
|
|
|
|
v-model="form.mrpReduce"
|
|
|
|
|
:placeholder="this.$t('message.po_PleaseInput')"
|
|
|
|
|
style="margin-left: 12px"
|
|
|
|
|
/>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-col> -->
|
|
|
|
|
<!-- </u-row>
|
|
|
|
|
<u-row align="top"> -->
|
|
|
|
|
<!-- 工厂 -->
|
|
|
|
|
<u-col :span="12">
|
|
|
|
|
<u-form-item label-width="120rpx" :required="true" :label="$t('message.Pi_factory')" prop="sapFactoryCode">
|
|
|
|
|
<u-input v-model="form.sapFactoryCode" :placeholder="$t('message.po_PleaseInput')" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-col>
|
|
|
|
|
<!-- 订单号 -->
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-form-item label-width="120rpx" :label="$t('message.Pi_OrderNo')">
|
|
|
|
|
<u-input v-model="form.orderNoStart" :border="border" :placeholder="$t('message.po_PleaseInput')" />
|
|
|
|
@ -49,74 +32,20 @@
|
|
|
|
|
<u-input v-model="form.orderNoEnd" :border="border" :placeholder="$t('message.po_PleaseInput')" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-col>
|
|
|
|
|
<!-- <u-col :span="6">
|
|
|
|
|
<u-form-item label-width="120rpx" :label="this.$t('message.Summary_DemandDate')">
|
|
|
|
|
<u-input
|
|
|
|
|
v-model="form.requestTime"
|
|
|
|
|
type="select"
|
|
|
|
|
@click="requestTimeSelect = true"
|
|
|
|
|
:placeholder="this.$t('message.po_PleaseInput')"
|
|
|
|
|
/>
|
|
|
|
|
<u-calendar
|
|
|
|
|
v-model="requestTimeSelect"
|
|
|
|
|
mode="range"
|
|
|
|
|
start-text="start"
|
|
|
|
|
end-text="end"
|
|
|
|
|
max-date="2099-12-31"
|
|
|
|
|
toolTip="Select date"
|
|
|
|
|
@change="
|
|
|
|
|
(e) =>
|
|
|
|
|
(form.requestTime = Array.from(
|
|
|
|
|
new Set([e.startDate.replaceAll('-', ''), e.endDate.replaceAll('-', '')]),
|
|
|
|
|
).join('-'))
|
|
|
|
|
"
|
|
|
|
|
></u-calendar>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-form-item label-width="120rpx" :label="this.$t('message.Summary_ProductionDate')">
|
|
|
|
|
<u-input
|
|
|
|
|
v-model="form.productDate"
|
|
|
|
|
type="select"
|
|
|
|
|
@click="productDateSelect = true"
|
|
|
|
|
:placeholder="this.$t('message.po_PleaseInput')"
|
|
|
|
|
/>
|
|
|
|
|
<u-calendar
|
|
|
|
|
v-model="productDateSelect"
|
|
|
|
|
mode="range"
|
|
|
|
|
max-date="2099-12-31"
|
|
|
|
|
@change="
|
|
|
|
|
(e) =>
|
|
|
|
|
(form.productDate = Array.from(
|
|
|
|
|
new Set([e.startDate.replaceAll('-', ''), e.endDate.replaceAll('-', '')]),
|
|
|
|
|
).join('-'))
|
|
|
|
|
"
|
|
|
|
|
></u-calendar>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-form-item label-width="120rpx" :label="this.$t('message.Pi_Station')">
|
|
|
|
|
<u-input v-model="form.sendSpotList" :placeholder="this.$t('message.po_PleaseInput')" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-form-item label-width="120rpx" :label="this.$t('message.po_Location')">
|
|
|
|
|
<u-input v-model="form.wkposCode" :placeholder="this.$t('message.po_PleaseInput')" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-form-item label-width="120rpx" :label="this.$t('message.Summary_BatchNo')">
|
|
|
|
|
<u-input
|
|
|
|
|
v-model="form.batchNumberList"
|
|
|
|
|
:placeholder="this.$t('message.po_PleaseInput')"
|
|
|
|
|
/>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-col> -->
|
|
|
|
|
<!-- 物料号 -->
|
|
|
|
|
<u-col :span="12">
|
|
|
|
|
<u-form-item label-width="120rpx" :label="$t('message.po_MaterielNo')">
|
|
|
|
|
<u-input v-model="form.materialCodeList" :border="border" :placeholder="$t('message.po_PleaseInput')" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-col>
|
|
|
|
|
<!-- 时间 -->
|
|
|
|
|
<u-col :span="12">
|
|
|
|
|
<view style="display: flex">
|
|
|
|
|
<u-field style="background: white; border-radius: 10rpx; padding-left: 0" v-model="form.requestTime" disabled :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>
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-row>
|
|
|
|
|
<u-row>
|
|
|
|
|
<u-col :span="12">
|
|
|
|
@ -167,6 +96,7 @@ export default class Aggregating extends BasePage {
|
|
|
|
|
* 表头
|
|
|
|
|
*/
|
|
|
|
|
headers = headers;
|
|
|
|
|
startShow = false;
|
|
|
|
|
/**
|
|
|
|
|
* 表单数据
|
|
|
|
|
*/
|
|
|
|
@ -180,8 +110,17 @@ export default class Aggregating extends BasePage {
|
|
|
|
|
wkposCode: '',
|
|
|
|
|
batchNumberList: '',
|
|
|
|
|
materialCodeList: '',
|
|
|
|
|
requestTime: '',
|
|
|
|
|
sendSpotList: '',
|
|
|
|
|
};
|
|
|
|
|
startParams = {
|
|
|
|
|
year: true,
|
|
|
|
|
month: true,
|
|
|
|
|
day: true,
|
|
|
|
|
hour: false,
|
|
|
|
|
minute: false,
|
|
|
|
|
second: false,
|
|
|
|
|
};
|
|
|
|
|
/**
|
|
|
|
|
* 表单是否改变
|
|
|
|
|
*/
|
|
|
|
@ -232,6 +171,11 @@ export default class Aggregating extends BasePage {
|
|
|
|
|
} else {
|
|
|
|
|
delete params.sendSpotList;
|
|
|
|
|
}
|
|
|
|
|
if (this.form.requestTime) {
|
|
|
|
|
params.requestTime = this.form.requestTime.split('-').join('').toString();
|
|
|
|
|
} else {
|
|
|
|
|
delete params.sendSpotList;
|
|
|
|
|
}
|
|
|
|
|
return params;
|
|
|
|
|
}
|
|
|
|
|
// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
|
|
|
|
@ -239,6 +183,25 @@ export default class Aggregating extends BasePage {
|
|
|
|
|
this.$form.setRules(this.rules);
|
|
|
|
|
model.clearProOrderList();
|
|
|
|
|
this.form.sapFactoryCode = session.factoryCode;
|
|
|
|
|
this.form.requestTime = this.getNowFormatDate();
|
|
|
|
|
}
|
|
|
|
|
getNowFormatDate() {
|
|
|
|
|
var date = new Date();
|
|
|
|
|
var seperator1 = '-';
|
|
|
|
|
var year = date.getFullYear();
|
|
|
|
|
var month: any = date.getMonth() + 1;
|
|
|
|
|
var strDate: any = date.getDate();
|
|
|
|
|
if (month >= 1 && month <= 9) {
|
|
|
|
|
month = '0' + month;
|
|
|
|
|
}
|
|
|
|
|
if (strDate >= 0 && strDate <= 9) {
|
|
|
|
|
strDate = '0' + strDate;
|
|
|
|
|
}
|
|
|
|
|
var currentdate = year + seperator1 + month + seperator1 + strDate;
|
|
|
|
|
return currentdate;
|
|
|
|
|
}
|
|
|
|
|
startConfirm(startParams: any) {
|
|
|
|
|
this.form.requestTime = startParams.year + '-' + startParams.month + '-' + startParams.day;
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 确认
|
|
|
|
|