给采购入库增加列设置
This commit is contained in:
parent
fa407541f9
commit
705bb3273b
@ -119,6 +119,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">
|
||||
@ -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()
|
||||
|
||||
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user