部分完成的单据的查看页面里面的扩展信息如果没有值,进行隐藏
This commit is contained in:
@@ -1698,6 +1698,10 @@
|
|||||||
if(ds[i].remark) {
|
if(ds[i].remark) {
|
||||||
needAddkeywords.push('remark')
|
needAddkeywords.push('remark')
|
||||||
}
|
}
|
||||||
|
if(record.status === '3' || record.purchaseStatus === '3') {
|
||||||
|
//部分采购|部分销售|销售订单转采购订单的场景
|
||||||
|
needAddkeywords.push('finishNumber')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let currentCol = [{title:'#',dataIndex:'',align:'center',
|
let currentCol = [{title:'#',dataIndex:'',align:'center',
|
||||||
customRender:function(t,r,index){
|
customRender:function(t,r,index){
|
||||||
@@ -1709,60 +1713,40 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
if(record.status === '3') {
|
for(let i=0; i<this.defColumns.length; i++){
|
||||||
//部分采购|部分销售的时候显示全部列
|
//移除列
|
||||||
for(let i=0; i<this.defColumns.length; i++){
|
let needRemoveKeywords = ['finishNumber','snList','batchNumber','expirationDate','sku','weight','position',
|
||||||
currentCol.push(this.defColumns[i])
|
'brand','mfrs','otherField1','otherField2','otherField3','taxRate','remark']
|
||||||
}
|
if(needRemoveKeywords.indexOf(this.defColumns[i].dataIndex)===-1) {
|
||||||
this.columns = currentCol
|
|
||||||
} else if(record.purchaseStatus === '3') {
|
|
||||||
//将已出库的标题转为已采购,针对销售订单转采购订单的场景
|
|
||||||
for(let i=0; i<this.defColumns.length; i++){
|
|
||||||
let info = {}
|
let info = {}
|
||||||
info.title = this.defColumns[i].title
|
info.title = this.defColumns[i].title
|
||||||
info.dataIndex = this.defColumns[i].dataIndex
|
info.dataIndex = this.defColumns[i].dataIndex
|
||||||
if(this.defColumns[i].width) {
|
if(this.defColumns[i].width) {
|
||||||
info.width = this.defColumns[i].width
|
info.width = this.defColumns[i].width
|
||||||
}
|
}
|
||||||
if(this.defColumns[i].dataIndex === 'finishNumber') {
|
|
||||||
info.title = '已采购'
|
|
||||||
}
|
|
||||||
if(this.defColumns[i].dataIndex === 'barCode') {
|
if(this.defColumns[i].dataIndex === 'barCode') {
|
||||||
info.scopedSlots = { customRender: 'customBarCode' }
|
info.scopedSlots = { customRender: 'customBarCode' }
|
||||||
}
|
}
|
||||||
currentCol.push(info)
|
currentCol.push(info)
|
||||||
}
|
}
|
||||||
this.columns = currentCol
|
//添加有数据的列
|
||||||
} else {
|
if(needAddkeywords.indexOf(this.defColumns[i].dataIndex)>-1) {
|
||||||
for(let i=0; i<this.defColumns.length; i++){
|
let info = {}
|
||||||
//移除列
|
info.title = this.defColumns[i].title
|
||||||
let needRemoveKeywords = ['finishNumber','snList','batchNumber','expirationDate','sku','weight','position',
|
info.dataIndex = this.defColumns[i].dataIndex
|
||||||
'brand','mfrs','otherField1','otherField2','otherField3','taxRate','remark']
|
if(this.defColumns[i].width) {
|
||||||
if(needRemoveKeywords.indexOf(this.defColumns[i].dataIndex)===-1) {
|
info.width = this.defColumns[i].width
|
||||||
let info = {}
|
|
||||||
info.title = this.defColumns[i].title
|
|
||||||
info.dataIndex = this.defColumns[i].dataIndex
|
|
||||||
if(this.defColumns[i].width) {
|
|
||||||
info.width = this.defColumns[i].width
|
|
||||||
}
|
|
||||||
if(this.defColumns[i].dataIndex === 'barCode') {
|
|
||||||
info.scopedSlots = { customRender: 'customBarCode' }
|
|
||||||
}
|
|
||||||
currentCol.push(info)
|
|
||||||
}
|
}
|
||||||
//添加有数据的列
|
if(record.purchaseStatus === '3') {
|
||||||
if(needAddkeywords.indexOf(this.defColumns[i].dataIndex)>-1) {
|
//将已出库的标题转为已采购,针对销售订单转采购订单的场景
|
||||||
let info = {}
|
if(this.defColumns[i].dataIndex === 'finishNumber') {
|
||||||
info.title = this.defColumns[i].title
|
info.title = '已采购'
|
||||||
info.dataIndex = this.defColumns[i].dataIndex
|
|
||||||
if(this.defColumns[i].width) {
|
|
||||||
info.width = this.defColumns[i].width
|
|
||||||
}
|
}
|
||||||
currentCol.push(info)
|
|
||||||
}
|
}
|
||||||
|
currentCol.push(info)
|
||||||
}
|
}
|
||||||
this.columns = currentCol
|
|
||||||
}
|
}
|
||||||
|
this.columns = currentCol
|
||||||
},
|
},
|
||||||
//动态替换扩展字段
|
//动态替换扩展字段
|
||||||
handleChangeOtherField() {
|
handleChangeOtherField() {
|
||||||
|
|||||||
Reference in New Issue
Block a user