Commit 088670b5 authored by 黄奎's avatar 黄奎

页面修改

parent 88a3c47c
<style> <style>
.ElectronicAudit .icon-shenhebohui{ .ElectronicAudit .icon-shenhebohui {
color:#fff; color: #fff;
} }
.ContractManage .query-box .el-button--primary {
.ContractManage .query-box .el-button--primary {
background-color: #fff !important; background-color: #fff !important;
color: #e95252 !important; color: #e95252 !important;
border-color: #e95252 !important; border-color: #e95252 !important;
} }
.ContractManage .query-box .el-button--primary:focus, .ContractManage .query-box .el-button--primary:focus,
.query-box .el-button--primary:hover { .query-box .el-button--primary:hover {
background-color: #fff !important; background-color: #fff !important;
color: #e95252 !important; color: #e95252 !important;
border-color: #e95252 !important; border-color: #e95252 !important;
} }
.ContractManage .query-box .el-button { .ContractManage .query-box .el-button {
border-radius: 16px; border-radius: 16px;
height: 30px; height: 30px;
position: relative; position: relative;
top:5px; top: 5px;
} }
.ContractManage .query-box .el-button i { .ContractManage .query-box .el-button i {
color: #e95252; color: #e95252;
} }
.ContractManage .query-box .el-button span {
.ContractManage .query-box .el-button span {
position: relative; position: relative;
top: -3px; top: -3px;
} }
.ContractManage .el-button+.el-button{
margin-left:0!important; .ContractManage .el-button+.el-button {
} margin-left: 0 !important;
}
.newContract .el-tabs--card>.el-tabs__header .el-tabs__item.is-active {
border-bottom-color: #f5f5f5;
}
.newContract .el-tabs--card>.el-tabs__header .el-tabs__item.is-active{
border-bottom-color:#f5f5f5;
}
</style> </style>
<template> <template>
<div class="flexOne newContract"> <div class="flexOne newContract">
<el-tabs v-model="activeName" type="card" @tab-click="getSwitch"> <el-tabs v-model="activeName" type="card" @tab-click="getSwitch">
<el-tab-pane label="出境游合同" name="1"></el-tab-pane> <el-tab-pane label="出境游合同" name="1"></el-tab-pane>
<el-tab-pane label="其他合同" name="2"></el-tab-pane> <el-tab-pane label="其他合同" name="2"></el-tab-pane>
</el-tabs> </el-tabs>
<template v-if="activeName==1"> <template v-if="activeName==1">
<div class="ElectronicAudit"> <div class="ElectronicAudit">
<div class="query-box"> <div class="query-box">
<ul> <ul>
<li> <li>
<span> <span>
<em>合同编号</em> <em>合同编号</em>
<el-input :placeholder="$t('system.ph_in')" v-model="msg.contractNum" @keyup.native.enter="getList" class="w210"></el-input> <el-input :placeholder="$t('system.ph_in')" v-model="msg.contractNum" @keyup.native.enter="getList"
</span> class="w210"></el-input>
</li> </span>
<li> </li>
<span> <li>
<em>产品名称</em> <span>
<el-input :placeholder="$t('system.ph_in')" v-model="msg.productName" @keyup.native.enter="getList" class="w210"></el-input> <em>产品名称</em>
</span> <el-input :placeholder="$t('system.ph_in')" v-model="msg.productName" @keyup.native.enter="getList"
</li> class="w210"></el-input>
<li> </span>
<span> </li>
<em>订单号</em> <li>
<el-input :placeholder="$t('system.ph_in')" v-model="msg.orderID" @keyup.native.enter="getList" class="w210"></el-input> <span>
</span> <em>订单号</em>
</li> <el-input :placeholder="$t('system.ph_in')" v-model="msg.orderID" @keyup.native.enter="getList"
<li> class="w210"></el-input>
<span> </span>
<em>团号</em> </li>
<el-input :placeholder="$t('system.ph_in')" v-model="msg.tcid" @keyup.native.enter="getList" class="w210"></el-input> <li>
</span> <span>
</li> <em>团号</em>
<li> <el-input :placeholder="$t('system.ph_in')" v-model="msg.tcid" @keyup.native.enter="getList"
<span> class="w210"></el-input>
<em>状态</em> </span>
<el-select v-model='msg.auditContract' filterable :placeholder="$t('pub.pleaseSel')"> </li>
<el-option label='不限' value=''></el-option> <li>
<el-option label='驳回' :value='3'></el-option> <span>
<el-option label='待审核' :value='1'></el-option> <em>状态</em>
<el-option label='审核通过' :value='2'></el-option> <el-select v-model='msg.auditContract' filterable :placeholder="$t('pub.pleaseSel')">
</el-select> <el-option label='不限' value=''></el-option>
</span> <el-option label='驳回' :value='3'></el-option>
</li> <el-option label='待审核' :value='1'></el-option>
<li style="display:none;"> <el-option label='审核通过' :value='2'></el-option>
<span> </el-select>
<em>日期</em> </span>
<el-date-picker v-model='msg.startDate' class='w135' value-format="yyyy-MM-dd" type="date" </li>
:picker-options="pickerBeginDateBefore"></el-date-picker> <li style="display:none;">
- <span>
<el-date-picker v-model='msg.returnDate' class='w135' value-format="yyyy-MM-dd" type="date" <em>日期</em>
:picker-options="pickerBeginDateAfter"></el-date-picker> <el-date-picker v-model='msg.startDate' class='w135' value-format="yyyy-MM-dd" type="date"
</span> :picker-options="pickerBeginDateBefore"></el-date-picker>
</li> -
<li> <el-date-picker v-model='msg.returnDate' class='w135' value-format="yyyy-MM-dd" type="date"
<input type="button" class="hollowFixedBtn" value="查询" @click="getList()" /> :picker-options="pickerBeginDateAfter"></el-date-picker>
</li> </span>
</ul> </li>
</div> <li>
<div class="commonContent" v-loading="loadingOut"> <input type="button" class="hollowFixedBtn" value="查询" @click="getList()" />
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0"> </li>
<tr> </ul>
<th>合同编号</th>
<th>订单号</th>
<th>团号</th>
<th>产品名称</th>
<th>出发日期</th>
<th>返回日期</th>
<th>状态</th>
<th width="200">操作</th>
</tr>
<tr v-for="item in dataListOut">
<td>{{item.contractNum}}</td>
<td>{{item.orderId}}</td>
<td>{{item.tcid}}</td>
<td>{{item.productName}}</td>
<td>
<template v-if="item.startDate!=null">
{{getDate(item.startDate)}}
</template>
</td>
<td>
<template v-if="item.returnDate!=null">
{{getDate(item.returnDate)}}
</template>
</td>
<td>
<span v-if="item.auditContract==3" style="color:red;">已驳回</span>
<span v-if="item.auditContract==1" style="color:blue;">待审核</span>
<span v-if="item.auditContract==2" style="color:green;">审核通过</span>
</td>
<td>
<el-row>
<el-tooltip class="item" effect="dark" content="审核通过" placement="top-start">
<el-button type="primary" icon="iconfont icon-shenpi" @click="AuditElec(item,2)" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="驳回" placement="top-start">
<el-button type="danger" v-if="item.auditContract!=3" icon="iconfont icon-shenhebohui" @click="AuditElec(item,3)" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="查看" placement="top-start">
<el-button type="danger" icon="iconfont icon-chakan" @click="goToDetail(item)" circle></el-button>
</el-tooltip>
</el-row>
</td>
</tr>
</table>
<div class="noData" v-show="dataListOut.length<1">
<i class="iconfont icon-kong" style="font-size:100px;"></i>
<p>{{$t("active.ld_noData")}}</p>
</div>
</div>
</div> </div>
</template> <div class="commonContent" v-loading="loadingOut">
<template v-else> <table class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<div class="ContractManage"> <tr>
<div class="query-box"> <th>合同编号</th>
<ul> <th>订单号</th>
<li> <th>团号</th>
<span><em>合同编号</em> <th>产品名称</th>
<el-input class="w210" v-model="msg.T_ContractNum" placeholder="请输入合同编号" @keyup.enter.native="getList"> <th>出发日期</th>
</el-input> <th>返回日期</th>
</span> <th>状态</th>
</li> <th width="200">操作</th>
<li> </tr>
<span><em>合同类型</em> <tr v-for="item in dataListOut">
<el-select v-model="msg.CType" :placeholder="$t('pub.pleaseSel')"> <td>{{item.contractNum}}</td>
<el-option label="请选择" :value="0" :key="0"> </el-option> <td>{{item.orderId}}</td>
<el-option label="单向委托合同" :value="1" :key="1"> </el-option> <td>{{item.tcid}}</td>
<el-option label="境内旅游合同" :value="2" :key="2"> </el-option> <td>{{item.productName}}</td>
<el-option label="一日游合同" :value="3" :key="3"> </el-option> <td>
</el-select> <template v-if="item.startDate!=null">
</span> {{getDate(item.startDate)}}
</li> </template>
<li> </td>
<span><em>甲方名称</em> <td>
<el-input class="w210" v-model="msg.Tourists_Name" placeholder="请输入客户名称" @keyup.enter.native="getList"> <template v-if="item.returnDate!=null">
</el-input> {{getDate(item.returnDate)}}
</span> </template>
</li> </td>
<li> <td>
<span><em>客户电话</em> <span v-if="item.auditContract==3" style="color:red;">已驳回</span>
<el-input class="w210" v-model="msg.Tourists_Tel" placeholder="请输入客户电话" @keyup.enter.native="getList"> <span v-if="item.auditContract==1" style="color:blue;">待审核</span>
</el-input> <span v-if="item.auditContract==2" style="color:green;">审核通过</span>
</span> </td>
</li> <td>
<li> <el-row>
<span><em>团号</em> <el-tooltip class="item" effect="dark" content="审核通过" placement="top-start">
<el-input class="w210" v-model="msg.C_TCNUM" placeholder="请输入团号" @keyup.enter.native="getList"> <el-button type="primary" icon="iconfont icon-shenpi" @click="AuditElec(item,2)" circle></el-button>
</el-input>
</span>
</li>
<li>
<span><em>线路名称</em>
<el-input class="w210" v-model="msg.C_ProductName" placeholder="请输入线路名称" @keyup.enter.native="getList">
</el-input>
</span>
</li>
<li>
<span><em>经办人</em>
<el-input class="w210" v-model="msg.TravelAgency_DealMan" placeholder="请输入经办人"
@keyup.enter.native="getList">
</el-input>
</span>
</li>
<li>
<span><em>合同状态</em>
<el-select v-model="msg.Status" :placeholder="$t('pub.pleaseSel')">
<el-option label="请选择" :value="-1" :key="-1"> </el-option>
<el-option label="草稿" :value="0" :key="0"> </el-option>
<el-option label="提交审核" :value="1" :key="1"> </el-option>
<el-option label="审核通过" :value="2" :key="2"> </el-option>
<el-option label="驳回" :value="3" :key="3"> </el-option>
<el-option label="取消" :value="4" :key="4"> </el-option>
</el-select>
</span>
</li>
<li>
<span><em>{{ $t("sm.Date") }}</em>
<el-date-picker v-model="msg.StartDate" class="w135" value-format="yyyy-MM-dd" type="date"
:picker-options="pickerBeginDateBefore2"></el-date-picker>
-
<el-date-picker v-model="msg.EndDate" class="w135" value-format="yyyy-MM-dd" type="date"
:picker-options="pickerBeginDateAfter2"></el-date-picker>
</span>
</li>
<li>
<input type="button" class="normalBtn" :value="$t('pub.searchBtn')" @click="
getList();
resetPageIndex();
" />
<el-dropdown @command="getImport">
<el-button type="primary" @click="goContract('onedayTripContract', 0, '一日游合同')" > 一日游合同
<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="1">境内旅游合同</el-dropdown-item>
<el-dropdown-item command="2">单项委托合同</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</li>
</ul>
</div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th width="50">编号</th>
<th width="80">合同类型</th>
<th width="100">合同编号</th>
<th width="100">甲方名称</th>
<th width="120">乙方名称</th>
<th width="100">经办人</th>
<th width="100">团号</th>
<th width="150">产品名称</th>
<th width="100">合同状态</th>
<th width="100">创建人</th>
<th width="120">创建时间</th>
<th width="130">操作</th>
</tr>
<tr v-for="(item, index) in dataList" :key="index">
<td>{{ item.ID }}
</td>
<td>
<template v-if="item.CType == 2">
境内旅游合同
</template>
<template v-else-if="item.CType == 3">
一日游合同
</template>
<template v-else-if="item.CType == 1">
单向委托合同
</template>
</td>
<td>{{ item.T_ContractNum }}</td>
<td>{{ item.Tourists_Name }}</td>
<td>{{ item.TravelAgency_Name }}</td>
<td>{{ item.TravelAgency_DealMan }}</td>
<td>{{ item.C_TCNUM }}</td>
<td>{{ item.C_ProductName }}</td>
<td>{{ item.StatusStr }}</td>
<td>{{ item.CreateByName }}</td>
<td>{{ item.CreateTimeStr }}</td>
<td>
<el-tooltip class="item" effect="dark" content="修改" placement="top-start" v-if="item.Status==0||item.Status==3">
<template v-if="item.CType == 3">
<el-button type="primary" icon="el-icon-edit" circle
@click="goContract('onedayTripContract', item.ID, '一日游合同')"></el-button>
</template>
<template v-else-if="item.CType == 2">
<el-button type="primary" icon="el-icon-edit" circle @click="
goContract('DomesticTravelcontract', item.ID, '境内旅游合同')
"></el-button>
</template>
<template v-else>
<el-button type="primary" icon="el-icon-edit" circle
@click="goContract('SingleContract', item.ID, '单项委托合同')"></el-button>
</template>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="复制" placement="top-start">
<el-button type="warning" icon="iconfont icon-copy" circle @click="CopyContract(item)" style="padding:4px;">
</el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="下载" placement="top-start" v-if="item.Status==2">
<el-button type="success" icon="el-icon-download" circle @click="DownLoadContract(item)"></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="驳回" placement="top-start">
<el-tooltip class="item" effect="dark" content="提交审核" placement="top-start" v-if="item.Status==0"> <el-button type="danger" v-if="item.auditContract!=3" icon="iconfont icon-shenhebohui"
<el-button type="info" icon="el-icon-upload2" circle @click="SubmitContract(item)"></el-button> @click="AuditElec(item,3)" circle></el-button>
</el-tooltip>
<el-tooltip class="item" v-if="item.Status==2" effect="dark" content="复制链接发送给客户">
<el-button type="info" icon="iconfont icon-copy-l" circle @click="CopyUrl(item)" style="padding:4px;background-color:#9266f9;border-color:#9266f9;"></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="取消" placement="top-start" v-if="item.Status==0">
<el-button type="danger" icon="el-icon-close" circle @click="DeleteContract(item)"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="查看" placement="top-start"> <el-tooltip class="item" effect="dark" content="查看" placement="top-start">
<el-button type="danger" icon="iconfont icon-chakan" circle @click="ViewContract(item)" style="padding:4px;"></el-button> <el-button type="danger" icon="iconfont icon-chakan" @click="goToDetail(item)" circle></el-button>
</el-tooltip> </el-tooltip>
</td> </el-row>
</tr> </td>
</table> </tr>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" </table>
layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total"> <div class="noData" v-show="dataListOut.length<1">
</el-pagination> <i class="iconfont icon-kong" style="font-size:100px;"></i>
<p>{{$t("active.ld_noData")}}</p>
</div> </div>
</template> </div>
</div>
</template>
<template v-else>
<div class="ContractManage">
<div class="query-box">
<ul>
<li>
<span><em>合同编号</em>
<el-input class="w210" v-model="msg.T_ContractNum" placeholder="请输入合同编号" @keyup.enter.native="getList">
</el-input>
</span>
</li>
<li>
<span><em>合同类型</em>
<el-select v-model="msg.CType" :placeholder="$t('pub.pleaseSel')">
<el-option label="请选择" :value="0" :key="0"> </el-option>
<el-option label="单向委托合同" :value="1" :key="1"> </el-option>
<el-option label="境内旅游合同" :value="2" :key="2"> </el-option>
<el-option label="一日游合同" :value="3" :key="3"> </el-option>
</el-select>
</span>
</li>
<li>
<span><em>甲方名称</em>
<el-input class="w210" v-model="msg.Tourists_Name" placeholder="请输入客户名称" @keyup.enter.native="getList">
</el-input>
</span>
</li>
<li>
<span><em>客户电话</em>
<el-input class="w210" v-model="msg.Tourists_Tel" placeholder="请输入客户电话" @keyup.enter.native="getList">
</el-input>
</span>
</li>
<li>
<span><em>团号</em>
<el-input class="w210" v-model="msg.C_TCNUM" placeholder="请输入团号" @keyup.enter.native="getList">
</el-input>
</span>
</li>
<li>
<span><em>线路名称</em>
<el-input class="w210" v-model="msg.C_ProductName" placeholder="请输入线路名称" @keyup.enter.native="getList">
</el-input>
</span>
</li>
<li>
<span><em>经办人</em>
<el-input class="w210" v-model="msg.TravelAgency_DealMan" placeholder="请输入经办人"
@keyup.enter.native="getList">
</el-input>
</span>
</li>
<li>
<span><em>合同状态</em>
<el-select v-model="msg.Status" :placeholder="$t('pub.pleaseSel')">
<el-option label="请选择" :value="-1" :key="-1"> </el-option>
<el-option label="待审" :value="1" :key="1"> </el-option>
<el-option label="审核通过" :value="2" :key="2"> </el-option>
<el-option label="驳回" :value="3" :key="3"> </el-option>
</el-select>
</span>
</li>
<li>
<span><em>{{ $t("sm.Date") }}</em>
<el-date-picker v-model="msg.StartDate" class="w135" value-format="yyyy-MM-dd" type="date"
:picker-options="pickerBeginDateBefore2"></el-date-picker>
-
<el-date-picker v-model="msg.EndDate" class="w135" value-format="yyyy-MM-dd" type="date"
:picker-options="pickerBeginDateAfter2"></el-date-picker>
</span>
</li>
<li>
<input type="button" class="normalBtn" :value="$t('pub.searchBtn')" @click="
getList();
resetPageIndex();
" />
</li>
</ul>
</div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th width="50">编号</th>
<th width="80">合同类型</th>
<th width="100">合同编号</th>
<th width="100">甲方名称</th>
<th width="120">乙方名称</th>
<th width="100">经办人</th>
<th width="100">团号</th>
<th width="150">产品名称</th>
<th width="100">合同状态</th>
<th width="100">创建人</th>
<th width="120">创建时间</th>
<th width="130">操作</th>
</tr>
<tr v-for="(item, index) in dataList" :key="index">
<td>{{ item.ID }}
</td>
<td>
<template v-if="item.CType == 2">
境内旅游合同
</template>
<template v-else-if="item.CType == 3">
一日游合同
</template>
<template v-else-if="item.CType == 1">
单向委托合同
</template>
</td>
<td>{{ item.T_ContractNum }}</td>
<td>{{ item.Tourists_Name }}</td>
<td>{{ item.TravelAgency_Name }}</td>
<td>{{ item.TravelAgency_DealMan }}</td>
<td>{{ item.C_TCNUM }}</td>
<td>{{ item.C_ProductName }}</td>
<td>
<span v-if="item.Status==3" style="color:red;">已驳回</span>
<span v-if="item.Status==1" style="color:blue;">待审核</span>
<span v-if="item.Status==2" style="color:green;">审核通过</span>
</td>
<td>{{ item.CreateByName }}</td>
<td>{{ item.CreateTimeStr }}</td>
<td>
<el-tooltip class="item" effect="dark" content="审核通过" placement="top-start" v-if="item.Status==1">
<el-button type="info" icon="iconfont icon-shenpi" circle @click="SubmitContract(item,2)"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="驳回" placement="top-start" v-if="item.Status==1">
<el-button type="info" icon="iconfont icon-shenhebohui" circle @click="SubmitContract(item,3)">
</el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="查看" placement="top-start">
<el-button type="danger" icon="iconfont icon-chakan" circle @click="ViewContract(item)"
style="padding:4px;"></el-button>
</el-tooltip>
</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>
</div>
</template>
</div> </div>
</template> </template>
<script> <script>
import moment from 'moment' import moment from 'moment'
export default { export default {
data() { data() {
return { return {
msgOut: { msgOut: {
contractNum:'', contractNum: '',
productName:'', productName: '',
orderID:'', orderID: '',
tcid:'', tcid: '',
startDate:'', startDate: '',
returnDate:'', returnDate: '',
auditContract:'' auditContract: ''
}, },
dataListOut:[], dataListOut: [],
loadingOut:false, loadingOut: false,
pickerBeginDateBefore: { pickerBeginDateBefore: {
disabledDate: time => { disabledDate: time => {
if (this.msg.returnDate == null) { if (this.msg.returnDate == null) {
return false; return false;
} else { } else {
let endTime = new Date(this.msg.returnDate) let endTime = new Date(this.msg.returnDate)
return endTime.getTime() < time.getTime() return endTime.getTime() < time.getTime()
}
} }
} },
}, pickerBeginDateAfter: {
pickerBeginDateAfter: { disabledDate: time => {
disabledDate: time => { let startTime = new Date(this.msg.startDate)
let startTime = new Date(this.msg.startDate) return startTime.getTime() >= time.getTime()
return startTime.getTime() >= time.getTime() }
} },
}, //切换出境游合同
//切换出境游合同 activeName: '1',
activeName:'1',
//ContractMange参数 //ContractMange参数
total: 0, total: 0,
currentPage: 1, currentPage: 1,
dataList: [], dataList: [],
loading: false, //页面加载 loading: false, //页面加载
msg: { msg: {
T_ContractNum: "", //合同编号 T_ContractNum: "", //合同编号
CType: 0, //合同类型 CType: 0, //合同类型
Tourists_Name: "", //客户名称 Tourists_Name: "", //客户名称
...@@ -380,111 +358,87 @@ export default { ...@@ -380,111 +358,87 @@ export default {
TravelAgency_DealMan: "", //经办人 TravelAgency_DealMan: "", //经办人
C_TCNUM: "", //团号 C_TCNUM: "", //团号
C_ProductName: "", //线路名称 C_ProductName: "", //线路名称
}, IsAduitPage: 1, //是否是审核页面
pickerBeginDateBefore2: { },
disabledDate: time => { pickerBeginDateBefore2: {
if (this.msg.EndDate == null) { disabledDate: time => {
return false; if (this.msg.EndDate == null) {
} else { return false;
let endTime = new Date(this.msg.EndDate); } else {
return endTime.getTime() < time.getTime(); let endTime = new Date(this.msg.EndDate);
return endTime.getTime() < time.getTime();
}
} }
},
pickerBeginDateAfter2: {
disabledDate: time => {
let startTime = new Date(this.msg.StartDate);
return startTime.getTime() >= time.getTime();
}
}
};
},
methods: {
//切换
getSwitch() {
if (this.active == 1) {
this.getListOutTract();
} else {
this.getList();
} }
}, },
pickerBeginDateAfter2: { dateChange(val) {
disabledDate: time => { if (val) {
let startTime = new Date(this.msg.StartDate); this.msg.startDate = val[0];
return startTime.getTime() >= time.getTime(); this.msg.returnDate = val[1];
} }
} },
//跳转至详情
}; goToDetail(item) {
},
methods: {
//切换
getSwitch(){
if(this.active==1){
this.getListOutTract();
}else{
this.getList();
}
},
dateChange(val){
if(val){
this.msg.startDate=val[0];
this.msg.returnDate=val[1];
}
},
//跳转至详情
goToDetail(item){
this.$router.push({ this.$router.push({
name: 'TravelContractDetail', name: 'TravelContractDetail',
query: { query: {
TCID: item.tcid, TCID: item.tcid,
guestId:item.guestId, guestId: item.guestId,
orderID: item.orderId, orderID: item.orderId,
blank: "y", blank: "y",
} }
}); });
}, },
getListOutTract() { getListOutTract() {
this.loadingOut=true; this.loadingOut = true;
this.apiJavaPost("/api/contract/auditContract",this.msgOut,res => { this.apiJavaPost("/api/contract/auditContract", this.msgOut, res => {
this.loadingOut=false; this.loadingOut = false;
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.dataListOut = res.data.data; this.dataListOut = res.data.data;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
},null); }, null);
}, },
//审核通过或者驳回 //审核通过或者驳回
AuditElec(item,type){ AuditElec(item, type) {
item.auditContract=type; item.auditContract = type;
this.apiJavaPost("/api/contract/dosaveOrUpdate",item,res => { this.apiJavaPost("/api/contract/dosaveOrUpdate", item, res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.Success(res.data.message); this.Success(res.data.message);
this.getList(); this.getList();
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
},null); }, null);
}, },
getDate(date) { getDate(date) {
return moment(date).format("YYYY-MM-DD"); return moment(date).format("YYYY-MM-DD");
}, },
//提交并盖章
//copy过来的页面方法 SubmitContract(item,status) {
//提交并盖章
SubmitContract(item) {
var that = this; var that = this;
this.Confirm("是否提交并盖章此合同?", function () { this.Confirm("是否提交此合同?", function () {
that.apipost( that.apipost(
"travelcontract_post_UpdateTravelContractStatusService", { "travelcontract_post_UpdateTravelContractStatusService", {
ID: item.ID, ID: item.ID,
Status: 1 Status: status
},
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Error(res.data.message);
}
},
err => {}
);
});
},
//复制合同
CopyContract(item) {
//获取列表数据
var that = this;
this.Confirm("是否复制此合同?", function () {
that.apipost(
"travelcontract_post_CopyTravelContractService", {
ID: item.ID
}, },
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -498,82 +452,6 @@ export default { ...@@ -498,82 +452,6 @@ export default {
); );
}); });
}, },
//复制URL
CopyUrl(item){
var oInput = document.createElement('input');
oInput.value = item.Url;
document.body.appendChild(oInput);
oInput.select(); // 选择对象
document.execCommand("Copy"); // 执行浏览器复制命令
oInput.className = 'oInput';
oInput.style.display='none';
this.Info("复制成功!");
},
//跳转
getImport(command) {
if(command==1){
this.goContract('DomesticTravelcontract', 0, '境内旅游合同');
}else if(command==2){
this.goContract('SingleContract', 0, '单项委托合同');
}
},
//下载合同
DownLoadContract(item) {
let msg = {
ID: item.ID,
CType: item.CType
};
let urlObj = this.domainManager();
this.loading = true;
this.$http({
headers: {
'Content-Type': 'application/json'
},
method: 'post',
url: urlObj.DomainUrl + '/api/file/GetDownLoadTripContract',
data: {
"msg": msg
}
}).then(res => {
this.loading = false
if (res.data.resultCode === 1) {
let sign = item.T_ContractNum;
const a = document.createElement('a');
a.setAttribute('download', '');
a.setAttribute('href', urlObj.DomainUrl + '/api/file/DownloadFileForPdf?fileName=' + sign +
'.pdf&&fPath=' + res.data.data);
a.click();
} else {
this.Error('PDF获取失败');
}
}).catch(err => {
});
},
//删除合同
DeleteContract(item) {
var that = this;
this.Confirm("是否取消此合同?", function () {
var msg = {
ID: item.ID,
Status: 4
};
that.apipost(
"travelcontract_post_UpdateTravelContractStatusService",
msg,
res => {
if (res.data.resultCode == 1) {
that.Success("取消成功!");
that.getList();
} else {
that.Error(res.data.message);
}
},
null
);
});
},
getList() { getList() {
this.loading = true; this.loading = true;
//获取列表数据 //获取列表数据
...@@ -584,15 +462,14 @@ export default { ...@@ -584,15 +462,14 @@ export default {
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData; this.dataList = res.data.data.pageData;
this.dataList.forEach(x=>{ this.dataList.forEach(x => {
let Url=""; let Url = "";
if(this.isOnline()){ if (this.isOnline()) {
Url= window.location.hostname+'/#/TravelContractConfirm?ContractId='+x.ID; Url = window.location.hostname + '/#/TravelContractConfirm?ContractId=' + x.ID;
} } else {
else{ Url = window.location.hostname + ":8080/" + '#/TravelContractConfirm?ContractId=' + x.ID;
Url= window.location.hostname+":8080/"+'#/TravelContractConfirm?ContractId='+x.ID; }
} x.Url = Url;
x.Url=Url;
}) })
this.total = res.data.data.count; this.total = res.data.data.count;
} else { } else {
...@@ -610,8 +487,7 @@ export default { ...@@ -610,8 +487,7 @@ export default {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
}, },
ViewContract(item) ViewContract(item) {
{
this.$router.push({ this.$router.push({
name: "TravelContractView", name: "TravelContractView",
query: { query: {
...@@ -621,27 +497,10 @@ export default { ...@@ -621,27 +497,10 @@ export default {
} }
}); });
}, },
goContract(path, Id, title) { },
var nId = 0; mounted() {
if (Id && Id > 0) { this.getListOutTract();
nId = Id; }
} };
this.$router.push({
name: path,
query: {
id: nId,
blank: "y",
tab: title
}
});
}
},
mounted() {
this.getListOutTract();
}
};
</script> </script>
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