| | |
| | | import Pagination from '@/components/common/Pagination' |
| | | import QueryForm from '@/components/common/QueryForm' |
| | | import { platformBooksPage, platformReasonList, platformBooksApply, platformBooksExport } from '@/api' |
| | | import { checkSurplusNum } from '@/api/platform/platform' |
| | | import DriverDetail from "@/views/task/driverDetail" |
| | | import { checkSurplusNum, deletebooksById } from '@/api/platform/platform' |
| | | import DriverDetail from '@/views/task/driverDetail' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage' |
| | | import { Message } from 'element-ui' |
| | |
| | | reasonId: [{ required: true, message: '请选择', trigger: 'blur' }], |
| | | arriveDate: [{ required: true, message: '请选择', trigger: 'blur' }], |
| | | inType: [{ required: true, message: '请选择', trigger: 'blur' }], |
| | | driverName: [{ required: true, message: '请选择', trigger: 'blur' }], |
| | | driverName: [{ required: true, message: '请选择', trigger: 'blur' }] |
| | | }, |
| | | queryFormConfig: { |
| | | formItems: [ |
| | |
| | | { value: 1, label: '审批中' }, |
| | | { value: 2, label: '审批通过' }, |
| | | { value: 3, label: '审批驳回' }, |
| | | { value: 4, label: '已取消' }, |
| | | { value: 4, label: '已取消' } |
| | | ] |
| | | }, |
| | | { |
| | |
| | | model: { |
| | | ...filters, |
| | | arriveDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null, |
| | | arriveDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null, |
| | | arriveDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null |
| | | }, |
| | | capacity: pagination.pageSize, |
| | | page: page || pagination.page, |
| | | page: page || pagination.page |
| | | }).then(res => { |
| | | this.loading = false |
| | | this.list = res.records || [] |
| | |
| | | model: { |
| | | ...filters, |
| | | arriveDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null, |
| | | arriveDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null, |
| | | }, |
| | | arriveDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null |
| | | } |
| | | }) |
| | | .then(response => { |
| | | this.download(response) |
| | |
| | | }) |
| | | }, |
| | | onSubmit() { |
| | | this.$refs['ruleForm'].validate((valid) => { |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | const param = this.param |
| | | param.inReason = this.reasonList.find(item => param.reasonId == item.id).reason |
| | | if (valid) { |
| | |
| | | inType: 0 |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs['ruleForm'].clearValidate() |
| | | this.$refs.ruleForm.clearValidate() |
| | | }) |
| | | this.$set(this.param, 'arriveDate', dayjs().format('YYYY-MM-DD HH:mm:ss')) |
| | | this.getplatformReason() |
| | |
| | | clear() { |
| | | this.pagination.page = 1 |
| | | this.filters = { |
| | | selDate: [], |
| | | selDate: [] |
| | | } |
| | | this.getList() |
| | | // this.changeRadio('0') |
| | |
| | | this.$refs.DriverDetailRef.isShowModal = true |
| | | }) |
| | | }, |
| | | handleDel() { }, |
| | | handleDel (row) { |
| | | this.$confirm('确定删除该记录吗, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deletebooksById(row.id) |
| | | .then(res => { |
| | | this.$message.success('操作成功') |
| | | this.page = 1 |
| | | this.getList() |
| | | }) |
| | | }).catch(() => { |
| | | }) |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |