|  |  |  | 
|---|
|  |  |  | <view class="square-content"> | 
|---|
|  |  |  | <view class="content-input"> | 
|---|
|  |  |  | <input  v-model="barcode" type="text" placeholder="扫码 / 输入" maxlength="10" | 
|---|
|  |  |  | :focus="barcodeFocus" @input="barcodeInput"> | 
|---|
|  |  |  | :focus="barcodeFocus" @input="barcodeInput" placeholder-style="line-height:  85rpx;"> | 
|---|
|  |  |  | <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | 
|---|
|  |  |  | <view class="square-content"> | 
|---|
|  |  |  | <view class="content-input"> | 
|---|
|  |  |  | <input v-model="order" type="text" placeholder="扫码 / 输入" @input="findOrder()" | 
|---|
|  |  |  | :focus="focus"> | 
|---|
|  |  |  | :focus="focus" placeholder-style="line-height:  85rpx;"> | 
|---|
|  |  |  | <uni-icons type="closeempty" size="20" color="#dadada" @click="removeOrder()"></uni-icons> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | commonUrl:null, | 
|---|
|  |  |  | barcode: '', | 
|---|
|  |  |  | barcodeFocus:true, | 
|---|
|  |  |  | focus:false, | 
|---|
|  |  |  | 
|---|
|  |  |  | 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 | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 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({ | 
|---|
|  |  |  | orderNo: that.orderNo, | 
|---|
|  |  |  | barcode: that.barcode, | 
|---|
|  |  |  | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | uni.showToast({ | 
|---|
|  |  |  | title: res.msg, | 
|---|
|  |  |  | position: 'bottom', | 
|---|
|  |  |  | position: 'top', | 
|---|
|  |  |  | duration: 1000 | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | that.barcode = '' | 
|---|
|  |  |  | that.orderNo = '' | 
|---|
|  |  |  | that.order = '' | 
|---|
|  |  |  | that.matList = [] | 
|---|
|  |  |  | that.resst() | 
|---|
|  |  |  | } else if (res.code == 403) { | 
|---|
|  |  |  | uni.showToast({title: res.msg, icon: "none", position: 'top'}) | 
|---|
|  |  |  | setTimeout(() => { | 
|---|
|  |  |  | 
|---|
|  |  |  | findOrder() { | 
|---|
|  |  |  | let that = this | 
|---|
|  |  |  | uni.request({ | 
|---|
|  |  |  | url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/order/search/orderNo/auth', | 
|---|
|  |  |  | url: that.commonUrl + '/mobile/order/search/orderNo/auth', | 
|---|
|  |  |  | data: { | 
|---|
|  |  |  | orderNo: that.order | 
|---|
|  |  |  | }, | 
|---|