检查项删除检验逻辑

yangwl
wws 11 months ago
parent 911336944e
commit 094f2211a1

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

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

Loading…
Cancel
Save