|
|
@@ -18,12 +18,14 @@
|
|
|
</template>
|
|
|
</Field>
|
|
|
<app-select v-model="formData.DepositID" name="DepositID" label="支付方式" :rules="formRules.DepositID"
|
|
|
- :options="presaleApplyDeposits" />
|
|
|
+ :options="presaleApplyDeposits" v-if="presaleApplyId" />
|
|
|
<Field v-model="formData.Qty" name="Qty" type="digit" label="采购数量" placeholder="必填"
|
|
|
:rules="formRules.Qty" />
|
|
|
+ <Field label="收货信息" placeholder="请输入" @click="showAddress = true" is-link />
|
|
|
</CellGroup>
|
|
|
</Form>
|
|
|
<Button type="primary" @click="formRef?.submit" round block>采购下单</Button>
|
|
|
+ <app-address v-model:show="showAddress" />
|
|
|
</app-view>
|
|
|
</template>
|
|
|
|
|
|
@@ -35,11 +37,13 @@ import { useNavigation } from '@/hooks/navigation'
|
|
|
import { useWrstandardDetails } from '@/business/goods'
|
|
|
import { usePurchaseOrderDesting } from '@/business/trade'
|
|
|
import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
+import AppAddress from './components/address/index.vue'
|
|
|
import Long from 'long'
|
|
|
|
|
|
const { getQueryStringToNumber } = useNavigation()
|
|
|
const wrstandardid = getQueryStringToNumber('wrstandardid')
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
+const showAddress = shallowRef(false)
|
|
|
|
|
|
const { details, getWrstandardDetails } = useWrstandardDetails(wrstandardid)
|
|
|
const { formData, formSubmit } = usePurchaseOrderDesting()
|
|
|
@@ -77,9 +81,9 @@ const presaleApplyId = shallowRef('')
|
|
|
// 预售申请列表
|
|
|
const presaleApplyDeposits = computed(() => {
|
|
|
const deposits = details.value.presaleapplydeposits ?? []
|
|
|
- return deposits.map(({ depositrate, discountamount }) => ({
|
|
|
- label: `${depositrate},${discountamount}`,
|
|
|
- value: discountamount
|
|
|
+ return deposits.filter((e) => e.presaleapplyid === presaleApplyId.value).map(({ depositrate, presaleapplyid }) => ({
|
|
|
+ label: `${depositrate * 100}%`,
|
|
|
+ value: presaleapplyid
|
|
|
}))
|
|
|
})
|
|
|
|