Commit be2612ce authored by 黄奎's avatar 黄奎

前端js调整

parent 0041f961
<style scoped> <style scoped>
.user_time_picker .el-date-editor--date>.el-input__inner { .user_time_picker .el-date-editor--date>.el-input__inner {
padding: 0 10px; padding: 0 10px;
font-size: 13px; font-size: 13px;
} }
.user_time_picker .el-date-editor--date>span.el-input__prefix { .user_time_picker .el-date-editor--date>span.el-input__prefix {
display: none; display: none;
} }
.user_time_picker .el-date-editor--date>span.el-input__suffix { .user_time_picker .el-date-editor--date>span.el-input__suffix {
top: -4px; top: -4px;
right: 2px; right: 2px;
} }
.zidingyiFz i { .zidingyiFz i {
font-size: 14px !important; font-size: 14px !important;
} }
.page_addFD {
.page_addFD {
margin-top: 20px; margin-top: 20px;
position: relative; position: relative;
height: 1024px; height: 1024px;
...@@ -268,7 +269,8 @@ ...@@ -268,7 +269,8 @@
._addUpload_box>div:hover { ._addUpload_box>div:hover {
background-color: #f5f5f5; background-color: #f5f5f5;
} }
/deep/._addUpload_box .el-upload-dragger{
/deep/._addUpload_box .el-upload-dragger {
width: 126px !important; width: 126px !important;
height: 80px !important; height: 80px !important;
} }
...@@ -366,80 +368,83 @@ ...@@ -366,80 +368,83 @@
top: 10px; top: 10px;
cursor: pointer; cursor: pointer;
} }
</style>
<template> </style>
<div class="flexOne"> <template>
<div class="query-box"> <div class="flexOne">
<ul class="user_time_picker"> <div class="query-box">
<li> <ul class="user_time_picker">
<span><em>{{$t('objFill.v101.hote.beiwanlmc')}}</em> <li>
<el-input v-model="msg.EmName" @keyup.enter.native="getList"></el-input> <span><em>{{$t('objFill.v101.hote.beiwanlmc')}}</em>
</span> <el-input v-model="msg.EmName" @keyup.enter.native="getList"></el-input>
</li> </span>
<li> </li>
<span><em>{{$t('objFill.v101.administrative.kaishi')}}/{{$t('MarketingActi.endTime')}}</em> <li>
<el-date-picker v-model="msg.QStartDate" value-format="yyyy-MM-dd" class="w150" type="date" :clearable="false"></el-date-picker> <span><em>{{$t('objFill.v101.administrative.kaishi')}}/{{$t('MarketingActi.endTime')}}</em>
- <el-date-picker v-model="msg.QStartDate" value-format="yyyy-MM-dd" class="w150" type="date"
<el-date-picker v-model="msg.QEndDate" value-format="yyyy-MM-dd" class="w150" type="date" :clearable="false"></el-date-picker> :clearable="false"></el-date-picker>
</span> -
</li> <el-date-picker v-model="msg.QEndDate" value-format="yyyy-MM-dd" class="w150" type="date"
<li> :clearable="false"></el-date-picker>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" </span>
@click="resetPageIndex(), getList()" /> </li>
&nbsp; <li>
<input type="button" @click=" <input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')"
@click="resetPageIndex(), getList()" />
&nbsp;
<input type="button" @click="
(outerVisible = true), (outerVisible = true),
(isleaveBtn = false), (isleaveBtn = false),
(dialogTitle = $t('objFill.v101.hote.tianjiabwl')),addClick() (dialogTitle = $t('objFill.v101.hote.tianjiabwl')),addClick()
" class="normalBtn" :value="$t('pub.addBtn')" /> " class="normalBtn" :value="$t('pub.addBtn')" />
</li> </li>
</ul> </ul>
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0"> <table class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<th width="150px">{{$t('sm.Date')}}</th> <th width="150px">{{$t('sm.Date')}}</th>
<th width="150px">{{$t('system.query_airName')}}</th> <th width="150px">{{$t('system.query_airName')}}</th>
<th style="min-width: 300px;">{{$t('system.label_info')}}</th> <th style="min-width: 300px;">{{$t('system.label_info')}}</th>
<th width="200px">{{$t('objFill.v101.hote.wenjian')}}</th> <th width="200px">{{$t('objFill.v101.hote.wenjian')}}</th>
<th width="100px">{{$t('admin.admin_czPerson')}}</th> <th width="100px">{{$t('admin.admin_czPerson')}}</th>
<th width="150px">{{$t('fnc.caozuoriqi')}}</th> <th width="150px">{{$t('fnc.caozuoriqi')}}</th>
<th width="150px">{{$t('hotel.table_operat')}}</th> <th width="150px">{{$t('hotel.table_operat')}}</th>
</tr> </tr>
<tr v-for="(item, index) in DataList" v-loading="loading"> <tr v-for="(item, index) in DataList" v-loading="loading">
<td width="150px">{{ item.Date }}</td> <td width="150px">{{ item.Date }}</td>
<td width="150px">{{ item.Name }}</td> <td width="150px">{{ item.Name }}</td>
<td style="min-width: 200px;max-width: 400px;cursor: pointer;"> <td style="min-width: 200px;max-width: 400px;cursor: pointer;">
<el-tooltip class="item" effect="dark" :content="item.Content" placement="bottom"> <el-tooltip class="item" effect="dark" :content="item.Content" placement="bottom">
<div style="overflow: hidden;white-space: wrap;width: 100%;text-overflow: ellipsis;">{{ item.Content }}</div> <div style="overflow: hidden;white-space: wrap;width: 100%;text-overflow: ellipsis;">{{ item.Content }}
</el-tooltip> </div>
</td> </el-tooltip>
<td width="200px"> </td>
<div class="_addUpload_box clearfix"> <td width="200px">
<template v-for="(file,fIndex) in item.FileList"> <div class="_addUpload_box clearfix">
<div v-if="file.FileType==1" style="width: 30px;height: 30px;" @click="showUpLoadFile(file)"> <template v-for="(file,fIndex) in item.FileList">
<div style="width:100%;height:100%;overflow: hidden;"> <div v-if="file.FileType==1" style="width: 30px;height: 30px;" @click="showUpLoadFile(file)">
<img v-if="file.Url" :src="file.Url"> <div style="width:100%;height:100%;overflow: hidden;">
</div> <img v-if="file.Url" :src="file.Url">
</div> </div>
<div v-if="file.FileType==2" style="width: 30px;height: 30px;" @click="showUpLoadFile(file)"> </div>
<div class="iconfont " style="line-height: 19px;font-size: 18px;" <div v-if="file.FileType==2" style="width: 30px;height: 30px;" @click="showUpLoadFile(file)">
:class="file.Name.substring(file.Name.lastIndexOf('.')+1,file.Name.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'" <div class="iconfont " style="line-height: 19px;font-size: 18px;"
> :class="file.Name.substring(file.Name.lastIndexOf('.')+1,file.Name.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'">
</div>
</div> </div>
<div v-if="file.FileType==3" style="width: 30px;height: 30px;" @click="showUpLoadFile(file)"> </div>
<div class="iconfont icon-excel" @click="showUpLoadFile(file)"> <div v-if="file.FileType==3" style="width: 30px;height: 30px;" @click="showUpLoadFile(file)">
<div class="iconfont icon-excel" @click="showUpLoadFile(file)">
</div>
</div> </div>
</template> </div>
</div> </template>
</td> </div>
<td width="200px">{{ item.UpddateName }}</td> </td>
<td width="150px">{{ item.UpdateTime }}</td> <td width="200px">{{ item.UpddateName }}</td>
<td width="150px"> <td width="150px">{{ item.UpdateTime }}</td>
<template v-if="userInfo.EmployeeId==item.UpdateBy"> <td width="150px">
<template v-if="userInfo.EmployeeId==item.UpdateBy">
<el-tooltip class="item" effect="dark" :content="$t('objFill.v101.hote.xiugaibwl')" placement="top"> <el-tooltip class="item" effect="dark" :content="$t('objFill.v101.hote.xiugaibwl')" placement="top">
<el-button type="primary" icon="el-icon-edit" circle @click=" <el-button type="primary" icon="el-icon-edit" circle @click="
(outerVisible = true), (outerVisible = true),
...@@ -448,94 +453,83 @@ ...@@ -448,94 +453,83 @@
"></el-button> "></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top"> <el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top">
<el-button type="danger" icon="el-icon-delete" circle @click=" <el-button type="danger" icon="el-icon-delete" circle @click="
deleteData(item) deleteData(item)
"></el-button> "></el-button>
</el-tooltip> </el-tooltip>
</template> </template>
</td> </td>
</tr> </tr>
</table> </table>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total"> layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total">
</el-pagination> </el-pagination>
<el-dialog custom-class="w800" :title="dialogTitle" :visible.sync="outerVisible" center <el-dialog custom-class="w800" :title="dialogTitle" :visible.sync="outerVisible" center :close="closeChangeMachie">
:close="closeChangeMachie"> <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px"> <table class="layerTable layerNoIcon">
<table class="layerTable layerNoIcon"> <tr>
<tr> <td>
<td> <el-form-item :label="$t('objFill.v101.hote.beiwanlmc')" prop="Name" style="margin-bottom: 10px;">
<el-form-item :label="$t('objFill.v101.hote.beiwanlmc')" prop="Name" style="margin-bottom: 10px;"> <el-input maxlength="20" class="w217" type="text" v-model="addMsg.Name"
<el-input maxlength="20" class="w217" type="text" v-model="addMsg.Name" :placeholder="$t('objFill.v101.hote.qingsrbwlmc')"></el-input>
:placeholder="$t('objFill.v101.hote.qingsrbwlmc')"></el-input> </el-form-item>
</el-form-item> </td>
</td> <td>
<td> <el-form-item :label="$t('pub.date')" prop="Date" style="margin-bottom: 10px;">
<el-form-item :label="$t('pub.date')" prop="Date" style="margin-bottom: 10px;"> <el-date-picker value-format="yyyy-MM-dd" class="w217" v-model="addMsg.Date" type="date"
<el-date-picker value-format="yyyy-MM-dd" class="w217" v-model="addMsg.Date" type="date" :clearable="false"> :clearable="false">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</td> </td>
</tr> </tr>
</table> </table>
</el-form> </el-form>
<el-form label-width="100px"> <el-form label-width="100px">
<el-form-item :label="$t('system.label_info')" prop="" style="margin-bottom: 10px;"> <el-form-item :label="$t('system.label_info')" prop="" style="margin-bottom: 10px;">
<el-input maxlength="-1" type="textarea" :rows="5" v-model="addMsg.Content" <el-input maxlength="-1" type="textarea" :rows="5" v-model="addMsg.Content"
:placeholder="$t('system.label_info')" style="width: 100%;"></el-input> :placeholder="$t('system.label_info')" style="width: 100%;"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="_addUpload_box clearfix" style="margin-top: 20px;"> <div class="_addUpload_box clearfix" style="margin-top: 20px;">
<template v-for="(file,fIndex) in addMsg.FileList"> <template v-for="(file,fIndex) in addMsg.FileList">
<div v-if="file.FileType==1"> <div v-if="file.FileType==1">
<div style="width:100%;height:100%;overflow: hidden;"> <div style="width:100%;height:100%;overflow: hidden;">
<img v-if="file.Url" :src="file.Url" @click="showUpLoadFile(file)"> <img v-if="file.Url" :src="file.Url" @click="showUpLoadFile(file)">
</div>
<span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span>
</div> </div>
<div v-if="file.FileType==2"> <span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span>
<div class="iconfont " </div>
:class="file.Name.substring(file.Name.lastIndexOf('.')+1,file.Name.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'" <div v-if="file.FileType==2">
@click="showUpLoadFile(file)"> <div class="iconfont "
</div> :class="file.Name.substring(file.Name.lastIndexOf('.')+1,file.Name.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'"
<span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span> @click="showUpLoadFile(file)">
</div> </div>
<div v-if="file.FileType==3"> <span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span>
<div class="iconfont icon-excel" @click="showUpLoadFile(file)"> </div>
<div v-if="file.FileType==3">
<div class="iconfont icon-excel" @click="showUpLoadFile(file)">
</div>
<span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span>
</div> </div>
</template> <span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span>
<div class="_pic_upload" style="display: flex;justify-content: start;">
<el-upload drag :http-request="uploadFileBtn" :multiple="true" :show-file-list="false" action="">
<i class="el-icon-plus avatar-uploader-icon" style="margin-top: 16px;"></i>
<div class="el-upload__text">{{$t("active.ld_djscwj")}}</div>
</el-upload>
</div> </div>
</template>
<div class="_pic_upload" style="display: flex;justify-content: start;">
<el-upload drag :http-request="uploadFileBtn" :multiple="true" :show-file-list="false" action="">
<i class="el-icon-plus avatar-uploader-icon" style="margin-top: 16px;"></i>
<div class="el-upload__text">{{$t("active.ld_djscwj")}}</div>
</el-upload>
</div> </div>
<div slot="footer" class="dialog-footer"> </div>
<button class="hollowFixedBtn" @click="outerVisible=false,resetForm('addMsg')"> <div slot="footer" class="dialog-footer">
{{ $t("pub.cancelBtn") }} <button class="hollowFixedBtn" @click="outerVisible=false,resetForm('addMsg')">
</button> {{ $t("pub.cancelBtn") }}
&nbsp; </button>
<button class="normalBtn" @click="submitForm('addMsg')"> &nbsp;
{{ $t("pub.saveBtn") }} <button class="normalBtn" @click="submitForm('addMsg')">
</button> {{ $t("pub.saveBtn") }}
</div> </button>
<div v-if='picIsShow' class="_show_img_box" @click="picIsShow=false,picObj=[]"> </div>
<div <div v-if='picIsShow' class="_show_img_box" @click="picIsShow=false,picObj=[]">
style="position: absolute; width: 800px; height: 600px; left: 50%; top: 50%; margin-left: -400px; margin-top: -300px;">
<el-carousel :initial-index=initialIndex height="600px" :interval="5000" trigger="click">
<el-carousel-item style="height: 600px;overflow:auto;" v-for="(item,index) in picObj" :key="index">
<img :src="item" style="" />
</el-carousel-item>
</el-carousel>
</div>
</div>
</el-dialog>
<div v-if='picIsShow&&!outerVisible' class="_show_img_box" @click="picIsShow=false,picObj=[]">
<div <div
style="position: absolute; width: 800px; height: 600px; left: 50%; top: 50%; margin-left: -400px; margin-top: -300px;"> style="position: absolute; width: 800px; height: 600px; left: 50%; top: 50%; margin-left: -400px; margin-top: -300px;">
<el-carousel :initial-index=initialIndex height="600px" :interval="5000" trigger="click"> <el-carousel :initial-index=initialIndex height="600px" :interval="5000" trigger="click">
...@@ -545,278 +539,291 @@ ...@@ -545,278 +539,291 @@
</el-carousel> </el-carousel>
</div> </div>
</div> </div>
</el-dialog>
<div v-if='picIsShow&&!outerVisible' class="_show_img_box" @click="picIsShow=false,picObj=[]">
<div
style="position: absolute; width: 800px; height: 600px; left: 50%; top: 50%; margin-left: -400px; margin-top: -300px;">
<el-carousel :initial-index=initialIndex height="600px" :interval="5000" trigger="click">
<el-carousel-item style="height: 600px;overflow:auto;" v-for="(item,index) in picObj" :key="index">
<img :src="item" style="" />
</el-carousel-item>
</el-carousel>
</div>
</div> </div>
</template>
<script> </div>
export default { </template>
data() { <script>
return { export default {
isleaveBtn: false, data() {
loading: true, return {
total: 0, isleaveBtn: false,
pageSize: "", loading: true,
currentPage: 1, total: 0,
outerVisible: false, pageSize: "",
isRight: true, currentPage: 1,
dialogTitle: "", outerVisible: false,
//请求 isRight: true,
msg: { dialogTitle: "",
pageIndex: 1, //请求
pageSize: 15, msg: {
Name: '', pageIndex: 1,
QStartDate: '', pageSize: 15,
QEndDate: '' Name: '',
}, QStartDate: '',
rules: { QEndDate: ''
Name: [{ },
required: true, rules: {
message: this.$t('objFill.v101.hote.qingsrbwlmc'), Name: [{
trigger: "blur" required: true,
}], message: this.$t('objFill.v101.hote.qingsrbwlmc'),
Date: [{ trigger: "blur"
required: true, }],
message: this.$t('fnc.qingxuanzherq'), Date: [{
trigger: "change" required: true,
}], message: this.$t('fnc.qingxuanzherq'),
Content: [{ trigger: "change"
required: true, }],
message: this.$t('objFill.v101.activity.qingshurms'), Content: [{
trigger: "blur" required: true,
}] message: this.$t('objFill.v101.activity.qingshurms'),
trigger: "blur"
}]
},
addMsg: {
Id: 0,
Date: "",
Name: "",
Content: "",
FileList: []
},
//返回值的接收变量
EmLoginMobile: "",
DataList: [],
picIsShow: false,
picObj: [],
imgList: [],
initialIndex: 0,
leaves: {
t1: this.$t('pub.jobSel')
}
};
},
mounted() {
this.userInfo = this.getLocalStorage();
this.msg.QStartDate = this.getYMD()
this.addMsg.Date = this.getYMD()
this.getList();
},
filters: {
// leaveTimeFormat(value) {
// if (value == "") {
// return "在职";
// } else {
// return value;
// }
// }
},
methods: {
leaveTimeFormat(value) {
if (value == '') {
return this.leaves.t1
} else {
return value
}
},
handleExceed(file, fileList) {
this.$message.warning(this.$t('objFill.v101.administrative.yiczdwgwj'))
return
},
showUpLoadFile(i) { // 预览上传文件
if (i.FileType == 1) {
this.picObj.push(i.Url);
this.imgList.push(i.Url);
this.picIsShow = true;
} else {
if (i.Url.substring(i.Url.lastIndexOf('.') + 1, i.Url.length).toUpperCase() == 'PDF') {
this.previewPDF(i.Url)
} else {
// window.open("https://view.officeapps.live.com/op/view.aspx?src=" + i.Url)
window.open(i.Url)
}
}
},
uploadFileBtn(file) { //上传
if (file.file.size > 1024 * 1024 * 10) {
this.$message.warning(this.$t('tips.wjdxbncgsz'))
return
}
// 2 文档 1 图片
let typeArr = [{
stringArr: 'GIF|JPG|JPEG|PNG|BMP',
type: 1
}, },
addMsg: { {
Id: 0, stringArr: 'DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF',
Date: "", type: 2
Name: "",
Content: "",
FileList: []
}, },
//返回值的接收变量 ]
EmLoginMobile: "", let ft = file.file.name.substring(file.file.name.lastIndexOf('.') + 1, file.file.name.length).toUpperCase();
DataList: [], let fileTypeNumber = 2;
picIsShow: false, let typeOk = false;
picObj: [], typeArr.forEach(x => {
imgList: [], if (x.stringArr.indexOf(ft) != '-1') {
initialIndex: 0, fileTypeNumber = x.type
leaves: { typeOk = true;
t1: this.$t('pub.jobSel')
} }
}; })
let FileName = file.file.name.substring(0, file.file.name.lastIndexOf("."))
if (!typeOk) return this.$message.error(this.$t('tips.qscWEfile'));
let newArr = [];
newArr.push(file.file)
let path = "/Upload/Temporary/"
this.$message.info(this.$t('tips.shangchuanzhong'))
this.UploadSelfFileT(path, newArr, x => {
let fileSize = file.file.size < 1024 ? file.file.size : (file.file.size / 1024).toFixed(0);
this.addMsg.FileList.push({
Name: FileName,
FileType: fileTypeNumber,
Url: this.domainManager().ViittoFileUrl + x.data.FilePath,
})
this.Success(this.$t('tips.scchenggong'))
}, 1);
}, },
mounted() { getYMD() {
this.userInfo=this.getLocalStorage(); let myDate = new Date();
this.msg.QStartDate = this.getYMD() let myYear = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
this.addMsg.Date = this.getYMD() let myMonth = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月)
this.getList(); let myToday = myDate.getDate(); //获取当前日(1-31)
myMonth = myMonth > 9 ? myMonth : '0' + myMonth
myToday = myToday > 9 ? myToday : '0' + myToday
let nowDate = myYear + '-' + myMonth + '-' + myToday
return nowDate
}, },
filters: { getList() {
// leaveTimeFormat(value) { //获取数据
// if (value == "") { (this.loading = true),
// return "在职"; this.apipost(
// } else { "hotel_get_GetHotelMemoPageList",
// return value; this.msg,
// } res => {
// } if (res.data.resultCode == 1) {
this.loading = false;
this.DataList = res.data.data.pageData;
this.total = res.data.data.count;
} else {}
},
err => {}
);
}, },
addClick() {
methods: { this.addMsg = {
leaveTimeFormat(value) { Id: 0,
if (value == '') { Date: this.getYMD(),
return this.leaves.t1 Name: '',
} else { Content: '',
return value FileList: []
} }
}, },
handleExceed(file, fileList) { addData() {
this.$message.warning(this.$t('objFill.v101.administrative.yiczdwgwj')) if (this.isleaveBtn) return
return this.isleaveBtn = true;
}, this.apipost(
showUpLoadFile(i) { // 预览上传文件 "hotel_get_SetHotelMemo",
if (i.FileType == 1) { this.addMsg,
this.picObj.push(i.Url); res => {
this.imgList.push(i.Url); if (res.data.resultCode == 1) {
this.picIsShow = true; this.$message.success(res.data.message);
} else { this.outerVisible = false;
if (i.Url.substring(i.Url.lastIndexOf('.') + 1, i.Url.length).toUpperCase() == 'PDF') { this.getList();
this.previewPDF(i.Url) this.resetForm("addMsg");
} else { } else {
// window.open("https://view.officeapps.live.com/op/view.aspx?src=" + i.Url) this.$message.error(res.data.message);
window.open(i.Url)
}
}
},
uploadFileBtn(file) { //上传
if (file.file.size > 1024 * 1024 * 10) {
this.$message.warning(this.$t('tips.wjdxbncgsz'))
return
}
// 2 文档 1 图片
let typeArr = [{
stringArr: 'GIF|JPG|JPEG|PNG|BMP',
type: 1
},
{
stringArr: 'DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF',
type: 2
},
]
let ft = file.file.name.substring(file.file.name.lastIndexOf('.') + 1, file.file.name.length).toUpperCase();
let fileTypeNumber = 2;
let typeOk = false;
typeArr.forEach(x => {
if (x.stringArr.indexOf(ft) != '-1') {
fileTypeNumber = x.type
typeOk = true;
} }
}) this.isleaveBtn = false
let FileName = file.file.name.substring(0,file.file.name.lastIndexOf("."))
if (!typeOk) return this.$message.error(this.$t('tips.qscWEfile'));
let newArr = [];
newArr.push(file.file)
let path = "/Upload/Temporary/"
this.$message.info(this.$t('tips.shangchuanzhong'))
this.UploadSelfFileT(path, newArr, x => {
let fileSize = file.file.size < 1024 ? file.file.size : (file.file.size / 1024).toFixed(0);
this.addMsg.FileList.push({
Name: FileName,
FileType: fileTypeNumber,
Url: this.domainManager().ViittoFileUrl + x.data.FilePath,
})
this.Success(this.$t('tips.scchenggong'))
}, 1);
},
getYMD() {
let myDate = new Date();
let myYear = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
let myMonth = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月)
let myToday = myDate.getDate(); //获取当前日(1-31)
myMonth = myMonth > 9 ? myMonth : '0' + myMonth
myToday = myToday > 9 ? myToday : '0' + myToday
let nowDate = myYear +'-'+ myMonth +'-' + myToday
return nowDate
}, },
getList() { err => {
//获取数据 this.isleaveBtn = false
(this.loading = true),
this.apipost(
"hotel_get_GetHotelMemoPageList",
this.msg,
res => {
if (res.data.resultCode == 1) {
this.loading = false;
this.DataList = res.data.data.pageData;
this.total = res.data.data.count;
} else {}
},
err => {}
);
},
addClick(){
this.addMsg = {
Id: 0,
Date: this.getYMD(),
Name: '',
Content: '',
FileList: []
} }
}, );
addData() { this.getList();
if(this.isleaveBtn) return },
this.isleaveBtn = true; deleteData(item) {
this.apipost( let that = this;
"hotel_get_SetHotelMemo", that.$confirm(this.$t('objFill.v101.hote.shifousc'), this.$t('tips.tips'), {
this.addMsg, confirmButtonText: this.$t('pub.sureBtn'),
cancelButtonText: this.$t('pub.cancelBtn'),
type: 'warning'
}).then(() => {
this.apipost('hotel_get_RemoveHotelMemo', {
MemoId: item.Id
},
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode === 1) {
this.$message.success(res.data.message);
this.outerVisible = false;
this.getList(); this.getList();
this.resetForm("addMsg"); this.Success(res.data.message)
} else { } else {
this.$message.error(res.data.message); this.Error(res.data.message);
} }
this.isleaveBtn = false
}, },
err => {this.isleaveBtn = false} null
); );
this.getList(); }).catch(() => {
},
deleteData(item){
let that = this;
that.$confirm(this.$t('objFill.v101.hote.shifousc'), this.$t('tips.tips'), {
confirmButtonText: this.$t('pub.sureBtn'),
cancelButtonText: this.$t('pub.cancelBtn'),
type: 'warning'
}).then(() => {
this.apipost('hotel_get_RemoveHotelMemo', {
MemoId: item.Id
},
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
}).catch(() => {
});
},
updateData(item) {
let x = JSON.parse(JSON.stringify(item))
this.addMsg = {
Id: x.Id,
Date: x.Date,
Name: x.Name,
Content: x.Content,
FileList: x.FileList
}
},
deleteUploadFile(i) { // 删除上传文件
this.addMsg.FileList.splice(i, 1);
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
resetPageIndex() {
this.msg.pageIndex = 1;
this.currentPage = 1;
},
submitForm(addMsg) {
// return
//提交创建、修改表单
this.$refs[addMsg].validate(valid => {
if (valid) {
this.addData();
} else {
return false;
}
});
},
closeChangeMachie(done) {
//弹出框关闭初始化弹框内表单
done();
this.resetForm("addMsg");
},
resetForm(formName) { });
this.outerVisible = false },
//弹出框取消 初始化谈框内表单 updateData(item) {
this.$refs[formName].resetFields(); let x = JSON.parse(JSON.stringify(item))
this.addMsg = { this.addMsg = {
Id: 0, Id: x.Id,
Date: this.getYMD(), Date: x.Date,
Name: '', Name: x.Name,
Content: '', Content: x.Content,
FileList: [] FileList: x.FileList
}
},
deleteUploadFile(i) { // 删除上传文件
this.addMsg.FileList.splice(i, 1);
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
resetPageIndex() {
this.msg.pageIndex = 1;
this.currentPage = 1;
},
submitForm(addMsg) {
// return
//提交创建、修改表单
this.$refs[addMsg].validate(valid => {
if (valid) {
this.addData();
} else {
return false;
} }
});
},
closeChangeMachie(done) {
//弹出框关闭初始化弹框内表单
done();
this.resetForm("addMsg");
},
resetForm(formName) {
this.outerVisible = false
//弹出框取消 初始化谈框内表单
this.$refs[formName].resetFields();
this.addMsg = {
Id: 0,
Date: this.getYMD(),
Name: '',
Content: '',
FileList: []
} }
} }
}; }
};
</script> </script>
...@@ -2280,7 +2280,7 @@ ...@@ -2280,7 +2280,7 @@
}} }}
</td> </td>
<td> <td>
{{ priceFormat2(item.VisaPrice) }}(-{{ {{ priceFormat(item.VisaPrice) }}(-{{
item.BackVisaPrice | priceFormat(item.BackVisaPrice) item.BackVisaPrice | priceFormat(item.BackVisaPrice)
}}) }})
</td> </td>
...@@ -2942,25 +2942,7 @@ export default { ...@@ -2942,25 +2942,7 @@ export default {
} }
return x1 + x2; return x1 + x2;
}, },
priceFormat2(value) {
if (value == null) {
return this.$t('objFill.yibaohan');
}
let nStr = value.toFixed(2);
nStr += "";
let x = nStr.split(".");
let x1 = x[0];
let x2 = x.length > 1 ? "." + x[1] : "";
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, "$1" + "," + "$2");
}
let result = x1 + x2;
if (result === "0.00") {
result = this.$t('objFill.yibaohan');
}
return result;
},
}, },
methods: { methods: {
GetSupperOrderEditAuth() { GetSupperOrderEditAuth() {
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
<span @click="resGetList">{{$t('objFill.v101.administrative.fenxianggwd')}}</span> <span @click="resGetList">{{$t('objFill.v101.administrative.fenxianggwd')}}</span>
<span v-for="(item,index) in NavList" @click="getNavTree(item,index)">{{item.name}}</span> <span v-for="(item,index) in NavList" @click="getNavTree(item,index)">{{item.name}}</span>
</div> </div>
<table class="singeRowTable myDocumentsTable" border="0" cellspacing="0" cellpadding="0"> <table class="singeRowTable myDocumentsTable" border="0" cellspacing="0" cellpadding="0">
<tbody v-if='!isChildFiles'> <tbody v-if='!isChildFiles'>
<tr> <tr>
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
<tr v-for="(item,index) in DataList"> <tr v-for="(item,index) in DataList">
<td>{{item.MenuName}}</td> <td>{{item.MenuName}}</td>
<td>{{item.MenuUrl}}</td> <td>{{item.MenuUrl}}</td>
<td>{{item.Tier | tierFormat(item.Tier)}}</td> <td>{{tierFormat(item.Tier)}}</td>
<td>{{item.MenuStatus==0?$t('pub.openSel'):$t('pub.closeSel')}}</td> <td>{{item.MenuStatus==0?$t('pub.openSel'):$t('pub.closeSel')}}</td>
<td>{{item.Sort}}</td> <td>{{item.Sort}}</td>
<td>{{item.LowVersion}}</td> <td>{{item.LowVersion}}</td>
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<tr v-for="(item,index) in DataList"> <tr v-for="(item,index) in DataList">
<td>{{item.MenuName}}</td> <td>{{item.MenuName}}</td>
<td>{{item.MenuUrl}}</td> <td>{{item.MenuUrl}}</td>
<td>{{item.Tier | tierFormat(item.Tier)}}</td> <td>{{tierFormat(item.Tier)}}</td>
<td>{{item.MenuStatus==0?$t('pub.openSel'):$t('pub.closeSel')}}</td> <td>{{item.MenuStatus==0?$t('pub.openSel'):$t('pub.closeSel')}}</td>
<td> <td>
{{item.GroupingCode}} {{item.GroupingCode}}
......
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