Commit d1ec5267 authored by liudong1993's avatar liudong1993
parents f7e41eef ebb895f1
......@@ -12,10 +12,10 @@
<div class="showMyCareer" v-if="showCareer">
<mycareer :show-close="true" :uid="careerId" @close="closeCareer"></mycareer>
</div>
<customerService v-show="showCustomerService" @close="showCustomerService=false"/>
<img @click="showCustomerService=!showCustomerService"
<customerService v-show="showCustomerService" />
<!-- <img @click="showCustomerService=!showCustomerService"
class="customerServiceButton"
src="./assets/img/kefu1.png" alt=""/>
src="./assets/img/kefu1.png" alt=""/> -->
</div>
</template>
......@@ -237,6 +237,9 @@
this.MsgBus.$on("changeTheme", t => {
this.isRed = t == 1;
});
this.MsgBus.$on("showCustomerServiceHandler", (isShow) => {
this.showCustomerService = isShow;
});
}
};
......
src/assets/img/AI.png

2.78 KB | W: | H:

src/assets/img/AI.png

2.69 KB | W: | H:

src/assets/img/AI.png
src/assets/img/AI.png
src/assets/img/AI.png
src/assets/img/AI.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -158,15 +158,51 @@
</el-form-item>
</li>
<li v-if="addMsg.Nationality==2">
<el-form-item :label="$t('visaT.Chinesesurname')" prop="SurName">
<el-input v-model='addMsg.SurName' class="w230" @input="Transformation(addMsg.SurName,'SurName')"
:placeholder="$t('rule.qsrzwm')"></el-input>
<el-form-item
:label="$t('visaT.Chinesesurname')" prop="SurNameID">
<el-select
class="w230"
ref="options"
v-model="addMsg.SurNameID"
filterable
remote
reserve-keyword
placeholder="请输入关键词"
:remote-method="(query)=>remoteMethod(query,1)"
@change="(e)=>getName(e,1)">
<el-option
v-for="item in options"
:key="item.value"
:label="`${item.name}`"
:value="item.value">
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</li>
<li v-if="addMsg.Nationality==2">
<el-form-item :label="$t('admin.admin_Surname')" prop="Name">
<el-input v-model='addMsg.Name' class="w230" @input="Transformation(addMsg.Name,'Name')"
:placeholder="$t('rule.qsrzwm')"></el-input>
<el-form-item
:label="$t('admin.admin_Surname')" prop="NameID">
<el-select
class="w230"
ref="optionsNames"
v-model="addMsg.NameID"
filterable
remote
reserve-keyword
:placeholder="$t('rule.qsrzwm')"
:remote-method="(query)=>remoteMethod(query)"
@change="(e)=>getName(e)">
<el-option
v-for="item in optionsNames"
:key="item.value"
:label="`${item.name}`"
:value="item.value">
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</li>
<li>
......@@ -192,9 +228,10 @@
</el-input>
</el-form-item>
</li>
<li v-if="addMsg.Nationality==2">
<el-form-item :label="$t('admin.admin_IDcard')" prop="IdCard" v-if="LineId === 14 || LineId === 2">
<el-input v-model="addMsg.IdCard" type="text" size=mini class="w230"
<li >
<!-- v-if="LineId === 14 || LineId === 2" -->
<el-form-item :label="$t('admin.admin_IDcard')" prop="IdCard" v-if="addMsg.Nationality==2">
<el-input v-model="addMsg.IdCard" type="text" :class=" IdCardSure ? '' : 'colorRed'" size=mini class="w230"
:placeholder="$t('visaT.Pleasefillin')" @blur.prevent="authentication()">
</el-input>
</el-form-item>
......@@ -228,8 +265,8 @@
:placeholder="$t('visaT.ptxPassportNo')"></el-input>
</el-form-item>
<el-form-item :label="$t('system.table_Passport')" prop="PassportNo" v-else>
<el-input v-model='addMsg.PassportNo' type="text" size=mini class="w230"
:placeholder="$t('visaT.ptxPassportNo')"></el-input>
<el-input v-model='addMsg.PassportNo' :class=" PassportNoSure ? '' : 'colorRed'" type="text" size=mini class="w230"
@change="isValidPassport" :placeholder="$t('visaT.ptxPassportNo')"></el-input>
</el-form-item>
</li>
<li>
......@@ -666,6 +703,8 @@
DutyTypeList: [],
ppAge: 0,
loading: false,
PassportNoSure:true,
IdCardSure:true,
templateType: 1,
templateSign: "",
imgBase64String: "",
......@@ -675,6 +714,8 @@
OrderId: 0,
SurName: "",
Name: "",
SurNameID: "",
NameID: "",
Sex: "",
EName: "",
ESurName: "",
......@@ -765,11 +806,21 @@
message: this.$t('visaT.qtxzwx'),
trigger: "blur"
}],
SurNameID: [{
required: true,
message: this.$t('visaT.qtxzwx'),
trigger: "change"
}],
Name: [{
required: true,
message: this.$t('visaT.qtxzwm'),
trigger: "blur"
}],
NameID: [{
required: true,
message: this.$t('visaT.qtxzwm'),
trigger: "change"
}],
Sex: [{
required: true,
message: this.$t('visaT.qtxzxb'),
......@@ -806,7 +857,7 @@
trigger: "blur"
},
{
pattern: /^[0-9a-zA-Z]+$/,
pattern: /^[0-9a-zA-Z]+$/,//this.isValidPassport(),
message: this.$t('visaT.zqdhzh')
}
],
......@@ -865,12 +916,44 @@
roomlist: [],
isOneDay: 0,
LineId: 0,
GroupStartDateStr:'',//出发团期
EndDateStr: '',
guoqi: false,
JingDianList: []
JingDianList: [],
options: [],
optionsNames: [],
};
},
methods: {
getName(e,type){
let findIndex
if(type) {
findIndex = this.options.findIndex(x=>x.value==e)
let obj = this.options[findIndex]
this.addMsg.SurName = obj.name.toUpperCase();
this.addMsg.ESurName = obj.label.toUpperCase();
}else{
findIndex = this.optionsNames.findIndex(x=>x.value==e)
let obj = this.optionsNames[findIndex]
this.addMsg.Name = obj.name.toUpperCase();
this.addMsg.EName = obj.label.toUpperCase();
}
},
remoteMethod(query,type) {
if (query !== '') {
if(type==1) {
if(query!=this.addMsg.SurName) this.addMsg.SurName = query
this.Transformation(query,'SurName')
}
else {
if(query!=this.addMsg.Name) this.addMsg.Name = query
this.Transformation(query,'Name')
}
} else {
if(type==1) this.options = [];
else this.optionsNames = []
}
},
getDutyType() {
this.apipost(
"dict_get_GetDictValueCommonList", {
......@@ -1009,12 +1092,12 @@
if (tempObj) {
//中文姓
if (tempObj.SurName && tempObj.SurName != '') {
this.addMsg.SurName = tempObj.SurName;
this.addMsg.SurName = tempObj.SurName.toUpperCase();
this.Transformation(this.addMsg.SurName, 'SurName');
}
//中文名
if (tempObj.Name && tempObj.Name != '') {
this.addMsg.Name = tempObj.Name;
this.addMsg.Name = tempObj.Name.toUpperCase();
this.Transformation(this.addMsg.Name, 'Name');
}
//性别
......@@ -1103,6 +1186,10 @@
},
submitForm(addMsg, type) {
if (this.btnState === true) {
// if(this.LineId!=90&&this.addMsg.Nationality===2&& !this.isValidPassport(this.addMsg.PassportNo)){
// this.Error(this.$t('visaT.Pleasefillin')+this.$t('visaT.zqdhzh'));
// return false;
// }
//提交创建、修改表单
this.$refs[addMsg].validate(valid => {
this.btnState = false
......@@ -1169,6 +1256,15 @@
},
savePassenger(type) {
this.timeOver()
var result= this.isValidPassport()
if(!result)
{
return ;
}
if(this.addMsg.Nationality===2&& !this.isValidIdCardFormat(this.addMsg.IdCard)){
this.$message.error("无效的身份证号码");
return ;
}
if ((this.LineId === 14 || this.LineId === 2) && this.addMsg.IdCard === '' && this.addMsg.Nationality == 2) {
return this.$message.error(this.$t('objFill.qingtxsfzhm'));
}
......@@ -1234,18 +1330,120 @@
});
this.$forceUpdate();
},
Transformation(val, type) {
combinePinyinDPs(pinyinArrays) {
let combinations = [""];
for (const pinyinGroup of pinyinArrays) {
const newCombinations = [];
for (const prefix of combinations) {
for (const pinyin of pinyinGroup) {
newCombinations.push(prefix + pinyin);
}
}
combinations = newCombinations;
}
return combinations.join(",");
},
combinePinyinDP(pinyinArrays) {
const result = [];
const dfs = (index, currentStr) => {
if (index === pinyinArrays.length) {
result.push(currentStr);
return;
}
for (const pinyin of pinyinArrays[index]) {
dfs(index + 1, currentStr + pinyin);
}
};
dfs(0, "");
return result.join(",");
},
Transformation(val, type,input) {
let text = this.pinyin(val, {
style: this.pinyin.STYLE_NORMAL
heteronym: true, // 启用多音字模式
style: this.pinyin.STYLE_NORMAL,
segment: true
});
// 如果当前字是 "茜",则替换为自定义拼音
if(val.includes('茜')){
text = text.map(pinyinArr => {
if (pinyinArr[0] === 'qian') { // 默认返回的是 qian
return ['qiàn', 'xī']; // 替换成自定义多音字
}
return pinyinArr;
});
}
console.log("text",text);
const pinyinArray = text
const result = this.combinePinyinDP(pinyinArray);
if (type == "SurName") {
let upText = text.join("").toLocaleUpperCase()
this.addMsg.ESurName = upText;
let upText = result
// this.addMsg.ESurName = upText;
this.options = []
let names = upText.split(',')
names.forEach((x,index)=>{
this.options.push({
label: x.toUpperCase(),
value: index+1,
name: this.addMsg.SurName.toUpperCase(),
})
})
if(names!=null&&names.length==1){
if(input){
this.addMsg.SurNameID = this.options[0].value;
this.addMsg.ESurName = this.options[0].label;
}else{
setTimeout(() => {
this.addMsg.SurNameID = this.options[0].value;
this.addMsg.ESurName = this.options[0].label;
}, 500);
}
}else{
let findIndex = this.options.findIndex(x=>x.label==this.addMsg.ESurName)
if(findIndex!=-1){
this.addMsg.SurNameID=this.options[findIndex].value;
}else{
this.addMsg.SurNameID='';
this.addMsg.ESurName='';
}
}
this.$forceUpdate()
}
if (type == "Name") {
let upText = text.join("").toLocaleUpperCase()
this.addMsg.EName = upText;
let upText = result
// this.addMsg.EName = upText;
this.optionsNames = []
let names = upText.split(',')
names.forEach((x,index)=>{
this.optionsNames.push({
label: x.toUpperCase(),
value: index+1,
name: this.addMsg.Name.toUpperCase(),
})
})
if(names!=null&&names.length==1){
setTimeout(() => {
if(this.optionsNames.length>0){
this.addMsg.NameID=this.optionsNames[0].value;
this.addMsg.EName=this.optionsNames[0].label;
}
}, 500);
}else{
let findIndex = this.optionsNames.findIndex(x=>x.label==this.addMsg.EName)
if(findIndex!=-1){
this.addMsg.NameID=this.optionsNames[findIndex].value;
return
}
this.addMsg.NameID='';
this.addMsg.EName='';
}
}
this.$forceUpdate()
},
getVisaIdentityTypeEnum() {
//获取身份证明
......@@ -1327,6 +1525,30 @@
err => {}
);
},
// 中国护照验证逻辑
isValidPassport:function() {
var isCheck=true;
if (this.addMsg.PassportNo.length !== 9) {
this.$message.error("请输入9位护照号")
isCheck=false;
return ;
}
if(this.addMsg.Nationality===2){
// 单个字母开头(E或G)后跟8位数字
const pattern1 = /^[EG][0-9]{8}$/;
// 两个字母开头(E开头,第二个字母不能是I或O)后跟7位数字
const pattern2 = /^E[A-HJ-NP-Z][0-9]{7}$/;
this.PassportNoSure= pattern1.test(this.addMsg.PassportNo) || pattern2.test(this.addMsg.PassportNo);
if(!this.PassportNoSure){
this.$message.error("护照格式不正确")
isCheck=false;
return ;
}
}
return isCheck;
},
getVisaApplyForTypeEnum() {
// 获取申请类型
this.apipost(
......@@ -1424,6 +1646,8 @@
if (this.$route.query.isOneDay === 1) {
this.addMsg.IsBed = 0
}
this.Transformation(this.addMsg.SurName,'SurName',1)
this.Transformation(this.addMsg.Name,'Name',2)
} else {
this.$message.error();
}
......@@ -1631,14 +1855,71 @@
this.addMsg.Id = this.$route.query.guestId;
this.addMsg.TCID = this.$route.query.TCID;
this.addMsg.OrderId = this.$route.query.orderId;
this.Roominformation() //调取下房间信息
}
},
err => {}
);
}
}
}
this.addMsg.Birthday = this.getBirthdayFromIdCard(IdCard);
},
isValidIdCardFormat(idCard) {
const reg = /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/;
return reg.test(idCard);
},
getBirthdayFromIdCard(idCard) {
// 去除空格并转换为大写(处理末尾可能的小写x)
idCard = (idCard || '').trim().toUpperCase();
const len = idCard.length;
// 验证身份证长度
if (len !== 15 && len !== 18) {
this.$message.error("无效的身份证号码");
this.IdCardSure=false;
return "";
}
let year, month, day;
if (len === 15) { // 15位身份证
year = '19' + idCard.substring(6, 8); // 年份补19前缀
month = idCard.substring(8, 10);
day = idCard.substring(10, 12);
} else { // 18位身份证
year = idCard.substring(6, 10);
month = idCard.substring(10, 12);
day = idCard.substring(12, 14);
}
// 日期有效性验证
const date = new Date(`${year}-${month}-${day}`);
if (isNaN(date.getTime())) {
this.$message.error("身份证中的出生日期无效");
this.IdCardSure=false;
return "";
}
this.IdCardSure=true;
// 返回格式化的出生日期(YYYY-MM-DD)
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`;
},
getData: function () {
this.loading = true
this.apipost("sellorder_get_GetTravelGuestList", {
OrderId: this.$route.query.orderId
}, res => {
if (res.data.resultCode == 1) {
this.GroupStartDateStr = res.data.data.GroupStartDateStr;
} else {
this.$message.error(res.data.message)
}
this.loading = false
});
},
},
mounted() {
this.getTravelType();
......@@ -1651,6 +1932,7 @@
this.getVisaIdentityTypeEnum();
this.getEconomicCapability();
this.GetGuestMustVisaAir();
// this.getData();
this.isOneDay = this.$route.query.isOneDay;
this.LineId = this.$route.query.LineId;
this.addMsg.TCID = this.$route.query.TCID;
......
<template>
<div class="dialogPptistVisible-box" style="width: 100%;height: 100%;">
<div style="position: relative;width: 800px;">
<span style="opacity: 0;">1</span>
<div class="item">
......@@ -12,7 +12,7 @@
<iframe id="myTemplateUrl" v-if="Url!=''" name="myTemplateUrl" :src="Url" class="TemplateIframe">
</iframe>
</div>
</template>
<script>
import { compressToBase64 } from '@/utils/compression';
......@@ -47,7 +47,7 @@ import { compressToBase64 } from '@/utils/compression';
},
methods: {
close() {
this.$emit('close')
this.MsgBus.$emit("showCustomerServiceHandler",false);
},
async createInitDifyAsync(){
const userInfo = this.getLocalStorage();
......@@ -113,7 +113,7 @@ import { compressToBase64 } from '@/utils/compression';
right: -40px;
top: -10px;
z-index: 99;
}
.itemBox{
width: 30px;
......
......@@ -284,15 +284,22 @@
</el-dropdown>
</li>
<template v-if="userInfo.RB_Group_id == 2">
<li style="position: relative;">
<!--||MsgCount>0-->
<!-- <li style="position: relative;">
<i class="iconfont icon-imessage_top"
:class="[(hasNewMsg > 0) && !IM_bodyIsShow ? 'animation red' : '', IM_bodyIsShow ? 'red' : '']"
@click="IM_bodyIsShow = !IM_bodyIsShow, IM_navType = 1"></i>
</li>
</li> -->
<li style="display: flex;flex-direction: column;align-items: center;justify-content: center;">
<!-- <i class="iconfont icon-banbengengxin" @click="goUrlLog()"></i> -->
<img src="../assets/img/AI.png" style="width: 25px;cursor: pointer;" title="AI行程" @click="goRequirement()">
<el-tooltip effect="dark" content="AI行程" placement="top">
<img src="../assets/img/AI.png" style="width: 30px;cursor: pointer;" @click="goRequirement()">
</el-tooltip>
</li>
<li style="display: flex;flex-direction: column;align-items: center;justify-content: center;">
<el-tooltip effect="dark" content="ERP智能客服" placement="top">
<!-- <img src="../assets/img/AI.png" style="width: 30px;cursor: pointer;" @click="goRequirement()"> -->
<div class="top-right-menu-item" style="margin-top: -10px;" @click="showCustomerServiceHandler()" ></div>
</el-tooltip>
</li>
<li v-if="!useRed"><i class="iconfont icon-gonggao"
@click="IM_bodyIsShow = !IM_bodyIsShow, IM_navType = 52"></i>
......@@ -2075,6 +2082,9 @@ export default {
}
},
methods: {
showCustomerServiceHandler() {
this.MsgBus.$emit("showCustomerServiceHandler",true);
},
// 销售看板
SalesBoard() {
this.apipost(
......@@ -4673,7 +4683,17 @@ export default {
.downmz .khd a {
color: #fff;
}
.top-right-menu-item{
width: 30px;
height: 30px;
background-image: url('../assets/img/robot.png');
background-size: 100% 100%;
background-repeat: no-repeat;
cursor: pointer;
}
.top-right-menu-item:hover{
background-image: url('../assets/img/robot_hover.png');
}
.downmz .khd {
display: inline-block;
width: 162px;
......
......@@ -124,7 +124,7 @@
<div class="option-label">{{ item.label }}</div>
</div>
</div>
<div class="qrcode-area" style="margin: 24px 0; text-align: center;" v-loading="createQrcode">
<div v-if="currentPublishOption!='pdfItinerary'" class="qrcode-area" style="margin: 24px 0; text-align: center;" v-loading="createQrcode">
<div style="height: 100px; width: 100px; background: #f5f5f5; display: inline-block; border-radius: 8px; line-height: 100px;">
<!-- 这里放二维码图片 -->
<img :src="qrcodeUrl" style="width: 100%; height: 100%;" />
......@@ -134,12 +134,13 @@
<el-input
v-model="publishShareLink"
readonly
placeholder="这里是分享链接"
placeholder=""
style="width: 100%;"
v-if="currentPublishOption!='wechatH5'"
>
<template #append>
<el-button @click="copyPublishLink">复制</el-button>
<el-button @click="openUrl(publishShareLink)">打开</el-button>
</template>
</el-input>
<div style="height: 30px;"></div>
......@@ -362,7 +363,7 @@ export default {
},
handlePDFItinerary(row) {
// 下载PDF行程书
window.open(`${this.baseHref}/api/itinerary/pdf/book/${row.id}`, '_blank');
this.getDownloadTDUrl(row);
},
handleWebSchedule(row) {
// 打开Web行程单页面
......@@ -453,6 +454,33 @@ export default {
);
}
},
getDownloadTDUrl(row) {
if(row.tdId == 0){
this.$message.error('请先创建TD行程');
return;
}
this.apipost && this.apipost(
"triptemplate_GetTripOther", {Id:row.tdId},
res => {
if (res.data && res.data.resultCode == 1) {
const params = {"Id":row.tdId,"Hash":res.data.data.HashInfo,"Range":"","Quality":1,"DownloadType":0}
this.apipost("ppt_get_downloadtoken",params,res=>{
if(res.data && res.data.resultCode == 1){
this.publishShareLink = `${this.domainManager().PptUrl}/download/${res.data.data}`;
}
});
} else {
this.$message.error('获取TD行程失败');
}
},
err => {
this.$message.error('获取TD行程失败');
}
);
},
openUrl(url){
window.open(url, '_blank');
},
editTD(row) {
// 先请求接口获取uid,再拼接PPT预览链接
if (row.tdId > 0) {
......@@ -461,7 +489,7 @@ export default {
res => {
if (res.data && res.data.resultCode == 1) {
let href = this.domainManager().PptUrl;
const pageUrl = `/editor/${row.tdId}/1/1/0/e/1/c/1`
const pageUrl = `/editor/${row.tdId}/${row.tdTemplate}/1/0/e/1/c/1`
let url = `${href}/autoLogin?uid=${res.data.data}&model=1001&redict=${encodeURIComponent(pageUrl)}`;
window.open(url, '_blank');
} else {
......
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