|
|
|
@ -255,14 +255,6 @@
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<!-- <el-input
|
|
|
|
|
v-model="equipmentTypeName"
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请输入设备类别"
|
|
|
|
|
prefix-icon="el-icon-search"
|
|
|
|
|
size="small"
|
|
|
|
|
:props="defaultProps"
|
|
|
|
|
/> -->
|
|
|
|
|
<el-tree
|
|
|
|
|
ref="tree"
|
|
|
|
|
:check-strictly="true"
|
|
|
|
@ -300,7 +292,7 @@
|
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetEquipmentQuery">重置</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-table v-loading="loading" :data="equipmentList" @selection-change="handleEquipmentSelectionChange">
|
|
|
|
|
<el-table v-loading="loading" :data="equipmentList" @selection-change="handleEquipmentSelectionChange" ref="myTable">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<!-- 序号 -->
|
|
|
|
|
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
|
|
|
|
@ -320,16 +312,17 @@
|
|
|
|
|
/>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-tabs type="border-card" v-if="form.equipmentCode != null">
|
|
|
|
|
<!-- <el-tabs type="border-card" v-if="form.equipmentCode != null">
|
|
|
|
|
<el-tab-pane label="设备绑定物料">
|
|
|
|
|
<EquipmentBoundMaterials v-if="form.equipmentCode != null" :optType="optType" :equipmentCode="form.equipmentCode"></EquipmentBoundMaterials>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
</el-tabs>
|
|
|
|
|
</el-tabs> -->
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-table-column label="操作">
|
|
|
|
|
<el-button type="primary" @click="submitEquipmentForm">确 定</el-button>
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
@ -522,6 +515,12 @@ export default {
|
|
|
|
|
this.reset();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 取消按钮
|
|
|
|
|
equipmentCancel() {
|
|
|
|
|
this.boundeEuipmentOpen = false;
|
|
|
|
|
this.reset();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 表单重置
|
|
|
|
|
reset() {
|
|
|
|
|
this.form = {
|
|
|
|
@ -536,7 +535,7 @@ export default {
|
|
|
|
|
updateTime: null,
|
|
|
|
|
fileList:'',
|
|
|
|
|
equipmentTypeName:'',
|
|
|
|
|
equipmentId :this.equipmentId,
|
|
|
|
|
equipmentId :null,
|
|
|
|
|
equipmentTypeName :null,
|
|
|
|
|
equipmentTypeCode:null,
|
|
|
|
|
equipmentName :null,
|
|
|
|
@ -638,34 +637,16 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
submitEquipmentForm(row) {
|
|
|
|
|
//正确
|
|
|
|
|
// this.reset();
|
|
|
|
|
// const processId = row.processId;
|
|
|
|
|
// this.form.processId = processId;
|
|
|
|
|
// const equipmentId = row.equipmentId || this.ids;
|
|
|
|
|
// console.log(equipmentId,1);
|
|
|
|
|
// if (equipmentId != null) {
|
|
|
|
|
// this.form.equipmentId = equipmentId.toString();
|
|
|
|
|
// updateProcess(this.form,processId).then(response => {
|
|
|
|
|
// this.$modal.msgSuccess("关联成功");
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
//this.reset();
|
|
|
|
|
const processId = this.ids1;
|
|
|
|
|
this.queryEquipmentParams.processId = processId;
|
|
|
|
|
const equipmentId = row.equipmentId || this.ids;
|
|
|
|
|
console.log(equipmentId,1);
|
|
|
|
|
if (equipmentId != null) {
|
|
|
|
|
this.queryEquipmentParams.processId = processId.toString();
|
|
|
|
|
this.queryEquipmentParams.equipmentId = equipmentId.toString();
|
|
|
|
|
updateProcess(this.queryEquipmentParams).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("关联成功");
|
|
|
|
|
this.boundeEuipmentOpen = false;
|
|
|
|
|
this.activated();
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
submitEquipmentForm() {
|
|
|
|
|
const table = this.$refs.myTable;
|
|
|
|
|
const data = table.data;
|
|
|
|
|
console.log(data);
|
|
|
|
|
for (const one of data) {
|
|
|
|
|
const equipmentCode = one.equipmentCode;
|
|
|
|
|
this.form.workCenter = this.form.workCenter + ','+ equipmentCode;
|
|
|
|
|
this.boundeEuipmentOpen = false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|