领用单页面逻辑新增、点检、巡检、保养删除前端BUG解决

yangwl
wws 1 year ago
parent 5309d502f6
commit ec900e586d

@ -954,14 +954,14 @@ export default {
}
this.$modal.confirm('是否确认删除计划工单编号为"' + orderCodes + '"的数据项?').then(function () {
delDeviceOrder(orderIds).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("删除成功");
this.getList();
}
}).catch(() => {
});
})
return delDeviceOrder(orderIds);
}).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("删除成功");
this.getList();
}
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {

@ -1242,9 +1242,11 @@ export default {
this.$modal.confirm('是否确认删除计划编号为"' + planCodes + '"的数据项?').then(function () {
return delPlan(planIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("删除成功");
this.getList();
}
}).catch(() => {
});
},

@ -106,6 +106,7 @@
</el-col>
<el-col :span="1.5">
<el-button
v-if="false"
type="success"
plain
icon="el-icon-edit"
@ -143,11 +144,11 @@
<el-table-column type="selection" width="55" align="center" />
<!-- 序号 -->
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"/>
<el-table-column label="备品备件编码" align="center" prop="spareCode" width="120"/>
<el-table-column label="备品备件名称" align="center" prop="spareName" width="120"/>
<el-table-column label="出库单号" align="center" prop="applyCode" width="200"/>
<el-table-column label="备品备件编码" align="center" prop="spareCode" width="200"/>
<el-table-column label="备品备件名称" align="center" prop="spareName" width="200"/>
<el-table-column label="规格型号" align="center" prop="spareModel" width="150"/>
<el-table-column label="使用设备" align="center" prop="spareUseEquipment" />
<el-table-column label="出库单号" align="center" prop="applyCode" />
<el-table-column label="规格型号" align="center" prop="spareModel" width="150"/>
<el-table-column label="领用数量" align="center" prop="spareQuantity" />
<!-- <el-table-column label="使用组线" align="center" prop="spareGroupLine" /> -->
<el-table-column label="领用时间" align="center" prop="applyTime" width="180">
@ -161,6 +162,7 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
v-if="false"
size="mini"
type="text"
icon="el-icon-edit"
@ -232,6 +234,9 @@
<el-form-item label="数量" prop="spareQuantity">
<el-input v-model="form.spareQuantity" placeholder="请输入数量" style="width: 280px"/>
</el-form-item>
<el-form-item label="关联单号" prop="workCode">
<el-input v-model="form.workCode" placeholder="请输入关联单号" style="width: 280px"/>
</el-form-item>
<!-- <el-form-item label="使用组线" prop="spareGroupLine">
<el-input v-model="form.spareGroupLine" placeholder="请选择使用组线" style="width: 280px"/>
</el-form-item> -->
@ -512,12 +517,34 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const applyIds = row.applyId || this.ids;
this.$modal.confirm('是否确认删除申领记录编号为"' + applyIds + '"的数据项?').then(function() {
return delSparePartsApplicationRecord(applyIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
var applyCode = '';
//
for (let i = 0; i < this.sparePartsApplicationRecordList.length; i++) {
for (let j = 0; j < applyIds.length; j++) {
if (applyIds[j] == this.sparePartsApplicationRecordList[i].applyId) {
applyCode = applyCode + this.sparePartsApplicationRecordList[i].applyCode + ',';
}
}
}
if (applyCode == '') {
for (let i = 0; i < this.sparePartsApplicationRecordList.length; i++) {
if (applyIds == this.sparePartsApplicationRecordList[i].orderId) {
applyCode = this.sparePartsApplicationRecordList[i].applyCode;
}
}
}
this.$modal.confirm('是否确认删除出库单号为"' + applyCode + '"的数据项?').then(function() {
return delSparePartsApplicationRecord(applyIds);
}).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("删除成功");
this.getList();
}
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {

@ -1267,9 +1267,11 @@ export default {
this.$modal.confirm('是否确认删除计划编号为"' + planCodes + '"的数据项?').then(function () {
return delPlan(planIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("删除成功");
this.getList();
}
}).catch(() => {
});
},

@ -956,14 +956,14 @@ export default {
}
this.$modal.confirm('是否确认删除点检工单编号为"' + orderCodes + '"的数据项?').then(function () {
delDeviceOrder(orderIds).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("删除成功");
this.getList();
}
}).catch(() => {
});
})
return delDeviceOrder(orderIds);
}).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("删除成功");
this.getList();
}
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {

@ -488,8 +488,8 @@
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="7">
<el-form-item label="工作中心:">
<el-select v-model="form.planWorkshop" placeholder="工作中心" clearable>
<el-form-item label="车间:">
<el-select v-model="form.planWorkshop" placeholder="车间" clearable>
<el-option
v-for="item in workCenterList"
:key="item.factoryCode"
@ -499,7 +499,13 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="10" :offset="1">
<el-col :offset="1" :span=12>
<el-form-item label-width="110px" label="是否停机保养:">
<el-radio v-model="form.shutDown" label="1"></el-radio>
<el-radio v-model="form.shutDown" label="0"></el-radio>
</el-form-item>
</el-col>
<el-col v-if="false" :span="10" :offset="1">
<el-form-item label-width="100px" label="循环时间范围">
<el-date-picker
@change="changeArray"
@ -512,14 +518,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span=12>
<el-form-item label-width="110px" label="是否停机保养:">
<el-radio v-model="form.shutDown" label="1"></el-radio>
<el-radio v-model="form.shutDown" label="0"></el-radio>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane label="设备、保养项、备件">
@ -1480,6 +1478,7 @@ export default {
this.reset();
this.selectPersonList = [];
this.personList = [];
this.form.shutDown = "0"
this.setPerson();
this.setWorkCenter();
this.orderDialog = true;
@ -1490,6 +1489,28 @@ export default {
},
//
subOrder() {
//
if (this.form.planWorkshop == null) {
this.$message({
message: "请选择车间!",
type: "warning"
})
return
}
if (this.form.equipmentItem.length == 0) {
this.$message({
message: "请选择设备!",
type: "warning"
})
return
}
if (this.selectPersonList.length == 0) {
this.$message({
message: "请选择人员!",
type: "warning"
})
return
}
this.form.personList = this.selectPersonList;
addUpkeepOrder(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
@ -1827,14 +1848,15 @@ export default {
}
this.$modal.confirm('是否确认删除保养工单编号为"' + orderCodes + '"的数据项?').then(function () {
delDeviceOrder(orderIds).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("删除成功");
this.getList();
}
}).catch(() => {
});
})
return delDeviceOrder(orderIds);
}).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("删除成功");
this.getList();
}
}).catch(() => {
});
this.getList();
},
/** 导出按钮操作 */
handleExport() {

@ -1616,9 +1616,11 @@ export default {
this.$modal.confirm('是否确认删除计划编号为"' + planCodes + '"的数据项?').then(function () {
return delPlan(planIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("删除成功");
this.getList();
}
}).catch(() => {
});
},

Loading…
Cancel
Save