Commit 34abb4b6 authored by 沈良进's avatar 沈良进

save

parent 0950b08e
......@@ -216,7 +216,20 @@
.hotelmanagement .comCursorUrl {
cursor: pointer;
}
.editInfo {
padding: 2px !important;
}
.list-item {
margin: 20px 0;
}
.file-title {
font-size: 16px;
font-weight: bold;
}
.submit-box {
display: flex;
justify-content: center;
}
</style>
<template>
<div class="flexOne hotelmanagement">
......@@ -353,17 +366,56 @@
<!--v-if="IsHotelPriceStock==1" HK 10-21注释-->
<button style="width:80px;margin-top:10px;" @click="goUrl('HotelProductManage2',item)"
class="hotelBtnMan">{{$t('ground.baojiayukucun')}}</button>
<button style="width:80px;margin-top:10px;" @click="downloadFile(item)"
class="hotelBtnMan">查看报价</button>
</div>
</div>
</div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.currentPage"
:page-size="this.msg.pageSize" layout="total,prev, pager, next, jumper" :total="msg.total"></el-pagination>
<el-dialog title="上传报价单" :visible.sync="showUpload">
<div>
<el-input style="margin-bottom: 20px" v-model="uploadTitle" placeholder="请填写报价单标题"></el-input>
<el-upload
class="upload-demo"
:file-list="DownloadMaterialsFileList"
:http-request="uploadTest"
:on-remove="handleRemove"
:multiple="true"
:limit="10"
action="">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
<div class="submit-box">
<el-button type="primary" style="margin: 20px auto;" @click="submitFile">提交</el-button></div>
</div>
</el-dialog>
<el-dialog title="查看报价" :visible.sync="showFilelist">
<button style="width:80px;margin-top:10px;" @click="uploadFile()"
class="hotelBtnMan">上传报价</button>
<div class="list-item" v-for="(item, index) in DmcFileStoreList" :key="item.Id">
<span class="file-title">{{item.Title}}</span>
<el-button class="editInfo" type="danger" @click="deleteFile(item, index)">删除</el-button>
<el-button class="editInfo" type="primary" @click="editFile(item)">编辑</el-button>
<div style="margin: 10px 0" v-for="(ele, index) in item.FileInfoList" :key="index">
<span>{{ele.Name}}</span>
<a :href="ele.Url" type="download">
<el-button class="editInfo" type="primary">下载</el-button></a>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
editInfo: {},
uploadTitle: '',
DownloadMaterialsFileList: [],
showFilelist: false,
showUpload: false,
DmcFileStoreList: [],
userInfo:{},//登录用户信息
IsHotelPriceStock: 0, //1-有获取酒店库存与报价添加修改权限
countryList: "",
......@@ -407,6 +459,77 @@
};
},
methods: {
uploadFile() {
this.showUpload = true
this.uploadTitle =''
},
downloadFile(hotel) {
this.hotel = hotel
this.getFilelist()
this.showFilelist = true
},
handleRemove(file, fileList) {
this.DownloadMaterialsFileList=fileList;
},
uploadTest(file) {
let newArr = [];
newArr.push(file.file);
let path = "/Upload/DMC/Icon/";
this.UploadSelfFileT(path, newArr, x => {
let url = this.domainManager().ViittoFileUrl + x.data.FilePath;
let Name=x.data.SourceFileName;
this.DownloadMaterialsFileList.push({Url:url,Name:Name,name:Name})
});
},
submitFile() {
this.apipost(
"hotel_get_SetDMCFileStore",
{
Id:this.editInfo.Id || 0,Title:this.uploadTitle,
ProcudtType:1,
ProductId:this.hotel.ID,
FileInfoList: this.DownloadMaterialsFileList
},
res => {
this.showUpload = false
this.getFilelist()
},
err => {}
);
},
deleteFile(file, index) {
this.apipost(
"hotel_get_RemoveDMCFileStore",
{
Id:file.Id,
},
res => {
this.DmcFileStoreList.splice(index, 1)
},
err => {}
);
},
editFile(file) {
this.editInfo = file
this.showUpload = true
this.uploadTitle = file.Title
file.FileInfoList.forEach(item => item.name = item.Name)
this.DownloadMaterialsFileList = file.FileInfoList
},
getFilelist() {
this.apipost(
"hotel_get_GetDMCFileStoreList",
{
HotelId:this.hotel.Id,
},
res => {
if(res.data.resultCode) {
this.DmcFileStoreList = res.data.data
}
},
err => {}
);
},
CopyHotel(Id) {
var that = this;
that.Confirm('是否要复制此酒店?', function () {
......
......@@ -719,7 +719,8 @@
<td colspan="14" class="CP_ComTitle2">成本统计(以下报价为每人费用)<br />
计算规则: (+++景点)*汇率+内陆段交通*汇率+杂支部分*汇率+其他资产+机票票+收入-团负费+领队分摊+地接报价*汇率-导游回补-小费回补
</td>
</tr><tr>
</tr>
<tr>
<td class="CP_ComTitle2">人数统计 </td>
<td class="CP_ComTitle2">成本价(人民币)</td>
<td class="CP_ComTitle2"><template v-if="postConfig.LineId==14">成本价(日元)</template></td>
......
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