Commit e1972a83 by LJM

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

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