From aecd64722367eb6b3217c08a43752ffb6d6571a0 Mon Sep 17 00:00:00 2001 From: jishenghua <752718920@qq.com> Date: Thu, 27 Mar 2025 22:22:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E7=9B=B8=E5=85=B3=E5=8D=95=E6=8D=AE?= =?UTF-8?q?=E7=9A=84=E6=89=A9=E5=B1=95=E5=AD=97=E6=AE=B5=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jshERP-web/public/doc/goods_template.xls | Bin 20992 -> 20992 bytes jshERP-web/src/mixins/JeecgListMixin.js | 27 ++++++++++++- .../src/views/material/MaterialList.vue | 25 +----------- jshERP-web/src/views/report/BuyInReport.vue | 12 ++++-- .../src/views/report/InOutStockReport.vue | 14 ++++--- .../src/views/report/RetailOutReport.vue | 12 ++++-- jshERP-web/src/views/report/SaleOutReport.vue | 12 ++++-- .../src/views/report/StockWarningReport.vue | 37 ++++++++++++++++-- 8 files changed, 93 insertions(+), 46 deletions(-) diff --git a/jshERP-web/public/doc/goods_template.xls b/jshERP-web/public/doc/goods_template.xls index d7b40e55118e8cf9791f831297f0c8c5c525ddfc..fda897a7de5b3df5542f9d0e236b3a06235dbaef 100644 GIT binary patch delta 693 zcmY*WO=uHg6r7h`*KU&CO|orcDn*-m(33HZ2v+UZLsNo@vme9G%)S{O-@0q$uF?8+)u_yv z<@D+Y+6Q^~wpyib-clR%jJI|iOol<%Fo|hQ;0kWws=Q}$0X(YZxuPX_MLVvHzuWJ< z*S_}A7{5F^Nd2DPKdqz`(B#Fl=MUi@$^IvN|HK!%!wUnydS2TWLQpY>C`i}?)7Ogl z%lyz8sP3|SSBH*z*wf2X=fpMymj%tSDV{4O)2gsb<=(O4 z8Nd!NV8jTYbB>voY9&UOT<0-5${Fu7_n2D(zD2*PjJ|K KUdqdUdFMCQr+O>^ delta 595 zcmZ`%%}X0m5dTf`x@{6So2a0c)@b!oP}HQT_))Vx7*mpvQg14y;6?C@>LGy?R}k^M zgJMgL9)c%j{{^8J3oWHm@aQd+7EdCAablqx4>J7b>o+s+@#a~3WbM(xywdUQ`;#Bd zr_>1`&Uv*)9ek-Obj+6zdYG+0Myb%Q|uYaCOX8Q2ojk+#xzbw->TVq#r!i9K*Y%a#f)*c%MJW}-$b?}Ll z{BG=rALl_g4j_R28oo|?N)KILhmK^xje`inuBkU*+?gLj$b%A3n-Pj}LG%_E%}BWR zh$ggPnU94l^KWzD`6kJ`0c7BjCnOgK+Hg1L{g-o6ucj1%OXDvZv}y|onh5Yo+G5V% z@c`Kqz3sYWt}B&_AvPok3+e?8f=0o$^Je0mq9PxrI>Pgks5ayT)uIg^%{KK1#k+rN zvS#6}lk~;c+)ujo8z8nGxb%rT8d4 TVrQ3qeHcU(1L$}1*#zAHZYO?g diff --git a/jshERP-web/src/mixins/JeecgListMixin.js b/jshERP-web/src/mixins/JeecgListMixin.js index 1518bdfee..ff5ed860e 100644 --- a/jshERP-web/src/mixins/JeecgListMixin.js +++ b/jshERP-web/src/mixins/JeecgListMixin.js @@ -3,7 +3,7 @@ * 高级查询按钮调用 superQuery方法 高级查询组件ref定义为superQueryModal * data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除 */ -import { filterObj,getNowFormatStr } from '@/utils/util'; +import { filterObj, getMpListShort, getNowFormatStr } from '@/utils/util' import { deleteAction, getAction, postAction, downFile, downFilePost, getFileAccessHttpUrl } from '@/api/manage' import Vue from 'vue' import VueDraggableResizable from 'vue-draggable-resizable' @@ -539,6 +539,31 @@ export const JeecgListMixin = { this.ipagination.total = this.ipagination.total + size } }, + //动态替换扩展字段 + handleChangeOtherField(showQuery) { + let mpStr = getMpListShort(Vue.ls.get('materialPropertyList')) + if(mpStr) { + let mpArr = mpStr.split(',') + if(mpArr.length ===3) { + if(showQuery) { + this.queryTitle.mp1 = mpArr[0] + this.queryTitle.mp2 = mpArr[1] + this.queryTitle.mp3 = mpArr[2] + } + for (let i = 0; i < this.defColumns.length; i++) { + if(this.defColumns[i].dataIndex === 'otherField1') { + this.defColumns[i].title = mpArr[0] + } + if(this.defColumns[i].dataIndex === 'otherField2') { + this.defColumns[i].title = mpArr[1] + } + if(this.defColumns[i].dataIndex === 'otherField3') { + this.defColumns[i].title = mpArr[2] + } + } + } + } + }, paginationChange(page, pageSize) { this.ipagination.current = page this.ipagination.pageSize = pageSize diff --git a/jshERP-web/src/views/material/MaterialList.vue b/jshERP-web/src/views/material/MaterialList.vue index 4aadffd7d..53d475fdd 100644 --- a/jshERP-web/src/views/material/MaterialList.vue +++ b/jshERP-web/src/views/material/MaterialList.vue @@ -364,7 +364,7 @@ this.model = Object.assign({}, {}); this.initColumnsSetting() this.loadTreeData() - this.handleChangeOtherField() + this.handleChangeOtherField(1) }, computed: { importExcelUrl: function () { @@ -397,29 +397,6 @@ Vue.ls.remove('materialColumns') this.initColumnsSetting() }, - //动态替换扩展字段 - handleChangeOtherField() { - let mpStr = getMpListShort(Vue.ls.get('materialPropertyList')) - if(mpStr) { - let mpArr = mpStr.split(',') - if(mpArr.length ===3) { - this.queryTitle.mp1 = mpArr[0] - this.queryTitle.mp2 = mpArr[1] - this.queryTitle.mp3 = mpArr[2] - for (let i = 0; i < this.defColumns.length; i++) { - if(this.defColumns[i].dataIndex === 'otherField1') { - this.defColumns[i].title = mpArr[0] - } - if(this.defColumns[i].dataIndex === 'otherField2') { - this.defColumns[i].title = mpArr[1] - } - if(this.defColumns[i].dataIndex === 'otherField3') { - this.defColumns[i].title = mpArr[2] - } - } - } - } - }, loadTreeData(){ let that = this; let params = {}; diff --git a/jshERP-web/src/views/report/BuyInReport.vue b/jshERP-web/src/views/report/BuyInReport.vue index 81169f7cc..3b742c414 100644 --- a/jshERP-web/src/views/report/BuyInReport.vue +++ b/jshERP-web/src/views/report/BuyInReport.vue @@ -193,7 +193,7 @@ tabKey: "1", pageName: 'buyInReport', // 默认索引 - defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','materialOther','materialUnit', + defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','materialUnit', 'inSum','inSumPrice','outSum','outSumPrice','inOutSumPrice'], // 默认列 defColumns: [ @@ -210,7 +210,9 @@ {title: '颜色', dataIndex: 'materialColor', width: 60, ellipsis:true}, {title: '品牌', dataIndex: 'materialBrand', width: 80, ellipsis:true}, {title: '制造商', dataIndex: 'materialMfrs', width: 80, ellipsis:true}, - {title: '扩展信息', dataIndex: 'materialOther', width: 150, ellipsis:true}, + {title: '扩展1', dataIndex: 'otherField1', width: 80, ellipsis:true}, + {title: '扩展2', dataIndex: 'otherField2', width: 80, ellipsis:true}, + {title: '扩展3', dataIndex: 'otherField3', width: 80, ellipsis:true}, {title: '单位', dataIndex: 'materialUnit', width: 80, ellipsis:true}, {title: '采购数量', dataIndex: 'inSum', sorter: (a, b) => a.inSum - b.inSum, width: 80}, {title: '采购金额', dataIndex: 'inSumPrice', sorter: (a, b) => a.inSumPrice - b.inSumPrice, width: 80}, @@ -229,6 +231,7 @@ this.loadAllOrgaData() this.loadCategoryTreeData() this.initColumnsSetting() + this.handleChangeOtherField(0) }, methods: { moment, @@ -317,12 +320,13 @@ }, exportExcel() { let list = [] - let head = '条码,名称,规格,型号,颜色,品牌,制造商,扩展信息,单位,进货数量,进货金额,退货数量,退货金额,实际采购金额' + let mpStr = getMpListShort(Vue.ls.get('materialPropertyList')) + let head = '条码,名称,规格,型号,颜色,品牌,制造商,' + mpStr + ',单位,进货数量,进货金额,退货数量,退货金额,实际采购金额' for (let i = 0; i < this.dataSource.length; i++) { let item = [] let ds = this.dataSource[i] item.push(ds.barCode, ds.materialName, ds.materialStandard, ds.materialModel, ds.materialColor, ds.materialBrand, - ds.materialMfrs, ds.materialOther, ds.materialUnit, ds.inSum, ds.inSumPrice, ds.outSum, ds.outSumPrice, ds.inOutSumPrice) + ds.materialMfrs, ds.otherField1, ds.otherField2, ds.otherField3, ds.materialUnit, ds.inSum, ds.inSumPrice, ds.outSum, ds.outSumPrice, ds.inOutSumPrice) list.push(item) } let tip = '单据日期:' + this.queryParam.beginTime + '~' + this.queryParam.endTime diff --git a/jshERP-web/src/views/report/InOutStockReport.vue b/jshERP-web/src/views/report/InOutStockReport.vue index 11bdf35f5..5495d2654 100644 --- a/jshERP-web/src/views/report/InOutStockReport.vue +++ b/jshERP-web/src/views/report/InOutStockReport.vue @@ -182,8 +182,8 @@ totalCountMoneyStr: '0', pageName: 'inOutStockReport', // 默认索引 - defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','materialOther','unitName', - 'unitPrice','prevSum','inSum','outSum','thisSum','thisAllPrice'], + defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','unitName','unitPrice', + 'prevSum','inSum','outSum','thisSum','thisAllPrice'], // 默认列 defColumns: [ { @@ -199,7 +199,9 @@ {title: '颜色', dataIndex: 'materialColor', width: 50, ellipsis:true}, {title: '品牌', dataIndex: 'materialBrand', width: 80, ellipsis:true}, {title: '制造商', dataIndex: 'materialMfrs', width: 80, ellipsis:true}, - {title: '扩展信息', dataIndex: 'materialOther', width: 80, ellipsis:true}, + {title: '扩展1', dataIndex: 'otherField1', width: 50, ellipsis:true}, + {title: '扩展2', dataIndex: 'otherField2', width: 50, ellipsis:true}, + {title: '扩展3', dataIndex: 'otherField3', width: 50, ellipsis:true}, {title: '单位', dataIndex: 'unitName', width: 60, ellipsis:true}, {title: '成本价', dataIndex: 'unitPrice', sorter: (a, b) => a.unitPrice - b.unitPrice, width: 60}, {title: '上期结存数量', dataIndex: 'prevSum', sorter: (a, b) => a.prevSum - b.prevSum, width: 80}, @@ -221,6 +223,7 @@ this.loadTreeData() this.getTotalCountMoney() this.initColumnsSetting() + this.handleChangeOtherField(0) }, methods: { moment, @@ -292,12 +295,13 @@ }, exportExcel() { let list = [] - let head = '条码,名称,规格,型号,颜色,品牌,制造商,扩展信息,单位,成本价,上期结存数量,入库数量,出库数量,本期结存数量,结存金额' + let mpStr = getMpListShort(Vue.ls.get('materialPropertyList')) + let head = '条码,名称,规格,型号,颜色,品牌,制造商,' + mpStr + ',单位,成本价,上期结存数量,入库数量,出库数量,本期结存数量,结存金额' for (let i = 0; i < this.dataSource.length; i++) { let item = [] let ds = this.dataSource[i] item.push(ds.barCode, ds.materialName, ds.materialStandard, ds.materialModel, ds.materialColor, ds.materialBrand, - ds.materialMfrs, ds.materialOther, ds.unitName, ds.unitPrice, + ds.materialMfrs, ds.otherField1, ds.otherField2, ds.otherField3, ds.unitName, ds.unitPrice, ds.prevSum, ds.inSum, ds.outSum, ds.thisSum, ds.thisAllPrice) list.push(item) } diff --git a/jshERP-web/src/views/report/RetailOutReport.vue b/jshERP-web/src/views/report/RetailOutReport.vue index 83672a546..1760f8c11 100644 --- a/jshERP-web/src/views/report/RetailOutReport.vue +++ b/jshERP-web/src/views/report/RetailOutReport.vue @@ -195,7 +195,7 @@ tabKey: "1", pageName: 'retailOutReport', // 默认索引 - defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','materialOther','materialUnit', + defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','materialUnit', 'outSum','outSumPrice','inSum','inSumPrice','outInSumPrice'], // 默认列 defColumns: [ @@ -212,7 +212,9 @@ {title: '颜色', dataIndex: 'materialColor', width: 60, ellipsis:true}, {title: '品牌', dataIndex: 'materialBrand', width: 80, ellipsis:true}, {title: '制造商', dataIndex: 'materialMfrs', width: 80, ellipsis:true}, - {title: '扩展信息', dataIndex: 'materialOther', width: 150, ellipsis:true}, + {title: '扩展1', dataIndex: 'otherField1', width: 80, ellipsis:true}, + {title: '扩展2', dataIndex: 'otherField2', width: 80, ellipsis:true}, + {title: '扩展3', dataIndex: 'otherField3', width: 80, ellipsis:true}, {title: '单位', dataIndex: 'materialUnit', width: 80, ellipsis:true}, {title: '零售数量', dataIndex: 'outSum', sorter: (a, b) => a.outSum - b.outSum, width: 80}, {title: '零售金额', dataIndex: 'outSumPrice', sorter: (a, b) => a.outSumPrice - b.outSumPrice, width: 80}, @@ -231,6 +233,7 @@ this.loadAllOrgaData() this.loadCategoryTreeData() this.initColumnsSetting() + this.handleChangeOtherField(0) }, methods: { moment, @@ -319,12 +322,13 @@ }, exportExcel() { let list = [] - let head = '条码,名称,规格,型号,颜色,品牌,制造商,扩展信息,单位,零售数量,零售金额,退货数量,退货金额,实际零售金额' + let mpStr = getMpListShort(Vue.ls.get('materialPropertyList')) + let head = '条码,名称,规格,型号,颜色,品牌,制造商,' + mpStr + ',单位,零售数量,零售金额,退货数量,退货金额,实际零售金额' for (let i = 0; i < this.dataSource.length; i++) { let item = [] let ds = this.dataSource[i] item.push(ds.barCode, ds.materialName, ds.materialStandard, ds.materialModel, ds.materialColor, ds.materialBrand, - ds.materialMfrs, ds.materialOther, ds.materialUnit, ds.outSum, + ds.materialMfrs, ds.otherField1, ds.otherField2, ds.otherField3, ds.materialUnit, ds.outSum, ds.outSumPrice, ds.inSum, ds.inSumPrice, ds.outInSumPrice) list.push(item) } diff --git a/jshERP-web/src/views/report/SaleOutReport.vue b/jshERP-web/src/views/report/SaleOutReport.vue index 5eaa2fb8a..b59088b12 100644 --- a/jshERP-web/src/views/report/SaleOutReport.vue +++ b/jshERP-web/src/views/report/SaleOutReport.vue @@ -193,7 +193,7 @@ tabKey: "1", pageName: 'saleOutReport', // 默认索引 - defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','materialOther','materialUnit', + defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','materialUnit', 'outSum','outSumPrice','inSum','inSumPrice','outInSumPrice'], // 默认列 defColumns: [ @@ -210,7 +210,9 @@ {title: '颜色', dataIndex: 'materialColor', width: 60, ellipsis:true}, {title: '品牌', dataIndex: 'materialBrand', width: 80, ellipsis:true}, {title: '制造商', dataIndex: 'materialMfrs', width: 80, ellipsis:true}, - {title: '扩展信息', dataIndex: 'materialOther', width: 150, ellipsis:true}, + {title: '扩展1', dataIndex: 'otherField1', width: 80, ellipsis:true}, + {title: '扩展2', dataIndex: 'otherField2', width: 80, ellipsis:true}, + {title: '扩展3', dataIndex: 'otherField3', width: 80, ellipsis:true}, {title: '单位', dataIndex: 'materialUnit', width: 80, ellipsis:true}, {title: '销售数量', dataIndex: 'outSum', sorter: (a, b) => a.outSum - b.outSum, width: 80}, {title: '销售金额', dataIndex: 'outSumPrice', sorter: (a, b) => a.outSumPrice - b.outSumPrice, width: 80}, @@ -229,6 +231,7 @@ this.loadAllOrgaData() this.loadCategoryTreeData() this.initColumnsSetting() + this.handleChangeOtherField(0) }, methods: { moment, @@ -319,12 +322,13 @@ }, exportExcel() { let list = [] - let head = '条码,名称,规格,型号,颜色,品牌,制造商,扩展信息,单位,销售数量,销售金额,退货数量,退货金额,实际销售金额' + let mpStr = getMpListShort(Vue.ls.get('materialPropertyList')) + let head = '条码,名称,规格,型号,颜色,品牌,制造商,' + mpStr + ',单位,销售数量,销售金额,退货数量,退货金额,实际销售金额' for (let i = 0; i < this.dataSource.length; i++) { let item = [] let ds = this.dataSource[i] item.push(ds.barCode, ds.materialName, ds.materialStandard, ds.materialModel, ds.materialColor, ds.materialBrand, - ds.materialMfrs, ds.materialOther, ds.materialUnit, ds.outSum, + ds.materialMfrs, ds.otherField1, ds.otherField2, ds.otherField3, ds.materialUnit, ds.outSum, ds.outSumPrice, ds.inSum, ds.inSumPrice, ds.outInSumPrice) list.push(item) } diff --git a/jshERP-web/src/views/report/StockWarningReport.vue b/jshERP-web/src/views/report/StockWarningReport.vue index 906238257..405be0d34 100644 --- a/jshERP-web/src/views/report/StockWarningReport.vue +++ b/jshERP-web/src/views/report/StockWarningReport.vue @@ -143,7 +143,7 @@ tabKey: "1", pageName: 'stockWarningReport', // 默认索引 - defDataIndex:['rowIndex','depotName','barCode','mname','mstandard','mmodel','materialOther','materialUnit','currentNumber', + defDataIndex:['rowIndex','depotName','barCode','mname','mstandard','mmodel','materialUnit','currentNumber', 'lowSafeStock','highSafeStock','lowCritical','highCritical'], // 默认列 defColumns: [ @@ -161,7 +161,9 @@ {title: '颜色', dataIndex: 'mcolor', width: 50, ellipsis:true}, {title: '品牌', dataIndex: 'brand', width: 80, ellipsis:true}, {title: '制造商', dataIndex: 'mmfrs', width: 80, ellipsis:true}, - {title: '扩展信息', dataIndex: 'materialOther', width: 100, ellipsis:true}, + {title: '扩展1', dataIndex: 'motherField1', width: 80, ellipsis:true}, + {title: '扩展2', dataIndex: 'motherField2', width: 80, ellipsis:true}, + {title: '扩展3', dataIndex: 'motherField3', width: 80, ellipsis:true}, {title: '单位', dataIndex: 'materialUnit', width: 60, ellipsis:true}, {title: '库存', dataIndex: 'currentNumber', sorter: (a, b) => a.currentNumber - b.currentNumber, width: 80}, {title: '最低安全库存', dataIndex: 'lowSafeStock', sorter: (a, b) => a.lowSafeStock - b.lowSafeStock, width: 100}, @@ -178,6 +180,7 @@ this.getDepotData() this.loadCategoryTreeData() this.initColumnsSetting() + this.handleChangeOtherField(0) }, methods: { getQueryParams() { @@ -210,14 +213,40 @@ } }) }, + //动态替换扩展字段 + handleChangeOtherField(showQuery) { + let mpStr = getMpListShort(Vue.ls.get('materialPropertyList')) + if(mpStr) { + let mpArr = mpStr.split(',') + if(mpArr.length ===3) { + if(showQuery) { + this.queryTitle.mp1 = mpArr[0] + this.queryTitle.mp2 = mpArr[1] + this.queryTitle.mp3 = mpArr[2] + } + for (let i = 0; i < this.defColumns.length; i++) { + if(this.defColumns[i].dataIndex === 'motherField1') { + this.defColumns[i].title = mpArr[0] + } + if(this.defColumns[i].dataIndex === 'motherField2') { + this.defColumns[i].title = mpArr[1] + } + if(this.defColumns[i].dataIndex === 'motherField3') { + this.defColumns[i].title = mpArr[2] + } + } + } + } + }, exportExcel() { let list = [] - let head = '仓库,条码,名称,规格,型号,颜色,品牌,制造商,扩展信息,单位,库存,最低安全库存,最高安全库存,建议入库量,建议出库量' + let mpStr = getMpListShort(Vue.ls.get('materialPropertyList')) + let head = '仓库,条码,名称,规格,型号,颜色,品牌,制造商,' + mpStr + ',单位,库存,最低安全库存,最高安全库存,建议入库量,建议出库量' for (let i = 0; i < this.dataSource.length; i++) { let item = [] let ds = this.dataSource[i] item.push(ds.depotName, ds.barCode, ds.mname, ds.mstandard, ds.mmodel, ds.mcolor, ds.brand, ds.mmfrs, - ds.materialOther, ds.materialUnit, ds.currentNumber, ds.lowSafeStock, ds.highSafeStock, ds.lowCritical, ds.highCritical) + ds.motherField1, ds.motherField2, ds.motherField3, ds.materialUnit, ds.currentNumber, ds.lowSafeStock, ds.highSafeStock, ds.lowCritical, ds.highCritical) list.push(item) } let tip = '库存预警查询'