Browse Source

采购收货增加标签类型

wms3.0_pda
niexiting 10 months ago
parent
commit
fdb11f13d7
  1. 45
      mycomponents/qty/CountQtyEdit.vue
  2. 1
      pages/count/coms/comCountDetailCard.vue
  3. 118
      pages/count/job/countDetail.vue
  4. 2
      pages/purchaseReceipt/job/receiptDetail.vue

45
mycomponents/qty/CountQtyEdit.vue

@ -16,7 +16,7 @@
<view class="uni-flex uni-row space-between padding title "> <view class="uni-flex uni-row space-between padding title ">
<text>标包个数 : </text> <text>标包个数 : </text>
<view class="uni-flex uni-row u-col-center"> <view class="uni-flex uni-row u-col-center">
<uni-number-box @change="calcQty($event,stdCount)" :value="stdCount"> <uni-number-box @change="calcQty($event,stdCount)" :value="stdCount" :focus="false">
</uni-number-box> </uni-number-box>
<view class="std_pack"> <view class="std_pack">
{{getStdPackUnitInfo(dataContent.stdPackUnit)}} {{getStdPackUnitInfo(dataContent.stdPackUnit)}}
@ -108,8 +108,9 @@
seconds: 0, seconds: 0,
timer: {}, timer: {},
showConfirmCountdown: false, showConfirmCountdown: false,
detaiList: [], detailList: [],
maxlength: 10 maxlength: 10,
mode: 'add' //add edit
} }
}, },
watch: { watch: {
@ -156,26 +157,38 @@
this.maxlength = 10; this.maxlength = 10;
} }
}, },
openEditPopup(item, detaiList) {
this.dataContent = item //
this.inventoryStatus = this.dataContent.inventoryStatus; openEditPopup(item, detailList) {
this.allQty = Number(this.dataContent.qty) this.initData(item, detailList);
// this.dataContent = item
// this.inventoryStatus = this.dataContent.inventoryStatus;
// this.allQty = Number(this.dataContent.qty)
// this.stdCount = Math.ceil(this.allQty / this.dataContent.stdPackQty);
// this.detailList = detailList
this.showConfirmCountdown = false; this.showConfirmCountdown = false;
this.detaiList = detaiList this.mode = 'edit';
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
clearInterval(this.timer) clearInterval(this.timer)
}, },
openEditPopupShowSeconds(item, detaiList) { //
this.dataContent = item; openEditPopupShowSeconds(item, detailList) {
this.inventoryStatus = this.dataContent.inventoryStatus; this.initData(item, detailList);
this.allQty = Number(this.dataContent.qty);
this.showConfirmCountdown = true; this.showConfirmCountdown = true;
this.detaiList = detaiList; this.mode = 'add';
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
this.startTimer() this.startTimer()
},
initData(item, detailList) {
this.dataContent = item;
this.inventoryStatus = this.dataContent.inventoryStatus;
this.allQty = Number(this.dataContent.qty);
this.stdCount = Math.ceil(this.allQty / this.dataContent.stdPackQty);
this.detailList = detailList;
}, },
mousedown() { mousedown() {
this.showConfirmCountdown = false; this.showConfirmCountdown = false;
clearInterval(this.timer) clearInterval(this.timer)
@ -188,6 +201,7 @@
closeEditPopup() { closeEditPopup() {
clearInterval(this.timer) clearInterval(this.timer)
this.$emit("close");
this.$refs.popup.close() this.$refs.popup.close()
}, },
confirm() { confirm() {
@ -202,7 +216,8 @@
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.seconds-- this.seconds--
if (this.seconds <= 0) { if (this.seconds <= 0) {
this.cancel() this.confirm();
// this.cancel()
return return
} }
}, 1000) }, 1000)
@ -215,7 +230,7 @@
setValue() { setValue() {
this.dataContent.handleQty = Number(this.allQty) this.dataContent.handleQty = Number(this.allQty)
this.$emit("confirm", Number(this.allQty), this.inventoryStatus); this.$emit("confirm", Number(this.allQty), this.inventoryStatus, this.mode);
this.closeEditPopup(); this.closeEditPopup();
}, },

1
pages/count/coms/comCountDetailCard.vue

