From cd45d9d2347927933e51c2d81cf77b430c6a68c0 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期二, 19 三月 2024 12:35:47 +0800
Subject: [PATCH] #

---
 pages/tzsk/AGV/orderList.vue |   43 ++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 38 insertions(+), 5 deletions(-)

diff --git a/pages/tzsk/AGV/orderList.vue b/pages/tzsk/AGV/orderList.vue
index f21a327..09c75e4 100644
--- a/pages/tzsk/AGV/orderList.vue
+++ b/pages/tzsk/AGV/orderList.vue
@@ -33,24 +33,53 @@
 					{
 						orderNo: 'cg0931241',
 						matnr: 'cg0931241',
-						maktx: '闈爑榛勯噾鍒嗗壊鍝堟墦璧忛粍閲戝垎鍓插搱鎵撹祻榛勯噾鍒嗗壊鍝堟墦璧�',
+						maktx: '浣犲ソ',
 						anfme: 10,
 						specs: '10-z'
 					},
 					{
 						orderNo: 'cg0931242',
-						matnr: 'cg0931241',
-						maktx: '闈爑榛勯噾鍒嗗壊鍝堟墦璧�',
+						matnr: 'cg0931242',
+						maktx: '鍝堝搱',
+						anfme: 10,
+						specs: '10-z'
+					},
+					{
+						orderNo: 'cg0931242',
+						matnr: 'cg0931242',
+						maktx: '鍝堝搱',
 						anfme: 10,
 						specs: '10-z'
 					}
-				]
+				],
+				oldDataList: []
 			}
+		},
+		onShow() {
+			this.oldDataList = [...this.dataList]
 		},
 		methods: {
 			matInput() {
 				let _this = this
-				
+				this.dataList = [...this.oldDataList]
+				let count = 0
+				for (let k in this.dataList) {
+					if (!this.dataList[k].matnr.includes(this.matnr)) {
+						this.dataList.splice(k,1)
+					} else {
+						count++;
+					}
+				}
+				if (count == 0) {
+					this.dataList = [...this.oldDataList]
+					for (let j in this.dataList) {
+						if (!this.dataList[j].maktx.includes(this.matnr)) {
+							this.dataList.splice(j,1)
+						} else {
+							// this.dataList = [...this.oldDataList]
+						}
+					}
+				}
 			},
 			checkboxChange(e) {
 				let items = this.dataList,
@@ -60,6 +89,10 @@
 				} else {
 					this.$set(e,'checked',true)
 				}
+			},
+			clear() {
+				this.matnr = ''
+				
 			}
 		}
 	}

--
Gitblit v1.9.1