diff --git a/src/api/lease/apply.js b/src/api/lease/apply.js index 3716e46f..bbd319ce 100644 --- a/src/api/lease/apply.js +++ b/src/api/lease/apply.js @@ -53,7 +53,14 @@ export function getListProject(data) { }) } - +// 领料申请获取协议单id +export function getAgreement(data) { + return request({ + url: '/material/select/getAgreementInfoById', + method: 'post', + data: data, + }) +} diff --git a/src/views/material/lease/apply/component/addToolsApply.vue b/src/views/material/lease/apply/component/addToolsApply.vue index fbe35536..dbc4cc76 100644 --- a/src/views/material/lease/apply/component/addToolsApply.vue +++ b/src/views/material/lease/apply/component/addToolsApply.vue @@ -130,7 +130,7 @@ - + 0) { - this.$refs["maForm"].validate((valid) => { + this.$refs["maForm"].validate(async (valid) => { if (valid) { + await getAgreement({ + unitId: this.unitTemp, + projectId: this.projectTemp, + }).then((response) => { + this.agreementId = response.data.agreementId; + this.maForm.agreementId = this.agreementId; + }); this.maForm.taskId = this.taskId; // this.maForm.checkDetailsList = this.equipmentList - this.$modal + await this.$modal .confirm("是否确认保存当前页面") .then(function () {}) .then(() => {