【update】-WASIC取消默认选中,调整金额的计算方式

This commit is contained in:
fengchenchen
2023-11-02 17:07:56 +08:00
parent 8206167a35
commit fdb361a31d
3 changed files with 30 additions and 4 deletions
+1
View File
@@ -31,6 +31,7 @@ export const InvoiceTypeEnums = {
// 免费专题 // 免费专题
export const LinkTopicsEnums = { export const LinkTopicsEnums = {
free: { name: '免费专题', index: 6 }, free: { name: '免费专题', index: 6 },
freeTwo: { name: '免费专题', index: 8 },
default: {name: '114/22焦点论坛(默认专题)', index: 99} default: {name: '114/22焦点论坛(默认专题)', index: 99}
} }
@@ -90,7 +90,7 @@
<a-checkbox v-for="item in item.children" :key="'a_checkbox_'+ item.value" :value="item.value" :disabled="item.disabled">{{ item.text }}</a-checkbox> <a-checkbox v-for="item in item.children" :key="'a_checkbox_'+ item.value" :value="item.value" :disabled="item.disabled">{{ item.text }}</a-checkbox>
</div> </div>
<div class="radio-div" v-if="item.radioChildren"> <div class="radio-div" v-if="item.radioChildren">
<a-radio-group v-decorator="[item.radioKey]" :disabled="model.inAccount === 1"> <a-radio-group v-decorator="[item.radioKey]" :disabled="model.inAccount === 1" @change="changeRadioTopic">
<a-radio v-for="item in item.radioChildren" :key="'a_radio_'+ item.value" :value="item.value" :disabled="item.disabled">{{ item.text }}</a-radio> <a-radio v-for="item in item.radioChildren" :key="'a_radio_'+ item.value" :value="item.value" :disabled="item.disabled">{{ item.text }}</a-radio>
</a-radio-group> </a-radio-group>
</div> </div>
@@ -219,7 +219,7 @@ export default {
}, },
choiceTopic: { choiceTopic: {
rules: [ rules: [
{required: true, message: '请选择会议名称'}, {required: true, validator: this.checkChoiceTopic},
], ],
validateTrigger: ['change'] validateTrigger: ['change']
}, },
@@ -332,9 +332,34 @@ export default {
}, },
}, },
methods: { methods: {
// 验证选择会议名称的情况
checkChoiceTopic(rules, value, callback) {
console.log(value)
let arr = []
if (value && value.length > 0) {
arr = [...value]
}
let radioKey = this.form.getFieldValue('radioKey')
let radioKeyTwo = this.form.getFieldValue('radioKeyTwo')
if(radioKey || radioKeyTwo) {
callback()
} else {
arr = arr.filter(tt => tt !== LinkTopicsEnums.freeTwo.index + '')
if(arr.length === 0) {
callback('请至少选择一个非参观类会议')
} else {
callback()
}
}
},
choiceTopicChange(e) { choiceTopicChange(e) {
console.log(e) console.log(e)
}, },
changeRadioTopic() {
this.$nextTick(() => {
this.form.validateFields(['choiceTopic'])
})
},
// 获取国际研讨会-能选择课题的数据字典数据 // 获取国际研讨会-能选择课题的数据字典数据
getLinkTopicsOptionArr(meetingId) { getLinkTopicsOptionArr(meetingId) {
getLinkTopics({id: meetingId}).then(res =>{ getLinkTopics({id: meetingId}).then(res =>{
@@ -366,7 +391,7 @@ export default {
// 新增页面,给Form赋值 // 新增页面,给Form赋值
if(!this.model.id) { if(!this.model.id) {
this.form.setFieldsValue({ this.form.setFieldsValue({
choiceTopic: [LinkTopicsEnums.default.index + ''] choiceTopic: []
}) })
} }
} }
@@ -37,7 +37,7 @@ const WasicTopicData = [
'value': '99', 'value': '99',
'text': '114/22焦点论坛(08:00-12:00,全体大会)', 'text': '114/22焦点论坛(08:00-12:00,全体大会)',
'title': '114/22焦点论坛(08:00-12:00,全体大会)', 'title': '114/22焦点论坛(08:00-12:00,全体大会)',
'disabled': true // 'disabled': true
} }
], ],
radioChildren: [ radioChildren: [