|
|
|
@ -50,7 +50,7 @@ |
|
|
|
|
|
|
|
<div style="width:100px;margin-top: 70px;"> |
|
|
|
<div class="btnList"> |
|
|
|
<el-button type="primary" @click="addAbs(asbItemChoosed)" style="width:90px;">复制套餐</el-button> |
|
|
|
<el-button type="primary" @click="medicalPackageVisble = true" style="width:90px;">复制套餐</el-button> |
|
|
|
</div> |
|
|
|
<div class="btnList"> |
|
|
|
<el-button type="primary" @click="btnOk('close')" style="width:90px;">确定 <i class="el-icon-check"></i> |
|
|
|
@ -65,14 +65,74 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!--复制套餐--> |
|
|
|
<el-dialog title="体检套餐" :visible.sync="medicalPackageVisble" width="600px" height="400" |
|
|
|
:show-close="false" :close-on-click-modal="false" :append-to-body="true"> |
|
|
|
<el-table :data="dict.medicalPackage" border height="350" row-key="id" size="small" |
|
|
|
highlight-current-row @row-click="rowClick" @row-dblclick="rowDblclick" ref="patientList" style="margin-top: -30px;"> |
|
|
|
|
|
|
|
<!-- "displayName": "健康体检套餐", |
|
|
|
"price": 20.00, |
|
|
|
"forSexId": "0", |
|
|
|
"isActive": "Y", |
|
|
|
"remark": "2", |
|
|
|
"displayOrder": 1, |
|
|
|
"simpleCode": "JKTJTC", |
|
|
|
"creatorName": "admin", |
|
|
|
"lastModifierName": "users", |
|
|
|
"lastModificationTime": "2023-08-04T16:34:02.94408", |
|
|
|
"lastModifierId": "3a0ca83b-3116-da05-3916-dfd4c0c548cb", |
|
|
|
"creationTime": "2023-07-10T19:53:30.210553", |
|
|
|
"creatorId": "3a0c4180-107c-0c89-b25b-0bd34666dcec", |
|
|
|
"id": "3a0c51d3-2345-38df-ba0b-1862a3c3606f" --> |
|
|
|
<el-table-column type="index" width="50" /> |
|
|
|
<el-table-column prop="displayName" label="套餐名称" width="180"/> |
|
|
|
<el-table-column prop="price" label="价格" width="80"/> |
|
|
|
<el-table-column prop="forSexId" label="适用性别" width="80"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
{{ dddw(dict.forSex, "id", scope.row.forSexId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="remark" label="备注" width="100"/> |
|
|
|
<el-table-column prop="creatorName" label="创建人员" width="80"/> |
|
|
|
<el-table-column prop="creationTime" label="创建日期" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.creationTime"> |
|
|
|
{{ moment(scope.row.creationTime).format("yyyy-MM-DD") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="lastModifierName" label="修改人员" width="80"/> |
|
|
|
<el-table-column prop="lastModificationTime" label="修改日期" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.lastModificationTime"> |
|
|
|
{{ moment(scope.row.lastModificationTime).format("yyyy-MM-DD") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="medicalPackageVisble = false" style="width:90px;">取消</el-button> |
|
|
|
<el-button type="primary" @click="copyMedicalPackage" style="width:90px;">确定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
|
|
|
|
import { mapState, mapActions } from "vuex"; |
|
|
|
import moment from "moment"; |
|
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
|
import { arrayFilter, arrayReduce, arrayExistObj, deepCopy } from "../../utlis/proFunc"; |
|
|
|
import { dddw,arrayFilter, arrayReduce, arrayExistObj, deepCopy } from "../../utlis/proFunc"; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
|
|
|
|
}, |
|
|
|
props: ["patientRegisterForm", "payTypeFlag"], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
@ -87,6 +147,10 @@ export default { |
|
|
|
quickAsb: [], //快速选择当前显的下拉数据 |
|
|
|
asbItemId: '', //快速选择的组合项目ID |
|
|
|
|
|
|
|
medicalPackageVisble:false, |
|
|
|
curPackageId:'', //当前选中套餐ID |
|
|
|
packageAsbitems:[], //套餐中包含的组合项目 |
|
|
|
|
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -102,14 +166,25 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
moment,dddw, |
|
|
|
|
|
|
|
dictInit() { |
|
|
|
|
|
|
|
//获取所有组合项目 |
|
|
|
getapi("/api/app/asbitem/in-filter?Filter").then((res) => { |
|
|
|
if (res.code == 1) { |
|
|
|
this.dict.asbItemAll = res.data.items; |
|
|
|
this.parseAsbitem(); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
//套餐 |
|
|
|
getapi("/api/app/medical-package/in-filter").then((res) => { |
|
|
|
if (res.code == 1) { |
|
|
|
this.dict.medicalPackage = res.data.items; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//分析可选组合项目,及快速可选组合项目的数据 |
|
|
|
@ -204,6 +279,35 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//选中套餐 |
|
|
|
async rowClick(row){ |
|
|
|
this.curPackageId = row.id |
|
|
|
this.packageAsbitems = [] |
|
|
|
try { |
|
|
|
let res = await getapi(`/api/app/medical-package-detail/medical-package-in-asbitem?MedicalPackageId=${row.id}`) |
|
|
|
this.packageAsbitems = res.data |
|
|
|
} catch (error) { |
|
|
|
console.log(error) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//双击选套餐,并确认复制 |
|
|
|
async rowDblclick(row){ |
|
|
|
await this.rowClick(row) |
|
|
|
this.copyMedicalPackage() |
|
|
|
}, |
|
|
|
|
|
|
|
//复制套餐(确认选中套餐) |
|
|
|
copyMedicalPackage(){ |
|
|
|
if(!this.curPackageId){ |
|
|
|
this.$message.warning("请先选择要复制的套餐!") |
|
|
|
return |
|
|
|
} |
|
|
|
console.log('this.packageAsbitems',this.packageAsbitems) |
|
|
|
this.addAbs(this.packageAsbitems) |
|
|
|
this.medicalPackageVisble = false |
|
|
|
}, |
|
|
|
|
|
|
|
btnOk(closed){ |
|
|
|
if(this.report.dataAsbitemOCX && this.report.dataAsbitemOCX.length > 0){ |
|
|
|
switch (this.report.dataAsbitemOCX.length) { |
|
|
|
|