备货单 添加 合计到岸价 货币切换
This commit is contained in:
@@ -478,6 +478,13 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
|
|||||||
return (val * rateFrom) / rateTo
|
return (val * rateFrom) / rateTo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getCurrencyName = (code?: string) => {
|
||||||
|
if (!code) return ''
|
||||||
|
return (
|
||||||
|
(currencyOptions?.value || []).find((c: any) => c.currency_code === code)?.currency_name || ''
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// 利润=收款价-官方指导价/二手挂牌价+优惠-手续费-改装费-配件费-fob运费-港杂-海运-佣金-挂账-购置税+预估退税
|
// 利润=收款价-官方指导价/二手挂牌价+优惠-手续费-改装费-配件费-fob运费-港杂-海运-佣金-挂账-购置税+预估退税
|
||||||
const calcProfit = (it: any): number => {
|
const calcProfit = (it: any): number => {
|
||||||
const targetCurrency = 'CNY' // 固定使用人民币
|
const targetCurrency = 'CNY' // 固定使用人民币
|
||||||
@@ -1271,6 +1278,33 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => currencyOptions?.value,
|
||||||
|
() => {
|
||||||
|
baseForm.cif_total_currency_snapshot = getCurrencyName(baseForm.cif_total_currency)
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
)
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => baseForm.cif_total_currency,
|
||||||
|
(newCode, oldCode) => {
|
||||||
|
baseForm.cif_total_currency_snapshot = getCurrencyName(newCode)
|
||||||
|
if (
|
||||||
|
isPopulating.value ||
|
||||||
|
!oldCode ||
|
||||||
|
!newCode ||
|
||||||
|
newCode === oldCode ||
|
||||||
|
baseForm.cif_total === undefined ||
|
||||||
|
baseForm.cif_total === null
|
||||||
|
) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const converted = convertCurrency(baseForm.cif_total, oldCode, newCode)
|
||||||
|
baseForm.cif_total = Number(converted.toFixed(2))
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
items,
|
items,
|
||||||
(val) => {
|
(val) => {
|
||||||
|
|||||||
@@ -148,7 +148,11 @@
|
|||||||
<i class="iconfont-sys"></i> 作废
|
<i class="iconfont-sys"></i> 作废
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="scope.row.approval_status != 1 && scope.row.approval_status != 2"
|
v-if="
|
||||||
|
scope.row.approval_status != 1 &&
|
||||||
|
scope.row.approval_status != 2 &&
|
||||||
|
scope.row.approval_status != 4
|
||||||
|
"
|
||||||
type="danger"
|
type="danger"
|
||||||
underline="never"
|
underline="never"
|
||||||
@click="stockdeletefn(scope.row)"
|
@click="stockdeletefn(scope.row)"
|
||||||
|
|||||||
Reference in New Issue
Block a user