|
@@ -9,7 +9,7 @@
|
|
|
<a-select-option
|
|
|
v-for='item in partInfoList'
|
|
|
:key='item.id'
|
|
|
- :value='item.partCode'
|
|
|
+ :value='item.id'
|
|
|
>
|
|
|
{{ item.partCode }}
|
|
|
</a-select-option>
|
|
@@ -23,7 +23,7 @@
|
|
|
<a-select-option
|
|
|
v-for='item in cascadeList'
|
|
|
:key='item.id'
|
|
|
- :value='item.partName'
|
|
|
+ :value='item.id'
|
|
|
>
|
|
|
{{ item.partName }}
|
|
|
</a-select-option>
|
|
@@ -272,6 +272,7 @@ export default {
|
|
|
* @param val
|
|
|
*/
|
|
|
cascadeSelect(val, options) {
|
|
|
+ this.editParam.partName = [];
|
|
|
if (options && options.length > 0) {
|
|
|
this.cascadeList = [];
|
|
|
options.forEach( item => {
|
|
@@ -290,9 +291,17 @@ export default {
|
|
|
* 保存
|
|
|
*/
|
|
|
saveDvpEdit() {
|
|
|
+ // 零部件编号处理
|
|
|
+ let partCodeList = [];
|
|
|
+ if (this.editParam.partCode && this.editParam.partCode.length > 0) {
|
|
|
+ this.editParam.partCode.forEach(item => {
|
|
|
+ let data = this.partInfoList.find(val => { return val.id === item})?.partCode;
|
|
|
+ partCodeList.push(data);
|
|
|
+ })
|
|
|
+ }
|
|
|
let data = {
|
|
|
dvpId: this.$store.getters.dvpId,
|
|
|
- partCodeList: this.editParam.partCode,
|
|
|
+ partCodeList: partCodeList,
|
|
|
testType: this.editParam.testType,
|
|
|
testSource: this.editParam.testSource,
|
|
|
testProject: this.editParam.testProject,
|
|
@@ -309,15 +318,15 @@ export default {
|
|
|
planEndTime: this.editParam.planEndTime,
|
|
|
isPush: this.editParam.isPushTemplate || 1
|
|
|
};
|
|
|
- this.$api.planTestSave(data).then(res => {
|
|
|
- if (res.flag) {
|
|
|
- this.$message.success(res.message);
|
|
|
- this.$emit("initData");
|
|
|
- this.$emit("cancelEditDvp");
|
|
|
- } else {
|
|
|
- this.$message.error(res.message);
|
|
|
- }
|
|
|
- });
|
|
|
+ // this.$api.planTestSave(data).then(res => {
|
|
|
+ // if (res.flag) {
|
|
|
+ // this.$message.success(res.message);
|
|
|
+ // this.$emit("initData");
|
|
|
+ // this.$emit("cancelEditDvp");
|
|
|
+ // } else {
|
|
|
+ // this.$message.error(res.message);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
},
|
|
|
|
|
|
/**
|