|
|
@@ -21,11 +21,11 @@
|
|
|
:options="presaleApplyDeposits" v-if="presaleApplyId" />
|
|
|
<Field v-model="formData.Qty" name="Qty" type="digit" label="采购数量" placeholder="必填"
|
|
|
:rules="formRules.Qty" />
|
|
|
- <Field label="收货信息" placeholder="请输入" @click="openComponent('address')" is-link />
|
|
|
+ <Field label="收货信息" placeholder="请输入" @click="openComponent('address')" is-link v-if="showAddress" />
|
|
|
</CellGroup>
|
|
|
</Form>
|
|
|
<Button type="primary" @click="formRef?.submit" round block>采购下单</Button>
|
|
|
- <component :is="componentMap.get(componentId)" @closed="closeComponent" v-if="componentId" />
|
|
|
+ <component ref="componentRef" :is="componentMap.get(componentId)" @closed="closeComponent" v-if="componentId" />
|
|
|
</app-view>
|
|
|
</template>
|
|
|
|
|
|
@@ -44,7 +44,7 @@ const componentMap = new Map<string, unknown>([
|
|
|
['address', defineAsyncComponent(() => import('./components/address/index.vue'))],
|
|
|
])
|
|
|
|
|
|
-const { componentId, openComponent, closeComponent, closeEach } = useComponent()
|
|
|
+const { componentRef, componentId, openComponent, closeComponent, closeComponentEach } = useComponent()
|
|
|
const { getQueryStringToNumber, beforeRouteLeave } = useNavigation()
|
|
|
|
|
|
const wrstandardid = getQueryStringToNumber('wrstandardid')
|
|
|
@@ -63,6 +63,11 @@ const formRules: { [key in keyof Proto.SpotPresaleDestingOrderReq]?: FieldRule[]
|
|
|
}],
|
|
|
}
|
|
|
|
|
|
+// 是否显示收货信息
|
|
|
+const showAddress = computed(() => {
|
|
|
+ return formData.THJDeliveryMode === 2 || formData.THJDeliveryMode === 3
|
|
|
+})
|
|
|
+
|
|
|
// 交割月份列表
|
|
|
const deliveryMonths = computed(() => {
|
|
|
const months = details.value.deliverymonth ?? []
|
|
|
@@ -116,7 +121,7 @@ const onSubmit = () => {
|
|
|
}
|
|
|
|
|
|
getWrstandardDetails()
|
|
|
-beforeRouteLeave(() => closeEach())
|
|
|
+beforeRouteLeave(() => closeComponentEach())
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|