Commit d3ae8496 authored by 沈良进's avatar 沈良进

页面修改

parent d0c9db60
......@@ -72,9 +72,6 @@
<template>
<div class="SignName">
<div class="signTc" v-show="tcStatus">
<span @click="tcStatus=false;" class="closeTc">去签字</span>
</div>
<div class="CliSignDiv" style="height:100%;z-index:100;background:#fff;">
<div class="CanvasDiv">
<div class="dash">
......@@ -101,7 +98,6 @@
</div>
</div>
</template>
<script>
import tripBusOrderVue from './busManagement/tripBusOrder.vue';
let canvas = document.createElement("canvas");
......@@ -109,27 +105,44 @@
export default {
data() {
return {
tcStatus: false,
linewidth: 5, //线条粗细,选填
color: "black", //线条颜色,选填
background: "#fff", //线条背景,选填
SignInfo: {},
isSignature: false, //判断是否签名
SignInfo: "", //绘制的签名信息
msg: {
TCID: 0,
orderID: 0,
guestId: 0,
Id: 0, //出境合同主键编号
TCID: 0, //团期编号
orderID: 0, //订单编号
guestId: 0, //旅客编号
ProtocolId: 0, //保密协议编号
TypeStr: "", //跳转页面地址
},
isRB: 0, //1-出境日本合同,0-其它合同
isSignature: false, //是否签名
}
},
created() {
this.SignInfo = JSON.parse(sessionStorage.getItem("SignInfo"));
},
mounted() {
this.msg.TCID = this.$route.query.TCID;
this.msg.orderID = this.$route.query.orderID;
this.isRB = this.$route.query.isRB;
if (this.$route.query && this.$route.query.TCID) {
this.msg.TCID = this.$route.query.TCID;
}
if (this.$route.query && this.$route.query.orderID) {
this.msg.orderID = this.$route.query.orderID;
}
if (this.$route.query && this.$route.query.guestId) {
this.msg.guestId = this.$route.query.guestId;
}
if (this.$route.query && this.$route.query.ProtocolId) {
this.msg.ProtocolId = this.$route.query.ProtocolId;
}
if (this.$route.query && this.$route.query.Id) {
this.msg.Id = this.$route.query.Id;
}
if (this.$route.query && this.$route.query.TypeStr) {
this.msg.TypeStr = this.$route.query.TypeStr;
}
console.log("this.msg", this.msg);
this.getCanvas();
document.getElementsByTagName('body')[0].style = "overscroll-behavior-y: contain;"
},
......@@ -211,7 +224,7 @@
},
handelClearEl() {
cxt.clearRect(0, 0, canvas.width, canvas.height);
this.isSignature=false;
this.isSignature = false;
},
handelSaveEl() {
var imageData = canvas.getContext("2d").getImageData(0, 0, canvas.width, canvas.height);
......@@ -226,7 +239,7 @@
}
canvas.getContext("2d").putImageData(imageData, 0, 0);
let imgBase64 = canvas.toDataURL();
this.SignInfo.companySignature = imgBase64;
this.SignInfo = imgBase64;
this.SaveMsg();
},
//提交数据
......@@ -235,28 +248,53 @@
this.Error("请绘制签名信息");
return;
}
this.apipost("travelcontract_post_UpdateCompanySignatureService", this.SignInfo, res => {
if (res.data.resultCode === 1) {
this.Success(res.data.message);
var path = "clientConfirm";
if (this.isRB == 1) {
path = "clientConfirmRB"
//出境合同
if (this.msg.TypeStr == 'clientConfirm') {
var postMsg = {
Id: this.msg.Id,
companySignature: this.SignInfo
}
this.apipost("travelcontract_post_UpdateCompanySignatureService", postMsg, res => {
if (res.data.resultCode === 1) {
this.Success(res.data.message);
var path = "clientConfirm";
this.$router.push({
name: path,
query: {
TCID: this.msg.TCID,
orderID: this.msg.orderID,
guestId: this.msg.guestId,
str:"",//不弹窗
}
})
} else {
this.Error(res.data.message);
}
this.$router.push({
name: path,
query: {
TCID: this.msg.TCID,
orderID: this.msg.orderID,
str: 1,
guestId: this.msg.guestId,
}
})
} else {
this.Error(res.data.message);
}, null);
}
//保密协议
else if (this.msg.TypeStr == 'clientProtocol') {
var clientProtocolMsg = {
ProtocolId: this.msg.ProtocolId,
GuestSignature: this.SignInfo
}
}, null);
this.apipost("travelcontract_post_UpdateGuestSignature", clientProtocolMsg, res => {
if (res.data.resultCode === 1) {
this.Success(res.data.message);
this.$router.push({
name: 'clientProtocol',
query: {
TCID: this.msg.TCID,
orderID: this.msg.orderID,
guestId: this.msg.guestId,
}
})
} else {
this.Error(res.data.message);
}
}, null);
}
},
}
}
</script>
</script>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -243,7 +243,6 @@
</div>
</div>
</div>
<div class="fade" v-show="isShowFade"></div>
<div class="qrCodeDiv" v-show="isShowFade">
<div style="margin-top:15px;">请扫码签字</div>
......@@ -352,14 +351,14 @@
OrderId: this.$route.query.OrderId,
GuestId: this.$route.query.GuestId,
ProtocolId: this.$route.query.ProtocolId,
pUrl: "clientConfirm",
pUrl: "clientProtocol",
};
this.$http({
headers: {
'Content-Type': 'application/json'
},
method: 'post',
url: urlObj.DomainUrl + '/api/file/GetQrCodeImage?',
url: urlObj.DomainUrl + '/api/file/GetQrCodeExtImage?',
data: {
"msg": msg
}
......
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