diff --git a/.auto-import.json b/.auto-import.json index f5553b8..722a261 100644 --- a/.auto-import.json +++ b/.auto-import.json @@ -309,6 +309,7 @@ "watchWithFilter": true, "whenever": true, "ElMessage": true, - "ElTag": true + "ElTag": true, + "ElMessageBox": true } } diff --git a/.env.development b/.env.development index c188e1a..c79c18b 100644 --- a/.env.development +++ b/.env.development @@ -7,8 +7,8 @@ VITE_BASE_URL = / # VITE_API_URL = https://m1.apifoxmock.com/m1/6400575-6097373-default # VITE_API_URL = http://219.157.255.213:25703 # VITE_API_URL = https://mzl.dev.hnxinyouhe.com -# VITE_API_URL = https://fdesk.hnxinyouhe.com -VITE_API_URL = https://x-server.hnxinyouhe.com +VITE_API_URL = https://fdesk.hnxinyouhe.com +# VITE_API_URL = https://x-server.hnxinyouhe.com # VITE_API_URL_WSS = wss://mzl.dev.hnxinyouhe.com # VITE_API_URL_WSS = wss://fdesk.hnxinyouhe.com diff --git a/src/api/admin/finance.ts b/src/api/admin/finance.ts new file mode 100644 index 0000000..334720d --- /dev/null +++ b/src/api/admin/finance.ts @@ -0,0 +1,74 @@ +import request from '@/utils/http' + +export class financeService { + // 收款记录-列表 + static getReceiptList(params: Api.Common.PaginatingParams) { + return request.get({ + url: '/admin/receipt/list', + params + }) + } + // 收款记录-详情 + static getReceiptDetail(params: any) { + return request.get({ + url: '/admin/receipt/show', + params + }) + } + // 收款记录-添加 + static addReceipt(params: any) { + return request.post({ + url: '/admin/receipt/store', + params + }) + } + // 收款记录-更新 + static updateReceipt(params: any) { + return request.post({ + url: '/admin/receipt/update', + params + }) + } + // 收款记录-删除 + static deleteReceipt(params: any) { + return request.post({ + url: '/admin/receipt/destroy', + params + }) + } + //付款申请-列表 + static getPaymentList(params: Api.Common.PaginatingParams) { + return request.get({ + url: '/admin/payment/list', + params + }) + } + //付款申请-详情 + static getPaymentDetail(params: any) { + return request.get({ + url: '/admin/payment/show', + params + }) + } + //付款申请-添加 + static addPayment(params: any) { + return request.post({ + url: '/admin/payment/store', + params + }) + } + //付款申请-更新 + static updatePayment(params: any) { + return request.post({ + url: '/admin/payment/update', + params + }) + } + //付款申请-删除 + static deletePayment(params: any) { + return request.post({ + url: '/admin/payment/destroy', + params + }) + } +} \ No newline at end of file diff --git a/src/api/admin/procurement.ts b/src/api/admin/procurement.ts new file mode 100644 index 0000000..5dbcd1f --- /dev/null +++ b/src/api/admin/procurement.ts @@ -0,0 +1,46 @@ +import request from '@/utils/http' + +export class purchaseService { + // 采购单预置 + static purchaseorderpredata(params: any) { + return request.get({ + url: '/admin/purchase/order/predata', + params + }) + } + // 采购单列表 + static purchaseorderlist(params: Api.Common.PaginatingParams) { + return request.get({ + url: '/admin/purchase/order/list', + params + }) + } + // 采购单添加 + static purchaseorderadd(params: any) { + return request.post({ + url: '/admin/purchase/order/store', + params + }) + } + // 采购单更新 + static purchaseorderupdate(params: any) { + return request.post({ + url: '/admin/purchase/order/update', + params + }) + } + // 采购单删除 + static purchaseorderdelete(params: any) { + return request.post({ + url: '/admin/purchase/order/destroy', + params + }) + } + // 采购单详情 + static purchaseorderdetail(params: any) { + return request.get({ + url: '/admin/purchase/order/show', + params + }) + } +} diff --git a/src/api/adminApi.ts b/src/api/adminApi.ts index 320bfdf..897a2c8 100644 --- a/src/api/adminApi.ts +++ b/src/api/adminApi.ts @@ -251,7 +251,7 @@ export class manageService { //审批记录 static stockapprovalrecord(params: any) { return request.get({ - url: '/admin/approval/records/list', + url: '/admin/approval/records/todo', params }) } @@ -305,4 +305,25 @@ export class manageService { params }) } + //审核详情 + static stockapprovaldetailborder(params: any) { + return request.get({ + url: '/admin/approval/records/border', + params + }) + } + //审批转交 + static stockapprovaltransfer(params: any) { + return request.post({ + url: '/admin/approval/records/transfer', + params + }) + } + //审批时间轴 + static stockapprovaltimeline(params: any) { + return request.get({ + url: '/admin/approval/records/timeline', + params + }) + } } diff --git a/src/api/crmApi.ts b/src/api/crmApi.ts index 3843245..43867a8 100644 --- a/src/api/crmApi.ts +++ b/src/api/crmApi.ts @@ -257,10 +257,10 @@ export class CrmService { params }) } - //审批记录 - static stockapprovalrecord(params: any) { + //审批记录 + static stockapprovalrecord(params: any) { return request.get({ - url: '/crm/approval/records/list', + url: '/crm/approval/records/todo', params }) } diff --git a/src/components/core/tables/ArtTable.vue b/src/components/core/tables/ArtTable.vue index b2c7f18..40f9a9d 100644 --- a/src/components/core/tables/ArtTable.vue +++ b/src/components/core/tables/ArtTable.vue @@ -184,12 +184,11 @@ const elTable = tableRef.value if (!elTable) return - // 递归处理树形数据 + // 支持普通与树形数据行展开 const processRows = (rows: any[]) => { rows.forEach((row) => { - const hasChildren = row.children?.length > 0 - if (hasChildren) { - elTable.toggleRowExpansion(row, true) + elTable.toggleRowExpansion(row, true) + if (row.children?.length > 0) { processRows(row.children) } }) @@ -203,12 +202,11 @@ const elTable = tableRef.value if (!elTable) return - // 递归处理树形数据 + // 支持普通与树形数据行收起 const processRows = (rows: any[]) => { rows.forEach((row) => { - const hasChildren = row.children?.length > 0 - if (hasChildren) { - elTable.toggleRowExpansion(row, false) + elTable.toggleRowExpansion(row, false) + if (row.children?.length > 0) { processRows(row.children) } }) diff --git a/src/components/custom/ApprovalTimeline.vue b/src/components/custom/ApprovalTimeline.vue new file mode 100644 index 0000000..95e5678 --- /dev/null +++ b/src/components/custom/ApprovalTimeline.vue @@ -0,0 +1,132 @@ + + + + + + + diff --git a/src/components/custom/OrderDetailContent.vue b/src/components/custom/OrderDetailContent.vue index 7ef4121..e685e91 100644 --- a/src/components/custom/OrderDetailContent.vue +++ b/src/components/custom/OrderDetailContent.vue @@ -8,7 +8,9 @@
业务员: - {{ orderData.salesperson_snapshot || orderData.salesperson || '—' }} + {{ + orderData.salesperson_snapshot || orderData.salesperson || '—' + }}
@@ -26,19 +28,27 @@ 清关目的国: - {{ orderData.clearance_country_snapshot || orderData.clearanceCountry || '—' }} + {{ + orderData.clearance_country_snapshot || orderData.clearanceCountry || '—' + }} 客户来源: - {{ orderData.customer_source_snapshot || orderData.customerSource || '—' }} + {{ + orderData.customer_source_snapshot || orderData.customerSource || '—' + }} 客户名称: - {{ orderData.customer_snapshot || orderData.customerName || '—' }} + {{ + orderData.customer_snapshot || orderData.customerName || '—' + }} 客户所在国: - {{ orderData.customer_country_snapshot || orderData.customerCountry || '—' }} + {{ + orderData.customer_country_snapshot || orderData.customerCountry || '—' + }} @@ -46,8 +56,16 @@
- +
合同汇率: - {{ orderData.contract_exchange_rate || orderData.contractRate || '—' }} + {{ + orderData.contract_exchange_rate || orderData.contractRate || '—' + }}
合计到岸价: - ${{ formatPrice(Number(orderData.cif_total_amount?.amount ?? orderData.totalCif ?? 0)) }} + ${{ + formatPrice(Number(orderData.cif_total_amount?.amount ?? orderData.totalCif ?? 0)) + }}
利润: - {{ orderData.profit_total?.currency_info || orderData.profit_total?.amount || '—' }} + {{ + orderData.profit_total?.currency_info || orderData.profit_total?.amount || '—' + }}
@@ -131,34 +246,54 @@ 清关人: - {{ orderData.declarant_name || orderData.declarant || '—' }} + {{ + orderData.declarant_name || orderData.declarant || '—' + }} 预计发运日期: - {{ orderData.eta_ship_date || orderData.etaShipDate || '—' }} + {{ + orderData.eta_ship_date || orderData.etaShipDate || '—' + }} 出运方式: - {{ orderData.shipping_method_snapshot || orderData.shippingMethod || '—' }} + {{ + orderData.shipping_method_snapshot || orderData.shippingMethod || '—' + }} 国内收货港: - {{ orderData.domestic_port_snapshot || orderData.domesticPort || '—' }} + {{ + orderData.domestic_port_snapshot || orderData.domesticPort || '—' + }} 贸易条款/清关目的港: - {{ orderData.trade_term_snapshot || orderData.tradeTerms || '—' }}/{{ orderData.clearance_port_snapshot || '—' }} + {{ orderData.trade_term_snapshot || orderData.tradeTerms || '—' }}/{{ + orderData.clearance_port_snapshot || '—' + }} 最迟到港时间: - {{ orderData.latest_arrival_date || orderData.latestArrival || '—' }} + {{ + orderData.latest_arrival_date || orderData.latestArrival || '—' + }} -
+
@@ -192,8 +327,7 @@ + + diff --git a/src/components/custom/ProcurementDetailView.vue b/src/components/custom/ProcurementDetailView.vue new file mode 100644 index 0000000..15ddfb5 --- /dev/null +++ b/src/components/custom/ProcurementDetailView.vue @@ -0,0 +1,169 @@ + + + + + diff --git a/src/components/custom/chat/WorkChatDrawer.vue b/src/components/custom/chat/WorkChatDrawer.vue new file mode 100644 index 0000000..9227e1a --- /dev/null +++ b/src/components/custom/chat/WorkChatDrawer.vue @@ -0,0 +1,213 @@ + + + + + + + diff --git a/src/composables/useOrderDetailDialog.ts b/src/composables/useOrderDetailDialog.ts index 1773613..3e8eef6 100644 --- a/src/composables/useOrderDetailDialog.ts +++ b/src/composables/useOrderDetailDialog.ts @@ -22,6 +22,7 @@ export interface PaymentItem { } export interface OrderData { + contract_file_url: { name: string; url: string }[] orderNo?: string salesperson?: string piNo?: string @@ -45,7 +46,11 @@ export interface OrderData { export function useOrderDetailDialog() { const visible = ref(false) const title = ref('订单详情') - const orderData = ref({}) + const orderData = ref({ + contract_file_url: [], + items: [], + payments: [] + }) const show = (data: OrderData, dialogTitle?: string) => { orderData.value = data diff --git a/src/composables/useStockingForm.ts b/src/composables/useStockingForm.ts index 15ffb52..7b89a5a 100644 --- a/src/composables/useStockingForm.ts +++ b/src/composables/useStockingForm.ts @@ -1,5 +1,5 @@ import { ref, reactive, watch, onMounted } from 'vue' -import { ElMessage } from 'element-plus' +import { componentSizeMap, ElMessage } from 'element-plus' import { CrmService } from '@/api/crmApi' import { commonService } from '@/api/commonApi' import { vehicleService } from '@/api/vehicleApi' @@ -62,9 +62,19 @@ export interface ItemRow { handling_fee: string fob_transport_fee: number | undefined port_misc_fee: string + remark: string ocean_freight: string ocean_freight_currency: string ocean_freight_currency_snapshot: string + commission: string + commission_currency: string + commission_currency_snapshot: string + purchase_tax: string + purchase_tax_currency: string + purchase_tax_currency_snapshot: string + tax_refund: string + tax_refund_currency: string + tax_refund_currency_snapshot: string retrofit_fee: string total_price: number | undefined official_price: number | undefined @@ -195,9 +205,19 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) { handling_fee: '', fob_transport_fee: undefined, port_misc_fee: '', + remark: '', ocean_freight: '', ocean_freight_currency: 'CNY', ocean_freight_currency_snapshot: '人民币', + commission: '', + commission_currency: 'CNY', + commission_currency_snapshot: '人民币', + purchase_tax: '', + purchase_tax_currency: 'CNY', + purchase_tax_currency_snapshot: '人民币', + tax_refund: '', + tax_refund_currency: 'CNY', + tax_refund_currency_snapshot: '人民币', retrofit_fee: '', total_price: undefined, official_price: undefined, @@ -326,7 +346,13 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) { const loadPortOptions = async () => { try { const res = await commonService.getPortSelect({ scene: 'domestic' }) - const resall = await commonService.getPortSelect({}) + res.forEach((item: any) => { + item.port_names = item.port_name + '(' + item.port_name_en + ')' + }) + const resall = await commonService.getPortSelect({ scene: 'overseas' }) + resall.forEach((item: any) => { + item.port_names = item.port_name + '(' + item.port_name_en + ')' + }) portOptions.value = res portOptionsall.value = resall } catch (error) { @@ -428,6 +454,21 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) { (it as any).ocean_freight_currency, targetCurrency ) + const commission = convertCurrency( + it.commission ?? (it as any).commission, + (it as any).commission_currency, + targetCurrency + ) + const purchaseTax = convertCurrency( + it.purchase_tax ?? (it as any).purchase_tax, + (it as any).purchase_tax_currency, + targetCurrency + ) + const taxRefund = convertCurrency( + it.tax_refund ?? (it as any).tax_refund, + (it as any).tax_refund_currency, + targetCurrency + ) const mileageVal = Number(it.mileage ?? 0) if (mileageVal > 0) { // 二手车:用挂牌价与二手减价替代官方指导价与优惠 @@ -441,7 +482,19 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) { (it as any).reduction_price_currency, targetCurrency ) - return unit - (retrofit + fob + listing + reduction + handling + port + ocean) + return ( + unit - + (retrofit + + fob + + listing + + reduction + + handling + + port + + ocean + + commission + + purchaseTax) + + taxRefund + ) } // 新车/里程<=0:保持原有计算(官方指导价与优惠) @@ -455,7 +508,11 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) { (it as any).discount_currency, targetCurrency ) - return unit - (retrofit + fob + guide + discount + handling + port + ocean) + return ( + unit - + (retrofit + fob + guide + discount + handling + port + ocean + commission + purchaseTax) + + taxRefund + ) } // 合同文件相关方法 @@ -672,9 +729,19 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) { handling_fee: it.handling_fee?.amount ?? '', fob_transport_fee: it.fob_transport_fee?.amount ? Number(it.fob_transport_fee.amount) : undefined, port_misc_fee: it.port_misc_fee?.amount ?? '', + remark: it.remark || '', ocean_freight: it.ocean_freight?.amount ?? '', ocean_freight_currency: it.ocean_freight?.currency || 'CNY', ocean_freight_currency_snapshot: '', + commission: it.commission?.amount ?? '', + commission_currency: it.commission?.currency || 'CNY', + commission_currency_snapshot: '', + purchase_tax: it.purchase_tax?.amount ?? '', + purchase_tax_currency: it.purchase_tax?.currency || 'CNY', + purchase_tax_currency_snapshot: '', + tax_refund: it.tax_refund?.amount ?? '', + tax_refund_currency: it.tax_refund?.currency || 'CNY', + tax_refund_currency_snapshot: '', retrofit_fee: it.retrofit_fee?.amount ?? '', total_price: it.total_price?.amount ? Number(it.total_price.amount) : undefined, official_price: it.official_price?.amount ? Number(it.official_price.amount) : undefined, @@ -753,6 +820,7 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) { color_interior_snapshot: it.color_interior_snapshot, color_exterior_code: it.color_exterior_code, color_exterior_snapshot: it.color_exterior_snapshot, + remark: it.remark, unit_price: wrapMoney(it.unit_price, (it as any).unit_price_currency, '单价'), handling_fee: wrapMoney(it.handling_fee, (it as any).helper_fee_currency, '手续费'), fob_transport_fee: wrapMoney( @@ -766,6 +834,9 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) { '港杂费' ), ocean_freight: wrapMoney(it.ocean_freight, (it as any).ocean_freight_currency, '海运费'), + commission: wrapMoney(it.commission, (it as any).commission_currency, '佣金'), + purchase_tax: wrapMoney(it.purchase_tax, (it as any).purchase_tax_currency, '购置税'), + tax_refund: wrapMoney(it.tax_refund, (it as any).tax_refund_currency, '退税'), retrofit_fee: wrapMoney((it as any).retrofit_fee, (it as any).modify_fee_currency, '改装费'), modify_list: it.modify_list, // total_price: wrapMoney(it.total_price, (it as any).total_price_currency, '总价'), diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts index c5d2e7d..af3b65f 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -9,7 +9,7 @@ declare global { const EffectScope: typeof import('vue')['EffectScope'] const ElButton: (typeof import('element-plus/es'))['ElButton'] const ElMessage: typeof import('element-plus/es')['ElMessage'] - const ElMessageBox: (typeof import('element-plus/es'))['ElMessageBox'] + const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] const ElNotification: (typeof import('element-plus/es'))['ElNotification'] const ElPopconfirm: (typeof import('element-plus/es'))['ElPopconfirm'] const ElPopover: (typeof import('element-plus/es'))['ElPopover'] diff --git a/src/types/components.d.ts b/src/types/components.d.ts index 2f1f2fa..ca6d74b 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -7,6 +7,7 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { + ApprovalTimeline: typeof import('./../components/custom/ApprovalTimeline.vue')['default'] ArtBackToTop: typeof import('./../components/core/base/art-back-to-top/index.vue')['default'] ArtBarChart: typeof import('./../components/core/charts/ArtBarChart.vue')['default'] ArtBarChartCard: typeof import('./../components/core/cards/art-bar-chart-card/index.vue')['default'] @@ -72,12 +73,16 @@ declare module 'vue' { CommentItem: typeof import('./../components/custom/comment-widget/widget/CommentItem.vue')['default'] CommentWidget: typeof import('./../components/custom/comment-widget/index.vue')['default'] ContainerSettings: typeof import('./../components/core/layouts/art-settings-panel/widget/ContainerSettings.vue')['default'] + copy: typeof import('./../components/custom/ProcurementDetailView copy.vue')['default'] ElAvatar: typeof import('element-plus/es')['ElAvatar'] + ElBadge: typeof import('element-plus/es')['ElBadge'] ElButton: typeof import('element-plus/es')['ElButton'] ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] ElCalendar: typeof import('element-plus/es')['ElCalendar'] ElCard: typeof import('element-plus/es')['ElCard'] + ElCascader: typeof import('element-plus/es')['ElCascader'] ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] + ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup'] ElCol: typeof import('element-plus/es')['ElCol'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] @@ -93,8 +98,10 @@ declare module 'vue' { ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElImage: typeof import('element-plus/es')['ElImage'] + ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] ElInput: typeof import('element-plus/es')['ElInput'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] + ElLink: typeof import('element-plus/es')['ElLink'] ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElOption: typeof import('element-plus/es')['ElOption'] @@ -117,16 +124,21 @@ declare module 'vue' { ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] + ElText: typeof import('element-plus/es')['ElText'] ElTimeline: typeof import('element-plus/es')['ElTimeline'] ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElTree: typeof import('element-plus/es')['ElTree'] + ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] ElUpload: typeof import('element-plus/es')['ElUpload'] ElWatermark: typeof import('element-plus/es')['ElWatermark'] HorizontalSubmenu: typeof import('./../components/core/layouts/art-menus/art-horizontal-menu/widget/HorizontalSubmenu.vue')['default'] LoginLeftView: typeof import('./../components/core/views/login/LoginLeftView.vue')['default'] MenuLayoutSettings: typeof import('./../components/core/layouts/art-settings-panel/widget/MenuLayoutSettings.vue')['default'] MenuStyleSettings: typeof import('./../components/core/layouts/art-settings-panel/widget/MenuStyleSettings.vue')['default'] + OrderDetailContent: typeof import('./../components/custom/OrderDetailContent.vue')['default'] + ProcurementDetailView: typeof import('./../components/custom/ProcurementDetailView.vue')['default'] + 'ProcurementDetailView copy': typeof import('./../components/custom/ProcurementDetailView copy.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SectionTitle: typeof import('./../components/core/layouts/art-settings-panel/widget/SectionTitle.vue')['default'] @@ -135,6 +147,7 @@ declare module 'vue' { SettingItem: typeof import('./../components/core/layouts/art-settings-panel/widget/SettingItem.vue')['default'] SidebarSubmenu: typeof import('./../components/core/layouts/art-menus/art-sidebar-menu/widget/SidebarSubmenu.vue')['default'] ThemeSettings: typeof import('./../components/core/layouts/art-settings-panel/widget/ThemeSettings.vue')['default'] + WorkChatDrawer: typeof import('./../components/custom/chat/WorkChatDrawer.vue')['default'] } export interface ComponentCustomProperties { vLoading: typeof import('element-plus/es')['ElLoadingDirective'] diff --git a/src/views/admin/approval/stocking_auth.vue b/src/views/admin/approval/stocking_auth.vue index 6fc7c83..97e6485 100644 --- a/src/views/admin/approval/stocking_auth.vue +++ b/src/views/admin/approval/stocking_auth.vue @@ -1,9 +1,6 @@ @@ -156,6 +159,19 @@ /> + +
+ + +
+
@@ -165,8 +181,11 @@ import { manageService } from '@/api/adminApi' import { useAuth } from '@/composables/useAuth' import OrderDetailContent from '@/components/custom/OrderDetailContent.vue' + import ApprovalTimeline from '@/components/custom/ApprovalTimeline.vue' import type { OrderData } from '@/composables/useOrderDetailDialog' import { usePdfPreview } from '@/composables/usePdfPreview' + const timelineDialogVisible = ref(false) + const approvalRecords = ref([]) // PDF 预览/打印(公共) const { pdf, frameRef, openWithResponse, download, print, preparePreview, prepareImages } = usePdfPreview() defineOptions({ name: 'AdminFinalListPage' }) @@ -370,6 +389,28 @@ ElMessage.error('下载失败,请稍后重试') } } + //审批进度 + 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 + } diff --git a/src/views/crmpc/stocking/Add.vue b/src/views/crmpc/stocking/Add.vue index 26575f6..8737393 100644 --- a/src/views/crmpc/stocking/Add.vue +++ b/src/views/crmpc/stocking/Add.vue @@ -373,6 +373,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -429,6 +480,13 @@ + + + + + + + @@ -527,7 +585,12 @@ (portOptions || []).find((x: any) => x.id === val)?.port_name || '') " > - + @@ -589,7 +652,7 @@ diff --git a/src/views/crmpc/stocking/final_add.vue b/src/views/crmpc/stocking/final_add.vue index 71b87d4..98a9a5e 100644 --- a/src/views/crmpc/stocking/final_add.vue +++ b/src/views/crmpc/stocking/final_add.vue @@ -374,6 +374,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -435,6 +486,13 @@ + + + + + + + @@ -509,7 +567,12 @@ (portOptions || []).find((x: any) => x.id === val)?.port_name || '') " > - + @@ -571,7 +634,7 @@ diff --git a/src/views/crmpc/stocking/final_edit.vue b/src/views/crmpc/stocking/final_edit.vue index 7a955f0..50be897 100644 --- a/src/views/crmpc/stocking/final_edit.vue +++ b/src/views/crmpc/stocking/final_edit.vue @@ -453,6 +453,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -526,6 +577,13 @@ + + + + + + + @@ -600,7 +658,12 @@ (portOptions || []).find((x: any) => x.id === val)?.port_name || '') " > - + @@ -661,7 +724,7 @@ diff --git a/src/views/crmpc/stocking/final_list.vue b/src/views/crmpc/stocking/final_list.vue index 0e6db95..ae65210 100644 --- a/src/views/crmpc/stocking/final_list.vue +++ b/src/views/crmpc/stocking/final_list.vue @@ -85,6 +85,9 @@ 查看终版 + + 查看审批 + @@ -174,6 +177,19 @@ /> + +
+ + +
+
@@ -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([]) 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 // 不自动请求,保持与截图行为一致,点击搜索或回车触发 diff --git a/src/views/crmpc/stocking/stocking_edit.vue b/src/views/crmpc/stocking/stocking_edit.vue index ce7908e..2c0844f 100644 --- a/src/views/crmpc/stocking/stocking_edit.vue +++ b/src/views/crmpc/stocking/stocking_edit.vue @@ -373,6 +373,57 @@
+ + + + + + + + + + + + + + + + + + + + + + + +
@@ -429,6 +480,13 @@ + + + + + + + 复制 @@ -525,7 +583,12 @@ (portOptions || []).find((x: any) => x.id === val)?.port_name || '') " > - + @@ -586,7 +649,7 @@ diff --git a/src/views/crmpc/stocking/stocking_list.vue b/src/views/crmpc/stocking/stocking_list.vue index b6935b6..5c7425c 100644 --- a/src/views/crmpc/stocking/stocking_list.vue +++ b/src/views/crmpc/stocking/stocking_list.vue @@ -114,6 +114,9 @@ 复制 + + 查看审批 + @@ -207,6 +210,19 @@ + +
+ + +
+
@@ -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([]) // 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' diff --git a/src/views/crmpc/vehicle/color.vue b/src/views/crmpc/vehicle/color.vue index faf9020..c2c80a4 100644 --- a/src/views/crmpc/vehicle/color.vue +++ b/src/views/crmpc/vehicle/color.vue @@ -55,7 +55,7 @@ @current-change="handleCurrentChange" >