From 9246e993b1ca7d41a721982221af3bcfc910b23c Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 15 八月 2022 10:17:05 +0800
Subject: [PATCH] #
---
pages/basics/matQuery.vue | 49 ++++++++++++++++++++-----------------------------
1 files changed, 20 insertions(+), 29 deletions(-)
diff --git a/pages/basics/matQuery.vue b/pages/basics/matQuery.vue
index bdfe3bd..991cd95 100644
--- a/pages/basics/matQuery.vue
+++ b/pages/basics/matQuery.vue
@@ -15,7 +15,7 @@
<view class="text-title">{{matData.specs}}</view>
</view>
<view class="text-box">
- <view class="text-title"><text>鎵瑰彿</text></view>
+ <view class="text-title"><text>搴忓垪鍙�</text></view>
<view class="text-title"><input type="text" v-model="matData.batch"></view>
</view>
<view class="text-box">
@@ -43,7 +43,6 @@
matData: {
matnr: null,
maktx: null,
- specs: null,
batch: null,
anfme: null,
},
@@ -52,36 +51,24 @@
}
},
onLoad(option) {
- this.baseIP = option.baseIP
- this.basePORT = option.basePORT
- this.matData.matnr = option.matnr
+ let that = this
+ // #ifdef APP-NVUE
+ const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
+ // #endif
+ // #ifndef APP-NVUE
+ const eventChannel = this.getOpenerEventChannel();
+ // #endif
+
+ // 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
+ eventChannel.on('matData', function(data) {
+ that.matData = data.data
+ })
},
onShow() {
- this.getMat()
+ this.matData.anfme = 0
},
methods: {
- getMat() {
- let that = this
-
- uni.request({
- // url: 'http://localhost:8081/jkwms/mat/auth',
- url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mat/auth',
- data: {
- matnr: that.matData.matnr
- },
- header: {
- 'token':uni.getStorageSync('token')
- },
- success(res) {
- var res = res.data;
- if (res.code === 200) {
- that.matData = {}
- that.matData = res.data;
- }
- }
- });
- },
blur() {
},
@@ -92,8 +79,12 @@
},
back() {
- uni.$emit('matData', this.matData);
- // console.log(this.matData)
+ if (this.matData.anfme === 0) {
+ uni.showToast({title: '璇疯緭鍏ユ暟閲�', icon: "none", position: 'top'});
+ return;
+ }
+ this.getOpenerEventChannel().emit('matList', {data: this.matData});
+ uni.vibrateShort();
uni.navigateBack({
})
--
Gitblit v1.9.1