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

页面修改

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