会员管理页面

This commit is contained in:
fengachen
2021-08-25 18:09:25 +08:00
parent a871898de6
commit 308d77f8b5
13 changed files with 1215 additions and 16 deletions
+1 -1
View File
@@ -2802,7 +2802,7 @@
return
}
// 点击的标签是JPopup的弹出层
if (pClassName.includes('j-popup-modal')) {
if (pClassName.includes('j-popup-modules')) {
return
}
// 点击的标签是日期选择器的弹出层
+1 -1
View File
@@ -72,7 +72,7 @@
}
},
computed: {
// 一些未处理的参数或特殊处理的参数绑定到 a-modal
// 一些未处理的参数或特殊处理的参数绑定到 a-modules
_attrs() {
let attrs = { ...this.$attrs }
// 如果全屏就将宽度设为 100%
+109
View File
@@ -0,0 +1,109 @@
<template>
<a-date-picker
:disabledDate="disabledDate"
:disabled="disabled || readOnly"
:placeholder="placeholder"
@change="handleDateChange"
:value="momVal"
:showTime="showTime"
:format="dateFormat"
mode="year"
:getCalendarContainer="getCalendarContainer"
:open="opent"
@openChange="handleChange"
@panelChange="onPanelChange"
> </a-date-picker>
</template>
<script>
import moment from 'moment'
export default {
name: 'JYearDate',
props: {
placeholder: {
type: String,
default: '',
required: false
},
value: {
type: String,
required: false
},
disabledDate: {
type: Function
},
dateFormat: {
type: String,
default: 'YYYY',
required: false
},
// 此属性可以被废弃了
triggerChange: {
type: Boolean,
required: false,
default: false
},
readOnly: {
type: Boolean,
required: false,
default: false
},
disabled: {
type: Boolean,
required: false,
default: false
},
showTime: {
type: Boolean,
required: false,
default: false
},
getCalendarContainer: {
type: Function,
default: (node) => node.parentNode
}
},
data() {
const dateStr = this.value
return {
decorator: '',
momVal: !dateStr ? null : moment(dateStr, this.dateFormat),
opent: false
}
},
watch: {
value(val) {
if (!val) {
this.momVal = null
} else {
this.momVal = moment(val, this.dateFormat)
}
}
},
methods: {
moment,
handleDateChange(mom, dateStr) {
this.opent = false
this.$emit('change', dateStr)
},
handleChange(open) {
this.opent = open
this.$nextTick(() => {
})
},
onPanelChange(value, mode) {
this.opent = false
// 扩展 年份的时候对点击的年份进行回传
if (this.dateFormat === 'YYYY') {
const year = new Date(value._d).getFullYear()
this.$emit('change', year + '')
}
}
},
// 2.2新增 在组件内定义 指定父组件调用时候的传值属性和事件类型 这个牛逼
model: {
prop: 'value',
event: 'change'
}
}
</script>
+1 -1
View File
@@ -125,7 +125,7 @@
immediate: true,
handler() {
this.searchMenuVisible = false
this.searchMenuComp = this.isMobile() ? 'a-modal' : 'span'
this.searchMenuComp = this.isMobile() ? 'a-modules' : 'span'
},
},
// update-end author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框
@@ -0,0 +1,159 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="会员项目名称">
<a-input placeholder="请输入会员项目名称" v-model="queryParam.tableName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="运行年份">
<j-year-date placeholder="请选择运行年份" v-model="queryParam.year"></j-year-date>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">添加</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('混淆表')">导出</a-button>
<a-button type="danger" icon="delete" @click="batchDel">批量删除</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
</div>
<!-- table区域-begin -->
<div>
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text,record">
<div class="color_blue" @click="handleSafeguardMember(record)" v-html="text"></div>
</template>
<template slot="text" slot-scope="text">
<j-ellipsis v-if="text" :value="text" :length="20"></j-ellipsis>
<span v-else></span>
</template>
<span slot="action" slot-scope="text, record" class="action-span-cell">
<a @click="handleEdit(record)">编辑</a>
<a @click="handleDelete(record.id)">删除</a>
</span>
</a-table>
</div>
<member-project-modal ref="modalForm" @ok="modalFormOk"></member-project-modal>
</a-card>
</template>
<script>
import {mixinDevice} from '@/utils/mixin'
import {JeroListMixin} from '@/mixins/JeroListMixin'
import JYearDate from "@comp/jero/JYearDate";
import MemberProjectModal from "@views/incomePayments/memberManage/modules/MemberProjectModal";
export default {
mixins: [JeroListMixin, mixinDevice],
name: "MemberProjectList",
components:{
JYearDate,
MemberProjectModal
},
data() {
return {
description: '会员项目管理页面',
columns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '会员项目名称',
align: "center",
dataIndex: '',
},
{
title: '收费标准',
align: "center",
dataIndex: 'fieldName',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title: '负责人',
align: "center",
dataIndex: ''
},
{
title: '操作',
align: "center",
scopedSlots: {customRender: 'action'}
},
],
url: {
list: "/sys/confusion/page",
delete: "/sys/confusion/delete",
deleteBatch: "/sys/confusion/deleteBatch",
exportXlsUrl: "/sys/confusion/exportXls",
importExcelUrl: "/sys/confusion/importExcel",
},
}
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
/*
* 会员项目成员维护
* */
handleSafeguardMember(record){
console.log(1)
this.$router.push({
path: '/incomePayments/memberManage/SafeguardMemberList',
query: {
}
})
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
.color_blue {
color: dodgerblue;
cursor: pointer;
}
</style>
@@ -0,0 +1,204 @@
<template>
<a-card :bordered="false">
<!-- 会员项目基本信息-->
<div class="project-base-info">
<section><--</section>
<!-- <section class="project-base-info-title"></section>-->
<h3>会员项目信息</h3>
<section class="project-base-info-content">
<a-row :gutter="24">
<a-col :xl="6" :lg="4" :md="4" :sm="8">
<label>会员项目:</label><span></span>
</a-col>
<a-col :xl="4" :lg="4" :md="4" :sm="8">
<label>负责人:</label><span></span>
</a-col>
<a-col :xl="5" :lg="4" :md="4" :sm="8">
<label>收费标准:</label><span></span>
</a-col>
<a-col :xl="4" :lg="4" :md="4" :sm="8">
<label>收费通知号:</label><span></span>
</a-col>
<a-col :xl="5" :lg="4" :md="4" :sm="8">
<label>收费通知:</label><span></span>
</a-col>
<a-col :xl="8" :lg="8" :md="8" :sm="24">
<label>备注:</label><span></span>
</a-col>
</a-row>
</section>
</div>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="会员项目名称">
<a-input placeholder="请输入会员项目名称" v-model="queryParam.tableName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="运行年份">
<j-year-date style="width:100%" placeholder="请选择运行年份" v-model="queryParam.year"></j-year-date>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">添加</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
@change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<a-button type="primary" icon="download" @click="downTemplate('模板文件')">下载模板</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('混淆表')">导出</a-button>
<a-button type="danger" icon="delete" @click="batchDel">批量删除</a-button>
</div>
<!-- table区域-begin -->
<div>
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="text" slot-scope="text">
<j-ellipsis v-if="text" :value="text" :length="20"></j-ellipsis>
<span v-else></span>
</template>
<span slot="action" slot-scope="text, record" class="action-span-cell">
<a @click="handleEdit(record)">编辑</a>
<a @click="handleDelete(record.id)">删除</a>
</span>
</a-table>
</div>
<safeguard-member-modal ref="modalForm" @ok="modalFormOk"></safeguard-member-modal>
</a-card>
</template>
<script>
import {mixinDevice} from '@/utils/mixin'
import {JeroListMixin} from '@/mixins/JeroListMixin'
import JYearDate from "@comp/jero/JYearDate";
import SafeguardMemberModal from "@views/incomePayments/memberManage/modules/SafeguardMemberModal";
export default {
name: "SafeguardMemberList",
mixins: [JeroListMixin, mixinDevice],
components:{
JYearDate,
SafeguardMemberModal
},
data(){
return {
description: '会员项目成员维护页面',
columns:[
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '会员单位',
align: "center",
dataIndex: '',
},
{
title: '企业联系人',
align: "center",
dataIndex: '',
},
{
title: '应收金额',
align: "center",
dataIndex: '',
},
{
title: '实收金额',
align: "center",
dataIndex: '',
},
{
title: '打包',
align: "center",
dataIndex: '',
},
{
title: '需要发票',
align: "center",
dataIndex: '',
},
{
title: '到账',
align: "center",
dataIndex: '',
},
{
title: '开票',
align: "center",
dataIndex: '',
},
{
title: '邮寄',
align: "center",
dataIndex: '',
},
{
title: '操作',
align: "center",
dataIndex: '',
scopedSlots:{customRender:'action'}
},
],
url: {
list: "/sys/confusion/page",
delete: "/sys/confusion/delete",
deleteBatch: "/sys/confusion/deleteBatch",
exportXlsUrl: "/sys/confusion/exportXls",
importExcelUrl: "/sys/confusion/importExcel",
},
}
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
/* 会员基本信息 */
.project-base-info {
margin-bottom: 20px;
.ant-row {
line-height: 2;
}
}
</style>
@@ -0,0 +1,180 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="企业名称">
<a-input placeholder="请输入企业名称" v-model="queryParam.tableName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">添加</a-button>-->
<a-button type="primary" icon="download" @click="handleExportXls('标协会员')">导出</a-button>
<!-- <a-button type="danger" icon="delete" @click="batchDel">批量删除</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
</div>
<!-- table区域-begin -->
<div>
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text,record">
<div class="color_blue" @click="handleSafeguardMember(record)" v-html="text"></div>
</template>
<template slot="text" slot-scope="text">
<j-ellipsis v-if="text" :value="text" :length="20"></j-ellipsis>
<span v-else></span>
</template>
<span slot="action" slot-scope="text, record" class="action-span-cell">
<a @click="handleEdit(record)">编辑</a>
<a @click="handleDelete(record.id)">删除</a>
</span>
</a-table>
</div>
</a-card>
</template>
<script>
import {mixinDevice} from '@/utils/mixin'
import {JeroListMixin} from '@/mixins/JeroListMixin'
export default {
name: "SafeguardStardsMemberList",
mixins: [JeroListMixin, mixinDevice],
data() {
return {
columns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '会员编号',
align: "center",
dataIndex: 'fieldName',
},
{
title: '企业名称',
align: "center",
dataIndex: ' ',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title: '会员类型',
align: "center",
dataIndex: ' ',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title: '联系人',
align: "center",
dataIndex: ' ',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title: '邮箱',
align: "center",
dataIndex: ' ',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title: '手机',
align: "center",
dataIndex: ' ',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title: '会员状态',
align: "center",
dataIndex: ' ',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title: '注册时间',
align: "center",
dataIndex: ' ',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title: '打包',
align: "center",
dataIndex: ' ',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title: '需要发票',
align: "center",
dataIndex: ' ',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title: '到账',
align: "center",
dataIndex: ' ',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title: '开票',
align: "center",
dataIndex: ' ',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title: '邮寄',
align: "center",
dataIndex: ' ',
scopedSlots: {customRender: 'htmlSlot'}
},
],
url: {
list: "/sys/confusion/page",
},
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.color_blue {
color: dodgerblue;
cursor: pointer;
}
</style>
@@ -0,0 +1,124 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="标协会员项目名称">
<a-input placeholder="请输入会员项目名称" v-model="queryParam.tableName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">添加</a-button>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('混淆表')">导出</a-button>-->
<!-- <a-button type="danger" icon="delete" @click="batchDel">批量删除</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
</div>
<!-- table区域-begin -->
<div>
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text,record">
<div class="color_blue" @click="handleSafeguardMember(record)" v-html="text"></div>
</template>
<template slot="text" slot-scope="text">
<j-ellipsis v-if="text" :value="text" :length="20"></j-ellipsis>
<span v-else></span>
</template>
<span slot="action" slot-scope="text, record" class="action-span-cell">
<a @click="handleEdit(record)">编辑</a>
<a @click="handleDelete(record.id)">删除</a>
</span>
</a-table>
</div>
</a-card>
</template>
<script>
import {mixinDevice} from '@/utils/mixin'
import {JeroListMixin} from '@/mixins/JeroListMixin'
export default {
name: "StardsMemberProject",
mixins: [JeroListMixin, mixinDevice],
data() {
return {
description: '会员项目管理页面',
columns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '标协会员项目名称',
align: "center",
dataIndex: 'fieldName',
scopedSlots:{customRender:'htmlSlot'}
}
],
url: {
list: "/sys/confusion/page",
},
}
},
methods:{
/*
* 标协成员维护
* */
handleSafeguardMember(record){
console.log(1)
this.$router.push({
path: '/incomePayments/memberManage/SafeguardStardsMemberList',
query: {
}
})
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.color_blue {
color: dodgerblue;
cursor: pointer;
}
</style>
@@ -0,0 +1,214 @@
<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-row :gutter="24">
<a-col :xl="24" :sm="24">
<a-form-item label="会员项目名称" :labelCol=" {xs: {span: 24},sm: {span: 4}}" :wrapperCol="{ xs: {span: 24},sm: {span: 20}}">
<a-input placeholder="请输入会员项目名称"
v-decorator="['businessName',validatorRules.businessName]"
:maxLength='50'
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :xl="12" :sm="24">
<a-form-item label="运行年份" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-year-date style="width:100%" placeholder="请选择运行年份"
v-decorator="['year',validatorRules.postcode]"></j-year-date>
</a-form-item>
</a-col>
<a-col :xl="12" :sm="24">
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol" class="form-item-postcode">
<a-select
style="width: 100%"
placeholder="请选择负责人"
optionFilterProp="children"
v-decorator="['fuzeren',validatorRules.postcode]"
:getPopupContainer="(target) => target.parentNode">
<a-select-option v-for="(role,roleindex) in chargePersonList" :key="roleindex.toString()"
:value="role.id">
{{ role.roleName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :xl="12" :sm="24">
<a-form-item label="收费标准" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入收费标准"
:maxLength='50'
v-decorator="[ 'name', validatorRules.name]"
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
<span class="yuan"></span>
</a-form-item>
</a-col>
<a-col :xl="12" :sm="24">
<a-form-item label="收费通知号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入收费通知号"
:maxLength='50'
v-decorator="[ 'name', validatorRules.name]"
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-item label="收费通知" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-upload file-type="pdf" file-type-error-message="请上传收费通知" :multiple="false" :number="1"
bizPath="payment" v-decorator="['paymentRecord',validatorRules.paymentRecord]"
:trigger-change="true"></j-upload>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col>
<a-form-item label="备注" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
<a-textarea
placeholder="请输入备注"
:auto-size="{ minRows: 3, maxRows: 6 }"
:maxLength='200'
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</j-modal>
</template>
<script>
import pick from "lodash.pick";
import {httpAction} from "@api/manage";
import JYearDate from "@comp/jero/JYearDate";
import JUpload from "@comp/jero/JUpload";
export default {
name: "MemberProjectModal",
components: {
JYearDate,
JUpload
},
data() {
return {
title: '操作',
width: 800,
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
// 负责人
chargePersonList: [],
model: {},
labelCol: {
xs: {span: 24},
sm: {span: 6}
},
wrapperCol: {
xs: {span: 24},
sm: {span: 18}
},
remarksLabelCol: {
xs: {span: 24},
sm: {span: 3}
},
remarksWrapperCol: {
xs: {span: 24},
sm: {span: 21}
},
validatorRules: {
businessName: {
rules: [{required: true, message: '请输入企业名称'}],
validateTrigger: 'blur'
},
postcode: {
rules: [{validator: this.checkPostcode}]
}
},
url: {
add: '',
edit: ''
}
}
},
methods: {
add() {
this.edit({})
},
edit(record) {
this.form.resetFields()
this.model = Object.assign({}, record)
this.visible = true
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'approvalDocumentNumber', 'dateYear', 'chargeNoticeName', 'chargeNoticeFileId'))
})
},
close() {
this.$emit('close')
this.visible = false
},
handleOk() {
const that = this
// 触发表单验证
this.form.validateFields((err, values) => {
if (!err) {
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)
console.log('表单提交数据', formData)
httpAction(httpurl, formData, method).then((res) => {
if (res.success) {
that.$message.success(res.message)
that.$emit('ok')
that.close()
} else {
that.$message.warning(res.message)
}
}).finally(() => {
that.confirmLoading = false
})
}
})
},
handleCancel() {
this.close()
},
/**
* 邮编校验
* @param rules
* @param value
* @param callback
*/
checkPostcode(rules, value, callback) {
if (postcode(value)) {
callback()
} else {
callback('请输入正确格式的邮编')
}
}
}
}
</script>
<style scoped lang="less">
.yuan {
position: absolute;
right: -20px;
}
</style>
@@ -0,0 +1,209 @@
<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-row :gutter="24">
<a-col :xl="12" :sm="24">
<a-form-item label="会员单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入会员单位"
v-decorator="['businessName',validatorRules.businessName]"></a-input>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :xl="12" :sm="24">
<a-form-item label="企业联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请选择企业联系人"
v-decorator="['businessName',validatorRules.businessName]"></a-input>
</a-form-item>
</a-col>
<a-col :xl="12" :sm="24">
<a-form-item label="邮寄联系人" :labelCol="labelCol" :wrapperCol="wrapperCol" class="form-item-postcode">
<a-input placeholder="请选择邮寄联系人"
v-decorator="['businessName',validatorRules.businessName]"></a-input>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :xl="12" :sm="24">
<a-form-item label="应收金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入收费标准"
:maxLength='50'
v-decorator="[ 'name', validatorRules.name]"
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
<span class="yuan"></span>
</a-form-item>
</a-col>
<a-col :xl="12" :sm="24">
<a-form-item label="需要发票" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入收费通知号"
:maxLength='50'
v-decorator="[ 'name', validatorRules.name]"
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :xl="12" :sm="24">
<a-form-item label="收费通知号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入收费通知号"
:maxLength='50'
v-decorator="[ 'name', validatorRules.name]"
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="收费通知" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-upload file-type="pdf" file-type-error-message="请上传收费通知" :multiple="false" :number="1"
bizPath="payment" v-decorator="['paymentRecord',validatorRules.paymentRecord]"
:trigger-change="true"></j-upload>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col>
<a-form-item label="备注" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
<a-textarea
placeholder="请输入备注"
:auto-size="{ minRows: 3, maxRows: 6 }"
:maxLength='200'
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</j-modal>
</template>
<script>
import pick from "lodash.pick";
import {httpAction} from "@api/manage";
import JUpload from "@comp/jero/JUpload";
export default {
name: "SafeguardMemberModal",
components: {
JUpload
},
data() {
return {
title: '操作',
width: 800,
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
// 负责人
chargePersonList: [],
model: {},
labelCol: {
xs: {span: 24},
sm: {span: 6}
},
wrapperCol: {
xs: {span: 24},
sm: {span: 18}
},
remarksLabelCol: {
xs: {span: 24},
sm: {span: 3}
},
remarksWrapperCol: {
xs: {span: 24},
sm: {span: 21}
},
validatorRules: {
businessName: {
rules: [{required: true, message: '请输入企业名称'}],
validateTrigger: 'blur'
},
postcode: {
rules: [{validator: this.checkPostcode}]
}
},
url: {
add: '',
edit: ''
}
}
},
methods: {
add() {
this.edit({})
},
edit(record) {
this.form.resetFields()
this.model = Object.assign({}, record)
this.visible = true
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'approvalDocumentNumber', 'dateYear', 'chargeNoticeName', 'chargeNoticeFileId'))
})
},
close() {
this.$emit('close')
this.visible = false
},
handleOk() {
const that = this
// 触发表单验证
this.form.validateFields((err, values) => {
if (!err) {
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)
console.log('表单提交数据', formData)
httpAction(httpurl, formData, method).then((res) => {
if (res.success) {
that.$message.success(res.message)
that.$emit('ok')
that.close()
} else {
that.$message.warning(res.message)
}
}).finally(() => {
that.confirmLoading = false
})
}
})
},
handleCancel() {
this.close()
},
/**
* 邮编校验
* @param rules
* @param value
* @param callback
*/
checkPostcode(rules, value, callback) {
if (postcode(value)) {
callback()
} else {
callback('请输入正确格式的邮编')
}
}
}
}
</script>
<style scoped>
.yuan {
position: absolute;
right: -20px;
}
</style>
+1 -1
View File
@@ -155,7 +155,7 @@
</a-card>
</a-tab-pane>
<!-- <a-tab-pane tab="部门权限" key="2" forceRender>-->
<!-- <depart-auth-modal ref="departAuth"/>-->
<!-- <depart-auth-modules ref="departAuth"/>-->
<!-- </a-tab-pane>-->
<a-tab-pane tab="用户信息" key="3">
<Dept-User-Info ref="DeptUserInfo"></Dept-User-Info>
+10 -10
View File
@@ -2,16 +2,16 @@
<a-card :bordered="false">
<!-- 操作按钮区域 -->
<!-- <div class="table-operator">-->
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button-->
<!-- @click="batchDel"-->
<!-- v-if="selectedRowKeys.length > 0"-->
<!-- ghost-->
<!-- type="primary"-->
<!-- icon="delete">批量删除-->
<!-- </a-button>-->
<!-- </div>-->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button
@click="batchDel"
v-if="selectedRowKeys.length > 0"
ghost
type="primary"
icon="delete">批量删除
</a-button>
</div>
<!-- table区域-begin -->
<div>
+2 -2
View File
@@ -51,7 +51,7 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="菜单路径">
<a-input @change="event => event.target.value = event.target.value.trim()" :maxLength="50" placeholder="请输入菜单路径" v-decorator="[ 'url',validatorRules.url]" :readOnly="disableSubmit"/>
<a-input @change="event => event.target.value = event.target.value.trim()" :maxLength="60" placeholder="请输入菜单路径" v-decorator="[ 'url',validatorRules.url]" :readOnly="disableSubmit"/>
</a-form-item>
<a-form-item
@@ -59,7 +59,7 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="前端组件">
<a-input placeholder="请输入前端组件" @change="event => event.target.value = event.target.value.trim()" :maxLength="50" v-decorator="[ 'component',validatorRules.component]" :readOnly="disableSubmit"/>
<a-input placeholder="请输入前端组件" @change="event => event.target.value = event.target.value.trim()" :maxLength="60" v-decorator="[ 'component',validatorRules.component]" :readOnly="disableSubmit"/>
</a-form-item>
<a-form-item