Squashed commit of the following:

commit 90df51097f
Author: 浅念 <email@sample.com>
Date:   Wed Sep 24 18:50:35 2025 +0800

    备货单 采购单

commit 7b1fdf3883
Author: 浅念 <email@sample.com>
Date:   Wed Sep 24 11:15:31 2025 +0800

    渠道筛选

commit 1c81d3108c
Author: 浅念 <email@sample.com>
Date:   Wed Sep 24 10:50:43 2025 +0800

    客户列表 添加渠道筛选

commit 2b877e9b4d
Author: 浅念 <email@sample.com>
Date:   Mon Sep 22 10:20:46 2025 +0800

    去掉编码显示

commit bee80af5af
Author: 浅念 <email@sample.com>
Date:   Fri Sep 19 16:43:30 2025 +0800

    港口添加 英文

commit 045ce9289c
Author: 浅念 <email@sample.com>
Date:   Thu Sep 18 15:17:30 2025 +0800

    审批历史 和代办审批

commit c5ec4bb5e1
Author: 浅念 <email@sample.com>
Date:   Thu Sep 18 11:31:22 2025 +0800

    修改kpi

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

    车辆信息,备货单  等页面

# Conflicts:
#	src/api/adminApi.ts
#	src/api/crmApi.ts
#	src/components/custom/OrderDetailContent.vue
#	src/composables/useOrderDetailDialog.ts
#	src/composables/useStockingForm.ts
#	src/views/admin/approval/stocking_auth.vue
#	src/views/admin/approval/stocking_auth_detil.vue
#	src/views/admin/stock/final_list_admin.vue
#	src/views/admin/stock/stocking_list_admin.vue
#	src/views/admin/user/index.vue
#	src/views/admin/vehicle/color.vue
#	src/views/admin/vehicle/modification.vue
#	src/views/admin/vehicle/port.vue
#	src/views/admin/vehicle/vehicle_list.vue
#	src/views/crmpc/approval/stocking_auth.vue
#	src/views/crmpc/stocking/Add.vue
#	src/views/crmpc/stocking/final_add.vue
#	src/views/crmpc/stocking/final_edit.vue
#	src/views/crmpc/stocking/final_list.vue
#	src/views/crmpc/stocking/stocking_edit.vue
#	src/views/crmpc/stocking/stocking_list.vue
#	src/views/crmpc/vehicle/color.vue
#	src/views/crmpc/vehicle/modification.vue
#	src/views/crmpc/vehicle/vehicle_list.vue
This commit is contained in:
浅念
2025-09-24 19:06:26 +08:00
parent 4f18a1b8bf
commit 9925e2e2e4
39 changed files with 3861 additions and 159 deletions
+1 -1
View File
@@ -149,7 +149,7 @@
const params = {
current: currentPage,
size: pageSize,
is_final: 0, // 只获取备货单,非终版
scene: 'todo',
keyword: keyword.value
}
@@ -0,0 +1,384 @@
<template>
<div class="stocking-page">
<div class="stocking-toolbar boxshadow">
<!-- <div class="toolbar-left">
<ElButton type="primary" v-ripple @click="handleCreate">创建备货单</ElButton>
</div> -->
<div class="toolbar-right">
<el-input
v-model="keyword"
placeholder="请输入客户名称"
clearable
style="width: 260px"
@keyup.enter="getList"
>
<template #suffix>
<el-icon class="clickable" @click="getList"><Search /></el-icon>
</template>
</el-input>
</div>
</div>
<div class="boxshadow">
<ArtTable
ref="tableRef"
row-key="id"
:loading="loading"
:data="tableData"
:currentPage="pagination.currentPage"
:pageSize="pagination.pageSize"
:total="pagination.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
<template #default>
<ElTableColumn label="审批单名称" prop="flows_name" min-width="140" />
<ElTableColumn label="审批说明" prop="biz_desc" min-width="160" />
<ElTableColumn label="审批结果" prop="action_desc" min-width="160" />
<ElTableColumn label="提交人" prop="initiator_name" min-width="120" />
<ElTableColumn label="审核人" prop="approver_name" min-width="120" />
<ElTableColumn label="审批时间" prop="approved_at" min-width="120" />
<ElTableColumn label="状态" prop="status_desc" min-width="120" />
<ElTableColumn label="创建时间" prop="created_at" min-width="120" />
<ElTableColumn label="操作" fixed="right" min-width="140" align="center">
<template #default="scope">
<ElRow :gutter="10" justify="center">
<el-link
type="primary"
underline="never"
@click="handleView(scope.row)"
style="margin-right: 8px"
>
<i class="iconfont-sys">&#xe76c;</i> 查看审批
</el-link>
<el-link
v-if="scope.row.status == 'pending'"
type="success"
underline="never"
@click="handleCreateRepair(scope.row)"
>
<i class="iconfont-sys">&#xe6bf;</i> 快速审批
</el-link>
</ElRow>
</template>
</ElTableColumn>
</template>
</ArtTable>
</div>
<!-- 快速审批弹出框 -->
<el-dialog
v-model="approvalDialogVisible"
title="合塑实业-汽车事业部-备货单(客户下定)"
width="80%"
:close-on-click-modal="false"
:close-on-press-escape="false"
class="approval-dialog"
>
<div class="approval-content">
<!-- 头部信息 -->
<OrderDetailContent :orderData="orderDialog.orderData" />
<!-- 审批备注 -->
<div class="info-section">
<ElRow :gutter="12">
<ElCol :span="24">
<el-input
v-model="approvalNotes"
type="textarea"
:rows="2"
placeholder="备注"
class="approval-notes"
/>
</ElCol>
</ElRow>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<ElButton type="primary" plain size="large" class="submit-btn" @click="handleApprove('reject')"
>驳回</ElButton
>
<ElButton type="primary" size="large" class="submit-btn" @click="handleApprove('approve')"
>同意</ElButton
>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import { router } from '@/router'
// import { manageService } from '@/api/adminApi'
import { useAuth } from '@/composables/useAuth'
import { CrmService } from '@/api/crmApi'
import { commonService } from '@/api/commonApi'
import OrderDetailContent from '@/components/custom/OrderDetailContent.vue'
import type { OrderData } from '@/composables/useOrderDetailDialog'
defineOptions({ name: 'CrmStockingAuth' }) // 定义组件名称,用于 KeepAlive 缓存控制
const { hasAuth } = useAuth()
const orderDialog = reactive({
orderData: {} as OrderData
})
const loading = ref(false)
const keyword = ref('')
const tableRef = ref()
const tableData = ref<any[]>([])
const pagination = reactive({ currentPage: 1, pageSize: 10, total: 0 })
// 审批弹出框相关
const approvalDialogVisible = ref(false)
const approvalNotes = ref('')
onMounted(() => {
getList()
})
watch([keyword], () => {
pagination.currentPage = 1
// 不自动请求,保持与截图行为一致,点击搜索或回车触发
})
const getList = async () => {
loading.value = true
try {
const { currentPage, pageSize } = pagination
const params = {
current: currentPage,
size: pageSize,
scene: 'history',
keyword: keyword.value
}
const { records, current, size, total } = await CrmService.stockapprovalrecord(params)
tableData.value = records || []
Object.assign(pagination, { currentPage: current, pageSize: size, total })
} catch (error) {
console.error('获取列表失败:', error)
} finally {
loading.value = false
}
}
const handleSizeChange = (size: number) => {
pagination.pageSize = size
getList()
}
const handleCurrentChange = (page: number) => {
pagination.currentPage = page
getList()
}
const handleView = (row: any) => {
router.push({
path: '/crmpc/approval/auth_detil',
query: { id: row.id, biz_id: row.biz_id, instance_id: row.instance_id, status: row.status } // 可带客户名等参数
})
}
const getDictItemSelectlist = ref<any[]>([])
const getDictItemSelect = async () => {
const res = await commonService.getDictItemSelect({ dict_id: '18' })
getDictItemSelectlist.value = res
}
const instance_id = ref('')
const handleCreateRepair = async (row: any) => {
// getDictItemSelect()
instance_id.value = row.instance_id
const res = await CrmService.checkStock({ id: row.biz_id })
const orderData: OrderData = res
orderDialog.orderData = orderData
approvalDialogVisible.value = true
}
// 审批操作
const handleApprove = async (approvalAction: string) => {
try {
// 这里调用审批API
const { message } = await CrmService.stockapprovalpass({
instance_id: instance_id.value,
action: approvalAction,
comment: approvalNotes.value
})
ElMessage.success(message)
approvalDialogVisible.value = false
approvalNotes.value = ''
instance_id.value = ''
// 刷新列表
getList()
} catch (error) {
console.error('审批失败:', error)
ElMessage.error('审批失败')
}
}
</script>
<style scoped lang="scss">
:deep(.el-table__empty-block) {
height: 100% !important;
min-height: 200px;
display: flex;
align-items: center;
justify-content: center;
}
.stocking-page {
background: var(--art-main-bg-color);
min-height: 100vh;
}
.stocking-toolbar {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
padding: 12px 16px;
background: var(--art-main-bg-color);
}
.toolbar-left {
display: flex;
align-items: center;
gap: 8px;
}
.toolbar-right {
display: flex;
align-items: center;
}
.clickable {
cursor: pointer;
}
// 审批弹出框样式
.approval-dialog {
.approval-content {
max-height: 70vh;
overflow-y: auto;
}
.header {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 12px;
color: #333333;
.mr40 { margin-right: 40px; }
}
.info-section {
margin-bottom: 24px;
.section-title {
display: flex;
align-items: center;
margin-bottom: 16px;
.title-bar {
width: 4px;
height: 20px;
background: #409eff;
margin-right: 8px;
border-radius: 2px;
}
span {
font-size: 16px;
font-weight: 600;
color: #303133;
}
}
}
.order-items {
.order-item {
border: 1px solid #e4e7ed;
border-radius: 8px;
padding: 16px;
margin-bottom: 16px;
background: #fafafa;
.item-header {
margin-bottom: 16px;
padding-bottom: 12px;
border-bottom: 1px solid #e4e7ed;
.item-title {
font-size: 16px;
font-weight: 600;
color: #303133;
}
}
.item-details {
.detail-row {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16px;
margin-bottom: 12px;
.detail-item {
display: flex;
flex-direction: column;
label {
margin-bottom: 6px;
font-size: 14px;
font-weight: 500;
color: #606266;
}
}
}
}
}
}
.summary-section {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px;
background: #f0f9ff;
border-radius: 8px;
margin-bottom: 24px;
.summary-item {
.summary-label {
font-weight: 600;
color: #606266;
margin-right: 8px;
}
.summary-value {
font-size: 18px;
font-weight: 700;
color: #409eff;
}
}
}
.approval-notes {
width: 100%;
}
.dialog-footer {
justify-content: space-around;
width: 500px;
margin: auto;
display: flex;
gap: 12px;
.reject-btn {
border-color: #409eff;
color: #409eff;
background: white;
&:hover {
background: #ecf5ff;
}
}
.approve-btn {
background: #409eff;
border-color: #409eff;
}
}
}
</style>
+65 -2
View File
@@ -373,6 +373,57 @@
<ElInput v-model="item.ocean_freight_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="佣金" label-width="85px">
<ElInput v-model="item.commission" placeholder="请输入佣金">
<template #suffix>
<ElSelect v-model="item.commission_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.commission_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="购置税" label-width="85px">
<ElInput v-model="item.purchase_tax" placeholder="请输入购置税">
<template #suffix>
<ElSelect v-model="item.purchase_tax_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.purchase_tax_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="预估退税额" label-width="85px">
<ElInput v-model="item.tax_refund" placeholder="请输入预估退税额">
<template #suffix>
<ElSelect v-model="item.tax_refund_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.tax_refund_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12" class="item-row-wrap">
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
@@ -429,6 +480,13 @@
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12" class="item-row-wrap">
<ElCol :sm="24" :md="24" :lg="24" :xl="24">
<ElFormItem label="备注" label-width="85px">
<ElInput type="textarea" :rows="2" v-model="item.remark" placeholder="请输入备注" />
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12">
<ElCol :span="24" style="text-align: right">
<el-tag effect="light" type="success" @click="copyRow(idx)" class="row-actions">
@@ -527,7 +585,12 @@
(portOptions || []).find((x: any) => x.id === val)?.port_name || '')
"
>
<ElOption v-for="p in portOptions" :key="p.id" :label="p.port_name" :value="p.id" />
<ElOption
v-for="p in portOptions"
:key="p.id"
:label="p.port_names"
:value="p.id"
/>
</ElSelect>
<ElInput v-model="baseForm.domestic_port_snapshot" type="hidden" />
</ElFormItem>
@@ -589,7 +652,7 @@
<ElOption
v-for="p in portOptionsall"
:key="p.id"
:label="p.port_name"
:label="p.port_names"
:value="p.id"
/>
</ElSelect>
+65 -2
View File
@@ -374,6 +374,57 @@
<ElInput v-model="item.ocean_freight_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="佣金" label-width="85px">
<ElInput v-model="item.commission" placeholder="请输入佣金">
<template #suffix>
<ElSelect v-model="item.commission_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.commission_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="购置税" label-width="85px">
<ElInput v-model="item.purchase_tax" placeholder="请输入购置税">
<template #suffix>
<ElSelect v-model="item.purchase_tax_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.purchase_tax_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="预估退税额" label-width="85px">
<ElInput v-model="item.tax_refund" placeholder="请输入预估退税额">
<template #suffix>
<ElSelect v-model="item.tax_refund_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.tax_refund_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12" class="item-row-wrap">
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
@@ -435,6 +486,13 @@
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12" class="item-row-wrap">
<ElCol :sm="24" :md="24" :lg="24" :xl="24">
<ElFormItem label="备注" label-width="85px">
<ElInput type="textarea" :rows="2" v-model="item.remark" placeholder="请输入备注" />
</ElFormItem>
</ElCol>
</ElRow>
</div>
<ElRow :gutter="12">
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
@@ -509,7 +567,12 @@
(portOptions || []).find((x: any) => x.id === val)?.port_name || '')
"
>
<ElOption v-for="p in portOptions" :key="p.id" :label="p.port_name" :value="p.id" />
<ElOption
v-for="p in portOptions"
:key="p.id"
:label="p.port_names"
:value="p.id"
/>
</ElSelect>
<ElInput v-model="baseForm.domestic_port_snapshot" type="hidden" />
</ElFormItem>
@@ -571,7 +634,7 @@
<ElOption
v-for="p in portOptionsall"
:key="p.id"
:label="p.port_name"
:label="p.port_names"
:value="p.id"
/>
</ElSelect>
+65 -2
View File
@@ -453,6 +453,57 @@
<ElInput v-model="item.ocean_freight_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="佣金" label-width="85px">
<ElInput v-model="item.commission" placeholder="请输入佣金">
<template #suffix>
<ElSelect v-model="item.commission_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.commission_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="购置税" label-width="85px">
<ElInput v-model="item.purchase_tax" placeholder="请输入购置税">
<template #suffix>
<ElSelect v-model="item.purchase_tax_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.purchase_tax_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="预估退税额" label-width="85px">
<ElInput v-model="item.tax_refund" placeholder="请输入预估退税额">
<template #suffix>
<ElSelect v-model="item.tax_refund_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.tax_refund_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12" class="item-row-wrap">
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
@@ -526,6 +577,13 @@
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12" class="item-row-wrap">
<ElCol :sm="24" :md="24" :lg="24" :xl="24">
<ElFormItem label="备注" label-width="85px">
<ElInput type="textarea" :rows="2" v-model="item.remark" placeholder="请输入备注" />
</ElFormItem>
</ElCol>
</ElRow>
</div>
<ElRow :gutter="12">
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
@@ -600,7 +658,12 @@
(portOptions || []).find((x: any) => x.id === val)?.port_name || '')
"
>
<ElOption v-for="p in portOptions" :key="p.id" :label="p.port_name" :value="p.id" />
<ElOption
v-for="p in portOptions"
:key="p.id"
:label="p.port_names"
:value="p.id"
/>
</ElSelect>
<ElInput v-model="baseForm.domestic_port_snapshot" type="hidden" />
</ElFormItem>
@@ -661,7 +724,7 @@
<ElOption
v-for="p in portOptionsall"
:key="p.id"
:label="p.port_name"
:label="p.port_names"
:value="p.id"
/>
</ElSelect>
+42 -1
View File
@@ -85,6 +85,9 @@
<el-link type="primary" underline="never" @click="handleView1(scope.row)">
<i class="iconfont-sys">&#xe76c;</i> 查看终版
</el-link>
<el-link type="warning" underline="never" @click="showDialogtimeline(scope.row)">
<i class="iconfont-sys">&#xe728;</i> 查看审批
</el-link>
</template>
</ElTableColumn>
</template>
@@ -174,6 +177,19 @@
/>
</div>
</el-dialog>
<el-dialog
v-model="timelineDialogVisible"
title="审批历史"
width="600px"
:close-on-click-modal="false"
:close-on-press-escape="false"
class="approval-dialog"
>
<div class="approval-content">
<!-- 头部信息 -->
<ApprovalTimeline :records="approvalRecords" />
</div>
</el-dialog>
</div>
</template>
@@ -184,6 +200,10 @@
import { usePdfPreview } from '@/composables/usePdfPreview'
import OrderDetailContent from '@/components/custom/OrderDetailContent.vue'
import type { OrderData } from '@/composables/useOrderDetailDialog'
import ApprovalTimeline from '@/components/custom/ApprovalTimeline.vue'
import { manageService } from '@/api/adminApi'
const timelineDialogVisible = ref(false)
const approvalRecords = ref<any[]>([])
defineOptions({ name: 'CrmFinalList' })
// 订单详情弹窗
const orderDialog = reactive({
@@ -207,7 +227,28 @@
onMounted(() => {
getList()
})
//审批进度
const showDialogtimeline = async (row: any) => {
// 审批记录(兼容多种字段)
const resstockapprovallogs = await manageService.stockapprovaltimeline({
id: row.id,
flow_type: 'stock_orders'
})
console.log(resstockapprovallogs)
const historyList = resstockapprovallogs
if (historyList.length > 0) {
approvalRecords.value = historyList.map((h: any) => ({
name: h?.initiator_name ? h?.initiator_name : h?.name,
role: h?.status_desc,
time: h?.finished_at || '',
approved: h?.status === 'approved' || h?.status === 'submitted',
rejected: h?.status === 'rejected',
pending: h?.status != 'approved' && h?.status != 'rejected' && h?.status != 'submitted',
comment: h?.comment || h?.remark || ''
}))
}
timelineDialogVisible.value = true
}
watch([keyword], () => {
pagination.currentPage = 1
// 不自动请求,保持与截图行为一致,点击搜索或回车触发
+65 -2
View File
@@ -373,6 +373,57 @@
<ElInput v-model="item.ocean_freight_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="佣金" label-width="85px">
<ElInput v-model="item.commission" placeholder="请输入佣金">
<template #suffix>
<ElSelect v-model="item.commission_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.commission_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="购置税" label-width="85px">
<ElInput v-model="item.purchase_tax" placeholder="请输入购置税">
<template #suffix>
<ElSelect v-model="item.purchase_tax_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.purchase_tax_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="预估退税额" label-width="85px">
<ElInput v-model="item.tax_refund" placeholder="请输入预估退税额">
<template #suffix>
<ElSelect v-model="item.tax_refund_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.tax_refund_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12" class="item-row-wrap">
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
@@ -429,6 +480,13 @@
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12" class="item-row-wrap">
<ElCol :sm="24" :md="24" :lg="24" :xl="24">
<ElFormItem label="备注" label-width="85px">
<ElInput type="textarea" :rows="2" v-model="item.remark" placeholder="请输入备注" />
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12">
<ElCol :span="24" style="text-align: right">
<el-tag effect="light" class="row-actions" type="success" @click="copyRow(idx)"> 复制 </el-tag>
@@ -525,7 +583,12 @@
(portOptions || []).find((x: any) => x.id === val)?.port_name || '')
"
>
<ElOption v-for="p in portOptions" :key="p.id" :label="p.port_name" :value="p.id" />
<ElOption
v-for="p in portOptions"
:key="p.id"
:label="p.port_names"
:value="p.id"
/>
</ElSelect>
<ElInput v-model="baseForm.domestic_port_snapshot" type="hidden" />
</ElFormItem>
@@ -586,7 +649,7 @@
<ElOption
v-for="p in portOptionsall"
:key="p.id"
:label="p.port_name"
:label="p.port_names"
:value="p.id"
/>
</ElSelect>
@@ -114,6 +114,9 @@
<el-link type="warning" underline="never" @click="copys(scope.row)">
<i class="iconfont-sys">&#xe8b7;</i> 复制
</el-link>
<el-link type="warning" underline="never" @click="showDialogtimeline(scope.row)">
<i class="iconfont-sys">&#xe728;</i> 查看审批
</el-link>
</ElRow>
</template>
</ElTableColumn>
@@ -207,6 +210,19 @@
</template>
</el-dialog>
<!-- 终版详情 -->
<el-dialog
v-model="timelineDialogVisible"
title="审批历史"
width="600px"
:close-on-click-modal="false"
:close-on-press-escape="false"
class="approval-dialog"
>
<div class="approval-content">
<!-- 头部信息 -->
<ApprovalTimeline :records="approvalRecords" />
</div>
</el-dialog>
</div>
</template>
@@ -216,6 +232,10 @@
import { usePdfPreview } from '@/composables/usePdfPreview'
import OrderDetailContent from '@/components/custom/OrderDetailContent.vue'
import type { OrderData } from '@/composables/useOrderDetailDialog'
import ApprovalTimeline from '@/components/custom/ApprovalTimeline.vue'
import { manageService } from '@/api/adminApi'
const timelineDialogVisible = ref(false)
const approvalRecords = ref<any[]>([])
// import { useAuth } from '@/composables/useAuth'
// const { hasAuth } = useAuth()
@@ -241,6 +261,28 @@
onMounted(() => {
getList()
})
//审批进度
const showDialogtimeline = async (row: any) => {
// 审批记录(兼容多种字段)
const resstockapprovallogs = await manageService.stockapprovaltimeline({
id: row.id,
flow_type: 'stock_orders'
})
console.log(resstockapprovallogs)
const historyList = resstockapprovallogs
if (historyList.length > 0) {
approvalRecords.value = historyList.map((h: any) => ({
name: h?.initiator_name ? h?.initiator_name : h?.name,
role: h?.status_desc,
time: h?.time || '',
approved: h?.status === 'approved' || h?.status === 'submitted',
rejected: h?.status === 'rejected',
pending: h?.status != 'approved' && h?.status != 'rejected' && h?.status != 'submitted',
comment: h?.comment || h?.remark || ''
}))
}
timelineDialogVisible.value = true
}
function statusClass(status: any) {
if (status === 'rejected') return 'status-lost'
if (status === 'approved') return 'status-following'
+1 -1
View File
@@ -55,7 +55,7 @@
@current-change="handleCurrentChange"
>
<template #default>
<ElTableColumn label="颜色编码" prop="color_code" min-width="120" />
<!-- <ElTableColumn label="颜色编码" prop="color_code" min-width="120" /> -->
<ElTableColumn label="颜色名称" prop="color_text" min-width="150" />
<ElTableColumn label="类型" prop="type" width="120">
<template #default="scope">
+1 -1
View File
@@ -42,7 +42,7 @@
@current-change="handleCurrentChange"
>
<template #default>
<ElTableColumn label="项目编码" prop="code" min-width="120" />
<!-- <ElTableColumn label="项目编码" prop="code" min-width="120" /> -->
<ElTableColumn label="项目名称" prop="name" min-width="150" />
<ElTableColumn label="改装类型" prop="type" width="120">
<template #default="scope">
+2 -2
View File
@@ -109,7 +109,7 @@
<ElRow :gutter="16">
<ElCol :span="8">
<ElFormItem label="品牌名称" prop="brand_name">
<ElSelect v-model="formData.brand_name" placeholder="请选择品牌名称">
<ElSelect v-model="formData.brand_name" filterable placeholder="请选择品牌名称">
<ElOption
v-for="item in brandOptions"
:key="item.brand_code || item.code"
@@ -122,7 +122,7 @@
</ElCol>
<ElCol :span="8">
<ElFormItem label="车系名称" prop="series_name">
<ElSelect v-model="formData.series_name" placeholder="请选择车系名称">
<ElSelect v-model="formData.series_name" filterable placeholder="请选择车系名称">
<ElOption
v-for="s in seriesOptions"
:key="s.series_code || s.code"