pengjun 3 months ago
parent
commit
b7ff47cf54
  1. 9
      src/components/customerOrg/customerOrgTree.vue
  2. 50
      src/components/patientRegister/PatientRegisterList.vue
  3. 12
      src/components/patientRegister/customerOrgTreeAll.vue
  4. 9
      src/components/report/CusOrgOCX.vue
  5. 71
      src/components/report/PatientRegisterListNobtn.vue
  6. 23
      src/components/report/TurnoverReportS.vue
  7. 31
      src/utlis/tree.js

9
src/components/customerOrg/customerOrgTree.vue

@ -32,7 +32,7 @@
import { mapState, mapMutations } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { tcdate, deepCopy, reMadeOrgTree } from "../../utlis/proFunc";
import { getTreePids, getTreeNode } from "../../utlis/tree";
import { getTreePids, getTreeNode,filterTreeNode } from "../../utlis/tree";
import { setDBCom, getDBCom } from "../../utlis/indexedDB";
@ -186,9 +186,10 @@ export default {
filterParentNode(value) {
// console.log(value, data)
if (value){
let org = this.customerOrgTreeAll.filter(e => {
return e.label.indexOf(value) > -1 || e.simpleCode.indexOf(value.toUpperCase()) > -1
})
// let org = this.customerOrgTreeAll.filter(e => {
// return e.label.indexOf(value) > -1 || e.simpleCode.indexOf(value.toUpperCase()) > -1
// })
let org = filterTreeNode(this.customerOrgTreeAll,"treeChildren",['label','simpleCode'],[value,value.toUpperCase()])
this.customerOrgTreeSeo = org.slice(0,100)
}else{
this.customerOrgTreeSeo = this.customerOrgTreeAll.slice(0,100)

50
src/components/patientRegister/PatientRegisterList.vue

@ -711,6 +711,8 @@ export default {
routeUrlorPageName: "patientRegister", //
privs: [], //
},
patient_register_query_idno: 'Y', //
patient_register_query_name: 'N', //
peisid: null,
startPoint: -1, // -1
endPoint: -1, // -1
@ -1034,6 +1036,25 @@ export default {
this.qrCode.url = res.data || "https://ccjktj.cn:5081/";
}
});
// --
postapi("/api/app/SysParmValue/GetSysParmValueBySysParmId",
{ sysParmId: "patient_register_query_idno" }
).then((res) => {
if (res.code > -1) {
this.patient_register_query_idno = res.data || "Y";
}
});
// --
postapi("/api/app/SysParmValue/GetSysParmValueBySysParmId",
{ sysParmId: "patient_register_query_name" }
).then((res) => {
if (res.code > -1) {
this.patient_register_query_name = res.data || "N";
}
});
},
//
@ -1807,9 +1828,6 @@ export default {
if (this.patientRegister.query.sex)
body.sexId = this.patientRegister.query.sex;
if (this.patientRegister.query.patientName)
body.patientName = this.patientRegister.query.patientName;
if (
this.patientRegister.query.medicalTypeIds &&
this.patientRegister.query.medicalTypeIds.length > 0
@ -1855,26 +1873,28 @@ export default {
if (this.patientRegister.query.phone)
body.phone = this.patientRegister.query.phone;
//
if (this.patientRegister.query.patientName) {
body.patientName = this.patientRegister.query.patientName;
if(this.patient_register_query_name == 'Y'){
body = {
patientName: this.patientRegister.query.patientName,
skipCount: this.loadOpts.skipCount,
maxResultCount: this.loadOpts.maxResultCount,
};
}
}
//
if (this.patientRegister.query.idCardNo) {
body.idNo = this.patientRegister.query.idCardNo;
try {
let sysParmId = "patient_register_query_idno";
let sysParam = await postapi(
"/api/app/SysParmValue/GetSysParmValueBySysParmId",
{ sysParmId }
);
// console.log('sysParam', sysParam)
if (sysParam.data != "N") {
if(this.patient_register_query_idno == 'Y'){
body = {
idNo: this.patientRegister.query.idCardNo,
skipCount: this.loadOpts.skipCount,
maxResultCount: this.loadOpts.maxResultCount,
};
}
} catch (error) {
console.log(error);
}
}
if (this.patientRegister.query.patientNo)

12
src/components/patientRegister/customerOrgTreeAll.vue

@ -57,6 +57,7 @@
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { tcdate, deepCopy, reMadeOrgTree, arrayExistObj } from "../../utlis/proFunc";
import { filterTreeNode } from "../../utlis/tree";
import { setDBCom, getDBCom } from "../../utlis/indexedDB";
@ -341,16 +342,19 @@ export default {
// return data['displayName'].indexOf(value) > -1 || data['simpleCode'].indexOf(value.toUpperCase()) > -1 || data['shortName'].indexOf(value) > -1 || data['customerOrgCode'].indexOf(value) > -1;
let org = []
if (value) {
org = this.customerOrgTreeAll.filter(e => {
return e.label.indexOf(value) > -1 || e.simpleCode.indexOf(value.toUpperCase()) > -1
})
// org = this.customerOrgTreeAll.filter(e => {
// return e.label.indexOf(value) > -1 || e.simpleCode.indexOf(value.toUpperCase()) > -1
// })
org = filterTreeNode(this.customerOrgTreeAll,"treeChildren",['label','simpleCode'],[value,value.toUpperCase()])
this.customerOrgTreeSeo = org.slice(0, 100)
} else {
this.customerOrgTreeSeo = this.customerOrgTreeAll.slice(0, 100)
}
},
//
// label: "label", children: "treeChildren", simpleCode
// filterTree(treeData,ChildrenName,keys,value,type)
//
/*

9
src/components/report/CusOrgOCX.vue

@ -114,7 +114,7 @@ import moment from "moment";
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { arrayExistObj, deepCopy, reMadeOrgTree } from "../../utlis/proFunc";
import { getTreePids, getTreeAllChildIdsById } from "../../utlis/tree";
import { getTreePids, getTreeAllChildIdsById,filterTreeNode } from "../../utlis/tree";
import { setDBCom, getDBCom } from "../../utlis/indexedDB";
export default {
@ -203,9 +203,10 @@ export default {
// return data['displayName'].indexOf(value) > -1 || data['simpleCode'].indexOf(value.toUpperCase()) > -1 || data['shortName'].indexOf(value) > -1 || data['customerOrgCode'].indexOf(value) > -1;
//console.log(this.patientRegister.customerOrgs)
if(value){
let org = this.customerOrgTreeAll.filter(e => {
return e.label.indexOf(value) > -1 || e.simpleCode.indexOf(value.toUpperCase()) > -1
})
// let org = this.customerOrgTreeAll.filter(e => {
// return e.label.indexOf(value) > -1 || e.simpleCode.indexOf(value.toUpperCase()) > -1
// })
let org = filterTreeNode(this.customerOrgTreeAll,"treeChildren",['label','simpleCode'],[value,value.toUpperCase()])
this.customerOrgTreeSeo = org.slice(0,100)
}else{
this.customerOrgTreeSeo = this.customerOrgTreeAll.slice(0,100)

71
src/components/report/PatientRegisterListNobtn.vue

@ -3,7 +3,9 @@
<div @contextmenu.prevent="onContextmenu">
<u-table :data="patientRegister.prList" border ref="info" id="info"
:height="(window.pageHeight < 600) ? 230 : (window.pageHeight - 370)" highlight-current-row
@row-click="rowClick" size="small" row-key="patientRegisterId" @selection-change="handleSelectionChange" @row-contextmenu="rowContextmenu" @table-body-scroll="scrollFull" use-virtual :row-height="35" big-data-checkbox :data-changes-scroll-top="false">
@row-click="rowClick" size="small" row-key="patientRegisterId" @selection-change="handleSelectionChange"
@row-contextmenu="rowContextmenu" @table-body-scroll="scrollFull" use-virtual :row-height="35" big-data-checkbox
:data-changes-scroll-top="false">
<u-table-column :type="dragCol[0].type" width="40" align="center" />
<!--列可拖拽 key值很关键 -->
<u-table-column v-for="(item, index) in dragCol" v-if="index != 0" :key="`${item.label + index}`"
@ -79,7 +81,8 @@ export default {
props: ['fromType'],
data() {
return {
patient_register_query_idno: 'Y', //
patient_register_query_name: 'N', //
dialogVisible: false,
dialogCamera: false,
dialogGuide: false,
@ -182,6 +185,24 @@ export default {
}
})
// --
postapi("/api/app/SysParmValue/GetSysParmValueBySysParmId",
{ sysParmId: "patient_register_query_idno" }
).then((res) => {
if (res.code > -1) {
this.patient_register_query_idno = res.data || "Y";
}
});
// --
postapi("/api/app/SysParmValue/GetSysParmValueBySysParmId",
{ sysParmId: "patient_register_query_name" }
).then((res) => {
if (res.code > -1) {
this.patient_register_query_name = res.data || "N";
}
});
},
//
@ -508,11 +529,8 @@ export default {
})
}
body.customerOrgs = customerOrgs
if (this.patientRegister.query.patientRegisterNo) body.patientRegisterNo = this.patientRegister.query.patientRegisterNo
if (this.patientRegister.query.patientNo) body.patientNo = this.patientRegister.query.patientNo
if (this.patientRegister.query.patientName) body.patientName = this.patientRegister.query.patientName
if (this.patientRegister.query.idCardNo) body.idNo = this.patientRegister.query.idCardNo
if (this.patientRegister.query.phone) body.phone = this.patientRegister.query.phone
if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag
if (this.patientRegister.query.isAudit) body.isAudit = this.patientRegister.query.isAudit
@ -522,6 +540,46 @@ export default {
if (this.patientRegister.query.personnelTypeId) body.personnelTypeId = this.patientRegister.query.personnelTypeId
if (this.patientRegister.query.medicalConclusionId && this.patientRegister.query.medicalConclusionId.length > 0) body.medicalConclusionIds = this.patientRegister.query.medicalConclusionId
//
if (this.patientRegister.query.patientName) {
body.patientName = this.patientRegister.query.patientName
if (this.patient_register_query_name == 'Y') {
body = {
patientName: this.patientRegister.query.patientName,
skipCount: this.loadOpts.skipCount,
maxResultCount: this.loadOpts.maxResultCount
}
}
}
//
if (this.patientRegister.query.idCardNo) {
body.idNo = this.patientRegister.query.idCardNo
if (this.patient_register_query_idno == 'Y') {
body = {
idNo: this.patientRegister.query.idCardNo,
skipCount: this.loadOpts.skipCount,
maxResultCount: this.loadOpts.maxResultCount
}
}
}
//
if (this.patientRegister.query.patientNo) {
body = {
patientNo: this.patientRegister.query.patientNo,
skipCount: this.loadOpts.skipCount,
maxResultCount: this.loadOpts.maxResultCount
}
}
//
if (this.patientRegister.query.patientRegisterNo) {
body = {
patientRegisterNo: this.patientRegister.query.patientRegisterNo,
skipCount: this.loadOpts.skipCount,
maxResultCount: this.loadOpts.maxResultCount
}
}
//console.log('/api/app/peisreport/getpatientregisterreport',body)
// /api/app/PeisReport/GetPatientRegisterReportWithCharge
// /api/app/patientregister/getlistinfilter
@ -609,6 +667,7 @@ export default {
</script>
<style scoped>
@import "../../assets/css/global_table.css";
.box {
display: flex;
}

23
src/components/report/TurnoverReportS.vue

@ -37,7 +37,10 @@
</div>
<div class="query">
<span class="spanClass">业务员</span>
<el-input v-model="salesmans" placeholder="请输入业务员姓名" size="small" style="width: 150px; margin-left: 10px" />
<el-select v-model="query.salesmans" placeholder="请输入业务员姓名"
default-first-option clearable filterable style="margin-left: 10px" size="small" multiple collapse-tags>
<el-option v-for="item in dictSalesman" :key="item.id" :label="item.surname" :value="item.surname" />
</el-select>
</div>
<div class="query">
<span class="spanClass">是否包含预登记</span>
@ -90,6 +93,7 @@ export default {
customerOrg: [],
customerOrgAll: [],
medicalType: [],
dictSalesman: [],
query: {
dateType: "1",
startDate: "",
@ -99,7 +103,7 @@ export default {
// isMedicalTypeId: 'Y',
isPreRegistration: "N",
},
salesmans: "",
tableData: [],
pickerOptions: {
@ -165,13 +169,13 @@ export default {
// }
// });
//
getapi("/api/app/medical-type/in-filter").then((res) => {
// {
postapi('/api/identity/users/GetUserListBySaleRole')
.then(res => {
if (res.code > -1) {
this.dict.medicalType = res.data;
this.medicalType = res.data;
this.dictSalesman = res.data
}
});
})
},
//
@ -201,10 +205,7 @@ export default {
//
btnQuery() {
this.query.salesmans = [];
if (this.salesmans.replace(/\s+/g, '') != '') {
this.query.salesmans.push(this.salesmans.replace(/\s+/g, ''));
}
postapi(
"/api/app/CustomerReport/GetSalesPersonPhysicalExaminationStatistics",
this.query

31
src/utlis/tree.js

@ -1,5 +1,7 @@
//树对象相关操作 目前只支持单主键操作
const { deepCopy } = require("./proFunc");
//将list数据,生成tree
// dataSource:列表数据资源
// childNodeName:子节点名称
@ -109,10 +111,35 @@ function madeTree(dataSource, childNodeName, pidName, idName, pidVal) {
return treeNode;
}
// 根节点找到,则包含子级点, 子节点找到,则只包含上级节点
function filterTreeNode(treeData, childNodeName, keys, vals) {
let newTree = []
let find = false
if (Array.isArray(treeData) && treeData.length > 0) {
treeData.forEach(e => {
find = false
keys.forEach((key, i) => {
if (e[key].indexOf(vals[i]) > -1) find = true
});
// 当前级找到
if (find) {
newTree.push(e)
} else {
let childTree = filterTreeNode(e[childNodeName], childNodeName, keys, vals)
if (childTree.length > 0) {
let temp = deepCopy(e)
temp[childNodeName] = childTree
newTree.push(temp)
}
}
});
}
return newTree
}
module.exports = {
madeTree,
getTreePids, getTreeAllChildIdsByNode,getTreeAllChildIdsById, getTreeNode,
getTreePids, getTreeAllChildIdsByNode, getTreeAllChildIdsById, getTreeNode,filterTreeNode,
}
Loading…
Cancel
Save