pengjun 2 weeks ago
parent
commit
29793532e9
  1. 57
      src/views/customerOrg/customerOrgGroup.vue
  2. 164
      src/views/customerReport/unitStatistics.vue

57
src/views/customerOrg/customerOrgGroup.vue

@ -10,9 +10,9 @@
<div style="display: flex">
<div>
<span>体检单位</span>
<el-select v-model="customerOrgId" placeholder="请选择体检单位" :filter-method="filterMethod" default-first-option
clearable filterable @clear="customerOrg = deepCopy(customerOrgAll)" style="margin-left: 10px"
@change="changeCustomerOrg" size="small">
<el-select v-model="customerOrgId" placeholder="请选择体检单位" :filter-method="filterMethod"
default-first-option clearable filterable @clear="customerOrg = deepCopy(customerOrgAll)"
style="margin-left: 10px" @change="changeCustomerOrg" size="small">
<el-option v-for="item in customerOrg" :key="item.id" :label="item.displayName" :value="item.id">
{{ item.displayName }}
</el-option>
@ -104,13 +104,9 @@
<!--分组项目信息 -->
<div>
<CustomerOrgGroupAsbitem
:customerOrgGroup="curCustomerOrgGroup"
:curOrgGroups="customerOrgGroups"
:customerOrgAll="customerOrgAll"
:curOrgRegister="customerOrgRegister"
:curOrgRegisterList="customerOrgRegisterList"
:refreshMoney="refreshMoney" />
<CustomerOrgGroupAsbitem :customerOrgGroup="curCustomerOrgGroup" :curOrgGroups="customerOrgGroups"
:customerOrgAll="customerOrgAll" :curOrgRegister="customerOrgRegister"
:curOrgRegisterList="customerOrgRegisterList" :refreshMoney="refreshMoney" />
</div>
</div>
@ -139,6 +135,7 @@ import {
import CustomerOrgGroupAsbitem from "../../components/customerOrg/customerOrgGroupAsbitem.vue";
import CustomerOrgGroupEdit from "./CustomerOrgGroupEdit.vue";
import { setDBCom, getDBCom } from "../../utlis/indexedDB";
export default {
components: {
@ -150,7 +147,7 @@ export default {
routeUrlorPageName: "customerOrgGroup", //
privs: [], //
},
customerOrgAll:[], //
customerOrgAll: [], //
customerOrg: [], //
customerOrgGroups: [], //
customerOrgId: "", //id
@ -382,17 +379,37 @@ export default {
}
},
//
getOrg1() {
getDBCom('orgDatas1')
.then(localData => {
let now = Date.now()
// 24 = 86400000
if (localData?.createdat && now - 43200000 < localData.createdat) {
this.customerOrgAll = localData.data
}
// console.log('this.orgDatas.length',this.orgDatas.length)
if (this.customerOrgAll.length > 0) {
this.customerOrg = deepCopy(this.customerOrgAll)
} else {
postapi("/api/app/CustomerOrg/GetParentCustomerOrgSimple",{isPerson:'N'}).then((res) => {
if (res.code != -1) {
this.customerOrgAll = res.data;
// let lfind = arrayExistObj(this.customerOrgAll, "id", this.dict.personOrgId);
// if (lfind > -1) this.customerOrgAll.splice(lfind, 1);
this.customerOrg = deepCopy(this.customerOrgAll);
setDBCom('orgDatas1', this.customerOrgAll) //
}
});
}
})
},
//
dictInit() {
//
getapi("/api/app/customer-org/parent-all").then((res) => {
if (res.code != -1) {
this.customerOrgAll = res.data;
let lfind = arrayExistObj(this.customerOrgAll, "id", this.dict.personOrgId);
if (lfind > -1) this.customerOrgAll.splice(lfind, 1);
this.customerOrg = deepCopy(this.customerOrgAll);
}
});
this.getOrg1()
//
getapi("/api/app/for-sex").then((res) => {

164
src/views/customerReport/unitStatistics.vue

@ -4,12 +4,11 @@
<div class="middlebox">
<div class="contenttitle">
客户报表 /
<span class="contenttitleBold">单位体检统计</span>
<span class="contenttitleBold">单位费用汇总</span>
</div>
</div>
<div :style="'display: block;'">
<div
style="
<div style="
background-color: #fff;
padding: 15px;
border-radius: 8px;
@ -18,103 +17,56 @@
margin-bottom: 10px;
height: 35px;
margin-top: 7px;
"
>
">
<div class="query">
<span>体检单位</span>
<el-cascader
v-model="customerOrgIds"
@change="onchange"
placeholder="请选择单位"
:options="patientRegister.customerOrgTreeAll"
<el-cascader v-model="customerOrgIds" @change="onchange" placeholder="请选择单位" :options="customerOrgTreeAll"
:props="{
value: 'id',
label: 'displayName',
children: 'treeChildren',
expandTrigger: 'hover',
multiple: true,
emitPath:false,
checkStrictly:true
}"
filterable
size="small"
collapse-tags
></el-cascader>
value: 'id',
label: 'displayName',
children: 'treeChildren',
expandTrigger: 'hover',
multiple: true,
emitPath: false,
checkStrictly: true
}" filterable size="small" collapse-tags></el-cascader>
</div>
<div class="query">
<span>开始日期</span>
<el-date-picker
type="date"
placeholder="选择开始日期"
size="small"
v-model="startDate"
value-format="yyyy-MM-dd"
editable
style="width: 177px;"
>
<el-date-picker type="date" placeholder="选择开始日期" size="small" v-model="startDate" value-format="yyyy-MM-dd"
editable style="width: 177px;">
</el-date-picker>
</div>
<div class="query">
<span>结束日期</span>
<el-date-picker
type="date"
placeholder="选择结束日期"
size="small"
v-model="endDate"
value-format="yyyy-MM-dd"
editable
style="width: 177px;"
>
<el-date-picker type="date" placeholder="选择结束日期" size="small" v-model="endDate" value-format="yyyy-MM-dd"
editable style="width: 177px;">
</el-date-picker>
</div>
<div class="query">
<el-button @click="btnQuery" size="small" class="commonbutton"
>查询</el-button
>
<el-button @click="btnQuery" size="small" class="commonbutton">查询</el-button>
</div>
<div class="query">
<el-button @click="handleExport" size="small" class="commonbutton"
>导出excel</el-button
>
<el-button @click="handleExport" size="small" class="commonbutton">导出excel</el-button>
</div>
<div class="query">
<el-button @click="onPrint" size="small" class="commonbutton"
>打印</el-button
>
<el-button @click="onPrint" size="small" class="commonbutton">打印</el-button>
</div>
</div>
<div
ref="imageDom"
style="background-color: #fff; padding: 15px; border-radius: 8px"
>
<el-table
:data="dataList"
border
width="45%"
:height="
flag
? window.pageHeight < 600
? 415
: window.pageHeight - 185 - 20
: ''
"
row-key="id"
highlight-current-row
ref="dataList"
:row-class-name="tableRowClassName"
id="table"
show-summary
:summary-method="getSummaries"
>
<div ref="imageDom" style="background-color: #fff; padding: 15px; border-radius: 8px">
<el-table :data="dataList" border width="45%" :height="flag
? window.pageHeight < 600
? 415
: window.pageHeight - 185 - 20
: ''
" row-key="id" highlight-current-row ref="dataList" :row-class-name="tableRowClassName" id="table"
show-summary :summary-method="getSummaries">
<el-table-column prop="customerOrgName" label="单位" />
<el-table-column prop="medicalStartDate" label="体检开始日期" />
<el-table-column prop="registerCount" label="登记人数" />
<el-table-column prop="checkCount" label="实检人数" />
<el-table-column prop="registerStandardAmount" label="登记总金额" />
<el-table-column
prop="registerChargeAmount"
label="登记折后总金额"
/>
<el-table-column prop="registerChargeAmount" label="登记折后总金额" />
<el-table-column prop="checkStandardAmount" label="实检总金额" />
<el-table-column prop="checkChargeAmount" label="实检折后总金额" />
<el-table-column prop="checkItemStandardAmount" label="实检项目金额" />
@ -139,6 +91,7 @@ import {
import { exportToExcel } from "../../utlis/Export2Excel";
import html2canvas from "html2canvas";
import printJs from "print-js";
import { setDBCom, getDBCom } from "../../utlis/indexedDB";
export default {
data() {
@ -147,7 +100,8 @@ export default {
startDate: "",
endDate: "",
customerOrgIds: [],
flag: true
flag: true,
customerOrgTreeAll: [],
};
},
@ -161,22 +115,41 @@ export default {
},
computed: {
...mapState(["window", "dict", "patientRegister", "report"]),
...mapState(["window", "dict", "report"]),
},
methods: {
moment,
dddw,
//
getCustomerOrgTree() {
getDBCom('orgDatasQuery')
.then(localData => {
let now = Date.now()
// 24 = 86400000
if (localData?.createdat && now - 43200000 < localData.createdat) {
this.customerOrgTreeAll = localData.data;
tcdate(this.customerOrgTreeAll);
} else {
//
getapi("/api/app/customerorg/getbycodeall").then((res) => {
if (res.code == 1) {
this.customerOrgTreeAll = res.data;
tcdate(this.customerOrgTreeAll);
//this.customerOrgTreeAll = reMadeOrgTree(deepCopy(res.data));
setDBCom('orgDatasQuery', res.data)
}
});
}
})
},
//
dictInit() {
//
getapi("/api/app/customerorg/getbycodeall").then((res) => {
if (res.code == 1) {
this.patientRegister.customerOrgTreeAll = res.data;
tcdate(this.patientRegister.customerOrgTreeAll);
}
});
console.log("patientRegister", this.patientRegister);
this.getCustomerOrgTree()
},
onchange(v) {
console.log(v)
@ -218,7 +191,7 @@ export default {
},
//
btnQuery() {
let that = this;
let that = this;
if (this.startDate == "") {
return this.$message({
message: "请先选择开始日期",
@ -232,11 +205,11 @@ export default {
});
}
postapi(
"/api/app/CustomerReport/GetSummaryOfUnitCostsReport",{
customerOrgIds:that.customerOrgIds,
startDate:that.startDate,
endDate:that.endDate
}).then((res) => {
"/api/app/CustomerReport/GetSummaryOfUnitCostsReport", {
customerOrgIds: that.customerOrgIds,
startDate: that.startDate,
endDate: that.endDate
}).then((res) => {
if (res.code != -1) {
that.dataList = res.data;
that.$nextTick(() => {
@ -295,6 +268,7 @@ export default {
@import "../../assets/css/global_form.css";
@import "../../assets/css/global_input.css";
@import "../../assets/css/global.css";
.query {
margin-right: 10px;
display: flex;
@ -305,10 +279,12 @@ export default {
font-size: 400;
font-family: "NotoSansSC-Regular";
}
.box {
display: flex;
flex-direction: column;
}
::v-deep .el-input__inner {
/*text-align: center;*/
padding-left: 5px;
@ -328,10 +304,12 @@ export default {
::v-deep .el-icon-search:before {
color: #00f;
}
.query:last-child {
margin-right: 0;
}
::v-deep .el-cascader__search-input{
margin: 0 0 0 5px;
::v-deep .el-cascader__search-input {
margin: 0 0 0 5px;
}
</style>
Loading…
Cancel
Save