Commit 1af78c56 authored by 吴春's avatar 吴春

少价信息

parents e479d4ac 52a16e5f
......@@ -11,6 +11,7 @@
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=ZzGBZF6L0sgFDLlDohyvYhCnWy4dwksX" ></script>
<script type="text/javascript" src="http://api.map.baidu.com/library/CurveLine/1.5/src/CurveLine.min.js"></script>
<script type="text/javascript" src="http://ditu.google.cn/maps/api/js?key=AIzaSyAZ5MIfzicStzKbIkbI3RcBBeZBjQFKsp0&language=zh-CN"></script>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<title>四川和平国际旅行社</title>
</head>
<body>
......
......@@ -69,6 +69,8 @@ div{
font-family: SimSun;
font-size: 60px;
color: #000000;
position: relative;
z-index: 5;
}
.hotel_1_header>.hotel_1_header_title>div:nth-child(2){
margin: auto;
......@@ -92,6 +94,8 @@ div{
text-align: center;
font-family: SimSun;
font-size: 34px;
position: relative;
z-index: 5;
}
.hotel_1_header>.hotel_1_header_title>div:nth-child(2)>img:nth-child(3){
position: absolute;
......@@ -231,6 +235,8 @@ div{
font-size: 30px;
line-height: 30px;
color: #222222;
position: relative;
z-index: 5;
}
.hotel_1_info_1_info>.hotel_1_info_1_info_right>div:nth-child(2){
margin: 12px 0;
......@@ -249,6 +255,8 @@ div{
font-size: 16px;
line-height: 25px;
color: #535353;
position: relative;
z-index: 5;
}
.hotel_1_info_2{
......@@ -375,6 +383,8 @@ div{
font-size: 30px;
line-height: 30px;
color: #222222;
position: relative;
z-index: 5;
}
.hotel_1_info_2_bottom>.hotel_1_info_2_bottom_right>div:nth-child(2){
margin: 12px 0;
......@@ -434,6 +444,8 @@ div{
font-size: 30px;
line-height: 30px;
color: #222222;
position: relative;
z-index: 5;
}
.hotel_2_info_1>.hotel_2_info_1_content>div:nth-child(2){
margin: 12px 0;
......@@ -452,6 +464,8 @@ div{
font-size: 16px;
line-height: 25px;
color: #535353;
position: relative;
z-index: 5;
}
.hotel_2_info_1>.hotel_2_info_1_img{
......@@ -617,6 +631,8 @@ div{
font-size: 30px;
line-height: 30px;
color: #222222;
position: relative;
z-index: 5;
}
.hotel_2_info_2_top>.hotel_2_info_2_top_right>div:nth-child(2){
margin: 12px 0;
......@@ -635,6 +651,8 @@ div{
font-size: 16px;
line-height: 25px;
color: #535353;
position: relative;
z-index: 5;
}
.hotel_2_info_2>.hotel_2_info_2_bottom{
......@@ -721,6 +739,8 @@ div{
font-family: SimSun;
font-size: 52px;
color: #000000;
position: relative;
z-index: 5;
}
.viewSpot_1_header>.viewSpot_1_header_title>div:nth-child(1)>div:nth-child(2){
display: inline-block;
......@@ -733,6 +753,8 @@ div{
font-family: SimSun;
font-size: 70px;
color: #000000;
position: relative;
z-index: 5;
}
.viewSpot_1_header>.viewSpot_1_header_title>div:nth-child(1)>div:nth-child(3){
display: inline-block;
......@@ -741,6 +763,8 @@ div{
font-family: SimSun;
font-size: 52px;
color: #000000;
position: relative;
z-index: 5;
}
.viewSpot_1_header>.viewSpot_1_header_title>div:nth-child(2){
margin: auto;
......@@ -763,6 +787,8 @@ div{
text-align: center;
font-family: SimSun;
font-size: 14px;
position: relative;
z-index: 5;
}
.viewSpot_1_header>.viewSpot_1_header_title>div:nth-child(2)>img:nth-child(3){
position: absolute;
......@@ -855,6 +881,8 @@ div{
font-size: 30px;
line-height: 30px;
color: #222222;
position: relative;
z-index: 5;
}
.viewSpot_1_info_1_info>.viewSpot_1_info_1_info_right>div:nth-child(2){
margin: 10px 0 0 0;
......@@ -1020,6 +1048,8 @@ div{
font-size: 30px;
line-height: 30px;
color: #222222;
position: relative;
z-index: 5;
}
.viewSpot_1_info_2_bottom>.viewSpot_1_info_2_bottom_right>div:nth-child(2){
margin: 12px 0;
......@@ -1038,6 +1068,8 @@ div{
font-size: 16px;
line-height: 25px;
color: #535353;
position: relative;
z-index: 5;
}
/* 景点2 */
......@@ -1101,6 +1133,8 @@ div{
font-size: 30px;
line-height: 30px;
color: #222222;
position: relative;
z-index: 5;
}
.viewSpot_2_info_1_info>.viewSpot_2_info_1_info_right>div:nth-child(2){
width: 100%;
......@@ -1261,6 +1295,8 @@ div{
font-size: 30px;
line-height: 30px;
color: #222222;
position: relative;
z-index: 5;
}
.viewSpot_2_info_2>.viewSpot_2_info_2_info_1>div:nth-child(2){
width: 100%;
......@@ -1298,6 +1334,8 @@ div{
font-size: 30px;
line-height: 30px;
color: #222222;
position: relative;
z-index: 5;
}
.viewSpot_2_info_2>.viewSpot_2_info_2_info_2>div:nth-child(2){
display: inline-block;
......@@ -1338,6 +1376,8 @@ div{
font-size: 30px;
line-height: 30px;
color: #222222;
position: relative;
z-index: 5;
}
.viewSpot_2_info_2>.viewSpot_2_info_2_info_3>div:nth-child(2){
width: 100%;
......@@ -1550,6 +1590,8 @@ div{
font-family: SimSun;
font-size: 52px;
color: #000000;
position: relative;
z-index: 5;
}
.restaurant_1_header>.restaurant_1_header_title>div:nth-child(1)>div:nth-child(2){
display: inline-block;
......@@ -1562,6 +1604,8 @@ div{
font-family: SimSun;
font-size: 70px;
color: #000000;
position: relative;
z-index: 5;
}
.restaurant_1_header>.restaurant_1_header_title>div:nth-child(1)>div:nth-child(3){
display: inline-block;
......@@ -1570,6 +1614,8 @@ div{
font-family: SimSun;
font-size: 52px;
color: #000000;
position: relative;
z-index: 5;
}
.restaurant_1_header>.restaurant_1_header_title>div:nth-child(2){
margin: auto;
......@@ -1592,6 +1638,8 @@ div{
text-align: center;
font-family: SimSun;
font-size: 14px;
position: relative;
z-index: 5;
}
.restaurant_1_header>.restaurant_1_header_title>div:nth-child(2)>img:nth-child(3){
position: absolute;
......@@ -1684,6 +1732,8 @@ div{
font-size: 30px;
line-height: 30px;
color: #222222;
position: relative;
z-index: 5;
}
.restaurant_1_info_1_info>.restaurant_1_info_1_info_right>div:nth-child(2){
margin: 10px 0 0 0;
......@@ -1841,6 +1891,8 @@ div{
font-size: 30px;
line-height: 30px;
color: #222222;
position: relative;
z-index: 5;
}
.restaurant_1_info_2_right_bottom>.restaurant_1_info_2_right_bottom_right>div:nth-child(2){
margin: 12px 0;
......
......@@ -46,9 +46,9 @@
.totalTabal td{
height:33px;
}
body{
/* body{
min-width: 100%!important;
}
} */
</style>
<template>
......
......@@ -114,7 +114,7 @@
<li>
<span>
<em>单号</em>
<el-input placeholder="" class="w150" type="number" v-model="msg.FrID"></el-input>
<el-input placeholder="" class="w150" v-model="msg.FrID" @keyup.native="checkInteger(msg,'FrID')"></el-input>
</span>
</li>
<li v-if="msg.Conditon==1">
......@@ -356,6 +356,7 @@
<button class="hollowFixedBtn" @click="resetPageIndex(),getPageList()">{{$t('pub.searchBtn')}}</button>
<button class="normalBtn" @click="goUrlAdd('ChoiceAddFinancialDocuments')">新增</button>
<button class="normalBtn" v-if="checkboxShow" @click="Financial_post_SetBatch">批量提交</button>
<button class="normalBtn" @click="method5()">导出</button>
<button class="hollowFixedBtn" @click="goUrl('WorkEntrustmentMy')">工作委托</button>
</li>
</ul>
......@@ -1002,6 +1003,26 @@ export default {
}
}, err => {})
},
//导出
method5: function() {
if(!this.msg.ClientID)this.msg.ClientID=0;
if(!this.msg.ClientType)this.msg.ClientType=0;
if(!this.msg.CurrencyId)this.msg.CurrencyId=0;
if(!this.msg.CostTypeID)this.msg.CostTypeID=0;
if(!this.msg.TemplateId)this.msg.TemplateId=0;
if(!this.msg.RB_Branch_Id)this.msg.RB_Branch_Id=-1;
if(!this.msg.RB_Depart_Id)this.msg.RB_Depart_Id=0;
if(!this.msg.UpdateBy)this.msg.UpdateBy=0;
if(!this.msg.TCID)this.msg.TCID=0;
if(!this.msg.OrderID)this.msg.OrderID=0;
if(!this.msg.Status)this.msg.Status=0;
if(!this.msg.FrID)this.msg.FrID=0;
if(!this.msg.Conditon)this.msg.Conditon=1;
if(!this.msg.TradeWay)this.msg.TradeWay=0;
if(!this.msg.AccountType)this.msg.AccountType=0;
this.msg.EmployeeId=this.userId;
this.GetLocalFile("Financial_get_OutToFinanceList", this.msg,"财务报表.xls");
} ,
getDepartment(){ //部门
this.apipost('admin_get_DepartmentGetList', this.getDepartmentMsg, res => {
if(res.data.resultCode == 1) {
......
......@@ -101,7 +101,7 @@
<el-row style="padding:15px 20px 0 0;">
<el-col :span="4">
<el-form-item label="单号:">
<el-input placeholder="" class="" v-model="msg.FrID"></el-input>
<el-input placeholder="" class="" v-model="msg.FrID" @keyup.native="checkInteger(msg,'FrID')"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
......
......@@ -171,8 +171,8 @@
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="单号:">
<el-input placeholder="" class="" v-model="msg.OrderId"></el-input>
<el-form-item label="单号:">
<el-input placeholder="" class="" v-model="msg.OrderId" @keyup.native="checkInteger(msg,'OrderId')"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
......
......@@ -868,7 +868,7 @@ export default {
this.loading = true;
this.apipost('Financial_post_Set',this.msg,res=>{
if(res.data.resultCode==1){
this.$confirm('是否继续制单?', '提示', {
this.$confirm('操作成功,是否继续制单?', '提示', {
confirmButtonText: '继续制单',
cancelButtonText: '不了,谢谢',
type: 'warning'
......
......@@ -1044,7 +1044,7 @@ export default {
console.log(this.msg);
this.apipost('Financial_post_Set',this.msg,res=>{
if(res.data.resultCode==1){
this.$confirm('是否继续制单?', '提示', {
this.$confirm('操作成功,是否继续制单?', '提示', {
confirmButtonText: '继续制单',
cancelButtonText: '不了,谢谢',
type: 'warning'
......
......@@ -45,7 +45,7 @@
</li>
<li>
<span><em>订单号</em></span>
<el-input class='w200' v-model='msg.tempOrderId'></el-input>
<el-input class='w200' v-model='msg.tempOrderId' @keyup.native="checkInteger(msg,'tempOrderId')"></el-input>
</li>
<li>
<span><em>订单状态</em></span>
......
......@@ -1595,7 +1595,7 @@
<td colspan="4" class="groupTourOrder_remarks" style="height: 40px;">
<div>
<div><span>备注:</span>
<p><span
<p><span v-if="item.tsId>0">投诉单号:<a href="javascript:void(0);" @click="goUrlTS('ComplaintsDetail',item.tsId,item.orderId,'投诉详情')">{{item.tsId}}</a> ;</span><span
v-if='item.clientSource==1&&item.brandName!=""'>{{item.brandName}}订单 {{item.platformOrder}};</span>{{item.remarks}}
</p></div>
<div>
......@@ -1962,6 +1962,18 @@
}
},
methods: {
//跳转
goUrlTS (path, id, orderId, title) {
this.$router.push({
name: path,
query: {
'id': id,
'orderId': orderId,
blank: 'y',
tab: title
}
})
},
getItem (obj) {
this.checkedObj = obj
},
......
......@@ -8,7 +8,8 @@
<div class="travelControlTrip detail-box">
<div class="trip_cover" v-show="pdfLoading" v-loading="pdfLoading"></div>
<input type="button" class="travelControlTripBtn" value="下载PDF" @click="toPDF(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游')" />
<input type="button" class="travelControlTripBtn" value="下载WORD" @click="gernalFeature()" /><!-- ToWord(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游') -->
<input type="button" style="width: auto !important;display:none" class="travelControlTripBtn" value="下载手机版WORD" @click="gernalFeature()" />
<!-- ToWord(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游') -->
<!--&&isopOperation HK 注释 可以让销售修改基本信息-->
<input type="button" v-if="orderId>0" class="travelControlTripBtn" value="修改信息" @click="editMsgShow=true" />
<div id="pdfNode">
......@@ -218,7 +219,7 @@
<div class="short-line"></div>
<div class="english-title">Trip characteristics</div>
</div>
<div v-html="feature.featureHtml"></div>
<div v-html="feature.featureHtml" id="gernalCanvas"></div>
</div>
<div id="teamacitvy"> </div>
</div>
......@@ -642,24 +643,42 @@
},
methods: {
gernalFeature(){
console.log(document.querySelector("#gernalCanvas").querySelectorAll('img'))
this.pdfLoading = true;
let tcid = this.$route.query.tcid;
let UploadUrl = this.domainManager().UploadUrl
$.ajax({
url: UploadUrl + '/Upload/RemoveImage?fileType=1&fileLimit=5&&filePath=Feature/' + tcid,
type: "POST",
datatype:"jsonP",
success: function (data) {
// console.log("上传成功",data);
},
error: function () {
// console.log("上传失败");
}
});
if (this.showType===4 || this.showType===5) {
document.querySelector("#gernalCanvas").querySelectorAll('img').forEach(x => {
if(x.src.indexOf('http')!=-1){
let src = x.src
src = src.replace('https:','http:')
if(src.indexOf('http')!=-1){
x.setAttribute('crossOrigin','anonymous')
}
x.src = src
});
let cName=''
if(showType==4){
if(this.showType==4){
cName='.feature-box'
}else if(showType==5){
}else if(this.showType==5){
cName='.travle_page'
}
if(cName!=''){
document.querySelectorAll(cName).forEach(x => {
let allNum = 1
document.querySelectorAll(cName).forEach((x, index) => {
html2Canvas(x,{
useCORS:true,
scale:0.7,
backgroundColor:'#FFFFFF'
backgroundColor:'#FFFFFF',
}).then((canvas) => {
if(canvas){
var context = canvas.getContext('2d')
......@@ -669,11 +688,39 @@
context.imageSmoothingEnabled = false
var image = new Image();
image.src = canvas.toDataURL("image/png");
document.body.appendChild(image)
// document.body.appendChild(image) upload.oytour.com
$.ajax({
url: UploadUrl + '/Upload/UploadBase64?fileType=1&fileLimit=5&&filePath=Feature/' + tcid,
type: "POST",
data: {
myfile: image.src,
fileIndex: index
},
datatype:"jsonP",
success: function (data) {
// console.log("上传成功",data);
},
error: function () {
// console.log("上传失败");
}
});
// this.uploadImg(tcid,{'myfile': image.src}, res=>{
// console.log(res)
// }, err=>{
// console.log("GHJK",err);
// })
if (allNum!==document.querySelectorAll(cName).length) {
allNum += 1
} else {
this.ToWord(this.orderMsg.startDate + this.orderMsg.lineteamName + this.orderMsg.dayNum + '日游')
}
}
});
});
}
}else {
this.ToWord(this.orderMsg.startDate + this.orderMsg.lineteamName + this.orderMsg.dayNum + '日游')
}
},
//保存基础数据
submitForm: function () {
......@@ -885,7 +932,10 @@
//是否显示团号
isShowTCNUM:this.vshowTCNUM?1:0
};
this.GetLocalFile("DownLoadTripWord", msg,title+ ".doc");
this.GetLocalFile("DownLoadTripWord", msg,title+ ".doc", res=>{
this.pdfLoading = false
});
},
DateDiff(sDate1, sDate2) { //sDate1和sDate2是2002-12-18格式
var aDate, oDate1, oDate2, iDays
......
......@@ -144,13 +144,14 @@
<ul>
<li>
<button class="hollowFixedBtn" @click="resetPageIndex(),initTableInfo()">{{$t('pub.searchBtn')}}</button>
<button type="button" class="normalBtn" @click="outerVisible=true">导入</button>
<button type="button" class="normalBtn" @click="downMuban()">下载导入模板</button>
<!-- <button type="button" class="normalBtn" @click="outerVisible=true">导入</button>
<button type="button" class="normalBtn" @click="downMuban()">下载导入模板</button> -->
<button class="normalBtn" @click="addShow=true,text='新增',addFun()" >新增</button>
<el-tooltip class="item" effect="dark" content="切换排版" placement="top-end">
<i v-if="transitionShow" class="iconfont icon-biaoge" @click="switchMethod(1)"></i>
<i v-if="transitionShow2" class="iconfont icon-icon-ssan" @click="switchMethod(2)"></i>
</el-tooltip>
<!-- <button type="button" class="normalBtn" @click="method5()">导出</button> -->
</li>
</ul>
</div>
......@@ -168,8 +169,8 @@
<p>摊账:{{item.IsShareAccount===0?'非摊账':'摊账'}}</p>
<p>营收报表:{{item.Is_Report===0?'不进入':'进入'}}</p>
<p class="_b_edit">
<button type="button" class="el-button el-tooltip item el-button--danger is-circle" aria-describedby="el-tooltip-694" tabindex="0" @click="financeinfoRemove(item.ID,item.Name)"><i class="el-icon-delete"></i></button>
<button type="button" class="el-button el-tooltip item el-button--primary is-circle" aria-describedby="el-tooltip-5781" tabindex="0" @click="editCurency(item.ID),text='修改'"><i class="el-icon-edit"></i></button>
<!-- <button type="button" class="el-button el-tooltip item el-button--danger is-circle" aria-describedby="el-tooltip-694" tabindex="0" @click="financeinfoRemove(item.ID,item.Name)"><i class="el-icon-delete"></i></button> -->
<button v-if="msg.EmployeeID==910" type="button" class="el-button el-tooltip item el-button--primary is-circle" aria-describedby="el-tooltip-5781" tabindex="0" @click="editCurency(item.ID),text='修改'"><i class="el-icon-edit"></i></button>
</p>
</div>
</div>
......@@ -192,21 +193,25 @@
<tbody class="po_content_item">
<tr v-for="(item,index) in CostTypeTreeList" :key="index" v-loading="loading">
<td width="200px">
<span class="cursorpointer" @click="editCurency(item.ID),text='修改'">{{item.Name}}</span>
<span class="cursorpointer" v-if="msg.EmployeeID==910" @click="editCurency(item.ID),text='修改'">{{item.Name}}</span>
<span class="cursorpointer" v-else>{{item.Name}}</span>
</td>
<template v-if="item.ChildList.length>0">
<td colspan="8" style="padding:0">
<table class="po_content_item po_content_item_two" style="width: 100%;" cellspacing="0" cellpadding="0">
<tbody>
<tr v-for="(son,sIndex) in item.ChildList">
<td style="" width="150px"><span class="cursorpointer" @click="editCurency(son.ID),text='修改'">{{son.Name}}</span></td>
<td style="" width="150px">
<span class="cursorpointer" v-if='msg.EmployeeID==910' @click="editCurency(son.ID),text='修改'">{{son.Name}}</span>
<span class="cursorpointer" v-else>{{son.Name}}</span></td>
<template v-if="son.ChildList.length>0">
<td colspan="7" style="padding:0">
<table class="po_content_item po_content_item_str" style="width: 100%" cellspacing="0" cellpadding="0">
<tbody>
<tr v-for="(grSon,gsIndex) in son.ChildList">
<td class="cursorpointer_last" width="150px">
<span class="cursorpointer" @click="editCurency(grSon.ID),text='修改'">{{grSon.Name}} <i @click.stop="financeinfoRemove(grSon.ID,grSon.Name)" class="el-icon-delete"></i></span></td>
<span class="cursorpointer" v-if='msg.EmployeeID==910' @click="editCurency(grSon.ID),text='修改'">{{grSon.Name}} <i @click.stop="financeinfoRemove(grSon.ID,grSon.Name)" class="el-icon-delete"></i></span>
<span class="cursorpointer" v-else>{{grSon.Name}}</span></td>
<td width="150px">{{grSon.BName}}</td>
<td width="150px">{{grSon.DeName}}</td>
<td width="150px">{{grSon.PName}}</td>
......@@ -464,6 +469,7 @@
Name:'',
Tier:0,
ParentId:'',
EmployeeID:-1,
},
addMsg:{
ID:0,
......@@ -778,6 +784,10 @@
});
});
},
//导出费用类型明细报表
method5: function() {
this.GetLocalFile("financeinfo_post_OutToCostTypeExcel", this.msg,"费用类型明细报表.xls");
} ,
editCurency(id){ // 修改信息
this.apipost('financeinfo_post_GetCostType',{ID:id}, res => {
if(res.data.resultCode == 1) {
......@@ -995,6 +1005,7 @@
this.initTableInfo();
let userInfo = this.getLocalStorage();
this.departmentMsg.RB_Group_Id = this.companyMsg.RB_Group_Id = userInfo.RB_Group_id; //集团
this.msg.EmployeeID=userInfo.EmployeeId;
this.getDepartment();
this.getCompany();
this.getCostTypeTreeList();
......
......@@ -10,8 +10,8 @@
border-left: 1px solid #d1d1d1;
border-right: 1px solid #d1d1d1;
font-size: 14px;
/* width:100%; */
min-width: 5752px;
width:100%;
min-width: 1500px;
padding-bottom: 5px;
}
......@@ -24,29 +24,12 @@
border-right: 1px solid #d1d1d1;
position: relative;
background-color: #E6E6E6;
width:250px;
}
th[class=first]:before {
content: "";
position: absolute;
width: 1px;
height: 252px;
/*这里需要自己调整,根据td的宽度和高度*/
top: 0;
left: 0;
background-color: #d1d1d1;
display: block;
transform: rotate(-81deg);
/*这里需要自己调整,根据线的位置*/
transform-origin: top;
}
.LP_table td {
border-bottom: 1px solid #d1d1d1;
border-right: 1px solid #d1d1d1;
text-align: center;
padding: 5px;
min-width: 250px;
padding: 5px 0;
}
.LP_table .el-button--primary {
......@@ -64,51 +47,88 @@
right: 30px;
top: 5px;
}
.comLessDiv{
width:100%;
height:40px;
margin-top:5px;
padding-bottom:5px;
border-bottom:1px solid #d1d1d1;
}
.comLessDiv:last-child{
border:0;
padding-bottom:0;
}
.addLessPrice{
margin-left:10px;
color:seagreen;
cursor: pointer;
}
.lessBtn{
margin-top:5px;
}
</style>
<template>
<div>
<div class="query-box">
<ul>
<li>
<input type='button' class="normalBtn" @click="AddItem()" value="新增"></input>
</li>
</ul>
</div>
<div class="LM_mainDiv">
<!--保存-->
<table border="0" cellspacing="0" cellpadding="0" class="LP_table" v-loading="this.loading">
<tr>
<th class="first">
<span class="Lp_role">岗位</span>
<span class="Lp_company">公司</span>
</th>
<template v-for="item in BranchList">
<th>
{{item.BName}}
</th>
</template>
<th>
操作
</th>
<th width="200">公司</th>
<th width="350">线路/系列</th>
<th>所有人</th>
<th>部门主管</th>
<th>分公司总经理</th>
<th>当团op</th>
<th width="200">操作</th>
</tr>
<tr v-for="(item,index) in PageData">
<tr v-for="(item,index) in dataList">
<td>
{{item.BName}} <i class="iconfont icon-bumenguanli-tianjia addLessPrice" @click="addLessPrice(item)"></i>
</td>
<td>
<el-select :placeholder="$t('pub.pleaseSel')" class="w150" v-model="item.RoleId">
<el-option label="不限" :value="0"></el-option>
<el-option v-for="item in RoleList" :label="item.PostName" :value="item.PostId" :key="item.PostId"></el-option>
<div v-for="subItem in item.LessPriceList" class="comLessDiv">
<el-select class='w150' v-model="subItem.LineId" filterable :placeholder="$t('pub.pleaseSel')" @change="getLineTeamList(subItem),resetLineTeamId(subItem)">
<el-option label="不限" :value='commonSelect'></el-option>
<el-option v-for="item in LineList" :label='item.LineName' :value='item.LineID' :key='item.LineID'>
</el-option>
</el-select>
<el-select class='w150' v-model="subItem.LineTeamId" filterable :placeholder="$t('pub.pleaseSel')">
<el-option label="不限" :value='commonSelect'></el-option>
<el-option v-for="sitem in subItem.LineTeamList" :label='sitem.LtName' :value='sitem.LtID' :key='sitem.LtID'>
</el-option>
</el-select>
</div>
</td>
<template v-for="subItem in item.DetailExtList">
<td>
<el-input class="w80" placeholder="少价金額" v-model="subItem.LessMoney"></el-input>
<el-input class="w80" placeholder="减少提成百分比" v-model="subItem.LessPercent"></el-input>
<div v-for="subItem in item.LessPriceList" class="comLessDiv">
<el-input class="w80" placeholder="少价金額" v-model="subItem.LessMoney" @keyup.native="checkPrice(subItem,'LessMoney')"></el-input>
<el-input class="w80" placeholder="减少提成百分比" v-model="subItem.LessPercent" @keyup.native="checkPrice(subItem,'LessPercent')"></el-input>
</div>
</td>
</template>
<td>
<input type='button' class="normalBtn" @click="SaveLessPrice(item)" value="保存"></input>
<input type='button' class="normalBtn" @click="RemoveItem(item,index)" value="删除"></input>
<div v-for="subItem in item.LessPriceList" class="comLessDiv">
<el-input class="w80" placeholder="少价金額" v-model="subItem.DeptLessMoney" @keyup.native="checkPrice(subItem,'DeptLessMoney')"></el-input>
<el-input class="w80" placeholder="减少提成百分比" v-model="subItem.DeptLessPercent" @keyup.native="checkPrice(subItem,'DeptLessPercent')"></el-input>
</div>
</td>
<td>
<div v-for="subItem in item.LessPriceList" class="comLessDiv">
<el-input class="w80" placeholder="少价金額" v-model="subItem.FilialeLessMoney" @keyup.native="checkPrice(subItem,'FilialeLessMoney')"></el-input>
<el-input class="w80" placeholder="减少提成百分比" v-model="subItem.FilialeLessPercent" @keyup.native="checkPrice(subItem,'FilialeLessPercent')"></el-input>
</div>
</td>
<td>
<div v-for="subItem in item.LessPriceList" class="comLessDiv">
<el-input class="w80" placeholder="少价金額" v-model="subItem.OPLessMoney" @keyup.native="checkPrice(subItem,'OPLessMoney')"></el-input>
<el-input class="w80" placeholder="减少提成百分比" v-model="subItem.OPLessPercent" @keyup.native="checkPrice(subItem,'OPLessPercent')"></el-input>
</div>
</td>
<td>
<div v-for="(subItem,subIndex) in item.LessPriceList" class="comLessDiv">
<input type='button' class="normalBtn lessBtn" @click="SaveLessPrice(subItem,index)" value="保存"></input>
<input type='button' class="normalBtn lessBtn" @click="RemoveItem(item,subItem,subIndex)" value="删除"></input>
</div>
</td>
</tr>
</table>
......@@ -120,47 +140,25 @@
data() {
return {
//分公司列表
BranchList: [],
qMsg: {
PageIndex: 1,
PageSize: 100
},
PageData: [],
dataList: [],
//角色列表
RoleList: [],
loading:false
loading:false,
LineList: [],
commonSelect:0,
};
},
methods: {
AddItem() {
var obj = {
Id: 0,
RoleId: 0,
DetailExtList: [],
};
this.BranchList.forEach(item => {
obj.DetailExtList.push({
Id: 0,
ManagerId: 0,
RB_Branch_Id: item.Id,
LessMoney: 0,
LessPercent: 0
});
});
if (this.PageData == null) {
this.PageData = [];
}
this.PageData.push(obj);
},
//保存少价管理
SaveLessPrice(item) {
SaveLessPrice(subItem) {
subItem.LineTeamList=[];
this.apipost(
"lessprice_post_Set", item,
"lessprice_post_Set", subItem,
res => {
if (res.data.resultCode == 1) {
this.Success("操作成功!");
this.GetList();
} else {
this.Success(res.data.message);
this.getList();
}else{
this.Error(res.data.message);
}
},
......@@ -168,61 +166,103 @@
);
},
//获取列表
GetList() {
getList() {
this.loading = true;
this.apipost(
"lessprice_get_GetPageList", this.qMsg,
var that=this;
that.apipost(
"lessprice_get_GetPageList", {},
res => {
this.loading = false;
that.loading = false;
if (res.data.resultCode == 1) {
this.BranchList = res.data.data.branchList;
this.PageData = res.data.data.DataList.pageData;
var data = res.data.data;
data.forEach(x=>{
x.LessPriceList.forEach(y=>{
that.getLineTeamList(y);
})
})
that.dataList=data;
}else{
that.Error(res.data.message);
}
},
err => {}
);
},
//获取列表
GetRoleList() {
let userInfo=this.getLocalStorage();
this.apipost(
"admin_get_PostGetList", {"RB_Group_Id":userInfo.RB_Group_id},
res => {
if (res.data.resultCode == 1) {
this.RoleList = res.data.data;
RemoveItem(item,subItem, index) {
if(subItem.Id==0){
item.LessPriceList.splice(index,1);
return;
}
},
err => {}
);
},
//获取列表
RemoveItem(item, index) {
var that = this;
this.Confirm("是否删除此少价信息?", function () {
if (item.Id > 0) {
if (subItem.Id > 0) {
that.apipost(
"lessprice_post_Remove", {
ID: item.Id
ID: subItem.Id
},
res => {
if (res.data.resultCode == 1) {
that.Success("操作成功!");
that.GetList();
that.getList();
} else {
that.Error(res.data.message);
}
},
err => {}
);
} else {
that.PageData.splice(index, 1);
}
});
},
//获取线路列表
getLineList() {
this.apipost("line_post_GetAllList", {}, res => {
if (res.data.resultCode == 1) {
this.LineList = res.data.data;
}
});
},
//获取系列列表
getLineTeamList(subItem) {
this.apipost("team_post_GetList", {
lineID: subItem.LineId,
isTOOP: 1
}, res => {
if (res.data.resultCode == 1) {
subItem.LineTeamList = res.data.data;
}
});
},
//系列重置默认不限
resetLineTeamId(subItem){
subItem.LineTeamId = 0;
},
//点击添加
addLessPrice(item){
var obj = {
DeptLessMoney:0,
DeptLessPercent:0,
DetailExtList:'',
FilialeLessMoney:0,
FilialeLessPercent:0,
Id:0,
LessMoney:0,
LessPercent:0,
LineId:0,
LineTeamId:0,
OPLessMoney:0,
OPLessPercent:0,
RB_Branch_Id:item.Id,
RB_Group_Id:0,
LineTeamList:[],
}
item.LessPriceList.push(obj);
}
},
mounted() {
this.GetRoleList();
this.GetList();
this.getLineList();
this.getList();
},
};
......
......@@ -11,7 +11,7 @@ export default {
install(Vue, options) {
Vue.prototype.MsgBus = MsgBus;
Vue.prototype.md5 = md5;
Vue.prototype.orderBy = function(source, orders, type) {
Vue.prototype.orderBy=function(source, orders, type) {
if (
source instanceof Array &&
orders instanceof Array &&
......@@ -77,27 +77,27 @@ export default {
return source;
}
},
Vue.prototype.calcPageSize = function(itemHeight) {
let yuHeight = itemHeight
Vue.prototype.calcPageSize=function(itemHeight){
let yuHeight=itemHeight
try {
let obj = null
document.querySelectorAll('.frame-box').forEach(x => {
if (x.style.display != 'none') {
obj = x
let obj=null
document.querySelectorAll('.frame-box').forEach(x=>{
if(x.style.display!='none'){
obj=x
}
})
let dom = obj.offsetHeight
yuHeight = dom - (obj.querySelector('.v-table-header') ? obj.querySelector('.v-table-header').offsetHeight : 39) - 50 //减去面包屑,减去表格头部,减去分页,减去偏量
let dom=obj.offsetHeight
yuHeight=dom-(obj.querySelector('.v-table-header')?obj.querySelector('.v-table-header').offsetHeight:39)-50//减去面包屑,减去表格头部,减去分页,减去偏量
//减去其它同级元素
obj.childNodes[0].childNodes.forEach(x => {
if (x.className && x.className.indexOf('v-table-views') == -1) {
yuHeight -= x.offsetHeight ? x.offsetHeight : 0
obj.childNodes[0].childNodes.forEach(x=>{
if(x.className && x.className.indexOf('v-table-views')==-1){
yuHeight-=x.offsetHeight?x.offsetHeight:0
}
})
} catch (error) { console.log(error) }
return Math.floor(yuHeight / itemHeight)
} catch (error) {console.log(error)}
return Math.floor(yuHeight/itemHeight)
}
Vue.prototype.random_string = function(len) {
Vue.prototype.random_string = function (len) {
len = len || 32;
var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
var maxPos = chars.length;
......@@ -108,23 +108,24 @@ export default {
return pwd;
},
//是否是线上环境【发布时修改为true】
Vue.prototype.isOnline = function() {
Vue.prototype.isOnline = function () {
return process.env.NODE_ENV !== 'development';
},
//域名管理对象
Vue.prototype.domainManager = function() {
Vue.prototype.domainManager = function () {
let domainUrl = '';
let locationName = window.location.hostname;
// domainUrl = "http://192.168.2.214:8082"; //214主域名
domainUrl = "http://127.0.0.1"; //214主域名
// 127.0.0.12
// domainUrl = "http://192.168.2.88"; //王悦主域名
// domainUrl = "http://127.0.0.1"; //214主域名
// domainUrl = "http://192.168.2.16:8083"; //王悦主域名
// domainUrl = "http://127.0.0.1"; //214主域名
domainUrl = "http://192.168.2.65:8025"; //吴春主域名
// domainUrl = "http://192.168.2.65:8025"; //吴春主域名
// domainUrl = "http://192.168.2.106:8082"; //罗超主域名
if (locationName.indexOf('oytour') !== -1) {
if (locationName.indexOf('oytour')!==-1) {
domainUrl = "https://reborn.oytour.com";
} else if (locationName.indexOf('viitto') !== -1) {
}else if (locationName.indexOf('viitto')!==-1) {
domainUrl = "https://test.viitto.com";
}
var obj = {
......@@ -147,18 +148,19 @@ export default {
//google地图Url
GoogleMapUrl: "http://ditu.google.cn/maps/api/js?key=AIzaSyAZ5MIfzicStzKbIkbI3RcBBeZBjQFKsp0&sensor=false&language=zh-CN",
//google地图图片地址
GoogleMapImageUrl: "http://super.oytour.com"
GoogleMapImageUrl: "http://super.oytour.com",
UploadUrl: "http://upload.oytour.com"
};
return obj;
},
Vue.prototype.yinyanFn = function(url, successCall, faildCall) {
Vue.prototype.yinyanFn = function (url, successCall, faildCall) {
this.$http.jsonp(url, )
.then(res => {
successCall(res)
}, faildCall)
},
//消息成功提示
Vue.prototype.Success = function(msg) {
Vue.prototype.Success = function (msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -166,7 +168,7 @@ export default {
});
},
//错误提示
Vue.prototype.Error = function(msg) {
Vue.prototype.Error = function (msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -175,7 +177,7 @@ export default {
},
//一般提示
Vue.prototype.Info = function(msg) {
Vue.prototype.Info = function (msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -183,7 +185,7 @@ export default {
});
},
//警告提示
Vue.prototype.Warning = function(msg) {
Vue.prototype.Warning = function (msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -191,7 +193,7 @@ export default {
});
},
//Confirm
Vue.prototype.Confirm = function(msg, callback) {
Vue.prototype.Confirm = function (msg, callback) {
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
......@@ -208,13 +210,22 @@ export default {
},
//打开新窗口连接
Vue.prototype.OpenNewUrl = function(URL) {
Vue.prototype.OpenNewUrl = function (URL) {
if (URL != '') {
window.open('http://' + URL, '_blank');
}
}
Vue.prototype.uploadImg = function (tcID, msg, successCall, faildCall) {
var apiurl = this.domainManager().Upload + '/Upload/UploadBase64?fileType=1&fileLimit=5&&filePath=Freature/TCID' + tcID;
this.$http.post(apiurl, msg, {
datatype:"jsonP",
}).then(res => {
successCall(res);
}, faildCall)
}
//HTTP提交数据
Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -267,7 +278,7 @@ export default {
},
//下载文件
Vue.prototype.GetLocalFile = function(cmd, msg, fileName) {
Vue.prototype.GetLocalFile = function (cmd, msg, fileName, successCall) {
var apiurl = this.domainManager().LocalFileStreamDownLoadUrl;
var timestamp = (new Date()).valueOf();
if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") {
......@@ -302,20 +313,21 @@ export default {
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
}).catch(function(res) {});
successCall(res);
}).catch(function (res) {});
},
Vue.prototype.getCookieItem = function() {
Vue.prototype.getCookieItem = function () {
return JSON.parse(this.getCookie("userInfo"))
},
Vue.prototype.getLocalStorage = function() {
Vue.prototype.getLocalStorage = function () {
var localStorageData = window.localStorage["userInfo"];
if (localStorageData !== undefined && localStorageData != 'undefined') {
if (localStorageData !== undefined && localStorageData!='undefined') {
return JSON.parse(localStorageData);
} else {
return null;
}
},
Vue.prototype.getCookie = function(cookieName) {
Vue.prototype.getCookie = function (cookieName) {
var strCookie = document.cookie;
var arrCookie = strCookie.split("; ");
for (var i = 0; i < arrCookie.length; i++) {
......@@ -326,19 +338,19 @@ export default {
}
return "";
},
Vue.prototype.getLoginUser = function() {
Vue.prototype.getLoginUser = function () {
return this.loginUser
},
Vue.prototype.setLoginUser = function(user) {
Vue.prototype.setLoginUser = function (user) {
this.loginUser = user
}
//PDF预览
Vue.prototype.previewPDF = function(url) {
Vue.prototype.previewPDF = function (url) {
window.open(this.domainManager().PDFViewUrl + url);
},
Vue.prototype.downloadFile = function(objectKey) {
Vue.prototype.downloadFile = function (objectKey) {
var co = require('co');
var OSS = require('ali-oss');
var oss = new OSS({
......@@ -354,7 +366,7 @@ export default {
link.click();
},
Vue.prototype.downloadFileRename = function(objectKey, filename, fileurl) {
Vue.prototype.downloadFileRename = function (objectKey, filename, fileurl) {
var co = require('co');
var OSS = require('ali-oss');
......@@ -366,7 +378,7 @@ export default {
})
let url = '';
if (fileurl)
if(fileurl)
url = fileurl
else
url = oss.signatureUrl(objectKey);
......@@ -398,7 +410,7 @@ export default {
});
},
Vue.prototype.getFileBlob = function(objectKey, filename) {
Vue.prototype.getFileBlob = function (objectKey, filename) {
var co = require('co');
var OSS = require('ali-oss');
var oss = new OSS({
......@@ -425,7 +437,7 @@ export default {
//path 请按照"/模块名称/用户ID/自定义文件夹/" /谁搞错一次5块红包
//files 文件数组
//p 进度回调函数
Vue.prototype.uploadFile = function(path, files, successCall) {
Vue.prototype.uploadFile = function (path, files, successCall) {
if (files && files.length > 0) {
let nameList = new Array()
for (let index = 0; index < files.length; index++) {
......@@ -438,24 +450,24 @@ export default {
bucket: 'reborndev'
})
let that = this
co(function*() {
co(function* () {
for (let index = 0; index < files.length; index++) {
let fileName = nameList[index]
fileName = path + fileName + "." + files[index].name.split('.').pop()
var result = yield oss.multipartUpload(fileName, files[index], {
progress: function*(p) {},
progress: function* (p) {},
mime: 'application/octet-stream'
})
successCall(result);
}
}).catch(function(err) {
}).catch(function (err) {
console.log(err);
});
}
},
Vue.prototype.uploadBlob = function(path, files, successCall) {
Vue.prototype.uploadBlob = function (path, files, successCall) {
if (files && files.length > 0) {
var oss = new OSS({
region: 'oss-cn-hangzhou',
......@@ -464,22 +476,22 @@ export default {
bucket: 'reborndev'
})
let that = this
co(function*() {
co(function* () {
for (let index = 0; index < files.length; index++) {
var result = yield oss.multipartUpload(path, files[index], {
progress: function*(p) {},
progress: function* (p) {},
mime: 'application/octet-stream'
})
successCall(result);
}
}).catch(function(err) {
}).catch(function (err) {
console.log(err);
});
}
},
//验证只能输入2位小数【负数:isMinus传true】
Vue.prototype.checkPrice = function(item, filed, isMinus) {
Vue.prototype.checkPrice = function (item, filed, isMinus) {
var value = "" + item[filed]; //转字符串
var t = value.charAt(0);
value = value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
......@@ -497,7 +509,7 @@ export default {
item[filed] = value;
}
//验证输入6位小数汇率
Vue.prototype.checkRate = function(item, filed) {
Vue.prototype.checkRate = function (item, filed) {
var value = "" + item[filed]; //转字符串
var p1 = /[^\d\.]/g; // 过滤非数字及小数点 /g :所有范围中过滤
var p2 = /(\.\d{6})\d*$/g;
......@@ -512,7 +524,7 @@ export default {
}
//验证只能输入整数【负数:isMinus传true】
Vue.prototype.checkInteger = function(item, filed, isMinus) {
Vue.prototype.checkInteger = function (item, filed, isMinus) {
var value = "" + item[filed]; //转字符串
var t = value.charAt(0);
value = value.replace(this.$commonUtils.Regex.isInteger, "");
......@@ -524,7 +536,7 @@ export default {
}
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue.prototype.moneyFormat = function(value) {
Vue.prototype.moneyFormat = function (value) {
let nStr = Number(value).toFixed(2)
nStr += '';
let x = nStr.split('.');
......@@ -537,7 +549,7 @@ export default {
return x1 + x2;
},
Vue.prototype.loadFileICON = function(suffix) {
Vue.prototype.loadFileICON = function (suffix) {
let icons = [{
"name": "\u7f51\u76d8BT\u79bb\u7ebf\u4e0b\u8f7d",
......
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