预约车地址增加
This commit is contained in:
parent
33b004bbe3
commit
951969a184
|
|
@ -82,6 +82,6 @@ declare global {
|
|||
// for type re-export
|
||||
declare global {
|
||||
// @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')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,11 +17,16 @@ declare module 'vue' {
|
|||
ElCascader: typeof import('element-plus/es')['ElCascader']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
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']
|
||||
ElCountdown: typeof import('element-plus/es')['ElCountdown']
|
||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
ElImage: typeof import('element-plus/es')['ElImage']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
|
|
@ -29,13 +34,17 @@ declare module 'vue' {
|
|||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPageHeader: typeof import('element-plus/es')['ElPageHeader']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
||||
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']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
ElStep: typeof import('element-plus/es')['ElStep']
|
||||
ElSteps: typeof import('element-plus/es')['ElSteps']
|
||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
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.127:28080' # 梁超
|
||||
# VITE_proxyTarget = 'http://36.33.26.201:17788/proxyApi' # 测试服务
|
||||
# VITE_proxyTarget = 'http://192.168.0.244:28580' # 测试服务
|
||||
VITE_proxyTarget = 'http://192.168.2.72:28080' # 盛旭
|
||||
VITE_proxyTarget = 'http://192.168.0.244:28580' # 测试服务
|
||||
# VITE_proxyTarget = 'http://192.168.2.72:28080' # 盛旭
|
||||
|
||||
# VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)
|
||||
# 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 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-col :span="16">
|
||||
<div class="checkbox-container">
|
||||
|
|
@ -228,7 +263,7 @@
|
|||
<!-- <div style="display: flex; justify-content: center"> -->
|
||||
<!-- <img src="@/assets/img/zuLin.png" style="width: 100%; height: 600px" /> -->
|
||||
<!-- </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">
|
||||
<el-button type="primary" @click="dialogFormVisibleSettleWord = false"
|
||||
>关 闭</el-button
|
||||
|
|
@ -236,7 +271,7 @@
|
|||
<el-button @click="submitBtn" type="success"> 下载 </el-button>
|
||||
</span>
|
||||
</div>
|
||||
<div id ="mmm" style="height:600px;"></div>
|
||||
<div id="mmm" style="height: 600px"></div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
|
@ -250,18 +285,24 @@ import {
|
|||
submitBookCarApi,
|
||||
deleteCartByIdApi,
|
||||
} from '../../http/api/cart/index'
|
||||
|
||||
import { getAddressListApi } from 'http/api/address-manage/index'
|
||||
import moment, { max } from 'moment'
|
||||
import { InfoFilled } from '@element-plus/icons-vue'
|
||||
import CustomDatePickerButton from './components/date-picker-button.vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useStore } from '../../store/user'
|
||||
import jsPreviewDocx from "@js-preview/docx";
|
||||
import "@js-preview/docx/lib/index.css";
|
||||
import jsPreviewDocx from '@js-preview/docx'
|
||||
import '@js-preview/docx/lib/index.css'
|
||||
const userStore = useStore()
|
||||
const router = useRouter()
|
||||
const protocolChecked = ref<boolean>(false)
|
||||
const allKey = ref(0)
|
||||
const cardList = ref<any>([])
|
||||
|
||||
const addressTitle = ref('请选择收货地址')
|
||||
const activeNames = ref('')
|
||||
const addressList = ref<any>([])
|
||||
const getBookCarDetailsData = async () => {
|
||||
const res: any = await getBookCarDetailsApi()
|
||||
|
||||
|
|
@ -437,6 +478,15 @@ const onCartSubmit = async () => {
|
|||
return
|
||||
}
|
||||
|
||||
if (addressTitle.value === '请选择收货地址') {
|
||||
ElMessage({
|
||||
showClose: false,
|
||||
message: '请选择收货地址',
|
||||
type: 'error',
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
let isDays = false
|
||||
try {
|
||||
amountDeviceList.value.forEach((e: any) => {
|
||||
|
|
@ -488,6 +538,7 @@ const onCartSubmit = async () => {
|
|||
paramsList[index] = {
|
||||
cost: 0,
|
||||
detailsList: itemsArray,
|
||||
address: addressTitle.value.split(':')[1],
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -522,7 +573,7 @@ const onCartSubmit = async () => {
|
|||
// console.log(res, '预约车提交结果')
|
||||
}
|
||||
|
||||
const wordUrl = ref("")
|
||||
const wordUrl = ref('')
|
||||
const settleWordTitle = ref('')
|
||||
const dialogFormVisibleSettleWord: any = ref(false)
|
||||
//租赁服务合同
|
||||
|
|
@ -531,24 +582,49 @@ const handleViewWord = async() => {
|
|||
// const orderId = row.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
|
||||
setTimeout(() => {
|
||||
const myDocxPreviewer = jsPreviewDocx.init(document.getElementById("mmm"));
|
||||
const myDocxPreviewer = jsPreviewDocx.init(document.getElementById('mmm'))
|
||||
//传递要预览的文件地址即可
|
||||
myDocxPreviewer
|
||||
.preview(
|
||||
wordUrl.value
|
||||
)
|
||||
.preview(wordUrl.value)
|
||||
.then((res) => {
|
||||
console.log("预览完成");
|
||||
console.log('预览完成')
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log('1111', wordUrl.value)
|
||||
console.log("预览失败", e);
|
||||
});
|
||||
}, 1000);
|
||||
console.log('预览失败', e)
|
||||
})
|
||||
}, 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>
|
||||
|
||||
<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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue