From 42befdd31d6c897381bb7c80fd41d0d9619c085c Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期六, 07 十月 2023 16:21:48 +0800 Subject: [PATCH] # --- pages/basics/matQuery.vue | 183 ++++++++++++++++++++++++++++++++++++--------- 1 files changed, 147 insertions(+), 36 deletions(-) diff --git a/pages/basics/matQuery.vue b/pages/basics/matQuery.vue index 28d2a09..e721812 100644 --- a/pages/basics/matQuery.vue +++ b/pages/basics/matQuery.vue @@ -1,38 +1,137 @@ <template> - <scroll-view scroll-y> - <view> - <view class="container"> - <view class="text-box"> - <view><text>鍟嗗搧缂栫爜</text></view> - <view><text>1111</text></view> - </view> - <view class="text-box"> - <view><text>鍟嗗搧鍚嶇О</text></view> - <view>鏄剧ず鍣�</view> - </view> - <view class="text-box"> - <view><text>瑙勬牸</text></view> - <view>24鑻卞</view> - </view> - <view class="text-box"> - <view><text>鎵瑰彿</text></view> - <view>YC-897998776</view> - </view> - <view class="text-box"> - <view><text>鏁伴噺</text></view> - <view>269</view> - </view> - <view class="foot flex justify-center"> - <label for=""> - <button class="cu-btn bg-blue">鎻愬彇</button> - </label> + <view> + <view class="container"> + <view class="text-box"> + <view class="text-title text-desc"><text>鍟嗗搧缂栫爜</text></view> + <view class="text-title"><text>{{matData.matnr}}</text></view> + </view> + <view class="text-box"> + <view class="text-title text-desc"><text>鍟嗗搧鍚嶇О</text></view> + <view class="text-title">{{matData.maktx}}</view> + </view> + <view class="text-box"> + <view class="text-title text-desc"><text>瑙勬牸</text></view> + <view class="text-title">{{matData.specs}}</view> + </view> + <view class="text-box"> + <view class="text-title text-desc"><text>鍏ュ簱鍖哄煙</text></view> + <view class="text-title">{{matData.matType$}}</view> + </view> + <view class="text-box"> + <view class="text-title text-desc"><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-desc"><text>澶囨敞</text></view> + <view class="text-title"><input type="text" v-model="matData.memo"></view> + </view> + <view class="text-box"> + <view class="text-title text-desc"><text>瀹㈡埛淇℃伅</text></view> + <uni-combox :candidates="owners" placeholder="璇烽�夋嫨瀹㈡埛绫诲埆" + v-model="matData.owner"></uni-combox> + <!-- <view class="text-title"><input type="text" v-model="matData.cstmr"></view> --> + </view> + <view class="text-box"> + <view class="text-title text-desc"><text>鏁伴噺</text></view> + <view class="text-title"> + <view> + <uni-number-box :value="matData.anfme" :max="9999999" color="#747474" @change="changeValue"/> + </view> </view> </view> </view> - </scroll-view> + <view class="foot flex justify-center"> + <label> + <button class="cu-btn bg-blue" @click="back()">鎻愬彇</button> + </label> + </view> + </view> </template> <script> + export default { + data() { + return { + matData: { + matnr: null, + maktx: null, + batch: null, + anfme: null, + owner: null + }, + owners: [], + owner: '', + baseIP:'', + basePORT:'', + commonUrl: '' + } + }, + 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 + }) + + eventChannel.on('url', function(data) { + that.commonUrl = data.data + }) + setTimeout(()=> { + this.locOwner() + },100) + }, + methods: { + locOwner() { + let that = this + uni.request({ + url: 'http://10.10.10.100:8080/bfwms' + '/locOwner/list/auth', + data:{curr:1,limit:15}, + header: { 'token':uni.getStorageSync('token') }, + method:'GET', + success(res) { + res = res.data + if (res.code === 200) { + that.owner = res.data.records + for (let k of res.data.records) { + that.owners.push(k.owner) + } + } + }, + fail(res) { + } + }) + }, + blur() { + + }, + focus() { + + }, + 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}); + this.getOpenerEventChannel().emit('owner', {data: this.owner}); + uni.vibrateShort(); + uni.navigateBack({ + + }) + } + } + } </script> <style> @@ -42,31 +141,42 @@ background-color: #ffffff; } .text-box { + display: flex; height: 100rpx; - line-height: 100rpx; + /* line-height: 100rpx; */ 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: 1px solid #000000; + border-bottom: none; } - .text-box view { + .text-box .text-title { width: 30%; + height: 100rpx; float: left; display: inline-block; } - .text-box view:last-child { + .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%; + } + .text-desc { + line-height: 100rpx; } .foot { @@ -74,6 +184,7 @@ height: 100rpx; line-height: 100rpx; background-color: rgba(255,255,255,1); + /* background-color: #434343; */ position: fixed; bottom: 0%; border-top: 1px solid #d8d8d8; -- Gitblit v1.9.1