新增工作组会议、

This commit is contained in:
fengachen
2021-09-03 19:03:19 +08:00
parent 574588dd0f
commit 04bb7c9e7c
8 changed files with 20790 additions and 888 deletions
+20204 -556
View File
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -4,8 +4,11 @@ import {getAction} from "@api/manage";
const getUserInfo = (params) => getAction('/sys/user/queryById',params) const getUserInfo = (params) => getAction('/sys/user/queryById',params)
// 通过会议id获取会议的详细信息 // 通过会议id获取会议的详细信息
const getMeetInfoById = (params) => getAction('/meeting/payMeeting/queryById',params) const getMeetInfoById = (params) => getAction('/meeting/payMeeting/queryById',params)
// 获取所有工作组项目
const getAllWorkProjects = () => getAction('/project/payWorkingGroup/listAll')
export { export {
getUserInfo, getUserInfo,
getMeetInfoById getMeetInfoById,
getAllWorkProjects
} }
+14
View File
@@ -573,3 +573,17 @@ export function encrypt(publicKey, message) {
const txt = encrypt.encrypt(message) const txt = encrypt.encrypt(message)
return txt return txt
} }
/**
* 校验数组是否有重复的元素
* */
export function isRepeat(arr) {
var hash = {};
for(var i in arr) {
if(hash[arr[i]]) {
return true;
}
// 不存在该元素,则赋值为true,可以赋任意值,相应的修改if判断条件即可
hash[arr[i]] = true;
}
return false;
}
@@ -20,15 +20,27 @@
</a-col> </a-col>
<a-col :xl="6" :md="8" :sm="24"> <a-col :xl="6" :md="8" :sm="24">
<a-form-item label="会议类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="会议类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag style="width: 100%" v-decorator="['meetingType',validatorRules.meetingType]" @change="changeMeetingType" <j-dict-select-tag style="width: 100%" v-decorator="['meetingType',validatorRules.meetingType]"
@change="changeMeetingType"
:trigger-change="true" dict-code="meeting_type" :trigger-change="true" dict-code="meeting_type"
placeholder="请选择会议类型"></j-dict-select-tag> placeholder="请选择会议类型"></j-dict-select-tag>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!--工作组会议才有-->
<a-col :xl="6" :md="8" :sm="24" v-if="meetingType === '1' ">
<a-form-item label="工作组" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select placeholder="请选择工作组"
v-decorator="['workingGroupId',validatorRules.parentId]"
:maxLength='50'>
<a-select-option v-for="item in workGroupList" :key="item.id" :value="item.id">{{ item.workingGroupProject }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="6" :md="8" :sm="24" v-if="meetingType === '2' "> <a-col :xl="6" :md="8" :sm="24" v-if="meetingType === '2' ">
<a-form-item label="标协会议类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="标协会议类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag v-decorator="['tbMeetingType',validatorRules.tbMeetingType]" :trigger-change="true" style="width: 100%" dict-code="standard_meeting_type" <j-dict-select-tag v-decorator="['tbMeetingType',validatorRules.tbMeetingType]" :trigger-change="true"
style="width: 100%" dict-code="standard_meeting_type"
placeholder="请选择标协会议类型"></j-dict-select-tag> placeholder="请选择标协会议类型"></j-dict-select-tag>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -47,7 +59,8 @@
<a-col :xl="6" :md="8" :sm="24"> <a-col :xl="6" :md="8" :sm="24">
<a-form-item label="年份" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="年份" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-year-date v-decorator="['particularYear',validatorRules.particularYear]" placeholder="请选择年份" style="width: 100%"></j-year-date> <j-year-date v-decorator="['particularYear',validatorRules.particularYear]" placeholder="请选择年份"
style="width: 100%"></j-year-date>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :md="8" :sm="24"> <a-col :xl="6" :md="8" :sm="24">
@@ -79,8 +92,9 @@
<a-col :xl="6" :md="8" :sm="24"> <a-col :xl="6" :md="8" :sm="24">
<a-form-item label="报名截止时间" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="报名截止时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择报名截止时间" style="width: 100%;" v-decorator="['registerDeadline',validatorRules.registerDeadline]" :trigger-change="true" <j-date placeholder="请选择报名截止时间" style="width: 100%;"
date-format="YYYY-MM-DD HH:mm:ss" :show-time="true" /> v-decorator="['registerDeadline',validatorRules.registerDeadline]" :trigger-change="true"
date-format="YYYY-MM-DD HH:mm:ss" :show-time="true"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -121,7 +135,7 @@
<!--邀请码begin--> <!--邀请码begin-->
<!-- 国际研讨会出现--> <!-- 国际研讨会出现-->
<section v-if="meetingType === '3' "> <section v-if="meetingType === '3' ">
<div class="item-title">邀请码</div> <div class="item-title">邀请码</div>
<a-row :gutter="24"> <a-row :gutter="24">
@@ -130,7 +144,7 @@
<a-input placeholder="请输入邀请码" <a-input placeholder="请输入邀请码"
@change="event => event.target.value = event.target.value.trim()" @change="event => event.target.value = event.target.value.trim()"
:maxLength='50' :maxLength='50'
v-decorator="['vipInvitationCode',validatorRules.invitationCode]"></a-input> v-decorator="['vipInvitationCode',validateInviteCode.invitationCode]"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -139,7 +153,7 @@
<a-input placeholder="请输入邀请码" <a-input placeholder="请输入邀请码"
@change="event => event.target.value = event.target.value.trim()" @change="event => event.target.value = event.target.value.trim()"
:maxLength='50' :maxLength='50'
v-decorator="[ 'speakerInvitationCode',validatorRules.invitationCode]"></a-input> v-decorator="[ 'speakerInvitationCode',validateInviteCode.invitationCode]"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -148,7 +162,7 @@
<a-input placeholder="请输入邀请码" <a-input placeholder="请输入邀请码"
@change="event => event.target.value = event.target.value.trim()" @change="event => event.target.value = event.target.value.trim()"
:maxLength='50' :maxLength='50'
v-decorator="[ 'guestInvitationCode',validatorRules.invitationCode]"></a-input> v-decorator="[ 'guestInvitationCode',validateInviteCode.invitationCode]"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -157,18 +171,18 @@
<a-input placeholder="请输入邀请码" <a-input placeholder="请输入邀请码"
@change="event => event.target.value = event.target.value.trim()" @change="event => event.target.value = event.target.value.trim()"
:maxLength='50' :maxLength='50'
v-decorator="[ 'cooperativeInvitationCode',validatorRules.invitationCode]"></a-input> v-decorator="[ 'cooperativeInvitationCode',validateInviteCode.invitationCode]"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
</section> </section>
<!--邀请码end--> <!--邀请码end-->
<!--会议费用begin--> <!--会议费用begin-->
<div class="item-title">会议费用</div> <div class="item-title">会议费用</div>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="8" :md="8" :sm="24"> <a-col :xxl="6" :xl="8" :md="12" :sm="24">
<a-form-item label="会议费用" :labelCol="labelCol" :wrapperCol="{ xs: {span: 24},sm: {span: 16}}"> <a-form-item label="会议费用" :labelCol="labelCol" :wrapperCol="{ xs: {span: 24},sm: {span: 16}}">
<a-input placeholder="请输入会议费用" <a-input placeholder="请输入会议费用"
:maxLength='50' :maxLength='50'
@@ -177,9 +191,9 @@
<span class="yuan">元/人</span> <span class="yuan">元/人</span>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 标协会议才有 --> <!-- 标协会议才有 -->
<a-col :xl="8" :md="8" :sm="24" v-if="meetingType === '2' "> <a-col :xxl="6" :xl="10" :md="12" :sm="24" v-if="meetingType === '2' ">
<a-form-item label="会议费用(标协会员)" :labelCol="labelCol" :wrapperCol="{ xs: {span: 24},sm: {span: 16}}"> <a-form-item label="会议费用(标协会员)" :labelCol="{ xs: {span: 24},sm: {span: 8}}" :wrapperCol="{ xs: {span: 24},sm: {span: 16}}">
<a-input placeholder="请输入会议费用" <a-input placeholder="请输入会议费用"
:maxLength='50' :maxLength='50'
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9.]/g,'')}" @change="(e) => {e.target.value = e.target.value.replace(/[^0-9.]/g,'')}"
@@ -193,14 +207,14 @@
<!--联系方式begin--> <!--联系方式begin-->
<div class="item-title">联系方式</div> <div class="item-title">联系方式</div>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :md="8" :sm="24"> <a-col :xxl="6" :xl="8" :md="12" :sm="24">
<a-form-item label="会议负责人" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="会议负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<select-principal placeholder="请选择会议负责人" <select-principal placeholder="请选择会议负责人"
@change="selectPerson" @change="selectPerson"
v-decorator="['directorId',validatorRules.directorId]"></select-principal> v-decorator="['directorId',validatorRules.directorId]"></select-principal>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :md="8" :sm="24"> <a-col :xxl="6" :xl="8" :md="12" :sm="24">
<a-form-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入手机号" <a-input placeholder="请输入手机号"
disabled disabled
@@ -210,7 +224,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<!--标协会议才有--> <!--标协会议才有-->
<a-col :xl="6" :md="8" :sm="24" v-if="meetingType === '2' "> <a-col :xxl="6" :xl="8" :md="12" :sm="24" v-if="meetingType === '2' ">
<a-form-item label="酒店名称" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="酒店名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入酒店名称" <a-input placeholder="请输入酒店名称"
:maxLength='50' :maxLength='50'
@@ -219,7 +233,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<!--标协会议才有--> <!--标协会议才有-->
<a-col :xl="6" :md="8" :sm="24" v-if="meetingType === '2' "> <a-col :xxl="6" :xl="8" :md="12" :sm="24" v-if="meetingType === '2' ">
<a-form-item label="酒店地址" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="酒店地址" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入酒店地址" <a-input placeholder="请输入酒店地址"
:maxLength='50' :maxLength='50'
@@ -228,39 +242,39 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<!--标协会议--> <!--标协会议-->
<section v-if="meetingType === '2'"> <section v-if="meetingType === '2'">
<a-row :gutter="24" v-for="(hotel, index) in model.hotelList" :key="index" class="hotelInfo"> <a-row :gutter="24" v-for="(hotel, index) in model.hotelContactsList" :key="index" class="hotelInfo">
<a-col :xl="6" :md="8" :sm="24"> <a-col :xxl="6" :xl="8" :md="12" :sm="24">
<a-form-item label="酒店联系人" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="酒店联系人" :labelCol="{ xs: {span: 24},sm: {span: 8}}" :wrapperCol="{ xs: {span: 24},sm: {span: 16}}">
<a-input <a-input
@change="event => event.target.value = event.target.value.trim()" @change="event => event.target.value = event.target.value.trim()"
:maxLength="50" :maxLength="50"
v-decorator="['hotelList['+index+'].contactPerson', validatorRules.contactPerson]" v-decorator="['hotelContactsList['+index+'].hotelContacts', validatorRules.contactPerson]"
placeholder="请输入酒店联系人"></a-input> placeholder="请输入酒店联系人"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :md="8" :sm="24"> <a-col :xxl="6" :xl="8" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input <a-input
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9.]/g,'')}" @change="(e) => {e.target.value = e.target.value.replace(/[^0-9.]/g,'')}"
:maxLength="15" :maxLength="15"
v-decorator="['hotelList['+index+'].telephoneNumber',validatorRules.telephoneNumber]" v-decorator="['hotelContactsList['+index+'].hotelContactsPhone',validatorRules.telephoneNumber]"
placeholder="请输入联系人手机号"></a-input> placeholder="请输入联系人手机号"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="2" :md="2" > <a-col :xl="2" :md="2">
<a-form-item> <a-form-item>
<a-icon class="add-icon" type="plus" @click="addNew(index)"/> <a-icon class="add-icon" type="plus" @click="addNew(index)"/>
<a-icon <a-icon
class="remove-icon" class="remove-icon"
type="minus-circle-o" type="minus-circle-o"
:class="{'disabled': model.hotelList.length === 1 }" :class="{'disabled': model.hotelContactsList.length === 1 }"
@click="() => remove(index)"/> @click="() => remove(index)"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
</section> </section>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="12" :md="8" :sm="24"> <a-col :xl="12" :md="8" :sm="24">
@@ -287,7 +301,8 @@
</template> </template>
<script> <script>
import {getUserInfo,getMeetInfoById} from "@api/inconmeMeetingApi"; import {getUserInfo, getMeetInfoById,getAllWorkProjects} from "@api/inconmeMeetingApi";
import {isRepeat} from "@/utils/util";
import {httpAction} from "@api/manage"; import {httpAction} from "@api/manage";
import JDictSelectTag from "@comp/dict/JDictSelectTag"; import JDictSelectTag from "@comp/dict/JDictSelectTag";
import JYearDate from "@comp/jero/JYearDate"; import JYearDate from "@comp/jero/JYearDate";
@@ -338,24 +353,34 @@ export default {
// 详细地址 // 详细地址
address: '', address: '',
// 会议类型 新增时默认为其他会议 // 会议类型 新增时默认为其他会议
meetingType:"4", meetingType: "4",
validatorRules: meetingValidate, validatorRules: meetingValidate,
validateInviteCode: {
invitationCode: {
rules: [
{required: true, validator: this.validateCode},
],
validateTrigger: ['blur']
}
},
url: { url: {
add: "/meeting/payMeeting/add", add: "/meeting/payMeeting/add",
edit: "/meeting/payMeeting/edit", edit: "/meeting/payMeeting/edit",
}, },
// 召开时间 // 召开时间
newConvokeTime:'', newConvokeTime: '',
// 注册召开时间 // 注册召开时间
newSignInTime:'', newSignInTime: '',
// 工作组会议列表
workGroupList:[]
} }
}, },
created() { created() {
this.pcaData = new AreaPca(); this.pcaData = new AreaPca();
// 编辑获取会议信息 // 编辑获取会议信息
if(this.$route.query.id){ if (this.$route.query.id) {
getMeetInfoById({id:this.$route.query.id}).then(res => { getMeetInfoById({id: this.$route.query.id}).then(res => {
if(res.success){ if (res.success) {
this.edit(res.result) this.edit(res.result)
} }
}) })
@@ -366,19 +391,45 @@ export default {
/* /*
* 新增 * 新增
* */ * */
add(){ add() {
this.edit({}) this.edit({})
}, },
/* /*
* 编辑 * 编辑
* */ * */
edit(record){ edit(record) {
this.form.resetFields() this.form.resetFields()
this.model = Object.assign({},record) this.model = Object.assign({}, record)
let dateFormat = 'YYYY-MM-DD HH:mm:ss'
// 修改会议类型 控制dom显示
this.meetingType = record.meetingType + ''
// 当为工作组会议的时候 需要获取工作组
if(this.meetingType === '1'){
this.getWorkSelectList()
}
// 召开时间回显
this.model.convokeTime = [moment(this.model.startTime, dateFormat), moment(this.model.endTime, dateFormat)]
// 注册签到时间回显
this.model.signInTime = [moment(this.model.startSignInTime, dateFormat), moment(this.model.endSignInTime, dateFormat)]
// 后端需要的召开时间
this.newConvokeTime = [this.model.startTime, this.model.endTime]
// 后端需要的注册签到时间
this.newSignInTime = [this.model.startSignInTime, this.model.endSignInTime]
// 联系人电话
this.model.directorPhone = this.$route.query.directorPhone
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'meetingName','meetingType')) this.form.setFieldsValue(pick(this.model, 'meetingName', 'meetingType', 'convokeTime', 'particularYear', 'estimatedNumber', 'meetingFiles', 'registerDeadline', 'meetingContent', 'convokeLocale', 'address', 'meetingCosts', 'directorId', 'remark', 'directorPhone'))
// 如果是标协会议则回显 标协会议的字段
// if(this.meetingType === '2'){
// this.form.setFieldsValue(pick(this.model,'signInTime', ))
// }
// 如果是国际研讨会则赋值邀请码
if (this.meetingType === '3') {
this.form.setFieldsValue(pick(this.model, 'vipInvitationCode', 'speakerInvitationCode', 'guestInvitationCode', 'cooperativeInvitationCode'))
}
}) })
}, },
/* /*
* 发布会议 * 发布会议
@@ -389,15 +440,19 @@ export default {
if (!err) { if (!err) {
let httpurl = '' let httpurl = ''
let method = 'post' let method = 'post'
httpurl = this.url.add if (that.model.id) {
httpurl = this.url.edit
} else {
httpurl = this.url.add
}
let placeName = values.convokeLocale let placeName = values.convokeLocale
const formData = Object.assign(this.model, values,{ venue: this.getPcaText(placeName) }) const formData = Object.assign(this.model, values, {venue: this.getPcaText(placeName)})
// 转换召开时间 // 转换召开时间
formData.startTime = this.newConvokeTime[0] formData.startTime = this.newConvokeTime[0]
formData.endTime = this.newConvokeTime[1] formData.endTime = this.newConvokeTime[1]
// 转换注册签到时间 // 转换注册签到时间
if(values.signInTime){ if (values.signInTime) {
formData.startSignInTime = this.newSignInTime[0] formData.startSignInTime = this.newSignInTime[0]
formData.endSignInTime = this.newSignInTime[1] formData.endSignInTime = this.newSignInTime[1]
} }
console.log('表单提交数据', formData) console.log('表单提交数据', formData)
@@ -432,25 +487,29 @@ export default {
* */ * */
changeMeetingType(val) { changeMeetingType(val) {
this.meetingType = val this.meetingType = val
if(val === '2'){ // 如果是工作组会议就需要查询所有的工作组
this.model.hotelList =[{ if(val === '1'){
contactPerson: '', this.getWorkSelectList()
telephoneNumber: '' }
if (val === '2') {
this.model.hotelContactsList = [{
hotelContacts: '',
hotelContactsPhone: ''
}] }]
}else { } else {
if(this.model.hasOwnProperty('hotelList')){ if (this.model.hasOwnProperty('hotelContactsList')) {
delete this.model.hotelList delete this.model.hotelContactsList
} }
} }
}, },
/* /*
* 会议负责人 * 会议负责人
* */ * */
selectPerson(val){ selectPerson(val) {
getUserInfo({id:val}).then(res => { getUserInfo({id: val}).then(res => {
if(res.success){ if (res.success) {
this.$nextTick( () => { this.$nextTick(() => {
this.form.setFieldsValue({directorPhone:res.result.phone}) this.form.setFieldsValue({directorPhone: res.result.phone})
}) })
} }
}) })
@@ -459,22 +518,22 @@ export default {
* 添加酒店联系人 * 添加酒店联系人
* */ * */
addNew(index) { addNew(index) {
if (this.model.hotelList.length >= 5) { if (this.model.hotelContactsList.length >= 5) {
this.$message.warning('最多添加5个酒店联系人') this.$message.warning('最多添加5个酒店联系人')
return return
} }
const { form } = this const {form} = this
const obj = { const obj = {
contactPerson: '', hotelContacts: '',
telephoneNumber: '' hotelContactsPhone: ''
} }
const keys = form.getFieldValue('hotelList') const keys = form.getFieldValue('hotelContactsList')
// 增加数据后重新赋值 // 增加数据后重新赋值
this.model.hotelList.splice(index + 1, 0, obj) this.model.hotelContactsList.splice(index + 1, 0, obj)
keys.splice(index + 1, 0, obj) keys.splice(index + 1, 0, obj)
this.$nextTick(() => { this.$nextTick(() => {
form.setFieldsValue({ form.setFieldsValue({
hotelList: keys hotelContactsList: keys
}) })
}) })
}, },
@@ -483,19 +542,19 @@ export default {
* */ * */
remove(k) { remove(k) {
// 如果长度是1的话则不进行删除操作 // 如果长度是1的话则不进行删除操作
if (this.model.hotelList.length === 1) { if (this.model.hotelContactsList.length === 1) {
return return
} }
const { form } = this const {form} = this
// // can use data-binding to get // // can use data-binding to get
const hotelList = form.getFieldValue('hotelList') const hotelContactsList = form.getFieldValue('hotelContactsList')
// 把循环的dom元素删除 // 把循环的dom元素删除
this.model.hotelList.splice(k, 1) this.model.hotelContactsList.splice(k, 1)
// 把绑定在dom里面的值删除 // 把绑定在dom里面的值删除
hotelList.splice(k, 1) hotelContactsList.splice(k, 1)
// 重新赋值 // 重新赋值
form.setFieldsValue({ form.setFieldsValue({
hotelList: hotelList hotelContactsList: hotelContactsList
}) })
}, },
/* /*
@@ -507,14 +566,42 @@ export default {
/* /*
* 召开时间转化 * 召开时间转化
* */ * */
changeConvokeTime(date,dateString){ changeConvokeTime(date, dateString) {
this.newConvokeTime = dateString this.newConvokeTime = dateString
}, },
/* /*
* 注册签到时间转化 * 注册签到时间转化
* */ * */
changeSignTime(date,dateString){ changeSignTime(date, dateString) {
this.newSignInTime = dateString this.newSignInTime = dateString
},
/*
* 校验邀请码
* */
validateCode(rule, value, callback) {
if (value === null || value === '' || value === undefined) {
callback(new Error('请输入邀请码'))
}else {
let codeObj = this.form.getFieldsValue(['cooperativeInvitationCode', 'vipInvitationCode', 'speakerInvitationCode', 'guestInvitationCode'])
const codeArr = Object.values(codeObj)
console.log('codearr',codeArr)
// 校验是否重复
if(isRepeat(codeArr)){
callback('请填写不同的邀请码!')
}else {
callback()
}
}
},
/*
* 获取所有的工作组
* */
getWorkSelectList(){
getAllWorkProjects().then(res => {
if(res.success){
this.workGroupList = [...res.result]
}
})
} }
} }
} }
@@ -593,6 +680,7 @@ export default {
margin-right: 10px; margin-right: 10px;
cursor: pointer; cursor: pointer;
} }
.remove-icon { .remove-icon {
height: 100%; height: 100%;
cursor: pointer; cursor: pointer;
@@ -64,6 +64,7 @@
size="middle" size="middle"
bordered bordered
rowKey="id" rowKey="id"
:scroll="{x:true}"
:columns="columns" :columns="columns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
@@ -159,23 +160,26 @@ export default {
align: "center", align: "center",
dataIndex: 'venue', dataIndex: 'venue',
width: 160, width: 160,
customRender:function (text,record){
return text +'/'+record.address
}
}, },
{ {
title: '年份', title: '年份',
align: "center", align: "center",
dataIndex: 'particularYear', dataIndex: 'particularYear',
width: 60, width: 100,
}, },
{ {
title: '创建时间', title: '创建时间',
align: "center", align: "center",
dataIndex: 'createTime', dataIndex: 'createTime',
width: 160,
}, },
{ {
title: '操作', title: '操作',
align: "center", align: "center",
fixed:'right', fixed:'right',
width: 160,
scopedSlots: {customRender: 'action'} scopedSlots: {customRender: 'action'}
}, },
], ],
@@ -216,7 +220,8 @@ export default {
this.$router.push({ this.$router.push({
path: '/incomePayments/meetManage/AddOrDetailMeet', path: '/incomePayments/meetManage/AddOrDetailMeet',
query:{ query:{
id:record.id id:record.id,
directorPhone:record.directorPhone
} }
}) })
}, },
@@ -100,11 +100,5 @@ export default {
{ required: true, message: '请输入联系人手机号!' }, { required: true, message: '请输入联系人手机号!' },
], ],
validateTrigger:['blur'] validateTrigger:['blur']
},
invitationCode:{
rules: [
{ required: true, message: '请输入邀请码!' },
],
validateTrigger:['blur']
} }
} }
@@ -6,13 +6,27 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="企业名称"> <a-form-item label="企业名称">
<a-input placeholder="请输入企业名称" v-model="queryParam.companyName"></a-input> <a-input
placeholder="请输入企业名称"
v-model="queryParam.companyName"
></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <span
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button> style="float: left; overflow: hidden"
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> 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> </span>
</a-col> </a-col>
</a-row> </a-row>
@@ -23,7 +37,12 @@
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">添加</a-button>--> <!-- <a-button @click="handleAdd" type="primary" icon="plus">添加</a-button>-->
<a-button type="primary" icon="download" @click="handleExportXls('标协会员')">导出</a-button> <a-button
type="primary"
icon="download"
@click="handleExportXls('标协会员')"
>导出</a-button
>
<!-- <a-button type="danger" icon="delete" @click="batchDel">批量删除</a-button>--> <!-- <a-button type="danger" icon="delete" @click="batchDel">批量删除</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"--> <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">--> <!-- @change="handleImportExcel">-->
@@ -33,23 +52,26 @@
<!-- table区域-begin --> <!-- table区域-begin -->
<div> <div>
<a-table <a-table
ref="table" ref="table"
size="middle" size="middle"
bordered bordered
rowKey="id" rowKey="id"
:columns="columns" :columns="columns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
:loading="loading" :loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" :rowSelection="{
class="j-table-force-nowrap" selectedRowKeys: selectedRowKeys,
@change="handleTableChange"> onChange: onSelectChange,
}"
class="j-table-force-nowrap"
<template slot="detail" slot-scope="text,record"> @change="handleTableChange"
<div @click="openDetailModal(record)" class="color-blue">{{ text }}</div> >
<template slot="detail" slot-scope="text, record">
<div @click="openDetailModal(record)" class="color-blue">
{{ text }}
</div>
</template> </template>
<template slot="text" slot-scope="text"> <template slot="text" slot-scope="text">
@@ -57,11 +79,15 @@
<span v-else></span> <span v-else></span>
</template> </template>
<template slot="status" slot-scope="text,record"> <template slot="status" slot-scope="text, record">
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot> <status-slot
:statu-obj="record"
:status-no="text"
:status-type="true"
></status-slot>
</template> </template>
<template slot="status-pack" slot-scope="text,record"> <template slot="status-pack" slot-scope="text, record">
<status-slot :statu-obj="record" :status-no="text"></status-slot> <status-slot :statu-obj="record" :status-no="text"></status-slot>
</template> </template>
@@ -69,7 +95,6 @@
<a @click="handleEdit(record)">编辑</a> <a @click="handleEdit(record)">编辑</a>
<a @click="handleDelete(record.id)">删除</a> <a @click="handleDelete(record.id)">删除</a>
</span> </span>
</a-table> </a-table>
</div> </div>
<project-detail-modal ref="projectDetail"></project-detail-modal> <project-detail-modal ref="projectDetail"></project-detail-modal>
@@ -77,8 +102,8 @@
</template> </template>
<script> <script>
import {mixinDevice} from '@/utils/mixin' import { mixinDevice } from "@/utils/mixin";
import {JeroListMixin} from '@/mixins/JeroListMixin' import { JeroListMixin } from "@/mixins/JeroListMixin";
import ProjectDetailModal from "@comp/ProjectDetailModal"; import ProjectDetailModal from "@comp/ProjectDetailModal";
import "@/assets/less/TableExpand.less"; import "@/assets/less/TableExpand.less";
import StatusSlot from "@comp/tools/StatusSlot"; import StatusSlot from "@comp/tools/StatusSlot";
@@ -86,94 +111,94 @@ import StatusSlot from "@comp/tools/StatusSlot";
export default { export default {
name: "SafeguardStardsMemberList", name: "SafeguardStardsMemberList",
mixins: [JeroListMixin, mixinDevice], mixins: [JeroListMixin, mixinDevice],
components:{ components: {
ProjectDetailModal, ProjectDetailModal,
StatusSlot StatusSlot,
}, },
data() { data() {
return { return {
columns: [ columns: [
{ {
title: '序号', title: "序号",
dataIndex: '', dataIndex: "",
key: 'rowIndex', key: "rowIndex",
width: 60, width: 60,
align: "center", align: "center",
customRender: function (t, r, index) { customRender: function (t, r, index) {
return parseInt(index) + 1; return parseInt(index) + 1;
} },
}, },
{ {
title: '会员编号', title: "会员编号",
align: "center", align: "center",
dataIndex: 'memberNo', dataIndex: "memberNo",
}, },
{ {
title: '企业名称', title: "企业名称",
align: "center", align: "center",
dataIndex: 'companyName', dataIndex: "companyName",
scopedSlots: {customRender: 'detail'} scopedSlots: { customRender: "detail" },
}, },
{ {
title: '会员类型', title: "会员类型",
align: "center", align: "center",
dataIndex: 'memberType_dictText', dataIndex: "memberType_dictText",
}, },
{ {
title: '联系人', title: "联系人",
align: "center", align: "center",
dataIndex: 'liaisonMan', dataIndex: "liaisonMan",
}, },
{ {
title: '邮箱', title: "邮箱",
align: "center", align: "center",
dataIndex: 'email', dataIndex: "email",
}, },
{ {
title: '手机', title: "手机",
align: "center", align: "center",
dataIndex: 'mobile', dataIndex: "mobile",
}, },
{ {
title: '会员状态', title: "会员状态",
align: "center", align: "center",
dataIndex: 'memberStatus_dictText', dataIndex: "memberStatus_dictText",
}, },
{ {
title: '注册时间', title: "注册时间",
align: "center", align: "center",
dataIndex: 'registerTime', dataIndex: "registerTime",
scopedSlots: {customRender: 'htmlSlot'} scopedSlots: { customRender: "htmlSlot" },
}, },
{ {
title: '打包', title: "打包",
align: "center", align: "center",
dataIndex: 'pack', dataIndex: "pack",
scopedSlots: {customRender: 'status-pack'} scopedSlots: { customRender: "status-pack" },
}, },
{ {
title: '需要发票', title: "需要发票",
align: "center", align: "center",
dataIndex: 'invoiceRequirements', dataIndex: "invoiceRequirements",
scopedSlots: {customRender: 'status-pack'} scopedSlots: { customRender: "status-pack" },
}, },
{ {
title: '到账', title: "到账",
align: "center", align: "center",
dataIndex: 'inAccount', dataIndex: "inAccount",
scopedSlots: {customRender: 'status'} scopedSlots: { customRender: "status" },
}, },
{ {
title: '开票', title: "开票",
align: "center", align: "center",
dataIndex: 'makeInvoice', dataIndex: "makeInvoice",
scopedSlots: {customRender: 'status'} scopedSlots: { customRender: "status" },
}, },
{ {
title: '邮寄', title: "邮寄",
align: "center", align: "center",
dataIndex: 'mail', dataIndex: "mail",
scopedSlots: {customRender: 'status'} scopedSlots: { customRender: "status" },
}, },
], ],
disableMixinCreated: true, disableMixinCreated: true,
@@ -181,17 +206,17 @@ export default {
list: "/member/tbMemberProjectSubitem/page", list: "/member/tbMemberProjectSubitem/page",
exportXlsUrl: "/member/tbMemberProjectSubitem/exportXls", exportXlsUrl: "/member/tbMemberProjectSubitem/exportXls",
}, },
} };
}, },
created() { created() {
this.filters.projectId = this.$route.query.id this.filters.projectId = this.$route.query.id;
this.loadData(1) this.loadData(1);
} },
} };
</script> </script>
<style scoped> <style scoped>
@import '~@assets/less/common.less'; @import "~@assets/less/common.less";
.color-blue { .color-blue {
color: #069f99; color: #069f99;
cursor: pointer; cursor: pointer;
@@ -1,70 +1,121 @@
<template> <template>
<j-modal <j-modal
:title="title" :title="title"
:width="width" :width="width"
:visible="visible" :visible="visible"
:confirmLoading="confirmLoading" :confirmLoading="confirmLoading"
switchFullscreen switchFullscreen
@ok="handleOk" @ok="handleOk"
@cancel="handleCancel" @cancel="handleCancel"
cancelText="关闭"> cancelText="关闭"
>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="12" :sm="24"> <a-col :xl="12" :sm="24">
<a-form-item label="会员单位" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item
<company-select placeholder="请选择会员单位" label="会员单位"
v-decorator="['companyId',validatorRules.companyId]" :labelCol="labelCol"
@change="companyChange" :wrapperCol="wrapperCol"
:maxLength='50'> >
<company-select
placeholder="请选择会员单位"
v-decorator="['companyId', validatorRules.companyId]"
@change="companyChange"
:maxLength="50"
>
</company-select> </company-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="12" :sm="24"> <a-col :xl="12" :sm="24">
<a-form-item label="企业联系人" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item
<select-contacts :selected-company="selectedCompany" label="企业联系人"
placeholder="请选择企业联系人" :labelCol="labelCol"
v-decorator="['companyContactId',validatorRules.companyContactId]" :wrapperCol="wrapperCol"
:maxLength='50' >
ref="selectMailContacts" <select-contacts
@ok="addContactsOk"></select-contacts> :selected-company="selectedCompany"
:init-contacts="selectPerson"
placeholder="请选择企业联系人"
v-decorator="[
'companyContactId',
validatorRules.companyContactId,
]"
:maxLength="50"
ref="selectMailContacts"
@ok="addContactsOk"
></select-contacts>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="12" :sm="24"> <a-col :xl="12" :sm="24">
<a-form-item label="邮寄联系人" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item
<select-contacts :selected-company="selectedCompany" label="邮寄联系人"
placeholder="请选择邮寄联系人" :labelCol="labelCol"
v-decorator="['postContactId',validatorRules.postContactId]" :wrapperCol="wrapperCol"
:maxLength='50' >
ref="selectMailContacts" <select-contacts
@ok="addContactsOk"></select-contacts> :selected-company="selectedCompany"
:init-contacts="selectMailPerson"
placeholder="请选择邮寄联系人"
v-decorator="['postContactId', validatorRules.postContactId]"
:maxLength="50"
ref="selectMailContacts"
@ok="addContactsOk"
></select-contacts>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="12" :sm="24"> <a-col :xl="12" :sm="24">
<a-form-item label="应收金额" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item
<a-input placeholder="请输入应收金额" label="应收金额"
:maxLength='50' :labelCol="labelCol"
v-decorator="[ 'amountReceivable', validatorRules.amountReceivable]" :wrapperCol="wrapperCol"
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9.]/g,'')}"></a-input> >
<a-input
placeholder="请输入应收金额"
:maxLength="50"
v-decorator="[
'amountReceivable',
validatorRules.amountReceivable,
]"
@change="
(e) => {
e.target.value = e.target.value.replace(/[^0-9.]/g, '');
}
"
></a-input>
<span class="yuan">元</span> <span class="yuan">元</span>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="12" :sm="24"> <a-col :xl="12" :sm="24">
<a-form-item label="需要发票" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item
<j-dict-select-tag v-decorator="['needInvoice', validatorRules.needInvoice]" :triggerChange="true" label="需要发票"
placeholder="请输入发票类型" :labelCol="labelCol"
dictCode="invoice_type"/> :wrapperCol="wrapperCol"
>
<j-dict-select-tag
v-decorator="['needInvoice', validatorRules.needInvoice]"
:triggerChange="true"
placeholder="请输入发票类型"
dictCode="invoice_type"
/>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="12" :sm="24"> <a-col :xl="12" :sm="24">
<a-form-item label="来款方式" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item
<a-radio-group v-decorator="['paymentMethod',validatorRules.paymentMethod]" @change="changePaymentMethod"> label="来款方式"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
>
<a-radio-group
v-decorator="['paymentMethod', validatorRules.paymentMethod]"
@change="changePaymentMethod"
>
<a-radio :value="2">合同</a-radio> <a-radio :value="2">合同</a-radio>
<a-radio :value="3">收费通知</a-radio> <a-radio :value="3">收费通知</a-radio>
</a-radio-group> </a-radio-group>
@@ -72,54 +123,96 @@
</a-col> </a-col>
<!-- incomePaysType 2 是合同·--> <!-- incomePaysType 2 是合同·-->
<a-col :xl="12" :sm="24" v-if="incomePaysType === 2"> <a-col :xl="12" :sm="24" v-if="incomePaysType === 2">
<a-form-item label="合同号" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item
<a-input placeholder="请输入合同号" label="合同号"
:maxLength='50' :labelCol="labelCol"
v-decorator="[ 'contractNo', validatorRules.contractNo]" :wrapperCol="wrapperCol"
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input> >
<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-form-item>
</a-col> </a-col>
</a-row> </a-row>
<!-- incomePaysType 3 是收费通知·--> <!-- incomePaysType 3 是收费通知·-->
<a-row :gutter="24" v-if="incomePaysType === 3 "> <a-row :gutter="24" v-if="incomePaysType === 3">
<a-col :xl="12" :sm="24"> <a-col :xl="12" :sm="24">
<a-form-item label="收费通知号" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item
<a-input placeholder="请输入收费通知号" label="收费通知号"
:maxLength='50' :labelCol="labelCol"
v-decorator="[ 'chargeNoticeNo', validatorRules.chargeNoticeNo]" :wrapperCol="wrapperCol"
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input> >
<a-input
placeholder="请输入收费通知号"
:maxLength="50"
v-decorator="['chargeNoticeNo', validatorRules.chargeNoticeNo]"
@change="
(e) => {
e.target.value = (e.target.value + '').trim();
}
"
></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="收费通知" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item
<j-upload file-type="pdf" file-type-error-message="请上传收费通知" :multiple="false" :number="1" label="收费通知"
bizPath="payment" v-decorator="['chargeNoticeFileId']" :labelCol="labelCol"
:trigger-change="true"></j-upload> :wrapperCol="wrapperCol"
>
<j-upload
file-type="pdf"
file-type-error-message="请上传收费通知"
:multiple="false"
:number="1"
bizPath="payment"
v-decorator="['chargeNoticeFileId']"
:trigger-change="true"
></j-upload>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col> <a-col>
<a-form-item label="备注" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol"> <a-form-item
label="备注"
:labelCol="remarksLabelCol"
:wrapperCol="remarksWrapperCol"
>
<a-textarea <a-textarea
placeholder="请输入备注" placeholder="请输入备注"
:auto-size="{ minRows: 3, maxRows: 6 }" :auto-size="{ minRows: 3, maxRows: 6 }"
:maxLength='200' :maxLength="200"
v-decorator="['remark']" v-decorator="['remark']"
@change="e => {e.target.value = (e.target.value + '').trim()}"/> @change="
(e) => {
e.target.value = (e.target.value + '').trim();
}
"
/>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
</a-spin> </a-spin>
<contact-management-module ref="contactForm" is-company-disabled <contact-management-module
:selected-company="selectedCompany"></contact-management-module> ref="contactForm"
is-company-disabled
:selected-company="selectedCompany"
></contact-management-module>
</j-modal> </j-modal>
</template> </template>
<script> <script>
import pick from "lodash.pick"; import pick from "lodash.pick";
import {httpAction} from "@api/manage"; import { httpAction } from "@api/manage";
import JUpload from "@comp/jero/JUpload"; import JUpload from "@comp/jero/JUpload";
import CompanySelect from "@comp/company/CompanySelect"; import CompanySelect from "@comp/company/CompanySelect";
import ContactManagementModule from "@views/businessManagement/modules/ContactManagementModule"; import ContactManagementModule from "@views/businessManagement/modules/ContactManagementModule";
@@ -131,179 +224,211 @@ export default {
JUpload, JUpload,
CompanySelect, CompanySelect,
ContactManagementModule, ContactManagementModule,
SelectContacts SelectContacts,
}, },
data() { data() {
return { return {
title: '操作', title: "操作",
width: 800, width: 800,
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
form: this.$form.createForm(this), form: this.$form.createForm(this),
model: {}, model: {},
labelCol: { labelCol: {
xs: {span: 24}, xs: { span: 24 },
sm: {span: 6} sm: { span: 6 },
}, },
wrapperCol: { wrapperCol: {
xs: {span: 24}, xs: { span: 24 },
sm: {span: 18} sm: { span: 18 },
}, },
remarksLabelCol: { remarksLabelCol: {
xs: {span: 24}, xs: { span: 24 },
sm: {span: 3} sm: { span: 3 },
}, },
remarksWrapperCol: { remarksWrapperCol: {
xs: {span: 24}, xs: { span: 24 },
sm: {span: 21} sm: { span: 21 },
}, },
validatorRules: { validatorRules: {
companyId: { companyId: {
rules: [{required: true, message: '请选择会员单位'}], rules: [{ required: true, message: "请选择会员单位" }],
validateTrigger: 'blur' validateTrigger: "blur",
}, },
contractNo: { contractNo: {
rules: [{required: true, message: '请输入合同号'}], rules: [{ required: true, message: "请输入合同号" }],
validateTrigger: 'blur' validateTrigger: "blur",
}, },
companyContactId: { companyContactId: {
rules: [{required: true, message: '请选择企业联系人'}], rules: [{ required: true, message: "请选择企业联系人" }],
validateTrigger: 'blur' validateTrigger: "blur",
}, },
postContactId: { postContactId: {
rules: [{required: true, message: '请选择邮寄联系人'}], rules: [{ required: true, message: "请选择邮寄联系人" }],
validateTrigger: 'blur' validateTrigger: "blur",
}, },
paymentMethod: { paymentMethod: {
rules: [{required: true, message: '请选择来款方式'}], rules: [{ required: true, message: "请选择来款方式" }],
validateTrigger: ['blur', 'change'], validateTrigger: ["blur", "change"],
initialValue: 3, initialValue: 3,
}, },
amountReceivable: { amountReceivable: {
rules: [{required: true, message: '请输入应收金额'}], rules: [{ required: true, message: "请输入应收金额" }],
validateTrigger: 'blur' validateTrigger: "blur",
}, },
chargeNoticeNo: { chargeNoticeNo: {
rules: [{required: true, message: '请输入收费通知号'}], rules: [{ required: true, message: "请输入收费通知号" }],
validateTrigger: 'blur' validateTrigger: "blur",
}, },
needInvoice: { needInvoice: {
rules: [{required: true, message: '请选择发票类型'}], rules: [{ required: true, message: "请选择发票类型" }],
validateTrigger: ['change', 'blur'], validateTrigger: ["change", "blur"],
initialValue: 0 initialValue: 0,
}, },
}, },
// 来款方式 // 来款方式
incomePaysType:3, incomePaysType: 3,
// 选中的会员单位 // 选中的会员单位
selectedCompany: null, selectedCompany: null,
timer:null, // 选中的联系人
baseInfo:this.$store.state.currentProjetcInfo, selectPerson: null,
// 回显的邮寄联系人
selectMailPerson: null,
timer: null,
baseInfo: this.$store.state.currentProjetcInfo,
url: { url: {
add: "/jero/memberProjectSubitem/add", add: "/jero/memberProjectSubitem/add",
edit: "/jero/memberProjectSubitem/edit", edit: "/jero/memberProjectSubitem/edit",
} },
} };
}, },
methods: { methods: {
add() { add() {
this.edit({}) this.edit({});
}, },
edit(record) { edit(record) {
// 清除定时器 // 清除定时器
if(this.timer){ if (this.timer) {
clearTimeout(this.timer) clearTimeout(this.timer);
} }
this.form.resetFields() this.form.resetFields();
// 如果没有id 就是新增 新增需要将上级的项目收费通知与文件回显 // 如果没有id 就是新增 新增需要将上级的项目收费通知与文件回显
if(!record.hasOwnProperty('id')){ let flag = Object.prototype.hasOwnProperty.call(record, "id");
if (flag) {
// 加定时器是因为第一次赋值不成功 // 加定时器是因为第一次赋值不成功
this.timer = setTimeout( () => { this.timer = setTimeout(() => {
this.form.setFieldsValue({'chargeNoticeFileId':this.baseInfo.chargeNoticeFileId,'chargeNoticeNo':this.baseInfo.chargeNoticeNo}) this.form.setFieldsValue({
},100) chargeNoticeFileId: this.baseInfo.chargeNoticeFileId,
chargeNoticeNo: this.baseInfo.chargeNoticeNo,
});
}, 100);
} }
this.model = Object.assign({}, record) this.model = Object.assign({}, record);
// 编辑状态下的企业与联系人的回显 // 编辑状态下的企业与联系人的回显
if(record.companyId){ if (record.companyId) {
this.model.companyId ={ this.model.companyId = {
id:record.companyId, id: record.companyId,
companyName: record.companyName companyName: record.companyName,
} };
this.selectedCompany = Object.assign({},this.model.companyId) this.selectedCompany = Object.assign({}, this.model.companyId);
this.selectPerson = {
id: this.model.companyContactTemporaryId,
name: this.model.companyContactName,
};
this.selectMailPerson = {
id: this.model.postContactTemporaryId,
name: this.model.postContactName,
};
// 修改来款方式 控制dom对应显示隐藏 // 修改来款方式 控制dom对应显示隐藏
this.incomePaysType = record.paymentMethod this.incomePaysType = record.paymentMethod;
} }
this.visible = true this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'companyId', 'companyContactId', 'postContactId', 'amountReceivable', 'needInvoice', 'paymentMethod', 'contractNo', 'chargeNoticeNo', 'chargeNoticeFileId', 'remark')) this.form.setFieldsValue(
}) pick(
this.model,
"companyId",
"companyContactId",
"postContactId",
"amountReceivable",
"needInvoice",
"paymentMethod",
"contractNo",
"chargeNoticeNo",
"chargeNoticeFileId",
"remark"
)
);
});
}, },
close() { close() {
this.incomePaysType = 3 this.incomePaysType = 3;
this.$emit('close') this.$emit("close");
this.visible = false this.visible = false;
clearTimeout(this.timer) clearTimeout(this.timer);
}, },
handleOk() { handleOk() {
const that = this const that = this;
// 触发表单验证 // 触发表单验证
this.form.validateFields((err, values) => { this.form.validateFields((err, values) => {
if (!err) { if (!err) {
let httpurl = '' let httpurl = "";
if (!this.model.id) { if (!this.model.id) {
httpurl += this.url.add httpurl += this.url.add;
} else { } else {
httpurl += this.url.edit httpurl += this.url.edit;
} }
const formData = Object.assign(this.model, values) const formData = Object.assign(this.model, values);
formData.companyId = values.companyId.id formData.companyId = values.companyId.id;
formData.projectId = this.$store.state.currentProjetcInfo.id formData.projectId = this.$store.state.currentProjetcInfo.id;
httpAction(httpurl, formData, 'post').then((res) => { httpAction(httpurl, formData, "post")
if (res.success) { .then((res) => {
that.$message.success(res.message) if (res.success) {
that.$emit('ok') that.$message.success(res.message);
that.close() that.$emit("ok");
} else { that.close();
that.$message.warning(res.message) } else {
} that.$message.warning(res.message);
}).finally(() => { }
that.confirmLoading = false })
}) .finally(() => {
that.confirmLoading = false;
});
} }
}) });
}, },
/* /*
* 来款方式 * 来款方式
* */ * */
changePaymentMethod(e) { changePaymentMethod(e) {
this.incomePaysType = e.target.value this.incomePaysType = e.target.value;
}, },
/* /*
* 选择会员单位 * 选择会员单位
* */ * */
companyChange(val) { companyChange(val) {
this.selectedCompany = Object.assign({}, val, {companyName: val.name}) this.selectedCompany = Object.assign({}, val, { companyName: val.name });
}, },
handleCancel() { handleCancel() {
this.selectedCompany = {} this.selectedCompany = {};
this.close() this.close();
}, },
/* /*
* 筛选 * 筛选
* */ * */
filterOption(input, option) { filterOption(input, option) {
console.log("inp", option) console.log("inp", option);
}, },
/* /*
* 新增联系人后刷新下拉框数据 * 新增联系人后刷新下拉框数据
* */ * */
addContactsOk() { addContactsOk() {
this.$refs.selectContacts.getContactsList() this.$refs.selectContacts.getContactsList();
this.$refs.selectMailContacts.getContactsList() this.$refs.selectMailContacts.getContactsList();
} },
} },
} };
</script> </script>
<style scoped> <style scoped>