Squashed commit of the following:

commit 9e260ddcd8
Author: 浅念 <email@sample.com>
Date:   Thu Sep 18 09:49:33 2025 +0800

    修改 kpi

commit 6feb3ace75
Author: 浅念 <email@sample.com>
Date:   Thu Sep 18 09:42:44 2025 +0800

    kpi 统计

commit ec257a246d
Author: 浅念 <email@sample.com>
Date:   Wed Sep 17 17:04:35 2025 +0800

    修改 弹框表格

commit fa764852ab
Author: 浅念 <email@sample.com>
Date:   Wed Sep 17 15:54:35 2025 +0800

    添加 账户简称

commit 65f7f4a123
Author: 浅念 <email@sample.com>
Date:   Wed Sep 17 15:10:28 2025 +0800

    品牌加热门  修改 仪表盘接口

commit 922cfec81d
Author: 浅念 <email@sample.com>
Date:   Tue Sep 16 15:57:17 2025 +0800

    调整备货单  crm 端页面

commit 5c8df36f12
Author: 浅念 <email@sample.com>
Date:   Mon Sep 15 17:14:38 2025 +0800

    调整备货单 及各页面名称

commit 5503a14408
Author: 浅念 <email@sample.com>
Date:   Fri Sep 12 18:10:03 2025 +0800

    账户添加公司

commit 3439b45d9a
Author: 浅念 <email@sample.com>
Date:   Fri Sep 12 17:53:26 2025 +0800

    修改终版备货单

commit 045d13eb7b
Author: 浅念 <email@sample.com>
Date:   Fri Sep 12 17:49:07 2025 +0800

    修改备货单 等页面

commit da690dfa06
Author: 浅念 <email@sample.com>
Date:   Thu Sep 11 17:44:37 2025 +0800

    修改 备货单 详情

commit 853e9591b3
Author: 浅念 <email@sample.com>
Date:   Wed Sep 10 18:11:39 2025 +0800

    修改 备货单页面

commit 9052bd1027
Author: 浅念 <email@sample.com>
Date:   Tue Sep 9 20:53:30 2025 +0800

    备货单  审核功能

commit 079d9babb8
Merge: ebd7479 91d810b
Author: 浅念 <email@sample.com>
Date:   Tue Sep 9 14:51:43 2025 +0800

    Merge branch 'feature/crm_pc' of http://219.157.255.213:25311/xinyouhe/art-design into feature/crm_vehicle

commit ebd7479573
Merge: 64e53b6 459d306
Author: 浅念 <email@sample.com>
Date:   Tue Sep 9 13:57:28 2025 +0800

    Merge branch 'feature/crm_pc' of http://219.157.255.213:25311/xinyouhe/art-design into feature/crm_vehicle

commit 64e53b6ee9
Author: 浅念 <email@sample.com>
Date:   Mon Sep 8 19:09:55 2025 +0800

    备货单 加 审批流程

commit 9bd7c89cb4
Author: 浅念 <email@sample.com>
Date:   Thu Sep 4 15:09:17 2025 +0800

    车辆信息,备货单  等页面
