This commit is contained in:
hongchao 2025-02-20 20:34:24 +08:00
parent 7abedf8faf
commit c0be272be2
2 changed files with 30 additions and 5 deletions

View File

@ -396,6 +396,7 @@ export default {
}, },
methods: { methods: {
handleDeviceCodeChange(row) { handleDeviceCodeChange(row) {
console.log('maCodeList:', row.maCodeList);
const newDeviceCount = row.maCodeList.length; const newDeviceCount = row.maCodeList.length;
row.scrapNum = newDeviceCount; row.scrapNum = newDeviceCount;
}, },
@ -506,9 +507,9 @@ export default {
// handleTypeChange // handleTypeChange
// this.equipmentList // this.equipmentList
console.log('xxxxxxxxxxxxxxxxx') console.log('xxxxxxxxxxxxxxxxx')
return getMachineListByCode({"typeId":row.typeId,"taskId":this.taskid}).then((response) => { return getMachineListByCode({"typeId":row.typeId,"taskId":this.taskId}).then((response) => {
console.log("response", response); console.log("response", response);
const relatedData = response.data.map(item => ({ id: item.maId, code: item.maCode,typeId: item.typeId })); const relatedData = response.data.map(item => ({ id: item.maId, code: item.maCode }));
console.log("relatedData", relatedData); console.log("relatedData", relatedData);
return relatedData; return relatedData;
}); });
@ -520,20 +521,23 @@ export default {
// this.loading = true; // this.loading = true;
await getScrapInfo({'taskId':this.taskId}).then(async (response) => { await getScrapInfo({'taskId':this.taskId}).then(async (response) => {
this.maForm.bmFileInfos = response.data.fileList; this.maForm.bmFileInfos = response.data.fileList;
this.equipmentList = response.data.scrapApplyDetailsList.map(item => { this.equipmentList = response.data.scrapApplyDetailsList.map(item => {
// const newMaCodeList = item.maCodeList.map(param => ({ id: param.maId, code: param.maCode }));
return { return {
...item, ...item,
manageType: item.manageType + '', manageType: item.manageType,
deviceCodeOptions: [] // deviceCodeOptions: [] //
}; };
}); });
// //
for (let i = 0; i < this.equipmentList.length; i++) { for (let i = 0; i < this.equipmentList.length; i++) {
if(this.equipmentList[i].manageType == 0){ if(this.equipmentList[i].manageType == "0"){
const options = await this.getDeviceCodeOptions(this.equipmentList[i]); const options = await this.getDeviceCodeOptions(this.equipmentList[i]);
this.$set(this.equipmentList[i], 'deviceCodeOptions', options); this.$set(this.equipmentList[i], 'deviceCodeOptions', options);
} }
} }
console.log("xxxxxxxxxx",this.equipmentList[0].maCodeList)
// this.loading = false; // this.loading = false;
}); });
// await this.projectInfoList(); // await this.projectInfoList();

View File

@ -67,6 +67,27 @@
>新增报废 >新增报废
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="success"
@click="batchPass"
icon="el-icon-check"
size="mini"
:disabled="multiple"
>通过</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
@click="batchReject"
icon="el-icon-close"
size="mini"
:disabled="multiple"
>驳回</el-button
>
</el-col>
<right-toolbar <right-toolbar
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
@queryTable="getList" @queryTable="getList"
@ -225,7 +246,7 @@ export default {
// //
selectable(row) { selectable(row) {
if (row.taskStatus == 1) { if (row.taskStatus != 1) {
return true; return true;
} else { } else {
return false; return false;