From c34153297f866ce25445c5dba6d0f22f63c61ece Mon Sep 17 00:00:00 2001 From: whycq <whycq> Date: 星期五, 08 四月 2022 14:40:21 +0800 Subject: [PATCH] # --- pages/basics/matQuery.vue | 169 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 146 insertions(+), 23 deletions(-) diff --git a/pages/basics/matQuery.vue b/pages/basics/matQuery.vue index d1978b2..bdfe3bd 100644 --- a/pages/basics/matQuery.vue +++ b/pages/basics/matQuery.vue @@ -1,34 +1,157 @@ <template> - <view> - <view class="cu-form-group margin-top"> - <text class="title">浜у搧浠e彿</text> - <input type="text" placeholder="鎵爜 / 杈撳叆" name="input" autocomplete="off"> + <scroll-view scroll-y> + <view> + <view class="container"> + <view class="text-box"> + <view class="text-title"><text>鍟嗗搧缂栫爜</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">{{matData.maktx}}</view> + </view> + <view class="text-box"> + <view class="text-title"><text>瑙勬牸</text></view> + <view class="text-title">{{matData.specs}}</view> + </view> + <view class="text-box"> + <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 v-model="matData.anfme" :max="9999" color="#747474" @change="changeValue"/> + </view> + </view> + </view> + </view> </view> - <view class="cu-form-group margin-top"> - <text class="title">浜у搧鍚嶇О</text> - <input type="text" name="input" autocomplete="off"> + <view class="foot flex justify-center"> + <label> + <button class="cu-btn bg-blue" @click="back()">鎻愬彇</button> + </label> </view> - <view class="cu-form-group margin-top"> - <text class="title">鍗曚綅</text> - <input type="text" name="input" autocomplete="off"> - </view> - <view class="cu-form-group margin-top"> - <text class="title">鏁伴噺</text> - <uni-number-box @change="changeValue" /> - </view> - <button class="cu-btn bg-yellow pda-btn2">鎻愬彇</button> - </view> + </scroll-view> </template> <script> + export default { + data() { + return { + matData: { + matnr: null, + maktx: null, + specs: null, + batch: null, + anfme: null, + }, + baseIP:'', + basePORT:'', + } + }, + onLoad(option) { + this.baseIP = option.baseIP + this.basePORT = option.basePORT + this.matData.matnr = option.matnr + + }, + onShow() { + this.getMat() + }, + 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() { + + }, + focus() { + + }, + changeValue() { + + }, + back() { + uni.$emit('matData', this.matData); + // console.log(this.matData) + uni.navigateBack({ + + }) + } + } + } </script> <style> - .pda-btn2{ - margin-left:auto; - margin-right: auto; - margin-top: 150rpx; - width: 200rpx; - height: 80rpx; + .container { + width: 100%; + height: 100%; + background-color: #ffffff; + } + .text-box { + height: 100rpx; + line-height: 100rpx; + margin-top: 20rpx; + margin-left: 10%; + width: 80%; + font-size: 32rpx; + font-weight: 400; + color: #434343; + border-bottom: 1rpx solid #e8e8e8; + } + .text-box:last-child { + border-bottom: none; + } + .text-box .text-title { + width: 30%; + height: 100rpx; + float: left; + display: inline-block; + } + .text-box .text-title:last-child { + display: inline-block; + 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%; + height: 100rpx; + line-height: 100rpx; + background-color: rgba(255,255,255,1); + position: fixed; + bottom: 0%; + border-top: 1px solid #d8d8d8; + z-index: 1; } </style> -- Gitblit v1.9.1