From 705bb3273bc46fcec7f6f4bdf7a08c0e90eb8bcb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com>
Date: Tue, 8 Aug 2023 00:40:13 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=97=E8=AE=BE=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jshERP-web/src/views/bill/PurchaseInList.vue | 48 ++++++++++++++++++-
.../src/views/bill/mixins/BillListMixin.js | 25 ++++++++++
2 files changed, 71 insertions(+), 2 deletions(-)
diff --git a/jshERP-web/src/views/bill/PurchaseInList.vue b/jshERP-web/src/views/bill/PurchaseInList.vue
index 13c073cf..8d44f52b 100644
--- a/jshERP-web/src/views/bill/PurchaseInList.vue
+++ b/jshERP-web/src/views/bill/PurchaseInList.vue
@@ -119,6 +119,29 @@
批量操作
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 恢复默认列配置:恢复默认
+
+
+
+
+ 列设置
+
@@ -181,6 +204,7 @@
import BillDetail from './dialog/BillDetail'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { BillListMixin } from './mixins/BillListMixin'
+ import JEllipsis from '@/components/jeecg/JEllipsis'
import JDate from '@/components/jeecg/JDate'
import Vue from 'vue'
export default {
@@ -189,6 +213,7 @@
components: {
PurchaseInModal,
BillDetail,
+ JEllipsis,
JDate
},
data () {
@@ -217,8 +242,15 @@
span: 18,
offset: 1
},
- // 表头
- columns: [
+ // 实际索引
+ settingDataIndex:[],
+ // 默认索引
+ defDataIndex:['action','organName','number','materialsList','operTimeStr','userName','materialCount','totalPrice','totalTaxLastMoney',
+ 'needInMoney','changeAmount','debt','status'],
+ // 实际列
+ columns:[],
+ // 默认列
+ defColumns: [
{
title: '操作',
dataIndex: 'action',
@@ -233,6 +265,7 @@
return text
}
},
+ { title: '关联订单', dataIndex: 'linkNumber',width:140},
{ title: '商品信息', dataIndex: 'materialsList',width:220, ellipsis:true,
customRender:function (text,record,index) {
if(text) {
@@ -249,16 +282,26 @@
return (record.discountMoney + record.discountLastMoney).toFixed(2);
}
},
+ { title: '优惠率', dataIndex: 'discount',width:60,
+ customRender:function (text,record,index) {
+ return text? text + '%':''
+ }
+ },
+ { title: '付款优惠', dataIndex: 'discountMoney',width:80},
+ { title: '其它费用', dataIndex: 'otherMoney',width:80},
{ title: '待付金额', dataIndex: 'needInMoney',width:80,
customRender:function (text,record,index) {
let needInMoney = record.discountLastMoney + record.otherMoney - record.deposit
return needInMoney? needInMoney.toFixed(2):0
}
},
+ { title: '结算账户', dataIndex: 'accountName',width:80},
+ { title: '扣除订金', dataIndex: 'deposit',width:80},
{ title: '付款', dataIndex: 'changeAmount',width:60},
{ title: '欠款', dataIndex: 'debt',width:60,
scopedSlots: { customRender: 'customRenderDebt' }
},
+ { title: '备注', dataIndex: 'remark',width:200},
{ title: '状态', dataIndex: 'status', width: 80, align: "center",
scopedSlots: { customRender: 'customRenderStatus' }
}
@@ -274,6 +317,7 @@
computed: {
},
created () {
+ this.initColumnsSetting()
this.initSystemConfig()
this.initSupplier()
this.getDepotData()
diff --git a/jshERP-web/src/views/bill/mixins/BillListMixin.js b/jshERP-web/src/views/bill/mixins/BillListMixin.js
index 0f67f86b..dae342f9 100644
--- a/jshERP-web/src/views/bill/mixins/BillListMixin.js
+++ b/jshERP-web/src/views/bill/mixins/BillListMixin.js
@@ -165,5 +165,30 @@ export const BillListMixin = {
}
})
},
+ //加载初始化列
+ initColumnsSetting(){
+ let columnsStr = Vue.ls.get(this.prefixNo)
+ 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.prefixNo, columnsStr)
+ },
+ //恢复默认
+ handleRestDefault() {
+ Vue.ls.remove(this.prefixNo)
+ this.initColumnsSetting()
+ }
}
}
\ No newline at end of file