From 5052e0b3f3ade965a76db938eeeee11a9fb922a0 Mon Sep 17 00:00:00 2001 From: whycq <whycq> Date: 星期五, 08 四月 2022 13:14:53 +0800 Subject: [PATCH] #1 --- pages/basics/matQuery.vue | 154 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 154 insertions(+), 0 deletions(-) diff --git a/pages/basics/matQuery.vue b/pages/basics/matQuery.vue new file mode 100644 index 0000000..a73e3c2 --- /dev/null +++ b/pages/basics/matQuery.vue @@ -0,0 +1,154 @@ +<template> + <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 color="#747474" @change="changeValue"/> + </view> + </view> + </view> + </view> + </view> + <view class="foot flex justify-center"> + <label for=""> + <button class="cu-btn bg-blue" @click="back()">鎻愬彇</button> + </label> + </view> + </scroll-view> +</template> + +<script> + export default { + data() { + return { + matData: { + matnr: null, + maktx: null, + specs: null, + batch: null, + anfme: 0 + }, + baseIP:'', + basePORT:'', + } + }, + onLoad(option) { + this.baseIP = option.baseIP + this.basePORT = option.basePORT + this.matData.matnr = option.matnr + 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; + console.log(res); + if (res.code === 200) { + that.matData = res.data; + } + } + }); + }, + blur() { + + }, + focus() { + + }, + changeValue() { + + }, + back() { + this.matData.anfme = 5.9 + uni.$emit('matData', this.matData); + uni.navigateBack({ + delta: 1 + }) + } + } + } +</script> + +<style> + .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: 36rpx; + font-weight: 700; + 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%; + float: left; + display: inline-block; + } + .text-box .text-value { + width: 70%; + padding: 0 20upx; + } + .text-box .text-title:last-child { + display: inline-block; + margin-left: 10%; + width: 60%; + font-size: 30rpx; + font-weight: 400; + color: #747474; + } + + .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