diff --git a/index.html b/index.html index ecf1721..329d3c9 100644 --- a/index.html +++ b/index.html @@ -30,7 +30,6 @@ margin: 0; padding: 0; border: 0; - user-select: none; } diff --git a/plugin/iconfont-process.ts b/plugin/iconfont-process.ts index cf256cb..1e68fd7 100644 --- a/plugin/iconfont-process.ts +++ b/plugin/iconfont-process.ts @@ -24,6 +24,7 @@ function createTs(text: string) { const tsContent = `export const icons = ${text.trim()} as const export type IconName = (typeof icons.glyphs)[number]['font_class'] +export const iconNames = icons.glyphs.map(it => it.font_class) export interface IconGlyphs { icon_id: string diff --git a/src/assets/stylus/index.styl b/src/assets/stylus/index.styl index ad2b19b..5d9bbf2 100644 --- a/src/assets/stylus/index.styl +++ b/src/assets/stylus/index.styl @@ -47,7 +47,7 @@ text-align-last: justify; display: inline-block !important; position: relative; - padding 0 12px !important; + padding 0 12px 0 0 !important; } .el-form-item.is-error { diff --git a/src/assets/stylus/menu.styl b/src/assets/stylus/menu.styl index 23558a1..8c2ef8d 100644 --- a/src/assets/stylus/menu.styl +++ b/src/assets/stylus/menu.styl @@ -24,6 +24,15 @@ } } + +.el-menu--collapse .el-sub-menu.is-active .el-sub-menu__title { + color #5D87FF !important; +} + +.el-sub-menu.is-active .el-sub-menu__title { + border-bottom-color: #5D87FF !important; +} + .el-sub-menu__title, .el-menu-item { height: 42px !important; diff --git a/src/assets/stylus/root.styl b/src/assets/stylus/root.styl index 6053e02..a5d4bce 100644 --- a/src/assets/stylus/root.styl +++ b/src/assets/stylus/root.styl @@ -20,6 +20,18 @@ body { .region .el-radio-button__original-radio:checked + .el-radio-button__inner { color: var(--theme-color) !important; } + letter-spacing: 1px; + user-select: none; +} + +.el-message-box { + --el-messagebox-width 300px !important + max-width unset !important + width unset !important; +} + +.el-message-box__container { + justify-content center } :focus-visible { diff --git a/src/components/a-icon/iconfont.css b/src/components/a-icon/iconfont.css index 1386cd7..bcc9f6b 100644 --- a/src/components/a-icon/iconfont.css +++ b/src/components/a-icon/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* 项目名称 再昇云 */ - src: url('@/components/a-icon/iconfont.woff2?t=1769142012944') format('woff2'), - url('@/components/a-icon/iconfont.woff?t=1769142012944') format('woff'), - url('@/components/a-icon/iconfont.ttf?t=1769142012944') format('truetype'); + src: url('@/components/a-icon/iconfont.woff2?t=1769666423879') format('woff2'), + url('@/components/a-icon/iconfont.woff?t=1769666423879') format('woff'), + url('@/components/a-icon/iconfont.ttf?t=1769666423879') format('truetype'); } .iconfont { @@ -13,6 +13,30 @@ -moz-osx-font-smoothing: grayscale; } +.icon-liandan:before { + content: "\e65e"; +} + +.icon-chakanliaodan:before { + content: "\e6fc"; +} + +.icon-approach:before { + content: "\e69d"; +} + +.icon-carexit:before { + content: "\e69f"; +} + +.icon-fapiaotaitou:before { + content: "\e85d"; +} + +.icon-qiehuanyonghu:before { + content: "\e893"; +} + .icon-dianhua-1:before { content: "\e65d"; } diff --git a/src/components/a-icon/iconfont.json b/src/components/a-icon/iconfont.json index 8372ba2..09f2d9a 100644 --- a/src/components/a-icon/iconfont.json +++ b/src/components/a-icon/iconfont.json @@ -5,6 +5,48 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "15056965", + "name": "联单", + "font_class": "liandan", + "unicode": "e65e", + "unicode_decimal": 58974 + }, + { + "icon_id": "32234102", + "name": "查看料单", + "font_class": "chakanliaodan", + "unicode": "e6fc", + "unicode_decimal": 59132 + }, + { + "icon_id": "17660527", + "name": "车辆进场", + "font_class": "approach", + "unicode": "e69d", + "unicode_decimal": 59037 + }, + { + "icon_id": "17660543", + "name": "车辆出场", + "font_class": "carexit", + "unicode": "e69f", + "unicode_decimal": 59039 + }, + { + "icon_id": "23736496", + "name": "发票抬头", + "font_class": "fapiaotaitou", + "unicode": "e85d", + "unicode_decimal": 59485 + }, + { + "icon_id": "17789296", + "name": "切换用户", + "font_class": "qiehuanyonghu", + "unicode": "e893", + "unicode_decimal": 59539 + }, { "icon_id": "1272171", "name": "电话", diff --git a/src/components/a-icon/iconfont.ts b/src/components/a-icon/iconfont.ts index 6ec1b26..e69d4d5 100644 --- a/src/components/a-icon/iconfont.ts +++ b/src/components/a-icon/iconfont.ts @@ -5,6 +5,48 @@ export const icons = { 'css_prefix_text': 'icon-', 'description': '', 'glyphs': [ + { + 'icon_id': '15056965', + 'name': '联单', + 'font_class': 'liandan', + 'unicode': 'e65e', + 'unicode_decimal': 58974, + }, + { + 'icon_id': '32234102', + 'name': '查看料单', + 'font_class': 'chakanliaodan', + 'unicode': 'e6fc', + 'unicode_decimal': 59132, + }, + { + 'icon_id': '17660527', + 'name': '车辆进场', + 'font_class': 'approach', + 'unicode': 'e69d', + 'unicode_decimal': 59037, + }, + { + 'icon_id': '17660543', + 'name': '车辆出场', + 'font_class': 'carexit', + 'unicode': 'e69f', + 'unicode_decimal': 59039, + }, + { + 'icon_id': '23736496', + 'name': '发票抬头', + 'font_class': 'fapiaotaitou', + 'unicode': 'e85d', + 'unicode_decimal': 59485, + }, + { + 'icon_id': '17789296', + 'name': '切换用户', + 'font_class': 'qiehuanyonghu', + 'unicode': 'e893', + 'unicode_decimal': 59539, + }, { 'icon_id': '1272171', 'name': '电话', @@ -761,7 +803,7 @@ export const icons = { 'unicode': 'e639', 'unicode_decimal': 58937, }, - ], + ] } as const export type IconName = (typeof icons.glyphs)[number]['font_class'] diff --git a/src/components/a-icon/iconfont.ttf b/src/components/a-icon/iconfont.ttf index 4003999..251deb0 100644 Binary files a/src/components/a-icon/iconfont.ttf and b/src/components/a-icon/iconfont.ttf differ diff --git a/src/components/a-icon/iconfont.woff b/src/components/a-icon/iconfont.woff index 4ccddad..09a81e8 100644 Binary files a/src/components/a-icon/iconfont.woff and b/src/components/a-icon/iconfont.woff differ diff --git a/src/components/a-icon/iconfont.woff2 b/src/components/a-icon/iconfont.woff2 index a0cdda5..e274c15 100644 Binary files a/src/components/a-icon/iconfont.woff2 and b/src/components/a-icon/iconfont.woff2 differ diff --git a/src/components/a-page/a-table-page/ATablePage.tsx b/src/components/a-page/a-table-page/ATablePage.tsx index de7df41..57f1b6f 100644 --- a/src/components/a-page/a-table-page/ATablePage.tsx +++ b/src/components/a-page/a-table-page/ATablePage.tsx @@ -69,6 +69,7 @@ interface ActionColumnType { * 列宽,默认:80px */ width: number + foldLimit: number /** * 按钮列表 */ @@ -197,6 +198,7 @@ function buildTable

(table: DeepPartial(table: DeepPartial
{ const actionColumn = props.table.actionColumn - const len = actionColumn.tableActions.length if (Colls.isEmpty(actionColumn.tableActions)) return (<>) return ( {{ default: (scope: ColumnScopeType) => { + const len = actionColumn.tableActions.filter(it => it.show == null || it.show(scope)).length let btns: any[] - if (len <= 3) { + if (len <= actionColumn.foldLimit) { btns = (actionColumn.tableActions .filter(it => (it.show == null ? true : it.show(scope))) .map((tableAction, i) => (tableAction.confirm != null ? @@ -386,7 +393,7 @@ const component = defineComponent( } else { btns = (actionColumn.tableActions .filter(it => (it.show == null ? true : it.show(scope))) - .filter((_, i) => i < 2) + .filter((_, i) => i < actionColumn.foldLimit - 1) .map((tableAction, i) => (tableAction.confirm != null ? ( (it.show == null ? true : it.show(scope))) - .filter((_, i) => i >= 2) + .filter((_, i) => i >= actionColumn.foldLimit - 1) .map((it, i) => { let elIcon: any | undefined = undefined if (iconNames.includes(it.icon as IconName)) { diff --git a/src/dts/components.d.ts b/src/dts/components.d.ts index fe12964..8645043 100644 --- a/src/dts/components.d.ts +++ b/src/dts/components.d.ts @@ -49,12 +49,12 @@ declare module 'vue' { ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] + ElTag: typeof import('element-plus/es')['ElTag'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElUpload: typeof import('element-plus/es')['ElUpload'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] } - export interface GlobalDirectives { vLoading: typeof import('element-plus/es')['ElLoadingDirective'] } @@ -100,6 +100,7 @@ declare global { const ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] const ElTabPane: typeof import('element-plus/es')['ElTabPane'] const ElTabs: typeof import('element-plus/es')['ElTabs'] + const ElTag: typeof import('element-plus/es')['ElTag'] const ElTooltip: typeof import('element-plus/es')['ElTooltip'] const ElUpload: typeof import('element-plus/es')['ElUpload'] const RouterLink: typeof import('vue-router')['RouterLink'] diff --git a/src/pages/order/history/History.vue b/src/pages/order/history/History.vue index 5b0e1f4..6e639ca 100644 --- a/src/pages/order/history/History.vue +++ b/src/pages/order/history/History.vue @@ -119,7 +119,7 @@ const tablePageProps = buildTablePageProps +import Uploader from '@/components/uploader/Uploader.vue' +import Utils from '@/common/utils' +import ADialog from '@/components/a-dialog/ADialog.vue' +import FormUtil from '@/common/utils/formUtil.ts' +import { + ElMessage, + type FormInstance, +} from 'element-plus' + +const orderData = Utils.resetAble(reactive<{ + id: string + licensePlate: string, + state: '进场' | '出场', +}>({ + id: '', + licensePlate: '', + state: '进场', +})) +const title = computed(() => { + return `${orderData.licensePlate} ${orderData.state}` +}) + +const formIns = useTemplateRef('formRef') + +const inOutData = Utils.resetAble(reactive({ + weight: undefined, + headerPhoto: undefined, + bodyPhoto: undefined, +})) +const showDialog = ref(false) +const submiting = ref(false) + +function dialogCloseHandler() { + inOutData.$reset() +} + +function submitHandler() { + submiting.value = true + FormUtil.submit(formIns, () => Promise.resolve()) + .then(res => { + ElMessage.success(`${title.value}成功`) + if ((res ?? true)) { + showDialog.value = false + } + }) + .finally(() => { + submiting.value = false + }) +} + +defineExpose({ + open(id: string, licensePlate: string, state: '进场' | '出场') { + orderData.$reset({ + id, + licensePlate, + state, + }) + showDialog.value = true + }, +}) + + + + + + diff --git a/src/pages/order/realtime/Realtime.vue b/src/pages/order/realtime/Realtime.vue index 85c3e72..62431d0 100644 --- a/src/pages/order/realtime/Realtime.vue +++ b/src/pages/order/realtime/Realtime.vue @@ -81,6 +81,7 @@ + @@ -92,10 +93,17 @@ import ATablePage, { buildTablePageProps, } from '@/components/a-page/a-table-page/ATablePage.tsx' import BookDetail from '@/pages/order/book/BookDetail.vue' +import { + checkStatus, + transStatus, +} from '@/pages/order/constants.ts' +import InOutPanel from '@/pages/order/realtime/InOutPanel.vue' +import { ElMessage } from 'element-plus' +import { useTemplateRef } from 'vue' const tablePageIns = useTemplateRef('tablePage') const bookDetailIns = useTemplateRef>('bookDetail') - +const inOutPanelIns = useTemplateRef>('inOutPanel') function research() { tablePageIns.value?.doSearch() @@ -107,6 +115,7 @@ const tablePageProps = buildTablePageProps