|
|
@@ -3,14 +3,16 @@
|
|
|
<app-modal direction="right-top" height="100%" width="100%" v-model:show="showModal" :refresh="refresh">
|
|
|
<app-view>
|
|
|
<template #header>
|
|
|
- <app-navbar title="交料付款" @back="closed" />
|
|
|
+ <app-navbar :title="`${tagName}付款`" @back="closed" />
|
|
|
</template>
|
|
|
<Form ref="formRef" class="g-form__container" @submit="onSubmit">
|
|
|
<CellGroup inset>
|
|
|
- <Cell title="交料单号" :value="selectedRow.deliveryorderid" />
|
|
|
+ <Cell :title="`${tagName}单号`" :value="selectedRow.deliveryorderid" />
|
|
|
<Cell title="商品代码/名称" :value="selectedRow.goodscode + '/' + selectedRow.goodsname" />
|
|
|
- <Cell title="交料重量" :value="selectedRow.deliveryqty + getGoodsUnitName(selectedRow.goodunitid)" />
|
|
|
- <Cell title="实际交料重量" :value="selectedRow.realdeliveryqty + getGoodsUnitName(selectedRow.goodunitid)" />
|
|
|
+ <Cell :title="`${tagName}重量`"
|
|
|
+ :value="selectedRow.deliveryqty + getGoodsUnitName(selectedRow.goodunitid)" />
|
|
|
+ <Cell :title="`实际${tagName}重量`"
|
|
|
+ :value="selectedRow.realdeliveryqty + getGoodsUnitName(selectedRow.goodunitid)" />
|
|
|
<Cell title="总货款" :value="formatDecimal(selectedRow.deliverytotalamount)" />
|
|
|
<Cell title="已付货款" :value="formatDecimal(selectedRow.payedamount)" />
|
|
|
<Cell title="剩余货款" :value="formatDecimal(amount)" />
|
|
|
@@ -50,6 +52,7 @@ import { shallowRef, PropType, reactive, computed, onMounted, ref } from 'vue'
|
|
|
import { CellGroup, Cell, Form, Field, Stepper, Button, FieldRule, FormInstance, Radio, RadioGroup } from 'vant'
|
|
|
import { fullloading, dialog } from '@/utils/vant'
|
|
|
import { formatDecimal, handleRequestBigNumber } from '@/filters'
|
|
|
+import { BuyOrSell } from '@/constants/order'
|
|
|
import { getGoodsUnitName } from '@/constants/unit'
|
|
|
import { deliveryClientOperator } from '@/services/api/trade'
|
|
|
import AppModal from '@/components/base/modal/index.vue'
|
|
|
@@ -78,6 +81,9 @@ const formData = reactive<Proto.DeliveryClientOperatorReq>({
|
|
|
// 剩余货款
|
|
|
const amount = computed(() => props.selectedRow.deliverytotalamount - props.selectedRow.payedamount - formData.PayAmount)
|
|
|
|
|
|
+// 标签名称
|
|
|
+const tagName = computed(() => props.selectedRow.buyorsell === BuyOrSell.Buy ? '提料' : '交料')
|
|
|
+
|
|
|
// 表单验证规则
|
|
|
const formRules: { [key: string]: FieldRule[] } = {
|
|
|
PayAmount: [{
|