From d1fd24649964e5cdc36db9a4300b1a712df32254 Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Fri, 15 Nov 2024 19:07:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=86=E6=96=99=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lease/apply/component/addToolsApply.vue | 91 +- src/views/material/ma/whHouse/index.vue | 820 ++++++++++-------- 2 files changed, 502 insertions(+), 409 deletions(-) diff --git a/src/views/material/lease/apply/component/addToolsApply.vue b/src/views/material/lease/apply/component/addToolsApply.vue index 218fafbf..10f1c882 100644 --- a/src/views/material/lease/apply/component/addToolsApply.vue +++ b/src/views/material/lease/apply/component/addToolsApply.vue @@ -9,7 +9,7 @@ :inline="true" label-width="120px" > - + + + - - - + placeholder="请选择租赁工程" + > { + // this.projectList = []; + if (val && val.length > 0) { + this.maForm.unitId = this.unitId[this.unitId.length - 1]; + } else if (val && val.length == 0) { + this.maForm.unitId = ""; + } + // this.$set(this.maForm, "leaseProjectId", null); + getListProject({ unitId: this.maForm.unitId }).then((response) => { this.projectList = response.data; }); - this.unitTemp = val; + this.unitTemp = this.unitid; }, projectChange(val) { - this.maForm.leaseProjectId = val; - this.projectTemp = val; - console.log("projectTemp", this.projectTemp); + if (val && val.length > 0) { + this.maForm.projectId = this.projectId[this.projectId.length - 1]; + } else if (val && val.length == 0) { + this.maForm.projectId = ""; + } + getListUnite({ projectId: this.maForm.projectId }).then((response) => { + this.uniteList = response.data; + }); + // this.maForm.leaseProjectId = val; + this.projectTemp = this.projectId; }, /** 租赁单位和工程-下拉选 */ projectInfoList() { if (!this.isEdit) { - getListUnite({ id: null }).then((response) => { + getListUnite({ projectId: null }).then((response) => { this.uniteList = response.data; }); + getListProject({ unitId: null }).then((response) => { + this.projectList = response.data; + }); } else { - getListUnite({ id: null }).then((response) => { + getListUnite({ projectId: null }).then((response) => { this.uniteList = response.data; }); console.log("maForm", this.maForm.leaseUnitId); @@ -365,6 +398,14 @@ export default { // this.projectList = response.data; // }); }, + // filterTree(nodes) { + // return nodes.map((node) => { + // if (node.children) { + // node.children = this.filterTree(node.children); + // } + // return node; + // }); + // }, //选择物资厂家 // changeSupplier(supplierId) { // this.equipmentList.forEach((item) => { @@ -469,8 +510,8 @@ export default { if (valid) { console.log("projectId", this.projectTemp); await getAgreement({ - unitId: this.unitTemp, - projectId: this.projectTemp, + unitId: this.maForm.unitId, + projectId: this.maForm.projectId, }).then((response) => { this.agreementId = response.data.agreementId; this.maForm.agreementId = this.agreementId; diff --git a/src/views/material/ma/whHouse/index.vue b/src/views/material/ma/whHouse/index.vue index 6dc9378f..9181a948 100644 --- a/src/views/material/ma/whHouse/index.vue +++ b/src/views/material/ma/whHouse/index.vue @@ -1,49 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + handleExport() { + this.download( + "/material/wh_house_info/export", + { + ...this.queryParams, + }, + `仓库管理_${new Date().getTime()}.xlsx` + ); + }, + + /** 搜索按钮操作 */ + handleQuery() { + this.queryParams.pageNum = 1; + this.getList(); + }, + }, +}; + \ No newline at end of file +} + \ No newline at end of file