|
@ -44,8 +44,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="page-footer" v-if="detailSource.length>0"> |
|
|
<view class="page-footer" v-if="detailSource.length>0"> |
|
|
<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="uni-flex u-col-center space-between padding_10"> |
|
|
<view class="uni-flex u-col-center space-between padding_10"> |
|
|
<view> |
|
|
<view> |
|
|
已扫描: |
|
|
已扫描: |
|
@ -102,6 +101,9 @@ |
|
|
getCountScopeType |
|
|
getCountScopeType |
|
|
} from '@/common/directory.js'; |
|
|
} from '@/common/directory.js'; |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
getManagementPrecisions, |
|
|
|
|
|
} from '@/common/balance.js'; |
|
|
|
|
|
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|
@ -338,19 +340,41 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onScan(packInfo) { |
|
|
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 == |
|
|
let detail = this.detailSource.find(r => r.itemCode == packInfo.itemCode && r.packingNumber == |
|
|
packInfo |
|
|
packInfo.number && r.batch == packInfo.batch && r.inventoryStatus == "OK"); |
|
|
.number && r.batch == packInfo.batch && r.inventoryStatus == "OK"); |
|
|
|
|
|
if (detail == undefined) { |
|
|
if (detail == undefined) { |
|
|
detail = this.createDetailInfo(packInfo); |
|
|
detail = this.createDetailInfo(packInfo); |
|
|
this.detailSource.unshift(detail) |
|
|
this.detailSource.unshift(detail) |
|
|
this.scanPopupGetFocus(); |
|
|
this.scanPopupGetFocus(); |
|
|
} else { |
|
|
} else { |
|
|
let index = this.detailSource.findIndex(r => r.itemCode == packInfo.itemCode && r |
|
|
let index = this.detailSource.findIndex(r => r.itemCode == packInfo.itemCode && r.packingNumber == |
|
|
.packingNumber == |
|
|
packInfo.number && r.batch == packInfo.batch && r.inventoryStatus == "OK"); |
|
|
packInfo |
|
|
|
|
|
.number && r.batch == packInfo.batch && r.inventoryStatus == "OK"); |
|
|
|
|
|
if (index >= 0) { |
|
|
if (index >= 0) { |
|
|
this.detailSource.unshift(this.detailSource.splice(index, 1)[0]); //置顶 |
|
|
this.detailSource.unshift(this.detailSource.splice(index, 1)[0]); //置顶 |
|
|
//提交 |
|
|
//提交 |
|
@ -364,6 +388,9 @@ |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//创建盘盈的明细 |
|
|
//创建盘盈的明细 |
|
@ -400,9 +427,6 @@ |
|
|
return detail; |
|
|
return detail; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
editClose() { |
|
|
|
|
|
this.$refs.countQtyEdit.closeEditPopup(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
swipeClick(e, item, index) { |
|
|
swipeClick(e, item, index) { |
|
|
if (e.content.text == "编辑") { |
|
|
if (e.content.text == "编辑") { |
|
@ -467,7 +491,7 @@ |
|
|
mask: true |
|
|
mask: true |
|
|
}); |
|
|
}); |
|
|
var params = this.setParams() |
|
|
var params = this.setParams() |
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
console.log("提交参数", params); |
|
|
countJobSubmit(params).then(res => { |
|
|
countJobSubmit(params).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data == null) { |
|
|
if (res.data == null) { |
|
|