From 045d13eb7b9982058150351e5046ab56b9ac7269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Fri, 12 Sep 2025 17:49:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=87=E8=B4=A7=E5=8D=95?= =?UTF-8?q?=20=E7=AD=89=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 8 +- src/api/crmpc/vehicleApi.ts | 67 + src/assets/styles/el-ui.scss | 9 + .../core/layouts/art-page-content/index.vue | 2 + src/components/custom/OrderDetailContent.vue | 84 +- src/composables/useStockingForm.ts | 15 +- src/router/routes/asyncRoutes.ts | 8 +- src/views/admin/system/menu/index.vue | 8 +- src/views/admin/vehicle/brand.vue | 16 +- src/views/crmpc/approval/auth_detil.vue | 3 + src/views/crmpc/approval/stocking_auth.vue | 10 + src/views/crmpc/customer/Add.vue | 1 + src/views/crmpc/customer/Edit.vue | 1 + src/views/crmpc/customer/Followadd.vue | 1 + src/views/crmpc/customer/Show.vue | 1 + src/views/crmpc/customer/index.vue | 1 + src/views/crmpc/home/index.vue | 36 +- src/views/crmpc/stocking/Add.vue | 247 +-- src/views/crmpc/stocking/final_add.vue | 63 +- src/views/crmpc/stocking/final_list.vue | 75 +- src/views/crmpc/stocking/stocking_list.vue | 19 +- src/views/crmpc/vehicle/color.vue | 359 +++++ src/views/crmpc/vehicle/vehicle_list.vue | 1426 +++++++++++++++++ 23 files changed, 2226 insertions(+), 234 deletions(-) create mode 100644 src/api/crmpc/vehicleApi.ts create mode 100644 src/views/crmpc/vehicle/color.vue create mode 100644 src/views/crmpc/vehicle/vehicle_list.vue diff --git a/src/App.vue b/src/App.vue index ca27e2e..6e00cea 100644 --- a/src/App.vue +++ b/src/App.vue @@ -258,11 +258,7 @@ top: 50%; transform: translateY(-50%); } - :deep(.el-table__empty-block) { - height: 100% !important; - min-height: 200px; - display: flex; - align-items: center; - justify-content: center; + .item-row-wrap { + margin-bottom: 12px; } diff --git a/src/api/crmpc/vehicleApi.ts b/src/api/crmpc/vehicleApi.ts new file mode 100644 index 0000000..db43ffa --- /dev/null +++ b/src/api/crmpc/vehicleApi.ts @@ -0,0 +1,67 @@ +import request from '@/utils/http' + +export class vehicleService { + // 颜色管理 + static getColorList(params: Api.Common.PaginatingParams & any) { + return request.get({ + url: '/crm/color/list', + params + }) + } + static colorAdd(params: any) { + return request.post({ + url: '/crm/color/store', + params + }) + } + static colorDetail(params: any) { + return request.get({ + url: '/crm/color/show', + params + }) + } + static colorEdit(params: any) { + return request.post({ + url: '/crm/color/update', + params + }) + } + static colorDelete(params: any) { + return request.post({ + url: '/crm/color/destroy', + params + }) + } + + // 车辆列表 + static getVehicleList(params: Api.Common.PaginatingParams & any) { + return request.get({ + url: '/crm/vehicle/sku/list', + params + }) + } + static vehicleAdd(params: any) { + return request.post({ + url: '/crm/vehicle/sku/store', + params + }) + } + static vehicleDetail(params: any) { + return request.get({ + url: '/crm/vehicle/sku/show', + params + }) + } + static vehicleEdit(params: any) { + return request.post({ + url: '/crm/vehicle/sku/update', + params + }) + } + static vehicleDelete(params: any) { + return request.post({ + url: '/crm/vehicle/sku/destroy', + params + }) + } +} diff --git a/src/assets/styles/el-ui.scss b/src/assets/styles/el-ui.scss index 88ceab5..ca8c1b6 100644 --- a/src/assets/styles/el-ui.scss +++ b/src/assets/styles/el-ui.scss @@ -400,3 +400,12 @@ position: relative; z-index: 10; } + +// 修复 el-table 空数据块样式 +.el-table__empty-block { + height: 100% !important; + min-height: 200px !important; + display: flex !important; + align-items: center !important; + justify-content: center !important; +} \ No newline at end of file diff --git a/src/components/core/layouts/art-page-content/index.vue b/src/components/core/layouts/art-page-content/index.vue index 73c8bd1..1ecf8c2 100644 --- a/src/components/core/layouts/art-page-content/index.vue +++ b/src/components/core/layouts/art-page-content/index.vue @@ -16,6 +16,7 @@ + @@ -37,6 +38,7 @@ const { pageTransition, containerWidth, refresh } = storeToRefs(useSettingStore()) const { keepAliveExclude } = storeToRefs(useWorktabStore()) + const { containerMinHeight } = useCommon() const containerStyle = computed(() => { diff --git a/src/components/custom/OrderDetailContent.vue b/src/components/custom/OrderDetailContent.vue index e3e790f..c0d1aaf 100644 --- a/src/components/custom/OrderDetailContent.vue +++ b/src/components/custom/OrderDetailContent.vue @@ -56,28 +56,53 @@ 颜色/外 内饰 改装 - 单价(美金) - 总价(美金) - 官方指导价 + 官方指导价/二手挂牌价 优惠 + 手续费 + 改装费 + FOB运费 + 港杂费 + 海运费 + 单价(美金) + 总价(美金) + 利润(美金) {{ index + 1 }} - {{ item.model_snapshot || item.model || '—' }} + {{ item.model_snapshot || item.model || '—' }} ({{ item.mileage }}km) {{ item.num ?? item.quantity ?? 1 }} {{ item.color_exterior_snapshot || item.exteriorColor || '—' }} {{ item.color_interior_snapshot || item.interiorColor || '—' }} {{ item.modify || item.modification || '—' }} - ${{ formatPrice(Number(item.unit_price?.amount ?? item.unitPrice ?? 0)) }} - ${{ formatPrice(Number(item.total_price?.amount ?? item.totalPrice ?? 0)) }} - {{ formatPrice(Number(item.official_price?.amount ?? item.officialPrice ?? 0)) }} - {{ item.discount_price?.currency_info || item.discount_price?.amount || item.discount || '—' }} + + + + {{ item.listing_price?.currency_info || item.listing_price?.amount || item.discount || '—' }} + + {{ item.official_price?.currency_info || item.official_price?.amount || item.discount || '—' }} + + + + {{ item.reduction_price?.currency_info || item.reduction_price?.amount || item.discount || '—' }} + + {{ item.discount_price?.currency_info || item.discount_price?.amount || item.discount || '—' }} + + {{ item.handling_fee?.currency_info || item.handling_fee?.amount || item.discount || '—' }} + {{ item.retrofit_fee?.currency_info || item.retrofit_fee?.amount || item.discount || '—' }} + {{ item.fob_transport_fee?.currency_info || item.fob_transport_fee?.amount || item.discount || '—' }} + {{ item.port_misc_fee?.currency_info || item.port_misc_fee?.amount || item.discount || '—' }} + {{ item.ocean_freight?.currency_info || item.ocean_freight?.amount || item.discount || '—' }} + + {{ item.unit_price?.currency_info || item.unit_price?.amount || item.discount || '—'}} + + {{ item.total_price?.currency_info || item.total_price?.amount || item.discount || '—' }} + {{ item.profit?.currency_info || item.profit?.amount || item.discount || '—' }} - - + + 合同汇率: {{ orderData.contract_exchange_rate || orderData.contractRate || '—' }} @@ -85,6 +110,10 @@ 合计到岸价: ${{ formatPrice(Number(orderData.cif_total_amount?.amount ?? orderData.totalCif ?? 0)) }} + + 利润: + {{ orderData.profit_total?.currency_info || orderData.profit_total?.amount || '—' }} + @@ -293,42 +322,9 @@ width: 60px; } .col-model { - width: 200px; - text-align: left; - } - .col-qty { - width: 80px; - } - .col-color { - width: 80px; - } - .col-interior { - width: 80px; - } - .col-modify { - width: 120px; - text-align: left; - } - .col-price { - width: 100px; - text-align: right; - } - .col-total { - width: 100px; - text-align: right; - } - .col-official { - width: 100px; - text-align: right; - } - .col-discount { - width: 120px; + max-width: 160px; // text-align: left; } - - tbody tr:nth-child(even) { - background: #fafafa; - } tbody tr:hover { background: #e6f7ff; } diff --git a/src/composables/useStockingForm.ts b/src/composables/useStockingForm.ts index 3d8786c..a75bdc0 100644 --- a/src/composables/useStockingForm.ts +++ b/src/composables/useStockingForm.ts @@ -234,7 +234,7 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) { remit_country_id: '', remit_country_name_snapshot: '', remit_date: '', - currency_code: '', + currency_code: 'USD', currency_name_snapshot: '', account_id: '', account_name_snapshot: '', @@ -277,6 +277,10 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) { const getarea = async () => { const res = await CrmService.getCountry() + res.forEach((item: any) => { + item.cn_addrs = item.cn_addr + '(' + item.en_addr + ')' + }) + console.log(res) countryOptions.value = res || [] } @@ -518,6 +522,8 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) { baseForm.customer_snapshot = row.contacts || row.name || '' baseForm.customer_country_id = row.country_id || '' baseForm.customer_country_snapshot = row.country_name || '' + baseForm.customer_source_id = row.channel_id || '' + baseForm.customer_source_snapshot = row.channel_name || '' customerDialog.visible = false } @@ -822,6 +828,13 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) { // 设置默认汇率 baseForm.contract_exchange_rate = getCurrencyRate('USD') + + // 设置预计发送日默认为当天 + const today = new Date() + const year = today.getFullYear() + const month = String(today.getMonth() + 1).padStart(2, '0') + const day = String(today.getDate()).padStart(2, '0') + baseForm.biz_date = `${year}-${month}-${day}` } return { diff --git a/src/router/routes/asyncRoutes.ts b/src/router/routes/asyncRoutes.ts index 9138c0b..5555b0b 100644 --- a/src/router/routes/asyncRoutes.ts +++ b/src/router/routes/asyncRoutes.ts @@ -84,7 +84,9 @@ export const asyncRoutes: AppRouteRecord[] = [ component: 'crmpc/stocking/Add', meta: { title: '创建备货单', - isHide: true + isHide: true, + isHideTab: false, + keepAlive: true } }, { @@ -102,7 +104,9 @@ export const asyncRoutes: AppRouteRecord[] = [ component: 'crmpc/stocking/final_add', meta: { title: '最终备货单', - isHide: true + isHide: true, + isHideTab: false, + keepAlive: true } }, { diff --git a/src/views/admin/system/menu/index.vue b/src/views/admin/system/menu/index.vue index 5b0cf12..8b79b48 100644 --- a/src/views/admin/system/menu/index.vue +++ b/src/views/admin/system/menu/index.vue @@ -183,8 +183,8 @@ @@ -197,8 +197,8 @@ diff --git a/src/views/admin/vehicle/brand.vue b/src/views/admin/vehicle/brand.vue index c7013cf..c7dfc63 100644 --- a/src/views/admin/vehicle/brand.vue +++ b/src/views/admin/vehicle/brand.vue @@ -98,6 +98,14 @@ >当前品牌:{{ activeBrand.brand_name }}({{ activeBrand.brand_code }}) 请选择左侧车辆品牌 + 新增系列
搜索 - 新增系列
- \ No newline at end of file +
+ +
+ + + + \ No newline at end of file diff --git a/src/views/crmpc/stocking/Add.vue b/src/views/crmpc/stocking/Add.vue index 902d076..6fb07ac 100644 --- a/src/views/crmpc/stocking/Add.vue +++ b/src/views/crmpc/stocking/Add.vue @@ -37,41 +37,19 @@ @change=" (val) => (baseForm.clearance_country_snapshot = - (countryOptions || []).find((x: any) => x.id === val)?.cn_addr || '') + (countryOptions || []).find((x: any) => x.id === val)?.cn_addrs || '') " > - - - - - - - - + + + + + + + + + + - - - + + + + + @@ -120,7 +126,7 @@
- + - - - + - + + +