|
@@ -21,15 +21,17 @@
|
|
|
</span>
|
|
</span>
|
|
|
</template>
|
|
</template>
|
|
|
</Cell>
|
|
</Cell>
|
|
|
|
|
+ <Cell title="提货费" :value="fee" />
|
|
|
|
|
+ <Cell :title="$t('position.goods.deposit')" :value="deposit" />
|
|
|
<Cell :title="$t('position.goods.tradetime')" :value="selectedRow.tHDetailEx.tradeTime" />
|
|
<Cell :title="$t('position.goods.tradetime')" :value="selectedRow.tHDetailEx.tradeTime" />
|
|
|
</CellGroup>
|
|
</CellGroup>
|
|
|
<CellGroup :title="$t('position.goods.subtitle2')" inset>
|
|
<CellGroup :title="$t('position.goods.subtitle2')" inset>
|
|
|
- <Field name="DeliveryLot" type="digit" :rules="formRules.DeliveryLot" :label="$t('position.goods.deliverylot')">
|
|
|
|
|
|
|
+ <!-- <Field name="DeliveryLot" type="digit" :rules="formRules.DeliveryLot" :label="$t('position.goods.deliverylot')">
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<Stepper v-model="formData.DeliveryLot" theme="round" button-size="22" :min="0"
|
|
<Stepper v-model="formData.DeliveryLot" theme="round" button-size="22" :min="0"
|
|
|
:max="enableqty" :auto-fixed="false" integer />
|
|
:max="enableqty" :auto-fixed="false" integer />
|
|
|
</template>
|
|
</template>
|
|
|
- </Field>
|
|
|
|
|
|
|
+ </Field> -->
|
|
|
<Cell :title="$t('position.goods.deliveryqty')" :value="((formData.DeliveryLot ?? 0) * selectedRow.agreeUnit) + getGoodsUnitName(selectedRow.goodsUnitID)" />
|
|
<Cell :title="$t('position.goods.deliveryqty')" :value="((formData.DeliveryLot ?? 0) * selectedRow.agreeUnit) + getGoodsUnitName(selectedRow.goodsUnitID)" />
|
|
|
<Field name="DeliveryInfo" v-model="formData.DeliveryInfo" type="textarea" autosize clearable
|
|
<Field name="DeliveryInfo" v-model="formData.DeliveryInfo" type="textarea" autosize clearable
|
|
|
:rules="formRules.DeliveryInfo" maxlength="50"
|
|
:rules="formRules.DeliveryInfo" maxlength="50"
|
|
@@ -51,8 +53,8 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, PropType, computed } from 'vue'
|
|
|
|
|
-import { CellGroup, Cell, Button, FieldRule, Form, Field, Stepper, FormInstance, Icon } from 'vant'
|
|
|
|
|
|
|
+import { shallowRef, PropType, computed, onMounted } from 'vue'
|
|
|
|
|
+import { CellGroup, Cell, Button, FieldRule, Form, Field, FormInstance, Icon } from 'vant'
|
|
|
import { getBuyOrSellName, BuyOrSell } from '@/constants/order'
|
|
import { getBuyOrSellName, BuyOrSell } from '@/constants/order'
|
|
|
import { formatDecimal, handlePriceColor, handleRequestBigNumber } from '@/filters'
|
|
import { formatDecimal, handlePriceColor, handleRequestBigNumber } from '@/filters'
|
|
|
import { useOfflineDelivery } from '@/business/trade'
|
|
import { useOfflineDelivery } from '@/business/trade'
|
|
@@ -81,6 +83,7 @@ const showContact = shallowRef(false) // 显示联系人选择列表
|
|
|
const { formSubmit, formData } = useOfflineDelivery()
|
|
const { formSubmit, formData } = useOfflineDelivery()
|
|
|
const futuresStore = useFuturesStore()
|
|
const futuresStore = useFuturesStore()
|
|
|
const goods = futuresStore.getGoods(props.selectedRow.goodsCode)
|
|
const goods = futuresStore.getGoods(props.selectedRow.goodsCode)
|
|
|
|
|
+const quote = futuresStore.getGoodsQuote(props.selectedRow.goodsCode)
|
|
|
const { mindeliverylot = 0 } = goods ?? {}
|
|
const { mindeliverylot = 0 } = goods ?? {}
|
|
|
|
|
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
@@ -109,6 +112,25 @@ const enableqty = computed(() => {
|
|
|
return (tHDetailEx.holderQty - tHDetailEx.freezeQty) * agreeUnit
|
|
return (tHDetailEx.holderQty - tHDetailEx.freezeQty) * agreeUnit
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+// 需补足尾款
|
|
|
|
|
+const deposit = computed(() => {
|
|
|
|
|
+ return props.selectedRow.tHDetailEx.holderAmount - (props.selectedRow.tHDetailEx.payedDeposit + props.selectedRow.tHDetailEx.restockDeposit )
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+// 提货费 = 取交易费用配置 105
|
|
|
|
|
+// 固定: 可用量*合约单位*配置值
|
|
|
|
|
+// 比率:订单金额*配置值
|
|
|
|
|
+const fee = computed(() => {
|
|
|
|
|
+ const { tradefees = [], agreeunit = 0 } = quote.value ?? {}
|
|
|
|
|
+ const { FeeAlgorithm = 1, ExchangeValue = 1.0 } = tradefees.find((e) => e.FeeID === 105) ?? {}
|
|
|
|
|
+ // 比例
|
|
|
|
|
+ if (FeeAlgorithm === 1) {
|
|
|
|
|
+ return enableqty.value * agreeunit * ExchangeValue
|
|
|
|
|
+ }
|
|
|
|
|
+ // 固定
|
|
|
|
|
+ return props.selectedRow.tHDetailEx.holderAmount * ExchangeValue
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
// 选择联系信息
|
|
// 选择联系信息
|
|
|
const contactChange = (item: Model.UserReceiveInfoRsp) => {
|
|
const contactChange = (item: Model.UserReceiveInfoRsp) => {
|
|
|
const contact = `${item.receivername} ${item.phonenum}`
|
|
const contact = `${item.receivername} ${item.phonenum}`
|
|
@@ -155,6 +177,11 @@ const closed = (isRefresh = false) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ // 可用数量
|
|
|
|
|
+ formData.DeliveryLot = enableqty.value
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
// 暴露组件属性给父组件调用
|
|
// 暴露组件属性给父组件调用
|
|
|
defineExpose({
|
|
defineExpose({
|
|
|
closed,
|
|
closed,
|