From c7712b3c72af60fd4bd01e4bd910e489fc223e6f Mon Sep 17 00:00:00 2001 From: whycq <whycq> Date: 星期三, 09 三月 2022 15:45:02 +0800 Subject: [PATCH] #更新库存查询&注销不清用户 --- pages/basics/stockQuery.vue | 51 +++++++++++++++++++++++++++++++++++---------------- 1 files changed, 35 insertions(+), 16 deletions(-) diff --git a/pages/basics/stockQuery.vue b/pages/basics/stockQuery.vue index bb5f8a4..6b36a6b 100644 --- a/pages/basics/stockQuery.vue +++ b/pages/basics/stockQuery.vue @@ -6,21 +6,24 @@ </view> <view class="cu-form-group margin-top"> <view class="title">浜у搧</view> - <input v-model="matNo" placeholder="浜у搧ID" name="input" @input="findByMatNo()"></input> + <input v-model="matNo" placeholder="浜у搧" name="input" @input="findByMatNo()"></input> </view> + <view class="margin-top"> <uni-table border stripe emptyText="鏆傛棤鏇村鏁版嵁"> <uni-tr> - <uni-th width="90">浜у搧ID</uni-th> - <uni-th width="90">浜у搧鍚嶇О</uni-th> - <uni-th width="90">搴撲綅</uni-th> - <uni-th width="70">鏁伴噺</uni-th> + <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>{{item.matNo}}</uni-td> - <uni-td>{{item.matName}}</uni-td> - <uni-td>{{item.locNo}}</uni-td> - <uni-td>{{item.count}}</uni-td> + <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> @@ -45,6 +48,8 @@ matNo:'', locDetlData:[], basePORT:'', + msgType: '', + messageText: '', } }, mounted(){ @@ -59,6 +64,11 @@ that.locNo = ''; that.matNo = ''; that.locDetlData = []; + }, + messageToggle(type) { + this.msgType = type + this.messageText = '鎻愬彇澶辫触' + this.$refs.message.open() }, // 鏍规嵁搴撲綅鍙锋煡鎵惧簱瀛樻槑缁� findByLocNo(){ @@ -91,14 +101,23 @@ }, method: 'POST', success(res) { - if(res.data.code === 200){ - if(res.data.data != null){ + console.log(res) + if(res.data.code === 200) { + if(res.data.data != null) { that.locDetlData = res.data.data - } else if (res.data.code ===403){ - - } else { - - } + }; + } else if (res.data.code ===403) { + uni.navigateBack({ + delta: 1 + }) + } else { + console.log(1) + uni.showToast({ + title: res.data.msg, + icon: 'error', + duration: 1500 + }); + } } }) -- Gitblit v1.9.1