diff --git a/sgzb-ui/src/api/claimAndRefund/receive.js b/sgzb-ui/src/api/claimAndRefund/receive.js index ad3b6b4b..a5b587c4 100644 --- a/sgzb-ui/src/api/claimAndRefund/receive.js +++ b/sgzb-ui/src/api/claimAndRefund/receive.js @@ -314,3 +314,12 @@ export const outboundOrderApi = (params) => { params, }) } + +// 领料申请-校验是否在审核 +export function getNumISenough(params) { + return request({ + url: '/base/tm_task/getNumISenough', + method: 'get', + params, + }) +} diff --git a/sgzb-ui/src/views/claimAndreturn/picking/apply/component/AddPicking.vue b/sgzb-ui/src/views/claimAndreturn/picking/apply/component/AddPicking.vue index 41bebc4a..24287de5 100644 --- a/sgzb-ui/src/views/claimAndreturn/picking/apply/component/AddPicking.vue +++ b/sgzb-ui/src/views/claimAndreturn/picking/apply/component/AddPicking.vue @@ -270,6 +270,7 @@ import { editLeaseApply, getLeaseApplyListAll, getLeaseApplyAuditListAll, + getNumISenough, } from '@/api/claimAndRefund/receive' import { @@ -834,8 +835,27 @@ export default { } }, /////// 设备类型树 切换 - deviceTypeChange(val) { + async deviceTypeChange(val) { console.log(val) + const warnMsg = await this.handleDeviceType(val[val.length - 1]) + // console.log('🚀 ~ deviceTypeChange-->> ~ warnMsg:', warnMsg) + if (warnMsg) { + // 确认框 + this.$confirm(warnMsg, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }) + .then(() => { + this.handleData(val) + }) + .catch(() => {}) + } else { + this.handleData(val) + } + + }, + handleData(val) { let nodes = null nodes = this.$refs.deviceTypeCascader.getCheckedNodes().length > 0 @@ -876,6 +896,19 @@ export default { this.deviceType = {} }, + // 选择设备类型后-处理数据 + async handleDeviceType(val) { + // console.log('🚀 ~ handleDeviceType ~ val:', val) + //getNumISenough + try { + const res = await getNumISenough({ typeId: val }) + // console.log('🚀 ~ handleDeviceType ~ res:', res) + return res.data.warnMsg + } catch (error) { + console.log('🚀 ~ handleDeviceType ~ error:', error) + } + + }, //// 将数据处理成 表格中需要的数据 handelTableItemData(node) { const template = JSON.parse(