Browse Source

djseo

master
pengjun 2 years ago
parent
commit
6697778d09
  1. 200
      src/components/patientRegister/PatientRegisterEditGroupBatch.vue
  2. 472
      src/components/patientRegister/PatientRegisterEditItemBatch.vue
  3. 509
      src/components/patientRegister/PatientRegisterList.vue
  4. 12
      src/main.js
  5. 27
      src/store/index.js

200
src/components/patientRegister/PatientRegisterEditGroupBatch.vue

@ -0,0 +1,200 @@
<template>
<div style="display: flex">
<div>
<div>
<div>
批量调整分组只针对单位体检有效个人体检将忽略此操作不能调整已收费或已检的项目及已总检的体检人员
</div>
<div>
<br /><span>分组</span>
<el-select
v-model="groupBatch.customerOrgGroupId"
placeholder="请选择"
filterable
size="small"
>
<el-option
v-for="item in customerOrgGroup"
:key="item.id"
:label="item.displayName"
:value="item.id"
/>
</el-select>
</div>
<div>
<br /><el-radio v-model="groupBatch.payTypeFlag" label="0"
>个人支付</el-radio
>
<br /><el-radio v-model="groupBatch.payTypeFlag" label="1"
>单位支付</el-radio
>
<br /><el-radio v-model="groupBatch.payTypeFlag" label="2"
>免费</el-radio
>
</div>
<div>
<br /><el-checkbox v-model="groupBatch.isReserveAddAsbitem"
>保留加做项目包括不属于原分组的没有设置分组的</el-checkbox
>
</div>
</div>
<div>
<el-button type="primary" @click="groupBatchHandle"> </el-button>
<el-button @click="dialogWin.PatientRegisterEditGroupBatch = false"> </el-button>
</div>
</div>
<!-- 通用进度条 -->
<el-dialog
title="数据处理中……"
:visible.sync="elProgress.display"
width="600px"
height="400"
:show-close="false"
:close-on-click-modal="false"
:append-to-body="true"
>
<ElProgressOCX />
</el-dialog>
</div>
</template>
<script>
import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import Sortable from "sortablejs";
import FileSaver from 'file-saver';
import html2canvas from 'html2canvas';
import {
dddw,
objCopy,
arrayReduce,
arrayExistObj,
deepCopy,
} from "../../utlis/proFunc";
import ElProgressOCX from "../report/ElProgressOCX.vue";
export default {
components: {
ElProgressOCX,
},
props:["multipleSelection"],
data() {
return {
customerOrgGroup:[], //
groupBatch: {
patientRegisterId: null,
customerOrgGroupId: null,
payTypeFlag: "1", //01 2
isReserveAddAsbitem: true, //
},
};
},
created() {
},
//
mounted() {
},
computed: {
...mapState([
"window",
"dataTransOpts",
"dialogWin",
"dict",
"elProgress",
"patientRegister",
"customerOrg",
]),
},
methods: {
moment,dddw,deepCopy,
// /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
getCustomerOrgGroup(customerOrgId) {
getapi(
`/api/app/customer-org-group/in-customer-org-id/${customerOrgId}`
).then((res) => {
console.log("getCustomerOrgGroup", res.data);
if (res.code == 1) {
this.customerOrgGroup = res.data;
}
});
},
//()
async groupBatchHandle() {
let groupBatch = { patientRegisterId: null, ...this.groupBatch };
if (groupBatch.isReserveAddAsbitem) {
groupBatch.isReserveAddAsbitem = "Y";
} else {
groupBatch.isReserveAddAsbitem = "N";
}
console.log("groupBatch", groupBatch);
if (!groupBatch.customerOrgGroupId) {
this.$message.warning("请选择分组");
return;
}
this.elProgress.display = true;
this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) {
groupBatch.patientRegisterId = this.multipleSelection[i].id;
try {
await postapi(
"/api/app/patientregister/updatepatientregistercustomerorggroup",
groupBatch
);
} catch (error) {
console.log(error);
}
this.elProgress.percentage = Math.floor(
((i + 1) * 100) / this.multipleSelection.length
);
}
console.log("操作成功!");
this.dialogWin.PatientRegisterEditGroupBatch = false
//
this.patientRegister.query.times++
},
},
//
watch: {
"dataTransOpts.refresh.asbitem.M":{
immediate: true, //
// deep: true, //
handler(newVal,oldVal){
console.log(`watch: 刷新单位分组 newVal: ${newVal} oldVal:${oldVal}`)
this.getCustomerOrgGroup(this.multipleSelection[0].customerOrgParentId)
}
},
},
};
</script>
<style scoped>
@import "../../assets/css/global_input.css";
@import "../../assets/css/global_table.css";
@import "../../assets/css/global.css";
.box {
display: flex;
}
.listBtn {
margin-top: 5px;
text-align: center;
}
.btnClass {
width: 100px;
}
</style>

