Commit 40911097 by LJM

优化

parent 41fc4af2
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<view class="btn row rowCenter verCenter">上架</view> <view class="btn row rowCenter verCenter">上架</view>
</navigator> </navigator>
</view> </view>
<view class="row rowCenter verCenter" v-if="!hasMoreData && page > 1" style="color: #919399;font-size: 16px;padding: 10px 0;flex: 0 0 100%;">--已经到底了--</view> <view class="row rowCenter verCenter" v-if="!hasMoreData && page > 1" style="color: #999;font-size: 22rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view>
</view> </view>
<!-- 无数据展示 --> <!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<view class="row verCenter"> <view class="row verCenter">
<text class="iconfont icon-juxing1"></text> <text class="iconfont icon-juxing1"></text>
<template v-if="index == 0"> <template v-if="index == 0">
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" focus v-model="searchParams.mobile_wait_tally_all_search" @input="handleInput(1, $event)" /> <input class="uni-input" placeholder="请扫描或输入查询" placeholder-style="color:#919399" focus v-model="searchParams.mobile_wait_tally_all_search" @input="handleInput(1, $event)" />
</template> </template>
<template v-else-if="index == 1"> <template v-else-if="index == 1">
<input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" focus v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(2, $event)" maxlength="8" /> <input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" focus v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(2, $event)" maxlength="8" />
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<view class="search-bar row bothSide verCenter"> <view class="search-bar row bothSide verCenter">
<view class="row verCenter"> <view class="row verCenter">
<text class="iconfont icon-juxing1"></text> <text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请输入容器编码" placeholder-style="color:#919399" focus v-model="searchParams.container_name" @input="handleInput(3, $event)" /> <input class="uni-input" placeholder="请输入容器编码" placeholder-style="color:#919399" v-model="searchParams.container_name" @input="handleInput(3, $event)" />
</view> </view>
<view> <view>
<text class="iconfont icon-juxing3" @click="createTallyContainer()"></text> <text class="iconfont icon-juxing3" @click="createTallyContainer()"></text>
...@@ -120,11 +120,13 @@ ...@@ -120,11 +120,13 @@
<view class="btn row rowCenter verCenter">理货</view> <view class="btn row rowCenter verCenter">理货</view>
</navigator> </navigator>
</view> </view>
<view class="row rowCenter verCenter" v-if="!hasMoreData && page > 1" style="color: #999;font-size: 22rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view>
</view> </view>
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
<text class="iconfont icon-a-juxing21"></text> <text class="iconfont icon-a-juxing21"></text>
<text class="text">查不到当前数据</text> <text class="text">查不到当前数据</text>
</view> </view>
<!-- 底部bar -->
<view class="fix-btn row verCenter"> <view class="fix-btn row verCenter">
<view class="btn1 row rowCenter verCenter" @click="allChnage()"> <view class="btn1 row rowCenter verCenter" @click="allChnage()">
<text class="check-box-icon" :class="{ curr: filter_list.length > 0 && filter_list.length == filter_id.length }"></text> <text class="check-box-icon" :class="{ curr: filter_list.length > 0 && filter_list.length == filter_id.length }"></text>
...@@ -209,7 +211,7 @@ ...@@ -209,7 +211,7 @@
company_id: uni.getStorageSync('company_id') || 1, //公司组织 company_id: uni.getStorageSync('company_id') || 1, //公司组织
all_flag: false, //全选标记 all_flag: false, //全选标记
page: 1, page: 1,
limit: 50, limit: 50, //分页限制数量
index: 0, index: 0,
indexContainer: -1, indexContainer: -1,
array: ['全量搜索', '入仓号', 'FedEx', 'DigKey', 'Rochester'], array: ['全量搜索', '入仓号', 'FedEx', 'DigKey', 'Rochester'],
...@@ -233,7 +235,7 @@ ...@@ -233,7 +235,7 @@
formParams: { formParams: {
container_id: '', container_id: '',
tally_remark: '', tally_remark: '',
image_ids: '', image_ids: '', //理货照片集合
is_print: 1 is_print: 1
} }
}; };
...@@ -264,7 +266,7 @@ ...@@ -264,7 +266,7 @@
onShow() { onShow() {
if (this.noexebshowFalg) { if (this.noexebshowFalg) {
this.resetChange(); this.resetChange();
this.getTallyContainerDefault(); this.getData();
} }
}, },
methods: { methods: {
...@@ -325,55 +327,57 @@ ...@@ -325,55 +327,57 @@
/** /**
*刷新容器 *刷新容器
*/ */
createTallyContainer(type) { createTallyContainer() {
if (type == 1) { this.request(API.createTallyContainer, 'GET', {}, true).then(res => {
var params = {
is_mac: 1
};
} else {
var params = {};
}
this.request(API.createTallyContainer, 'GET', params, true).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.searchParams.container_name = res.data.container_sn; this.searchParams.container_name = res.data.container_sn; //赋值搜索参数容器名字
this.searchParams.container_id = res.data.id; this.searchParams.container_id = res.data.id; //赋值搜索参数容器id
this.formParams.container_id = res.data.id; this.formParams.container_id = res.data.id; //赋值参数容器id
this.is_submit = true; this.is_submit = true;
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'error' icon: 'none'
}); });
} }
}); });
}, },
/** /**
* 清空数据 * 清空数据 1(全量搜索,入仓号,FedEx,DigKey,Rochester,TME,Chip1stop)
* @param {Object} type
*/ */
clearInput(type) { clearInput(type) {
this.resetChange(); this.resetChange();
if (type == 1) { if (type == 1) {
this.input_flag = false; this.input_flag = false;
if (this.index == 0) { if (this.index == 0) {
//清空全量搜索
this.searchParams.mobile_wait_tally_all_search = ''; this.searchParams.mobile_wait_tally_all_search = '';
} else if (this.index == 1) { } else if (this.index == 1) {
//清空入仓号
this.searchParams.stock_in_with_stock_in_items_inhouse = ''; this.searchParams.stock_in_with_stock_in_items_inhouse = '';
} else if (this.index == 2) { } else if (this.index == 2) {
//清空FedEx
this.searchParams.tracking_no = ''; this.searchParams.tracking_no = '';
} else if (this.index == 3) { } else if (this.index == 3) {
//清空DigKey以及赋值的goods_name
this.searchParams.code_type = ''; this.searchParams.code_type = '';
this.searchParams.goods_name = ''; this.searchParams.goods_name = '';
} else if (this.index == 4) { } else if (this.index == 4) {
//清空Rochester供应商以及赋值的goods_name
this.searchParams.code_type = ''; this.searchParams.code_type = '';
this.searchParams.goods_name = ''; this.searchParams.goods_name = '';
} else if (this.index == 5) { } else if (this.index == 5) {
//清空TME供应商以及赋值的goods_name
this.searchParams.code_type = ''; this.searchParams.code_type = '';
this.searchParams.goods_name = ''; this.searchParams.goods_name = '';
} else if (this.index == 6) { } else if (this.index == 6) {
//清空Chip1stop供应商以及赋值的goods_name
this.searchParams.code_type = ''; this.searchParams.code_type = '';
this.searchParams.goods_name = ''; this.searchParams.goods_name = '';
} }
} else { } else {
//容器以及一键理货里面的容器
this.input_contaion = false; this.input_contaion = false;
this.searchParams.container_name = ''; this.searchParams.container_name = '';
this.searchParams.container_id = ''; this.searchParams.container_id = '';
...@@ -381,59 +385,60 @@ ...@@ -381,59 +385,60 @@
this.getData(); this.getData();
}, },
/** /**
* 单号搜索 * @param {Object} type 1:全量搜索 2:入仓号 3:一键理货的容器监听 0:FedEx
* @param {Object} event * @param {Object} event
* 单号搜索
*/ */
handleInput: debounce(function(type, event) { handleInput: debounce(function(type, event) {
var val = event.target.value; var val = event.target.value;
if (val) { if (val) {
if (type == 1) { if (type == 1) {
this.resetChange(); //全量搜索
this.searchParams.mobile_wait_tally_all_search = ''; this.resetChange(); //先清空数据
this.searchParams.stock_in_with_stock_in_items_inhouse = ''; this.searchParams.stock_in_with_stock_in_items_inhouse = ''; //清空入仓号字段
this.searchParams.tracking_no = ''; this.searchParams.tracking_no = ''; //清空FedEx
this.searchParams.code_type = ''; this.searchParams.code_type = ''; //清空DigKey等一系列供应商
this.searchParams.mobile_wait_tally_all_search = val; this.searchParams.mobile_wait_tally_all_search = val; //赋值全量搜索字段
this.input_flag = true; this.input_flag = true;
this.getData(); this.getData();
} else if (type == 2) { } else if (type == 2) {
//入仓号搜索
this.resetChange(); this.resetChange();
this.searchParams.mobile_wait_tally_all_search = ''; this.searchParams.mobile_wait_tally_all_search = ''; //清空全量搜索字段
this.searchParams.stock_in_with_stock_in_items_inhouse = ''; this.searchParams.tracking_no = ''; //清空FedEx
this.searchParams.tracking_no = ''; this.searchParams.code_type = ''; //清空DigKey等一系列供应商
this.searchParams.code_type = '';
//入仓号 //处理F号开头
var str = val; var str = val;
if (str.startsWith('F')) { if (str.startsWith('F')) {
this.searchParams.stock_in_with_stock_in_items_inhouse = val; this.searchParams.stock_in_with_stock_in_items_inhouse = val; //赋值入仓号
} else { } else {
this.searchParams.stock_in_with_stock_in_items_inhouse = str.slice(0, -1); this.searchParams.stock_in_with_stock_in_items_inhouse = str.slice(0, -1); //赋值入仓号
} }
this.input_flag = true; this.input_flag = true;
this.getData(); this.getData();
} else if (type == 3) {
//容器 && 一键理货的容器监听
this.searchParams.container_name = val;
this.input_contaion = true;
this.getTallyContainer();
//注意,此时不刷新列表,是给一键理货用的
} else if (type == 0) { } else if (type == 0) {
//选择了fedex //选择了fedex
this.resetChange(); this.resetChange();
this.searchParams.mobile_wait_tally_all_search = ''; this.searchParams.mobile_wait_tally_all_search = ''; //清空全量搜索字段
this.searchParams.stock_in_with_stock_in_items_inhouse = ''; this.searchParams.stock_in_with_stock_in_items_inhouse = ''; //清空入仓号字段
this.searchParams.tracking_no = ''; this.searchParams.code_type = ''; //清空DigKey等一系列供应商
this.searchParams.code_type = ''; // 规则处理FedEx截取后12位
let last12 = val.slice(22);
var last12 = val.slice(22); // 截取后12位 this.searchParams.tracking_no = last12; //赋值FedEx
this.searchParams.tracking_no = last12;
this.input_flag = true; this.input_flag = true;
this.getData(); this.getData();
} else if (type == 3) {
//一键理货的容器监听
this.searchParams.container_name = val;
this.input_contaion = true;
this.getTallyContainer();
} }
} else { } else {
if (type == 1 || type == 2) { if (type == 1 || type == 2 || type == 0) {
//清空全量搜索和入仓号搜索和FedEx
this.resetChange(); this.resetChange();
this.input_flag = false; this.input_flag = false;
this.getData(); this.getData();
...@@ -444,17 +449,20 @@ ...@@ -444,17 +449,20 @@
this.input_contaion = false; this.input_contaion = false;
} }
} }
}, 800), }, 500),
/**
* DigKey,Rochester,TME,Chip1stop供应商
* @param {Object} event
*
*/
handleInputChange: debounce(function(event) { handleInputChange: debounce(function(event) {
var val = event.target.value; var val = event.target.value;
if (val) { if (val) {
this.resetChange(); this.resetChange(); //先清空数据
this.searchParams.mobile_wait_tally_all_search = ''; this.searchParams.mobile_wait_tally_all_search = ''; //清空全量搜索字段
this.searchParams.stock_in_with_stock_in_items_inhouse = ''; this.searchParams.stock_in_with_stock_in_items_inhouse = ''; //清空入仓号字段
this.searchParams.tracking_no = ''; this.searchParams.tracking_no = ''; //清空FedEx
this.searchParams.code_type = ''; this.searchParams.code_type = val; //赋值DigKey,Rochester,TME,Chip1stop供应商
this.searchParams.code_type = val;
let code_type = ''; let code_type = '';
if (this.index == 3) { if (this.index == 3) {
code_type = 'DigKey'; code_type = 'DigKey';
...@@ -468,51 +476,15 @@ ...@@ -468,51 +476,15 @@
this.input_flag = true; this.input_flag = true;
this.identifyQrCodeNumAndSn(val, code_type); //识别二维码的数量和型号 this.identifyQrCodeNumAndSn(val, code_type); //识别二维码的数量和型号
} else { } else {
this.resetChange();
this.input_flag = false; this.input_flag = false;
this.getData();
} }
}, 2000), }, 2000),
bindPickerChange: function(e) { bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value); console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value; this.index = e.detail.value;
}, },
/**
* 识别二维码的数量和型号
*/
identifyQrCodeNumAndSn(code_str, code_type) {
console.log(code_str);
this.request(API.identifyQrCodeNumAndSn, 'POST', { code_str: code_str, code_type: code_type }, true).then(res => {
if (res.code === 0) {
this.searchParams.goods_name = res.data.sn;
this.getData();
} else {
uni.showToast({
title: '识别错误',
icon: 'error'
});
}
});
},
/**
* 获取列表数据
*/
getData() {
this.request(API.waitTallyReceiveList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
if (res.data.total > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
this.filter_list = createArray(this.list.length, false);
} else {
this.hasMoreData = false;
}
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
}
});
},
//设置默认的容器 //设置默认的容器
getTallyContainerDefault() { getTallyContainerDefault() {
this.request(API.getTallyContainer, 'GET', {}, false).then(res => { this.request(API.getTallyContainer, 'GET', {}, false).then(res => {
...@@ -525,32 +497,29 @@ ...@@ -525,32 +497,29 @@
} }
}); });
if (filter_arr.length > 0) { if (filter_arr.length > 0) {
//取消默认的容器 //设置默认容器name和id
this.searchParams.container_name = '';
this.searchParams.container_id = '';
this.formParams.container_id = '';
} }
this.getData();
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'error' icon: 'none'
}); });
} }
}); });
}, },
/** /**
* 获取容器列表数据 * 获取容器列表数据 && 验证容器是否输入正确
*/ */
getTallyContainer() { getTallyContainer() {
this.request(API.getTallyContainer, 'GET', {}, false).then(res => { this.request(API.getTallyContainer, 'GET', {}, true).then(res => {
if (res.code === 0) { if (res.code === 0) {
var name = this.searchParams.container_name; var name = this.searchParams.container_name; //输入的容器名字
//验证容器是否输入正取
this.is_submit = res.data.list.some(function(obj) { this.is_submit = res.data.list.some(function(obj) {
return obj.name === name; return obj.name === name;
}); });
if (this.is_submit) { if (this.is_submit) {
//筛选出匹配正确的那条容器
var id = res.data.list.filter(function(item) { var id = res.data.list.filter(function(item) {
if (item.name == name) { if (item.name == name) {
return { return {
...@@ -558,15 +527,56 @@ ...@@ -558,15 +527,56 @@
}; };
} }
}); });
this.searchParams.container_id = id[0].id; this.searchParams.container_id = id[0].id; //赋值正确的搜索容器id
this.formParams.container_id = id[0].id; this.formParams.container_id = id[0].id; //赋值正确的参数容器id
} else { } else {
//如果容器检验错误,就清空搜索容器id和参数容器id
this.searchParams.container_id = ''; this.searchParams.container_id = '';
this.formParams.container_id = ''; this.formParams.container_id = '';
} }
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none'
});
}
});
},
/**
* 识别二维码的数量和型号
* @param {Object} code_str 输入值
* @param {Object} code_type 供应商类型(DigKey,Rochester,TME,Chip1stop)
*/
identifyQrCodeNumAndSn(code_str, code_type) {
console.log(code_str);
this.request(API.identifyQrCodeNumAndSn, 'POST', { code_str: code_str, code_type: code_type }, true).then(res => {
if (res.code === 0) {
this.searchParams.goods_name = res.data.sn; //赋值检索出来的型号
this.getData();
} else {
uni.showToast({
title: '识别错误',
icon: 'error'
});
}
});
},
/**
* 获取列表数据 支持分页
*/
getData() {
this.request(API.waitTallyReceiveList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
if (res.data.total > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
this.filter_list = createArray(this.list.length, false);
} else {
this.hasMoreData = false;
}
} else {
uni.showToast({
title: res.msg,
icon: 'error' icon: 'error'
}); });
} }
...@@ -576,7 +586,7 @@ ...@@ -576,7 +586,7 @@
* 一键理货提交 * 一键理货提交
*/ */
createTallyReceiveSubmit() { createTallyReceiveSubmit() {
// 现在需求是都去掉容器必填的验证 // 验证一下容器是否输入正确
if (!this.is_submit) { if (!this.is_submit) {
uni.showToast({ uni.showToast({
title: '请输入正确容器', title: '请输入正确容器',
...@@ -584,7 +594,6 @@ ...@@ -584,7 +594,6 @@
}); });
return false; return false;
} }
//当前登录组织为深贸电子才必填 //当前登录组织为深贸电子才必填
if (this.company_id == 2) { if (this.company_id == 2) {
if (this.formParams.image_ids.length <= 0) { if (this.formParams.image_ids.length <= 0) {
...@@ -595,11 +604,9 @@ ...@@ -595,11 +604,9 @@
return false; return false;
} }
} }
var params = Object.assign(this.formParams, { var params = Object.assign(this.formParams, {
stock_in_item_id: this.filter_id.join(',') stock_in_item_id: this.filter_id.join(',')
}); });
this.request(API.createTallyReceive, 'POST', params, true).then(res => { this.request(API.createTallyReceive, 'POST', params, true).then(res => {
if (res.code === 0) { if (res.code === 0) {
uni.showToast({ uni.showToast({
...@@ -607,6 +614,7 @@ ...@@ -607,6 +614,7 @@
icon: 'success' icon: 'success'
}); });
setTimeout(() => { setTimeout(() => {
this.filter_id = []; //清空选中状态
this.resetChange(); this.resetChange();
this.getData(); this.getData();
this.closeDrawer(); this.closeDrawer();
...@@ -620,8 +628,11 @@ ...@@ -620,8 +628,11 @@
} }
}); });
}, },
/**
* 打开一键理货弹窗
*/
showDrawer() { showDrawer() {
// 现在需求是都去掉容器必填的验证 // 验证一下容器是否输入正确
if (!this.is_submit) { if (!this.is_submit) {
uni.showToast({ uni.showToast({
title: '请输入正确容器', title: '请输入正确容器',
...@@ -629,7 +640,6 @@ ...@@ -629,7 +640,6 @@
}); });
return false; return false;
} }
if (this.filter_id.length == 0) { if (this.filter_id.length == 0) {
uni.showToast({ uni.showToast({
title: '请选择货品', title: '请选择货品',
...@@ -637,11 +647,14 @@ ...@@ -637,11 +647,14 @@
}); });
return false; return false;
} }
this.image_list = []; this.image_list = []; //清空缓存的图片集合
this.formParams.image_ids = []; //每次打开先清空 this.formParams.image_ids = []; //每次打开先清空图片集合
this.formParams.tally_remark = ''; //每次打开先清空 this.formParams.tally_remark = ''; //每次打开先清空理货备注
this.$refs.showRight.open(); this.$refs.showRight.open();
}, },
/**
* 关闭一键理货弹窗
*/
closeDrawer() { closeDrawer() {
this.$refs.showRight.close(); this.$refs.showRight.close();
}, },
......
...@@ -131,11 +131,13 @@ ...@@ -131,11 +131,13 @@
<view class="detail-btn row rowCenter verCenter" @click="showDrawer(item)">详情</view> <view class="detail-btn row rowCenter verCenter" @click="showDrawer(item)">详情</view>
</view> </view>
</view> </view>
<view class="row rowCenter verCenter" v-if="!hasMoreData && page > 1" style="color: #999;font-size: 22rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view>
</view> </view>
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
<text class="iconfont icon-a-juxing21"></text> <text class="iconfont icon-a-juxing21"></text>
<text class="text">查不到当前数据</text> <text class="text">查不到当前数据</text>
</view> </view>
<!-- 底部bar -->
<view class="fix-btn row verCenter" v-if="list.length > 0"> <view class="fix-btn row verCenter" v-if="list.length > 0">
<view class="btn1 row rowCenter verCenter" style="width: 127rpx;" @click="allChnage()"> <view class="btn1 row rowCenter verCenter" style="width: 127rpx;" @click="allChnage()">
<text class="check-box-icon" :class="{ curr: filter_list.length > 0 && filter_list.length == filter_id.length }"></text> <text class="check-box-icon" :class="{ curr: filter_list.length > 0 && filter_list.length == filter_id.length }"></text>
...@@ -182,8 +184,8 @@ ...@@ -182,8 +184,8 @@
<text>货品信息</text> <text>货品信息</text>
</template> </template>
</view> </view>
<template v-if="curr == 0">
<!-- 非深圳自营 --> <!-- 非深圳自营 -->
<template v-if="curr == 0">
<view class="field-item row"> <view class="field-item row">
<view class="item row verCenter"> <view class="item row verCenter">
<text class="label">货品编码:</text> <text class="label">货品编码:</text>
...@@ -298,8 +300,8 @@ ...@@ -298,8 +300,8 @@
</view> </view>
</view> </view>
</template> </template>
<template v-else>
<!-- 深圳自营 --> <!-- 深圳自营 -->
<template v-else>
<view class="field-item row"> <view class="field-item row">
<view class="item row verCenter" style="flex: 0 0 100%;" v-if="detail.sku_id"> <view class="item row verCenter" style="flex: 0 0 100%;" v-if="detail.sku_id">
<text class="label">自营货品ID:</text> <text class="label">自营货品ID:</text>
...@@ -365,7 +367,9 @@ ...@@ -365,7 +367,9 @@
</view> </view>
</uni-drawer> </uni-drawer>
<!-- 修改容器 --> <!-- 修改容器 -->
<uni-popup ref="inputDialog" type="dialog"><uni-popup-dialog before-close="true" ref="inputClose" mode="input" :title="'当前容器:' + detail.container_sn" placeholder="请输入目的容器" @close="closeChange" @confirm="dialogInputConfirm"></uni-popup-dialog></uni-popup> <uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog before-close="true" ref="inputClose" mode="input" :title="'当前容器:' + detail.container_sn" placeholder="请输入目的容器" @close="closeChange" @confirm="dialogInputConfirm"></uni-popup-dialog>
</uni-popup>
</view> </view>
</template> </template>
...@@ -378,7 +382,7 @@ ...@@ -378,7 +382,7 @@
data() { data() {
return { return {
page: 1, page: 1,
limit: 50, limit: 50, //分页限制数量
input_flag: false, input_flag: false,
index: 0, index: 0,
curr: 0, curr: 0,
...@@ -389,7 +393,6 @@ ...@@ -389,7 +393,6 @@
filter_list: [], //筛选已选中的列表 filter_list: [], //筛选已选中的列表
filter_id: [], //入库单列表的入库登记 filter_id: [], //入库单列表的入库登记
detail: {}, //详情的数据 detail: {}, //详情的数据
image_list: [], //图片列表
hasMoreData: true, //是否分页加载 hasMoreData: true, //是否分页加载
image_list: [], //图片列表 image_list: [], //图片列表
maxNum: 10, //最大上传图片数量 maxNum: 10, //最大上传图片数量
...@@ -405,7 +408,7 @@ ...@@ -405,7 +408,7 @@
}, },
changeStockTallyImagesParams: { changeStockTallyImagesParams: {
tally_id: '', tally_id: '',
image_ids: '' image_ids: '' //修改理货照片集合
} }
}; };
}, },
...@@ -468,6 +471,7 @@ ...@@ -468,6 +471,7 @@
*/ */
radioChange(e, type) { radioChange(e, type) {
let value = e.detail.value; let value = e.detail.value;
this.filter_id = []; //清空统计数据
this.resetChange(); this.resetChange();
if (type == 1) { if (type == 1) {
this.searchParams.stock_tally_with_stock_in_stock_in_type_in = value; this.searchParams.stock_tally_with_stock_in_stock_in_type_in = value;
...@@ -504,12 +508,20 @@ ...@@ -504,12 +508,20 @@
console.log('picker发送选择改变,携带值为', e.detail.value); console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value; this.index = e.detail.value;
}, },
/**
* 容器编辑弹窗
* @param {Object} detail
*/
inputDialogToggle(detail) { inputDialogToggle(detail) {
this.$refs.inputDialog.open(); this.$refs.inputDialog.open();
}, },
closeChange() { closeChange() {
this.$refs.inputDialog.close(); this.$refs.inputDialog.close();
}, },
/**
* 修改容器提交
* @param {Object} e
*/
dialogInputConfirm(e) { dialogInputConfirm(e) {
if (!e) { if (!e) {
uni.showToast({ uni.showToast({
...@@ -741,8 +753,8 @@ ...@@ -741,8 +753,8 @@
}); });
setTimeout(() => { setTimeout(() => {
this.resetChange(); this.resetChange();
this.getData();
this.filter_id = []; this.filter_id = [];
this.getData();
}, 2000) }, 2000)
}, 5000); }, 5000);
} else { } else {
......
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