|
@@ -7,12 +7,12 @@
|
|
|
</template>
|
|
</template>
|
|
|
<Form ref="formRef" class="g-form__container" @submit="onSubmit">
|
|
<Form ref="formRef" class="g-form__container" @submit="onSubmit">
|
|
|
<CellGroup inset>
|
|
<CellGroup inset>
|
|
|
- <Cell title="可用重量" :value="formatDecimal(enableqty) + getGoodsUnitName(selectedRow.goodsUnitID)" />
|
|
|
|
|
|
|
+ <Cell title="可用重量" :value="enableqty + getGoodsUnitName(selectedRow.goodsUnitID)" />
|
|
|
<Field name="OrderQty" label="转让重量" :rules="formRules.OrderQty">
|
|
<Field name="OrderQty" label="转让重量" :rules="formRules.OrderQty">
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<div class="g-qty-group">
|
|
<div class="g-qty-group">
|
|
|
<div class="g-qty-group__stepper">
|
|
<div class="g-qty-group__stepper">
|
|
|
- <Stepper v-model="orderQty" :min="0" :step="qtyStep" integer />
|
|
|
|
|
|
|
+ <Stepper v-model="orderQty" :min="0" :max="enableqty" :step="qtyStep" integer />
|
|
|
<span>{{ getGoodsUnitName(selectedRow.goodsUnitID) }}</span>
|
|
<span>{{ getGoodsUnitName(selectedRow.goodsUnitID) }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<RadioGroup v-model="qtyStep" direction="horizontal" @change="onRadioChange">
|
|
<RadioGroup v-model="qtyStep" direction="horizontal" @change="onRadioChange">
|
|
@@ -38,7 +38,6 @@
|
|
|
import { shallowRef, PropType, onMounted, onUnmounted, computed } from 'vue'
|
|
import { shallowRef, PropType, onMounted, onUnmounted, computed } from 'vue'
|
|
|
import { CellGroup, Cell, Button, Stepper, Field, Form, FormInstance, FieldRule, RadioGroup, Radio } from 'vant'
|
|
import { CellGroup, Cell, Button, Stepper, Field, Form, FormInstance, FieldRule, RadioGroup, Radio } from 'vant'
|
|
|
import { fullloading } from '@/utils/vant'
|
|
import { fullloading } from '@/utils/vant'
|
|
|
-import { formatDecimal } from '@/filters'
|
|
|
|
|
import AppModal from '@/components/base/modal/index.vue'
|
|
import AppModal from '@/components/base/modal/index.vue'
|
|
|
import { getGoodsUnitName } from '@/constants/unit'
|
|
import { getGoodsUnitName } from '@/constants/unit'
|
|
|
import { useOrder } from '@/business/trade'
|
|
import { useOrder } from '@/business/trade'
|
|
@@ -78,7 +77,7 @@ const qtyStepList = computed(() => {
|
|
|
// 可用重量
|
|
// 可用重量
|
|
|
const enableqty = computed(() => {
|
|
const enableqty = computed(() => {
|
|
|
const { tHDetailEx, agreeUnit } = props.selectedRow
|
|
const { tHDetailEx, agreeUnit } = props.selectedRow
|
|
|
- return (tHDetailEx.holderPrice - tHDetailEx.freezeQty) * agreeUnit
|
|
|
|
|
|
|
+ return (tHDetailEx.holderQty - tHDetailEx.freezeQty) * agreeUnit
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
@@ -136,7 +135,7 @@ const closed = (isRefresh = false) => {
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
subscribe.start(props.selectedRow.goodsCode)
|
|
subscribe.start(props.selectedRow.goodsCode)
|
|
|
qtyStep.value = qtyStepList.value[0]
|
|
qtyStep.value = qtyStepList.value[0]
|
|
|
- orderQty.value = (props.selectedRow.tHDetailEx.holderQty - props.selectedRow.tHDetailEx.freezeQty) * props.selectedRow.agreeUnit
|
|
|
|
|
|
|
+ orderQty.value = enableqty.value
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
onUnmounted(() => subscribe.stop())
|
|
onUnmounted(() => subscribe.stop())
|