工艺管理-生产工序-设备绑定

yangwl
A0010407 1 year ago
parent aef81d62c1
commit cf922d1545

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

Loading…
Cancel
Save