Authored by 李奇

商品列表和调拨订单获取异步数据时loadingbar使用

... ... @@ -142,12 +142,14 @@
return;
}
this.$Loading.start();
service.productList(
_.merge(params || {}, {
shelfStatus: 0,
size: 20
}))
.then(res => {
this.$Loading.finish();
if (res.code === 200) {
this.updateStore(res.data);
}
... ...
... ... @@ -136,12 +136,14 @@
return;
}
this.$Loading.start();
service.productList(
_.merge(params || {}, {
shelfStatus: 1,
size: 20
}))
.then(res => {
this.$Loading.finish();
if (res.code === 200) {
this.updateStore(res.data);
}
... ...
... ... @@ -161,11 +161,13 @@
return values;
},
productList(params) {
this.$Loading.start();
service.allotPurchaseList(params)
.then(res => {
const fmt = 'YYYY-MM-DD HH:mm:ss';
const list = res.data.records;
this.$Loading.finish();
_.each(list, i => {
i._colorName = i.factoryGoodsName || '';
i.createTime = moment.unix(i.createTime).format(fmt);
... ...
... ... @@ -63,8 +63,10 @@
},
methods: {
getExpList(params) {
this.$Loading.start();
service.allotExpressList(params)
.then(res => {
this.$Loading.finish();
this.handleData(res.data);
});
},
... ...
... ... @@ -163,8 +163,10 @@
return values;
},
productList(params) {
this.$Loading.start();
service.allotPurchaseList(params)
.then(res => {
this.$Loading.finish();
this.processData(res.data);
});
},
... ...