@ -128,7 +128,6 @@
this.$emit("editItem", detail) this.$emit("editItem", detail)
}, },
detail(item) { detail(item) {
this.showItem = item; this.showItem = item;
this.$refs.detailInfoPopup.openPopup(item); this.$refs.detailInfoPopup.openPopup(item);

118
pages/count/job/countDetail.vue

@ -50,7 +50,7 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack-and-location ref="scanPopup" :noShowBalanceMessage="true" @getCountScanResult='getScanResult'> <win-scan-pack-and-location ref="scanPopup" :noShowBalanceMessage="true" @getCountScanResult='getScanResult'>
</win-scan-pack-and-location> </win-scan-pack-and-location>
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" :isShowStatus="true" <count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true"
:allowEditStatus="editInventoryStatus" :isShowBalance="jobContent.isOpenCount=='TRUE'"> :allowEditStatus="editInventoryStatus" :isShowBalance="jobContent.isOpenCount=='TRUE'">
</count-qty-edit> </count-qty-edit>
<com-message ref="comMessage"></com-message> <com-message ref="comMessage"></com-message>
@ -110,11 +110,11 @@
jobContent: {}, // jobContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
itemEditInfo: {},
balance: {}, // balance: {}, //
editInventoryStatus: false, editInventoryStatus: false,
package: {}, // package: {}, //
label: {} // label: {}, //
currentEditItem: {}
}; };
}, },
onLoad(option) { onLoad(option) {
@ -315,7 +315,6 @@
} }
}, },
// //
getScanResult(result) { getScanResult(result) {
try { try {
@ -333,11 +332,11 @@
}) })
if (subItem != undefined && subItem.scaned) { if (subItem != undefined && subItem.scaned) {
this.$refs.comMessage.showQuestionMessage("箱码【" + packingNumber + this.$refs.comMessage.showQuestionMessage("箱码【" + that.label.packingNumber +
"】已经完成盘点,是否要编辑数量", "】已经完成盘点,是否要编辑盘点结果?",
res => { res => {
if (res) { if (res) {
this.$refs.countQtyEdit.openEditPopup(subItem, this.$refs.countQtyEdit.openEditPopupShowSeconds(subItem,
item.subList); item.subList);
} else { } else {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
@ -357,8 +356,8 @@
item.handleQty = Number(that.label.qty); item.handleQty = Number(that.label.qty);
item.balanceQty = 0; item.balanceQty = 0;
item.inventoryStatus = "OK"; item.inventoryStatus = "OK";
this.balance = item; that.balance = item;
that.$refs.countQtyEdit.openEditPopup(item, that.$refs.countQtyEdit.openEditPopupShowSeconds(item,
null); null);
} else { } else {
// //
@ -366,88 +365,20 @@
} }
}) })
} else if (result.balance.length == 1) { } else if (result.balance.length == 1) {
this.balance = result.balance[0]; that.balance = result.balance[0];
that.$refs.countQtyEdit.openEditPopup(this.balance, that.balance.balanceQty = that.balance.qty;
that.balance.stdPackQty = that.package.stdPackQty;
that.balance.stdPackUnit = that.package.stdPackUnit;
that.$refs.countQtyEdit.openEditPopupShowSeconds(that.balance,
null); null);
} }
} }
return;
// var packingNumber = that.label.packingNumber;
// var batch = that.label.batch;
// var itemCode = that.label.itemCode;
// var balanceQty = 0;
// var inventoryStatus = "OK"
// var detail = this.detailSource.find(r => r.itemCode == itemCode);
// var itemEditInfo;
// //
// if (detail == undefined) {
// //
// this.addNewItemCodeToList(result)
// } else {
// if (result.balance.length == 0) {
// this.balance = label;
// this.balanceQty = 0;
// this.inventoryStatus = "OK";
// this.editInventoryStatus = true;
// //
// itemEditInfo = detail.subList.find(item => {
// if (item.packingNumber == packingNumber &&
// item.batch == batch) {
// return item;
// }
// })
// } else {
// this.balance = result.balance[0];
// balanceQty = this.balance.qty;
// inventoryStatus = this.balance.inventoryStatus;
// //
// 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.showQuestionMessage("" + 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) { } catch (e) {
this.showErrorMessage(e.message) this.showErrorMessage(e.message)
} }
}, },
editConfirm(qty, inventoryStatus) { editConfirm(qty, inventoryStatus, mode) {
let that = this; let that = this;
var detail = this.detailSource.find(r => r.itemCode == that.package.itemCode); var detail = this.detailSource.find(r => r.itemCode == that.package.itemCode);
@ -478,11 +409,24 @@
this.updateData() this.updateData()
} }
this.calcHandleQty(); //,
this.scanPopupGetFocus(); if (mode == 'edit') {
this.currentEditItem.handleQty = 0;
this.currentEditItem.scaned = false;
this.currentEditItem = {};
}
setTimeout(r => {
this.calcHandleQty();
this.scanPopupGetFocus();
}, 100)
} }
}, },
editClose() {
this.scanPopupGetFocus();
},
// //
getUnOpenScanResult(result) { getUnOpenScanResult(result) {
try { try {
@ -599,7 +543,7 @@
scaned: true, scaned: true,
countDetailNumber: "", countDetailNumber: "",
ownerCode: balance.ownerCode, ownerCode: balance.ownerCode,
packingNumber: pack.packingNumber, packingNumber: pack.number,
containerNumber: balance.containerNumber, containerNumber: balance.containerNumber,
batch: pack.batch, batch: pack.batch,
inventoryStatus: balance.inventoryStatus, inventoryStatus: balance.inventoryStatus,
@ -620,7 +564,6 @@
stdPackUnit: pack.stdPackUnit, stdPackUnit: pack.stdPackUnit,
creator: this.$store.state.user.id creator: this.$store.state.user.id
} }
debugger;
return detail; return detail;
}, },
@ -766,6 +709,7 @@
}, },
editItem(item) { editItem(item) {
this.currentEditItem = item;
var detail = this.detailSource.find(r => r.itemCode == item.itemCode); var detail = this.detailSource.find(r => r.itemCode == item.itemCode);
this.$refs.countQtyEdit.openEditPopup(item, this.$refs.countQtyEdit.openEditPopup(item,
detail.subList); detail.subList);

2
pages/purchaseReceipt/job/receiptDetail.vue

@ -36,7 +36,7 @@
</view> </view>
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack> <win-scan-pack headerType='HPQ,HMQ' ref="scanPopup" @getResult='getScanResult'></win-scan-pack>
<com-message ref="comMessage"></com-message> <com-message ref="comMessage"></com-message>
</view> </view>
</template> </template>

Loading…
Cancel
Save