From 424d5b1cb1779166d6d07a03d01dbaa4abc1ef9e Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期六, 06 五月 2023 08:10:29 +0800
Subject: [PATCH] #
---
pages.json | 41 ++++-----
pages/order/orderPutDown.vue | 46 +++++++----
pages/order/orderPakin.vue | 50 ++++++++----
pages/order/orderPutOn.vue | 56 ++++++++-----
4 files changed, 115 insertions(+), 78 deletions(-)
diff --git a/pages.json b/pages.json
index 7a12af9..06831ab 100644
--- a/pages.json
+++ b/pages.json
@@ -1,28 +1,6 @@
{
"pages": [ //pages鏁扮粍涓涓�椤硅〃绀哄簲鐢ㄥ惎鍔ㄩ〉锛屽弬鑰冿細https://uniapp.dcloud.io/collocation/pages
{
- "path": "pages/print/printUNI",
- "style": {
- "navigationBarTitleText": "UNI鎵撳嵃"
- }
- },
- {
- "path": "pages/print/print",
- "style": {
- "navigationBarTitleText": "鎵撳嵃"
- }
- },
-
-
- {
- "path": "pages/print/qr",
- "style": {
- "navigationBarTitleText": "浜岀淮鐮�"
- }
- },
-
-
- {
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "鐧� 褰�"
@@ -82,9 +60,28 @@
"navigationBarTitleText": "搴撳瓨鐩樼偣"
}
},
+ {
+ "path": "pages/print/printUNI",
+ "style": {
+ "navigationBarTitleText": "UNI鎵撳嵃"
+ }
+ },
+ {
+ "path": "pages/print/print",
+ "style": {
+ "navigationBarTitleText": "鎵撳嵃"
+ }
+ },
{
+ "path": "pages/print/qr",
+ "style": {
+ "navigationBarTitleText": "浜岀淮鐮�"
+ }
+ },
+
+ {
"path": "pages/mat/matList",
"style": {
"navigationBarTitleText": "鍟嗗搧鍒楄〃"
diff --git a/pages/order/orderPakin.vue b/pages/order/orderPakin.vue
index 249cbb5..118ae3e 100644
--- a/pages/order/orderPakin.vue
+++ b/pages/order/orderPakin.vue
@@ -196,6 +196,9 @@
that.matData = result.data
that.matnr = ''
that.matData['batch'] = ''
+ // if (matnr[2] === null) {
+ // matnr[2] = ''
+ // }
result.data.batch = matnr[2]
uni.navigateTo({
url: "../mat/matSelected",
@@ -240,28 +243,34 @@
var len = this.dataList.length
var add = true ,sameItem = false
for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
+ if (mat.orderNo != this.dataList[i].orderNo) {
+ add = true
+ break;
+ } else {
+ if (mat.matnr == this.dataList[i].matnr) {
+ for (var j = 0; j < len; j++) {
+ if (mat.batch == this.dataList[j].batch) {
+ sameItem = true
+ }
}
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
+ // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
+ if (mat.batch != this.dataList[i].batch) {
+ this.$forceUpdate() // 寮哄埗鍒锋柊
+ if (sameItem) {
+ add = false
+ } else {
+ add = true
+ }
+
} else {
- add = true
+ // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
+ this.dataList[i].anfme += mat.anfme
+ this.$forceUpdate() // 寮哄埗鍒锋柊
+ add = false
}
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
}
}
+
}
if (add) {
this.dataList.unshift(mat)
@@ -335,6 +344,7 @@
this.dataList = []
this.order = ''
this.barcode = ''
+ this.matnr = ''
this.messageText = "閲嶇疆瀹屾垚"
this.messageToggle('success')
},
@@ -381,6 +391,12 @@
changeValue(value) {
this.count = value
},
+ // 娓呯┖
+ resst() {
+ this.dataList = []
+ this.barcode = ''
+ this.barcodeFocuss()
+ },
}
}
</script>
diff --git a/pages/order/orderPutDown.vue b/pages/order/orderPutDown.vue
index 3a17edd..9753a6c 100644
--- a/pages/order/orderPutDown.vue
+++ b/pages/order/orderPutDown.vue
@@ -240,28 +240,34 @@
var len = this.dataList.length
var add = true ,sameItem = false
for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
+ if (mat.orderNo != this.dataList[i].orderNo) {
+ add = true
+ break;
+ } else {
+ if (mat.matnr == this.dataList[i].matnr) {
+ for (var j = 0; j < len; j++) {
+ if (mat.batch == this.dataList[j].batch) {
+ sameItem = true
+ }
}
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
+ // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
+ if (mat.batch != this.dataList[i].batch) {
+ this.$forceUpdate() // 寮哄埗鍒锋柊
+ if (sameItem) {
+ add = false
+ } else {
+ add = true
+ }
+
} else {
- add = true
+ // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
+ this.dataList[i].anfme += mat.anfme
+ this.$forceUpdate() // 寮哄埗鍒锋柊
+ add = false
}
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
}
}
+
}
if (add) {
this.dataList.unshift(mat)
@@ -381,6 +387,12 @@
changeValue(value) {
this.count = value
},
+ // 娓呯┖
+ resst() {
+ this.dataList = []
+ this.barcode = ''
+ this.barcodeFocuss()
+ },
}
}
</script>
diff --git a/pages/order/orderPutOn.vue b/pages/order/orderPutOn.vue
index 3a17edd..49ac8f3 100644
--- a/pages/order/orderPutOn.vue
+++ b/pages/order/orderPutOn.vue
@@ -7,12 +7,12 @@
@input="orderInput()" disabled>
</view> -->
<view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
+ <view class="code-decs">搴撲綅鍙�:</view>
<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
@confirm="barcodeInput()">
</view>
<view class="item">
- <view class="code-decs">搴撲綅鍙�:</view>
+ <view class="code-decs">鐗╂枡鍙�:</view>
<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
<view class="item-right">
<button></button>
@@ -71,7 +71,7 @@
<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
<view class="buttom">
<button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">缁勬墭</button>
+ <button size="mini" type="primary" @click="combConfirm('warn')">涓婃灦</button>
</view>
<!-- 寮圭獥 -->
<!-- 淇敼鏁伴噺 -->
@@ -240,28 +240,34 @@
var len = this.dataList.length
var add = true ,sameItem = false
for (var i = 0; i < len; i++) {
- if (mat.matnr == this.dataList[i].matnr) {
- for (var j = 0; j < len; j++) {
- if (mat.batch == this.dataList[j].batch) {
- sameItem = true
+ if (mat.orderNo != this.dataList[i].orderNo) {
+ add = true
+ break;
+ } else {
+ if (mat.matnr == this.dataList[i].matnr) {
+ for (var j = 0; j < len; j++) {
+ if (mat.batch == this.dataList[j].batch) {
+ sameItem = true
+ }
}
- }
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
- if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
- if (sameItem) {
- add = false
+ // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
+ if (mat.batch != this.dataList[i].batch) {
+ this.$forceUpdate() // 寮哄埗鍒锋柊
+ if (sameItem) {
+ add = false
+ } else {
+ add = true
+ }
+
} else {
- add = true
+ // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
+ this.dataList[i].anfme += mat.anfme
+ this.$forceUpdate() // 寮哄埗鍒锋柊
+ add = false
}
-
- } else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
- add = false
}
}
+
}
if (add) {
this.dataList.unshift(mat)
@@ -294,9 +300,9 @@
}
}
uni.request({
- url: that.baseUrl + '/mobile/comb/auth',
+ url: that.baseUrl + '/mobile/manDetl/in',
data: JSON.stringify({
- locno: that.barcode,
+ locNo: that.barcode,
combMats: that.dataList
}),
method: 'POST',
@@ -381,6 +387,12 @@
changeValue(value) {
this.count = value
},
+ // 娓呯┖
+ resst() {
+ this.dataList = []
+ this.barcode = ''
+ this.barcodeFocuss()
+ },
}
}
</script>
--
Gitblit v1.9.1