Browse Source

忙盘任务批次

syhx
zhang_li 2 months ago
parent
commit
2fca205e92
  1. 2
      src/mycomponents/package/PackageAndItemCard.vue
  2. 82
      src/pages/count/job/fuzzyCountDetail.vue

2
src/mycomponents/package/PackageAndItemCard.vue

@ -3,7 +3,7 @@
<view class="uni-flex uni-row space-between" style="align-items: center">
<view style="word-break: break-all;">
<item :dataContent="dataContent" style="margin-left: 4px; padding:0px 5px 5px;"></item>
<pack v-if="dataContent.packingNumber!=null" :packingCode="dataContent.packingNumber"></pack>
<pack v-if="dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="dataContent.batch!=null" :batch="dataContent.batch"></batch>
<location v-if="dataContent.locationCode!=null" :locationCode="dataContent.locationCode"></location>
</view>

82
src/pages/count/job/fuzzyCountDetail.vue

@ -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,10 +427,7 @@
return detail;
},
editClose() {
this.$refs.countQtyEdit.closeEditPopup();
},
swipeClick(e, item, index) {
if (e.content.text == "编辑") {
this.edit(item)
@ -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) {

Loading…
Cancel
Save