[update]-企业端增加标协会员-基本信息、会员管理 前端页面

This commit is contained in:
fengchenchen
2021-12-13 20:58:17 +08:00
parent 673bbde472
commit a215332de6
23 changed files with 5007 additions and 12 deletions
+6 -1
View File
@@ -10,8 +10,13 @@ window._CONFIG["staticDomainURL"] = window._CONFIG["domianURL"] + "/sys/common/d
window._CONFIG["pdfDomainURL"] = window._CONFIG["domianURL"] + "/sys/common/pdf/pdfPreviewIframe";
window._CONFIG["casPrefixUrl"] = "http://cas.example.org:8443/cas";
// 预览文件地址
window._CONFIG["onlinePreviewDomainURL"] = "http://localhost:8012/onlinePreview";
window._CONFIG["onlinePreviewDomainURL"] = "http://127.0.0.1:8012/onlinePreview";
// 会议管理报名二维码地址
window._CONFIG['singUpQRCodeURL'] = 'http://localhost:3000/signupentrance'
// 路由转发 -会员系统的路由转发前缀
window._CONFIG["memberURL"] = "/memberApi";
// 会员系统的静态文件的地址
window._CONFIG["memberStaticDomainURL"] = window._CONFIG["memberURL"] + "/sys/common/static";
window._CONFIG["memberDomianWebSocketURL"] = "http://127.0.0.1:9000/memberApi";
+6 -2
View File
@@ -4,15 +4,19 @@
window._CONFIG = {};
window._CONFIG["domianURL"] = "/jero-boot"; // 路由转发 devServer
// websocket连接的地址
window._CONFIG["domianWebSocketURL"] = "http://10.10.10.46:8077/jero-boot";
window._CONFIG["domianWebSocketURL"] = "http://139.9.235.66:1015/jero-boot";
// 单点登录地址
window._CONFIG["staticDomainURL"] = window._CONFIG["domianURL"] + "/sys/common/download";
window._CONFIG["pdfDomainURL"] = window._CONFIG["domianURL"] + "/sys/common/pdf/pdfPreviewIframe";
window._CONFIG["casPrefixUrl"] = "http://cas.example.org:8443/cas";
// 预览文件地址
window._CONFIG["onlinePreviewDomainURL"] = "http://10.10.10.46:8012/onlinePreview";
window._CONFIG["onlinePreviewDomainURL"] = "http://139.9.235.66:8012/onlinePreview";
// 会议管理报名二维码地址
window._CONFIG['singUpQRCodeURL'] = 'http://10.10.10.46:8055/signupentrance'
// 路由转发 -会员系统的路由转发前缀
window._CONFIG["memberURL"] = "/memberApi";
// 会员系统的静态文件的地址
window._CONFIG["memberStaticDomainURL"] = window._CONFIG["memberURL"] + "/sys/common/static";
+179
View File
@@ -0,0 +1,179 @@
import Vue from 'vue'
import { axios } from '@/utils/memberRequest'
//post
export function postAction(url,parameter) {
return axios({
url: url,
method:'post' ,
data: parameter
})
}
//post method= {post | put}
export function httpAction(url,parameter,method) {
return axios({
url: url,
method:method ,
data: parameter
})
}
//put
export function putAction(url,parameter) {
return axios({
url: url,
method:'post',
data: parameter
})
}
//get
export function getAction(url,parameter) {
return axios({
url: url,
method: 'get',
params: parameter
})
}
//deleteAction
export function deleteAction(url,parameter) {
return axios({
url: url,
method: 'delete',
params: parameter
})
}
/**
* 下载文件 用于excel导出
* @param url
* @param parameter
* @returns {*}
*/
export function downFile(url,parameter){
return axios({
url: url,
params: parameter,
method:'get' ,
responseType: 'blob'
})
}
/**
* 通过A标签下载文件的通用方法
* @param data--接口返回的数据
* @param fileName --下载文件的名称
*/
export function downloadFileByA(data, fileName) {
if (!data || data.size === 0) {
Vue.prototype['$message'].warning('文件下载失败')
return
}
// 当没有返回数据或者返回错误信息的时候,对数据进行解析后提示
if (!data || data.type === 'application/json') {
const reader = new FileReader()
reader.readAsText(data)
// 处理load事件。该事件在读取操作完成时触发
reader.onload = e => {
// 解析返回的值
const res = JSON.parse(e.target.result)
// 异常信息抛出
if (!res.success) {
Vue.prototype['$message'].warning(res.message || '文件下载失败')
}
}
return
}
// if (!data || data.size === 0) {
// Vue.prototype['$message'].warning('文件下载失败')
// return
// }
if (typeof window.navigator.msSaveBlob !== 'undefined') {
window.navigator.msSaveBlob(new Blob([data]), fileName)
} else {
let url = window.URL.createObjectURL(new Blob([data]))
let link = document.createElement('a')
link.style.display = 'none'
link.href = url
link.setAttribute('download', fileName)
document.body.appendChild(link)
link.click()
document.body.removeChild(link) //下载完成移除元素
window.URL.revokeObjectURL(url) //释放掉blob对象
}
}
/**
* get请求下载文件
* @param url 文件路径
* @param fileName 文件名
* @param parameter
* @returns {*}
*/
export function downloadFile(url, fileName, parameter) {
return downFile(url, parameter).then((data) => {
// 调用a标签下载文件的方法
downloadFileByA(data, fileName)
})
}
/**
* post下载文件
* @param url 文件路径
* @param fileName 文件名
* @param parameter
* @returns {*}
*/
export function downloadPostFile(url, fileName, parameter) {
return axios({
url: url,
data: parameter,
method: 'post',
responseType: 'blob'
}).then((data) => {
// 调用a标签下载文件的方法
downloadFileByA(data, fileName)
})
}
/**
* 文件上传 用于富文本上传图片
* @param url
* @param parameter
* @returns {*}
*/
export function uploadAction(url,parameter){
return axios({
url: url,
data: parameter,
method:'post' ,
headers: {
'Content-Type': 'multipart/form-data', // 文件上传
},
})
}
/**
* 获取文件服务访问路径
* @param avatar
* @param subStr
* @returns {*}
*/
export function getFileAccessHttpUrl(avatar,subStr) {
if(!subStr) subStr = 'http'
try {
if(avatar && avatar.startsWith(subStr)){
return avatar
}else{
if(avatar && avatar.length>0 && avatar.indexOf('[') === -1){
console.log('window._CONFIG[\'memberStaticDomainURL\']=======', window._CONFIG['memberStaticDomainURL'])
return window._CONFIG['memberStaticDomainURL'] + '/' + avatar
}
}
}catch(err){
return
}
}
+45
View File
@@ -0,0 +1,45 @@
import Vue from 'vue'
// eslint-disable-next-line no-unused-vars
import { getAction as incomeGetAction, postAction as incomePostAction } from '@api/manage'
// eslint-disable-next-line no-unused-vars
import { getAction, postAction } from '@api/memberManage'
import { ACCESS_TOKEN } from '@/store/mutation-types'
const TokenKey = 'X-Access-Token'
// 标协会员-基本信息-调用来款系统的接口
const queryCommonProjectById = (param) => incomeGetAction('/project/payCommonProject/queryCompanyById', param)
// pdf预览网址
const previewPdf = (file) => {
// const url = `${window._CONFIG['memberURL']}/sys/common/static/${id}?type=view&${TokenKey}=${Vue.ls.get(ACCESS_TOKEN)}`
// return `${process.env.BASE_URL}pdfjs/web/viewer.html?file=` + encodeURIComponent(url) + '&.pdf'
// const token = Vue.ls.get(ACCESS_TOKEN)
// todo 先写死token
const token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MzkzNzY3MzcsInVzZXJuYW1lIjoiMGI4ZDQ2YTBiZTI0NGJlZGI5ZDI1Y2Y5ZmQ5OTc3MTcifQ.FvA0UgdKJm1m0rbkaS4CX72-GozZVPDmcZ296FvaBfQ'
const fileFullUrl = `${window._CONFIG['memberDomianWebSocketURL']}/sys/common/download/${file.id}?token=${token}&fullfilename=${file.fileName}`
console.log(fileFullUrl, '$$$$$$$$')
let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(fileFullUrl)}`
return url
}
// 查询会员是否有批复文号
const queryApprovalNo = (params) => getAction('/memberInfo/memberInfo/getApprovalMember', params)
/**
* 获取加密字符串,并对结果进行缓存
*/
const getEncryptedString = () => getAction('/sys/getRSAPublicKey', {})
// 通过文件的id获取文件的名称
const getFilesByIds = (params) => getAction('/sys/common/static/getFilesByIds', params)
export {
queryCommonProjectById,
queryApprovalNo,
previewPdf,
getEncryptedString,
getFilesByIds
}
+12
View File
@@ -123,6 +123,13 @@
this.headers = {'X-Access-Token':token}
},
methods:{
blobToBase64(blob, callback) {
let a = new FileReader()
a.onload = function(e) {
callback(e.target.result)
}
a.readAsDataURL(blob)
},
async initFileList(paths){
if(!paths || paths.length === 0){
this.fileList = []
@@ -229,6 +236,11 @@
if(this.fileList.length>0){
let url = this.fileList[this.fileList.length-1].url
// console.log( getFileAccessHttpUrl(url),'url')
let img = document.createElement('img')
img.src = getFileAccessHttpUrl(url)
img.onload = function(e) {
(e.target.result)
}
return getFileAccessHttpUrl(url)
}
},
@@ -0,0 +1,257 @@
<template>
<a-upload
name="file"
listType="picture-card"
:multiple="isMultiple"
:action="uploadAction"
:headers="headers"
:data="{biz:bizPath}"
:fileList="fileList"
:beforeUpload="beforeUpload"
:disabled="disabled"
:isMultiple="isMultiple"
:showUploadList="isMultiple"
:class="{'mul-picture-card': isMultiple}"
@change="handleChange"
@preview="handlePreview">
<img v-if="!isMultiple && picUrl" :src="getAvatarView()" @click="clickFunc" style="height:104px;max-width:300px"/>
<div v-else >
<a-icon :type="uploadLoading ? 'loading' : 'plus'" />
<div class="ant-upload-text">{{ text }}</div>
</div>
<j-modal
title="预览"
width="800px"
:visible="previewVisible"
:maskClosable="false"
:footer="null"
switchFullscreen
@cancel="handleCancel()"
cancelText="关闭">
<img alt="example" style="width: 100%" :src="previewImage"/>
</j-modal>
<!--<j-modal :visible="previewVisible" :footer="null" @cancel="handleCancel()">-->
<!--<img alt="example" style="width: 100%" :src="previewImage"/>-->
<!--</j-modal>-->
</a-upload>
</template>
<script>
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getFileAccessHttpUrl } from '@/api/memberManage'
const uidGenerator = () => {
return '-' + parseInt(Math.random() * 10000 + 1, 10)
}
const getFileName = (path) => {
if (path.lastIndexOf('\\') >= 0) {
const reg = new RegExp('\\\\', 'g')
path = path.replace(reg, '/')
}
return path.substring(path.lastIndexOf('/') + 1)
}
export default {
name: 'JImageUpload',
data() {
return {
uploadAction: window._CONFIG['memberURL'] + '/sys/common/upload',
uploadLoading: false,
picUrl: false,
headers: {},
fileList: [],
previewImage: '',
previewVisible: false
}
},
props: {
text: {
type: String,
required: false,
default: '上传'
},
// 此属性用于控制图片上传的个数
number: {
type: Number,
required: false,
default: 1
},
/* 这个属性用于控制文件上传的业务路径*/
bizPath: {
type: String,
required: false,
default: 'temp'
},
value: {
type: [String, Array],
required: false
},
disabled: {
type: Boolean,
required: false,
default: false
},
isMultiple: {
type: Boolean,
required: false,
default: false
},
// 是否需要校验图片大小不超过5M
isLessThan5M: {
type: Boolean,
required: false,
default: false
}
},
watch: {
value(val) {
if (val instanceof Array) {
this.initFileList(val.join(','))
} else {
this.initFileList(val)
}
}
},
created() {
// const token = Vue.ls.get(ACCESS_TOKEN)
//TODO 暂时将token写成固定值,后续再做动态
const token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MzkzNzY3MzcsInVzZXJuYW1lIjoiMGI4ZDQ2YTBiZTI0NGJlZGI5ZDI1Y2Y5ZmQ5OTc3MTcifQ.FvA0UgdKJm1m0rbkaS4CX72-GozZVPDmcZ296FvaBfQ'
this.headers = { 'X-Access-Token': token }
},
methods: {
initFileList(paths) {
if (!paths || paths.length === 0) {
this.fileList = []
this.picUrl = false
return
}
this.picUrl = true
const fileList = []
const arr = paths.split(',')
for (var a = 0; a < arr.length; a++) {
const url = getFileAccessHttpUrl(arr[a])
fileList.push({
uid: uidGenerator(),
name: getFileName(arr[a]),
status: 'done',
url: url,
response: {
status: 'history',
message: arr[a]
}
})
}
this.fileList = fileList
},
beforeUpload: function(file) {
var fileType = file.type
const imgTypes = ['jpg', 'jpeg', 'png']
const imgFlag = imgTypes.some(item => {
return fileType.indexOf(item) > 0
})
file.uploadGoOn = true
if (!imgFlag) {
this.$message.warning('请上传jpg,jpeg,png格式的图片')
file.uploadGoOn = false
return false
}
if (this.isLessThan5M) {
if (file.size > 1024 * 1024 * 5) {
this.$message.warning('图片大小限制为5M')
file.uploadGoOn = false
return false
}
}
},
clickFunc() {
if (!this.disabled) return
if (this.fileList.length > 0) {
this.handlePreview(this.fileList[0])
}
},
handleChange(info) {
if (!info.file.status && info.file.uploadGoOn === false) {
info.fileList.pop()
return
}
this.picUrl = false
let fileList = info.fileList
if (info.file.status === 'done') {
if (this.number > 0) {
fileList = fileList.slice(-this.number)
}
if (info.file.response.success) {
this.picUrl = true
fileList = fileList.map((file) => {
if (file.response) {
file.url = file.response.message
}
return file
})
}
// this.$message.success(`${info.file.name} 上传成功!`);
} else if (info.file.status === 'error') {
this.$message.error(`${info.file.name} 上传失败.`)
} else if (info.file.status === 'removed') {
this.handleDelete(info.file)
}
this.fileList = fileList
if (info.file.status === 'done' || info.file.status === 'removed') {
this.handlePathChange()
}
},
// 预览
handlePreview(file) {
this.previewImage = file.url || file.thumbUrl
this.previewVisible = true
},
getAvatarView() {
if (this.fileList.length > 0) {
return this.fileList[0].url
}
},
handlePathChange() {
const uploadFiles = this.fileList
let path = ''
if (!uploadFiles || uploadFiles.length === 0) {
path = ''
}
const arr = []
if (!this.isMultiple) {
arr.push(uploadFiles[uploadFiles.length - 1].response.message)
} else {
for (var a = 0; a < uploadFiles.length; a++) {
arr.push(uploadFiles[a].response.message)
}
}
if (arr.length > 0) {
path = arr.join(',')
}
this.$emit('change', path)
},
handleDelete(file) {
// 如有需要新增 删除逻辑
console.log(file)
},
handleCancel() {
this.close()
this.previewVisible = false
},
close() {
}
},
model: {
prop: 'value',
event: 'change'
}
}
</script>
<style scoped lang='less'>
/* 可多图片上传组件-禁用状态不显示上传的按钮*/
.mul-picture-card /deep/.ant-upload.ant-upload-disabled {
display: none!important;
}
</style>
@@ -0,0 +1 @@
###### 该文件夹 存储会员系统 使用的组件,主要是对应url的不同
+19
View File
@@ -0,0 +1,19 @@
/**
*
*/
import { disabledAuthFilter } from '@/utils/authFilter'
export const DisabledAuthFilterMixin = {
props: ['formData'],
data() {
return {
}
},
methods: {
isDisabledAuth(code) {
return disabledAuthFilter(code, this.formData)
}
}
}
+3 -1
View File
@@ -20,6 +20,8 @@ export const JeroListMixin = {
lastQueryParam: {},
/* 数据源 */
dataSource:[],
// 做一步转换,方便会员系统的使用
getAction,
/* 分页参数 */
ipagination:{
current: 1,
@@ -85,7 +87,7 @@ export const JeroListMixin = {
}
var params = this.getQueryParams()//查询条件
this.loading = true
getAction(this.url.list, params).then((res) => {
this.getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
this.dataSource = res.result.records||res.result
+1
View File
@@ -13,6 +13,7 @@ Router.prototype.push = function push(location, onResolve, onReject) {
export default new Router({
mode: 'history',
// eslint-disable-next-line no-undef
// base: process.env.BASE_URL + (process.env.NODE_ENV === 'production' ? '/enterprise' : '/enterprise'),
base: process.env.BASE_URL,
scrollBehavior: () => ({ y: 0 }),
routes: constantRouterMap
+172
View File
@@ -0,0 +1,172 @@
/**
* @Description: 会员系统请求接口的 封装 和request.js 只差在了 baseURL
* @author:fengchenchen @Date:2021-12-13
*/
import Vue from 'vue'
import axios from 'axios'
import store from '@/store'
import {Modal, notification} from 'ant-design-vue'
import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
/**
* 【指定 axios的 baseURL】
* 如果手工指定 baseURL: '/jero-boot'
* 则映射后端域名,通过 vue.config.js
* @type {*|string}
*/
let apiBaseUrl = window._CONFIG['memberURL'] || '/memberApi'
//console.log("apiBaseUrl= ",apiBaseUrl)
// 创建 axios 实例
const service = axios.create({
//baseURL: '/jero-boot',
baseURL: apiBaseUrl, // api base_url
timeout: 9000 // 请求超时时间
})
const err = (error) => {
if (error.response) {
let data = error.response.data
const token = Vue.ls.get(ACCESS_TOKEN)
console.log('------异常响应------',token)
console.log('------异常响应------',error.response.status)
switch (error.response.status) {
case 403:
notification.error({ message: '系统提示', description: '拒绝访问',duration: 4})
break
case 500:
console.log('------error.response------',error.response)
// update-begin- --- author:liusq ------ date:20200910 ---- for:处理Blob情况----
// eslint-disable-next-line no-case-declarations
let type=error.response.request.responseType
if(type === 'blob'){
blobToJson(data)
break
}
// update-end- --- author:liusq ------ date:20200910 ---- for:处理Blob情况----
//notification.error({ message: '系统提示', description:'Token失效,请重新登录!',duration: 4})
if(token && data.message.includes('Token失效')){
// update-begin- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转----
Modal.error({
title: '登录已过期',
content: '很抱歉,登录已过期,请重新登录',
okText: '重新登录',
mask: false,
onOk: () => {
store.dispatch('Logout').then(() => {
Vue.ls.remove(ACCESS_TOKEN)
try {
let path = window.document.location.pathname
console.log('location pathname -> '+path)
if(path!='/' && path.indexOf('/user/login')==-1){
window.location.reload()
}
}catch (e) {
window.location.reload()
}
})
}
})
// update-end- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转----
}
break
case 404:
notification.error({ message: '系统提示', description:'很抱歉,资源未找到!',duration: 4})
break
case 504:
notification.error({ message: '系统提示', description: '网络超时'})
break
case 401:
notification.error({ message: '系统提示', description:'未授权,请重新登录',duration: 4})
if (token) {
store.dispatch('Logout').then(() => {
setTimeout(() => {
window.location.reload()
}, 1500)
})
}
break
default:
notification.error({
message: '系统提示',
description: data.message,
duration: 4
})
break
}
}
return Promise.reject(error)
}
// request interceptor
service.interceptors.request.use(config => {
// const token = Vue.ls.get(ACCESS_TOKEN)
//TODO 暂时将token写成固定值,后续再做动态
const token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MzkzNzY3MzcsInVzZXJuYW1lIjoiMGI4ZDQ2YTBiZTI0NGJlZGI5ZDI1Y2Y5ZmQ5OTc3MTcifQ.FvA0UgdKJm1m0rbkaS4CX72-GozZVPDmcZ296FvaBfQ'
if (token) {
config.headers[ 'X-Access-Token' ] = token // 让每个请求携带自定义 token 请根据实际情况自行修改
}
//update-begin-author:taoyan date:2020707 for:多租户
let tenantid = Vue.ls.get(TENANT_ID)
if (!tenantid) {
tenantid = 0
}
config.headers[ 'tenant_id' ] = tenantid
//update-end-author:taoyan date:2020707 for:多租户
if(config.method=='get'){
if(config.url.indexOf('sys/dict/getDictItems')<0){
config.params = {
_t: Date.parse(new Date())/1000,
...config.params
}
}
}
return config
},(error) => {
return Promise.reject(error)
})
// response interceptor
service.interceptors.response.use((response) => {
return response.data
}, err)
/**
* Blob解析
* @param data
*/
function blobToJson(data) {
let fileReader = new FileReader()
let token = Vue.ls.get(ACCESS_TOKEN)
fileReader.onload = function() {
try {
let jsonData = JSON.parse(this.result) // 说明是普通对象数据,后台转换失败
console.log('jsonData',jsonData)
if (jsonData.status === 500) {
console.log('token----------》',token)
if(token && jsonData.message.includes('Token失效')){
Modal.error({
title: '登录已过期',
content: '很抱歉,登录已过期,请重新登录',
okText: '重新登录',
mask: false,
onOk: () => {
store.dispatch('Logout').then(() => {
Vue.ls.remove(ACCESS_TOKEN)
window.location.reload()
})
}
})
}
}
} catch (err) {
// 解析成对象失败,说明是正常的文件流
console.log('blob解析fileReader返回err',err)
}
}
fileReader.readAsText(data)
}
export {
service as axios
}
+133 -4
View File
@@ -1,13 +1,142 @@
<template>
<div>基本信息</div>
<div class='main-box member-basic-info'>
<div class='panel-cell'>
<div class="title">秘书处信息</div>
<div class='content'>
<div class='info-row'>
<span class='label-span'>地址:</span>
<span class='value-span'>{{secretariatInfo.address}}</span>
</div>
<div class='info-row'>
<span class='label-span'>联系人:</span>
<span class='value-span'>{{secretariatInfo.contactPerson}}</span>
</div>
<div class='info-row'>
<span class='label-span'>联系人电话:</span>
<span class='value-span'>{{secretariatInfo.contactPhone}}</span>
</div>
<div class='info-row'>
<span class='label-span'>联系人邮箱:</span>
<span class='value-span'>{{secretariatInfo.contactMail}}</span>
</div>
</div>
</div>
<div class='panel-cell'>
<div class="title">本企业信息</div>
<div class='content'>
<div class='info-row'>
<span class='label-span'>企业名称:</span>
<span class='value-span'>{{memberInfo.companyName}}</span>
</div>
<div class='info-row'>
<span class='label-span'>企业管理员:</span>
<span class='value-span'>{{memberInfo.contactPerson}}</span>
</div>
<div class='info-row'>
<span class='label-span'>管理员电话:</span>
<span class='value-span'>{{memberInfo.contactPhone}}</span>
</div>
<div class='info-row'>
<span class='label-span'>管理员邮箱:</span>
<span class='value-span'>{{memberInfo.contactMail}}</span>
</div>
<div class='info-row'>
<span class='label-span'>会员有效期:</span>
<span class='value-span'>{{memberInfo.memberTerm}}</span>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'BasicInfo'
name: 'BasicInfo',
data() {
return {
// 秘书处信息
secretariatInfo: {
address: '东丽区' , // 地址
contactPerson: '郭某某' , // 联系人
contactPhone: '022-5907252' , // 联系人电话
contactMail: '113222222222222@qq.c113222222222222113222222222222113222222222222113222222222222113222222222222113222222222222113222222222222om' , // 联系人邮箱
},
// 本企业信息
memberInfo: {
companyName: '', // 企业名称
contactPerson: '', // 企业管理员
contactPhone: '', // 管理员电话
contactMail: '', // 管理员邮箱
memberTerm: 'xxxx年xx月xx日到xxxx年xx月xx日', // 会员有效期
}
}
},
methods: {
// 获得会员相关数据的字段
getBasicInfo() {
}
}
}
</script>
<style scoped>
<style scoped lang='less'>
@import '~@assets/less/common.less';
.member-basic-info {
position: relative;
margin-bottom: 20px;
display: flex;
flex-direction: row;
justify-content: space-between;
font-size: 14px;
color: #999;
opacity: 1;
</style>
.panel-cell{
flex: 1;
width: 0;
height: 419px;
//padding: 10px;
background: #ffffff;
border-radius: 4px;
box-shadow: -2px 0px 10px 10px rgba(51, 51, 51, 0.10);
background: #ffffff;
.title {
height: 56px;
line-height: 56px;
background: #fff;
border-bottom: 2px solid #f2f2f2;
padding: 0 20px;
font-size: 16px;
}
.content{
padding: 10px;
// 每行数据
.info-row{
padding: 10px;
display: flex;
flex-direction: row;
align-items: baseline;
& > span {
display: inline-block;
white-space: pre-wrap;
}
.label-span{
width: 100px;
}
.value-span{
width: 0;
flex: 1;
overflow: hidden;
white-space: pre-wrap;
word-break: break-all;
}
}
}
}
.panel-cell + .panel-cell{
margin-left: 10px;
}
}
</style>
@@ -1,13 +1,386 @@
<!--企业端的会员管理的相关信息 -->
<template>
<div>会员管理</div>
<div class='main-box'>
<a-card :bordered="false">
<!--企业端-编辑框-->
<div>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<!--会员表头信息-->
<a-row :span="24">
<a-col :span="6">
<a-form-item label="会员编号" :labelCol="labelColTopInfo" :wrapperCol="wrapperColTopInfo">
<label v-text="memberInfo.memberNo"></label>
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="注册时间" :labelCol="labelColTopInfo" :wrapperCol="wrapperColTopInfo">
<label v-text="memberInfo.registerTime"></label>
</a-form-item>
</a-col>
<!-- 会员性质 会员回显 管理员为下拉框-->
<a-col :span="6">
<a-form-item label="会员性质" :labelCol="labelColTopInfo" :wrapperCol="wrapperColTopInfo">
<label v-text="memberNature"></label>
</a-form-item>
</a-col>
<!-- 会员单位 --显示批复文号 的相关信息-->
<a-col :span="6" v-if="memberInfo.memberStatus === 3 ">
<a-form-item label="会员批复文件" :labelCol="labelColTopInfo" :wrapperCol="wrapperColTopInfo">
<!-- 如果当前没有批复文号 不显示 会员批复文件-->
<span v-if="currentApproval" class="approveFile" @click="uploadApproveFile(memberInfo)">会员批复文件.pdf</span>
</a-form-item>
</a-col>
</a-row>
<a-row :span="24">
<a-col :span='6'>
<a-form-item label='会员状态' :labelCol='labelColTopInfo' :wrapperCol='wrapperColTopInfo'>
<span
data-v-fd11489c=''
class='ant-tag ant-tag-yellow'
v-if='memberInfo.memberStatus === 1'>待审核</span>
<span data-v-fd11489c='' class='ant-tag ant-tag-blue' v-if='memberInfo.memberStatus === 2'>未缴费</span>
<span
data-v-fd11489c=''
class='ant-tag ant-tag-green'
v-if='memberInfo.memberStatus === 3'>已缴费</span>
<span
data-v-fd11489c=''
class='ant-tag ant-tag-gray'
v-if='memberInfo.memberStatus === 4'>会员已过期</span>
<span class='red'>会员还剩<b>{{ remainingTime }}</b>天</span>
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="会员生效日期" :labelCol="labelColTopInfo" :wrapperCol="wrapperColTopInfo">
<label>{{ memberInfo.validDate ? memberInfo.validDate.split('~')[0] : '' }}</label>
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="会员失效日期" :labelCol="labelColTopInfo" :wrapperCol="wrapperColTopInfo">
<label>{{ memberInfo.validDate ? memberInfo.validDate.split('~')[1] : '' }}</label>
</a-form-item>
</a-col>
<!-- 副理事会长才显示推荐表-->
<a-col :span="6" v-if="memberInfo.memberNature === 1 ">
<a-form-item label="推荐表" :labelCol="labelColTopInfo" :wrapperCol="wrapperColTopInfo">
<span class="approveFile" @click="downRecommendWord(memberInfo.recommendWordId)">{{ memberInfo.recommendWordName }}</span>
</a-form-item>
</a-col>
</a-row>
<div>
<div class="row clearfix">
<div class="col-md-12 column">
<a-tabs @change="switchNav" :animated='false'>
<a-tab-pane key="1" tab="会员信息">
<member-info v-if='navIndex === 1' ref='memberInfoDom' :member-info='memberInfo'></member-info>
</a-tab-pane>
<a-tab-pane key="2" tab="缴费记录">
<payment-info v-if='navIndex === 2' ref='paymentInfo' :member-info='memberInfo'></payment-info>
</a-tab-pane>
<a-tab-pane key="3" tab="证书记录">
<certificate-info v-if='navIndex === 3' ref='certificateInfo' :member-info='memberInfo'></certificate-info>
</a-tab-pane>
<a-tab-pane key="4" tab="单位名称变更记录">
<company-name-apply-record v-if='navIndex === 4' ref='companyNameApplyRecord' :member-info='memberInfo'></company-name-apply-record>
</a-tab-pane>
<a-tab-pane key="5" tab="资源下载记录">
<download-record v-if='navIndex === 5' ref='downloadRecord' :member-info='memberInfo'></download-record>
</a-tab-pane>
</a-tabs>
</div>
</div>
</div>
</a-form>
<div class="center">
<template v-if="navIndex === 1">
<a-button type="primary" @click="handleOk">确定</a-button>
<a-button style="margin-left: 10px;" class="mt-10" @click="handleCancel">取消</a-button>
</template>
</div>
</a-spin>
</div>
</a-card>
</div>
</template>
<script>
// eslint-disable-next-line no-unused-vars
import { getAction, getFileAccessHttpUrl, httpAction, downloadFile } from '@api/memberManage'
import { queryApprovalNo, getEncryptedString } from '../../api/standardsAssociationApi'
import Vue from 'vue'
import { USER_INFO } from '@/store/mutation-types'
import { JSEncrypt } from 'jsencrypt'
// 会员的基础信息
import MemberInfo from './memberInfo/MemberInfo'
// 缴费信息
import PaymentInfo from './memberInfo/PaymentInfo'
// 证书记录的相关信息
import CertificateInfo from './memberInfo/CertificateInfo'
// 单位名称变更记录
import CompanyNameApplyRecord from './memberInfo/CompanyNameApplyRecord'
// 资源下载记录
import DownloadRecord from './memberInfo/DownloadRecord'
export default {
name: 'MemberManagement'
name: 'MemberManagement',
components: {
MemberInfo,
PaymentInfo,
CertificateInfo,
CompanyNameApplyRecord,
DownloadRecord
},
data() {
return {
form: this.$form.createForm(this),
userId: Vue.ls.get(USER_INFO).id,
// 入会申请表
applicationWordName: '',
// 推荐表副理事显示
wordFlag: '',
// 会员剩余时间
remainingTime: 0,
// 当前是否有批复文号
currentApproval: false,
// 整个页面加载的标志
confirmLoading: false,
// 会员上面信息的label布局
labelColTopInfo: {
xl: { span: 8 },
sm: { span: 11 },
xs: { span: 24 }
},
// 会员上面信息的wrapper布局
wrapperColTopInfo: {
xl: { span: 16 },
xs: { span: 24 },
sm: { span: 13 }
},
// 会员对象
memberInfo: {},
// 导航索引:
navIndex: 1,
url: {
add: '/memberInfo/memberInfo/add',
edit: '/memberInfo/memberInfo/edit',
detail: '/memberInfo/memberInfo/queryById'
}
}
},
computed: {
memberNature() {
switch (this.memberInfo.memberNature) {
case 1:
return '副理事单位'
case 2:
return '理事单位'
case 3:
return '会员单位'
default: return ''
}
}
},
methods: {
// 会员批复文件下载
uploadApproveFile(val) {
const url = `/memberInfo/memberInfo/downloadApprovalPdf?companyName=${encodeURIComponent(val.companyName)}&memberId=${val.id}`
downloadFile(url, '会员批复文件.pdf')
},
// tab按钮的切换
switchNav(index) {
this.navIndex = Number(index)
},
/*
* 会员推荐表下载
* */
downRecommendWord(text) {
if (!text) {
this.$message.warning('未知的文件')
return
}
if (text.indexOf(',') > 0) {
text = text.substring(0, text.indexOf(','))
}
const url = getFileAccessHttpUrl(text)
window.open(url, '_self')
},
/*
* 查询当前是否有批复文号
* */
queryExistApproval(record) {
const param = {
memberId: record.id
}
queryApprovalNo(param).then(res => {
// null 说明该会员没有批复文号
if (res.result === null) {
this.currentApproval = false
} else {
this.currentApproval = true
}
})
},
// 取消 回到初始列表页
handleCancel() {
// this.$router.push('/member/memberInfo/MemberInfoList')
// this.$router.history.go(-1)
this.$refs.memberInfoDom && this.$refs.memberInfoDom.initData(this.memberInfo)
},
handleOk() {
// 首页校验 会员单位信息的form 表单的数据是否正确
const that = this
// this.$refs.memberInfoDom.form.validateFields()
this.$refs.memberInfoDom.form.validateFields((err, values) => {
if (!err) {
that.confirmLoading = true
let httpurl = ''
let method = ''
if (!this.model.id) {
httpurl += this.url.add
method = 'post'
} else {
httpurl += this.url.edit
method = 'put'
}
const formData = Object.assign(this.model, values)
let encrypt = new JSEncrypt()
encrypt.setPublicKey(that.encryptedString)
formData.standardPhone = encrypt.encrypt(values.standardPhone)
formData.standardMobile = encrypt.encrypt(values.standardMobile)
formData.standardEmail = encrypt.encrypt(values.standardEmail)
formData.mobile = encrypt.encrypt(values.mobile)
formData.phone = encrypt.encrypt(values.phone)
formData.email = encrypt.encrypt(values.email)
formData.rsapublickey = that.encryptedString
console.log('表单提交数据', JSON.stringify(formData))
httpAction(httpurl, formData, method).then((res) => {
if (res.success) {
that.$message.success(res.message)
// 重新更新页面的选择
that.getMemberInfo()
} else {
that.$message.warning(res.message)
}
}).finally(() => {
that.confirmLoading = false
})
}
})
},
/*
* 获取会员的详细信息
* */
getMemberInfo() {
// const url = this.url.detail + '?id=' + this.$route.query.id
// todo 暂时写死用户,后续在user等信息中调取
const url = this.url.detail + '?id=' + '1413419593870872578'
// 会员剩余天数
this.pageType = this.$route.query.pageType
getAction(url).then(res => {
if (res.success) {
this.edit(res.result)
this.remainingTime = this.remainingTimeCount(res.result.validDate)
this.$nextTick(() => {
this.$refs.memberInfoDom && this.$refs.memberInfoDom.initData(res.result)
})
}
if (res.code === 510) {
this.$message.warning(res.message)
}
})
},
// 获得加密公钥的方法
getEncryptedStringFunc() {
getEncryptedString().then((res) => {
this.encryptedString = res.result
})
},
add() {
this.edit({})
},
edit(record) {
// 记录之前的单位全称
this.originCompanyName = record.companyName
this.form.resetFields()
this.model = Object.assign({}, record)
this.wordFlag = this.model.memberNature
this.memberInfo = record
this.memberId = record.id
// 查询会员是否有批复文号
this.queryExistApproval(record)
// getFilesByIds({ ids: record.applicationWordId }).then(res => {
// if (res.success) {
// this.applicationWordName = res.result[0].fileName || ''
// }
// })
},
// 计算会员剩余天数
remainingTimeCount: function(date) {
if (date === null || date === undefined || date.length === 0) {
return 0
}
date = date.substring(11)
console.log(date)
var strArr = (date + ' 23:59:59').split(' ')
console.log(strArr[0])
var strDay = strArr[0].split('-')
var strTime = strArr[1].split(':')
var yy = strDay[0]
var mm = strDay[1]
var dd = strDay[2]
var hh = strTime[0]
var mi = strTime[1]
var se = strTime[2]
var date1 = new Date(Date.UTC(yy, mm - 1, dd, hh - 8, mi, se))
var date2 = new Date()
if (date1 <= date2) {
return 0
}
// var miao = (date1.getTime() - date2.getTime()) / 1000
var fen = ((date1.getTime() - date2.getTime()) / 1000) / 60
return parseInt(fen / (24 * 60)) // 得出剩bai余
}
},
created() {
this.pageType = this.$route.query.pageType
// 当前默认选中的tab页
this.navIndex = Number(this.$route.query.navIndex) || 1
// 不是跳转第一页的时候,触发相应的点击事件
if (this.navIndex !== 1) {
this.switchNav(this.navIndex)
}
// 获得会员的相关信息
this.getMemberInfo()
// 获得公钥的相关信息
this.getEncryptedStringFunc()
}
}
</script>
<style scoped>
<style scoped lang='less'>
@import '~@assets/less/common.less';
// 会员批复文件的样式
.approveFile {
color: #219AFF;
cursor: pointer;
margin-left: 10px;
}
.red {
color: red;
}
// 2021-09-23 标题部分的修改
/deep/.member-panel-title{
height: 48px;
line-height: 48px;
background: rgba(6,159,153,0.1);
font-size: 16px;
width: calc(100% - 0px);
color: #2F3133;
padding-left: 20px;
margin: 10px 0px;
}
</style>
</style>
@@ -0,0 +1,241 @@
<!--会员管理-证书的相关信息-->
<template>
<div class='table-page-search-wrapper certificate-info-container'>
<a-form layout="inline">
<a-row :span="24" class="create-date-row" :gutter="24">
<a-col :span="8">
<a-form-item label="证书代码" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :maxLength="50" v-model="queryParam.code" placeholder="请输入证书代码"></a-input>
</a-form-item>
</a-col>
<a-col :span="8" class="ope-col">
<a-button class="btn btn-primary" type="primary" @click="vinQuery" icon="search">
查询
</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 5px">
重置
</a-button>
</a-col>
</a-row>
</a-form>
<div class="row clearfix">
<div class="col-md-12 column">
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
@change="handleTableChange"
class="j-table-force-nowrap">
</a-table>
</div>
</div>
</div>
</template>
<script>
import { getAction } from '../../../api/memberManage'
import { JeroListMixin } from '../../../mixins/JeroListMixin'
import { RangeDateMixin} from '../../../mixins/RangeDateMixin'
export default {
name: 'CertificateInfo',
mixins: [
JeroListMixin,
RangeDateMixin
],
components: {
},
props: {
memberInfo: {
type: Object,
required: false,
default: () => {
return {}
}
}
},
watch: {
memberInfo() {
this.filters.memberId = this.memberInfo.id
}
},
data() {
return {
// VIN证书信息头
columns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function(t, r, index) {
return parseInt(index) + 1
}
},
{
title: '证书代码',
align: 'center',
dataIndex: 'code'
},
{
title: '证书类型',
align: 'center',
dataIndex: 'certificateType',
customRender: function(text) {
if (text === 1) {
return '世界制造厂识别代号(WMI)证书'
} else if (text === 2) {
return '企业名称代号证书'
}
}
},
{
title: '生效日期',
align: 'center',
dataIndex: 'effectDate'
},
{
title: '到期日期',
align: 'center',
dataIndex: 'invalidDate'
},
{
title: '会员绑定证书',
align: 'center',
dataIndex: 'certificateStatusTemp',
customRender: function(text, record) {
if (record.isBind === 2) {
return '是'
} else {
return '否'
}
}
},
{
title: '换证',
align: 'center',
dataIndex: 'certificateModality',
customRender: function(text) {
if (text === 1) {
return '是'
} else {
return '否'
}
}
},
// 证书状态(1:已绑定,2:已提交,3:已处理,4:正常使用,5:已失效)
{
title: '状态',
align: 'center',
dataIndex: 'certificateStatus',
customRender: function(text) {
if (text === 1) {
return '已绑定'
} else if (text === 2) {
return '已支付'
} else if (text === 3) {
return '已缴费'
} else if (text === 4) {
return '正常使用'
} else if (text === 5) {
return '已失效'
} else if (text === 6) {
return '已驳回'
} else if (text === 0) {
return '待支付'
} else if (text === 7) {
return '绑定已失效'
}
}
}],
dataSource: [],
// 会员单位下面的信息
labelCol: {
xxl: { span: 8 }, // ≥1600px
xl: { span: 11 }, // ≥1200px
md: { span: 12 }, // ≥768px
sm: { span: 24 }, // ≥576px
xs: { span: 24 } // <576px
},
wrapperCol: {
xxl: { span: 16 }, // ≥1600px
xl: { span: 13 }, // ≥1200px
md: { span: 12 }, // ≥768px
sm: { span: 24 }, // ≥576px
xs: { span: 24 } // <576px
},
// 日期组件查询的key值
dateKeyObj: {
beginKey: 'submissionTime_begin',
endKey: 'submissionTime_end'
},
url: {
list: '/vinCertificate/vinCertificate/getVinCertificateModelByMemberId'
}
}
},
methods: {
loadData(arg) {
if(!this.url.list){
this.$message.error('请设置url.list属性!')
return
}
//加载数据 若传入参数1则加载第一页的内容
if (arg === 1) {
this.ipagination.current = 1
}
var params = this.getQueryParams()//查询条件
this.loading = true
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
this.dataSource = res.result.records||res.result
if(res.result.total)
{
this.ipagination.total = res.result.total
//清空列表选中
// this.onClearSelected()
}else{
this.ipagination.total = 0
}
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
}
if(res.code===510){
this.$message.warning(res.message)
}
this.loading = false
})
},
// 证书查询
vinQuery() {
if (this.queryParam.code) {
this.searchQuery()
} else {
this.$message.warning('请输入证书代码')
}
},
// 初始化数据
initData() {
this.searchReset()
}
},
created() {
console.log('&&*****证书记录****')
this.filters.memberId = this.memberInfo.id
this.searchReset()
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,239 @@
<!--单位 名称 变更申请-->
<template>
<div class='company-name-apply-record'>
<table-component
:columns="columnsChangeApprove"
:data-source="changeApproveData"
:page-type="4"
:expand-row-by-click="true"
:pagination="ipagination"
:is-loading="loading"
@ok="getChangeHistoryData"
@edit="handleApproveEdit">
</table-component>
<!-- 变更申请模态框-->
<!-- <change-company-modal ref="changeCompany" @ok="getChangeHistoryData"></change-company-modal>-->
</div>
</template>
<script>
import { getAction } from '../../../api/memberManage'
import TableComponent from './modules/TableComponent'
export default {
name: 'CompanyNameApplyRecord',
components: {
TableComponent
},
props: {
memberInfo: {
type: Object,
required: false,
default: () => {
return {}
}
}
},
watch: {
memberInfo() {
this.filters.memberId = this.memberInfo.id
}
},
data() {
return {
// 单位变更表格表头
columnsChangeApprove: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function(t, r, index) {
return parseInt(index) + 1
}
},
{
title: '变更前',
align: 'center',
dataIndex: 'originCompanyName',
key: 'originCompanyName'
},
{
title: '变更后',
align: 'center',
dataIndex: 'changeCompanyName',
key: 'changeCompanyName'
},
{
title: '工商注册变更证明',
align: 'center',
dataIndex: 'registerChangeProve',
key: 'registerChangeProve',
scopedSlots: { customRender: 'imgSlot' }
},
{
title: '操作人',
align: 'center',
dataIndex: 'operatorName',
key: 'operatorName'
},
{
title: '操作时间',
align: 'center',
dataIndex: 'createTime',
key: 'createTime'
},
{
title: '状态',
align: 'center',
key: 'status1',
scopedSlots: { customRender: 'status' }
},
{
title: '审批人',
align: 'center',
dataIndex: 'checkerName',
key: 'checkerName'
},
{
title: '审批时间',
align: 'center',
dataIndex: 'checkTime',
key: 'checkTime'
},
{
title: '审批结果',
align: 'center',
dataIndex: 'status',
key: 'status',
customRender: function(text) {
switch (text) {
case 1:
return '待审核'
case 2:
return '已驳回'
case 3:
return '已完成'
}
}
},
{
title: '审批意见',
align: 'center',
dataIndex: 'checkMark',
key: 'checkMark',
scopedSlots: { customRender: 'textSlot' }
},
{
title: '操作',
dataIndex: 'action',
align: 'center',
scopedSlots: { customRender: 'action' }
}
],
// 单位申请变更数据源
changeApproveData: [],
/* 分页参数 */
ipagination:{
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30', '50', '100'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' 共' + total + '条'
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
loading: false,
// 其他查询的参数
filters: {}
}
},
methods: {
/*
* 获取单位变更表数据
* */
getChangeHistoryData(val) {
if (val) {
this.ipagination = Object.assign({}, val)
}
const params = {
memberId: this.filters.memberId,
pageNo: this.ipagination.current,
pageSize: this.ipagination.pageSize
}
this.changeApproveData = []
this.loading = true
getAction('/memberInfo/companyNameRecord/cascadingList', params).then(res => {
if (res.success) {
this.changeApproveData = res.result.records
// 处理变更申请记录 中子集为空的情况,防止左侧出现展开的图标
this.changeApproveData.map(item => {
item.isParent = true
if (item.children && item.children.length === 0) {
item.children = null
}
// 待审核不显示备注信息
if (item.status === 1) {
item.checkMark = null
}
// 返回多个工商注册证明
if (item.registerChangeProve.includes(',')) {
item.registerChangeProve = item.registerChangeProve.split(',')
} else {
item.registerChangeProve = [item.registerChangeProve]
}
// 处理子数组 图片
if (item.children && item.children.length > 0) {
item.children.forEach(itemChild => {
if (itemChild.registerChangeProve.includes(',')) {
itemChild.registerChangeProve = itemChild.registerChangeProve.split(',')
} else {
itemChild.registerChangeProve = [itemChild.registerChangeProve]
}
})
}
})
this.ipagination.total = res.result.total
}
}).finally(() => {
this.loading = false
})
},
/*
* 单位变更表编辑
* */
handleApproveEdit(record) {
this.$refs.changeCompany.originCompanyName = record.originCompanyName
this.$refs.changeCompany.memberId = this.$route.query.id
this.$refs.changeCompany.recordId = record.id
this.$refs.changeCompany.listEdit = true
this.$refs.changeCompany.edit(record)
// 是否已经发起变更
// this.$refs.changeCompany.companyNameApply = this.memberInfo.companyNameApply
this.$refs.changeCompany.title = '变更申请'
this.$refs.changeCompany.visible = true
},
searchReset() {
this.ipagination.current = 1
this.ipagination.pageSize = 10
this.getChangeHistoryData()
},
// 初始化数据的方法
initData() {
this.searchReset()
}
},
created() {
console.log('&&*****单位名称变更申请记录****')
this.filters.memberId = this.memberInfo.id
this.searchReset()
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,130 @@
<!--下载的记录 -->
<template>
<div class='download-record'>
<table-component
:columns="columnsDownFile"
:data-source="downFileData"
:page-type="5"
:pagination="ipagination"
:is-loading="loading"
@ok="getDownFileList">
</table-component>
</div>
</template>
<script>
import { postAction} from '../../../api/memberManage'
import TableComponent from './modules/TableComponent'
export default {
name: 'DownloadRecord',
components: {
TableComponent
},
props: {
memberInfo: {
type: Object,
required: false,
default: () => {
return {}
}
}
},
data() {
return{
// 资源下载表头
columnsDownFile: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function(t, r, index) {
return parseInt(index) + 1
}
},
{
title: '文件类别',
align: 'center',
dataIndex: 'moduleName'
},
{
title: '文件名称',
align: 'center',
dataIndex: 'fileName',
scopedSlots: { customRender: 'fileSlot' }
},
{
title: '下载时间',
align: 'center',
dataIndex: 'createTime'
}
],
// 资源下载数据源
downFileData: [],
/* 分页参数 */
ipagination:{
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30', '50', '100'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' 共' + total + '条'
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
loading: false,
url: {
list: '/attendmeetings/attendMeetings/dataDownloadRecord'
}
}
},
methods: {
/*
* 获取资料下载表数据
* */
getDownFileList(val) {
if (val) {
this.ipagination = val
}
if (this.memberInfo.id) {
const params = {
userId: this.memberInfo.id,
pageNo: this.ipagination.current,
pageSize: this.ipagination.pageSize
}
this.downFileData = []
this.loading = true
postAction(this.url.list, params).then(res => {
if (res.success) {
this.downFileData = res.result.records
this.ipagination.total = res.result.total
}
}).finally(() => {
this.loading = false
})
}
},
searchReset() {
this.ipagination.current = 1
this.ipagination.pageSize = 10
this.getDownFileList()
},
// 初始化数据的方法
initData() {
this.searchReset()
}
},
created() {
console.log('&&*****资源下载记录****')
// this.filters.memberId = this.memberInfo.id
this.searchReset()
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,636 @@
<!--会员信息-->
<template>
<div class='member-info'>
<a-form :form="form">
<div class="row clearfix">
<div class="column">
<p class='member-panel-title'>单位信息</p>
</div>
</div>
<a-row :span="24" class='label-width-row'>
<a-col :span="16">
<a-form-item label="单位全称" :labelCol="labelCol1" :wrapperCol="wrapperCol1">
<a-input
disabled
:maxLength="50"
v-decorator="['companyName',validatorRules.companyName]"
placeholder="请输入单位全称"></a-input>
<!--会员审核通过后 会员才能查看-->
<a-button
v-has="'memberInfo:companyNameRecord:add'"
v-if="memberInfo.memberStatus === 3"
class="btn btn-primary changeCompany"
type="primary"
@click="changeCompanyName"
style="z-index: 1000">变更申请
</a-button>
</a-form-item>
</a-col>
</a-row>
<a-row :span="24" class='label-width-row'>
<a-col :span="16">
<a-form-item label="用户昵称" :labelCol="labelCol1" :wrapperCol="wrapperCol1">
<a-input @change="event => event.target.value = event.target.value.trim()" v-decorator="[ 'realname', validatorRules.realname]" placeholder="请输入用户昵称" :maxLength="50"></a-input>
</a-form-item>
</a-col>
</a-row>
<a-row :span="24" class='label-width-row'>
<a-col :span="16">
<a-form-item label="隶属部门/集团" :labelCol="labelCol1" :wrapperCol="wrapperCol1">
<a-input
:maxLength="50"
v-decorator="['companyDepartment']"
placeholder="请输入隶属部门/集团"></a-input>
</a-form-item>
</a-col>
</a-row>
<a-row :span="24" class='label-width-row'>
<a-col :span="16">
<a-form-item label="单位性质" :labelCol="labelCol1" :wrapperCol="wrapperCol1">
<j-multi-select-tag
v-decorator="['companyNature',validatorRules.companyNature]"
:options="dictOptions"
type="checkbox">
</j-multi-select-tag>
</a-form-item>
</a-col>
</a-row>
<a-row :span="24" class='label-width-row'>
<a-col :span="16">
<a-form-item label="主要业务或主要产品简介" :labelCol="labelCol1" :wrapperCol="wrapperCol1">
<a-textarea
:maxLength="500"
rows="5"
v-decorator="['companyBusinessDesc',validatorRules.companyBusinessDesc]"/>
</a-form-item>
</a-col>
</a-row>
<a-row :span="24" class='label-width-row'>
<a-col :span="16">
<a-form-item label="营业执照复印件" :labelCol="labelCol1" :wrapperCol="wrapperCol1">
<j-image-upload
:number="10"
bizPath="payment"
isMultiple
v-decorator="['businessLicenseFileId', validatorRules.businessLicenseFileId]"></j-image-upload>
</a-form-item>
</a-col>
</a-row>
<!-- 标准化部门信息-->
<div class="row clearfix">
<div class="column">
<p class='member-panel-title'>标准化部门信息</p>
</div>
</div>
<a-row :span="24" class='label-width-row'>
<a-col :span="8">
<a-form-item label="标准化部门(主管/监管)" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
v-decorator="['standardDepartment',validatorRules.standardDepartment]"
placeholder="请输入标准化部门"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="标准化工作负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
v-decorator="['standardLeadingMan',validatorRules.standardLeadingMan]"
placeholder="请输入标准化工作负责人"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="固定电话" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
v-decorator="['standardPhone',validatorRules.standardPhone]"
placeholder="请输入固定电话"></a-input>
</a-form-item>
</a-col>
</a-row>
<a-row :span="24" class='label-width-row'>
<a-col :span="8">
<a-form-item label="手机" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
v-decorator="['standardMobile',validatorRules.standardMobile]"
placeholder="请输入手机"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="E-mail" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
v-decorator="['standardEmail',validatorRules.standardEmail]"
placeholder="请输入E-mail"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
v-decorator="['standardPost',validatorRules.standardPost]"
placeholder="请输入职务"></a-input>
</a-form-item>
</a-col>
</a-row>
<a-row :span="24" class='label-width-row joined-col'>
<a-col :span="8" >
<a-form-item label="已加入的行业组织/协会/团体/联盟/委员会等" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
v-decorator="['industrialOrganization']"
placeholder="请输入已加入的行业组织/协会/团体/联盟/委员会等"></a-input>
</a-form-item>
</a-col>
</a-row>
<!--联系人信息-->
<div class="row clearfix">
<div class="column">
<p class='member-panel-title'>联系人信息</p>
</div>
</div>
<a-row :span="24" class='label-width-row'>
<a-col :span="8">
<a-form-item label="联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
v-decorator="['liaisonMan',validatorRules.liaisonMan]"
placeholder="请输入联系人"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="手机" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
:disabled="isDisabledAuth('member.phone')"
v-decorator="['mobile',validatorRules.mobile]"
placeholder="请输入手机"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="固定电话" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
v-decorator="['phone',validatorRules.phone]"
placeholder="请输入固定电话"></a-input>
</a-form-item>
</a-col>
</a-row>
<a-row :span="24" class='label-width-row'>
<a-col :span="8">
<a-form-item label="E-mail" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
v-decorator="['email',validatorRules.email]"
placeholder="请输入E-mail"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="通讯地址" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
v-decorator="['address',validatorRules.address]"
placeholder="请输入通讯地址"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="邮编" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
v-decorator="['postcode',validatorRules.postcode]"
placeholder="请输入邮编"></a-input>
</a-form-item>
</a-col>
</a-row>
<!--发票信息-->
<div class="row clearfix">
<div class="column">
<p class='member-panel-title'>发票信息</p>
</div>
</div>
<a-row :span="24" class='label-width-row'>
<a-col :span="8">
<a-form-item label="关联付款发票名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
v-decorator="['invoiceInfo', validatorRules.invoiceInfo]"
placeholder="请输入关联付款发票名称"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="社会统一代码/税号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
v-decorator="['taxNo', validatorRules.taxNo]"
placeholder="请输入社会统一代码/税号"></a-input>
</a-form-item>
</a-col>
<!-- 2021-09-23 增加 单位地址 -->
<a-col :span="8">
<a-form-item label="单位地址" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
@change="event => event.target.value = event.target.value.trim()"
v-decorator="[ 'invoiceAddress', validatorRules.invoiceAddress]"
placeholder="请输入单位地址"
:maxLength="50"
></a-input>
</a-form-item>
</a-col>
</a-row>
<!-- 2021-09-23 增加 电话号码 开户银行 银行账户-->
<a-row :span="24" class='label-width-row'>
<a-col :span="8">
<a-form-item label="电话号码" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
v-decorator="[ 'invoicePhone', validatorRules.invoicePhone]"
placeholder="请输入电话号码"
:maxLength="50"
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9|-]/g,'')}"
></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="开户银行" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
@change="event => event.target.value = event.target.value.trim()"
v-decorator="[ 'depositBank', validatorRules.depositBank]"
placeholder="请输入开户银行"
:maxLength="50"
></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="银行账户" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
v-decorator="[ 'bankAccount', validatorRules.bankAccount]"
placeholder="请输入银行账户"
:maxLength="50"
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9]/g,'')}"
></a-input>
</a-form-item>
</a-col>
</a-row>
<div class="row clearfix">
<div class="column">
<p class='member-panel-title'>入会申请表</p>
</div>
</div>
<a-row :span="24" class='label-width-row'>
<a-col :span="12">
<a-form-item label="入会申请表" :labelCol="labelCol" :wrapperCol="wrapperCol">
{{applicationWordName}}
<span class="preview" @click="previewApplyPdf(memberInfo.applicationWordId)">预览</span>
<span class="download" @click="downApplyPdf(memberInfo.applicationWordId)">下载</span>
</a-form-item>
</a-col>
<a-col :span="12"></a-col>
</a-row>
</a-form>
</div>
</template>
<script>
import JImageUpload from '../../../components/standardsAssociation/JImageUpload'
import JMultiSelectTag from '../../../components/dict/JMultiSelectTag'
import { previewPdf, getFilesByIds } from '../../../api/standardsAssociationApi'
import { getFileAccessHttpUrl } from '../../../api/memberManage'
import { DisabledAuthFilterMixin } from '@/mixins/DisabledAuthFilterMixin'
import pick from 'lodash.pick'
import Vue from 'vue'
export default {
name: 'MemberInfo',
components: {
JImageUpload,
JMultiSelectTag
},
props: {
// 会员对象
memberInfo: {
type: Object,
required: false,
default: () => {
return {}
}
}
},
mixins: [
DisabledAuthFilterMixin
],
data() {
return {
form: this.$form.createForm(this),
// 会员单位下面的信息
labelCol: {
xxl: { span: 8 }, // ≥1600px
xl: { span: 11 }, // ≥1200px
md: { span: 12 }, // ≥768px
sm: { span: 24 }, // ≥576px
xs: { span: 24 } // <576px
},
wrapperCol: {
xxl: { span: 16 }, // ≥1600px
xl: { span: 13 }, // ≥1200px
md: { span: 12 }, // ≥768px
sm: { span: 24 }, // ≥576px
xs: { span: 24 } // <576px
},
// 单位信息面板的样式
labelCol1: {
lg: { span: 6 },
md: { span: 5 },
sm: { span: 7 },
xs: { span: 24 }
},
wrapperCol1: {
lg: { span: 18 },
md: { span: 18 },
xs: { span: 24 },
sm: { span: 14 }
},
validatorRules: {
memberStatus: {
rules: [{ required: true, message: '请选择会员状态' }]
},
realname: { rules: [{ required: true, message: '请输入用户昵称' }], validateTrigger: 'blur' },
recommendWord: {
rules: [{ required: true, message: '请上传推荐表' }]
},
approvalStatus: {
rules: [{ required: true, message: '请选择审批结果' }]
},
taxNo: {
rules: [
{ required: true, message: '请输入单位社会统一代码/税号', validateTrigger: 'blur' },
// { pattern: /^[A-Z0-9]{15}$|^[A-Z0-9]{17}$|^[A-Z0-9]{18}$|^[A-Z0-9]{20}$/, message: '15位、17位、18位、20位数字和大写英文字母' }
{ pattern: /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/, message: '请输入15位、18位的社会统一代码/税号' }
],
validateTrigger: 'blur'
},
headerName: {
rules: [
{ required: true, message: '请输入关联付款发票名称' },
{ min: 1, max: 50, message: '长度不超过50个字符' }
]
},
type: { rules: [{ required: true, message: '请选择类型!' }] },
state: { rules: [{ required: true, message: '请选择是否仅教师可见!' }] },
title: {
rules: [
{ required: true, message: '请输入标题!' },
{ min: 1, max: 50, message: '标题长度不超过50个字符' }
]
},
companyName: {
rules: [
{ required: true, message: '请输入单位全称!' },
{ min: 1, max: 50, message: '单位全称长度不超过50个字符' }
]
},
companyDepartment: {
rules: [
{ required: true, message: '请输入隶属部门/集团!' },
{ min: 1, max: 50, message: '隶属部门/集团长度不超过50个字符' }
]
},
businessLicenseFileId: {
rules: [
{ required: true, message: '请上传营业执照复印件' }
],
validateTrigger: ['blur', 'change']
},
companyBusinessDesc: {
rules: [
{ required: true, message: '请输入主要业务或主要产品简介!' },
{ min: 1, max: 500, message: '主要业务或主要产品简介的长度不超过500个字符' }
]
},
companyNature: { rules: [{ required: true, message: '请至少选择一个单位性质!' }] },
standardDepartment: {
rules: [
{ required: true, message: '请输入标准化部门!' },
{ min: 1, max: 50, message: '标准化部门长度不超过50个字符' }
]
},
standardLeadingMan: {
rules: [
{ required: true, message: '请输入标准化工作负责人!' },
{ min: 1, max: 50, message: '标准化工作负责人长度不超过50个字符' }
]
},
standardPhone: {
rules: [
{ required: false, message: '请输入固定电话!' },
{ pattern: /^((0\d{2,3}-\d{7,8}))$/, message: '请输入正确的固定电话号码,例如: 022-87491024' }
]
},
standardMobile: {
rules: [
{ required: true, message: '请输入手机!' },
{ min: 1, max: 50, message: '手机长度不超过50个字符' },
{ pattern: /^1[34578]\d{9}$/, message: '请输入正确的手机号' }
]
},
standardEmail: {
rules: [
{ required: true, message: '请输入E-mail!' },
{ min: 1, max: 50, message: 'E-mail长度不超过50个字符' },
{ pattern: /^\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/, message: '请输入正确的邮箱地址' }
]
},
standardPost: {
rules: [
{ required: true, message: '请输入职务!' },
{ min: 1, max: 50, message: '职务长度不超过50个字符' }
]
},
standardSoleDutyCount: {
rules: [
{ required: true, message: '请输入标准化专职人数!' },
{ pattern: /^\d{0,9}$/, message: '人数只能为9位以内数字' }
]
},
standardConcurrentCount: {
rules: [
{ required: true, message: '请输入标准化兼职人数!' },
{ pattern: /^\d{0,9}$/, message: '人数只能为9位以内数字' }
]
},
liaisonMan: {
rules: [
{ required: true, message: '请输入联系人!' },
{ min: 1, max: 50, message: '联系人不超过50个字符' }
]
},
mobile: {
rules: [
{ required: true, message: '请输入手机!' },
{ min: 1, max: 50, message: '手机号码不超过50个字符' },
{ pattern: /^1[34578]\d{9}$/, message: '请输入正确的手机号' }
]
},
phone: {
rules: [
{ required: false, message: '请输入固定电话!' },
{ pattern: /^((0\d{2,3}-\d{7,8}))$/, message: '请输入正确的固定电话号码,例如: 022-87491024' }
]
},
email: {
rules: [
{ required: true, message: '请输入E-mail!' },
{ pattern: /^\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/, message: '请输入正确的邮箱地址' }
]
},
address: {
rules: [
{ required: true, message: '请输入通讯地址!' },
{ min: 1, max: 50, message: '通讯地址不超过50个字符' }
]
},
postcode: {
rules: [
{ required: true, message: '请输入邮编!' },
{ pattern: /^[0-9]\d{5}$/, message: '请输入正确的邮编', validateTrigger: 'onBlur' },
{ min: 1, max: 50, message: '邮编不超过50个字符' }
]
},
invoiceInfo: { rules: [{ required: true, message: '请输入关联付款发票名称' }], validateTrigger: 'blur' },
invoiceAddress: { rules: [{ required: true, message: '请输入单位地址' }], validateTrigger: 'blur' },
invoicePhone: { rules: [{ required: true, validator: this.handleInvoicePhoneCheck }], validateTrigger: 'blur' },
depositBank: { rules: [{ required: true, message: '请输入开户银行' }], validateTrigger: 'blur' },
bankAccount: { rules: [{ required: true, message: '请输入银行账户' }], validateTrigger: 'blur' }
},
// 单位性质
dictOptions: [
{
label: '集团公司',
value: '1'
}, {
label: '事业单位',
value: '2'
}, {
label: '高校',
value: '3'
}, {
label: '科研/检测机构',
value: '4'
}, {
label: '乘用车企业',
value: '5'
}, {
label: '客车企业',
value: '6'
}, {
label: '商用车企业',
value: '7'
}, {
label: '专用车企业',
value: '8'
}, {
label: '零部件企业',
value: '9'
}, {
label: '摩托车企业',
value: '10'
}, {
label: '其他',
value: '11'
}],
// 入会申请表
applicationWordName: ''
}
},
methods: {
// 获得入会申请表的相关信息
getApplyPdfFilesByIds() {
getFilesByIds({ ids: this.memberInfo.applicationWordId }).then(res => {
if (res.success) {
this.applicationWordName = res.result[0].fileName || ''
// 存储入会申请表的相关信息
this.applicationWordInfo = res.result[0]
}
})
},
/*
* 预览入会申请表
* */
previewApplyPdf(id) {
// const url = `${window._CONFIG['memberURL']}/sys/common/static/${id}?type=view&${TokenKey}=${Vue.ls.get(ACCESS_TOKEN)}`
window.open(previewPdf(this.applicationWordInfo))
/**
* 单个文件的预览功能
* @param file
*/
// myPreview(file) {
// if (file && file.url) {
// const fileFullUrl = `${window._CONFIG['domianWebSocketURL']}/sys/common/download/${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}`
// let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(fileFullUrl)}`
// // let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(fileFullUrl)}`
// window.open(url)
// }
// }
},
/*
* 会员下载入会申请表
* */
downApplyPdf(text) {
if (!text) {
this.$message.warning('未知的文件')
return
}
if (text.indexOf(',') > 0) {
text = text.substring(0, text.indexOf(','))
}
const url = getFileAccessHttpUrl(text)
window.open(url, '_self')
},
// 初始化数据的方法
initData(memberInfo) {
this.model = { ...memberInfo}
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'invoiceInfo', 'taxNo', 'userName', 'registerTime', 'companyName', 'companyNature', 'companyDepartment', 'companyBusinessDesc', 'standardDepartment', 'standardLeadingMan', 'standardPhone', 'standardMobile', 'standardEmail', 'standardPost', 'standardSoleDutyCount', 'standardConcurrentCount', 'liaisonMan', 'email', 'phone', 'mobile', 'address', 'postcode', 'memberStatus', 'userId', 'validDate', 'memberType', 'createTime', 'businessLicenseFileId', 'recommendWordId', 'memberNature', 'industrialOrganization', 'applicationWordId', 'realname', 'invoiceAddress', 'invoicePhone', 'depositBank', 'bankAccount'))
})
this.getApplyPdfFilesByIds()
}
},
created() {
console.log('&&*****会员信息****')
this.initData(this.memberInfo)
}
}
</script>
<style scoped lang='less'>
@import '~@assets/less/common.less';
.preview,.download{
display: inline-block;
margin-left: 8px;
color: #00A0E9;
cursor: pointer;
}
.joined-col{
/deep/label {
white-space: pre-wrap;
line-height: 20px!important;
}
}
/* 多选组件的样式 ---开始 */
/deep/.ant-checkbox-group {
display: flex;
flex-wrap: wrap;
}
/deep/.ant-checkbox-wrapper + .ant-checkbox-wrapper{
width:25%
}
/deep/.ant-checkbox-wrapper:nth-child(1){
width: 25%;
}
/deep/.ant-checkbox-wrapper + .ant-checkbox-wrapper {
margin-left: 0px;
}
/* 多选组件的样式 ---结束 */
</style>
@@ -0,0 +1,241 @@
<!--缴费记录 页面-->
<template>
<div class='payment-info'>
<div class="table-page-search-wrapper">
<a-form layout="inline">
<a-row :span="24" :gutter="24" class="create-date-row">
<a-col :span="14">
<a-form-item label="订单创建日期" :labelCol="labelColDate" :wrapperCol="wrapperColDate">
<j-date
date-format="YYYY-MM-DD 00:00:00"
placeholder="请选择开始日期"
v-model="queryParam[dateKeyObj.beginKey]"
:disabled-date="disabledStartDate"></j-date>
<span class="query-group-split-cust"></span>
<j-date
date-format="YYYY-MM-DD 23:59:59"
placeholder="请选择结束日期"
v-model="queryParam[dateKeyObj.endKey]"
:disabled-date="disabledEndDate"></j-date>
</a-form-item>
</a-col>
<a-col :span="8" class="ope-col">
<a-button class="btn btn-primary" type="primary" @click="payQuery" icon="searchQuery">查询
</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 5px">刷新
</a-button>
</a-col>
</a-row>
</a-form>
<!-- <table-component-->
<!-- :columns="columns"-->
<!-- :data-source="dataSource"-->
<!-- :page-type="pageType"-->
<!-- :pagination="ipagination"-->
<!-- @ok="paymentSearchQuery"-->
<!-- ></table-component>-->
<div class="row clearfix">
<div class="col-md-12 column">
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
@change="handleTableChange"
class="j-table-force-nowrap">
</a-table>
</div>
</div>
</div>
</div>
</template>
<script>
import moment from 'moment'
import { getAction } from '../../../api/memberManage'
import { JeroListMixin } from '../../../mixins/JeroListMixin'
import { RangeDateMixin} from '../../../mixins/RangeDateMixin'
import JDate from '@comp/tools/JDate'
export default {
name: 'PaymentInfo',
mixins: [
JeroListMixin,
RangeDateMixin
],
components: {
JDate
},
props: {
memberInfo: {
type: Object,
required: false,
default: () => {
return {}
}
}
},
watch: {
memberInfo() {
this.filters.memberId = this.memberInfo.id
}
},
data() {
return {
// 日期组件查询的key值
dateKeyObj: {
beginKey: 'submissionTime_begin',
endKey: 'submissionTime_end'
},
labelColDate: {
xs: { span: 24 },
sm: { span: 4 }
},
wrapperColDate: {
xs: { span: 24 },
sm: { span: 20 }
},
// 缴费信息表头
columns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function(t, r, index) {
return parseInt(index) + 1
}
},
{
title: '订单创建时间',
align: 'center',
dataIndex: 'createTime'
},
{
title: '缴费类型',
align: 'center',
dataIndex: 'paymentType_dictText'
},
{
title: '生效时间',
align: 'center',
dataIndex: 'effectiveDate'
},
{
title: '失效时间',
align: 'center',
dataIndex: 'invalidationDate'
},
{
title: '缴费时长',
align: 'center',
dataIndex: 'paymentTime_dictText'
},
{
title: '缴费金额',
align: 'center',
dataIndex: 'paymentAmount'
},
{
title: '状态',
align: 'center',
dataIndex: 'paymentStatus_dictText'
}
],
// 缴费数据源
paymentDataSource: [],
url: {
list: '/paymentInfo/list'
},
loading: false,
disableMixinCreated: false
}
},
methods: {
moment,
loadData(arg) {
if(!this.url.list){
this.$message.error('请设置url.list属性!')
return
}
//加载数据 若传入参数1则加载第一页的内容
if (arg === 1) {
this.ipagination.current = 1
}
const params = this.getQueryParams()//查询条件
this.loading = true
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
this.dataSource = res.result.records||res.result
if(res.result.total)
{
this.ipagination.total = res.result.total
//清空列表选中
// this.onClearSelected()
}else{
this.ipagination.total = 0
}
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
}
if(res.code===510){
this.$message.warning(res.message)
}
this.loading = false
})
},
// 缴费信息查询
payQuery() {
if (this.queryParam[this.dateKeyObj.beginKey] && this.queryParam[this.dateKeyObj.endKey]) {
this.searchQuery()
} else {
this.$message.warning('请输入完整时间段')
}
},
/*
* 缴费信息表数据
* */
paymentSearchQuery() {
let params = 'memberId=' + this.memberInfo.id
if (this.orderCreateDate != null && this.orderCreateDate !== undefined && this.orderCreateDate.length > 0) {
params = params + '&submissionTime_begin=' + this.orderCreateDate
}
if (this.orderCreateDateEnd != null && this.orderCreateDateEnd !== undefined && this.orderCreateDateEnd.length > 0) {
params = params + '&submissionTime_end=' + this.orderCreateDateEnd
}
params = params + '&pageNo=' + this.ipagination.current + '&pageSize=' + this.ipagination.pageSize
console.log(params)
this.loading = true
getAction('/paymentInfo/list?' + params).then((res) => {
if (res.success) {
this.paymentDataSource = res.result.records
this.ipagination.total = res.result.total
}
}).finally(() => {
this.loading = false
})
},
// 初始化数据的方法
initData() {
this.searchReset()
}
},
created() {
console.log('&&*****缴费记录****')
this.filters.memberId = this.memberInfo.id
this.searchReset()
}
}
</script>
<style scoped lang='less'>
@import '~@assets/less/common.less';
</style>
@@ -0,0 +1,295 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
:confirmLoading="confirmLoading"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
cancelText="关闭">
<a-spin :spinning="confirmLoading">
<div class="row clearfix">
<div class="col-md-5 column">
<p></p>
<b><p>变更信息</p></b>
<p>--------------------------------------------------</p>
</div>
</div>
<a-form :form="form">
<a-form-item label="单位全称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['originCompanyName']" readOnly></a-input>
</a-form-item>
<a-form-item label="变更后单位全称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
v-decorator="['changeCompanyName']"
placeholder="请输入变更后单位全称"
readOnly></a-input>
</a-form-item>
<a-form-item label="工商注册变更证明" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-image-upload v-decorator="['registerChangeProve']" disabled is-less-than5-m is-multiple
:number="2"></j-image-upload>
</a-form-item>
<!--审批历史-->
<div class="row clearfix">
<div class="col-md-5 column">
<p></p>
<b><p>审批历史</p></b>
<p>--------------------------------------------------</p>
</div>
</div>
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="approveHistoryData"
class="j-table-force-nowrap">
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img
v-else
v-for="(textItem,index) in text "
:key="index"
:src="getImgView(textItem)"
height="60px"
alt=""
class="img"
@click="openView(textItem)" />
</template>
</a-table>
<!--审批信息-->
<div class="row clearfix">
<div class="col-md-5 column">
<p></p>
<b><p>审批信息</p></b>
<p>--------------------------------------------------</p>
</div>
</div>
<a-row>
<a-col :span="12">
<a-form-item label="结果" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['status',validatorRules.checkResult]">
<a-radio :value="3">通过</a-radio>
<a-radio :value="2">不通过</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24" style="margin-left: -100px">
<a-form-item label="审批意见" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-textarea rows="5" v-decorator="['checkMark' ]" placeholder="请输入审批意见" :maxLength="500"></a-textarea>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
<!-- 图片预览模态框 -->
<pre-view-img-modal ref="previewModal"></pre-view-img-modal>
</j-modal>
</template>
<script>
import { getFileAccessHttpUrl } from '@api/manage'
import JImageUpload from '@comp/jero/JImageUpload'
// import PreViewImgModal from '@views/member/paymentInfo/modules/PreViewImgModal'
import pick from 'lodash.pick'
import { approveDetail, approveCheck } from '@api/api'
export default {
name: 'ChangeApproveModal',
components: {
JImageUpload,
PreViewImgModal
},
data() {
return {
form: this.$form.createForm(this),
title: '变更申请审批',
width: 1000,
visible: false,
model: {},
originCompanyName: '',
labelCol: {
xs: { span: 24 },
sm: { span: 5 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
confirmLoading: false,
// 审批历史表格数据
approveHistoryData: [],
// 审批历史表头
memberInfo: {},
columns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function(t, r, index) {
return parseInt(index) + 1
}
},
{
title: '变更前',
align: 'center',
dataIndex: 'originCompanyName'
},
{
title: '变更后',
align: 'center',
dataIndex: 'changeCompanyName'
},
{
title: '工商注册变更证明',
align: 'center',
dataIndex: 'registerChangeProve',
scopedSlots: { customRender: 'imgSlot' }
}, {
title: '操作人',
align: 'center',
dataIndex: 'operatorName'
},
{
title: '操作时间',
align: 'center',
dataIndex: 'createTime'
},
{
title: '审批人',
align: 'center',
dataIndex: 'checkerName'
},
{
title: '审批结果',
align: 'center',
dataIndex: 'status',
customRender: function(text) {
switch (text) {
case 1:
return '待审核'
case 2:
return '已驳回'
case 3:
return '已完成'
}
}
},
{
title: '审批时间',
align: 'center',
dataIndex: 'checkTime'
},
{
title: '审批意见',
align: 'center',
dataIndex: 'checkMark'
}
],
validatorRules: {
checkResult: {
rules: [{ required: true, message: '请选择结果' }],
validateTrigger: 'blur'
}
}
}
},
created() {
},
methods: {
open(record) {
this.memberInfo = Object.assign({}, record)
const params = {
memberId: record.id
}
this.approveHistoryData = []
approveDetail(params).then(res => {
if (res.success) {
this.model = Object.assign({}, res.result[0])
this.approveHistoryData = res.result
this.approveHistoryData.forEach(item => {
// 判断是否是多图片
if (item.registerChangeProve.includes(',')) {
item.registerChangeProve = item.registerChangeProve.split(',')
} else {
item.registerChangeProve = [item.registerChangeProve]
}
})
this.visible = true
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'originCompanyName', 'changeCompanyName', 'registerChangeProve'))
})
} else {
this.$message.warning(res.message || '没有查询到待审核的记录')
}
})
},
close() {
this.form.resetFields()
this.$emit('close')
this.visible = false
this.confirmLoading = false
this.model = {}
},
handleOk() {
const that = this
// 触发表单验证
this.form.validateFields((err, values) => {
if (!err) {
that.confirmLoading = true
const formData = {
id: this.model.recordId, // 记录ID
memberId: this.memberInfo.id, // 会员ID
status: values.status,
checkMark: values.checkMark
}
approveCheck(formData).then(res => {
if (res.success) {
this.$message.success('审核成功')
this.$emit('ok')
that.close()
} else {
that.$message.warning(res.message)
}
})
}
})
},
handleCancel() {
this.close()
},
/* 图片预览 */
getImgView(text) {
if (text && text.indexOf(',') > 0) {
text = text.substring(0, text.indexOf(','))
}
return getFileAccessHttpUrl(text)
},
// 模态框预览
openView(val) {
this.$refs.previewModal.open(val)
}
}
}
</script>
<style scoped lang="less">
.img {
width: 120px;
font-size: 12px;
font-style: italic;
margin-right: 4px;
cursor: pointer;
}
</style>
@@ -0,0 +1,177 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
:confirmLoading="confirmLoading"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
cancelText="关闭">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item label="单位全称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-model="originCompanyName" disabled></a-input>
</a-form-item>
<a-form-item label="变更后单位全称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
v-decorator="['changeCompanyName',validatorRules.changeCompanyName]"
:maxLength="50"
placeholder="请输入变更后单位全称"
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
</a-form-item>
<a-form-item label="工商注册变更证明" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-image-upload v-decorator="['registerChangeProve',validatorRules.registerChangeProve]" is-multiple is-less-than5-m :number="2"></j-image-upload>
</a-form-item>
</a-form>
</a-spin>
</j-modal>
</template>
<script>
import JImageUpload from '@comp/jero/JImageUpload'
import pick from 'lodash.pick'
import { checkOnlyCompany, changeCompany, changeCompanyEdit } from '@api/api'
export default {
name: 'ChangeCompanyModal',
components: {
JImageUpload
},
data() {
return {
form: this.$form.createForm(this),
title: '操作',
width: 800,
visible: false,
model: {},
// 原始单位全称
originCompanyName: '',
// 是否已经发起变更
companyNameApply: null,
// 是否是列表编辑
listEdit: false,
// recordId
recordId: '',
// 会员Id
memberId: '',
labelCol: {
xs: { span: 24 },
sm: { span: 5 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
confirmLoading: false,
validatorRules: {
changeCompanyName: {
rules: [{ required: true, validator: this.changeCompanyName }],
validateTrigger: 'blur'
},
registerChangeProve: {
rules: [{ required: true, message: '请上传工商注册证明' }],
validateTrigger: 'blur'
}
}
}
},
methods: {
add() {
this.edit({})
},
edit(record) {
this.form.resetFields()
this.model = Object.assign({}, record)
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'changeCompanyName', 'registerChangeProve'))
})
},
close() {
this.form.resetFields()
this.$emit('close')
this.visible = false
this.listEdit = false
this.confirmLoading = false
},
handleOk() {
const that = this
// 触发表单验证
this.form.validateFields((err, values) => {
if (!err) {
that.confirmLoading = true
const formData = Object.assign(this.model, values)
formData.originCompanyName = this.originCompanyName
formData.memberId = this.memberId
// if(this.companyNameApply === 'TRUE'){
// this.$message.warning('您已经发起一次变更,请等待审核结果')
// that.confirmLoading = false
// return
// }
// 为true是编辑
if (this.listEdit) {
formData.id = this.recordId
formData.registerChangeProve = formData.registerChangeProve.join(',')
changeCompanyEdit(formData).then((res) => {
if (res.success) {
that.$message.success('申请变更成功,请等待审批结果')
this.$emit('ok')
that.close()
} else {
that.$message.warning(res.message)
}
}).finally(() => {
that.confirmLoading = false
})
} else {
changeCompany(formData).then((res) => {
if (res.success) {
that.$message.success('申请变更成功,请等待审批结果')
that.close()
} else {
that.$message.warning(res.message)
}
}).finally(() => {
that.confirmLoading = false
})
}
}
})
},
handleCancel() {
this.close()
},
/*
* 变更前后单位名称校验
* */
changeCompanyName(rule, value, callback) {
const reg = /\S{1,50}/
if (!reg.test(value)) {
callback(new Error('请输入变更后单位全称'))
}
if (value === undefined) {
callback(new Error('请输入变更后单位全称'))
}
if (value && this.originCompanyName && value.trim() === this.originCompanyName.trim()) {
callback(new Error('变更前后单位全称不能一样'))
}
const params = {
companyName: value
}
checkOnlyCompany(params).then((res) => {
if (!res.success) {
callback()
} else {
callback('此单位名称已注册,请重新填写')
}
})
// callback()
}
}
}
</script>
<style scoped>
</style>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,68 @@
<template>
<j-modal
title="预览"
width="800px"
:visible="previewVisible"
:maskClosable="false"
:footer="null"
@cancel="handleCancel()"
cancelText="关闭">
<!-- <img src="../../../../assets/images/wmi.png">-->
<img :src="imgSrc" class="img" v-if="imgSrc" />
<img :src="getImgView()" class="img" v-else/>
</j-modal>
</template>
<script>
import { getFileAccessHttpUrl } from '@/api/memberManage'
export default {
name: 'PreViewImgModal',
data() {
return {
previewVisible: false,
imgId: '',
imgSrc: ''
}
},
methods: {
open(val) {
this.previewVisible = true
this.imgId = val
},
openPre(val) {
// this.$nextTick(() => {
// if (val === 1) {
// this.imgSrc = require('../../../../assets/images/wmi.png')
// } else if (val === 2) {
// this.imgSrc = require('../../../../assets/images/cam.png')
// }
// })
// this.previewVisible = true
},
handleCancel() {
this.$nextTick(() => {
this.imgId = ''
this.previewVisible = false
})
},
/* 图片预览 */
getImgView() {
let text = this.imgId
if (text && text.indexOf(',') > 0) {
text = text.substring(0, text.indexOf(','))
}
return getFileAccessHttpUrl(text)
}
}
}
</script>
<style scoped lang="less">
.img {
max-width: 100%;
max-height: 100%;
display: block;
margin: auto;
}
</style>
@@ -0,0 +1,142 @@
<template>
<div class="table-page-search-wrapper mt-2">
<div class="row clearfix">
<div class="col-md-12 column">
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="pagination"
:loading="isLoading"
:expandRowByClick="expandRowByClick"
@change="handleChange"
class="j-table-force-nowrap">
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span><!--
--><j-ellipsis :value="text" :length="30"/>
</template>
<template slot="textSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span><!--
--><j-ellipsis :value="text" :length="30"/>
</template>
<template slot="status" slot-scope="text, record">
<span v-if="record.status === 1 " style="color:red">待审核</span>
<span v-if="record.status === 2 ">已驳回</span>
<span v-if="record.status === 3 ">已完成</span>
</template>
<template slot="imgSlot" slot-scope="text, record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img
v-else
v-for="(textItem,index) in text"
:key="index"
:src="getImgView(textItem,record)"
height="60px"
alt=""
class="img"
@click.stop="openView(textItem)"/>
</template>
<span slot="action" class="action-span-cell action-span-cell-other" slot-scope="text, record">
<template v-if="record.isParent">
<a @click.stop="record.status === 2 && handleApproveEdit(record)" v-show="record.status === 2 && pageType === 1" v-has="'memberInfo:companyNameRecord:edit' ">编辑</a>
<a @click="handleDetail(record)" v-if='record.children && record.children.length > 0'>查看</a>
<a v-if="!record.children && record.status !== 2">-</a>
</template>
<template v-if="!record.isParent">-</template>
</span>
</a-table>
</div>
</div>
<!-- 图片预览模态框 -->
<pre-view-img-modal ref="previewModal"></pre-view-img-modal>
</div>
</template>
<script>
import JEllipsis from '@comp/jero/JEllipsis'
import { getFileAccessHttpUrl } from '@api/memberManage'
import PreViewImgModal from './PreViewImgModal'
export default {
name: 'TableComponent',
components: {
JEllipsis,
PreViewImgModal
},
props: {
columns: {
type: Array,
required: false
},
dataSource: {
type: Array,
required: false
},
pagination: {
type: Object,
required: false
},
isLoading: {
type: Boolean,
default: false
},
expandRowByClick: {
type: Boolean
},
pageType: {
type: Number,
default: 2
}
},
data() {
return {
}
},
methods: {
handleChange(pagination) {
this.$emit('ok', pagination)
},
/* 图片预览 */
getImgView(text) {
if (text && text.indexOf(',') > 0) {
text = text.substring(0, text.indexOf(','))
}
return getFileAccessHttpUrl(text)
},
// 模态框预览
openView(val) {
this.$refs.previewModal.open(val)
},
/*
* 编辑
* */
handleApproveEdit(record) {
this.$emit('edit', record)
},
/*
* 查看
* */
handleDetail(record) {
console.log(record)
}
}
}
</script>
<style scoped lang="less">
//@import '~@/assets/less/TableExpand.less';
.img {
width:120px;
font-size: 12px;
font-style: italic;
margin-right: 4px;
cursor: pointer;
}
.action-span-cell-other a{
padding: 0 10px;
}
</style>