ECCS-1534完成
src/views/welfare
edit
components
benefits
index.vue
+3 -5
condition
index.vue
+19 -7
index.vue
+1 -1
info/components/condition
index.vue
+16 -1
- WindyWTH authored3a4265c9
</a-col> | ||
<a-col :md="12"> | ||
<a-form-model-item label="福利项目" prop="benefitCode"> | ||
<a-select v-model="editForm.benefitCode" show-search allow-clear :filterOption="filterCode" :mode="editForm.id ? '' : multiple"> | ||
<a-select v-model="editForm.benefitCode" show-search allow-clear :filterOption="filterCode" :mode="editForm.id ? '' : 'multiple'"> | ||
<a-select-option v-for="item in benefitCode" :key="item.benefitCode + item.description" :value="item.benefitCode"> | ||
{{ item.description }} | ||
</a-select-option> | ||
corpCode: this.formData.corpCode, | ||
planCode: this.formData.planCode, | ||
coverageCode: this.formData.coverageCode, | ||
benefitCode: '', | ||
benefitCode: undefined, | ||
isDirect: "N", | ||
status: "1", | ||
}; | ||
this._getBenefitCode(); | ||
this.editForm = this.$lodash.cloneDeep(data); | ||
this.editForm.benefitCode = this.editForm.benefitCode ? this.editForm.benefitCode.split(',') : this.editForm.benefitCode | ||
// this.editForm.benefitCode = this.editForm.benefitCode ? this.editForm.benefitCode.split(',') : this.editForm.benefitCode | ||
this.isBenefitEditShow = true; | ||
console.log(this.editForm) | ||
}, | ||
cancel() { | ||
this.$refs.editForm.resetFields(); | ||
const data = { | ||
...this.editForm, | ||
benefitCode: id || id === 0 ? benefitCode : benefitCode.join(',') | ||
} | ||
this._editBenefitData(data); | ||
}); | ||
</a-row> --> | ||
<a-form-model-item label="币种"> | ||
<a-select v-model="editForm.currency" show-search allow-clear :filterOption="filterCode"> | ||
<a-select-option v-for="item in currencyCode" :key="item.code + item.name" :value="item.code"> | ||
{{ item.name }} | ||
<a-select-option v-for="item in currencyCode" :key="item.refcd" :value="item.refcd"> | ||
{{ item.descCh }} | ||
</a-select-option> | ||
</a-select> | ||
</a-form-model-item> | ||
if (row.limitCode.indexOf('07') === 0) { | ||
return val + '%' | ||
} | ||
return val | ||
for(let i = 0; i < this.currencyCode.length; i ++) { | ||
if (this.currencyCode[i].refcd === row.currency) { | ||
return val + this.currencyCode[i].descCh | ||
} | ||
} | ||
return val + row.currency | ||
} }, | ||
{ title: "备注", dataIndex: "remark" }, | ||
{ | ||
editForm: {}, | ||
frequencyCode: [], | ||
limitCode: [], | ||
currencyCode: [ | ||
{ code: "RMB", name: "人民币" }, | ||
{ code: "US", name: "美金" }, | ||
], | ||
currencyCode: [], | ||
statusCode: [ | ||
{ code: "1", name: "有效" }, | ||
{ code: "2", name: "无效" }, | ||
}, | ||
mounted() { | ||
this._getConditionList(); | ||
this._getRefcdByRefgrp() | ||
}, | ||
methods: { | ||
// 选择框筛选 | ||
} | ||
}); | ||
}, | ||
// 获取币种列表 | ||
_getRefcdByRefgrp() { | ||
this.$apis.GETREFCDBYREFGRP({ | ||
modid: "CI", | ||
refgrp: "CURRENCY_TYPE" | ||
}).then((res) => { | ||
this.currencyCode = res.content || []; | ||
}); | ||
}, | ||
}, | ||
}; | ||
</script> | ||
:columns="columns" | ||
:locale="{ emptyText: 'No Data' }" | ||
:data-source="planData" | ||
row-key="coverageCode" | ||
row-key="id" | ||
:pagination="false" | ||
> | ||
<template slot="operation" slot-scope="record"> | ||
if (row.limitCode.indexOf('07') === 0) { | ||
return val + '%' | ||
} | ||
return val | ||
for(let i = 0; i < this.currencyCode.length; i ++) { | ||
if (this.currencyCode[i].refcd === row.currency) { | ||
return val + this.currencyCode[i].descCh | ||
} | ||
} | ||
return val + row.currency | ||
}}, | ||
{ title: "剩余金额", dataIndex: "leftValue" }, | ||
{ title: "备注", dataIndex: "remark" } | ||
}; | ||
}, | ||
mounted() { | ||
this._getRefcdByRefgrp() | ||
this._getConditionList(); | ||
}, | ||
methods: { | ||
this.conditionList = res.content || []; | ||
}); | ||
}, | ||
// 获取币种列表 | ||
_getRefcdByRefgrp() { | ||
this.$apis.GETREFCDBYREFGRP({ | ||
modid: "CI", | ||
refgrp: "CURRENCY_TYPE" | ||
}).then((res) => { | ||
this.currencyCode = res.content || []; | ||
}); | ||
}, | ||
}, | ||
}; | ||
</script> | ||