将销售订单改为默认不显示采购状态
This commit is contained in:
@@ -242,17 +242,18 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getSystemConfig() {
|
getSystemConfig() {
|
||||||
getCurrentSystemConfig().then((res) => {
|
|
||||||
if(res.code === 200 && res.data){
|
|
||||||
let purchaseBySaleFlag = res.data.purchaseBySaleFlag
|
|
||||||
let statusIndex = 0
|
let statusIndex = 0
|
||||||
for(let i=0; i<this.columns.length; i++){
|
for(let i=0; i<this.columns.length; i++){
|
||||||
if(this.columns[i].dataIndex === 'purchaseStatus') {
|
if(this.columns[i].dataIndex === 'purchaseStatus') {
|
||||||
statusIndex = i
|
statusIndex = i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
getCurrentSystemConfig().then((res) => {
|
||||||
|
if(res.code === 200 && res.data){
|
||||||
|
let purchaseBySaleFlag = res.data.purchaseBySaleFlag
|
||||||
if(purchaseBySaleFlag === "0") {
|
if(purchaseBySaleFlag === "0") {
|
||||||
if(statusIndex>0) {
|
if(statusIndex>0) {
|
||||||
|
//移除采购进度列
|
||||||
this.columns.splice(statusIndex, 1)
|
this.columns.splice(statusIndex, 1)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -260,9 +261,15 @@
|
|||||||
let purchaseStatusObj = { title: '采购进度', dataIndex: 'purchaseStatus', width: 70, align: "center",
|
let purchaseStatusObj = { title: '采购进度', dataIndex: 'purchaseStatus', width: 70, align: "center",
|
||||||
scopedSlots: { customRender: 'customRenderPurchaseStatus' }
|
scopedSlots: { customRender: 'customRenderPurchaseStatus' }
|
||||||
}
|
}
|
||||||
this.columns.splice(8, 0, purchaseStatusObj)
|
//添加采购进度列
|
||||||
|
this.columns.splice(statusIndex-1, 0, purchaseStatusObj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if(statusIndex>0) {
|
||||||
|
//移除采购进度列
|
||||||
|
this.columns.splice(statusIndex, 1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -211,7 +211,7 @@
|
|||||||
prefixNo: 'CGDD',
|
prefixNo: 'CGDD',
|
||||||
fileList:[],
|
fileList:[],
|
||||||
rowCanEdit: true,
|
rowCanEdit: true,
|
||||||
purchaseBySaleFlag: true,
|
purchaseBySaleFlag: false,
|
||||||
model: {},
|
model: {},
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
|
|||||||
Reference in New Issue
Block a user