Commit 3a1c28d5 by LJM

理货记录

parent a159de65
Showing with 29 additions and 11 deletions
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<text class="check-box-icon" :class="{ curr: filter_list.length == filter_id.length }"></text> <text class="check-box-icon" :class="{ curr: filter_list.length == filter_id.length }"></text>
<text class="text">全选</text> <text class="text">全选</text>
</view> </view>
<view class="btn3 row rowCenter verCenter" @click="cancelTallyReceive()">取消理货</view> <view class="btn3 row rowCenter verCenter" @click="cancelTallyReceive(1)">取消理货</view>
<view class="btn2 row rowCenter verCenter" style="width: calc(100% - 308rpx);">批量打印入库标签</view> <view class="btn2 row rowCenter verCenter" style="width: calc(100% - 308rpx);">批量打印入库标签</view>
</view> </view>
<!-- 理货详情弹窗 --> <!-- 理货详情弹窗 -->
...@@ -171,10 +171,10 @@ ...@@ -171,10 +171,10 @@
<view class="pic-list"> <view class="pic-list">
<view class="pic-title">理货照片:</view> <view class="pic-title">理货照片:</view>
<view class="row pic-wrap"> <view class="row pic-wrap">
<view class="box" v-for="(item, index) in image_list" :key="index"><image :src="item" mode="aspectFill" lazy-load="true"></image></view> <view class="box" v-for="(item, index) in image_list" :key="index"><image @click="previewChange(image_list, index)" :src="item" mode="aspectFill" lazy-load="true"></image></view>
</view> </view>
</view> </view>
<view class="btn row verCenter bothSide"><view class="btn1 row rowCenter verCenter" @click="closeDrawer()">取消理货</view></view> <view class="btn row verCenter bothSide"><view class="btn1 row rowCenter verCenter" @click="cancelTallyReceive(2, detail.tally_id)">取消理货</view></view>
</view> </view>
</uni-drawer> </uni-drawer>
</view> </view>
...@@ -312,21 +312,27 @@ export default { ...@@ -312,21 +312,27 @@ export default {
/** /**
* 取消理货 * 取消理货
*/ */
cancelTallyReceive() { cancelTallyReceive(type, ids) {
if (this.filter_id.length == 0) { if (type == 1) {
uni.showToast({ if (this.filter_id.length == 0) {
title: '请选择货品', uni.showToast({
icon: 'error' title: '请选择货品',
}); icon: 'error'
return false; });
return false;
}
var tally_id = this.filter_id.join(',');
} else {
var tally_id = ids;
} }
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '确定要取消理货吗?', content: '确定要取消理货吗?',
showCancel: true, showCancel: true,
success: res => { success: res => {
if (res.confirm) { if (res.confirm) {
this.request(API.cancelTallyReceive, 'POST', { tally_id: this.filter_id.join(',') }, false).then(res => { this.request(API.cancelTallyReceive, 'POST', { tally_id: tally_id }, true).then(res => {
if (res.code === 0) { if (res.code === 0) {
uni.showToast({ uni.showToast({
title: '取消理货成功', title: '取消理货成功',
...@@ -335,6 +341,7 @@ export default { ...@@ -335,6 +341,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.getData(); this.getData();
this.filter_id = []; this.filter_id = [];
this.closeDrawer();
}, 2000); }, 2000);
} else { } else {
uni.showModal({ uni.showModal({
...@@ -350,6 +357,17 @@ export default { ...@@ -350,6 +357,17 @@ export default {
} }
} }
}); });
},
/**
* 预览图片
* @param {Object} img
* @param {Object} index
*/
previewChange(img, index) {
uni.previewImage({
current: index,
urls: img
});
} }
} }
}; };
......
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