Commit 6166b237 authored by 黄奎's avatar 黄奎

页面修改

parent 5c32db81
...@@ -2,8 +2,8 @@ var OSS = require('ali-oss').Wrapper ...@@ -2,8 +2,8 @@ var OSS = require('ali-oss').Wrapper
export function client(data) { export function client(data) {
var client = new OSS({ var client = new OSS({
region: 'oss-cn-hangzhou.aliyuncs.com', //云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,部署在服务端使用RAM子账号或STS,部署在客户端使用STS。 region: 'oss-cn-hangzhou.aliyuncs.com', //云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,部署在服务端使用RAM子账号或STS,部署在客户端使用STS。
accessKeyId: 'LTAIwE7l9dImZSa3', accessKeyId: 'LTAI5tFgqt1pwnoA35cigYTr',
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI', accessKeySecret: 'wXPoEqJ7qLdvX9iBluIebhCPSzoemy',
bucket: 'reborndev' bucket: 'reborndev'
}) //后端提供数据 }) //后端提供数据
return client return client
......
...@@ -11,85 +11,83 @@ ...@@ -11,85 +11,83 @@
</style> </style>
<template> <template>
<table border="0" cellspacing="1" cellpadding="0" class="busStatisticsTalbe" v-loading='loading'> <div class="japanorder">
<tr> <el-table :data="OrderList" style="width: 100%" height="250">
<th width="100" rowspan="2" v-if="pagesTitle=='印象车行-运行统计表'">车公司</th> <el-table-column fixed prop="CustomerName" label="使用单位" width="150">
<th width="110" rowspan="2" v-if="pagesTitle=='印象车行-运行统计表'">车牌号</th> </el-table-column>
<th width="110" rowspan="2" v-if="pagesTitle=='印象车行-运行统计表'">司机</th> <el-table-column fixed label="用车性质" width="165">
<th width="150" rowspan="2" v-if="pagesTitle=='印象车行-运行统计表'">车型</th> <el-table-column prop="UseType" label="接机" width="50">
<th width="150" rowspan="2">使用单位</th> <template slot-scope="scope">
<th width="100" colspan="3">用车性质</th> <template v-if="scope.row.UseType==1">
<th width="100" colspan="2">用车时间</th> <span></span>
<th rowspan="2" :colspan="ColsCount">用车详情 </th> </template>
</tr> </template>
<tr> </el-table-column>
<th width="100">接机</th> <el-table-column prop="UseType" label="送机" width="50">
<th width="100">送机</th> <template slot-scope="scope">
<th width="100">包机</th> <template v-if="scope.row.UseType==2">
<th width="100">出发预订</th> <span></span>
<th width="100">结束预订</th> </template>
</tr> </template>
<tbody v-for="(outItem,outindex) in OrderList" class="splitTrCss1" :key="outindex"> </el-table-column>
<tr> <el-table-column prop="UseType" label="一日游" width="65">
<td v-if="pagesTitle=='印象车行-运行统计表'"> <template slot-scope="scope">
{{outItem.SupplierName}} <template v-if="scope.row.UseType==4">
</td> <span></span>
<td v-if="pagesTitle=='印象车行-运行统计表'"> </template>
{{outItem.CarNo}} </template>
</td> </el-table-column>
<td v-if="pagesTitle=='印象车行-运行统计表'"> </el-table-column>
{{outItem.DriverName}} {{outItem.CopilotDriverName}} <el-table-column fixed prop="GuestNum" label="人数" width="80">
</td> <template slot-scope="scope">
<td v-if="pagesTitle=='印象车行-运行统计表'"> <span>
{{outItem.CarName}} {{scope.row.GuestNum}} <template v-if="scope.row.TourGuideNum==4">
</td> +{{scope.row.TourGuideNum}}
<td> </template>
{{outItem.CustomerName}} </span>
</td> </template>
<td> </el-table-column>
{{outItem.AirportPickUpCount}} <el-table-column fixed label="用车时段" width="160">
</td> <el-table-column prop="StartTime" label="出发预定" width="80">
<td> <template slot-scope="scope">
{{outItem.SendingMachineCount}} <span>{{scope.row.StartTime}}</span>
</td> </template>
<td> </el-table-column>
{{outItem.UseDayCount}} <el-table-column prop="EndTime" label="结束预定" width="80">
</td> <template slot-scope="scope">
<td> <span>{{scope.row.EndTime}}</span>
{{outItem.UseDateStr}} </template>
</td> </el-table-column>
<td> <template v-for="(item,index) in headerList">
{{outItem.EndUseDateStr}} <el-table-column :key="index" :prop="item.LabelValue" :label="item.LabelName" width="135" align="center">
</td> <template slot-scope="scope">
<td v-for="(item,index) in ColsCount" :key="index"> <template v-if="scope.row.OrderDayCalendar[index].UseState!=-1">
<div class="w135" v-if="(index+1)<=outItem.OrderDayCalendar.length"> <el-tooltip class="item" effect="dark" placement="top">
<div v-if="outItem.OrderDayCalendar[index].UseState>-1"> <div slot="content" style="width:200px;">{{scope.row.OrderDayCalendar[index].BusContent}}</div>
<p> <div>
{{outItem.OrderDayCalendar[index].UseDateStr}} <span>{{scope.row.OrderDayCalendar[index].StartCity}}
</p> <template
<el-tooltip class="item" effect="dark" placement="top"> v-if="scope.row.OrderDayCalendar[index].StartCity&&scope.row.OrderDayCalendar[index].EndCity">--></template>
<div slot="content" style="width:200px;">{{outItem.OrderDayCalendar[index].BusContent}}</div> {{scope.row.OrderDayCalendar[index].EndCity}}
<span>{{outItem.OrderDayCalendar[index].StartCity}} </span>
<template <p>
v-if="outItem.OrderDayCalendar[index].StartCity&&outItem.OrderDayCalendar[index].EndCity">--></template> <span style="color: #4BCA81;" v-if="(scope.row.OrderDayCalendar[index].UseState==2)"></span>
{{outItem.OrderDayCalendar[index].EndCity}} <span style="color: #ff6600;" v-else-if="(scope.row.OrderDayCalendar[index].UseState==1)">O</span>
</span> <span style="color: #E95252;" v-else>×</span>
</el-tooltip> </p>
<p> </div>
<span style="color: #4BCA81;" v-if="(outItem.OrderDayCalendar[index].UseState==2)"></span> </el-tooltip>
                      <span style="color: #ff6600;" v-else-if="(outItem.OrderDayCalendar[index].UseState==1)">O</span> </template>
                      <span style="color: #E95252;" v-else>×</span> </template>
</p> </el-table-column>
</div> </template>
</div> </el-table-column>
</td> </el-table>
</tr> </div>
</tbody>
</table>
</template> </template>
<script> <script>
export default { export default {
props: ["OrderList", "pagesTitle", 'loading', 'ColsCount'], props: ["OrderList", "pagesTitle", 'loading', 'headerList'],
data() { data() {
return {}; return {};
}, },
...@@ -129,4 +127,9 @@ ...@@ -129,4 +127,9 @@
</script> </script>
<style></style> <style scope="this api replaced by slot-scope in 2.5.0+">
.japanorder .el-table .el-table__cell.is-hidden>* {
visibility: initial !important;
}
</style>
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
</div> </div>
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; margin-top: 10px; " class="ownScrollbarStyle" <div style="width: 100%; overflow-x: auto;padding-bottom: 10px; margin-top: 10px; " class="ownScrollbarStyle"
:style="{height: boxHeight + 'px'}"> :style="{height: boxHeight + 'px'}">
<OrderList :pagesTitle="Title" :OrderList="DataList" :ColsCount="ColsCount" :loading="loading" @success="msg.pageIndex=1,GetList()"> <OrderList :pagesTitle="Title" :headerList="headerList" :OrderList="DataList" :loading="loading"
@success="msg.pageIndex=1,GetList()">
</OrderList> </OrderList>
</div> </div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
...@@ -76,7 +77,8 @@ ...@@ -76,7 +77,8 @@
}, },
DataList: [], DataList: [],
boxHeight: 0, boxHeight: 0,
ColsCount:1,//动态计算跨多少列 ColsCount: 1, //动态计算跨多少列
headerList: [], //动态表头
} }
}, },
components: { components: {
...@@ -93,13 +95,38 @@ ...@@ -93,13 +95,38 @@
this.getList(); this.getList();
}, },
getList() { getList() {
this.loading = true this.loading = true;
this.apipost('JapanCar_get_GetJapanOrderStatisticsPageList', this.msg, res => { this.headerList = [];
this.apipost('JapanCar_get_GetJapanOrderCarConfirmPageList', this.msg, res => {
this.loading = false; this.loading = false;
console.log("JapanCar_get_GetJapanOrderCarConfirmPageList", JSON.parse(JSON.stringify(res.data)));
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.ColsCount=res.data.data.MaxUseDay; this.total = res.data.data.count;
this.total = res.data.data.pmodel.count; var tempArray = res.data.data.pageData;
this.DataList = res.data.data.pmodel.pageData; if (tempArray && tempArray.length > 0) {
var headerArray = tempArray[0].OrderDayCalendar;
if (headerArray && headerArray.length > 0) {
headerArray.forEach((item, index) => {
this.headerList.push({
LabelName: item.UseDateStr,
LabelValue: "" + index + ""
})
});
}
// tempArray.forEach(item => {
// item.OrderDayCalendar.forEach(subItem => {
// item[subItem.UseDateStr] = {
// BusContent: subItem.BusContent,
// EndCity: subItem.EndCity,
// StartCity: subItem.StartCity,
// UseDateStr: subItem.UseDateStr,
// UseState: subItem.UseState,
// };
// });
// });
}
console.log("tempArray", tempArray)
this.DataList = tempArray;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
......
...@@ -122,8 +122,8 @@ export default { ...@@ -122,8 +122,8 @@ export default {
let isOnline = 0; //0-本地测试,1-线上 let isOnline = 0; //0-本地测试,1-线上
let ocrUrl = "http://192.168.5.46:8888"; let ocrUrl = "http://192.168.5.46:8888";
domainUrl = "http://192.168.5.214"; domainUrl = "http://192.168.5.214";
// domainUrl = "http://192.168.5.46"; domainUrl = "http://192.168.5.46";
domainUrl = "http://192.168.5.25:8083"; //domainUrl = "http://192.168.5.25:8083";
// domainUrl = "http://reborn.oytour.com"; // domainUrl = "http://reborn.oytour.com";
let crmLocalFileStreamDownLoadUrl = ""; let crmLocalFileStreamDownLoadUrl = "";
crmLocalFileStreamDownLoadUrl = locationName.indexOf('oytour') !== -1 ? "http://crm.oytour.com" : "http://testcrm.oytour.com"; crmLocalFileStreamDownLoadUrl = locationName.indexOf('oytour') !== -1 ? "http://crm.oytour.com" : "http://testcrm.oytour.com";
...@@ -140,17 +140,14 @@ export default { ...@@ -140,17 +140,14 @@ export default {
crmUrl = "http://testcrm.oytour.com"; crmUrl = "http://testcrm.oytour.com";
ocrUrl = "http://ocr.oytour.com"; ocrUrl = "http://ocr.oytour.com";
isOnline = 1; isOnline = 1;
} } else if (locationName.indexOf('ys.oytour') !== -1) {
else if(locationName.indexOf('ys.oytour')!==-1)
{
domainUrl = "http://reborn.oytour.com"; domainUrl = "http://reborn.oytour.com";
mallUrl = "https://mallapi.oytour.com"; mallUrl = "https://mallapi.oytour.com";
lxymallUrl = "https://erpmallapi.oytour.com"; lxymallUrl = "https://erpmallapi.oytour.com";
crmUrl = "http://crm.oytour.com"; crmUrl = "http://crm.oytour.com";
ocrUrl = "http://ocr.oytour.com"; ocrUrl = "http://ocr.oytour.com";
isOnline = 1; isOnline = 1;
} } else if (locationName.indexOf('oytour') !== -1) {
else if (locationName.indexOf('oytour') !== -1) {
domainUrl = "http://reborn.oytour.com"; domainUrl = "http://reborn.oytour.com";
mallUrl = "https://mallapi.oytour.com"; mallUrl = "https://mallapi.oytour.com";
lxymallUrl = "https://erpmallapi.oytour.com"; lxymallUrl = "https://erpmallapi.oytour.com";
...@@ -182,9 +179,9 @@ export default { ...@@ -182,9 +179,9 @@ export default {
//google地图图片地址 //google地图图片地址
GoogleMapImageUrl: "http://imgfile.oytour.com", GoogleMapImageUrl: "http://imgfile.oytour.com",
//上传站点 //上传站点
UploadUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://upload.oytour.com" : "http://192.168.5.214:8120", UploadUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://upload.oytour.com" : "http://192.168.5.46:8120",
//文件站点 //文件站点
ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://imgfile.oytour.com" : 'http://192.168.5.214:8130', ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://imgfile.oytour.com" : 'http://192.168.5.46:8130',
javaUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.10.123:9000", javaUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.10.123:9000",
javaUrlNew: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://property.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.10.123:9000", javaUrlNew: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://property.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.10.123:9000",
//Java接口本站文件流下载地址 //Java接口本站文件流下载地址
...@@ -273,8 +270,8 @@ export default { ...@@ -273,8 +270,8 @@ export default {
if (this.$route.name.indexOf('login') === -1 && this.$route.name.indexOf('clientConfirm') === -1 && if (this.$route.name.indexOf('login') === -1 && this.$route.name.indexOf('clientConfirm') === -1 &&
this.$route.name.indexOf('confirmationOrderDownLoadNew') === -1 && this.$route.name.indexOf('PrintPage') === -1 && this.$route.name.indexOf('confirmationOrderDownLoadNew') === -1 && this.$route.name.indexOf('PrintPage') === -1 &&
this.$route.name.indexOf('TravelContractConfirm') === -1 && this.$route.name.indexOf('ViittoContractConfirm') === -1 && this.$route.name.indexOf('TravelContractConfirm') === -1 && this.$route.name.indexOf('ViittoContractConfirm') === -1 &&
this.$route.name.indexOf('OrderProfitLossList') === -1 && this.$route.name.indexOf('clientProtocol') === -1 this.$route.name.indexOf('OrderProfitLossList') === -1 && this.$route.name.indexOf('clientProtocol') === -1 &&
&& this.$route.name.indexOf('clientDisclaimerProtocol')===-1 this.$route.name.indexOf('clientDisclaimerProtocol') === -1
) { ) {
let previousPathInfo = { let previousPathInfo = {
path: this.$route.name, path: this.$route.name,
...@@ -339,9 +336,7 @@ export default { ...@@ -339,9 +336,7 @@ export default {
guestId: guestId, guestId: guestId,
} }
}) })
} } else if (this.$route.path == "/clientDisclaimerProtocol") {
else if(this.$route.path=="/clientDisclaimerProtocol")
{
let TCID = this.$route.query.TCID; let TCID = this.$route.query.TCID;
let OrderId = this.$route.query.OrderId; let OrderId = this.$route.query.OrderId;
let GuestId = this.$route.query.GuestId; let GuestId = this.$route.query.GuestId;
...@@ -353,8 +348,7 @@ export default { ...@@ -353,8 +348,7 @@ export default {
GuestId: GuestId, GuestId: GuestId,
} }
}) })
} } else if (this.$route.path == "/TravelContractConfirm") {
else if (this.$route.path == "/TravelContractConfirm") {
let ContractId = this.$route.query.ContractId; let ContractId = this.$route.query.ContractId;
this.$router.push({ this.$router.push({
name: "TravelContractConfirm", name: "TravelContractConfirm",
...@@ -987,14 +981,78 @@ export default { ...@@ -987,14 +981,78 @@ export default {
Vue.prototype.previewPDF = function (url) { Vue.prototype.previewPDF = function (url) {
window.open(url); window.open(url);
}, },
//阿里文件下载
Vue.prototype.ALiFileDownLoad2024 = function (objectKey) {
var uploadUrl = that.domainManager().UploadUrl + "/Upload/AliFileDownLoad?fileName=" + objectKey;
that.$http({
headers: {
'Content-Type': 'application/json'
},
method: 'get',
url: uploadUrl,
data: {},
responseType: 'arraybuffer'
}).then(res => {
var fileType = {
type: "application/pdf"
};
var fileExtension = objectKey.split('.').pop().toLowerCase();
switch (fileExtension) {
case 'jpg':
fileType.type = "";
break;
case 'jpeg':
fileType.type = "";
break;
case 'png':
fileType.type = "";
break;
case 'txt':
fileType.type = "";
break;
case 'pdf':
fileType.type = "";
break;
case 'mp3':
fileType.type = "";
break;
case 'wav':
fileType.type = "";
break;
case 'mp4':
fileType.type = "";
break;
case 'avi':
fileType.type = "";
break;
case 'mov':
fileType.type = "";
break;
case 'video':
fileType.type = "";
break;
}
let blob = new Blob([res.data], fileType)
let fileUrl = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = fileUrl;
link.setAttribute("download", fileName);
link.click();
that.loadingText = "";
}).catch(function (reason) {
that.$message.error('下载失败');
});
},
//文件下载 //文件下载
Vue.prototype.downloadFile = function (objectKey) { Vue.prototype.downloadFile = function (objectKey) {
var co = require('co'); var co = require('co');
var OSS = require('ali-oss'); var OSS = require('ali-oss');
var oss = new OSS({ var oss = new OSS({
region: 'oss-cn-hangzhou', region: 'oss-cn-hangzhou',
accessKeyId: 'LTAIwE7l9dImZSa3', accessKeyId: 'LTAI5tFgqt1pwnoA35cigYTr',
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI', accessKeySecret: 'wXPoEqJ7qLdvX9iBluIebhCPSzoemy',
bucket: 'reborndev' bucket: 'reborndev'
}) })
let url = oss.signatureUrl(objectKey); let url = oss.signatureUrl(objectKey);
...@@ -1009,7 +1067,7 @@ export default { ...@@ -1009,7 +1067,7 @@ export default {
var OSS = require('ali-oss'); var OSS = require('ali-oss');
var oss = new OSS({ var oss = new OSS({
region: 'oss-cn-hangzhou', region: 'oss-cn-hangzhou',
accessKeyId: 'LTAIwE7l9dImZSa3', accessKeyId: 'LTAI4jwDHbEXZJAa',
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI', accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI',
bucket: 'reborndev' bucket: 'reborndev'
}) })
...@@ -1051,8 +1109,8 @@ export default { ...@@ -1051,8 +1109,8 @@ export default {
var OSS = require('ali-oss'); var OSS = require('ali-oss');
var oss = new OSS({ var oss = new OSS({
region: 'oss-cn-hangzhou', region: 'oss-cn-hangzhou',
accessKeyId: 'LTAIwE7l9dImZSa3', accessKeyId: 'LTAI5tFgqt1pwnoA35cigYTr',
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI', accessKeySecret: 'wXPoEqJ7qLdvX9iBluIebhCPSzoemy',
bucket: 'reborndev' bucket: 'reborndev'
}) })
let url = oss.signatureUrl(objectKey); let url = oss.signatureUrl(objectKey);
...@@ -1115,10 +1173,40 @@ export default { ...@@ -1115,10 +1173,40 @@ export default {
}) })
}, },
//path 请按照"/模块名称/用户ID/自定义文件夹/" /谁搞错一次5块红包 Vue.prototype.UploadFileToAli2024 = function (path, files, successCall) {
//files 文件数组 if (files && files.length > 0) {
//p 进度回调函数 let nameList = new Array()
Vue.prototype.uploadFile = function (path, files, successCall) { for (let index = 0; index < files.length; index++) {
nameList.push(this.random_string());
}
let that = this;
co(function* () {
for (let index = 0; index < files.length; index++) {
let fileName = nameList[index]
fileName = path + fileName + "." + files[index].name.split('.').pop()
var formData = new FormData();
var uploadUrl = that.domainManager().UploadUrl + "/Upload/UploadToALiOSS?filePath=" + path;
formData.append("myfile", files[index]);
that.$http.post(uploadUrl, formData, {})
.then(res => {
successCall(res);
}).catch(function (reason) {
that.$refs['my-upload'].clearFiles();
that.$message.error('上传失败!');
that.MsgBus.$emit('UploadSelfFileErr')
});
}
}).catch(function (err) {
that.$refs['my-upload'].clearFiles();
that.$message.error('上传失败!');
});
}
}
//path 请按照"/模块名称/用户ID/自定义文件夹/" /谁搞错一次5块红包
//files 文件数组
//p 进度回调函数
Vue.prototype.uploadFile = function (path, files, successCall) {
if (files && files.length > 0) { if (files && files.length > 0) {
let nameList = new Array() let nameList = new Array()
for (let index = 0; index < files.length; index++) { for (let index = 0; index < files.length; index++) {
...@@ -1126,8 +1214,8 @@ export default { ...@@ -1126,8 +1214,8 @@ export default {
} }
var oss = new OSS({ var oss = new OSS({
region: 'oss-cn-chengdu', region: 'oss-cn-chengdu',
accessKeyId: 'LTAIwE7l9dImZSa3', accessKeyId: 'LTAI5tFgqt1pwnoA35cigYTr',
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI', accessKeySecret: 'wXPoEqJ7qLdvX9iBluIebhCPSzoemy',
bucket: 'vt-im-bucket' bucket: 'vt-im-bucket'
}) })
let that = this; let that = this;
...@@ -1154,8 +1242,8 @@ export default { ...@@ -1154,8 +1242,8 @@ export default {
var OSS = require('ali-oss'); var OSS = require('ali-oss');
var oss = new OSS({ var oss = new OSS({
region: 'oss-cn-chengdu', region: 'oss-cn-chengdu',
accessKeyId: 'LTAIwE7l9dImZSa3', accessKeyId: 'LTAI5tFgqt1pwnoA35cigYTr',
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI', accessKeySecret: 'wXPoEqJ7qLdvX9iBluIebhCPSzoemy',
bucket: 'vt-im-bucket' bucket: 'vt-im-bucket'
}) })
var resultJson = { var resultJson = {
......
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