Commit 76ff3930705b57f11d5aa8a7865ef96b40e8d159
1 parent
cf1bb50b
子表分页查询BUG修复
Signed-off-by: TanYibin <5491541@qq.com>
Showing
2 changed files
with
28 additions
and
14 deletions
ant-design-vue-jeecg/src/views/system/stocktaking/CycleCountDetailList.vue
... | ... | @@ -302,20 +302,32 @@ |
302 | 302 | this.$refs.modalForm2.edit(record); |
303 | 303 | this.$refs.modalForm2.title = "选择出库口"; |
304 | 304 | }, |
305 | - loadDatas(record) { | |
306 | - this.loading = true | |
307 | - this.dataSource = [] | |
305 | + getOrderMain(cycleCountHeadId) { | |
306 | + this.queryParam.cycleCountHeadId = cycleCountHeadId | |
307 | + this.loadData(1) | |
308 | + }, | |
309 | + loadData(arg) { | |
310 | + debugger | |
311 | + if (!arg) { | |
312 | + return | |
313 | + } | |
314 | + if (arg === 1) { | |
315 | + this.ipagination.current = 1 | |
316 | + } | |
317 | + var params = this.getQueryParams() | |
308 | 318 | getAction(this.url.list, { |
309 | - cycleCountHeadId: record | |
310 | - }).then((res) => { | |
311 | - if (res.success) { | |
319 | + cycleCountHeadId: params.cycleCountHeadId, | |
320 | + pageNo: this.ipagination.current, | |
321 | + pageSize: this.ipagination.pageSize | |
322 | + }).then(res => { | |
323 | + if (res.success && res.result !== null) { | |
312 | 324 | this.dataSource = res.result.records |
325 | + this.ipagination.total = res.result.total | |
326 | + } else { | |
327 | + this.dataSource = null | |
313 | 328 | } |
314 | - }).finally(() => { | |
315 | - this.loading = false | |
316 | 329 | }) |
317 | 330 | }, |
318 | - | |
319 | 331 | methodB(data) { |
320 | 332 | console.log("methodB" + data); |
321 | 333 | var _this = this; |
... | ... | @@ -364,6 +376,9 @@ |
364 | 376 | } |
365 | 377 | } |
366 | 378 | </script> |
367 | -<style lang="less" scoped> | |
368 | - @import '~@assets/less/common.less'; | |
379 | +<style scoped> | |
380 | +.ant-card { | |
381 | + margin-left: -24px; | |
382 | + margin-right: -24px; | |
383 | +} | |
369 | 384 | </style> |
370 | 385 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/stocktaking/CycleCountHeaderList.vue
... | ... | @@ -89,8 +89,7 @@ |
89 | 89 | </span> |
90 | 90 | |
91 | 91 | <span slot="action" slot-scope="text, record"> |
92 | - <a v-if="record.statusCyc === 1" @click="cycleCountDetailAdd(record)">新增</a> | |
93 | - <a-divider type="vertical" v-if="record.statusCyc !== 100" /> | |
92 | + <a v-if="record.statusCyc === 1" @click="cycleCountDetailAdd(record)">新增<a-divider type="vertical" /></a> | |
94 | 93 | <a-dropdown> |
95 | 94 | <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
96 | 95 | <a-menu slot="overlay"> |
... | ... | @@ -272,7 +271,7 @@ export default { |
272 | 271 | onSelectChange(selectedRowKeys, selectionRows) { |
273 | 272 | this.selectedRowKeys = selectedRowKeys |
274 | 273 | this.selectionRows = selectionRows |
275 | - this.$refs.CycleCountDetailList.loadDatas(this.selectedRowKeys[0]) | |
274 | + this.$refs.CycleCountDetailList.getOrderMain(this.selectedRowKeys[0]) | |
276 | 275 | }, |
277 | 276 | clickThenSelect(record, index) { |
278 | 277 | return { |
... | ... |