From 02b5b5cf1ae11b8c0cc410dfafe4f129aacd3d0c Mon Sep 17 00:00:00 2001 From: whycq <123456> Date: 星期二, 16 八月 2022 16:27:11 +0800 Subject: [PATCH] Merge branch 'hylywms' of http://47.97.1.152:5880/r/~whycq/wms-app into hylywms --- pages/basics/pakin.vue | 37 +++++++++++++++++++++++-------------- 1 files changed, 23 insertions(+), 14 deletions(-) diff --git a/pages/basics/pakin.vue b/pages/basics/pakin.vue index 30ccf64..e382528 100644 --- a/pages/basics/pakin.vue +++ b/pages/basics/pakin.vue @@ -9,7 +9,7 @@ <view class="square-content"> <view class="content-input"> <input v-model="barcode" type="text" placeholder="鎵爜 / 杈撳叆" maxlength="10" - :focus="barcodeFocus" @input="barcodeInput"> + :focus="barcodeFocus" placeholder-style="line-height: 85rpx;"> <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons> </view> </view> @@ -24,7 +24,7 @@ <view class="square-content"> <view class="content-input-btn"> <input v-model="matnr" type="text" placeholder="鎵爜 / 杈撳叆" @input="findMat()" - :focus="focus"> + :focus="focus" placeholder-style="line-height: 85rpx;"> <uni-icons type="closeempty" size="20" color="#dadada" @click="removeMatnr()"></uni-icons> </view> <view class="content-btn"> @@ -38,7 +38,7 @@ <view class="square-title"> <view class="title-sign"><view class="sign"></view></view> <view class="title-text"><text>鍟嗗搧鍒楄〃</text></view> - <label v-show="matList.length != 0" style="float: right;margin-right: 20px;margin-top: 13px;"><uni-icons type="trash" size="25" color="#a5a5a5" @click="remove()"></uni-icons></label> + <!-- <label v-show="matList.length != 0" style="float: right;margin-right: 20px;margin-top: 13px;"><uni-icons type="trash" size="25" color="#a5a5a5" @click="remove()"></uni-icons></label> --> </view> </view> @@ -49,9 +49,9 @@ <checkbox-group @change="checkbox"> <view v-for="(item,index) in matList" :key="index" class="data-list bg-false" :class="'bg-'+item.checked" > <view class="data-list-left"> - <view class=""> + <!-- <view> <checkbox :value="item.id+''" :checked="item.checked" style="display: block;" /> - </view> + </view> --> <view class="matnr"><text style="width: 400rpx;">缂栫爜锛歿{item.matnr}}</text></view> <view><text style="width: 400rpx;">鍝佸悕锛歿{item.maktx}}</text></view> <view><text style="width: 400rpx;">鎵瑰彿锛歿{item.batch}}</text></view> @@ -61,7 +61,7 @@ </view> <view class="data-list-right"> <label><uni-icons type="compose" size="20" color="#a5a5a5" @click="revise(item,index)"></uni-icons></label> - + <label><uni-icons type="trash" size="25" color="#a5a5a5" @click="remove(item,index)"></uni-icons></label> </view> </view> </checkbox-group> @@ -70,12 +70,12 @@ <!-- 搴曢儴鎸夐挳 --> <view class="footer flex justify-around"> - <label class="label-btn" style="width: 170rpx;"> + <!-- <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> --> <label class="label-btn" style="width: 150rpx;"> <button class="cu-btn" @click="resst()">閲嶇疆</button> @@ -116,6 +116,7 @@ export default { data() { return { + commonUrl:null, barcode: '', barcodeFocus:true, focus:false, @@ -123,7 +124,7 @@ searchBox: 'hide', pick:'hide', matnr:'', - matList:[{matnr:"1100758-10004",maktx:"JK-T9270D-12-2PL-Q-(3/16)",batch:"12",anfme:"1"}], + matList:[], result: '', enableQty:'', count:'', @@ -137,7 +138,7 @@ }, onShow() { setTimeout(()=>{ - this.focuss() + // this.focuss() }, 100); }, @@ -146,8 +147,15 @@ this.baseIP = UIP; const UPORT = uni.getStorageSync('UPORT'); this.basePORT = UPORT + const PROJ = uni.getStorageSync('UPROJ'); + this.baseUrl = PROJ + this.getUrl() }, methods: { + // 鑾峰彇url + getUrl() { + this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl + }, // barcode input 浜嬩欢 barcodeInput() { var len = this.barcode.length @@ -185,7 +193,7 @@ resst() { this.matList = [] this.barcode = '' - this.focuss() + this.barcodeFocuss() uni.vibrateShort(); }, removeBarcode() { @@ -227,7 +235,7 @@ } uni.showLoading(); uni.request({ - url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/comb/auth', + url: that.commonUrl + '/mobile/comb/auth', data: JSON.stringify({ barcode: that.barcode, combMats: that.matList @@ -273,7 +281,7 @@ }, success: function(res) { // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 - res.eventChannel.emit('acceptDataFromOpenerPage', {baseIP:that.baseIP, basePORT:that.basePORT }) + res.eventChannel.emit('acceptDataFromOpenerPage', {commonUrl:that.commonUrl }) }, }); @@ -282,7 +290,7 @@ findMat() { let that = this uni.request({ - url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mat/auth', + url: that.commonUrl + '/mat/auth', data: { matnr:that.matnr }, @@ -395,6 +403,7 @@ }, // 鍒楄〃鍏ㄩ�� allChecked(e){ + if (this.check == true) { for (var i = 0; i < this.matList.length;i++) { this.$set(this.matList[i],'checked',false) -- Gitblit v1.9.1