Commit 91ddda18 by yuzhenWang

增加保费认定结果日期和loading效果

parent 5acc23d2
...@@ -82,7 +82,7 @@ const props = defineProps({ ...@@ -82,7 +82,7 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: true default: true
}, },
// 打开弹窗 // 确定按钮loading效果
confirmLoading: { confirmLoading: {
type: Boolean, type: Boolean,
default: false default: false
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
? '首期保费对账' ? '首期保费对账'
: '续期保费对账' : '续期保费对账'
}} }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="insuranceCompany" label="保险公司" width="150" /> <el-table-column prop="insuranceCompany" label="保险公司" width="150" />
...@@ -218,6 +217,7 @@ ...@@ -218,6 +217,7 @@
:showClose="true" :showClose="true"
@close="showAffirm = false" @close="showAffirm = false"
@confirm="confirmAffirm" @confirm="confirmAffirm"
:confirmLoading="settingAffirmLoading"
> >
<SearchForm ref="affirmFormRef" :config="affirmConfig" v-model="affirmFormModel" /> <SearchForm ref="affirmFormRef" :config="affirmConfig" v-model="affirmFormModel" />
</CommonDialog> </CommonDialog>
...@@ -320,6 +320,7 @@ const showRemittance = ref(false) ...@@ -320,6 +320,7 @@ const showRemittance = ref(false)
const remittanceFormRef = ref(null) const remittanceFormRef = ref(null)
const bankOptions = ref([]) //银行options const bankOptions = ref([]) //银行options
const currentRow = ref({}) //银行options const currentRow = ref({}) //银行options
const settingAffirmLoading = ref(false)
const searchConfig = ref([ const searchConfig = ref([
{ {
type: 'select', type: 'select',
...@@ -459,7 +460,7 @@ const affirmConfig = [ ...@@ -459,7 +460,7 @@ const affirmConfig = [
type: 'input', type: 'input',
prop: 'recognizedAmount', prop: 'recognizedAmount',
label: '保司认定金额', label: '保司认定金额',
inputType: 'decimal', inputType: 'decimal',
decimalDigits: 4, decimalDigits: 4,
rules: [ rules: [
{ required: true, message: '请输入', trigger: 'blur' }, { required: true, message: '请输入', trigger: 'blur' },
...@@ -495,7 +496,8 @@ const affirmConfig = [ ...@@ -495,7 +496,8 @@ const affirmConfig = [
placeholder: '请选择', placeholder: '请选择',
maxDate: 'today', maxDate: 'today',
visible: formData => visible: formData =>
formData.remainingUnpaidAmount && Number(formData.remainingUnpaidAmount) < 0 || Number(formData.remainingUnpaidAmount) == 0, (formData.remainingUnpaidAmount && Number(formData.remainingUnpaidAmount) < 0) ||
Number(formData.remainingUnpaidAmount) == 0,
rules: [{ required: true, message: '请输入', trigger: 'blur' }] rules: [{ required: true, message: '请输入', trigger: 'blur' }]
}, },
{ {
...@@ -506,7 +508,8 @@ const affirmConfig = [ ...@@ -506,7 +508,8 @@ const affirmConfig = [
maxDate: 'today', maxDate: 'today',
rules: [{ required: true, message: '请输入', trigger: 'blur' }], rules: [{ required: true, message: '请输入', trigger: 'blur' }],
visible: formData => visible: formData =>
formData.remainingUnpaidAmount && Number(formData.remainingUnpaidAmount) < 0 || Number(formData.remainingUnpaidAmount) == 0, (formData.remainingUnpaidAmount && Number(formData.remainingUnpaidAmount) < 0) ||
Number(formData.remainingUnpaidAmount) == 0
}, },
{ {
type: 'select', type: 'select',
...@@ -514,7 +517,30 @@ const affirmConfig = [ ...@@ -514,7 +517,30 @@ const affirmConfig = [
label: '保单状态', label: '保单状态',
dictType: 'csf_policy_status_new', dictType: 'csf_policy_status_new',
visible: formData => visible: formData =>
formData.remainingUnpaidAmount && Number(formData.remainingUnpaidAmount) < 0 || Number(formData.remainingUnpaidAmount) == 0, (formData.remainingUnpaidAmount && Number(formData.remainingUnpaidAmount) < 0) ||
Number(formData.remainingUnpaidAmount) == 0
},
{
type: 'date',
prop: 'policyExpirationDate',
label: '保单截至日',
placeholder: '请选择',
// maxDate: 'today',
visible: formData =>
(formData.remainingUnpaidAmount && Number(formData.remainingUnpaidAmount) < 0) ||
Number(formData.remainingUnpaidAmount) == 0
// rules: [{ required: true, message: '请输入', trigger: 'blur' }]
},
{
type: 'date',
prop: 'coolingOffEndDate',
label: '冷静期到期日',
placeholder: '请选择',
// maxDate: 'today',
visible: formData =>
(formData.remainingUnpaidAmount && Number(formData.remainingUnpaidAmount) < 0) ||
Number(formData.remainingUnpaidAmount) == 0,
rules: [{ required: true, message: '请输入', trigger: 'blur' }]
} }
] ]
//计算待付金额 //计算待付金额
...@@ -534,6 +560,7 @@ const calculateAmount = async () => { ...@@ -534,6 +560,7 @@ const calculateAmount = async () => {
} }
} }
const confirmAffirm = async () => { const confirmAffirm = async () => {
settingAffirmLoading.value = true
try { try {
const formData = await affirmFormRef.value.validate() const formData = await affirmFormRef.value.validate()
console.log(formData.value) console.log(formData.value)
...@@ -546,6 +573,7 @@ const confirmAffirm = async () => { ...@@ -546,6 +573,7 @@ const confirmAffirm = async () => {
newObj.premiumReconciliationBizId = currentRow.value.premiumReconciliationBizId newObj.premiumReconciliationBizId = currentRow.value.premiumReconciliationBizId
let res = await submitResult(newObj) let res = await submitResult(newObj)
if (res.code == 200) { if (res.code == 200) {
settingAffirmLoading.value = false
ElMessage.success('认定成功') ElMessage.success('认定成功')
showAffirm.value = false showAffirm.value = false
affirmFormModel.value = {} affirmFormModel.value = {}
...@@ -768,10 +796,10 @@ const handleUploadSuccess = (prop, Model) => { ...@@ -768,10 +796,10 @@ const handleUploadSuccess = (prop, Model) => {
// 代表是从新增保单对账开始 // 代表是从新增保单对账开始
if (item.response) { if (item.response) {
let newObj = JSON.parse(JSON.stringify(item.response.data)) let newObj = JSON.parse(JSON.stringify(item.response.data))
;(item.fileName = newObj.originalName), //文件名 ;((item.fileName = newObj.originalName), //文件名
(item.fileType = newObj.fileType), //文件类型 (item.fileType = newObj.fileType), //文件类型
(item.fileUrl = newObj.url), //文件URL, (item.fileUrl = newObj.url), //文件URL,
(item.url = newObj.url) (item.url = newObj.url))
} }
}) })
tempOtherFileList.value = list tempOtherFileList.value = list
...@@ -1188,6 +1216,7 @@ const handleSelect = (command, row) => { ...@@ -1188,6 +1216,7 @@ const handleSelect = (command, row) => {
getPremiumReconciliationDetail(row) getPremiumReconciliationDetail(row)
} else if (command === 'settingResult') { } else if (command === 'settingResult') {
affirmFormModel.value = {} affirmFormModel.value = {}
settingAffirmLoading.value = false
showAffirm.value = true showAffirm.value = true
currentRow.value = JSON.parse(JSON.stringify(row)) currentRow.value = JSON.parse(JSON.stringify(row))
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment