| | |
| | | <template> |
| | | <div class="main_app"> |
| | | <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" /> |
| | | <div> |
| | | <QueryForm v-model="filters" :query-form-config="queryFormConfig" @changeForm='changeForm' @handleQuery="getList(1)" @clear="clear"> |
| | | <template #fastdate> |
| | | <el-radio-group |
| | | v-model="filters.fastdate" |
| | | size="small" |
| | | @input="changeRadio" |
| | | > |
| | | <el-radio-button label="0">当天</el-radio-button> |
| | | <el-radio-button label="6">近7天</el-radio-button> |
| | | <el-radio-button label="29">近30天</el-radio-button> |
| | | </el-radio-group> |
| | | </template> |
| | | </QueryForm> |
| | | <div class="pt16"> |
| | | <el-button type="primary" @click="handleEdit" icon="el-icon-plus" |
| | | v-permissions="['business:platformbooks:create']">新建</el-button> |
| | | <el-button type="primary" @click="handleEx" v-permissions="['business:platformbooks:exportExcel']">导出</el-button> |
| | | <el-button :loading="exLoading" @click="handleEx" v-permissions="['business:platformbooks:exportExcel']">导出</el-button> |
| | | </div> |
| | | <el-table class="mb20" v-loading="loading" :data="list" stripe> |
| | | <el-table-column prop="contractNum" label="合同单号" min-width="100" show-overflow-tooltip /> |
| | |
| | | <el-table-column prop="driverPhone" label="联系方式" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="inTypeTemp" label="入库类型" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="arriveDate" label="预约到场时间" min-width="150" show-overflow-tooltip /> |
| | | <el-table-column prop="name" label="审批结果" min-width="100" show-overflow-tooltip> |
| | | <el-table-column prop="auditName" label="审批结果" min-width="100" show-overflow-tooltip> |
| | | <template v-slot="scope"> |
| | | <span v-if="scope.row.status == '0'">待审批</span> |
| | | <span v-if="scope.row.status == '1'">审批中</span> |
| | |
| | | :confirm-working="subLoading" @confirm="onSubmit"> |
| | | <el-form :model="param" :rules="rules" ref="ruleForm" label-width="100px"> |
| | | <div class="param_title">运输信息</div> |
| | | <el-form-item label="入园原因" prop="inReason"> |
| | | <el-select v-model="param.inReason" class="w300" placeholder="请选择"> |
| | | <el-form-item label="入园原因" prop="reasonId"> |
| | | <el-select v-model="param.reasonId" class="w300" placeholder="请选择"> |
| | | <el-option v-for="item in reasonList" :key="item.id" :label="item.reason" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="总运输量" prop="totalNum"> |
| | | <el-input v-model="param.totalNum" placeholder="请输入" class="w300"></el-input> |
| | | <el-input oninput="value=value.replace(/^(0+)|[^\d]+/g, '').slice(0, 10)" v-model="param.totalNum" placeholder="请输入" class="w300"></el-input> |
| | | <span class="ml10">万支</span> |
| | | </el-form-item> |
| | | <el-form-item label="准运证照片" prop="transportImgFull"> |
| | | <UploadFaceImg :file="{ 'imgurlfull': param.transportImgFull, 'imgurl': param.transportImg }" |
| | | :uploadData="{ folder: 'PLATFORM' }" @uploadSuccess="uploadSuccess" @uploadEnd="isUploading = false" |
| | | <el-form-item label="准运证照片" prop="transportImg"> |
| | | <UploadAvatarImage :file="{ 'imgurlfull': param.transportImgFull, 'imgurl': param.transportImg }" |
| | | :uploadData="{ folder: 'platform' }" @uploadSuccess="uploadSuccess" @uploadEnd="isUploading = false" |
| | | @uploadBegin="isUploading = true" /> |
| | | </el-form-item> |
| | | <div class="param_title">司机/车辆信息</div> |
| | |
| | | <el-input v-model="param.driverName" placeholder="请输入" class="w300"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="司机手机号" prop="driverPhone"> |
| | | <el-input v-model="param.driverPhone" placeholder="请输入" class="w300"></el-input> |
| | | <el-input oninput="value=value.replace(/^(0+)|[^\d]+/g, '').slice(0, 11)" v-model="param.driverPhone" placeholder="请输入" class="w300"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="车前牌照号" prop="carCodeFront"> |
| | | <el-input v-model="param.carCodeFront" placeholder="请输入" class="w300"></el-input> |
| | |
| | | <script> |
| | | import Pagination from '@/components/common/Pagination' |
| | | import QueryForm from '@/components/common/QueryForm' |
| | | import { platformBooksPage, platformReasonList, platformBooksApply } from '@/api' |
| | | import { platformBooksPage, platformReasonList, platformBooksApply, platformBooksExport } from '@/api' |
| | | import DriverDetail from "@/views/task/driverDetail" |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import UploadFaceImg from '@/components/common/UploadFaceImg' |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage' |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | | components: { |
| | | Pagination, |
| | | QueryForm, |
| | | DriverDetail, |
| | | GlobalWindow, |
| | | UploadFaceImg |
| | | UploadAvatarImage |
| | | }, |
| | | data() { |
| | | return { |
| | | isShowDriver: false, |
| | | exLoading: false, |
| | | loading: false, |
| | | pagination: { |
| | | pageSize: 10, |
| | |
| | | total: 0 |
| | | }, |
| | | filters: { |
| | | selDate: [] |
| | | selDate: [], |
| | | fastdate: 0 |
| | | }, |
| | | list: [], |
| | | |
| | | isShowEdit: false, |
| | | subLoading: false, |
| | | param: {}, |
| | | param: { |
| | | inType: 0 |
| | | }, |
| | | reasonList: [], |
| | | rules: { |
| | | contractNum: [{ required: true, message: '请输入', trigger: 'blur' }], |
| | |
| | | carCodeFront: [{ required: true, message: '请输入', trigger: 'blur' }], |
| | | carCodeBack: [{ required: true, message: '请输入', trigger: 'blur' }], |
| | | |
| | | inReason: [{ required: true, message: '请选择', trigger: 'blur' }], |
| | | transportImg: [{ required: true, message: '请上传', trigger: 'blur' }], |
| | | reasonId: [{ required: true, message: '请选择', trigger: 'blur' }], |
| | | arriveDate: [{ required: true, message: '请选择', trigger: 'blur' }], |
| | | inType: [{ required: true, message: '请选择', trigger: 'blur' }], |
| | | driverName: [{ required: true, message: '请选择', trigger: 'blur' }], |
| | |
| | | { |
| | | filed: 'selDate', |
| | | type: 'datetimerange', |
| | | label: '操作时间' |
| | | label: '操作时间', |
| | | pickerOptions: {} |
| | | }, |
| | | { |
| | | type: 'slot', |
| | | filed: 'fastdate', |
| | | label: '' |
| | | } |
| | | ], |
| | | online: true |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.changeRadio('0') |
| | | this.getList() |
| | | }, |
| | | methods: { |
| | | 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.getList() |
| | | }, |
| | | changeForm (str) { |
| | | if (str === 'selDate') { |
| | | this.$set(this.filters, 'fastdate', null) |
| | | this.getList() |
| | | } |
| | | }, |
| | | getList(page) { |
| | | const { pagination, filters } = this |
| | | this.loading = true |
| | |
| | | }) |
| | | }, |
| | | handleEx() { |
| | | |
| | | this.$dialog.exportConfirm('确认导出吗?') |
| | | .then(() => { |
| | | this.exLoading = true |
| | | platformBooksExport({ |
| | | page: this.pagination.page, |
| | | capacity: 1000000, |
| | | model: this.filters |
| | | }) |
| | | .then(response => { |
| | | this.download(response) |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.exLoading = false |
| | | }) |
| | | }) |
| | | }, |
| | | onSubmit() { |
| | | this.$refs['ruleForm'].validate((valid) => { |
| | | const param = this.param |
| | | param.inReason = this.reasonList.find(item => param.reasonId == item.id).reason |
| | | if (valid) { |
| | | platformBooksApply({...param}).then(res => { |
| | | |
| | | platformBooksApply({ ...param }).then(res => { |
| | | this.getList() |
| | | this.isShowEdit = false |
| | | }) |
| | | } |
| | | }) |
| | |
| | | }, |
| | | handleEdit(row) { |
| | | this.isShowEdit = true |
| | | this.param = { |
| | | inType: 0 |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs['ruleForm'].clearValidate() |
| | | }) |
| | | this.$set(this.param, 'arriveDate', dayjs().format('YYYY-MM-DD HH:mm:ss')) |
| | | this.getplatformReason() |
| | | }, |
| | | getplatformReason() { |
| | |
| | | clear() { |
| | | this.pagination.page = 1 |
| | | this.filters = { |
| | | selDate: [] |
| | | selDate: [], |
| | | fastdate: 0, |
| | | } |
| | | this.getList() |
| | | }, |