会员项目

This commit is contained in:
fengachen
2021-08-26 20:29:15 +08:00
parent 0108b9d1c7
commit 9b3f0c3212
12 changed files with 492 additions and 444 deletions
+204
View File
@@ -0,0 +1,204 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@cancel="handleCancel"
cancelText="关闭">
<!-- 基本信息begin-->
<section class="base-info">
<h3>基本信息</h3>
<a-row :gutter="24">
<a-col :span="12">
<label>项目负责人:</label>
<span></span>
</a-col>
<a-col :span="12">
<label>应收金额:</label>
<span></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>备注:</label>
<span></span>
</a-col>
</a-row>
</section>
<!-- 基本信息end-->
<!-- 企业信息begin-->
<section class="enterprise-info">
<h3>企业信息</h3>
<a-row :gutter="24">
<a-col :span="12">
<label>来款企业:</label>
<span></span>
</a-col>
<a-col :span="12">
<label>企业联系人:</label>
<span></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>企业联系人性别:</label>
<span></span>
</a-col>
<a-col :span="12">
<label>企业联系人职务:</label>
<span></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>企业联系人电话:</label>
<span></span>
</a-col>
<a-col :span="12">
<label>企业联系人邮箱:</label>
<span></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>企业联系人邮编:</label>
<span></span>
</a-col>
<a-col :span="12">
<label>企业联系人地址:</label>
<span></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>是否需要发票:</label>
<span></span>
</a-col>
<a-col :span="12">
<label>是否打包:</label>
<span></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>企业邮编:</label>
<span></span>
</a-col>
<a-col :span="12">
<label>企业地址:</label>
<span></span>
</a-col>
</a-row>
</section>
<!--企业信息end-->
<!--到账信息begin-->
<section class="payment-info">
<h3>到账信息</h3>
<a-row :gutter="24" v-for="item of paymentInfoList" :key="item.id">
<a-col>2021年到账200元</a-col>
</a-row>
</section>
<!--到账信息end-->
<!--开票邮寄信息begin-->
<section class="logistics-info">
<h3>开票邮寄信息</h3>
<a-row :gutter="24" v-for="item of logisticsInfoList" :key="item.id">
<a-col :span="24" v-text="createItemInfo(item)"></a-col>
<a-col :span="24"></a-col>
</a-row>
</section>
<!--开票邮寄信息end-->
<template slot="footer">
<a-button @click="handleCancel">关闭</a-button>
</template>
</j-modal>
</template>
<script>
// import {getAction} from "@api/manage";
const paymentInfoList = [
{
id: 1001,
year: '2021',
money: '200'
},
{
id: 1002,
year: '2021',
money: '200'
},
{
id: 1003,
year: '2021',
money: '200'
},
]
const logisticsInfoList = [
{
id: '01',
person: '张三',
time: '2021年10月21',
money: '200',
piaoNo: '123456',
projects: ['项目一', '项目二', '项目三'],
postPerson: '李四',
postTime: '2021年10月21',
emsOrSF: 'EMS',
postNo: "123456"
}
]
export default {
name: "ProjectDetailModal",
data() {
return {
description: "项目详情模态框",
width: 800,
visible: false,
title: "项目信息",
// 当前项目id
currentProjectId: '',
// 基本信息
basicInfo: {},
// 企业信息
enterpriseInfo: {},
// 到账信息
paymentInfoList,
// 开票邮寄信息
logisticsInfoList,
}
},
methods: {
open(record) {
// 记录当前项目id
this.currentProjectId = record.id
this.visible = true
},
handleCancel() {
this.visible = false
},
/*
* 生成每一个开票信息
* */
createItemInfo(item) {
let porjectItem = ''
if (item.projects.length > 0) {
item.projects.forEach((val, index) => {
if (index === item.projects.length - 1) {
porjectItem += val
} else {
porjectItem += val + '、'
}
})
}
return `${item.person}于${item.time}开票,金额为:${item.money}元,票号:${item.piaoNo},项目:${porjectItem}`
}
}
}
</script>
<style scoped>
.ant-row {
margin: 12px;
}
</style>
+1 -1
View File
@@ -64,4 +64,4 @@ export default {
a-input:hover {
cursor: pointer;
}
</style>
</style>
+2 -2
View File
@@ -89,7 +89,7 @@
}else{
val = e
}
console.log(val);
if(this.triggerChange){
this.$emit('change', val);
}else{
@@ -107,4 +107,4 @@
</script>
<style scoped>
</style>
</style>
+1 -1
View File
@@ -292,4 +292,4 @@
}
}
}
</style>
</style>
+8
View File
@@ -102,6 +102,8 @@ export const JeroListMixin = {
this.$message.warning(res.message)
}
this.loading = false;
}).finally(() => {
this.loading = false
})
},
initDictConfig() {
@@ -379,6 +381,12 @@ export const JeroListMixin = {
}
}
},
/*
* 打开项目详情模态框
* */
openDetailModal(record){
this.$refs.projectDetail.open(record)
},
/* 图片预览 */
getImgView(text) {
if (text && text.indexOf(",") > 0) {
@@ -6,12 +6,12 @@
<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-input placeholder="请输入会员项目名称" v-model="queryParam.projectName"></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>
<j-year-date placeholder="请选择运行年份" v-model="queryParam.particularYear"></j-year-date>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -99,20 +99,21 @@ export default {
}
},
{
title: '会员项目名称',
title: '会员项目',
align: "center",
dataIndex: '',
dataIndex: 'projectName',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title: '收费标准',
align: "center",
dataIndex: 'fieldName',
scopedSlots: {customRender: 'htmlSlot'}
dataIndex: 'chargStandard',
},
{
title: '负责人',
align: "center",
dataIndex: ''
dataIndex: 'directorName'
},
{
title: '操作',
@@ -121,11 +122,11 @@ export default {
},
],
url: {
list: "/sys/confusion/page",
delete: "/sys/confusion/delete",
deleteBatch: "/sys/confusion/deleteBatch",
exportXlsUrl: "/sys/confusion/exportXls",
importExcelUrl: "/sys/confusion/importExcel",
list: "/jero/memberProject/page",
delete: "/jero/memberProject/delete",
deleteBatch: "/jero/memberProject/deleteBatch",
exportXlsUrl: "/jero/memberProject/exportXls",
importExcelUrl: "jero/memberProject/importExcel",
},
}
},
@@ -143,6 +144,7 @@ export default {
this.$router.push({
path: '/incomePayments/memberManage/SafeguardMemberList',
query: {
record
}
})
}
@@ -3,7 +3,7 @@
<!-- 会员项目基本信息-->
<div class="project-base-info">
<section><--</section>
<!-- <section class="project-base-info-title"></section>-->
<!-- <section class="project-base-info-title"></section>-->
<h3>会员项目信息</h3>
<section class="project-base-info-content">
<a-row :gutter="24">
@@ -33,13 +33,13 @@
<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 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 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">
@@ -60,8 +60,8 @@
@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="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>
@@ -86,6 +86,9 @@
<j-ellipsis v-if="text" :value="text" :length="20"></j-ellipsis>
<span v-else></span>
</template>
<template slot="member" slot-scope="text,record">
<div @click="openDetail(record)" class="color_blue">123</div>
</template>
<span slot="action" slot-scope="text, record" class="action-span-cell">
<a @click="handleEdit(record)">编辑</a>
<a @click="handleDelete(record.id)">删除</a>
@@ -94,6 +97,8 @@
</a-table>
</div>
<safeguard-member-modal ref="modalForm" @ok="modalFormOk"></safeguard-member-modal>
<!--项目详情模态框-->
<project-detail-modal ref="projectDetail"></project-detail-modal>
</a-card>
</template>
@@ -102,17 +107,20 @@ import {mixinDevice} from '@/utils/mixin'
import {JeroListMixin} from '@/mixins/JeroListMixin'
import JYearDate from "@comp/jero/JYearDate";
import SafeguardMemberModal from "@views/incomePayments/memberManage/modules/SafeguardMemberModal";
import ProjectDetailModal from "@comp/ProjectDetailModal";
export default {
name: "SafeguardMemberList",
mixins: [JeroListMixin, mixinDevice],
components:{
components: {
JYearDate,
SafeguardMemberModal
SafeguardMemberModal,
ProjectDetailModal
},
data(){
data() {
return {
description: '会员项目成员维护页面',
columns:[
columns: [
{
title: '序号',
dataIndex: '',
@@ -126,55 +134,57 @@ export default {
{
title: '会员单位',
align: "center",
dataIndex: '',
dataIndex: 'companyName',
scopedSlots: {customRender: 'member'}
},
{
title: '企业联系人',
align: "center",
dataIndex: '',
dataIndex: 'companyContactName',
},
{
title: '应收金额',
align: "center",
dataIndex: '',
dataIndex: 'amountReceivable',
},
{
title: '实收金额',
align: "center",
dataIndex: '',
dataIndex: 'paidAmount',
},
{
title: '打包',
align: "center",
dataIndex: '',
dataIndex: 'pack',
},
{
title: '需要发票',
align: "center",
dataIndex: '',
dataIndex: 'needInvoice',
},
{
title: '到账',
align: "center",
dataIndex: '',
dataIndex: 'inAccount',
},
{
title: '开票',
align: "center",
dataIndex: '',
dataIndex: 'makeInvoice',
},
{
title: '邮寄',
align: "center",
dataIndex: '',
dataIndex: 'mail',
},
{
title: '操作',
align: "center",
dataIndex: '',
scopedSlots:{customRender:'action'}
scopedSlots: {customRender: 'action'}
},
],
currentInfo: {},
url: {
list: "/sys/confusion/page",
delete: "/sys/confusion/delete",
@@ -189,6 +199,19 @@ export default {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
created() {
},
destroyed() {
sessionStorage.removeItem('currentInfo', this.$route.query.record)
},
methods: {
/*
* 打开项目详情模态框
* */
openDetail(record) {
this.$refs.projectDetail.open(record)
}
}
}
</script>
@@ -197,8 +220,14 @@ export default {
/* 会员基本信息 */
.project-base-info {
margin-bottom: 20px;
.ant-row {
line-height: 2;
}
}
.color_blue {
color: dodgerblue;
cursor: pointer;
}
</style>
@@ -51,6 +51,10 @@
<div class="color_blue" @click="handleSafeguardMember(record)" v-html="text"></div>
</template>
<template slot="detail" slot-scope="text,record">
<div @click="openDetailModal(record)" class="">企业名称</div>
</template>
<template slot="text" slot-scope="text">
<j-ellipsis v-if="text" :value="text" :length="20"></j-ellipsis>
<span v-else></span>
@@ -62,16 +66,21 @@
</a-table>
</div>
<project-detail-modal ref="projectDetail"></project-detail-modal>
</a-card>
</template>
<script>
import {mixinDevice} from '@/utils/mixin'
import {JeroListMixin} from '@/mixins/JeroListMixin'
import ProjectDetailModal from "@comp/ProjectDetailModal";
export default {
name: "SafeguardStardsMemberList",
mixins: [JeroListMixin, mixinDevice],
components:{
ProjectDetailModal,
},
data() {
return {
columns: [
@@ -94,7 +103,7 @@ export default {
title: '企业名称',
align: "center",
dataIndex: ' ',
scopedSlots: {customRender: 'htmlSlot'}
scopedSlots: {customRender: 'detail'}
},
{
title: '会员类型',
@@ -12,9 +12,9 @@
<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]"
<a-form-item label="会员项目" :labelCol=" {xs: {span: 24},sm: {span: 3}}" :wrapperCol="{ xs: {span: 24},sm: {span: 21}}">
<a-input placeholder="请输入会员项目"
v-decorator="['projectName',validatorRules.projectName]"
:maxLength='50'
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
</a-form-item>
@@ -24,22 +24,12 @@
<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>
v-decorator="['particularYear',validatorRules.particularYear]"></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 label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<select-principal placeholder="请选择负责人" v-decorator="['directorId',validatorRules.directorId]"></select-principal>
</a-form-item>
</a-col>
</a-row>
@@ -48,8 +38,8 @@
<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>
v-decorator="[ 'chargStandard']"
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9.]/g,'')}"></a-input>
<span class="yuan">元</span>
</a-form-item>
</a-col>
@@ -57,7 +47,7 @@
<a-form-item label="收费通知号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入收费通知号"
:maxLength='50'
v-decorator="[ 'name', validatorRules.name]"
v-decorator="[ 'chargeNoticeNo']"
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
</a-form-item>
</a-col>
@@ -66,7 +56,7 @@
<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]"
bizPath="payment" v-decorator="['chargeNoticeFileId']"
:trigger-change="true"></j-upload>
</a-form-item>
</a-col>
@@ -78,6 +68,7 @@
placeholder="请输入备注"
:auto-size="{ minRows: 3, maxRows: 6 }"
:maxLength='200'
v-decorator="['remark']"
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
</a-form-item>
</a-col>
@@ -92,12 +83,14 @@ import pick from "lodash.pick";
import {httpAction} from "@api/manage";
import JYearDate from "@comp/jero/JYearDate";
import JUpload from "@comp/jero/JUpload";
import SelectPrincipal from "@comp/company/SelectPrincipal";
export default {
name: "MemberProjectModal",
components: {
JYearDate,
JUpload
JUpload,
SelectPrincipal
},
data() {
return {
@@ -126,17 +119,22 @@ export default {
sm: {span: 21}
},
validatorRules: {
businessName: {
rules: [{required: true, message: '请输入企业名称'}],
projectName: {
rules: [{required: true, message: '请输入会员项目'}],
validateTrigger: 'blur'
},
postcode: {
rules: [{validator: this.checkPostcode}]
particularYear: {
rules: [{required: true, message: '请选择年份'}],
validateTrigger: ['change','blur']
},
directorId: {
rules: [{required: true, message: '请选择负责人'}],
validateTrigger: ['change','blur']
}
},
url: {
add: '',
edit: ''
add: "/jero/memberProject/add",
edit: "/jero/memberProject/edit",
}
}
},
@@ -149,7 +147,7 @@ export default {
this.model = Object.assign({}, record)
this.visible = true
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'approvalDocumentNumber', 'dateYear', 'chargeNoticeName', 'chargeNoticeFileId'))
this.form.setFieldsValue(pick(this.model, 'projectName', 'particularYear', 'chargeNoticeNo', 'chargeNoticeFileId','chargStandard','remark'))
})
},
close() {
@@ -13,57 +13,105 @@
<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>
<company-select placeholder="请选择会员单位"
v-decorator="['companyId',validatorRules.companyId]"
@change="companyChange"
:maxLength='50'>
</company-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="请选择企业联系人"
v-decorator="['businessName',validatorRules.businessName]"></a-input>
<a-row :gutter="20">
<a-col :span="20">
<a-select placeholder="请选择企业联系人"
v-decorator="['companyContactId',validatorRules.companyContactId]"
>
<a-select-option v-for="item in userList" :key="item.id" :value="item.id">{{
item.name
}}
</a-select-option>
</a-select>
</a-col>
<a-col :span="4" class="form-btn">
<a-button icon="plus" @click="addContacts"></a-button>
</a-col>
</a-row>
</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-row :gutter="20">
<a-col :span="20">
<a-select placeholder="请选择企业联系人"
v-decorator="['postContactId',validatorRules.postContactId]"
>
<a-select-option v-for="item in userList" :key="item.id" :value="item.id">{{
item.name
}}
</a-select-option>
</a-select>
</a-col>
<a-col :span="4" class="form-btn">
<a-button icon="plus" @click="addContacts"></a-button>
</a-col>
</a-row>
</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="请输入收费标准"
<a-input placeholder="请输入应收金额"
:maxLength='50'
v-decorator="[ 'name', validatorRules.name]"
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
v-decorator="[ 'amountReceivable', validatorRules.amountReceivable]"
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9.]/g,'')}"></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>
<j-dict-select-tag v-decorator="['needInvoice', validatorRules.needInvoice]" :triggerChange="true"
placeholder="请输入发票类型"
dictCode="invoice_type"/>
</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-radio-group v-decorator="['paymentMethod',validatorRules.paymentMethod]" @change="changePaymentMethod">
<a-radio :value="1">合同</a-radio>
<a-radio :value="2">收费通知</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
<!-- incomePaysType 1 是合同·-->
<a-col :xl="12" :sm="24" v-if="incomePaysType === '1'">
<a-form-item label="合同号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入合同号"
:maxLength='50'
v-decorator="[ 'contractNo', validatorRules.contractNo]"
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
</a-form-item>
</a-col>
</a-row>
<!-- incomePaysType 2 是收费通知·-->
<a-row :gutter="24" v-if="incomePaysType === '2' ">
<a-col :xl="12" :sm="24">
<a-form-item label="收费通知号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入收费通知号"
:maxLength='50'
v-decorator="[ 'name', validatorRules.name]"
v-decorator="[ 'chargeNoticeNo', validatorRules.chargeNoticeNo]"
@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]"
bizPath="payment" v-decorator="['chargeNoticeFileId']"
:trigger-change="true"></j-upload>
</a-form-item>
</a-col>
@@ -75,24 +123,31 @@
placeholder="请输入备注"
:auto-size="{ minRows: 3, maxRows: 6 }"
:maxLength='200'
v-decorator="['remark']"
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
<contact-management-module ref="contactForm" is-company-disabled :selected-company="selectedCompany"
@ok="getContactPersonList(selectedCompany)"></contact-management-module>
</j-modal>
</template>
<script>
import pick from "lodash.pick";
import {httpAction} from "@api/manage";
import {httpAction, getAction} from "@api/manage";
import JUpload from "@comp/jero/JUpload";
import CompanySelect from "@comp/company/CompanySelect";
import ContactManagementModule from "@views/businessManagement/modules/ContactManagementModule";
export default {
name: "SafeguardMemberModal",
components: {
JUpload
JUpload,
CompanySelect,
ContactManagementModule
},
data() {
return {
@@ -101,8 +156,8 @@ export default {
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
// 负责人
chargePersonList: [],
// 联系人
userList: [],
model: {},
labelCol: {
xs: {span: 24},
@@ -121,14 +176,45 @@ export default {
sm: {span: 21}
},
validatorRules: {
businessName: {
rules: [{required: true, message: '请输入企业名称'}],
companyId: {
rules: [{required: true, message: '请选择会员单位'}],
validateTrigger: 'blur'
},
postcode: {
rules: [{validator: this.checkPostcode}]
}
contractNo: {
rules: [{required: true, message: '请输入合同号'}],
validateTrigger: 'blur'
},
companyContactId: {
rules: [{required: true, message: '请选择企业联系人'}],
validateTrigger: 'blur'
},
postContactId: {
rules: [{required: true, message: '请选择邮寄联系人'}],
validateTrigger: 'blur'
},
paymentMethod: {
rules: [{required: true, message: '请选择来款方式'}],
validateTrigger: ['blur', 'change']
},
amountReceivable: {
rules: [{required: true, message: '请输入应收金额'}],
validateTrigger: 'blur'
},
chargeNoticeNo: {
rules: [{required: true, message: '请输入收费通知号'}],
validateTrigger: 'blur'
},
needInvoice: {
rules: [{required: true, message: '请选择发票类型'}],
validateTrigger: ['change', 'blur'],
initialValue: 0
},
},
// 来款方式
incomePaysType: '',
// 选中的会员单位
selectedCompany: {},
url: {
add: '',
edit: ''
@@ -181,22 +267,58 @@ export default {
}
})
},
/*
* 来款方式
* */
changePaymentMethod(e) {
this.incomePaysType = e.target.value + ''
},
/*
* 选择会员单位
* */
companyChange(val) {
this.selectedCompany = Object.assign({}, val)
this.getContactPersonList(val)
},
/*
* 根据企业获取联系人数据
* */
getContactPersonList(val) {
const param = {
companyName: val.companyName
}
let url = `company/payContactsManagement/list`
getAction(url, param).then(res => {
if (res.success) {
this.userList = res.result.records
} else {
this.$message.warning(res.message)
}
})
},
/*
* 新增联系人后回显值
* */
// setValue(){
// console.log(1)
// },
/*
* 增加联系人模态框
* */
addContacts() {
if (this.selectedCompany.id) {
debugger
this.$refs.contactForm.add()
this.$refs.contactForm.title = "新增";
this.$refs.contactForm.disableSubmit = false;
return
}
this.$message.warn('请先选择来款企业再为该企业新建联系人')
},
handleCancel() {
this.selectedCompany = {}
this.close()
},
/**
* 邮编校验
* @param rules
* @param value
* @param callback
*/
checkPostcode(rules, value, callback) {
if (postcode(value)) {
callback()
} else {
callback('请输入正确格式的邮编')
}
}
}
}
</script>