优化
This commit is contained in:
parent
54e38e32bb
commit
bb7a17faff
@ -9,33 +9,7 @@
|
|||||||
:z-index="source === 0 ? 1000 : 500"
|
:z-index="source === 0 ? 1000 : 500"
|
||||||
>
|
>
|
||||||
<div class="page-handle-wrap">
|
<div class="page-handle-wrap">
|
||||||
<ul class="handle-wraper bd-b">
|
<div class="search-wrap">
|
||||||
<li class="f-l">
|
|
||||||
<div class="text-exp">
|
|
||||||
<Row v-if="counts">
|
|
||||||
<a @click="sort" class="umar-r10">
|
|
||||||
<b>已选{{counts}}张</b>
|
|
||||||
</a>
|
|
||||||
<a @click="clearSelect">
|
|
||||||
<b>清空</b>
|
|
||||||
</a>
|
|
||||||
</Row>
|
|
||||||
<b v-else>全部信息</b>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="f-r">
|
|
||||||
<div class="handle-item">
|
|
||||||
<Button @click="search.show=!search.show" ghost icon="ios-search" type="primary">搜索</Button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="handle-item">
|
|
||||||
<Button @click="index(1)" icon="md-refresh">刷新</Button>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="search-wrap" v-show="search.show">
|
|
||||||
<ul class="handle-wraper">
|
<ul class="handle-wraper">
|
||||||
<li class="handle-item w-250">
|
<li class="handle-item w-250">
|
||||||
<Select clearable placeholder="运营商" v-model="params.carrier_operator">
|
<Select clearable placeholder="运营商" v-model="params.carrier_operator">
|
||||||
@ -62,6 +36,15 @@
|
|||||||
v-model.trim="params.time"
|
v-model.trim="params.time"
|
||||||
></DatePicker>
|
></DatePicker>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="f-r">
|
||||||
|
<div class="handle-item">
|
||||||
|
<Button @click="index()" ghost type="primary">立即搜索</Button>
|
||||||
|
</div>
|
||||||
|
<div class="handle-item">
|
||||||
|
<Button @click="resetSearch" ghost type="warning">重置搜索</Button>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul class="handle-wraper">
|
<ul class="handle-wraper">
|
||||||
@ -100,19 +83,31 @@
|
|||||||
<li class="handle-item w-250">
|
<li class="handle-item w-250">
|
||||||
<Input placeholder="SIM" type="textarea" v-model="params.sim"/>
|
<Input placeholder="SIM" type="textarea" v-model="params.sim"/>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="f-r">
|
|
||||||
<div class="handle-item">
|
|
||||||
<Button @click="index()" ghost type="primary">立即搜索</Button>
|
|
||||||
</div>
|
|
||||||
<div class="handle-item">
|
|
||||||
<Button @click="resetSearch" ghost type="warning">重置搜索</Button>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="page-list-wrap umar-b10">
|
||||||
|
<li class="f-r">
|
||||||
|
<div class="text-exp">
|
||||||
|
<Row v-if="counts">
|
||||||
|
<a @click="sort" class="umar-r10">
|
||||||
|
<b>已选 {{counts}} / {{filterTotal}} 张</b>
|
||||||
|
</a>
|
||||||
|
<a @click="clearSelect">
|
||||||
|
<b>清空</b>
|
||||||
|
</a>
|
||||||
|
</Row>
|
||||||
|
<Row v-else>
|
||||||
|
<b class="umar-r10">共 {{filterTotal}} / {{total}} 张</b>
|
||||||
|
<a @click="selectAll">
|
||||||
|
<b>全选</b>
|
||||||
|
</a>
|
||||||
|
</Row>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="page-list-wrap">
|
<div class="page-list-wrap">
|
||||||
<Row :gutter="8">
|
<Row :gutter="8">
|
||||||
<Col span="18">
|
<Col span="18">
|
||||||
|
@ -24,6 +24,18 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
filterTotal() {
|
||||||
|
return this.filterOrders.filter(el => {
|
||||||
|
return el.shipments !== el.counts;
|
||||||
|
}).reduce((acc, cur) => {
|
||||||
|
return acc + cur.counts;
|
||||||
|
}, 0);
|
||||||
|
},
|
||||||
|
total() {
|
||||||
|
return this.orders.reduce((acc, cur) => {
|
||||||
|
return acc + cur.counts;
|
||||||
|
}, 0);
|
||||||
|
},
|
||||||
...mapGetters(['orders', 'cards', 'selected', 'selectedMapped', 'counts', 'getFilterUsedCards', 'getSelectedByOrderId', 'relations', 'relationObj', 'real_companies', 'real_packages'])
|
...mapGetters(['orders', 'cards', 'selected', 'selectedMapped', 'counts', 'getFilterUsedCards', 'getSelectedByOrderId', 'relations', 'relationObj', 'real_companies', 'real_packages'])
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -32,9 +44,6 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
orderLoading: false,
|
orderLoading: false,
|
||||||
cardLoading: false,
|
cardLoading: false,
|
||||||
search: {
|
|
||||||
show: true
|
|
||||||
},
|
|
||||||
page: {
|
page: {
|
||||||
total: 0,
|
total: 0,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
@ -62,14 +71,8 @@ export default {
|
|||||||
let value = false;
|
let value = false;
|
||||||
let indeterminate = false;
|
let indeterminate = false;
|
||||||
|
|
||||||
let total = this.orders.reduce((acc, cur) => {
|
value = !!this.counts;
|
||||||
return acc + cur.counts;
|
indeterminate = this.total !== this.counts;
|
||||||
}, 0);
|
|
||||||
|
|
||||||
let counts = this.counts;
|
|
||||||
|
|
||||||
value = !!counts;
|
|
||||||
indeterminate = total !== counts;
|
|
||||||
|
|
||||||
return h("Checkbox", {
|
return h("Checkbox", {
|
||||||
props: {
|
props: {
|
||||||
@ -78,7 +81,7 @@ export default {
|
|||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
input: value => {
|
input: value => {
|
||||||
let order_id = this.filterOrders.filter(el => {
|
let order_id = this.showOrders.filter(el => {
|
||||||
return el.shipments !== el.counts;
|
return el.shipments !== el.counts;
|
||||||
}).map(item => {
|
}).map(item => {
|
||||||
return item.id;
|
return item.id;
|
||||||
@ -594,6 +597,15 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.$store.commit('SET_REAL_ORDERS', orders);
|
this.$store.commit('SET_REAL_ORDERS', orders);
|
||||||
|
},
|
||||||
|
selectAll() {
|
||||||
|
let order_id = this.filterOrders.filter(el => {
|
||||||
|
return el.shipments !== el.counts;
|
||||||
|
}).map(item => {
|
||||||
|
return item.id;
|
||||||
|
});
|
||||||
|
|
||||||
|
this.handleSelectOrder(order_id, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
2
public/css/chunk-c60e073c.e6078d3a.css
Normal file
2
public/css/chunk-c60e073c.e6078d3a.css
Normal file
File diff suppressed because one or more lines are too long
2
public/js/app.0f66b04d.js
Normal file
2
public/js/app.0f66b04d.js
Normal file
File diff suppressed because one or more lines are too long
1
public/js/app.0f66b04d.js.map
Normal file
1
public/js/app.0f66b04d.js.map
Normal file
File diff suppressed because one or more lines are too long
2
public/js/chunk-c60e073c.b8df4549.js
Normal file
2
public/js/chunk-c60e073c.b8df4549.js
Normal file
File diff suppressed because one or more lines are too long
1
public/js/chunk-c60e073c.b8df4549.js.map
Normal file
1
public/js/chunk-c60e073c.b8df4549.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-cc3e3910.48b8d490.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-cc3e3910.2afb37d0.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.62107448.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.62107448.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-c60e073c.e6078d3a.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-c60e073c.b8df4549.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.0f66b04d.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.0f66b04d.js></script></body></html>
|
Loading…
x
Reference in New Issue
Block a user