Commit 71aa133b by LJM

bug

parent ee24350a
Showing with 21 additions and 6 deletions
...@@ -222,6 +222,10 @@ export default { ...@@ -222,6 +222,10 @@ export default {
this.getData(); this.getData();
}, },
methods: { methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
},
/** /**
* 日期 * 日期
*/ */
...@@ -251,6 +255,11 @@ export default { ...@@ -251,6 +255,11 @@ export default {
// 连接两个格式化后的日期,用 '~' 分隔 // 连接两个格式化后的日期,用 '~' 分隔
return `${formatDate(oneMonthAgoDate)} ~ ${formatDate(currentDate)}`; return `${formatDate(oneMonthAgoDate)} ~ ${formatDate(currentDate)}`;
}, },
/**
* 时间切换
* @param {Object} e
* @param {Object} type
*/
radioChange(e, type) { radioChange(e, type) {
this.resetChange(); this.resetChange();
if (type == 1) { if (type == 1) {
...@@ -262,10 +271,6 @@ export default { ...@@ -262,10 +271,6 @@ export default {
} }
this.getData(); this.getData();
}, },
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
},
/** /**
* 导出 * 导出
*/ */
...@@ -365,8 +370,11 @@ export default { ...@@ -365,8 +370,11 @@ export default {
} }
this.getData(); this.getData();
}, 500), }, 500),
/**
* 打开弹窗
* @param {Object} data
*/
showDrawer(data) { showDrawer(data) {
this.$refs.showRight.open();
this.detail = data; this.detail = data;
this.foramParams.id = data.id; this.foramParams.id = data.id;
this.foramParams.container_name = data.container_name; this.foramParams.container_name = data.container_name;
...@@ -376,7 +384,11 @@ export default { ...@@ -376,7 +384,11 @@ export default {
this.foramParams.actual_weight = data.actual_weight; this.foramParams.actual_weight = data.actual_weight;
this.foramParams.rough_weight = data.rough_weight; this.foramParams.rough_weight = data.rough_weight;
this.foramParams.remark = data.remark; this.foramParams.remark = data.remark;
this.$refs.showRight.open();
}, },
/**
* 关闭弹窗
*/
closeDrawer() { closeDrawer() {
this.$refs.showRight.close(); this.$refs.showRight.close();
}, },
...@@ -386,7 +398,7 @@ export default { ...@@ -386,7 +398,7 @@ export default {
getData() { getData() {
this.request(API.getContainerList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => { this.request(API.getContainerList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) { if (res.code === 0) {
if (res.data.total > 0) { if (res.data.list.length > 0) {
this.hasMoreData = true; this.hasMoreData = true;
this.list = this.list.concat(res.data.list); this.list = this.list.concat(res.data.list);
this.filter_list = createArray(this.list.length, false); this.filter_list = createArray(this.list.length, false);
...@@ -401,6 +413,9 @@ export default { ...@@ -401,6 +413,9 @@ export default {
} }
}); });
}, },
/**
* 更新
*/
update() { update() {
this.request(API.containerUpdate, 'POST', this.foramParams, true).then(res => { this.request(API.containerUpdate, 'POST', this.foramParams, true).then(res => {
if (res.code === 0) { if (res.code === 0) {
......
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