|
@@ -142,16 +142,6 @@
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</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>
|
|
|
<el-row :gutter="24">
|
|
<el-row :gutter="24">
|
|
|
<el-col v-bind="styleResponsive ? { lg: 4, md: 8 } : { span: 4 }">
|
|
<el-col v-bind="styleResponsive ? { lg: 4, md: 8 } : { span: 4 }">
|
|
@@ -430,16 +420,27 @@
|
|
|
prop="batchNo"
|
|
prop="batchNo"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<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>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -931,7 +932,8 @@
|
|
|
validDate,
|
|
validDate,
|
|
|
modelList: [], // 机型数据
|
|
modelList: [], // 机型数据
|
|
|
colorList: [], // 颜色数据
|
|
colorList: [], // 颜色数据
|
|
|
- isReview: false
|
|
|
|
|
|
|
+ isReview: false,
|
|
|
|
|
+ isSalesToProduction_batchNo: false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
props: {
|
|
props: {
|
|
@@ -977,6 +979,11 @@
|
|
|
this.mandatoryField();
|
|
this.mandatoryField();
|
|
|
this.getCodeData();
|
|
this.getCodeData();
|
|
|
this.getplannedReleaseRequire('planned_release_require');
|
|
this.getplannedReleaseRequire('planned_release_require');
|
|
|
|
|
+ parameterGetByCode({ code: 'salesToProduction_batchNo' }).then((res) => {
|
|
|
|
|
+ if (res) {
|
|
|
|
|
+ this.isSalesToProduction_batchNo = res.value == '1' ? true : false;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
clientEnvironmentId() {
|
|
clientEnvironmentId() {
|
|
@@ -1436,11 +1443,22 @@
|
|
|
let flag = this.parameterVerification();
|
|
let flag = this.parameterVerification();
|
|
|
// 必填参数校验
|
|
// 必填参数校验
|
|
|
if (!flag) return;
|
|
if (!flag) return;
|
|
|
- this.$refs.form.validate((valid) => {
|
|
|
|
|
|
|
+ this.$refs.form.validate((valid,obj) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
|
+ if (this.form.produceType == 1) {
|
|
|
|
|
+ this.$message.warning('请选择MBOM或者ABOM');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
this.mapList();
|
|
this.mapList();
|
|
|
|
|
|
|
|
this.$refs.submitRefs.open();
|
|
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 +1744,6 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
async publishData(type) {
|
|
async publishData(type) {
|
|
|
- if (!this.form.batchNo && this.clientEnvironmentId == 5) {
|
|
|
|
|
- this.$message.warning('批次号不能为空');
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
const key = getRouteTabKey();
|
|
const key = getRouteTabKey();
|
|
|
let params = deepClone(this.form);
|
|
let params = deepClone(this.form);
|
|
|
params.categoryId = params.salesOrders[0]?.categoryId;
|
|
params.categoryId = params.salesOrders[0]?.categoryId;
|