20261008
This commit is contained in:
@@ -0,0 +1,439 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<top-bar></top-bar>
|
||||
<common-nav></common-nav>
|
||||
<view class="w-1200">
|
||||
<view class="certificate-container bg-white p-20">
|
||||
<!-- 申请表格 -->
|
||||
<div v-html="content"></div>
|
||||
|
||||
<!-- 出证样板选择 -->
|
||||
<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">
|
||||
<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="收件人姓名:" class="required">-->
|
||||
<!-- <el-input v-model="form.electronicDelivery.receiver"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="手机号码:" class="required">-->
|
||||
<!-- <el-input v-model="form.electronicDelivery.phone"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="收件邮箱:" class="required">-->
|
||||
<!-- <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="收件人姓名:" class="required">
|
||||
<el-input v-model="form.paperDelivery.receiver"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码:" class="required">
|
||||
<el-input v-model="form.paperDelivery.phone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="收件地址:" class="required">
|
||||
<el-input v-model="form.paperDelivery.address" placeholder="请输入详细地址"></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="online">在线支付</el-radio>
|
||||
<el-radio v-model="form.paymentMethod" label="advance">公对公支付</el-radio>
|
||||
</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>
|
||||
<vk-data-upload v-else v-model="form.payVoucher" :cloudPathRemoveChinese="false" list-type="text"
|
||||
:limit="1" button-text="上传付款记录"
|
||||
accept=".jpg,.jpeg,.png" :on-success="uploadSuccess" ref="uploader"
|
||||
:show-file-list="false">
|
||||
</vk-data-upload>
|
||||
</view>
|
||||
|
||||
<!-- 客服电话 -->
|
||||
<view class="text-center">
|
||||
<view class="service-phone">客服电话:400 686 5559</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sampleSelected: false,
|
||||
paidConfirm: false,
|
||||
hasReport: 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: ''
|
||||
},
|
||||
contractId: null,
|
||||
transactionId: null,
|
||||
amount: null,
|
||||
urgentAmount: null,
|
||||
content: null,
|
||||
bankAccount: null,
|
||||
|
||||
}
|
||||
},
|
||||
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
|
||||
},
|
||||
uploadSuccess(response, file, fileList) {
|
||||
this.form.payVoucher = response.url;
|
||||
this.submitForm()
|
||||
},
|
||||
submitForm() {
|
||||
// 表单验证
|
||||
if (!this.validateForm()) {
|
||||
return;
|
||||
}
|
||||
if (this.form.certificateType === 'normal') {
|
||||
this.form.amount = this.amount;
|
||||
} else {
|
||||
this.form.amount = this.urgentAmount;
|
||||
}
|
||||
this.$confirm(`司法调证服务需向数据中心付费(${this.form.amount}元/次),是否继续?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
// 提交表单
|
||||
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/index/shop/pay?id=${data}`
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
message: '请等待后台审核',
|
||||
type: 'success'
|
||||
});
|
||||
setTimeout(() => {
|
||||
|
||||
vk.navigateTo({
|
||||
url: `/pages/contract/index?tab=2`
|
||||
})
|
||||
}, 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;
|
||||
},
|
||||
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;
|
||||
}
|
||||
},
|
||||
async getBankAccount() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'b5ad93e068f343230344c7b63cb1aac5'
|
||||
},
|
||||
})
|
||||
this.bankAccount = res.content
|
||||
},
|
||||
}
|
||||
}
|
||||
</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 ::v-deep .el-form-item__label:before {
|
||||
content: '*';
|
||||
color: #f56c6c;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.service-phone {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
+1943
-502
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user