|
|
@@ -10,8 +10,7 @@
|
|
|
:optionProps="{ label: 'enumdicname', value: 'enumitemname' }" />
|
|
|
<Field v-model="formData.PresaleApplyID" name="loginpwd" label="交割月份" :rules="formRules.PresaleApplyID">
|
|
|
<template #input>
|
|
|
- <app-select placeholder="开始月份" :options="months"
|
|
|
- :optionProps="{ label: 'endmonth', value: 'endmonth' }" :is-link="false" />
|
|
|
+ <app-select v-model="selectedMonth" placeholder="开始月份" :options="months" :is-link="false" />
|
|
|
<app-select placeholder="结束日期" :options="months"
|
|
|
:optionProps="{ label: 'enddate', value: 'presaleapplyid' }" :is-link="false" />
|
|
|
</template>
|
|
|
@@ -38,6 +37,7 @@ import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
const { getQueryStringToNumber } = useNavigation()
|
|
|
const wrstandardid = getQueryStringToNumber('wrstandardid')
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
+const selectedMonth = shallowRef('') // 当前选中的交割月份
|
|
|
|
|
|
const { details, getWrstandardDetails } = useWrstandardDetails(wrstandardid)
|
|
|
const { formData, formSubmit } = usePurchaseOrderDesting()
|
|
|
@@ -54,7 +54,19 @@ const formRules: { [key in keyof Proto.SpotPresaleDestingOrderReq]?: FieldRule[]
|
|
|
|
|
|
// 交割月份
|
|
|
const months = computed(() => {
|
|
|
- return details.value?.deliverymonth ?? []
|
|
|
+ const deliveryMonths = details.value?.deliverymonth ?? []
|
|
|
+ const monthMap = new Map<string, { label: string, value: string; }>()
|
|
|
+
|
|
|
+ deliveryMonths.forEach(({ endmonth }) => {
|
|
|
+ if (!monthMap.has(endmonth)) {
|
|
|
+ monthMap.set(endmonth, {
|
|
|
+ label: endmonth,
|
|
|
+ value: endmonth,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ return [...monthMap.values()]
|
|
|
})
|
|
|
|
|
|
const onSubmit = () => {
|