二级库代码优化

This commit is contained in:
BianLzhaoMin 2024-10-18 13:28:44 +08:00
parent 80c75ea931
commit cf8af1097b
1 changed files with 27 additions and 6 deletions

View File

@ -122,7 +122,8 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button style="position: relative;bottom: 36px;"
<el-button
style="position: relative; bottom: 36px"
type="warning"
plain
icon="el-icon-download"
@ -217,7 +218,7 @@
v-if="leaseType == 1"
/>
<el-table-column
label="领用数量"
label="领用数量-----"
align="center"
key="9"
prop="receiveNum"
@ -430,6 +431,7 @@
<el-dialog
:title="title"
:visible.sync="openRecord"
v-if="openRecord"
width="1200px"
append-to-body
>
@ -532,8 +534,8 @@
<pagination
v-show="dialogTotal > 0"
:total="dialogTotal"
:page.sync="dialogQuery.pageNum"
:limit.sync="dialogQuery.pageSize"
:page.sync="newQueryParams.pageNum"
:limit.sync="newQueryParams.pageSize"
@pagination="getDialogList"
/>
</el-dialog>
@ -662,6 +664,11 @@ export default {
modelId: undefined,
typeId: undefined,
},
newQueryParams: {
pageNum: 1,
pageSize: 10,
modelId: '',
},
dialogList: [],
queryType: 1,
dialogTotal: 0,
@ -868,12 +875,16 @@ export default {
this.dialogQuery.unitId = row.unitId
this.dialogQuery.typeId = row.typeId*/
// console.log('row---', row)
this.newQueryParams.modelId = row.typeId
this.getDialogList()
},
/** 查询列表 */
getDialogList() {
this.dialogQuery.queryType = this.queryType
getRecords().then((response) => {
getRecords(this.newQueryParams).then((response) => {
this.dialogList = response.rows
this.dialogTotal = response.total
})
@ -886,7 +897,17 @@ export default {
`二级库_${new Date().getTime()}.xlsx`,
)
},
},
watch: {
openRecord: {
handler(newValue) {
if (!newValue) {
this.newQueryParams.pageNum = 1
this.newQueryParams.pageSize = 10
}
},
deep: true,
},
},
}
</script>