优化单据中采购进度列的显示和隐藏逻辑

This commit is contained in:
季圣华
2022-05-18 22:54:38 +08:00
parent f005d48f93
commit fa48c8345b

View File

@@ -259,12 +259,18 @@
getCurrentSystemConfig().then((res) => {
if(res.code === 200 && res.data){
let purchaseBySaleFlag = res.data.purchaseBySaleFlag
let statusIndex = 0
for(let i=0; i<this.columns.length; i++){
if(this.columns[i].dataIndex === 'purchaseStatus') {
statusIndex = i
}
}
if(purchaseBySaleFlag === "0") {
if(this.columns.length === 10) {
this.columns.splice(8, 1)
if(statusIndex>0) {
this.columns.splice(statusIndex, 1)
}
} else {
if(this.columns.length<10) {
if(statusIndex===0) {
let purchaseStatusObj = { title: '采购进度', dataIndex: 'purchaseStatus', width: 70, align: "center",
scopedSlots: { customRender: 'customRenderPurchaseStatus' }
}