Browse Source

修改盘点扫描

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

21
mycomponents/scan/winScanPackAndLocation.vue

@ -91,6 +91,11 @@
type: Boolean,
default: false
},
//
noShowBalanceMessage: {
type: Boolean,
default: false
},
//
allowModifyLocation: {
type: Boolean,
@ -239,6 +244,8 @@
afterQueryBalance(datas) {
if (this.allowNullBalance) {
this.allowNoneBalance(datas);
} else if (this.noShowBalanceMessage) {
this.countCallBack(datas);
} else {
this.mustHavaBalance(datas);
}
@ -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) {
this.$refs.comscan.clear();
//

118
pages/count/job/countDetail.vue

@ -25,7 +25,7 @@
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<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"
@editItem="editItem" :settingParam="jobContent" @remove="updateData"
@updateData="updateData">
@ -48,7 +48,8 @@
</view>
<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"
:isShowBalance="jobContent.isOpenCount=='TRUE'">
</count-qty-edit>
@ -109,7 +110,8 @@
jobContent: {}, //
subList: [], //subList
detailSource: [], //
itemEditInfo: {}
itemEditInfo: {},
balance: {} //
};
},
onLoad(option) {
@ -305,13 +307,29 @@
}
},
getScanResult(result) {
//
getOpenScanResult(result) {
try {
var packingNumber = result.balance.packingNumber;
var batch = result.balance.batch;
var balanceQty = result.balance.qty;
var itemCode = result.balance.itemCode;
var inventoryStatus = result.balance.inventoryStatus;
let label = result.label;
this.balance = result.balance[0];
//,
if (result.balance.length == 0) {
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 itemEditInfo;
//
@ -320,7 +338,75 @@
this.addNewItemCodeToList(result)
} 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 => {
if (item.packingNumber == packingNumber &&
item.batch == batch &&
@ -365,12 +451,14 @@
},
addNewItemCodeToList(result) {
this.$refs.comMessage.showSelectMessageModal("物料[" + result.balance.itemCode + "]不在列表中,是否添加到列表?",
this.$refs.comMessage.showSelectMessageModal("物料[" + this.balance.itemCode + "]不在列表中,是否添加到列表?",
res => {
if (res) {
var item = this.createAddItemInfo(result.balance, result.package);
let newDetail = this.createAddDetailInfo(result.balance, result.package); //
var item = this.createAddItemInfo(this.balance, result.package);
let newDetail = this.createAddDetailInfo(this.balance, result.package); //
item.subList.push(newDetail);
this.detailSource.push(item)
this.updateData()
@ -380,12 +468,12 @@
},
addExistItemCodeToList(detail, result) {
this.$refs.comMessage.showSelectMessageModal("箱码[" + result.balance.packingNumber +
this.$refs.comMessage.showSelectMessageModal("箱码[" + this.balance.packingNumber +
"]不在列表中,是否添加到列表?",
res => {
if (res) {
detail.qty = calc.add(detail.qty,detail.qty)
let newDetail = this.createAddDetailInfo(result.balance, result.package); //
detail.qty = calc.add(detail.qty, detail.qty)
let newDetail = this.createAddDetailInfo(this.balance, result.package); //
detail.subList.push(newDetail);
this.updateData()

2
static/config.json

@ -18,7 +18,7 @@
"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",
"chefang": "http://192.168.0.176:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save