|
|
@ -53,7 +53,7 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import { getDetailed,purRecNoteCustomInfo } from '@/api/wms-api' |
|
|
|
import { getDetailed,purRecNoteCustomInfo,getOneSupplierInfoByCode } from '@/api/wms-api' |
|
|
|
import { getImgsDetailPopData,Enum } from "@/utils/index" |
|
|
|
import { tableMixins } from "@/mixins/TableMixins" |
|
|
|
import { LoadingMixins } from "@/mixins/LoadingMixins" |
|
|
@ -193,44 +193,60 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
toPrintHttp(callback){ |
|
|
|
if((this.propsData.supplierCode) && (!this.propsData.supplierShortName)){ |
|
|
|
getOneSupplierInfoByCode(this.propsData.supplierCode).then(res => { |
|
|
|
this.propsData.supplierShortName = res.shortName || res.name |
|
|
|
callback() |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
callback() |
|
|
|
} |
|
|
|
}, |
|
|
|
drawerbutton (val) { |
|
|
|
// 打印收货单(合格品收货明细显示) |
|
|
|
if(val == 'print-shd'){ |
|
|
|
let _printData = JSON.parse(JSON.stringify(this.propsData)) |
|
|
|
_printData.details = [] |
|
|
|
let _hg=[],_no=[] |
|
|
|
this.propsData.details.forEach(item => { |
|
|
|
if(item.purchaseReceiptInspectStatus == 2){ |
|
|
|
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) |
|
|
|
// } |
|
|
|
}); |
|
|
|
_printData.details = _hg.concat(_no); |
|
|
|
let data = initPrintAllData(_printData,'cgshd.rdlx'); |
|
|
|
this.Print(data) |
|
|
|
this.toPrintHttp(()=>{ |
|
|
|
let _printData = JSON.parse(JSON.stringify(this.propsData)) |
|
|
|
_printData.details = [] |
|
|
|
let _hg=[],_no=[] |
|
|
|
this.propsData.details.forEach(item => { |
|
|
|
if(item.purchaseReceiptInspectStatus == 2){ |
|
|
|
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) |
|
|
|
// } |
|
|
|
}); |
|
|
|
_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" |
|
|
|
this.toPrintHttp(()=>{ |
|
|
|
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) |
|
|
|
let data = initPrintAllData(_printData,'thd.rdlx','UnqualifiedReason',_option); |
|
|
|
this.Print(data) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 明细table按钮 |
|
|
|