修改 备货单页面

This commit is contained in:
浅念
2025-09-10 18:11:39 +08:00
parent 9052bd1027
commit 853e9591b3
13 changed files with 1724 additions and 486 deletions
+7
View File
@@ -258,4 +258,11 @@
top: 50%;
transform: translateY(-50%);
}
:deep(.el-table__empty-block) {
height: 100% !important;
min-height: 200px;
display: flex;
align-items: center;
justify-content: center;
}
</style>
+14
View File
@@ -229,6 +229,20 @@ export class CrmService {
params
})
}
//编辑备货单
static editStock(params: any) {
return request.post<Api.Work.AddResponse>({
url: '/crm/stock/order/update',
params
})
}
//提交备货单
static submitStock(params: any) {
return request.post<Api.Work.AddResponse>({
url: '/crm/stock/order/approval',
params
})
}
//打印
static printStock(params: any) {
return request.get<any>({
+43 -10
View File
@@ -28,6 +28,8 @@ export interface BaseForm {
clearance_port_id: string
clearance_port_snapshot: string
latest_arrival_date: string
pick_up_date: string
collect_all_date: string
contract_exchange_rate: string
contract_exchange_rate_currency: string
remark: string
@@ -59,6 +61,9 @@ export interface ItemRow {
handling_fee: string
fob_transport_fee: number | undefined
port_misc_fee: string
ocean_freight: string
ocean_freight_currency: string
ocean_freight_currency_snapshot: string
retrofit_fee: string
total_price: number | undefined
official_price: number | undefined
@@ -164,7 +169,9 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
is_final: isFinal ? '1' : '0',
object_id: stockingId || '0',
contract: '',
contract_url: ''
contract_url: '',
pick_up_date:'',
collect_all_date: ''
})
// 创建新的订单项
@@ -186,6 +193,9 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
handling_fee: '',
fob_transport_fee: undefined,
port_misc_fee: '',
ocean_freight: '',
ocean_freight_currency: 'USD',
ocean_freight_currency_snapshot: '',
retrofit_fee: '',
total_price: undefined,
official_price: undefined,
@@ -392,19 +402,19 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
const fob = toUSD(it.fob_transport_fee ?? (it as any).fob_fee, (it as any).fob_fee_currency)
const handling = toUSD(it.handling_fee ?? (it as any).helper_fee, (it as any).helper_fee_currency)
const port = toUSD(it.port_misc_fee ?? (it as any).port_fee, (it as any).port_fee_currency)
const ocean =toUSD(it.ocean_freight ?? (it as any).ocean_freight, (it as any).ocean_freight_currency)
const mileageVal = Number(it.mileage ?? 0)
if (mileageVal > 0) {
// 二手车:用挂牌价与二手减价替代官方指导价与优惠
const listing = toUSD(it.listing_price ?? (it as any).listing_price, (it as any).listing_price_currency)
const reduction = toUSD(it.reduction_price ?? (it as any).reduction_price, (it as any).reduction_price_currency)
return unit - (retrofit + fob + listing + reduction + handling + port)
return unit - (retrofit + fob + listing + reduction + handling + port + ocean)
}
// 新车/里程<=0:保持原有计算(官方指导价与优惠)
const guide = toUSD(it.official_price ?? (it as any).guide_price, (it as any).guide_price_currency)
const discount = toUSD(it.discount_price ?? (it as any).discount, (it as any).discount_currency)
return unit - (retrofit + fob + guide + discount + handling + port)
return unit - (retrofit + fob + guide + discount + handling + port + ocean)
}
// 合同文件相关方法
@@ -506,6 +516,8 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
const chooseCustomer = (row: any) => {
baseForm.customer_id = row.id || ''
baseForm.customer_snapshot = row.contacts || row.name || ''
baseForm.customer_country_id = row.country_id || ''
baseForm.customer_country_snapshot = row.country_name || ''
customerDialog.visible = false
}
@@ -563,8 +575,9 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
// 数据回显方法
const populateFromDetail = (res: any) => {
if (!res) return
// 基础信息
baseForm.pick_up_date = res.pick_up_date || ''
baseForm.collect_all_date = res.collect_all_date || ''
baseForm.pi_no = res.pi_no || ''
baseForm.contract = res.contract || ''
baseForm.biz_date = res.biz_date || ''
@@ -615,6 +628,9 @@ 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 ?? '',
ocean_freight: it.ocean_freight?.amount ?? '',
ocean_freight_currency: it.ocean_freight?.currency || 'USD',
ocean_freight_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,
@@ -674,7 +690,7 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
}
// 提交方法
const handleSubmit = async () => {
const handleSubmit = async (type: number, edit?: string) => {
const mappedItems = items.value.map((it) => ({
sku_id: it.sku_id,
vin: it.vin || '',
@@ -696,6 +712,7 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
(it as any).port_fee_currency,
'港杂费'
),
ocean_freight: wrapMoney(it.ocean_freight, (it as any).ocean_freight_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, '总价'),
@@ -713,15 +730,31 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
reduction_price: wrapMoney(it.reduction_price, (it as any).reduction_price_currency, '二手减价')
}))
// 从提交参数中移除 contract_exchange_rate_currency
const baseFormWithoutCur = { ...(baseForm as any) }
delete (baseFormWithoutCur as any).contract_exchange_rate_currency
delete (baseFormWithoutCur as any).total_cif
delete (baseFormWithoutCur as any).total_cif_currency
delete (baseFormWithoutCur as any).total_cif_currency_snapshot
delete (baseFormWithoutCur as any).contract_url
const payload = {
...baseForm,
...baseFormWithoutCur,
veh_list: mappedItems,
account_list: paymentItems.value
account_list: paymentItems.value,
approval_status: type
}
try {
const { message } = await CrmService.addStock(payload as any)
ElMessage.success(message || '保存成功')
if (edit) {
const { message } = await CrmService.editStock({
...payload,
id: edit
} as any)
ElMessage.success(message || '保存成功')
} else {
const { message } = await CrmService.addStock(payload as any)
ElMessage.success(message || '保存成功')
}
setTimeout(() => {
window.location.href = '/crmpc/stocking/stocking_list'
}, 1000)
+1 -1
View File
@@ -127,7 +127,7 @@ const appConfig: SystemConfig = {
] as const,
// 系统其他项默认配置
systemSetting: {
defaultMenuWidth: 240, // 菜单宽度
defaultMenuWidth: 200, // 菜单宽度
defaultCustomRadius: '0.75', // 自定义圆角
defaultTabStyle: 'tab-default' // 标签样式
}
+18 -31
View File
@@ -129,16 +129,16 @@
<div
v-if="isEdit && showReSignQR"
class="signature-qrcode"
style="margin-top: 20px;margin-left: 20px;"
style="margin-top: 20px; margin-left: 20px"
>
<qrcode-vue
:value="qrcodeUrl"
:size="120"
level="L"
:size="200"
level="M"
render-as="svg"
:include-margin="false"
:include-margin="true"
background="#ffffff"
foreground="#111111"
foreground="#000000"
/>
<div class="qrcode-tip">手机扫码重新签名</div>
</div>
@@ -147,12 +147,12 @@
<div class="signature-qrcode">
<qrcode-vue
:value="qrcodeUrl"
:size="120"
level="L"
:size="200"
level="M"
render-as="svg"
:include-margin="false"
:include-margin="true"
background="#ffffff"
foreground="#111111"
foreground="#000000"
/>
<div class="qrcode-tip">手机扫码进行签名</div>
</div>
@@ -336,31 +336,18 @@
const userId = form.value?.id || userInfo.value?.id || ''
const base = location.origin
const params = new URLSearchParams({ userId: String(userId) })
if (userStore?.accessToken) params.append('accessToken', userStore.accessToken)
if (userStore?.language) params.append('lang', userStore.language)
if (userStore?.companyabbr) params.append('companyabbr', userStore.companyabbr)
if (userStore?.companyid) params.append('companyid', userStore.companyid)
if (userStore?.loginType) params.append('loginType', userStore.loginType)
if (userStore?.systemsabbr) params.append('systemsabbr', userStore.systemsabbr)
if (userStore?.systemsid) params.append('systemsid', userStore.systemsid)
// 只保留必要的参数,减少URL长度
if (userStore?.accessToken) params.append('token', userStore.accessToken)
if (userStore?.companyabbr) params.append('corp', userStore.companyabbr)
if (userStore?.companyid) params.append('corpid', userStore.companyid)
if (userStore?.systemsabbr) params.append('sys', userStore.systemsabbr)
if (userStore?.systemsid) params.append('sysid', userStore.systemsid)
if (userStore?.loginType) params.append('type', userStore.loginType)
if (userStore?.language) params.append('lang', userStore.language)
return `${base}/auth/signature/mobile?${params.toString()}`
})
const handleSignature = async () => {
const userStore = useUserStore() as any
const userId = form.value?.id || userInfo.value?.id || ''
const base = location.origin
const params = new URLSearchParams({ userId: String(userId) })
if (userStore?.accessToken) params.append('accessToken', userStore.accessToken)
if (userStore?.language) params.append('lang', userStore.language)
if (userStore?.companyabbr) params.append('companyabbr', userStore.companyabbr)
if (userStore?.companyid) params.append('companyid', userStore.companyid)
if (userStore?.loginType) params.append('loginType', userStore.loginType)
if (userStore?.systemsabbr) params.append('systemsabbr', userStore.systemsabbr)
if (userStore?.systemsid) params.append('systemsid', userStore.systemsid)
window.location.href = `${base}/auth/signature/mobile?${params.toString()}`
}
const edit = async () => {
if (isEdit.value) {
const payload: any = { ...(form.value as any) }
+3 -1
View File
@@ -2,7 +2,9 @@
<div class="port-page">
<div class="port-toolbar boxshadow">
<div class="toolbar-left">
<ElButton @click="showDialog('add')" v-ripple v-if="hasAuth('port@add')" type="primary">创建港口</ElButton>
<ElButton @click="showDialog('add')" v-ripple v-if="hasAuth('port@add')" type="primary"
>创建港口</ElButton
>
</div>
<div class="toolbar-right">
<el-input
+20 -8
View File
@@ -16,7 +16,7 @@
</div>
<div class="toolbar">
<el-button :disabled="locked" @click="clearCanvas">清空</el-button>
<el-button :disabled="locked" @click="toggleLandscape">横屏</el-button>
<!-- <el-button :disabled="locked" @click="toggleLandscape">横屏</el-button> -->
<el-button type="primary" :disabled="locked" :loading="submitting" @click="saveSignature">
保存
</el-button>
@@ -44,21 +44,33 @@
(route.query.accessToken as string | undefined) || (route.query.token as string | undefined)
// 其他头部信息从URL透传(便于直达页调用接口)
const urlLang = route.query.lang as string | undefined
const urlCorp = (route.query.companyabbr as string | undefined) || userStore.companyabbr
const urlLoginType = route.query.loginType as string | undefined
const urlSys = (route.query.systemsabbr as string | undefined) || userStore.systemsabbr || 'fdesk'
const urlCorp =
(route.query.companyabbr as string | undefined) ||
(route.query.corp as string | undefined) ||
userStore.companyabbr
const urlLoginType =
(route.query.loginType as string | undefined) || (route.query.type as string | undefined)
const urlSys =
(route.query.systemsabbr as string | undefined) ||
(route.query.sys as string | undefined) ||
userStore.systemsabbr ||
'fdesk'
const effectiveToken = urlToken || userStore.accessToken
// 从URL参数获取公司信息并存储到userStore(如果路由守卫没有处理)
const companyid = route.query.companyid as string | undefined
const companyabbr = route.query.companyabbr as string | undefined
const companyid =
(route.query.companyid as string | undefined) || (route.query.corpid as string | undefined)
const companyabbr =
(route.query.companyabbr as string | undefined) || (route.query.corp as string | undefined)
if (companyid && companyabbr && (!userStore.companyid || !userStore.companyabbr)) {
userStore.setCompany(companyid, companyabbr)
}
// 从URL参数获取系统信息并存储到userStore(如果路由守卫没有处理)
const systemsabbr = route.query.systemsabbr as string | undefined
const systemsid = route.query.systemsid as string | undefined
const systemsabbr =
(route.query.systemsabbr as string | undefined) || (route.query.sys as string | undefined)
const systemsid =
(route.query.systemsid as string | undefined) || (route.query.sysid as string | undefined)
if (systemsid && systemsabbr && (!userStore.systemsid || !userStore.systemsabbr)) {
userStore.setSystems(systemsid, systemsabbr)
}
+1 -1
View File
@@ -34,7 +34,7 @@
<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="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" />
+236 -200
View File
@@ -9,15 +9,15 @@
<span class="border"></span>
<span class="title">基础信息</span>
</div>
<ElForm :model="baseForm" class="base-form">
<ElForm :model="baseForm" class="base-form" label-position="right">
<ElRow :gutter="12">
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="阿里订单号/PI号">
<ElFormItem label="阿里订单号/PI号" label-width="114px">
<ElInput v-model="baseForm.pi_no" placeholder="请输入阿里订单号/PN号" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="日期">
<ElFormItem label="日期" label-width="114px">
<ElDatePicker
v-model="baseForm.biz_date"
type="date"
@@ -29,7 +29,7 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="清关目的国">
<ElFormItem label="清关目的国" label-width="114px">
<el-select
v-model="baseForm.clearance_country_id"
filterable
@@ -51,7 +51,7 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="客户来源">
<ElFormItem label="客户来源" label-width="114px">
<el-select
v-model="baseForm.customer_source_id"
filterable
@@ -73,22 +73,22 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="客户名称">
<ElFormItem label="客户名称" label-width="114px">
<ElInput
v-model="baseForm.customer_snapshot"
placeholder="请选择客户"
readonly
@click="openCustomerDialog"
>
<template #append>
<ElButton type="primary" text @click.stop="openCustomerDialog">选择</ElButton>
<template #suffix>
<i class="iconfont-sys" @click.stop="openCustomerDialog">&#xe867;</i>
</template>
</ElInput>
<ElInput v-model="baseForm.customer_id" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="客户所在国">
<ElFormItem label="客户所在国" label-width="114px">
<el-select
v-model="baseForm.customer_country_id"
filterable
@@ -118,28 +118,26 @@
<span class="border"></span>
<span class="title">订单详情</span>
</div>
<div class="items-wrap">
<div class="item-row" v-for="(item, idx) in items" :key="idx">
<ElForm class="items-wrap" label-position="right">
<div class="item-row form-box" v-for="(item, idx) in items" :key="idx">
<ElRow :gutter="12">
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="车型" label-width="64px">
<ElFormItem label="车型" label-width="85px">
<ElInput
v-model="item.model_snapshot"
placeholder="请选择车型"
readonly
@click="openVehicleDialog(idx)"
>
<template #append>
<ElButton type="primary" text @click.stop="openVehicleDialog(idx)"
>选择</ElButton
>
<template #suffix>
<i class="iconfont-sys" @click.stop="openVehicleDialog(idx)">&#xe867;</i>
</template>
</ElInput>
<ElInput v-model="item.sku_id" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="颜色/外饰" label-width="72px">
<ElFormItem label="颜色/外饰" label-width="85px">
<el-select
v-model="item.color_exterior_snapshot"
filterable
@@ -162,7 +160,7 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="颜色/内饰" label-width="72px">
<ElFormItem label="颜色/内饰" label-width="85px">
<el-select
v-model="item.color_interior_snapshot"
filterable
@@ -185,7 +183,7 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="改装" label-width="52px">
<ElFormItem label="改装" label-width="85px">
<el-select
v-model="item.modify_ids"
filterable
@@ -209,120 +207,16 @@
</ElCol>
</ElRow>
<ElRow :gutter="12">
<ElCol :sm="12" :md="12" :lg="5" :xl="4">
<ElFormItem label="单价" label-width="45px">
<ElInput v-model="item.unit_price" placeholder="请输入单价">
<template #append>
<ElSelect v-model="item.unit_price_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.unit_price_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="5" :xl="4">
<ElFormItem label="总价" label-width="45px">
<ElInput v-model="item.total_price" placeholder="请输入总价">
<template #append>
<ElSelect v-model="item.total_price_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.total_price_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="5" :xl="4">
<ElFormItem label="改装费" label-width="55px">
<ElInput v-model="item.retrofit_fee" placeholder="请输入改装费">
<template #append>
<ElSelect v-model="item.modify_fee_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.modify_fee_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="5" :xl="4">
<ElFormItem label="FOB段运费" label-width="84px">
<ElInput v-model="item.fob_transport_fee" placeholder="请输入FOB段运费">
<template #append>
<ElSelect v-model="item.fob_fee_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.fob_fee_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="4" :xl="4">
<ElFormItem label="手续费" label-width="60px">
<ElInput v-model="item.handling_fee" placeholder="请输入手续费">
<template #append>
<ElSelect v-model="item.helper_fee_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.helper_fee_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12">
<ElCol :sm="12" :md="12" :lg="5" :xl="5">
<ElFormItem label="港杂费" label-width="60px">
<ElInput v-model="item.port_misc_fee" placeholder="请输入港杂费">
<template #append>
<ElSelect v-model="item.port_fee_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.port_fee_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="4" :xl="4">
<ElFormItem label="里程" label-width="52px">
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="里程" label-width="85px">
<ElInput v-model="item.mileage" placeholder="请输入里程" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="5" :xl="5" v-if="(item.mileage ?? 0) <= 0">
<ElCol :sm="12" :md="12" :lg="6" :xl="6" v-if="(item.mileage ?? 0) <= 0">
<ElFormItem label="官方指导价" label-width="85px">
<ElInput v-model="item.official_price" placeholder="请输入官方指导价">
<template #append>
<ElSelect v-model="item.guide_price_currency" style="width: 64px">
<template #suffix>
<ElSelect v-model="item.guide_price_currency" style="width: 64px;border: none;">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
@@ -335,10 +229,10 @@
<ElInput v-model="item.guide_price_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="5" :xl="5" v-else>
<ElFormItem label="挂牌价" label-width="55px">
<ElInput v-model="item.listing_price" placeholder="请输入挂牌价">
<template #append>
<ElCol :sm="12" :md="12" :lg="6" :xl="6" v-else>
<ElFormItem label="二手挂牌价" label-width="85px">
<ElInput v-model="item.listing_price" placeholder="请输入二手挂牌价">
<template #suffix>
<ElSelect v-model="item.listing_price_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
@@ -353,9 +247,9 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6" v-if="(item.mileage ?? 0) <= 0">
<ElFormItem label="优惠" label-width="52px">
<ElFormItem label="优惠" label-width="85px">
<ElInput v-model="item.discount_price" placeholder="请输入优惠额">
<template #append>
<template #suffix>
<ElSelect v-model="item.discount_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
@@ -370,9 +264,9 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6" v-else>
<ElFormItem label="二手减价" label-width="72px">
<ElInput v-model="item.reduction_price" placeholder="请输入二手减价">
<template #append>
<ElFormItem label="优惠" label-width="85px">
<ElInput v-model="item.reduction_price" placeholder="请输入优惠">
<template #suffix>
<ElSelect v-model="item.reduction_price_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
@@ -386,23 +280,142 @@
<ElInput v-model="item.reduction_price_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="4" :xl="4">
<ElFormItem label="利润" label-width="40px">
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="手续费" label-width="85px">
<ElInput v-model="item.handling_fee" placeholder="请输入手续费">
<template #suffix>
<ElSelect v-model="item.helper_fee_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.helper_fee_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="改装费" label-width="85px">
<ElInput v-model="item.retrofit_fee" placeholder="请输入改装费">
<template #suffix>
<ElSelect v-model="item.modify_fee_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.modify_fee_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="FOB段运费" label-width="85px">
<ElInput v-model="item.fob_transport_fee" placeholder="请输入FOB段运费">
<template #suffix>
<ElSelect v-model="item.fob_fee_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.fob_fee_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="港杂费" label-width="85px">
<ElInput v-model="item.port_misc_fee" placeholder="请输入港杂费">
<template #suffix>
<ElSelect v-model="item.port_fee_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.port_fee_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="海运费" label-width="85px">
<ElInput v-model="item.ocean_freight" placeholder="请输入海运费">
<template #suffix>
<ElSelect v-model="item.ocean_freight_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.ocean_freight_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="成交价" label-width="85px">
<ElInput v-model="item.unit_price" placeholder="请输入成交价">
<template #suffix>
<ElSelect v-model="item.unit_price_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.unit_price_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="总价" label-width="85px">
<ElInput v-model="item.total_price" placeholder="请输入总价">
<template #suffix>
<ElSelect v-model="item.total_price_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.total_price_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="利润" label-width="85px">
<ElInput
v-model="item.profit"
placeholder="正在计算利润"
:class="Number(item.profit) < 0 ? 'profit-negative' : ''"
disabled
>
<template #append> <span style="font-size: 11px">美元</span></template>
<template #suffix> <span style="font-size: 11px">美元</span></template>
</ElInput>
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12">
<ElCol :span="24" class="row-actions">
<el-tag effect="light" @click="copyRow(idx)"> 复制 </el-tag>
<el-tag effect="dark" @click="addRowAfter(idx)" v-if="idx == items.length - 1">
<el-tag effect="light" type="success" @click="copyRow(idx)"> 复制 </el-tag>
<el-tag effect="light" @click="addRowAfter(idx)" v-if="idx == items.length - 1">
新增
</el-tag>
<el-tag type="danger" effect="light" @click="removeRow(idx)" v-if="items.length > 1">
@@ -410,12 +423,13 @@
</el-tag>
</ElCol>
</ElRow>
</div>
<ElRow :gutter="12">
<ElCol :span="6">
<ElFormItem label="合计到岸价" label-width="85px">
<ElFormItem label="合计到岸价" label-width="105px">
<ElInput v-model="baseForm.total_cif" placeholder="请输入合计到岸价">
<template #append>
<template #suffix>
<ElSelect v-model="baseForm.total_cif_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
@@ -430,9 +444,9 @@
</ElFormItem>
</ElCol>
<ElCol :span="6">
<ElFormItem label="合同汇率" label-width="70px">
<ElFormItem label="合同汇率" label-width="105px">
<ElInput v-model="baseForm.contract_exchange_rate" placeholder="请输入">
<template #append>
<template #suffix>
<ElSelect v-model="baseForm.contract_exchange_rate_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
@@ -446,22 +460,22 @@
</ElFormItem>
</ElCol>
</ElRow>
</div>
</ElForm>
</div>
<div class="boxshadow">
<div class="form-title">
<span class="border"></span>
<span class="title">运输详情</span>
</div>
<ElForm :model="baseForm" class="foot-form">
<ElForm :model="baseForm" class="foot-form" label-position="right">
<ElRow :gutter="12">
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="清关人">
<ElFormItem label="清关人" label-width="98px">
<ElInput v-model="baseForm.declarant_name" placeholder="请输入清关人" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="预计发送日">
<ElFormItem label="预计发送日" label-width="98px">
<ElDatePicker
v-model="baseForm.eta_ship_date"
value-format="YYYY-MM-DD"
@@ -473,7 +487,23 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="运输方式">
<ElFormItem label="国内收货港" label-width="98px">
<ElSelect
v-model="baseForm.domestic_port_id"
placeholder="请选择国内收货商"
@change="
(val) =>
(baseForm.domestic_port_snapshot =
(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" />
</ElSelect>
<ElInput v-model="baseForm.domestic_port_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="运输方式" label-width="98px">
<ElSelect
v-model="baseForm.shipping_method_id"
placeholder="请选择运输方式"
@@ -494,23 +524,7 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="国内收货港">
<ElSelect
v-model="baseForm.domestic_port_id"
placeholder="请选择国内收货商"
@change="
(val) =>
(baseForm.domestic_port_snapshot =
(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" />
</ElSelect>
<ElInput v-model="baseForm.domestic_port_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="贸易条款">
<ElFormItem label="贸易条款" label-width="98px">
<ElSelect
v-model="baseForm.trade_term_id"
placeholder="请选择"
@@ -531,7 +545,7 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="清关目的港">
<ElFormItem label="清关目的港" label-width="98px">
<ElSelect
v-model="baseForm.clearance_port_id"
placeholder="请选择"
@@ -552,7 +566,7 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="最迟到港时间">
<ElFormItem label="最迟到港时间" label-width="98px">
<ElDatePicker
v-model="baseForm.latest_arrival_date"
type="date"
@@ -574,8 +588,13 @@
<div class="payment-section">
<div class="payment-items">
<div v-for="(payment, idx) in paymentItems" :key="idx" class="payment-item">
<ElForm :model="payment" label-width="55px" class="payment-form">
<ElForm :model="payment" label-width="55px" class="payment-form" label-position="right">
<ElRow :gutter="12">
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="汇款人">
<ElInput v-model="payment.remitter_name" placeholder="请选择汇款人" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="4" :xl="4">
<ElFormItem label="汇款国">
<el-select v-model="payment.remit_country_id" filterable placeholder="请选择汇款国" @change="
@@ -605,25 +624,7 @@
/>
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="4" :xl="4">
<ElFormItem label="币种">
<ElSelect v-model="payment.currency_code" placeholder="请选择币种" @change="
(val) => {
const found = (currencyOptions || []).find((x: any) => x.currency_code === val)
payment.currency_name_snapshot = found?.currency_name || ''
}
">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
<ElInput v-model="payment.currency_name_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="4" :xl="4">
<ElCol :sm="12" :md="12" :lg="5" :xl="5">
<ElFormItem label="账户">
<ElSelect v-model="payment.account_id" placeholder="请选择账户" @change="
(val) =>
@@ -640,14 +641,30 @@
<ElInput v-model="payment.account_name_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="4" :xl="4">
<ElFormItem label="汇款人">
<ElInput v-model="payment.remitter_name" placeholder="请选择汇款人" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="4" :xl="4">
<ElCol :sm="12" :md="12" :lg="5" :xl="5">
<ElFormItem label="金额">
<ElInput v-model="payment.amount" placeholder="请输入金额" />
<ElInput v-model="payment.amount" placeholder="请输入金额">
<template #suffix>
<ElSelect
v-model="payment.currency_code"
style="width: 64px"
@change="
(val) => {
const found = (currencyOptions || []).find((x: any) => x.currency_code === val)
payment.currency_name_snapshot = found?.currency_name || ''
}
"
>
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="payment.currency_name_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
</ElRow>
@@ -692,7 +709,10 @@
<div class="form-card">
<!-- 底部信息 -->
<div class="submit-wrap">
<ElButton type="primary" size="large" class="submit-btn" @click="handleSubmit"
<ElButton type="primary" plain size="large" class="submit-btn" @click="handleSubmit(0)"
>保存</ElButton
>
<ElButton type="primary" size="large" class="submit-btn" @click="handleSubmit(1)"
>提交</ElButton
>
</div>
@@ -957,12 +977,14 @@
.submit-wrap {
display: flex;
justify-content: center;
justify-content: space-around;
padding: 24px 0 8px;
width: 500px;
margin: auto;
}
.submit-btn {
width: 220px;
width: 100px;
height: 44px;
font-size: 16px;
}
@@ -1014,4 +1036,18 @@
word-break: break-all;
padding: 0 8px;
}
:deep(.el-input__suffix .el-select .el-select__wrapper) {
box-shadow: none;
padding: 0px;
text-align: right;
}
.form-box {
border-bottom: 1px solid #F2F4F6;
margin-bottom: 20px;
padding: 8px 0px 20px;
}
/* 右对齐所有表单项的标签文字 */
// :deep(.el-form-item__label) {
// text-align: right;
// }
</style>
+244 -220
View File
@@ -9,15 +9,15 @@
<span class="border"></span>
<span class="title">基础信息</span>
</div>
<ElForm :model="baseForm" class="base-form">
<ElForm :model="baseForm" class="base-form" label-position="right">
<ElRow :gutter="12">
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="阿里订单号/PN号">
<ElInput v-model="baseForm.pi_no" placeholder="请输入阿里订单号/PN号" />
<ElFormItem label="阿里订单号/PI号" label-width="114px">
<ElInput v-model="baseForm.pi_no" placeholder="请输入阿里订单号/PN号" disabled />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="日期">
<ElFormItem label="日期" label-width="114px">
<ElDatePicker
v-model="baseForm.biz_date"
type="date"
@@ -29,7 +29,7 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="清关目的国">
<ElFormItem label="清关目的国" label-width="114px">
<el-select
v-model="baseForm.clearance_country_id"
filterable
@@ -51,7 +51,7 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="客户来源">
<ElFormItem label="客户来源" label-width="114px">
<el-select
v-model="baseForm.customer_source_id"
filterable
@@ -73,22 +73,22 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="客户名称">
<ElFormItem label="客户名称" label-width="114px">
<ElInput
v-model="baseForm.customer_snapshot"
placeholder="请选择客户"
readonly
@click="openCustomerDialog"
>
<template #append>
<ElButton type="primary" text @click.stop="openCustomerDialog">选择</ElButton>
<template #suffix>
<i class="iconfont-sys" @click.stop="openCustomerDialog">&#xe867;</i>
</template>
</ElInput>
<ElInput v-model="baseForm.customer_id" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="客户所在国">
<ElFormItem label="客户所在国" label-width="114px">
<el-select
v-model="baseForm.customer_country_id"
filterable
@@ -118,11 +118,11 @@
<span class="border"></span>
<span class="title">订单详情</span>
</div>
<div class="items-wrap">
<div class="item-row" v-for="(item, idx) in items" :key="idx">
<ElForm class="items-wrap" label-position="right">
<div class="item-row form-box" v-for="(item, idx) in items" :key="idx">
<ElRow :gutter="12">
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="车型" label-width="64px">
<ElFormItem label="车型" label-width="85px">
<ElInput
v-model="item.model_snapshot"
placeholder="请选择车型"
@@ -130,17 +130,15 @@
disabled
@click="openVehicleDialog(idx)"
>
<!-- <template #append>
<ElButton type="primary" text @click.stop="openVehicleDialog(idx)"
>选择</ElButton
>
</template> -->
<template #suffix>
<i class="iconfont-sys" @click.stop="openVehicleDialog(idx)">&#xe867;</i>
</template>
</ElInput>
<ElInput v-model="item.sku_id" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="颜色/外饰" label-width="72px">
<ElFormItem label="颜色/外饰" label-width="85px">
<el-select
v-model="item.color_exterior_snapshot"
filterable
@@ -163,7 +161,7 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="颜色/内饰" label-width="72px">
<ElFormItem label="颜色/内饰" label-width="85px">
<el-select
v-model="item.color_interior_snapshot"
filterable
@@ -186,7 +184,7 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="改装" label-width="52px">
<ElFormItem label="改装" label-width="85px">
<el-select
v-model="item.modify_ids"
filterable
@@ -210,120 +208,16 @@
</ElCol>
</ElRow>
<ElRow :gutter="12">
<ElCol :sm="12" :md="12" :lg="5" :xl="4">
<ElFormItem label="单价" label-width="45px">
<ElInput v-model.number="item.unit_price" placeholder="请输入单价">
<template #append>
<ElSelect v-model="item.unit_price_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.unit_price_currency_snapshot" type="hidden" />
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="里程" label-width="85px">
<ElInput v-model="item.mileage" placeholder="请输入里程" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="5" :xl="4">
<ElFormItem label="总价" label-width="45px">
<ElInput v-model.number="item.total_price" placeholder="请输入总价">
<template #append>
<ElSelect v-model="item.total_price_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.total_price_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="5" :xl="4">
<ElFormItem label="改装费" label-width="55px">
<ElInput v-model.number="item.retrofit_fee" placeholder="请输入改装费">
<template #append>
<ElSelect v-model="item.modify_fee_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.modify_fee_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="5" :xl="4">
<ElFormItem label="FOB段运费" label-width="84px">
<ElInput v-model.number="item.fob_transport_fee" placeholder="请输入FOB段运费">
<template #append>
<ElSelect v-model="item.fob_fee_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.fob_fee_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="4" :xl="4">
<ElFormItem label="手续费" label-width="60px">
<ElInput v-model.number="item.handling_fee" placeholder="请输入手续费">
<template #append>
<ElSelect v-model="item.helper_fee_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.helper_fee_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12">
<ElCol :sm="12" :md="12" :lg="5" :xl="5">
<ElFormItem label="港杂费" label-width="60px">
<ElInput v-model.number="item.port_misc_fee" placeholder="请输入港杂费">
<template #append>
<ElSelect v-model="item.port_fee_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.port_fee_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="4" :xl="4">
<ElFormItem label="里程" label-width="52px">
<ElInput v-model.number="item.mileage" placeholder="请输入里程" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="5" :xl="5" v-if="(item.mileage ?? 0) <= 0">
<ElCol :sm="12" :md="12" :lg="6" :xl="6" v-if="(item.mileage ?? 0) <= 0">
<ElFormItem label="官方指导价" label-width="85px">
<ElInput v-model.number="item.official_price" placeholder="请输入官方指导价">
<template #append>
<ElSelect v-model="item.guide_price_currency" style="width: 64px">
<ElInput v-model="item.official_price" placeholder="请输入官方指导价">
<template #suffix>
<ElSelect v-model="item.guide_price_currency" style="width: 64px;border: none;">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
@@ -336,10 +230,10 @@
<ElInput v-model="item.guide_price_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="5" :xl="5" v-else>
<ElFormItem label="挂牌价" label-width="55px">
<ElInput v-model.number="item.listing_price" placeholder="请输入挂牌价">
<template #append>
<ElCol :sm="12" :md="12" :lg="6" :xl="6" v-else>
<ElFormItem label="二手挂牌价" label-width="85px">
<ElInput v-model="item.listing_price" placeholder="请输入二手挂牌价">
<template #suffix>
<ElSelect v-model="item.listing_price_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
@@ -354,9 +248,9 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6" v-if="(item.mileage ?? 0) <= 0">
<ElFormItem label="优惠" label-width="52px">
<ElInput v-model.number="item.discount_price" placeholder="请输入优惠额">
<template #append>
<ElFormItem label="优惠" label-width="85px">
<ElInput v-model="item.discount_price" placeholder="请输入优惠额">
<template #suffix>
<ElSelect v-model="item.discount_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
@@ -371,9 +265,9 @@
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6" v-else>
<ElFormItem label="二手减价" label-width="72px">
<ElInput v-model.number="item.reduction_price" placeholder="请输入二手减价">
<template #append>
<ElFormItem label="优惠" label-width="85px">
<ElInput v-model="item.reduction_price" placeholder="请输入优惠">
<template #suffix>
<ElSelect v-model="item.reduction_price_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
@@ -387,29 +281,147 @@
<ElInput v-model="item.reduction_price_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="4" :xl="4">
<ElFormItem label="利润" label-width="52px">
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="手续费" label-width="85px">
<ElInput v-model="item.handling_fee" placeholder="请输入手续费">
<template #suffix>
<ElSelect v-model="item.helper_fee_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.helper_fee_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="改装费" label-width="85px">
<ElInput v-model="item.retrofit_fee" placeholder="请输入改装费">
<template #suffix>
<ElSelect v-model="item.modify_fee_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.modify_fee_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="FOB段运费" label-width="85px">
<ElInput v-model="item.fob_transport_fee" placeholder="请输入FOB段运费">
<template #suffix>
<ElSelect v-model="item.fob_fee_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.fob_fee_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="港杂费" label-width="85px">
<ElInput v-model="item.port_misc_fee" placeholder="请输入港杂费">
<template #suffix>
<ElSelect v-model="item.port_fee_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.port_fee_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="海运费" label-width="85px">
<ElInput v-model="item.ocean_freight" placeholder="请输入海运费">
<template #suffix>
<ElSelect v-model="item.ocean_freight_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.ocean_freight_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="成交价" label-width="85px">
<ElInput v-model="item.unit_price" placeholder="请输入成交价">
<template #suffix>
<ElSelect v-model="item.unit_price_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.unit_price_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="总价" label-width="85px">
<ElInput v-model="item.total_price" placeholder="请输入总价">
<template #suffix>
<ElSelect v-model="item.total_price_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.total_price_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="利润" label-width="85px">
<ElInput
v-model="item.profit"
placeholder="正在计算利润"
:class="Number(item.profit) < 0 ? 'profit-negative' : ''"
disabled
>
<template #append> <span style="font-size: 11px">美元</span></template>
<template #suffix> <span style="font-size: 11px">美元</span></template>
</ElInput>
<ElInput v-model="item.profit_type_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="4" :xl="4">
<ElFormItem label="车架号" label-width="70px">
<ElInput v-model.number="item.vin" placeholder="请输入" />
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="车架号" label-width="85px">
<ElInput v-model="item.vin" placeholder="请输入车架号"></ElInput>
</ElFormItem>
</ElCol>
</ElRow>
</div>
<ElRow :gutter="12">
<ElCol :span="6">
<ElFormItem label="合计到岸价" label-width="85px">
<ElFormItem label="合计到岸价" label-width="105px">
<ElInput v-model.number="baseForm.total_cif" placeholder="请输入合计到岸价">
<template #append>
<ElSelect v-model="baseForm.total_cif_currency" style="width: 64px">
@@ -426,12 +438,12 @@
</ElFormItem>
</ElCol>
<ElCol :span="6">
<ElFormItem label="合同汇率" label-width="70px">
<ElFormItem label="合同汇率" label-width="105px">
<ElInput v-model="baseForm.contract_exchange_rate" placeholder="请输入" />
</ElFormItem>
</ElCol>
</ElRow>
</div>
</ElForm>
</div>
<div class="boxshadow">
<div class="form-title">
@@ -440,15 +452,15 @@
</div>
<ElForm :model="baseForm" class="foot-form">
<ElRow :gutter="12">
<ElCol :span="4">
<ElFormItem label="清关人">
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="清关人" label-width="98px">
<ElInput v-model="baseForm.declarant_name" placeholder="请输入清关人" />
</ElFormItem>
</ElCol>
<ElCol :span="4">
<ElFormItem label="预计发送日">
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="全款收齐日" label-width="98px">
<ElDatePicker
v-model="baseForm.eta_ship_date"
v-model="baseForm.collect_all_date"
value-format="YYYY-MM-DD"
format="YYYY-MM-DD"
type="date"
@@ -457,8 +469,24 @@
/>
</ElFormItem>
</ElCol>
<ElCol :span="4">
<ElFormItem label="运输方式">
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="国内收货港" label-width="98px">
<ElSelect
v-model="baseForm.domestic_port_id"
placeholder="请选择国内收货商"
@change="
(val) =>
(baseForm.domestic_port_snapshot =
(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" />
</ElSelect>
<ElInput v-model="baseForm.domestic_port_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="运输方式" label-width="98px">
<ElSelect
v-model="baseForm.shipping_method_id"
placeholder="请选择运输方式"
@@ -478,24 +506,8 @@
<ElInput v-model="baseForm.shipping_method_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :span="4">
<ElFormItem label="国内收货港">
<ElSelect
v-model="baseForm.domestic_port_id"
placeholder="请选择国内收货商"
@change="
(val) =>
(baseForm.domestic_port_snapshot =
(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" />
</ElSelect>
<ElInput v-model="baseForm.domestic_port_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :span="4">
<ElFormItem label="贸易条款">
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="贸易条款" label-width="98px">
<ElSelect
v-model="baseForm.trade_term_id"
placeholder="请选择"
@@ -515,8 +527,8 @@
<ElInput v-model="baseForm.trade_term_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :span="4">
<ElFormItem label="清关目的港">
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="清关目的港" label-width="98px">
<ElSelect
v-model="baseForm.clearance_port_id"
placeholder="请选择"
@@ -536,12 +548,10 @@
<ElInput v-model="baseForm.clearance_port_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12">
<ElCol :span="6">
<ElFormItem label="最迟到港时间">
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="提车日期" label-width="98px">
<ElDatePicker
v-model="baseForm.latest_arrival_date"
v-model="baseForm.pick_up_date"
type="date"
value-format="YYYY-MM-DD"
format="YYYY-MM-DD"
@@ -564,8 +574,13 @@
<ElForm :model="payment" label-width="55px" class="payment-form">
<ElRow :gutter="12">
<ElCol :span="4">
<ElFormItem label="汇款人">
<ElInput v-model="payment.remitter_name" placeholder="请选择汇款人" disabled />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
<ElFormItem label="汇款国">
<el-select v-model="payment.remit_country_id" filterable placeholder="请选择汇款国" @change="
<el-select disabled v-model="payment.remit_country_id" filterable placeholder="请选择汇款国" @change="
(val) =>
(payment.remit_country_name_snapshot =
(countryOptions || []).find((x: any) => x.id === val)?.cn_addr || '')
@@ -580,9 +595,10 @@
<ElInput v-model="payment.remit_country_name_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :span="4">
<ElCol :sm="12" :md="12" :lg="4" :xl="4">
<ElFormItem label="日期">
<ElDatePicker
disabled
v-model="payment.remit_date"
type="date"
format="YYYY-MM-DD"
@@ -592,27 +608,9 @@
/>
</ElFormItem>
</ElCol>
<ElCol :span="4">
<ElFormItem label="币种">
<ElSelect v-model="payment.currency_code" placeholder="请选择币种" @change="
(val) => {
const found = (currencyOptions || []).find((x: any) => x.currency_code === val)
payment.currency_name_snapshot = found?.currency_name || ''
}
">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
<ElInput v-model="payment.currency_name_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :span="4">
<ElCol :sm="12" :md="12" :lg="5" :xl="5">
<ElFormItem label="账户">
<ElSelect v-model="payment.account_name_snapshot" placeholder="请选择账户" @change="
<ElSelect disabled v-model="payment.account_name_snapshot" placeholder="请选择账户" @change="
(val) =>
(payment.account_id =
(accountOptions || []).find((x: any) => x.account_number === val)?.id || '')
@@ -627,23 +625,40 @@
<ElInput v-model="payment.account_id" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :span="4">
<ElFormItem label="汇款人">
<ElInput v-model="payment.remitter_name" placeholder="请选择汇款人" />
</ElFormItem>
</ElCol>
<ElCol :span="4">
<ElCol :sm="12" :md="12" :lg="5" :xl="5">
<ElFormItem label="金额">
<ElInput v-model.number="payment.amount" placeholder="请输入金额" />
<ElInput disabled v-model="payment.amount" placeholder="请输入金额">
<template #suffix>
<ElSelect
disabled
v-model="payment.currency_code"
style="width: 64px"
@change="
(val) => {
const found = (currencyOptions || []).find((x: any) => x.currency_code === val)
payment.currency_name_snapshot = found?.currency_name || ''
}
"
>
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="payment.currency_name_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12">
<!-- <ElRow :gutter="12">
<ElCol :span="24" style="text-align: right;">
<ElButton type="danger" size="small" @click="removePaymentItem(idx)" :disabled="paymentItems.length === 1">删除</ElButton>
<ElButton type="primary" size="small" @click="addPaymentItem" v-if="idx === paymentItems.length - 1">添加收款信息</ElButton>
</ElCol>
</ElRow>
</ElRow> -->
</ElForm>
</div>
</div>
@@ -683,7 +698,7 @@
<div class="form-card">
<!-- 底部信息 -->
<div class="submit-wrap">
<ElButton type="primary" size="large" class="submit-btn" @click="handleSubmit"
<ElButton type="primary" size="large" class="submit-btn" @click="handleSubmit(1)"
>提交</ElButton
>
</div>
@@ -795,11 +810,9 @@
import { useUserStore } from '@/store/modules/user'
import { useStockingForm } from '@/composables/useStockingForm'
import { onMounted } from 'vue'
const route = useRoute()
const stocking_id = route.query.id
const { getUserInfo } = useUserStore()
// 使用公共的备货单表单逻辑
const {
// 数据
@@ -809,7 +822,6 @@
contractFile,
customerDialog,
vehicleDialog,
// 选项数据
channelOptions,
countryOptions,
@@ -962,8 +974,10 @@
.submit-wrap {
display: flex;
justify-content: center;
justify-content: space-around;
padding: 24px 0 8px;
width: 500px;
margin: auto;
}
.submit-btn {
@@ -1032,4 +1046,14 @@
.file-preview {
position: relative;
}
:deep(.el-input__suffix .el-select .el-select__wrapper) {
box-shadow: none;
padding: 0px;
text-align: right;
}
.form-box {
border-bottom: 1px solid #F2F4F6;
margin-bottom: 20px;
padding: 8px 0px 20px;
}
</style>
File diff suppressed because it is too large Load Diff
@@ -56,6 +56,7 @@
<template #default="scope">
<ElRow :gutter="10" justify="center">
<el-link
v-if="scope.row.file_url != null && scope.row.file_url != ''"
type="warning"
underline="never"
@click="printfn(scope.row)"
@@ -63,6 +64,24 @@
>
<i class="iconfont-sys">&#xe782;</i> 打印预览
</el-link>
<el-link
v-if="scope.row.approval_status == 0"
type="success"
underline="never"
@click="handleapproval(scope.row)"
style="margin-right: 8px"
>
<i class="iconfont-sys">&#xe641;</i> 提交
</el-link>
<el-link
v-if="scope.row.approval_status == 0"
type="primary"
underline="never"
@click="handleEdit(scope.row)"
style="margin-right: 8px"
>
<i class="iconfont-sys">&#xe6bf;</i> 编辑
</el-link>
<el-link
type="success"
underline="never"
@@ -213,6 +232,22 @@
})
// TODO: 跳转创建维修保单
}
const handleEdit = (row: any) => {
router.push({
path: '/crmpc/stocking/stocking_edit',
query: { id: row.id } // 可带客户名等参数
})
}
const handleapproval = (row: any) => {
CrmService.stockapprovalpass({ id: row.id })
.then((res) => {
ElMessage.success(res?.message || '修改成功')
getList()
})
.catch((err) => {
console.log(err)
})
}
//打印
const printfn = (row: any) => {
CrmService.printStock({ id: row.id })
@@ -230,6 +265,13 @@
</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;
+17 -14
View File
@@ -128,12 +128,12 @@
>
<qrcode-vue
:value="qrcodeUrl"
:size="120"
level="L"
:size="200"
level="M"
render-as="svg"
:include-margin="false"
:include-margin="true"
background="#ffffff"
foreground="#111111"
foreground="#000000"
/>
<div class="qrcode-tip">手机扫码重新签名</div>
</div>
@@ -142,12 +142,12 @@
<div class="signature-qrcode">
<qrcode-vue
:value="qrcodeUrl"
:size="120"
level="L"
:size="200"
level="M"
render-as="svg"
:include-margin="false"
:include-margin="true"
background="#ffffff"
foreground="#111111"
foreground="#000000"
/>
<div class="qrcode-tip">手机扫码进行签名</div>
</div>
@@ -382,13 +382,16 @@
const userId = (form.value as any)?.id || (userInfo.value as any)?.id || ''
const base = location.origin
const params = new URLSearchParams({ userId: String(userId) })
if (userStore?.accessToken) params.append('accessToken', userStore.accessToken)
// 只保留必要的参数,减少URL长度
if (userStore?.accessToken) params.append('token', userStore.accessToken)
if (userStore?.companyabbr) params.append('corp', userStore.companyabbr)
if (userStore?.companyid) params.append('corpid', userStore.companyid)
if (userStore?.systemsabbr) params.append('sys', userStore.systemsabbr)
if (userStore?.systemsid) params.append('sysid', userStore.systemsid)
if (userStore?.loginType) params.append('type', userStore.loginType)
if (userStore?.language) params.append('lang', userStore.language)
if (userStore?.companyabbr) params.append('companyabbr', userStore.companyabbr)
if (userStore?.companyid) params.append('companyid', userStore.companyid)
if (userStore?.loginType) params.append('loginType', userStore.loginType)
if (userStore?.systemsabbr) params.append('systemsabbr', userStore.systemsabbr)
if (userStore?.systemsid) params.append('systemsid', userStore.systemsid)
return `${base}/auth/signature/mobile?${params.toString()}`
})
</script>