Commit 82179380 authored by yanglilong's avatar yanglilong

'修改'

parent 3de191c7
...@@ -5,47 +5,48 @@ ...@@ -5,47 +5,48 @@
<a-row :gutter="30"> <a-row :gutter="30">
<a-col :lg="6" :sm="12"> <a-col :lg="6" :sm="12">
<a-form-model-item label="保险公司"> <a-form-model-item label="保险公司">
<a-select v-model="form.payorId" placeholder="请选择"> <a-select v-model="form.payorCode" placeholder="请选择保险公司" allowClear>
<a-select-option value="1">待核销</a-select-option> <a-select-option v-for="item in companyOptions" :key="item.id" :value="item.payorCode">
<a-select-option value="2">已核销</a-select-option> {{ item.longName }}
</a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="5" :sm="12"> <a-col :lg="5" :sm="12">
<a-form-model-item label="回款日期"> <a-form-model-item label="回款日期">
<a-date-picker format="YYYY年MM月DD日" v-model="form.date" placeholder="选择日期" /> <a-date-picker format="YYYY年MM月DD日" v-model="form.backDate" placeholder="选择日期" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="5" :sm="12"> <a-col :lg="5" :sm="12">
<a-form-model-item label="银行状态"> <a-form-model-item label="EOB状态">
<a-select v-model="form.payorId" placeholder="请选择"> <a-select v-model="form.eobSts" placeholder="请选择">
<a-select-option value="1">核销</a-select-option> <a-select-option value="1">回款</a-select-option>
<a-select-option value="2">核销</a-select-option> <a-select-option value="2">回款</a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="4" :sm="12"> <a-col :lg="4" :sm="12">
<a-form-model-item label="回款金额(人民币)"> <a-form-model-item label="回款金额(人民币)">
<a-input type="number" v-model="form.mrnNo" placeholder="请输入金额"/> <a-input type="number" v-model="form.backAmountCny" placeholder="请输入金额"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="4" :sm="12"> <a-col :lg="4" :sm="12">
<a-form-model-item label="回款金额(美元)"> <a-form-model-item label="回款金额(美元)">
<a-input type="number" v-model="form.mrnNo" placeholder="请输入金额"/> <a-input type="number" v-model="form.backAmountUsd" placeholder="请输入金额"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="6" :sm="12"> <a-col :lg="6" :sm="12">
<a-form-model-item label="汇率差"> <a-form-model-item label="汇率差">
<a-input v-model="form.mrnNo" placeholder="请输入金额" /> <a-input v-model="form.backExchangeRate" placeholder="请输入金额" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :md="24" :lg="18" class="none-label"> <a-col :md="24" :lg="18" class="none-label">
<a-form-model-item label="button"> <a-form-model-item label="button">
<a-button type="primary">导出</a-button> <a-button type="primary">导出</a-button>
<a-button class="mar-left10" type="primary"> <a-button class="mar-left10" type="primary" @click="addNewEvt">
<Icon name="ssiadd" :size="14" />新建回款 <Icon name="ssiadd" :size="14" />新建回款
</a-button> </a-button>
<a-button class="mar-left10" type="primary"> <a-button class="mar-left10" type="primary" @click.stop="handlerReset">
<Icon name="ssireset" :size="14" />重置 <Icon name="ssireset" :size="14" />重置
</a-button> </a-button>
<a-button class="mar-left10" type="primary" @click="handlerSearch"> <a-button class="mar-left10" type="primary" @click="handlerSearch">
...@@ -56,19 +57,66 @@ ...@@ -56,19 +57,66 @@
</a-row> </a-row>
</a-form-model> </a-form-model>
<!-- table --> <!-- table -->
<a-table :columns="columns" :data-source="dataList" :scroll="{ x: true }" :pagination="false" > <a-table :columns="columns" :data-source="dataList" :scroll="{ x: true }" :pagination="false"
<template slot="idx" slot-scope="text ,record, index"> :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
{{index+1}}
</template>
<template slot="eobSts" slot-scope="text"> <template slot="eobSts" slot-scope="text">
{{text==1?'待回款':'已回款'}} {{text==1?'待回款':'已回款'}}
</template> </template>
<template slot="eobBackDate" slot-scope="text">
{{text?moment(text).format('YYYY-MM-DD'):''}}
</template>
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record, index">
<a-button type="link">修改</a-button> <a-button type="link" @click.stop="editEvt(record)">修改</a-button>
<a-button v-if="record.backMoneyNo" type="link" class="danger" @click.stop="delRecord(index)">删除</a-button> <a-button v-if="record.backMoneyNo" type="link" class="danger" @click.stop="delRecord(index)">删除</a-button>
</template> </template>
</a-table> </a-table>
<BurtPagination :pagination="pagination" @pageChange="getData" /> <BurtPagination :pagination="pagination" @pageChange="getData" />
<a-modal title="编辑" :visible="dialogShow" width="700px" :maskClosable="false"
okText="确定" cancelText="取消"
@ok="handleEditOK" @cancel="dialogShow = false">
<a-form-model ref="editForm" :model="editFormObj" :rules="editRules">
<a-row :gutter="30">
<a-col :lg="12" :xs="24">
<a-form-model-item label="保险公司" prop="payorCode">
<a-select v-model="editFormObj.payorCode" placeholder="请选择保险公司" allowClear>
<a-select-option v-for="item in companyOptions" :key="item.id" :value="item.payorCode">
{{ item.longName }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="12" :sm="24">
<a-form-model-item label="EOB状态" prop="eobSts">
<a-select v-model="editFormObj.eobSts" placeholder="请选择状态" allowClear>
<a-select-option :value="1">待回款</a-select-option>
<a-select-option :value="2">已回款</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="12" :sm="24">
<a-form-model-item label="核销日期" prop="backDate">
<a-date-picker format="YYYY年MM月DD日" v-model="editFormObj.backDate" placeholder="选择日期" />
</a-form-model-item>
</a-col>
<a-col :lg="12" :xs="24">
<a-form-model-item label="回款金额(人民币)" prop="backAmountCny">
<a-input v-model.trim="editFormObj.backAmountCny" placeholder="回款金额(人民币)" />
</a-form-model-item>
</a-col>
<a-col :lg="12" :xs="24">
<a-form-model-item label="回款金额(美元)" prop="backAmountUsd">
<a-input v-model.trim="editFormObj.backAmountUsd" placeholder="回款金额(美元)" />
</a-form-model-item>
</a-col>
<a-col :lg="12" :xs="24">
<a-form-model-item label="银行到账金额(人民币)" prop="backAmount">
<a-input v-model.trim="editFormObj.backAmount" placeholder="银行到账金额(人民币)" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</div> </div>
</template> </template>
...@@ -76,9 +124,8 @@ ...@@ -76,9 +124,8 @@
import BurtPagination from "@/components/CUSTOMER/pagation"; import BurtPagination from "@/components/CUSTOMER/pagation";
import moment from "moment"; import moment from "moment";
const columns = [ const columns = [
{ title: "序号", dataIndex: "idx", ellipsis: true, width: 72, scopedSlots: { customRender: "idx" }, },
{ title: "EOB名称", dataIndex: "eobName", ellipsis: true, width: 195 }, { title: "EOB名称", dataIndex: "eobName", ellipsis: true, width: 195 },
{ title: "核销时间", dataIndex: "patientName2", ellipsis: true, width: 110 }, { title: "核销时间", dataIndex: "eobBackDate", ellipsis: true, width: 110, scopedSlots: { customRender: "eobBackDate" }, },
{ title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 110 }, { title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 110 },
{ title: "EOB状态", dataIndex: "eobSts", ellipsis: true, width: 110, scopedSlots: { customRender: "eobSts" } }, { title: "EOB状态", dataIndex: "eobSts", ellipsis: true, width: 110, scopedSlots: { customRender: "eobSts" } },
{ title: "EOB赔付金额(人民币)", dataIndex: "eobAmountCny", ellipsis: true, width: 190,}, { title: "EOB赔付金额(人民币)", dataIndex: "eobAmountCny", ellipsis: true, width: 190,},
...@@ -90,15 +137,35 @@ export default { ...@@ -90,15 +137,35 @@ export default {
data() { data() {
return { return {
columns, columns,
dialogShow: false,
form: { form: {
dateRange: [], payorCode: '',
backDate: '',
backAmountCny: '',
backAmountUsd: '',
backExchangeRate: ''
}, },
dataList: [], dataList: [],
companyOptions: [], //保险公司
pagination: { pagination: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
}, },
selectedRowKeys: [], // Check here to configure the default column
editFormObj: {
id: '',
payorCode: '',
eobSts: '',
backDate: '',
backAmountCny: '',
backAmountUsd: '',
backAmount: ''
},
editRules: {
backAmountUsd: [{ required: true, message: "请输入", trigger: "blur" }],
backAmount: [{ required: true, message: "请输入", trigger: "blur" }],
},
}; };
}, },
components: { components: {
...@@ -106,14 +173,44 @@ export default { ...@@ -106,14 +173,44 @@ export default {
}, },
created(){ created(){
this.getData(); this.getData();
this._getCompanyOptions();
}, },
methods: { methods: {
moment, moment,
onSelectChange(selectedRowKeys) {
let arr = [];
for(let i=0; i<selectedRowKeys.length; i++){
let idx = selectedRowKeys[i];
if(this.dataList[idx].backMoneyNo){
this.$msg.destroy();
this.$message.warning('回款编号已存在')
}else{
arr.push(idx);
}
}
this.selectedRowKeys = arr;
},
pageChange(pager) { pageChange(pager) {
const { current } = pager; const { current } = pager;
this.pagination.pageNum = current; this.pagination.pageNum = current;
this.getData(); this.getData();
}, },
// 重置
handlerReset() {
this.form = {
payorCode: '',
backDate: '',
eobAmountCny: '',
eobAmountUsd: '',
backExchangeRate: ''
}
},
// 获取保险公司下拉选项
_getCompanyOptions() {
this.$apis.GETCOMPANYOPTIONS().then((res) => {
this.companyOptions = res.content || [];
});
},
handlerSearch() { handlerSearch() {
this.pagination.pageNum = 1; this.pagination.pageNum = 1;
this.getData(); this.getData();
...@@ -133,6 +230,38 @@ export default { ...@@ -133,6 +230,38 @@ export default {
} }
}); });
}, },
//新建回款
addNewEvt(){
if(this.selectedRowKeys.length == 0){
this.$message.warning("未选择EOB");
return;
}
let backMoneyEobList = [];
this.dataList.forEach((item,index)=>{
if(this.selectedRowKeys.indexOf(index)!=-1){
backMoneyEobList.push({
id: item.id,
eobNo: item.eobNo,
})
}
})
let formData = {
...this.form,
backMoneyEobList: backMoneyEobList,
backDate: this.form.backDate? moment(this.form.backDate).format('YYYY-MM-DD 00:00:00'):''
}
this.$apis.SAVEBACKMONEY(formData)
.then((res) => {
if (res.returnCode == "0000") {
this.$message.success("新建成功");
this.handlerReset();
this.selectedRowKeys = [];
this.getData();
} else {
this.$message.error(res.returnMsg);
}
});
},
//删除记录 //删除记录
delRecord(index) { delRecord(index) {
this.$modal.confirm({ this.$modal.confirm({
...@@ -156,6 +285,45 @@ export default { ...@@ -156,6 +285,45 @@ export default {
onCancel: () => {}, onCancel: () => {},
}); });
}, },
editEvt(record) {
this.editFormObj = {
id: record.id,
payorCode: record.payorCode || "",
eobSts: Number(record.eobSts) || "",
backDate: record.backDate || "",
backAmountCny: record.backAmountCny || "",
backAmountUsd: record.backAmountUsd || "",
backAmount: record.backAmount || "",
backMoneyNo: record.backMoneyNo,
backMoneyEobList: [
{
id: record.id,
eobNo: record.eobNo,
}
]
};
this.dialogShow = true;
},
//编辑保存
handleEditOK() {
this.$refs.editForm.validate((valid) => {
if (valid) {
this.$apis.SAVEBACKMONEY({
...this.editFormObj,
backDate: this.editFormObj.backDate?moment(this.editFormObj.backDate).format('YYYY-MM-DD 00:00:00'):''
})
.then((res) => {
if (res.returnCode == "0000") {
this.$message.success("编辑成功");
this.dialogShow = false;
this.getData();
} else {
this.$message.error(res.returnMsg);
}
});
}
});
},
}, },
}; };
</script> </script>
......
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