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

View File

@ -67,6 +67,27 @@
>新增报废
</el-button>
</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
:showSearch.sync="showSearch"
@queryTable="getList"
@ -225,7 +246,7 @@ export default {
//
selectable(row) {
if (row.taskStatus == 1) {
if (row.taskStatus != 1) {
return true;
} else {
return false;