From 76accdc54aaa7dccce6962d2a284f4e89b278dc1 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期六, 02 十二月 2023 17:01:52 +0800
Subject: [PATCH] #

---
 pages/project/pakin/pakin.vue |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/pages/project/pakin/pakin.vue b/pages/project/pakin/pakin.vue
index 1d989e4..7673354 100644
--- a/pages/project/pakin/pakin.vue
+++ b/pages/project/pakin/pakin.vue
@@ -113,8 +113,9 @@
 			async getMat(matnr) {
 				let res = await addMat.addMat(matnr)
 				if (res.code === 200 && res.data) {
-					res.data['count'] = 1
-					this.zDataList =  util.matCheck(res.data,this.zDataList)
+					this.matPick(res.data)
+					// res.data['count'] = 1
+					// this.zDataList =  util.matCheck(res.data,this.zDataList)
 					this.matnr = ''
 				} else if (res.code === 200 && !res.data) {
 					let msg = `${this.matnr} 鐗╂枡寮傚父锛岃閲嶈瘯`
@@ -131,24 +132,24 @@
 				}
 			},
 			// 璺宠浆鐗╂枡鎻愬彇椤甸潰
-			matPick() {
+			matPick(mat) {
+				let _this = this
 				uni.navigateTo({
-					url: '/pages/common/data-list/dataDetail',
+					url: '/pages/common/mat/matPick',
 					// 浼�
 					success: function(data) {
-						data.eventChannel.emit('param', {
-							param: param,
-							index: index
+						data.eventChannel.emit('mat', {
+							mat: mat,
 						})
 					},
 					// 鎺�
 					events: {
-						dataList: function(data) {
-							console.log(data);
+						matList: function(data) {
+							data.data['count'] = 1
+							let newList = util.matCheck(data.data,_this.zDataList)
+							_this.zDataList =  ''
+							_this.zDataList = newList
 						},
-						del: function(data) {
-							_this.zDataList.splice(data.data,1)
-						}
 					},
 				})
 			},

--
Gitblit v1.9.1