退料申请+重庆-当前在用量无显示修复

This commit is contained in:
binbin_pan 2024-04-11 14:18:36 +08:00
parent b6e5577d7b
commit e139c80eb3
3 changed files with 22 additions and 4 deletions

View File

@ -282,6 +282,14 @@ export function submitNumOut(params){
})
}
// 当前在用量
export function getUseNumByTypeId(params){
return request({
url: '/material/backApply/getUseNumByTypeId',
method: 'get',
params
})
}

View File

@ -233,7 +233,8 @@ import {
getDeviceTypeTree,
getAgreementInfoById,
submitLeaseApply,
getUseTypeTreee
getUseTypeTreee,
getUseNumByTypeId
} from '@/api/claimAndRefund/receive'
import { ApiSubmitBackApply } from "@/api/claimAndRefund/return"
import { submitBackApplyApi,materialReturnNoteByApply,submitRefuseBackApply } from "@/api/claimAndRefund/return.js"
@ -342,6 +343,7 @@ export default {
typeName: '', //
typeCode: '', //
unitNames: '', //
useNum: '', //
remark: '', //
preNum: 1, //
},
@ -762,11 +764,13 @@ export default {
},
///////
deviceTypeChange(val) {
async deviceTypeChange(val) {
let nodes = null;
console.log("vall1211221122", this.$refs.deviceTypeCascader.getCheckedNodes().length, this.$refs.deviceTypeCascader.getCheckedNodes(), [this.$refs.deviceTypeCascader.panel.getNodeByValue(val)])
nodes = this.$refs.deviceTypeCascader.getCheckedNodes().length > 0 ? this.$refs.deviceTypeCascader.getCheckedNodes() : [this.$refs.deviceTypeCascader.panel.getNodeByValue(val)]
console.log("nodes", nodes)
const res = await getUseNumByTypeId({ typeId: nodes[0].data.typeId })
nodes[0].data.useNum = res.data
if (nodes[0].level != 4) {
return
}
@ -790,6 +794,7 @@ export default {
template.preNum = node.data.num
template.typeName = node.pathLabels[2]
template.typeCode = node.pathLabels[3]
template.useNum = node.data.useNum
return template
}
}

View File

@ -233,7 +233,8 @@ import {
getDeviceTypeTree,
getAgreementInfoById,
submitLeaseApply,
getUseTypeTreee
getUseTypeTreee,
getUseNumByTypeId
} from '@/api/claimAndRefund/receive'
import { submitBackApplyApi } from "@/api/claimAndRefund/return"
import { submitBackApplyApiByCq,materialReturnNoteByApply,submitRefuseBackApply } from "@/api/claimAndRefund/return.js"
@ -342,6 +343,7 @@ export default {
typeName: '', //
typeCode: '', //
unitNames: '', //
useNum: '', //
remark: '', //
preNum: 1, //
},
@ -762,11 +764,13 @@ export default {
},
///////
deviceTypeChange(val) {
async deviceTypeChange(val) {
let nodes = null;
console.log("vall1211221122", this.$refs.deviceTypeCascader.getCheckedNodes().length, this.$refs.deviceTypeCascader.getCheckedNodes(), [this.$refs.deviceTypeCascader.panel.getNodeByValue(val)])
nodes = this.$refs.deviceTypeCascader.getCheckedNodes().length > 0 ? this.$refs.deviceTypeCascader.getCheckedNodes() : [this.$refs.deviceTypeCascader.panel.getNodeByValue(val)]
console.log("nodes", nodes)
const res = await getUseNumByTypeId({ typeId: nodes[0].data.typeId })
nodes[0].data.useNum = res.data
if (nodes[0].level != 4) {
return
}
@ -790,6 +794,7 @@ export default {
template.preNum = node.data.num
template.typeName = node.pathLabels[2]
template.typeCode = node.pathLabels[3]
template.useNum = node.data.useNum
return template
}
}