From 0ec6c7ee0b8236cbc6f49a8cc0e466099a09e08d Mon Sep 17 00:00:00 2001 From: haoyahui <2032914783@qq.com> Date: 星期一, 27 十一月 2023 10:25:32 +0800 Subject: [PATCH] 物品报废 --- admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue | 169 +++++++++++++++++++++++++++++-------------------------- 1 files changed, 89 insertions(+), 80 deletions(-) diff --git a/admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue b/admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue index 27f95d1..3c1b726 100644 --- a/admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue +++ b/admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue @@ -26,8 +26,9 @@ import * as finsystenant from '@/api/baseSetting/finsystenant'; import { getBaseUrl } from '@/utils/base'; import { mapGetters } from 'vuex'; -import { selectTenantWarehouse,goodsModel } from '@/api/baseSetting/finsystenant'; +import { selectTenantWarehouse, goodsModel } from '@/api/baseSetting/finsystenant'; import { getDicts } from '@/api/system/dict/data'; +import * as DateFormatter from '@/utils/DateFormatter'; export default { name: 'index', @@ -52,21 +53,38 @@ placeholder: '璇烽�夋嫨', defaultValue: '', options: [], - }, - { - type: 'text', - dataIndex: 'name', - label: '鐗╁搧鍚嶇О', - placeholder: '璇疯緭鍏�', - defaultValue: '', + optionsConfig: { + label: 'warehouseName', + value: 'id', + url: SettingIplatform.apiBaseURL + '/pc/base/warehouse/select/tenant_warehouse', + }, }, { type: 'select', - dataIndex: 'warehouseId', - label: '瑙勬牸鍨嬪彿', - placeholder: '璇烽�夋嫨', + dataIndex: 'goodsTemplateId', + label: '鐗╁搧鍚嶇О', + placeholder: '璇疯緭鍏�', defaultValue: '', options: [], + cascader: [{ key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId' }], + optionsConfig: { + label: 'goodsName', + value: 'id', + url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/query/goodsTemplate', + }, + }, + { + type: 'select', + dataIndex: 'baseGoodsModelsId', + label: '瑙勬牸鍨嬪彿', + placeholder: '璇疯緭鍏�', + defaultValue: '', + options: [], + optionsConfig: { + label: 'modelName', + value: 'id', + url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel', + }, }, { type: 'select', @@ -74,16 +92,20 @@ label: '绫诲瀷', placeholder: '璇烽�夋嫨', defaultValue: '', - options: [{ - label:'鍏ㄩ儴', - value:'' - },{ - label:'鐩樼泩', - value:'1' - },{ - label:'鐩樹簭', - value:'2' - }], + options: [ + { + label: '鍏ㄩ儴', + value: '', + }, + { + label: '鐩樼泩', + value: '1', + }, + { + label: '鐩樹簭', + value: '2', + }, + ], }, { type: 'select', @@ -91,40 +113,44 @@ label: '鍑哄叆搴撶被鍨�', placeholder: '璇烽�夋嫨', defaultValue: '', - options: [{ - label:'鍏ㄩ儴', - value:'' - },{ - label:'鐩樼泩鍏ュ簱', - value:'1' - },{ - label:'鐩樹簭鍑哄簱', - value:'2' - }], + options: [ + { + label: '鍏ㄩ儴', + value: '', + }, + { + label: '鐩樼泩鍏ュ簱', + value: '1', + }, + { + label: '鐩樹簭鍑哄簱', + value: '2', + }, + ], }, { type: 'text', - dataIndex: 'name', + dataIndex: 'businessFormCode', label: '鍗曞彿', placeholder: '璇疯緭鍏�', defaultValue: '', }, { type: 'text', - dataIndex: 'name', + dataIndex: 'operatorName', label: '鎿嶄綔浜�', placeholder: '璇疯緭鍏�', defaultValue: '', }, { type: 'date-picker', - dataIndex: 'incomeTimeStart', + dataIndex: 'startTime', label: '鏃堕棿', defaultValue: '', }, { type: 'date-picker', - dataIndex: 'incomeTimeEnd', + dataIndex: 'endTime', label: '鑷�', defaultValue: '', }, @@ -133,16 +159,12 @@ treeDataList: [], // 鎼滅储鏉′欢 filterFrom: { - tenantId: null, - userName: null, - userPhone: null, - status: 1, }, // 琛ㄦ牸鏁版嵁 table: { showIndex: true, // 鏄惁鏄剧ず搴忓彿 expand: false, // 鏄惁鏄剧ず璇︽儏鏁版嵁 - url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 璇锋眰鍦板潃 + url: SettingIplatform.apiBaseURL + '/pc/l/wh/form/inventory/list/PdDetail', // 璇锋眰鍦板潃 // 宸ュ叿鏉� tools: { columnsCtrl: { @@ -158,18 +180,32 @@ }, // 鍒椾俊鎭� columns: [ - { title: '浠撳簱', field: 'name', align: 'left' }, - { title: '鐗╁搧鍚嶇О', field: 'WAREHOUSE_NAME', align: 'center' }, - { title: '瑙勬牸鍨嬪彿', field: 'lv', align: 'center' }, - { title: '绫诲瀷', field: 'lv', align: 'center' }, - { title: '搴撳瓨鏁伴噺', field: 'summary', align: 'left' }, - { title: '鐩樼偣鏁伴噺', field: 'summary', align: 'left' }, - { title: '寮傚父鏁伴噺', field: 'summary', align: 'left' }, - { title: '鍑哄叆搴撶被鍨�', field: 'summary', align: 'left' }, - { title: '鍑哄叆搴撳崟鍙�', field: 'summary', align: 'left' }, - { title: '鏈烘瀯', field: 'summary', align: 'left' }, - { title: '鎿嶄綔浜�', field: 'summary', align: 'left' }, - { title: '鎿嶄綔鏃堕棿', field: 'summary', align: 'left' }, + { title: '浠撳簱', field: 'warehouseName', align: 'left' }, + { title: '鐗╁搧鍚嶇О', field: 'goodsTemplateName', align: 'center' }, + { title: '瑙勬牸鍨嬪彿', field: 'baseGoodsModelsName', align: 'center' }, + { title: '绫诲瀷', field: 'inventoryResultType', align: 'center' }, + { title: '搴撳瓨鏁伴噺', field: 'initCounts', align: 'left' }, + { title: '鐩樼偣鏁伴噺', field: 'inventoryCounts', align: 'left' }, + { title: '寮傚父鏁伴噺', field: 'errorCounts', align: 'left' }, + { + title: '鍑哄叆搴撶被鍨�', + field: 'inventoryType', + align: 'left', + formatter: (row) => { + return { value: row.inventoryType, type: row.inventoryType && row.inventoryType.includes('鐩樼泩') ? 'success' : 'danger' }; + }, + }, + { title: '鍑哄叆搴撳崟鍙�', field: 'warehouseFormCode', align: 'left' }, + { title: '鏈烘瀯', field: 'agencyName', align: 'left' }, + { title: '鎿嶄綔浜�', field: 'operatorName', align: 'left' }, + { + title: '鎿嶄綔鏃堕棿', + field: 'operatorTime', + align: 'center', + formatter: (row) => { + return { value: row.operatorTime ? DateFormatter.LongToDateTime(row.operatorTime) : '-' }; + }, + }, ], // 鎿嶄綔淇℃伅 operation: { @@ -194,35 +230,8 @@ computed: { ...mapGetters(['userInfo']), }, - created() { - this.initQuery(); - }, + created() {}, methods: { - initQuery() { - selectTenantWarehouse({ agencyId: this.userInfo.tenantId }).then((res) => { - this.items.forEach((v) => { - if (v.label == '鐩樼偣浠撳簱') { - v.options = res.map((item) => { - item.label = item.warehouseName; - item.value = item.id; - return item; - }); - } - }); - }); - goodsModel().then((res) => { - this.items.forEach((v) => { - if (v.label == '瑙勬牸鍨嬪彿') { - v.options = res.map((item) => { - item.label = item.modelName; - item.value = item.id; - return item; - }); - } - }); - }); - - }, showAudit(row) { this.editSetting.id = row.id; this.editSetting.info = JSON.stringify(row); -- Gitblit v1.9.1