工地直转

This commit is contained in:
zzyuan 2024-04-20 17:03:35 +08:00
parent 57291ad37e
commit 562bb16f2f
1 changed files with 34 additions and 12 deletions

View File

@ -274,7 +274,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetDialogQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetDialogQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-row> </el-row>
@ -431,6 +431,7 @@ export default {
title: '', title: '',
// //
open: false, open: false,
dialogId: undefined,
openPrint: false, openPrint: false,
handleState: 0, //012 handleState: 0, //012
dialogLoading: false, dialogLoading: false,
@ -591,8 +592,8 @@ export default {
/** 查询设备列表 */ /** 查询设备列表 */
getDialogList() { getDialogList() {
this.dialogLoading = true this.dialogLoading = true
let param = { let param = {
keyWord:this.dialogParams.keyWord,
agreementId: this.dialogParams.backAgreementId, agreementId: this.dialogParams.backAgreementId,
} }
getUseringData(param).then(response => { getUseringData(param).then(response => {
@ -652,11 +653,24 @@ export default {
} }
} }
}, },
resetDialogQuery() { /** 搜索按钮操作 */
this.resetForm('dialogForm') handleDialogQuery() {
if(this.handleState == 0){
this.getDialogList() 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() { handleAdd() {
this.resetForm('dialogForm') this.resetForm('dialogForm')
@ -708,23 +722,30 @@ export default {
}) })
}, },
handleView(row) { handleView(row) {
let param = { id: row.id } console.log(row, '查看')
this.getDetail(param) this.dialogId = row.id;
this.getDetail()
this.open = true this.open = true
this.handleState = 1 this.handleState = 1
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleExame(row) { handleExame(row) {
console.log(row, '审核') console.log(row, '审核')
let param = { id: row.id } this.dialogId = row.id;
this.getDetail(param) this.getDetail()
this.open = true this.open = true
this.handleState = 2 this.handleState = 2
}, },
getDetail(param) { getDetail() {
let param = {
keyWord:this.dialogParams.keyWord,
id:this.dialogId
}
getDetailInfo(param).then(res => { getDetailInfo(param).then(res => {
if (res.code == 200) { 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, 'backUnitId', Number(res.data.backUnitId))
this.$set(this.dialogParams, 'backProId', Number(res.data.backProId)) this.$set(this.dialogParams, 'backProId', Number(res.data.backProId))
// this.$set(this.dialogParams,'backAgreementCode',res.data.tagreementCode) // this.$set(this.dialogParams,'backAgreementCode',res.data.tagreementCode)
@ -732,6 +753,7 @@ export default {
this.$set(this.dialogParams, 'leaseProId', Number(res.data.leaseProId)) this.$set(this.dialogParams, 'leaseProId', Number(res.data.leaseProId))
this.deviceList = res.data.directApplyDetails this.deviceList = res.data.directApplyDetails
this.deviceList.forEach(item => { this.deviceList.forEach(item => {
item.typeName = item.kindName
item.typeModelName = item.modelName item.typeModelName = item.modelName
// item.num = item.useNum // item.num = item.useNum
}) })