From 4963aa4888fc1bcfa6de0c392ee26a134a460cfe Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期三, 05 六月 2024 14:55:43 +0800 Subject: [PATCH] 货盘运输移库数量预填写 --- src/views/accounting/jmreport/index.vue | 38 ++++++++++++++++++++++++++++++++++++-- 1 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/views/accounting/jmreport/index.vue b/src/views/accounting/jmreport/index.vue index ec36143..b2b0d10 100644 --- a/src/views/accounting/jmreport/index.vue +++ b/src/views/accounting/jmreport/index.vue @@ -18,6 +18,7 @@ import { mapGetters } from 'vuex' import ttable from '@/views/common/ztt-table.vue' import { pageList } from '@/api/accounting/personReport' +import { remote } from '@/api/admin/dict' export default { components: { ttable @@ -59,14 +60,17 @@ isTrue: true, isSearch: true, searchInfoType: 'date', + formatter: this.formatDutyDate, }, { minWidth: '100', prop: 'workShop', label: '杞﹂棿', isTrue: true, - isSearch: true, - searchInfoType: 'text', + isSearch: true,searchInfoType:'select', + optList: () => { + return this.workShopList + } }, { minWidth: '100', @@ -88,6 +92,14 @@ minWidth: '100', prop: 'staffName', label: '鐢熶骇浜哄憳', + isTrue: true, + isSearch: true, + searchInfoType: 'text', + }, + { + minWidth: '100', + prop: 'operation', + label: '宸ュ簭', isTrue: true, isSearch: true, searchInfoType: 'text', @@ -123,13 +135,35 @@ operator: null }, prelang: "operation", + workShopList:[], } + }, + mounted(){ + this.getWorkShopList() }, methods:{ // table鑷甫浜嬩欢 handleSelectionChange(val) { this.multipleSelection = val }, + getWorkShopList(){ + remote('work_shop').then((response) => { + if (response.data.code === 0) { + this.workShopList = response.data.data + } else { + this.workShopList = [] + } + }) + }, + formatDutyDate(row, column, cellValue) { + if (cellValue) { + const dutyDateList = /\d{4}-\d{1,2}-\d{1,2}/g.exec(cellValue) + if (dutyDateList && dutyDateList.length > 0) { + return dutyDateList[0] + } + } + return '' + }, } } </script> -- Gitblit v1.9.3