Commit 673d5237 by LJM

移动端--【理货记录】增加理货时间筛选、增加理货照片补录、编辑等优化

parent efb302d9
Showing with 48 additions and 2 deletions
......@@ -401,12 +401,20 @@
container_id: '', //容器,
tally_status: 0, //默认显示已理货
stock_tally_with_stock_in_stock_in_type_in: '' //入库类型
},
changeStockTallyImagesParams: {
tally_id: '',
image_ids: ''
}
};
},
watch: {
image_list(arr) {
if (arr.length > 0) {
this.changeStockTallyImagesParams.image_ids = arr.join(',');
} else {
this.changeStockTallyImagesParams.image_ids = '';
}
}
},
onReachBottom() {
......@@ -437,6 +445,11 @@
tab(index) {
this.curr = index;
},
/**
* @param {Object} e
* @param {Object} type
* 筛选状态切换
*/
radioChange(e, type) {
this.resetChange();
if (type == 1) {
......@@ -583,9 +596,16 @@
}
this.getData();
}, 500),
/**
* @param {Object} data
* 详情弹窗
*/
showDrawer(data) {
this.$refs.showRight.open();
this.detail = data;
this.changeStockTallyImagesParams.tally_id = data.tally_id; //赋值理货ID
this.image_list = []; //每次先清空理货图片
//理货图片集合
if (data.image_ids) {
this.image_list = data.image_ids.split(',');
}
......@@ -615,6 +635,22 @@
});
},
/**
* 修改理货照片
*/
changeStockTallyImages() {
this.request(API.changeStockTallyImages, 'POST', this.changeStockTallyImagesParams, false).then(res => {
if (res.code === 0) {
} else {
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false
});
}
});
},
/**
* 提交
*/
submitTallyReceive() {
......@@ -808,6 +844,9 @@
let data = JSON.parse(uploadFileRes.data);
if (data.code === 0) {
this.image_list.push(data.data.oss_image_url);
setTimeout(() => {
this.changeStockTallyImages(); //同步修改理货照片
}, 10)
} else {
uni.showToast({
title: data.msg,
......@@ -835,6 +874,9 @@
*/
deletePic(index) {
this.image_list.splice(index, 1);
setTimeout(() => {
this.changeStockTallyImages(); //同步修改理货照片
}, 10)
},
/**
* 预览图片
......
......@@ -334,7 +334,11 @@ const API = {
/**
* 快速移位记录
* */
quickTransferLog: API_BASE + '/api/transfer/quickTransferLog'
quickTransferLog: API_BASE + '/api/transfer/quickTransferLog',
/**
* 修改理货照片
* */
changeStockTallyImages: API_BASE + '/api/stockIn/tallyReceive/changeStockTallyImages'
}
......
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