Commit be2612ce authored by 黄奎's avatar 黄奎

前端js调整

parent 0041f961
<style scoped>
.user_time_picker .el-date-editor--date>.el-input__inner {
padding: 0 10px;
font-size: 13px;
}
.user_time_picker .el-date-editor--date>.el-input__inner {
padding: 0 10px;
font-size: 13px;
}
.user_time_picker .el-date-editor--date>span.el-input__prefix {
display: none;
}
.user_time_picker .el-date-editor--date>span.el-input__prefix {
display: none;
}
.user_time_picker .el-date-editor--date>span.el-input__suffix {
top: -4px;
right: 2px;
}
.user_time_picker .el-date-editor--date>span.el-input__suffix {
top: -4px;
right: 2px;
}
.zidingyiFz i {
font-size: 14px !important;
}
.page_addFD {
.zidingyiFz i {
font-size: 14px !important;
}
.page_addFD {
margin-top: 20px;
position: relative;
height: 1024px;
......@@ -268,7 +269,8 @@
._addUpload_box>div:hover {
background-color: #f5f5f5;
}
/deep/._addUpload_box .el-upload-dragger{
/deep/._addUpload_box .el-upload-dragger {
width: 126px !important;
height: 80px !important;
}
......@@ -366,80 +368,83 @@
top: 10px;
cursor: pointer;
}
</style>
<template>
<div class="flexOne">
<div class="query-box">
<ul class="user_time_picker">
<li>
<span><em>{{$t('objFill.v101.hote.beiwanlmc')}}</em>
<el-input v-model="msg.EmName" @keyup.enter.native="getList"></el-input>
</span>
</li>
<li>
<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" :clearable="false"></el-date-picker>
-
<el-date-picker v-model="msg.QEndDate" value-format="yyyy-MM-dd" class="w150" type="date" :clearable="false"></el-date-picker>
</span>
</li>
<li>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')"
@click="resetPageIndex(), getList()" />
&nbsp;
<input type="button" @click="
</style>
<template>
<div class="flexOne">
<div class="query-box">
<ul class="user_time_picker">
<li>
<span><em>{{$t('objFill.v101.hote.beiwanlmc')}}</em>
<el-input v-model="msg.EmName" @keyup.enter.native="getList"></el-input>
</span>
</li>
<li>
<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"
:clearable="false"></el-date-picker>
-
<el-date-picker v-model="msg.QEndDate" value-format="yyyy-MM-dd" class="w150" type="date"
:clearable="false"></el-date-picker>
</span>
</li>
<li>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')"
@click="resetPageIndex(), getList()" />
&nbsp;
<input type="button" @click="
(outerVisible = true),
(isleaveBtn = false),
(dialogTitle = $t('objFill.v101.hote.tianjiabwl')),addClick()
" class="normalBtn" :value="$t('pub.addBtn')" />
</li>
</ul>
</div>
<div class="clearfix"></div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="150px">{{$t('sm.Date')}}</th>
<th width="150px">{{$t('system.query_airName')}}</th>
<th style="min-width: 300px;">{{$t('system.label_info')}}</th>
<th width="200px">{{$t('objFill.v101.hote.wenjian')}}</th>
<th width="100px">{{$t('admin.admin_czPerson')}}</th>
<th width="150px">{{$t('fnc.caozuoriqi')}}</th>
<th width="150px">{{$t('hotel.table_operat')}}</th>
</tr>
<tr v-for="(item, index) in DataList" v-loading="loading">
<td width="150px">{{ item.Date }}</td>
<td width="150px">{{ item.Name }}</td>
<td style="min-width: 200px;max-width: 400px;cursor: pointer;">
<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>
</el-tooltip>
</td>
<td width="200px">
<div class="_addUpload_box clearfix">
<template v-for="(file,fIndex) in item.FileList">
<div v-if="file.FileType==1" style="width: 30px;height: 30px;" @click="showUpLoadFile(file)">
<div style="width:100%;height:100%;overflow: hidden;">
<img v-if="file.Url" :src="file.Url">
</div>
</li>
</ul>
</div>
<div class="clearfix"></div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="150px">{{$t('sm.Date')}}</th>
<th width="150px">{{$t('system.query_airName')}}</th>
<th style="min-width: 300px;">{{$t('system.label_info')}}</th>
<th width="200px">{{$t('objFill.v101.hote.wenjian')}}</th>
<th width="100px">{{$t('admin.admin_czPerson')}}</th>
<th width="150px">{{$t('fnc.caozuoriqi')}}</th>
<th width="150px">{{$t('hotel.table_operat')}}</th>
</tr>
<tr v-for="(item, index) in DataList" v-loading="loading">
<td width="150px">{{ item.Date }}</td>
<td width="150px">{{ item.Name }}</td>
<td style="min-width: 200px;max-width: 400px;cursor: pointer;">
<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>
</el-tooltip>
</td>
<td width="200px">
<div class="_addUpload_box clearfix">
<template v-for="(file,fIndex) in item.FileList">
<div v-if="file.FileType==1" style="width: 30px;height: 30px;" @click="showUpLoadFile(file)">
<div style="width:100%;height:100%;overflow: hidden;">
<img v-if="file.Url" :src="file.Url">
</div>
<div v-if="file.FileType==2" style="width: 30px;height: 30px;" @click="showUpLoadFile(file)">
<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 v-if="file.FileType==2" style="width: 30px;height: 30px;" @click="showUpLoadFile(file)">
<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 v-if="file.FileType==3" style="width: 30px;height: 30px;" @click="showUpLoadFile(file)">
<div class="iconfont icon-excel" @click="showUpLoadFile(file)">
</div>
<div v-if="file.FileType==3" style="width: 30px;height: 30px;" @click="showUpLoadFile(file)">
<div class="iconfont icon-excel" @click="showUpLoadFile(file)">
</div>
</div>
</template>
</div>
</td>
<td width="200px">{{ item.UpddateName }}</td>
<td width="150px">{{ item.UpdateTime }}</td>
<td width="150px">
<template v-if="userInfo.EmployeeId==item.UpdateBy">
</div>
</template>
</div>
</td>
<td width="200px">{{ item.UpddateName }}</td>
<td width="150px">{{ item.UpdateTime }}</td>
<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-button type="primary" icon="el-icon-edit" circle @click="
(outerVisible = true),
......@@ -448,94 +453,83 @@
"></el-button>
</el-tooltip>
<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)
"></el-button>
</el-tooltip>
</template>
</td>
</tr>
</table>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total">
</el-pagination>
<el-dialog custom-class="w800" :title="dialogTitle" :visible.sync="outerVisible" center
:close="closeChangeMachie">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px">
<table class="layerTable layerNoIcon">
<tr>
<td>
<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"
:placeholder="$t('objFill.v101.hote.qingsrbwlmc')"></el-input>
</el-form-item>
</td>
<td>
<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" :clearable="false">
</el-date-picker>
</el-form-item>
</td>
</tr>
</table>
</el-form>
<el-form label-width="100px">
<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"
:placeholder="$t('system.label_info')" style="width: 100%;"></el-input>
</el-form-item>
</el-form>
<div class="_addUpload_box clearfix" style="margin-top: 20px;">
<template v-for="(file,fIndex) in addMsg.FileList">
<div v-if="file.FileType==1">
<div style="width:100%;height:100%;overflow: hidden;">
<img v-if="file.Url" :src="file.Url" @click="showUpLoadFile(file)">
</div>
<span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span>
</td>
</tr>
</table>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total">
</el-pagination>
<el-dialog custom-class="w800" :title="dialogTitle" :visible.sync="outerVisible" center :close="closeChangeMachie">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px">
<table class="layerTable layerNoIcon">
<tr>
<td>
<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"
:placeholder="$t('objFill.v101.hote.qingsrbwlmc')"></el-input>
</el-form-item>
</td>
<td>
<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"
:clearable="false">
</el-date-picker>
</el-form-item>
</td>
</tr>
</table>
</el-form>
<el-form label-width="100px">
<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"
:placeholder="$t('system.label_info')" style="width: 100%;"></el-input>
</el-form-item>
</el-form>
<div class="_addUpload_box clearfix" style="margin-top: 20px;">
<template v-for="(file,fIndex) in addMsg.FileList">
<div v-if="file.FileType==1">
<div style="width:100%;height:100%;overflow: hidden;">
<img v-if="file.Url" :src="file.Url" @click="showUpLoadFile(file)">
</div>
<div v-if="file.FileType==2">
<div class="iconfont "
:class="file.Name.substring(file.Name.lastIndexOf('.')+1,file.Name.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'"
@click="showUpLoadFile(file)">
</div>
<span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span>
<span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span>
</div>
<div v-if="file.FileType==2">
<div class="iconfont "
:class="file.Name.substring(file.Name.lastIndexOf('.')+1,file.Name.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'"
@click="showUpLoadFile(file)">
</div>
<div v-if="file.FileType==3">
<div class="iconfont icon-excel" @click="showUpLoadFile(file)">
<span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span>
</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>
</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>
<span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span>
</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 slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="outerVisible=false,resetForm('addMsg')">
{{ $t("pub.cancelBtn") }}
</button>
&nbsp;
<button class="normalBtn" @click="submitForm('addMsg')">
{{ $t("pub.saveBtn") }}
</button>
</div>
<div v-if='picIsShow' 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>
</el-dialog>
<div v-if='picIsShow&&!outerVisible' class="_show_img_box" @click="picIsShow=false,picObj=[]">
</div>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="outerVisible=false,resetForm('addMsg')">
{{ $t("pub.cancelBtn") }}
</button>
&nbsp;
<button class="normalBtn" @click="submitForm('addMsg')">
{{ $t("pub.saveBtn") }}
</button>
</div>
<div v-if='picIsShow' 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">
......@@ -545,278 +539,291 @@
</el-carousel>
</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>
</template>
<script>
export default {
data() {
return {
isleaveBtn: false,
loading: true,
total: 0,
pageSize: "",
currentPage: 1,
outerVisible: false,
isRight: true,
dialogTitle: "",
//请求
msg: {
pageIndex: 1,
pageSize: 15,
Name: '',
QStartDate: '',
QEndDate: ''
},
rules: {
Name: [{
required: true,
message: this.$t('objFill.v101.hote.qingsrbwlmc'),
trigger: "blur"
}],
Date: [{
required: true,
message: this.$t('fnc.qingxuanzherq'),
trigger: "change"
}],
Content: [{
required: true,
message: this.$t('objFill.v101.activity.qingshurms'),
trigger: "blur"
}]
</div>
</template>
<script>
export default {
data() {
return {
isleaveBtn: false,
loading: true,
total: 0,
pageSize: "",
currentPage: 1,
outerVisible: false,
isRight: true,
dialogTitle: "",
//请求
msg: {
pageIndex: 1,
pageSize: 15,
Name: '',
QStartDate: '',
QEndDate: ''
},
rules: {
Name: [{
required: true,
message: this.$t('objFill.v101.hote.qingsrbwlmc'),
trigger: "blur"
}],
Date: [{
required: true,
message: this.$t('fnc.qingxuanzherq'),
trigger: "change"
}],
Content: [{
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,
Date: "",
Name: "",
Content: "",
FileList: []
{
stringArr: 'DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF',
type: 2
},
//返回值的接收变量
EmLoginMobile: "",
DataList: [],
picIsShow: false,
picObj: [],
imgList: [],
initialIndex: 0,
leaves: {
t1: this.$t('pub.jobSel')
]
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;
}
};
})
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() {
this.userInfo=this.getLocalStorage();
this.msg.QStartDate = this.getYMD()
this.addMsg.Date = this.getYMD()
this.getList();
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
},
filters: {
// leaveTimeFormat(value) {
// if (value == "") {
// return "在职";
// } else {
// return value;
// }
// }
getList() {
//获取数据
(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 => {}
);
},
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)
addClick() {
this.addMsg = {
Id: 0,
Date: this.getYMD(),
Name: '',
Content: '',
FileList: []
}
},
addData() {
if (this.isleaveBtn) return
this.isleaveBtn = true;
this.apipost(
"hotel_get_SetHotelMemo",
this.addMsg,
res => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.outerVisible = false;
this.getList();
this.resetForm("addMsg");
} 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
},
{
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.$message.error(res.data.message);
}
})
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
this.isleaveBtn = false
},
getList() {
//获取数据
(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: []
err => {
this.isleaveBtn = false
}
},
addData() {
if(this.isleaveBtn) return
this.isleaveBtn = true;
this.apipost(
"hotel_get_SetHotelMemo",
this.addMsg,
);
this.getList();
},
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.$message.success(res.data.message);
this.outerVisible = false;
if (res.data.resultCode === 1) {
this.getList();
this.resetForm("addMsg");
this.Success(res.data.message)
} else {
this.$message.error(res.data.message);
this.Error(res.data.message);
}
this.isleaveBtn = false
},
err => {this.isleaveBtn = false}
null
);
this.getList();
},
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");
},
}).catch(() => {
resetForm(formName) {
this.outerVisible = false
//弹出框取消 初始化谈框内表单
this.$refs[formName].resetFields();
this.addMsg = {
Id: 0,
Date: this.getYMD(),
Name: '',
Content: '',
FileList: []
});
},
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
//弹出框取消 初始化谈框内表单
this.$refs[formName].resetFields();
this.addMsg = {
Id: 0,
Date: this.getYMD(),
Name: '',
Content: '',
FileList: []
}
}
};
}
};
</script>
</script>
......@@ -2280,7 +2280,7 @@
}}
</td>
<td>
{{ priceFormat2(item.VisaPrice) }}(-{{
{{ priceFormat(item.VisaPrice) }}(-{{
item.BackVisaPrice | priceFormat(item.BackVisaPrice)
}})
</td>
......@@ -2942,25 +2942,7 @@ export default {
}
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: {
GetSupperOrderEditAuth() {
......
......@@ -28,8 +28,6 @@
<span @click="resGetList">{{$t('objFill.v101.administrative.fenxianggwd')}}</span>
<span v-for="(item,index) in NavList" @click="getNavTree(item,index)">{{item.name}}</span>
</div>
<table class="singeRowTable myDocumentsTable" border="0" cellspacing="0" cellpadding="0">
<tbody v-if='!isChildFiles'>
<tr>
......
......@@ -84,7 +84,7 @@
<tr v-for="(item,index) in DataList">
<td>{{item.MenuName}}</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.Sort}}</td>
<td>{{item.LowVersion}}</td>
......
......@@ -60,7 +60,7 @@
<tr v-for="(item,index) in DataList">
<td>{{item.MenuName}}</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.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