|
|
@ -70,6 +70,15 @@ export default { |
|
|
|
TableHeaderMixins, |
|
|
|
mixins, |
|
|
|
], |
|
|
|
computed: { |
|
|
|
hideButton: function () { |
|
|
|
return function (val) { |
|
|
|
let data = true |
|
|
|
if(this.firstTabs == val){data = false} |
|
|
|
return data |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
data () { |
|
|
|
return { |
|
|
|
URL: 'wms/store/purchase-receipt-note', |
|
|
@ -90,7 +99,16 @@ export default { |
|
|
|
icon: 'el-icon-printer', |
|
|
|
label: '打印收货单', |
|
|
|
hide: false, |
|
|
|
name: "print", |
|
|
|
hide: () => { return this.hideButton('hgpshmx') }, |
|
|
|
name: "print-shd", |
|
|
|
size: 'mini' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'info', |
|
|
|
icon: 'el-icon-printer', |
|
|
|
label: '打印退货单', |
|
|
|
name: "print-thd", |
|
|
|
hide: () => { return this.hideButton('bhgpshmx') }, |
|
|
|
size: 'mini' |
|
|
|
}, |
|
|
|
], |
|
|
@ -176,8 +194,8 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
drawerbutton (val) { |
|
|
|
// 打印 |
|
|
|
if(val == 'print'){ |
|
|
|
// 打印收货单(合格品收货明细显示) |
|
|
|
if(val == 'print-shd'){ |
|
|
|
let _printData = JSON.parse(JSON.stringify(this.propsData)) |
|
|
|
_printData.details = [] |
|
|
|
let _hg=[],_no=[] |
|
|
@ -186,16 +204,34 @@ export default { |
|
|
|
item.statusStr = "合格" |
|
|
|
item.reasonStr = "" |
|
|
|
_hg.push(item) |
|
|
|
}else if(item.purchaseReceiptInspectStatus == 3){ |
|
|
|
item.statusStr = "不合格" |
|
|
|
item.reasonStr = Enum(this.$store.getters.dictionaries.UnqualifiedReason, item.failedReason , 'label') |
|
|
|
_no.push(item) |
|
|
|
} |
|
|
|
// else if(item.purchaseReceiptInspectStatus == 3){ |
|
|
|
// item.statusStr = "不合格" |
|
|
|
// item.reasonStr = Enum(this.$store.getters.dictionaries.UnqualifiedReason, item.failedReason , 'label') |
|
|
|
// _no.push(item) |
|
|
|
// } |
|
|
|
}); |
|
|
|
_printData.details = _hg.concat(_no); |
|
|
|
let data = initPrintAllData(_printData,'cgshd.rdlx'); |
|
|
|
this.Print(data) |
|
|
|
} |
|
|
|
// 打印退货单(不合格品收货明细显示) |
|
|
|
if(val == 'print-thd'){ |
|
|
|
let _printData = JSON.parse(JSON.stringify(this.propsData)) |
|
|
|
_printData.details = [] |
|
|
|
this.propsData.details.forEach(item => { |
|
|
|
if(item.purchaseReceiptInspectStatus == 3){ |
|
|
|
_printData.details.push(item) |
|
|
|
} |
|
|
|
}); |
|
|
|
let _option = { |
|
|
|
details:{ |
|
|
|
reason:"failedReason" |
|
|
|
} |
|
|
|
} |
|
|
|
let data = initPrintAllData(_printData,'thd.rdlx','UnqualifiedReason',_option); |
|
|
|
this.Print(data) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 明细table按钮 |
|
|
|
currenDrawerButtonClick(row){ |
|
|
|