diff --git a/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue b/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue index fe95a43..2db75c6 100644 --- a/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue +++ b/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue @@ -82,7 +82,7 @@ ref="deviceTypeCascader" filterable style="width: 240px" - :disabled="isEdit && !isView" + :disabled="(isEdit && !isView) || isCost" > @@ -271,6 +271,7 @@ import { getLeaseApplyListAll, getLeaseApplyAuditListAll, getCostBearingApi, + getAgreementInfoByIdApi, } from '@/api/claimAndRefund/receive' import { getInfo } from '@/api/login' export default { @@ -493,6 +494,7 @@ export default { ], }, costBearingList: [], + isCost: false, } }, mounted() { @@ -569,6 +571,21 @@ export default { projectId: this.queryParams.proId, } const res = await getAgreementInfoById(params) + + console.log(res, '根据工程和单位获取协议id') + + if (res.data.isSlt == 1) { + this.$message.error( + '当前协议下对应的工程已完成结算,不可重复领料!', + ) + this.isCost = true + + if (this.leaseApplyDetails.length > 0) { + this.leaseApplyDetails = [] + } + } else { + this.isCost = false + } if (!(res.data && res.data.agreementId)) { this.$message.error('当前单位和工程未上传') @@ -579,6 +596,12 @@ export default { } else { this.queryParams.agreementId = res.data.agreementId this.queryParams.agreementCode = res.data.agreementCode + + // // 1. 判断当前协议对应的工程是否结算 + + // getAgreementInfoByIdApi({ + // agreementId: res.data.agreementId, + // }) } } }, @@ -729,7 +752,7 @@ export default { } else { this.queryParams.leaseApplyDetails = this.leaseApplyDetails if (this.queryParams.leaseApplyDetails.length == 0) { - this.$message.error('请添加数据') + this.$message.error('请添加机具类型') return } let canSave = true diff --git a/src/views/claimAndreturn/picking/protocol/index.vue b/src/views/claimAndreturn/picking/protocol/index.vue index 787aafc..77bc219 100644 --- a/src/views/claimAndreturn/picking/protocol/index.vue +++ b/src/views/claimAndreturn/picking/protocol/index.vue @@ -155,7 +155,7 @@ prop="contractCode" :show-overflow-tooltip="true" /> - 内部单位 外部单位 - + --> - + + + + + @@ -391,29 +401,6 @@ - - - - - - - - - - - - - + + + + + +