Merge branch 'material-ui' of http://192.168.0.75:3000/bonus/bonus-ui into material-ui

This commit is contained in:
BianLzhaoMin 2025-02-20 21:50:31 +08:00
commit 351c109c96
4 changed files with 56 additions and 15 deletions

View File

@ -90,4 +90,13 @@ export function getScrapList(query) {
method: 'get',
params: query
})
}
//报废台账详情列表
export function getScrapDetailsList(query) {
return request({
url: '/material/scrap_apply_details/getScrapDetailsList',
method: 'get',
params: query
})
}

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}).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,30 @@ 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 => {
let newMaCodeList = []
if(item.manageType == "0"){
newMaCodeList = item.maCodeList.map(maCode => ({
id: maCode.maId,
code: maCode.maCode
}));
}
return {
...item,
manageType: item.manageType + '',
manageType: item.manageType,
maCodeList: newMaCodeList,
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;

View File

@ -10,7 +10,7 @@
>
<el-form-item prop="dateRange">
<el-date-picker
v-model="queryParams.time"
v-model="queryParams.month"
type="month"
placeholder="请选择月份">
</el-date-picker>
@ -126,8 +126,8 @@ export default {
//
queryParams: {
time:null,
keyWord,
month:null,
keyWord: null,
pageNum: 1,
pageSize: 10,
},
@ -158,15 +158,15 @@ export default {
const params = {
month: this.month,
keyWord: this.queryParams.keyWord,
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
startTime: this.queryParams.month && this.queryParams.month[0],
endTime: this.queryParams.month && this.queryParams.month[1],
pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum
}
getScrapDetailsList(params).then((response) => {
this.tableList = response.data;
this.total = response.total;
this.tableList = response.data.rows;
this.total = response.data.total;
this.loading = false;
});
},
@ -174,7 +174,7 @@ export default {
resetQuery() {
this.resetForm("queryForm");
this.queryParams.keyWord = null;
this.queryParams.time = null;
this.queryParams.month = null;
this.handleQuery();
},
/** 搜索按钮操作 */
@ -189,8 +189,8 @@ export default {
const params = {
month: this.month,
keyWord: this.queryParams.keyWord,
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
startTime: this.queryParams.month && this.queryParams.month[0],
endTime: this.queryParams.month && this.queryParams.month[1],
}
this.download(
"/material/scrap_apply_details/getScrapDetailsList",