修改退料接收逻辑

This commit is contained in:
BianLzhaoMin 2024-07-16 16:34:49 +08:00
parent 390419ede2
commit 06b647e188
3 changed files with 65 additions and 61 deletions

View File

@ -43,6 +43,14 @@ export function getViewByExamine(query) {
params: query
})
}
// 审批页面 详情查看或编辑
export function getViewByExamineNewApi(query) {
return request({
url: '/material/backApply/materialReturnNoteByExamine',
method: 'get',
params: query
})
}
// 详情查看或编辑

View File

@ -235,7 +235,7 @@
</template>
</el-table-column>
<el-table-column
label="退料状态"
label="审核状态"
align="center"
:show-overflow-tooltip="true"
>
@ -424,7 +424,7 @@
</el-form>
<el-table v-loading="loading" :data="loadingList" height="400px">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column
label="序号"
align="center"
@ -445,47 +445,6 @@
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column type="expand">
<template slot-scope="scope">
<div class="nested-table-container">
<el-table
:data="scope.row.maTypeDetails"
style="width: 100%"
>
<!-- 子表格的列 -->
<el-table-column
label="序号"
align="center"
type="index"
/>
<el-table-column
label="类型名称"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="typeModelName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="单位"
align="center"
prop="unitName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="预领数量"
align="center"
prop="partNum"
:show-overflow-tooltip="true"
/>
</el-table>
</div>
</template>
</el-table-column>
<el-table-column
label="规格型号"
align="center"
@ -513,13 +472,13 @@
</el-table-column>
</el-table>
<pagination
<!-- <pagination
v-show="loadingTotal > 0"
:total="loadingTotal"
:page.sync="dialogQueryParams.pageNum"
:limit.sync="dialogQueryParams.pageSize"
@pagination="getDialogList"
/>
@pagination="getDialogList"
/> -->
<div
slot="footer"
@ -603,6 +562,7 @@ import {
getViewByExamine,
ApiBackApplyAudit,
ApiBackApplyRefuse,
getViewByExamineNewApi,
} from '@/api/claimAndRefund/return.js'
import { getInfo, h } from '@/api/login'
import {
@ -696,11 +656,11 @@ export default {
proList: [],
taskStatusList: [
{
name: '待退料审核',
name: '待审核',
id: '37',
},
{
name: '退料审核通过',
name: '已审核',
id: '38',
},
{
@ -712,7 +672,7 @@ export default {
id: '40',
},
{
name: '退料审核驳回',
name: '退料驳回',
id: '101',
},
],
@ -840,13 +800,23 @@ export default {
let params = {
taskId: this.rowObj.taskId,
agreementId: this.rowObj.agreementId,
pageNum: this.dialogQueryParams.pageNum,
pageSize: this.dialogQueryParams.pageSize,
// pageNum: this.dialogQueryParams.pageNum,
// pageSize: this.dialogQueryParams.pageSize,
keyWord: this.dialogQueryParams.keyWord,
badId: this.rowObj.badId,
}
getViewByExamine(params).then((res) => {
this.loadingList = res.rows
// getViewByExamine(params).then((res) => {
// this.loadingList = res.rows
// this.loadingList.forEach((item) => {
// if (!item.num) {
// item.num = item.preNum
// }
// })
// this.loadingTotal = res.total
// })
getViewByExamineNewApi(params).then((res) => {
this.loadingList = res.data
this.loadingList.forEach((item) => {
if (!item.num) {
item.num = item.preNum
@ -960,10 +930,10 @@ export default {
taskId: item.taskId,
agreementId: item.agreementId,
badId: item.badId,
pageNum: this.dialogQueryParams.pageNum,
pageSize: this.dialogQueryParams.pageSize,
// pageNum: this.dialogQueryParams.pageNum,
// pageSize: this.dialogQueryParams.pageSize,
}
getViewByExamine(params).then((res) => {
getViewByExamineNewApi(params).then((res) => {
backApplyList.push({
id: item.id,
backApplyDetails: res.rows,

View File

@ -81,8 +81,12 @@
</el-col>
</el-row>
<el-table v-loading="loading" :data="deviceList">
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table
v-loading="loading"
:data="deviceList"
@selection-change="returnSelChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
label="序号"
align="center"
@ -797,6 +801,8 @@ export default {
trigger: 'change',
},
},
// 退
selChangeList: [],
}
},
mounted() {
@ -869,7 +875,10 @@ export default {
receiveView(this.queryParams)
.then((response) => {
this.deviceList = response.data.rows
console.log(this.deviceList, ' this.deviceList')
console.log(
this.deviceList,
'this.deviceList设备列表=====================',
)
// this.deviceList.forEach(item => {
// console.log(item.num, 'item.num')
@ -883,8 +892,6 @@ export default {
// }
// })
console.log(this.deviceList, 'deviceList')
this.total = response.data.total
this.loading = false
})
@ -912,6 +919,18 @@ export default {
// parentId: this.queryParams.id,
// }
// const res1 = await getRecord(param1)
if (this.selChangeList.length < 1) {
this.$message.error('请勾选需要退料的数据!')
return
}
let typeId = ''
this.selChangeList.map((e) => {
typeId += e.modelId + ','
})
// if (true) return
const { data: res } = await endBackBeforeQueryApi({
id: this.queryParams.id,
})
@ -926,6 +945,7 @@ export default {
createBy: this.createBy,
parentId: this.queryParams.id,
taskId: this.queryParams.taskId,
typeId,
}
endBack(param).then((response) => {
if (response.code == 200) {
@ -1431,6 +1451,12 @@ export default {
}
})
},
//
returnSelChange(list) {
this.selChangeList = list
console.log(list, '复选框选中的数据!')
},
},
watch: {
innerVisible: {