From 0a90905d8b133b4213e760355aab141347fec999 Mon Sep 17 00:00:00 2001
From: whycq <whycq>
Date: 星期六, 02 四月 2022 14:21:30 +0800
Subject: [PATCH] #
---
pages/basics/stockQuery.vue | 123 ++++++++++++++++++++++++++++++++++++++--
1 files changed, 115 insertions(+), 8 deletions(-)
diff --git a/pages/basics/stockQuery.vue b/pages/basics/stockQuery.vue
index e75c970..6b36a6b 100644
--- a/pages/basics/stockQuery.vue
+++ b/pages/basics/stockQuery.vue
@@ -2,16 +2,41 @@
<view>
<view class="cu-form-group margin-top">
<view class="title">搴撲綅</view>
- <input v-model="locNo" placeholder="搴撲綅缂栧彿" name="input" ></input>
+ <input v-model="locNo" placeholder="搴撲綅缂栧彿" name="input" @input="findByLocNo()" focus></input>
</view>
<view class="cu-form-group margin-top">
<view class="title">浜у搧</view>
- <input v-model="matNo" placeholder="浜у搧淇℃伅" name="input"></input>
+ <input v-model="matNo" placeholder="浜у搧" name="input" @input="findByMatNo()"></input>
</view>
- <view>
- <button class='cu-btn bg-yellow pda-btn'>鎼滅储</button>
- <button class="cu-btn bg-grey pda-btn" @click="reset">閲嶇疆</button>
+
+ <view class="margin-top">
+ <uni-table border stripe emptyText="鏆傛棤鏇村鏁版嵁">
+ <uni-tr>
+ <uni-th align="center" width="90">浜у搧ID</uni-th>
+ <uni-th align="center" width="90">浜у搧鍚嶇О</uni-th>
+ <uni-th align="center" width="90">浜у搧浠e彿</uni-th>
+ <uni-th align="center" width="90">搴撲綅</uni-th>
+ <uni-th align="center" width="70">鏁伴噺</uni-th>
+ </uni-tr>
+ <uni-tr v-for="(item, index) in locDetlData" :key="index" @input="tabRender()">
+ <uni-td align="center">{{item.matNo}}</uni-td>
+ <uni-td align="center">{{item.matName}}</uni-td>
+ <uni-td align="center">{{item.size}}</uni-td>
+ <uni-td align="center">{{item.locNo}}</uni-td>
+ <uni-td align="center">{{item.count}}</uni-td>
+ </uni-tr>
+ </uni-table>
+
</view>
+ <view style="height: 200rpx;">
+ <!-- 绌虹櫧灞� -->
+ </view>
+ <view class="cu-bar foot justify-center input" style="height: 130rpx;">
+ <view class="reset flex solid-bottom padding justify-center" >
+ <button class="cu-btn bg-grey main-btn margin-xs" style="width: 400rpx;" @click="reset">閲� 缃�</button>
+ </view>
+ </view>
+
</view>
</template>
@@ -21,19 +46,101 @@
return {
locNo:'',
matNo:'',
+ locDetlData:[],
+ basePORT:'',
+ msgType: '',
+ messageText: '',
}
+ },
+ mounted(){
+ const UIP = uni.getStorageSync('UIP');
+ this.baseIP = UIP;
+ const UPORT = uni.getStorageSync('UPORT');
+ this.basePORT = UPORT;
},
methods: {
reset:function() {
- let that =this;
+ let that = this;
that.locNo = '';
that.matNo = '';
- console.log(1)
+ that.locDetlData = [];
},
+ messageToggle(type) {
+ this.msgType = type
+ this.messageText = '鎻愬彇澶辫触'
+ this.$refs.message.open()
+ },
+ // 鏍规嵁搴撲綅鍙锋煡鎵惧簱瀛樻槑缁�
+ findByLocNo(){
+ if(this.locNo.length === 0){
+ return;
+ }
+ this.matNo = ''
+ this.find(this.locNo,this.matNo)
+ },
+ // 鏍规嵁浜у搧鍙锋煡鎵惧簱瀛樻槑缁�
+ findByMatNo(){
+ if(this.matNo.length === 0){
+ return;
+ }
+ this.locNo = '',
+ this.find(this.locNo,this.matNo)
+ },
+ // find
+ find(){
+ let that = this
+ uni.request({
+ url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/mobile/locDetl/stockQuery",
+ header:{
+ 'content-type':'application/x-www-form-urlencoded',
+ 'token':uni.getStorageSync('token')
+ },
+ data:{
+ locNo: that.locNo,
+ matNo: that.matNo,
+ },
+ method: 'POST',
+ success(res) {
+ console.log(res)
+ if(res.data.code === 200) {
+ if(res.data.data != null) {
+ that.locDetlData = res.data.data
+ };
+ } else if (res.data.code ===403) {
+ uni.navigateBack({
+ delta: 1
+ })
+ } else {
+ console.log(1)
+ uni.showToast({
+ title: res.data.msg,
+ icon: 'error',
+ duration: 1500
+ });
+
+ }
+ }
+ })
+ },
+
}
}
</script>
<style>
-
+ /* .reset {
+
+ position: absolute;
+ width: 750upx;
+ bottom: 280upx;
+ } */
+ .pda-btn1 {
+ margin-left:260rpx;
+ margin-right: auto;
+ margin-top: 150rpx;
+ width: 200rpx;
+ height: 80rpx;
+ font-size: 30upx;
+ font-weight: bold;
+ }
</style>
--
Gitblit v1.9.1