Files
frontend-app/pages/rwa_package/dongjian/check.vue
T

227 lines
5.5 KiB
Vue
Raw Normal View History

2025-08-13 00:05:08 +08:00
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="查看合同" />
<view class="contract-view">
<view class="top-info flex-r-lr">
2025-11-19 00:03:45 +08:00
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/he.png"></image>
2025-08-13 00:05:08 +08:00
<view class="right-view">
2025-08-28 20:19:37 +08:00
<text class="text-36 text-zu">{{ obj.contractName }}</text>
2025-08-13 00:05:08 +08:00
<view class="bottom-panel">
2025-08-28 17:17:42 +08:00
<view class="flex-r-lr mt-24" v-for="(item, index) in dataList" :key="dataList.value">
<text class="text-fu text-24">{{ item.text }}</text>
2025-08-13 00:05:08 +08:00
<view class="list-right">
2025-08-28 17:17:42 +08:00
<text class="text-24" :class="{ 'text-lu': index == 0, 'text-zu': index != 0 }">{{ item.value }}</text>
2025-08-13 00:05:08 +08:00
</view>
</view>
</view>
</view>
</view>
<text class="text-zu text-32 mt-32" style="margin-left:38rpx">合同签约人信息</text>
<view class="bottom">
2025-08-28 17:17:42 +08:00
<view class="bottom-lsit" v-for="(item, index) in bottomList" :key="item.value">
<text class="text-24 text-fu" style="min-width:184rpx;display: inline-block;">{{ item.text }}</text>
<text class="text-24 text-zu">{{ item.value }}</text>
2025-08-13 00:05:08 +08:00
</view>
</view>
<view class="bottom-btn">
2025-08-28 17:17:42 +08:00
2025-08-13 00:05:08 +08:00
<view class="right-btn flex-c" @click="onOpen">
<text class="text-white text-32">下载合同</text>
</view>
</view>
</view>
2025-08-13 23:18:06 +08:00
<up-toast ref="uToastRef"></up-toast>
2025-08-13 00:05:08 +08:00
</view>
</template>
<script>
import { getUserInfo } from '@/api/auth.js';
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'
import ContractItem from './components/contract-item.vue'
2025-08-28 17:17:42 +08:00
import { getContractList, fileUrls } from '@/api/contract.js'
2025-08-13 00:05:08 +08:00
import func from '@/utils/func.js';
export default {
2025-08-28 17:17:42 +08:00
components: { Header, TopSafe, ContractItem },
2025-08-13 00:05:08 +08:00
data() {
return {
2025-08-28 17:17:42 +08:00
dataList: [
2025-08-28 20:19:37 +08:00
{ text: '合同状态', value: '签约完成' },
2025-08-28 17:17:42 +08:00
{ text: '合同编号', value: '' },
{ text: '发起方', value: '信任桥(深圳)网络科技有限公司' },
{ text: '发起时间', value: '' },
2025-10-14 13:59:41 +08:00
{ text: '完成时间', value: '' },
2025-08-13 00:05:08 +08:00
],
2025-08-28 17:17:42 +08:00
bottomList: [
{ text: '签约人', value: '信任桥会员 章三' },
{ text: '状态', value: '已签署' },
{ text: '时间', value: '2025-08-11 12:00:00' },
2025-08-13 00:05:08 +08:00
],
2025-08-28 17:17:42 +08:00
obj: null,
url: ''
2025-08-13 00:05:08 +08:00
};
},
onLoad(option) {
2025-08-28 17:17:42 +08:00
this.init();
2025-08-13 00:05:08 +08:00
},
methods: {
2025-08-28 17:17:42 +08:00
init() {
2025-08-13 00:05:08 +08:00
this.isSignContract()
},
2025-08-28 17:17:42 +08:00
getfileUrls() {
2025-08-16 01:03:25 +08:00
let params = {
2025-08-28 17:17:42 +08:00
businessType: 'FLOW',
businessIds: [this.obj.flowId]
2025-08-16 01:03:25 +08:00
}
2025-08-28 17:17:42 +08:00
fileUrls(params).then(res => {
if (res.bizcode == 100) {
2025-08-16 01:03:25 +08:00
this.url = res.data.fileUrls[0].url;
2025-08-28 17:17:42 +08:00
} else {
2025-08-16 01:03:25 +08:00
this.$refs.uToastRef.show({
type: 'error',
message: res.msg,
});
}
})
},
2025-08-28 17:17:42 +08:00
isSignContract() {
getContractList().then(res => {
if (res.bizcode == 100) {
2025-08-13 00:05:08 +08:00
this.obj = JSON.parse(JSON.stringify(res.data[0]));
2025-08-28 17:17:42 +08:00
this.obj.time = func.formatDate(new Date(res.data[0].signatureTime), 2);
this.obj.details.startTime = func.formatDate(new Date(res.data[0].details.startTime), 2);
this.obj.details.endTime = func.formatDate(new Date(res.data[0].details.endTime), 2);
// this.dataList[2].value = this.obj.flowId;
2025-08-28 20:19:37 +08:00
this.dataList[0].value = this.obj.state ? '已签署' : '未签署';
2025-08-31 23:59:51 +08:00
this.dataList[1].value = this.obj.flowId;
2025-08-13 00:05:08 +08:00
this.dataList[3].value = this.obj.details.startTime;
this.dataList[4].value = this.obj.details.endTime;
this.bottomList[0].value = this.obj.signatureName;
2025-09-12 12:01:12 +08:00
this.bottomList[1].value = this.obj.state ? '已签署' : '未签署';
2025-08-13 00:05:08 +08:00
this.bottomList[2].value = this.obj.time;
2025-08-16 01:03:25 +08:00
this.getfileUrls();
2025-08-28 17:17:42 +08:00
} else {
2025-08-13 00:05:08 +08:00
this.$refs.uToastRef.show({
type: 'error',
message: res.msg,
});
}
})
},
2025-08-28 17:17:42 +08:00
onOpen() {
// #ifdef APP-PLUS
uni.downloadFile({
url: this.url,
success: (res) => {
if (res.statusCode === 200) {
uni.saveFile({
tempFilePath: res.tempFilePath,
success: (res) => {
uni.openDocument({
filePath: res.savedFilePath,
success: (res) => {
console.log('打开文档成功')
}
})
}
})
}
}
})
// #endif
// #ifdef H5
window.open(this.url, '_blank')
// #endif
},
2025-08-13 00:05:08 +08:00
}
}
</script>
<style lang="scss" scoped>
2025-08-28 17:17:42 +08:00
.contract-view {
width: 100%;
height: calc(100% - 88rpx - var(--status-bar-height));
2025-08-13 00:05:08 +08:00
display: flex;
flex-direction: column;
overflow-y: auto;
// padding: 0 32rpx;
box-sizing: border-box;
position: relative;
2025-08-28 17:17:42 +08:00
.bottom-btn {
width: 100%;
2025-08-13 00:05:08 +08:00
display: flex;
position: absolute;
2025-08-28 17:17:42 +08:00
bottom: 80rpx;
2025-08-13 00:05:08 +08:00
flex-direction: row;
justify-content: center;
2025-08-28 17:17:42 +08:00
.left-btn {
width: 48%;
2025-08-13 00:05:08 +08:00
background: #E4D6FD;
border-radius: 8rpx;
}
2025-08-28 17:17:42 +08:00
.right-btn {
width: calc(100% - 60rpx);
height: 88rpx;
background: linear-gradient(270deg, #B164FB 0%, #7934F6 100%);
2025-08-13 00:05:08 +08:00
border-radius: 8rpx;
}
}
2025-08-28 17:17:42 +08:00
.bottom {
2025-08-13 00:05:08 +08:00
display: flex;
padding: 40rpx 46rpx;
box-sizing: border-box;
flex-direction: column;
justify-content: space-between;
2025-08-28 17:17:42 +08:00
margin-top: 24rpx;
2025-08-13 00:05:08 +08:00
background-color: #fff;
2025-08-28 17:17:42 +08:00
width: 100%;
min-height: 216rpx;
2025-08-13 00:05:08 +08:00
}
2025-08-28 17:17:42 +08:00
.top-info {
width: 100%;
min-height: 440rpx;
2025-08-13 00:05:08 +08:00
padding: 68rpx 32rpx 64rpx;
box-sizing: border-box;
background-color: #fff;
2025-08-28 17:17:42 +08:00
.right-view {
height: 100%;
flex: 1;
2025-08-13 00:05:08 +08:00
flex-direction: column;
display: flex;
2025-08-28 17:17:42 +08:00
margin-left: 46rpx;
.bottom-panel {
width: 100%;
flex: 1;
2025-08-13 00:05:08 +08:00
display: flex;
flex-direction: column;
2025-08-28 17:17:42 +08:00
.list-right {
2025-08-31 23:59:51 +08:00
width: 255rpx;
margin-left: 25rpx;
2025-08-28 17:17:42 +08:00
word-break: break-all;
2025-08-13 00:05:08 +08:00
display: flex;
}
}
}
2025-08-28 17:17:42 +08:00
image {
width: 200rpx;
height: 260rpx;
2025-08-13 00:05:08 +08:00
}
2025-08-28 17:17:42 +08:00
2025-08-13 00:05:08 +08:00
}
}
</style>