| | |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>framework</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>service</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- 定时任务--> |
| | | <dependency> |
| | |
| | | <version>${ruoyi.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>service</artifactId> |
| | | <version>${ruoyi.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-all</artifactId> |
| | | <version>5.8.26</version> |
| | |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <groupId>com.cwgl</groupId> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>service</artifactId> |
| | | |
| | | <properties> |
| | |
| | | <version>${project.version}</version> |
| | | </dependency> |
| | | |
| | | <!--持久化层模块--> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>core</artifactId> |
| | | <version>${ruoyi.version}</version> |
| | | </dependency> |
| | | |
| | | <!--持久化层模块--> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | |
| | | "devDependencies": { |
| | | "@types/splitpanes": "^2.2.6", |
| | | "@vitejs/plugin-vue": "^5.2.1", |
| | | "fast-glob": "^3.3.3", |
| | | "sass": "1.84.0", |
| | | "svg-sprite-loader": "^6.0.11", |
| | | "typescript": "^5.7.3", |
New file |
| | |
| | | import request,{download,requestType} from "@/utils/request"; |
| | | import {BaseEntityInterface} from "@/utils/globalInterface"; |
| | | export interface DispatchOrderI extends BaseEntityInterface{ |
| | | id ?: number , dispatchNo ?: string , transportMode ?: string , productName ?: string , carrierName ?: string , departureLocationName ?: string , arrivalLocationName ?: string , licensePlateNumber ?: string , vehiclePlateId ?: string , mainDriverName ?: string , assistantDriverName ?: string , pointNum ?: number , quantity ?: number , actualDepartureTime ?: string , requiredArrivalTime ?: string , actualArrivalTime ?: string , beReturn ?: string , dispatchQuantity ?: number , dispatchWeight ?: string , dispatchVolume ?: string , status ?: string , remark ?: string , createBy ?: string , createTime ?: string , updateBy ?: string , updateTime ?: string , isDeleted ?: number } |
| | | |
| | | |
| | | /** |
| | | * 查询调度单列表 |
| | | */ |
| | | export const listDispatchOrder:requestType = (query) => { |
| | | return request({ |
| | | url: '/cwgl/dispatchOrder/list', |
| | | method:'get', |
| | | params:query |
| | | }) |
| | | } |
| | | /** |
| | | * 查询调度单详细 |
| | | */ |
| | | export const getDispatchOrder:requestType = (id) => { |
| | | return request({ |
| | | url: '/cwgl/dispatchOrder/' + id, |
| | | method:'get' |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 新增调度单 |
| | | */ |
| | | export const addDispatchOrder:requestType = (data) => { |
| | | return request({ |
| | | url: '/cwgl/dispatchOrder', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 修改调度单 |
| | | */ |
| | | export const updateDispatchOrder:requestType = (data) => { |
| | | return request({ |
| | | url: '/cwgl/dispatchOrder', |
| | | method: 'put', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 删除调度单 |
| | | */ |
| | | export const delDispatchOrder:requestType = (id) => { |
| | | return request({ |
| | | url: '/cwgl/dispatchOrder/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出调度单 |
| | | */ |
| | | export const exportDispatchOrder:requestType = (query) => { |
| | | return new Promise<any>(()=>{ |
| | | download('/cwgl/dispatchOrder/export',query); |
| | | }) |
| | | } |
New file |
| | |
| | | <template> |
| | | <basicContainer> |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="pageF.loading" |
| | | :data="tableData" |
| | | :page="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crudRef" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @refresh-change="refreshChange" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <template #menu-left> |
| | | <el-button |
| | | type="success" |
| | | icon="Edit" |
| | | :disabled="pageF.single" |
| | | v-hasPermi="['cwgl:dispatchOrder:edit']" |
| | | @click="handleUpdate">修改 |
| | | </el-button> |
| | | <el-button |
| | | type="danger" |
| | | icon="Delete" |
| | | :disabled="pageF.multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['cwgl:dispatchOrder:remove']" |
| | | >删除 |
| | | </el-button> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['cwgl:dispatchOrder:export']" |
| | | >导出 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basicContainer> |
| | | </template> |
| | | |
| | | <script setup name="dispatchOrder" lang="ts"> |
| | | import { |
| | | DispatchOrderI, |
| | | addDispatchOrder, |
| | | delDispatchOrder, |
| | | exportDispatchOrder, |
| | | getDispatchOrder, |
| | | listDispatchOrder, |
| | | updateDispatchOrder |
| | | } from "@/api/cwgl/dispatchOrder"; |
| | | import useCurrentInstance from "@/utils/useCurrentInstance"; |
| | | import {computed, reactive, ref, toRefs} from "vue"; |
| | | import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface"; |
| | | import {usePagePlus} from "@/hooks/usePagePlus"; |
| | | import {hasPermission} from "@/utils/permissionUtils"; |
| | | import {useTableColumnWidth} from "@/hooks/useAvueTableWidths"; |
| | | |
| | | const {proxy} = useCurrentInstance(); |
| | | const crudRef = ref(); |
| | | |
| | | const permissionList = computed(() => { |
| | | return { |
| | | addBtn: hasPermission(["cwgl:dispatchOrder:add"]), |
| | | delBtn: hasPermission(["cwgl:dispatchOrder:remove"]), |
| | | editBtn: hasPermission(["cwgl:dispatchOrder:edit"]), |
| | | viewBtn: hasPermission(["cwgl:dispatchOrder:query"]), |
| | | } |
| | | }) |
| | | |
| | | const data = reactive({ |
| | | form: <DispatchOrderI>{}, |
| | | queryParams: <DispatchOrderI & PageQueryInterface>{}, |
| | | page: <PagesInterface>{ |
| | | pageSize: 10, |
| | | total: 0, |
| | | currentPage: 1, |
| | | }, |
| | | selectionList: [], |
| | | }) |
| | | const {queryParams, form, page, selectionList} = toRefs(data); |
| | | const option = ref({ |
| | | pageKey: 'DispatchOrder', |
| | | rowKey: 'id', |
| | | column: { |
| | | dispatchNo: { |
| | | label: '调度单号',search:true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "调度单号不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | transportMode: { |
| | | label: '运输方式', |
| | | }, |
| | | productName: { |
| | | label: '服务产品名称', |
| | | }, |
| | | carrierName: { |
| | | label: '承运商',search:true, |
| | | }, |
| | | departureLocationName: { |
| | | label: '出发地名称', |
| | | }, |
| | | arrivalLocationName: { |
| | | label: '目的地名称', |
| | | }, |
| | | licensePlateNumber: { |
| | | label: '车牌',search:true, |
| | | }, |
| | | vehiclePlateId: { |
| | | label: '车板号', |
| | | }, |
| | | mainDriverName: { |
| | | label: '主驾驶员', |
| | | }, |
| | | assistantDriverName: { |
| | | label: '副驾驶员', |
| | | }, |
| | | pointNum: { |
| | | label: '提送货点数', |
| | | }, |
| | | quantity: { |
| | | label: '件数', |
| | | }, |
| | | actualDepartureTime: { |
| | | label: '实际出发时间', |
| | | }, |
| | | requiredArrivalTime: { |
| | | label: '要求到达时间', |
| | | }, |
| | | actualArrivalTime: { |
| | | label: '实际到达时间', |
| | | }, |
| | | beReturn: { |
| | | label: '是否回程(N,Y)', |
| | | }, |
| | | dispatchQuantity: { |
| | | label: '实发件数', |
| | | }, |
| | | dispatchWeight: { |
| | | label: '实发重量', |
| | | }, |
| | | dispatchVolume: { |
| | | label: '实发体积(立方)', |
| | | }, |
| | | status: { |
| | | label: '状态', |
| | | }, |
| | | remark: { |
| | | label: '备注', |
| | | type: 'textarea', minRows: 3, maxRows: 5, |
| | | }, |
| | | createBy: { |
| | | label: '创建人', |
| | | }, |
| | | createTime: { |
| | | label: '创建时间', |
| | | }, |
| | | updateBy: { |
| | | label: '修改人', |
| | | }, |
| | | updateTime: { |
| | | label: '修改时间', |
| | | }, |
| | | isDeleted: { |
| | | label: '是否删除(0-否,1-是)', |
| | | }, |
| | | } |
| | | }) |
| | | |
| | | const { |
| | | tableData, |
| | | pageF, |
| | | rowSave, |
| | | rowUpdate, |
| | | rowDel, |
| | | beforeOpen, |
| | | searchChange, |
| | | searchReset, |
| | | selectionChange, |
| | | onLoad, |
| | | currentChange, |
| | | sizeChange, |
| | | handleDelete, |
| | | handleExport, |
| | | handleUpdate, |
| | | refreshChange |
| | | } = usePagePlus({ |
| | | form: form, |
| | | option: option, |
| | | queryParams: queryParams, |
| | | idKey: 'id', |
| | | page: page.value, |
| | | getListApi: listDispatchOrder, |
| | | getDetailApi: getDispatchOrder, |
| | | exportApi: exportDispatchOrder, |
| | | deleteApi: delDispatchOrder, |
| | | addApi: addDispatchOrder, |
| | | updateApi: updateDispatchOrder, |
| | | handleUpdateFunc: () => { |
| | | crudRef.value.rowEdit(selectionList.value[0]); |
| | | }, |
| | | handleSelectionChangeFunc: (selection: any) => { |
| | | selectionList.value = selection; |
| | | } |
| | | }) |
| | | useTableColumnWidth(option.value, crudRef); // 使用 Hook 管理列宽 |
| | | |
| | | |
| | | </script> |