Browse Source

report

master
pengjun 2 years ago
parent
commit
01697660cf
  1. 45
      src/components/customerOrg/customerOrgRegister.vue
  2. 54
      src/components/customerOrg/customerOrgTree.vue
  3. 4
      src/components/patientRegister/PatientRegisterEdit.vue
  4. 4
      src/components/patientRegister/PatientRegisterList.vue
  5. 4
      src/components/report/PatientRegisterListNobtn.vue
  6. 68
      src/components/report/PatientRegisterQueryNobtn.vue
  7. 2
      src/router/index.js
  8. 5
      src/store/index.js
  9. 154
      src/views/checkStatus/Query.vue
  10. 233
      src/views/checkStatus/index.vue
  11. 449
      src/views/report/checkStatus.vue

45
src/components/customerOrg/customerOrgRegister.vue

@ -1,15 +1,8 @@
<template> <template>
<div :style="customerOrg.orgDetailStyle"> <div :style="customerOrg.orgDetailStyle">
<div :style="'width:'+(window.pageWidth - 200 - 120 - 90)+'px;'">
<el-table
:data="customerOrg.customerOrgRegisterList"
border
:height="customerOrg.orgDetailHeight"
size="small"
highlight-current-row
@row-click="rowClick"
ref="customerOrg.customerOrgRegisterList"
>
<div :style="'width:' + (window.pageWidth - 200 - 120 - 90) + 'px;'">
<el-table :data="customerOrg.customerOrgRegisterList" border :height="customerOrg.orgDetailHeight" size="small"
highlight-current-row @row-click="rowClick" ref="customerOrg.customerOrgRegisterList">
<el-table-column prop="medicalTimes" label="体检次数" /> <el-table-column prop="medicalTimes" label="体检次数" />
<el-table-column prop="beginTime" label="开始日期"> <el-table-column prop="beginTime" label="开始日期">
<template slot-scope="scope"> <template slot-scope="scope">
@ -33,16 +26,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="lastModifierName" label="修改者" /> <el-table-column prop="lastModifierName" label="修改者" />
<el-table-column
prop="lastModificationTime"
label="修改时间"
width="200"
>
<el-table-column prop="lastModificationTime" label="修改时间" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.lastModificationTime | dateFormat }} {{ scope.row.lastModificationTime | dateFormat }}
</template> </template>
</el-table-column> </el-table-column>
</el-table>
</el-table>
</div> </div>
<div style="margin-left: 10px; margin-top: 40px"> <div style="margin-left: 10px; margin-top: 40px">
<div style="margin-top: 10px"> <div style="margin-top: 10px">
@ -69,13 +58,13 @@ export default {
}; };
}, },
created() {},
created() { },
// //
mounted() {},
mounted() { },
computed: { computed: {
...mapState(["customerOrg","window"]),
...mapState(["customerOrg", "window"]),
}, },
methods: { methods: {
@ -115,15 +104,18 @@ export default {
// //
add() { add() {
//this.$message.success(" addTimes"); //this.$message.success(" addTimes");
if (!this.customerOrg.customerOrgId) {
alert("未选中单位");
let customerOrgId = this.customerOrg.customerOrgRegisterList[0].customerOrgId
if (!customerOrgId) {
alert("单位信息未保存!");
return; return;
} }
postapi( postapi(
`/api/app/customer-org-register/default/${this.customerOrg.customerOrgId}`
`/api/app/customer-org-register/default/${customerOrgId}`
).then((res) => { ).then((res) => {
this.getCustomerOrgRegisterList(this.customerOrg.customerOrgId);
this.$message.success("操作成功!");
if (res.Code != -1) {
this.getCustomerOrgRegisterList(customerOrgId);
this.$message.success("操作成功!");
}
}); });
}, },
edit() { edit() {
@ -141,7 +133,8 @@ export default {
.box { .box {
display: flex; display: flex;
} }
.btnClass{
width:110px;
.btnClass {
width: 110px;
} }
</style> </style>

54
src/components/customerOrg/customerOrgTree.vue

@ -1,8 +1,5 @@
<template> <template>
<el-tree
:data="customerOrg.customerOrgTree"
:props="customerOrg.treeprops"
@node-click="treeclick"/>
<el-tree :data="customerOrg.customerOrgTree" :props="customerOrg.treeprops" @node-click="treeclick" />
</template> </template>
<script> <script>
import { mapState, mapMutations } from "vuex"; import { mapState, mapMutations } from "vuex";
@ -15,10 +12,10 @@ export default {
}, },
//<el-tree :data="$store.state.customerOrg.customerOrgTree" :props="$store.state.customerOrg.treeprops" @node-click="treeclick"></el-tree> //<el-tree :data="$store.state.customerOrg.customerOrgTree" :props="$store.state.customerOrg.treeprops" @node-click="treeclick"></el-tree>
computed: { computed: {
...mapState(["customerOrg","window"]),
...mapState(["customerOrg", "window"]),
}, },
// //
created() {},
created() { },
// //
mounted() { mounted() {
@ -28,7 +25,7 @@ export default {
methods: { methods: {
...mapMutations(["setData"]), ...mapMutations(["setData"]),
// //
getCustomerOrgTree() { getCustomerOrgTree() {
//let customerOrgTree = [] //let customerOrgTree = []
@ -47,18 +44,20 @@ export default {
//console.log('getCustomerOrgTree start') //console.log('getCustomerOrgTree start')
// api/app/organization-units/organization-unit-by-is-peis // api/app/customer-org/by-code-all // api/app/organization-units/organization-unit-by-is-peis // api/app/customer-org/by-code-all
getapi("/api/app/customer-org/by-code-all").then((res) => { getapi("/api/app/customer-org/by-code-all").then((res) => {
//customerOrgTree = res.data;
console.log("res.data", res.data);
this.setData({ key: "customerOrg.customerOrgTree", value: res.data });
tcdate(this.customerOrg.customerOrgTree);
if(res.code != -1){
console.log("res.data", res.data);
this.setData({ key: "customerOrg.customerOrgTree", value: res.data });
tcdate(this.customerOrg.customerOrgTree);
}
}); });
}, },
// //
getCustomerOrgRd(id) { getCustomerOrgRd(id) {
getapi(`/api/app/customer-org/${id}`).then((res) => { getapi(`/api/app/customer-org/${id}`).then((res) => {
//console.log("res.data", res.data);
this.customerOrg.customerOrgRd = res.data;
if(res.code != -1){
this.customerOrg.customerOrgRd = res.data;
}
}); });
}, },
@ -67,8 +66,9 @@ export default {
getapi( getapi(
`/api/app/customer-org-register/in-customer-org-id/${customerOrgId}` `/api/app/customer-org-register/in-customer-org-id/${customerOrgId}`
).then((res) => { ).then((res) => {
//console.log('res.data',res.data)
this.customerOrg.customerOrgRegisterList = res.data;
if(res.code != -1){
this.customerOrg.customerOrgRegisterList = res.data;
}
}); });
}, },
@ -77,8 +77,9 @@ export default {
getapi( getapi(
`/api/app/contact-person/in-customer-org-id/${customerOrgId}` `/api/app/contact-person/in-customer-org-id/${customerOrgId}`
).then((res) => { ).then((res) => {
//console.log('res.data',res.data)
this.customerOrg.contactPersonList = res.data;
if(res.code != -1){
this.customerOrg.contactPersonList = res.data;
}
if (res.data.length > 0) { if (res.data.length > 0) {
this.getContactMethodList(res.data[0].id); this.getContactMethodList(res.data[0].id);
} else { } else {
@ -93,23 +94,26 @@ export default {
getapi("/api/app/contact-method/in-contact-person-id", { getapi("/api/app/contact-method/in-contact-person-id", {
ContactPersonId, ContactPersonId,
}).then((res) => { }).then((res) => {
//console.log('res.data',res.data)
this.customerOrg.contactMethodList = res.data;
if(res.code != -1){
this.customerOrg.contactMethodList = res.data;
}
}); });
}, },
// //
treeclick(data) { treeclick(data) {
//this.$message.success(data.id + " " + data.displayName);// api/app/customer-org/3a0c0439-a5ca-8a63-b2b9-e0eb24cb58b1 //this.$message.success(data.id + " " + data.displayName);// api/app/customer-org/3a0c0439-a5ca-8a63-b2b9-e0eb24cb58b1
this.customerOrg.customerOrgId = data.id;
console.log('data',data);
this.customerOrg.customerOrgId = data.id;
this.getCustomerOrgRd(data.id); this.getCustomerOrgRd(data.id);
this.getCustomerOrgRegisterList(data.id);
//
if(!data.parentId){
this.getCustomerOrgRegisterList(data.id);
}
this.getContactPersonList(data.id); this.getContactPersonList(data.id);
}, },
}, },
}; };
</script> </script>
<style scoped>
</style>
<style scoped></style>

4
src/components/patientRegister/PatientRegisterEdit.vue

@ -729,7 +729,7 @@ export default {
// //
//this.multipleSelection.forEach((item,index) =>{ //this.multipleSelection.forEach((item,index) =>{
getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
.then((res) => { .then((res) => {
if (res.code != -1) { if (res.code != -1) {
toOutShell.ReportTable = res.data; toOutShell.ReportTable = res.data;
@ -743,7 +743,7 @@ export default {
// }); // });
} else { } else {
getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
.then((res) => { .then((res) => {
if (res.code != -1) { if (res.code != -1) {
toOutShell.ReportTable = res.data; toOutShell.ReportTable = res.data;

4
src/components/patientRegister/PatientRegisterList.vue

@ -392,7 +392,7 @@ export default {
// //
//this.multipleSelection.forEach((item,index) =>{ //this.multipleSelection.forEach((item,index) =>{
getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}`)
postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}`)
.then((res) => { .then((res) => {
if (res.code != -1) { if (res.code != -1) {
toOutShell.ReportTable = res.data; toOutShell.ReportTable = res.data;
@ -406,7 +406,7 @@ export default {
// }); // });
} else { } else {
this.multipleSelection.forEach((item, index) => { this.multipleSelection.forEach((item, index) => {
getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${item.id}`)
postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${item.id}`)
.then((res) => { .then((res) => {
if (res.code != -1) { if (res.code != -1) {
toOutShell.ReportTable = res.data; toOutShell.ReportTable = res.data;

4
src/components/report/PatientRegisterListNobtn.vue

@ -229,7 +229,7 @@ export default {
// //
//this.multipleSelection.forEach((item,index) =>{ //this.multipleSelection.forEach((item,index) =>{
getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}`)
postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}`)
.then((res) => { .then((res) => {
if (res.code != -1) { if (res.code != -1) {
toOutShell.ReportTable = res.data; toOutShell.ReportTable = res.data;
@ -243,7 +243,7 @@ export default {
// }); // });
} else { } else {
this.multipleSelection.forEach((item, index) => { this.multipleSelection.forEach((item, index) => {
getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${item.id}`)
postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${item.id}`)
.then((res) => { .then((res) => {
if (res.code != -1) { if (res.code != -1) {
toOutShell.ReportTable = res.data; toOutShell.ReportTable = res.data;

68
src/components/report/PatientRegisterQueryNobtn.vue

@ -2,7 +2,20 @@
<div style="display: flex"> <div style="display: flex">
<div style="display: flex; flex-wrap: wrap; height:100px;"> <div style="display: flex; flex-wrap: wrap; height:100px;">
<div class="query"> <div class="query">
<el-select v-model="patientRegister.query.dateType" placeholder="请选择" filterable clearable size="small" style="width: 100px">
<span>体检单位/次数</span>
<el-cascader v-model="patientRegister.query.customerOrgId" :options="patientRegister.customerOrgTreeAll"
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" placeholder="请选择单位"
:show-all-levels="false" clearable size="small" @change="changeCustomerOrgId" style="width:180px;">
</el-cascader>
<el-select v-model="patientRegister.query.customerOrgRegister" placeholder="次数" style="width: 60px" size="small"
:disabled="patientRegister.query.customerOrgId == dict.personOrgId" @change="changeMedicalTimes" value-key="id">
<el-option v-for="item in customerOrg.customerOrgRegisterList" :key="item.id" :label="item.medicalTimes"
:value="item" />
</el-select>
</div>
<div class="query">
<el-select v-model="patientRegister.query.dateType" placeholder="请选择" filterable clearable size="small"
style="width: 100px">
<el-option label="登记日期" value="creationTime" /> <el-option label="登记日期" value="creationTime" />
<el-option label="体检日期" value="medicalStartDate" /> <el-option label="体检日期" value="medicalStartDate" />
<el-option label="总检日期" value="summaryDate" /> <el-option label="总检日期" value="summaryDate" />
@ -30,7 +43,7 @@
<div class="query"> <div class="query">
<span>性别</span> <span>性别</span>
<el-select v-model="patientRegister.query.sex" placeholder="请选择" style="width: 80px" size="small"> <el-select v-model="patientRegister.query.sex" placeholder="请选择" style="width: 80px" size="small">
<el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id"/>
<el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select> </el-select>
</div> </div>
<div class="query"> <div class="query">
@ -38,16 +51,6 @@
<el-input placeholder="身份证号" v-model="patientRegister.query.idCardNo" size="small" clearable <el-input placeholder="身份证号" v-model="patientRegister.query.idCardNo" size="small" clearable
style="width: 180px" /> style="width: 180px" />
</div> </div>
<div class="query">
<span>体检单位/次数</span>
<el-cascader v-model="patientRegister.query.customerOrgId" :options="patientRegister.customerOrgTreeAll"
:props="{checkStrictly: true,expandTrigger: 'hover',...customerOrg.treeprops,}" placeholder="请选择单位"
:show-all-levels="false" clearable size="small" @change="changeCustomerOrgId">
</el-cascader>
<el-select v-model="patientRegister.query.sex" placeholder="次数" style="width: 80px" size="small">
<el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id"/>
</el-select>
</div>
<div class="query"> <div class="query">
<span>状态</span> <span>状态</span>
<el-select v-model="patientRegister.query.completeFlag" placeholder="请选择" clearable style="width: 80px" <el-select v-model="patientRegister.query.completeFlag" placeholder="请选择" clearable style="width: 80px"
@ -56,12 +59,12 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import { mapState } from "vuex"; import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
export default { export default {
components: {}, components: {},
@ -114,10 +117,44 @@ export default {
}, },
methods: { methods: {
changeCustomerOrgId(v){
//
changeCustomerOrgId(v) {
console.log(v) console.log(v)
if (!v) {
this.patientRegister.query.customerOrgRegister = null;
return;
}
let customerOrgId = v[0];
if (customerOrgId == this.dict.personOrgId) {
this.patientRegister.query.customerOrgRegister = null;
return;
}
getapi(
`/api/app/customer-org-register/in-customer-org-id/${customerOrgId}`
).then((res) => {
//console.log('res.data',res.data)
if (res.code != -1) {
this.customerOrg.customerOrgRegisterList = res.data;
if (res.data.length > 0) {
this.patientRegister.query.customerOrgRegister = res.data[res.data.length - 1];
this.patientRegister.query.dateRange = [
res.data[res.data.length - 1].beginTime,
res.data[res.data.length - 1].isComplete == 'N' ? new Date() : res.data[res.data.length - 1].endTime
]
}
}
});
}, },
//
changeMedicalTimes(v){
this.patientRegister.query.customerOrgRegister = v;
this.patientRegister.query.dateRange = [
v.beginTime,
v.isComplete == 'N' ? new Date() : v.endTime
];
}
}, },
}; };
</script> </script>
@ -125,5 +162,4 @@ export default {
.query { .query {
margin-left: 10px; margin-left: 10px;
} }
</style> </style>

2
src/router/index.js

@ -288,7 +288,7 @@ const routes = [
{ {
path: "/checkStatus", path: "/checkStatus",
name: "组合项目检查状态", name: "组合项目检查状态",
component: () => import("../views/report/checkStatus.vue"),
component: () => import("../views/checkStatus/index.vue"),
}, },
{ {
path: "/chargeAsbitem", path: "/chargeAsbitem",

5
src/store/index.js

@ -29,7 +29,7 @@ export default new Vuex.Store({
}, //树形组件的数据结构 }, //树形组件的数据结构
customerOrgId: "", //当前单位ID(可根据此值是否为空,判断是新增还是编辑) customerOrgId: "", //当前单位ID(可根据此值是否为空,判断是新增还是编辑)
customerOrgRd: { id: "", isLock: "N", isActive: "Y", }, //单个体检单位记录值 customerOrgRd: { id: "", isLock: "N", isActive: "Y", }, //单个体检单位记录值
customerOrgRegisterList: [], //单位体检次数登记列表
customerOrgRegisterList: [{id:'uuid'}], //单位体检次数登记列表
contactPersonList: [], //联系人列表 contactPersonList: [], //联系人列表
contactMethodList: [], //联系方式列表 contactMethodList: [], //联系方式列表
orgEditStyle: '', //编辑表单样式 orgEditStyle: '', //编辑表单样式
@ -106,10 +106,13 @@ export default new Vuex.Store({
medicalPackageChange: 0, //控制体检列表记录切换时,0 无需触发更换套餐操作 medicalPackageChange: 0, //控制体检列表记录切换时,0 无需触发更换套餐操作
query: { query: {
dateType:'creationTime', //登记日期 dateType:'creationTime', //登记日期
dateRange:null, //日期范围
times: 0, //触发查询次数 times: 0, //触发查询次数
customerOrgId: "", //体检单位ID customerOrgId: "", //体检单位ID
CustomerOrgParentId: "", //单位父级ID CustomerOrgParentId: "", //单位父级ID
customerOrgFlag: true, //单位作为查询条件 customerOrgFlag: true, //单位作为查询条件
customerOrgRegister:{}, //单位体检次数
checkAsbs:null,
}, //查询条件 }, //查询条件
customerOrgGroup: [], //分组(针对单位) customerOrgGroup: [], //分组(针对单位)
patientRegisterAbs: [], //人员已选组合项目 patientRegisterAbs: [], //人员已选组合项目

154
src/views/checkStatus/Query.vue

@ -0,0 +1,154 @@
<template>
<div style="display: flex">
<div style="display: flex; flex-wrap: wrap; height:80px;">
<div class="query">
<span>体检单位/次数</span>
<el-cascader v-model="patientRegister.query.customerOrgId" :options="patientRegister.customerOrgTreeAll"
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" placeholder="请选择单位"
:show-all-levels="false" clearable size="small" @change="changeCustomerOrgId" style="width:180px;">
</el-cascader>
<el-select v-model="patientRegister.query.customerOrgRegister" placeholder="次数" style="width: 60px" size="small"
:disabled="patientRegister.query.customerOrgId == dict.personOrgId" @change="changeMedicalTimes" value-key="id">
<el-option v-for="item in customerOrg.customerOrgRegisterList" :key="item.id" :label="item.medicalTimes"
:value="item" />
</el-select>
</div>
<div class="query">
<el-select v-model="patientRegister.query.dateType" placeholder="请选择" filterable clearable size="small"
style="width: 100px">
<el-option label="登记日期" value="creationTime" />
<el-option label="体检日期" value="medicalStartDate" />
<el-option label="总检日期" value="summaryDate" />
</el-select>
<el-date-picker v-model="patientRegister.query.dateRange" type="daterange" align="right" unlink-panels
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" size="small"
style="width: 215px">
</el-date-picker>
</div>
<div class="query">
<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>
</div>
<div class="query">
<span>状态</span>
<el-select v-model="patientRegister.query.checkCompleteFlag" placeholder="请选择" clearable style="width: 80px"
size="small">
<el-option v-for="item in dict.checkCompleteFlag" :key="item.id" :label="item.displayName" :value="item.id">
</el-option>
</el-select>
</div>
<div class="query">
<el-button type="primary" class="btnClass" @click="btnQuery" size="small">查询</el-button>
</div>
</div>
</div>
</template>
<script>
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
export default {
components: {},
props: ["orgEnable"],
data() {
return {
dialogVisible: false,
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
};
},
created() { },
//
mounted() { },
computed: {
...mapState(["window", "dict", "patientRegister", "customerOrg"]),
},
methods: {
//
changeCustomerOrgId(v) {
console.log(v)
if (!v) {
this.patientRegister.query.customerOrgRegister = null;
return;
}
let customerOrgId = v[0];
if (customerOrgId == this.dict.personOrgId) {
this.patientRegister.query.customerOrgRegister = null;
return;
}
getapi(
`/api/app/customer-org-register/in-customer-org-id/${customerOrgId}`
).then((res) => {
//console.log('res.data',res.data)
if (res.code != -1) {
this.customerOrg.customerOrgRegisterList = res.data;
if (res.data.length > 0) {
this.patientRegister.query.customerOrgRegister = res.data[res.data.length - 1];
this.patientRegister.query.dateRange = [
res.data[res.data.length - 1].beginTime,
res.data[res.data.length - 1].isComplete == 'N' ? new Date() : res.data[res.data.length - 1].endTime
]
}
}
});
},
//
changeMedicalTimes(v){
this.patientRegister.query.customerOrgRegister = v;
this.patientRegister.query.dateRange = [
v.beginTime,
v.isComplete == 'N' ? new Date() : v.endTime
];
},
btnQuery(){
console.log('query',this.patientRegister.query);
this.patientRegister.query.times++;
}
},
};
</script>
<style scoped>
.query {
margin-left: 10px;
}
</style>

233
src/views/checkStatus/index.vue

@ -0,0 +1,233 @@
<template>
<div>
<el-card>
<div :style="'display: block; width:' + (window.pageWidth - 80) + 'px;'">
<div style="display: flex; flex-wrap: wrap; height:80px;">
<Query />
</div>
<el-table :data="dataList" border width="100%" :height="window.pageHeight < 600 ? 370 : window.pageHeight - 230"
row-key="id" size="small" highlight-current-row ref="dataList" @selection-change="handleSelectionChange"
@row-click="rowClick">
<el-table-column prop="cardTypeId" label="卡类别" width="100">
<template slot-scope="scope">
<div>{{ dddw(dict.cardType, "id", scope.row.cardTypeId, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="cardNo" label="会员卡号" width="150" />
<el-table-column prop="discount" label="折扣率" width="80" />
<el-table-column prop="expiryDate" label="有效期限" width="120">
<template slot-scope="scope">
<div v-if="scope.row.expiryDate">
{{ moment(scope.row.expiryDate).format("yyyy-MM-DD") }}
</div>
</template>
</el-table-column>
<el-table-column prop="customerName" label="卡主姓名" width="80" />
<el-table-column prop="idNo" label="卡主身份证号" width="200" />
<el-table-column prop="telephone" label="卡主电话" width="150" />
<el-table-column prop="mobileTelephone" label="卡主手机号" width="150" />
<el-table-column prop="cardFlag" label="启用" width="80">
<template slot-scope="scope">
<div>{{ scope.row.cardFlag == '0' ? '否' : '是' }}</div>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="200" />
<el-table-column prop="creatorId" label="创建人员" width="100" />
<el-table-column prop="creationTime" label="创建日期" width="150">
<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="lastModifierId" label="修改人员" width="100" />
<el-table-column prop="lastModificationTime" label="修改日期" width="150">
<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>
</div>
</el-card>
</div>
</template>
<script>
import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy, arrayReduce, arrayExistObj } from "@/utlis/proFunc";
import Query from './Query.vue'
export default {
components: {
Query,
},
data() {
return {
query: {
dateType:'createDate',
dateType:'createDate',
}, //
dataList: [], //
};
},
created() {
this.dictInit();
},
//
mounted() {
this.query();
},
computed: {
...mapState(["window", "dict","patientRegister"]),
},
methods: {
//
dictInit() {
//
getapi("/api/app/sex").then((res) => {
if (res.code == 1) {
this.dict.sex = res.data;
}
});
//
getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
(res) => {
if (res.code == 1) {
this.dict.organization = res.data;
}
}
);
//
getapi("/api/app/customer-org/by-code-all").then((res) => {
if (res.code == 1) {
this.patientRegister.customerOrgTreeAll = res.data;
tcdate(this.patientRegister.customerOrgTreeAll);
}
});
//
getapi("/api/app/medical-type/in-filter").then((res) => {
if (res.code == 1) {
this.dict.medicalType = res.data.items;
}
});
//
getapi("/api/app/personnel-type/in-filter").then((res) => {
if (res.code == 1) {
this.dict.personnelType = res.data.items;
}
});
//
getapi("/api/app/marital-statuses").then((res) => {
if (res.code == 1) {
this.dict.maritalStatus = res.data.items;
}
});
//
getapi("/api/app/sex-hormone-term/in-filter").then((res) => {
if (res.code == 1) {
this.dict.sexHormoneTerm = res.data.items;
}
});
//
getapi("/api/app/nation/in-filter").then((res) => {
if (res.code == 1) {
this.dict.nation = res.data.items;
}
});
//
getapi("/api/app/birth-place/in-filter").then((res) => {
if (res.code == 1) {
this.dict.birthPlace = res.data.items;
}
});
//
getapi("/api/app/medical-package/in-filter").then((res) => {
if (res.code == 1) {
this.dict.medicalPackage = res.data.items;
}
});
//
getapi("/api/app/customer-org-group").then((res) => {
if (res.code == 1) {
this.dict.customerOrgGroupAll = res.data.items;
}
});
//
getapi("/api/app/pay-mode").then((res) => {
if (res.code == 1) {
this.dict.payMode = res.data;
}
});
//
getapi("/api/app/item-type/by-code-all").then((res) => {
if (res.code == 1) {
this.dict.itemTypeTree = res.data;
tcdate(this.dict.itemTypeTree);
}
});
getapi("/api/app/asbitem/in-filter?Filter").then((res) => {
if (res.code == 1) {
this.dict.asbItemAll = res.data.items;
}
});
console.log("dict", this.dict);
},
query(){
},
},
//
watch: {
//
"patientRegister.query.times"(newVal, oldVal) {
if (newVal != oldVal) {
//alert('')
this.query();
}
},
},
};
</script>
<style scoped>
.query {
margin-left: 10px;
}
.listBtn {
margin-top: 20px;
}
.btnClass {
width: 110px;
text-align: center;
}
.btnClass {
width: 110px;
}
</style>

449
src/views/report/checkStatus.vue

@ -1,449 +0,0 @@
<template>
<div>
<el-card>
<div style="display: flex">
<div :style="'display: block; width:' + (window.pageWidth - 120 - 70) + 'px;'">
<div style="display: flex; flex-wrap: wrap; height:80px;">
<div class="query">
<el-select v-model="query.dateType" placeholder="请选择" filterable clearable size="small" style="width: 100px">
<el-option label="登记日期" value="createDate" />
<el-option label="有效日期" value="expiryDate" />
</el-select>
<el-date-picker v-model="query.dateRange" type="daterange" align="right" unlink-panels range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" size="small"
style="width: 240px">
</el-date-picker>
</div>
<div class="query">
<span>卡类别</span>
<el-select v-model="query.cardTypeId" placeholder="请选择" filterable clearable size="small" style="width: 100px">
<el-option v-for="item in dict.cardType" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</div>
<div class="query">
<span>卡号</span>
<el-input placeholder="卡号" v-model="query.cardNo" size="small" clearable style="width: 150px" />
</div>
<div class="query">
<span>卡主姓名</span>
<el-input placeholder="卡主姓名" v-model="query.customerName" size="small" clearable style="width: 100px" />
</div>
<div class="query">
<span>身份证号</span>
<el-input placeholder="身份证号" v-model="query.idNo" size="small" clearable style="width: 200px" />
</div>
<div class="query">
<span>手机号</span>
<el-input placeholder="手机号" v-model="query.mobileTelephone" size="small" clearable style="width: 150px" />
</div>
</div>
<el-table :data="dataList" border width="100%" :height="window.pageHeight < 600 ? 370 : window.pageHeight - 230"
row-key="id" size="small" highlight-current-row ref="dataList" @selection-change="handleSelectionChange"
@row-click="rowClick">
<el-table-column prop="cardTypeId" label="卡类别" width="100">
<template slot-scope="scope">
<div>{{ dddw(dict.cardType, "id", scope.row.cardTypeId, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="cardNo" label="会员卡号" width="150" />
<el-table-column prop="discount" label="折扣率" width="80" />
<el-table-column prop="expiryDate" label="有效期限" width="120">
<template slot-scope="scope">
<div v-if="scope.row.expiryDate">
{{ moment(scope.row.expiryDate).format("yyyy-MM-DD") }}
</div>
</template>
</el-table-column>
<el-table-column prop="customerName" label="卡主姓名" width="80" />
<el-table-column prop="idNo" label="卡主身份证号" width="200" />
<el-table-column prop="telephone" label="卡主电话" width="150" />
<el-table-column prop="mobileTelephone" label="卡主手机号" width="150" />
<el-table-column prop="cardFlag" label="启用" width="80">
<template slot-scope="scope">
<div>{{ scope.row.cardFlag == '0' ? '否' : '是' }}</div>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="200" />
<el-table-column prop="creatorId" label="创建人员" width="100" />
<el-table-column prop="creationTime" label="创建日期" width="150">
<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="lastModifierId" label="修改人员" width="100" />
<el-table-column prop="lastModificationTime" label="修改日期" width="150">
<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>
</div>
<div style=" margin-left: 10px;width:110px;">
<div class="listBtn">
<el-button class="btnClass" @click="btnQuery">查询</el-button>
</div>
<div class="listBtn">
<el-button type="success" class="btnClass" @click="add">新增</el-button>
</div>
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="edit">编辑</el-button>
</div>
<div class="listBtn">
<el-button type="danger" class="btnClass" @click="edit">删除</el-button>
</div>
</div>
</div>
</el-card>
<el-dialog :title="form.id ? '编辑' : '新增'" :visible.sync="dialogVisible" width="800px" :close-on-click-modal="false">
<el-form ref="form" :model="form" label-width="100px" :rules="rules" size="small">
<el-row>
<el-col :span="8">
<el-form-item label="卡类别" prop="cardTypeId">
<el-select v-model="form.cardTypeId" placeholder="请选择" filterable>
<el-option v-for="item in dict.cardType" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="会员卡号" prop="cardNo">
<el-input v-model="form.cardNo" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="折扣率" prop="discount">
<el-input type="number" v-model="form.discount" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="有效期限" prop="expiryDate">
<el-input type="date" v-model="form.expiryDate" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="卡主姓名" prop="customerName">
<el-input v-model="form.customerName" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="卡主身份证" prop="idNo">
<el-input v-model="form.idNo" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="卡主电话" prop="telephone">
<el-input type="tel" v-model="form.telephone" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="卡主手机号" prop="mobileTelephone">
<el-input type="tel" v-model="form.mobileTelephone" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="启用" prop="cardFlag">
<el-radio v-model="form.cardFlag" label="1"></el-radio>
<el-radio v-model="form.cardFlag" label="0"></el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="创建人员" label-width="80px">
<el-input v-model="form.creatorId" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建时间" label-width="80px">
<el-input :value="form.creationTime ? moment(form.creationTime).format('yyyy-MM-DD') : ''"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="修改人员" label-width="80px">
<el-input v-model="form.lastModifierId" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="修改时间" label-width="80px">
<el-input :value="form.lastModificationTime
? moment(form.lastModificationTime).format('yyyy-MM-DD') : ''" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="onSubmit('form')">确定</el-button>
<el-button @click="dialogVisible = false">关闭</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy, arrayReduce, arrayExistObj } from "@/utlis/proFunc";
export default {
components: {
},
data() {
return {
query: {
dateType:'createDate',
dateType:'createDate',
}, //
dataList: [], //
multipleSelection: [], //
dialogVisible: false,
form: {
id: null,
cardTypeId: null,
cardNo: '',
discount: 100,
expiryDate: null,
customerName: '',
idNo: '',
telephone: '',
mobileTelephone: '',
cardFlag: '0',
remark: '',
},
formInit: {},
rules: {
cardTypeId: [
{ required: true, message: "请填写卡类别", trigger: "blur" },
],
cardNo: [
{ required: true, message: "请填写卡号", trigger: "blur" },
],
discount: [
{ required: true, message: "请填写卡折扣", trigger: "blur" },
],
expiryDate: [
{ required: true, message: "请填写卡有效期", trigger: "blur" },
],
customerName: [
{ required: true, message: "请填写卡主姓名", trigger: "blur" },
],
idNo: [
{ required: true, message: "请填写卡主身份证", trigger: "blur" },
],
mobileTelephone: [
{ required: true, message: "请填写卡主身份证", trigger: "blur" },
],
cardFlag: [
{ required: true, message: "请填写卡启用状态", trigger: "blur" },
]
},
curChoosedRow: {}, //
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
};
},
created() {
this.formInit = { ...this.form };
},
//
mounted() { },
computed: {
...mapState(["window", "dict"]),
},
methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
dddw, moment,
handleSelectionChange(val) {
this.multipleSelection = val;
},
rowClick(row) {
this.curChoosedRow = row;
},
add() {
this.form = { ...this.formInit };
this.dialogVisible = true;
},
edit() {
if (!this.curChoosedRow.id) {
this.$message.warning("请先选择要操作的数据!");
return;
}
this.form = { ...this.curChoosedRow };
this.dialogVisible = true;
},
del() {
let lfind = -1;
if (!this.curChoosedRow.id) {
this.$message.warning("请先选择要操作的数据!");
return;
}
//
lfind = arrayExistObj(this.dataList, 'id', this.curChoosedRow.id);
if (lfind > - 1) this.dataList.splice(lfind, 1);
this.curChoosedRow.id = null;
},
//
signByPatientRegisterNo() {
let val = this.form.patientRegisterNo
console.log(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
getapi(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
.then((res) => {
if (res.code != -1) {
if (res.data) {
this.signCore([res.data.id])
this.form.patientRegisterNo = ''
}
}
});
},
//
onSubmit(formName) {
this.$refs[formName].validate((valid, fields) => {
if (!valid) {
//console.log('fields',fields,Object.keys(fields));
this.$message.error(fields[Object.keys(fields)[0]][0].message);
return;
}
//
if (this.form.id) {
} else {
//
}
});
},
//
btnQuery() {
let body = {}
console.log(`this.patientRegister.query`, this.patientRegister.query)
if (this.patientRegister.query.customerOrgFlag) {
if (this.patientRegister.query.CustomerOrgParentId) {
body.customerOrgId = this.patientRegister.query.CustomerOrgParentId
} else {
if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId
}
}
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.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag
//StartDate EndDate
if (this.patientRegister.query.dateRange) {
body.startDate = moment(new Date(this.patientRegister.query.dateRange[0])).format("yyyy-MM-DD")
body.endDate = moment(new Date(this.patientRegister.query.dateRange[1])).format("yyyy-MM-DD")
}
if (this.patientRegister.query.idCardNo) body = { idNo: this.patientRegister.query.idCardNo }
if (this.patientRegister.query.patientNo) body = { patientNo: this.patientRegister.query.patientNo }
if (this.patientRegister.query.patientRegisterNo) body = { patientRegisterNo: this.patientRegister.query.patientRegisterNo }
console.log('/api/app/patientregister/getlistinfilter', body)
postapi('/api/app/patientregister/getlistinfilter', body)
.then((res) => {
this.dataList = res.data;
});
},
},
//
watch: {
//
"patientRegister.query.times"(newVal, oldVal) {
if (newVal != oldVal) {
//alert('')
this.query();
}
},
},
};
</script>
<style scoped>
.query {
margin-left: 10px;
}
.listBtn {
margin-top: 20px;
}
.btnClass {
width: 110px;
text-align: center;
}
.btnClass {
width: 110px;
}
</style>
Loading…
Cancel
Save