From 26ace4daaf0f733d4746e8bf2b5570fe324543eb Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期三, 01 二月 2023 08:58:00 +0800 Subject: [PATCH] # --- pages/basics/matQuery.vue | 79 +++++++++++++++++++++++++++++---------- 1 files changed, 58 insertions(+), 21 deletions(-) diff --git a/pages/basics/matQuery.vue b/pages/basics/matQuery.vue index f8d34f1..baa549b 100644 --- a/pages/basics/matQuery.vue +++ b/pages/basics/matQuery.vue @@ -4,33 +4,33 @@ <view class="container"> <view class="text-box"> <view class="text-title"><text>鍟嗗搧缂栫爜</text></view> - <view class="text-title"><text>1111</text></view> + <view class="text-title"><text>{{matData.matnr}}</text></view> </view> <view class="text-box"> <view class="text-title"><text>鍟嗗搧鍚嶇О</text></view> - <view class="text-title">鏄剧ず鍣�</view> + <view class="text-title">{{matData.maktx}}</view> </view> <view class="text-box"> <view class="text-title"><text>瑙勬牸</text></view> - <view class="text-title">24鑻卞</view> + <view class="text-title">{{matData.specs}}</view> </view> <view class="text-box"> - <view class="text-title"><text>鎵瑰彿</text></view> - <view class="text-title">YC-897998776</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"> <view class="text-title"><text>鏁伴噺</text></view> <view class="text-title"> <view> - <uni-number-box color="#747474" @change="changeValue" /> + <uni-number-box :value="matData.anfme" :max="99999999" color="#747474" @change="changeValue"/> </view> </view> </view> </view> </view> <view class="foot flex justify-center"> - <label for=""> - <button class="cu-btn bg-blue">鎻愬彇</button> + <label> + <button class="cu-btn bg-blue" @click="back()">鎻愬彇</button> </label> </view> </scroll-view> @@ -40,8 +40,32 @@ export default { data() { return { - vModelValue:'' + matData: { + matnr: null, + maktx: null, + batch: null, + anfme: null, + }, + baseIP:'', + basePORT:'', } + }, + onLoad(option) { + 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 + that.matData.anfme = 0 + }) + + }, methods: { blur() { @@ -50,10 +74,20 @@ focus() { }, - changeValue() { - + changeValue(value) { + this.matData.anfme = value }, - + back() { + if (this.matData.anfme === 0) { + uni.showToast({title: '璇疯緭鍏ユ暟閲�', icon: "none", position: 'top'}); + return; + } + this.getOpenerEventChannel().emit('matList', {data: this.matData}); + uni.vibrateShort(); + uni.navigateBack({ + + }) + } } } </script> @@ -70,32 +104,35 @@ margin-top: 20rpx; margin-left: 10%; width: 80%; - font-size: 36rpx; - font-weight: 700; + font-size: 32rpx; + font-weight: 400; color: #434343; border-bottom: 1rpx solid #e8e8e8; } .text-box:last-child { border-bottom: none; } - .text-box:last-child .text-title:last-child { - display: flex; - height: 100%; - align-items: center; - } .text-box .text-title { width: 30%; + height: 100rpx; float: left; display: inline-block; } .text-box .text-title:last-child { display: inline-block; - margin-left: 10%; - width: 60%; + margin-left: 5%; + width: 65%; font-size: 30rpx; font-weight: 400; color: #747474; + display: flex; + align-items: center; } + .text-box .text-title:last-child input { + border-bottom: 1rpx solid #e8e8e8 ; + width: 100%; + } + .foot { width: 100%; -- Gitblit v1.9.1