From 74ead6f7bb66fe8d3f8db11b1cbadd92b57e28d1 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期二, 04 十一月 2025 10:23:19 +0800
Subject: [PATCH] 解决铜杆报工的数据覆盖问题
---
pages/wareHouse/nuclearScale/index.vue | 78 ++++++++++++++++----------------------
1 files changed, 33 insertions(+), 45 deletions(-)
diff --git a/pages/wareHouse/nuclearScale/index.vue b/pages/wareHouse/nuclearScale/index.vue
index 0ccf455..5f7d6be 100644
--- a/pages/wareHouse/nuclearScale/index.vue
+++ b/pages/wareHouse/nuclearScale/index.vue
@@ -130,7 +130,9 @@
@click="cancelReport(item)"
>
<view class="content-header">
- <view class="content-header-title">{{ ScanCodeRecord.length - index }}</view>
+ <view class="content-header-title">{{
+ ScanCodeRecord.length - index
+ }}</view>
</view>
<view class="content-body">
<view class="row-list">
@@ -204,7 +206,7 @@
</view>
<view class="packing-registration-param-item-right">
<u-input
- type="number"
+ type="number"
class="item-one item-two"
v-model="modalList.verificationWeight"
/>
@@ -216,7 +218,7 @@
</view>
<view class="packing-registration-param-item-right">
<u-input
- type="number"
+ type="number"
class="item-one item-two"
v-model="modalList.forkliftWeight"
/>
@@ -332,51 +334,37 @@
waivDevRejNo: codeInfo.WDR ? codeInfo.WDR : "*", // wdr鍙�
productType: that.form.productType,
};
- if (codeInfo.CN != "") {
- if (codeInfo.CN != that.form.customerName1) {
- // 鎵弿鎶ュ伐鍗曚簩缁寸爜
- uni.showModal({
- title: "鎻愮ず",
- content:
- "瀹㈡埛涓嶄竴鑷达細" + codeInfo.CN + "||" + that.form.customerName1,
- showCancel: true,
- success: function (res) {
- const isDuplicate = that.ScanCodeRecord.some(
- (item) => item.outBatchNo === codeInfo.BN
- );
- if (!isDuplicate) {
- if (that.form.productType == "TG01") {
- that.$refs.saveForm.open(ScanCodeRecordList);
- } else {
- that.ScanCodeRecord.unshift(ScanCodeRecordList);
- }
- } else {
- uni.showToast({
- icon: "none",
- title: "璇峰嬁閲嶅鎵爜锛�",
- duration: 2 * 1000,
- });
- }
- },
- });
- } else {
- if (that.form.productType == "TG01") {
- that.$refs.saveForm.open(ScanCodeRecordList);
- } else {
- that.ScanCodeRecord.unshift(ScanCodeRecordList);
- }
- }
+ if (that.form.productType == "TG01") {
+ that.$refs.saveForm.open(ScanCodeRecordList);
} else {
- if (that.form.productType == "TG01") {
- that.$refs.saveForm.open(ScanCodeRecordList);
- } else {
- that.ScanCodeRecord.unshift(ScanCodeRecordList);
- }
+ that.queryCustomName(codeInfo,ScanCodeRecordList);
}
}
});
},
methods: {
+ queryCustomName(codeInfo,ScanCodeRecordList) {
+ // 鏌ヨ瀹㈡埛鍚嶇О
+ this.$u.api.NuclearScaleEntry.queryCustomName({
+ BN: codeInfo.BN,
+ }).then((res) => {
+ console.log("瀹㈡埛鍚嶇О锛�", res);
+ if (res.data != this.form.customerName1) {
+ let that = this;
+ // 鎵弿鎶ュ伐鍗曚簩缁寸爜
+ uni.showModal({
+ title: "鎻愮ず",
+ content: "瀹㈡埛涓嶄竴鑷达細" + res.data + " || " + that.form.customerName1,
+ showCancel: true,
+ success: function (res) {
+ that.ScanCodeRecord.unshift(ScanCodeRecordList);
+ },
+ });
+ } else {
+ this.ScanCodeRecord.unshift(ScanCodeRecordList);
+ }
+ });
+ },
// 鍙栨秷鎵爜璁板綍
cancelReport(item) {
let that = this;
@@ -446,10 +434,10 @@
this.$u.toast("鎻愪氦鎴愬姛");
this.ScanCodeRecord = [];
// if (this.form.productTypeMap == "DT01") {
- this.modalList = {
- verificationWeight: "",
+ this.modalList = {
+ verificationWeight: "",
// };
- }
+ };
})
.catch((err) => {
uni.hideLoading();
--
Gitblit v1.9.3