From 774e6e650b6235a9e34dfecab65c4322c1767714 Mon Sep 17 00:00:00 2001 From: 石广澎 <shiguangpeng@163.com> Date: 星期五, 01 十二月 2023 16:48:15 +0800 Subject: [PATCH] feat: 库存管理 查询条件梳理 --- admin-web/src/views/stock/procure/receiptDetails/index.vue | 101 ++++++++++++++++++++++++++++---------------------- 1 files changed, 56 insertions(+), 45 deletions(-) diff --git a/admin-web/src/views/stock/procure/receiptDetails/index.vue b/admin-web/src/views/stock/procure/receiptDetails/index.vue index 64d606b..b11e83c 100644 --- a/admin-web/src/views/stock/procure/receiptDetails/index.vue +++ b/admin-web/src/views/stock/procure/receiptDetails/index.vue @@ -33,9 +33,8 @@ import SettingIplatform from '@/utils/settingIplatform'; import detail from '../purchaseOrder/detail'; import * as finsystenant from '@/api/baseSetting/finsystenant'; -import {goodsModel} from '@/api/stock/procure/purchaseOrder'; import myImport from '@/views/components/myImport'; -import { getBaseUrl } from '@/utils/base'; +import {getBaseUrl} from '@/utils/base'; export default { name: 'index', @@ -52,32 +51,45 @@ defaultValue: '', }, { - type: 'text', - dataIndex: 'goodsTemplateName', - label: '鐗╁搧鍚嶇О', - placeholder: '璇疯緭鍏�', - defaultValue: '', - }, - { - type: 'select', - dataIndex: 'baseGoodsModelsId', - label: '瑙勬牸鍨嬪彿', - placeholder: '璇烽�夋嫨', - defaultValue: '', - options:[] - }, - { type: 'cascader', dataIndex: 'agencyId', label: '鏈烘瀯', placeholder: '璇烽�夋嫨', optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, + cascader: [{key:'goodsTemplateId',queryKey: 'agencyId'}], defaultValue: '', options: [], }, { + 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: 'baseGoodsModelsId', + label: '瑙勬牸鍨嬪彿', + placeholder: '璇疯緭鍏�', + defaultValue: '', + options: [], + optionsConfig: { + label: 'modelName', + value: 'id', + url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel', + }, + }, + { type: 'text', - dataIndex: 'buyerName', + dataIndex: 'createName', label: '鍒涘缓浜�', placeholder: '璇疯緭鍏�', defaultValue: '', @@ -100,7 +112,7 @@ // 鎼滅储鏉′欢 filterFrom: { tenantId: null, - agencyId:[], + agencyId: [], status: 1, }, // 瀵煎叆 @@ -147,14 +159,28 @@ }, // 鍒椾俊鎭� columns: [ - { title: '鍗曞彿', field: 'businessFormCode', align: 'center' }, - { title: '鐗╁搧鍚嶇О', field: 'goodsTemplateName', align: 'center' }, - { title: '瑙勬牸鍨嬪彿', field: 'baseGoodsModelsName', align: 'center' }, - { title: '鍗曚环', field: 'price', align: 'center' }, + { title: '鍗曞彿', field: 'businessFormCode', align: 'center', width: 130 }, + { title: '鐗╁搧鍚嶇О', field: 'goodsTemplateName', align: 'left', minWidth: 140 }, + { title: '瑙勬牸鍨嬪彿', field: 'baseGoodsModelsName', align: 'left', width: 130 }, + { + title: '鍗曚环', + field: 'price', + align: 'center', + formatter: (row) => { + return { value: row.price / 100 }; + }, + }, { title: '鍏ュ簱鏁伴噺', field: 'counts', align: 'center' }, - { title: '閲戦', field: 'amount', align: 'center' }, - { title: '鎵�灞炴満鏋�', field: 'agencyName', align: 'center' }, - { title: '鍒涘缓浜�', field: 'buyerName', align: 'center' }, + { + title: '閲戦', + field: 'amount', + align: 'center', + formatter: (row) => { + return { value: row.price / 100 }; + }, + }, + { title: '鎵�灞炴満鏋�', field: 'agencyName', align: 'center', width: 130 }, + { title: '鍒涘缓浜�', field: 'buyerName', align: 'center', width: 90 }, { title: '鎿嶄綔鏃堕棿', field: 'procureTime', @@ -168,7 +194,7 @@ // 鎿嶄綔淇℃伅 operation: { show: true, // 鏄剧ず鎿嶄綔鍒� - width: '150', // 鍒楀 + width: 100, // 鍒楀 attr: [ { title: '璇︽儏', @@ -192,18 +218,6 @@ }; }, created() { - // 鎼滅储妗嗚鏍煎瀷鍙� - 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 - }) - } - }) - }) }, methods: { //瀵煎叆 @@ -247,9 +261,9 @@ .catch(() => {}); }, showDetail(row) { - this.detailSetting.id=row.businessId - this.detailSetting.title='璇︽儏' - this.detailSetting.show=true + this.detailSetting.id = row.businessId; + this.detailSetting.title = '璇︽儏'; + this.detailSetting.show = true; }, // 鏌ヨtable鍒楄〃 search(pageNum) { @@ -266,9 +280,6 @@ } if (this.filterFrom.incomeTimeEnd) { this.filterFrom.incomeTimeEnd = this.filterFrom.incomeTimeEnd.replace(/\-/g, ''); - } - if (params.agencyId&¶ms.agencyId.length) { - this.filterFrom.agencyId = params.agencyId[params.agencyId.length - 1]; } this.search(1); }, -- Gitblit v1.9.1