修改 备货单 详情
This commit is contained in:
@@ -31,7 +31,7 @@ export interface BaseForm {
|
||||
pick_up_date: string
|
||||
collect_all_date: string
|
||||
contract_exchange_rate: string
|
||||
contract_exchange_rate_currency: string
|
||||
settlement_currency: string
|
||||
remark: string
|
||||
total_cif: number | undefined
|
||||
total_cif_currency: string
|
||||
@@ -161,7 +161,7 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
|
||||
clearance_port_snapshot: '',
|
||||
latest_arrival_date: '',
|
||||
contract_exchange_rate: '',
|
||||
contract_exchange_rate_currency: 'USD',
|
||||
settlement_currency: 'USD',
|
||||
remark: '',
|
||||
total_cif: undefined,
|
||||
total_cif_currency: 'USD',
|
||||
@@ -359,7 +359,7 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
|
||||
}
|
||||
|
||||
const validateContractRate = () => {
|
||||
const code = baseForm.contract_exchange_rate_currency || items.value[0]?.unit_price_currency || 'USD'
|
||||
const code = baseForm.settlement_currency || items.value[0]?.unit_price_currency || 'USD'
|
||||
const { min, max } = getCurrencyBounds(code)
|
||||
const val = Number(baseForm.contract_exchange_rate)
|
||||
if (Number.isNaN(val)) return
|
||||
@@ -730,9 +730,8 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
|
||||
reduction_price: wrapMoney(it.reduction_price, (it as any).reduction_price_currency, '二手减价')
|
||||
}))
|
||||
|
||||
// 从提交参数中移除 contract_exchange_rate_currency
|
||||
// 从提交参数中移除 settlement_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
|
||||
@@ -765,7 +764,7 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
|
||||
|
||||
// 监听器
|
||||
watch(
|
||||
() => baseForm.contract_exchange_rate_currency,
|
||||
() => baseForm.settlement_currency,
|
||||
(newCurrency) => {
|
||||
if (newCurrency) {
|
||||
baseForm.contract_exchange_rate = getCurrencyRate(newCurrency)
|
||||
|
||||
Reference in New Issue
Block a user