Browse Source

增加盲盘时的校验

hella_online_20240829
Niext 4 months ago
parent
commit
577165bb0e
  1. 4
      src/pages/count/coms/comFuzzyCountJobCard.vue
  2. 158
      src/pages/count/job/fuzzyCountDetail.vue

4
src/pages/count/coms/comFuzzyCountJobCard.vue

@ -1,5 +1,9 @@
<template>
<job-com-main-card :dataContent="dataContent">
<view class="card_view">
<text class="card_packing_code ">盘点计划</text>
<text class="card_content ">{{dataContent.planNumber}}</text>
</view>
<view v-if="dataContent.countRange!=undefined" class="">
<view v-for="(range, index) in dataContent.countRange" :key="index">
<view class="card_view">

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

@ -3,18 +3,27 @@
<view class="page-header">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
<view class="card_view">
<text class="card_packing_code ">盘点计划</text>
<text class="card_content ">{{jobContent.planNumber}}</text>
</view>
<view v-for="(range, index) in dataContent.countRange" :key="index">
<view class="card_view">
<text class="card_packing_code ">{{getCountScopeName(range.type)}}</text>
<text class="card_content ">{{range.value}}</text>
</view>
</view>
</view>
</view>
<view class="page-main" style="height: 500px;">
<view class="page-main" >
<view class="">
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view>
</view>
<scroll-view scroll-y="true" class="page-main-scroll">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="editRemoveOption">
{{editRemoveOption}}
<uni-swipe-action-item @click="swipeClick($event,item)" :right-options="editRemoveOption">
<!-- {{editRemoveOption}} -->
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<package-and-item-card :dataContent="item"></package-and-item-card>
@ -56,13 +65,10 @@
cancleTakeCountJob,
countJobSubmit
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
Decimal
} from 'decimal.js'; //
getCountScopeType
} from '@/common/directory.js';
import {
getEditRemoveOption
@ -73,9 +79,6 @@
navigateBack,
getPackingNumberAndBatch
} from '@/common/basic.js';
import {
getCountStageName
} from '@/common/directory.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
@ -202,6 +205,41 @@
},
getLocation(location, code) {
let countRange = this.jobContent.countRange;
let range = countRange.find(r => r.type == "LOCATION_CODE");
if (range != undefined) {
if (!rang.value.includes(location.code)) {
this.showErrorMessage("库位代码【" + location.code + "】,不在盘点库位范围【" + rangeValue + "】内")
return;
}
} else {
range = countRange.find(r => r.type == "LOCATIONGROUP_CODE");
if (range != undefined) {
if (!rang.value.includes(location.locationGroupCode)) {
this.showErrorMessage("库位组代码【" + location.locationGroupCode + "】,不在盘点库位组范围【" + rangeValue +
"】内")
return;
}
} else {
range = countRange.find(r => r.type == "AREA_CODE");
if (range != undefined) {
if (!rang.value.includes(location.areaCode)) {
this.showErrorMessage("库区代码【" + location.areaCode + "】,不在盘点库区范围【" + rangeValue + "】内")
return;
}
} else {
range = countRange.find(r => r.type == "WAREHOUSE_CODE");
if (range != undefined) {
if (!rang.value.includes(location.warehouseCode)) {
this.showErrorMessage("仓库代码【" + location.warehouseCode + "】,不在盘点仓库范围【" + rangeValue +
"】内")
return;
}
}
}
}
}
this.getFromLocationCode(location, code)
},
@ -246,8 +284,22 @@
//
getScanResult(result) {
let that = this;
let item = this.createDetailInfo(result.package);
this.detailSource.push(item)
let package = result.package;
let detail = this.detailSource.find(r => r.itemCode == package.itemCode && r.packingNumber == package
.packingNumber && r.batch == package.batch && r.inventoryStatus == "OK");
if (detail == undefined) {
detail = this.createDetailInfo(package);
this.detailSource.push(detail)
} else {
let index = detail.index;
list.unshift(list.splice(index, 1)[0]); //
//
this.showQuestionMessage('该箱码已经扫描,是否要编辑盘点明细?', res => {
if (res) {
this.edit(detail);
}
});
}
},
//
@ -277,55 +329,41 @@
return detail;
},
//
editCountResult(item, subItem) {
let that = this;
this.$refs.comMessage.showQuestionMessage("箱码【" + that.label.packingNumber +
"】已经完成盘点,是否要编辑盘点结果?",
res => {
if (res) {
this.currentEditItem = subItem;
this.$refs.countQtyEdit.openEditPopup(subItem,
item.subList);
// this.$refs.countQtyEdit.openEditPopupShowSeconds(subItem,
// item.subList);
} else {
this.scanPopupGetFocus();
}
})
},
editClose() {
this.scanPopupGetFocus();
},
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(detail) {
this.$emit("editItem", detail)
//
edit(item) {
let that = this;
this.currentEditItem = item;
this.$refs.countQtyEdit.openEditPopup(item);
},
detail(item) {
this.showItem = item;
this.$refs.detailInfoPopup.openPopup(item);
editConfirm(qty, inventoryStatus, mode) {
let that = this;
//
if (mode == 'edit') {
this.currentEditItem.countQty = qty;
this.currentEditItem.qty = qty;
this.currentEditItem.inventoryStatus = inventoryStatus;
}
this.scanPopupGetFocus();
},
editClose() {
this.scanPopupGetFocus();
},
remove(item, index) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
this.showQuestionMessage("是否要移除扫描信息?", res => {
if (res) {
// this.dataContent.subList.splice(index, 1)
item.scaned = false;
item.handleQty = 0;
this.$emit('removePack')
this.dataContent.subList.splice(index, 1)
}
});
},
@ -363,7 +401,6 @@
return this.jobContent;
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {
@ -371,6 +408,7 @@
}
});
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
@ -383,6 +421,12 @@
this.$refs.comMessage.showScanMessage(message);
},
showQuestionMessage(message, callback) {
this.$refs.comMessage.showQuestionMessage(message, res => {
callback(res);
});
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
@ -403,13 +447,11 @@
navigateBack(1);
})
},
getCountStageName(value) {
return getCountStageName(value)
},
isOpenCount(value) {
return value == "TRUE" ? "明盘" : "盲盘"
}
getCountScopeName(value) {
let item = getCountScopeType(value);
return item.label;
},
}
}

Loading…
Cancel
Save