From 54fce333aae7d6f596616a6eb5e65c27c28a9994 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期三, 21 八月 2024 12:39:26 +0800 Subject: [PATCH] # --- pages/basics/orderPakin.vue | 70 +++++++++++++++++++++++++++++------ 1 files changed, 58 insertions(+), 12 deletions(-) diff --git a/pages/basics/orderPakin.vue b/pages/basics/orderPakin.vue index 6da0e04..924b359 100644 --- a/pages/basics/orderPakin.vue +++ b/pages/basics/orderPakin.vue @@ -39,11 +39,19 @@ <radio :checked="ck2" style="margin-left: 50rpx;"/><text>鍚�</text> </label> </radio-group> - <!-- <radio :value="yes" style="margin-left: 100rpx;">鏄�</radio> - <radio :value="no" style="margin-left: 50rpx;">鍚�</radio> --> </view> </view> + <view class="square-1"> + <view class="square-title" style="display: flex;align-items: center;"> + <view class="title-sign"><view class="sign"></view></view> + <view class="title-text" style="flex: 1;"><text>鍟嗗搧绫诲瀷</text></view> + <view style=""> + <uni-combox style="width: 150px;margin-right: 10px;" :candidates="matTypes" placeholder="璇烽�夋嫨鍟嗗搧绫诲瀷" + v-model="matType"></uni-combox> + </view> + </view> + </view> <view class="square-2"> <view class="square-title"> @@ -89,10 +97,13 @@ <view><text style="width: 400rpx;">鍏ュ簱鍖哄煙锛歿{item.matType$}}</text></view> <view><text style="width: 400rpx;">鎵瑰彿锛歿{item.batch}}</text></view> <view><text style="width: 400rpx;">瀹㈡埛淇℃伅锛歿{item.owner}}</text></view> - <view> + <text style="width: 400rpx;">澶囨敞锛歿{item.memo}}</text> + <text style="width: 400rpx;margin-left: 100rpx;color: blue;" v-show="orderNo">宸插叆/鎬绘暟锛歿{item.qty}} / {{item.total}}</text> + <view><text style="width: 400rpx;">鏈鍏ュ簱锛歿{item.enterCount}}</text></view> + <!-- <view> <text style="width: 400rpx;">澶囨敞锛歿{item.memo}}</text> - <text style="width: 400rpx;margin-left: 100rpx">鏁伴噺锛歿{item.anfme}}</text> - </view> + <text style="width: 400rpx;margin-left: 100rpx;color: blue;">宸插叆/鎬绘暟锛歿{item.qty}} / {{item.anfme}}</text> + </view> --> <!-- <view> <text style="width: 400rpx;">鏁伴噺锛歿{item.anfme}}</text> </view> --> @@ -184,13 +195,17 @@ check:false, checkText:'鍏ㄩ��', checkedData:[], + matType: '', + matTypes: ['鍗曞搧鐗╂枡','楂橀娣峰悎鐗╂枡','浣庨娣峰悎鐗╂枡'], + matTypeId: 0, batch:'', memo: '', cstmr: '', ck1: false, ck2: true, frozen: 0, - owner: '' + owner: '', + enterCount: 0 } }, onShow() { @@ -222,10 +237,14 @@ header: { 'token':uni.getStorageSync('token') }, success(res) { res = res.data + console.log(res); if (res.code === 200 ) { + for(let k in res.data) { + res.data[k]['total'] = res.data[k].anfme + res.data[k]['enterCount'] = res.data[k].anfme - res.data[k].qty + } _this.matList = res.data } - console.log(res); } }) @@ -271,7 +290,11 @@ var len = this.barcode.length if (len != 8) { uni.showToast({title: '鎵樼洏鐮佹湁璇閲嶈瘯', icon: "none", position: 'top'}); - this.barcodeFocuss() + this.orderNoFocus = false; + setTimeout(()=>{ + this.barcode = ''; + this.orderNoFocus = true; + }, 100); return; } this.focuss() @@ -280,10 +303,10 @@ // 鎵樼洏鐮佹湁璇噸缃� barcodeFocuss() { let that = this; - that.barcodeFocus = false; + that.orderNoFocus = false; setTimeout(()=>{ that.barcode = ''; - that.barcodeFocus = true; + that.orderNoFocus = true; }, 100); }, // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 @@ -301,6 +324,9 @@ this.matList = [] this.barcode = '' this.matnr = '' + this.orderNo = '' + this.matType = '' + this.matTypeId = 0 this.barcodeFocuss() uni.vibrateShort(); }, @@ -358,6 +384,10 @@ } } } + for (let k in that.matList) { + that.matList[k].anfme = that.matList[k].enterCount + } + this.getMatTypeIn(this.matType) uni.showLoading(); uni.request({ url: that.commonUrl + '/mobile/comb/auth', @@ -365,6 +395,7 @@ frozen: that.frozen, barcode: that.barcode, orderNo: that.orderNo, + matTypeIn: that.matTypeId, combMats: that.matList }), method: 'POST', @@ -403,6 +434,21 @@ } } }); + }, + getMatTypeIn(type) { + switch (type) { + case '鍗曞搧鐗╂枡': + this.matTypeId = 1 + break; + case '楂橀娣峰悎鐗╂枡': + this.matTypeId = 2 + break; + case '浣庨娣峰悎鐗╂枡': + this.matTypeId = 3 + break; + default: + this.matType = 0 + } }, selectMat() { let that = this @@ -526,7 +572,7 @@ uni.vibrateShort(); }, revise(item,index) { - this.count = this.matList[index].anfme + this.count = this.matList[index].enterCount this.batch = this.matList[index].batch this.memo = this.matList[index].memo this.cstmr = this.matList[index].cstmr @@ -542,7 +588,7 @@ this.count = value }, confirm() { - this.matList[this.rowNum].anfme = this.count + this.matList[this.rowNum].enterCount = this.count this.matList[this.rowNum].batch = this.batch this.matList[this.rowNum].memo = this.memo this.matList[this.rowNum].cstmr = this.cstmr -- Gitblit v1.9.1