收敛前端金额表单命名
This commit is contained in:
@@ -60,17 +60,17 @@ const checkingPayment = ref(false)
|
||||
let paymentPollingTimer: number | undefined
|
||||
const checkoutForm = ref({
|
||||
content: '',
|
||||
consumable_amount: 0,
|
||||
consumableAmountYuan: 0,
|
||||
coin_consumed_m: 0,
|
||||
other_amount: 0,
|
||||
otherAmountYuan: 0,
|
||||
evidenceText: '',
|
||||
})
|
||||
const resourceUsage = ref<Record<string, number>>({})
|
||||
const counterForm = ref({
|
||||
consumable_amount: 0,
|
||||
consumableAmountYuan: 0,
|
||||
coin_consumed_m: 0,
|
||||
other_amount: 0,
|
||||
deposit_deduct_amount: 0,
|
||||
otherAmountYuan: 0,
|
||||
depositDeductAmountYuan: 0,
|
||||
reason: '',
|
||||
evidenceText: '',
|
||||
})
|
||||
@@ -321,19 +321,19 @@ async function handleSubmitCheckout() {
|
||||
returning.value = true
|
||||
try {
|
||||
const consumableAmount = resourceChargeAmount.value
|
||||
checkoutForm.value.consumable_amount = consumableAmount
|
||||
checkoutForm.value.consumableAmountYuan = consumableAmount
|
||||
await submitCheckout(order.value.id, {
|
||||
content: checkoutContentWithSummary(),
|
||||
consumable_amount: consumableAmount,
|
||||
consumableAmountYuan: consumableAmount,
|
||||
coin_consumed_m: checkoutForm.value.coin_consumed_m,
|
||||
other_amount: checkoutForm.value.other_amount,
|
||||
otherAmountYuan: checkoutForm.value.otherAmountYuan,
|
||||
evidence_urls: linesToList(checkoutForm.value.evidenceText),
|
||||
})
|
||||
checkoutForm.value = {
|
||||
content: '',
|
||||
consumable_amount: 0,
|
||||
consumableAmountYuan: 0,
|
||||
coin_consumed_m: 0,
|
||||
other_amount: 0,
|
||||
otherAmountYuan: 0,
|
||||
evidenceText: '',
|
||||
}
|
||||
resourceUsage.value = {}
|
||||
@@ -367,10 +367,10 @@ async function handleCounterCheckout() {
|
||||
const reasonText = counterForm.value.reason.trim()
|
||||
await counterCheckout(order.value.id, {
|
||||
content: reasonText,
|
||||
consumable_amount: counterForm.value.consumable_amount,
|
||||
consumableAmountYuan: counterForm.value.consumableAmountYuan,
|
||||
coin_consumed_m: counterForm.value.coin_consumed_m,
|
||||
other_amount: counterForm.value.other_amount,
|
||||
deposit_deduct_amount: counterForm.value.deposit_deduct_amount,
|
||||
otherAmountYuan: counterForm.value.otherAmountYuan,
|
||||
depositDeductAmountYuan: counterForm.value.depositDeductAmountYuan,
|
||||
reason: reasonText,
|
||||
evidence_urls: linesToList(counterForm.value.evidenceText),
|
||||
})
|
||||
@@ -641,10 +641,10 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
function hydrateCounterForm() {
|
||||
if (!order.value?.checkout) return
|
||||
const checkout = order.value.checkout
|
||||
counterForm.value.consumable_amount = amountYuan(checkout.consumable_amount_cent)
|
||||
counterForm.value.consumableAmountYuan = amountYuan(checkout.consumable_amount_cent)
|
||||
counterForm.value.coin_consumed_m = checkout.coin_consumed_m
|
||||
counterForm.value.other_amount = amountYuan(checkout.other_amount_cent)
|
||||
counterForm.value.deposit_deduct_amount = amountYuan(checkout.deposit_deduct_amount_cent)
|
||||
counterForm.value.otherAmountYuan = amountYuan(checkout.other_amount_cent)
|
||||
counterForm.value.depositDeductAmountYuan = amountYuan(checkout.deposit_deduct_amount_cent)
|
||||
}
|
||||
|
||||
function linesToList(value: string) {
|
||||
@@ -911,7 +911,7 @@ async function copyListingCode() {
|
||||
</el-form-item>
|
||||
<el-form-item label="其他押金赔付(元)">
|
||||
<el-input-number
|
||||
v-model="checkoutForm.other_amount"
|
||||
v-model="checkoutForm.otherAmountYuan"
|
||||
class="full-control"
|
||||
:min="0"
|
||||
:precision="0"
|
||||
@@ -930,7 +930,7 @@ async function copyListingCode() {
|
||||
</div>
|
||||
<div>
|
||||
<span>其他押金赔付</span>
|
||||
<strong>¥{{ money(checkoutForm.other_amount) }}</strong>
|
||||
<strong>¥{{ money(checkoutForm.otherAmountYuan) }}</strong>
|
||||
<em>作为押金赔付扣除,和额外消耗品分开展示</em>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1022,7 +1022,7 @@ async function copyListingCode() {
|
||||
<el-form class="form-grid" label-position="top">
|
||||
<el-form-item label="额外消耗品已用金额">
|
||||
<el-input-number
|
||||
v-model="counterForm.consumable_amount"
|
||||
v-model="counterForm.consumableAmountYuan"
|
||||
class="full-control"
|
||||
:min="0"
|
||||
:precision="0"
|
||||
@@ -1040,7 +1040,7 @@ async function copyListingCode() {
|
||||
</el-form-item>
|
||||
<el-form-item label="其他押金扣款(元)">
|
||||
<el-input-number
|
||||
v-model="counterForm.other_amount"
|
||||
v-model="counterForm.otherAmountYuan"
|
||||
class="full-control"
|
||||
:min="0"
|
||||
:precision="0"
|
||||
@@ -1049,7 +1049,7 @@ async function copyListingCode() {
|
||||
</el-form-item>
|
||||
<el-form-item label="押金扣除(元)">
|
||||
<el-input-number
|
||||
v-model="counterForm.deposit_deduct_amount"
|
||||
v-model="counterForm.depositDeductAmountYuan"
|
||||
class="full-control"
|
||||
:min="0"
|
||||
:max="amountYuan(order.deposit_amount_cent)"
|
||||
|
||||
Reference in New Issue
Block a user