| | |
| | | </view> |
| | | |
| | | </form> |
| | | <view class="cu-form-group" v-show="isClickItem"> |
| | | <!-- <view class="cu-form-group" v-show="isClickItem"> |
| | | <view class="title">QR码</view> |
| | | <input placeholder="请扫描QR码" v-model="QRbarcode" ></input> |
| | | |
| | | </view> |
| | | </view> --> |
| | | |
| | | |
| | | <view class="cu-list det menu sm-border padding"> |
| | |
| | | |
| | | <view class="cu-bar btn-group foot" > |
| | | <button class="cu-btn text-blue line-blue shadow" @click="clear">清空</button> |
| | | <button class="cu-btn bg-blue shadow-blur" @click="next">提交</button> |
| | | <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="complete">提交确认</button> |
| | | </view> |
| | | |
| | | |
| | |
| | | backgroundColor: '#42b983', |
| | | borderColor: '#42b983' |
| | | }, |
| | | repeatClick: false |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | |
| | | |
| | | }, |
| | | async complete() { |
| | | let that = this |
| | | if(that.barcode === '' || that.barcode === null){ |
| | | uni.showToast({ |
| | | title: "容器号为空", |
| | | icon: "error", |
| | | }) |
| | | return ; |
| | | } |
| | | if(that.list === [] || that.list.length === 0){ |
| | | uni.showToast({ |
| | | title: "拣货明细为空", |
| | | icon: "error", |
| | | }) |
| | | return ; |
| | | } |
| | | that.repeatClick = true |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/saveOutTaskSts/'+that.barcode,{}, 'get') |
| | | if (code === 200) { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: "success" |
| | | }) |
| | | that.clear() |
| | | |
| | | }else if(code == 401){ |
| | | setTimeout(() => { |
| | | uni.removeStorageSync('token'); |
| | | uni.reLaunch({ |
| | | url: "/pages/login/login" |
| | | }); |
| | | }, 1000); |
| | | }else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: "none", |
| | | position: 'top' |
| | | }) |
| | | } |
| | | that.repeatClick = false |
| | | |
| | | }, |
| | | clearCode() { |
| | | this.barcode = '' |
| | | }, |