腮腺优化
This commit is contained in:
parent
4d1cc0aaed
commit
9a767f2cff
@ -43,7 +43,7 @@ class OrderService extends Service
|
||||
|
||||
if (!$res->isEmpty()) {
|
||||
$cards = $this->orderCardPartitionRepository->selectRaw('order_id,SUM(counts) as counts, SUM(CASE virtual_order_id WHEN 0 THEN 0 ELSE counts END) as shipments')
|
||||
->withConditions(['order_id', $res->pluck('id')->toArray()])
|
||||
->withConditions(['type' => $conditions['type'], 'order_id', $res->pluck('id')->toArray()])
|
||||
->groupBy('order_id')->get()->keyBy('order_id')->toArray();
|
||||
}
|
||||
|
||||
|
@ -287,6 +287,7 @@ export default {
|
||||
this.my_show = bool;
|
||||
this.$store.commit('SET_CARDS', []);
|
||||
if (bool) {
|
||||
this.params.type = this.type;
|
||||
this.index();
|
||||
}
|
||||
}
|
||||
@ -327,8 +328,6 @@ export default {
|
||||
this.sortChecked = false;
|
||||
this.sortOrders('order_at');
|
||||
}
|
||||
|
||||
this.changePage(1);
|
||||
this.orderLoading = false;
|
||||
}).catch(() => {
|
||||
this.orderLoading = false;
|
||||
@ -345,28 +344,28 @@ export default {
|
||||
changePage(page) {
|
||||
this.page.page = page;
|
||||
|
||||
this.filterOrders = JSON.parse(JSON.stringify(this.orders));
|
||||
let filterOrders = JSON.parse(JSON.stringify(this.orders));
|
||||
|
||||
if (this.params.company_name !== '' && this.params.company_name !== undefined) {
|
||||
this.filterOrders = this.filterOrders.filter(el => {
|
||||
return el.company_name.indexOf(this.params.company_name) !== -1;
|
||||
filterOrders = filterOrders.filter(el => {
|
||||
return el.company_name && el.company_name.indexOf(this.params.company_name) !== -1;
|
||||
});
|
||||
}
|
||||
|
||||
if (this.params.package_name !== '' && this.params.package_name !== undefined) {
|
||||
this.filterOrders = this.filterOrders.filter(el => {
|
||||
return el.package_name.indexOf(this.params.package_name) !== -1;
|
||||
filterOrders = filterOrders.filter(el => {
|
||||
return el.package_name && el.package_name.indexOf(this.params.package_name) !== -1;
|
||||
});
|
||||
}
|
||||
|
||||
if (this.params.carrier_operator !== '' && this.params.carrier_operator !== undefined) {
|
||||
this.filterOrders = this.filterOrders.filter(el => {
|
||||
filterOrders = filterOrders.filter(el => {
|
||||
return el.carrier_operator === this.params.carrier_operator;
|
||||
});
|
||||
}
|
||||
|
||||
if (this.params.used !== '' && this.params.used !== undefined) {
|
||||
this.filterOrders = this.filterOrders.filter(el => {
|
||||
filterOrders = filterOrders.filter(el => {
|
||||
switch (this.params.used) {
|
||||
case 0:
|
||||
return el.shipments === 0;
|
||||
@ -380,9 +379,10 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
this.page.total = this.filterOrders.length;
|
||||
this.page.total = filterOrders.length;
|
||||
|
||||
this.showOrders = this.filterOrders.slice((page - 1) * this.page.limit, page * this.page.limit);
|
||||
this.filterOrders = filterOrders;
|
||||
this.showOrders = filterOrders.slice((page - 1) * this.page.limit, page * this.page.limit);
|
||||
},
|
||||
handleOrderRowDblclick(row) {
|
||||
this.getCards(row.id);
|
||||
|
2
public/js/app.31440689.js
Normal file
2
public/js/app.31440689.js
Normal file
File diff suppressed because one or more lines are too long
1
public/js/app.31440689.js.map
Normal file
1
public/js/app.31440689.js.map
Normal file
File diff suppressed because one or more lines are too long
2
public/js/chunk-3e2248ef.43fc323a.js
Normal file
2
public/js/chunk-3e2248ef.43fc323a.js
Normal file
File diff suppressed because one or more lines are too long
1
public/js/chunk-3e2248ef.43fc323a.js.map
Normal file
1
public/js/chunk-3e2248ef.43fc323a.js.map
Normal file
File diff suppressed because one or more lines are too long
2
public/js/chunk-ba0f074c.129fa22a.js
Normal file
2
public/js/chunk-ba0f074c.129fa22a.js
Normal file
File diff suppressed because one or more lines are too long
1
public/js/chunk-ba0f074c.129fa22a.js.map
Normal file
1
public/js/chunk-ba0f074c.129fa22a.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=\favicon.ico><script src=\config.js></script><title></title><link href=/css/chunk-3e2248ef.ced8e72d.css rel=prefetch><link href=/css/chunk-ba0f074c.34c0cb30.css rel=prefetch><link href=/js/chunk-00ae0766.3874cd10.js rel=prefetch><link href=/js/chunk-07a274ec.c3ad5dec.js rel=prefetch><link href=/js/chunk-3e2248ef.c312da93.js rel=prefetch><link href=/js/chunk-ba0f074c.056f2663.js rel=prefetch><link href=/css/app.d71a8195.css rel=preload as=style><link href=/css/chunk-vendors.3c3b2e85.css rel=preload as=style><link href=/js/app.51dd20b4.js rel=preload as=script><link href=/js/chunk-vendors.ed6443e8.js rel=preload as=script><link href=/css/chunk-vendors.3c3b2e85.css rel=stylesheet><link href=/css/app.d71a8195.css rel=stylesheet></head><body><noscript><strong>很抱歉,如果没有启用JavaScript,程序不能正常工作,若要继续使用请启用它。</strong></noscript><div id=app></div><script src=/js/chunk-vendors.ed6443e8.js></script><script src=/js/app.51dd20b4.js></script></body></html>
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=\favicon.ico><script src=\config.js></script><title></title><link href=/css/chunk-3e2248ef.ced8e72d.css rel=prefetch><link href=/css/chunk-ba0f074c.34c0cb30.css rel=prefetch><link href=/js/chunk-00ae0766.3874cd10.js rel=prefetch><link href=/js/chunk-07a274ec.c3ad5dec.js rel=prefetch><link href=/js/chunk-3e2248ef.43fc323a.js rel=prefetch><link href=/js/chunk-ba0f074c.129fa22a.js rel=prefetch><link href=/css/app.d71a8195.css rel=preload as=style><link href=/css/chunk-vendors.3c3b2e85.css rel=preload as=style><link href=/js/app.31440689.js rel=preload as=script><link href=/js/chunk-vendors.ed6443e8.js rel=preload as=script><link href=/css/chunk-vendors.3c3b2e85.css rel=stylesheet><link href=/css/app.d71a8195.css rel=stylesheet></head><body><noscript><strong>很抱歉,如果没有启用JavaScript,程序不能正常工作,若要继续使用请启用它。</strong></noscript><div id=app></div><script src=/js/chunk-vendors.ed6443e8.js></script><script src=/js/app.31440689.js></script></body></html>
|
Loading…
x
Reference in New Issue
Block a user