关联项目会员项目
This commit is contained in:
@@ -0,0 +1,269 @@
|
||||
<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: 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>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="会员企业" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<company-select placeholder="请选择会员企业" disabled v-decorator="['companyId',validatorRules.companyId]"></company-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="企业联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<select-contacts placeholder="请选择企业联系人"
|
||||
:selected-company="contractInfo.companyId"
|
||||
:init-contacts="selectContact"
|
||||
v-decorator="['companyContactId',validatorRules.companyContactId]"></select-contacts>
|
||||
</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">
|
||||
<select-contacts placeholder="请选择邮寄联系人"
|
||||
:selected-company="contractInfo.companyId"
|
||||
:init-contacts="selectContact"
|
||||
v-decorator="['postContactId', validatorRules.postContactId]"></select-contacts>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="应收金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入应收金额" v-decorator="['amountReceivable',validatorRules.amountReceivable]"
|
||||
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9.]/g,'')}"></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-dict-select-tag :triggerChange="true" dictCode="payment_charge_use"
|
||||
disabled
|
||||
v-decorator="['chargeUse', validatorRules.chargeUse]"
|
||||
placeholder="请选择来款用途"></j-dict-select-tag>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="需要发票" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<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">
|
||||
<!--paymentMethod-->
|
||||
<a-form-item label="来款方式" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<span>合同</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="合同编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入合同编号" @change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="50" v-decorator="['contractNum',validatorRules.contractNum]" disabled></a-input>
|
||||
</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'
|
||||
v-decorator="['remark']"
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
<template slot="footer">
|
||||
<a-button @click="handleCancel">关闭</a-button>
|
||||
<a-button @click="handleOk" type="primary" v-preventclick>确定</a-button>
|
||||
</template>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import {httpAction} from '@api/manage'
|
||||
import SelectContacts from '@comp/company/SelectContacts'
|
||||
import JDictSelectTag from '@comp/dict/JDictSelectTag'
|
||||
import CompanySelect from '@comp/company/CompanySelect'
|
||||
import {money} from '@/utils/validate'
|
||||
|
||||
|
||||
export default {
|
||||
name: 'AddMemberProject',
|
||||
components: {
|
||||
SelectContacts,
|
||||
JDictSelectTag,
|
||||
CompanySelect
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '新增会员项目',
|
||||
width: 800,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
form: this.$form.createForm(this),
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: {span: 24},
|
||||
sm: {span: 6}
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: {span: 24},
|
||||
sm: {span: 18}
|
||||
},
|
||||
remarksLabelCol: {
|
||||
xs: {span: 24},
|
||||
sm: {span: 3}
|
||||
},
|
||||
remarksWrapperCol: {
|
||||
xs: {span: 24},
|
||||
sm: {span: 21}
|
||||
},
|
||||
validatorRules: {
|
||||
companyId: {
|
||||
rules: [{ required: true, message: '请选择会员单位' }],
|
||||
validateTrigger: 'change',
|
||||
},
|
||||
contractNo: {
|
||||
rules: [{ required: true, message: '请输入合同号' }],
|
||||
validateTrigger: 'blur',
|
||||
},
|
||||
companyContactId: {
|
||||
rules: [{ required: true, message: '请选择企业联系人' }],
|
||||
validateTrigger: 'blur',
|
||||
},
|
||||
postContactId: {
|
||||
rules: [{ required: true, message: '请选择邮寄联系人' }],
|
||||
validateTrigger: 'blur',
|
||||
},
|
||||
amountReceivable: {
|
||||
rules: [{ required: true, validator:this.validateMoney }],
|
||||
validateTrigger: 'blur',
|
||||
},
|
||||
needInvoice: {
|
||||
rules: [{ required: true, message: '请选择发票类型' }],
|
||||
validateTrigger: ['change', 'blur'],
|
||||
},
|
||||
contractNum:{
|
||||
rules: [{ required: true, message: '请输入合同编号' }],
|
||||
validateTrigger: ['blur'],
|
||||
},
|
||||
chargeUse: {
|
||||
rules: [{ required: true, message: '请选择来款用途' }],
|
||||
validateTrigger: 'change',
|
||||
initialValue: 2,
|
||||
},
|
||||
},
|
||||
url: {
|
||||
add: '',
|
||||
edit: '',
|
||||
},
|
||||
// 合同信息
|
||||
contractInfo:{},
|
||||
// 联系人回显
|
||||
selectContact:null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(record) {
|
||||
this.form.resetFields()
|
||||
this.visible = true
|
||||
console.log(record)
|
||||
this.contractInfo = Object.assign({},record)
|
||||
// 会员企业的默认显示
|
||||
this.contractInfo.companyId = record.signedCompany
|
||||
// 联系人默认显示
|
||||
this.contractInfo.companyContactId = record.signedContactsTemporaryId
|
||||
// 邮寄联系人显示
|
||||
this.contractInfo.postContactId = record.signedContactsTemporaryId
|
||||
// 合同编号显示
|
||||
this.contractInfo.contractNum = record.contractNum
|
||||
this.selectContact = {
|
||||
id:record.signedContactsTemporaryId,
|
||||
name:record.signedContactsTemporaryName
|
||||
}
|
||||
this.$nextTick( () => {
|
||||
this.form.setFieldsValue(pick(this.contractInfo,'companyId','companyContactId','postContactId','contractNum'))
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.visible = false
|
||||
},
|
||||
handleOk() {
|
||||
const that = this
|
||||
this.form.validateFields((err, values) => {
|
||||
if(!err){
|
||||
that.confirmLoading = true
|
||||
let method = 'post'
|
||||
let url = this.url.add
|
||||
const formData = Object.assign({},values)
|
||||
// 来款方式默认是合同
|
||||
formData.paymentMethod = 2
|
||||
httpAction(url,formData,method).then(res => {
|
||||
if(res.success){
|
||||
that.$message.success(res.message)
|
||||
that.$emit('ok')
|
||||
that.handleCancel()
|
||||
that.confirmLoading = false
|
||||
}else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally( () => {
|
||||
that.confirmLoading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.close()
|
||||
},
|
||||
/*
|
||||
* 校验应收金额
|
||||
* */
|
||||
validateMoney(rule,value,callback){
|
||||
if(value === '' || value === undefined || value === null){
|
||||
callback('请输入应收金额')
|
||||
}
|
||||
if(value && money(value)){
|
||||
callback()
|
||||
}else {
|
||||
callback('请输入合法的金额数字,最多2位小数,11位正数')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
</style>
|
||||
@@ -859,7 +859,8 @@ export default {
|
||||
break
|
||||
// 会员项目
|
||||
case 4:
|
||||
this.$refs.selectMemberProjectModule.open()
|
||||
// 传入合同id与打包状态
|
||||
this.$refs.selectMemberProjectModule.open(this.model)
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
+198
-21
@@ -14,11 +14,11 @@
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row>
|
||||
|
||||
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
|
||||
<!-- <a-form-item label="会员项目" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||
<!-- <a-input placeholder="请输入会员项目" v-model="queryParam.workingGroupProject"></a-input>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
|
||||
<!-- <a-form-item label="会员项目" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||
<!-- <a-input placeholder="请输入会员项目" v-model="queryParam.workingGroupProject"></a-input>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="运行年份" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-year-date placeholder="请选择运行年份" v-model="queryParam.particularYear"></j-year-date>
|
||||
@@ -28,7 +28,7 @@
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" icon="search" @click="searchQuery">查询</a-button>
|
||||
<a-button icon="reload" @click="searchReset">重置</a-button>
|
||||
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -49,7 +49,7 @@
|
||||
:scroll="{x: 800}"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="false"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange"
|
||||
@@ -72,23 +72,65 @@
|
||||
<!-- /表格区域-->
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="标协会员" force-render>
|
||||
<!-- 表格区域-->
|
||||
<div>
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
bordered
|
||||
rowKey="id"
|
||||
:scroll="{x: 800}"
|
||||
:columns="columnStandard"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange"
|
||||
class="j-table-force-nowrap">
|
||||
|
||||
<template slot="text" slot-scope="text">
|
||||
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<!-- 打包、需要发票、到账、开票、邮寄状态-->
|
||||
<template slot="status" slot-scope="text,record">
|
||||
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot>
|
||||
</template>
|
||||
|
||||
<template slot="status-pack" slot-scope="text,record">
|
||||
<status-slot :statu-obj="record" :status-no="text"></status-slot>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<!-- /表格区域-->
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
|
||||
<!-- 新增项目成员-->
|
||||
<add-member-project ref="modalForm" @ok="modalFormOk"></add-member-project>
|
||||
<template slot="footer">
|
||||
<a-button @click="handleCancel">关闭</a-button>
|
||||
<a-button @click="handleOk" type="primary" v-preventclick>确定</a-button>
|
||||
</template>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { associatedProject } from '../../../../api/incomePaymentsApi'
|
||||
import { JeroListMixin } from '../../../../mixins/JeroListMixin'
|
||||
import {associatedProject} from '@api/incomePaymentsApi'
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import JYearDate from '@comp/jero/JYearDate'
|
||||
import StatusSlot from '@comp/tools/StatusSlot'
|
||||
import JEllipsis from '@comp/jero/JEllipsis'
|
||||
import AddMemberProject from '@views/contractManagement/revenueContract/modules/AddMemberProject'
|
||||
|
||||
export default {
|
||||
name: 'SelectMemberProjectModule',
|
||||
mixins: [JeroListMixin],
|
||||
components:{
|
||||
JYearDate
|
||||
components: {
|
||||
JYearDate,
|
||||
StatusSlot,
|
||||
JEllipsis,
|
||||
AddMemberProject
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -124,23 +166,140 @@ export default {
|
||||
dataIndex: 'createTime'
|
||||
},
|
||||
],
|
||||
//标协会员表头
|
||||
columnStandard: [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '项目名称',
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
width: 100,
|
||||
// scopedSlots: {customRender: 'text'},
|
||||
|
||||
},
|
||||
{
|
||||
title: '会员编号',
|
||||
align: 'center',
|
||||
dataIndex: 'memberNo',
|
||||
width: 160,
|
||||
scopedSlots: {customRender: 'text'},
|
||||
},
|
||||
{
|
||||
title: '单位名称',
|
||||
align: 'center',
|
||||
dataIndex: 'companyName',
|
||||
width: 160,
|
||||
scopedSlots: {customRender: 'text'},
|
||||
},
|
||||
{
|
||||
title: '会员类型',
|
||||
align: 'center',
|
||||
dataIndex: 'memberType_dictText',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '会员性质',
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '联系人',
|
||||
align: 'center',
|
||||
dataIndex: 'liaisonMan',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '邮箱',
|
||||
align: 'center',
|
||||
dataIndex: 'email',
|
||||
width: 160,
|
||||
scopedSlots: {customRender: 'text'},
|
||||
},
|
||||
{
|
||||
title: '手机',
|
||||
align: 'center',
|
||||
dataIndex: 'phone',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '会员状态',
|
||||
align: 'center',
|
||||
dataIndex: 'memberStatus_dictText',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '打包',
|
||||
align: 'center',
|
||||
dataIndex: 'pack',
|
||||
scopedSlots: {customRender: 'status-pack'},
|
||||
width: 60,
|
||||
},
|
||||
{
|
||||
title: '需要发票',
|
||||
align: 'center',
|
||||
dataIndex: 'invoiceRequirements',
|
||||
scopedSlots: {customRender: 'status-pack'},
|
||||
width: 60,
|
||||
},
|
||||
{
|
||||
title: '到账',
|
||||
align: 'center',
|
||||
dataIndex: 'inAccount',
|
||||
scopedSlots: {customRender: 'status'},
|
||||
width: 60,
|
||||
},
|
||||
{
|
||||
title: '开票',
|
||||
align: 'center',
|
||||
dataIndex: 'makeInvoice',
|
||||
scopedSlots: {customRender: 'status'},
|
||||
width: 60,
|
||||
},
|
||||
{
|
||||
title: '邮寄',
|
||||
align: 'center',
|
||||
dataIndex: 'mail',
|
||||
scopedSlots: {customRender: 'status'},
|
||||
width: 60,
|
||||
}
|
||||
],
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 }
|
||||
xs: {span: 24},
|
||||
sm: {span: 5}
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 10 }
|
||||
xs: {span: 24},
|
||||
sm: {span: 10}
|
||||
},
|
||||
url: {
|
||||
list: '/jero/memberProject/page',
|
||||
},
|
||||
disableMixinCreated: true,
|
||||
// 项目类型 4-会员项目 5-标协会员
|
||||
projectType: 4,
|
||||
contractId: '', // 收入合同id
|
||||
// 打包状态
|
||||
pack: '',
|
||||
contractInfo:{}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
open(record) {
|
||||
console.log('record',record)
|
||||
this.contractInfo = Object.assign({},record)
|
||||
// 保存合同id 与打包状态
|
||||
this.contractId = record.id
|
||||
this.pack = record.pack
|
||||
this.loadData()
|
||||
this.visible = true
|
||||
},
|
||||
@@ -179,13 +338,31 @@ export default {
|
||||
/*
|
||||
* 切换类型
|
||||
* */
|
||||
callback(){
|
||||
|
||||
callback(val) {
|
||||
// 2是标协会员
|
||||
if (val === '2') {
|
||||
this.projectType = 5
|
||||
this.url.list = '/member/tbMemberProjectSubitem/page'
|
||||
this.loadData(1)
|
||||
}
|
||||
// 1是会员项目
|
||||
if (val === '1') {
|
||||
this.projectType = 5
|
||||
this.url.list = '/jero/memberProject/page'
|
||||
this.loadData(1)
|
||||
}
|
||||
},
|
||||
/*
|
||||
* 打开新增
|
||||
* */
|
||||
handleAdd() {
|
||||
// 传进去一些需要的默认值
|
||||
this.$refs.modalForm.open(this.contractInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
Reference in New Issue
Block a user