|
|
@@ -17,22 +17,30 @@ |
|
|
|
<view class="cu-form-group"><view class="title">手写签名:</view></view> |
|
|
|
<view class="sign-area bg-white"> |
|
|
|
<canvas |
|
|
|
v-if="canvas" |
|
|
|
@touchmove="signMove" |
|
|
|
@touchstart="signStart($event)" |
|
|
|
@touchend="signEnd" |
|
|
|
@touchcancel="signEnd" |
|
|
|
disable-scroll="true" |
|
|
|
v-if="canvas" |
|
|
|
@touchmove="signMove" |
|
|
|
@touchstart="signStart($event)" |
|
|
|
@touchend="signEnd" |
|
|
|
@touchcancel="signEnd" |
|
|
|
disable-scroll="true" |
|
|
|
canvas-id="sign-canvas" |
|
|
|
id="sign-canvas" |
|
|
|
class="sign-canvas" |
|
|
|
></canvas> |
|
|
|
</view> |
|
|
|
<view class="sign-action padding-bottom text-right"> |
|
|
|
<!-- <l-button @click="Signature" color="" style="color: #FFFFFF; background: #0081ff; margin-right: 15px;">签章</l-button> --> |
|
|
|
<picker class="cu-btn df" style="background-color: #0081ff;color: #ffffff;margin-right: 15px;border-radius: 5px;" @change="Signature" :range="Signaitem" range-key="F_StampName">个人签章</picker> |
|
|
|
<picker v-if="ComStatus" class="cu-btn df" style="background-color: #fe955c;color: #ffffff;margin-right: 15px;border-radius: 5px;" @change="Commonture" :range="Commonseal" range-key="F_StampName">学校签章</picker> |
|
|
|
<l-button @click="clearSign" color="red" style="margin-right: 15px;">清空签名板</l-button> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <view> |
|
|
|
<image style="width: 100px;height: 100px;" :src="Signimg"></image> |
|
|
|
</view> --> |
|
|
|
|
|
|
|
|
|
|
|
<l-textarea v-model="remark" :placeholder="`输入${typeText}意见`" title="审核意见:" required /> |
|
|
|
|
|
|
|
<!-- 弹层 --> |
|
|
@@ -46,6 +54,29 @@ |
|
|
|
<view class="padding margin-top bg-white"> |
|
|
|
<l-button @click="submit" class="block" size="lg" color="green" block>提交流程{{ typeText }}</l-button> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="pswd-uni-mask" v-if="passshow"> |
|
|
|
<view class="pswd-uni-modal"> |
|
|
|
<view class="pswd-uni-modal__hd"> |
|
|
|
<view class="pswd-strong">输入密码</view> |
|
|
|
</view> |
|
|
|
<view class="pswd-uni-modal__hd" style="margin-bottom: 1em;"> |
|
|
|
<input class="pswdinp" type="text" v-model="password" placeholder="密码"> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="pswd-uni-modal__ft"> |
|
|
|
<view class="pswd-uni-modal__btn" style="color:rgb(57, 181, 74)" @click="cancelpswd"> |
|
|
|
取消 |
|
|
|
</view> |
|
|
|
<view class="pswd-uni-modal__btn pswd__btn_primary" style="color: rgb(245, 88, 80);" @click="confirmpswd"> |
|
|
|
确认 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
@@ -71,11 +102,33 @@ export default { |
|
|
|
reviewerList: [], |
|
|
|
reviewerListId:'', |
|
|
|
submitPostData:null, |
|
|
|
|
|
|
|
// 列表与分页信息 |
|
|
|
page: 1, |
|
|
|
total: 2, |
|
|
|
|
|
|
|
// 选择个人签章 |
|
|
|
Signaitem:[], |
|
|
|
// 公章 |
|
|
|
Commonseal:[], |
|
|
|
// 是否显示公章 |
|
|
|
ComStatus:false, |
|
|
|
|
|
|
|
pitchon:'', |
|
|
|
Signimg: '', |
|
|
|
// 填写密码 |
|
|
|
passshow:false, |
|
|
|
password:'', |
|
|
|
PitchonSign:'', |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async onLoad() { |
|
|
|
await this.init() |
|
|
|
// this.Signimg = this.API + `/learun/adms/user/img?data=${'System'}` |
|
|
|
// this.Signimg = this.API + `/learun/adms/StampPersonal/img?data=${'47201f98-7611-4052-b271-bb99bd7b1d3c'}` |
|
|
|
// console.log(this.Signimg) |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
@@ -85,16 +138,48 @@ export default { |
|
|
|
console.log(this.taskParam) |
|
|
|
this.type = this.taskParam.type |
|
|
|
this.typeText = this.taskParam.type === 'sign' ? '加签' : '审核' |
|
|
|
|
|
|
|
if (Number(this.taskParam.isSign) === 1) { |
|
|
|
await this.getComstatus() |
|
|
|
await this.getSigna() |
|
|
|
await this.getCommonseal() |
|
|
|
if (Number(this.taskParam.isSign) === 1) { |
|
|
|
this.canvasInit() |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 获取个人签章 |
|
|
|
getSigna(){ |
|
|
|
return this.HTTP_GET("learun/adms/StampPersonal/list",{},"加载数据时出错").then(async res=>{ |
|
|
|
if(res){ |
|
|
|
console.log(res) |
|
|
|
this.Signaitem = res |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取是否展示公章 |
|
|
|
getComstatus(){ |
|
|
|
return this.HTTP_GET("learun/adms/StampPersonal/ishaveright",{},"加载数据时出错").then(async res=>{ |
|
|
|
if(res){ |
|
|
|
console.log(res) |
|
|
|
this.ComStatus = res.result |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取学校签章 |
|
|
|
getCommonseal(){ |
|
|
|
return this.HTTP_GET("learun/adms/StampPersonal/schoollist",{},"加载数据时出错").then(async res=>{ |
|
|
|
if(res){ |
|
|
|
console.log(res) |
|
|
|
this.Commonseal = res |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 初始化签名区 canvas |
|
|
|
canvasInit() { |
|
|
|
this.canvas = true |
|
|
|
context = uni.createCanvasContext('sign-canvas') |
|
|
|
context = uni.createCanvasContext('sign-canvas') |
|
|
|
context.setStrokeStyle('#000') |
|
|
|
context.setLineWidth(5) |
|
|
|
context.setLineCap('round') |
|
|
@@ -102,6 +187,68 @@ export default { |
|
|
|
touchs = [] |
|
|
|
}, |
|
|
|
|
|
|
|
// 点击个人签章 |
|
|
|
Signature(e){ |
|
|
|
let signindex = e.detail.value; |
|
|
|
this.pitchon = this.Signaitem[signindex] |
|
|
|
this.PitchonSign = this.Signaitem[signindex].F_StampId |
|
|
|
this.passshow = true |
|
|
|
}, |
|
|
|
// 选择学校签章 |
|
|
|
Commonture(e){ |
|
|
|
let signindex = e.detail.value; |
|
|
|
this.pitchon = this.Commonseal[signindex] |
|
|
|
this.PitchonSign = this.Commonseal[signindex].F_StampId |
|
|
|
this.passshow = true |
|
|
|
}, |
|
|
|
// 取消 |
|
|
|
cancelpswd(){ |
|
|
|
this.passshow = false |
|
|
|
this.password = '' |
|
|
|
this.pitchon = '' |
|
|
|
this.PitchonSign = '' |
|
|
|
}, |
|
|
|
// 确认 |
|
|
|
confirmpswd(){ |
|
|
|
console.log(this.pitchon) |
|
|
|
let _this = this |
|
|
|
this.HTTP_POST('learun/adms/StampPersonal/equalPassword', { |
|
|
|
F_StampId:this.pitchon.F_StampId, |
|
|
|
F_Password: this.MD5(this.password) |
|
|
|
}).then(async res=>{ |
|
|
|
if(res.result){ |
|
|
|
console.log(res) |
|
|
|
console.log(_this.pitchon.F_StampId) |
|
|
|
let imgurl = _this.API + `/learun/adms/StampPersonal/img?data=${_this.pitchon.F_StampId}` |
|
|
|
console.log(imgurl) |
|
|
|
_this.SignaApply(imgurl) |
|
|
|
_this.Signimg = imgurl |
|
|
|
_this.passshow = false |
|
|
|
_this.password = '' |
|
|
|
_this.pitchon = '' |
|
|
|
}else{ |
|
|
|
this.TOAST(`${res.msg}`, 'error') |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
// 绘制签章图片到canvas |
|
|
|
SignaApply(goodsImg){ |
|
|
|
uni.getImageInfo({ |
|
|
|
src:goodsImg, |
|
|
|
success:function(image){ |
|
|
|
// console.log(image) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
setTimeout(()=>{ |
|
|
|
context.drawImage(goodsImg,200,180,150,80) |
|
|
|
context.draw(true,(res)=>{ |
|
|
|
// console.log(res) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 指派审核人 |
|
|
|
async userAssign() { |
|
|
|
if(!this.reviewer.length){ |
|
|
@@ -154,9 +301,12 @@ export default { |
|
|
|
processId: this.taskParam.processId, |
|
|
|
taskId: this.taskParam.taskId, |
|
|
|
des: this.remark, |
|
|
|
formreq: this.taskParam.formreq |
|
|
|
formreq: this.taskParam.formreq, |
|
|
|
stamp: this.PitchonSign |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
console.log(postData) |
|
|
|
|
|
|
|
if (this.type === 'sign') { |
|
|
|
postData.userId = this.staff |
|
|
|
} else { |
|
|
@@ -260,10 +410,6 @@ export default { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const success = await this.HTTP_POST( |
|
|
|
this.type === 'sign' ? 'learun/adms/newwf/sign' : 'learun/adms/newwf/audit', |
|
|
|
postData, |
|
|
@@ -354,4 +500,91 @@ export default { |
|
|
|
text-align: right; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.pswd-uni-mask{ |
|
|
|
position: fixed; |
|
|
|
z-index: 999; |
|
|
|
top: 0; |
|
|
|
right: 0; |
|
|
|
left: 0; |
|
|
|
bottom: 0; |
|
|
|
background: rgba(0,0,0,.5); |
|
|
|
} |
|
|
|
|
|
|
|
.pswd-uni-modal{ |
|
|
|
position: fixed; |
|
|
|
z-index: 999; |
|
|
|
width: 80%; |
|
|
|
max-width: 300px; |
|
|
|
top: 50%; |
|
|
|
left: 50%; |
|
|
|
-webkit-transform: translate(-50%,-50%); |
|
|
|
transform: translate(-50%,-50%); |
|
|
|
background-color: #fff; |
|
|
|
text-align: center; |
|
|
|
border-radius: 3px; |
|
|
|
overflow: hidden; |
|
|
|
} |
|
|
|
.pswd-uni-modal__hd{ |
|
|
|
padding: 1em 1.6em 0.3em; |
|
|
|
} |
|
|
|
.pswd-strong{ |
|
|
|
font-weight: 400; |
|
|
|
font-size: 18px; |
|
|
|
} |
|
|
|
.pswd-uni-modal__ft{ |
|
|
|
position: relative; |
|
|
|
line-height: 48px; |
|
|
|
font-size: 18px; |
|
|
|
display: -webkit-box; |
|
|
|
display: -webkit-flex; |
|
|
|
display: flex; |
|
|
|
} |
|
|
|
|
|
|
|
.pswd-uni-modal__ft::after { |
|
|
|
content: " "; |
|
|
|
position: absolute; |
|
|
|
left: 0; |
|
|
|
top: 0; |
|
|
|
right: 0; |
|
|
|
height: 1px; |
|
|
|
border-top: 1px solid #d5d5d6; |
|
|
|
color: #d5d5d6; |
|
|
|
-webkit-transform-origin: 0 0; |
|
|
|
transform-origin: 0 0; |
|
|
|
-webkit-transform: scaleY(.5); |
|
|
|
transform: scaleY(.5); |
|
|
|
} |
|
|
|
|
|
|
|
.pswd-uni-modal__btn{ |
|
|
|
display: block; |
|
|
|
-webkit-box-flex: 1; |
|
|
|
/* -webkit-flex: 1; */ |
|
|
|
flex: 1; |
|
|
|
color: #3cc51f; |
|
|
|
text-decoration: none; |
|
|
|
-webkit-tap-highlight-color: rgba(0,0,0,0); |
|
|
|
position: relative; |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
|
|
|
|
.pswd__btn_primary::after { |
|
|
|
content: " "; |
|
|
|
position: absolute; |
|
|
|
left: 0; |
|
|
|
top: 0; |
|
|
|
width: 1px; |
|
|
|
bottom: 0; |
|
|
|
border-left: 1px solid #d5d5d6; |
|
|
|
color: #d5d5d6; |
|
|
|
-webkit-transform-origin: 0 0; |
|
|
|
transform-origin: 0 0; |
|
|
|
-webkit-transform: scaleX(.5); |
|
|
|
transform: scaleX(.5); |
|
|
|
} |
|
|
|
.pswdinp{ |
|
|
|
background: #f5f5f5; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</style> |