|
|
@ -61,7 +61,7 @@ import StepsFormAlone from "@/components/StepsFormAlone" |
|
|
|
import resultStatus from "@/components/resultStatus" |
|
|
|
import currenTableFlex from "@/components/currenTableFlex" |
|
|
|
import {initPrintPackingCodeData} from "@/mixins/printMixin" |
|
|
|
import { getDetailed} from "@/api/wms-api" |
|
|
|
import { getDetailed,getPageList} from "@/api/wms-api" |
|
|
|
import { getOneInventoryLabelByCode} from "@/api/wms-core" |
|
|
|
import _ from "lodash" |
|
|
|
import { mixins } from "@/mixins/mixins" |
|
|
@ -211,7 +211,89 @@ export default { |
|
|
|
details:[this.flexTableData[0]], |
|
|
|
} |
|
|
|
_printData.details[0].packingCode = _printData.details[0].code |
|
|
|
this.Print(initPrintPackingCodeData(_printData)) |
|
|
|
// this.Print(initPrintPackingCodeData(_printData)) |
|
|
|
// 反查供应商物品数据 |
|
|
|
let _supplierCodeInfo = {} |
|
|
|
let _httpNumber = 0 |
|
|
|
_printData.details.forEach(item=>{ |
|
|
|
let _param = { |
|
|
|
condition: { |
|
|
|
filters: [ |
|
|
|
{ |
|
|
|
logic: "And", |
|
|
|
column: "supplierCode", |
|
|
|
action: "==", |
|
|
|
value: item.supplierCode |
|
|
|
}, |
|
|
|
{ |
|
|
|
logic: "And", |
|
|
|
column: "itemCode", |
|
|
|
action: "==", |
|
|
|
value: item.itemCode |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
Sorting: "", |
|
|
|
SkipCount: 0, |
|
|
|
MaxResultCount: 20 |
|
|
|
} |
|
|
|
getPageList(_param, 'basedata/supplier-item').then(res => { |
|
|
|
let _name = item.supplierCode + '_' + item.itemCode |
|
|
|
_supplierCodeInfo[_name] = res.items[0] |
|
|
|
_httpNumber ++ |
|
|
|
if(_httpNumber >= _printData.details.length){ |
|
|
|
this.printAfterGetSupplier(_supplierCodeInfo,_printData) |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
_httpNumber ++ |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
printAfterGetSupplier(supplierCodeInfo,printData){ |
|
|
|
let _itemInfo = {} |
|
|
|
let _itemNumber = 0 |
|
|
|
printData.details.forEach(item=>{ |
|
|
|
// 供应商物品相关信息赋值 |
|
|
|
let _name = item.supplierCode + '_' + item.itemCode |
|
|
|
if((!item.supplierItemCode || item.supplierItemCode == "") && supplierCodeInfo[_name])item.supplierItemCode = supplierCodeInfo[_name].supplierItemCode |
|
|
|
if((!item.supplierItemName || item.supplierItemName == "") && supplierCodeInfo[_name])item.supplierItemName = supplierCodeInfo[_name].itemName |
|
|
|
// 反查规格 |
|
|
|
let _param = { |
|
|
|
condition: { |
|
|
|
filters: [ |
|
|
|
{ |
|
|
|
logic: "And", |
|
|
|
column: "code", |
|
|
|
action: "==", |
|
|
|
value: item.itemCode |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
Sorting: "", |
|
|
|
SkipCount: 0, |
|
|
|
MaxResultCount: 20 |
|
|
|
} |
|
|
|
getPageList(_param, 'basedata/item-basic').then(res => { |
|
|
|
let _one = res.items[0] |
|
|
|
_itemInfo[_one.code] = _one |
|
|
|
_itemNumber ++ |
|
|
|
if(_itemNumber >= printData.details.length){ |
|
|
|
this.printAfterGetItemBasic(_itemInfo,printData) |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
_itemNumber ++ |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
printAfterGetItemBasic(itemInfo,printData){ |
|
|
|
// 基础信息相关数据赋值 |
|
|
|
printData.details.forEach(item=>{ |
|
|
|
if((!item.specifications || item.specifications == "") && itemInfo[item.itemCode])item.specifications = itemInfo[item.itemCode].configuration |
|
|
|
this.Print(initPrintPackingCodeData(printData)) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// //过滤查询条件 |
|
|
|
isFilter (val, data) { |
|
|
|