This commit is contained in:
浅念
2025-09-18 09:55:10 +08:00
parent 91d810b33a
commit a514bf4009
88 changed files with 27057 additions and 491 deletions
+1 -1
View File
@@ -93,7 +93,7 @@
import { systemService } from '@/api/systemApi'
import { useAuth } from '@/composables/useAuth'
const { hasAuth } = useAuth()
defineOptions({ name: 'Type ' })
defineOptions({ name: 'Company' })
const loading = ref(false)
const dialogVisible = ref(false)
const formRef = ref<FormInstance>()
+538
View File
@@ -0,0 +1,538 @@
<template>
<div class="page-content">
<div v-if="!isMobile" class="dict-layout">
<ElRow :gutter="16">
<ElCol :xs="24" :sm="8" :lg="8">
<div class="dict-type-card">
<div class="card-header">
<ElSelect v-model="category_id" placeholder="请选择字典分类" clearable>
<ElOption
v-for="item in DictTypeSelect"
:key="item.id"
:label="item.item_label"
:value="item.id"
/>
</ElSelect>
<el-input
style="margin-left: 8px"
v-model="typeKeyword"
@keyup.enter="getTypeList"
placeholder="请输入关键字"
/>
<ElButton style="margin-left: 8px; min-width: 70px" @click="getTypeList" v-ripple
>搜索</ElButton
>
<ElButton
type="primary"
style="margin-left: 8px"
@click="showTypeDialog('add')"
v-if="hasAuth('system@dictionary_add')"
>新增类型</ElButton
>
</div>
<el-table
:data="typeTableData"
v-loading="typeLoading"
height="calc(100vh - 280px)"
@row-click="handleTypeRowClick"
:highlight-current-row="true"
:row-key="'id'"
>
<el-table-column prop="dict_code" label="字典编码" />
<el-table-column prop="dict_name" label="字典名称" />
<el-table-column prop="category" label="字典分类" />
<el-table-column prop="description" label="描述" show-overflow-tooltip />
<el-table-column fixed="right" label="操作" min-width="140" align="center">
<template #default="scope">
<el-button
link
size="small"
@click.stop="showTypeDialog('edit', scope.row)"
v-if="hasAuth('system@dictionary_update')"
>编辑</el-button
>
<el-button
link
type="danger"
size="small"
@click.stop="handleTypeDelete(scope.row)"
v-if="hasAuth('system@dictionary_destroy')"
>删除</el-button
>
</template>
</el-table-column>
<template #empty>
<el-empty description="暂无类型" v-show="!typeLoading" />
</template>
</el-table>
<div class="type-pagination">
<el-pagination
background
layout="total, sizes, prev, pager, next"
:current-page="typePagination.currentPage"
:page-size="typePagination.pageSize"
:total="typePagination.total"
:page-sizes="[10, 20, 30, 50]"
@current-change="handleTypeCurrentChange"
@size-change="handleTypeSizeChange"
/>
</div>
</div>
</ElCol>
<ElCol :xs="24" :sm="16" :lg="16">
<div class="dict-item-card">
<div class="card-header">
<div class="left">
<span v-if="activeType"
>当前类型:{{ activeType.dict_name }}({{ activeType.dict_code }})</span
>
<span v-else class="muted">请选择左侧字典类型</span>
</div>
<div class="right">
<ElInput
v-model="itemKeyword"
placeholder="搜索字典项名称/值"
clearable
style="width: 240px"
@keyup.enter="getItemList"
/>
<ElButton style="margin-left: 8px" @click="getItemList" v-ripple>搜索</ElButton>
<ElButton
type="primary"
style="margin-left: 8px"
@click="showItemDialog('add')"
:disabled="!activeType"
v-if="hasAuth('system@dictionary_add')"
>新增字典项</ElButton
>
</div>
</div>
<ArtTable
ref="itemTableRef"
row-key="id"
:loading="itemLoading"
:data="itemTableData"
:currentPage="itemPagination.currentPage"
:pageSize="itemPagination.pageSize"
:total="itemPagination.total"
@size-change="handleItemSizeChange"
@current-change="handleItemCurrentChange"
>
<template #default>
<ElTableColumn label="ID" prop="id" width="80" />
<ElTableColumn label="字典项名称" prop="item_label" min-width="160" />
<ElTableColumn
label="字典项值"
prop="item_value"
min-width="160"
show-overflow-tooltip
/>
<ElTableColumn label="备注" prop="remark" min-width="160" show-overflow-tooltip />
<!-- <ElTableColumn label="排序" prop="sort" width="100" /> -->
<ElTableColumn label="状态" prop="status" width="120">
<template #default="scope">
<ElTag :type="scope.row.status ? 'primary' : 'info'">{{
scope.row.status ? '启用' : '禁用'
}}</ElTag>
</template>
</ElTableColumn>
<ElTableColumn label="创建时间" prop="created_at" min-width="160" />
<ElTableColumn fixed="right" label="操作" min-width="140px" align="center">
<template #default="scope">
<ElRow>
<el-button
link
@click="showItemDialog('edit', scope.row)"
v-if="hasAuth('system@dictionary_update')"
>编辑</el-button
>
<el-button
type="danger"
link
@click="handleItemDelete(scope.row)"
v-if="hasAuth('system@dictionary_destroy')"
>删除</el-button
>
</ElRow>
</template>
</ElTableColumn>
</template>
</ArtTable>
</div>
</ElCol>
</ElRow>
<ElDialog
v-model="typeDialogVisible"
:title="typeDialogType === 'add' ? '新增字典类型' : '编辑字典类型'"
width="40%"
align-center
>
<ElForm ref="typeFormRef" :model="typeForm" :rules="typeRules" label-width="100px">
<ElFormItem label="字典分类" prop="category_id">
<ElSelect v-model="typeForm.category_id" placeholder="请选择字典分类" clearable>
<ElOption
v-for="item in DictTypeSelect"
:key="item.id"
:label="item.item_label"
:value="item.id"
/>
</ElSelect>
</ElFormItem>
<ElFormItem label="字典编码" prop="dict_code">
<ElInput v-model="typeForm.dict_code" />
</ElFormItem>
<ElFormItem label="字典名称" prop="dict_name">
<ElInput v-model="typeForm.dict_name" />
</ElFormItem>
<ElFormItem label="描述" prop="description">
<ElInput v-model="typeForm.description" type="textarea" :rows="2" />
</ElFormItem>
<ElFormItem label="状态" prop="status">
<ElSwitch v-model="typeForm.status" :active-value="1" :inactive-value="0" />
</ElFormItem>
</ElForm>
<template #footer>
<div class="dialog-footer">
<ElButton @click="typeDialogVisible = false">取消</ElButton>
<ElButton type="primary" @click="handleTypeSubmit(typeFormRef)">提交</ElButton>
</div>
</template>
</ElDialog>
<ElDialog
v-model="itemDialogVisible"
:title="itemDialogType === 'add' ? '新增字典项' : '编辑字典项'"
width="50%"
align-center
>
<ElForm ref="itemFormRef" :model="itemForm" :rules="itemRules" label-width="100px">
<ElFormItem label="所属类型">
<ElInput
:model-value="activeType ? `${activeType.dict_name}(${activeType.dict_code})` : ''"
disabled
/>
</ElFormItem>
<ElFormItem label="字典项名称" prop="item_label">
<ElInput v-model="itemForm.item_label" />
</ElFormItem>
<ElFormItem label="字典项值" prop="item_value">
<ElInput v-model="itemForm.item_value" type="textarea" :rows="3" />
</ElFormItem>
<ElFormItem label="排序" prop="sort">
<ElInputNumber v-model="itemForm.sort" :min="0" />
</ElFormItem>
<ElFormItem label="备注" prop="remark">
<ElInput v-model="itemForm.remark" />
</ElFormItem>
<ElFormItem label="状态" prop="status">
<ElSwitch v-model="itemForm.status" :active-value="1" :inactive-value="0" />
</ElFormItem>
</ElForm>
<template #footer>
<div class="dialog-footer">
<ElButton @click="itemDialogVisible = false">取消</ElButton>
<ElButton type="primary" @click="handleItemSubmit(itemFormRef)">提交</ElButton>
</div>
</template>
</ElDialog>
</div>
<div v-else class="mobile-hide-tip">
<p>该页面暂不支持移动端访问</p>
</div>
</div>
</template>
<script setup lang="ts">
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, FormRules } from 'element-plus'
import { systemService } from '@/api/systemApi'
import { commonService } from '@/api/commonApi'
import { useAuth } from '@/composables/useAuth'
const { hasAuth } = useAuth()
defineOptions({ name: 'Dictionary' })
const { width } = useWindowSize()
const isMobile = computed(() => width.value < 500)
// 左侧 类型
const typeLoading = ref(false)
const typeKeyword = ref<string>('')
const category_id = ref<string>('')
const typeTableData = ref<any[]>([])
const typePagination = reactive({ currentPage: 1, pageSize: 10, total: 0 })
const activeType = ref<any | null>(null)
const typeFormRef = ref<FormInstance>()
const typeDialogVisible = ref(false)
const typeDialogType = ref<'add' | 'edit'>('add')
const typeForm = reactive<any>({ id: '', code: '', name: '', status: 1 })
const typeRules = reactive<FormRules>({
dict_code: [{ required: true, message: '请输入字典编码', trigger: 'blur' }],
dict_name: [{ required: true, message: '请输入字典名称', trigger: 'blur' }],
category_id: [{ required: true, message: '请选择字典分类', trigger: 'blur' }]
})
const DictTypeSelect = ref<any[]>([])
const getDictTypeSelect = async () => {
const records = await commonService.getDictTypeSelect()
DictTypeSelect.value = records.sysDictItem
}
const getTypeList = async () => {
typeLoading.value = true
try {
const { currentPage, pageSize } = typePagination
const { records, current, size, total } = await systemService.getDictTypeList({
current: currentPage,
size: pageSize,
keyword: typeKeyword.value,
category_id: category_id.value
})
typeTableData.value = records
Object.assign(typePagination, { currentPage: current, pageSize: size, total })
if (!activeType.value && records && records.length) {
activeType.value = records[0]
await getItemList()
}
} finally {
typeLoading.value = false
}
}
const handleTypeRowClick = async (row: any) => {
activeType.value = row
itemPagination.currentPage = 1
await getItemList()
}
const handleTypeSizeChange = (val: number) => {
typePagination.pageSize = val
getTypeList()
}
const handleTypeCurrentChange = (val: number) => {
typePagination.currentPage = val
getTypeList()
}
const showTypeDialog = (type: 'add' | 'edit', row?: any) => {
typeDialogVisible.value = true
typeDialogType.value = type
if (type === 'edit' && row) {
Object.assign(typeForm, {
id: row.id,
dict_code: row.dict_code,
dict_name: row.dict_name,
description: row.description,
category_id: row.category_id,
status: row.status ?? 1
})
} else {
Object.assign(typeForm, {
id: '',
dict_code: '',
dict_name: '',
description: '',
status: 1,
category_id: ''
})
}
}
const handleTypeDelete = (row: any) => {
ElMessageBox.confirm('确定删除该字典类型吗?删除后其字典项也可能被清理。', '删除确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error'
}).then(async () => {
const { message } = await systemService.dictTypeDelete({ id: row.id })
ElMessage.success(message)
if (activeType.value && activeType.value.id === row.id) {
activeType.value = null
itemTableData.value = []
itemPagination.total = 0
}
getTypeList()
})
}
const handleTypeSubmit = async (formEl: FormInstance | undefined) => {
if (!formEl) return
await formEl.validate(async (valid) => {
if (!valid) return
if (typeDialogType.value === 'add') {
const { message } = await systemService.dictTypeAdd({
dict_code: typeForm.dict_code,
dict_name: typeForm.dict_name,
description: typeForm.description,
status: typeForm.status,
category_id: typeForm.category_id
})
ElMessage.success(message)
} else {
const { message } = await systemService.dictTypeEdit({
id: typeForm.id,
dict_code: typeForm.dict_code,
dict_name: typeForm.dict_name,
description: typeForm.description,
category_id: typeForm.category_id,
status: typeForm.status
})
ElMessage.success(message)
}
typeDialogVisible.value = false
getTypeList()
})
}
// 右侧 字典项
const itemLoading = ref(false)
const itemKeyword = ref<string>('')
const itemTableData = ref<any[]>([])
const itemTableRef = ref()
const itemPagination = reactive({ currentPage: 1, pageSize: 10, total: 0 })
const itemFormRef = ref<FormInstance>()
const itemDialogVisible = ref(false)
const itemDialogType = ref<'add' | 'edit'>('add')
const itemForm = reactive<any>({
id: '',
item_label: '',
item_value: '',
sort: 0,
status: 1,
remark: ''
})
const itemRules = reactive<FormRules>({
item_label: [{ required: true, message: '请输入字典项', trigger: 'blur' }],
item_value: [{ required: true, message: '请输入描述', trigger: 'blur' }]
})
const getItemList = async () => {
if (!activeType.value) return
itemLoading.value = true
try {
const { currentPage, pageSize } = itemPagination
const { records, current, size, total } = await systemService.getDictItemList({
current: currentPage,
size: pageSize,
keyword: itemKeyword.value,
id: activeType.value.id
})
itemTableData.value = records
Object.assign(itemPagination, { currentPage: current, pageSize: size, total })
} finally {
itemLoading.value = false
}
}
const handleItemSizeChange = (val: number) => {
itemPagination.pageSize = val
getItemList()
}
const handleItemCurrentChange = (val: number) => {
itemPagination.currentPage = val
getItemList()
}
const showItemDialog = (type: 'add' | 'edit', row?: any) => {
itemDialogVisible.value = true
itemDialogType.value = type
if (type === 'edit' && row) {
Object.assign(itemForm, {
id: row.id,
item_label: row.item_label,
item_value: row.item_value,
sort: row.sort ?? 0,
status: row.status ?? 1,
remark: row.remark || ''
})
} else {
Object.assign(itemForm, {
id: '',
item_label: '',
item_value: '',
sort: 0,
status: 1,
remark: ''
})
}
}
const handleItemDelete = (row: any) => {
ElMessageBox.confirm('确定删除该字典项吗?', '删除确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error'
}).then(async () => {
const { message } = await systemService.dictItemDelete({ id: row.id })
ElMessage.success(message)
getItemList()
})
}
const handleItemSubmit = async (formEl: FormInstance | undefined) => {
if (!formEl || !activeType.value) return
await formEl.validate(async (valid) => {
if (!valid) return
if (itemDialogType.value === 'add') {
const { message } = await systemService.dictItemAdd({
dict_id: activeType.value.id,
item_label: itemForm.item_label,
item_value: itemForm.item_value,
sort: itemForm.sort,
status: itemForm.status,
remark: itemForm.remark
})
ElMessage.success(message)
} else {
const { message } = await systemService.dictItemEdit({
id: itemForm.id,
dict_id: activeType.value.id,
item_label: itemForm.item_label,
item_value: itemForm.item_value,
sort: itemForm.sort,
status: itemForm.status,
remark: itemForm.remark
})
ElMessage.success(message)
}
itemDialogVisible.value = false
getItemList()
})
}
onMounted(async () => {
await getDictTypeSelect()
await getTypeList()
})
</script>
<style lang="scss" scoped>
:deep(.el-table__empty-block) {
height: 100% !important;
min-height: 200px;
display: flex;
align-items: center;
justify-content: center;
}
.dict-layout {
.dict-type-card,
.dict-item-card {
background: var(--el-bg-color);
padding: 12px;
border-radius: 8px;
}
.card-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
.left {
font-weight: 500;
}
.right {
display: flex;
align-items: center;
}
.muted {
color: var(--el-text-color-secondary);
}
}
.type-pagination {
margin-top: 8px;
text-align: center;
}
}
</style>
+1 -1
View File
@@ -148,7 +148,7 @@
import { UserService } from '@/api/usersApi'
import { useAuth } from '@/composables/useAuth'
const { hasAuth } = useAuth()
defineOptions({ name: 'Type ' })
defineOptions({ name: 'FeishuApp' })
const loading = ref(false)
const dialogVisible = ref(false)
const formRef = ref<FormInstance>()
+9 -5
View File
@@ -183,22 +183,26 @@
<ElFormItem label="页面缓存" prop="keep_alive">
<ElSwitch
v-model="form.keep_alive"
:active-value="1"
:inactive-value="0"
:active-value="true"
:inactive-value="false"
></ElSwitch>
</ElFormItem>
</ElCol>
<ElCol :span="5">
<ElFormItem label="是否隐藏" prop="is_hide">
<ElSwitch v-model="form.is_hide" :active-value="1" :inactive-value="0"></ElSwitch>
<ElSwitch
v-model="form.is_hide"
:active-value="true"
:inactive-value="false"
></ElSwitch>
</ElFormItem>
</ElCol>
<ElCol :span="5">
<ElFormItem label="标签页是否隐藏" prop="is_hide_tab" label-width="120px">
<ElSwitch
v-model="form.is_hide_tab"
:active-value="1"
:inactive-value="0"
:active-value="true"
:inactive-value="false"
></ElSwitch>
</ElFormItem>
</ElCol>
+1 -1
View File
@@ -119,7 +119,7 @@
import { manageService } from '@/api/adminApi'
import { useAuth } from '@/composables/useAuth'
const { hasAuth } = useAuth()
defineOptions({ name: 'Type ' })
defineOptions({ name: 'AdminNotice' })
const loading = ref(false)
const dialogVisible = ref(false)
const dialogVisiblexq = ref(false)
+1 -1
View File
@@ -155,7 +155,7 @@
import { systemService } from '@/api/systemApi'
import { useAuth } from '@/composables/useAuth'
const { hasAuth } = useAuth()
defineOptions({ name: 'Type ' })
defineOptions({ name: 'Systems' })
const loading = ref(false)
const dialogVisible = ref(false)
const dialogType = ref<'add' | 'edit'>('add')