检查项删除检验逻辑

master
wws 1 year ago
parent 911336944e
commit 094f2211a1

@ -247,14 +247,19 @@
<el-table-column type="selection" width="55" align="center"/>
<el-table-column v-if="false" label="主键" align="center" prop="planId"/>
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column label="计划编码" align="center" prop="planCode"/>
<el-table-column label="计划名称" align="center" prop="planName"/>
<el-table-column label="车间" align="center" prop="planWorkshop"/>
<el-table-column width="150" label="计划编码" align="center" prop="planCode"/>
<el-table-column width="120" label="计划名称" align="center" prop="planName"/>
<el-table-column width="100" label="车间编码" align="center" prop="planWorkshop"/>
<el-table-column width="150" label="工作中心" align="center" prop="workCenterName"/>
<el-table-column v-if="false" label="产线" align="center" prop="planProdLine"/>
<el-table-column v-if="false" label="设备名称" align="center" prop="equipmentName"/>
<el-table-column v-if="false" label="设备编码" align="center" prop="equipmentCode"/>
<el-table-column label="循环周期" align="center" prop="planLoop"/>
<el-table-column label="循环周期类型" align="center" prop="planLoopType"/>
<el-table-column width="100" label="循环周期类型" align="center" prop="planLoopType">
<template slot-scope="scope">
<dict-tag :options="dict.type.device_loop_type" :value="scope.row.planLoopType"/>
</template>
</el-table-column>
<el-table-column label="循环执行时间开始" align="center" prop="planLoopStart" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopStart, '{y}-{m}-{d}') }}</span>
@ -266,7 +271,11 @@
</template>
</el-table-column>
<el-table-column v-if="false" label="巡检人员" align="center" prop="planPerson"/>
<el-table-column label="计划状态" align="center" prop="planStatus"/>
<el-table-column label="计划状态" align="center" prop="planStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.planStatus"/>
</template>
</el-table-column>
<el-table-column v-if="false" label="是否可生产-限制" align="center" prop="planRestrict"/>
<el-table-column v-if="false" label="维护类型" align="center" prop="planType"/>
<el-table-column v-if="false" label="是否委外" align="center" prop="planOutsource"/>
@ -691,7 +700,7 @@ export default {
planPerson: null,
planStatus: null,
planRestrict: null,
planType: null,
planType: "inspection",
planOutsource: null,
workCode: null,
factoryCode: null,
@ -724,7 +733,15 @@ export default {
};
},
created() {
this.setWorkCenter();
this.getList();
for (let i = 0; i < this.planList.length; i++) {
for (let j = 0; j < this.workCenterList.length; j++) {
if (this.planList[i].planWorkshop == this.workCenterList[j].factoryCode) {
this.planList[i].workCenterName = this.workCenterList[j].factoryName;
}
}
}
},
methods: {
// List-穿
@ -887,11 +904,21 @@ export default {
/** 查询计划列表 */
getList() {
this.loading = true;
this.setWorkCenter();
listPlan(this.queryParams).then(response => {
this.planList = response.rows;
for (let i = 0; i < this.planList.length; i++) {
for (let j = 0; j < this.workCenterList.length; j++) {
if (this.planList[i].planWorkshop == this.workCenterList[j].factoryCode) {
this.planList[i].workCenterName = this.workCenterList[j].factoryName;
}
}
}
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
@ -974,7 +1001,6 @@ export default {
//
setWorkCenter() {
getWorkCenter().then(response => {
this.workCenterList = response.data;
})
},
@ -982,7 +1008,6 @@ export default {
handleUpdate(row) {
this.reset();
//
this.resetQuery();
this.queryEquipment = [];
this.inspectionPlanStep = 0;
this.selectPersonList = [];

@ -725,11 +725,14 @@ export default {
this.$modal.confirm('是否确认删除检查项维护编号为"' + itemCodes + '"的数据项?').then(function () {
return delItem(itemIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("删除成功");
this.getList();
}
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {

Loading…
Cancel
Save