From 1e7de5b9103999800062f1e6b18d94fd93f3ef06 Mon Sep 17 00:00:00 2001 From: LSH Date: 星期五, 23 九月 2022 14:21:03 +0800 Subject: [PATCH] #可回退版本 --- pages/basics/stoOut.vue | 157 +++++++++++++++++++++++++--------------------------- 1 files changed, 75 insertions(+), 82 deletions(-) diff --git a/pages/basics/stoOut.vue b/pages/basics/stoOut.vue index ecf37fc..743467f 100644 --- a/pages/basics/stoOut.vue +++ b/pages/basics/stoOut.vue @@ -39,6 +39,9 @@ <checkbox-group @change="checkbox"> <view v-for="(item,index) in matList" :key="index" class="data-list bg-false" :class="'bg-'+item.checked" > + <!-- <label class="left-check-box"> + <checkbox :value="item.id+''" :checked="item.checked" style="display: block;" /> + </label> --> <view class="data-list-left"> <view class="matnr"><text style="width: 700rpx;">缂栫爜锛歿{item.matnr}}</text></view> <view><text style="width: 700rpx;">鍝佸悕锛歿{item.maktx}}</text></view> @@ -47,11 +50,40 @@ <text style="width: 700rpx;">鏁伴噺锛歿{item.anfme}}</text> </view> </view> + <view class="data-list-right"> + <!-- <label><uni-icons type="compose" size="20" color="#a5a5a5" @click="revise(item,index)"></uni-icons></label> --> + <!-- list涓垹闄ら敭 --> + <!-- <label><uni-icons type="trash" size="25" color="#a5a5a5" @click="remove(item,index)"></uni-icons></label> --> + </view> </view> </checkbox-group> + <!-- <view style="margin-top: 10px;"> + <uni-table ref="table" border stripe emptyText="鏆傛棤鏇村鏁版嵁"> + <uni-tr> + <uni-th align="center" width="50">鍑哄簱鏁伴噺</uni-th> + <uni-th align="center" width="70">浜у搧ID</uni-th> + <uni-th align="center" width="80">浜у搧浠e彿</uni-th> + <uni-th align="center" width="70">浜у搧鍚嶇О</uni-th> + </uni-tr> + <uni-tr v-for="(item, index) in matList" :key="index"> + <uni-td align="center">{{item.qty}}</uni-td> + <uni-td align="center">{{item.matNo}}</uni-td> + <uni-td align="center">{{item.size}}</uni-td> + <uni-td align="center">{{item.matName}}</uni-td> + </uni-tr> + </uni-table> + </view> --> <!-- 搴曢儴鎸夐挳 --> <view class="footer flex justify-around"> + <!-- 搴曢儴鍏ㄩ�� 鍙嶉�夋寜閽� --> + <!-- <label class="label-btn" style="width: 170rpx;"> + <checkbox :checked="check" @click="allChecked()">{{checkText}}</checkbox> + </label> + <label class="label-btn" style="width: 100rpx;"> + <text @click="reChecked()">鍙嶉��</text> + </label> --> + <label class="label-btn" style="width: 150rpx;"> <button class="cu-btn" @click="resst()">閲嶇疆</button> </label> @@ -73,21 +105,14 @@ siteId: '' } }, - mounted(){ - const UIP = uni.getStorageSync('UIP'); - this.baseIP = UIP; - const UPORT = uni.getStorageSync('UPORT'); - this.basePORT = UPORT - const PROJ = uni.getStorageSync('UPROJ'); - this.baseUrl = PROJ - this.getUrl() - this.staNoSelect(); - }, + mounted(){ + const UIP = uni.getStorageSync('UIP'); + this.baseIP = UIP; + const UPORT = uni.getStorageSync('UPORT'); + this.basePORT = UPORT; + this.staNoSelect(); + }, methods: { - // 鑾峰彇url - getUrl() { - this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl - }, // 娓呯┖鍗曞彿鎼滅储妗� removeLocNo() { this.locNo = null @@ -95,7 +120,7 @@ searchLocNo() { let that = this; uni.request({ - url: that.commonUrl + "/locDetl/list/auth", + url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/locDetl/list/auth", header: { 'content-type':"application/x-www-form-urlencoded", 'token':uni.getStorageSync('token') @@ -129,7 +154,7 @@ staNoSelect() { let that = this; uni.request({ - url: that.commonUrl + "/available/take/site", + url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/available/take/site", header: {'token':uni.getStorageSync('token')}, success(result) { let res = result.data @@ -153,77 +178,45 @@ }, outbound() { let that = this - console.log(that.locNo) - if(that.locNo === ''||that.locNo===null){ - uni.showToast({title: "杈撳叆鏉$爜", icon: "none",position: 'top'}) - return; - } - if (that.siteId === '') { - uni.showToast({title: "璇烽�夋嫨鍑哄簱鍙�", icon: "none",position: 'top'}) - return; - } - - if (that.matList.length === 0) { - var staNo = that.siteId.substring(0,3) - var getlocNo = []; - getlocNo.push(that.locNo); - uni.request({ - url: that.commonUrl + "/empty/pda/plate/out/start", - header: { - 'token':uni.getStorageSync('token')}, - data: { - outSite: staNo, - locNos: getlocNo - }, - method:"POST", - traditional:true, - success(result) { - console.log(result) - if (result.data.code === 200) { - uni.showToast({title: result.data.msg, icon: "none",position: 'top'}) - that.resst() - } else { - uni.showToast({title: result.data.msg, icon: "none",position: 'top'}) - } - } - }) - - }else{ - var staNo = that.siteId.substring(0,3) - var locDetls = []; - that.matList.forEach(function(elem) { - console.log(elem) - locDetls.push({locNo:elem.locNo,matnr:elem.matnr, batch: elem.batch, count: elem.anfme,}); - }); - let param = { - outSite: staNo, - locDetls: locDetls - } - console.log("param") - console.log(param) - uni.request({ - url: that.commonUrl + "/plate/out/start", - header: { - 'token':uni.getStorageSync('token')}, - data: JSON.stringify(param), - method:"POST", - success(result) { - console.log(result) - if (result.data.code === 200) { - uni.showToast({title: result.data.msg, icon: "none",position: 'top'}) - that.resst() - } else { - uni.showToast({title: result.data.msg, icon: "none",position: 'top'}) - } - } - }) - } + if (that.matList.length === 0) { + uni.showToast({title: "璇烽�夋嫨鍑哄簱鍙�", icon: "none",position: 'top'}) + } else { + if (that.siteId == '') { + uni.showToast({title: "璇烽�夋嫨鍑哄簱鍙�", icon: "none",position: 'top'}) + return; + } + }; + var staNo = that.siteId.substring(0,3) + var locDetls = []; + that.matList.forEach(function(elem) { + console.log(elem) + locDetls.push({locNo:elem.locNo,matnr:elem.matnr, batch: elem.batch, count: elem.anfme,}); + }); + let param = { + outSite: staNo, + locDetls: locDetls + } + uni.request({ + url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/plate/out/start", + header: { + 'token':uni.getStorageSync('token')}, + data: JSON.stringify(param), + method:"POST", + success(result) { + console.log(result) + if (result.data.code === 200) { + uni.showToast({title: result.data.msg, icon: "none",position: 'top'}) + that.resst() + } else { + uni.showToast({title: result.data.msg, icon: "none",position: 'top'}) + } + } + }) }, resst() { this.billNo = ''; this.matList = []; this.siteId = ''; - this.locNo = null } } } -- Gitblit v1.9.1