我的消息开发

This commit is contained in:
fengachen
2021-09-28 15:41:08 +08:00
parent d87b8eeb94
commit 74f0af9b74
14 changed files with 1612 additions and 213 deletions
@@ -0,0 +1,259 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
:confirmLoading="confirmLoading"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
cancelText="关闭">
<a-spin :spinning="confirmLoading">
<a-row :gutter="24">
<a-col :span="12">
<label>会议名称:</label>
<span>{{model.meetingName}}</span>
</a-col>
</a-row>
<section class="base-info">
<h3 class="title">报名信息</h3>
<a-row :gutter="24">
<a-col :span="12">
<label>参会单位:</label>
<span><j-ellipsis :value="model.companyName" :length="20"></j-ellipsis></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>参会人:</label>
<span><j-ellipsis :value="model.companyContactName" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12">
<label>身份:</label>
<span><j-ellipsis :value="model.identity_dictText" :length="20"></j-ellipsis></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>性别:</label>
<span><j-ellipsis :value="model.sex" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12">
<label>手机号:</label>
<span><j-ellipsis :value="model.phone" :length="20"></j-ellipsis></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>付款方式:</label>
<span><j-ellipsis :value="model.payMode_dictText " :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12">
<label>需要发票:</label>
<span><j-ellipsis :value="model.needInvoice_dictText" :length="20"></j-ellipsis></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>发票邮寄地址:</label>
<span><j-ellipsis :value="model.postContactAddress" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12">
<label>邮编:</label>
<span><j-ellipsis :value="model.postCode" :length="20"></j-ellipsis></span>
</a-col>
</a-row>
</section>
<section class="base-info">
<h3 class="title">付款凭证</h3>
<a-form :form="form">
<a-row :gutter="24">
<a-col :xl="12" :sm="24">
<a-form-item label="付款凭证" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-image-upload v-decorator="['paymentRecord',validatorRules.paymentRecord]" :return-id="true"></j-image-upload>
</a-form-item>
</a-col>
</a-row>
</a-form>
</section>
</a-spin>
</j-modal>
</template>
<script>
import {httpAction} from '@api/manage'
import JImageUpload from '@comp/jero/JImageUpload'
import { getSingUpUserInfo} from '@api/incomePaymentsApi'
export default {
name: 'UploadMeetingCertificateModal',
data() {
return {
title:'上传凭证',
width:800,
visible:false,
confirmLoading:false,
form: this.$form.createForm(this),
model: {},
labelCol: {
xs: {span: 24},
sm: {span: 6}
},
wrapperCol: {
xs: {span: 24},
sm: {span: 18}
},
validatorRules: {
paymentRecord: {
rules: [{required: false, message: '请上传汇款凭证'}],
validateTrigger: 'change'
},
},
url: {
edit:'/meeting/payMeetingSituation/edit'
}
}
},
components:{
JImageUpload
},
methods:{
open(param){
this.visible = true
if(param.id){
this.querySingUpUserInfo(param.id).then(res => {
this.model = res
})
}
},
close(){
this.visible = false
},
handleOk(){
const that = this
this.form.validateFields((err, values) => {
if(!err){
that.confirmLoading = true
let method = 'post'
let url = this.url.edit
const formData = Object.assign({},values)
httpAction(url,formData,method).then(res => {
if(res.success){
that.$message.success(res.message)
that.$emit('ok')
that.handleCancel()
that.confirmLoading = false
}else {
this.$message.warn(res.message)
}
}).finally( () => {
that.confirmLoading = false
})
}else {
this.confirmLoading = false
}
})
},
handleCancel(){
this.close()
},
/*
* 获取参会人信息
* */
querySingUpUserInfo(id){
return new Promise(resolve => {
let result = {}
getSingUpUserInfo({id}).then(res => {
if(res.success){
result = res.result
}
}).finally( () => {
resolve(result)
})
})
}
}
}
</script>
<style scoped lang="less">
.ant-row {
margin: 12px;
}
h3 {
position: relative;
}
label {
color: #666;
}
.contract-num {
color: #42b983;
cursor: pointer;
}
h3.title::before {
position: absolute;
top: 4px;
left: -10px;
content: "";
height: 20px;
width: 2px;
background: #069f99;
}
/* 到账信息 */
.payment-info {
margin-bottom: 14px;
&-title {
text-align: center;
font-size: 14px;
height: 35px;
line-height: 35px;
letter-spacing: 1px;
color: #fff;
background: #a2e6e4;
}
&-content {
color: #424242;
//background: #efefef;
padding: 5px;
padding-left: 10px;
border: 1px solid #ccc;
border-top: none;
}
}
/* 开票邮寄信息 */
.wrap-table {
border: 1px solid #ccc;
border-bottom: none;
}
/deep/ .ant-table-thead {
tr > th {
color: #fff;
background: #a2e6e4;
border: none;
}
}
/deep/ .ant-table-tbody {
tr > td {
border: none;
border-bottom: 1px solid #ccc;
}
}
</style>