预约车地址增加
This commit is contained in:
parent
33b004bbe3
commit
951969a184
|
|
@ -82,6 +82,6 @@ declare global {
|
||||||
// for type re-export
|
// for type re-export
|
||||||
declare global {
|
declare global {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
|
export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
|
||||||
import('vue')
|
import('vue')
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,16 @@ declare module 'vue' {
|
||||||
ElCascader: typeof import('element-plus/es')['ElCascader']
|
ElCascader: typeof import('element-plus/es')['ElCascader']
|
||||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||||
ElCol: typeof import('element-plus/es')['ElCol']
|
ElCol: typeof import('element-plus/es')['ElCol']
|
||||||
|
ElCollapse: typeof import('element-plus/es')['ElCollapse']
|
||||||
|
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
|
||||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||||
|
ElCountdown: typeof import('element-plus/es')['ElCountdown']
|
||||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||||
|
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
||||||
ElForm: typeof import('element-plus/es')['ElForm']
|
ElForm: typeof import('element-plus/es')['ElForm']
|
||||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||||
|
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||||
ElImage: typeof import('element-plus/es')['ElImage']
|
ElImage: typeof import('element-plus/es')['ElImage']
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
ElInput: typeof import('element-plus/es')['ElInput']
|
||||||
|
|
@ -29,13 +34,17 @@ declare module 'vue' {
|
||||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
ElOption: typeof import('element-plus/es')['ElOption']
|
||||||
|
ElPageHeader: typeof import('element-plus/es')['ElPageHeader']
|
||||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||||
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
||||||
ElProgress: typeof import('element-plus/es')['ElProgress']
|
ElProgress: typeof import('element-plus/es')['ElProgress']
|
||||||
|
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
||||||
|
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||||
ElRow: typeof import('element-plus/es')['ElRow']
|
ElRow: typeof import('element-plus/es')['ElRow']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||||
ElStep: typeof import('element-plus/es')['ElStep']
|
ElStep: typeof import('element-plus/es')['ElStep']
|
||||||
ElSteps: typeof import('element-plus/es')['ElSteps']
|
ElSteps: typeof import('element-plus/es')['ElSteps']
|
||||||
|
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||||
ElTable: typeof import('element-plus/es')['ElTable']
|
ElTable: typeof import('element-plus/es')['ElTable']
|
||||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||||
ElTag: typeof import('element-plus/es')['ElTag']
|
ElTag: typeof import('element-plus/es')['ElTag']
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ VITE_API_URL = '/proxyApi'
|
||||||
# VITE_proxyTarget = 'http://192.168.2.246:28080' # 马帅
|
# VITE_proxyTarget = 'http://192.168.2.246:28080' # 马帅
|
||||||
# VITE_proxyTarget = 'http://192.168.2.127:28080' # 梁超
|
# VITE_proxyTarget = 'http://192.168.2.127:28080' # 梁超
|
||||||
# VITE_proxyTarget = 'http://36.33.26.201:17788/proxyApi' # 测试服务
|
# VITE_proxyTarget = 'http://36.33.26.201:17788/proxyApi' # 测试服务
|
||||||
# VITE_proxyTarget = 'http://192.168.0.244:28580' # 测试服务
|
VITE_proxyTarget = 'http://192.168.0.244:28580' # 测试服务
|
||||||
VITE_proxyTarget = 'http://192.168.2.72:28080' # 盛旭
|
# VITE_proxyTarget = 'http://192.168.2.72:28080' # 盛旭
|
||||||
|
|
||||||
# VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)
|
# VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)
|
||||||
# VITE_proxyTarget = 'http://10.40.92.16:9502' # 牛 (个人中心 基础信息企业申请认证)
|
# VITE_proxyTarget = 'http://10.40.92.16:9502' # 牛 (个人中心 基础信息企业申请认证)
|
||||||
|
|
|
||||||
2030
pnpm-lock.yaml
2030
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
|
@ -173,6 +173,41 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="protocol-handle" v-if="cardList.length > 0">
|
<div class="protocol-handle" v-if="cardList.length > 0">
|
||||||
|
<el-row style="margin: 15px 0">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-collapse v-model="activeNames">
|
||||||
|
<el-collapse-item :title="addressTitle" name="1">
|
||||||
|
<template v-if="addressList.length > 0">
|
||||||
|
<div
|
||||||
|
:key="index"
|
||||||
|
class="address-item"
|
||||||
|
@click="onSelectAddress(item.addressName)"
|
||||||
|
v-for="(item, index) in addressList"
|
||||||
|
>
|
||||||
|
{{ item.addressName }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-else>
|
||||||
|
<div style="width: 100%; text-align: center; font-size: 14px">
|
||||||
|
当前没有收货地址...
|
||||||
|
<a
|
||||||
|
style="
|
||||||
|
color: #00a288;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-left: 5px;
|
||||||
|
text-decoration: underline;
|
||||||
|
"
|
||||||
|
@click="onAddAddress"
|
||||||
|
>
|
||||||
|
点击新增
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-collapse-item>
|
||||||
|
</el-collapse>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<el-row style="display: flex; align-items: center">
|
<el-row style="display: flex; align-items: center">
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<div class="checkbox-container">
|
<div class="checkbox-container">
|
||||||
|
|
@ -228,15 +263,15 @@
|
||||||
<!-- <div style="display: flex; justify-content: center"> -->
|
<!-- <div style="display: flex; justify-content: center"> -->
|
||||||
<!-- <img src="@/assets/img/zuLin.png" style="width: 100%; height: 600px" /> -->
|
<!-- <img src="@/assets/img/zuLin.png" style="width: 100%; height: 600px" /> -->
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
<div style="display: flex; justify-content: flex-end;margin-bottom: 10px;">
|
<div style="display: flex; justify-content: flex-end; margin-bottom: 10px">
|
||||||
<span class="dialog-footer" >
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="dialogFormVisibleSettleWord = false"
|
<el-button type="primary" @click="dialogFormVisibleSettleWord = false"
|
||||||
>关 闭</el-button
|
>关 闭</el-button
|
||||||
>
|
>
|
||||||
<el-button @click="submitBtn" type="success"> 下载 </el-button>
|
<el-button @click="submitBtn" type="success"> 下载 </el-button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div id ="mmm" style="height:600px;"></div>
|
<div id="mmm" style="height: 600px"></div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -250,18 +285,24 @@ import {
|
||||||
submitBookCarApi,
|
submitBookCarApi,
|
||||||
deleteCartByIdApi,
|
deleteCartByIdApi,
|
||||||
} from '../../http/api/cart/index'
|
} from '../../http/api/cart/index'
|
||||||
|
|
||||||
|
import { getAddressListApi } from 'http/api/address-manage/index'
|
||||||
import moment, { max } from 'moment'
|
import moment, { max } from 'moment'
|
||||||
import { InfoFilled } from '@element-plus/icons-vue'
|
import { InfoFilled } from '@element-plus/icons-vue'
|
||||||
import CustomDatePickerButton from './components/date-picker-button.vue'
|
import CustomDatePickerButton from './components/date-picker-button.vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import { useStore } from '../../store/user'
|
import { useStore } from '../../store/user'
|
||||||
import jsPreviewDocx from "@js-preview/docx";
|
import jsPreviewDocx from '@js-preview/docx'
|
||||||
import "@js-preview/docx/lib/index.css";
|
import '@js-preview/docx/lib/index.css'
|
||||||
const userStore = useStore()
|
const userStore = useStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const protocolChecked = ref<boolean>(false)
|
const protocolChecked = ref<boolean>(false)
|
||||||
const allKey = ref(0)
|
const allKey = ref(0)
|
||||||
const cardList = ref<any>([])
|
const cardList = ref<any>([])
|
||||||
|
|
||||||
|
const addressTitle = ref('请选择收货地址')
|
||||||
|
const activeNames = ref('')
|
||||||
|
const addressList = ref<any>([])
|
||||||
const getBookCarDetailsData = async () => {
|
const getBookCarDetailsData = async () => {
|
||||||
const res: any = await getBookCarDetailsApi()
|
const res: any = await getBookCarDetailsApi()
|
||||||
|
|
||||||
|
|
@ -437,6 +478,15 @@ const onCartSubmit = async () => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (addressTitle.value === '请选择收货地址') {
|
||||||
|
ElMessage({
|
||||||
|
showClose: false,
|
||||||
|
message: '请选择收货地址',
|
||||||
|
type: 'error',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
let isDays = false
|
let isDays = false
|
||||||
try {
|
try {
|
||||||
amountDeviceList.value.forEach((e: any) => {
|
amountDeviceList.value.forEach((e: any) => {
|
||||||
|
|
@ -488,6 +538,7 @@ const onCartSubmit = async () => {
|
||||||
paramsList[index] = {
|
paramsList[index] = {
|
||||||
cost: 0,
|
cost: 0,
|
||||||
detailsList: itemsArray,
|
detailsList: itemsArray,
|
||||||
|
address: addressTitle.value.split(':')[1],
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -522,33 +573,58 @@ const onCartSubmit = async () => {
|
||||||
// console.log(res, '预约车提交结果')
|
// console.log(res, '预约车提交结果')
|
||||||
}
|
}
|
||||||
|
|
||||||
const wordUrl = ref("")
|
const wordUrl = ref('')
|
||||||
const settleWordTitle = ref('')
|
const settleWordTitle = ref('')
|
||||||
const dialogFormVisibleSettleWord: any = ref(false)
|
const dialogFormVisibleSettleWord: any = ref(false)
|
||||||
//租赁服务合同
|
//租赁服务合同
|
||||||
const handleViewWord = async() => {
|
const handleViewWord = async () => {
|
||||||
settleWordTitle.value = '租赁服务合同'
|
settleWordTitle.value = '租赁服务合同'
|
||||||
// const orderId = row.orderId
|
// const orderId = row.orderId
|
||||||
// const res: any = await getContractDetailApi({ orderId })
|
// const res: any = await getContractDetailApi({ orderId })
|
||||||
// 打开租赁服务合同弹框
|
// 打开租赁服务合同弹框
|
||||||
wordUrl.value = "http://127.0.0.1:29300/statics/2024/12/16/test_20241216154423A003.docx"
|
wordUrl.value = 'http://127.0.0.1:29300/statics/2024/12/16/test_20241216154423A003.docx'
|
||||||
dialogFormVisibleSettleWord.value = true
|
dialogFormVisibleSettleWord.value = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const myDocxPreviewer = jsPreviewDocx.init(document.getElementById("mmm"));
|
const myDocxPreviewer = jsPreviewDocx.init(document.getElementById('mmm'))
|
||||||
//传递要预览的文件地址即可
|
//传递要预览的文件地址即可
|
||||||
myDocxPreviewer
|
myDocxPreviewer
|
||||||
.preview(
|
.preview(wordUrl.value)
|
||||||
wordUrl.value
|
|
||||||
)
|
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("预览完成");
|
console.log('预览完成')
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.log('1111', wordUrl.value)
|
console.log('1111', wordUrl.value)
|
||||||
console.log("预览失败", e);
|
console.log('预览失败', e)
|
||||||
});
|
})
|
||||||
}, 1000);
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取收货地址
|
||||||
|
const getReceiptGoodsAddress = async () => {
|
||||||
|
const res: any = await getAddressListApi({})
|
||||||
|
addressList.value = res.rows.map((e: any) => {
|
||||||
|
return {
|
||||||
|
addressName: `${e.provinceName}${e.cityName}${e.areaName}${e.address}`,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 去往地址管理
|
||||||
|
const onAddAddress = () => {
|
||||||
|
userStore.editcurrentMenuItem('address-manage')
|
||||||
|
setTimeout(() => {
|
||||||
|
router.push({
|
||||||
|
name: 'my-user',
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
// 选择收货地址
|
||||||
|
const onSelectAddress = (address: any) => {
|
||||||
|
addressTitle.value = '收货地址:' + address
|
||||||
|
activeNames.value = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
getReceiptGoodsAddress()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
@ -662,4 +738,13 @@ const handleViewWord = async() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.address-item {
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 6px 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.address-item:hover {
|
||||||
|
background-color: #c9e7e5;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue