Commit e1972a83 by LJM

移动端拣货打印标签显示异常

parent 9517a3e0
......@@ -56,12 +56,12 @@
<!-- 出库单状态为全部锁库,则显示【释放】、【选择】按钮 -->
<template v-if="item.stock_out_status == 3">
<view class="btn1 row rowCenter verCenter" @click="cancelTake(item.stock_out_id)">释放</view>
<navigator :url="'/pages/picking/sort?stock_out_id=' + item.stock_out_id + '&stock_out_sn=' + item.stock_out_sn" hover-class="none" class="btn3 row rowCenter verCenter">选择</navigator>
<navigator :url="'/pages/picking/sort?stock_out_id=' + item.stock_out_id + '&stock_out_sn=' + item.stock_out_sn+'&warehouse_id='+item.warehouse_id" hover-class="none" class="btn3 row rowCenter verCenter">选择</navigator>
</template>
<!--出库单状态为部分拣货-->
<template v-if="item.stock_out_status == 4">
<navigator :url="'/pages/picking/sort?stock_out_id=' + item.stock_out_id + '&stock_out_sn=' + item.stock_out_sn" hover-class="none" class="btn3 row rowCenter verCenter">选择</navigator>
<navigator :url="'/pages/picking/sort?stock_out_id=' + item.stock_out_id + '&stock_out_sn=' + item.stock_out_sn+'&warehouse_id='+item.warehouse_id" hover-class="none" class="btn3 row rowCenter verCenter">选择</navigator>
</template>
<!--出库单状态为全部拣货-->
......@@ -80,124 +80,124 @@
</template>
<script>
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
export default {
data() {
return {
input_flag: false,
index: 0,
array: ['出库单号'],
list: [],
page: 1,
limit: 20,
hasMoreData: true, //是否分页加载
searchParams: {
stock_out_sn: '' //出库单号
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
export default {
data() {
return {
input_flag: false,
index: 0,
array: ['出库单号'],
list: [],
page: 1,
limit: 20,
hasMoreData: true, //是否分页加载
searchParams: {
stock_out_sn: '' //出库单号
}
};
},
onNavigationBarButtonTap(e) {
if (e.index == 0) {
uni.reLaunch({
url: '/pages/index/index'
});
}
};
},
onNavigationBarButtonTap(e) {
if (e.index == 0) {
uni.reLaunch({
url: '/pages/index/index'
});
}
},
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
onShow() {
this.getData();
},
methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
},
/**
* 清空数据
*/
clearInput() {
this.input_flag = false;
this.searchParams.stock_out_sn = '';
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
/**
* 单号搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
this.resetChange();
var val = event.target.value;
this.searchParams.stock_out_sn = '';
if (val) {
this.input_flag = true;
this.searchParams.stock_out_sn = val;
} else {
this.input_flag = false;
}
onShow() {
this.getData();
}, 500),
/**
* 释放已领取拣货单
*/
cancelTake(stock_out_id) {
this.request(API.cancelTake, 'POST', { stock_out_id: stock_out_id }, true).then(res => {
if (res.code === 0) {
uni.showToast({
title: '释放成功',
icon: 'success'
});
setTimeout(() => {
this.getData();
this.filter_id = [];
}, 2000);
},
methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
},
/**
* 清空数据
*/
clearInput() {
this.input_flag = false;
this.searchParams.stock_out_sn = '';
this.getData();
},
/**
* 单号搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
this.resetChange();
var val = event.target.value;
this.searchParams.stock_out_sn = '';
if (val) {
this.input_flag = true;
this.searchParams.stock_out_sn = val;
} else {
uni.showModal({
itle: '提示',
content: res.msg,
showCancel: false
});
this.input_flag = false;
}
});
},
/**
* 获取列表数据
*/
getData() {
this.request(API.getTakedList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
if (res.data.list.length > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
this.getData();
}, 500),
/**
* 释放已领取拣货单
*/
cancelTake(stock_out_id) {
this.request(API.cancelTake, 'POST', { stock_out_id: stock_out_id }, true).then(res => {
if (res.code === 0) {
uni.showToast({
title: '释放成功',
icon: 'success'
});
setTimeout(() => {
this.getData();
this.filter_id = [];
}, 2000);
} else {
this.hasMoreData = false;
uni.showModal({
itle: '提示',
content: res.msg,
showCancel: false
});
}
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
}
});
},
/**
* 重置
*/
resetChange() {
this.list = [];
this.page = 1;
});
},
/**
* 获取列表数据
*/
getData() {
this.request(API.getTakedList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
if (res.data.list.length > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
} else {
this.hasMoreData = false;
}
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
}
});
},
/**
* 重置
*/
resetChange() {
this.list = [];
this.page = 1;
}
}
}
};
};
</script>
<style scoped lang="scss">
@import '@/assets/css/picking/me.scss';
</style>
@import '@/assets/css/picking/me.scss';
</style>
\ No newline at end of file
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