| | |
| | | <template v-slot="scope"> |
| | | <el-button type="text" v-permissions="['business:platformbooks:detail']" |
| | | @click="handleDetail(scope.row)">预约详情</el-button> |
| | | <el-button type="text" class="red" v-permissions="['business:platformbooks:delete']" @click="handleDel(scope.row)">删除</el-button> |
| | | <el-button type="text" class="red" v-permissions="['business:platformbooks:delete']" |
| | | @click="handleDel(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage' |
| | | import { Message } from 'element-ui' |
| | | import dayjs from 'dayjs' |
| | | import BaseComputHeight from "@/components/base/BaseComputHeight"; |
| | | import BaseComputHeight from "@/components/base/BaseComputHeight" |
| | | export default { |
| | | extends: BaseComputHeight, |
| | | components: { |
| | |
| | | GlobalWindow, |
| | | UploadAvatarImage |
| | | }, |
| | | data () { |
| | | data() { |
| | | return { |
| | | isShowDriver: false, |
| | | exLoading: false, |
| | |
| | | total: 0 |
| | | }, |
| | | filters: { |
| | | selDate: [], |
| | | arriveDateStart: '', |
| | | arriveDateEnd: '', |
| | | fastdate: 0 |
| | | }, |
| | | list: [], |
| | |
| | | ] |
| | | }, |
| | | { |
| | | filed: 'selDate', |
| | | type: 'datetimerange', |
| | | label: '操作时间', |
| | | pickerOptions: {} |
| | | filed1: 'arriveDateStart', |
| | | filed2: 'arriveDateEnd', |
| | | type: 'datetime', |
| | | label: '操作时间' |
| | | }, |
| | | { |
| | | type: 'slot', |
| | |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | created() { |
| | | this.changeRadio('0') |
| | | this.getList() |
| | | // this.getList() |
| | | }, |
| | | methods: { |
| | | checkSurplus () { |
| | | checkSurplus() { |
| | | const { arriveDate, reasonId, totalNum } = this.param |
| | | if (!arriveDate || !reasonId || !totalNum) return |
| | | checkSurplusNum({ |
| | |
| | | } |
| | | }) |
| | | }, |
| | | changeRadio (day) { |
| | | changeRadio(day) { |
| | | const arr = [dayjs().subtract(day, 'day').format('YYYY-MM-DD') + ' 00:00:00', dayjs().format('YYYY-MM-DD') + ' 23:59:59'] |
| | | this.$set(this.filters, 'selDate', arr) |
| | | this.filters.arriveDateStart = arr[0] |
| | | this.filters.arriveDateEnd = arr[1] |
| | | this.getList(1) |
| | | }, |
| | | changeForm(str) { |
| | | if (this.filters.arriveDateStart > this.filters.arriveDateEnd) { |
| | | this.filters.arriveDateStart = this.filters.arriveDateEnd |
| | | return this.$message.error('开始时间不能大于结束时间') |
| | | } |
| | | this.getList() |
| | | }, |
| | | changeForm (str) { |
| | | if (str === 'selDate') { |
| | | this.$set(this.filters, 'fastdate', null) |
| | | this.getList() |
| | | } |
| | | }, |
| | | getList (page) { |
| | | getList(page) { |
| | | const { pagination, filters } = this |
| | | this.loading = true |
| | | platformBooksPage({ |
| | | model: { |
| | | ...filters, |
| | | arriveDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null, |
| | | arriveDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null |
| | | ...filters |
| | | }, |
| | | capacity: pagination.pageSize, |
| | | page: page || pagination.page |
| | |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | handleEx () { |
| | | handleEx() { |
| | | this.$dialog.exportConfirm('确认导出吗?') |
| | | .then(() => { |
| | | const { filters } = this |
| | |
| | | page: this.pagination.page, |
| | | capacity: 1000000, |
| | | model: { |
| | | ...filters, |
| | | arriveDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null, |
| | | arriveDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null |
| | | ...filters |
| | | } |
| | | }) |
| | | .then(response => { |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | onSubmit () { |
| | | onSubmit() { |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | const param = this.param |
| | | param.inReason = this.reasonList.find(item => param.reasonId == item.id).reason |
| | |
| | | } |
| | | }) |
| | | }, |
| | | uploadSuccess (file) { |
| | | uploadSuccess(file) { |
| | | this.$set(this.param, 'transportImg', file.imgurl) |
| | | this.$set(this.param, 'transportImgFull', file.imgurlfull) |
| | | }, |
| | | handleEdit (row) { |
| | | handleEdit(row) { |
| | | this.isShowEdit = true |
| | | this.param = { |
| | | inType: 0 |
| | |
| | | this.$set(this.param, 'arriveDate', dayjs().format('YYYY-MM-DD HH:mm:ss')) |
| | | this.getplatformReason() |
| | | }, |
| | | getplatformReason () { |
| | | getplatformReason() { |
| | | platformReasonList().then(res => { |
| | | this.reasonList = res || [] |
| | | }) |
| | | }, |
| | | handleSub () { |
| | | handleSub() { |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | if (valid) { |
| | | alert('submit!') |
| | | } |
| | | }) |
| | | }, |
| | | clear () { |
| | | clear() { |
| | | this.pagination.page = 1 |
| | | this.filters = { |
| | | selDate: [] |
| | | } |
| | | this.filters = {} |
| | | this.getList() |
| | | // this.changeRadio('0') |
| | | }, |
| | | handleDetail (row) { |
| | | handleDetail(row) { |
| | | this.isShowDriver = true |
| | | this.$nextTick(() => { |
| | | this.$refs.DriverDetailRef.id = row.id |
| | |
| | | this.$refs.DriverDetailRef.isShowModal = true |
| | | }) |
| | | }, |
| | | handleDel (row) { |
| | | handleDel(row) { |
| | | this.$confirm('确定删除该记录吗, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | |
| | | }).catch(() => { |
| | | }) |
| | | }, |
| | | handleSizeChange (capacity) { |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList(1) |
| | | } |