Browse Source

asbchoose seo

master
pengjun 2 years ago
parent
commit
1773492ed1
  1. 294
      src/components/report/AsbitemOCX.vue
  2. 34
      src/store/index.js
  3. 23
      src/views/report/checkStatus.vue

294
src/components/report/AsbitemOCX.vue

@ -0,0 +1,294 @@
<template>
<div style="display: flex; margin-top: -30px;">
<div style="width:230px;">
<div style="display: flex;">
<span>项目类别</span>
<el-cascader :options="dict.itemTypeTree" v-model="itemTypeIds" style="margin-left: 3px;width:160px;"
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" :show-all-levels="false"
clearable filterable @change="parseAsbitem" size="small">
</el-cascader>
</div>
<div class="mainareaBox">
<el-table :data="asbItems" :height="400" @row-dblclick="dbClickChoosedAsb"
@selection-change="handleSelectionChange" size="small">
<el-table-column type="selection" align="center" width="60" />
<el-table-column prop="displayName" label="未选组合项目" width="160" />
</el-table>
</div>
</div>
<div style="width:100px;margin-top: 70px;">
<div class="btnList">
<el-button type="primary" @click="addAbs(asbItemChoosed)" style="width:90px;">添加 <i class="el-icon-right"></i>
</el-button>
</div>
<div class="btnList">
<el-button type="primary" @click="delAbs(asbItemOCXChoosed)" style="width:90px;">移除 <i class="el-icon-back"></i>
</el-button>
</div>
</div>
<div style="display: block; width:230px;">
<div class="disTotal">
<el-select v-model="asbItemId" placeholder="快速选择组合项目" size="small" filterable clearable remote automatic-dropdown
:remote-method="remoteMethod" @change="quickChoosedAsb" default-first-option ref="asbItemId"
style="width:150px;text-align: left;padding-right: 15px;">
<el-option v-for="item in quickAsb" :key="item.id" :value="item.id" :label="item.displayName" />
</el-select>
</div>
<div class="mainareaBox">
<el-table :data="report.dataAsbitemOCX" height="400" width="100%" @row-dblclick="removeAbs"
@selection-change="selecteditems" size="small">
<!-- temporaryselection personnelUnit.nogroupselected-->
<el-table-column type="selection" align="center" width="60" />
<el-table-column label="已选组合项目" width="160" prop="displayName" />
</el-table>
</div>
</div>
<div style="width:100px;margin-top: 70px;">
<div class="btnList">
<el-button type="primary" @click="addAbs(asbItemChoosed)" 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>
</el-button>
</div>
<div class="btnList"
style="text-align: center;background-color: rgb(192, 192, 192);border-radius: 5%;padding: 5px 0;">
已选组合项<br>
目为空时即<br>
表示选择所<br>
有组合项自
</div>
</div>
</div>
</template>
<script>
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { arrayFilter, arrayReduce, arrayExistObj, deepCopy } from "../../utlis/proFunc";
export default {
props: ["patientRegisterForm", "payTypeFlag"],
data() {
return {
itemTypeIds: [], //
asbItems: [], // asbItem
asbItemChoosed: [], //
asbItemOCXChoosed: [], //
asbItemQuick: [], //
quickAsb: [], //
asbItemId: '', //ID
};
},
computed: {
...mapState(["dict", "customerOrg", "patientRegister", "personnelUnit", "report"]),
},
created() {
},
mounted() {
this.dictInit();
},
methods: {
dictInit() {
getapi("/api/app/asbitem/in-filter?Filter").then((res) => {
if (res.code == 1) {
this.dict.asbItemAll = res.data.items;
this.parseAsbitem();
}
});
},
//
parseAsbitem() {
this.asbItemQuick = deepCopy(this.dict.asbItemAll);
arrayReduce(this.asbItemQuick, this.report.dataAsbitemOCX, 'id');
this.asbItems = deepCopy(this.asbItemQuick);
if (this.itemTypeIds && this.itemTypeIds.length > 0) {
this.asbItems = arrayFilter(this.asbItems, 'itemTypeId', this.itemTypeIds[this.itemTypeIds.length - 1])
}
},
//
handleSelectionChange(val) {
// this.selecteddata = val;
this.asbItemChoosed = val;
//console.log(this.asbItemChoosed);
},
//
///api/app/register-asbitem/many/3fa85f64-5717-4562-b3fc-2c963f66afa6'
addAbs(asbItemChoosed) {
if (asbItemChoosed.length < 1) {
alert("请选择要添加的组合项目")
return
}
arrayReduce(this.asbItems, asbItemChoosed, 'id')
arrayReduce(this.asbItemQuick, asbItemChoosed, 'id')
this.report.dataAsbitemOCX = this.report.dataAsbitemOCX.concat(asbItemChoosed)
this.btnOk();
},
//
selecteditems(val) {
this.asbItemOCXChoosed = val
},
//
///api/app/register-asbitem/many?RegisterAsbitemIds=3fa85f64-5717-4562-b3fc-2c963f66afa6
delAbs(absForDel) {
if (absForDel.length < 1) {
alert("请选择要移除的组合项目")
return
}
arrayReduce(this.report.dataAsbitemOCX, absForDel, 'id');
this.asbItems = this.asbItems.concat(absForDel)
this.asbItemQuick = this.asbItemQuick.concat(absForDel)
this.btnOk();
},
//
removeAbs(row) {
this.delAbs([row]);
},
//
dbClickChoosedAsb(row) {
this.addAbs([row]);
},
//
quickChoosedAsb(v) {
// value-key value console.log('quickChoosedAsb',v)
let lfind = -1
if (v) {
lfind = arrayExistObj(this.asbItemQuick, 'id', v)
if (lfind > -1) {
this.addAbs([this.asbItemQuick[lfind]])
}
}
},
//
remoteMethod(keyWords) {
//console.log('remoteMethod',this.dict.asbItemQuick)
if (keyWords) {
this.quickAsb = [];
this.asbItemQuick.forEach(item => {
if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
|| item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
|| item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1) {
this.quickAsb.push(item);
}
});
} else {
this.quickAsb = deepCopy(this.asbItemQuick);
}
},
btnOk(closed){
if(this.report.dataAsbitemOCX && this.report.dataAsbitemOCX.length > 0){
switch (this.report.dataAsbitemOCX.length) {
case 1:
this.patientRegister.query.asbitemOCX = this.report.dataAsbitemOCX[0].displayName
break;
default:
this.patientRegister.query.asbitemOCX = this.report.dataAsbitemOCX[0].displayName + ',… + ' + this.report.dataAsbitemOCX.length
break;
}
}else{
this.patientRegister.query.asbitemOCX = ''
}
if(closed){
this.report.dialogAsbitemOCX = false
}
}
},
//
watch: {
},
};
</script>
<style lang="scss" scoped>
@import "../../assets/css/global.css";
.mainareaBox {
border: 1px solid #000;
height: 400px;
margin-top: 5px;
}
.btnList {
margin-top: 5px;
margin-left: 5px;
margin-right: 5px;
}
.disTotal {
margin-left: 10px;
}
::v-deep .el-input__inner {
/*text-align: center;*/
padding-left: 2px;
padding-right: 15px;
}
::v-deep .el-input__icon {
width: 15px;
/* 输入框下拉箭头或清除图标 默认 25 */
}
/* 表格 表头 列间距控制 */
::v-deep .el-table th.el-table__cell>.cell {
text-align: center;
/* 表格 表头 对齐方式,默认 left */
padding-right: 2px;
/* 表格 表头 列间距控制,默认 10px */
padding-left: 2px;
/* 表格 表头 列间距控制,默认 10px */
}
/* 表格 表体 首列左间距控制 */
::v-deep .el-table--border .el-table__cell:first-child .cell {
padding-left: 2px;
/* 表格 表体 首列左间距控制,默认 10px */
}
/* 表格 行列间距控制 ,默认 10 px*/
::v-deep .el-table__cell {
padding: 2px 2px 2px 2px;
/* 上,右,下,左 */
}
::v-deep .cell {
padding-left: 2px;
padding-right: 2px;
}
::v-deep .el-icon-date:before {
content: ""
}</style>

