|
|
@@ -332,6 +332,7 @@
|
|
|
v-model="row.factoriesId"
|
|
|
:key="row.factoriesId"
|
|
|
@change="(e) => selectFactory(e, row)"
|
|
|
+ :disabled="factoriesId"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item of factoryList"
|
|
|
@@ -497,6 +498,7 @@
|
|
|
// }
|
|
|
// }
|
|
|
},
|
|
|
+
|
|
|
computed: {
|
|
|
// 是否必填 字段 ( 首先看计划类型 如果是返工返修)
|
|
|
// 就不是必填 否则就看配置参数
|
|
|
@@ -534,9 +536,9 @@
|
|
|
}
|
|
|
return this.processingRequired == 0;
|
|
|
},
|
|
|
- clientEnvironmentId() {
|
|
|
- return this.$store.state.user.info.clientEnvironmentId;
|
|
|
- },
|
|
|
+ // clientEnvironmentId() {
|
|
|
+ // return this.$store.state.user.info.clientEnvironmentId;
|
|
|
+ // },
|
|
|
columns() {
|
|
|
return [
|
|
|
{
|
|
|
@@ -729,6 +731,8 @@
|
|
|
data() {
|
|
|
return {
|
|
|
visible: false,
|
|
|
+ factoriesId: '',
|
|
|
+ clientEnvironmentId: '',
|
|
|
title: '新增临时生产计划',
|
|
|
type: 3,
|
|
|
weightList: [
|
|
|
@@ -887,6 +891,9 @@
|
|
|
},
|
|
|
async open(val) {
|
|
|
await this.getFactoryList();
|
|
|
+ this.clientEnvironmentId =
|
|
|
+ this.$store.state.user.info.clientEnvironmentId;
|
|
|
+ this.factoriesId = this.$store.state.user.info.factoryId;
|
|
|
|
|
|
if (val) {
|
|
|
if (val.planType == null || val.planType == 'null') {
|
|
|
@@ -945,6 +952,15 @@
|
|
|
if (listMap[3]) {
|
|
|
list.push({ code: 3, name: 'ABOM' });
|
|
|
}
|
|
|
+
|
|
|
+ if (!this.form.productInfoList[0].factoriesId) {
|
|
|
+ this.form.productInfoList[0].factoriesId = this.factoriesId;
|
|
|
+ this.form.productInfoList[0].factoriesName =
|
|
|
+ this.factoryList?.find(
|
|
|
+ (factoryData) => factoryData.id === this.factoriesId
|
|
|
+ )?.name;
|
|
|
+ }
|
|
|
+
|
|
|
this.form.productInfoList[0].producedList = list;
|
|
|
}
|
|
|
}
|
|
|
@@ -1012,7 +1028,11 @@
|
|
|
measuringUnit: item.measuringUnit,
|
|
|
produceRoutingId: item.produceRoutingId,
|
|
|
produceRoutingName: item.produceRoutingName,
|
|
|
- produceVersionName: item.produceVersionName
|
|
|
+ produceVersionName: item.produceVersionName,
|
|
|
+ factoriesId: this.factoriesId,
|
|
|
+ factoriesName: this.factoryList?.find(
|
|
|
+ (factoryData) => factoryData.id === this.factoriesId
|
|
|
+ )?.name
|
|
|
};
|
|
|
}
|
|
|
})
|