10.17沟通调整
计划收款信息增加复制操作 上传合同调整为:上传合同、上传PI、上传水单(均为必传,且支持多文件操作与下载)
This commit is contained in:
@@ -136,7 +136,7 @@
|
||||
v-model="item.color_exterior_snapshot"
|
||||
filterable
|
||||
placeholder="请选择内容"
|
||||
@change="(val) => (item.color_exterior_code = (wcolorOptions || []).find((x: any) => x.color_text === val)?.color_code || '')"
|
||||
@change="(val) => (item.color_exterior_code = (wcolorOptions || []).find((x) => x.color_text === val)?.color_code || '')"
|
||||
>
|
||||
<ElOption
|
||||
v-for="item in wcolorOptions"
|
||||
@@ -157,7 +157,7 @@
|
||||
@change="
|
||||
(val) =>
|
||||
(item.color_interior_code =
|
||||
(ncolorOptions || []).find((x: any) => x.color_text === val)?.color_code ||
|
||||
(ncolorOptions || []).find((x) => x.color_text === val)?.color_code ||
|
||||
'')
|
||||
"
|
||||
>
|
||||
@@ -171,7 +171,7 @@
|
||||
<ElInput v-model="item.color_interior_code" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<!-- <ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="改装" label-width="85px">
|
||||
<el-select
|
||||
v-model="item.modify_ids"
|
||||
@@ -188,7 +188,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
</ElCol> -->
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="里程" label-width="85px">
|
||||
<ElInput v-model="item.mileage" placeholder="请输入里程" />
|
||||
@@ -264,6 +264,23 @@
|
||||
<ElInput v-model="item.reduction_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="收款价" label-width="85px" :prop="`items.${idx}.unit_price`" required>
|
||||
<ElInput v-model="item.unit_price" placeholder="请输入收款价">
|
||||
<template #suffix>
|
||||
<ElSelect v-model="item.unit_price_currency" style="width: 74px">
|
||||
<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>
|
||||
</ElRow>
|
||||
<ElRow :gutter="12" class="item-row-wrap">
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
@@ -300,6 +317,23 @@
|
||||
<ElInput v-model="item.modify_fee_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="配件费" label-width="85px">
|
||||
<ElInput v-model="item.accessory_price" placeholder="请输入配件费">
|
||||
<template #suffix>
|
||||
<ElSelect v-model="item.accessory_price_currency" style="width: 74px">
|
||||
<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.accessory_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="FOB段运费" label-width="85px">
|
||||
<ElInput v-model="item.fob_transport_fee" placeholder="请输入FOB段运费">
|
||||
@@ -368,6 +402,23 @@
|
||||
<ElInput v-model="item.commission_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="挂账" label-width="85px">
|
||||
<ElInput v-model="item.retention_price" placeholder="请输入挂账">
|
||||
<template #suffix>
|
||||
<ElSelect v-model="item.retention_price_currency" style="width: 74px">
|
||||
<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.retention_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="购置税" label-width="85px">
|
||||
<ElInput v-model="item.purchase_tax" placeholder="请输入购置税">
|
||||
@@ -387,24 +438,13 @@
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="预估退税额" label-width="85px">
|
||||
<ElInput v-model="item.tax_refund" placeholder="请输入预估退税额">
|
||||
<!-- <template #suffix>
|
||||
<ElSelect v-model="item.tax_refund_currency" style="width: 74px">
|
||||
<ElOption
|
||||
v-for="c in currencyOptions"
|
||||
:key="c.currency_code"
|
||||
:label="c.currency_name"
|
||||
:value="c.currency_code"
|
||||
/>
|
||||
</ElSelect>
|
||||
</template> -->
|
||||
<ElInput
|
||||
v-model="item.tax_refund"
|
||||
placeholder="正在计算预估退税额"
|
||||
@input="handleUserEdit(idx)"
|
||||
>
|
||||
<template #suffix>
|
||||
<span style="font-size: 11px">
|
||||
{{
|
||||
((currencyOptions || []).find((c: any) => c.currency_code === baseForm.settlement_currency)?.currency_name) ||
|
||||
baseForm.settlement_currency
|
||||
}}
|
||||
</span>
|
||||
<span style="font-size: 11px">人民币</span>
|
||||
</template>
|
||||
</ElInput>
|
||||
<ElInput v-model="item.tax_refund_currency_snapshot" type="hidden" />
|
||||
@@ -413,10 +453,14 @@
|
||||
</ElRow>
|
||||
<ElRow :gutter="12" class="item-row-wrap">
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="成交价" label-width="85px" :prop="`items.${idx}.unit_price`" required>
|
||||
<ElInput v-model="item.unit_price" placeholder="请输入成交价">
|
||||
<ElFormItem label="车价" label-width="85px">
|
||||
<ElInput
|
||||
v-model="item.car_price"
|
||||
placeholder="正在计算车价"
|
||||
@input="handleUserEdit(idx)"
|
||||
>
|
||||
<template #suffix>
|
||||
<ElSelect v-model="item.unit_price_currency" style="width: 74px">
|
||||
<ElSelect v-model="item.car_price_currency" style="width: 74px">
|
||||
<ElOption
|
||||
v-for="c in currencyOptions"
|
||||
:key="c.currency_code"
|
||||
@@ -426,7 +470,7 @@
|
||||
</ElSelect>
|
||||
</template>
|
||||
</ElInput>
|
||||
<ElInput v-model="item.unit_price_currency_snapshot" type="hidden" />
|
||||
<ElInput v-model="item.car_price_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<!-- <ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
@@ -455,22 +499,17 @@
|
||||
disabled
|
||||
>
|
||||
<template #suffix>
|
||||
<span style="font-size: 11px">
|
||||
{{
|
||||
((currencyOptions || []).find((c: any) => c.currency_code === baseForm.settlement_currency)?.currency_name) ||
|
||||
baseForm.settlement_currency
|
||||
}}
|
||||
</span>
|
||||
<span style="font-size: 11px">人民币</span>
|
||||
</template>
|
||||
</ElInput>
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
|
||||
<ElFormItem label="报关价" label-width="85px">
|
||||
<ElInput
|
||||
v-model="item.clearance_price"
|
||||
<ElInput
|
||||
v-model="item.clearance_price"
|
||||
placeholder="正在计算报关价"
|
||||
:class="Number(item.clearance_price) < 0 ? 'customs-fee-negative' : ''"
|
||||
@input="handleUserEdit(idx)"
|
||||
>
|
||||
<template #suffix>
|
||||
<ElSelect v-model="item.clearance_price_currency" style="width: 74px">
|
||||
@@ -522,9 +561,9 @@
|
||||
<ElRow :gutter="12">
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
|
||||
<ElFormItem label="合计到岸价" label-width="105px">
|
||||
<ElInput v-model="baseForm.total_cif" placeholder="请输入合计到岸价">
|
||||
<ElInput v-model="baseForm.cif_total" placeholder="请输入合计到岸价">
|
||||
<template #suffix>
|
||||
<ElSelect v-model="baseForm.total_cif_currency" style="width: 74px">
|
||||
<ElSelect v-model="baseForm.cif_total_currency" style="width: 74px">
|
||||
<ElOption
|
||||
v-for="c in currencyOptions"
|
||||
:key="c.currency_code"
|
||||
@@ -534,7 +573,7 @@
|
||||
</ElSelect>
|
||||
</template>
|
||||
</ElInput>
|
||||
<ElInput v-model="baseForm.total_cif_currency_snapshot" type="hidden" />
|
||||
<ElInput v-model="baseForm.cif_total_currency_snapshot" type="hidden" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
|
||||
@@ -543,7 +582,7 @@
|
||||
<template #suffix>
|
||||
<ElSelect v-model="baseForm.settlement_currency" style="width: 74px">
|
||||
<ElOption
|
||||
@change="(val) =>(baseForm.contract_exchange_rate =(currencyOptions || []).find((x: any) => x.currency_code === val)?.exchange_rate || '') "
|
||||
@change="(val) => (baseForm.contract_exchange_rate = (currencyOptions || []).find((x: any) => x.currency_code === val)?.exchange_rate || '')"
|
||||
v-for="c in currencyOptions"
|
||||
:key="c.currency_code"
|
||||
:label="c.currency_name"
|
||||
@@ -611,7 +650,7 @@
|
||||
@change="
|
||||
(val) =>
|
||||
(baseForm.shipping_method_snapshot =
|
||||
(transportOptions || []).find((x: any) => x.item_value === val)?.item_label ||
|
||||
(transportOptions || []).find((x) => x.item_value === val)?.item_label ||
|
||||
'')
|
||||
"
|
||||
>
|
||||
@@ -633,7 +672,7 @@
|
||||
@change="
|
||||
(val) =>
|
||||
(baseForm.trade_term_snapshot =
|
||||
(trade_termsOptions || []).find((x: any) => x.id === val)?.item_label || '')
|
||||
(trade_termsOptions || []).find((x) => x.id === val)?.item_label || '')
|
||||
"
|
||||
>
|
||||
<ElOption
|
||||
@@ -785,6 +824,14 @@
|
||||
</ElRow>
|
||||
<ElRow :gutter="12">
|
||||
<ElCol :span="24" style="text-align: right">
|
||||
<ElButton type="success" size="small" @click="copyPaymentItem(idx)">复制</ElButton>
|
||||
<ElButton
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="addPaymentItem"
|
||||
v-if="idx === paymentItems.length - 1"
|
||||
>添加</ElButton
|
||||
>
|
||||
<ElButton
|
||||
type="danger"
|
||||
size="small"
|
||||
@@ -792,13 +839,6 @@
|
||||
:disabled="paymentItems.length === 1"
|
||||
>删除</ElButton
|
||||
>
|
||||
<ElButton
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="addPaymentItem"
|
||||
v-if="idx === paymentItems.length - 1"
|
||||
>添加收款信息</ElButton
|
||||
>
|
||||
</ElCol>
|
||||
</ElRow>
|
||||
</ElForm>
|
||||
@@ -812,26 +852,44 @@
|
||||
<span class="border"></span>
|
||||
<span class="title">上传合同</span>
|
||||
</div>
|
||||
<el-upload
|
||||
class="upload-box"
|
||||
:action="actionImageUplode"
|
||||
:headers="uploadHeaders"
|
||||
:show-file-list="false"
|
||||
:on-success="handleContractUpload"
|
||||
:before-upload="beforeContractUpload"
|
||||
<MultiFileUpload
|
||||
v-model="contractFiles"
|
||||
upload-text="点击上传"
|
||||
hint-text="支持多文件上传"
|
||||
:icon-src="contractIcon"
|
||||
accept=".jpg,.jpeg,.png,.gif,.pdf,.doc,.docx,.xls,.xlsx,.txt"
|
||||
>
|
||||
<div class="qrcode-upload-box">
|
||||
<img v-if="!contractFile" class="avatar" src="@/assets/img/crm/contract.png" />
|
||||
<div v-else class="file-preview">
|
||||
<img v-if="isImageFile(contractFile)" :src="contractFile.url" class="preview-image" />
|
||||
<div v-else class="file-icon">
|
||||
<i class="el-icon-document"></i>
|
||||
<span class="file-name">{{ contractFile.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-upload>
|
||||
@change="(files) => (baseForm.contract = files.map((f) => f.file_name))"
|
||||
/>
|
||||
</div>
|
||||
<!-- 上传PI -->
|
||||
<div class="boxshadow">
|
||||
<div class="form-title">
|
||||
<span class="border"></span>
|
||||
<span class="title">上传PI</span>
|
||||
</div>
|
||||
<MultiFileUpload
|
||||
v-model="piFiles"
|
||||
upload-text="点击上传"
|
||||
hint-text="支持多文件上传"
|
||||
:icon-src="contractIcon"
|
||||
accept=".jpg,.jpeg,.png,.gif,.pdf,.doc,.docx,.xls,.xlsx,.txt"
|
||||
@change="(files) => (baseForm.pi_doc = files.map((f) => f.file_name))"
|
||||
/>
|
||||
</div>
|
||||
<!-- 上传水单 -->
|
||||
<div class="boxshadow">
|
||||
<div class="form-title">
|
||||
<span class="border"></span>
|
||||
<span class="title">上传水单</span>
|
||||
</div>
|
||||
<MultiFileUpload
|
||||
v-model="waterBillFiles"
|
||||
upload-text="点击上传"
|
||||
hint-text="支持多文件上传"
|
||||
:icon-src="contractIcon"
|
||||
accept=".jpg,.jpeg,.png,.gif,.pdf,.doc,.docx,.xls,.xlsx,.txt"
|
||||
@change="(files) => (baseForm.transaction_slip = files.map((f) => f.file_name))"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-card">
|
||||
<!-- 底部信息 -->
|
||||
@@ -965,6 +1023,8 @@
|
||||
import { CrmService } from '@/api/crmApi'
|
||||
import { useStockingForm } from '@/composables/useStockingForm'
|
||||
import { onMounted, ref, computed } from 'vue'
|
||||
import MultiFileUpload from '@/components/core/forms/MultiFileUpload.vue'
|
||||
import contractIcon from '@/assets/img/crm/contract.png'
|
||||
|
||||
defineOptions({ name: 'CrmStockingAdd' }) // 定义组件名称,用于 KeepAlive 缓存控制
|
||||
|
||||
@@ -1010,7 +1070,7 @@
|
||||
{ required: true, message: '请输入二手挂牌价', trigger: 'blur' }
|
||||
]
|
||||
rules[`items.${idx}.unit_price`] = [
|
||||
{ required: true, message: '请输入成交价', trigger: 'blur' }
|
||||
{ required: true, message: '请输入收款价', trigger: 'blur' }
|
||||
]
|
||||
})
|
||||
return rules
|
||||
@@ -1039,7 +1099,9 @@
|
||||
baseForm,
|
||||
items,
|
||||
paymentItems,
|
||||
contractFile,
|
||||
contractFiles,
|
||||
piFiles,
|
||||
waterBillFiles,
|
||||
customerDialog,
|
||||
vehicleDialog,
|
||||
|
||||
@@ -1058,8 +1120,6 @@
|
||||
trade_termsOptions,
|
||||
|
||||
// 上传相关
|
||||
actionImageUplode,
|
||||
uploadHeaders,
|
||||
|
||||
// 方法
|
||||
initializeForm,
|
||||
@@ -1069,12 +1129,8 @@
|
||||
validateContractRate,
|
||||
wrapMoney,
|
||||
calcProfit,
|
||||
handleUserEdit,
|
||||
|
||||
// 合同文件方法
|
||||
isImageFile,
|
||||
beforeContractUpload,
|
||||
handleContractUpload,
|
||||
removeContractFile,
|
||||
|
||||
// 订单项方法
|
||||
copyRow,
|
||||
@@ -1084,6 +1140,7 @@
|
||||
// 收款项方法
|
||||
addPaymentItem,
|
||||
removePaymentItem,
|
||||
copyPaymentItem,
|
||||
|
||||
// 客户选择方法
|
||||
openCustomerDialog,
|
||||
@@ -1261,6 +1318,7 @@
|
||||
word-break: break-all;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
:deep(.el-input__suffix .el-select .el-select__wrapper) {
|
||||
box-shadow: none;
|
||||
padding: 0px;
|
||||
|
||||
Reference in New Issue
Block a user