Commit 3d2218ed authored by 罗超's avatar 罗超

Merge branch 'master' into router

parents 5695065b ffc35a3f
......@@ -161,6 +161,12 @@ page {
.text-info{
color:#b1b7cf;
}
.text-black{
color: black;
}
.text-red{
color: red;
}
.bg-white{
background-color: #FFF;
}
......@@ -489,9 +495,6 @@ page {
.q-pt-md{
padding-top: 12px;
}
.q-pb-md{
padding-bottom: 10px;
}
.q-ma-lg{
margin:20px
}
......@@ -598,9 +601,15 @@ page {
.fz12{
font-size: 12px;
}
.fz13{
font-size: 13px;
}
.fz14{
font-size: 14px;
}
.fz15{
font-size: 15px;
}
.fz16{
font-size: 16px;
}
......
......@@ -225,6 +225,7 @@
.CloudDisk-R-Img{
width: 12.85vw;
height: 12.85vw;
background: #f1f2f4;
margin-bottom: 9px;
border-radius: 8px;
overflow: hidden;
......
......@@ -73,7 +73,9 @@
<el-image class="row items-center" :src="item.FilePath" style="width: 100%; height: 100%;"
fit="cover">
<template #error>
<el-image :src="errImg"></el-image>
<div class="row items-center" style="height: 100%;">
<el-image :src="errImg"></el-image>
</div>
</template>
</el-image>
<!-- <el-image
......@@ -659,6 +661,7 @@ onBeforeUnmount(() => {
.CloudDisk-R-Img{
width: 80px;
height: 80px;
background: #f1f2f4;
margin-bottom: 9px;
border-radius: 8px;
overflow: hidden;
......
......@@ -8,7 +8,7 @@
<el-table-column type="selection" width="55"/>
<el-table-column label="基本信息" show-overflow-tooltip min-width="400">
<template #default="scope">
<div class="row items-center">
<div class="row items-center CloudDisk-R-Img">
<el-image
class="cursor-pointer row items-center"
style="width: 50px; height: auto"
......@@ -246,4 +246,7 @@
padding-left: 24px;
padding-bottom: 20px;
}
.CloudDisk-R-Img .el-image{
background: #f1f2f4;
}
</style>
\ No newline at end of file
......@@ -234,6 +234,7 @@
.CloudDisk-R-Img{
width: 12.85vw;
height: auto;
background: #f1f2f4;
margin-bottom: 9px;
border-radius: 8px;
box-shadow: 0px 0px 13px 0px #eee;
......
......@@ -182,7 +182,6 @@ const forwardUserCenter = ()=>{
}
const forward = (item:any,type:any)=>{
if(item.Url){
current.value = -1
if(item.Url.includes('http://')||item.Url.includes('https://')) openNewBlank(item.Url)
else router.push(item.Url)
}else{
......
......@@ -195,6 +195,7 @@ const handleScroll = (e) =>{
}
// 查看所有子模版
const getTemplate = async (item:any) => {
scrollContainer.value.scrollTop = 0
if(!item) return
if(item.PageImageList && item.PageImageList.length>0){
datas.currentImg = 0
......
......@@ -257,7 +257,7 @@ const routes: RouteRecordRaw[] = [
}
},
{
path: '/a/order',
path: '/a/order/:activeName?',
component: () => import('@/views/TeamCenter/Order.vue'),
meta:{
title:'我的订单/发票'
......@@ -278,7 +278,7 @@ const routes: RouteRecordRaw[] = [
}
},
{
path: '/a/order/:id',
path: '/a/orderDetail/:id/:isFirm/:activeName',
component: () => import('@/views/TeamCenter/OrderDetail.vue'),
meta:{
title:'订单详情'
......@@ -308,14 +308,14 @@ const routes: RouteRecordRaw[] = [
}
},
{
path: '/u/order',
path: '/u/order/:activeName?',
component: () => import('@/views/UserCenter/Order.vue'),
meta:{
title:'我的订单/发票'
}
},
{
path: '/u/order/:id',
path: '/u/orderDetail/:id/:activeName',
component: () => import('@/views/UserCenter/OrderDetail.vue'),
meta:{
title:'订单详情'
......
......@@ -89,6 +89,21 @@ class ConfigService{
return Api.Post("triptemplate_RemoveTripOther",params)
}
/**
* 销售行程获取缓存数据
*/
static async GetTripOtherMongo(Id: any):Promise<HttpResponse>{
let params = {Id}
return Api.Post("triptemplate_GetTripOtherMongo",params)
}
/**
* 销售行程定时更新数据
*/
static async SetTripOtherTemp(params : any):Promise<HttpResponse>{
return Api.Post("triptemplate_SetTripOtherTemp",params)
}
/**
* 销售新增编辑模版
*/
......
import { array } from '@amcharts/amcharts4/core';
import Api,{ HttpResponse, Result } from './../utils/request';
class MatchingData{
static async ScenicSearch(params:any):Promise<HttpResponse>{
return Api.Post("mongoscenic_ScenicSearch",params)
}
}
export default MatchingData;
\ No newline at end of file
......@@ -3,6 +3,22 @@ import Api,{ HttpResponse, Result } from './../utils/request';
class OrderService{
static async GetUserDutyParagraph():Promise<HttpResponse>{
return Api.Post("ppt_GetUserDutyParagraph",{})
}
static async GetPPTUserInvoicePage(pageIndex:number,pageSize:number):Promise<HttpResponse>{
let msg = {
pageIndex,
pageSize
}
return Api.Post("ppt_GetPPTUserInvoicePage",msg)
}
static async SetPPTUserInvoice(params:any):Promise<HttpResponse>{
return Api.Post("ppt_SetPPTUserInvoice",params)
}
static async CreatePPTPayOrder(orderid:Number):Promise<HttpResponse>{
let msg = {orderid}
return Api.Post("ppt_CreatePPTPayOrder",msg)
......
export const enum ToolbarStates {
SYMBOL = 'symbol',
EL_ANIMATION = 'elAnimation',
EL_NORMALDATA = 'normalData',
EDIT_DATAS = 'editDatas',
EL_TEMPLATEDATA = 'elTemplateData',
EL_STYLE = 'elStyle',
......
......@@ -35,7 +35,6 @@ export default (
})
newActiveIdList = [...newActiveIdList, ...groupMembersId]
}
mainStore.setActiveElementIdList(uniq(newActiveIdList))
mainStore.setHandleElementId(element.id)
}
......
......@@ -142,7 +142,7 @@
<script lang="ts" setup>
import { ArrowDown } from '@element-plus/icons-vue'
import { nextTick, ref, reactive, inject, computed, watch, provide } from 'vue'
import { nextTick, ref, reactive, inject, computed, watch, provide, onBeforeUnmount } from 'vue'
import { storeToRefs } from 'pinia'
import { toPng, toJpeg } from 'html-to-image'
import message from '@/utils/message'
......@@ -180,6 +180,7 @@ import { useRouter } from "vue-router";
import { managerTemplateLink, openNewBlank } from '@/utils/common'
const mainStore = useMainStore()
const { handleElement, handleElementId } = storeToRefs(mainStore)
const slidesStore = useSlidesStore()
const layoutsStore = useSlidesStore()
const { title, slides, slideIndex, viewportRatio } = storeToRefs(slidesStore)
......@@ -224,45 +225,80 @@ const journeyAdsDetails = ref<Object>()
const psdVisibleStatus = ref(false)
const { market, model, ConfigId, CoverImg, dataLoading, TempId, TempType, SourceLoading } = storeToRefs(useScreenStore())
const routers = useRouter();
if(queryObj.value.Title) titleValue.value = queryObj.value.Title
const MonitoringNumber = ref(0)
const MonitoringTNumber = ref(0)
const timer = 60
const Countdown = ref<any>(timer)
const intervalId = ref(null);
const showTimer = ref(false);
const goType = ref(null)
// 返回到首页 type 1 模版列表页 0 销售在线模版页
const goBack = (type:any) =>{
mainBackVisible.value = false
ElMessageBox.confirm(
'退出此页面将清空当前数据,请谨慎操作?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
).then(() => {
setNewDatas(type,0)
mainStore.setToolbarState(ToolbarStates.SLIDE_DESIGN)
let path ='/'
const t = useSlidesStore().viewportRatio<0?1:2
searchData.value.SalesEditor = null
if(model.value==0) {
path = `/market/op/${ConfigId.value}/${TempType.value}`
router.push({path})
}else if(model.value==2){
if(type==1) {
searchData.value.SalesEditor = router.currentRoute.value.params
if(searchData.value.sellId)searchData.value.TempId2 = queryObj.value.TempId
marketStore.setMarket(true)
SalesBackStore.setSalesBack(1)
searchData.value.TempId = 0
if(searchData.value.sellId) path = `/market/create/${queryObj.value.TemplateType==1?'trip':'ad'}${searchData.value.currentMenu>=0?'/'+searchData.value.currentMenu:''}`
else path = `/market/create`
goType.value = type
if(model.value==2){
ElMessageBox.confirm(
'退出此页面将清空当前数据,是否保存当前数据,并退出?',
'提示',
{
confirmButtonText: '保存',
cancelButtonText: '退出',
type: 'warning',
}
else if(searchData.value.currentMenu>=0) {
path = `/space/${searchData.value.currentMenu}`
searchData.value.currentMenu = null
}else path = `/space`
router.push({path})
).then(() => {
if(searchData.value.sellId) {
clearInterval(intervalId.value);
intervalId.value = null;
}
setTemplate(0,1)
}).catch(() => {
SaveStroke(type)
})
}else{
ElMessageBox.confirm(
'退出此页面将清空当前数据,请谨慎操作?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
).then(() => {
setNewDatas(type,0)
mainStore.setToolbarState(ToolbarStates.SLIDE_DESIGN)
let path ='/'
const t = useSlidesStore().viewportRatio<0?1:2
searchData.value.SalesEditor = null
if(model.value==0) {
path = `/market/op/${ConfigId.value}/${TempType.value}`
router.push({path})
}else window.history.back()
}).catch(() => {})
}
else window.history.back()
}).catch(() => {})
}
const SaveStroke = (type:any) => {
let path = ''
if(type==1) {
searchData.value.SalesEditor = router.currentRoute.value.params
if(searchData.value.sellId)searchData.value.TempId2 = queryObj.value.TempId
marketStore.setMarket(true)
SalesBackStore.setSalesBack(1)
searchData.value.TempId = 0
if(searchData.value.sellId) path = `/market/create/${queryObj.value.TemplateType==1?'trip':'ad'}${searchData.value.currentMenu>=0?'/'+searchData.value.currentMenu:''}`
else path = `/market/create`
}
else if(searchData.value.currentMenu>=0) {
path = `/space/${searchData.value.currentMenu}`
searchData.value.currentMenu = null
}else path = `/space`
router.push({path})
}
// 返回是否清空数据
const setNewDatas = (type,i) => {
......@@ -283,8 +319,40 @@ const UploadPsdHandler = () => {
psdVisibleStatus.value = true
}
// 倒计时更新数据
const benginTimer = () => {
showTimer.value = true;
intervalId.value = setInterval(() => {
if (Countdown.value === 0&&showTimer.value) {
clearInterval(intervalId.value);
intervalId.value = null;
showTimer.value = false
return UpdateItinerary()
} else if(Countdown.value>0) {
Countdown.value--;
}
}, 1000);
}
const UpdateItinerary = async () => {
if(datas.loading) return
queryObj.value.TempData = JSON.stringify(slides.value)
datas.loading = true
let queryMsg = {
Id: searchData.value.sellId,
Title: queryObj.value.Title,
TempId: queryObj.value.TempId,
TempData: queryObj.value.TempData,
}
const result = await ConfigService.SetTripOtherTemp(queryMsg);
if (result.data.resultCode == 1) {
console.log('更新行程数据成功-----')
}
datas.loading = false
}
// 销售新增修改行程、广告
const SetSellTemplate = async (type:Number,FolderId:Number) => {
const SetSellTemplate = async (type:Number,FolderId:Number,sellType:any) => {
if(FolderId>=0) datas.loading = true
try {
let TempId = 0
......@@ -327,7 +395,7 @@ const SetSellTemplate = async (type:Number,FolderId:Number) => {
SalesEditorStore.setSalesEditor(0)
},100)
if(autoSave.value==1)autoSave.value=2
if(type == 0 && Id==0){
if(type == 0 && Id==0 && !sellType){
let FileId = searchData.value.sellId=TemplateRes.data.data.Id
let FileType = TemplateRes.data.data.FileType?TemplateRes.data.data.FileType:0
//@TODO:返回字段中缺少CreateBy,
......@@ -336,6 +404,8 @@ const SetSellTemplate = async (type:Number,FolderId:Number) => {
path:url
})
}
// 保存并退出当前页
if(sellType) SaveStroke(goType.value)
}else{
ElMessage({
showClose: true,
......@@ -485,8 +555,8 @@ const SetTripTemplateConfig = async () => {
datas.loading = false
}
// 保存
const setTemplate = async (type) =>{
// 保存 type行程另存 sellType行程保存并退出
const setTemplate = async (type:any,sellType:any) =>{
queryObj.value.Title = title.value
if(SourceLoading.value) setNewDatasList(datas.DataSource)
......@@ -574,6 +644,8 @@ const setTemplate = async (type) =>{
datas.loading = true
await SetTripTemplateConfig()
}else if(model.value==2&&SalesEditor.value>0){
clearInterval(intervalId.value);
intervalId.value = null;
if(type==1||!searchData.value.sellId){
let obj = {
FileName: queryObj.value.Title,
......@@ -582,6 +654,7 @@ const setTemplate = async (type) =>{
}
journeyAdsDetails.value = obj
isCopyTo.value = true
if(sellType) await SetSellTemplate(type,0,sellType)
}else{
datas.loading = true
await SetSellTemplate(type)
......@@ -617,7 +690,35 @@ watch(()=>autoSave.value,(newVal)=>{
setTemplate(0)
}
})
watch(()=>slides.value,(newVal,oldVal)=>{
if(model.value==2&&SalesEditor.value>0&&searchData.value.sellId){
if(!MonitoringNumber.value||MonitoringNumber.value<2) MonitoringNumber.value++
if(MonitoringNumber.value>1) {
Countdown.value = timer
benginTimer()
}
}
},{
deep: true,
immediate: false
})
watch(()=>queryObj.value.Title,(newVal,oldVal)=>{
if(model.value==2&&SalesEditor.value>0&&searchData.value.sellId){
if(!MonitoringTNumber.value||MonitoringTNumber.value<2) MonitoringTNumber.value++
if(MonitoringTNumber.value>1) {
Countdown.value = timer
benginTimer()
}
}
})
handleUpdateTitle()
onBeforeUnmount(() => {
clearInterval(intervalId.value);
intervalId.value = null;
});
</script>
<style lang="scss" scoped>
......
......@@ -754,11 +754,56 @@ const sellGetTripTemplate = async () =>{
slidesStore.setSlides(newSlides)
}
}else ElMessage({
showClose: true,
message: dataRes.data.message,
type: 'warning',
})
if(searchData.value.sellId) getTripOtherMongo()
} catch (error) {
}
}
// 销售模版缓存数据
const getTripOtherMongo = async () =>{
return
try {
const loadingObj = ElLoading.service({text:'正在获取缓存数据',lock:true})
let dataRes = await ConfigService.GetTripOtherMongo(searchData.value.sellId);
if (dataRes.data.resultCode == 1) {
let dataObj = dataRes.data.data
let SlidesData = JSON.parse(dataObj.TempData)
let newSlides = []
SlidesData.forEach((x,i)=>{
x.elements.forEach((y:any)=>{
if(y.content && y.defaultFontName && y.defaultFontName.includes(',')) y.defaultFontName = y.defaultFontName.split(',')[0]
if(y.content && (y.content.includes('&amp;nbsp;'))){
y.content = y.content.replaceAll('&amp;nbsp;','&nbsp;')
//y.content=y.content.replaceAll('&nbsp;',' ')
}
if(y.contentStr && !y.contentStr.includes('<p') && y.content && y.content.includes(y.contentStr)){
let temp = HtmlUtil.htmlEncodeByRegExp(y.contentStr)
if(temp!=y.contentStr) {
y.content = y.content.replace(y.contentStr,temp)
}
}
})
newSlides.push(x)
})
slidesStore.setSlides(newSlides)
loadingObj.close()
}else {
loadingObj.close()
ElMessage({
showClose: true,
message: dataRes.data.message,
type: 'warning',
})
}
} catch (error) {
}
......
<template>
<div class="ElementNormalData">
<el-input
v-model="keywords" placeholder="输入关键词检索"
class="input-with-select q-pb-md" clearable
@input="SearchCloudInfo">
<template #prefix>
<IconSearch class="cusor-pointer" @click.stop="searchData"></IconSearch>
</template>
</el-input>
<div v-loading="loading" style="height: calc(100%-40px);min-height:400px;overflow: auto;">
<div class="symbol-item NormalDataCenter cursor-pointer"
:class="[current==item.Id?'active':'']"
v-for="(item,index) in dataList" @click="setElText(item,index)">
<div class="title fz14 text-weight-bold text-ellipsis">
<el-tooltip
style="width: 100%;"
effect="dark"
:content="item.Name"
placement="top"
>{{item.Name}}</el-tooltip>
</div>
<div class="images">
<el-image :src="item.PicPath" style="width: 100%;"
fit="cover">
<template #error>
<div class="row items-center" style="height: 100%;">
<el-image :src="errImg"></el-image>
</div>
</template>
</el-image>
</div>
<div class="text fz12">
<el-tooltip
style="width:200px;"
effect="dark"
:content="item.Feature"
placement="top"
>{{item.Feature}}</el-tooltip>
</div>
</div>
</div>
<div v-if="(!dataList || dataList.length==0) && !loading">
<el-empty class="q-ma-xl" description="暂无数据" />
</div>
</div>
<!-- 预览图 -->
<el-image-viewer
@close="() => { isViewerShow = false }"
v-if="isViewerShow"
:initial-index="currentImg"
:url-list="srcList"></el-image-viewer>
</template>
<script lang="ts" setup>
import { ref, reactive, watch } from 'vue'
import { storeToRefs } from 'pinia'
import { useMainStore, useSlidesStore, useScreenStore } from '@/store'
import MatchingData from '@/services/MatchingData'
import { getHtmlPlainText } from '@/utils/common'
import { useUserStore } from "@/store/user";
import HtmlUtil from '@/utils/htmlutil'
const { handleElement, handleElementId } = storeToRefs(useMainStore())
const errImg = ref(require('@/assets/img/noImg.png') as any)
const isViewerShow = ref(false)
const currentImg = ref(0)
const current = ref(null||Number)
const srcList = ref([])
const params = reactive({
kw: HtmlUtil.htmlEncodeByRegExp(handleElement.value.contentStr),
cn: '',
})
const keywords = ref('')
const slidesStore = useSlidesStore()
const dataList = ref([])
const dataListAll = ref([])
const loading = ref(true)
const { userInfo } = storeToRefs(useUserStore());
const SearchCloudInfo = () => {
if(keywords.value){
dataList.value = dataListAll.value.filter(x=>{
return x.Name.toLowerCase().includes(keywords.value.toLowerCase())
})
}else dataList.value = dataListAll.value
}
const seeImg = (index:Number) =>{
isViewerShow.value = true
currentImg.value = index
}
const setElText = (item:any,index:Number) => {
current.value = item.Id
const contentStr = handleElement.value.contentStr
if(contentStr!=item.Feature&&item.Feature) {
const content = handleElement.value.content.replace(getHtmlPlainText(handleElement.value.content),item.Feature)
const props = {
content,
contentStr:item.Feature
}
slidesStore.updateElement({
id: handleElementId.value,
props
})
}
}
const searchData = () => {
if(!keywords.value) return
params.kw = keywords.value
loading.value = true
getDatas()
}
const getDatas = async () => {
const response = await MatchingData.ScenicSearch(params)
if (response.data.resultCode == 1) {
dataListAll.value = dataList.value = checkPoiCoverImg(response.data.data)
}
loading.value = false
}
const checkPoiCoverImg = (array:any[])=>{
if(array.length==0) return
array.forEach((x,index)=>{
x.Id = index+1
if(x.Feature==handleElement.value.contentStr) current.value = index+1
if((!x.PicPath||x.PicPath=='') && x.ImgArray && x.ImgArray.length>0){
x.PicPath=x.ImgArray[0]
}else if(x.PicPath && x.PicPath!=''){
if(x.PicPath.indexOf('?')!=-1) x.PicPath=x.PicPath.split('?')[0]
x.ImgArray = x.ImgArray ?? []
x.ImgArray.splice(0,0,x.PicPath)
}
})
return array
}
getDatas()
watch(()=>handleElementId.value, () => {
loading.value = true
keywords.value = ''
params.kw = HtmlUtil.htmlEncodeByRegExp(handleElement.value.contentStr)
getDatas()
})
</script>
<style lang="scss" scoped>
.ElementNormalData{
height: 100%;
display: flex;
flex-direction: column;
}
.NormalDataCenter{
border: 2px solid #CED9FF;
padding: 8px 14px;
margin-bottom: 5px;
}
.NormalDataCenter.active{
border-color: #0B40FE;
}
.title{
font-family: PingFang SC;
}
.images{
width: 194px;
max-height: 139px;
overflow: hidden;
margin-top: 8px;
margin-bottom: 11px;
}
.text {
font-family: PingFang SC;
font-weight: 300;
color: #000;
line-height: 18px;
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
</style>
\ No newline at end of file
......@@ -13,7 +13,7 @@
</template>
<script lang="ts" setup>
import { ref, computed, watch } from 'vue'
import { ref, computed, watch, inject } from 'vue'
import { storeToRefs } from 'pinia'
import { useMainStore } from '@/store'
import { useScreenStore } from '@/store'
......@@ -23,11 +23,13 @@ import ElementStylePanel from './ElementStylePanel/index.vue'
import ElementPositionPanel from './ElementPositionPanel.vue'
import ElementAnimationPanel from './ElementAnimationPanel.vue'
import ElementTemplateData from './ElementTemplateData.vue'
import ElementNormalData from './ElementNormalData.vue'
import SlideDesignPanel from './SlideDesignPanel.vue'
import SlideAnimationPanel from './SlideAnimationPanel.vue'
import MultiPositionPanel from './MultiPositionPanel.vue'
import SymbolPanel from './SymbolPanel.vue'
import Tabs from '@/components/Tabs.vue'
import { injectKeyTemplate } from '@/types/injectKey'
interface ElementTabs {
label: string
......@@ -38,14 +40,28 @@ const mainStore = useMainStore()
const { activeElementIdList, handleElement, toolbarState } = storeToRefs(mainStore)
const { model } = storeToRefs(useScreenStore())
const searchData = ref({} as any)
searchData.value = inject(injectKeyTemplate)
const elementTabs = computed<ElementTabs[]>(() => {
if (handleElement.value?.type === 'text') {
return [
{ label: '样式', key: ToolbarStates.EL_STYLE },
{ label: '符号', key: ToolbarStates.SYMBOL },
{ label: '位置', key: ToolbarStates.EL_POSITION },
// { label: '动画', key: ToolbarStates.EL_ANIMATION }
]
if(!searchData.value.isTeamManage){
return [
{ label: '样式', key: ToolbarStates.EL_STYLE },
{ label: '符号', key: ToolbarStates.SYMBOL },
{ label: '位置', key: ToolbarStates.EL_POSITION },
// { label: '动画', key: ToolbarStates.EL_ANIMATION }
{ label: '匹配数据', key: ToolbarStates.EL_NORMALDATA }
]
}else{
return [
{ label: '样式', key: ToolbarStates.EL_STYLE },
{ label: '符号', key: ToolbarStates.SYMBOL },
{ label: '位置', key: ToolbarStates.EL_POSITION },
// { label: '动画', key: ToolbarStates.EL_ANIMATION }
]
}
}
return [
{ label: '样式', key: ToolbarStates.EL_STYLE },
......@@ -99,6 +115,7 @@ const currentPanelComponent = computed(() => {
[ToolbarStates.EL_TEMPLATEDATA]: ElementTemplateData,
[ToolbarStates.SLIDE_DESIGN]: SlideDesignPanel,
[ToolbarStates.SLIDE_ANIMATION]: SlideAnimationPanel,
[ToolbarStates.EL_NORMALDATA]: ElementNormalData,
[ToolbarStates.MULTI_POSITION]: MultiPositionPanel,
[ToolbarStates.SYMBOL]: SymbolPanel,
}
......
<template>
<div class="">
<el-tabs v-model="activeName" @tab-click="tabsHandlerClick" class="no-border dark sticky-header">
<el-tab-pane label="全部订单" name="all"></el-tab-pane>
<el-tab-pane label="待支付" name="pay"></el-tab-pane>
<el-tab-pane label="已完成" name="finish"></el-tab-pane>
<el-tab-pane label="待开票" name="invoice"></el-tab-pane>
<el-tab-pane label="历史发票" name="invoiceHistory"></el-tab-pane>
<div class="order-bar rounded row">
<div class="item" style="width: 280px !important; min-width: 280px; text-align: left;">商品信息</div>
<div class="item col">时长</div>
<div class="item col" >单价</div>
<div class="item col">数量</div>
<div class="item none-width">
<div style="background-color: rgba(0,0,0,.08);width:1px">&nbsp;</div>
</div>
<div class="item col">实付款</div>
<div class="item col">订单状态</div>
<div class="item">操作</div>
</div>
</el-tabs>
<template v-if="orders && orders.length>0 && !loading">
<div class="order-body q-mt-lg" v-for="x in orders" :key="x.orderid">
<div class="order-item rounded">
<div class="title">
<span>{{ x.create }}</span>
<span class="q-ml-md">{{ x.ordernum }}</span>
</div>
<div class="bg-white rounded row items-center">
<div class="item row items-center" style="width: 280px !important; min-width: 280px; text-align: left;padding:24px;">
<img :src="x.cover" style="width:72px;" class="rounded" >
<div class="q-ml-lg">{{ x.pricetypename }}_{{ x.vipname }}</div>
</div>
<div class="item col">{{ x.productname }}</div>
<div class="item col">¥{{ x.price.toFixed(2) }}</div>
<div class="item col">{{ x.use }}席位</div>
<div class="item none-width">
<div style="background-color: rgba(0,0,0,.08);width:1px;height:72px;">&nbsp;</div>
</div>
<div class="item col">
<div class="text-weight-bold q-mb-sm" style="font-size: 16px">¥{{ x.price.toFixed(2) }}</div>
<!-- <div class="row items-center flex-end">
<span class="text-grey-8 q-mr-md">已优惠 ¥10.00</span>
<IconHelp :size="16" class="cursor-pointer"></IconHelp>
</div> -->
</div>
<div class="item col">
<div class="q-mb-sm" :class="{'text-waring':x.status==1,'text-grey-8':x.status==3}">{{ x.statusname }}</div>
<el-button link @click="forwardOrderDetail(x.orderid)">订单详情</el-button>
</div>
<div class="item column">
<el-button type="primary" v-if="x.status==2">发票</el-button>
<br />
<el-button type="default" v-if="x.status==2">售后</el-button>
<el-button type="warning" v-if="x.status==1">支付</el-button>
<br />
<el-button type="default" v-if="x.status==1">取消</el-button>
</div>
</div>
</div>
</div>
</template>
<div v-if="loading" style="height: 200px;margin-top: 100px;" v-loading="loading"></div>
<div v-if="(!orders || orders.length==0) && !loading">
<el-empty class="q-ma-xl" description="暂无数据" />
</div>
</div>
<Order :firm="type"></Order>
</template>
<script lang="ts" setup>
import { ApiResult } from "@/configs/axios";
import OrderService from "@/services/OrderService";
import { ref } from "vue";
import { useRouter } from "vue-router";
const activeName = ref<string>('all')
const parameters = ref({
pageIndex:1,
pageSize:15,
starttime:'',
endtime:'',
orderstatus:0
})
const orders = ref<any[]>()
const count = ref(0)
const loading = ref(false)
const router = useRouter()
const tabsHandlerClick = (e:any)=>{
console.log(e)
}
const getOrders = async ()=>{
if(loading.value)return
loading.value=true
const response = await OrderService.GetOrders(parameters.value)
if(response.data.resultCode == ApiResult.SUCCESS){
orders.value = response.data.data.pageData
count.value = response.data.data.pageCount
}
loading.value=false
}
const forwardOrderDetail = (id:string)=>{
router.push('/u/order/'+encodeURIComponent(id))
}
getOrders()
import Order from '../UserCenter/Order.vue'
const type = ref(1)
</script>
<style scoped>
.sticky-header{
position: sticky;
top: 0;
left: 0;
background: #FFF;
}
.order-bar{
background: #f6f7f9 !important;
}
.order-bar .item,
.order-body .order-item .item{
padding: 0 24px;
height: 42px;
line-height: 42px;
font-size: 14px;
color:gray;
text-align: right;
min-width: 108px;
}
.order-bar .item.none-width,
.order-body .order-item .item.none-width{
min-width: unset;
}
.order-body{
}
.order-body .order-item{
background: #f6f7f9;
border:1px solid rgba(0,0,0,.08);
font-size: 14px;
}
.order-body .order-item .title{
padding: 0 24px;
height: 45px;
line-height: 45px;
color:grey;
white-space: nowrap;
overflow: hidden;
}
.order-body .order-item .item{
height: auto;
line-height: 1;
color: #000;
white-space: nowrap;
overflow: hidden;
}
</style>
\ No newline at end of file
<template>
<div class="row items-center">
<IconLeft :size="18" class="q-mr-md cursor-pointer" @click="forwardOrder"></IconLeft>
<div class="text-weight-bold cursor-pointer" @click="forwardOrder">订单/发票</div>
</div>
<template v-if="order && !loading">
<div class="q-mt-xl q-pa-xl rounded bg-info">
<el-steps style="max-width: 100%;margin: 0 auto;" :active="3" align-center>
<el-step title="选择商品" description="" />
<el-step title="确认下单" description="" />
<el-step title="支付" description="" />
<el-step title="交易完成" description="" />
</el-steps>
<div class="q-mt-xl text-center text-weight-bold" style="font-size: 18px;">订单状态:待支付</div>
<div class="q-mt-md row items-center flex-center" style="font-size: 13px;">
<span>请在 </span>
<el-countdown title="" format="DD [天] HH:mm:ss" :value="countValue" value-style="font-size:13px;color:#f89c53;"
class="q-mx-md inline" />
<span> 内完成转账,超时订单自动取消</span>
</div>
<div class="row items-center flex-center q-mt-xl">
<el-button size="large">取消订单</el-button>
<el-button type="primary" size="large">去支付</el-button>
</div>
</div>
<div class="order-bar rounded row q-mt-xl">
<div class="item" style="width: 280px !important; min-width: 280px; text-align: left;">商品信息</div>
<div class="item col">时长</div>
<div class="item col">单价</div>
<div class="item col">数量</div>
<div class="item none-width">
<div style="background-color: rgba(0,0,0,.08);width:1px">&nbsp;</div>
</div>
<div class="item col">小计</div>
</div>
<div class="order-body q-mt-lg">
<div class="order-item rounded">
<div class="title">
<span>{{ order.create }}</span>
<span class="q-ml-md">{{ order.ordernum }}</span>
</div>
<div class="bg-white rounded row items-center">
<div class="item row items-center"
style="width: 280px !important; min-width: 280px; text-align: left;padding:24px;">
<img :src="order.cover" style="width:72px;" class="rounded">
<div class="q-ml-lg">{{ order.pricetypename }}_{{ order.vipname }}</div>
</div>
<div class="item col">{{ order.productname }}</div>
<div class="item col">¥{{ order.price.toFixed(2) }}</div>
<div class="item col">{{ order.use }}席位</div>
<div class="item none-width">
<div style="background-color: rgba(0,0,0,.08);width:1px;height:72px;">&nbsp;</div>
</div>
<div class="item col">
<div class="text-weight-bold q-mb-sm" style="font-size: 16px">¥{{ order.price.toFixed(2) }}</div>
</div>
</div>
</div>
</div>
<div class="q-mt-lg text-right">
<span style="font-size: 14px;">订单总金额:¥</span>
<span style="font-size: 18px" class="text-weight-bold text-dark">{{ order.price.toFixed(2) }}</span>
</div>
<div class="q-mt-lg text-right" v-if="order.status==2">
<span style="font-size: 14px;">实付总金额:¥</span>
<span style="font-size: 18px" class="text-weight-bold text-dark text-negative">{{ order.price.toFixed(2) }}</span>
</div>
</template>
<div v-if="loading" style="height: 200px;margin-top: 100px;" v-loading="loading"></div>
<div v-if="!order && !loading">
<el-empty class="q-ma-xl" description="暂无数据" />
</div>
</template>
<script lang="ts" setup>
import { ApiResult } from "@/configs/axios"
import OrderService from "@/services/OrderService"
import { ref } from "vue"
import { useRouter } from "vue-router"
const order = ref<any>()
const loading = ref(false)
const router = useRouter()
const countValue = ref(Date.now() + 1000 * 60 * 60 * 7)
const forwardOrder = (id: string) => {
router.push('/u/order')
}
const getOrder = async () => {
const orderid = router.currentRoute.value.params.id?.toString()
if (!orderid) return
loading.value = true
const response = await OrderService.GetOrder(orderid)
if (response.data.resultCode == ApiResult.SUCCESS) {
order.value = response.data.data
countValue.value = new Date(order.value.create.replaceAll('-','/')).getTime() + 1000 * 60 * 60 * 720
}
loading.value = false
}
getOrder()
</script>
<style scoped>
.order-bar {
background: #f6f7f9 !important;
}
.order-bar .item,
.order-body .order-item .item {
padding: 0 24px;
height: 42px;
line-height: 42px;
font-size: 14px;
color: gray;
text-align: right;
min-width: 108px;
}
.order-bar .item.none-width,
.order-body .order-item .item.none-width {
min-width: unset;
}
.order-body {}
.order-body .order-item {
background: #f6f7f9;
border: 1px solid rgba(0, 0, 0, .08);
font-size: 14px;
}
.order-body .order-item .title {
padding: 0 24px;
height: 45px;
line-height: 45px;
color: grey;
white-space: nowrap;
overflow: hidden;
}
.order-body .order-item .item {
height: auto;
line-height: 1;
color: #000;
white-space: nowrap;
overflow: hidden;
}
</style>
\ No newline at end of file
<OrderDetail></OrderDetail>
</template>
<script lang="ts" setup>
import OrderDetail from '../UserCenter/OrderDetail.vue'
</script>
<style scoped>
</style>
\ No newline at end of file
......@@ -16,7 +16,7 @@
<div class="col row">
<div class="user-center-menu column ">
<el-menu :default-active="activeIndex" class="no-border md-menu col" router>
<el-menu-item :index="i" v-for="(x,i) in menus" :key="i" :route="x.url">
<el-menu-item :index="`${i}`" v-for="(x,i) in menus" :key="i" :route="x.url">
<component :is="x.icon" style="font-size: 20px;"></component>
<span class="q-ml-lg">{{ x.name }}</span>
</el-menu-item>
......
......@@ -12,8 +12,8 @@
</div>
<div class="col row">
<div class="user-center-menu column ">
<el-menu :default-active="activeIndex" class="no-border md-menu col" router>
<el-menu-item :index="i" v-for="(x,i) in menus" :key="i" :route="x.url">
<el-menu :default-active="String(activeIndex)" class="no-border md-menu col" router>
<el-menu-item :index="`${i}`" v-for="(x,i) in menus" :key="i" :route="x.url">
<component :is="x.icon" style="font-size: 20px;"></component>
<span class="q-ml-lg">{{ x.name }}</span>
</el-menu-item>
......
......@@ -6,8 +6,17 @@
<el-tab-pane label="已完成" name="finish"></el-tab-pane>
<el-tab-pane label="待开票" name="invoice"></el-tab-pane>
<el-tab-pane label="历史发票" name="invoiceHistory"></el-tab-pane>
<div class="order-bar rounded row">
<div class="item" style="width: 280px !important; min-width: 280px; text-align: left;">商品信息</div>
<div v-if="activeName!='invoiceHistory'" class="order-bar rounded row">
<div class="item" style="width: 280px !important; min-width: 280px; text-align: left;"
:class="[activeName=='invoice'?'cursor-pointer':'']"
@click="activeName=='invoice'?(datas.selectAll=!datas.selectAll,setSelecAll()):''">
<el-checkbox v-if="activeName=='invoice'&&orders.length>0" class="fz14"
label="全选" v-model="datas.selectAll"
:indeterminate="datas.indeterminate"
@click.stop=""
@change="setSelecAll" :disabled="orders.length==0"
style="position: relative;top: 2px;"/>
商品信息</div>
<div class="item col">时长</div>
<div class="item col" >单价</div>
<div class="item col">数量</div>
......@@ -16,16 +25,50 @@
</div>
<div class="item col">实付款</div>
<div class="item col">订单状态</div>
<div class="item">操作</div>
<div class="item row items-center">
<el-tooltip v-if="activeName=='invoice'&&orders.length>0"
class="box-item"
effect="dark"
content="发票"
placement="top"
>
<el-button link class="q-ml-md" @click="MakeOutInvoice">
<el-icon><Printer /></el-icon>
</el-button>
</el-tooltip>
<span v-else>操作</span>
</div>
</div>
<div v-else class="order-bar rounded row order-InvoiceH">
<div class="item" style="width: 180px !important; min-width: 180px; text-align: left;">
申请时间
</div>
<div class="item" style="width: 200px !important; min-width: 200px;">抬头</div>
<div class="item col" >开票订单</div>
<div class="item col" >开票金额</div>
<div class="item col">税号</div>
<!-- <div class="item none-width">
<div style="background-color: rgba(0,0,0,.08);width:1px">&nbsp;</div>
</div> -->
<div class="item col">联系邮箱</div>
<div class="item col">开具方式 </div>
<div class="item col">开票状态</div>
<div class="item row items-center">
操作
</div>
</div>
</el-tabs>
<template v-if="orders && orders.length>0 && !loading">
<template v-if="activeName!='invoiceHistory'&&orders && orders.length>0 && !loading">
<div v-loading="CancelLoading">
<div class="order-body q-mt-lg" v-for="x in orders" :key="x.orderid">
<div class="order-item rounded">
<div class="title">
<div class="title" @click="activeName=='invoice'?getCheck(x,1):''"
:class="[activeName=='invoice'?'cursor-pointer':'']">
<el-checkbox v-if="activeName=='invoice'" class="fz14 q-pr-md" v-model="x.check"
@click.stop="getCheck(x)"
style="position: relative;top: 2px;"/>
<span>{{ x.create }}</span>
<span class="q-ml-md">{{ x.ordernum }}</span>
</div>
......@@ -36,7 +79,9 @@
<div class="q-ml-lg">{{ x.pricetypename }}_{{ x.vipname }}</div>
</div>
<div class="item col">{{ x.productname }}</div>
<div class="item col">¥{{ x.price.toFixed(2) }}</div>
<div class="item col">
¥{{ x.price.toFixed(2) }}
</div>
<div class="item col">{{ x.use }}席位</div>
<div class="item none-width">
<div style="background-color: rgba(0,0,0,.08);width:1px;height:72px;">&nbsp;</div>
......@@ -50,10 +95,11 @@
</div>
<div class="item col">
<div class="q-mb-sm" :class="{'text-waring':x.status==1,'text-grey-8':x.status==3}">{{ x.statusname }}</div>
<el-button link @click="forwardOrderDetail(x.orderid)">订单详情</el-button>
<el-button link @click="forwardOrderDetail(x.orderid)">订单详情</el-button>
</div>
<div class="item column">
<el-button type="primary" v-if="x.status==2">发票</el-button>
<el-button type="primary" v-if="x.status==2&&!x.invoiceId" @click="MakeOutInvoice(x)">发票</el-button>
<el-button v-if="x.invoiceFile&&x.invoiceFile.length>0" @click="DownloadInvoice(x.invoiceFile[0])">发票</el-button>
<br />
<el-button type="default" v-if="x.status==2" @click="redicetTo('https://work.weixin.qq.com/kfid/kfc378aada578ca8b0e')">售后</el-button>
<el-button type="warning" v-if="x.status==1" @click="goControls(1,x.orderid)">支付</el-button>
......@@ -67,22 +113,80 @@
</div>
</template>
<!-- 历史发票列表 -->
<template v-if="activeName=='invoiceHistory'&&orders && orders.length>0 && !loading">
<div v-loading="CancelLoading">
<div class="order-body order-InvoiceC" v-for="x in orders" :key="x.orderid">
<div class="order-item">
<div class="bg-white row items-center">
<div class="item row items-center" style="width: 180px !important; min-width: 180px; text-align: left;padding:24px;">
<div>{{ x.CreateTime }}</div>
</div>
<div class="item" style="width: 200px !important; min-width: 200px;">
{{ x.InvoiceTitle }}
</div>
<div class="item col">
<div class="text-weight-bold q-mb-sm" style="font-size: 16px">
<template v-for="(y,indexs) in x.OrderList">
<el-button link @click="forwardOrderDetail(y.OrderId,1)">{{ y.OrderId }}</el-button>
</template>
</div>
</div>
<div class="item col">
<div class="text-weight-bold q-mb-sm" style="font-size: 16px">
¥ {{x.Money.toFixed(2)}}
</div>
</div>
<div class="item col">{{x.InvoiceTaxNo}}</div>
<!-- <div class="item none-width">
<div style="background-color: rgba(0,0,0,.08);width:1px;height:72px;">&nbsp;</div>
</div> -->
<div class="item col">
{{ x.Email }}
</div>
<div class="item col">
{{ x.IssuedType==1?'电子普通发票':'增值税专用发票' }}
</div>
<div class="item col">
<div class="q-mb-sm" :class="{'text-waring':x.InvoiceState==2,'text-grey-8':x.InvoiceState>2||x.InvoiceState==1}">{{ x.InvoiceState==2?'已开票':'开票中' }}</div>
<el-button link @click="getInvoiceDetails(x)">发票详情</el-button>
</div>
<div class="item">
<el-button v-if="x.InvoiceFile&&x.InvoiceFile.length>0" @click="DownloadInvoice(x.InvoiceFile[0])">发票</el-button>
</div>
</div>
</div>
</div>
</div>
</template>
<div v-if="loading" style="height: 200px;margin-top: 100px;" v-loading="loading"></div>
<div v-if="(!orders || orders.length==0) && !loading">
<el-empty class="q-ma-xl" description="暂无数据" />
</div>
</div>
<WePay v-if="showPay" :orderid="orderid" @close="showPay=false" @success="showPay=false"></WePay>
<openInvoice :show="showOpenInvoice" :InvoiceDatas="InvoiceDatas"
@close="showOpenInvoice=false"
@success="successInvoice"></openInvoice>
<Invoice :firm="firm" :show="showInvoice" :InvoiceDetails="InvoiceDetails"
@close="showInvoice=false"></Invoice>
</template>
<script lang="ts" setup>
import { ApiResult } from "@/configs/axios";
import OrderService from "@/services/OrderService";
import { ref, onMounted } from "vue";
import { ref, reactive, onMounted } from "vue";
import { useRouter } from "vue-router";
import { openNewBlank } from '@/utils/common'
import WePay from '@/components/Pay/WePay.vue'
import openInvoice from './components/openInvoice.vue'
import Invoice from './components/InvoiceDetails.vue'
import { ElMessageBox } from "element-plus";
const props = defineProps({
firm: 0 as Number,
})
const activeName = ref<string>('all')
const parameters = ref({
pageIndex:1,
......@@ -91,7 +195,11 @@ const parameters = ref({
endtime:'',
orderstatus:0
})
const orders = ref<any[]>()
const datas = reactive({
selectAll: false,
indeterminate: false,// 未全选状态
})
const orders = ref<any[]>([])
const orderid = ref<Number>(0)
const count = ref(0)
const loading = ref(false)
......@@ -99,6 +207,157 @@ const router = useRouter()
const showPay = ref(false)
const orderRef = ref<any>()
const CancelLoading = ref(false)
const showOpenInvoice = ref(false)
const showInvoice = ref(false)
const InvoiceDatas = reactive({
total: 0,
Ids: [],
orderid: [],
isMore: 0,
} as any)
const InvoiceDetails = ref({})
if(router.currentRoute.value.params.activeName) {
activeName.value = router.currentRoute.value.params.activeName
if(activeName.value=='all') parameters.value.orderstatus = 0
if(activeName.value=='pay') parameters.value.orderstatus = 1
if(activeName.value=='finish') parameters.value.orderstatus = 2
if(activeName.value=='invoice') parameters.value.orderstatus = 4
}
const DownloadInvoice = (x:any) => {
let name = x.Content.split('/')
const xhr = new XMLHttpRequest()
xhr.open('GET', x.Url, true)
xhr.responseType = 'blob'
xhr.onprogress = (e:any)=>{
}
xhr.onload = ()=>{
var blob = xhr.response;
let link = document.createElement('a');
link.download = name[name.length-1];
link.href = URL.createObjectURL(blob);
link.click()
}
xhr.send()
window.open(x.Url)
// window.open("https://view.officeapps.live.com/op/view.aspx?src=" + encodeURIComponent(x.Url),'_blank')
}
const getInvoiceDetails = (item:any) => {
InvoiceDetails.value = item
showInvoice.value = true
}
const successInvoice = () => {
showOpenInvoice.value = false
datas.selectAll = false
datas.indeterminate = false
InvoiceDatas.Ids = []
InvoiceDatas.orderid = []
search()
}
const MakeOutInvoice = (item:any) => {
SumUp()
if(item&&item.orderid){
InvoiceDatas.orderid = []
InvoiceDatas.isMore = 0
InvoiceDatas.total = item.price
InvoiceDatas.orderid.push(item.orderid)
}else{
InvoiceDatas.isMore = 1
if(InvoiceDatas.Ids.length==0) return ElMessage.warning({
showClose: true,
message: `请勾选需要发票的数据`,
})
}
showOpenInvoice.value = true
}
const getCheck = (item:any,type:any) => {
if(type) item.check = !item.check
let filter = InvoiceDatas.Ids.filter(x=>x==item.orderid)
if(filter.length==0&&(!item.check||item.check)) {
InvoiceDatas.Ids.push(item.orderid)
}else {
let newIds = InvoiceDatas.Ids.filter(x=>x!=item.orderid)
InvoiceDatas.Ids = newIds
}
CheckStatus()
}
const CheckStatus = () => {
if(InvoiceDatas.Ids.length==0) {
datas.selectAll = false
datas.indeterminate = false
}else if(InvoiceDatas.Ids.length>0){
if(orders.value.length==InvoiceDatas.Ids.length){
datas.selectAll = true
datas.indeterminate = false
}else if(orders.value.length>InvoiceDatas.Ids.length){
datas.selectAll = false
datas.indeterminate = true
}
}
}
const setSelecAll = () => {
if(datas.selectAll||datas.indeterminate) {
InvoiceDatas.Ids = orders.value.map(x=>{return x.orderid})
orders.value.forEach(y=>{
y.check = true
})
if(datas.indeterminate) datas.selectAll = true
datas.indeterminate = false
}else {
orders.value.forEach(y=>{
y.check = false
})
InvoiceDatas.Ids = []
datas.indeterminate = false
}
}
const SumUp = () => {
if(InvoiceDatas.Ids.length>0){
let total = 0
for(let i=0;i<orders.value.length;i++){
let filter = InvoiceDatas.Ids.filter(x=>x==orders.value[i].orderid)
if(filter.length>0) total+=(orders.value[i].price*100)
}
InvoiceDatas.total = total/100
}
}
const newDatasSelected = () =>{
if(InvoiceDatas.Ids.length==0) {
for(let i=0;i<orders.value.length;i++){
orders.value[i].check = false
}
datas.selectAll = false
datas.indeterminate = false
}else if(InvoiceDatas.Ids.length>0){
if(orders.value.length==InvoiceDatas.Ids.length){
for(let i=0;i<orders.value.length;i++){
orders.value[i].check = true
}
datas.selectAll = true
datas.indeterminate = false
}else if(orders.value.length>InvoiceDatas.Ids.length){
for(let i=0;i<orders.value.length;i++){
let x = orders.value[i]
let findObj = InvoiceDatas.Ids.find(y=> y==x.orderid)
if(findObj) orders.value[i].check = true
}
datas.selectAll = false
datas.indeterminate = true
}
}
let checks = orders.value.map(x=>{return x.check})
if(checks&&checks.indexOf(true)==-1) InvoiceDatas.Ids = []
}
const goControls = (type:Number,id:any) => {
orderid.value = id
......@@ -133,11 +392,27 @@ const CanceltOrders = async ()=>{
const redicetTo = (url:string)=>openNewBlank(url)
const tabsHandlerClick = (e:any)=>{
console.log(e.props.name)
activeName.value = e.props.name
if(e.props.name=='all') parameters.value.orderstatus = 0
if(e.props.name=='pay') parameters.value.orderstatus = 1
if(e.props.name=='finish') parameters.value.orderstatus = 2
search()
if(e.props.name=='invoice') parameters.value.orderstatus = 4
if(e.props.name=='invoiceHistory') searchHistorical()
else search()
}
const searchHistorical = async () => {
orders.value = []
parameters.value.pageIndex=1
await HistoricalInvoice()
}
const HistoricalInvoice = async () => {
const response = await OrderService.GetPPTUserInvoicePage(parameters.value.pageIndex,parameters.value.pageSize)
if(response.data.resultCode == ApiResult.SUCCESS){
orders.value = response.data.data.pageData
count.value = response.data.data.pageCount
}
}
const search = async () => {
......@@ -150,12 +425,21 @@ const getOrders = async ()=>{
const response = await OrderService.GetOrders(parameters.value)
if(response.data.resultCode == ApiResult.SUCCESS){
let arrList = function(list){
list.forEach(x=>{
x.check = false
})
}
arrList(response.data.data.pageData)
orders.value = response.data.data.pageData
count.value = response.data.data.pageCount
}
loading.value=false
if(parameters.value.orderstatus==4){
newDatasSelected()
}
}
const scrollingHandler = () =>{
......@@ -164,18 +448,19 @@ const scrollingHandler = () =>{
let scrollTop = orderRef.value.scrollTop
if(maxHeight - scrollTop==0 && parameters.value.pageCount > parameters.value.pageIndex) {
parameters.value.pageIndex++
getOrders()
if(activeName.value=='invoiceHistory') HistoricalInvoice()
else getOrders()
}
}
}
const forwardOrderDetail = (id:string)=>{
router.push('/u/order/'+encodeURIComponent(id))
const forwardOrderDetail = (id:string,type:any)=>{
let url = props.firm?`/a/orderDetail/${encodeURIComponent(id)}/${props.firm}/${activeName.value}`:`/u/orderDetail/${encodeURIComponent(id)}/${activeName.value}`
router.push(url)
}
getOrders()
if(activeName.value=='invoiceHistory') HistoricalInvoice()
else getOrders()
onMounted(()=>{
orderRef.value.addEventListener("scroll", scrollingHandler);
})
......@@ -229,4 +514,14 @@ onMounted(()=>{
white-space: nowrap;
overflow: hidden;
}
.order-body.order-InvoiceC .order-item{
border: 0;
border-bottom: 1px solid rgba(0,0,0,.08);
}
.order-bar.order-InvoiceH .item, .order-body.order-InvoiceC .order-item .item{
text-overflow: ellipsis;
}
.order-bar.order-InvoiceH .item,.order-body.order-InvoiceC .order-item .item{
text-align: left;
}
</style>
\ No newline at end of file
<template>
<div class="row items-center">
<IconLeft :size="18" class="q-mr-md cursor-pointer" @click="forwardOrder"></IconLeft>
<div class="text-weight-bold cursor-pointer" @click="forwardOrder">订单/发票</div>
</div>
<div v-loading="CancelLoading">
<template v-if="order && !loading">
<div class="q-mt-xl q-pa-xl rounded bg-info">
<el-steps style="max-width: 100%;margin: 0 auto;" :active="active" align-center>
<el-step title="选择商品" description="" />
<el-step title="确认下单" description="" />
<el-step title="待支付" description="" />
<el-step :title="order.status==3?'交易取消':'交易完成'" description="" />
</el-steps>
<div class="q-mt-xl text-center text-weight-bold" style="font-size: 18px;">订单状态:{{order.statusname}}</div>
<div v-if="order.status==1" class="q-mt-md row items-center flex-center" style="font-size: 13px;">
<span>请在 </span>
<el-countdown title="" format="DD [天] HH:mm:ss" :value="countValue" value-style="font-size:13px;color:#f89c53;"
class="q-mx-md inline" />
<span> 内完成转账,超时订单自动取消</span>
</div>
<div class="row items-center flex-center q-mt-xl" v-if="order.status==1">
<el-button size="large" @click="goControls(2)">取消订单</el-button>
<el-button type="primary" size="large" @click="goControls(1)">去支付</el-button>
</div>
</div>
<div class="order-bar rounded row q-mt-xl">
<div class="item" style="width: 280px !important; min-width: 280px; text-align: left;">商品信息</div>
<div class="item col">时长</div>
<div class="item col">单价</div>
<div class="item col">数量</div>
<div class="item none-width">
<div style="background-color: rgba(0,0,0,.08);width:1px">&nbsp;</div>
<div v-loading="CancelLoading">
<template v-if="order && !loading">
<div class="q-mt-xl q-pa-xl rounded bg-info">
<el-steps style="max-width: 100%;margin: 0 auto;" :active="active" align-center>
<el-step title="选择商品" description="" />
<el-step title="确认下单" description="" />
<el-step title="待支付" description="" />
<el-step :title="order.status==3?'交易取消':'交易完成'" description="" />
</el-steps>
<div class="q-mt-xl text-center text-weight-bold" style="font-size: 18px;">订单状态:{{order.statusname}}</div>
<div v-if="order.status==1" class="q-mt-md row items-center flex-center" style="font-size: 13px;">
<span>请在 </span>
<el-countdown title="" format="DD [天] HH:mm:ss" :value="countValue" value-style="font-size:13px;color:#f89c53;"
class="q-mx-md inline" />
<span> 内完成转账,超时订单自动取消</span>
</div>
<div class="row items-center flex-center q-mt-xl" v-if="order.status==1">
<el-button size="large" @click="goControls(2)">取消订单</el-button>
<el-button type="primary" size="large" @click="goControls(1)">去支付</el-button>
</div>
</div>
<div class="item col">小计</div>
</div>
<div class="order-body q-mt-lg">
<div class="order-item rounded">
<div class="title">
<span>{{ order.create }}</span>
<span class="q-ml-md">{{ order.ordernum }}</span>
<div class="order-bar rounded row q-mt-xl">
<div class="item" style="width: 280px !important; min-width: 280px; text-align: left;">商品信息</div>
<div class="item col">时长</div>
<div class="item col">单价</div>
<div class="item col">数量</div>
<div class="item none-width">
<div style="background-color: rgba(0,0,0,.08);width:1px">&nbsp;</div>
</div>
<div class="bg-white rounded row items-center">
<div class="item row items-center"
style="width: 280px !important; min-width: 280px; text-align: left;padding:24px;">
<img :src="order.cover" style="width:72px;" class="rounded">
<div class="q-ml-lg">{{ order.pricetypename }}_{{ order.vipname }}</div>
</div>
<div class="item col">{{ order.productname }}</div>
<div class="item col">¥{{ order.price.toFixed(2) }}</div>
<div class="item col">{{ order.use }}席位</div>
<div class="item none-width">
<div style="background-color: rgba(0,0,0,.08);width:1px;height:72px;">&nbsp;</div>
<div class="item col">小计</div>
</div>
<div class="order-body q-mt-lg">
<div class="order-item rounded">
<div class="title">
<span>{{ order.create }}</span>
<span class="q-ml-md">{{ order.ordernum }}</span>
</div>
<div class="item col">
<div class="text-weight-bold q-mb-sm" style="font-size: 16px">¥{{ order.price.toFixed(2) }}</div>
<div class="bg-white rounded row items-center">
<div class="item row items-center"
style="width: 280px !important; min-width: 280px; text-align: left;padding:24px;">
<img :src="order.cover" style="width:72px;" class="rounded">
<div class="q-ml-lg">{{ order.pricetypename }}_{{ order.vipname }}</div>
</div>
<div class="item col">{{ order.productname }}</div>
<div class="item col">¥{{ order.price.toFixed(2) }}</div>
<div class="item col">{{ order.use }}席位</div>
<div class="item none-width">
<div style="background-color: rgba(0,0,0,.08);width:1px;height:72px;">&nbsp;</div>
</div>
<div class="item col">
<div class="text-weight-bold q-mb-sm" style="font-size: 16px">¥{{ order.price.toFixed(2) }}</div>
</div>
</div>
</div>
</div>
<div class="q-mt-lg text-right">
<span style="font-size: 14px;">订单总金额:¥</span>
<span style="font-size: 18px" class="text-weight-bold text-dark">{{ order.price.toFixed(2) }}</span>
</div>
<div class="q-mt-lg text-right" v-if="order.status==2">
<span style="font-size: 14px;">实付总金额:¥</span>
<span style="font-size: 18px" class="text-weight-bold text-dark text-negative">{{ order.price.toFixed(2) }}</span>
</div>
</template>
<div v-if="loading" style="height: 200px;margin-top: 100px;" v-loading="loading"></div>
<div v-if="!order && !loading">
<el-empty class="q-ma-xl" description="暂无数据" />
</div>
<div class="q-mt-lg text-right">
<span style="font-size: 14px;">订单总金额:¥</span>
<span style="font-size: 18px" class="text-weight-bold text-dark">{{ order.price.toFixed(2) }}</span>
</div>
<div class="q-mt-lg text-right" v-if="order.status==2">
<span style="font-size: 14px;">实付总金额:¥</span>
<span style="font-size: 18px" class="text-weight-bold text-dark text-negative">{{ order.price.toFixed(2) }}</span>
</div>
</template>
<div v-if="loading" style="height: 200px;margin-top: 100px;" v-loading="loading"></div>
<div v-if="!order && !loading">
<el-empty class="q-ma-xl" description="暂无数据" />
</div>
</div>
<WePay v-if="showPay" :orderid="order.orderid" @close="showPay=false" @success="showPay=false,getOrder()"></WePay>
</template>
......@@ -124,7 +123,10 @@ const CanceltOrders = async ()=>{
}
const forwardOrder = (id: string) => {
router.push('/u/order')
let activeName = router.currentRoute.value.params.activeName?`/${router.currentRoute.value.params.activeName}`:''
let isFirm = router.currentRoute.value.params.isFirm
let url = isFirm==1?`/a/order${activeName}`:`/u/order${activeName}`
router.push(url)
}
const getOrder = async () => {
......
<template>
<el-dialog v-model="dialogVisible"
width="450"
title="发票详情"
:close-on-press-escape="false" :close-on-click-modal="false"
@close="close">
<div class="InvoiceVerify">
<div class="InvoiceVerify-box fz14">
<div class="row flex-between items-center q-py-sm">
<span>开票金额</span>
<span class="text-bold">{{InvoiceDetails.Money.toFixed(2)}}</span>
</div>
<div class="row flex-between items-center q-py-sm">
<span>开具方式</span>
<span class="text-bold">{{InvoiceDetails.IssuedType==1?'电子普通发票':'增值税专用发票'}}</span>
</div>
<div class="row flex-between items-center q-py-sm">
<span>发票类型</span>
<span class="text-bold">{{InvoiceDetails.InvoiceType==1?'企业':'个人'}}</span>
</div>
<div class="row flex-between items-center q-py-sm">
<span>发票抬头</span>
<span class="text-bold">{{InvoiceDetails.InvoiceTitle}}</span>
</div>
<div class="row flex-between items-center q-py-sm">
<span>邮箱地址</span>
<span class="text-bold">{{InvoiceDetails.Email}}</span>
</div>
</div>
</div>
<div v-if="false" class="order-body q-pt-md">
<div class="order-item rounded">
<div class="title row flex-between items-center">
<span class="">订单</span>
<el-button v-if="props.InvoiceDetails.OrderList.length>1" link
@clcik="MoreData">
<el-icon v-if="!isMore"><ArrowRight /></el-icon>
<el-icon v-else><ArrowUp /></el-icon>
</el-button>
</div>
<!-- :class="[!isMore||isMore?'animate__fadeInUp':'']" -->
<div class="animate__animated">
<div v-for="x in Orders" :key="x.OrderId"
class="order-list" @click="forwardOrderDetail(x.OrderId)">
<div class="bg-white row flex-between q-px-md q-pt-md text-5B5D62">
<span>{{ x.PayTime }}</span>
<span class="q-ml-md">
<el-button link @click="forwardOrderDetail(x.OrderId)">{{ x.OrderNum }}</el-button>
</span>
</div>
<div class="bg-white rounded row items-center q-pb-md">
<div class="item items-center" style="padding: 5px 10px;">
<div>{{ x.PriceTypeName }}_{{ x.VipName }}</div>
</div>
<div class="item">{{x.InvalidName}}</div>
<div class="item col text-right">¥{{ x.TradePrice.toFixed(2) }}</div>
</div>
</div>
</div>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="DownloadInvoice(InvoiceDetails.InvoiceFile[0])">查看发票</el-button>
</div>
</template>
</el-dialog>
</template>
<script lang="ts" setup>
import { ApiResult, VipType } from '@/configs/axios'
import { EntMemberRight, FreeMemberRight, PersonMemberRight } from '@/configs/customer'
import OrderService from '@/services/OrderService'
import { ref, onMounted, reactive, watch } from 'vue'
import { ElMessage, FormInstance, FormRules } from 'element-plus';
import { useRouter } from "vue-router";
import { openNewBlank } from '@/utils/common';
const router = useRouter()
const props = defineProps({
InvoiceDetails: {} as Object,
show: true as Boolean,
firm: 0 as Number
})
const isMore = ref(false)
const Orders = ref([] as any)
const emit = defineEmits<{
(event: 'close'): void,
(event: 'success'): void
}>()
const dialogVisible = ref(false)
const forwardOrderDetail = (id:string) => {
let url = props.firm?`/a/order/${encodeURIComponent(id)}/${props.firm}`:`/u/order/${encodeURIComponent(id)}`
// router.push(url)
openNewBlank(url)
}
const DownloadInvoice = (x:any) => {
// let name = x.Content.split('/')
// const xhr = new XMLHttpRequest()
// xhr.open('GET', x.Url, true)
// xhr.responseType = 'blob'
// xhr.onprogress = (e:any)=>{
// }
// xhr.onload = ()=>{
// var blob = xhr.response;
// let link = document.createElement('a');
// link.download = name[name.length-1];
// link.href = URL.createObjectURL(blob);
// link.click()
// }
// xhr.send()
window.open(x.Url)
// window.open("https://view.officeapps.live.com/op/view.aspx?src=" + encodeURIComponent(x.Url),'_blank')
}
const MoreData = () => {
isMore.value = !isMore.value
if(isMore.value) Orders.value = JSON.parse(JSON.stringify(props.InvoiceDetails.OrderList))
else{
Orders.value = []
Orders.value.push(props.InvoiceDetails.OrderList[0])
}
}
const close = ()=>{
emit('close')
}
watch(()=>props.show,(n,o)=>{
if(n) {
Orders.value = []
Orders.value.push(props.InvoiceDetails.OrderList[0])
dialogVisible.value = true
}
else dialogVisible.value = false
})
</script>
<style scoped>
.InvoiceVerify-title{
color: #9BA1AA;
}
.InvoiceVerify-box{
border-radius: 8px;
background: #F6F7F9;
padding: 10px 20px;
}
.order-body{
}
.order-body .order-item{
background: #f6f7f9;
border:1px solid rgba(0,0,0,.08);
font-size: 14px;
}
.order-body .order-item .title{
padding: 0 14px;
height: 35px;
line-height: 35px;
color:grey;
white-space: nowrap;
overflow: hidden;
}
.order-body .order-item .item{
height: auto;
line-height: 1;
color: #000;
white-space: nowrap;
overflow: hidden;
padding: 0 10px;
}
.order-list{
border-bottom: 1px solid rgba(0,0,0,.08);
}
.order-list:last-child{
border: 0;
}
</style>
\ No newline at end of file
<template>
<el-dialog v-model="dialogVisible"
width="450"
:show-close="StepNumber==3?false:true"
:title="dialogTitle"
:close-on-press-escape="false" :close-on-click-modal="false"
@close="close">
<!-- 填写发票信息 -->
<div v-if="StepNumber==1" class="FillOutInvoice">
<div class="FillOutInvoice-tips fz13">
<p class="q-mb-md">填写须知</p>
<ul>
<li>提交前请确认填写信息完整无误,已经开具的发票不可重开:</li>
<li>增值税电子发票和纸质发票具有相同法律效力,均支持报销;</li>
<li>更多问题请咨询在线客服。</li>
</ul>
</div>
<el-divider border-style="dotted" />
<el-form ref="BillingFormRef" :model="BillingParameter" :rules="rules" label-width="85px">
<div class="row fz14 q-pb-md">
<div class="FillOutInvoice-title q-pr-md">发票金额</div>
<span class="text-bold text-red">{{InvoiceDatas.total.toFixed(2)}}</span>
</div>
<div class="row items-center fz14">
<div class="FillOutInvoice-title shrink q-pr-md">开具方式</div>
<div>
<el-radio-group v-model="BillingParameter.IssuedType" @change="getBillingType">
<el-radio :label="1" class="row items-center">
<span class="text-black">
<span>电子普通发票</span>
<!-- <el-icon color="#9BA1AA" style="position: relative;top: 2px;left: 2px;">
<Warning style="transform: rotate(180deg);"/>
</el-icon> -->
</span>
</el-radio>
<el-radio :label="2">
<span class="text-black">
增值税专用发票
</span>
</el-radio>
</el-radio-group>
</div>
</div>
<div class="row">
<div class="FillOutInvoice-title shrink q-pr-md">&nbsp;</div>
<div class="FillOutInvoice-InstBox col">
<ol class="FillOutInvoice-Inst fz13 text-black">
<template v-if="BillingParameter.IssuedType==1">
<li>电子普通发票单张最高开票金额为10000元;</li>
<li>若为香港、海外的公司或工会等无税号,请联系在线客服开票;</li>
<li>开票申请提交后,电子普通发票将在3个工作日内发到您的邮箱。</li>
</template>
<template v-if="BillingParameter.IssuedType==2">
<li>若为香港、海外的公司或工会等无税号,请联系在线客服开票;</li>
<li>若开票失败,请耐心等待1-2工作日,我们会及时处理并开具发票。</li>
</template>
</ol>
</div>
</div>
<div class="row items-center fz14 q-py-md">
<div class="FillOutInvoice-title shrink q-pr-md">发票类型</div>
<div>
<p v-if="BillingParameter.IssuedType==2" class="text-black q-py-sm">
企业
</p>
<el-radio-group v-else v-model="BillingParameter.InvoiceType">
<el-radio :label="1" class="row items-center">
<span class="text-black">
企业
</span>
</el-radio>
<el-radio :label="2">
<span class="text-black">
个人
</span>
</el-radio>
</el-radio-group>
</div>
</div>
<el-form-item label="发票抬头" prop="InvoiceTitle">
<el-input v-model="BillingParameter.InvoiceTitle" placeholder="例如:高小定"></el-input>
</el-form-item>
<el-form-item label="税号" prop="InvoiceTaxNo">
<el-input v-model="BillingParameter.InvoiceTaxNo" placeholder="例如:1232000046600736XP"></el-input>
</el-form-item>
<el-form-item label="邮箱地址" prop="Email">
<el-input v-model="BillingParameter.Email" placeholder="例如:gaoxiaoding@gaoding.com"></el-input>
</el-form-item>
</el-form>
</div>
<div v-if="StepNumber==2" class="InvoiceVerify">
<p class="InvoiceVerify-title fz14 q-pb-lg">请确认信息无误,提交后将无法修改。</p>
<div class="InvoiceVerify-box fz14">
<div class="row flex-between items-center q-py-sm">
<span>开票金额</span>
<span class="text-bold">¥{{InvoiceDatas.total.toFixed(2)}}</span>
</div>
<div class="row flex-between items-center q-py-sm">
<span>开具方式</span>
<span class="text-bold">{{BillingParameter.IssuedType==1?'电子普通发票':'增值税专用发票'}}</span>
</div>
<div class="row flex-between items-center q-py-sm">
<span>发票类型</span>
<span class="text-bold">{{BillingParameter.InvoiceType==1?'企业':'个人'}}</span>
</div>
<div class="row flex-between items-center q-py-sm">
<span>发票抬头</span>
<span class="text-bold">{{BillingParameter.InvoiceTitle}}</span>
</div>
<div class="row flex-between items-center q-py-sm">
<span>邮箱地址</span>
<span class="text-bold">{{BillingParameter.Email}}</span>
</div>
</div>
</div>
<div v-if="StepNumber==3" class="InvoiceResult">
<div class="row items-center">
<el-icon color="#1CCC66" size="25"><SuccessFilled /></el-icon>
<span class="text-black fz20 q-pl-lg">提交成功</span>
</div>
<div class="row fz14">
<div style="width: 25px;">&nbsp;</div>
<div class="q-pl-lg q-pt-md" style="color: #9BA1AA;">电子发票将在3个工作日内发送到您的邮箱。</div>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<template v-if="StepNumber==1">
<el-button @click="close">取消</el-button>
<el-button type="primary"
@click="submitForm(BillingFormRef)">
申请开票
</el-button>
</template>
<template v-if="StepNumber==2">
<el-button @click="StepNumber=1,dialogTitle='申请开票'">返回修改</el-button>
<el-button type="primary"
@click="setOrderInvoice" :loading="loading">
确认提交
</el-button>
</template>
<template v-if="StepNumber==3">
<el-button type="primary"
@click="success">
知道了
</el-button>
</template>
</div>
</template>
</el-dialog>
</template>
<script lang="ts" setup>
import { ApiResult, VipType } from '@/configs/axios'
import { EntMemberRight, FreeMemberRight, PersonMemberRight } from '@/configs/customer'
import OrderService from '@/services/OrderService'
import { ref, onMounted, reactive, watch } from 'vue'
import { ElMessage, FormInstance, FormRules } from 'element-plus';
const props = defineProps({
InvoiceDatas: {} as Object,
show: true as Boolean
})
const emit = defineEmits<{
(event: 'close'): void,
(event: 'success'): void
}>()
const OrderInvoiceRef = ref()
const dialogVisible = ref(false)
const dialogTitle = ref('申请开票')
const StepNumber = ref(1)
const loading = ref(false)
const BillingParameter = reactive({
IssuedType: 1,
InvoiceType: 1,
InvoiceTitle: '',
InvoiceTaxNo: '',
Email: '',
OrderIds: [],
})
const BillingFormRef = ref<FormInstance>()
const rules = reactive<FormRules<RuleForm>>({
InvoiceTitle: [
{ required: true, message: '请填写发票抬头', trigger: 'blur' },
],
InvoiceTaxNo: [
{ required: true, message: '请填写纳税人识别号', trigger: 'blur' },
{ min: 6, message: '请填写正确的纳税人识别号', trigger: 'blur' },
],
Email: [
{ required: true, message: '请填写邮箱', trigger: 'blur' },
{ min: 6, message: '请填写正确的邮箱', trigger: 'blur' },
],
})
const InvoiceInfor = ref([] as any)
const submitForm = async (formEl: FormInstance | undefined) => {
BillingParameter.OrderIds = props.InvoiceDatas.isMore?props.InvoiceDatas.Ids:props.InvoiceDatas.orderid
if (!formEl) return
await formEl.validate(async (valid) => {
if (valid) {
StepNumber.value = 2
dialogTitle.value = '发票信息确认'
}
})
}
const setOrderInvoice = async () => {
loading.value = true
const response = await OrderService.SetPPTUserInvoice(BillingParameter)
if(response.data.resultCode == ApiResult.SUCCESS){
StepNumber.value = 3
dialogTitle.value = ''
if (!BillingFormRef.value) return
BillingFormRef.value.resetFields()
} else ElMessage.warning({
showClose: true,
message: `${response.data.message}`,
})
loading.value = false
}
const success = () => {
emit('success')
}
const getBillingType = () =>{
if(BillingParameter.IssuedType==2) BillingParameter.InvoiceType = 1
}
const close = ()=>{
emit('close')
if (!BillingFormRef.value) return
BillingFormRef.value.resetFields()
}
const getInvoiceInfor = async () => {
const response = await OrderService.GetUserDutyParagraph()
if(response.data.resultCode == ApiResult.SUCCESS){
if(response.data.data.Email){
InvoiceInfor.value = response.data.data
BillingParameter.IssuedType = InvoiceInfor.value.IssuedType
BillingParameter.InvoiceType = InvoiceInfor.value.InvoiceType
BillingParameter.InvoiceTitle = InvoiceInfor.value.InvoiceTitle
BillingParameter.InvoiceTaxNo = InvoiceInfor.value.InvoiceTaxNo
BillingParameter.Email = InvoiceInfor.value.Email
}
}
}
getInvoiceInfor()
watch(()=>props.show,(n,o)=>{
if(n) {
StepNumber.value = 1
dialogVisible.value = true
}
else dialogVisible.value = false
})
</script>
<style scoped>
.FillOutInvoice{
}
.FillOutInvoice-tips{
color: #9BA1AA;
}
.FillOutInvoice-tips ul{
padding: 0 25px;
}
.FillOutInvoice-tips ul li{
list-style: disc;
padding-bottom: 5px;
}
.FillOutInvoice-title{
width: 85px;
font-size: 14px;
text-align: right;
}
.FillOutInvoice-InstBox{
border-radius: 8px;
background: #FEF3E9;
border: 1px solid #FCE8D3;
padding: 8px 0;
}
.FillOutInvoice-Inst{
list-style-type:demical;
padding: 0 25px;
}
.InvoiceVerify-title{
color: #9BA1AA;
}
.InvoiceVerify-box{
border-radius: 8px;
background: #F6F7F9;
padding: 10px 20px;
}
</style>
\ No newline at end of file
......@@ -67,7 +67,7 @@
</template>
<script lang="ts" setup>
import { computed, onMounted, onUnmounted, ref, watch } from 'vue'
import { computed, onMounted, onUnmounted, ref, watch, inject } from 'vue'
import { storeToRefs } from 'pinia'
import { debounce } from 'lodash'
import { useMainStore, useSlidesStore } from '@/store'
......@@ -78,6 +78,9 @@ import useHistorySnapshot from '@/hooks/useHistorySnapshot'
import ElementOutline from '@/views/components/element/ElementOutline.vue'
import ProsemirrorEditor from '@/views/components/element/ProsemirrorEditor.vue'
import { ToolbarStates } from '@/types/toolbar'
import { injectKeyTemplate } from '@/types/injectKey'
const props = defineProps<{
elementInfo: PPTTextElement
......@@ -97,12 +100,15 @@ const editorRef = ref()
const shadow = computed(() => props.elementInfo.shadow)
const { shadowStyle } = useElementShadow(shadow)
const fullLockVisible = ref(0)
const searchData = ref({} as any)
searchData.value = inject(injectKeyTemplate)
const handleSelectElement = (e: MouseEvent | TouchEvent, canMove = true) => {
if(e.button && e.button== 1) return
if (props.elementInfo.lock) return
e.stopPropagation()
if(!searchData.value.isTeamManage) mainStore.setToolbarState(ToolbarStates.EL_NORMALDATA)
props.selectElement(e, props.elementInfo, canMove)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment