Commit 3a1c28d5 by LJM

理货记录

parent a159de65
Showing with 23 additions and 5 deletions
......@@ -69,7 +69,7 @@
<text class="check-box-icon" :class="{ curr: filter_list.length == filter_id.length }"></text>
<text class="text">全选</text>
</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>
<!-- 理货详情弹窗 -->
......@@ -171,10 +171,10 @@
<view class="pic-list">
<view class="pic-title">理货照片:</view>
<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 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>
</uni-drawer>
</view>
......@@ -312,7 +312,8 @@ export default {
/**
* 取消理货
*/
cancelTallyReceive() {
cancelTallyReceive(type, ids) {
if (type == 1) {
if (this.filter_id.length == 0) {
uni.showToast({
title: '请选择货品',
......@@ -320,13 +321,18 @@ export default {
});
return false;
}
var tally_id = this.filter_id.join(',');
} else {
var tally_id = ids;
}
uni.showModal({
title: '提示',
content: '确定要取消理货吗?',
showCancel: true,
success: res => {
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) {
uni.showToast({
title: '取消理货成功',
......@@ -335,6 +341,7 @@ export default {
setTimeout(() => {
this.getData();
this.filter_id = [];
this.closeDrawer();
}, 2000);
} else {
uni.showModal({
......@@ -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