|
|
@ -44,8 +44,7 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="page-footer" v-if="detailSource.length>0"> |
|
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
|
<view class="uni-flex u-col-center space-between padding_10" style="background-color:ghostwhite; width: 100%; "> |
|
|
|
<view class="uni-flex u-col-center space-between padding_10"> |
|
|
|
<view> |
|
|
|
已扫描: |
|
|
@ -102,6 +101,9 @@ |
|
|
|
getCountScopeType |
|
|
|
} from '@/common/directory.js'; |
|
|
|
|
|
|
|
import { |
|
|
|
getManagementPrecisions, |
|
|
|
} from '@/common/balance.js'; |
|
|
|
|
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|
|
@ -338,32 +340,57 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
onScan(packInfo) { |
|
|
|
let detail = this.detailSource.find(r => r.itemCode == packInfo.itemCode && r.packingNumber == |
|
|
|
packInfo |
|
|
|
.number && r.batch == packInfo.batch && r.inventoryStatus == "OK"); |
|
|
|
if (detail == undefined) { |
|
|
|
detail = this.createDetailInfo(packInfo); |
|
|
|
this.detailSource.unshift(detail) |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
} else { |
|
|
|
let index = this.detailSource.findIndex(r => r.itemCode == packInfo.itemCode && r |
|
|
|
.packingNumber == |
|
|
|
packInfo |
|
|
|
.number && r.batch == packInfo.batch && r.inventoryStatus == "OK"); |
|
|
|
if (index >= 0) { |
|
|
|
this.detailSource.unshift(this.detailSource.splice(index, 1)[0]); //置顶 |
|
|
|
//提交 |
|
|
|
this.$refs.comMessage.showQuestionMessage('该箱码已经扫描,是否要编辑盘点明细?', res => { |
|
|
|
if (res) { |
|
|
|
this.closeScanPopup(); |
|
|
|
this.edit(detail); |
|
|
|
async onScan(packInfo) { |
|
|
|
console.log(packInfo) |
|
|
|
//获取管理模式,封装参数\ |
|
|
|
await getManagementPrecisions([packInfo.itemCode], packInfo.toLocationCode, res => { |
|
|
|
if (res.success) { |
|
|
|
this.managementList = res.list; |
|
|
|
this.managementType = this.managementList.some(item => item.ManagementPrecision == |
|
|
|
'BY_BATCH') ? 'BY_BATCH' : '' |
|
|
|
if (this.managementType == 'BY_BATCH') { |
|
|
|
let detail = this.detailSource.find(r => r.itemCode == packInfo.itemCode && r.batch == packInfo |
|
|
|
.batch && r.inventoryStatus == "OK"); |
|
|
|
if (detail == undefined) { |
|
|
|
detail = this.createDetailInfo(packInfo); |
|
|
|
detail.packingNumber = '' |
|
|
|
detail.packUnit = '' |
|
|
|
this.detailSource.unshift(detail) |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
} else { |
|
|
|
let index = this.detailSource.findIndex(r => r.itemCode == packInfo.itemCode && r.batch == packInfo |
|
|
|
.batch && r.inventoryStatus == "OK"); |
|
|
|
if (index >= 0) { |
|
|
|
this.detailSource.unshift(this.detailSource.splice(index, 1)[0]); //置顶 |
|
|
|
this.detailSource[0].qty = calc.add(this.detailSource[0].qty, packInfo.qty) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
let detail = this.detailSource.find(r => r.itemCode == packInfo.itemCode && r.packingNumber == |
|
|
|
packInfo.number && r.batch == packInfo.batch && r.inventoryStatus == "OK"); |
|
|
|
if (detail == undefined) { |
|
|
|
detail = this.createDetailInfo(packInfo); |
|
|
|
this.detailSource.unshift(detail) |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
} else { |
|
|
|
let index = this.detailSource.findIndex(r => r.itemCode == packInfo.itemCode && r.packingNumber == |
|
|
|
packInfo.number && r.batch == packInfo.batch && r.inventoryStatus == "OK"); |
|
|
|
if (index >= 0) { |
|
|
|
this.detailSource.unshift(this.detailSource.splice(index, 1)[0]); //置顶 |
|
|
|
//提交 |
|
|
|
this.$refs.comMessage.showQuestionMessage('该箱码已经扫描,是否要编辑盘点明细?', res => { |
|
|
|
if (res) { |
|
|
|
this.closeScanPopup(); |
|
|
|
this.edit(detail); |
|
|
|
} else { |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
//创建盘盈的明细 |
|
|
@ -400,9 +427,6 @@ |
|
|
|
return detail; |
|
|
|
}, |
|
|
|
|
|
|
|
editClose() { |
|
|
|
this.$refs.countQtyEdit.closeEditPopup(); |
|
|
|
}, |
|
|
|
|
|
|
|
swipeClick(e, item, index) { |
|
|
|
if (e.content.text == "编辑") { |
|
|
@ -467,7 +491,7 @@ |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
var params = this.setParams() |
|
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
|
console.log("提交参数", params); |
|
|
|
countJobSubmit(params).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data == null) { |
|
|
|