|
|
|
@ -71,10 +71,16 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="list-item-feet border-top"> |
|
|
|
|
<view class="list-btn ani" hover-class="isHoverIng" v-if="item.status==1&&userType == 1||item.status==1&&userType == 2" @click="viewDetails(item,false)">修改</view> |
|
|
|
|
<view class="list-btn ani" hover-class="isHoverIng" v-if="item.status==1" @click="signIng(item)">签字</view> |
|
|
|
|
<view class="list-btn ani" hover-class="isHoverIng" v-if="item.status!=1" @click="goReport(item)">查看报告</view> |
|
|
|
|
<view class="list-btn ani" hover-class="isHoverIng" v-if="item.status==2&&userType == 1||item.status==2&&userType == 2" @click="viewDetails(item,true,'1')">复查</view> |
|
|
|
|
<view class="list-btn ani" hover-class="isHoverIng" |
|
|
|
|
v-if="item.status == 1 && userType == 1 || item.status == 1 && userType == 2" |
|
|
|
|
@click="viewDetails(item, false)">修改</view> |
|
|
|
|
<view class="list-btn ani" hover-class="isHoverIng" v-if="item.status == 1" @click="signIng(item)">签字 |
|
|
|
|
</view> |
|
|
|
|
<view class="list-btn ani" hover-class="isHoverIng" v-if="item.status != 1" @click="goReport(item)">查看报告 |
|
|
|
|
</view> |
|
|
|
|
<view class="list-btn ani" hover-class="isHoverIng" |
|
|
|
|
v-if="item.status == 2 && userType == 1 || item.status == 2 && userType == 2" |
|
|
|
|
@click="viewDetails(item, true, '1')">复查</view> |
|
|
|
|
<view class="list-btn ani" hover-class="isHoverIng" @click="viewDetails(item, true)">查看详情</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -132,8 +138,8 @@ |
|
|
|
|
|
|
|
|
|
<!-- 签字板 --> |
|
|
|
|
<view class="sign-box"> |
|
|
|
|
<sp-sign-board v-if="showSign" ref="signBoardRef" sid="sign-board-popup" :showMark="false" |
|
|
|
|
bgColor="#f8f8f8" :horizontal="true" popup-mode :needBack="false"></sp-sign-board> |
|
|
|
|
<sp-sign-board v-if="showSign" :expFile="expFile" ref="signBoardRef" sid="sign-board-popup" |
|
|
|
|
:showMark="false" bgColor="#f8f8f8" :horizontal="true" popup-mode :needBack="false"></sp-sign-board> |
|
|
|
|
</view> |
|
|
|
|
<!-- 自定义控制栏 --> |
|
|
|
|
<view class="sign-control"> |
|
|
|
@ -174,6 +180,8 @@ import CustomRefresher from '@/components/custom-refresher/custom-refresher' |
|
|
|
|
import { parseTime } from '@/utils/ruoyi' |
|
|
|
|
import { getDicts } from '@/api/system/user' |
|
|
|
|
import * as Api from '@/api/index/index' |
|
|
|
|
import { baseUrl } from '@/config' |
|
|
|
|
import { getAccessToken, setToken } from '@/utils/auth' |
|
|
|
|
import { getLabelByValue } from '@/utils/showDictLabel.js' // 导入工具函数 |
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
@ -204,6 +212,10 @@ export default { |
|
|
|
|
signType: null, |
|
|
|
|
signItemId: null, |
|
|
|
|
selectedItem: null, |
|
|
|
|
expFile: { |
|
|
|
|
fileType: 'png', |
|
|
|
|
}, |
|
|
|
|
baseApi: '/prod-api/admin-api/infra/file/upload', |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
@ -214,14 +226,33 @@ export default { |
|
|
|
|
mounted() { |
|
|
|
|
// 监听,有必要时请正确处理on、once和off |
|
|
|
|
uni.$on('getSignImg', (e) => { |
|
|
|
|
let that = this |
|
|
|
|
console.log('getSignImg', e) |
|
|
|
|
// 多签名场景下可根据 sid 区分不同签名 |
|
|
|
|
if (e.sid == 'sign-board-popup') { |
|
|
|
|
if (this.signType == 1) { |
|
|
|
|
this.selectedItem.checkPeopleSignature = e.base64 |
|
|
|
|
|
|
|
|
|
uni.uploadFile({ |
|
|
|
|
header: { |
|
|
|
|
"Authorization": "Bearer " + getAccessToken(), |
|
|
|
|
}, |
|
|
|
|
url: baseUrl + that.baseApi, |
|
|
|
|
filePath: e.path, |
|
|
|
|
name: 'file', |
|
|
|
|
success(res) { |
|
|
|
|
var obj = JSON.parse(res.data); |
|
|
|
|
if (obj.code != 0) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: "签字失败,请重试", |
|
|
|
|
icon: "none" |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (that.signType == 1) { |
|
|
|
|
|
|
|
|
|
that.selectedItem.checkPeopleSignature = e.base64 |
|
|
|
|
Api.updateInitialReview({ |
|
|
|
|
id: this.signItemId, |
|
|
|
|
checkPeopleSignature: e.base64 |
|
|
|
|
id: that.signItemId, |
|
|
|
|
checkPeopleSignature: obj.data |
|
|
|
|
}).then(res => { |
|
|
|
|
debugger |
|
|
|
|
uni.showToast({ |
|
|
|
@ -229,20 +260,20 @@ export default { |
|
|
|
|
icon: 'none', |
|
|
|
|
mask: true |
|
|
|
|
}) |
|
|
|
|
if (this.selectedItem.enterpriseSignature) { |
|
|
|
|
this.updateItemStatus() |
|
|
|
|
if (that.selectedItem.enterpriseSignature) { |
|
|
|
|
that.updateItemStatus() |
|
|
|
|
} else { |
|
|
|
|
this.$refs.paging.refresh() |
|
|
|
|
that.$refs.paging.refresh() |
|
|
|
|
} |
|
|
|
|
console.log(res) |
|
|
|
|
}).catch(err => { |
|
|
|
|
console.log(err) |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
this.selectedItem.enterpriseSignature = e.base64 |
|
|
|
|
that.selectedItem.enterpriseSignature = e.base64 |
|
|
|
|
Api.updateInitialReview({ |
|
|
|
|
id: this.signItemId, |
|
|
|
|
enterpriseSignature: e.base64 |
|
|
|
|
id: that.signItemId, |
|
|
|
|
enterpriseSignature: obj.data |
|
|
|
|
}).then(res => { |
|
|
|
|
debugger |
|
|
|
|
uni.showToast({ |
|
|
|
@ -251,16 +282,27 @@ export default { |
|
|
|
|
mask: true |
|
|
|
|
}) |
|
|
|
|
console.log(res) |
|
|
|
|
if (this.selectedItem.checkPeopleSignature) { |
|
|
|
|
this.updateItemStatus() |
|
|
|
|
if (that.selectedItem.checkPeopleSignature) { |
|
|
|
|
that.updateItemStatus() |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
this.$refs.paging.refresh() |
|
|
|
|
that.$refs.paging.refresh() |
|
|
|
|
} |
|
|
|
|
}).catch(err => { |
|
|
|
|
console.log(err) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
fail(res) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: "签字失败,请重试", |
|
|
|
|
icon: "none" |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.signBase64 = e.base64 |
|
|
|
|
this.signTempimg = e.path |
|
|
|
|
} |
|
|
|
|