472
src/components/patientRegister/PatientRegisterEditItemBatch.vue

@ -0,0 +1,472 @@
<template>
<div style="display: flex">
<div>
<div>
批量调整分组只针对单位体检有效个人体检将忽略此操作不能调整已收费或已检的项目及已总检的体检人员
</div>
<div>
<br /><el-radio v-model="asbitemBatch.operate" label="add"
>增加项目</el-radio
>
<el-radio v-model="asbitemBatch.operate" label="del"
>删除项目</el-radio
>
</div>
<div>
<br /><el-checkbox
v-model="asbitemBatch.isDeleteGroup"
:disabled="asbitemBatch.operate == 'add' ? true : false"
>如果删除项目属于分组则删除体检记录信息的分组设置</el-checkbox
>
</div>
<div>
<br /><span>直接录入</span>
<el-select
v-model="asbitemBatch.asbItemId"
placeholder="快速选择组合项目"
size="small" highlight-current-row
filterable :filter-method="filterMethod"
clearable @clear="quickAsb = deepCopy(asbItemQuick)"
@change="quickChoosedAsb"
default-first-option ref="quickAsbOCX"
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 style="display: flex; margin-top: 2px">
<div style="width: 480px">
<el-table
:data="asbitemBatch.asbitemsTemp"
height="240"
width="100%"
show-summary
@row-dblclick="removeAbs"
size="small" highlight-current-row
@row-click="rowClickaAbitemCurr"
border
>
<el-table-column
label="组合项目"
width="150"
prop="asbitemName"
/>
<el-table-column label="数量" prop="amount" width="60">
<template slot-scope="scope">
<el-input
type="number"
v-model="scope.row.amount"
size="small"
:disabled="asbitemBatch.operate == 'del' ? true : false"
/>
</template>
</el-table-column>
<el-table-column label="实收价格" prop="chargePrice" width="90">
<template slot-scope="scope">
<el-input
type="number"
v-model="scope.row.chargePrice"
size="small"
:disabled="asbitemBatch.operate == 'del' ? true : false"
/>
</template>
</el-table-column>
<el-table-column label="支付方式" prop="payTypeFlag" width="120">
<template slot-scope="scope">
<el-select
v-model="scope.row.payTypeFlag"
size="small"
:disabled="asbitemBatch.operate == 'del' ? true : false"
>
<el-option
v-for="item in dict.payType"
:key="item.id"
:label="item.displayName"
:value="item.id"
/>
</el-select>
</template>
</el-table-column>
</el-table>
</div>
<div style="display: block; width: 110px; margin-left: 10px">
<div style="margin-top: 5px">
<el-button
type="danger"
@click="asbitemDel(1)"
style="width: 100px"
>删除</el-button
>
</div>
<div style="margin-top: 5px">
<el-button
type="danger"
@click="asbitemDel(0)"
style="width: 100px"
>删除全部</el-button
>
</div>
<div style="margin-top: 5px">
<el-button
type="primary"
@click="changePayTypeFlag('0')"
style="width: 100px"
>全个人支付</el-button
>
</div>
<div style="margin-top: 5px">
<el-button
type="primary"
@click="changePayTypeFlag('1')"
style="width: 100px"
>全单位支付</el-button
>
</div>
<div style="margin-top: 5px">
<el-button
type="primary"
@click="changePayTypeFlag('2')"
style="width: 100px"
>全赠送</el-button
>
</div>
</div>
</div>
<div style="margin-top: 5px;margin-left: 460px;">
<el-button type="primary" @click="asbitemBatchHandle"> </el-button>
<el-button @click="dialogWin.PatientRegisterEditItemBatch = false"> </el-button>
</div>
</div>
<!-- 通用进度条 -->
<el-dialog
title="数据处理中……"
:visible.sync="elProgress.display"
width="600px"
height="400"
:show-close="false"
:close-on-click-modal="false"
:append-to-body="true"
>
<ElProgressOCX />
</el-dialog>
</div>
</template>
<script>
import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import {
dddw,
arrayReduce,
arrayExistObj,
deepCopy,
} from "../../utlis/proFunc";
import ElProgressOCX from "../report/ElProgressOCX.vue";
export default {
components: {
ElProgressOCX,
},
props:["multipleSelection"],
data() {
return {
asbitemBatch: {
operate: "add",
isDeleteGroup: false,
asbItemId: "",
asbitemsTemp: [], //
asbitemCurr: {}, //()
},
asbItemQuick:[], //
quickAsb: [], //
};
},
//
created() {
},
//
mounted() {
//
// this.dictInit()
},
computed: {
...mapState([
"window",
"dataTransOpts",
"dialogWin",
"dict",
"elProgress",
"patientRegister",
"customerOrg",
]),
},
methods: {
moment,dddw,deepCopy,
//
filterMethod(keyWords) {
//console.log('filterMethod',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);
}
},
//
quickChoosedAsb(v) {
//
let lfind = -1;
if (v) {
lfind = arrayExistObj(this.quickAsb, "id", v);
if (lfind > -1) {
this.asbitemBatch.asbitemsTemp.push({
asbitemId: v,
asbitemName: this.quickAsb[lfind].displayName, //
patientRegisterId: null,
standardPrice: this.quickAsb[lfind].price,
chargePrice: this.quickAsb[lfind].price,
payTypeFlag: "1", //
isCharge: "N",
amount: 1,
});
this.quickAsb.splice(lfind, 1);
arrayReduce(this.asbItemQuick, { id: v }, "id=id");
}
}
//console.log(v, this.asbitemBatch.asbitemsTemp);
this.$nextTick(() => {
this.$refs['quickAsbOCX'].blur(); //total asbItemId
this.asbItemId = ''
this.quickAsb = deepCopy(this.asbItemQuick)
this.$refs['quickAsbOCX'].focus(); //total asbItemId
});
},
//
removeAbs(row) {
let lfind = arrayExistObj(
this.asbitemBatch.asbitemsTemp,
"asbitemId",
row.asbitemId
);
if (lfind > -1) this.asbitemBatch.asbitemsTemp.splice(lfind, 1);
},
rowClickaAbitemCurr(row) {
this.asbitemBatch.asbitemCurr = row;
},
btnRemoveAbs() {
if (!this.asbitemBatch.asbitemCurr.asbitemId) {
this.$message.warning("请选择要删除的组合项目!");
return;
}
this.removeAbs(this.asbitemBatch.asbitemCurr);
this.asbitemBatch.asbitemCurr.asbitemId = null;
},
removeAllAbs() {
this.asbitemBatch.asbitemsTemp = [];
},
asbitemDel(type) {
//typ==0
if (Number(type) == 0) {
this.asbitemBatch.asbitemsTemp = [];
} else {
if (!this.asbitemBatch.asbitemCurr.asbitemId) {
this.$message.warning("请选中要删除的项目!");
return;
}
//console.log(this.asbitemBatch.asbitemsTemp,this.asbitemBatch.asbitemCurr)
let lfind = arrayExistObj(
this.asbitemBatch.asbitemsTemp,
"asbitemId",
this.asbitemBatch.asbitemCurr.asbitemId
);
if (lfind > -1) {
this.asbitemBatch.asbitemsTemp.splice(lfind, 1);
this.asbitemBatch.asbitemCurr.asbitemId = null;
}
//console.log(lfind);
}
},
//
changePayTypeFlag(flag) {
this.asbitemBatch.asbitemsTemp.forEach((e) => {
e.payTypeFlag = flag;
return e;
});
},
//()
async asbitemBatchHandle() {
let msg = "",
body = {};
if (this.asbitemBatch.asbitemsTemp.length == 0) {
this.$message.warning("没有选择组合项目,不可执行此操作!");
return;
}
if (this.asbitemBatch.operate == "add") {
this.asbitemBatch.asbitemsTemp.forEach((e, index) => {
if (!e.amount || !e.chargePrice) {
msg = "第 " + (index + 1) + " 行,未输入数量或价格!";
}
});
if (msg) {
this.$message.warning(msg);
return;
}
let createRegisterAsbitemDtos = deepCopy(
this.asbitemBatch.asbitemsTemp
);
createRegisterAsbitemDtos.forEach((e) => {
delete e.asbitemName;
return e;
});
this.elProgress.display = true;
this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) {
createRegisterAsbitemDtos.forEach((e) => {
e.patientRegisterId = this.multipleSelection[i].id;
return e;
});
body = {
organizationUnitId: this.multipleSelection[i].organizationUnitId,
createRegisterAsbitemDtos,
};
try {
await postapi(
"/api/app/registerasbitem/createregisterasbitemincustomerorgmany",
body
);
} catch (error) {
console.log("批量增加项目错误,原因:", error);
}
this.elProgress.percentage = Math.floor(
((i + 1) * 100) / this.multipleSelection.length
);
}
} else {
// {
// isDeleteGroup: 'N',
// patientRegisterId: null,
// asbitemIds: [],
// }
let asbitemIds = [];
if (this.asbitemBatch.isDeleteGroup) {
body.isDeleteGroup = "Y";
} else {
body.isDeleteGroup = "N";
}
this.elProgress.display = true;
this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) {
this.asbitemBatch.asbitemsTemp.forEach((e) => {
asbitemIds.push(e.asbitemId);
});
body.patientRegisterId = this.multipleSelection[i].id;
body.asbitemIds = asbitemIds;
try {
await postapi(
"/api/app/registerasbitem/deleteregisterasbitemincustomerorgmany",
body
);
} catch (error) {
console.log("批量删除项目错误,原因:", error);
}
this.elProgress.percentage = Math.floor(
((i + 1) * 100) / this.multipleSelection.length
);
}
}
console.log("操作成功!");
this.dialogWin.PatientRegisterEditItemBatch = false;
//
this.patientRegister.query.times++
},
//
dictInit(){
//
postapi('/api/app/asbitem/getasbitemlist',{isFilterActive:'Y'}).then(res =>{
if(res.code != -1){
this.asbItemQuick = res.data
this.quickAsb = res.data
}
});
},
},
//
watch: {
"dataTransOpts.refresh.asbitem.M":{
immediate: true, //
// deep: true, //
handler(newVal,oldVal){
console.log(`watch: 刷新在用组合项目 newVal: ${newVal} oldVal:${oldVal}`)
this.dictInit()
}
},
},
};
</script>
<style scoped>
@import "../../assets/css/global_input.css";
@import "../../assets/css/global_table.css";
@import "../../assets/css/global.css";
.box {
display: flex;
}
.listBtn {
margin-top: 5px;
text-align: center;
}
.btnClass {
width: 100px;
}
</style>