34
src/store/index.js

@ -29,7 +29,7 @@ export default new Vuex.Store({
}, //树形组件的数据结构 }, //树形组件的数据结构
customerOrgId: "", //当前单位ID(可根据此值是否为空,判断是新增还是编辑) customerOrgId: "", //当前单位ID(可根据此值是否为空,判断是新增还是编辑)
customerOrgRd: { id: "", isLock: "N", isActive: "Y", isLockBox: false, isActiveBox: true, }, //单个体检单位记录值 customerOrgRd: { id: "", isLock: "N", isActive: "Y", isLockBox: false, isActiveBox: true, }, //单个体检单位记录值
customerOrgRegisterList: [{id:'uuid'}], //单位体检次数登记列表
customerOrgRegisterList: [{ id: 'uuid' }], //单位体检次数登记列表
contactPersonList: [], //联系人列表 contactPersonList: [], //联系人列表
contactMethodList: [], //联系方式列表 contactMethodList: [], //联系方式列表
orgEditStyle: '', //编辑表单样式 orgEditStyle: '', //编辑表单样式
@ -56,8 +56,8 @@ export default new Vuex.Store({
saveTimes: 0, //用于体检登记时,触发分组调整保存 saveTimes: 0, //用于体检登记时,触发分组调整保存
photo: "", //单独抽出,拍照时会更新 photo: "", //单独抽出,拍照时会更新
cameraVisble: false, //拍照控件显示 cameraVisble: false, //拍照控件显示
lisRequestVisble:false, //检验条码补打
mergeAsbitemVisble:false, //合并项目
lisRequestVisble: false, //检验条码补打
mergeAsbitemVisble: false, //合并项目
patientRegisterRdInit: { patientRegisterRdInit: {
id: "", //id id: "", //id
patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000... patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
@ -106,17 +106,17 @@ export default new Vuex.Store({
customerOrgGroupChange: 0, //控制体检列表记录切换时,0 无需触发更换分组操作 customerOrgGroupChange: 0, //控制体检列表记录切换时,0 无需触发更换分组操作
medicalPackageChange: 0, //控制体检列表记录切换时,0 无需触发更换套餐操作 medicalPackageChange: 0, //控制体检列表记录切换时,0 无需触发更换套餐操作
query: { query: {
dateType:'creationTime', //登记日期
dateRange:null, //日期范围
startDate:null,
endDate:null,
containRefuse:true, //包含弃检项目
dateType: 'creationTime', //登记日期
dateRange: null, //日期范围
startDate: null,
endDate: null,
containRefuse: true, //包含弃检项目
times: 0, //触发查询次数 times: 0, //触发查询次数
customerOrgId: "", //体检单位ID customerOrgId: "", //体检单位ID
CustomerOrgParentId: "", //单位父级ID CustomerOrgParentId: "", //单位父级ID
customerOrgFlag: true, //单位作为查询条件 customerOrgFlag: true, //单位作为查询条件
customerOrgRegister:{}, //单位体检次数
checkAsbs:null,
customerOrgRegister: {}, //单位体检次数
checkAsbs: null,
}, //查询条件 }, //查询条件
customerOrgGroup: [], //分组(针对单位) customerOrgGroup: [], //分组(针对单位)
patientRegisterAbs: [], //人员已选组合项目 patientRegisterAbs: [], //人员已选组合项目
@ -159,9 +159,11 @@ export default new Vuex.Store({
suggestionList: [], //建议 suggestionList: [], //建议
}, },
report:{
dialogCusOrgOCX:false, //通用单位查询控件显示
dataCusOrgOCX:[], //通用单位查询的数据
report: {
dialogCusOrgOCX: false, //通用单位查询控件显示
dataCusOrgOCX: [], //通用单位查询的数据
dialogAsbitemOCX: false,
dataAsbitemOCX: [], //通用组合项目查询的数据
}, },
//公共字典数据 add by pengjun //公共字典数据 add by pengjun
@ -200,12 +202,12 @@ export default new Vuex.Store({
{ id: "1", displayName: "单位支付" }, { id: "1", displayName: "单位支付" },
{ id: "2", displayName: "赠送" }, { id: "2", displayName: "赠送" },
], ],
cardMode:[
cardMode: [
{ id: "0", displayName: "充值卡" }, { id: "0", displayName: "充值卡" },
{ id: "1", displayName: "积分卡" }, { id: "1", displayName: "积分卡" },
], ],
cardType:[], //会员卡类别
billFlag:[
cardType: [], //会员卡类别
billFlag: [
{ id: "0", displayName: "收费" }, { id: "0", displayName: "收费" },
{ id: "1", displayName: "退费" }, { id: "1", displayName: "退费" },
{ id: "2", displayName: "充值" }, { id: "2", displayName: "充值" },

23
src/views/report/checkStatus.vue

@ -6,16 +6,15 @@
<div style="display: flex; flex-wrap: wrap; height:35px;"> <div style="display: flex; flex-wrap: wrap; height:35px;">
<div class="query"> <div class="query">
<span>体检单位</span> <span>体检单位</span>
<el-input placeholder="请选择单位" v-model="patientRegister.query.cusOrgOCX" style="width:342px;" size="small" disabled>
<el-button slot="append" icon="el-icon-search" @click="report.dialogCusOrgOCX = true"></el-button>
<el-input placeholder="请选择体检单位" v-model="patientRegister.query.cusOrgOCX" style="width:342px;" size="small" disabled>
<el-button slot="append" icon="el-icon-search" @click="report.dialogCusOrgOCX = true" style="font-size: 20px;"></el-button>
</el-input> </el-input>
</div> </div>
<div class="query"> <div class="query">
<span>组合项目</span> <span>组合项目</span>
<el-select v-model="patientRegister.query.checkAsbs" multiple collapse-tags filterable clearable placeholder="请选择"
size="small" >
<el-option v-for="item in dict.asbItemAll" :key="item.value" :label="item.displayName" :value="item.id"/>
</el-select>
<el-input placeholder="请选择组合项目" v-model="patientRegister.query.asbitemOCX" style="width:240px;" size="small" disabled >
<el-button slot="append" icon="el-icon-search" @click="report.dialogAsbitemOCX = true" style="font-size: 20px;"></el-button>
</el-input>
</div> </div>
<div class="query"> <div class="query">
<span>检查状态</span> <span>检查状态</span>
@ -85,7 +84,12 @@
<el-dialog title="体检单位选择" :visible.sync="report.dialogCusOrgOCX" <el-dialog title="体检单位选择" :visible.sync="report.dialogCusOrgOCX"
:close-on-click-modal="false" width="840px" height="600px"> :close-on-click-modal="false" width="840px" height="600px">
<CusOrgOCX/> <CusOrgOCX/>
</el-dialog>
</el-dialog>
<!--通用选组合项目的控件-->
<el-dialog title="组合项目选择" :visible.sync="report.dialogAsbitemOCX"
:close-on-click-modal="false" width="700px" height="600px">
<AsbitemOCX/>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -94,9 +98,11 @@ import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy, arrayReduce, arrayExistObj,tcdate } from "@/utlis/proFunc"; import { dddw, objCopy, arrayReduce, arrayExistObj,tcdate } from "@/utlis/proFunc";
import CusOrgOCX from "../../components/report/CusOrgOCX.vue" import CusOrgOCX from "../../components/report/CusOrgOCX.vue"
import AsbitemOCX from "../../components/report/AsbitemOCX.vue"
export default { export default {
components: { components: {
CusOrgOCX, CusOrgOCX,
AsbitemOCX,
}, },
data() { data() {
return { return {
@ -257,6 +263,9 @@ export default {
padding-left: 5px; padding-left: 5px;
padding-right: 25px; padding-right: 25px;
} }
::v-deep .el-input-group__append{
padding: 0 5px; /* 控件默认 0 20px;*/
}
.query { .query {
margin-left: 10px; margin-left: 10px;
} }

Loading…
Cancel
Save