pengjun 3 months ago
parent
commit
60183b5e6e
  1. 4
      public/sysConfig.json
  2. 1
      src/components/patientRegister/PatientRegisterList.vue
  3. 30
      src/components/report/TurnoverReport.vue
  4. 308
      src/components/report/TurnoverReportDetails.vue

4
public/sysConfig.json

@ -1,7 +1,7 @@
{
"apiurl": "http://192.168.0.188:9530",
"apiurl": "http://192.168.0.188:9527",
"softName": "神豚体检管理系统",
"pacsApi": "http://192.168.0.188:9530",
"pacsApi": "http://192.168.0.188:9527",
"dcmViewers": "https://app.mzaktj.com:4436",
"pacsApiHttps": "https://app.mzaktj.com:8042",
"dict":{

1
src/components/patientRegister/PatientRegisterList.vue

@ -2008,6 +2008,7 @@ export default {
//
async scrollFull(scroll, event) {
if (!scroll.judgeFlse) return;
//

30
src/components/report/TurnoverReport.vue

@ -27,7 +27,8 @@
<div class="query">
<span class="spanClass">体检单位</span>
<el-select v-model="query.customerOrgIds" placeholder="请选择体检单位" :filter-method="filterMethod"
default-first-option clearable filterable style="margin-left: 10px;width:300px;" size="small" multiple collapse-tags>
default-first-option clearable filterable style="margin-left: 10px;width:300px;" size="small" multiple
collapse-tags>
<el-option v-for="item in customerOrg" :key="item.id" :label="item.displayName" :value="item.id">
{{ item.displayName }}
</el-option>
@ -50,7 +51,8 @@
<div class="query">
<span class="spanClass">体检类别</span>
<el-select v-model="query.medicalTypeIds" placeholder="请选择体检类别" :filter-method="filterMethod"
default-first-option clearable filterable style="margin-left: 10px;width:200px;" size="small" multiple collapse-tags>
default-first-option clearable filterable style="margin-left: 10px;width:200px;" size="small" multiple
collapse-tags>
<el-option v-for="item in medicalType" :key="item.id" :label="item.displayName" :value="item.id">
{{ item.displayName }}
</el-option>
@ -59,24 +61,29 @@
<div class="query">
<span class="spanClass">人员类别</span>
<el-select v-model="query.personnelTypeIds" placeholder="请选择人员类别" :filter-method="filterMethod"
default-first-option clearable filterable style="margin-left: 10px;width:200px;" size="small" multiple collapse-tags>
default-first-option clearable filterable style="margin-left: 10px;width:200px;" size="small" multiple
collapse-tags>
<el-option v-for="item in personnelType" :key="item.id" :label="item.displayName" :value="item.id">
{{ item.displayName }}
</el-option>
</el-select>
</div>
<div class="query">
<span class="spanClass">业务员</span>
<el-select v-model="query.salesmans" placeholder="请输入业务员姓名"
default-first-option clearable filterable style="margin-left: 10px" size="small" multiple collapse-tags>
<span class="spanClass">业务员</span>
<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>
</div>
<div style="display: flex;">
<el-button type="primary" class="commonbutton" @click="btnQuery" size="small">查询</el-button>
<el-button class="commonbutton" @click="btnExport('tableData')" size="small">导出</el-button>
<div style="display: block;width: 110px;">
<div>
<el-button type="primary" class="commonbutton" @click="btnQuery" size="small">查询</el-button>
</div>
<div style="margin-top: 5px;">
<el-button class="commonbutton" @click="btnExport('tableData')" size="small">导出</el-button>
</div>
</div>
</div>
<div id="tableData">
@ -90,7 +97,8 @@
'--' + scope.row.departmentName : '') : scope.row.customerOrgName }}</div>
</template>
</el-table-column>
<el-table-column v-if="query.isCustomerOrgRegister == 'Y' ? true:false" prop="medicalTimes" label="单位次数" min-width="80" align="center" />
<el-table-column v-if="query.isCustomerOrgRegister == 'Y' ? true : false" prop="medicalTimes" label="单位次数"
min-width="80" align="center" />
<el-table-column prop="registerCount" label="登记人数" min-width="80" align="center" />
<el-table-column prop="startMedical" label="检查人数" min-width="80" align="center" />
<el-table-column prop="checkCount" label="总检人数" min-width="80" align="center" />
@ -140,7 +148,7 @@ export default {
// isMedicalTypeId: 'Y',
isPreRegistration: 'N',
isChild: 'Y',
isCustomerOrgRegister:'N', //
isCustomerOrgRegister: 'N', //
},
tableData: [],

308
src/components/report/TurnoverReportDetails.vue

@ -15,12 +15,7 @@
margin-bottom: 10px;
">
<div style="display: block">
<div style="
display: flex;
flex-wrap: wrap;
height: 32px;
align-items: center;
">
<div style="display: flex;flex-wrap: wrap;height: 32px;align-items: center;">
<div class="query">
<el-select v-model="query.dateType" placeholder="请选择" style="width: 80px" size="small">
<el-option label="登记日期" :value="'1'" />
@ -38,16 +33,24 @@
<div class="query">
<span class="spanClass">体检单位</span>
<el-select v-model="query.customerOrgIds" placeholder="请选择体检单位" :filter-method="filterMethod"
default-first-option clearable filterable style="margin-left: 10px;width: 300px;" size="small" multiple collapse-tags>
default-first-option clearable filterable style="margin-left: 10px;width: 300px;" size="small" multiple
collapse-tags>
<el-option v-for="item in customerOrg" :key="item.id" :label="item.displayName" :value="item.id">
{{ item.displayName }}
</el-option>
</el-select>
</div>
<div class="query">
<span class="spanClass">含预登记</span>
<el-checkbox v-model="query.isPreRegistration" true-label="Y" false-label="N" />
</div>
</div>
<div style="display: flex;flex-wrap: wrap;margin-top: 2px; height: 32px;align-items: center;">
<div class="query">
<span class="spanClass">体检类别</span>
<el-select v-model="query.medicalTypeIds" placeholder="请选择体检类别" :filter-method="filterMethodM"
default-first-option clearable filterable style="margin-left: 10px" size="small" multiple collapse-tags>
default-first-option clearable filterable style="margin-left: 10px;width: 200px;" size="small" multiple
collapse-tags>
<el-option v-for="item in medicalType" :key="item.id" :label="item.displayName" :value="item.id">
{{ item.displayName }}
</el-option>
@ -56,7 +59,8 @@
<div class="query">
<span class="spanClass">人员类别</span>
<el-select v-model="query.personnelTypeIds" placeholder="请选择人员类别" :filter-method="filterMethodP"
default-first-option clearable filterable style="margin-left: 10px" size="small" multiple collapse-tags>
default-first-option clearable filterable style="margin-left: 10px;width: 200px;" size="small" multiple
collapse-tags>
<el-option v-for="item in personnelType" :key="item.id" :label="item.displayName" :value="item.id">
{{ item.displayName }}
</el-option>
@ -64,7 +68,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>
@ -82,33 +89,81 @@
</div>
</div>
<div id="tableData">
<el-table :data="tableData" border :height="window.pageHeight - 195" highlight-current-row size="small"
row-key="id" :summary-method="getSummaries" show-summary ref="refTable">
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="salesman" label="业务员" min-width="80" align="center" />
<el-table-column prop="registerCount" label="登记人数" min-width="80" align="center" />
<el-table-column prop="startMedical" label="检查人数" min-width="80" align="center" />
<el-table-column prop="checkCount" label="总检人数" min-width="80" align="center" />
<el-table-column prop="avgStandardPrice" label="标准平均单价" min-width="100" align="center" />
<el-table-column prop="avgChargePrice" label="应收平均单价" min-width="100" align="center" />
<el-table-column prop="sumStandardPrice" label="标准金额" min-width="100" align="center" />
<el-table-column prop="sumChargePrice" label="应收金额" min-width="100" align="center" />
<el-table-column prop="sumReceivedPrice" label="实收金额" min-width="100" align="center" />
</el-table>
<u-table :data="tableData" border :height="window.pageHeight - 220" highlight-current-row size="small"
row-key="id" ref="refTable" id="refTable" :row-height="28" use-virtual @table-body-scroll="scrollQuery" :data-changes-scroll-top="false">
<u-table-column type="index" label="序号" width="50" align="center" />
<u-table-column prop="medicalStartDate" label="体检日期" min-width="100" align="center" sortable />
<u-table-column prop="customerOrgName" label="单位" min-width="180" align="center" sortable />
<u-table-column prop="deptName" label="部门" min-width="120" align="center" sortable />
<u-table-column prop="patientName" label="姓名" min-width="80" align="center" sortable />
<u-table-column prop="sexName" label="性别" min-width="50" align="center" sortable />
<u-table-column prop="age" label="年龄" min-width="50" align="center" sortable />
<u-table-column prop="birthDate" label="出生日期" min-width="100" align="center" sortable />
<u-table-column prop="idNo" label="身份证号" min-width="160" align="center" sortable>
<template slot-scope="scope">
{{ "\u200C" + scope.row.idNo }}
</template>
</u-table-column>
<u-table-column prop="patientRegisterNo" label="条码号" min-width="160" align="center" sortable>
<template slot-scope="scope">
{{ "\u200C" + scope.row.patientRegisterNo }}
</template>
</u-table-column>
<u-table-column prop="patientNo" label="档案号" min-width="160" align="center" sortable>
<template slot-scope="scope">
{{ "\u200C" + scope.row.patientNo }}
</template>
</u-table-column>
<u-table-column prop="medicalTimes" label="次数" min-width="50" align="center" sortable />
<u-table-column prop="groupPack" label="分组/套餐" min-width="150" sortable />
<u-table-column prop="mobileTelephone" label="手机号" min-width="150" align="center" sortable>
<template slot-scope="scope">
{{ "\u200C" + scope.row.mobileTelephone }}
</template>
</u-table-column>
<u-table-column prop="maritalStatusName" label="婚姻" min-width="50" align="center" sortable />
<u-table-column prop="medicalTypeName" label="体检类别" min-width="150" align="center" sortable />
<u-table-column prop="personnelTypeName" label="人员类别" min-width="150" align="center" sortable />
<u-table-column prop="completeFlag" label="状态" min-width="80" align="center" sortable>
<template slot-scope="scope">
{{ dddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}
</template>
</u-table-column>
<u-table-column prop="remark" label="备注" min-width="200" align="center" sortable />
<u-table-column prop="salesman" label="业务员" min-width="80" align="center" />
<u-table-column prop="standardAmount" label="标准金额" min-width="100" align="center" />
<u-table-column prop="receivableAmount" label="应收金额" min-width="100" align="center" />
<u-table-column prop="chargePayMode" label="支付方式" min-width="100" align="center" />
<u-table-column prop="chargeAmount" label="实收金额" min-width="100" align="center" />
</u-table>
<div style="display: flex; justify-content: space-between">
<div>
<span style="font-size: 12px">
合计 标准金额 {{ loadOpts.standardAmount }} &nbsp;&nbsp;&nbsp;&nbsp;应收金额 {{ loadOpts.receivableAmount }}
&nbsp;&nbsp;&nbsp;&nbsp;实收金额 {{ loadOpts.chargeAmount }}
</span>
</div>
<div>
<span style="font-size: 12px">
{{ loadOpts.totalCount }} 条记录当前显示{{ tableData.length }}
</span>
</div>
</div>
</div>
</div>
</template>
<script>
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { deepCopy } from "../../utlis/proFunc";
import { deepCopy, dddw } from "../../utlis/proFunc";
import CusOrgOCX from "./CusOrgOCX.vue";
import { UTable, UTableColumn } from "umy-ui";
import moment from "moment";
import FileSaver from "file-saver";
export default {
components: {
CusOrgOCX,
CusOrgOCX, UTable, UTableColumn
},
props: ["orgEnable"],
data() {
@ -122,6 +177,7 @@ export default {
customerOrgAll: [],
medicalType: [],
personnelType: [],
dictSalesman: [],
query: {
dateType: "1",
@ -135,42 +191,37 @@ export default {
// isMedicalTypeId: 'Y',
isPreRegistration: "N",
},
salesmans: "",
tableData: [],
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
},
shortcuts: [
{
text: "今天",
onClick(picker) {
picker.$emit("pick", new Date());
},
},
{
text: "昨天",
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24);
picker.$emit("pick", date);
},
},
{
text: "一周前",
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", date);
},
},
],
scolling: false, //
// lazyLoading: false, //
loadOpts: {
totalCount: 0,
standardAmount: 0,
receivableAmount: 0,
chargeAmount: 0,
skipCount: 0,
maxResultCount: 100,
},
loadOptsInit: {},
};
},
created() { },
created() {
try {
let LocalConfig = JSON.parse(
window.localStorage.getItem("LocalConfig") || null
);
if (LocalConfig?.normal?.maxResultCount) {
this.loadOpts.maxResultCount = LocalConfig.normal.maxResultCount;
}
} catch (error) {
console.log('window.localStorage.getItem("LocalConfig")', error);
}
this.loadOptsInit = Object.assign({}, this.loadOpts);
},
//
mounted() {
@ -178,15 +229,16 @@ export default {
},
updated() {
this.$nextTick(() => {
this.$refs["refTable"].doLayout();
});
// this.$nextTick(() => {
// this.$refs["refTable"].doLayout();
// });
},
computed: {
...mapState(["window", "dict", "patientRegister", "report"]),
...mapState(["pickerOptions", "window", "dict", "patientRegister", "report"]),
},
methods: {
dddw,
//
dictInit() {
let today = moment(new Date()).format("YYYY-MM-DD");
@ -216,6 +268,14 @@ export default {
this.personnelType = res.data;
}
});
// {
postapi('/api/identity/users/GetUserListBySaleRole')
.then(res => {
if (res.code > -1) {
this.dictSalesman = res.data
}
})
},
//
@ -278,66 +338,90 @@ 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
).then((res) => {
if (res.code > -1) {
this.tableData = res.data;
if (Array.isArray(this.tableData) && this.tableData.length > 0) {
this.tableData.forEach((e) => {
e.startMedical = Number(e.partCheckCount) + Number(e.checkCount);
});
}
}
});
this.loadOpts = Object.assign({}, this.loadOptsInit)
this.queryEvent()
},
//
getSummaries(param) {
console.log("getSummaries param", param);
// if(!param){
// param = {
// columns:[{}, {}, {}, {}, {}, {}, {property: 'asbitemMoney'},{property: 'customerOrgGroupDetailMoney'}],
// data:this.customerOrgGroupAsbitems
//
scrollQuery(scroll, event) {
//
if (!scroll.judgeFlse) return;
if (this.scolling) return
// this.dom = document.getElementById("refTable")
// this.dom = this.$refs["refTable"].bodyWrapper;
// console.log('this.dom', this.dom)
// this.dom.addEventListener('scroll', () => {
// // // console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight);
// if (this.dom.scrollTop + this.dom.clientHeight + 20 > this.dom.scrollHeight) {
// this.scolling = false
// }else{
// this.scolling = true
// }
// }
const { columns, data } = param;
const sumCol = [2, 3, 4, 7, 8, 9]; //
const sums = [];
columns.forEach((column, index) => {
//console.log('column, index,data',column, index,data)
//
if (index === 1) {
sums[index] = "合计";
return;
}
// })
//
if (sumCol.indexOf(index) == -1) {
sums[index] = "";
return;
}
// if (this.scolling) return
this.loadOpts.skipCount++
if (
this.loadOpts.skipCount != 0 &&
this.loadOpts.skipCount * this.loadOpts.maxResultCount >=
this.loadOpts.totalCount
) {
// this.$message.warning({ showClose: true, message: '' })
return;
}
sums[index] = 0;
data.forEach((e) => {
if (!isNaN(e[column.property]))
sums[index] += Number(e[column.property]); // * e['amount']
});
sums[index] = sums[index].toFixed(2); //+ ' ';
this.scolling = true
this.queryEvent()
.finally(() => {
this.scolling = false
})
},
//
queryEvent() {
return new Promise((resolve, reject) => {
let body = Object.assign({}, this.query, this.loadOpts)
postapi("/api/app/CustomerReport/GetCustomerOrgPhysicalExaminationDetailStatistics", body)
.then(res => {
if (res.code > -1) {
this.loadOpts.totalCount = res.data.totalCount
let arrs = [].concat(res.data.items);
arrs.forEach(e => {
e.groupPack = e.customerOrgGroupName || e.medicalPackageName
e.deptName = (e.customerOrgName == e.departmentName ? '' : e.departmentName)
e.birthDate = e?.birthDate.substring(0, 10) || e.birthDate
e.medicalStartDate = e?.medicalStartDate.substring(0, 10) || e.medicalStartDate
});
this.tableData = [].concat(this.tableData, arrs)
this.getSummaries()
}
})
.finally(() => {
resolve()
});
})
},
//
getSummaries() {
this.loadOpts.standardAmount = 0
this.loadOpts.receivableAmount = 0
this.loadOpts.chargeAmount = 0
this.tableData.forEach(e => {
this.loadOpts.standardAmount = Number(this.loadOpts.standardAmount) + Number(e.standardAmount)
this.loadOpts.receivableAmount = Number(this.loadOpts.receivableAmount) + Number(e.receivableAmount)
this.loadOpts.chargeAmount = Number(this.loadOpts.chargeAmount) + Number(e.chargeAmount)
});
// this.groupPrice = sums[7];
// console.log('getSummaries',sums)
// if (!this.totalFoucs) this.total = sums[5];
// if (!this.discountFoucs) this.discount = Number(this.total * 100 / this.totalStand).toFixed(2);
return sums;
this.loadOpts.standardAmount = Math.round(this.loadOpts.standardAmount * 100) / 100
this.loadOpts.receivableAmount = Math.round(this.loadOpts.receivableAmount * 100) / 100
this.loadOpts.chargeAmount = Math.round(this.loadOpts.chargeAmount * 100) / 100
},
},
};

Loading…
Cancel
Save