Commit 0e6d0ead by cwq0219

邀约

1 parent 7792002d
import request from './request'
const path = 'dj.api.inviteRecord.'
// 待预约、已预约总数查询
export function getTotalCount(data) {
data.method = `${path}count`
return request(data)
}
// 待预约、已预约总数查询
export function getList(data) {
data.method = `${path}search`
return request(data)
}
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
type="card" type="card"
> >
<el-tab-pane name="first"> <el-tab-pane name="first">
<span slot="label"><i class="el-icon-date"></i>已预约(16)</span> <span slot="label"><i class="el-icon-date"></i>已预约({{totalCount.inviteCount}})</span>
<d2-table <d2-table
ref="invitationFirstTable" ref="invitationFirstTable"
:hasNum="false" :hasNum="false"
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</d2-table> </d2-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="second"> <el-tab-pane name="second">
<span slot="label"><i class="el-icon-date"></i>待预约(18)</span> <span slot="label"><i class="el-icon-date"></i>待预约({{totalCount.customerCount}})</span>
<d2-table <d2-table
ref="invitationSecondTable" ref="invitationSecondTable"
:hasNum="false" :hasNum="false"
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
</template> </template>
<script> <script>
import { getList } from '@api/commodity' import { getList, getTotalCount } from '@api/invitation'
import { afterTodayOptions, appointDays } from '@/common/constants' import { afterTodayOptions, appointDays } from '@/common/constants'
import TimeDate from './invitation-component/TimeDate' import TimeDate from './invitation-component/TimeDate'
import AppointTable from './invitation-component/AppointTable' import AppointTable from './invitation-component/AppointTable'
...@@ -202,6 +202,10 @@ export default { ...@@ -202,6 +202,10 @@ export default {
{ 'hour': '17:00' }, { 'hour': '18:00' }], { 'hour': '17:00' }, { 'hour': '18:00' }],
// table // table
activeName: 'first', activeName: 'first',
totalCount: {
customerCount: 0,
inviteCount: 0
},
searchForm: { searchForm: {
date: '', date: '',
name: '' name: ''
...@@ -271,7 +275,12 @@ export default { ...@@ -271,7 +275,12 @@ export default {
AppointTable AppointTable
}, },
mounted() { }, mounted() {
getTotalCount({}).then(res => {
this.totalCount.inviteCount = res.inviteCount
this.totalCount.customerCount = res.customerCount
})
},
methods: { methods: {
handleAppoint(obj) { handleAppoint(obj) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!