Browse Source

打印调取接口获取没有数据问题处理

dev_web_online
安虹睿 2 years ago
parent
commit
b556c39d0e
  1. 2
      fe/PC/src/views/rawMaterialManage/beforeGroundingReturn/beforeGroundingReturnNote.vue
  2. 18
      fe/PC/src/views/rawMaterialManage/purchaseOnShelves/PutawayNote.vue
  3. 23
      fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseReceiptRequest.vue
  4. 2
      fe/PC/src/views/rawMaterialManage/purchaseReturn/returnNote.vue

2
fe/PC/src/views/rawMaterialManage/beforeGroundingReturn/beforeGroundingReturnNote.vue

@ -109,7 +109,7 @@ export default {
if(val == 'print'){ if(val == 'print'){
if((this.propsData.supplierCode) && (!this.propsData.supplierShortName)){ if((this.propsData.supplierCode) && (!this.propsData.supplierShortName)){
getOneSupplierInfoByCode(this.propsData.supplierCode).then(res => { getOneSupplierInfoByCode(this.propsData.supplierCode).then(res => {
this.propsData.supplierShortName = res.shortName || res.name if(res){this.propsData.supplierShortName = res.shortName || res.name}
let data = initPrintAllData(this.propsData,'thd.rdlx','UnqualifiedReason'); let data = initPrintAllData(this.propsData,'thd.rdlx','UnqualifiedReason');
this.Print(data) this.Print(data)
}).catch(err => { }).catch(err => {

18
fe/PC/src/views/rawMaterialManage/purchaseOnShelves/PutawayNote.vue

@ -111,15 +111,17 @@ export default {
getInventoryLabelByCodes(_ids).then(res => { getInventoryLabelByCodes(_ids).then(res => {
this.Loading.appMainLoading = false; this.Loading.appMainLoading = false;
let _printData = JSON.parse(JSON.stringify(this.propsData)) let _printData = JSON.parse(JSON.stringify(this.propsData))
_printData.supplierCode = res[0].supplierCode; if(res && res.length > 0){
_printData.supplierSimpleName = res[0].supplierSimpleName; _printData.supplierCode = res[0].supplierCode;
res.forEach((item)=>{ _printData.supplierSimpleName = res[0].supplierSimpleName;
_printData.details.forEach((item2)=>{ res.forEach((item)=>{
if(item.itemCode == item2.itemCode){ _printData.details.forEach((item2)=>{
item2.supplierItemCode = item.supplierItemCode if(item.itemCode == item2.itemCode){
} item2.supplierItemCode = item.supplierItemCode
}
})
}) })
}) }
let data = initPrintAllData(_printData,'ysd.rdlx'); let data = initPrintAllData(_printData,'ysd.rdlx');
this.Print(data) this.Print(data)
}).catch(err => { }).catch(err => {

23
fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseReceiptRequest.vue

@ -117,16 +117,19 @@ export default {
this.Loading.appMainLoading = true; this.Loading.appMainLoading = true;
getInventoryLabelByCodes(_ids).then(res => { getInventoryLabelByCodes(_ids).then(res => {
this.Loading.appMainLoading = false; this.Loading.appMainLoading = false;
let _printData = { let _printData = {details:[]}
supplierSimpleName:res[0].supplierSimpleName || "", if(res && res.length > 0){
supplierCode:res[0].supplierCode || "", _printData = {
contacts:res[0].contacts || "", supplierSimpleName:res[0].supplierSimpleName || "",
customerAddressCode:res[0].customerAddressCode || "", supplierCode:res[0].supplierCode || "",
remark:res[0].remark || "", contacts:res[0].contacts || "",
planArriveDate:res[0].planArriveDate || "", customerAddressCode:res[0].customerAddressCode || "",
poNumber:res[0].poNumber || "", remark:res[0].remark || "",
asnNumber:res[0].asnNumber || "", planArriveDate:res[0].planArriveDate || "",
details:[], poNumber:res[0].poNumber || "",
asnNumber:res[0].asnNumber || "",
details:[],
}
} }
res.forEach(item=>{ res.forEach(item=>{
item.packingCode = item.code item.packingCode = item.code

2
fe/PC/src/views/rawMaterialManage/purchaseReturn/returnNote.vue

@ -109,7 +109,7 @@ export default {
if(val == 'print'){ if(val == 'print'){
if((this.propsData.supplierCode) && (!this.propsData.supplierShortName)){ if((this.propsData.supplierCode) && (!this.propsData.supplierShortName)){
getOneSupplierInfoByCode(this.propsData.supplierCode).then(res => { getOneSupplierInfoByCode(this.propsData.supplierCode).then(res => {
this.propsData.supplierShortName = res.shortName || res.name if(res){this.propsData.supplierShortName = res.shortName || res.name}
let data = initPrintAllData(this.propsData,'thd.rdlx','PurReturnReason'); let data = initPrintAllData(this.propsData,'thd.rdlx','PurReturnReason');
this.Print(data) this.Print(data)
}).catch(err => { }).catch(err => {

Loading…
Cancel
Save