|
@@ -44,22 +44,13 @@
|
|
|
<el-form-item class="el-form-item--row" prop="DeliveryInfo" label="收货地址">
|
|
<el-form-item class="el-form-item--row" prop="DeliveryInfo" label="收货地址">
|
|
|
<div class="el-form-item--col">
|
|
<div class="el-form-item--col">
|
|
|
<el-input type="textarea" placeholder="请输入收货地址" :rows="3" v-model="formData.DeliveryInfo" />
|
|
<el-input type="textarea" placeholder="请输入收货地址" :rows="3" v-model="formData.DeliveryInfo" />
|
|
|
- <el-dropdown trigger="click" v-if="addressList.length">
|
|
|
|
|
- <el-icon :size="20" style="cursor: pointer;">
|
|
|
|
|
- <CirclePlusFilled />
|
|
|
|
|
- </el-icon>
|
|
|
|
|
- <template #dropdown>
|
|
|
|
|
- <el-dropdown-menu>
|
|
|
|
|
- <el-dropdown-item v-for="(item, index) in addressList" :key="index"
|
|
|
|
|
- @click="onAddressChange(item)">
|
|
|
|
|
- {{ [item.provincename, item.cityname, item.districtname, item.address].join(' ') }}
|
|
|
|
|
- </el-dropdown-item>
|
|
|
|
|
- </el-dropdown-menu>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-dropdown>
|
|
|
|
|
|
|
+ <el-icon :size="20" style="cursor: pointer;" @click="showAddress = true">
|
|
|
|
|
+ <CirclePlusFilled />
|
|
|
|
|
+ </el-icon>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
+ <app-address v-model:show="showAddress" @change="onAddressChange" />
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<el-button type="info" @click="onCancel(false)">取消</el-button>
|
|
<el-button type="info" @click="onCancel(false)">取消</el-button>
|
|
|
<el-button type="primary" @click="onSubmit">交收</el-button>
|
|
<el-button type="primary" @click="onSubmit">交收</el-button>
|
|
@@ -70,12 +61,11 @@
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import { ref, PropType } from 'vue'
|
|
import { ref, PropType } from 'vue'
|
|
|
import { ElMessage, FormInstance, FormRules } from 'element-plus'
|
|
import { ElMessage, FormInstance, FormRules } from 'element-plus'
|
|
|
-import { useRequest } from '@/hooks/request'
|
|
|
|
|
import { useOfflineDelivery } from '@/business/trade'
|
|
import { useOfflineDelivery } from '@/business/trade'
|
|
|
-import { queryUserReceiveInfo } from '@/services/api/user'
|
|
|
|
|
import { getBuyOrSellName } from '@/constants/order'
|
|
import { getBuyOrSellName } from '@/constants/order'
|
|
|
import { formatDecimal } from '@/filters'
|
|
import { formatDecimal } from '@/filters'
|
|
|
import AppDrawer from '@pc/components/base/drawer/index.vue'
|
|
import AppDrawer from '@pc/components/base/drawer/index.vue'
|
|
|
|
|
+import AppAddress from '@pc/components/modules/address/index.vue'
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
selectedRow: {
|
|
selectedRow: {
|
|
@@ -90,10 +80,9 @@ const props = defineProps({
|
|
|
const { formSubmit, formData, loading } = useOfflineDelivery()
|
|
const { formSubmit, formData, loading } = useOfflineDelivery()
|
|
|
const show = ref(true)
|
|
const show = ref(true)
|
|
|
const refresh = ref(false)
|
|
const refresh = ref(false)
|
|
|
|
|
+const showAddress = ref(false)
|
|
|
const formRef = ref<FormInstance>()
|
|
const formRef = ref<FormInstance>()
|
|
|
|
|
|
|
|
-const { dataList: addressList } = useRequest(queryUserReceiveInfo)
|
|
|
|
|
-
|
|
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
|
const formRules: FormRules = {
|
|
const formRules: FormRules = {
|
|
|
DeliveryLot: [{
|
|
DeliveryLot: [{
|