Commit 39830676 authored by zhengke's avatar zhengke

修改合同

parent 2d03a983
...@@ -321,8 +321,8 @@ ...@@ -321,8 +321,8 @@
/*弹出层*/ /*弹出层*/
.qrCodeDiv { .qrCodeDiv {
width: 200px; width: 236px;
height: 235px; height: 275px;
background-color: #fff; background-color: #fff;
text-align: center; text-align: center;
border: 1px solid #d1d1d1; border: 1px solid #d1d1d1;
...@@ -355,7 +355,7 @@ ...@@ -355,7 +355,7 @@
</style> </style>
<template> <template>
<div class="ECMain clearfix"> <div class="ECMain clearfix" v-loading="pdfLoading">
<div class="EC_left"> <div class="EC_left">
<ul> <ul>
<li :class="{'CMcked':cked==1}" @click="cked=1">使用说明</li> <li :class="{'CMcked':cked==1}" @click="cked=1">使用说明</li>
...@@ -1170,9 +1170,9 @@ ...@@ -1170,9 +1170,9 @@
</p> </p>
</div> </div>
<div class="EC_floatdiv"> <div class="EC_floatdiv">
<input type="button" class="normalBtn" @click="getinvalid()" value="作废" /> <input type="button" class="normalBtn" v-if="dataList.status==1" @click="getinvalid()" value="作废" />
<input type="button" class="normalBtn" @click="isShowFade=true" value="客户签字" /> <input type="button" class="normalBtn" @click="isShowFade=true,GetQrCode()" value="客户签字" />
<input type="button" class="normalBtn" value="下载" @click="toContractPDF('测试一下')" /> <input type="button" class="normalBtn" v-if="dataList.companySignature!=''" value="下载" @click="toContractPDF(dataList.contractNum)" />
</div> </div>
</div> </div>
<div class="fade" v-show="isShowFade"></div> <div class="fade" v-show="isShowFade"></div>
...@@ -1181,13 +1181,12 @@ ...@@ -1181,13 +1181,12 @@
<div id="qrcode" style="margin:25px;" ref="qrcode"> <div id="qrcode" style="margin:25px;" ref="qrcode">
<img class="WeiXinShare" :src="'data:image/png;base64,'+QRCodeStr" /> <img class="WeiXinShare" :src="'data:image/png;base64,'+QRCodeStr" />
</div> </div>
<i class="iconfont icon-cha Ec_cha"></i> <i class="iconfont icon-cha Ec_cha" @click="isShowFade=false"></i>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import moment from 'moment' import moment from 'moment'
// import QRCode from 'qrcodejs2' // 引入qrcode
export default { export default {
data() { data() {
return { return {
...@@ -1202,11 +1201,12 @@ ...@@ -1202,11 +1201,12 @@
dataList: [], dataList: [],
isShowFade: false, isShowFade: false,
QRCodeStr: "", QRCodeStr: "",
pdfLoading:false
}; };
}, },
methods: { methods: {
// 生成pdf // 生成二维码
GetQrCode: function () { GetQrCode: function () {
let urlObj = this.domainManager(); let urlObj = this.domainManager();
let msg = { let msg = {
...@@ -1240,6 +1240,7 @@ ...@@ -1240,6 +1240,7 @@
TCID: this.$route.query.TCID, TCID: this.$route.query.TCID,
orderID: this.$route.query.orderID, orderID: this.$route.query.orderID,
}; };
this.pdfLoading=true;
this.$http({ this.$http({
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
...@@ -1258,36 +1259,19 @@ ...@@ -1258,36 +1259,19 @@
'.pdf&&fPath=' + res.data.data); '.pdf&&fPath=' + res.data.data);
a.click(); a.click();
} else { } else {
this.$message.error('PDF获取失败'); this.Error('PDF获取失败');
} }
this.pdfLoading = false this.pdfLoading = false
}).catch(err => { }).catch(err => {
}) })
}, },
// qrcode () {
// let qrcode = new QRCode('qrcode', {
// width: 150,
// height: 150,
// // text: "http://test.erp.viitto.com/#/clientConfirm?"+'TCID='+this.msg.TCID+'&'+'orderID='+this.msg.orderID, // 二维码地址
// // text: "http://www.test.com/#/clientConfirm?"+'TCID='+this.msg.TCID+'&'+'orderID='+this.msg.orderID, // 二维码地址
// // text: "192.168.0.119:8080/#/clientConfirm?"+'TCID='+this.msg.TCID+'&'+'orderID='+this.msg.orderID, // 二维码地址
// //text: "https://baidu.com", // 二维码地址
// text: "http://192.168.0.119:8080/#/clientConfirm?"+'TCID='+this.msg.TCID+'&'+'orderID='+this.msg.orderID, // 二维码地址
// colorDark : "#000",
// colorLight : "#fff",
// })
// },
// disQrCode(){
// this.isShowFade=false;
// this.$refs.qrcode.innerHTML='';
// },
//获取数据 //获取数据
getList() { getList() {
this.apiJavaPost("/api/contract/getContractInfo", this.msg, res => { this.apiJavaPost("/api/contract/getContractInfo", this.msg, res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.dataList = res.data.data; this.dataList = res.data.data;
console.log(this.dataList);
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -1334,23 +1318,20 @@ ...@@ -1334,23 +1318,20 @@
//作废 //作废
getinvalid() { getinvalid() {
this.$confirm('是否作废?', '提示', { this.$confirm('是否作废?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.CtObj.status = 0; this.dataList.status=0;
this.apiJavaPost("/api/contract/dosaveOrUpdate", this.CtObj, res => { this.apiJavaPost("/api/contract/dosaveOrUpdate",this.dataList,res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.Success(res.data.message); this.Success(res.data.message);
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}, null); },null);
}).catch(() => { }).catch(() => {
this.$message({ this.$message.info('取消删除');
type: 'info',
message: '已取消删除'
});
}); });
} }
}, },
...@@ -1358,7 +1339,6 @@ ...@@ -1358,7 +1339,6 @@
this.msg.TCID = this.$route.query.TCID; this.msg.TCID = this.$route.query.TCID;
this.msg.orderID = this.$route.query.orderID; this.msg.orderID = this.$route.query.orderID;
this.getList(); this.getList();
this.GetQrCode();
} }
}; };
......
...@@ -751,7 +751,7 @@ ...@@ -751,7 +751,7 @@
<th>手机号</th> <th>手机号</th>
</tr> </tr>
<tr v-for="item in guestList"> <tr v-for="item in guestList">
<td>{{item.name}}</td> <td>{{item.surName+''+item.name}}</td>
<td>{{item.nationalityName}}</td> <td>{{item.nationalityName}}</td>
<td></td> <td></td>
<td>{{item.sex==1?'男':'女'}}</td> <td>{{item.sex==1?'男':'女'}}</td>
...@@ -821,9 +821,9 @@ ...@@ -821,9 +821,9 @@
</div> </div>
</el-form> </el-form>
<div> <div>
<input type="button" class="normalBtn" style="margin:40px 0 30px 60px;" value="提交审核"/> <input type="button" v-if="CtObj.status==1&&CtObj.auditContract==0" class="normalBtn" style="margin:40px 0 30px 60px;" @click="sendAudit()" value="提交审核"/>
<input type="button" class="normalBtn" @click="submitForm('CtObj')" value="保存"/> <input type="button" class="normalBtn" @click="submitForm('CtObj')" value="保存"/>
<input type="button" class="normalBtn" @click="goUrl()" value="预览"> <input type="button" class="normalBtn" v-if="CtObj.status==1" @click="goUrl()" value="预览">
<input type="button" class="normalBtn" v-if="CtObj.status==1" @click="getinvalid()" value="作废"> <input type="button" class="normalBtn" v-if="CtObj.status==1" @click="getinvalid()" value="作废">
</div> </div>
</div> </div>
...@@ -1047,7 +1047,6 @@ ...@@ -1047,7 +1047,6 @@
//获取数据 //获取数据
getList(){ getList(){
this.apiJavaPost("/api/contract/getContractInfo",this.msg,res => { this.apiJavaPost("/api/contract/getContractInfo",this.msg,res => {
console.log(res,'resss');
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.CtObj = res.data.data; this.CtObj = res.data.data;
this.guestList = res.data.data.guestList; this.guestList = res.data.data.guestList;
...@@ -1055,7 +1054,6 @@ ...@@ -1055,7 +1054,6 @@
this.CtObj.businessCertificate = '0000000'; this.CtObj.businessCertificate = '0000000';
this.CtObj.tcid = this.$route.query.TCID; this.CtObj.tcid = this.$route.query.TCID;
this.CtObj.orderId = this.$route.query.orderID; this.CtObj.orderId = this.$route.query.orderID;
console.log(this.CtObj,'ctobjjjjjjj');
if(this.CtObj.clientCountryid>0){ if(this.CtObj.clientCountryid>0){
this.GetSubAreaList(this.CtObj.clientCountryid,1,1); this.GetSubAreaList(this.CtObj.clientCountryid,1,1);
} }
...@@ -1191,6 +1189,7 @@ ...@@ -1191,6 +1189,7 @@
console.log(res,'ressss'); console.log(res,'ressss');
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.Success(res.data.message); this.Success(res.data.message);
this.getList();
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -1219,6 +1218,7 @@ ...@@ -1219,6 +1218,7 @@
console.log(res,'ressss'); console.log(res,'ressss');
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.Success(res.data.message); this.Success(res.data.message);
this.getList();
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -1240,7 +1240,18 @@ ...@@ -1240,7 +1240,18 @@
return false; return false;
} }
}); });
}, },
sendAudit(){
this.CtObj.auditContract=1;
this.apiJavaPost("/api/contract/dosaveOrUpdate",this.CtObj,res => {
console.log(res,'ressss');
if (res.data.resultCode === 1) {
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
},null);
}
}, },
mounted() { mounted() {
this.GetCounrty(); this.GetCounrty();
......
...@@ -1819,7 +1819,7 @@ ...@@ -1819,7 +1819,7 @@
</span> </span>
</div> </div>
<span class="GO_Contract" @click="goContract(item)" style="display:none;">领取合同</span> <span class="GO_Contract" @click="goContract(item)" >领取合同</span>
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -22,16 +22,12 @@ ...@@ -22,16 +22,12 @@
<el-input :placeholder="$t('system.ph_in')" v-model="msg.tcid" @keyup.native.enter="getList" class="w210"></el-input> <el-input :placeholder="$t('system.ph_in')" v-model="msg.tcid" @keyup.native.enter="getList" class="w210"></el-input>
</li> </li>
<li> <li>
<el-date-picker <label>日期</label>
@change="dateChange" <el-date-picker v-model='msg.startDate' class='w135' value-format="yyyy-MM-dd" type="date"
size="small" :picker-options="pickerBeginDateBefore"></el-date-picker>
value-format="yyyy-MM-dd" -
v-model="DateList" <el-date-picker v-model='msg.returnDate' class='w135' value-format="yyyy-MM-dd" type="date"
type="daterange" :picker-options="pickerBeginDateAfter"></el-date-picker>
range-separator="至"
start-placeholder="开始日期"
end-placeholder="返回日期">
</el-date-picker>
</li> </li>
<li> <li>
<input type="button" class="hollowFixedBtn" value="查询" @click="getList()" /> <input type="button" class="hollowFixedBtn" value="查询" @click="getList()" />
...@@ -49,33 +45,38 @@ ...@@ -49,33 +45,38 @@
<th>返回日期</th> <th>返回日期</th>
<th width="200">操作</th> <th width="200">操作</th>
</tr> </tr>
<tr> <tr v-for="item in dataList">
<td>123</td> <td>{{item.contractNum}}</td>
<td>456</td> <td>{{item.orderId}}</td>
<td>123123213</td> <td>{{item.tcid}}</td>
<td>123</td> <td>{{item.productName}}</td>
<td>2019-08-06</td> <td>{{getDate(item.startDate)}}</td>
<td>2019-08-13</td> <td>{{getDate(item.returnDate)}}</td>
<td> <td>
<el-row> <el-row>
<el-tooltip class="item" effect="dark" content="审核通过" placement="top-start"> <el-tooltip class="item" effect="dark" content="审核通过" placement="top-start">
<el-button type="primary" icon="iconfont icon-shenpi" circle></el-button> <el-button type="primary" icon="iconfont icon-shenpi" @click="AuditElec(2)" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="驳回" placement="top-start">
<el-button type="danger" icon="iconfont icon-shenhebohui" @click="AuditElec(0)" circle></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">
<el-button type="danger" icon="iconfont icon-chakan" @click="goToDetail()" circle></el-button> <el-button type="danger" icon="iconfont icon-chakan" @click="goToDetail(item)" circle></el-button>
</el-tooltip> </el-tooltip>
</el-row> </el-row>
</td> </td>
</tr> </tr>
</table> </table>
<!-- <div class="noData" v-show="noData"> <div class="noData" v-show="dataList.length<1">
{{$t('system.content_noData')}} <i class="iconfont icon-kong" style="font-size:100px;"></i>
</div> --> <p>{{$t("active.ld_noData")}}</p>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import moment from 'moment'
export default { export default {
data() { data() {
return { return {
...@@ -87,12 +88,24 @@ export default { ...@@ -87,12 +88,24 @@ export default {
startDate:'', startDate:'',
returnDate:'' returnDate:''
}, },
DateList:[], dataList:[],
// pickerOptions0: { loading:false,
// disabledDate(time) { pickerBeginDateBefore: {
// return time.getTime() < Date.now() - 8.64e7; disabledDate: time => {
// } if (this.msg.returnDate == null) {
// }, return false;
} else {
let endTime = new Date(this.msg.returnDate)
return endTime.getTime() < time.getTime()
}
}
},
pickerBeginDateAfter: {
disabledDate: time => {
let startTime = new Date(this.msg.startDate)
return startTime.getTime() >= time.getTime()
}
}
}; };
}, },
methods: { methods: {
...@@ -103,23 +116,46 @@ export default { ...@@ -103,23 +116,46 @@ export default {
} }
}, },
//跳转至详情 //跳转至详情
goToDetail(){ goToDetail(item){
this.$router.push({ this.$router.push({
name: 'ElectronicContract', name: 'ElectronicContract',
query: { query: {
// TCID: this.$route.query.TCID, TCID: item.tcid,
// orderID: this.$route.query.orderID, orderID: item.orderId,
TCID:5560,
orderID:28807,
blank: "y", blank: "y",
} }
}); });
}, },
getList() { getList() {
this.loading=true;
this.apiJavaPost("/api/contract/auditContract",this.msg,res => {
this.loading=false;
console.log(res,'ressss');
if (res.data.resultCode === 1) {
this.dataList = res.data.data;
} else {
this.Error(res.data.message);
}
},null);
},
//审核通过或者驳回
AuditElec(type){
let msg = this.dataList[0];
msg.auditContract=type;
this.apiJavaPost("/api/contract/dosaveOrUpdate",msg,res => {
if (res.data.resultCode === 1) {
this.Success(res.data.message);
this.getList();
} else {
this.Error(res.data.message);
}
},null);
}, },
getDate(date) {
return moment(date).format("YYYY-MM-DD");
},
}, },
mounted() { mounted() {
this.getList(); this.getList();
} }
......
...@@ -784,7 +784,7 @@ ...@@ -784,7 +784,7 @@
methods: { methods: {
//获取数据 //获取数据
getList(){ getList(){
this.apiJavaPost("/api/contract/getContractInfo",this.msg,res => { this.apiJavaPost("/api/contract/getContractInfoForCode",this.msg,res => {
console.log(res,'resss'); console.log(res,'resss');
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.dataList = res.data.data; this.dataList = res.data.data;
......
...@@ -121,6 +121,7 @@ export default { ...@@ -121,6 +121,7 @@ export default {
domainUrl = "http://192.168.2.214:8082"; domainUrl = "http://192.168.2.214:8082";
domainUrl = "http://192.168.2.65:8025"; domainUrl = "http://192.168.2.65:8025";
domainUrl = "http://192.168.2.16:8083"; domainUrl = "http://192.168.2.16:8083";
if (locationName.indexOf('oytour') !== -1) { if (locationName.indexOf('oytour') !== -1) {
domainUrl = "http://reborn.oytour.com"; domainUrl = "http://reborn.oytour.com";
} else if (locationName.indexOf('viitto') !== -1) { } else if (locationName.indexOf('viitto') !== -1) {
...@@ -401,6 +402,10 @@ export default { ...@@ -401,6 +402,10 @@ export default {
}) })
} else if (res.resultCode == 10005) { } else if (res.resultCode == 10005) {
this.$router.go(-1) this.$router.go(-1)
} else if(res.data.data.isJumpTwoCode==1){
this.$router.push({
path: '/clientConfirm'
})
} else { } else {
successCall(res) successCall(res)
} }
......
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