Commit 7f910bf4 authored by 黄奎's avatar 黄奎

页面修改

parent 40227866
...@@ -120,6 +120,7 @@ ...@@ -120,6 +120,7 @@
guestId: 0, guestId: 0,
}, },
isRB: 0, //1-出境日本合同,0-其它合同 isRB: 0, //1-出境日本合同,0-其它合同
isSignature: false, //是否签名
} }
}, },
created() { created() {
...@@ -137,6 +138,7 @@ ...@@ -137,6 +138,7 @@
}, },
methods: { methods: {
getCanvas() { getCanvas() {
var that = this;
let el = document.getElementById("canvas"); let el = document.getElementById("canvas");
el.appendChild(canvas); el.appendChild(canvas);
canvas.width = el.clientWidth; canvas.width = el.clientWidth;
...@@ -162,6 +164,7 @@ ...@@ -162,6 +164,7 @@
function (e) { function (e) {
cxt.lineTo(e.changedTouches[0].pageX, e.changedTouches[0].pageY); cxt.lineTo(e.changedTouches[0].pageX, e.changedTouches[0].pageY);
cxt.stroke(); cxt.stroke();
that.isSignature = true;
}.bind(this), }.bind(this),
false false
); );
...@@ -191,6 +194,7 @@ ...@@ -191,6 +194,7 @@
if (this.isMouseDown) { if (this.isMouseDown) {
cxt.lineTo(e.pageX - 20, e.pageY - 20); cxt.lineTo(e.pageX - 20, e.pageY - 20);
cxt.stroke(); cxt.stroke();
that.isSignature = true;
} }
}.bind(this), }.bind(this),
false false
...@@ -207,6 +211,7 @@ ...@@ -207,6 +211,7 @@
}, },
handelClearEl() { handelClearEl() {
cxt.clearRect(0, 0, canvas.width, canvas.height); cxt.clearRect(0, 0, canvas.width, canvas.height);
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,6 +231,10 @@ ...@@ -226,6 +231,10 @@
}, },
//提交数据 //提交数据
SaveMsg() { SaveMsg() {
if (!this.isSignature) {
this.Error("请绘制签名信息");
return;
}
this.apipost("travelcontract_post_UpdateCompanySignatureService", this.SignInfo, res => { this.apipost("travelcontract_post_UpdateCompanySignatureService", this.SignInfo, res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.Success(res.data.message); this.Success(res.data.message);
......
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