|
@@ -53,11 +53,11 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template v-slot:palletBomCode="{ row }">
|
|
<template v-slot:palletBomCode="{ row }">
|
|
|
- <el-input :value="row.palletBomCode" placeholder="请输入模具BOM编码"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="row.palletBomCode" placeholder="请输入模具BOM编码"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template v-slot:palletBomName="{ row }">
|
|
<template v-slot:palletBomName="{ row }">
|
|
|
- <el-input :value="row.palletBomName" placeholder="请输入模具BOM名称"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="row.palletBomName" placeholder="请输入模具BOM名称"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<!-- 操作列 -->
|
|
<!-- 操作列 -->
|
|
@@ -164,7 +164,7 @@ export default {
|
|
|
slot: 'expand'
|
|
slot: 'expand'
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
{
|
|
{
|
|
|
prop: 'code',
|
|
prop: 'code',
|
|
@@ -340,9 +340,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
remove2(row) {
|
|
remove2(row) {
|
|
|
-
|
|
|
|
|
const data = this.$refs.table.getData() ?? [];
|
|
const data = this.$refs.table.getData() ?? [];
|
|
|
-
|
|
|
|
|
data.forEach((e) => {
|
|
data.forEach((e) => {
|
|
|
if (row.parentId == e.produceTaskId) {
|
|
if (row.parentId == e.produceTaskId) {
|
|
|
e.palletList = e.palletList.filter((d) => d.id !== row.id);
|
|
e.palletList = e.palletList.filter((d) => d.id !== row.id);
|
|
@@ -361,6 +359,34 @@ export default {
|
|
|
|
|
|
|
|
save() {
|
|
save() {
|
|
|
let _arr = this.$refs.table.getData();
|
|
let _arr = this.$refs.table.getData();
|
|
|
|
|
+
|
|
|
|
|
+ console.log(_arr)
|
|
|
|
|
+
|
|
|
|
|
+ let result = true
|
|
|
|
|
+ for(let i =0; i < _arr.length; i++) {
|
|
|
|
|
+ console.log('5', _arr[i])
|
|
|
|
|
+ if(_arr[i].hasOwnProperty('palletList') || e.palletList.length == 0) {
|
|
|
|
|
+ result = false
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ console.log(result)
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if (!result) {
|
|
|
|
|
+ this.$message.success('请先配磨具信息');
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ return false
|
|
|
|
|
+
|
|
|
let param = {
|
|
let param = {
|
|
|
categoryId: this.categoryId,
|
|
categoryId: this.categoryId,
|
|
|
taskList: _arr
|
|
taskList: _arr
|
|
@@ -369,7 +395,7 @@ export default {
|
|
|
.then((msg) => {
|
|
.then((msg) => {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
this.$message.success(msg);
|
|
this.$message.success(msg);
|
|
|
- this.visible = false;
|
|
|
|
|
|
|
+ this.updateVisible(false);
|
|
|
this.$emit('done');
|
|
this.$emit('done');
|
|
|
})
|
|
})
|
|
|
.catch((e) => {
|
|
.catch((e) => {
|