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