From b23d80cdbc375643e6a94122c6507fca79e18103 Mon Sep 17 00:00:00 2001 From: wujianwei <wjw@11.com> Date: 星期四, 18 九月 2025 17:28:58 +0800 Subject: [PATCH] 新增要求出发时间 --- ui/admin-ui3/src/views/cwgl/keyCollectionInfo/index.vue | 360 +++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 203 insertions(+), 157 deletions(-) diff --git a/ui/admin-ui3/src/views/cwgl/keyCollectionInfo/index.vue b/ui/admin-ui3/src/views/cwgl/keyCollectionInfo/index.vue index aca7e9f..50ce33f 100644 --- a/ui/admin-ui3/src/views/cwgl/keyCollectionInfo/index.vue +++ b/ui/admin-ui3/src/views/cwgl/keyCollectionInfo/index.vue @@ -1,48 +1,19 @@ <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" - > + <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:keyCollectionInfo:edit']" - @click="handleUpdate">淇敼 + <el-button type="success" icon="Edit" :disabled="pageF.single" v-hasPermi="['cwgl:keyCollectionInfo:edit']" + @click="handleUpdate">淇敼 </el-button> - <el-button - type="danger" - icon="Delete" - :disabled="pageF.multiple" - @click="handleDelete" - v-hasPermi="['cwgl:keyCollectionInfo:remove']" - >鍒犻櫎 + <el-button type="danger" icon="Delete" :disabled="pageF.multiple" @click="handleDelete" + v-hasPermi="['cwgl:keyCollectionInfo:remove']">鍒犻櫎 </el-button> - <el-button - type="warning" - plain - icon="Download" - @click="handleExport" - v-hasPermi="['cwgl:keyCollectionInfo:export']" - >瀵煎嚭 + <el-button type="warning" plain icon="Download" @click="handleExport" + v-hasPermi="['cwgl:keyCollectionInfo:export']">瀵煎嚭 </el-button> </template> </avue-crud> @@ -50,132 +21,207 @@ </template> <script setup name="keyCollectionInfo" lang="ts"> - import {KeyCollectionInfoI,addKeyCollectionInfo, delKeyCollectionInfo, exportKeyCollectionInfo, getKeyCollectionInfo, listKeyCollectionInfo, updateKeyCollectionInfo} from "@/api/cwgl/keyCollectionInfo"; - 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 { KeyCollectionInfoI, addKeyCollectionInfo, delKeyCollectionInfo, exportKeyCollectionInfo, getKeyCollectionInfo, listKeyCollectionInfo, updateKeyCollectionInfo } from "@/api/cwgl/keyCollectionInfo"; +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"; - const { proxy } = useCurrentInstance(); - const crudRef = ref(); +const { proxy } = useCurrentInstance(); +const crudRef = ref(); - const permissionList = computed(()=>{ - return { - addBtn: hasPermission(["cwgl:keyCollectionInfo:add"]), - delBtn: hasPermission(["cwgl:keyCollectionInfo:remove"]), - editBtn: hasPermission(["cwgl:keyCollectionInfo:edit"]), - viewBtn: hasPermission(["cwgl:keyCollectionInfo:query"]), - } - }) +const permissionList = computed(() => { + return { + addBtn: hasPermission(["cwgl:keyCollectionInfo:add"]), + delBtn: hasPermission(["cwgl:keyCollectionInfo:remove"]), + editBtn: hasPermission(["cwgl:keyCollectionInfo:edit"]), + viewBtn: hasPermission(["cwgl:keyCollectionInfo:query"]), + } +}) - const data = reactive({ - form:<KeyCollectionInfoI>{}, - queryParams:<KeyCollectionInfoI&PageQueryInterface>{}, - page: <PagesInterface>{ - pageSize: 10, - total: 0, - currentPage: 1, +const data = reactive({ + form: <KeyCollectionInfoI>{}, + queryParams: <KeyCollectionInfoI & PageQueryInterface>{}, + page: <PagesInterface>{ + pageSize: 10, + total: 0, + currentPage: 1, + }, + selectionList: [], +}) +const { queryParams, form, page, selectionList } = toRefs(data); +const option = ref({ + pageKey: 'KeyCollectionInfo', + rowKey: 'id', + menu: false, + addBtn: false, + editBtn: false, + delBtn: false, + viewBtn: false, + selection: false, + searchSpan: 5, + searchLabelWidth: 120, + labelWidth: 130, + column: { + // id: { + // label: 'ID', + // }, + customerName: { + label: '瀹㈡埛鍚嶇О', + minWidth: 200, + search: true, }, - selectionList:[], - }) - const {queryParams,form,page,selectionList} = toRefs(data); - const option = ref({ - pageKey: 'KeyCollectionInfo', - rowKey: 'id', - column: { - id: { - label: 'ID', - }, - customerName: { - label: '瀹㈡埛鍚嶇О', - }, - carrier: { - label: '鎵胯繍鍟�', - }, - dispatchNo: { - label: '璋冨害鍗曞彿', - }, - driverName: { - label: '鍙告満鍚嶇О', - }, - driverMobile: { - label: '鍙告満鎵嬫満鍙�', - }, - licensePlateNumber: { - label: '杞︾墝鍙�', - }, - orderTime: { - label: '璁㈠崟涓嬪崟鏃堕棿', - }, - orderCreatedTime: { - label: '璁㈠崟鍒涘缓鏃堕棿', - }, - dispatchCreatedTime: { - label: '璋冨害鍗曞垱寤烘椂闂�', - }, - keyCollectionTime: { - label: '閽ュ寵棰嗗彇鏃堕棿', - }, - estimatedDepartureTime: { - label: '棰勮鍑哄彂鏃堕棿', - }, - requiredArrivalTime: { - label: '瑕佹眰鍒拌揪鏃堕棿', - }, - consignorAddress: { - label: '鍑哄彂鍦板湴鍧�', - type: 'textarea', minRows: 3, maxRows: 5, - }, - consigneeAddress: { - label: '鐩殑鍦板湴鍧�', - type: 'textarea', minRows: 3, maxRows: 5, - }, - mainDriver: { - label: '涓婚┚椹跺憳', - }, - pointNum: { - label: '鎻愰�佽揣鐐规暟', - }, - transportMode: { - label: '杩愯緭鏂瑰紡', - }, - assistantDriver: { - label: '鍓┚椹跺憳', - }, - quantity: { - label: '浠舵暟', - }, - dispatchQuantity: { - label: '瀹炲彂浠舵暟', - }, - remark: { - label: '澶囨敞', - type: 'textarea', minRows: 3, maxRows: 5, - }, - } - }) + carrier: { + label: '鎵胯繍鍟�', + minWidth: 200, + showOverflowTooltip: true, + }, + dispatchNo: { + label: '璋冨害鍗曞彿', + minWidth: 200, + search: true, + }, + driverName: { + label: '鍙告満鍚嶇О', + }, + driverMobile: { + label: '鍙告満鎵嬫満鍙�', + minWidth: 200, + }, + licensePlateNumber: { + label: '杞︾墝鍙�', + minWidth: 150, + }, + orderTime: { + label: '璁㈠崟涓嬪崟鏃堕棿', + minWidth: 180, + search: true, + type: 'datetime', // 鏀逛负 datetime 绫诲瀷 + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + minWidth: 200, + }, + orderCreatedTime: { + label: '璁㈠崟鍒涘缓鏃堕棿', + minWidth: 180, + search: true, + type: 'datetime', // 鏀逛负 datetime 绫诲瀷 + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + minWidth: 200, + }, + dispatchCreatedTime: { + label: '璋冨害鍗曞垱寤烘椂闂�', + minWidth: 180, + search: true, + type: 'datetime', // 鏀逛负 datetime 绫诲瀷 + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + minWidth: 200, + }, + keyCollectionTime: { + label: '閽ュ寵棰嗗彇鏃堕棿', + minWidth: 180, + type: 'datetime', // 鏀逛负 datetime 绫诲瀷 + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + minWidth: 200, + }, + estimatedDepartureTime: { + minWidth: 180, + type: 'datetime', // 鏀逛负 datetime 绫诲瀷 + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + minWidth: 200, + label: '棰勮鍑哄彂鏃堕棿', + }, + requiredArrivalTime: { + label: '瑕佹眰鍒拌揪鏃堕棿', + minWidth: 180, + type: 'datetime', // 鏀逛负 datetime 绫诲瀷 + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + minWidth: 200, + }, + consignorAddress: { + label: '鍑哄彂鍦板湴鍧�', + showOverflowTooltip: true, + minWidth: 200, + type: 'textarea', minRows: 3, maxRows: 5, + }, + consigneeAddress: { + label: '鐩殑鍦板湴鍧�', + showOverflowTooltip: true, + minWidth: 200, + type: 'textarea', minRows: 3, maxRows: 5, + }, + mainDriver: { + label: '涓婚┚椹跺憳', + minWidth: 150, + }, + pointNum: { + label: '鎻愰�佽揣鐐规暟', + minWidth: 150, + }, + transportMode: { + label: '杩愯緭鏂瑰紡', + minWidth: 150, + }, + assistantDriver: { + label: '鍓┚椹跺憳', + minWidth: 150, + }, + quantity: { + label: '浠舵暟', + }, + dispatchQuantity: { + label: '瀹炲彂浠舵暟', + }, + remark: { + minWidth: 150, + showOverflowTooltip: true, + label: '澶囨敞', + type: 'textarea', minRows: 3, maxRows: 5, + }, + } +}) - 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:listKeyCollectionInfo, - getDetailApi:getKeyCollectionInfo, - exportApi:exportKeyCollectionInfo, - deleteApi:delKeyCollectionInfo, - addApi:addKeyCollectionInfo, - updateApi:updateKeyCollectionInfo, - handleUpdateFunc:()=>{ +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: listKeyCollectionInfo, + getDetailApi: getKeyCollectionInfo, + exportApi: exportKeyCollectionInfo, + deleteApi: delKeyCollectionInfo, + addApi: addKeyCollectionInfo, + updateApi: updateKeyCollectionInfo, + handleUpdateFunc: () => { crudRef.value.rowEdit(selectionList.value[0]); }, - handleSelectionChangeFunc:(selection:any)=>{ + handleSelectionChangeFunc: (selection: any) => { selectionList.value = selection; } }) </script> +<style scoped> +::v-deep .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell { + border: var(--el-descriptions-table-border); + padding: 8px 11px; + width: 200px; +} + +:deep(.avue-crud__table) { + overflow-y: auto; +} + +:deep(.el-scrollbar__bar.is-horizontal) { + pointer-events: auto; +} +</style> \ No newline at end of file -- Gitblit v1.8.0