diff --git a/src/enums/commonEnums.js b/src/enums/commonEnums.js
index f6a7ac3..baa1879 100644
--- a/src/enums/commonEnums.js
+++ b/src/enums/commonEnums.js
@@ -50,3 +50,8 @@ export const IncomeMethod = {
noticeOfCharge: { name: '收费通知', value: '3'},
}
+// 是否
+export const YesOrNoEnums = {
+ yes: { name: '是', value: '1'},
+ no: { name: '否', value: '0'},
+}
\ No newline at end of file
diff --git a/src/views/projectManagement/WorkingGroupMemberUnitMaintenance.vue b/src/views/projectManagement/WorkingGroupMemberUnitMaintenance.vue
index 1ded46c..bfe9ca5 100644
--- a/src/views/projectManagement/WorkingGroupMemberUnitMaintenance.vue
+++ b/src/views/projectManagement/WorkingGroupMemberUnitMaintenance.vue
@@ -213,6 +213,7 @@ import PreviewFile from '../../components/jero/PreviewFile'
import EmailErrorMsgModal from './modules/EmailErrorMsgModal'
import WorkGroupSetLabel from './modules/WorkGroupSetLabel'
import { formatMoney } from '../../utils/formatMoney'
+import {YesOrNoEnums} from '@/enums/commonEnums'
// eslint-disable-next-line no-undef,no-unused-vars
const Base64 = require('js-base64').Base64
@@ -451,6 +452,8 @@ export default {
this.getChargeNoticeList()
this.$refs.modalForm.workingGroupId = this.workingGroupProjectId
this.$refs.modalForm.chargeNoticeList = this.chargeNoticeList
+ // 是否显示金额字段
+ this.$refs.modalForm.showPayField = (this.workingGroupDetail.payFlag + '') !== YesOrNoEnums.no.value
this.$refs.modalForm.add()
this.$refs.modalForm.title = '添加成员'
this.$refs.modalForm.disableSubmit = false
@@ -459,6 +462,8 @@ export default {
this.getChargeNoticeList()
this.$refs.modalForm.workingGroupId = this.workingGroupProjectId
this.$refs.modalForm.chargeNoticeList = this.chargeNoticeList
+ // 是否显示金额字段
+ this.$refs.modalForm.showPayField = (this.workingGroupDetail.payFlag + '') !== YesOrNoEnums.no.value
this.$refs.modalForm.edit(record)
this.$refs.modalForm.title = '编辑'
this.$refs.modalForm.disableSubmit = false
diff --git a/src/views/projectManagement/modules/WorkingGroupMemberUnitModule.vue b/src/views/projectManagement/modules/WorkingGroupMemberUnitModule.vue
index 862630d..9feb8c6 100644
--- a/src/views/projectManagement/modules/WorkingGroupMemberUnitModule.vue
+++ b/src/views/projectManagement/modules/WorkingGroupMemberUnitModule.vue
@@ -128,251 +128,253 @@
-
-
-
-
-
-
-
-
-
-
-
- 合同
-
- 无
- 合同
- 收费通知
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.label }}
-
-
-
-
-
-
-
+
-
-
-
-
-
- 元
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}">
-
- 元
-
-
-
-
-
-
-
-
- {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}">
-
- 元
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}">
-
- 元
-
-
-
-
-
-
-
-
-
-
-
- {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}">
-
- 元
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
+ ref="selectMailContacts">
+
+
+
+
+
+
+
+ 合同
+
+ 无
+ 合同
+ 收费通知
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}">
+
+ 元
+
+
+
+
+
+
+
+
+ {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}">
+
+ 元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}">
+
+ 元
+
+
+
+
+
+
+
+
+
+
+
+ {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}">
+
+ 元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -545,6 +547,7 @@ export default {
// hasContactOne: false, // 是否选择联系人1
// hasContactTwo: false, // 是否选择联系人2
// hasContactThree: false, // 是否选择联系人3
+ showPayField: '', // 是否收费,控制收费字段是否显示
url: {
add: '/project/payWorkingGroupSubitem/add',
edit: '/project/payWorkingGroupSubitem/edit'
@@ -907,13 +910,17 @@ export default {
if (this.model.payWorkingGroupSubItemContactsList[index].contactsId !== value) {
formData[index].remarks = null
}
- let mailContact = Object.values(this.form.getFieldValue(['mailContactsId']))[0]
- // 邮寄联系人非undefined时赋值
- if (!mailContact && index === 0) {
- this.model.mailContactsId = value
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'mailContactsId'))
- })
+ // 是否收费为否不显示邮寄联系人
+ let mailContactsId = this.form.getFieldValue(['mailContactsId'])
+ if (mailContactsId) {
+ let mailContact = Object.values(mailContactsId)[0]
+ // 邮寄联系人非undefined时赋值
+ if (!mailContact && index === 0) {
+ this.model.mailContactsId = value
+ this.$nextTick(() => {
+ this.form.setFieldsValue(pick(this.model, 'mailContactsId'))
+ })
+ }
}
}
this.$nextTick(() => {
diff --git a/src/views/projectManagement/modules/WorkingGroupProjectModule.vue b/src/views/projectManagement/modules/WorkingGroupProjectModule.vue
index fb1699b..d8aa196 100644
--- a/src/views/projectManagement/modules/WorkingGroupProjectModule.vue
+++ b/src/views/projectManagement/modules/WorkingGroupProjectModule.vue
@@ -31,6 +31,12 @@
v-decorator="['year',validatorRules.year]">
+
+
+
+
+
@@ -176,6 +182,7 @@ import SelectPrincipal from '@comp/company/SelectPrincipal'
import { isRepeat } from '../../../utils/util'
import { money } from '../../../utils/validate'
import { addZero } from '../../../utils/util'
+import {YesOrNoEnums} from '@/enums/commonEnums'
export default {
name: 'WorkingGroupProjectModule',
@@ -213,6 +220,10 @@ export default {
rules: [{ required: true, message: '请选择运行年份' }],
validateTrigger: 'change'
},
+ payFlag: {
+ rules: [{ required: true, message: '请选择是否收费' }],
+ validateTrigger: 'change'
+ },
principalIdA: {
rules: [{ required: true, validator: this.validatePrincipal }],
validateTrigger: 'change'
@@ -245,9 +256,13 @@ export default {
this.model = Object.assign({}, record)
this.visible = true
this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'workingGroupProject', 'year', 'principalIdA', 'principalIdB', 'convokeNum', 'operationCycle', 'yearChargeA', 'chargeNoticeNoA', 'chargeNoticeAId', 'yearChargeB', 'chargeNoticeNoB', 'chargeNoticeBId', 'missionAndObjectives', 'remarks'))
+ this.form.setFieldsValue(pick(this.model, 'workingGroupProject', 'year', 'payFlag', 'principalIdA', 'principalIdB', 'convokeNum', 'operationCycle', 'yearChargeA', 'chargeNoticeNoA', 'chargeNoticeAId', 'yearChargeB', 'chargeNoticeNoB', 'chargeNoticeBId', 'missionAndObjectives', 'remarks'))
if (!this.model.id) {
- this.form.setFieldsValue({'year': (new Date().getFullYear()).toString()})
+ this.form.setFieldsValue({
+ 'year': (new Date().getFullYear()).toString(),
+ // 是否收费默认是
+ payFlag: YesOrNoEnums.yes.value
+ })
}
})
},