|
|
@@ -142,16 +142,6 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
- <!-- <el-col v-bind="styleResponsive ? { lg: 3, md: 6 } : { span: 3 }">
|
|
|
- <el-form-item label="使用改型:" prop="modification">
|
|
|
- <el-checkbox
|
|
|
- v-model="form.modification"
|
|
|
- :true-label="1"
|
|
|
- :false-label="0"
|
|
|
- ></el-checkbox>
|
|
|
- </el-form-item>
|
|
|
- </el-col> -->
|
|
|
</el-row>
|
|
|
<el-row :gutter="24">
|
|
|
<el-col v-bind="styleResponsive ? { lg: 4, md: 8 } : { span: 4 }">
|
|
|
@@ -240,6 +230,18 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
+ <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }">
|
|
|
+ <el-form-item label="生产要求:" required>
|
|
|
+ <el-input
|
|
|
+ v-model="form.productionRequirements"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder=""
|
|
|
+ type="textarea"
|
|
|
+ disabled
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
<!-- <el-form-item label="生产类型:" prop="produceType">
|
|
|
<el-select v-model="form.produceType" style="width: 100%" @change="changeProduceType" >
|
|
|
<el-option
|
|
|
@@ -430,16 +432,27 @@
|
|
|
prop="batchNo"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input
|
|
|
- v-model="scope.row.batchNo"
|
|
|
- size="small"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="批次号"
|
|
|
- @input="
|
|
|
- (value) =>
|
|
|
- (scope.row.batchNo = value.replace(/[^a-zA-Z0-9_-]/g, ''))
|
|
|
- "
|
|
|
- ></el-input>
|
|
|
+ <el-form-item
|
|
|
+ label-width="0px"
|
|
|
+ :prop="'salesOrders.' + scope.$index + '.batchNo'"
|
|
|
+ :rules="{
|
|
|
+ required: isSalesToProduction_batchNo,
|
|
|
+ message: '请输入批次号',
|
|
|
+ trigger: 'blur'
|
|
|
+ }"
|
|
|
+ class="table-item"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.batchNo"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="批次号"
|
|
|
+ @input="
|
|
|
+ (value) =>
|
|
|
+ (scope.row.batchNo = value.replace(/[^a-zA-Z0-9_-]/g, ''))
|
|
|
+ "
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -931,7 +944,8 @@
|
|
|
validDate,
|
|
|
modelList: [], // 机型数据
|
|
|
colorList: [], // 颜色数据
|
|
|
- isReview: false
|
|
|
+ isReview: false,
|
|
|
+ isSalesToProduction_batchNo: false
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
|
@@ -977,6 +991,11 @@
|
|
|
this.mandatoryField();
|
|
|
this.getCodeData();
|
|
|
this.getplannedReleaseRequire('planned_release_require');
|
|
|
+ parameterGetByCode({ code: 'salesToProduction_batchNo' }).then((res) => {
|
|
|
+ if (res) {
|
|
|
+ this.isSalesToProduction_batchNo = res.value == '1' ? true : false;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
computed: {
|
|
|
clientEnvironmentId() {
|
|
|
@@ -1113,6 +1132,8 @@
|
|
|
// if (data.endTime) {
|
|
|
// this.form.endTime = new Date(data.endTime);
|
|
|
// }
|
|
|
+ this.form.productionRequirements =
|
|
|
+ data?.salesOrders[0]?.productionRequirements || '';
|
|
|
if (!data.bomCategoryId || data.bomCategoryId == null) {
|
|
|
this.form.produceType = '';
|
|
|
this.selectionRowShow = true;
|
|
|
@@ -1266,8 +1287,10 @@
|
|
|
let params = JSON.parse(this.$route.query.selection);
|
|
|
productionToPlan(params).then((res) => {
|
|
|
this.form = deepClone(res);
|
|
|
- console.log(222222222222222222222222, '===');
|
|
|
+ console.log(222222222222222222222222, '===', res);
|
|
|
this.initTime();
|
|
|
+ this.form.productionRequirements =
|
|
|
+ res?.salesOrders[0]?.productionRequirements || '';
|
|
|
// this.bomListVersion('init');
|
|
|
this.form.produceRoutingName =
|
|
|
res.produceRoutingName || this.$route.query.produceRoutingName;
|
|
|
@@ -1436,11 +1459,22 @@
|
|
|
let flag = this.parameterVerification();
|
|
|
// 必填参数校验
|
|
|
if (!flag) return;
|
|
|
- this.$refs.form.validate((valid) => {
|
|
|
+ this.$refs.form.validate((valid,obj) => {
|
|
|
if (valid) {
|
|
|
+ if (this.form.produceType == 1) {
|
|
|
+ this.$message.warning('请选择MBOM或者ABOM');
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.mapList();
|
|
|
|
|
|
this.$refs.submitRefs.open();
|
|
|
+ } else {
|
|
|
+ if (obj) {
|
|
|
+ let messages = Object.keys(obj).map((key) => obj[key][0]);
|
|
|
+ if (messages.length > 0) {
|
|
|
+ this.$message.warning(messages[0].message);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -1726,11 +1760,6 @@
|
|
|
},
|
|
|
|
|
|
async publishData(type) {
|
|
|
- if (!this.form.batchNo && this.clientEnvironmentId == 5) {
|
|
|
- this.$message.warning('批次号不能为空');
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
const key = getRouteTabKey();
|
|
|
let params = deepClone(this.form);
|
|
|
params.categoryId = params.salesOrders[0]?.categoryId;
|