From 20913c80c3f5fc8e533cb92b90e6f20bcd68e032 Mon Sep 17 00:00:00 2001 From: 石广澎 <shiguangpeng@163.com> Date: 星期三, 29 十一月 2023 17:49:32 +0800 Subject: [PATCH] feat: 1、优化导入 2、部门物品台账查询对接 --- admin-web/src/views/stock/transfer/transferdetails/index.vue | 66 ++++++++++++++------------------- 1 files changed, 28 insertions(+), 38 deletions(-) diff --git a/admin-web/src/views/stock/transfer/transferdetails/index.vue b/admin-web/src/views/stock/transfer/transferdetails/index.vue index cfca3d8..5195f99 100644 --- a/admin-web/src/views/stock/transfer/transferdetails/index.vue +++ b/admin-web/src/views/stock/transfer/transferdetails/index.vue @@ -31,10 +31,7 @@ import MyButton from '@/components/myButton/myButton'; import SettingIplatform from '@/utils/settingIplatform'; import detail from '../transferApplication/detail'; -import * as finsystenant from '@/api/baseSetting/finsystenant'; import myImport from '@/views/components/myImport'; -import { getBaseUrl } from '@/utils/base'; -import { goodsModel } from '@/api/baseSetting/finsystenant'; import * as DateFormatter from '@/utils/DateFormatter'; export default { @@ -52,19 +49,31 @@ defaultValue: '', }, { - type: 'text', - dataIndex: 'goodsName', + 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: '璇烽�夋嫨', + placeholder: '璇疯緭鍏�', defaultValue: '', options: [], + optionsConfig: { + label: 'modelName', + value: 'id', + url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel', + }, }, { type: 'cascader', @@ -93,25 +102,25 @@ }, { type: 'date-picker', - dataIndex: 'val1', + dataIndex: 'createTimeStart', label: '鐢宠鏃堕棿', defaultValue: '', }, { type: 'date-picker', - dataIndex: 'val2', + dataIndex: 'createTimeEnd', label: '鑷�', defaultValue: '', }, { type: 'date-picker', - dataIndex: 'val1', + dataIndex: 'startTime', label: '鎺ユ敹鏃堕棿', defaultValue: '', }, { type: 'date-picker', - dataIndex: 'val2', + dataIndex: 'endTime', label: '鑷�', defaultValue: '', }, @@ -148,12 +157,12 @@ }, // 鍒椾俊鎭� columns: [ - { title: '鍗曞彿', field: 'businessFormCode', align: 'center' }, - { title: '鐗╁搧鍚嶇О', field: 'goodsName', align: 'center' }, - { title: '瑙勬牸鍨嬪彿', field: 'baseGoodsModelsName', align: 'center' }, - { title: '鏁伴噺', field: 'counts', align: 'left' }, - { title: '鎺ュ彈鏈烘瀯', field: 'inAgencyName', align: 'left' }, - { title: '鍒涘缓浜�', field: 'operatorName', align: 'left' }, + { title: '鍗曞彿', field: 'businessFormCode', align: 'center', width: 130 }, + { title: '鐗╁搧鍚嶇О', field: 'goodsName', align: 'left', width: 140 }, + { title: '瑙勬牸鍨嬪彿', field: 'baseGoodsModelsName', align: 'left', width: 130 }, + { title: '鏁伴噺', field: 'counts', align: 'center' }, + { title: '鎺ュ彈鏈烘瀯', field: 'inAgencyName', align: 'left', width: 130 }, + { title: '鍒涘缓浜�', field: 'operatorName', align: 'center', width: 90 }, { title: '鐢宠鏃堕棿', field: 'createTime', @@ -172,11 +181,12 @@ return { value: row.inTime ? DateFormatter.LongToDateTime(row.inTime) : '-' }; }, }, - { title: '璋冩嫧鏈烘瀯', field: 'outAgencyName', align: 'left' }, + { title: '璋冩嫧鏈烘瀯', field: 'outAgencyName', align: 'left', width: 130 }, { title: '璋冩嫧浜�', field: 'outOperatorName', align: 'center', + width: 90, formatter: (row) => { return { value: row.outOperatorName || '-' }; }, @@ -194,7 +204,7 @@ // 鎿嶄綔淇℃伅 operation: { show: true, // 鏄剧ず鎿嶄綔鍒� - width: '150', // 鍒楀 + width: 100, // 鍒楀 attr: [ { title: '璇︽儏', @@ -218,22 +228,8 @@ }; }, created() { - this.initSearch(); }, methods: { - initSearch() { - this.items.map(async (item) => { - if (item.label == '瑙勬牸鍨嬪彿') { - let res = await goodsModel(); - item.options = res.map((v) => { - v.label = v.modelName; - v.value = v.id; - return v; - }); - } - return item; - }); - }, showDetail(row) { this.detailSetting.id = row.id; this.detailSetting.info = JSON.stringify(row); @@ -250,12 +246,6 @@ }, fifterForm(params) { this.filterFrom = Object.assign(this.filterFrom, params); - if (this.filterFrom.outAgencyId && this.filterFrom.outAgencyId.length) { - this.filterFrom.outAgencyId = this.filterFrom.outAgencyId[this.filterFrom.outAgencyId.length - 1]; - } - if (this.filterFrom.inAgencyId && this.filterFrom.inAgencyId.length) { - this.filterFrom.inAgencyId = this.filterFrom.inAgencyId[this.filterFrom.inAgencyId.length - 1]; - } if (this.filterFrom.createTimeStart) { this.filterFrom.createTimeStart = this.filterFrom.createTimeStart.replace(/\-/g, ''); } -- Gitblit v1.9.1