维修管理按钮隐藏设定

This commit is contained in:
hongchao 2024-12-27 14:45:15 +08:00
parent 5af69ea3bc
commit 25061d4532
1 changed files with 50 additions and 16 deletions

View File

@ -218,6 +218,12 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="是否完成维修" prop="isFinished" align="center" width="150">
<template slot-scope="scope">
<div v-if="scope.row.isFinished==1" style="color: green;">{{ "已完成" }}</div>
<div v-if="scope.row.isFinished==0" style="color: red;">{{ "未完成" }}</div>
</template>
</el-table-column> -->
<el-table-column label="操作" align="center" width="300px"> <el-table-column label="操作" align="center" width="300px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -1099,7 +1105,23 @@ export default {
{ label: "自然损坏", id: 0 }, { label: "自然损坏", id: 0 },
{ label: "人为损坏", id: 1 }, { label: "人为损坏", id: 1 },
], // ], //
scrapRules: {}, scrapRules: {
scrapType: [
{
required: true,
message: "请选择损坏原因",
trigger: "change",
},
],
scrapReason: [
{
required: true,
message: "请输入报废原因",
trigger: "blur",
},
],
},
// //
deviceTypeTree: [], // deviceTypeTree: [], //
// //
@ -1412,6 +1434,9 @@ export default {
this.repairRowData.repairDeviceList.length > 0 this.repairRowData.repairDeviceList.length > 0
) { ) {
this.repairDeviceList = this.repairRowData.repairDeviceList; this.repairDeviceList = this.repairRowData.repairDeviceList;
// this.repairDeviceList.forEach((item) => {
// item.isFinished = item.status == 1 ? 1 : 0;
// });
} }
}, },
filterTree(nodes) { filterTree(nodes) {
@ -1536,9 +1561,10 @@ export default {
this.fileList.splice(sum, 1); this.fileList.splice(sum, 1);
}, },
// //
async saveSubmit() { saveSubmit() {
this.uploadKey = Date.now(); this.uploadKey = Date.now();
this.$refs["scrapForm"].validate(async(valid) => {
if(valid){
if(this.fileList.length!=0){ if(this.fileList.length!=0){
await this.getImaUpload(), await this.getImaUpload(),
await this.addWaitRepairPic(this.scrapForm); await this.addWaitRepairPic(this.scrapForm);
@ -1547,8 +1573,10 @@ export default {
} }
this.scrapRowData.repairType = 3 this.scrapRowData.repairType = 3
this.scrapRowData.codeScrapRepairPartList.push(this.scrapForm) this.scrapRowData.codeScrapRepairPartList.push(this.scrapForm)
this.scrapRowData.status = 1
this.openScrap = false; this.openScrap = false;
}
})
// this.reset(); // this.reset();
}, },
@ -1597,6 +1625,7 @@ export default {
// //
openInnerDialog(row) { openInnerDialog(row) {
console.log('111111111',row)
this.innerRowData = row; this.innerRowData = row;
this.partTableList = []; this.partTableList = [];
if ( if (
@ -1719,8 +1748,13 @@ export default {
this.innerRowData.partTableList.forEach((item) => { this.innerRowData.partTableList.forEach((item) => {
this.innerRowData.codeInRepairPartList.push(item); this.innerRowData.codeInRepairPartList.push(item);
}); });
if(this.partTableList.length==0) {
this.$message.error("请添加配件!");
return;
}else{
this.innerRowData.status = 1;
this.openInner = false; this.openInner = false;
}
// console.log(this.equipmentList) // console.log(this.equipmentList)
}, },
@ -1805,6 +1839,7 @@ export default {
this.backRowData.backTableList.forEach((item) => { this.backRowData.backTableList.forEach((item) => {
this.backRowData.codeOutRepairPartList.push(item); this.backRowData.codeOutRepairPartList.push(item);
}); });
this.backRowData.status = 1;
this.openBack = false; this.openBack = false;
} }
}); });
@ -1826,7 +1861,6 @@ export default {
// - // -
openScrapDialog(row) { openScrapDialog(row) {
console.log('row11',row)
this.scrapRowData = row; this.scrapRowData = row;
this.scrapForm = {}; this.scrapForm = {};
this.openScrap = true; this.openScrap = true;