Commit 67a33aed authored by zhengke's avatar zhengke

Merge branch 'master' into 1.4.0

# Conflicts:
#	src/views/TemplateCenter/font.vue
parents 4e505c94 3bd7edd8
...@@ -7,4 +7,4 @@ VUE_APP_SHARE_URL = 'http://127.0.0.1:8080' ...@@ -7,4 +7,4 @@ VUE_APP_SHARE_URL = 'http://127.0.0.1:8080'
VUE_APP_PDF_URL = 'http://127.0.0.1:5164' VUE_APP_PDF_URL = 'http://127.0.0.1:5164'
# VUE_APP_API_URL = 'https://reborn.oytour.com/api/common/post' # VUE_APP_API_URL = 'https://reborn.oytour.com/api/common/post'
# VUE_APP_UPLOADURLAPI_URL = 'https://upload.oytour.com' # VUE_APP_UPLOADURLAPI_URL = 'https://upload.oytour.com'
# VUE_APP_SHARE_URL = 'http://vitto.com' VUE_APP_SHARE_URL = 'http://vitto.com'
\ No newline at end of file \ No newline at end of file
...@@ -161,6 +161,12 @@ page { ...@@ -161,6 +161,12 @@ page {
.text-info{ .text-info{
color:#b1b7cf; color:#b1b7cf;
} }
.text-black{
color: black;
}
.text-red{
color: red;
}
.bg-white{ .bg-white{
background-color: #FFF; background-color: #FFF;
} }
...@@ -489,9 +495,6 @@ page { ...@@ -489,9 +495,6 @@ page {
.q-pt-md{ .q-pt-md{
padding-top: 12px; padding-top: 12px;
} }
.q-pb-md{
padding-bottom: 10px;
}
.q-ma-lg{ .q-ma-lg{
margin:20px margin:20px
} }
...@@ -598,9 +601,15 @@ page { ...@@ -598,9 +601,15 @@ page {
.fz12{ .fz12{
font-size: 12px; font-size: 12px;
} }
.fz13{
font-size: 13px;
}
.fz14{ .fz14{
font-size: 14px; font-size: 14px;
} }
.fz15{
font-size: 15px;
}
.fz16{ .fz16{
font-size: 16px; font-size: 16px;
} }
......
...@@ -115,11 +115,7 @@ ...@@ -115,11 +115,7 @@
:class="[currentSearchType==2?'DiskRHActive':'']" class="cusor-pointer"> :class="[currentSearchType==2?'DiskRHActive':'']" class="cusor-pointer">
<div style="position: relative;width: 95px;height: 34px;"> <div style="position: relative;width: 95px;height: 34px;">
<el-button color="#EFEFEF" style="position:absolute;left: 0;right: 0;z-index: 2;"> <el-button color="#EFEFEF" style="position:absolute;left: 0;right: 0;z-index: 2;">
<span class="cusor-pointer">添加时间</span> <span class="cusor-pointer">添加时间</span> <el-icon color="#9DA2AA" class="el-icon--right"><arrow-down /></el-icon>
<el-icon v-if="dateArr.length==0" color="#9DA2AA" class="el-icon--right"><arrow-down /></el-icon>
<el-icon v-else color="#9DA2AA" class="el-icon--right">
<CircleClose @click.stop="dateArr=[],ClearOption(),getDate()"/>
</el-icon>
</el-button> </el-button>
<div class="CloudDisk-R-Date"> <div class="CloudDisk-R-Date">
<el-date-picker <el-date-picker
......
...@@ -6,12 +6,10 @@ ...@@ -6,12 +6,10 @@
class="fz14" label="" v-model="item.check" @click.stop="item.check=!item.check"/> class="fz14" label="" v-model="item.check" @click.stop="item.check=!item.check"/>
<div class="CloudDisk-R-Box cursor-pointer" :key="index"> <div class="CloudDisk-R-Box cursor-pointer" :key="index">
<div class="CloudDisk-R-Img"> <div class="CloudDisk-R-Img">
<el-image :src="item.FilePath" style="width: 100%; height: 100%;" <el-image class="row items-center" :src="item.FilePath" style="width: 100%; height: 100%;"
fit="cover"> fit="cover">
<template #error> <template #error>
<div class="row items-center" style="height: 100%;"> <el-image :src="errImg"></el-image>
<el-image :src="errImg"></el-image>
</div>
</template> </template>
</el-image> </el-image>
</div> </div>
...@@ -27,7 +25,7 @@ ...@@ -27,7 +25,7 @@
</template> </template>
<div class="MoreClickCenter column" @mousedown.stop="handleChildMouseDown"> <div class="MoreClickCenter column" @mousedown.stop="handleChildMouseDown">
<div class="cloudDownName microsoft"> <div class="cloudDownName microsoft">
<div class="col row items-center user-nickname q-pl-sm" style="color:#000;" v-if="editorTarget!=item.DetailsId"> <div class="col row items-center user-nickname" style="color:#000;" v-if="editorTarget!=item.DetailsId">
<span class="grow text-left">{{item.FileName}}</span> <span class="grow text-left">{{item.FileName}}</span>
<IconPencli size="14" class="q-ml-md cusor-pointer editor-pencli" @click.stop="setNameHandler(item)"></IconPencli> <IconPencli size="14" class="q-ml-md cusor-pointer editor-pencli" @click.stop="setNameHandler(item)"></IconPencli>
</div> </div>
...@@ -227,6 +225,7 @@ ...@@ -227,6 +225,7 @@
.CloudDisk-R-Img{ .CloudDisk-R-Img{
width: 12.85vw; width: 12.85vw;
height: 12.85vw; height: 12.85vw;
background: #f1f2f4;
margin-bottom: 9px; margin-bottom: 9px;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
......
...@@ -73,7 +73,9 @@ ...@@ -73,7 +73,9 @@
<el-image class="row items-center" :src="item.FilePath" style="width: 100%; height: 100%;" <el-image class="row items-center" :src="item.FilePath" style="width: 100%; height: 100%;"
fit="cover"> fit="cover">
<template #error> <template #error>
<el-image :src="errImg"></el-image> <div class="row items-center" style="height: 100%;">
<el-image :src="errImg"></el-image>
</div>
</template> </template>
</el-image> </el-image>
<!-- <el-image <!-- <el-image
...@@ -659,6 +661,7 @@ onBeforeUnmount(() => { ...@@ -659,6 +661,7 @@ onBeforeUnmount(() => {
.CloudDisk-R-Img{ .CloudDisk-R-Img{
width: 80px; width: 80px;
height: 80px; height: 80px;
background: #f1f2f4;
margin-bottom: 9px; margin-bottom: 9px;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<el-table-column type="selection" width="55"/> <el-table-column type="selection" width="55"/>
<el-table-column label="基本信息" show-overflow-tooltip min-width="400"> <el-table-column label="基本信息" show-overflow-tooltip min-width="400">
<template #default="scope"> <template #default="scope">
<div class="row items-center"> <div class="row items-center CloudDisk-R-Img">
<el-image <el-image
class="cursor-pointer row items-center" class="cursor-pointer row items-center"
style="width: 50px; height: auto" style="width: 50px; height: auto"
...@@ -18,9 +18,7 @@ ...@@ -18,9 +18,7 @@
@click.stop="getImg(scope.row,scope.$index)" @click.stop="getImg(scope.row,scope.$index)"
> >
<template #error> <template #error>
<div class="row items-center" style="height: 100%;"> <el-image :src="errImg"></el-image>
<el-image :src="errImg"></el-image>
</div>
</template> </template>
</el-image> </el-image>
<div class="cloudDownName microsoft q-pl-md"> <div class="cloudDownName microsoft q-pl-md">
...@@ -248,4 +246,7 @@ ...@@ -248,4 +246,7 @@
padding-left: 24px; padding-left: 24px;
padding-bottom: 20px; padding-bottom: 20px;
} }
.CloudDisk-R-Img .el-image{
background: #f1f2f4;
}
</style> </style>
\ No newline at end of file
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</template> </template>
<div class="MoreClickCenter column" @mousedown.stop="handleChildMouseDown"> <div class="MoreClickCenter column" @mousedown.stop="handleChildMouseDown">
<div class="cloudDownName microsoft"> <div class="cloudDownName microsoft">
<div class="col row items-center user-nickname q-pl-sm" style="color:#000;" v-if="editorTarget!=item.DetailsId"> <div class="col row items-center user-nickname" style="color:#000;" v-if="editorTarget!=item.DetailsId">
<span class="grow text-left">{{item.FileName}}</span> <span class="grow text-left">{{item.FileName}}</span>
<IconPencli size="14" class="q-ml-md cusor-pointer editor-pencli" @click.stop="setNameHandler(item)"></IconPencli> <IconPencli size="14" class="q-ml-md cusor-pointer editor-pencli" @click.stop="setNameHandler(item)"></IconPencli>
</div> </div>
...@@ -234,6 +234,7 @@ ...@@ -234,6 +234,7 @@
.CloudDisk-R-Img{ .CloudDisk-R-Img{
width: 12.85vw; width: 12.85vw;
height: auto; height: auto;
background: #f1f2f4;
margin-bottom: 9px; margin-bottom: 9px;
border-radius: 8px; border-radius: 8px;
box-shadow: 0px 0px 13px 0px #eee; box-shadow: 0px 0px 13px 0px #eee;
......
...@@ -41,7 +41,7 @@ export default (MapDOM: Ref<HTMLElement | undefined>, loadingStatus: Ref<boolean ...@@ -41,7 +41,7 @@ export default (MapDOM: Ref<HTMLElement | undefined>, loadingStatus: Ref<boolean
}) })
map.zoomControl = new am4maps.ZoomControl(); map.zoomControl = new am4maps.ZoomControl();
map.zoomControl.slider.height = 100; map.zoomControl.slider.height = 100;
map.maxZoomLevel = 64 map.maxZoomLevel = 128
worldSeries = map.series.push(new am4maps.MapPolygonSeries()); worldSeries = map.series.push(new am4maps.MapPolygonSeries());
worldSeries.exclude = ["AQ"]; worldSeries.exclude = ["AQ"];
...@@ -77,6 +77,7 @@ export default (MapDOM: Ref<HTMLElement | undefined>, loadingStatus: Ref<boolean ...@@ -77,6 +77,7 @@ export default (MapDOM: Ref<HTMLElement | undefined>, loadingStatus: Ref<boolean
const initCountry = () => { const initCountry = () => {
countrySeries = map.series.push(new am4maps.MapPolygonSeries()); countrySeries = map.series.push(new am4maps.MapPolygonSeries());
countrySeries.useGeodata = true; countrySeries.useGeodata = true;
countrySeries.hide(); countrySeries.hide();
countrySeries.geodataSource.events.on("done", () => { countrySeries.geodataSource.events.on("done", () => {
......
...@@ -182,7 +182,6 @@ const forwardUserCenter = ()=>{ ...@@ -182,7 +182,6 @@ const forwardUserCenter = ()=>{
} }
const forward = (item:any,type:any)=>{ const forward = (item:any,type:any)=>{
if(item.Url){ if(item.Url){
current.value = -1
if(item.Url.includes('http://')||item.Url.includes('https://')) openNewBlank(item.Url) if(item.Url.includes('http://')||item.Url.includes('https://')) openNewBlank(item.Url)
else router.push(item.Url) else router.push(item.Url)
}else{ }else{
......
...@@ -22,6 +22,8 @@ import { ref, watch } from "vue" ...@@ -22,6 +22,8 @@ import { ref, watch } from "vue"
import { useRouter } from "vue-router" import { useRouter } from "vue-router"
const { token,userInfo } = storeToRefs(useUserStore()) const { token,userInfo } = storeToRefs(useUserStore())
const currentId = ref('')
const water = ref<any>() const water = ref<any>()
const gaps = [[100,100],[150,150],[200,200]] const gaps = [[100,100],[150,150],[200,200]]
const exportRule = ['/editor/'] const exportRule = ['/editor/']
...@@ -47,6 +49,7 @@ const waterVisibleHandler = ()=>{ ...@@ -47,6 +49,7 @@ const waterVisibleHandler = ()=>{
showWater.value = ruleRouter.value.findIndex(x=>url.includes(x))!=-1 showWater.value = ruleRouter.value.findIndex(x=>url.includes(x))!=-1
} }
const freeUserWatermake = ()=>{ const freeUserWatermake = ()=>{
ruleRouter.value=[]
ruleRouter.value.push(...previewRule) ruleRouter.value.push(...previewRule)
ruleRouter.value.push(...exportRule) ruleRouter.value.push(...exportRule)
water.value={ water.value={
...@@ -65,6 +68,16 @@ watch(() => router.currentRoute.value.path, (toPath) => { ...@@ -65,6 +68,16 @@ watch(() => router.currentRoute.value.path, (toPath) => {
waterVisibleHandler() waterVisibleHandler()
},{immediate: true,deep: true}) },{immediate: true,deep: true})
watch(()=>userInfo.value, (newUser)=>{
let tempId = userInfo.value && userInfo.value.id ? userInfo.value.id : ''
if(tempId!=currentId.value){
if(userInfo.value.iv || userInfo.value.it) loadWater()
else freeUserWatermake()
currentId.value = tempId
}
})
if(userInfo.value && userInfo.value.id) currentId.value=userInfo.value.id
if(userInfo.value.iv || userInfo.value.it) loadWater() if(userInfo.value.iv || userInfo.value.it) loadWater()
else freeUserWatermake() else freeUserWatermake()
</script> </script>
......
...@@ -209,6 +209,7 @@ const ConfirmCreation = () => { ...@@ -209,6 +209,7 @@ const ConfirmCreation = () => {
}) })
} }
if(setTemplateType.value==1&&datas.TemplateBoxRec&&datas.TemplateBoxRec.Id==6){ if(setTemplateType.value==1&&datas.TemplateBoxRec&&datas.TemplateBoxRec.Id==6){
searchData.value.isTeamManage = false
return openNewBlank(`/market/create/trip`) return openNewBlank(`/market/create/trip`)
} }
if(setTemplateType.value==2&&!datas.TemplateBoxRec&&!CustomSwitch.value) { if(setTemplateType.value==2&&!datas.TemplateBoxRec&&!CustomSwitch.value) {
...@@ -218,6 +219,7 @@ const ConfirmCreation = () => { ...@@ -218,6 +219,7 @@ const ConfirmCreation = () => {
}) })
} }
if(setTemplateType.value==2&&datas.TemplateBoxRec&&datas.TemplateBoxRec.Id==7) { if(setTemplateType.value==2&&datas.TemplateBoxRec&&datas.TemplateBoxRec.Id==7) {
searchData.value.isTeamManage = false
return openNewBlank(`/market/create/ad`) return openNewBlank(`/market/create/ad`)
} }
if(setTemplateType.value==2&&CustomSwitch.value&&(!datas.CustomSize.width||!datas.CustomSize.height)){ if(setTemplateType.value==2&&CustomSwitch.value&&(!datas.CustomSize.width||!datas.CustomSize.height)){
...@@ -277,6 +279,7 @@ const addTemplate = (type:number) =>{ ...@@ -277,6 +279,7 @@ const addTemplate = (type:number) =>{
if(setTemplateType.value==2) Title = '广告名称' if(setTemplateType.value==2) Title = '广告名称'
slidesStore.setTitle(Title) slidesStore.setTitle(Title)
slidesStore.setSlides(list) slidesStore.setSlides(list)
searchData.value.isTeamManage = false
router.push({ router.push({
path:`/create_template/${type}` path:`/create_template/${type}`
}) })
......
...@@ -179,11 +179,6 @@ const ToggleImg = (text: String) => { ...@@ -179,11 +179,6 @@ const ToggleImg = (text: String) => {
} }
} }
const addTemplate = (type:number) =>{
router.push({
path:`/create_template/${type}`
})
}
// 图片滚动翻页 // 图片滚动翻页
const handleScroll = (e) =>{ const handleScroll = (e) =>{
......
...@@ -257,7 +257,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -257,7 +257,7 @@ const routes: RouteRecordRaw[] = [
} }
}, },
{ {
path: '/a/order', path: '/a/order/:activeName?',
component: () => import('@/views/TeamCenter/Order.vue'), component: () => import('@/views/TeamCenter/Order.vue'),
meta:{ meta:{
title:'我的订单/发票' title:'我的订单/发票'
...@@ -278,7 +278,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -278,7 +278,7 @@ const routes: RouteRecordRaw[] = [
} }
}, },
{ {
path: '/a/order/:id', path: '/a/orderDetail/:id/:isFirm/:activeName',
component: () => import('@/views/TeamCenter/OrderDetail.vue'), component: () => import('@/views/TeamCenter/OrderDetail.vue'),
meta:{ meta:{
title:'订单详情' title:'订单详情'
...@@ -308,14 +308,14 @@ const routes: RouteRecordRaw[] = [ ...@@ -308,14 +308,14 @@ const routes: RouteRecordRaw[] = [
} }
}, },
{ {
path: '/u/order', path: '/u/order/:activeName?',
component: () => import('@/views/UserCenter/Order.vue'), component: () => import('@/views/UserCenter/Order.vue'),
meta:{ meta:{
title:'我的订单/发票' title:'我的订单/发票'
} }
}, },
{ {
path: '/u/order/:id', path: '/u/orderDetail/:id/:activeName',
component: () => import('@/views/UserCenter/OrderDetail.vue'), component: () => import('@/views/UserCenter/OrderDetail.vue'),
meta:{ meta:{
title:'订单详情' title:'订单详情'
......
...@@ -3,6 +3,22 @@ import Api,{ HttpResponse, Result } from './../utils/request'; ...@@ -3,6 +3,22 @@ import Api,{ HttpResponse, Result } from './../utils/request';
class OrderService{ 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>{ static async CreatePPTPayOrder(orderid:Number):Promise<HttpResponse>{
let msg = {orderid} let msg = {orderid}
return Api.Post("ppt_CreatePPTPayOrder",msg) return Api.Post("ppt_CreatePPTPayOrder",msg)
......
...@@ -92,7 +92,7 @@ export const ResolveText = (item: any, index: number,offsetLeft:number,offsetTop ...@@ -92,7 +92,7 @@ export const ResolveText = (item: any, index: number,offsetLeft:number,offsetTop
let content = '' let content = ''
valuesStr.forEach((x: any,si:number) => { valuesStr.forEach((x: any,si:number) => {
if(x!='') if(x!='')
content += `<p style="${styleArray[si]}"><span style="${styleArray[si]}">${HtmlUtil.htmlEncodeByRegExp(x)}</span></p>` content += `<p style="${styleArray[si]}"><span style="${styleArray[si]}">${HtmlUtil.htmlEncodeByRegExp(x).replaceAll(" ","&nbsp;")}</span></p>`
}) })
const isVertical = item.layer.adjustments.typeTool.obj.textData.Ornt.value != 'Hrzn' const isVertical = item.layer.adjustments.typeTool.obj.textData.Ornt.value != 'Hrzn'
...@@ -139,7 +139,7 @@ export const ResolveText = (item: any, index: number,offsetLeft:number,offsetTop ...@@ -139,7 +139,7 @@ export const ResolveText = (item: any, index: number,offsetLeft:number,offsetTop
defaultFontName: fontName && fontName.length>0 ? fontName[0]:'', defaultFontName: fontName && fontName.length>0 ? fontName[0]:'',
defaultColor: color, defaultColor: color,
fill: background, fill: background,
lineHeight: leading<1?1:leading, lineHeight: leading<1?1:Number(leading.toFixed(1)),
wordSpace: tracking, wordSpace: tracking,
vertical: isVertical, vertical: isVertical,
contentStr: value, contentStr: value,
......
...@@ -67,7 +67,8 @@ ...@@ -67,7 +67,8 @@
</div> </div>
<div class="text-info text-small text-center q-pt-xs">你的创作空间</div> <div class="text-info text-small text-center q-pt-xs">你的创作空间</div>
<template v-if="!multipleUsers || multipleUsers.length==0"> <template v-if="!multipleUsers || multipleUsers.length==0">
<div class="q-mb-md" style="padding: 0 50px;"> <div class="q-mb-md"
:style="{'padding':currentLogin==2?'0 50px':'0 87px'}">
<passwordLogin v-if="currentLogin==1" @submitForm="(multUser)=> {multipleUsers=multUser}"></passwordLogin> <passwordLogin v-if="currentLogin==1" @submitForm="(multUser)=> {multipleUsers=multUser}"></passwordLogin>
<wechatLogin :current="currentLogin" v-show="currentLogin==2"></wechatLogin> <wechatLogin :current="currentLogin" v-show="currentLogin==2"></wechatLogin>
<div class="q-pt-lg"> <div class="q-pt-lg">
......
...@@ -115,7 +115,6 @@ const initCreateTemplate = ()=>{ ...@@ -115,7 +115,6 @@ const initCreateTemplate = ()=>{
const init =()=>{ const init =()=>{
//销售修改行程 //销售修改行程
searchData.value.isTeamManage = false
if(currentRoute.path.includes('/editor/') && params.id) initSellEditor() if(currentRoute.path.includes('/editor/') && params.id) initSellEditor()
else if(currentRoute.path.includes('/editor/')) initSellCreate() else if(currentRoute.path.includes('/editor/')) initSellCreate()
else if(currentRoute.path.includes('/team_editor/') && params.tid) initOpCreate() else if(currentRoute.path.includes('/team_editor/') && params.tid) initOpCreate()
......
...@@ -229,7 +229,7 @@ if(queryObj.value.Title) titleValue.value = queryObj.value.Title ...@@ -229,7 +229,7 @@ if(queryObj.value.Title) titleValue.value = queryObj.value.Title
const MonitoringNumber = ref(0) const MonitoringNumber = ref(0)
const MonitoringTNumber = ref(0) const MonitoringTNumber = ref(0)
const timer = 60 const timer = 30
const Countdown = ref<any>(timer) const Countdown = ref<any>(timer)
const intervalId = ref(null); const intervalId = ref(null);
const showTimer = ref(false); const showTimer = ref(false);
...@@ -239,13 +239,14 @@ const goType = ref(null) ...@@ -239,13 +239,14 @@ const goType = ref(null)
const goBack = (type:any) =>{ const goBack = (type:any) =>{
mainBackVisible.value = false mainBackVisible.value = false
goType.value = type goType.value = type
if(model.value==2){ if(model.value==2&&(searchData.value.MonitoringNumber>1||MonitoringTNumber.value>1)){
ElMessageBox.confirm( ElMessageBox.confirm(
'退出此页面将清空当前数据,是否保存当前数据,并退出?', '退出此页面将清空当前数据,是否保存当前数据,并退出?',
'提示', '提示',
{ {
confirmButtonText: '保存', confirmButtonText: '保存',
cancelButtonText: '退出', cancelButtonText: '退出',
distinguishCancelAndClose: true,
type: 'warning', type: 'warning',
} }
).then(() => { ).then(() => {
...@@ -254,8 +255,8 @@ const goBack = (type:any) =>{ ...@@ -254,8 +255,8 @@ const goBack = (type:any) =>{
intervalId.value = null; intervalId.value = null;
} }
setTemplate(0,1) setTemplate(0,1)
}).catch(() => { }).catch((action:string) => {
SaveStroke(type) if(action=='cancel') SaleExit(type)
}) })
}else{ }else{
...@@ -276,15 +277,22 @@ const goBack = (type:any) =>{ ...@@ -276,15 +277,22 @@ const goBack = (type:any) =>{
if(model.value==0) { if(model.value==0) {
path = `/market/op/${ConfigId.value}/${TempType.value}` path = `/market/op/${ConfigId.value}/${TempType.value}`
router.push({path}) router.push({path})
}else if(model.value==2){
SaleExit(type)
}else window.history.back() }else window.history.back()
searchData.value.isTeamManage = false
}).catch(() => {}) }).catch(() => {})
} }
} }
const SaveStroke = (type:any) => { const SaleExit = (type:any) => {
let path = '' searchData.value.isTeamManage = false
setNewDatas(type,0)
mainStore.setToolbarState(ToolbarStates.SLIDE_DESIGN)
let path ='/'
const t = useSlidesStore().viewportRatio<0?1:2
searchData.value.SalesEditor = null
if(type==1) { if(type==1) {
searchData.value.SalesEditor = router.currentRoute.value.params searchData.value.SalesEditor = router.currentRoute.value.params
if(searchData.value.sellId)searchData.value.TempId2 = queryObj.value.TempId if(searchData.value.sellId)searchData.value.TempId2 = queryObj.value.TempId
...@@ -405,7 +413,7 @@ const SetSellTemplate = async (type:Number,FolderId:Number,sellType:any) => { ...@@ -405,7 +413,7 @@ const SetSellTemplate = async (type:Number,FolderId:Number,sellType:any) => {
}) })
} }
// 保存并退出当前页 // 保存并退出当前页
if(sellType) SaveStroke(goType.value) if(sellType) SaleExit(goType.value)
}else{ }else{
ElMessage({ ElMessage({
showClose: true, showClose: true,
...@@ -647,17 +655,20 @@ const setTemplate = async (type:any,sellType:any) =>{ ...@@ -647,17 +655,20 @@ const setTemplate = async (type:any,sellType:any) =>{
clearInterval(intervalId.value); clearInterval(intervalId.value);
intervalId.value = null; intervalId.value = null;
if(type==1||!searchData.value.sellId){ if(type==1||!searchData.value.sellId){
let obj = {
FileName: queryObj.value.Title,
FileType: queryObj.value.TemplateType,
type: type,
}
journeyAdsDetails.value = obj
isCopyTo.value = true
if(sellType) await SetSellTemplate(type,0,sellType) if(sellType) await SetSellTemplate(type,0,sellType)
}else{ else{
let obj = {
FileName: queryObj.value.Title,
FileType: queryObj.value.TemplateType,
type: type,
}
journeyAdsDetails.value = obj
isCopyTo.value = true
}
}else if(!type&&searchData.value.sellId){
datas.loading = true datas.loading = true
await SetSellTemplate(type) if(sellType) await SetSellTemplate(type,-1,sellType)
else await SetSellTemplate(type)
} }
} }
} }
...@@ -692,26 +703,29 @@ watch(()=>autoSave.value,(newVal)=>{ ...@@ -692,26 +703,29 @@ watch(()=>autoSave.value,(newVal)=>{
}) })
watch(()=>slides.value,(newVal,oldVal)=>{ watch(()=>slides.value,(newVal,oldVal)=>{
if(model.value==2&&SalesEditor.value>0&&searchData.value.sellId){ if(model.value==2&&SalesEditor.value>0&&searchData.value.sellId){
if(!MonitoringNumber.value||MonitoringNumber.value<2) MonitoringNumber.value++ if(searchData.value.MonitoringNumber==0){
if(MonitoringNumber.value>1) { searchData.value.MonitoringNumber++
Countdown.value = timer if(searchData.value.MonitoringNumber&&searchData.value.MonitoringNumber>1) {
benginTimer() Countdown.value = timer
benginTimer()
}
// MonitoringNumber.value++
} }
} }
},{ },{
deep: true, deep: true,
immediate: false immediate: false
}) })
watch(()=>queryObj.value.Title,(newVal,oldVal)=>{ watch(()=>queryObj.value,(newVal,oldVal)=>{
if(model.value==2&&SalesEditor.value>0&&searchData.value.sellId){ if(model.value==2&&SalesEditor.value>0&&searchData.value.sellId){
if(!MonitoringTNumber.value||MonitoringTNumber.value<2) MonitoringTNumber.value++ MonitoringTNumber.value++
if(MonitoringTNumber.value>1) { if(MonitoringTNumber.value>1) {
Countdown.value = timer Countdown.value = timer
benginTimer() benginTimer()
} }
} }
},{
deep: true
}) })
handleUpdateTitle() handleUpdateTitle()
......
...@@ -752,7 +752,7 @@ const sellGetTripTemplate = async () =>{ ...@@ -752,7 +752,7 @@ const sellGetTripTemplate = async () =>{
newSlides.push(x) newSlides.push(x)
}) })
slidesStore.setSlides(newSlides) slidesStore.setSlides(newSlides)
searchData.value.MonitoringNumber = 0
} }
}else ElMessage({ }else ElMessage({
......
...@@ -117,7 +117,8 @@ ...@@ -117,7 +117,8 @@
const getDatas = async () => { const getDatas = async () => {
const response = await MatchingData.ScenicSearch(params) const response = await MatchingData.ScenicSearch(params)
if (response.data.resultCode == 1) { if (response.data.resultCode == 1) {
dataListAll.value = dataList.value = checkPoiCoverImg(response.data.data) let dataLists = response.data.data.filter(x=>x.Feature!='')
dataListAll.value = dataList.value = checkPoiCoverImg(dataLists)
} }
loading.value = false loading.value = false
} }
......
<template> <template>
<div class="q-mt-xs bg-white q-pa-xs rounded ElementTemplateData"> <div class="bg-white rounded ElementTemplateData">
<div class="column text-mdall"> <div class="column text-mdall">
<div class="column"> <div class="column">
<template v-if="CoverImg&&!isCoverImg"> <template v-if="CoverImg&&!isCoverImg">
...@@ -501,6 +501,9 @@ ...@@ -501,6 +501,9 @@
}) })
return return
} }
let color = datas.addColor.Name.slice(0,1)
let colorList = ColorList.value.filter(x=>{ return x.Name.toLowerCase().includes(color.toLowerCase())})
if(colorList.length>0&&!datas.addColor.Code) datas.addColor.Code = colorList[0].ID
if(datas.addColor.Content.indexOf('#')==-1){ if(datas.addColor.Content.indexOf('#')==-1){
ElMessage({ ElMessage({
showClose: true, showClose: true,
......
<template> <template>
<div ref="marketRef" class="Market-from"> <div ref="marketRef" class="Market-from">
<div class="Market-fromBj"></div> <div class="Market-fromBj"></div>
<div class=""> <div style="position: relative;z-index: 2;">
<div :class="[datas.scrollTop>200?'MarketHeader':'']"> <div :class="[datas.scrollTop>200?'MarketHeader':'']">
<!-- <adHeader v-if="!userInfo.iv&&!userInfo.it&&!userInfo.OpenScanCode" style="position: relative;z-index: 2;" <!-- <adHeader v-if="!userInfo.iv&&!userInfo.it&&!userInfo.OpenScanCode" style="position: relative;z-index: 2;"
@close="closeScanCode" @scanCode="isPublicAccount=true"></adHeader> --> @close="closeScanCode" @scanCode="isPublicAccount=true"></adHeader> -->
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</el-menu> </el-menu>
<el-button class="full-width pingfangr text-weight-bolder" @click="forwardSpace" style="font-size: 14px !important;" icon="arrow-left">返回工作台</el-button> <el-button class="full-width pingfangr text-weight-bolder" @click="forwardSpace" style="font-size: 14px !important;" icon="arrow-left">返回工作台</el-button>
</div> </div>
<el-scrollbar v-if="path!='/a/c'" class="col full-height user-center-body" wrap-style="overflow-x:unset;" view-style="padding-bottom:30px;"> <el-scrollbar v-if="path=='/a'||path=='/a/w'||path=='/a/info'||path=='/a/diss'" class="col full-height user-center-body" wrap-style="overflow-x:unset;" view-style="padding-bottom:30px;">
<router-view /> <router-view />
</el-scrollbar> </el-scrollbar>
<div v-else class="col full-height user-center-body" view-style="padding-bottom:30px;"> <div v-else class="col full-height user-center-body" view-style="padding-bottom:30px;">
...@@ -65,7 +65,7 @@ if(menus.value.length==0){ ...@@ -65,7 +65,7 @@ if(menus.value.length==0){
watch(() => router.currentRoute.value.path, (toPath) => { watch(() => router.currentRoute.value.path, (toPath) => {
if(!userInfo.value.showCloudDisk&&toPath=='/a/c'){ if(!userInfo.value.showCloudDisk&&toPath!='/a'&&toPath!='/a/w'&&toPath!='/a/info'&&toPath!='/a/diss'){
userInfo.value.showCloudDisk = true userInfo.value.showCloudDisk = true
location.reload() location.reload()
}else userInfo.value.showCloudDisk = false }else userInfo.value.showCloudDisk = false
......
<template> <template>
<div class=""> <Order :firm="type"></Order>
<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>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ApiResult } from "@/configs/axios";
import OrderService from "@/services/OrderService";
import { ref } from "vue"; import { ref } from "vue";
import { useRouter } from "vue-router"; import Order from '../UserCenter/Order.vue'
const activeName = ref<string>('all') const type = ref(1)
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()
</script> </script>
<style scoped> <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> </style>
\ No newline at end of file
<template> <template>
<div class="row items-center"> <OrderDetail></OrderDetail>
<IconLeft :size="18" class="q-mr-md cursor-pointer" @click="forwardOrder"></IconLeft> </template>
<div class="text-weight-bold cursor-pointer" @click="forwardOrder">订单/发票</div>
</div> <script lang="ts" setup>
<template v-if="order && !loading"> import OrderDetail from '../UserCenter/OrderDetail.vue'
<div class="q-mt-xl q-pa-xl rounded bg-info"> </script>
<el-steps style="max-width: 100%;margin: 0 auto;" :active="3" align-center>
<el-step title="选择商品" description="" /> <style scoped>
<el-step title="确认下单" description="" />
<el-step title="支付" description="" /> </style>
<el-step title="交易完成" description="" /> \ No newline at end of file
</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
...@@ -154,6 +154,7 @@ ...@@ -154,6 +154,7 @@
<el-table-column label="封面图"> <el-table-column label="封面图">
<template #default="scope" width="110"> <template #default="scope" width="110">
<el-image <el-image
class="row items-center"
style="width: 50px; height: auto" style="width: 50px; height: auto"
:src="scope.row.CoverImg" :src="scope.row.CoverImg"
:zoom-rate="1.2" :zoom-rate="1.2"
...@@ -164,9 +165,7 @@ ...@@ -164,9 +165,7 @@
fit="contain" fit="contain"
> >
<template #error> <template #error>
<div class="row items-center" style="height: 100%;"> <el-image :src="errImg"></el-image>
<el-image :src="errImg"></el-image>
</div>
</template> </template>
</el-image> </el-image>
</template> </template>
...@@ -441,6 +440,7 @@ const addTemplate = (type:number) =>{ ...@@ -441,6 +440,7 @@ const addTemplate = (type:number) =>{
// searchData.value.TemplateType = type // searchData.value.TemplateType = type
// marketStore.setMarket(!market) // marketStore.setMarket(!market)
// searchData.value.TempId = 0 // searchData.value.TempId = 0
searchData.value.isTeamManage = true
slidesStore.ClearSlides() slidesStore.ClearSlides()
router.push({ router.push({
path:`/create_template/${type}` path:`/create_template/${type}`
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<div class="col row"> <div class="col row">
<div class="user-center-menu column "> <div class="user-center-menu column ">
<el-menu :default-active="activeIndex" class="no-border md-menu col" router> <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> <component :is="x.icon" style="font-size: 20px;"></component>
<span class="q-ml-lg">{{ x.name }}</span> <span class="q-ml-lg">{{ x.name }}</span>
</el-menu-item> </el-menu-item>
......
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
<div class="addTemplateInput q-mt-xs q-mb-lg"> <div class="addTemplateInput q-mt-xs q-mb-lg">
<template v-for="(x,index) in multipleSelection"> <template v-for="(x,index) in multipleSelection">
<el-tag <el-tag
:color="x.ColorValue" :color="x.Content"
effect="dark" class="q-mr-xs w10"> effect="dark" class="q-mr-xs w10">
&nbsp; &nbsp;
</el-tag> </el-tag>
...@@ -300,7 +300,7 @@ ...@@ -300,7 +300,7 @@
} }
const handleSelectionChange = (val: any) =>{ const handleSelectionChange = (val: any) =>{
multipleSelection.value = val multipleSelection.value = val
datas.paramsParent.ColorList = val.length>0? val.map(x=> {return x.ID}) : 0 datas.paramsParent.ColorList = val.length>0? val.map(x=> {return x.ID}) : []
} }
// 批量设置颜色分类 // 批量设置颜色分类
const BatchSetting = () => { const BatchSetting = () => {
...@@ -348,6 +348,7 @@ ...@@ -348,6 +348,7 @@
if(result.data.resultCode==1){ if(result.data.resultCode==1){
datas.DominantColour = false datas.DominantColour = false
datas.requestLoading = false datas.requestLoading = false
datas.paramsParent.ColorList = []
toggleSelection() toggleSelection()
querySearchHandler() querySearchHandler()
}else{ }else{
...@@ -360,27 +361,31 @@ ...@@ -360,27 +361,31 @@
} }
const addEditColor = async () => { const addEditColor = async () => {
//添加、编辑颜色 //添加、编辑颜色
if(!datas.params.Name)return ElMessage({ if(!datas.params.Name)return ElMessage({
showClose: true, showClose: true,
message: '请完善颜色名称', message: '请完善颜色名称',
type: 'warning', type: 'warning',
}) })
if(!datas.params.Content){ let color = datas.params.Name.slice(0,1)
ElMessage({ let colorList = ColorList.value.filter(x=>{ return x.Name.toLowerCase().includes(color.toLowerCase())})
showClose: true, if(colorList.length>0&&!datas.params.Code&&datas.type==1) datas.params.Code = colorList[0].ID
message: '请完善颜色的16进制', if(!datas.params.Content){
type: 'warning', ElMessage({
}) showClose: true,
return message: '请完善颜色的16进制',
} type: 'warning',
if(datas.params.Content.indexOf('#')==-1){ })
ElMessage({ return
showClose: true, }
message: "色号需要在最前面加 # 号", if(datas.params.Content.indexOf('#')==-1){
type: 'warning', ElMessage({
}) showClose: true,
return message: "色号需要在最前面加 # 号",
} type: 'warning',
})
return
}
datas.requestLoading = true datas.requestLoading = true
if(datas.type==2) datas.params.Code = '' if(datas.type==2) datas.params.Code = ''
const result = await ConfigService.SetTemplateConfigData(datas.params) const result = await ConfigService.SetTemplateConfigData(datas.params)
...@@ -408,7 +413,7 @@ ...@@ -408,7 +413,7 @@
datas.params = JSON.parse(JSON.stringify(item)) datas.params = JSON.parse(JSON.stringify(item))
datas.params.Code = item.Code?Number(item.Code):'' datas.params.Code = item.Code?Number(item.Code):''
datas.params.Content = item.Content datas.params.Content = item.Content
datas.type = item.ChildList&&item.ChildList.length>0?2:1 datas.type = !item.Code?2:1
if(datas.type==2||(datas.type==1&&!datas.params.Name))datas.params.Name = item.Name if(datas.type==2||(datas.type==1&&!datas.params.Name))datas.params.Name = item.Name
datas.addEditVisible = true datas.addEditVisible = true
} }
......
<template> <template>
<div class="row items-center flex-between q-mb-lg"> <div class="row items-center flex-between q-mb-lg">
<div></div> <div></div>
<el-input style="max-width:600px" v-model="queryObj.keyWords" placeholder="请输入关键字" class="q-pr-33" clearable <el-input style="max-width:600px" v-model="queryObj.keyWords" placeholder="请输入关键字" class="q-pr-33" clearable
@keyup.enter="search"> @keyup.enter="search">
<template #append> <template #append>
<div class="Market-select-line absolute"></div> <div class="Market-select-line absolute"></div>
<div class="row items-center pointer"> <div class="row items-center pointer">
<img src="../../assets/img/home-search.png" width="21" height="21" <img src="../../assets/img/home-search.png" width="21" height="21"
@click="search"/> @click="search"/>
</div> </div>
</template> </template>
</el-input> </el-input>
<el-button type="primary" size="default" style="color: #ffff;" @click="addFont"> <el-button type="primary" size="default" style="color: #ffff;" @click="addFont">
新增字体 新增字体
</el-button> </el-button>
</div>
<el-table v-loading="loading" ref="dataTableRef" highlight-current-row
v-load-more="tableScrollHandler" :data="dataList" class="tableHBEbeef5 col" height="82vh">
<el-table-column label="字体名称" width="240">
<template #default="scope">
<span :style="{'font-family':scope.row.reduceName}">{{scope.row.label}}</span>
</template>
</el-table-column>
<el-table-column label="font-family" width="190">
<template #default="scope">
{{scope.row.fontFamily}}
</template>
</el-table-column>
<el-table-column label="url">
<template #default="scope">
{{scope.row.fontUrl}}
</template>
</el-table-column>
<el-table-column label="裁剪URL">
<template #default="scope">
{{scope.row.reduceUrl}}
</template>
</el-table-column>
<el-table-column label="操作" width="130">
<template #default="scope">
<el-button type="default" link :icon="Edit" size="small" @click.stop="editDelete(scope.row)">编辑</el-button>
<el-button type="default" link :icon="Delete" size="small" @click.stop="editDelete(scope.row,scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 编辑字体 -->
<el-dialog v-model="datas.addEditVisible" :align-center="true" :show-close="true" :close-on-press-escape="false"
:close-on-click-modal="false" style="width: 573px;" class="small-padding" @close="close">
<template #header>
<div class="text-title text-center fz16 PingFangSC">{{datas.params.id?'编辑':'新增'}}字体</div>
</template>
<div class="addTemplateBox q-mb-lg fz14">
<div class="row flex-end q-mb-lg">
<!-- :limit="1" -->
<el-button type="primary" size="small" style="color: #ffff;">
<el-upload
ref="upload"
:on-change="(uploadFile:any, uploadFiles:any)=> uploadFontHandler(uploadFile, uploadFiles,datas.params.fontFamily)"
action=""
multiple
:auto-upload="false"
accept=".ttf, .woff, otf"
:show-file-list="false"
:on-exceed="handleExceed"
>
<template #trigger>
<span class="text-white">{{datas.params.id?'替换':'上传'}}字体</span>
</template>
</el-upload>
</el-button>
</div>
<div class="addTemplateInput q-mt-xs q-mb-lg row items-center">
<span class="q-pr-md shrink">名称:</span>
<el-input min="750" v-model="datas.params.label"
placeholder="请输入字体名称" class=""></el-input>
<span class="q-px-md shrink">fontFamily:</span>
<el-input min="750" v-model="datas.params.fontFamily"
placeholder="请输入fontFamily" class=""></el-input>
</div>
<div class="addTemplateInput q-mt-xs q-mb-lg row items-center">
<span class="q-pr-md shrink">URL:</span>
<el-input min="750" type="textarea" v-model="datas.params.fontUrl"
placeholder="请输入URL" class=""></el-input>
</div>
<div class="addTemplateInput q-mt-xs row items-center">
<span class="q-pr-md shrink">裁剪URL:</span>
<el-input min="750" type="textarea" v-model="datas.params.reduceUrl"
placeholder="请输入裁剪字体URL" class=""></el-input>
</div>
<el-form ref="FormRef" :model="datas.paramsList" :rules="rules" label-width="120px">
<template v-for="(item,index) in datas.paramsList">
<el-form-item
:label="datas.paramsList.length>0?`名称 ${index+1} `:` ` "
:prop="`paramsList.${index}.label`"
:rules="rules.label"
label-width="100px"
label-position="left">
<el-input v-model="item.label" clearable></el-input>
</el-form-item>
<el-form-item
:label="datas.paramsList.length>0?`fontFamily ${index+1} `:` ` "
:prop="`paramsList.${index}.fontFamily`"
:rules="rules.fontFamily"
label-width="100px"
label-position="left">
<el-input v-model="item.fontFamily" clearable></el-input>
</el-form-item>
<el-form-item
:label="datas.paramsList.length>0?`URL ${index+1} `:` ` "
:prop="`paramsList.${index}.fontUrl`"
:rules="rules.fontUrl"
label-width="100px"
label-position="left">
<el-input v-model="item.fontUrl" clearable></el-input>
</el-form-item>
<el-form-item
:label="datas.paramsList.length>0?`裁剪URL ${index+1} `:` ` "
:prop="`paramsList.${index}.reduceUrl`"
:rules="rules.reduceUrl"
label-width="100px"
label-position="left">
<el-input v-model="item.reduceUrl" clearable></el-input>
</el-form-item>
</template>
</el-form>
</div>
<div class="text-center">
<el-button class="MarketIndexButtom MarketRec" type="primary" @click="ConfirmCreation(FormRef)"
:loading="requestLoading">
确认{{datas.params.id?'编辑':'新增'}}
</el-button>
</div> </div>
</el-dialog> <el-table v-loading="loading" ref="dataTableRef" highlight-current-row
</template> v-load-more="tableScrollHandler" :data="dataList" class="tableHBEbeef5 col" height="82vh">
<el-table-column label="字体名称" width="240">
<template #default="scope">
<span :style="{'font-family':scope.row.reduceName}">{{scope.row.label}}</span>
</template>
</el-table-column>
<el-table-column label="font-family" width="190">
<template #default="scope">
{{scope.row.fontFamily}}
</template>
</el-table-column>
<el-table-column label="url">
<template #default="scope">
{{scope.row.fontUrl}}
</template>
</el-table-column>
<el-table-column label="裁剪URL">
<template #default="scope">
{{scope.row.reduceUrl}}
</template>
</el-table-column>
<el-table-column label="操作" width="130">
<template #default="scope">
<el-button type="default" link :icon="Edit" size="small" @click.stop="editDelete(scope.row)">编辑</el-button>
<el-button type="default" link :icon="Delete" size="small" @click.stop="editDelete(scope.row,scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 编辑字体 -->
<el-dialog v-model="datas.addEditVisible" :align-center="true" :show-close="true" :close-on-press-escape="false"
:close-on-click-modal="false" style="width: 573px;" class="small-padding" @close="close">
<template #header>
<div class="text-title text-center fz16 PingFangSC">{{datas.params.id?'编辑':'新增'}}字体</div>
</template>
<div class="addTemplateBox q-mb-lg fz14">
<div class="row flex-end q-mb-lg">
<!-- :limit="1" -->
<el-button type="primary" size="small" style="color: #ffff;">
<el-upload
ref="upload"
:on-change="(uploadFile:any, uploadFiles:any)=> uploadFontHandler(uploadFile, uploadFiles,datas.params.fontFamily)"
action=""
multiple
:auto-upload="false"
accept=".ttf, .woff, otf"
:show-file-list="false"
:on-exceed="handleExceed">
<template #trigger>
<span class="text-white">{{datas.params.id?'替换':'上传'}}字体</span>
</template>
</el-upload>
</el-button>
</div>
<div class="addTemplateInput q-mt-xs q-mb-lg row items-center">
<span class="q-pr-md shrink">名称:</span>
<el-input min="750" v-model="datas.params.label"
placeholder="请输入字体名称" class=""></el-input>
<span class="q-px-md shrink">fontFamily:</span>
<el-input min="750" v-model="datas.params.fontFamily"
placeholder="请输入fontFamily" class=""></el-input>
</div>
<div class="addTemplateInput q-mt-xs q-mb-lg row items-center">
<span class="q-pr-md shrink">URL:</span>
<el-input min="750" type="textarea" v-model="datas.params.fontUrl"
placeholder="请输入URL" class=""></el-input>
</div>
<div class="addTemplateInput q-mt-xs row items-center">
<span class="q-pr-md shrink">裁剪URL:</span>
<el-input min="750" type="textarea" v-model="datas.params.reduceUrl"
placeholder="请输入裁剪字体URL" class=""></el-input>
</div>
</div>
<div class="text-center">
<el-button class="MarketIndexButtom MarketRec" type="primary" @click="ConfirmCreation(0)"
:loading="requestLoading">
确认{{datas.params.id?'编辑':'新增'}}
</el-button>
</div>
</el-dialog>
</template>
<script lang="ts" setup>
import { reactive, ref, inject, onMounted, watch} from "vue";
import { ENT_USER_THEME, VIP_USER_THEME } from "@/configs/customer";
import { useUserStore, useFontStore } from "@/store";
import { storeToRefs } from "pinia";
import { USER_DEFAULT_HEADER } from '@/configs/customer'
import { Edit,Delete } from '@element-plus/icons-vue';
import { ElLoading, ElMessage, ElMessageBox, UploadInstance } from 'element-plus'
import { CustomerFonts } from '@/store/font'
import {getFonts} from '@/utils/psdParser/index'
import FontService from '@/services/FontService'
import AliyunUpload from '@/utils/upload/aliyun'
import { reduceFont } from '@/utils/fonts/convertFont'
import FileService from '@/services/FileService'
<script lang="ts" setup> const useUser = useUserStore()
import { reactive, ref, inject, onMounted, watch} from "vue"; const { userInfo } = storeToRefs(useUser)
import { ENT_USER_THEME, VIP_USER_THEME } from "@/configs/customer";
import { useUserStore, useFontStore } from "@/store";
import { storeToRefs } from "pinia";
import { USER_DEFAULT_HEADER } from '@/configs/customer'
import { Edit,Delete } from '@element-plus/icons-vue';
import { ElLoading, ElMessage, ElMessageBox, UploadInstance, FormInstance, FormRules } from 'element-plus'
import { CustomerFonts } from '@/store/font'
import {getFonts} from '@/utils/psdParser/index'
import FontService from '@/services/FontService'
import AliyunUpload from '@/utils/upload/aliyun'
import { reduceFont } from '@/utils/fonts/convertFont'
import FileService from '@/services/FileService'
const useUser = useUserStore()
const { userInfo } = storeToRefs(useUser)
const { formatFonts } = storeToRefs(useFontStore())
const userTheme = useUser.getUserTheme
const vipTheme = VIP_USER_THEME const { formatFonts } = storeToRefs(useFontStore())
const enTheme = ENT_USER_THEME
const userTheme = useUser.getUserTheme
const dataList = ref([] as Array < any > );
const RawDataList = ref([] as Array < any > );
const loading = ref(false as any)
const deleteLoading = ref<any>(null)
const queryObj = reactive({
pageIndex: 1,
pageCount: 0,
keyWords: ''
})
const dataTableRef = ref()
const datas = reactive({
requestLoading: false,
addEditVisible: false,
params: {
id: 0,
fontFamily: '',
label: '',
fontUrl: '',
reduceName: '',
reduceUrl: '',
},
paramsList:[]
})
const paramsList = {
id: 0,
fontFamily: '',
label: '',
fontUrl: '',
reduceName: '',
reduceUrl: '',
}
const rules = reactive<FormRules<RuleForm>>({
Name: [{required: true,message: '请输入名称',trigger: "blur"}],
fontFamily: [{required: true,message: '请输入fontFamily',trigger: "blur"}],
fontUrl: [{required: true,message: '请输入UR',trigger: "blur"}],
reduceUrl: [{required: true,message: '请输入裁剪URL',trigger: "blur"}],
})
const fonts = ref<{fontFamily:string,uploadType:number,selectedFont?:string}[]>()
const uploadingIndex = ref(-1)
const upload = ref<UploadInstance>()
const FormRef = ref<FormInstance>()
const close = () => {
datas.params = {
id: 0,
fontFamily: '',
label: '',
fontUrl: '',
reduceName: '',
reduceUrl: '',
}
}
const handleExceed: UploadProps['onExceed'] = (files) => {
upload.value!.clearFiles()
const file = files[0] as UploadRawFile
upload.value!.handleStart(file)
upload.value.submit()
}
//添加、编辑字体
const ConfirmCreation = async (formEl: FormInstance | undefined) => {
if (!formEl || loading.value ) return
datas.requestLoading = true
await formEl.validate(async (valid) => {
if (valid) {
console.log(datas.paramsList,'=================')
}
datas.requestLoading = false
})
} const vipTheme = VIP_USER_THEME
const upMultiple = () => { const enTheme = ENT_USER_THEME
} const dataList = ref([] as Array < any > );
const upSingle = async () => { const RawDataList = ref([] as Array < any > );
if(!datas.params.label)return ElMessage({ const loading = ref(false as any)
message:'请输入名称', const deleteLoading = ref<any>(null)
type:'error' const queryObj = reactive({
}) pageIndex: 1,
if(!datas.params.fontFamily)return ElMessage({ pageCount: 0,
message:'请输入fontFamily', keyWords: ''
type:'error'
})
if(!datas.params.fontUrl)return ElMessage({
message:'请输入URL',
type:'error'
}) })
if(!datas.params.reduceUrl)return ElMessage({ const dataTableRef = ref()
message:'请输入裁剪URL', const datas = reactive({
type:'error' requestLoading: false,
addEditVisible: false,
params: {
id: 0,
fontFamily: '',
label: '',
fontUrl: '',
reduceName: '',
reduceUrl: '',
}
}) })
datas.requestLoading = true
const result = await useFontStore().uploadFontAsync(datas.params) const fonts = ref<{fontFamily:string,uploadType:number,selectedFont?:string}[]>()
if(result){ const uploadingIndex = ref(-1)
ElMessage({ const upload = ref<UploadInstance>()
showClose: true, const fliesNum = ref(0 as number)
message: `操作${datas.params.label}成功`,
type: 'success', const close = () => {
datas.params = {
id: 0,
fontFamily: '',
label: '',
fontUrl: '',
reduceName: '',
reduceUrl: '',
}
}
const handleExceed: UploadProps['onExceed'] = (files) => {
upload.value!.clearFiles()
const file = files[0] as UploadRawFile
upload.value!.handleStart(file)
upload.value.submit()
}
const ConfirmCreation = async (type:any) => {
//添加、编辑字体
if(!datas.params.label)return ElMessage({
message:'请输入名称',
type:'error'
}) })
datas.addEditVisible = false if(!datas.params.fontFamily)return ElMessage({
datas.requestLoading = false message:'请输入fontFamily',
querySearchHandler() type:'error'
}else{ })
if(!datas.params.fontUrl)return ElMessage({
message:'请输入URL',
type:'error'
})
if(!datas.params.reduceUrl)return ElMessage({
message:'请输入裁剪URL',
type:'error'
})
datas.requestLoading = true
const result = await useFontStore().uploadFontAsync(datas.params)
if(result){
ElMessage({ ElMessage({
message:'字体上传失败,请重试', showClose: true,
type:'error' message: `操作${datas.params.label}成功`,
type: 'success',
}) })
if(fliesNum.value) fliesNum.value--
if(!type||(type&&!fliesNum.value)) datas.addEditVisible = false
console.log(fliesNum.value,'----4')
datas.requestLoading = false datas.requestLoading = false
querySearchHandler()
}else{
ElMessage({
message:'字体上传失败,请重试',
type:'error'
})
if(fliesNum.value) fliesNum.value--
console.log(fliesNum.value,'----5')
datas.requestLoading = false
}
} }
} const addFont = () => {
const addFont = () => {
datas.addEditVisible = true
}
const editDelete = (item: Object,index: Number) => {
if(index>=0){
deleteFont(index,item)
}else{
datas.params = JSON.parse(JSON.stringify(item))
datas.addEditVisible = true datas.addEditVisible = true
} }
} const editDelete = (item: Object,index: Number) => {
if(index>=0){
const deleteFont = (index: Number, item: Object) => { deleteFont(index,item)
ElMessageBox.confirm( }else{
`此操作将删除 ${item.label} 字体,是否确定?`, datas.params = JSON.parse(JSON.stringify(item))
'提示', datas.addEditVisible = true
{ }
confirmButtonText: '确定', }
cancelButtonText: '取消',
type: 'warning', const deleteFont = (index: Number, item: Object) => {
} ElMessageBox.confirm(
).then(async () => { `此操作将删除 ${item.label} 字体,是否确定?`,
try { '提示',
deleteLoading.value = ElLoading.service({ {
lock:true, confirmButtonText: '确定',
text:'正在处理' cancelButtonText: '取消',
}) type: 'warning',
let dataRes = await FontService.RemoveTripFile(item.id) }
if (dataRes.data.resultCode == 1) { ).then(async () => {
ElMessage({ try {
showClose: true, deleteLoading.value = ElLoading.service({
message: `删除${item.label}成功`, lock:true,
type: 'success', text:'正在处理'
}) })
search() let dataRes = await FontService.RemoveTripFile(item.id)
}else { if (dataRes.data.resultCode == 1) {
ElMessage({ ElMessage({
showClose: true, showClose: true,
message: `删除${item.label}失败`, message: `删除${item.label}成功`,
type: 'warning', type: 'success',
}) })
} search()
} catch (error) {} }else {
ElMessage({
showClose: true,
message: `删除${item.label}失败`,
type: 'warning',
})
}
} catch (error) {}
deleteLoading.value.close()
deleteLoading.value = null
}).catch(() => {
deleteLoading.value.close() deleteLoading.value.close()
deleteLoading.value = null deleteLoading.value = null
}).catch(() => { })
deleteLoading.value.close()
deleteLoading.value = null
})
}
const uploadFontHandler = async (uploadFile:any, uploadFiles:any, fontName:string) => {
const ns = uploadFile.name.toLowerCase().split('.')
const n = ns[ns.length-1]
const acceptFile = ['ttf','otf','woff']
if(acceptFile.indexOf(n)==-1){
ElMessage.error({
message:`不支持此类文件上传,目前只支持${acceptFile.join(',')}等文件上传`
})
return;
}
uploadingIndex.value = dataList.value?.findIndex(x=>x.fontFamily==fontName)??-1
try {
let info:any = null
try {
info = await reduceFont(uploadFile?.raw)
} catch (error) {
ElMessage.error({message:'字体无法识别,请更换'})
uploadingIndex.value=-1
return
}
const flagIndex = dataList.value.findIndex(x=>x.label==info.name)
if(flagIndex>0){
ElMessage.error({message:`${info.name} 字体已存在,请选择使用已有字体`})
uploadingIndex.value=-1
return
}
let url = await FileService.uploadToFontServerAsync(uploadFile?.raw)
if(url && url!=''){
if(url.indexOf('"')!=-1) url = url.replaceAll('"','')
let label=uploadFile.name.split('.')[0],reduceName='',reduceUrl=''
try {
if(info.file){
label = info.name
reduceName = `${fontName}_reduce`
reduceUrl = await AliyunUpload.UploadAsync(info.file,"tripfont/"+info.file.name)
}
} catch (error) {
}
datas.params.label = label
datas.params.fontFamily = fontName
datas.params.fontUrl = url
datas.params.reduceName = reduceName
datas.params.reduceUrl = reduceUrl
let params = {
id: 0,
fontFamily: fontName,
label: label,
fontUrl: url,
reduceName: reduceName,
reduceUrl: reduceUrl,
}
datas.paramsList.push(params)
// await ConfirmCreation()
}else{
ElMessage({
message:'上传失败,请重试',
type:'error'
})
}
} catch (error) {
}
}
const tableScrollHandler = ()=>{
if(queryObj.pageCount>queryObj.pageIndex){
queryObj.value.pageIndex++
refreshHandler()
}
}
const search = () => {
queryObj.pageIndex = 1
querySearchHandler()
}
const querySearchHandler = async () => {
loading.value = true
try {
let pageRes = await FontService.GetManagerFontList(queryObj);
if (pageRes.data.resultCode == 1) {
dataList.value = pageRes.data.data
RawDataList.value = pageRes.data.data
}
loading.value = false
} catch (error) {
loading.value = false
} }
}
querySearchHandler()
</script>
<style scoped> const uploadFontHandler = async (uploadFile:any, uploadFiles:any, fontName:string) => {
.addTemplateInput span { fliesNum.value = uploadFiles.length
width: 95px; console.log(fliesNum.value,'----0')
text-align: right; const ns = uploadFile.name.toLowerCase().split('.')
} const n = ns[ns.length-1]
.user-header { const acceptFile = ['ttf','otf','woff']
padding: 16px 24px; if(acceptFile.indexOf(n)==-1){
position: relative; ElMessage.error({
font-size: 14px; message:`不支持此类文件上传,目前只支持${acceptFile.join(',')}等文件上传`
color:#FFF; })
z-index: 1; if(fliesNum.value) fliesNum.value--
width:100%; console.log(fliesNum.value,'----01')
overflow: hidden; return;
} }
uploadingIndex.value = dataList.value?.findIndex(x=>x.fontFamily==fontName)??-1
try {
let info:any = null
try {
info = await reduceFont(uploadFile?.raw)
} catch (error) {
ElMessage.error({message:'字体无法识别,请更换'})
uploadingIndex.value=-1
if(fliesNum.value) fliesNum.value--
console.log(fliesNum.value,'----1')
return
}
.user-header::after { const flagIndex = dataList.value.findIndex(x=>x.label==info.name)
position: absolute; if(flagIndex>0){
top: 0; ElMessage.error({message:`${info.name} 字体已存在,请选择使用已有字体`})
right: -48px; uploadingIndex.value=-1
bottom: -12px; if(fliesNum.value) fliesNum.value--
z-index: -1; console.log(fliesNum.value,'----2')
width: 100%; return
background: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1713496804000_500.png') no-repeat right center / contain; }
content: ""; let url = await FileService.uploadToFontServerAsync(uploadFile?.raw)
transform: scale(2); if(url && url!=''){
transform-origin: right center;
} if(url.indexOf('"')!=-1) url = url.replaceAll('"','')
.user-label{ let label=uploadFile.name.split('.')[0],reduceName='',reduceUrl=''
font-size: 12px; try {
margin-bottom: 8px; if(info.file){
} label = info.name
.user-card { reduceName = `${fontName}_reduce`
width: 33%; reduceUrl = await AliyunUpload.UploadAsync(info.file,"tripfont/"+info.file.name)
min-height: 112px; }
} catch (error) {
}
datas.params.label = label
datas.params.fontFamily = fontName
datas.params.fontUrl = url
datas.params.reduceName = reduceName
datas.params.reduceUrl = reduceUrl
await ConfirmCreation(1)
}else{
ElMessage({
message:'上传失败,请重试',
type:'error'
})
if(fliesNum.value) fliesNum.value--
console.log(fliesNum.value,'----3')
}
} catch (error) {
}
} }
.user-card .title, const tableScrollHandler = ()=>{
.enter-card .title{ if(queryObj.pageCount>queryObj.pageIndex){
font-size: 15px; queryObj.value.pageIndex++
font-weight: bold; refreshHandler()
color: #000; }
}
const search = () => {
queryObj.pageIndex = 1
querySearchHandler()
}
const querySearchHandler = async () => {
loading.value = true
try {
let pageRes = await FontService.GetManagerFontList(queryObj);
if (pageRes.data.resultCode == 1) {
dataList.value = pageRes.data.data
RawDataList.value = pageRes.data.data
}
loading.value = false
} catch (error) {
loading.value = false
}
} }
</style> querySearchHandler()
\ No newline at end of file </script>
<style scoped>
.addTemplateInput span {
width: 95px;
text-align: right;
}
.user-header {
padding: 16px 24px;
position: relative;
font-size: 14px;
color:#FFF;
z-index: 1;
width:100%;
overflow: hidden;
}
.user-header::after {
position: absolute;
top: 0;
right: -48px;
bottom: -12px;
z-index: -1;
width: 100%;
background: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1713496804000_500.png') no-repeat right center / contain;
content: "";
transform: scale(2);
transform-origin: right center;
}
.user-label{
font-size: 12px;
margin-bottom: 8px;
}
.user-card {
width: 33%;
min-height: 112px;
}
.user-card .title,
.enter-card .title{
font-size: 15px;
font-weight: bold;
color: #000;
}
</style>
\ No newline at end of file
...@@ -12,15 +12,15 @@ ...@@ -12,15 +12,15 @@
</div> </div>
<div class="col row"> <div class="col row">
<div class="user-center-menu column "> <div class="user-center-menu column ">
<el-menu :default-active="activeIndex" class="no-border md-menu col" router> <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"> <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> <component :is="x.icon" style="font-size: 20px;"></component>
<span class="q-ml-lg">{{ x.name }}</span> <span class="q-ml-lg">{{ x.name }}</span>
</el-menu-item> </el-menu-item>
</el-menu> </el-menu>
<el-button class="full-width pingfangr text-weight-bolder" @click="forwardSpace" style="font-size: 14px !important;" icon="arrow-left">返回工作台</el-button> <el-button class="full-width pingfangr text-weight-bolder" @click="forwardSpace" style="font-size: 14px !important;" icon="arrow-left">返回工作台</el-button>
</div> </div>
<el-scrollbar v-if="path!='/u/cloudDiskSpace'" class="col full-height user-center-body" wrap-style="overflow-x:unset;" view-style="padding-bottom:30px;"> <el-scrollbar v-if="path=='/u'||path=='/u/setting'" class="col full-height user-center-body" wrap-style="overflow-x:unset;" view-style="padding-bottom:30px;">
<router-view /> <router-view />
</el-scrollbar> </el-scrollbar>
<div v-else class="col full-height user-center-body" view-style="padding-bottom:30px;"> <div v-else class="col full-height user-center-body" view-style="padding-bottom:30px;">
...@@ -49,7 +49,7 @@ const forwardSpace = () => router.push('/space') ...@@ -49,7 +49,7 @@ const forwardSpace = () => router.push('/space')
watch(() => router.currentRoute.value.path, (toPath) => { watch(() => router.currentRoute.value.path, (toPath) => {
if(!userInfo.value.showCloudDisk&&toPath=='/u/cloudDiskSpace'){ if(!userInfo.value.showCloudDisk&&toPath!='/u'&&toPath!='/u/setting'){
userInfo.value.showCloudDisk = true userInfo.value.showCloudDisk = true
location.reload() location.reload()
}else userInfo.value.showCloudDisk = false }else userInfo.value.showCloudDisk = false
......
...@@ -6,8 +6,17 @@ ...@@ -6,8 +6,17 @@
<el-tab-pane label="已完成" name="finish"></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="invoice"></el-tab-pane>
<el-tab-pane label="历史发票" name="invoiceHistory"></el-tab-pane> <el-tab-pane label="历史发票" name="invoiceHistory"></el-tab-pane>
<div class="order-bar rounded row"> <div v-if="activeName!='invoiceHistory'" class="order-bar rounded row">
<div class="item" style="width: 280px !important; min-width: 280px; text-align: left;">商品信息</div> <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> <div class="item col" >单价</div>
<div class="item col">数量</div> <div class="item col">数量</div>
...@@ -16,16 +25,50 @@ ...@@ -16,16 +25,50 @@
</div> </div>
<div class="item col">实付款</div> <div class="item col">实付款</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> </div>
</el-tabs> </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 v-loading="CancelLoading">
<div class="order-body q-mt-lg" v-for="x in orders" :key="x.orderid"> <div class="order-body q-mt-lg" v-for="x in orders" :key="x.orderid">
<div class="order-item rounded"> <div class="order-item rounded">
<div class="title" @click="activeName=='invoice'?getCheck(x,1):''"
<div class="title"> :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>{{ x.create }}</span>
<span class="q-ml-md">{{ x.ordernum }}</span> <span class="q-ml-md">{{ x.ordernum }}</span>
</div> </div>
...@@ -36,7 +79,9 @@ ...@@ -36,7 +79,9 @@
<div class="q-ml-lg">{{ x.pricetypename }}_{{ x.vipname }}</div> <div class="q-ml-lg">{{ x.pricetypename }}_{{ x.vipname }}</div>
</div> </div>
<div class="item col">{{ x.productname }}</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 col">{{ x.use }}席位</div>
<div class="item none-width"> <div class="item none-width">
<div style="background-color: rgba(0,0,0,.08);width:1px;height:72px;">&nbsp;</div> <div style="background-color: rgba(0,0,0,.08);width:1px;height:72px;">&nbsp;</div>
...@@ -50,10 +95,11 @@ ...@@ -50,10 +95,11 @@
</div> </div>
<div class="item col"> <div class="item col">
<div class="q-mb-sm" :class="{'text-waring':x.status==1,'text-grey-8':x.status==3}">{{ x.statusname }}</div> <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>
<div class="item column"> <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 /> <br />
<el-button type="default" v-if="x.status==2" @click="redicetTo('https://work.weixin.qq.com/kfid/kfc378aada578ca8b0e')">售后</el-button> <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> <el-button type="warning" v-if="x.status==1" @click="goControls(1,x.orderid)">支付</el-button>
...@@ -67,22 +113,80 @@ ...@@ -67,22 +113,80 @@
</div> </div>
</template> </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="loading" style="height: 200px;margin-top: 100px;" v-loading="loading"></div>
<div v-if="(!orders || orders.length==0) && !loading"> <div v-if="(!orders || orders.length==0) && !loading">
<el-empty class="q-ma-xl" description="暂无数据" /> <el-empty class="q-ma-xl" description="暂无数据" />
</div> </div>
</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> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ApiResult } from "@/configs/axios"; import { ApiResult } from "@/configs/axios";
import OrderService from "@/services/OrderService"; import OrderService from "@/services/OrderService";
import { ref, onMounted } from "vue"; import { ref, reactive, onMounted } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { openNewBlank } from '@/utils/common' import { openNewBlank } from '@/utils/common'
import WePay from '@/components/Pay/WePay.vue' import WePay from '@/components/Pay/WePay.vue'
import openInvoice from './components/openInvoice.vue'
import Invoice from './components/InvoiceDetails.vue'
import { ElMessageBox } from "element-plus"; import { ElMessageBox } from "element-plus";
const props = defineProps({
firm: 0 as Number,
})
const activeName = ref<string>('all') const activeName = ref<string>('all')
const parameters = ref({ const parameters = ref({
pageIndex:1, pageIndex:1,
...@@ -91,7 +195,11 @@ const parameters = ref({ ...@@ -91,7 +195,11 @@ const parameters = ref({
endtime:'', endtime:'',
orderstatus:0 orderstatus:0
}) })
const orders = ref<any[]>() const datas = reactive({
selectAll: false,
indeterminate: false,// 未全选状态
})
const orders = ref<any[]>([])
const orderid = ref<Number>(0) const orderid = ref<Number>(0)
const count = ref(0) const count = ref(0)
const loading = ref(false) const loading = ref(false)
...@@ -99,6 +207,157 @@ const router = useRouter() ...@@ -99,6 +207,157 @@ const router = useRouter()
const showPay = ref(false) const showPay = ref(false)
const orderRef = ref<any>() const orderRef = ref<any>()
const CancelLoading = ref(false) 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) => { const goControls = (type:Number,id:any) => {
orderid.value = id orderid.value = id
...@@ -133,11 +392,27 @@ const CanceltOrders = async ()=>{ ...@@ -133,11 +392,27 @@ const CanceltOrders = async ()=>{
const redicetTo = (url:string)=>openNewBlank(url) const redicetTo = (url:string)=>openNewBlank(url)
const tabsHandlerClick = (e:any)=>{ 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=='all') parameters.value.orderstatus = 0
if(e.props.name=='pay') parameters.value.orderstatus = 1 if(e.props.name=='pay') parameters.value.orderstatus = 1
if(e.props.name=='finish') parameters.value.orderstatus = 2 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 () => { const search = async () => {
...@@ -150,12 +425,21 @@ const getOrders = async ()=>{ ...@@ -150,12 +425,21 @@ const getOrders = async ()=>{
const response = await OrderService.GetOrders(parameters.value) const response = await OrderService.GetOrders(parameters.value)
if(response.data.resultCode == ApiResult.SUCCESS){ 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 orders.value = response.data.data.pageData
count.value = response.data.data.pageCount count.value = response.data.data.pageCount
} }
loading.value=false loading.value=false
if(parameters.value.orderstatus==4){
newDatasSelected()
}
} }
const scrollingHandler = () =>{ const scrollingHandler = () =>{
...@@ -164,18 +448,19 @@ const scrollingHandler = () =>{ ...@@ -164,18 +448,19 @@ const scrollingHandler = () =>{
let scrollTop = orderRef.value.scrollTop let scrollTop = orderRef.value.scrollTop
if(maxHeight - scrollTop==0 && parameters.value.pageCount > parameters.value.pageIndex) { if(maxHeight - scrollTop==0 && parameters.value.pageCount > parameters.value.pageIndex) {
parameters.value.pageIndex++ parameters.value.pageIndex++
getOrders() if(activeName.value=='invoiceHistory') HistoricalInvoice()
else getOrders()
} }
} }
} }
const forwardOrderDetail = (id:string)=>{ const forwardOrderDetail = (id:string,type:any)=>{
router.push('/u/order/'+encodeURIComponent(id)) let url = props.firm?`/a/orderDetail/${encodeURIComponent(id)}/${props.firm}/${activeName.value}`:`/u/orderDetail/${encodeURIComponent(id)}/${activeName.value}`
router.push(url)
} }
if(activeName.value=='invoiceHistory') HistoricalInvoice()
getOrders() else getOrders()
onMounted(()=>{ onMounted(()=>{
orderRef.value.addEventListener("scroll", scrollingHandler); orderRef.value.addEventListener("scroll", scrollingHandler);
}) })
...@@ -229,4 +514,14 @@ onMounted(()=>{ ...@@ -229,4 +514,14 @@ onMounted(()=>{
white-space: nowrap; white-space: nowrap;
overflow: hidden; 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> </style>
\ No newline at end of file
<template> <template>
<div class="row items-center"> <div class="row items-center">
<IconLeft :size="18" class="q-mr-md cursor-pointer" @click="forwardOrder"></IconLeft> <IconLeft :size="18" class="q-mr-md cursor-pointer" @click="forwardOrder"></IconLeft>
<div class="text-weight-bold cursor-pointer" @click="forwardOrder">订单/发票</div> <div class="text-weight-bold cursor-pointer" @click="forwardOrder">订单/发票</div>
</div> </div>
<div v-loading="CancelLoading"> <div v-loading="CancelLoading">
<template v-if="order && !loading"> <template v-if="order && !loading">
<div class="q-mt-xl q-pa-xl rounded bg-info"> <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-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="确认下单" description="" />
<el-step title="待支付" description="" /> <el-step title="待支付" description="" />
<el-step :title="order.status==3?'交易取消':'交易完成'" description="" /> <el-step :title="order.status==3?'交易取消':'交易完成'" description="" />
</el-steps> </el-steps>
<div class="q-mt-xl text-center text-weight-bold" style="font-size: 18px;">订单状态:{{order.statusname}}</div> <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;"> <div v-if="order.status==1" class="q-mt-md row items-center flex-center" style="font-size: 13px;">
<span>请在 </span> <span>请在 </span>
<el-countdown title="" format="DD [天] HH:mm:ss" :value="countValue" value-style="font-size:13px;color:#f89c53;" <el-countdown title="" format="DD [天] HH:mm:ss" :value="countValue" value-style="font-size:13px;color:#f89c53;"
class="q-mx-md inline" /> class="q-mx-md inline" />
<span> 内完成转账,超时订单自动取消</span> <span> 内完成转账,超时订单自动取消</span>
</div> </div>
<div class="row items-center flex-center q-mt-xl" v-if="order.status==1"> <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 size="large" @click="goControls(2)">取消订单</el-button>
<el-button type="primary" size="large" @click="goControls(1)">去支付</el-button> <el-button type="primary" size="large" @click="goControls(1)">去支付</el-button>
</div> </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>
<div class="item col">小计</div> <div class="order-bar rounded row q-mt-xl">
</div> <div class="item" style="width: 280px !important; min-width: 280px; text-align: left;">商品信息</div>
<div class="order-body q-mt-lg"> <div class="item col">时长</div>
<div class="order-item rounded"> <div class="item col">单价</div>
<div class="title"> <div class="item col">数量</div>
<span>{{ order.create }}</span> <div class="item none-width">
<span class="q-ml-md">{{ order.ordernum }}</span> <div style="background-color: rgba(0,0,0,.08);width:1px">&nbsp;</div>
</div> </div>
<div class="bg-white rounded row items-center"> <div class="item col">小计</div>
<div class="item row items-center" </div>
style="width: 280px !important; min-width: 280px; text-align: left;padding:24px;"> <div class="order-body q-mt-lg">
<img :src="order.cover" style="width:72px;" class="rounded"> <div class="order-item rounded">
<div class="q-ml-lg">{{ order.pricetypename }}_{{ order.vipname }}</div> <div class="title">
</div> <span>{{ order.create }}</span>
<div class="item col">{{ order.productname }}</div> <span class="q-ml-md">{{ order.ordernum }}</span>
<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>
<div class="item col"> <div class="bg-white rounded row items-center">
<div class="text-weight-bold q-mb-sm" style="font-size: 16px">¥{{ order.price.toFixed(2) }}</div> <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>
</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>
<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>
</div>
<WePay v-if="showPay" :orderid="order.orderid" @close="showPay=false" @success="showPay=false,getOrder()"></WePay> <WePay v-if="showPay" :orderid="order.orderid" @close="showPay=false" @success="showPay=false,getOrder()"></WePay>
</template> </template>
...@@ -124,7 +123,10 @@ const CanceltOrders = async ()=>{ ...@@ -124,7 +123,10 @@ const CanceltOrders = async ()=>{
} }
const forwardOrder = (id: string) => { 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 () => { 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
...@@ -32,12 +32,13 @@ ...@@ -32,12 +32,13 @@
}" }"
:class="{'clip-box':elementInfo.clip}" :class="{'clip-box':elementInfo.clip}"
> >
<!-- :editable="!elementInfo.lock" -->
<ProsemirrorEditor <ProsemirrorEditor
:class="{'text-static':elementInfo.clip,'text':!elementInfo.clip}" :class="{'text-static':elementInfo.clip,'text':!elementInfo.clip}"
:elementId="elementInfo.id" :elementId="elementInfo.id"
:defaultColor="elementInfo.defaultColor" :defaultColor="elementInfo.defaultColor"
:defaultFontName="elementInfo.defaultFontName" :defaultFontName="elementInfo.defaultFontName"
:editable="!elementInfo.lock"
:value="elementInfo.content" :value="elementInfo.content"
:style="{ :style="{
'--paragraphSpace': `${elementInfo.paragraphSpace === undefined ? 5 : elementInfo.paragraphSpace}px`, '--paragraphSpace': `${elementInfo.paragraphSpace === undefined ? 5 : elementInfo.paragraphSpace}px`,
......
...@@ -108,7 +108,7 @@ const handleSelectElement = (e: MouseEvent | TouchEvent, canMove = true) => { ...@@ -108,7 +108,7 @@ const handleSelectElement = (e: MouseEvent | TouchEvent, canMove = true) => {
if (props.elementInfo.lock) return if (props.elementInfo.lock) return
e.stopPropagation() e.stopPropagation()
if(!searchData.value.isTeamManage) mainStore.setToolbarState(ToolbarStates.EL_NORMALDATA) // if(!searchData.value.isTeamManage) mainStore.setToolbarState(ToolbarStates.EL_NORMALDATA)
props.selectElement(e, props.elementInfo, canMove) 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