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 @@
type="card"
>
<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
ref="invitationFirstTable"
:hasNum="false"
......@@ -75,7 +75,7 @@
</d2-table>
</el-tab-pane>
<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
ref="invitationSecondTable"
:hasNum="false"
......@@ -166,7 +166,7 @@
</template>
<script>
import { getList } from '@api/commodity'
import { getList, getTotalCount } from '@api/invitation'
import { afterTodayOptions, appointDays } from '@/common/constants'
import TimeDate from './invitation-component/TimeDate'
import AppointTable from './invitation-component/AppointTable'
......@@ -202,6 +202,10 @@ export default {
{ 'hour': '17:00' }, { 'hour': '18:00' }],
// table
activeName: 'first',
totalCount: {
customerCount: 0,
inviteCount: 0
},
searchForm: {
date: '',
name: ''
......@@ -271,7 +275,12 @@ export default {
AppointTable
},
mounted() { },
mounted() {
getTotalCount({}).then(res => {
this.totalCount.inviteCount = res.inviteCount
this.totalCount.customerCount = res.customerCount
})
},
methods: {
handleAppoint(obj) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!