20261008
This commit is contained in:
@@ -0,0 +1,470 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<u-sticky offset-top="0" customNavHeight="0">
|
||||
<uititle title="出证申请"></uititle>
|
||||
</u-sticky>
|
||||
<view class="w-100p">
|
||||
<view class="certificate-container bg-white p-20">
|
||||
<!-- 申请表格 -->
|
||||
<u-parse :content="content"></u-parse>
|
||||
|
||||
<!-- 出证样板选择 -->
|
||||
<view class="form-item mb-20">
|
||||
<view class="form-label">出证样板查看</view>
|
||||
</view>
|
||||
|
||||
<!-- 出证方式 -->
|
||||
<view class="form-item mb-20">
|
||||
<view class="form-label">出证方式</view>
|
||||
<view class="form-content">
|
||||
<el-radio v-model="form.certificateType" label="normal">(正常)出证时效({{ amount }}元/份)</el-radio>
|
||||
<el-radio v-model="form.certificateType" label="urgent">(加急)出证时效({{
|
||||
urgentAmount
|
||||
}}元/份)
|
||||
</el-radio>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 发票类型 -->
|
||||
<view class="form-item mb-20">
|
||||
<view class="form-label">发票类型</view>
|
||||
<view class="form-content">
|
||||
<el-radio v-model="form.invoiceTypes" label="none">无需开具发票</el-radio>
|
||||
<el-radio v-model="form.invoiceTypes" label="electronic">增值税专用发票(电子发票)</el-radio>
|
||||
<el-radio v-model="form.invoiceTypes" label="normal">普票(电子发票)</el-radio>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 发票抬头 -->
|
||||
<template v-if="form.invoiceTypes !== 'none'">
|
||||
<view class="form-item mb-20">
|
||||
<view class="form-label">发票抬头</view>
|
||||
<view class="form-content">
|
||||
<el-form :model="form.invoice" label-width="100px">
|
||||
<el-form-item label="名称:" required>
|
||||
<el-input v-model="form.invoice.companyName" placeholder="请输入企业名称或个人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="税号/证号:" required>
|
||||
<el-input v-model="form.invoice.taxNumber" placeholder="请输入税号或身份证号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="开户行:">
|
||||
<el-input v-model="form.invoice.bankName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="开户账号:">
|
||||
<el-input v-model="form.invoice.bankAccount"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话:" required>
|
||||
<el-input v-model="form.invoice.phone"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 电子发票接收信息 -->
|
||||
<!-- <view class="form-item mb-20">-->
|
||||
<!-- <view class="form-label">电子发票接收信息</view>-->
|
||||
<!-- <view class="form-content">-->
|
||||
<!-- <el-form :model="form.electronicInvoice" label-width="100px">-->
|
||||
<!-- <el-form-item label="收票人:" required>-->
|
||||
<!-- <el-input v-model="form.electronicInvoice.receiver"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="手机号码:" required>-->
|
||||
<!-- <el-input v-model="form.electronicInvoice.phone"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="邮箱:" required>-->
|
||||
<!-- <el-input v-model="form.electronicInvoice.email"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
</template>
|
||||
<!-- 出证交付方式 -->
|
||||
<view class="form-item mb-20">
|
||||
<view class="form-label">出证交付方式</view>
|
||||
<view class="form-content pos-r">
|
||||
<el-checkbox v-model="form.deliveryMethods.electronic" @change="selectEle">电子</el-checkbox>
|
||||
<!-- <el-form v-if="form.deliveryMethods.electronic" :model="form.electronicDelivery" label-width="100px">-->
|
||||
<!-- <el-form-item label="收件人姓名:">-->
|
||||
<!-- <el-input v-model="form.electronicDelivery.receiver"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="手机号码:">-->
|
||||
<!-- <el-input v-model="form.electronicDelivery.phone"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="收件邮箱:">-->
|
||||
<!-- <el-input v-model="form.electronicDelivery.email"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
|
||||
<el-checkbox v-model="form.deliveryMethods.paper" @change="selectPaper">纸质邮寄</el-checkbox>
|
||||
<el-form v-if="form.deliveryMethods.paper" :model="form.paperDelivery" label-width="100px">
|
||||
<el-form-item label="收件人姓名:">
|
||||
<el-input v-model="form.paperDelivery.receiver"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码:">
|
||||
<el-input v-model="form.paperDelivery.phone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="收件地址:">
|
||||
<el-input v-model="form.paperDelivery.address"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 支付方式 -->
|
||||
<view class="form-item mb-20">
|
||||
<view class="form-label">支付方式</view>
|
||||
<view class="form-content">
|
||||
<el-radio v-model="form.paymentMethod" label="advance">公对公支付</el-radio>
|
||||
<el-radio v-model="form.paymentMethod" label="online">在线支付</el-radio>
|
||||
<template v-if="form.paymentMethod === 'advance'">
|
||||
<u-upload
|
||||
:fileList="payVoucher"
|
||||
@afterRead="afterRead($event, 'payVoucher')"
|
||||
@delete="deletePic($event, 'payVoucher')"
|
||||
:maxCount="1"
|
||||
width="120rpx"
|
||||
height="120rpx"
|
||||
></u-upload>
|
||||
<p>上传付款凭证</p>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="form.paymentMethod === 'advance'" v-html="bankAccount"></view>
|
||||
<!-- 提交按钮 -->
|
||||
<view class="text-center mb-20">
|
||||
<el-button type="primary" @click="submitForm" v-if="form.paymentMethod === 'online'">提交支付</el-button>
|
||||
<el-button type="primary" @click="uploadSuccess" v-else>提交支付</el-button>
|
||||
</view>
|
||||
|
||||
<!-- 客服电话 -->
|
||||
<view class="text-center">
|
||||
<view class="service-phone">客服电话:400 686 5559</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uititle from "@/components/common/title.vue";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
export default {
|
||||
components: {uititle},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sampleSelected: false,
|
||||
certificateType: 'normal',
|
||||
lawPrice: '100',
|
||||
agreementPrice: '150',
|
||||
invoiceTypes: 'none',
|
||||
invoice: {
|
||||
companyName: '',
|
||||
taxNumber: '',
|
||||
bankName: '',
|
||||
bankAccount: '',
|
||||
phone: ''
|
||||
},
|
||||
electronicInvoice: {
|
||||
receiver: '',
|
||||
phone: '',
|
||||
email: ''
|
||||
},
|
||||
deliveryMethods: {
|
||||
electronic: true,
|
||||
paper: false
|
||||
},
|
||||
electronicDelivery: {
|
||||
receiver: '',
|
||||
phone: '',
|
||||
email: ''
|
||||
},
|
||||
paperDelivery: {
|
||||
receiver: '',
|
||||
phone: '',
|
||||
address: ''
|
||||
},
|
||||
paymentMethod: 'online',
|
||||
payVoucher: '',
|
||||
paidConfirm: false,
|
||||
hasReport: false,
|
||||
},
|
||||
contractId: null,
|
||||
transactionId: null,
|
||||
amount: null,
|
||||
urgentAmount: null,
|
||||
content: null,
|
||||
bankAccount: null,
|
||||
payVoucher: []
|
||||
}
|
||||
},
|
||||
onLoad({contractId, transactionId,}) {
|
||||
this.contractId = contractId;
|
||||
this.transactionId = transactionId;
|
||||
this.getContent()
|
||||
this.getAmount()
|
||||
this.getUrgentAmount()
|
||||
this.getUserInfo()
|
||||
this.getBankAccount()
|
||||
},
|
||||
methods: {
|
||||
async getUserInfo(){
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
this.form.invoice.companyName = userInfo.accountType === 2 ? userInfo.company.companyName : userInfo.person.personName
|
||||
this.form.invoice.taxNumber = userInfo.accountType === 2 ? userInfo.company.organization : userInfo.person.idCard
|
||||
this.form.invoice.phone = userInfo.accountType === 2 ? userInfo.company.mobile : userInfo.person.mobile
|
||||
},
|
||||
async getContent() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'e647148e684a458a0295b0a239c3d539'
|
||||
},
|
||||
})
|
||||
this.content = res.content
|
||||
},
|
||||
async getAmount() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'd77d384f684a47b6029a135220ecf4c9'
|
||||
},
|
||||
})
|
||||
this.amount = res.content
|
||||
},
|
||||
async getUrgentAmount() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '8524406c684a47c402985cb55941b3cb'
|
||||
},
|
||||
})
|
||||
this.urgentAmount = res.content
|
||||
},
|
||||
afterRead({file}, field) {
|
||||
uniCloud.uploadFile({
|
||||
filePath: file.url,
|
||||
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + file.name,
|
||||
success: ({fileID}) => {
|
||||
uniCloud.getTempFileURL({
|
||||
fileList: [fileID]
|
||||
}).then(res => {
|
||||
this.payVoucher = [{url: res.fileList[0].tempFileURL}]
|
||||
this.form.payVoucher = res.fileList[0].tempFileURL;
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
deletePic({index}, field) {
|
||||
this[field] = []
|
||||
this.form.payVoucher = null
|
||||
},
|
||||
uploadSuccess() {
|
||||
if (!this.form.payVoucher) return vk.toast('请上传付款凭证');
|
||||
this.submitForm()
|
||||
},
|
||||
submitForm() {
|
||||
// 表单验证
|
||||
if (!this.validateForm()) {
|
||||
return;
|
||||
}
|
||||
if (this.form.certificateType === 'normal') {
|
||||
this.form.amount = this.amount;
|
||||
} else {
|
||||
this.form.amount = this.urgentAmount;
|
||||
}
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: `司法调证服务需向数据中心付费(${this.form.amount}元/次),是否继续?`,
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
this.form.contractId = this.contractId;
|
||||
this.form.contractNo = this.transactionId;
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/certificateAdd',
|
||||
title: '提交中...',
|
||||
data: this.form,
|
||||
success: async (res) => {
|
||||
this.$message({
|
||||
message: '申请提交成功',
|
||||
type: 'success'
|
||||
});
|
||||
if (this.form.paymentMethod === 'online') {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/contract/kh/buy',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
contractId: this.contractId,
|
||||
contractNo: this.transactionId,
|
||||
amount: this.form.amount
|
||||
},
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/shop/pay?id=${data}`
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
message: '请等待后台审核',
|
||||
type: 'success'
|
||||
});
|
||||
setTimeout(() => {
|
||||
|
||||
vk.navigateTo({
|
||||
url: `/pages/public/sign?tab=signBuyLog`
|
||||
})
|
||||
}, 1500)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
validateForm() {
|
||||
// 验证必填项
|
||||
// if (this.form.deliveryMethods.electronic) {
|
||||
// if (!this.form.electronicDelivery.receiver) {
|
||||
// this.$message.error('请填写电子发送邮箱的收件人姓名');
|
||||
// return false;
|
||||
// }
|
||||
// if (!this.form.electronicDelivery.phone) {
|
||||
// this.$message.error('请填写电子发送邮箱的手机号码');
|
||||
// return false;
|
||||
// }
|
||||
// if (!this.form.electronicDelivery.email) {
|
||||
// this.$message.error('请填写电子发送邮箱的收件邮箱');
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
|
||||
if (this.form.deliveryMethods.paper) {
|
||||
if (!this.form.paperDelivery.receiver) {
|
||||
this.$message.error('请填写纸质邮寄的收件人姓名');
|
||||
return false;
|
||||
}
|
||||
if (!this.form.paperDelivery.phone) {
|
||||
this.$message.error('请填写纸质邮寄的手机号码');
|
||||
return false;
|
||||
}
|
||||
if (!this.form.paperDelivery.address) {
|
||||
this.$message.error('请填写纸质邮寄的收件地址');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
async getBankAccount() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'b5ad93e068f343230344c7b63cb1aac5'
|
||||
},
|
||||
})
|
||||
this.bankAccount = res.content
|
||||
},
|
||||
selectEle(e) {
|
||||
if (e) {
|
||||
this.form.deliveryMethods.electronic = true;
|
||||
this.form.deliveryMethods.paper = false;
|
||||
} else {
|
||||
this.form.deliveryMethods.electronic = false;
|
||||
this.form.deliveryMethods.paper = true;
|
||||
}
|
||||
},
|
||||
selectPaper(e) {
|
||||
if (!e) {
|
||||
this.form.deliveryMethods.electronic = true;
|
||||
this.form.deliveryMethods.paper = false;
|
||||
} else {
|
||||
this.form.deliveryMethods.electronic = false;
|
||||
this.form.deliveryMethods.paper = true;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.w-1200 {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.certificate-container {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.certificate-table {
|
||||
width: 100%;
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
|
||||
th, td {
|
||||
border: 1px solid #dcdfe6;
|
||||
padding: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.notice {
|
||||
border: 1px solid #dcdfe6;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
|
||||
.notice-title {
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.notice-item {
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
color: #606266;
|
||||
}
|
||||
}
|
||||
|
||||
.form-item {
|
||||
margin-bottom: 20px;
|
||||
|
||||
.form-label {
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.form-content {
|
||||
padding: 0 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.w-100 {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.required /deep/ .el-form-item__label:before {
|
||||
content: '*';
|
||||
color: #f56c6c;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.service-phone {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,680 @@
|
||||
<template> <!-- 合同管理 -->
|
||||
<view class="wrap">
|
||||
<!-- 吸顶 -->
|
||||
<u-sticky offset-top="0" customNavHeight="0">
|
||||
<!-- 顶部 -->
|
||||
<uititle title="合同管理"></uititle>
|
||||
<!-- 选项卡 -->
|
||||
<view class="layout layout-tab flex justify-between align-center">
|
||||
<view :class="['tab', {active: tabIndex == 0}]" @click="handTab(0)">待创建</view>
|
||||
<view :class="['tab', {active: tabIndex == 1}]" @click="handTab(1)">待签署</view>
|
||||
<view :class="['tab', {active: tabIndex == 2}]" @click="handTab(2)">已完成</view>
|
||||
<!-- <view :class="['tab', {active: tabIndex == 3}]" @click="handTab(3)">已作废</view>-->
|
||||
</view>
|
||||
<u-subsection :list="signTypeList" :current="subsection" keyName="label" active-color="#A92924"
|
||||
@change="changeSubsection"/>
|
||||
</u-sticky>
|
||||
<view>
|
||||
<u-subsection :list="signTypeFilterList" :current="signTypeFilter" keyName="label" active-color="#A92924"
|
||||
@change="changeSignTypeFilter" v-if="tabIndex == 2"/>
|
||||
<u-search bg-color="#FFFFFF" v-model="keyword" placeholder="输入签约方关键字搜索" @blur="query(1)" @custom="query(1)"></u-search>
|
||||
</view>
|
||||
<view class="layout layout-contract">
|
||||
<view class="item" v-for="(item, index) in tableData.rows" :key="index">
|
||||
<view class="title text-single m-right-20">
|
||||
<text v-if="item.contract.status > 0">{{ item.contract.docTitle }}</text>
|
||||
<text v-else-if="item.contract.status === 0 && item.sheet">{{ item.sheet.title }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start align-center mt-15">
|
||||
<template v-if="item.sheet">
|
||||
<view class="mr-10">
|
||||
<u-tag plain text="自主交易" size="mini" v-if="item.sheet.tradeMethod === 0" type="primary"
|
||||
>
|
||||
</u-tag>
|
||||
<u-tag plain text="金久信公证" size="mini"
|
||||
v-if="item.sheet.tradeMethod === 1 && item.contract.type !== 'sign'"
|
||||
type="success">
|
||||
</u-tag>
|
||||
</view>
|
||||
<view class="mr-10">
|
||||
<u-tag plain text="标准合同" size="mini" effect="plain" v-if="item.sheet.signMethod === 0"
|
||||
type="success">
|
||||
</u-tag>
|
||||
<u-tag plain text="双方协商合同" size="mini" effect="plain"
|
||||
v-if="item.sheet.signMethod === 2"
|
||||
type="primary">
|
||||
</u-tag>
|
||||
<u-tag plain text="线下合同" size="mini" effect="plain" v-if="item.sheet.signMethod === 1"
|
||||
type="warning">
|
||||
</u-tag>
|
||||
</view>
|
||||
</template>
|
||||
<u-tag plain text="金久信公证" size="mini"
|
||||
v-if="item.contract.tradeMethod === 1 && item.contract.type === 'sign'" class="mr-10"
|
||||
type="success">
|
||||
</u-tag>
|
||||
<u-tag type="primary" v-if="item.contract.type === 'enquiry'" text="询价单" size="mini"
|
||||
class="mr-10"/>
|
||||
<u-tag type="success" v-else-if="item.contract.type === 'process'" text="加工单" size="mini"
|
||||
class="mr-10"/>
|
||||
<u-tag type="success" v-else-if="item.contract.type === 'sign'" text="金久信签约宝" size="mini"
|
||||
class="mr-10"/>
|
||||
<u-tag type="primary" v-else-if="item.contract.type === 'old'" text="旧货交易" size="mini"
|
||||
class="mr-10"/>
|
||||
<u-tag type="errpr" v-else-if="item.contract.type === 'self-support'" text="自营询价" size="mini"
|
||||
class="mr-10"/>
|
||||
|
||||
<view v-if="item.contract.status === 1" class="flex justify-start items-center flex-wrap">
|
||||
<view class="justify-start items-center flex-wrap"
|
||||
v-for="(party, pIndex) in item.contract.partyList" :key="pIndex">
|
||||
<u-tag size="mini" class="mr-10 ml-10"
|
||||
v-if="party.userId !== userInfo._id && !party.sign && party.role !== 'third'" plain
|
||||
type="error" text="待交易方签署"/>
|
||||
<u-tag size="mini" class="mr-10 ml-10"
|
||||
v-if="party.userId !== userInfo._id && !party.sign && party.role === 'third'" plain
|
||||
type="error" text="待第三方签署"/>
|
||||
<u-tag size="mini" class="mr-10 ml-10" v-if="party.userId === userInfo._id && !party.sign"
|
||||
plain
|
||||
type="primary" text="待我签署"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="item.order" class="text-main text-25">
|
||||
(订单状态:{{
|
||||
item.order.orderStatus === 4 ? '已完成' : ([5, 6].includes(item.order.orderStatus) ? '订单终止' : '执行中')
|
||||
}})
|
||||
</view>
|
||||
<!-- <view class="flex-1"></view>-->
|
||||
<!-- <view class="date">2023-04-27到期,过期将无法签署</view>-->
|
||||
</view>
|
||||
<view class="sm m-top-20 flex flex-col justify-start items-start">
|
||||
<text class="m-right-20">合同编码:{{ item.contract.transactionId }}</text>
|
||||
<text class="m-right-20" v-if="item.sheet && item.contract.type !== 'old'">交易编码:{{
|
||||
item.contract.type === 'enquiry' ? item.sheet.enquiryNo : item.sheet.orderNo
|
||||
}}
|
||||
</text>
|
||||
<text class="m-right-20">创建时间:{{ item.contract._add_time_str }}</text>
|
||||
<template v-if="parseInt(item.contract.status) > 0">
|
||||
<text v-for="(party, partyIndex) in item.contract.partyList " :key="partyIndex">
|
||||
<template v-if="party.role !== 'third'">
|
||||
<template v-if="party.userId === item.contract.userId">
|
||||
发起方签订完成时间:{{
|
||||
party.signedAt ? dayjs(party.signedAt).format('YYYY-MM-DD HH:mm:ss') : ''
|
||||
}}
|
||||
</template>
|
||||
<template v-if="party.userId !== item.contract.userId">
|
||||
接收方签订完成时间:{{
|
||||
party.signedAt ? dayjs(party.signedAt).format('YYYY-MM-DD HH:mm:ss') : ''
|
||||
}}
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="party.role === 'third'">
|
||||
第三方签订完成时间:{{
|
||||
party.signedAt ? dayjs(party.signedAt).format('YYYY-MM-DD HH:mm:ss') : ''
|
||||
}}
|
||||
</template>
|
||||
</text>
|
||||
</template>
|
||||
|
||||
<view v-if="item.contract.signEndDate">
|
||||
<text>签订截止时间:{{
|
||||
dayjs(item.contract.signEndDate).format('YYYY-MM-DD HH:mm:ss')
|
||||
}}</text>
|
||||
<text class="text-red ml-20" v-if="item.contract.signCount === 0">{{ dayjs(item.contract.signEndDate).isBefore(dayjs()) ? '已超时限' : '' }}</text>
|
||||
</view>
|
||||
<view v-if="item.contract.type === 'sign' && item.contract.payUser && item.contract.payUser.user">
|
||||
费用承担方:{{
|
||||
item.contract.payUser.user.accountType === 2 ?
|
||||
item.contract.payUser.user.company.companyName : item.contract.payUser.user.person.personName
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start align-center m-top-20">
|
||||
<view class="op flex justify-start align-center m-right-30" @click="showParty(item)">
|
||||
<u-icon name="chat" color="#A92924" size="18"></u-icon>
|
||||
<text class="op-text m-left-10">查看交易方</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-20 flex justify-start align-center">
|
||||
<view class="op flex justify-start align-center"
|
||||
v-if="item.contract.status === 0 && item.contract.userId === userInfo._id"
|
||||
@click="createContract(item.contract)">
|
||||
<u-icon name="plus-circle" color="#A92924" size="18"></u-icon>
|
||||
<text class="op-text m-left-10">创建合同</text>
|
||||
</view>
|
||||
<view class="mr-10">
|
||||
<u-button @click.native="changeContract(item.contract)" custom-style="padding: 0"
|
||||
v-if="((item.sheet && item.sheet.signMethod === 2) || item.contract.type === 'sign' || item.contract.type === 'self-support')
|
||||
&& item.contract.status === 1
|
||||
&& item.contract.userId === userInfo._id && item.contract.signCount === 0"
|
||||
size="mini" type="primary">修改合同内容
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="ml-10">
|
||||
<u-button custom-style="padding: 0" v-if="item.contract.userId === userInfo._id"
|
||||
@click="delContract(item.contract)" size="mini" type="text">
|
||||
删除合同
|
||||
</u-button>
|
||||
</view>
|
||||
<template v-if="parseInt(item.contract.status) === 1 && dayjs(item.contract.signEndDate).isAfter(dayjs())">
|
||||
<view class="ml-10">
|
||||
<u-button @click="extSign(item.sign, item.contract)" size="mini" type="primary"
|
||||
:disabled="item.sign">
|
||||
{{ item.sign ? '已签署' : '签署文件' }}
|
||||
</u-button>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="parseInt(item.contract.status) === 2">
|
||||
<view class="ml-10">
|
||||
<u-button custom-style="padding: 0"
|
||||
@click="viewContract(item.contract)"
|
||||
size="mini" plain>
|
||||
{{ parseInt(item.contract.signType) === 1 ? '查看单据' : '查看合同' }}
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="ml-10">
|
||||
<u-button custom-style="padding: 0" @click="downloadContract(item.contract.transactionId)" type="success"
|
||||
size="mini" plain>
|
||||
{{ parseInt(item.contract.signType) === 1 ? '下载单据' : '下载合同' }}
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="ml-10">
|
||||
<u-button @click="payDownloadContract(item.contract)" type="primary" custom-style="padding: 0"
|
||||
size="mini" plain>
|
||||
{{
|
||||
parseInt(item.contract.signType) === 1 ? '下载单据(付费司法调证)' : '下载合同(付费司法调证)'
|
||||
}}
|
||||
</u-button>
|
||||
</view>
|
||||
</template>
|
||||
<view class="ml-10">
|
||||
<u-button custom-style="padding: 0"
|
||||
v-if="item.order && parseInt(item.contract.status) === 2 && ((item.sheet && item.sheet.tradeMethod === 1) || item.contract.tradeMethod === 1)"
|
||||
@click="$jump(`/pages/shop/order?menuIndex=${item.role === 'buyer' ? 1 : 0}&keyword=${item.order.orderNo}`)"
|
||||
size="mini"
|
||||
:type="(item.order && item.order.orderStatus > 4) ? 'info' :'success'">
|
||||
{{
|
||||
(item.order && item.order.orderStatus === 4) ? '订单已结束' : ([5, 6].includes(item.order.orderStatus) ? '订单已终止' : (item.role === 'buyer' ? '去付款' : '去请款'))
|
||||
}}
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="ml-10">
|
||||
<u-button custom-style="padding: 0"
|
||||
v-if="item.contract.otherFile && item.contract.otherFile.length > 0"
|
||||
@click="openDownload(item.contract.otherFile)" plain
|
||||
size="mini"
|
||||
type="info">查看附件
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 没有数据 u-empty是框架组件 cmempty是自己封装组件 -->
|
||||
<u-empty mode="list" text="暂无更多内容~"></u-empty>
|
||||
<!-- <cmempty></cmempty> -->
|
||||
<u-popup :show="show" mode="center" @close="show = false" closeable close-on-click-overlay
|
||||
:custom-style="{width: '90%'}">
|
||||
<view class="p-30">
|
||||
<view class="mb-10">名称:{{ title }}</view>
|
||||
<view class="mb-10">联系人:{{ name }}</view>
|
||||
<view class="mb-10">联系方式:{{ companyMobile }}</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<contact-modal ref="contactModal"/>
|
||||
<u-modal :show="showPartyModal" title="交易方" @confirm="showPartyModal = false">
|
||||
<u-parse :content="partyContent"></u-parse>
|
||||
</u-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uititle from '@/components/common/title'
|
||||
import cmsearch from '@/components/common/search'
|
||||
import cmempty from '@/components/common/empty'
|
||||
import dayjs from "dayjs";
|
||||
import ContactModal from "@/components/ContactModal.vue";
|
||||
import {Loading} from "element-ui";
|
||||
|
||||
const SIGN_CONFIRM_CONTENT = `1、您确认,若全体各签约方未完成全部签约流程,本签约文件不发生法律效力,系统无法对该签约文件予以保存及提供司法调证服务;
|
||||
2、您确认,当前签约的实名主体名称、手机号码与注册认证阶段提交的信息未发生变更;若发生变更,必须及时进行重新认证后方可继续签约,避免产生严重法律风险与经济损失;
|
||||
3、您确认,本次签约为本系统实名认证主体操作,如若不是实名认证主体操作,授权委托人需本系统进行授权认证后签约;
|
||||
4、您确认,您与其他签约方均系在平等、自愿的基础上完成本次签约;
|
||||
5、你确认,此次签约内容符合《中华人民共和国电子签名法》《民法典》生效保护范畴;
|
||||
6、如因法律法规、监管部门政策更新等原因,系统提示您重新进行实名认证、证书续期等重要提示时,请您必须在签约前完成,否则造成任何损失,平台不承担任何责任;以上签约条件您均已经知悉并确认,否则您有权拒绝本次签约。`
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ContactModal,
|
||||
uititle,
|
||||
cmsearch,
|
||||
cmempty,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabIndex: 0,
|
||||
tableData: {},
|
||||
userInfo: null,
|
||||
show: false,
|
||||
title: '',
|
||||
name: '',
|
||||
companyMobile: '',
|
||||
signTypeList: [
|
||||
{
|
||||
tradeMethod: null,
|
||||
type: null,
|
||||
label: '全部'
|
||||
},
|
||||
{
|
||||
tradeMethod: 0,
|
||||
type: null,
|
||||
label: '自主交易'
|
||||
},
|
||||
{
|
||||
tradeMethod: 1,
|
||||
type: null,
|
||||
label: '金久信公正'
|
||||
},
|
||||
{
|
||||
tradeMethod: null,
|
||||
type: 'sign',
|
||||
label: '金久信签约宝'
|
||||
},
|
||||
],
|
||||
subsection: 0,
|
||||
signTypeFilterList: [
|
||||
{
|
||||
value: '2',
|
||||
label: '合同签约'
|
||||
},
|
||||
{
|
||||
value: '1',
|
||||
label: '单据签约'
|
||||
},
|
||||
],
|
||||
signTypeFilter: 0,
|
||||
keyword: '',
|
||||
numToChForThird: ['三', '四', '五', '六', '七', '八', '九', '十'],
|
||||
showPartyModal: false,
|
||||
partyContent: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dayjs,
|
||||
handTab(index) {
|
||||
this.tabIndex = index
|
||||
this.query(1)
|
||||
},
|
||||
detailLink(val) {
|
||||
vk.navigateTo('/pages/public/create')
|
||||
},
|
||||
menuSelect(e) {
|
||||
this.menuIndex = String(e)
|
||||
this.formData.status = Number(e)
|
||||
this.isSign = false
|
||||
this.query(1)
|
||||
},
|
||||
selectSign() {
|
||||
this.isSign = true
|
||||
this.menuIndex = ''
|
||||
},
|
||||
changeSubsection(index) {
|
||||
this.subsection = index
|
||||
this.query(1)
|
||||
},
|
||||
changeSignTypeFilter(index) {
|
||||
this.signTypeFilter = index
|
||||
this.query(1)
|
||||
},
|
||||
async query(pageIndex) {
|
||||
this.tableData = await vk.callFunction({
|
||||
url: 'client/contract/kh/getList',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: 500,
|
||||
status: this.tabIndex,
|
||||
tradeMethod: this.signTypeList[this.subsection].tradeMethod,
|
||||
type: this.signTypeList[this.subsection].type,
|
||||
keyword: this.keyword,
|
||||
signType: this.signTypeFilter === 1 ? '1' : '2',
|
||||
},
|
||||
});
|
||||
this.$forceUpdate()
|
||||
},
|
||||
/**
|
||||
* 创建合同
|
||||
* @param contract
|
||||
*/
|
||||
createContract(contract) {
|
||||
// this.form1.contractId = contract._id
|
||||
this.$jump(`/pages/public/create?contractId=${contract._id}`)
|
||||
},
|
||||
async changeContract(contract) {
|
||||
this.$jump(`/pages/public/create?contractId=${contract._id}`)
|
||||
},
|
||||
onFormSuccess() {
|
||||
this.form1.props.show = false
|
||||
// this.form1.data.contractId = null
|
||||
// this.formData.status = 1
|
||||
// this.menuIndex = '1'
|
||||
// this.isSign = false
|
||||
// this.$refs.form2.resetForm()
|
||||
// this.$refs.form1.resetForm()
|
||||
// this.query(1)
|
||||
vk.redirectTo({url: '/pages/contract/index?tab=1'})
|
||||
},
|
||||
/**
|
||||
* 签署合同
|
||||
* @param sign
|
||||
* @param contract
|
||||
*/
|
||||
extSign(sign, contract) {
|
||||
if (sign) return
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: SIGN_CONFIRM_CONTENT,
|
||||
showCancel: false,
|
||||
confirmText: '知悉同意',
|
||||
success: (confirmRes) => {
|
||||
if (confirmRes.confirm) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/extSign',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
contractId: contract._id,
|
||||
isWap: true
|
||||
},
|
||||
success: (res) => {
|
||||
window.location.href = res.data
|
||||
// window.open(res.data)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
showStopSign(contract) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/extSign',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
contractId: contract._id
|
||||
},
|
||||
success: (res) => {
|
||||
// window.open(res.data)
|
||||
window.location.href = res.data
|
||||
}
|
||||
});
|
||||
},
|
||||
viewContract(contract) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/viewContract',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
contractId: contract._id
|
||||
},
|
||||
success: (res) => {
|
||||
window.location.href = res.data
|
||||
// window.open(res.data)
|
||||
this.query(1)
|
||||
}
|
||||
});
|
||||
},
|
||||
navTo(url) {
|
||||
vk.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
showParty(userContract) {
|
||||
// let content = ''
|
||||
// userContract.contract.partyList.forEach(party => {
|
||||
// // if (party.userId !== userContract.userId) partyUser = party.user
|
||||
// const partyUser = party.user
|
||||
// if (partyUser) {
|
||||
// const name = partyUser.nickname
|
||||
// let role = party.role === 'buyer' ? '购买方' : '销售方'
|
||||
// if (party.role === 'third') role = '第三方'
|
||||
// content += `<view class="flex flex-col justify-start items-start py-10 border-bottom">
|
||||
// <view>身份:${role}</view>
|
||||
// <view>联系人:${name}</view>
|
||||
// <view>联系方式:${partyUser.mobile}</view></view>`
|
||||
// }
|
||||
// })
|
||||
let content = ''
|
||||
const buyer = userContract.contract.partyList.find(item => item.role !== 'third' && userContract.contract.userId === item.userId)
|
||||
const seller = userContract.contract.partyList.find(item => item.role !== 'third' && userContract.contract.userId !== item.userId)
|
||||
const thirdList = userContract.contract.partyList.filter(item => item.role === 'third')
|
||||
content += `<div class="flex flex-col justify-start items-start py-10 border-bottom">
|
||||
<div>身份:发起方</div>
|
||||
<div>联系人:${buyer.user.nickname}</div>
|
||||
<div>联系方式:${buyer.user.mobile}</div></div>`
|
||||
content += `<div class="flex flex-col justify-start items-start py-10 border-bottom">
|
||||
<div>身份:接收方</div>
|
||||
<div>联系人:${seller.user.nickname}</div>
|
||||
<div>联系方式:${seller.user.mobile}</div></div>`
|
||||
thirdList.forEach((item, index) => {
|
||||
console.log(item)
|
||||
content += `<div class="flex flex-col justify-start items-start py-10 border-bottom">
|
||||
<div>身份:第${this.numToChForThird[index]}方</div>
|
||||
<div>联系人:${item.user.nickname}</div>
|
||||
<div>联系方式:${item.user.mobile}</div></div>`
|
||||
})
|
||||
// this.$confirm(content, '', {
|
||||
// cancelButtonText: '关闭',
|
||||
// showConfirmButton: false,
|
||||
// dangerouslyUseHTMLString: true
|
||||
// })
|
||||
this.partyContent = content
|
||||
this.showPartyModal = true
|
||||
},
|
||||
changeTradeMethod(tradeMethod) {
|
||||
this.formData.tradeMethod = tradeMethod
|
||||
this.formData.type = null
|
||||
this.query(1)
|
||||
},
|
||||
changeType(type) {
|
||||
this.formData.tradeMethod = null
|
||||
this.formData.type = type
|
||||
this.query(1)
|
||||
},
|
||||
openDownload(otherFile) {
|
||||
for (let file in otherFile) {
|
||||
// window.open(otherFile)
|
||||
window.location.href = otherFile
|
||||
}
|
||||
},
|
||||
async getCommonContractUrl() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '657d36befe975f63af1f24e7'
|
||||
},
|
||||
})
|
||||
this.contractTemplate = res.content
|
||||
},
|
||||
downloadContractTemplate() {
|
||||
// window.open(this.contractTemplate)
|
||||
window.location.href = this.contractTemplate
|
||||
},
|
||||
async delContract(contract) {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '请您确认文件无用或已经完成履约后再删除文件,删除后平台将无法为您提供相关数据,您将无法查询已经删除文件。请您谨慎操作。',
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
await vk.callFunction({
|
||||
url: 'client/contract/kh/del',
|
||||
data: {
|
||||
id: contract._id
|
||||
},
|
||||
success: (res) => {
|
||||
this.query(1)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async payDownloadContract(contract) {
|
||||
const amountRes = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'ded3e568662e5817000026633aad1e69'
|
||||
},
|
||||
})
|
||||
if (!contract.canDownloadUidList || !contract.canDownloadUidList.includes(this.userInfo.uid)) {
|
||||
if (contract.certificate && !contract.certificate.paidConfirm) {
|
||||
if (contract.certificate.paymentMethod === 'online') {
|
||||
return vk.navigateTo({
|
||||
url: `/pages/shop/pay?id=${contract.certificate.orderId}`
|
||||
})
|
||||
}else return vk.toast('请先等待后台确认支付')
|
||||
}
|
||||
vk.navigateTo({
|
||||
url: `/pages/public/certificate?contractId=${contract._id}&transactionId=${contract.transactionId}&amount=${amountRes.content}`
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '您提交申请后,平台将在两个工作日内向您提供合法生效文件,客服电话:400-686-5559',
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
if (contract.certificate) {
|
||||
if (contract.certificate.deliveryMethods.paper) {
|
||||
vk.toast('您的司法调证文件已发货,请注意查收')
|
||||
} else {
|
||||
if (contract.certificate.downloadUrl) window.open(contract.certificate.downloadUrl)
|
||||
else vk.toast('文件生成中,请耐心等待')
|
||||
}
|
||||
} else vk.toast('操作失败,请联系客服')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
async downloadContract(contract_id) {
|
||||
let loadingInstance1 = Loading.service({fullscreen: true, text: '加载中...'});
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/contract/pub/getDownload',
|
||||
data: {
|
||||
contract_id
|
||||
}
|
||||
});
|
||||
loadingInstance1.close()
|
||||
if (res) {
|
||||
// window.open(`https://textapi.fadada.com/api2/downLoadContract.api?app_id=502704×tamp=${res.data.timestamp}&v=2.0&msg_digest=${res.data.msg_digest}&contract_id=${contract_id}`)
|
||||
window.location.href = `https://textapi.fadada.com/api2/downLoadContract.api?app_id=502704×tamp=${res.data.timestamp}&v=2.0&msg_digest=${res.data.msg_digest}&contract_id=${contract_id}`
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.tab) this.tabIndex = parseInt(option.tab)
|
||||
this.userInfo = vk.getStorageSync('uni_id_user_info')
|
||||
this.query(1)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
/deep/ .u-tag--mini {
|
||||
padding: 0 1px !important;
|
||||
}
|
||||
|
||||
.layout-tab {
|
||||
height: 100rpx;
|
||||
padding: 0 30rpx;
|
||||
background: #f1f1f1;
|
||||
|
||||
.tab {
|
||||
margin: 0 20rpx;
|
||||
padding: 10rpx 0rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.active {
|
||||
position: relative;
|
||||
color: #A92924;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 9;
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background: #A92924;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.layout-contract {
|
||||
padding: 10rpx 30rpx;
|
||||
|
||||
.item {
|
||||
padding: 30rpx 0rpx;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.sm {
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.title {
|
||||
//max-width: 300rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #101010;
|
||||
}
|
||||
}
|
||||
|
||||
.tag {
|
||||
display: inline-block;
|
||||
padding: 0 10rpx;
|
||||
height: 36rpx;
|
||||
font-size: 22rpx;
|
||||
line-height: 36rpx;
|
||||
color: #A92924;
|
||||
text-align: center;
|
||||
background-color: rgba(169, 41, 36, 0.13);
|
||||
}
|
||||
|
||||
.date, .op-text {
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
.xiugai {
|
||||
width: 130rpx;
|
||||
height: 44rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 44rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
background: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.trade-method-item {
|
||||
cursor: pointer;
|
||||
font-size: 25rpx;
|
||||
margin-right: 15rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,470 @@
|
||||
<template> <!-- 创建合同 -->
|
||||
<view class="wrap">
|
||||
<!-- 吸顶 -->
|
||||
<u-sticky offset-top="0" customNavHeight="0">
|
||||
<uititle :title="isAdd ? '创建合同' : '修改合同'"></uititle>
|
||||
</u-sticky>
|
||||
<view class="layout layout-create">
|
||||
<view class="group flex align-center">
|
||||
<view class="label">
|
||||
<text>标题:</text>
|
||||
<text class="required">*</text>
|
||||
</view>
|
||||
<view class="flex-1 m-left-10">
|
||||
<u--input
|
||||
placeholder="请输入内容"
|
||||
border="bottom"
|
||||
v-model="formData.title"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view v-for="(item, index) in formData.thirdList" :key="index"
|
||||
class="flex justify-start items-start my-10 flex-col">
|
||||
<view class="text-left">第{{ ['三', '四', '五', '六', '七', '八', '九', '十'][index] }}方:</view>
|
||||
<view class="mt-10 w-100p">
|
||||
<el-input v-model="formData.thirdList[index].phone"
|
||||
:placeholder="`请输入第${['三', '四', '五', '六', '七', '八', '九', '十'][index]}方手机号`"/>
|
||||
</view>
|
||||
<view class="mt-10 w-100p flex justify-start items-center">
|
||||
<el-input v-model="formData.thirdList[index].signKeyword"
|
||||
:placeholder="`请输入第${['三', '四', '五', '六', '七', '八', '九', '十'][index]}方签章关键字`"/>
|
||||
<view class="flex justify-center items-center mt-10">
|
||||
<i class="el-icon-circle-plus text-main text-50 ml-35" @click="addThird"/>
|
||||
<i class="el-icon-remove text-50 ml-35" @click="removeThird(index)"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<p class="text-25 text-gray mt-20">如无第三方签约可忽略,签章关键字使用方法同下。</p>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="label">
|
||||
<text>签署截止日期:</text>
|
||||
<text class="required">*</text>
|
||||
</view>
|
||||
<view class="flex-1 m-left-10" @click="showDatePicker = true">
|
||||
<u--input
|
||||
style="pointer-events:none"
|
||||
placeholder="点击选择签署截止日期"
|
||||
border="surround"
|
||||
v-model="signEndDate"
|
||||
suffixIcon="calendar"
|
||||
suffixIconStyle="font-size: 26px;color: #909399"
|
||||
:customStyle="inputClass"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-24 text-gray mt-10">
|
||||
发起方填写签署截止日期和时间即为各签约方共同认可的签署时间,请酌情填写仔细阅读签署文件。
|
||||
</view>
|
||||
<view class="group flex flex-col justify-start items-start mt-20">
|
||||
<view class="label">签约发起方关键字:</view>
|
||||
<view class="w-100p">
|
||||
<u--input
|
||||
placeholder="发起方盖章关键字"
|
||||
v-model="formData.buyerSignKeyword"
|
||||
></u--input>
|
||||
</view>
|
||||
<view class="text-24 text-gray mt-10">
|
||||
请先在手机办公软件上(Office、WPS等)内,复制粘贴或输入预盖章部位关键字核验确认位置和内容,再点击上传文档核实无误后可返回签署页面输入测验关键字后进行签署(如同一关键字文档多次使用无误后可考虑省略检测流程)。系统将按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均会盖上指定用户的电子章,建议关键字在合同中保持唯一。
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex flex-col justify-start items-start mt-20">
|
||||
<view class="label">签约接收方关键字:</view>
|
||||
<view class="w-100p">
|
||||
<u--input
|
||||
placeholder="接收方盖章关键字"
|
||||
v-model="formData.sellerSignKeyword"
|
||||
></u--input>
|
||||
</view>
|
||||
<view class="text-24 text-gray mt-10">
|
||||
请先在手机办公软件上(Office、WPS等)内,复制粘贴或输入预盖章部位关键字核验确认位置和内容,再点击上传文档核实无误后可返回签署页面输入测验关键字后进行签署(如同一关键字文档多次使用无误后可考虑省略检测流程)。系统将按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均会盖上指定用户的电子章,建议关键字在合同中保持唯一。
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="label">签署文档:</view>
|
||||
</view>
|
||||
<view class="file-box m-top-30">
|
||||
<view class="file">
|
||||
<view class="justify-between flex" v-if="formData.contractFile">
|
||||
<view class="icon flex justify-start items-center text-25">
|
||||
<file-pdf-one theme="outline" class="pointer" size="40" fill="#f5a623"
|
||||
strokeLinecap="square" @click="previewDoc"/>
|
||||
<text class="ml-10" v-if="Array.isArray(formData.contractFile)">
|
||||
{{ formData.contractFile[formData.contractFile.length - 1].split('-').pop() }}
|
||||
</text>
|
||||
<text class="ml-10" v-else>{{ formData.contractFile.split('-').pop() }}</text>
|
||||
</view>
|
||||
<u-icon name="trash" size="26" @click="formData.contractFile = ''"></u-icon>
|
||||
</view>
|
||||
<view class="add" v-else @click="uploadContract">+上传合同</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-25 text-gray flex-1 mt-15">
|
||||
仅支持PDF文件,如有其他附件或多个单据签约请合并成一个PDF文档上传。且仅支持纵向文档上传,横向文档显示不完整。
|
||||
电子签署文件中需添加以下内容以增强双方约束力和文件法律效力:签约双方均自愿通过以“电子签约”形式进行签约,电子签名和加盖电子印章双方均予以认可具有法律效力。
|
||||
</view>
|
||||
<!-- <view class="group flex items-start m-top-30 w-100p">-->
|
||||
<!-- <view class="flex flex-col justify-start items-start flex-1">-->
|
||||
<!-- <view class="flex justify-starts">-->
|
||||
<!-- <view class="label">附件:</view>-->
|
||||
<!-- <view class="nmb">({{ formData.otherFile.length }})</view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="text-20 text-gray mt-10">仅支持PDF</view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="add" @click="addOtherFile">+添加附件</view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="file-box m-top-30" v-if="formData.otherFile.length > 0">-->
|
||||
<!-- <view class="file">-->
|
||||
<!-- <view class="item flex justify-between" v-for="(item, index) in formData.otherFile" :key="index">-->
|
||||
<!-- <view class="flex justify-start items-start">-->
|
||||
<!-- <view class="icon">-->
|
||||
<!-- <file-pdf-one theme="outline" class="pointer" size="40" fill="#f5a623"-->
|
||||
<!-- strokeLinecap="square"/>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="info flex-1 m-left-30">-->
|
||||
<!-- <view class="name">附件{{ index + 1 }}</view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <u-icon name="trash" size="26" @click="removeFile(index)"></u-icon>-->
|
||||
<!-- </view>-->
|
||||
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
<u-button class="public-btn" text="确定" @click="create"></u-button>
|
||||
<u-datetime-picker :show="showDatePicker" v-model="expireTime" mode="datetime"
|
||||
:minDate="minDate" @cancel="showDatePicker = false"
|
||||
@confirm="handConfirmDate"></u-datetime-picker>
|
||||
<el-dialog title="合同预览" :visible.sync="showPdf" width="90%" append-to-body>
|
||||
<view style="height: 1000rpx">
|
||||
<u-pdf :url="pdfUrl" v-if="pdfUrl" :showBottom="false" :show-timer="false" :disabled="false" viewHeight="800rpx"
|
||||
@onClickReader="closePdf"/>
|
||||
</view>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uititle from '@/components/common/title'
|
||||
import {FilePdfOne} from "@icon-park/vue";
|
||||
import dayjs from "dayjs";
|
||||
import md5 from 'js-md5';
|
||||
import uPdf from '@/components/u-pdf/u-pdf.vue'
|
||||
|
||||
const SIGN_CONFIRM_CONTENT = `1、您确认,若全体各签约方未完成全部签约流程,本签约文件不发生法律效力,系统无法对该签约文件予以保存及提供司法调证服务;
|
||||
2、您确认,当前签约的实名主体名称、手机号码与注册认证阶段提交的信息未发生变更;若发生变更,必须及时进行重新认证后方可继续签约,避免产生严重法律风险与经济损失;
|
||||
3、您确认,本次签约为本系统实名认证主体操作,如若不是实名认证主体操作,授权委托人需本系统进行授权认证后签约;
|
||||
4、您确认,您与其他签约方均系在平等、自愿的基础上完成本次签约;
|
||||
5、你确认,此次签约内容符合《中华人民共和国电子签名法》《民法典》生效保护范畴;
|
||||
6、如因法律法规、监管部门政策更新等原因,系统提示您重新进行实名认证、证书续期等重要提示时,请您必须在签约前完成,否则造成任何损失,平台不承担任何责任;以上签约条件您均已经知悉并确认,否则您有权拒绝本次签约。`
|
||||
|
||||
export default {
|
||||
components: {
|
||||
FilePdfOne,
|
||||
uititle,
|
||||
uPdf,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
inputClass: {
|
||||
// height: '20px',
|
||||
width: '200px',
|
||||
borderRadius: 0,
|
||||
},
|
||||
formData: {
|
||||
contractId: '',
|
||||
signEndDate: '',
|
||||
title: '',
|
||||
contractFile: '',
|
||||
buyerSignKeyword: '',
|
||||
sellerSignKeyword: '',
|
||||
otherFile: [],
|
||||
thirdList: [{phone: '', signKeyword: ''}],
|
||||
},
|
||||
showDatePicker: false,
|
||||
minDate: Number(new Date()),
|
||||
signEndDate: '',
|
||||
expireTime: '',
|
||||
isAdd: true,
|
||||
pdfUrl: '',
|
||||
showPdf: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handConfirmDate({value}) {
|
||||
this.signEndDate = dayjs(value).format('YYYY-MM-DD HH:mm:ss')
|
||||
this.formData.signEndDate = dayjs(value).toISOString()
|
||||
this.showDatePicker = false
|
||||
},
|
||||
uploadContract() {
|
||||
uni.chooseFile({
|
||||
count: 1,
|
||||
extension: ['.pdf'],
|
||||
success: ({tempFiles}) => {
|
||||
if ((new RegExp(/\s+/g).test(tempFiles[0].name))) {
|
||||
uni.showToast({
|
||||
title: '文件名不能有空格',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
const filename = tempFiles[0].name.split('.')[0]
|
||||
uniCloud.uploadFile({
|
||||
filePath: tempFiles[0].path,
|
||||
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(tempFiles[0].name + Math.random().toString()) + '-' + filename + '.pdf',
|
||||
success: ({fileID}) => {
|
||||
uniCloud.getTempFileURL({
|
||||
fileList: [fileID]
|
||||
}).then(res => {
|
||||
this.formData.contractFile = res.fileList[0].tempFileURL
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
addOtherFile() {
|
||||
uni.chooseFile({
|
||||
count: 9,
|
||||
extension: ['.pdf'],
|
||||
success: ({tempFiles}) => {
|
||||
tempFiles.forEach(file => {
|
||||
uniCloud.uploadFile({
|
||||
filePath: file.path,
|
||||
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + file.name,
|
||||
success: ({fileID}) => {
|
||||
uniCloud.getTempFileURL({
|
||||
fileList: [fileID]
|
||||
}).then(res => {
|
||||
this.formData.otherFile.push(res.fileList[0].tempFileURL)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
removeFile(index) {
|
||||
this.formData.otherFile.splice(index, 1)
|
||||
},
|
||||
async create() {
|
||||
if (!this.formData.title) return this.$message.error('标题不能为空')
|
||||
if (!this.formData.signEndDate) return this.$message.error('签署截止日期不能为空')
|
||||
if (!this.formData.buyerSignKeyword) return this.$message.error('签约发起方关键字不能为空')
|
||||
if (!this.formData.sellerSignKeyword) return this.$message.error('签约接收方关键字不能为空')
|
||||
if (!this.formData.contractFile) return this.$message.error('签署文档不能为空')
|
||||
this.formData.thirdList = this.formData.thirdList.filter(item => item.phone && item.signKeyword)
|
||||
if (this.formData.thirdList.length > 0) {
|
||||
for (let i = 0; i < this.formData.thirdList.length; i++) {
|
||||
const item = this.formData.thirdList[i]
|
||||
if (item.phone === '') {
|
||||
vk.toast('请填写手机号')
|
||||
return false
|
||||
}
|
||||
if (item.signKeyword === '') {
|
||||
vk.toast('请填写签章关键字')
|
||||
return false
|
||||
}
|
||||
if (item.phone === this.formData.phone) {
|
||||
vk.toast('第三方手机号不能与接收方手机号相同')
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
const thirdKeywords = []
|
||||
for (let i = 0; i < this.formData.thirdList.length; i++) {
|
||||
const item = this.formData.thirdList[i]
|
||||
if (item.phone && item.signKeyword) {
|
||||
thirdKeywords.push(item.signKeyword)
|
||||
}
|
||||
}
|
||||
uni.showLoading({title: '查验中'})
|
||||
vk.request({
|
||||
method: "POST",
|
||||
url: 'https://hcsc.gxwebsoft.com/api/read-pdf',
|
||||
header: {
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
},
|
||||
data: {
|
||||
file: this.formData.contractFile,
|
||||
buyerSignKeyword: this.formData.buyerSignKeyword,
|
||||
sellerSignKeyword: this.formData.sellerSignKeyword,
|
||||
thirdKeywords
|
||||
},
|
||||
success: async (pdfRes) => {
|
||||
|
||||
},
|
||||
fail: (pdfRes) => {
|
||||
uni.hideLoading()
|
||||
this.$message.error(pdfRes.content.msg)
|
||||
},
|
||||
complete: async (pdfRes) => {
|
||||
uni.hideLoading()
|
||||
if (pdfRes.code !== 200) this.$message.error(pdfRes.content.msg)
|
||||
else {
|
||||
uni.removeStorageSync(`signInfo`)
|
||||
uni.removeStorageSync(`fileName`)
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: SIGN_CONFIRM_CONTENT,
|
||||
showCancel: false,
|
||||
confirmText: '知悉同意',
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
await vk.callFunction({
|
||||
url: 'client/contract/kh/launch',
|
||||
title: '请求中...',
|
||||
data: this.formData,
|
||||
});
|
||||
vk.redirectTo({url: '/pages/public/contract?tab=1'})
|
||||
}
|
||||
}
|
||||
})
|
||||
// 此处统一使用 SIGN_CONFIRM_CONTENT
|
||||
// confirmButtonText: '知悉同意',
|
||||
// showCancelButton: false,
|
||||
// type: 'warning'
|
||||
// })
|
||||
//
|
||||
}
|
||||
console.log('complete:', pdfRes)
|
||||
|
||||
},
|
||||
})
|
||||
},
|
||||
addThird() {
|
||||
if (this.formData.thirdList.length < 8) this.formData.thirdList.push({
|
||||
phone: '',
|
||||
signKeyword: '',
|
||||
})
|
||||
},
|
||||
removeThird(index) {
|
||||
if (this.formData.thirdList.length === 1) return
|
||||
this.formData.thirdList.splice(index, 1)
|
||||
},
|
||||
previewDoc() {
|
||||
// uni.setStorageSync(`signInfo_${this.formData.contractId}`, JSON.stringify(this.formData))
|
||||
// uni.setStorageSync(`fileName`, this.fileName)
|
||||
// window.location.href = this.formData.contractFile
|
||||
if (Array.isArray(this.formData.contractFile)) {
|
||||
this.pdfUrl = this.formData.contractFile[0]
|
||||
} else
|
||||
this.pdfUrl = this.formData.contractFile
|
||||
this.showPdf = true
|
||||
},
|
||||
closePdf() {
|
||||
this.pdfUrl = ''
|
||||
this.showPdf = false
|
||||
}
|
||||
},
|
||||
async onLoad({contractId}) {
|
||||
this.formData.contractId = contractId
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/contract/kh/getDetail',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
contractId
|
||||
},
|
||||
});
|
||||
this.signEndDate = dayjs(data.signEndDate).format('YYYY-MM-DD HH:mm:ss')
|
||||
this.formData.signEndDate = data.signEndDate
|
||||
this.formData.title = data.docTitle
|
||||
if (Array.isArray(data.contractFile)) {
|
||||
this.formData.contractFile = data.contractFile[0]
|
||||
} else
|
||||
this.formData.contractFile = data.contractFile
|
||||
this.formData.buyerSignKeyword = data.buyerSignKeyword
|
||||
this.formData.sellerSignKeyword = data.sellerSignKeyword
|
||||
this.formData.otherFile = data.otherFile ?? []
|
||||
this.formData.thirdList = (data.thirdList && data.thirdList.length > 0) ? data.thirdList : [{
|
||||
phone: '',
|
||||
signKeyword: ''
|
||||
}]
|
||||
console.log(this.formData.thirdList)
|
||||
this.isAdd = data.status === 0
|
||||
},
|
||||
// onShow() {
|
||||
// if (uni.getStorageSync(`signInfo_${this.formData.contractId}`)) {
|
||||
// this.formData = JSON.parse(uni.getStorageSync(`signInfo_${this.formData.contractId}`))
|
||||
// if (this.formData.signEndDate) this.signEndDate = dayjs(this.formData.signEndDate).format('YYYY-MM-DD')
|
||||
// if (uni.getStorageSync('fileName')) this.fileName = uni.getStorageSync('fileName')
|
||||
// }
|
||||
// },
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.layout-create {
|
||||
padding: 20rpx 30rpx;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #101010;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nmb {
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
line-height: 40rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.add {
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
.file-box {
|
||||
padding: 20rpx 20rpx;
|
||||
border: 1px solid #f2f2f2;
|
||||
|
||||
.item {
|
||||
margin-top: 20rpx;
|
||||
padding: 10rpx 0;
|
||||
|
||||
.icon {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
}
|
||||
|
||||
.info {
|
||||
padding: 10rpx 0;
|
||||
border-bottom: 1px solid #f9f9f9;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.kb {
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.upload {
|
||||
margin: 20rpx 0 0;
|
||||
width: 200rpx;
|
||||
height: 60rpx;
|
||||
color: #A92924;
|
||||
background-color: rgba(169, 41, 36, 0.3);
|
||||
}
|
||||
|
||||
.public-btn {
|
||||
width: 80%;
|
||||
margin-top: 60rpx;
|
||||
color: #ffffff;
|
||||
background: #A92924;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,834 @@
|
||||
<template> <!-- 合同管理 -->
|
||||
<view class="wrap">
|
||||
<!-- 吸顶 -->
|
||||
<u-sticky offset-top="0" customNavHeight="0">
|
||||
<!-- 顶部 -->
|
||||
<uititle title="金久信签约宝"></uititle>
|
||||
</u-sticky>
|
||||
<view class="p-20">
|
||||
<common-swiper page="qyb"/>
|
||||
<view class="layout layout-publish m-top-20 bg-white p-20">
|
||||
<view class="pb-30">
|
||||
<text class="text-main">您剩余金久信签约宝次数: {{ userInfo.qybNum }}次</text>
|
||||
<view class="qyb-action-row flex justify-start items-center mt-20">
|
||||
<view class="qyb-buy-action">
|
||||
<u-button size="mini" type="primary" @click.native="dialogVisible = true"
|
||||
:custom-style="{padding: 0, width: '100%'}">立即购买</u-button>
|
||||
</view>
|
||||
<view class="qyb-log-action ml-25">
|
||||
<u-button size="mini" type="success" @click.native="openLog"
|
||||
:custom-style="{padding: 0, width: '100%'}">明细</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-main mt-10">温馨提示:尊敬的用户如果您的剩余金久信签约宝次数为0次,请先进行购买,再进行签约。</view>
|
||||
<view class="card m-20">
|
||||
<view class="flex justify-between items-center" @click="showSignIntro = !showSignIntro">
|
||||
<text>金久信签约宝简介</text>
|
||||
<u-icon name="arrow-down"></u-icon>
|
||||
</view>
|
||||
<view v-if="showSignIntro" class="py-15">
|
||||
<u-parse class="w-100p" :content="signIntro"></u-parse>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card m-20">
|
||||
<view class="flex justify-between items-center" @click="showSignFlow = !showSignFlow">
|
||||
<text>{{ signFlowTitle }}</text>
|
||||
<u-icon name="arrow-down"></u-icon>
|
||||
</view>
|
||||
<view v-if="showSignFlow" class="py-15">
|
||||
<u-parse class="w-100p" :content="signFlow"></u-parse>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card m-20">
|
||||
<view class="flex justify-between items-center" @click="showSignTips = !showSignTips">
|
||||
<text>金久信签约宝重要提示</text>
|
||||
<u-icon name="arrow-down"></u-icon>
|
||||
</view>
|
||||
<view v-if="showSignTips" class="py-15">
|
||||
<u-parse class="w-100p" :content="signTips"></u-parse>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start align-center m-top-30">
|
||||
<view class="lb need m-right-20">签约内容:</view>
|
||||
<u-radio-group
|
||||
v-model="formData.signType"
|
||||
placement="row"
|
||||
>
|
||||
<u-radio activeColor="#a92924" name='1' label="单据签约"
|
||||
:customStyle="{marginRight: '30px'}"></u-radio>
|
||||
<u-radio activeColor="#a92924" name='2' label="合同签约"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
|
||||
<!-- <view class="flex justify-start align-center m-top-30">-->
|
||||
<!-- <view class="lb need m-right-20">交易方式:</view>-->
|
||||
<!-- <u-radio-group-->
|
||||
<!-- v-model="formData.tradeMethod"-->
|
||||
<!-- placement="row"-->
|
||||
<!-- >-->
|
||||
<!-- <u-radio activeColor="#a92924" :name='0' label="自主交易"-->
|
||||
<!-- :customStyle="{marginRight: '30px'}"></u-radio>-->
|
||||
<!-- <u-radio activeColor="#a92924" :name='1' label="金久信公正"></u-radio>-->
|
||||
<!-- </u-radio-group>-->
|
||||
<!-- </view>-->
|
||||
<view class="flex justify-start align-center m-top-30">
|
||||
<view class="lb need m-right-20">签约费用承担方:</view>
|
||||
<u-radio-group
|
||||
v-model="formData.payBy"
|
||||
placement="row"
|
||||
>
|
||||
<u-radio activeColor="#a92924" :name='0' label="发起方"
|
||||
:customStyle="{marginRight: '10px'}"></u-radio>
|
||||
<u-radio activeColor="#a92924" :name='1' :customStyle="{marginRight: '10px'}" label="接收方"></u-radio>
|
||||
<u-radio activeColor="#a92924" :name='2' label="第三方"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need m-right-20">标题:</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入标题"
|
||||
border="surround"
|
||||
v-model="formData.title"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need m-right-20">对方手机号:</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入对方手机号"
|
||||
border="surround"
|
||||
v-model="formData.phone"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips">手机号请连续输入,请勿添加空格和断开输入,系统无法准确识别。</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need m-right-20">对方身份:</view>
|
||||
<view class="vl flex-1" @click="showContactPicker = true">
|
||||
<u--input
|
||||
style="pointer-events:none"
|
||||
disabledColor="#fff"
|
||||
disabled
|
||||
placeholder="请选择对方身份"
|
||||
border="surround"
|
||||
v-model="userType"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<view class="lb">签署截止日期:</view>
|
||||
<view class="vl flex-1 p-right-20" @click="showExpire = true">
|
||||
<u--input placeholder="请选择" v-model="signEndDate" style="pointer-events:none"
|
||||
fontSize="24rpx"
|
||||
suffixIcon="arrow-down-fill"
|
||||
suffixIconStyle="font-size: 10px;color: #d5d5d5"
|
||||
:disabled="true"
|
||||
disabledColor="#fff"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-24 text-gray mt-10">
|
||||
发起方填写签署截止日期和时间即为各签约方共同认可的签署时间,请酌情填写仔细阅读签署文件。
|
||||
</view>
|
||||
<view class="group m-top-20">
|
||||
<view class="lb m-right-20">签署文档:</view>
|
||||
<view class="flex justify-between align-center m-top-20">
|
||||
<view class="text-25 text-gray flex-1">
|
||||
仅支持PDF文件,如有其他附件或多个单据签约请合并成一个PDF文档上传。且仅支持纵向文档上传,横向文档显示不完整。
|
||||
电子签署文件中需添加以下内容以增强双方约束力和文件法律效力:签约双方均自愿通过以“电子签约”形式进行签约,电子签名和加盖电子印章双方均予以认可具有法律效力。
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-top-30">
|
||||
<u-upload
|
||||
accept="file"
|
||||
:fileList="formData.files"
|
||||
@afterRead="afterRead"
|
||||
:maxCount="1"
|
||||
:previewImage="false"
|
||||
>
|
||||
<u-button type="primary" v-if="!formData.files">点击上传</u-button>
|
||||
<p class="mt-30" @click="previewDoc" v-if="fileName">预览: {{ fileName }}</p>
|
||||
</u-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex justify-start m-top-30 flex-col">
|
||||
<view class="lb need m-right-20">签约发起方关键字:</view>
|
||||
<view class="vl flex-1 mt-10">
|
||||
<u--input
|
||||
placeholder="请输入签约发起方关键字"
|
||||
border="surround"
|
||||
v-model="formData.buyerSignKeyword"
|
||||
/>
|
||||
</view>
|
||||
<view class="mt-10 text-24 text-gray">
|
||||
请先在手机办公软件上(Office、WPS等)内,复制粘贴或输入预盖章部位关键字核验确认位置和内容,再点击上传文档核实无误后可返回签署页面输入测验关键字后进行签署(如同一关键字文档多次使用无误后可考虑省略检测流程)。系统将按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均会盖上指定用户的电子章,建议关键字在合同中保持唯一。
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex justify-start m-top-30 flex-col">
|
||||
<view class="lb need m-right-20">签约接收方关键字:</view>
|
||||
<view class="vl flex-1 mt-10">
|
||||
<u--input
|
||||
placeholder="请输入签约接收方关键字"
|
||||
border="surround"
|
||||
v-model="formData.sellerSignKeyword"
|
||||
/>
|
||||
</view>
|
||||
<view class="mt-10 text-24 text-gray">
|
||||
请先在手机办公软件上(Office、WPS等)内,复制粘贴或输入预盖章部位关键字核验确认位置和内容,再点击上传文档核实无误后可返回签署页面输入测验关键字后进行签署(如同一关键字文档多次使用无误后可考虑省略检测流程)。系统将按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均会盖上指定用户的电子章,建议关键字在合同中保持唯一。
|
||||
</view>
|
||||
</view>
|
||||
<view v-for="(item, index) in formData.thirdList" :key="index"
|
||||
class="flex justify-start items-start my-10 flex-col">
|
||||
<view class="text-left">第{{ ['三', '四', '五', '六', '七', '八', '九', '十'][index] }}方:</view>
|
||||
<view class="mt-10 w-100p">
|
||||
<el-input v-model="formData.thirdList[index].phone"
|
||||
:placeholder="`请输入第${['三', '四', '五', '六', '七', '八', '九', '十'][index]}方手机号`"/>
|
||||
</view>
|
||||
<view class="mt-10 w-100p flex justify-start items-center">
|
||||
<el-input v-model="formData.thirdList[index].signKeyword"
|
||||
:placeholder="`请输入第${['三', '四', '五', '六', '七', '八', '九', '十'][index]}方签章关键字`"/>
|
||||
<view class="flex justify-center items-center mt-10">
|
||||
<i class="el-icon-circle-plus text-main text-50 ml-35" @click="addThird"/>
|
||||
<i class="el-icon-remove text-50 ml-35" @click="removeThird(index)"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<p class="text-25 text-gray mt-20">如无第三方签约可忽略,签章关键字使用方法同下。</p>
|
||||
<p class="text-25 text-gray mt-20">手机号码请连续填写,不能断开或加入空格,否则系统无法识别。</p>
|
||||
<view class="tips text-24 text-gray mt-30">注意事项(电子签名不适用文件):</view>
|
||||
<view class="tips text-24 text-gray">1.婚姻、继承、收养等人身关系的;</view>
|
||||
<view class="tips text-24 text-gray">2.涉及停止供水、供热、供气等公用事业服务的;</view>
|
||||
<view class="tips text-24 text-gray">3.其他法律、行政法规规定的不适用电子文书的其他形式;</view>
|
||||
<u-button class="m-top-30" type="primary" text="提交" @click="submit"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
<u-datetime-picker :show="showExpire" v-model="expireTime" mode="datetime" @cancel="showExpire = false"
|
||||
:minDate="minDate"
|
||||
@confirm="handConfirmDate"></u-datetime-picker>
|
||||
<u-picker :show="showContactPicker" :columns="[userTypeList]" keyName="label"
|
||||
@cancel="showContactPicker = false" @close="showContactPicker = false" closeOnClickOverlay
|
||||
@confirm="confirmContact"/>
|
||||
<el-dialog title="金久信签约宝次数" :visible.sync="dialogVisible" width="95%">
|
||||
<div class="flex justify-center items-center w-100p">
|
||||
<div class="flex flex-col justify-center items-center w-100p">
|
||||
<div class="p-15 rounded m-10 shadow flex flex-col justify-center items-center flex-1 w-100p"
|
||||
:class="[selectedQyb === item._id ? 'buy-quote-mode-active' : '']"
|
||||
v-for="(item, index) in qybPackageList" :key="index"
|
||||
@click="selectedQyb = item._id">
|
||||
<p>{{ item.amount }}元</p>
|
||||
<p>可获得{{ item.getNum }}次</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-20 text-main font-bold">
|
||||
剩余金久信签约宝次数:{{ userInfo.qybNum }}次
|
||||
</div>
|
||||
<div class="mt-20 flex justify-center items-center">
|
||||
<view class="flex-1 mx-20">
|
||||
<u-button type="primary" :disabled="!selectedQyb" @click.native="doBuyQyb">确定
|
||||
</u-button>
|
||||
</view>
|
||||
<view class="flex-1 mx-20">
|
||||
<u-button plain @click.native="dialogVisible = false">取消</u-button>
|
||||
</view>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<u-popup :show="showLog" title="金久信签约宝明细" mode="center" @close="showLog = false" z-index="997" :overlayStyle="{
|
||||
zIndex: 997
|
||||
}">
|
||||
<view style="max-height: 80vh" class="p-20 overflow-y rounded">
|
||||
<u-tabs :list="[{name: '使用明细'}, {name: '付费明细'}]" :activeStyle="{fontWeight: 'bold', fontSize: '18px'}" :current="logIndex" @click="changeLogTab"></u-tabs>
|
||||
<view class="flex flex-col justify-center items-center m-20" style="max-height: 60vh;overflow-y: scroll">
|
||||
<template v-if="logIndex === 0">
|
||||
<view class="p-15 border-bottom w-100p" v-for="(item, index) in signLog.rows" :key="index">
|
||||
<view>日期: {{ item._add_time_str }}</view>
|
||||
<view>项目: {{ parseInt(item.contract.signType) === 1 ? '单据签约' : '合同签约' }}</view>
|
||||
<view>合同编号: {{ item.contract.transactionId }}</view>
|
||||
<view>签约身份: {{
|
||||
item.mineContract ? (item.mineContract.role === 'third' ? '第三方' : (item.mineContract.userId === item.userId ? '发起方' : '接收方')) : ''
|
||||
}}
|
||||
</view>
|
||||
<view>
|
||||
<view>扣除次数: 1</view>
|
||||
<view v-if="item.remainNum !== undefined && item.remainNum != null">剩余次数: {{
|
||||
item.remainNum
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-center mt-20">
|
||||
<el-pagination
|
||||
:page-size="10"
|
||||
@current-change="getSignLog"
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="signLog.total">
|
||||
</el-pagination>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="p-15 border-bottom w-100p" v-for="(item, index) in signLog.rows" :key="index">
|
||||
<view>日期: {{ item._add_time_str }}</view>
|
||||
<view>项目: {{ item.type === 12 ? '合同司法调证' : '金久信签约宝续费' }}</view>
|
||||
<view>流水号: {{ item.orderNo }}</view>
|
||||
<view>缴费金额: {{ item.type === 12 ? item.amount : item.payAmount }}
|
||||
</view>
|
||||
<view>
|
||||
<view>采购次数: {{ item.goods[0].goodsName }}</view>
|
||||
<view v-if="item.remainNum">剩余次数: {{ item.remainNum }}</view>
|
||||
</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="mr-15">操作:</text>
|
||||
<el-button size="mini" @click="openInvoice(item._id)" type="primary"
|
||||
v-if="!item.isInvoice">申请发票
|
||||
</el-button>
|
||||
<template v-else>
|
||||
<el-button size="mini" v-if="item.isInvoice === 1">开票中</el-button>
|
||||
<el-button size="mini" type="success" v-if="item.isInvoice === 2"
|
||||
@click.native="copyInvoice(item)">下载
|
||||
</el-button>
|
||||
</template>
|
||||
<el-button size="mini" style="margin-left: 10px"
|
||||
v-if="item.type === 12 && item.certificate && item.certificate.paymentMethod === 'advance'"
|
||||
@click.native="openPayVoucher(item.certificate)">查看支付凭证
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-center mt-20">
|
||||
<el-pagination
|
||||
:page-size="10"
|
||||
@current-change="getSignBuyLog"
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="signLog.total">
|
||||
</el-pagination>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<el-dialog title="申请发票" :visible.sync="showInvoice" width="80%" top="10px" append-to-body>
|
||||
<p>请输入开票信息</p>
|
||||
<u-form ref="invoiceForm" :model="invoiceForm" label-width="140px" labelPosition="top">
|
||||
<u-form-item label="名称" required>
|
||||
<u-input v-model="invoiceForm.name" placeholder="请输入企业名称或个人姓名"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="税号/证号" required>
|
||||
<u-input v-model="invoiceForm.code" placeholder="请输入税号或身份证号"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="手机号" required>
|
||||
<u-input v-model="invoiceForm.phone" placeholder="请输入手机号"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="电子邮箱" required>
|
||||
<u-input v-model="invoiceForm.email" placeholder="请输入电子邮箱"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="开户行">
|
||||
<u-input v-model="invoiceForm.bankName" placeholder="请输入开户行"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="银行账号">
|
||||
<u-input v-model="invoiceForm.bankAccount" placeholder="请输入银行账号"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="地址" required>
|
||||
<u-input v-model="invoiceForm.address" placeholder="请输入地址"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="单位/个人电话">
|
||||
<u-input v-model="invoiceForm.tel" placeholder="请输入单位/个人电话"/>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<div class="mt-20 flex justify-center items-center">
|
||||
<el-button type="primary" @click.native="doInvoice">确定</el-button>
|
||||
<el-button plain @click.native="showInvoice = false">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="合同预览" :visible.sync="showPdf" width="90%" append-to-body>
|
||||
<view style="height: 1000rpx">
|
||||
<u-pdf :url="pdfUrl" v-if="pdfUrl" :showBottom="false" :show-timer="false" :disabled="false" viewHeight="800rpx"
|
||||
@onClickReader="closePdf"/>
|
||||
</view>
|
||||
</el-dialog>
|
||||
<collapse></collapse>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uititle from '@/components/common/title'
|
||||
import cmsearch from '@/components/common/search'
|
||||
import cmempty from '@/components/common/empty'
|
||||
import dayjs from "dayjs";
|
||||
import md5 from "js-md5";
|
||||
import uPdf from '@/components/u-pdf/u-pdf.vue'
|
||||
import Collapse from "@/components/index/collapse.vue";
|
||||
|
||||
const SIGN_CONFIRM_CONTENT = `1、您确认,若全体各签约方未完成全部签约流程,本签约文件不发生法律效力,系统无法对该签约文件予以保存及提供司法调证服务;
|
||||
2、您确认,当前签约的实名主体名称、手机号码与注册认证阶段提交的信息未发生变更;若发生变更,必须及时进行重新认证后方可继续签约,避免产生严重法律风险与经济损失;
|
||||
3、您确认,本次签约为本系统实名认证主体操作,如若不是实名认证主体操作,授权委托人需本系统进行授权认证后签约;
|
||||
4、您确认,您与其他签约方均系在平等、自愿的基础上完成本次签约;
|
||||
5、你确认,此次签约内容符合《中华人民共和国电子签名法》《民法典》生效保护范畴;
|
||||
6、如因法律法规、监管部门政策更新等原因,系统提示您重新进行实名认证、证书续期等重要提示时,请您必须在签约前完成,否则造成任何损失,平台不承担任何责任;以上签约条件您均已经知悉并确认,否则您有权拒绝本次签约。`
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Collapse,
|
||||
uititle,
|
||||
cmsearch,
|
||||
cmempty,
|
||||
uPdf,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabIndex: 0,
|
||||
tableData: {},
|
||||
userInfo: {
|
||||
qybNum: 0
|
||||
},
|
||||
show: false,
|
||||
title: '',
|
||||
name: '',
|
||||
companyMobile: '',
|
||||
pdfUrl: '',
|
||||
showPdf: false,
|
||||
formData: {
|
||||
signType: '1',
|
||||
tradeMethod: 0,
|
||||
payBy: 0,
|
||||
title: null,
|
||||
phone: null,
|
||||
userType: null,
|
||||
third: null,
|
||||
signEndDate: null,
|
||||
contractFile: '',
|
||||
buyerSignKeyword: null,
|
||||
sellerSignKeyword: null,
|
||||
otherFile: null,
|
||||
thirdList: [{phone: '', signKeyword: ''}],
|
||||
},
|
||||
showExpire: false,
|
||||
expireTime: '',
|
||||
minDate: dayjs().valueOf(),
|
||||
showContactPicker: false,
|
||||
invoiceForm: {
|
||||
id: null,
|
||||
name: null,
|
||||
code: null,
|
||||
phone: null,
|
||||
email: null,
|
||||
bankName: null,
|
||||
bankAccount: null,
|
||||
address: null,
|
||||
tel: null,
|
||||
},
|
||||
userTypeList: [
|
||||
{
|
||||
value: 1,
|
||||
label: "买家"
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: "卖家"
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: "甲方"
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: "乙方"
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: "授权签约方"
|
||||
},
|
||||
|
||||
],
|
||||
userType: '',
|
||||
fileName: '',
|
||||
dialogVisible: false,
|
||||
qybPackageList: [],
|
||||
selectedQyb: null,
|
||||
showSignIntro: false,
|
||||
showSignFlow: false,
|
||||
signFlowTitle: '',
|
||||
showSignTips: false,
|
||||
signTips: '',
|
||||
showLog: false,
|
||||
signIntro: null,
|
||||
signFlow: null,
|
||||
signEndDate: null,
|
||||
signLog: {},
|
||||
logIndex: 0,
|
||||
showInvoice: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dayjs,
|
||||
afterRead({file}) {
|
||||
console.log(file)
|
||||
if (!file) return
|
||||
// 仅PDF
|
||||
if (file.type !== 'application/pdf') {
|
||||
uni.showToast({
|
||||
title: '请上传PDF文件',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if ((new RegExp(/\s+/g).test(file.name))) {
|
||||
uni.showToast({
|
||||
title: '文件名不能有空格',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
uniCloud.uploadFile({
|
||||
filePath: file.url,
|
||||
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(file.name + Date.now().toString()) + `-${file.name}`,
|
||||
success: ({fileID}) => {
|
||||
console.log(fileID)
|
||||
uniCloud.getTempFileURL({
|
||||
fileList: [fileID]
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
this.formData.contractFile = res.fileList[0].tempFileURL
|
||||
this.fileName = file.name
|
||||
// console.log(this.formData.contractFile)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
addThird() {
|
||||
if (this.formData.thirdList.length < 8) this.formData.thirdList.push({
|
||||
phone: '',
|
||||
signKeyword: '',
|
||||
})
|
||||
},
|
||||
removeThird(index) {
|
||||
if (this.formData.thirdList.length === 1) return
|
||||
this.formData.thirdList.splice(index, 1)
|
||||
},
|
||||
handConfirmDate({value}) {
|
||||
this.signEndDate = dayjs(value).format('YYYY-MM-DD HH:mm:ss')
|
||||
this.formData.signEndDate = dayjs(value).toISOString()
|
||||
console.log(this.formData.signEndDate)
|
||||
this.showExpire = false
|
||||
},
|
||||
confirmContact({value}) {
|
||||
this.formData.userType = value[0].value
|
||||
this.userType = value[0].label
|
||||
this.showContactPicker = false
|
||||
},
|
||||
async submit() {
|
||||
if (!this.formData.title) return vk.toast('标题不能为空')
|
||||
if (!this.formData.phone) return vk.toast('标题不能为空')
|
||||
if (!this.signEndDate) return vk.toast('签署截止日期不能为空')
|
||||
if (!this.formData.buyerSignKeyword) return vk.toast('签约发起方关键字不能为空')
|
||||
if (!this.formData.sellerSignKeyword) return vk.toast('签约接收方关键字不能为空')
|
||||
if (!this.formData.contractFile) return vk.toast('签署文档不能为空')
|
||||
this.formData.thirdList = this.formData.thirdList.filter(item => item.phone && item.signKeyword)
|
||||
if (this.formData.thirdList.length > 0) {
|
||||
for (let i = 0; i < this.formData.thirdList.length; i++) {
|
||||
const item = this.formData.thirdList[i]
|
||||
if (item.phone === '') {
|
||||
vk.toast('请填写手机号')
|
||||
return false
|
||||
}
|
||||
if (item.signKeyword === '') {
|
||||
vk.toast('请填写签章关键字')
|
||||
return false
|
||||
}
|
||||
if (item.phone === this.formData.phone) {
|
||||
vk.toast('第三方手机号不能与接收方手机号相同')
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
const thirdKeywords = []
|
||||
for (let i = 0; i < this.formData.thirdList.length; i++) {
|
||||
const item = this.formData.thirdList[i]
|
||||
if (item.phone && item.signKeyword) {
|
||||
thirdKeywords.push(item.signKeyword)
|
||||
}
|
||||
}
|
||||
uni.showLoading({title: '查验中'})
|
||||
vk.request({
|
||||
method: "POST",
|
||||
url: 'https://hcsc.gxwebsoft.com/api/read-pdf',
|
||||
header: {
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
},
|
||||
data: {
|
||||
file: this.formData.contractFile,
|
||||
buyerSignKeyword: this.formData.buyerSignKeyword,
|
||||
sellerSignKeyword: this.formData.sellerSignKeyword,
|
||||
thirdKeywords
|
||||
},
|
||||
success: async (pdfRes) => {
|
||||
|
||||
},
|
||||
fail: (pdfRes) => {
|
||||
uni.hideLoading()
|
||||
this.$message.error(pdfRes.content.msg)
|
||||
},
|
||||
complete: async (pdfRes) => {
|
||||
uni.hideLoading()
|
||||
if (pdfRes.code !== 200) {
|
||||
this.$message.error(pdfRes.content.msg)
|
||||
} else {
|
||||
uni.removeStorageSync(`signInfo`)
|
||||
uni.removeStorageSync(`fileName`)
|
||||
// 此处统一使用 SIGN_CONFIRM_CONTENT
|
||||
// confirmButtonText: '知悉同意',
|
||||
// showCancelButton: false,
|
||||
// type: 'warning'
|
||||
// })
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: SIGN_CONFIRM_CONTENT,
|
||||
showCancel: false,
|
||||
confirmText: '知悉同意',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/addSign',
|
||||
title: '请求中...',
|
||||
data: this.formData,
|
||||
success: (data) => {
|
||||
// console.log(data)
|
||||
vk.navigateTo('/pages/public/contract?tab=1')
|
||||
},
|
||||
fail: (err) => {
|
||||
vk.confirm(err.msg, '提示');
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
console.log('complete:', pdfRes)
|
||||
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
async doBuyQyb() {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/qyb/list/kh/buy',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
qybId: this.selectedQyb,
|
||||
}
|
||||
})
|
||||
this.dialogVisible = false
|
||||
vk.navigateTo({
|
||||
url: `/pages/shop/pay?id=${data}`
|
||||
})
|
||||
},
|
||||
async getQybPackage() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/qyb/list/pub/getList',
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 500
|
||||
}
|
||||
});
|
||||
this.qybPackageList = rows
|
||||
},
|
||||
async getSignIntro() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'ef45322e671cece4110ec73b36ca2b7d'
|
||||
},
|
||||
})
|
||||
this.signIntro = res.content
|
||||
},
|
||||
async getSignFlow() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'd77d384f686b9bd204bd4dc744cf75d0'
|
||||
},
|
||||
})
|
||||
this.signFlow = res.content
|
||||
this.signFlowTitle = res.name
|
||||
},
|
||||
async getSignTips() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '614937966875c18505570c357541c6e0'
|
||||
},
|
||||
})
|
||||
this.signTips = res.content
|
||||
},
|
||||
previewDoc() {
|
||||
// uni.setStorageSync(`signInfo_${this.formData.contractId}`, JSON.stringify(this.formData))
|
||||
// uni.setStorageSync(`fileName`, this.fileName)
|
||||
// window.location.href = this.formData.contractFile
|
||||
if (Array.isArray(this.formData.contractFile)) {
|
||||
this.pdfUrl = this.formData.contractFile[0]
|
||||
} else
|
||||
this.pdfUrl = this.formData.contractFile
|
||||
this.showPdf = true
|
||||
},
|
||||
openLog() {
|
||||
this.showLog = true
|
||||
this.changeLogTab({index: 0})
|
||||
},
|
||||
changeLogTab({index}) {
|
||||
this.logIndex = index
|
||||
if (index === 0) this.getSignLog(1)
|
||||
else this.getSignBuyLog(1)
|
||||
},
|
||||
async getSignLog(pageIndex) {
|
||||
this.signLog = await vk.callFunction({
|
||||
url: 'client/qyb/list/kh/payList',
|
||||
data: {
|
||||
pageIndex: pageIndex,
|
||||
pageSize: 10
|
||||
}
|
||||
})
|
||||
this.signLog.rows = this.signLog.rows.filter(item => !!item.contract)
|
||||
this.$forceUpdate()
|
||||
},
|
||||
async getSignBuyLog(pageIndex) {
|
||||
this.signLog = await vk.callFunction({
|
||||
url: 'client/order/kh/getList',
|
||||
data: {
|
||||
isSeller: 0,
|
||||
keyword: null,
|
||||
orderStatus: 4,
|
||||
pageIndex,
|
||||
pageSize: 10,
|
||||
signMethod: null,
|
||||
type: [12, 13]
|
||||
}
|
||||
})
|
||||
this.$forceUpdate()
|
||||
},
|
||||
openInvoice(id) {
|
||||
this.invoiceForm.id = id
|
||||
this.showInvoice = true
|
||||
},
|
||||
async doInvoice() {
|
||||
if (!this.invoiceForm.name) return this.$message.error('请输入发票抬头')
|
||||
if (!this.invoiceForm.code) return this.$message.error('请输入纳税人识别号')
|
||||
if (!this.invoiceForm.phone) return this.$message.error('请输入手机号码')
|
||||
if (!this.invoiceForm.email) return this.$message.error('请输入邮箱')
|
||||
if (!this.invoiceForm.address) return this.$message.error('请输入地址')
|
||||
await vk.callFunction({
|
||||
url: 'client/order/kh/changeInvoice',
|
||||
data: {
|
||||
...this.invoiceForm,
|
||||
isInvoice: 1
|
||||
}
|
||||
})
|
||||
this.showInvoice = false
|
||||
this.$message.success('申请成功')
|
||||
await this.getSignBuyLog(1)
|
||||
},
|
||||
copyInvoice(row) {
|
||||
// const url = row.invoiceUrl[0]
|
||||
// document.oncopy = function (e) {
|
||||
// e.clipboardData.setData('text', url);
|
||||
// e.preventDefault();
|
||||
// document.oncopy = null;
|
||||
// }
|
||||
// document.execCommand('Copy');
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: '已复制'
|
||||
// })
|
||||
window.location.href = row.invoiceUrl
|
||||
},
|
||||
closePdf() {
|
||||
this.pdfUrl = ''
|
||||
this.showPdf = false
|
||||
},
|
||||
openPayVoucher(row) {
|
||||
// window.open(row.payVoucher)
|
||||
uni.previewImage({
|
||||
urls: [row.payVoucher],
|
||||
})
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
this.getQybPackage()
|
||||
this.getSignIntro()
|
||||
this.getSignFlow()
|
||||
this.getSignTips()
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: async (data) => {
|
||||
this.userInfo = data.userInfo
|
||||
if (!this.userInfo.fadadaConfirm) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您尚未认证, 请前往认证',
|
||||
showCancel: false,
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
uni.setStorageSync('user_tab', 0)
|
||||
uni.switchTab({url: '/pages/user/user'})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
this.invoiceForm.phone = this.userInfo.mobile
|
||||
this.invoiceForm.email = this.userInfo.businessCard ? this.userInfo.businessCard.email : ''
|
||||
if (this.userInfo.accountType === 2) {
|
||||
if (this.userInfo.fadadaConfirm && this.userInfo.company) {
|
||||
this.invoiceForm.name = this.userInfo.company.companyName
|
||||
this.invoiceForm.code = this.userInfo.company.organization
|
||||
this.invoiceForm.address = this.userInfo.company.addressDetail
|
||||
this.invoiceForm.tel = this.userInfo.company.mobile
|
||||
this.invoiceForm.bankName = this.userInfo.company.companyBankName
|
||||
this.invoiceForm.bankAccount = this.userInfo.company.companyAccount
|
||||
}
|
||||
} else {
|
||||
this.invoiceForm.name = this.userInfo.person.personName
|
||||
this.invoiceForm.code = this.userInfo.person.idCard
|
||||
this.invoiceForm.address = this.userInfo.person.address
|
||||
this.invoiceForm.tel = this.userInfo.mobile
|
||||
}
|
||||
}
|
||||
})
|
||||
if (uni.getStorageSync('signInfo')) {
|
||||
this.formData = JSON.parse(uni.getStorageSync('signInfo'))
|
||||
if (this.formData.signEndDate) this.signEndDate = dayjs(this.formData.signEndDate).format('YYYY-MM-DD')
|
||||
if (uni.getStorageSync('fileName')) this.fileName = uni.getStorageSync('fileName')
|
||||
}
|
||||
console.log(this.formData)
|
||||
},
|
||||
onLoad(e) {
|
||||
if (e.tab && e.tab === 'signBuyLog') {
|
||||
this.showLog = true
|
||||
this.changeLogTab({index: 1})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #f7f7f7;
|
||||
}
|
||||
|
||||
.buy-quote-mode-active {
|
||||
border: 1px solid #a92924;
|
||||
background-color: #f1c7c7;
|
||||
}
|
||||
|
||||
.qyb-action-row {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.qyb-buy-action {
|
||||
flex: 0 0 28%;
|
||||
}
|
||||
|
||||
.qyb-log-action {
|
||||
flex: 1;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user