| | |
| | | <span v-if="row.status === 9" style="color: gray">已失效</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" width="180" fixed="right"> |
| | | <el-table-column label="操作" align="center" width="240" fixed="right"> |
| | | <template slot-scope="{ row }"> |
| | | <el-button |
| | | type="text" |
| | | @click="handleDetail(row)" |
| | | v-permissions="['business:company:update']">查看详情</el-button> |
| | | <el-button type="text" icon="el-icon-delete" @click="deleteById(row)" style="color: red" v-permissions="['business:visits:delete']">删除</el-button> |
| | | <el-button type="text" @click="cancel(row.id)" v-permissions="['business:visits:cancel']" v-if="(row.status == 0 || row.status == 1 || row.status == 2|| row.status == 5)" icon="el-icon-delete" style="color: red" >取消预约</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | // import ReportDetail from './page-components/ReportDetail.vue' |
| | | import ReportDetail from '@/views/task/visReportDetail.vue' |
| | | import OperaVisitsReportWindow from '@/components/business/operaVisitsReportWindow.vue' |
| | | import { fetchList, exportExcel, deleteById } from '@/api/business/visits' |
| | | import BaseComputHeight from "@/components/base/BaseComputHeight"; |
| | | import { fetchList, exportExcel, deleteById ,visitsCancel} from '@/api/business/visits' |
| | | import BasePage from '@/components/base/BasePage' |
| | | import {mapState } from "vuex"; |
| | | export default { |
| | | extends: BaseComputHeight, |
| | | extends: BasePage, |
| | | components: { |
| | | ReportDetail, |
| | | QueryForm, |
| | |
| | | total: 0 |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState(['userInfo']) |
| | | }, |
| | | created () { |
| | | this.getList() |
| | | }, |
| | | methods: { |
| | | cancel (id) { |
| | | this.$confirm('确定取消预约吗, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | visitsCancel(id) |
| | | .then(res => { |
| | | this.pagination.page = 1 |
| | | this.getList() |
| | | }) |
| | | }).catch(() => { |
| | | |
| | | }) |
| | | }, |
| | | exportExcel () { |
| | | this.$dialog.exportConfirm('确认导出吗?') |
| | | .then(() => { |