Browse Source

修改盘点扫描

wms3.0_pda
niexiting 11 months ago
parent
commit
fa8ca92756
  1. 23
      mycomponents/scan/winScanPackAndLocation.vue
  2. 120
      pages/count/job/countDetail.vue
  3. 2
      static/config.json

23
mycomponents/scan/winScanPackAndLocation.vue

@ -91,6 +91,11 @@
type: Boolean, type: Boolean,
default: false default: false
}, },
//
noShowBalanceMessage: {
type: Boolean,
default: false
},
// //
allowModifyLocation: { allowModifyLocation: {
type: Boolean, type: Boolean,
@ -239,6 +244,8 @@
afterQueryBalance(datas) { afterQueryBalance(datas) {
if (this.allowNullBalance) { if (this.allowNullBalance) {
this.allowNoneBalance(datas); this.allowNoneBalance(datas);
} else if (this.noShowBalanceMessage) {
this.countCallBack(datas);
} else { } else {
this.mustHavaBalance(datas); this.mustHavaBalance(datas);
} }
@ -267,7 +274,7 @@
this.packCallBack(balance); this.packCallBack(balance);
// 20231228 // 20231228
// if (balance.qty > 0) { // if (balance.qty > 0) {
// this.packCallBack(balance); // this.packCallBack(balance);
// } else { // } else {
@ -298,6 +305,20 @@
// } // }
}, },
//
countCallBack(datas) {
this.$refs.comscan.clear();
//
let data = {
label: this.scanResult.label,
package: this.scanResult.package,
balance: datas,
fromLocationCode: this.fromLocationCode,
}
this.packGetFocus();
this.$emit("getCountScanResult", data);
},
packCallBack(item) { packCallBack(item) {
this.$refs.comscan.clear(); this.$refs.comscan.clear();
// //

120
pages/count/job/countDetail.vue

@ -25,7 +25,7 @@
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="" style="margin: 2px;"> <view class="">
<com-count-detail-card :ref="'countDetail_'+index" :dataContent="item" :index="index" <com-count-detail-card :ref="'countDetail_'+index" :dataContent="item" :index="index"
@editItem="editItem" :settingParam="jobContent" @remove="updateData" @editItem="editItem" :settingParam="jobContent" @remove="updateData"
@updateData="updateData"> @updateData="updateData">
@ -48,7 +48,8 @@
</view> </view>
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> <win-scan-pack-and-location ref="scanPopup" :noShowBalanceMessage="true" @getCountScanResult='getScanResult'>
</win-scan-pack-and-location>
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" :isShowStatus="true" :allowEditStatus="false" <count-qty-edit ref="countQtyEdit" @confirm="editConfirm" :isShowStatus="true" :allowEditStatus="false"
:isShowBalance="jobContent.isOpenCount=='TRUE'"> :isShowBalance="jobContent.isOpenCount=='TRUE'">
</count-qty-edit> </count-qty-edit>
@ -75,7 +76,7 @@
import { import {
getCountStageName getCountStageName
} from '@/common/directory.js'; } from '@/common/directory.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'
@ -109,7 +110,8 @@
jobContent: {}, // jobContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
itemEditInfo: {} itemEditInfo: {},
balance: {} //
}; };
}, },
onLoad(option) { onLoad(option) {
@ -305,13 +307,29 @@
} }
}, },
getScanResult(result) { //
getOpenScanResult(result) {
try { try {
var packingNumber = result.balance.packingNumber; let label = result.label;
var batch = result.balance.batch; this.balance = result.balance[0];
var balanceQty = result.balance.qty; //,
var itemCode = result.balance.itemCode; if (result.balance.length == 0) {
var inventoryStatus = result.balance.inventoryStatus;
return;
} else {
}
this.balance = result.balance[0];
var packingNumber = label.packingNumber;
var batch = label.batch;
var itemCode = label.itemCode;
var balanceQty = this.balance.qty;
var inventoryStatus = this.balance.inventoryStatus;
var detail = this.detailSource.find(r => r.itemCode == itemCode); var detail = this.detailSource.find(r => r.itemCode == itemCode);
var itemEditInfo; var itemEditInfo;
// //
@ -320,7 +338,75 @@
this.addNewItemCodeToList(result) this.addNewItemCodeToList(result)
} else { } else {
// //
itemEditInfo = detail.subList.find(item => {
if (item.packingNumber == packingNumber &&
item.batch == batch &&
item.inventoryStatus == inventoryStatus) {
return item;
}
})
if (itemEditInfo == undefined) {
//
this.addExistItemCodeToList(detail, result);
} else {
//
if (itemEditInfo.scaned) {
this.$refs.comMessage.showSelectMessageModal("箱码【" + packingNumber +
"】已经完成盘点,是否要编辑数量",
res => {
if (res) {
this.$refs.countQtyEdit.openEditPopup(itemEditInfo,
detail.subList);
} else {
this.scanPopupGetFocus();
}
})
} else {
itemEditInfo.scaned = true;
itemEditInfo.handleQty = balanceQty;
itemEditInfo.balanceQty = balanceQty;
itemEditInfo.stdPackQty = result.package.stdPackQty;
itemEditInfo.stdPackUnit = result.package.stdPackUnit;
this.$refs.countQtyEdit.openEditPopupShowSeconds(itemEditInfo, detail
.subList);
this.updateData()
}
}
}
} catch (e) {
this.showErrorMessage(e.message)
}
},
//
getUnOpenScanResult(result) {
try {
debugger;
//
if (result.balance.length == 0) {
}
let label = result.label;
this.balance = result.balance[0];
var packingNumber = label.packingNumber;
var batch = label.batch;
var itemCode = label.itemCode;
var balanceQty = this.balance.qty;
var inventoryStatus = this.balance.inventoryStatus;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
var itemEditInfo;
//
if (detail == undefined) {
//
this.addNewItemCodeToList(result)
} else {
//
itemEditInfo = detail.subList.find(item => { itemEditInfo = detail.subList.find(item => {
if (item.packingNumber == packingNumber && if (item.packingNumber == packingNumber &&
item.batch == batch && item.batch == batch &&
@ -365,12 +451,14 @@
}, },
addNewItemCodeToList(result) { addNewItemCodeToList(result) {
this.$refs.comMessage.showSelectMessageModal("物料[" + result.balance.itemCode + "]不在列表中,是否添加到列表?", this.$refs.comMessage.showSelectMessageModal("物料[" + this.balance.itemCode + "]不在列表中,是否添加到列表?",
res => { res => {
if (res) { if (res) {
var item = this.createAddItemInfo(result.balance, result.package); var item = this.createAddItemInfo(this.balance, result.package);
let newDetail = this.createAddDetailInfo(result.balance, result.package); // let newDetail = this.createAddDetailInfo(this.balance, result.package); //
item.subList.push(newDetail); item.subList.push(newDetail);
this.detailSource.push(item) this.detailSource.push(item)
this.updateData() this.updateData()
@ -380,12 +468,12 @@
}, },
addExistItemCodeToList(detail, result) { addExistItemCodeToList(detail, result) {
this.$refs.comMessage.showSelectMessageModal("箱码[" + result.balance.packingNumber + this.$refs.comMessage.showSelectMessageModal("箱码[" + this.balance.packingNumber +
"]不在列表中,是否添加到列表?", "]不在列表中,是否添加到列表?",
res => { res => {
if (res) { if (res) {
detail.qty = calc.add(detail.qty,detail.qty) detail.qty = calc.add(detail.qty, detail.qty)
let newDetail = this.createAddDetailInfo(result.balance, result.package); // let newDetail = this.createAddDetailInfo(this.balance, result.package); //
detail.subList.push(newDetail); detail.subList.push(newDetail);
this.updateData() this.updateData()

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "request_url", "name": "request_url",
"value": "http://192.168.0.106:12080/admin-api", "value": "http://192.168.0.178:12080/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api", "dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.176:12080/admin-api", "chefang": "http://192.168.0.176:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save