|
@@ -301,6 +301,7 @@
|
|
|
icon="el-icon-plus"
|
|
icon="el-icon-plus"
|
|
|
class="ele-btn-icon"
|
|
class="ele-btn-icon"
|
|
|
@click="bindSubstanceListOpen"
|
|
@click="bindSubstanceListOpen"
|
|
|
|
|
+ v-if="addForm.associatedObject == 2"
|
|
|
>
|
|
>
|
|
|
添加物联参数
|
|
添加物联参数
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -688,7 +689,6 @@
|
|
|
productLineName: ''
|
|
productLineName: ''
|
|
|
};
|
|
};
|
|
|
export default {
|
|
export default {
|
|
|
-
|
|
|
|
|
mixins: [dictMixins, tableColumnsMixin],
|
|
mixins: [dictMixins, tableColumnsMixin],
|
|
|
components: {
|
|
components: {
|
|
|
deptSelect,
|
|
deptSelect,
|
|
@@ -1041,7 +1041,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const body = this.formMateBody();
|
|
const body = this.formMateBody();
|
|
|
- body.planType =5
|
|
|
|
|
|
|
+ body.planType = 5;
|
|
|
|
|
|
|
|
if (this.type == 'dispatch') {
|
|
if (this.type == 'dispatch') {
|
|
|
await recordrulesplanManualDispatchOrder(body);
|
|
await recordrulesplanManualDispatchOrder(body);
|
|
@@ -1239,11 +1239,18 @@
|
|
|
handleAdd(row, index) {
|
|
handleAdd(row, index) {
|
|
|
this.currentRow = row;
|
|
this.currentRow = row;
|
|
|
this.currentIndex = index;
|
|
this.currentIndex = index;
|
|
|
- this.$refs.bindSubstanceRef.open(
|
|
|
|
|
- this.addForm.deviceId,
|
|
|
|
|
- this.addForm.deviceCode,
|
|
|
|
|
- this.addForm.deviceName
|
|
|
|
|
- );
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (this.addForm.associatedObject == 1) {
|
|
|
|
|
+ this.$refs.toolModalRef.open(row.toolCodes);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$refs.bindSubstanceRef.open(
|
|
|
|
|
+ this.addForm.deviceId,
|
|
|
|
|
+ this.addForm.deviceName,
|
|
|
|
|
+ this.addForm.deviceCode
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // this.currentRow = row;
|
|
|
},
|
|
},
|
|
|
bindSubstanceListOpen() {
|
|
bindSubstanceListOpen() {
|
|
|
this.currentIndex = 9999;
|
|
this.currentIndex = 9999;
|
|
@@ -1302,6 +1309,10 @@
|
|
|
// 清空工具
|
|
// 清空工具
|
|
|
clearTool(row, index) {
|
|
clearTool(row, index) {
|
|
|
substanceKey.forEach((key) => {
|
|
substanceKey.forEach((key) => {
|
|
|
|
|
+ console.log(
|
|
|
|
|
+ this.addForm.detailList[index],
|
|
|
|
|
+ 'this.addForm.detailList[index]'
|
|
|
|
|
+ );
|
|
|
this.$set(this.addForm.detailList[index], key, '');
|
|
this.$set(this.addForm.detailList[index], key, '');
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -1309,7 +1320,6 @@
|
|
|
selectChooseModalProduct(row) {
|
|
selectChooseModalProduct(row) {
|
|
|
this.currentRow = row;
|
|
this.currentRow = row;
|
|
|
this.$refs.toolModalTowRef.open([], '选择物品');
|
|
this.$refs.toolModalTowRef.open([], '选择物品');
|
|
|
- alert(1);
|
|
|
|
|
},
|
|
},
|
|
|
chooseModalProduct(current) {
|
|
chooseModalProduct(current) {
|
|
|
this.currentRow.productName = current.name;
|
|
this.currentRow.productName = current.name;
|
|
@@ -1399,10 +1409,7 @@
|
|
|
this.$set(row, 'activeIndex', index);
|
|
this.$set(row, 'activeIndex', index);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- handleAdd(row) {
|
|
|
|
|
- this.currentRow = row;
|
|
|
|
|
- this.$refs.toolModalRef.open(row.toolCodes);
|
|
|
|
|
- },
|
|
|
|
|
|
|
+
|
|
|
chooseModal(data) {
|
|
chooseModal(data) {
|
|
|
console.log('data', data);
|
|
console.log('data', data);
|
|
|
this.currentRow.tools = data.map((i) => {
|
|
this.currentRow.tools = data.map((i) => {
|
|
@@ -1412,10 +1419,7 @@
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- // 清空工具
|
|
|
|
|
- clearTool(row) {
|
|
|
|
|
- row.tools = [];
|
|
|
|
|
- },
|
|
|
|
|
|
|
+
|
|
|
deleteRow(time, row) {
|
|
deleteRow(time, row) {
|
|
|
const index = this.addForm.detailList.findIndex(
|
|
const index = this.addForm.detailList.findIndex(
|
|
|
(item) => item.id === row.id
|
|
(item) => item.id === row.id
|