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. 114
      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 ">
<text>标包个数 : </text>
<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>
<view class="std_pack">
{{getStdPackUnitInfo(dataContent.stdPackUnit)}}
@ -108,8 +108,9 @@
seconds: 0,
timer: {},
showConfirmCountdown: false,
detaiList: [],
maxlength: 10
detailList: [],
maxlength: 10,
mode: 'add' //add edit
}
},
watch: {
@ -156,26 +157,38 @@
this.maxlength = 10;
}
},
openEditPopup(item, detaiList) {
this.dataContent = item
this.inventoryStatus = this.dataContent.inventoryStatus;
this.allQty = Number(this.dataContent.qty)
//
openEditPopup(item, detailList) {
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.detaiList = detaiList
this.mode = 'edit';
this.$refs.popup.open('bottom')
clearInterval(this.timer)
},
openEditPopupShowSeconds(item, detaiList) {
this.dataContent = item;
this.inventoryStatus = this.dataContent.inventoryStatus;
this.allQty = Number(this.dataContent.qty);
//
openEditPopupShowSeconds(item, detailList) {
this.initData(item, detailList);
this.showConfirmCountdown = true;
this.detaiList = detaiList;
this.mode = 'add';
this.$refs.popup.open('bottom')
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() {
this.showConfirmCountdown = false;
clearInterval(this.timer)
@ -188,6 +201,7 @@
closeEditPopup() {
clearInterval(this.timer)
this.$emit("close");
this.$refs.popup.close()
},
confirm() {
@ -202,7 +216,8 @@
this.timer = setInterval(() => {
this.seconds--
if (this.seconds <= 0) {
this.cancel()
this.confirm();
// this.cancel()
return
}
}, 1000)
@ -215,7 +230,7 @@
setValue() {
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();
},

1
pages/count/coms/comCountDetailCard.vue

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

114
pages/count/job/countDetail.vue

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

2
pages/purchaseReceipt/job/receiptDetail.vue

@ -36,7 +36,7 @@
</view>
<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>
</view>
</template>

Loading…
Cancel
Save