From 75aaca3a95314be8c384df18dba23c661dea742c Mon Sep 17 00:00:00 2001 From: 石广澎 <shiguangpeng@163.com> Date: 星期一, 27 十一月 2023 19:05:38 +0800 Subject: [PATCH] feat: --- admin-web/src/views/stock/ledger/ledgerQuery/index.vue | 154 +++++++++++++++++++++++++------------------------- 1 files changed, 77 insertions(+), 77 deletions(-) diff --git a/admin-web/src/views/stock/ledger/ledgerQuery/index.vue b/admin-web/src/views/stock/ledger/ledgerQuery/index.vue index b32fc38..5bf9cd5 100644 --- a/admin-web/src/views/stock/ledger/ledgerQuery/index.vue +++ b/admin-web/src/views/stock/ledger/ledgerQuery/index.vue @@ -33,6 +33,8 @@ import { getBaseUrl } from '@/utils/base'; import { getCategorySelectTree, goodsModel } from '@/api/baseSetting/finsystenant'; import { getDicts } from '@/api/system/dict/data'; +import * as DateFormatter from '@/utils/DateFormatter'; +import stockType from '@/utils/stockType' export default { name: 'index', @@ -46,64 +48,83 @@ dataIndex: 'agencyId', label: '鏈烘瀯', placeholder: '璇烽�夋嫨', - optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, defaultValue: '', options: [], + cascader: [ + { key: 'warehouseId', queryKey: 'agencyId' }, + { key: 'goodsTemplateId', queryKey: 'agencyId' }, + ], + optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, }, { - type: 'text', - dataIndex: 'name', + type: 'select', + dataIndex: 'warehouseId', + label: '浠撳簱', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], + optionsConfig: { + label: 'warehouseName', + value: 'id', + url: SettingIplatform.apiBaseURL + '/pc/base/warehouse/select/tenant_warehouse', + }, + }, + { + type: 'select', + 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: 'status', + dataIndex: 'baseGoodsModelsId', label: '瑙勬牸鍨嬪彿', - placeholder: '璇烽�夋嫨', + placeholder: '璇疯緭鍏�', defaultValue: '', options: [], + optionsConfig: { + label: 'modelName', + value: 'id', + url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel', + }, }, { type: 'select', - dataIndex: 'status', - label: '鍒嗙被', + dataIndex: 'flowType', + label: '绫诲瀷', placeholder: '璇烽�夋嫨', defaultValue: '', options: [], - }, - { - type: 'select', - dataIndex: 'status', - label: '绫诲埆', - placeholder: '璇烽�夋嫨', - defaultValue: '', - options: [], + optionsConfig: { + label: 'dict_label', + value: 'dict_value', + url: SettingIplatform.apiBaseURL + '/permit/dict/data/type/FLOW_TYPE', + }, }, { type: 'text', - dataIndex: 'name', + dataIndex: 'businessFormCode', label: '鍗曞彿', placeholder: '璇疯緭鍏�', defaultValue: '', }, { - type: 'text', - dataIndex: 'name', - label: '鎿嶄綔浜�', - placeholder: '璇疯緭鍏�', + type: 'date-picker', + dataIndex: 'dealTimeStart', + label: '鏃堕棿', defaultValue: '', }, { type: 'date-picker', - dataIndex: 'val1', - label: '鍑哄簱鏃堕棿', - defaultValue: '', - }, - { - type: 'date-picker', - dataIndex: 'val2', + dataIndex: 'dealTimeEnd', label: '鑷�', defaultValue: '', }, @@ -145,7 +166,7 @@ table: { showIndex: true, // 鏄惁鏄剧ず搴忓彿 expand: false, // 鏄惁鏄剧ず璇︽儏鏁版嵁 - url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 璇锋眰鍦板潃 + url: SettingIplatform.apiBaseURL + '/pc/warehouse/flow/getTaiZhangList', // 璇锋眰鍦板潃 // 宸ュ叿鏉� tools: { columnsCtrl: { @@ -161,17 +182,33 @@ }, // 鍒椾俊鎭� columns: [ - { title: '鏈烘瀯', field: 'name', align: 'left' }, - { title: '浠撳簱', field: 'code', 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: 'agencyName', align: 'left', width: 130 }, + { title: '浠撳簱', field: 'warehouseName', align: 'left', width: 130 }, + { title: '鐗╁搧鍚嶇О', field: 'goodsTemplateName', align: 'left', minWidth: 130 }, + { title: '瑙勬牸鍨嬪彿', field: 'baseGoodsModelsName', align: 'left', width: 130 }, + { + title: '绫诲瀷', + field: 'summary', + align: 'center', + formatter: (row) => { + let result = stockType(row) + return { value: result }; + }, + }, + { title: '鍗曞彿', field: 'businessFormCode', align: 'center', width: 130 }, + { title: '鏁伴噺', field: 'thisCount', align: 'center', width: 100 }, + { title: '鎿嶄綔鍓嶆暟閲�', field: 'initialCount', align: 'center', width: 100 }, + { title: '鎿嶄綔鍚庢暟閲�', field: 'endCount', align: 'center', width: 100 }, + { title: '鍦ㄩ��', field: 'zaiTuCount', align: 'center', width: 100 }, + { + title: '鎿嶄綔鏃堕棿', + field: 'dealTime', + align: 'center', + width: 160, + formatter: (row) => { + return { value: DateFormatter.LongToDateTime(row.dealTime) }; + }, + }, ], paging: { show: true, // 鏄剧ず鍒嗛〉 @@ -186,45 +223,8 @@ }, }; }, - created() { - this.initQuery(); - }, + created() {}, methods: { - initQuery() { - goodsModel().then((res) => { - this.items.forEach((v) => { - if (v.label == '瑙勬牸鍨嬪彿') { - v.options = res.map((item) => { - item.label = item.modelName; - item.vlaue = item.id; - return item; - }); - } - }); - }); - getDicts('GOODS_PRICE').then((res) => { - this.items.forEach((v) => { - if (v.label == '绫诲埆') { - v.options = res.map((v) => { - v.label = v.dict_label; - v.value = v.dict_value; - return v; - }); - } - }); - }); - getCategorySelectTree().then((res) => { - this.items.forEach((v) => { - if (v.label == '鍒嗙被') { - v.options = res.map((item) => { - item.label = item.label; - item.vlaue = item.id; - return item; - }); - } - }); - }); - }, del(row) { this.$modal .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.name + '"鐨勬満鏋勫悧锛�') -- Gitblit v1.9.1