Browse Source

忙盘任务批次

syhx
zhang_li 2 months ago
parent
commit
2fca205e92
  1. 2
      src/mycomponents/package/PackageAndItemCard.vue
  2. 80
      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 class="uni-flex uni-row space-between" style="align-items: center">
<view style="word-break: break-all;"> <view style="word-break: break-all;">
<item :dataContent="dataContent" style="margin-left: 4px; padding:0px 5px 5px;"></item> <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> <batch v-if="dataContent.batch!=null" :batch="dataContent.batch"></batch>
<location v-if="dataContent.locationCode!=null" :locationCode="dataContent.locationCode"></location> <location v-if="dataContent.locationCode!=null" :locationCode="dataContent.locationCode"></location>
</view> </view>

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

@ -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,32 +340,57 @@
} }
}, },
onScan(packInfo) { async onScan(packInfo) {
let detail = this.detailSource.find(r => r.itemCode == packInfo.itemCode && r.packingNumber == console.log(packInfo)
packInfo //\
.number && r.batch == packInfo.batch && r.inventoryStatus == "OK"); await getManagementPrecisions([packInfo.itemCode], packInfo.toLocationCode, res => {
if (detail == undefined) { if (res.success) {
detail = this.createDetailInfo(packInfo); this.managementList = res.list;
this.detailSource.unshift(detail) this.managementType = this.managementList.some(item => item.ManagementPrecision ==
this.scanPopupGetFocus(); 'BY_BATCH') ? 'BY_BATCH' : ''
} else { if (this.managementType == 'BY_BATCH') {
let index = this.detailSource.findIndex(r => r.itemCode == packInfo.itemCode && r let detail = this.detailSource.find(r => r.itemCode == packInfo.itemCode && r.batch == packInfo
.packingNumber == .batch && r.inventoryStatus == "OK");
packInfo if (detail == undefined) {
.number && r.batch == packInfo.batch && r.inventoryStatus == "OK"); detail = this.createDetailInfo(packInfo);
if (index >= 0) { detail.packingNumber = ''
this.detailSource.unshift(this.detailSource.splice(index, 1)[0]); // detail.packUnit = ''
// this.detailSource.unshift(detail)
this.$refs.comMessage.showQuestionMessage('该箱码已经扫描,是否要编辑盘点明细?', res => { this.scanPopupGetFocus();
if (res) {
this.closeScanPopup();
this.edit(detail);
} else { } 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(); 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; 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) {

Loading…
Cancel
Save