From 3ee1eeaff2c351bdeaf83a21a796c6eab6c46758 Mon Sep 17 00:00:00 2001
From: jishenghua <752718920@qq.com>
Date: Fri, 16 Aug 2024 00:42:24 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E5=85=A5=E5=BA=93=E6=98=8E=E7=BB=86?=
=?UTF-8?q?=E5=92=8C=E5=87=BA=E5=BA=93=E6=98=8E=E7=BB=86=E6=8A=A5=E8=A1=A8?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=97=E7=9A=84=E6=98=BE=E7=A4=BA=E9=9A=90?=
=?UTF-8?q?=E8=97=8F=E8=AE=BE=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jshERP-web/src/mixins/JeecgListMixin.js | 29 ++++++++++++++++
jshERP-web/src/views/report/InDetail.vue | 42 ++++++++++++++++++++---
jshERP-web/src/views/report/OutDetail.vue | 42 ++++++++++++++++++++---
3 files changed, 103 insertions(+), 10 deletions(-)
diff --git a/jshERP-web/src/mixins/JeecgListMixin.js b/jshERP-web/src/mixins/JeecgListMixin.js
index 239112007..6b2211ff3 100644
--- a/jshERP-web/src/mixins/JeecgListMixin.js
+++ b/jshERP-web/src/mixins/JeecgListMixin.js
@@ -25,6 +25,10 @@ export const JeecgListMixin = {
queryParam: {},
/* 数据源 */
dataSource:[],
+ // 实际列
+ columns:[],
+ // 实际索引
+ settingDataIndex:[],
/* 分页参数 */
ipagination:{
current: 1,
@@ -287,6 +291,31 @@ export const JeecgListMixin = {
this.$refs.modalDetail.show(record, type, prefixNo);
this.$refs.modalDetail.title=type+"-详情";
},
+ //加载初始化列
+ initColumnsSetting(){
+ let columnsStr = Vue.ls.get(this.pageName)
+ if(columnsStr && columnsStr.indexOf(',')>-1) {
+ this.settingDataIndex = columnsStr.split(',')
+ } else {
+ this.settingDataIndex = this.defDataIndex
+ }
+ this.columns = this.defColumns.filter(item => {
+ return this.settingDataIndex.includes(item.dataIndex)
+ })
+ },
+ //列设置更改事件
+ onColChange (checkedValues) {
+ this.columns = this.defColumns.filter(item => {
+ return checkedValues.includes(item.dataIndex)
+ })
+ let columnsStr = checkedValues.join()
+ Vue.ls.set(this.pageName, columnsStr)
+ },
+ //恢复默认
+ handleRestDefault() {
+ Vue.ls.remove(this.pageName)
+ this.initColumnsSetting()
+ },
/* 导出 */
handleExportXls2(){
let paramsStr = encodeURI(JSON.stringify(this.getQueryParams()));
diff --git a/jshERP-web/src/views/report/InDetail.vue b/jshERP-web/src/views/report/InDetail.vue
index 05d3a0d62..d62f207be 100644
--- a/jshERP-web/src/views/report/InDetail.vue
+++ b/jshERP-web/src/views/report/InDetail.vue
@@ -108,6 +108,32 @@
:scroll="scroll"
:loading="loading"
@change="handleTableChange">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 恢复默认列配置:恢复默认
+
+
+
+
+
+
+
{{record.number}}
@@ -187,10 +213,14 @@
operNumberTotalStr: '0',
allPriceTotalStr: '0',
tabKey: "1",
- // 表头
- columns: [
+ pageName: 'inDetail',
+ // 默认索引
+ defDataIndex:['rowIndex','number','barCode','mname','standard','model','mUnit','operNumber', 'unitPrice','allPrice',
+ 'taxRate','taxMoney','sname','dname','operTime','newRemark'],
+ // 默认列
+ defColumns: [
{
- title: '#', dataIndex: 'rowIndex', width:40, align:"center",
+ dataIndex: 'rowIndex', width:40, align:"center", slots: { title: 'customTitle' },
customRender:function (t,r,index) {
return (t !== '合计') ? (parseInt(index) + 1) : t
}
@@ -204,6 +234,7 @@
{title: '规格', dataIndex: 'standard', width: 60, ellipsis:true},
{title: '型号', dataIndex: 'model', width: 60, ellipsis:true},
{title: '单位', dataIndex: 'mUnit', width: 50, ellipsis:true},
+ {title: '多属性', dataIndex: 'sku', width: 100, ellipsis:true},
{title: '数量', dataIndex: 'operNumber', sorter: (a, b) => a.operNumber - b.operNumber, width: 60},
{title: '单价', dataIndex: 'unitPrice', sorter: (a, b) => a.unitPrice - b.unitPrice, width: 60},
{title: '金额', dataIndex: 'allPrice', sorter: (a, b) => a.allPrice - b.allPrice, width: 60},
@@ -224,6 +255,7 @@
this.initSupplier()
this.initUser()
this.loadAllOrgaData()
+ this.initColumnsSetting()
},
methods: {
moment,
@@ -311,11 +343,11 @@
},
exportExcel() {
let list = []
- let head = '单据编号,条码,名称,规格,型号,单位,数量,单价,金额,税率(%),税额,往来单位,仓库,入库日期,备注'
+ let head = '单据编号,条码,名称,规格,型号,单位,多属性,数量,单价,金额,税率(%),税额,往来单位,仓库,入库日期,备注'
for (let i = 0; i < this.dataSource.length; i++) {
let item = []
let ds = this.dataSource[i]
- item.push(ds.number, ds.barCode, ds.mname, ds.standard, ds.model, ds.mUnit, ds.operNumber, ds.unitPrice,
+ item.push(ds.number, ds.barCode, ds.mname, ds.standard, ds.model, ds.mUnit, ds.sku, ds.operNumber, ds.unitPrice,
ds.allPrice, ds.taxRate, ds.taxMoney, ds.sname, ds.dname, ds.operTime, ds.newRemark)
list.push(item)
}
diff --git a/jshERP-web/src/views/report/OutDetail.vue b/jshERP-web/src/views/report/OutDetail.vue
index 6cb5db3fb..a3188d2eb 100644
--- a/jshERP-web/src/views/report/OutDetail.vue
+++ b/jshERP-web/src/views/report/OutDetail.vue
@@ -108,6 +108,32 @@
:scroll="scroll"
:loading="loading"
@change="handleTableChange">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 恢复默认列配置:恢复默认
+
+
+
+
+
+
+
{{record.number}}
@@ -187,10 +213,14 @@
operNumberTotalStr: '0',
allPriceTotalStr: '0',
tabKey: "1",
- // 表头
- columns: [
+ pageName: 'outDetail',
+ // 默认索引
+ defDataIndex:['rowIndex','number','barCode','mname','standard','model','mUnit','operNumber', 'unitPrice','allPrice',
+ 'taxRate','taxMoney','sname','dname','operTime','newRemark'],
+ // 默认列
+ defColumns: [
{
- title: '#', dataIndex: 'rowIndex', width:40, align:"center",
+ dataIndex: 'rowIndex', width:40, align:"center", slots: { title: 'customTitle' },
customRender:function (t,r,index) {
return (t !== '合计') ? (parseInt(index) + 1) : t
}
@@ -204,6 +234,7 @@
{title: '规格', dataIndex: 'standard', width: 60, ellipsis:true},
{title: '型号', dataIndex: 'model', width: 60, ellipsis:true},
{title: '单位', dataIndex: 'mUnit', width: 50, ellipsis:true},
+ {title: '多属性', dataIndex: 'sku', width: 100, ellipsis:true},
{title: '数量', dataIndex: 'operNumber', sorter: (a, b) => a.operNumber - b.operNumber, width: 60},
{title: '单价', dataIndex: 'unitPrice', sorter: (a, b) => a.unitPrice - b.unitPrice, width: 60},
{title: '金额', dataIndex: 'allPrice', sorter: (a, b) => a.allPrice - b.allPrice, width: 60},
@@ -224,6 +255,7 @@
this.initSupplier()
this.initUser()
this.loadAllOrgaData()
+ this.initColumnsSetting()
},
methods: {
moment,
@@ -311,11 +343,11 @@
},
exportExcel() {
let list = []
- let head = '单据编号,条码,名称,规格,型号,单位,数量,单价,金额,税率(%),税额,往来单位,仓库,出库日期,备注'
+ let head = '单据编号,条码,名称,规格,型号,单位,多属性,数量,单价,金额,税率(%),税额,往来单位,仓库,出库日期,备注'
for (let i = 0; i < this.dataSource.length; i++) {
let item = []
let ds = this.dataSource[i]
- item.push(ds.number, ds.barCode, ds.mname, ds.standard, ds.model, ds.mUnit, ds.operNumber, ds.unitPrice,
+ item.push(ds.number, ds.barCode, ds.mname, ds.standard, ds.model, ds.mUnit, ds.sku, ds.operNumber, ds.unitPrice,
ds.allPrice, ds.taxRate, ds.taxMoney, ds.sname, ds.dname, ds.operTime, ds.newRemark)
list.push(item)
}