给全部单据增加列设置的功能

This commit is contained in:
季圣华
2023-08-09 00:18:00 +08:00
parent 705bb3273b
commit 28a2610b16
14 changed files with 447 additions and 50 deletions

View File

@@ -111,6 +111,29 @@
批量操作 <a-icon type="down" />
</a-button>
</a-dropdown>
<a-popover trigger="click" placement="right">
<template slot="content">
<a-checkbox-group @change="onColChange" v-model="settingDataIndex" :defaultValue="settingDataIndex">
<a-row style="width: 500px">
<template v-for="(item,index) in defColumns">
<template>
<a-col :span="8">
<a-checkbox :value="item.dataIndex">
<j-ellipsis :value="item.title" :length="10"></j-ellipsis>
</a-checkbox>
</a-col>
</template>
</template>
</a-row>
<a-row style="padding-top: 10px;">
<a-col>
恢复默认列配置:<a-button @click="handleRestDefault" type="link" size="small">恢复默认</a-button>
</a-col>
</a-row>
</a-checkbox-group>
</template>
<a-button icon="setting">列设置</a-button>
</a-popover>
<a-tooltip placement="left" title="用于零售出库单据的退货零售退货单可以由零售出库单转过来也可以单独创建" slot="action">
<a-icon v-if="btnEnableList.indexOf(1)>-1" type="question-circle" style="font-size:20px;float:right;" />
</a-tooltip>
@@ -162,6 +185,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 {
@@ -170,6 +194,7 @@
components: {
RetailBackModal,
BillDetail,
JEllipsis,
JDate
},
data () {
@@ -197,12 +222,15 @@
span: 18,
offset: 1
},
// 表头
columns: [
// 默认索引
defDataIndex:['action','organName','number','materialsList','operTimeStr','userName','materialCount','totalPrice','getAmount',
'backAmount','status'],
// 默认列
defColumns: [
{
title: '操作',
dataIndex: 'action',
align:"center", width: 150,
align:"center", width: 180,
scopedSlots: { customRender: 'action' },
},
{ title: '会员', dataIndex: 'organName',width:120, ellipsis:true},
@@ -212,6 +240,7 @@
return text
}
},
{ title: '关联单据', dataIndex: 'linkNumber',width:140},
{ title: '商品信息', dataIndex: 'materialsList',width:220, ellipsis:true,
customRender:function (text,record,index) {
if(text) {
@@ -233,6 +262,8 @@
}
},
{ title: '找零', dataIndex: 'backAmount',width:50},
{ title: '付款账户', dataIndex: 'accountName',width:80},
{ title: '备注', dataIndex: 'remark',width:200},
{ title: '状态', dataIndex: 'status', width: 80, align: "center",
scopedSlots: { customRender: 'customRenderStatus' }
}