From 562bb16f2f8002fab62f70657a6659fb003f49b7 Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Sat, 20 Apr 2024 17:03:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=9C=B0=E7=9B=B4=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../constructionSite/constructionSite.vue | 46 ++++++++++++++----- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/sgzb-ui/src/views/claimAndRefund/constructionSite/constructionSite.vue b/sgzb-ui/src/views/claimAndRefund/constructionSite/constructionSite.vue index 853d0352..0f69eefc 100644 --- a/sgzb-ui/src/views/claimAndRefund/constructionSite/constructionSite.vue +++ b/sgzb-ui/src/views/claimAndRefund/constructionSite/constructionSite.vue @@ -274,7 +274,7 @@ /> - 查询 + 查询 重置 @@ -431,6 +431,7 @@ export default { title: '', // 是否显示弹出层 open: false, + dialogId: undefined, openPrint: false, handleState: 0, //0新增1查看2审批 dialogLoading: false, @@ -591,8 +592,8 @@ export default { /** 查询设备列表 */ getDialogList() { this.dialogLoading = true - let param = { + keyWord:this.dialogParams.keyWord, agreementId: this.dialogParams.backAgreementId, } getUseringData(param).then(response => { @@ -652,11 +653,24 @@ export default { } } }, - resetDialogQuery() { - this.resetForm('dialogForm') - this.getDialogList() + /** 搜索按钮操作 */ + handleDialogQuery() { + if(this.handleState == 0){ + this.getDialogList() + }else{ + this.getDetail() + } + }, + /** 重置按钮操作 */ + resetDialogQuery() { + if(this.handleState == 0){ + this.$set(this.dialogParams,'keyWord','') + this.getDialogList() + }else{ + this.$set(this.dialogParams,'keyWord','') + this.getDetail() + } }, - /** 工地直转--打开弹窗 */ handleAdd() { this.resetForm('dialogForm') @@ -708,23 +722,30 @@ export default { }) }, handleView(row) { - let param = { id: row.id } - this.getDetail(param) + console.log(row, '查看') + this.dialogId = row.id; + this.getDetail() this.open = true this.handleState = 1 }, /** 修改按钮操作 */ handleExame(row) { console.log(row, '审核') - let param = { id: row.id } - this.getDetail(param) + this.dialogId = row.id; + this.getDetail() this.open = true this.handleState = 2 }, - getDetail(param) { + getDetail() { + let param = { + keyWord:this.dialogParams.keyWord, + id:this.dialogId + } getDetailInfo(param).then(res => { if (res.code == 200) { - this.dialogParams = res.data + let keyWord = this.dialogParams.keyWord; + this.dialogParams = res.data; + this.dialogParams.keyWord = keyWord this.$set(this.dialogParams, 'backUnitId', Number(res.data.backUnitId)) this.$set(this.dialogParams, 'backProId', Number(res.data.backProId)) // this.$set(this.dialogParams,'backAgreementCode',res.data.tagreementCode) @@ -732,6 +753,7 @@ export default { this.$set(this.dialogParams, 'leaseProId', Number(res.data.leaseProId)) this.deviceList = res.data.directApplyDetails this.deviceList.forEach(item => { + item.typeName = item.kindName item.typeModelName = item.modelName // item.num = item.useNum })