|
@ -49,10 +49,10 @@ |
|
|
<view class="page-footer"> |
|
|
<view class="page-footer"> |
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<locationCompare title="收货库位" :isShowEdit="jobContent.allowModifyLocation=='TRUE'" :recommendLocationCode="jobToLocationCode" |
|
|
<locationCompare title="收货库位" :isShowEdit="jobContent.allowModifyLocation=='TRUE'" |
|
|
:locationCode="toLocationCode" @getLocation='scanLocationCode' |
|
|
:recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode" |
|
|
:locationTypeList="toLocationTypeList"></locationCompare> |
|
|
@getLocation='scanLocationCode' :locationTypeList="toLocationTypeList"></locationCompare> |
|
|
</view> |
|
|
</view> |
|
|
<view class=" uni-flex uni-row"> |
|
|
<view class=" uni-flex uni-row"> |
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
|
@ -75,8 +75,10 @@ |
|
|
getProductReceiptJobDetail, |
|
|
getProductReceiptJobDetail, |
|
|
takeProductReceiptJob, |
|
|
takeProductReceiptJob, |
|
|
cancleTakeProductReceiptJob, |
|
|
cancleTakeProductReceiptJob, |
|
|
productReceiptJobsubmit, |
|
|
productReceiptJobsubmit, |
|
|
getPrintProductReceiptList |
|
|
getPrintProductReceiptList, |
|
|
|
|
|
getBalanceToPackage, |
|
|
|
|
|
batchPrintingLable |
|
|
} from '@/api/request2.js'; |
|
|
} from '@/api/request2.js'; |
|
|
import { |
|
|
import { |
|
|
goHome, |
|
|
goHome, |
|
@ -288,10 +290,10 @@ |
|
|
pack.handleQty = calc.add(pack.handleQty, fg.qty); |
|
|
pack.handleQty = calc.add(pack.handleQty, fg.qty); |
|
|
// item.qty = calc.add(item.qty, detail.qty); |
|
|
// item.qty = calc.add(item.qty, detail.qty); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
// 扫满箱后应该自动提交 |
|
|
// 扫满箱后应该自动提交 |
|
|
if(pack.scaned&&pack.qty==pack.fgList.length){ |
|
|
if (pack.scaned && pack.qty == pack.fgList.length) { |
|
|
this.commit() |
|
|
this.commit() |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
@ -339,61 +341,81 @@ |
|
|
callback() |
|
|
callback() |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
//打印功能 |
|
|
//打印功能 |
|
|
print() { |
|
|
print() { |
|
|
let packingNumber = [] |
|
|
let _this = this |
|
|
this.detailSource.forEach(item => { |
|
|
let packingNumber = [] |
|
|
item.subList.forEach(detail => { |
|
|
this.detailSource.forEach(item => { |
|
|
if (detail.scaned) { |
|
|
item.subList.forEach(detail => { |
|
|
// var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, |
|
|
if (detail.scaned) { |
|
|
// detail.packingNumber, detail.batch); |
|
|
// var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, |
|
|
// detail.toPackingNumber = info.packingNumber; |
|
|
// detail.packingNumber, detail.batch); |
|
|
packingNumber.push(detail.packingNumber) |
|
|
// detail.toPackingNumber = info.packingNumber; |
|
|
} |
|
|
packingNumber.push(detail.packingNumber) |
|
|
}) |
|
|
} |
|
|
}) |
|
|
}) |
|
|
// #ifdef APP |
|
|
}) |
|
|
getPrintProductReceiptList({ |
|
|
// #ifdef APP |
|
|
packingNumber: packingNumber.join(','), |
|
|
getPrintProductReceiptList({ |
|
|
type: 'MakeLabel' |
|
|
packingNumber: packingNumber.join(','), |
|
|
}).then(res => { |
|
|
type: 'MakeLabel' |
|
|
console.log('打印', res) |
|
|
}).then(res => { |
|
|
let pointData = [] |
|
|
console.log('打印', res) |
|
|
res.data.forEach(item => { |
|
|
let pointData = [] |
|
|
pointData.push({ |
|
|
res.data.forEach(item => { |
|
|
barcodeString: item.barcodeString, //标签 |
|
|
pointData.push({ |
|
|
itemCode: item.itemCode || '', //物品代码 |
|
|
barcodeString: item.barcodeString, //标签 |
|
|
itemName: item.itemName || '', //物品名称 |
|
|
itemCode: item.itemCode || '', //物品代码 |
|
|
itemDesc1: item.itemDesc1 || '', //物品描述 |
|
|
itemName: item.itemName || '', //物品名称 |
|
|
relateNumber: item.relateNumber || '', //relateNumber包装号 |
|
|
itemDesc1: item.itemDesc1 || '', //物品描述 |
|
|
batch: item.batch || '', //批次 |
|
|
relateNumber: item.relateNumber || '', //relateNumber包装号 |
|
|
productionLineCode: item.productionLineCode || '', //生产线 |
|
|
batch: item.batch || '', //批次 |
|
|
shiftCode: item.shiftCode || '', //班次 |
|
|
productionLineCode: item.productionLineCode || '', //生产线 |
|
|
qty: item.qty || '', //数量 |
|
|
shiftCode: item.shiftCode || '', //班次 |
|
|
printTimes: item.printTimes || '' //打印时间 |
|
|
qty: item.qty || '', //数量 |
|
|
}) |
|
|
printTimes: item.printTimes || '' //打印时间 |
|
|
}) |
|
|
}) |
|
|
console.log('pointData', pointData) |
|
|
}) |
|
|
|
|
|
console.log('pointData', pointData) |
|
|
uni.navigateTo({ |
|
|
|
|
|
url: `/pages/pointProductReceipt/index?points=${JSON.stringify(pointData)}` |
|
|
uni.navigateTo({ |
|
|
}); |
|
|
url: `/pages/pointProductReceipt/index?points=${JSON.stringify(pointData)}` |
|
|
|
|
|
}); |
|
|
}).catch(error => { |
|
|
|
|
|
this.showErrorMessage(error) |
|
|
}).catch(error => { |
|
|
}) |
|
|
_this.showErrorMessage(error) |
|
|
// #endif |
|
|
}) |
|
|
// #ifdef H5 |
|
|
// #endif |
|
|
const webUrl = |
|
|
// #ifdef H5 |
|
|
`${import.meta.env.VITE_JMREPORT_BASE_URL}/jmreport/view/922734157577715712?token=${storage.getStorage(storage.constant.token)}&asn_number=${packingNumber.join(',')}` |
|
|
getBalanceToPackage({ |
|
|
uni.navigateTo({ |
|
|
packingNumber: packingNumber.join(',') |
|
|
url: `/pages/pointProductReceipt/webview?url=${webUrl}` |
|
|
}).then(res => { |
|
|
}); |
|
|
console.log('PC打印', res) |
|
|
// #endif |
|
|
_this.getH5BatchPrintingLable(res.data.number) |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
_this.showErrorMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// #endif |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getH5BatchPrintingLable( number) { |
|
|
|
|
|
let _this = this |
|
|
|
|
|
batchPrintingLable(number).then(resLable => { |
|
|
|
|
|
console.log('batchPrintingLable', resLable) |
|
|
|
|
|
const webUrl = `${import.meta.env.VITE_JMREPORT_BASE_URL}/jmreport/view/922734157577715712` |
|
|
|
|
|
const webData = { |
|
|
|
|
|
token: storage.getStorage(storage.constant.token), |
|
|
|
|
|
asn_number: resLable.data |
|
|
|
|
|
} |
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
url: `/pages/pointProductReceipt/webview?url=${webUrl}&webData=${JSON.stringify(webData)}` |
|
|
|
|
|
}); |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
commit() { |
|
|
commit() { |
|
|
// this.scanCount = getScanCount(this.subList); |
|
|
// this.scanCount = getScanCount(this.subList); |
|
|
// if (this.scanCount == 0) { |
|
|
// if (this.scanCount == 0) { |
|
@ -521,7 +543,7 @@ |
|
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
showCommitSuccessMessage(hint) { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
// navigateBack(1) |
|
|
// navigateBack(1) |
|
|
this.print() |
|
|
this.print() |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|