509
src/components/patientRegister/PatientRegisterList.vue

@ -245,206 +245,26 @@
<!-- 批量调整分组 -->
<el-dialog
title="批量调整分组"
:visible.sync="dialogGroup"
:visible.sync="dialogWin.PatientRegisterEditGroupBatch"
width="600px"
height="800"
height="800px"
:append-to-body="true"
:close-on-click-modal="false"
>
<div>
<div>
批量调整分组只针对单位体检有效个人体检将忽略此操作不能调整已收费或已检的项目及已总检的体检人员
</div>
<div>
<br /><span>分组</span>
<el-select
v-model="groupBatch.customerOrgGroupId"
placeholder="请选择"
filterable
size="small"
>
<el-option
v-for="item in patientRegister.customerOrgGroup"
:key="item.id"
:label="item.displayName"
:value="item.id"
/>
</el-select>
</div>
<div>
<br /><el-radio v-model="groupBatch.payTypeFlag" label="0"
>个人支付</el-radio
>
<br /><el-radio v-model="groupBatch.payTypeFlag" label="1"
>单位支付</el-radio
>
<br /><el-radio v-model="groupBatch.payTypeFlag" label="2"
>免费</el-radio
>
</div>
<div>
<br /><el-checkbox v-model="groupBatch.isReserveAddAsbitem"
>保留加做项目包括不属于原分组的没有设置分组的</el-checkbox
>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="groupBatchHandle"> </el-button>
<el-button @click="dialogGroup = false"> </el-button>
</span>
<PatientRegisterEditGroupBatch :multipleSelection="multipleSelection" />
</el-dialog>
<!-- 批量调整项目 -->
<el-dialog
title="批量调整项目"
:visible.sync="dialogAsbitem"
width="600px"
height="800"
:visible.sync="dialogWin.PatientRegisterEditItemBatch"
width="610px"
height="800px"
:append-to-body="true"
:close-on-click-modal="false"
>
<div>
<div>
批量调整分组只针对单位体检有效个人体检将忽略此操作不能调整已收费或已检的项目及已总检的体检人员
</div>
<div>
<br /><el-radio v-model="asbitemBatch.operate" label="add"
>增加项目</el-radio
>
<el-radio v-model="asbitemBatch.operate" label="del"
>删除项目</el-radio
>
</div>
<div>
<br /><el-checkbox
v-model="asbitemBatch.isDeleteGroup"
:disabled="asbitemBatch.operate == 'add' ? true : false"
>如果删除项目属于分组则删除体检记录信息的分组设置</el-checkbox
>
</div>
<div>
<br /><span>直接录入</span>
<el-select
v-model="asbitemBatch.asbItemId"
placeholder="快速选择组合项目"
size="small" highlight-current-row
filterable :filter-method="filterMethod"
clearable @clear="quickAsb = deepCopy(dict.asbItemQuick)"
@change="quickChoosedAsb"
default-first-option ref="quickAsbOCX"
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 style="display: flex; margin-top: 2px">
<div style="width: 480px">
<el-table
:data="asbitemBatch.asbitemsTemp"
height="240"
width="100%"
show-summary
@row-dblclick="removeAbs"
size="small" highlight-current-row
@row-click="rowClickaAbitemCurr"
border
>
<el-table-column
label="组合项目"
width="150"
prop="asbitemName"
/>
<el-table-column label="数量" prop="amount" width="60">
<template slot-scope="scope">
<el-input
type="number"
v-model="scope.row.amount"
size="small"
:disabled="asbitemBatch.operate == 'del' ? true : false"
/>
</template>
</el-table-column>
<el-table-column label="实收价格" prop="chargePrice" width="90">
<template slot-scope="scope">
<el-input
type="number"
v-model="scope.row.chargePrice"
size="small"
:disabled="asbitemBatch.operate == 'del' ? true : false"
/>
</template>
</el-table-column>
<el-table-column label="支付方式" prop="payTypeFlag" width="120">
<template slot-scope="scope">
<el-select
v-model="scope.row.payTypeFlag"
size="small"
:disabled="asbitemBatch.operate == 'del' ? true : false"
>
<el-option
v-for="item in dict.payType"
:key="item.id"
:label="item.displayName"
:value="item.id"
/>
</el-select>
</template>
</el-table-column>
</el-table>
</div>
<div style="display: block; width: 110px; margin-left: 10px">
<div style="margin-top: 5px">
<el-button
type="danger"
@click="asbitemDel(1)"
style="width: 100px"
>删除</el-button
>
</div>
<div style="margin-top: 5px">
<el-button
type="danger"
@click="asbitemDel(0)"
style="width: 100px"
>删除全部</el-button
>
</div>
<div style="margin-top: 5px">
<el-button
type="primary"
@click="changePayTypeFlag('0')"
style="width: 100px"
>全个人支付</el-button
>
</div>
<div style="margin-top: 5px">
<el-button
type="primary"
@click="changePayTypeFlag('1')"
style="width: 100px"
>全单位支付</el-button
>
</div>
<div style="margin-top: 5px">
<el-button
type="primary"
@click="changePayTypeFlag('2')"
style="width: 100px"
>全赠送</el-button
>
</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="asbitemBatchHandle"> </el-button>
<el-button @click="dialogAsbitem = false"> </el-button>
</span>
<PatientRegisterEditItemBatch :multipleSelection="multipleSelection" />
</el-dialog>
<!-- 通用进度条 -->
@ -482,12 +302,16 @@ import Camera from "../../components/patientRegister/Camera.vue";
import PatientRegisterAsbItem from "../../components/patientRegister/patientRegisterAsbItem.vue";
import ElProgressOCX from "../../components/report/ElProgressOCX.vue";
import PatientRegisterEditGroupBatch from "./PatientRegisterEditGroupBatch.vue";
import PatientRegisterEditItemBatch from "./PatientRegisterEditItemBatch.vue";
export default {
components: {
PatientRegisterEdit,
Camera,
PatientRegisterAsbItem,
PatientRegisterEditGroupBatch, //
PatientRegisterEditItemBatch, //
ElProgressOCX,
},
data() {
@ -508,27 +332,8 @@ export default {
rClickRow: null, //
rClickColumn: null, //
dialogGroup: false,
groupBatch: {
patientRegisterId: null,
customerOrgGroupId: null,
payTypeFlag: "1", //01 2
isReserveAddAsbitem: true, //
},
dialogAsbitem: false,
asbitemBatch: {
operate: "add",
isDeleteGroup: false,
asbItemId: "",
asbitemsTemp: [], //
asbitemCurr: {}, //()
},
quickAsb: [], //
//
headerCols: [],
//
dropCol: [
{ label: "序号",prop: "sn",minWidth: 40,align:"center"},
@ -588,7 +393,7 @@ export default {
this.peisid = window.sessionStorage.getItem('peisid');
//
//
this.dropCol = this.columnDrop(this.dropCol);
this.$nextTick(() => {
@ -599,6 +404,7 @@ export default {
...mapState([
"window",
"dataTransOpts",
"dialogWin",
"dict",
"elProgress",
"patientRegister",
@ -609,6 +415,7 @@ export default {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
moment,dddw,deepCopy,
//
handleRowClassName({ row, rowIndex }) {
// highLightBg 'selected'
//console.log(rowIndex, row)
@ -738,19 +545,7 @@ export default {
}
this.multipleSelection = JSON.parse(JSON.stringify(rows));
},
// /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
getCustomerOrgGroup(customerOrgId) {
getapi(
`/api/app/customer-org-group/in-customer-org-id/${customerOrgId}`
).then((res) => {
console.log("getCustomerOrgGroup", res.data);
if (res.code == 1) {
this.patientRegister.customerOrgGroup = res.data;
}
});
},
///form
setForm(formData){
this.patientRegister.patientRegisterRd = deepCopy(formData)
@ -818,7 +613,7 @@ export default {
if(lfind > -1){
//
this.dataTransOpts.tableS.patient_register.id = this.patientRegister.prList[lfind].id
this.getCustomerOrgGroup(this.patientRegister.prList[lfind].customerOrgParentId);
// this.getCustomerOrgGroup(this.patientRegister.prList[lfind].customerOrgParentId);
setTimeout(() => {
this.dataTransOpts.refresh.register_asbitem.M++
}, 20);
@ -907,7 +702,6 @@ export default {
.catch(err =>{
this.$message.error(`操作失败 ${err}`);
});
},
//
@ -1130,6 +924,11 @@ export default {
curLoad.forEach((e,index) =>{
this.patientRegister.prList.push(Object.assign({index:Number(oldCount)+Number(index),choosed:false},e))
})
//
if(this.dataTransOpts.tableS.patient_register.id){
this.dataTransOpts.refresh.register_asbitem.M++
}
}
loading.close();
},
@ -1234,124 +1033,10 @@ export default {
return;
}
this.dialogGroup = true;
},
//
async groupBatchHandle() {
let groupBatch = { patientRegisterId: null, ...this.groupBatch };
if (groupBatch.isReserveAddAsbitem) {
groupBatch.isReserveAddAsbitem = "Y";
} else {
groupBatch.isReserveAddAsbitem = "N";
}
console.log("groupBatch", groupBatch);
if (!groupBatch.customerOrgGroupId) {
this.$message.warning("请选择分组");
return;
}
this.elProgress.display = true;
this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) {
groupBatch.patientRegisterId = this.multipleSelection[i].id;
try {
await postapi(
"/api/app/patientregister/updatepatientregistercustomerorggroup",
groupBatch
);
} catch (error) {
console.log(error);
}
this.elProgress.percentage = Math.floor(
((i + 1) * 100) / this.multipleSelection.length
);
}
console.log("操作成功!");
this.dialogGroup = false;
this.Query();
},
//
filterMethod(keyWords) {
//console.log('filterMethod',this.dict.asbItemQuick)
if (keyWords) {
this.quickAsb = [];
this.dict.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.dict.asbItemQuick);
}
},
//
quickChoosedAsb(v) {
//
let lfind = -1;
if (v) {
lfind = arrayExistObj(this.quickAsb, "id", v);
if (lfind > -1) {
this.asbitemBatch.asbitemsTemp.push({
asbitemId: v,
asbitemName: this.quickAsb[lfind].displayName, //
patientRegisterId: null,
standardPrice: this.quickAsb[lfind].price,
chargePrice: this.quickAsb[lfind].price,
payTypeFlag: "1", //
isCharge: "N",
amount: 1,
});
this.quickAsb.splice(lfind, 1);
arrayReduce(this.dict.asbItemQuick, { id: v }, "id=id");
}
}
//console.log(v, this.asbitemBatch.asbitemsTemp);
this.$nextTick(() => {
this.$refs['quickAsbOCX'].blur(); //total asbItemId
this.asbItemId = ''
this.quickAsb = deepCopy(this.dict.asbItemQuick)
this.$refs['quickAsbOCX'].focus(); //total asbItemId
});
},
//
removeAbs(row) {
let lfind = arrayExistObj(
this.asbitemBatch.asbitemsTemp,
"asbitemId",
row.asbitemId
);
if (lfind > -1) this.asbitemBatch.asbitemsTemp.splice(lfind, 1);
},
rowClickaAbitemCurr(row) {
this.asbitemBatch.asbitemCurr = row;
},
btnRemoveAbs() {
if (!this.asbitemBatch.asbitemCurr.asbitemId) {
this.$message.warning("请选择要删除的组合项目!");
return;
}
this.removeAbs(this.asbitemBatch.asbitemCurr);
this.asbitemBatch.asbitemCurr.asbitemId = null;
},
this.dialogWin.PatientRegisterEditGroupBatch = true;
removeAllAbs() {
this.asbitemBatch.asbitemsTemp = [];
},
//
btnAsbBatch() {
let customerOrgId = this.patientRegister.query.customerOrgId;
@ -1371,150 +1056,10 @@ export default {
return
}
this.dialogAsbitem = true;
//
this.dict.asbItemQuick = deepCopy(this.dict.asbItemAll);
this.asbitemBatch.asbitemCurr.asbitemId = null;
this.asbitemBatch.asbitemsTemp = [];
},
asbitemDel(type) {
//typ==0
if (Number(type) == 0) {
this.asbitemBatch.asbitemsTemp = [];
} else {
if (!this.asbitemBatch.asbitemCurr.asbitemId) {
this.$message.warning("请选中要删除的项目!");
return;
}
//console.log(this.asbitemBatch.asbitemsTemp,this.asbitemBatch.asbitemCurr)
let lfind = arrayExistObj(
this.asbitemBatch.asbitemsTemp,
"asbitemId",
this.asbitemBatch.asbitemCurr.asbitemId
);
if (lfind > -1) {
this.asbitemBatch.asbitemsTemp.splice(lfind, 1);
this.asbitemBatch.asbitemCurr.asbitemId = null;
}
//console.log(lfind);
}
},
//
changePayTypeFlag(flag) {
this.asbitemBatch.asbitemsTemp.forEach((e) => {
e.payTypeFlag = flag;
return e;
});
},
//
async asbitemBatchHandle() {
let msg = "",
body = {};
if (this.asbitemBatch.asbitemsTemp.length == 0) {
this.$message.warning("没有选择组合项目,不可执行此操作!");
return;
}
if (this.asbitemBatch.operate == "add") {
this.asbitemBatch.asbitemsTemp.forEach((e, index) => {
if (!e.amount || !e.chargePrice) {
msg = "第 " + (index + 1) + " 行,未输入数量或价格!";
}
});
if (msg) {
this.$message.warning(msg);
return;
}
// {
// "organizationUnitId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "createRegisterAsbitemDtos": [
// {
// "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "standardPrice": 0,
// "chargePrice": 0,
// "payTypeFlag": "string",
// "isCharge": "string",
// "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "amount": 0,
// "groupPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
// }
// ]
// }
let createRegisterAsbitemDtos = deepCopy(
this.asbitemBatch.asbitemsTemp
);
createRegisterAsbitemDtos.forEach((e) => {
delete e.asbitemName;
return e;
});
this.elProgress.display = true;
this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) {
createRegisterAsbitemDtos.forEach((e) => {
e.patientRegisterId = this.multipleSelection[i].id;
return e;
});
body = {
organizationUnitId: this.multipleSelection[i].organizationUnitId,
createRegisterAsbitemDtos,
};
try {
await postapi(
"/api/app/registerasbitem/createregisterasbitemincustomerorgmany",
body
);
} catch (error) {
console.log("批量增加项目错误,原因:", error);
}
this.elProgress.percentage = Math.floor(
((i + 1) * 100) / this.multipleSelection.length
);
}
} else {
// {
// isDeleteGroup: 'N',
// patientRegisterId: null,
// asbitemIds: [],
// }
let asbitemIds = [];
if (this.asbitemBatch.isDeleteGroup) {
body.isDeleteGroup = "Y";
} else {
body.isDeleteGroup = "N";
}
this.elProgress.display = true;
this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) {
this.asbitemBatch.asbitemsTemp.forEach((e) => {
asbitemIds.push(e.asbitemId);
});
body.patientRegisterId = this.multipleSelection[i].id;
body.asbitemIds = asbitemIds;
try {
await postapi(
"/api/app/registerasbitem/deleteregisterasbitemincustomerorgmany",
body
);
} catch (error) {
console.log("批量删除项目错误,原因:", error);
}
this.elProgress.percentage = Math.floor(
((i + 1) * 100) / this.multipleSelection.length
);
}
}
console.log("操作成功!");
this.dialogAsbitem = false;
this.Query();
this.dialogWin.PatientRegisterEditItemBatch = true;
},
//
async lisRequest(prId) {
let isPrintLisRequest = false;

12
src/main.js

@ -106,26 +106,24 @@ function onResize() {
}
onResize();
// 监听keydown:获取键盘按住事件,code返回按住的键信息 (为了省事放在全局,后续优化应考虑放至具体用到界面上)
// 监听keydown:获取键盘按住事件,code返回按住的键信息
window.addEventListener('keydown', code => {
console.log('keydown',code)
// console.log('keydown',code)
if (code.key == "Shift" && code.shiftKey) {
store.commit('setData', { key: 'window.shift', value: true });// 标记按住了shift键
}
if (code.key == "Control" && code.ctrlKey) {
store.commit('setData', { key: 'window.ctrl', value: true });// 标记按住了ctrl键
}
});
// // 监听keyup:获取键盘松开事件,code返回按住的键信息 (为了省事放在全局,后续优化应考虑放至具体用到界面上)
// // 监听keyup:获取键盘松开事件,code返回按住的键信息
window.addEventListener('keyup', code => {
console.log('keyup',code)
// console.log('keyup',code)
if (code.key == "Shift") {
store.commit('setData', { key: 'window.shift', value: false });// 标记松开了shift键
}
if (code.key == "Control") {
store.commit('setData', { key: 'window.ctrl', value: false });// 标记松开了ctrl键
}
}
});

27
src/store/index.js

@ -183,7 +183,7 @@ export default new Vuex.Store({
dataAsbitemOCX: [], //通用组合项目查询的数据
},
//公共字典数据 add by pengjun
//公共字典数据(量大的数据字典推荐用 indexedDB ) add by pengjun
dict: {
personOrgId: "00000000-0000-0000-0000-000000000000", //个人体检单位ID
organization: [], //体检中心
@ -245,7 +245,7 @@ export default new Vuex.Store({
diagnosisLevel: [], //诊断级别
},
//项目特有的对象数据
// 项目特有的对象数据 project private
projPriv: {
idNos: {
Code: "Success", //读取成功/失败
@ -262,17 +262,21 @@ export default new Vuex.Store({
}, //读取身份证信息
},
//多层数据传递时使用(统一归结在此,便于管理)
// 多层数据传递时使用(统一归结在此,便于管理)
dataTransOpts: {
//强制刷新(如触发数据刷新的ID值没有变化时,但也想强制刷新数据: S--single 单记录刷新,M--more 多记录刷新)
refresh: {
patient_register: { S: 0, M: 0 },
register_asbitem: { S: 0, M: 0 },
register_check: { S: 0, M: 0 },
register_check_item: { S: 0, M: 0 },
asbitem: { S: 0, M: 0 }, // 组合项目
customer_org_group: { S: 0, M: 0 }, // 单位分组
patient_register: { S: 0, M: 0 }, // 体检人员记录
register_asbitem: { S: 0, M: 0 }, // 体检人员登记的项目(合并前)
register_check: { S: 0, M: 0 }, // 体检人员登记的项目(合并后)
register_check_item: { S: 0, M: 0 }, // 体检人员登记的明细项目
},
//表当前数据(单条记录 S--single)
tableS: {
asbitem: { id: '' }, // 组合项目
customer_org_group: { id: '' }, // 单位分组
patient_register: { id: '' },
register_asbitem: { id: '' },
register_check: { id: '' },
@ -280,12 +284,21 @@ export default new Vuex.Store({
},
//表当前数据(多条记录 M--more)
tableM: {
asbitem: [], // 组合项目
customer_org_group: [], // 单位分组
patient_register: [],
register_asbitem: [],
register_check: [],
register_check_item: []
}
},
// 弹窗控制
dialogWin: {
PatientRegisterEditItemBatch: false, //批量调整项目
PatientRegisterEditGroupBatch: false, //批量调整分组
}
},
getters: {

Loading…
Cancel
Save