From 0f0d0c008298f43d8e0ef991cf9d6843c436515d Mon Sep 17 00:00:00 2001 From: wangxy Date: Mon, 22 Nov 2021 16:35:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=85=E8=A3=85=E5=AE=9E=E9=99=85=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/quality/pkg.js | 7 +++++++ src/views/quality/pkg.vue | 11 +++++++++++ src/views/quality/pkgDefeck.vue | 17 ++++++++++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/api/quality/pkg.js b/src/api/quality/pkg.js index f10a3d6..d3d2f1b 100644 --- a/src/api/quality/pkg.js +++ b/src/api/quality/pkg.js @@ -94,3 +94,10 @@ export function demolitionPkg (data) { }) } +// 获取包装扫码计划和实际数量 +export function getPkgPlanCount (code) { + return request({ + url: `/admin/log/packorder/get/` + code, + method: 'get' + }) +} diff --git a/src/views/quality/pkg.vue b/src/views/quality/pkg.vue index 2eb7b6f..18de631 100644 --- a/src/views/quality/pkg.vue +++ b/src/views/quality/pkg.vue @@ -132,6 +132,7 @@ export default { selectCurrentClick(item) { // 点击li触发事件 this.choosePkg(item['LOG_PackOrder-PackOrderId']) this.activePkg = item['LOG_PackOrder-PackOrderId'] + this.getCodePlanCount(item['LOG_PackOrder-PackOrderId']) }, codeparser() { //获取扫码规则 api.codeparser().then((res) => { @@ -157,6 +158,7 @@ export default { this.activePkg = PackOrderId this.actPkgObj = this.pkgs.filter((pkg) => pkg.PackOrderId == PackOrderId)[0] || {} this.packorderitemlst() //获取包装单下的包装项 + this.getCodePlanCount(PackOrderId) this.$nextTick(() => { if (this.$refs[`${PackOrderId}`]) this.$refs[`${PackOrderId}`][0].scrollIntoView() @@ -175,6 +177,7 @@ export default { api.packorderitemlst(this.activePkg).then((res) => { this.tableData = res.data || [] this.tableLoading = false + this.getCodePlanCount(this.actPkgObj['LOG_PackOrder-PackOrderId']) if (type === 1) { this.scrollCurrentPos() } @@ -203,6 +206,14 @@ export default { } }) }, + // 获取包装扫码计划和实际数量 + getCodePlanCount(code) { + api.getPkgPlanCount(code).then((res) => { + if (res.code === 200) { + this.$emit('planActQTy', res.data) + } + }) + }, enterPress(e) { // 扫码回车提交 // 如果扫码是指定的 two,则跳转到对应的缺陷数据采集tab栏 if (e.target.value === 'two') { diff --git a/src/views/quality/pkgDefeck.vue b/src/views/quality/pkgDefeck.vue index 0314602..c650087 100644 --- a/src/views/quality/pkgDefeck.vue +++ b/src/views/quality/pkgDefeck.vue @@ -2,12 +2,16 @@
- + +
+ 计划数量:{{planQty}} + 实际数量:{{actQty}} +
拆除包装 \ No newline at end of file