Commit 8dc38d15 by LJM

j

parent d9123703
Showing with 68 additions and 0 deletions
<template>
<view class="logisticsList">
<view class="row seldate-box"><uni-datetime-picker type="daterange" v-model="range" @change="bindDateChange" /></view>
<view class="scan column rowCenter verCenter" @click="scanChange(type)">
<text class="iconfont icon-ruku"></text>
<text class="tt">{{ type == 1 ? '扫码收货' : '扫码出库' }}</text>
</view>
</view>
</template>
<script>
import { API } from '@/util/api.js';
export default {
data() {
return {
type: '',
range: []
};
},
onLoad(options) {
this.type = options.type;
},
methods: {
bindDateChange(e) {
this.range = e;
},
scanChange(type) {
if (this.range.length <= 0) {
uni.showModal({
title: '提示',
content: '请选择时间段',
showCancel: false
});
return false;
}
uni.scanCode({
success: res => {
console.log(res);
if (res.errMsg == 'scanCode:ok') {
if (type == 1) {
uni.navigateTo({
url: '/pages/pda/warehousing?number=' + res.result + '&startTime=' + this.range[0] + '&endTime=' + this.range[1]
});
}
if (type == 2) {
uni.navigateTo({
url: '/pages/pda/exWarehouse?number=' + res.result + '&startTime=' + this.range[0] + '&endTime=' + this.range[1]
});
}
}
},
fail: res => {
console.log(res);
uni.showToast({
title: '扫码失败',
icon: 'error'
});
}
});
}
}
};
</script>
<style scoped lang="scss">
@import '../../assets/css/pda/logisticsList.scss';
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment