|
|
|
@ -5,301 +5,129 @@ |
|
|
|
<div style="display: block; width:300px;"> |
|
|
|
<div> |
|
|
|
<span>项目类别</span> |
|
|
|
<el-cascader :options="dict.itemTypeTree" v-model="itemTypeIds" popper-class="example" style="margin-left: 3px;width:240px;" |
|
|
|
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" |
|
|
|
clearable filterable @change="getAsbItemByItemType" size="small"> |
|
|
|
<el-cascader :options="dict.itemTypeTree" v-model="itemTypeIds" popper-class="example" |
|
|
|
style="margin-left: 3px;width:240px;" |
|
|
|
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" clearable filterable |
|
|
|
@change="getAsbItemByItemType" size="small"> |
|
|
|
</el-cascader> |
|
|
|
</div> |
|
|
|
<div class="box"> |
|
|
|
<el-table :data="dict.asbItem" border size="small" highlight-current-row |
|
|
|
:height="tableHeight" |
|
|
|
@row-dblclick="dbClickChoosedAsb" row-key="id" |
|
|
|
@selection-change="selectLeft" :row-class-name="handleRowClassName" |
|
|
|
@row-click="chooseAsbItem"> |
|
|
|
<el-table :data="dict.asbItem" border size="small" highlight-current-row :height="tableHeight" |
|
|
|
@row-dblclick="dbClickChoosedAsb" row-key="id" @selection-change="selectLeft" |
|
|
|
:row-class-name="handleRowClassName" @row-click="chooseAsbItem"> |
|
|
|
<!-- |
|
|
|
<el-table-column type="selection" align="center" ></el-table-column> |
|
|
|
--> |
|
|
|
<el-table-column type="index" align="center" width="40"/> |
|
|
|
<el-table-column |
|
|
|
label="未选组合项目" min-width="170" |
|
|
|
prop="displayName" align="center" |
|
|
|
></el-table-column> |
|
|
|
<el-table-column type="index" align="center" width="40" /> |
|
|
|
<el-table-column label="未选组合项目" min-width="170" prop="displayName" align="center"></el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!--中间操作按钮--> |
|
|
|
<div style="display: block;margin: 40px 10px 0 15px;width:110px;"> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs,'添加')" style="padding: 5px 0;"> |
|
|
|
<el-button class="commonbutton" @click="addAbs(asbItemChoosed,'choosed')" >添加 <i class="el-icon-arrow-right"></i></el-button> |
|
|
|
<div style="padding: 5px 0;"> |
|
|
|
<el-button class="commonbutton" @click="addAbs(asbItemChoosed, 'choosed')">添加 <i |
|
|
|
class="el-icon-arrow-right"></i></el-button> |
|
|
|
</div> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs,'全部添加')" style="padding: 5px 0;"> |
|
|
|
<el-button class="difference" @click="addAbs(asbItemChoosed,'all')">全部添加</el-button> |
|
|
|
<div style="padding: 5px 0;"> |
|
|
|
<el-button class="difference" @click="addAbs(asbItemChoosed, 'all')">全部添加</el-button> |
|
|
|
</div> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs,'移除')" style="padding: 5px 0;"> |
|
|
|
<el-button class="commonbutton" |
|
|
|
@click="delAbs(customerOrgGroupAsbitemsChoosed,'choosed')">移除 <i class="el-icon-arrow-left"></i |
|
|
|
></el-button> |
|
|
|
<div style="padding: 5px 0;"> |
|
|
|
<el-button class="commonbutton" @click="delAbs(roomAsbitemsChoosed, 'choosed')">移除 <i |
|
|
|
class="el-icon-arrow-left"></i></el-button> |
|
|
|
</div> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs,'全部移除')" style="padding: 5px 0;"> |
|
|
|
<el-button class="difference" @click="delAbs(customerOrgGroupAsbitemsChoosed,'all')">全部移除</el-button> |
|
|
|
<div style="padding: 5px 0;"> |
|
|
|
<el-button class="difference" @click="delAbs(roomAsbitemsChoosed, 'all')">全部移除</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!--已选组合项目--> |
|
|
|
<div :style="'display: block; width:' + (window.pageWidth - 300 - 120 - window.pageMarginWidth - 110 - 5) + 'px;'"> |
|
|
|
<div |
|
|
|
:style="'display: block; width:' + (window.pageWidth - 300 - 120 - window.pageMarginWidth - 110 - 5) + 'px;'"> |
|
|
|
<div style="height:32px;"> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs,'快速选择')"> |
|
|
|
<div> |
|
|
|
<span>快速选择</span> |
|
|
|
<el-select v-model="asbItemId" placeholder="快速选择组合项目" size="small" |
|
|
|
filterable default-first-option :filter-method="filterMethod" |
|
|
|
clearable @clear="quickAsb = deepCopy(dict.asbItemQuick)" |
|
|
|
@change="quickChoosedAsb" ref="quickAsbOCX" |
|
|
|
style="margin-left: 3px;width:240px;"> |
|
|
|
<el-select v-model="asbItemId" placeholder="快速选择组合项目" size="small" filterable default-first-option |
|
|
|
:filter-method="filterMethod" clearable @clear="quickAsb = deepCopy(dict.asbItemQuick)" |
|
|
|
@change="quickChoosedAsb" ref="quickAsbOCX" style="margin-left: 3px;width:240px;"> |
|
|
|
<el-option v-for="item in quickAsb" :key="item.id" :value="item.id" :label="item.displayName" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="box"> |
|
|
|
<el-table :data="customerOrgGroupAsbitems" border size="small" |
|
|
|
@selection-change="selectRight" highlight-current-row |
|
|
|
:height="tableHeight" |
|
|
|
:summary-method="getSummaries" show-summary |
|
|
|
:row-class-name="handleRowClassName" @row-dblclick="removeAbs" |
|
|
|
@row-click="removeAsbItem" ref="tableCustomerOrgGroupAsbitems"> |
|
|
|
<el-table :data="roomAsbitems" border size="small" @selection-change="selectRight" highlight-current-row |
|
|
|
:height="tableHeight" :summary-method="getSummaries" show-summary :row-class-name="handleRowClassName" |
|
|
|
@row-dblclick="removeAbs" @row-click="removeAsbItem" ref="tableCustomerOrgGroupAsbitems"> |
|
|
|
<!-- |
|
|
|
<el-table-column type="selection"></el-table-column> |
|
|
|
--> |
|
|
|
<el-table-column type="index" width="40" align="center"/> |
|
|
|
<el-table-column |
|
|
|
label="已选组合项目" |
|
|
|
min-width="140" |
|
|
|
prop="displayName" |
|
|
|
></el-table-column> |
|
|
|
<el-table-column label="标准价格" prop="price" min-width="60" align="center"/> |
|
|
|
<el-table-column type="index" width="40" align="center" /> |
|
|
|
<el-table-column label="已选组合项目" min-width="140" prop="asbitemName"></el-table-column> |
|
|
|
<!-- |
|
|
|
<el-table-column label="标准价格" prop="price" min-width="60" align="center" /> |
|
|
|
<el-table-column label="折扣" min-width="40" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input |
|
|
|
@input="changeDiscount(scope.$index)" |
|
|
|
type="number" size="small" |
|
|
|
v-model="scope.row.discount" |
|
|
|
/> |
|
|
|
<el-input @input="changeDiscount(scope.$index)" type="number" size="small" |
|
|
|
v-model="scope.row.discount" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="应收价格" prop="customerOrgGroupDetailPrice" min-width="60" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="应收价格" prop="roomDetailPrice" min-width="60" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input |
|
|
|
@input="changePrices(scope.$index)" |
|
|
|
type="number" size="small" |
|
|
|
v-model="scope.row.customerOrgGroupDetailPrice" |
|
|
|
/> |
|
|
|
<el-input @input="changePrices(scope.$index)" type="number" size="small" |
|
|
|
v-model="scope.row.roomDetailPrice" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="数量" prop="customerOrgGroupDetailAmount" width="50" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="数量" prop="roomDetailAmount" width="50" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input |
|
|
|
@input="changePrices(scope.$index)" |
|
|
|
type="number" size="small" |
|
|
|
v-model="scope.row.customerOrgGroupDetailAmount" |
|
|
|
/> |
|
|
|
<el-input @input="changePrices(scope.$index)" type="number" size="small" |
|
|
|
v-model="scope.row.roomDetailAmount" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="标准金额" prop="asbitemMoney" min-width="60" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="应收金额" prop="customerOrgGroupDetailMoney" min-width="60" align="center"> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="标准金额" prop="asbitemMoney" min-width="60" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="应收金额" prop="roomDetailMoney" min-width="60" align="center"> |
|
|
|
</el-table-column> |
|
|
|
--> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!--批量操作按钮(复制套餐与分组)--> |
|
|
|
<div style="display: block;margin-left: 5px;"> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs,'复制分组')" style="margin-top: 50px;"> |
|
|
|
<el-button class="commonbutton" @click="btnCopyGroup">复制分组</el-button> |
|
|
|
</div> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs,'复制套餐')" style="margin-top: 10px;"> |
|
|
|
<el-button class="commonbutton" @click="btnCopyMedicalPackage">复制套餐</el-button> |
|
|
|
</div> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs,'保存')" style="margin-top: 10px;"> |
|
|
|
<div style="margin-top: 50px;"> |
|
|
|
<el-button class="commonbutton" @click="btnSave">保存</el-button> |
|
|
|
</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="packageRowClick" @row-dblclick="rowDblclick" ref="patientList" > |
|
|
|
|
|
|
|
<!-- "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 class="commonbutton" @click="medicalPackageVisble = false" style="width:90px;">取消</el-button> |
|
|
|
<el-button class="commonbutton" type="primary" @click="copyMedicalPackage" style="width:90px;">确定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!--复制分组--> |
|
|
|
<el-dialog title="单位分组" :visible.sync="groupVisble" width="700px" height="500" |
|
|
|
:show-close="false" :close-on-click-modal="false" :append-to-body="true"> |
|
|
|
<el-table |
|
|
|
:data="customerOrgGroups" ref="customerOrgGroups" |
|
|
|
style="margin-top: 2px" |
|
|
|
row-key="id" |
|
|
|
border |
|
|
|
height="240px" |
|
|
|
size="small" |
|
|
|
highlight-current-row :row-class-name="handleRowClassName" |
|
|
|
@row-click="groupRowClick" @row-dblclick="groupRowDblclick" > |
|
|
|
> |
|
|
|
<el-table-column |
|
|
|
type="index" |
|
|
|
label="序号" |
|
|
|
min-width="50" |
|
|
|
align="center" |
|
|
|
/> |
|
|
|
<el-table-column prop="displayName" label="名称" min-width="150" /> |
|
|
|
<el-table-column |
|
|
|
prop="price" |
|
|
|
label="价格" |
|
|
|
min-width="60" |
|
|
|
align="center" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
prop="forSexId" |
|
|
|
label="适用性别" |
|
|
|
min-width="60" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ dddw(dict.forSex, "id", scope.row.forSexId, "displayName") }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="maritalStatusId" |
|
|
|
label="适用婚姻状况" |
|
|
|
min-width="80" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ |
|
|
|
dddw( |
|
|
|
dict.forMaritalStatus, |
|
|
|
"id", |
|
|
|
scope.row.maritalStatusId, |
|
|
|
"displayName" |
|
|
|
) |
|
|
|
}} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="creatorName" |
|
|
|
label="创建者" |
|
|
|
min-width="60" |
|
|
|
align="center" |
|
|
|
/> |
|
|
|
<el-table-column label="创建时间" min-width="150" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ |
|
|
|
scope.row.creationTime |
|
|
|
? moment(scope.row.creationTime).format("yyyy-MM-DD HH:mm:ss") |
|
|
|
: "" |
|
|
|
}} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作"> |
|
|
|
<template> |
|
|
|
<el-tag |
|
|
|
class="move" |
|
|
|
style="cursor: move; margin-left: 15px" |
|
|
|
draggable="true" |
|
|
|
> |
|
|
|
<i class="el-icon-d-caret" style="width: 1rem; height: 1rem"></i> |
|
|
|
</el-tag> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button class="commonbutton" @click="groupVisble = false" style="width:90px;">取消</el-button> |
|
|
|
<el-button class="commonbutton" type="primary" @click="copyGroup" style="width:90px;">确定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import moment from 'moment'; |
|
|
|
import { mapState } from "vuex"; |
|
|
|
import { getapi, postapi, putapi } from "@/api/api"; |
|
|
|
import { getPagePriv,checkPagePriv, arrayExistObj, tcdate, arrayFilter, arrayReduce, deepCopy,dddw } from "../../utlis/proFunc"; |
|
|
|
import { getPagePriv, checkPagePriv, arrayExistObj, tcdate, arrayFilter, arrayReduce, deepCopy, dddw } from "../../utlis/proFunc"; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
props:['customerOrgGroup','refreshMoney'], |
|
|
|
props: ['room'], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
pagePriv:{ |
|
|
|
routeUrlorPageName:'customerOrgGroup', //当前页面归属路由或归属页面权限名称 |
|
|
|
privs:[] // 页面权限 |
|
|
|
pagePriv: { |
|
|
|
routeUrlorPageName: 'room', //当前页面归属路由或归属页面权限名称 |
|
|
|
privs: [] // 页面权限 |
|
|
|
}, |
|
|
|
groupPrice:0, //分组总价 |
|
|
|
customerOrgGroupAsbitems:[], //分组包含组合项目(显示) |
|
|
|
customerOrgGroupAsbitemsChoosed:[], //分组包含组合项目(显示) 被选中 |
|
|
|
itemTypeIds:[], //项目类别 |
|
|
|
asbItemId:'', //当前快速选到的给合项目ID |
|
|
|
quickAsb:[], //过滤显示的组合项目 |
|
|
|
|
|
|
|
asbItemChoosed: [], //勾选的 未选组合项目 |
|
|
|
startPoint:-1, |
|
|
|
PstartPoint:-1, |
|
|
|
roomAsbitems: [], //分组包含组合项目(显示) |
|
|
|
roomAsbitemsChoosed: [], //分组包含组合项目(显示) 被选中 |
|
|
|
itemTypeIds: [], //项目类别 |
|
|
|
asbItemId: '', //当前快速选到的给合项目ID |
|
|
|
quickAsb: [], //过滤显示的组合项目 |
|
|
|
|
|
|
|
medicalPackageVisble:false, //复制套餐 |
|
|
|
curPackageId:'', //当前选中套餐ID |
|
|
|
packageAsbitems:[], //套餐中包含的组合项目 |
|
|
|
asbItemChoosed: [], //勾选的 未选组合项目 |
|
|
|
startPoint: -1, |
|
|
|
PstartPoint: -1, |
|
|
|
|
|
|
|
groupVisble:false, //复制分组 |
|
|
|
customerOrgGroups:[], //历次分组 |
|
|
|
curGroupId:'', //当前选中套餐ID |
|
|
|
groupAsbitems:[], //选中分组包含组合项目 |
|
|
|
|
|
|
|
|
|
|
|
dialogVisible: false, |
|
|
|
@ -314,11 +142,11 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapState(["window","dict","dataTransOpts", "customerOrg"]), |
|
|
|
...mapState(["window", "dict", "dataTransOpts", "customerOrg"]), |
|
|
|
|
|
|
|
tableHeight(){ |
|
|
|
tableHeight() { |
|
|
|
let height = 600 |
|
|
|
if(this.window.pageHeight > 600){ |
|
|
|
if (this.window.pageHeight > 600) { |
|
|
|
height = this.window.pageHeight |
|
|
|
} |
|
|
|
// console.log(height - this.window.pageHeaderHeight - this.window.pageMarginHeight - 240 - 96 - 10) |
|
|
|
@ -331,28 +159,28 @@ export default { |
|
|
|
created() { |
|
|
|
//获取用户当前页面的权限 |
|
|
|
let userPriv = window.sessionStorage.getItem('userPriv') |
|
|
|
if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName)) |
|
|
|
if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName)) |
|
|
|
|
|
|
|
this.dictInit() |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.getCustomerOrgGroupAsbitems(this.customerOrgGroup.id); |
|
|
|
this.getRoomAsbitems(this.room.id); |
|
|
|
}, |
|
|
|
|
|
|
|
updated () { |
|
|
|
this.refreshTable('tableCustomerOrgGroupAsbitems') |
|
|
|
updated() { |
|
|
|
// this.refreshTable('tableCustomerOrgGroupAsbitems') |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
moment,dddw,deepCopy,checkPagePriv, |
|
|
|
moment, dddw, deepCopy, checkPagePriv, |
|
|
|
//表格强制刷新 |
|
|
|
refreshTable(tableRef){ |
|
|
|
refreshTable(tableRef) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs[tableRef].doLayout() |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
//初始数据 |
|
|
|
dictInit(){ |
|
|
|
dictInit() { |
|
|
|
//体检类别 树结构 |
|
|
|
getapi("/api/app/item-type/by-code-all").then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
@ -362,7 +190,7 @@ export default { |
|
|
|
}); |
|
|
|
|
|
|
|
//获取所有组合项目 api/app/asbitem/GetBasicList |
|
|
|
postapi("/api/app/asbitem/GetBasicList",{isFilterActive:'Y'}).then((res) => { |
|
|
|
postapi("/api/app/asbitem/GetBasicList", { isFilterActive: 'Y' }).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.dict.asbItemAll = res.data; |
|
|
|
this.dict.asbItemAll.forEach(e => { |
|
|
|
@ -374,13 +202,6 @@ export default { |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
//套餐 () |
|
|
|
postapi("/api/app/medicalpackage/getmedicalpackagelist",{}).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.dict.medicalPackage = res.data; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleRowClassName({ row, rowIndex }) { |
|
|
|
@ -417,8 +238,8 @@ export default { |
|
|
|
getAsbItemByItemType() { |
|
|
|
this.getAsbItemByItemTypeAll() |
|
|
|
//刷新显示 未选组合项目 |
|
|
|
arrayReduce(this.dict.asbItem, [...this.customerOrgGroupAsbitems], "id=asbitemId"); |
|
|
|
arrayReduce(this.dict.asbItemQuick, [...this.customerOrgGroupAsbitems], "id=asbitemId"); |
|
|
|
arrayReduce(this.dict.asbItem, [...this.roomAsbitems], "id=asbitemId"); |
|
|
|
arrayReduce(this.dict.asbItemQuick, [...this.roomAsbitems], "id=asbitemId"); |
|
|
|
this.quickAsb = Object.assign(this.dict.asbItemQuick) |
|
|
|
}, |
|
|
|
|
|
|
|
@ -441,15 +262,15 @@ export default { |
|
|
|
|
|
|
|
// 添加组合项目 |
|
|
|
///api/app/register-asbitem/many/3fa85f64-5717-4562-b3fc-2c963f66afa6' |
|
|
|
async addAbs(asbItemChoosed,oprType) { |
|
|
|
// console.log('this.customerOrgGroup',this.customerOrgGroup) |
|
|
|
async addAbs(asbItemChoosed, oprType) { |
|
|
|
// console.log('this.room',this.room) |
|
|
|
// console.log('asbItemChoosed', asbItemChoosed) |
|
|
|
if(!this.customerOrgGroup.id){ |
|
|
|
this.$message.warning({ showClose: true, message: "请先选中单位分组"}) |
|
|
|
if (!this.room.id) { |
|
|
|
this.$message.warning({ showClose: true, message: "请先选中分诊叫号房间" }) |
|
|
|
return |
|
|
|
} |
|
|
|
if(this.customerOrgGroup.isComplete && this.customerOrgGroup.isComplete.toUpperCase() == 'Y'){ |
|
|
|
this.$message.warning({ showClose: true, message: "体检次数已完成,不允许操作"}) |
|
|
|
if (this.room.isComplete && this.room.isComplete.toUpperCase() == 'Y') { |
|
|
|
this.$message.warning({ showClose: true, message: "体检次数已完成,不允许操作" }) |
|
|
|
return |
|
|
|
} |
|
|
|
let message = [] |
|
|
|
@ -458,12 +279,12 @@ export default { |
|
|
|
|
|
|
|
//oprType 不传值时,兼容勾选方式 |
|
|
|
//勾选时不需要此操作 start |
|
|
|
if(oprType && oprType == 'all'){ |
|
|
|
if (oprType && oprType == 'all') { |
|
|
|
asbItemChoosed = deepCopy(this.dict.asbItem) |
|
|
|
}else if(oprType && oprType == 'choosed'){ |
|
|
|
} else if (oprType && oprType == 'choosed') { |
|
|
|
asbItemChoosed = [] |
|
|
|
this.dict.asbItem.forEach(e =>{ |
|
|
|
if(e.choosed){ |
|
|
|
this.dict.asbItem.forEach(e => { |
|
|
|
if (e.choosed) { |
|
|
|
asbItemChoosed.push(e) |
|
|
|
e.choosed = false |
|
|
|
} |
|
|
|
@ -472,7 +293,7 @@ export default { |
|
|
|
//勾选时不需要此操作 end |
|
|
|
|
|
|
|
if (asbItemChoosed.length < 1) { |
|
|
|
this.$message.warning({ showClose: true, message: "请选择要添加的组合项目"}) |
|
|
|
this.$message.warning({ showClose: true, message: "请选择要添加的组合项目" }) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@ -484,9 +305,9 @@ export default { |
|
|
|
// "price": 0, |
|
|
|
|
|
|
|
// for (let i = 0; i < asbItemChoosed.length; i++) { |
|
|
|
// if (this.customerOrgGroup.forSexId == 'A') break //未选性别时,无需判断组合项目性别限制 |
|
|
|
// if (this.room.forSexId == 'A') break //未选性别时,无需判断组合项目性别限制 |
|
|
|
// if (asbItemChoosed[i].forSexId == 'A' || asbItemChoosed[i].forSexId == 'U') continue |
|
|
|
// if (asbItemChoosed[i].forSexId != this.customerOrgGroup.sexId) { |
|
|
|
// if (asbItemChoosed[i].forSexId != this.room.sexId) { |
|
|
|
// this.$message.warning(`所选项目:${asbItemChoosed[i].displayName},不适合当前人员性别`) |
|
|
|
// checked = false |
|
|
|
// break |
|
|
|
@ -496,15 +317,15 @@ export default { |
|
|
|
// if (!checked) return |
|
|
|
|
|
|
|
// 去掉重复的项目 |
|
|
|
arrayReduce(asbItemChoosed, this.customerOrgGroupAsbitems, "id=asbitemId") |
|
|
|
arrayReduce(asbItemChoosed, this.roomAsbitems, "id=asbitemId") |
|
|
|
|
|
|
|
for (let i = asbItemChoosed.length - 1; i > - 1; i--) { |
|
|
|
if (this.customerOrgGroup.forSexId == 'A') break //未选性别时,无需判断组合项目性别限制 |
|
|
|
if (this.room.forSexId == 'A') break //未选性别时,无需判断组合项目性别限制 |
|
|
|
if (asbItemChoosed[i].forSexId == 'A' || asbItemChoosed[i].forSexId == 'U') continue |
|
|
|
if (asbItemChoosed[i].forSexId != this.customerOrgGroup.forSexId) { |
|
|
|
if (asbItemChoosed[i].forSexId != this.room.forSexId) { |
|
|
|
message.push(asbItemChoosed[i].displayName) //.warning(`所选项目:${asbItemChoosed[i].displayName},不适合当前人员性别`) |
|
|
|
checked = false |
|
|
|
asbItemChoosed.splice(i,1) |
|
|
|
asbItemChoosed.splice(i, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
//console.log(222,checked) |
|
|
|
@ -513,18 +334,19 @@ export default { |
|
|
|
for (let i = 0; i < asbItemChoosed.length; i++) { |
|
|
|
let pojo = { |
|
|
|
asbitemId: asbItemChoosed[i].id, |
|
|
|
displayName:asbItemChoosed[i].displayName, |
|
|
|
discount:100, |
|
|
|
customerOrgGroupDetailAmount:1, |
|
|
|
price:asbItemChoosed[i].price, |
|
|
|
customerOrgGroupDetailPrice:asbItemChoosed[i].price, |
|
|
|
customerOrgGroupDetailMoney: asbItemChoosed[i].price, |
|
|
|
// displayName: asbItemChoosed[i].displayName, |
|
|
|
asbitemName: asbItemChoosed[i].displayName, |
|
|
|
discount: 100, |
|
|
|
roomDetailAmount: 1, |
|
|
|
price: asbItemChoosed[i].price, |
|
|
|
roomDetailPrice: asbItemChoosed[i].price, |
|
|
|
roomDetailMoney: asbItemChoosed[i].price, |
|
|
|
asbitemMoney: asbItemChoosed[i].price, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.customerOrgGroupAsbitems.push(pojo) |
|
|
|
//this.customerOrgGroupAsbitems.push({ ...pojo, asbitemName: asbItemChoosed[i].displayName }) |
|
|
|
this.roomAsbitems.push(pojo) |
|
|
|
//this.roomAsbitems.push({ ...pojo, asbitemName: asbItemChoosed[i].displayName }) |
|
|
|
|
|
|
|
lfind = arrayExistObj(this.dict.asbItem, 'id', asbItemChoosed[i].id) |
|
|
|
if (lfind > -1) this.dict.asbItem.splice(lfind, 1) |
|
|
|
@ -562,8 +384,8 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//选择 未选的组合项目 |
|
|
|
chooseAsbItem(row){ |
|
|
|
this.dict.asbItem.forEach((e,index) => { |
|
|
|
chooseAsbItem(row) { |
|
|
|
this.dict.asbItem.forEach((e, index) => { |
|
|
|
e.index = index; |
|
|
|
return e |
|
|
|
}); |
|
|
|
@ -595,7 +417,7 @@ export default { |
|
|
|
|
|
|
|
// 按住了ctrl 键 |
|
|
|
if (this.window.ctrl) { |
|
|
|
console.log('this.window.ctrl',this.window.ctrl,this.dict.asbItem) |
|
|
|
console.log('this.window.ctrl', this.window.ctrl, this.dict.asbItem) |
|
|
|
this.dict.asbItem[row.index].choosed = true; |
|
|
|
this.startPoint = row.index; |
|
|
|
return |
|
|
|
@ -615,13 +437,13 @@ export default { |
|
|
|
|
|
|
|
//删除 人员已选中的组合项目 |
|
|
|
///api/app/register-asbitem/many?RegisterAsbitemIds=3fa85f64-5717-4562-b3fc-2c963f66afa6 |
|
|
|
delAbs(absForDel,oprType) { |
|
|
|
if(!this.customerOrgGroup.id){ |
|
|
|
this.$message.warning({ showClose: true, message: "请先选中单位分组"}) |
|
|
|
delAbs(absForDel, oprType) { |
|
|
|
if (!this.room.id) { |
|
|
|
this.$message.warning({ showClose: true, message: "请先选中单位分组" }) |
|
|
|
return |
|
|
|
} |
|
|
|
if(this.customerOrgGroup.isComplete && this.customerOrgGroup.isComplete.toUpperCase() == 'Y'){ |
|
|
|
this.$message.warning({ showClose: true, message: "体检次数已完成,不允许操作"}) |
|
|
|
if (this.room.isComplete && this.room.isComplete.toUpperCase() == 'Y') { |
|
|
|
this.$message.warning({ showClose: true, message: "体检次数已完成,不允许操作" }) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@ -629,12 +451,12 @@ export default { |
|
|
|
let lfind = -1 |
|
|
|
|
|
|
|
//勾选时不需要此操作 start |
|
|
|
if(oprType && oprType == 'all'){ |
|
|
|
absForDel = deepCopy(this.customerOrgGroupAsbitems) |
|
|
|
}else if(oprType && oprType == 'choosed'){ |
|
|
|
if (oprType && oprType == 'all') { |
|
|
|
absForDel = deepCopy(this.roomAsbitems) |
|
|
|
} else if (oprType && oprType == 'choosed') { |
|
|
|
absForDel = [] |
|
|
|
this.customerOrgGroupAsbitems.forEach(e =>{ |
|
|
|
if(e.choosed){ |
|
|
|
this.roomAsbitems.forEach(e => { |
|
|
|
if (e.choosed) { |
|
|
|
absForDel.push(deepCopy(e)) |
|
|
|
e.choosed = false |
|
|
|
} |
|
|
|
@ -643,14 +465,14 @@ export default { |
|
|
|
//勾选时不需要此操作 end |
|
|
|
|
|
|
|
if (absForDel.length < 1) { |
|
|
|
this.$message.warning({ showClose: true, message: "请选择要移除的组合项目"}) |
|
|
|
this.$message.warning({ showClose: true, message: "请选择要移除的组合项目" }) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
for (let i = 0; i < absForDel.length; i++) { |
|
|
|
|
|
|
|
lfind = arrayExistObj(this.customerOrgGroupAsbitems, 'asbitemId', absForDel[i].asbitemId) |
|
|
|
if (lfind > -1) this.customerOrgGroupAsbitems.splice(lfind, 1) |
|
|
|
lfind = arrayExistObj(this.roomAsbitems, 'asbitemId', absForDel[i].asbitemId) |
|
|
|
if (lfind > -1) this.roomAsbitems.splice(lfind, 1) |
|
|
|
|
|
|
|
absForDel.splice(i, 1) |
|
|
|
i-- |
|
|
|
@ -669,32 +491,32 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//选择 已选的组合项目 |
|
|
|
removeAsbItem(row){ |
|
|
|
this.customerOrgGroupAsbitems.forEach((e,index) => { |
|
|
|
removeAsbItem(row) { |
|
|
|
this.roomAsbitems.forEach((e, index) => { |
|
|
|
e.index = index; |
|
|
|
return e |
|
|
|
}); |
|
|
|
// 按住了shift键 |
|
|
|
if (this.window.shift) { |
|
|
|
//清除所有选择 |
|
|
|
this.customerOrgGroupAsbitems.forEach(e => { |
|
|
|
this.roomAsbitems.forEach(e => { |
|
|
|
e.choosed = false; |
|
|
|
return e |
|
|
|
}); |
|
|
|
|
|
|
|
if (this.PstartPoint == - 1) { |
|
|
|
this.customerOrgGroupAsbitems[row.index].choosed = true; |
|
|
|
this.roomAsbitems[row.index].choosed = true; |
|
|
|
this.PstartPoint = row.index; |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (this.PstartPoint > row.index) { |
|
|
|
for (let i = row.index; i <= this.PstartPoint; i++) { |
|
|
|
this.customerOrgGroupAsbitems[i].choosed = true |
|
|
|
this.roomAsbitems[i].choosed = true |
|
|
|
} |
|
|
|
} else if (this.PstartPoint <= row.index) { |
|
|
|
for (let i = this.PstartPoint; i <= row.index; i++) { |
|
|
|
this.customerOrgGroupAsbitems[i].choosed = true |
|
|
|
this.roomAsbitems[i].choosed = true |
|
|
|
} |
|
|
|
} |
|
|
|
return |
|
|
|
@ -702,8 +524,8 @@ export default { |
|
|
|
|
|
|
|
// 按住了ctrl 键 |
|
|
|
if (this.window.ctrl) { |
|
|
|
console.log('this.window.ctrl',this.window.ctrl,this.customerOrgGroupAsbitems) |
|
|
|
this.customerOrgGroupAsbitems[row.index].choosed = true; |
|
|
|
console.log('this.window.ctrl', this.window.ctrl, this.roomAsbitems) |
|
|
|
this.roomAsbitems[row.index].choosed = true; |
|
|
|
this.PstartPoint = row.index; |
|
|
|
return |
|
|
|
} |
|
|
|
@ -711,48 +533,48 @@ export default { |
|
|
|
// 未按住了ctrl 、shift 键 |
|
|
|
//清除所有选择 |
|
|
|
//console.log('清除所有选择') |
|
|
|
this.customerOrgGroupAsbitems.forEach(e => { |
|
|
|
this.roomAsbitems.forEach(e => { |
|
|
|
e.choosed = false; |
|
|
|
return e |
|
|
|
}); |
|
|
|
this.customerOrgGroupAsbitems[row.index].choosed = true; |
|
|
|
this.roomAsbitems[row.index].choosed = true; |
|
|
|
this.PstartPoint = row.index; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
changeDiscount(index){ |
|
|
|
changeDiscount(index) { |
|
|
|
|
|
|
|
this.customerOrgGroupAsbitems[index].customerOrgGroupDetailPrice = |
|
|
|
(this.customerOrgGroupAsbitems[index].discount * this.customerOrgGroupAsbitems[index].price/100).toFixed(2) |
|
|
|
this.roomAsbitems[index].roomDetailPrice = |
|
|
|
(this.roomAsbitems[index].discount * this.roomAsbitems[index].price / 100).toFixed(2) |
|
|
|
|
|
|
|
|
|
|
|
this.customerOrgGroupAsbitems[index].customerOrgGroupDetailMoney = |
|
|
|
(this.customerOrgGroupAsbitems[index].customerOrgGroupDetailPrice * this.customerOrgGroupAsbitems[index].customerOrgGroupDetailAmount).toFixed(2) |
|
|
|
this.roomAsbitems[index].roomDetailMoney = |
|
|
|
(this.roomAsbitems[index].roomDetailPrice * this.roomAsbitems[index].roomDetailAmount).toFixed(2) |
|
|
|
|
|
|
|
//this.getSummaries() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//修改价格或数量 |
|
|
|
changePrices(index){ |
|
|
|
this.customerOrgGroupAsbitems[index].customerOrgGroupDetailMoney = |
|
|
|
(this.customerOrgGroupAsbitems[index].customerOrgGroupDetailPrice * this.customerOrgGroupAsbitems[index].customerOrgGroupDetailAmount).toFixed(2) |
|
|
|
changePrices(index) { |
|
|
|
this.roomAsbitems[index].roomDetailMoney = |
|
|
|
(this.roomAsbitems[index].roomDetailPrice * this.roomAsbitems[index].roomDetailAmount).toFixed(2) |
|
|
|
|
|
|
|
this.customerOrgGroupAsbitems[index].asbitemMoney = |
|
|
|
(this.customerOrgGroupAsbitems[index].price * this.customerOrgGroupAsbitems[index].customerOrgGroupDetailAmount).toFixed(2) |
|
|
|
this.roomAsbitems[index].asbitemMoney = |
|
|
|
(this.roomAsbitems[index].price * this.roomAsbitems[index].roomDetailAmount).toFixed(2) |
|
|
|
|
|
|
|
this.customerOrgGroupAsbitems[index].discount = (this.customerOrgGroupAsbitems[index].customerOrgGroupDetailPrice * 100 / this.customerOrgGroupAsbitems[index].price).toFixed(2) |
|
|
|
this.roomAsbitems[index].discount = (this.roomAsbitems[index].roomDetailPrice * 100 / this.roomAsbitems[index].price).toFixed(2) |
|
|
|
//this.getSummaries() |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//合计 |
|
|
|
getSummaries(param) { |
|
|
|
console.log('getSummaries param',param) |
|
|
|
console.log('getSummaries param', param) |
|
|
|
// if(!param){ |
|
|
|
// param = { |
|
|
|
// columns:[{}, {}, {}, {}, {}, {}, {property: 'asbitemMoney'},{property: 'customerOrgGroupDetailMoney'}], |
|
|
|
// data:this.customerOrgGroupAsbitems |
|
|
|
// columns:[{}, {}, {}, {}, {}, {}, {property: 'asbitemMoney'},{property: 'roomDetailMoney'}], |
|
|
|
// data:this.roomAsbitems |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
@ -787,167 +609,34 @@ export default { |
|
|
|
return sums; |
|
|
|
}, |
|
|
|
|
|
|
|
//复制分组 |
|
|
|
btnCopyGroup(){ |
|
|
|
console.log('this.customerOrgGroup',this.customerOrgGroup) |
|
|
|
if(!this.customerOrgGroup.id){ |
|
|
|
this.$message.warning({ showClose: true, message: "请先选中单位分组"}) |
|
|
|
return |
|
|
|
} |
|
|
|
if(this.customerOrgGroup.isComplete && this.customerOrgGroup.isComplete.toUpperCase() == 'Y'){ |
|
|
|
this.$message.warning({ showClose: true, message: "体检次数已完成,不允许操作"}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
getapi( |
|
|
|
`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${this.customerOrgGroup.customerOrgRegisterId}` |
|
|
|
).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.customerOrgGroups = res.data; |
|
|
|
if(this.customerOrgGroups.length <2){ |
|
|
|
this.$message.warning({ showClose: true, message: "暂无其他分组可供复制"}) |
|
|
|
}else{ |
|
|
|
this.groupVisble = true |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//选中分组 |
|
|
|
async groupRowClick(row){ |
|
|
|
this.curGroupId = row.id |
|
|
|
this.groupAsbitems = [] |
|
|
|
try { |
|
|
|
let res = await getapi(`/api/app/customerorggroupdetail/getcustomerorggroupdetailinasbitem?CustomerOrgGroupId=${row.id}`) |
|
|
|
if(res.code != -1) this.groupAsbitems = res.data |
|
|
|
} catch (error) { |
|
|
|
console.log(error) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//双击选分组,并确认复制 |
|
|
|
async groupRowDblclick(row){ |
|
|
|
await this.groupRowClick(row) |
|
|
|
this.copyGroup() |
|
|
|
}, |
|
|
|
|
|
|
|
//复制分组(确认选中分组) |
|
|
|
copyGroup(){ |
|
|
|
if(!this.curGroupId){ |
|
|
|
this.$message.warning({ showClose: true, message: "请先选择要复制的套餐!"}) |
|
|
|
return |
|
|
|
} |
|
|
|
console.log('this.packageAsbitems',this.groupAsbitems) |
|
|
|
this.addAbs(deepCopy(this.groupAsbitems)) |
|
|
|
this.groupVisble = false |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//复制套餐 |
|
|
|
btnCopyMedicalPackage(){ |
|
|
|
// console.log('this.customerOrgGroup',this.customerOrgGroup) |
|
|
|
if(!this.customerOrgGroup.id){ |
|
|
|
this.$message.warning({ showClose: true, message: "请先选中单位分组"}) |
|
|
|
return |
|
|
|
} |
|
|
|
if(this.customerOrgGroup.isComplete && this.customerOrgGroup.isComplete.toUpperCase() == 'Y'){ |
|
|
|
this.$message.warning({ showClose: true, message: "体检次数已完成,不允许操作"}) |
|
|
|
return |
|
|
|
} |
|
|
|
this.medicalPackageVisble = true |
|
|
|
}, |
|
|
|
|
|
|
|
//选中套餐 |
|
|
|
async packageRowClick(row){ |
|
|
|
this.curPackageId = row.id |
|
|
|
this.packageAsbitems = [] |
|
|
|
try { |
|
|
|
let res = await postapi('/api/app/medicalpackagedetail/getmedicalpackageinasbitem',{medicalPackageId:row.id}) |
|
|
|
this.packageAsbitems = res.data |
|
|
|
} catch (error) { |
|
|
|
console.log(error) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//双击选套餐,并确认复制 |
|
|
|
async rowDblclick(row){ |
|
|
|
await this.packageRowClick(row) |
|
|
|
this.copyMedicalPackage() |
|
|
|
}, |
|
|
|
|
|
|
|
//复制套餐(确认选中套餐) |
|
|
|
copyMedicalPackage(){ |
|
|
|
if(!this.curPackageId){ |
|
|
|
this.$message.warning({ showClose: true, message: "请先选择要复制的套餐!"}) |
|
|
|
return |
|
|
|
} |
|
|
|
console.log('this.packageAsbitems',this.packageAsbitems) |
|
|
|
this.addAbs(deepCopy(this.packageAsbitems)) |
|
|
|
this.medicalPackageVisble = false |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//保存按钮 |
|
|
|
btnSave() { |
|
|
|
if(!this.customerOrgGroup.id){ |
|
|
|
this.$message.warning({ showClose: true, message: "请先选中单位分组"}) |
|
|
|
return |
|
|
|
} |
|
|
|
if(this.customerOrgGroup.isComplete && this.customerOrgGroup.isComplete.toUpperCase() == 'Y'){ |
|
|
|
this.$message.warning({ showClose: true, message: "体检次数已完成,不允许操作"}) |
|
|
|
if (!this.room.id) { |
|
|
|
this.$message.warning({ showClose: true, message: "请先选中分诊叫号房间" }) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let body = { |
|
|
|
customerOrgGroupId:this.customerOrgGroup.id, |
|
|
|
details:[] |
|
|
|
roomId: this.room.id, |
|
|
|
asbitemIds: [] |
|
|
|
} |
|
|
|
// { |
|
|
|
// "customerOrgGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "details": [ |
|
|
|
// { |
|
|
|
// "customerOrgGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "price": 0, |
|
|
|
// "amount": 0 |
|
|
|
// } |
|
|
|
// "roomId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "asbitemIds": [ |
|
|
|
// "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
|
|
|
// ] |
|
|
|
// } |
|
|
|
this.customerOrgGroupAsbitems.forEach(e =>{ |
|
|
|
body.details.push({ |
|
|
|
customerOrgGroupId:this.customerOrgGroup.id, |
|
|
|
asbitemId:e.asbitemId, |
|
|
|
price:e.customerOrgGroupDetailPrice, |
|
|
|
amount:e.customerOrgGroupDetailAmount |
|
|
|
}) |
|
|
|
|
|
|
|
this.roomAsbitems.forEach(e => { |
|
|
|
body.asbitemIds.push(e.asbitemId) |
|
|
|
}) |
|
|
|
|
|
|
|
let group = deepCopy(this.customerOrgGroup); |
|
|
|
postapi('/api/app/customerorggroupdetail/createcustomerorggroupdetailmany',body |
|
|
|
) |
|
|
|
// .then(res => { |
|
|
|
// if(res.code != -1){ |
|
|
|
// delete group.id; |
|
|
|
// delete group.customerOrgId; |
|
|
|
// delete group.isComplete; |
|
|
|
// group.price = this.groupPrice |
|
|
|
// // console.log('this.customerOrgGroup',this.customerOrgGroup) |
|
|
|
// // console.log('group',group) |
|
|
|
// return putapi(`/api/app/customer-org-group/${this.customerOrgGroup.id}`, group) |
|
|
|
// } |
|
|
|
// }) 后台合并事务 |
|
|
|
.then(res =>{ |
|
|
|
if(res && res.code != -1){ |
|
|
|
postapi('/api/app/Room/CreateRoomDetails', body) |
|
|
|
.then(res => { |
|
|
|
if (res && res.code != -1) { |
|
|
|
console.log("操作成功"); |
|
|
|
group.price = this.groupPrice |
|
|
|
group.id = this.customerOrgGroup.id |
|
|
|
this.refreshMoney(group) |
|
|
|
this.dataTransOpts.refresh.room_detail.M++ |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
@ -956,7 +645,7 @@ export default { |
|
|
|
|
|
|
|
//右侧勾选按钮 |
|
|
|
selectRight(val) { |
|
|
|
this.customerOrgGroupAsbitemsChoosed = val; |
|
|
|
this.roomAsbitemsChoosed = val; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
@ -967,18 +656,17 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
//获取当前列列表数据 |
|
|
|
getCustomerOrgGroupAsbitems(customerOrgGroupId) { |
|
|
|
if(customerOrgGroupId){ |
|
|
|
getapi( |
|
|
|
`/api/app/customerorggroupdetail/getcustomerorggroupdetailinasbitem?CustomerOrgGroupId=${customerOrgGroupId}` |
|
|
|
).then((res) => { |
|
|
|
if(res.code != -1){ |
|
|
|
this.customerOrgGroupAsbitems = res.data; |
|
|
|
getRoomAsbitems(roomId) { |
|
|
|
if (roomId) { |
|
|
|
postapi('/api/app/Room/GetAsbitemListByRoomId', { roomId }) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.roomAsbitems = res.data; |
|
|
|
this.getAsbItemByItemType() |
|
|
|
} |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
this.customerOrgGroupAsbitems = [] |
|
|
|
} else { |
|
|
|
this.roomAsbitems = [] |
|
|
|
this.getAsbItemByItemType() |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -988,26 +676,24 @@ export default { |
|
|
|
//监听事件 |
|
|
|
watch: { |
|
|
|
// 体检分组ID未切换换时 也可以强制刷新数据 |
|
|
|
"dataTransOpts.refresh.customer_org_group_detail.M":{ |
|
|
|
"dataTransOpts.refresh.room_detail.M": { |
|
|
|
// immediate:true, |
|
|
|
handler(newVal, oldVal) { |
|
|
|
console.log(`watch 体检分组 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.customerOrgGroup.id}`); |
|
|
|
this.getCustomerOrgGroupAsbitems(this.customerOrgGroup.id); |
|
|
|
console.log(`watch 体检分组 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.room.id}`); |
|
|
|
if (newVal != oldVal) this.getRoomAsbitems(this.room.id); |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
|
|
|
|
.box { |
|
|
|
margin-top: 5px; |
|
|
|
/* border: 1px solid #000; */ |
|
|
|
} |
|
|
|
|
|
|
|
.btnClass { |
|
|
|
width:100px; |
|
|
|
width: 100px; |
|
|
|
margin-bottom: 5px |
|
|
|
} |
|
|
|
|
|
|
|
</style> |