diff --git a/src/api/stquery/projUsingRecord.js b/src/api/stquery/projUsingRecord.js index e25a452..e8ab214 100644 --- a/src/api/stquery/projUsingRecord.js +++ b/src/api/stquery/projUsingRecord.js @@ -28,3 +28,11 @@ export function usingRecord(query) { }) } +// 获取 工程机具使用二级 列表 +export function getRecordListApi(query) { + return request({ + url: '/material/projUsingRecord/getLeaseList', + method: 'get', + params: query + }) +} diff --git a/src/views/stquery/projUsingRecord.vue b/src/views/stquery/projUsingRecord.vue index fe52fdc..b5c9c02 100644 --- a/src/views/stquery/projUsingRecord.vue +++ b/src/views/stquery/projUsingRecord.vue @@ -194,24 +194,36 @@ prop="unit" :show-overflow-tooltip="true" /> - - - + + + + + + + + + @@ -224,6 +236,47 @@ :page-sizes="[5, 10, 15, 20, 30]" @pagination="getList" /> + + + + + + + + + 查询 + + + + + + + + + + + + + + + + @@ -232,6 +285,7 @@ import { getUnitData, getProData, usingRecord, + getRecordListApi } from '@/api/stquery/projUsingRecord' export default { @@ -275,6 +329,18 @@ export default { tableList: [], isUseChecked: false, + + titleDialog: '', //二级弹窗标题 + showDialog: false, //二级弹窗显示 + dialogType: undefined, // 弹窗类型 + dialogList: [], // 弹窗列表数据 + dialogQuery: { + pageNum: 1, + pageSize: 10, + maCode: undefined, + numType: undefined, // 0租赁 1归还 + }, + dialogTotal: 0, } }, created() { @@ -373,6 +439,62 @@ export default { } this.getList() }, + + //租赁弹窗 + outNumDialog(row) { + this.titleDialog = '查看租赁' + this.showDialog = true + this.dialogType = null + this.dialogQuery.typeId= row.typeId + this.dialogQuery.agreementId= row.agreementId + this.dialogQuery.numType= this.dialogType + this.getRecords() + }, + //归还弹窗 + backNumDialog(row) { + this.titleDialog = '查看归还' + this.showDialog = true + this.dialogType = 1 + this.dialogQuery.typeId= row.typeId + this.dialogQuery.agreementId= row.agreementId + this.dialogQuery.numType= this.dialogType + this.getRecords() + }, + //在用弹窗 + usNumDialog(row) { + this.titleDialog = '查看在用' + this.showDialog = true + this.dialogType = 0 + this.dialogQuery.typeId= row.typeId + this.dialogQuery.agreementId= row.agreementId + this.dialogQuery.numType= this.dialogType + this.getRecords() + }, + //查看二级列表 + handleDialogQuery() { + this.showDialog = true + this.dialogQuery.pageNum = 1; + this.dialogQuery.keyWord = ""; + this.getRecords() + }, + /** 查看二级列表 */ + getRecords() { + getRecordListApi(this.dialogQuery).then((response) => { + this.dialogList = response.data.rows + this.dialogTotal = response.data.total + }) + }, + + //关闭弹窗 + closeDialog () { + this.showDialog = false + this.dialogQuery = { + pageNum: 1, + pageSize: 10, + maCode: undefined, + numType: undefined, // 0租赁 1归还 + } + } }, } @@ -381,4 +503,8 @@ export default { width: 60px !important; margin-bottom: 10px; } +.clickText { + color: #02a7f0; + cursor: pointer; +}