|
|
@ -39,78 +39,40 @@ |
|
|
<el-button type="primary" @click="btnQuery" size="small" class="commonbutton">查询</el-button> |
|
|
<el-button type="primary" @click="btnQuery" size="small" class="commonbutton">查询</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div class="query"> |
|
|
<div class="query"> |
|
|
<el-button @click="handleExport" size="small" class="commonbutton">导出excel</el-button> |
|
|
|
|
|
|
|
|
<el-button @click="btnExportV" size="small" class="commonbutton">导出excel</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div style="background-color: #fff; padding: 15px; border-radius: 8px;"> |
|
|
<div style="background-color: #fff; padding: 15px; border-radius: 8px;"> |
|
|
<el-table id="tableChekStatus" :data="dataList" border |
|
|
|
|
|
|
|
|
<u-table id="tableChekStatus" :data="dataList" border |
|
|
:height="window.pageHeight < 600 ? 415 : window.pageHeight - 185 - 20" row-key="id" size="small" |
|
|
:height="window.pageHeight < 600 ? 415 : window.pageHeight - 185 - 20" row-key="id" size="small" |
|
|
highlight-current-row ref="dataList" :row-class-name="tableRowClassName"> |
|
|
|
|
|
<el-table-column type="index" label="序号" width="40" align="center" /> |
|
|
|
|
|
<el-table-column prop="checkRequestNo" label="检查条码" min-width="120" align="center" sortable/> |
|
|
|
|
|
<el-table-column prop="asbitemName" label="检查项目" min-width="120" sortable/> |
|
|
|
|
|
<el-table-column prop="completeFlag" label="检查状态" min-width="70" align="center" sortable> |
|
|
|
|
|
|
|
|
highlight-current-row ref="dataList" :row-class-name="tableRowClassName" use-virtual |
|
|
|
|
|
@sort-change="handleSortChange"> |
|
|
|
|
|
<!--列可拖拽 key值很关键 --> |
|
|
|
|
|
<u-table-column v-for="(item, index) in dragCol" :key="`${item.label + index}`" :type="dragCol[index].type" |
|
|
|
|
|
:min-width="dragCol[index].minWidth" :align="dragCol[index].align" |
|
|
|
|
|
:label="dragCol[index].type ? '' : item.label" :prop="dragCol[index].prop" |
|
|
|
|
|
:sortable="dragCol[index].type || dragCol[index].prop == 'sn' ? false : true" |
|
|
|
|
|
:sort-method="(a, b) => chineseSort(a, b, dragCol[index].prop)" |
|
|
|
|
|
:show-overflow-tooltip="dragCol[index].showTooltip"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div>{{ dddw(dict.checkCompleteFlag, 'id', scope.row.completeFlag, 'displayName') }}</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="isCharge" label="收费状态" width="70" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div>{{ scope.row.checkCompleteFlag == 'Y' ? '已收费' : '未收费' }}</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="standardPrice" label="标准价格" width="70" align="center" /> |
|
|
|
|
|
<el-table-column prop="chargePrice" label="应收价格" width="70" align="center" /> |
|
|
|
|
|
<el-table-column prop="patientRegisterNo" label="人员条码号" width="130" sortable/> |
|
|
|
|
|
<el-table-column prop="patientNo" label="档案号" width="130" sortable/> |
|
|
|
|
|
<el-table-column prop="medicalTimes" label="体检次数" width="70" align="center" /> |
|
|
|
|
|
<el-table-column prop="customerOrgName" label="单位" width="180" sortable/> |
|
|
|
|
|
<!-- |
|
|
|
|
|
<el-table-column prop="customerOrgParentName" label="单位" width="180"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }}</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
--> |
|
|
|
|
|
<el-table-column prop="departmentName" label="部门" width="180" sortable/> |
|
|
|
|
|
<!-- |
|
|
|
|
|
<el-table-column prop="customerOrgName" label="部门" width="180"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgName : "" }}</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
--> |
|
|
|
|
|
<el-table-column label="分组/套餐" width="150"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<!-- |
|
|
|
|
|
<div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId"> |
|
|
|
|
|
{{ dddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }} |
|
|
|
|
|
|
|
|
<div v-if="dragCol[index].prop == 'sn'"> |
|
|
|
|
|
{{ scope.$index + 1 }} |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId"> |
|
|
|
|
|
{{ dddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }} |
|
|
|
|
|
|
|
|
<div v-else-if="dragCol[index].prop == 'completeFlag'"> |
|
|
|
|
|
{{ dddw(dict.checkCompleteFlag, "id", scope.row[dragCol[index].prop], "displayName") }} |
|
|
</div> |
|
|
</div> |
|
|
--> |
|
|
|
|
|
<div v-if="scope.row.medicalPackageName"> |
|
|
|
|
|
{{ scope.row.medicalPackageName }} |
|
|
|
|
|
|
|
|
<div v-else-if="dragCol[index].prop == 'isCharge'"> |
|
|
|
|
|
{{ scope.row[dragCol[index]?.prop] == 'Y' ? '已收费' : '未收费' }} |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="scope.row.customerOrgGroupName"> |
|
|
|
|
|
{{ scope.row.customerOrgGroupName }} |
|
|
|
|
|
|
|
|
<!-- String(scope.row[dragCol[index]?.prop]||'') 屏蔽没有字段--> |
|
|
|
|
|
<!-- 身份证、档案号、条码号、电话/手机、工卡号 加连接串防科学计数--> |
|
|
|
|
|
<div v-else> |
|
|
|
|
|
{{ (tecCols.includes(dragCol[index]?.prop) ? '\u200C' : '') + |
|
|
|
|
|
String(scope.row[dragCol[index]?.prop]||'') }} |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="patientName" label="姓名" width="80" sortable/> |
|
|
|
|
|
<el-table-column prop="sexName" label="性别" sortable/> |
|
|
|
|
|
<!-- |
|
|
|
|
|
<el-table-column prop="sexId" label="性别" > |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div>{{ dddw(dict.sex, "id", scope.row.sexId, "displayName") }}</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
--> |
|
|
|
|
|
<el-table-column prop="age" label="年龄" sortable/> |
|
|
|
|
|
<el-table-column prop="mobileTelephone" label="手机" width="120" sortable/> |
|
|
|
|
|
<el-table-column prop="telephone" label="电话" width="100" sortable/> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
|
</u-table-column> |
|
|
|
|
|
</u-table> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
@ -129,9 +91,12 @@ |
|
|
<script> |
|
|
<script> |
|
|
import moment from "moment"; |
|
|
import moment from "moment"; |
|
|
import { mapState, mapActions } from "vuex"; |
|
|
import { mapState, mapActions } from "vuex"; |
|
|
|
|
|
import Sortable from "sortablejs"; |
|
|
|
|
|
import FileSaver from 'file-saver'; |
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
import { dddw, objCopy, arrayReduce, arrayExistObj, tcdate } from "@/utlis/proFunc"; |
|
|
import { dddw, objCopy, arrayReduce, arrayExistObj, tcdate } from "@/utlis/proFunc"; |
|
|
import { exportToExcel } from "../../utlis/Export2Excel"; |
|
|
import { exportToExcel } from "../../utlis/Export2Excel"; |
|
|
|
|
|
import { UTable, UTableColumn } from "umy-ui"; |
|
|
|
|
|
|
|
|
import CusOrgOCX from "../../components/report/CusOrgOCX.vue" |
|
|
import CusOrgOCX from "../../components/report/CusOrgOCX.vue" |
|
|
import AsbitemOCX from "../../components/report/AsbitemOCX.vue" |
|
|
import AsbitemOCX from "../../components/report/AsbitemOCX.vue" |
|
|
@ -139,10 +104,37 @@ export default { |
|
|
components: { |
|
|
components: { |
|
|
CusOrgOCX, |
|
|
CusOrgOCX, |
|
|
AsbitemOCX, |
|
|
AsbitemOCX, |
|
|
|
|
|
UTable, |
|
|
|
|
|
UTableColumn, |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
dataList: [], //列表数据 |
|
|
dataList: [], //列表数据 |
|
|
|
|
|
|
|
|
|
|
|
//拖动列 |
|
|
|
|
|
dragCol: [ |
|
|
|
|
|
{ label: "序号", prop: "sn", minWidth: 50, align: "center" }, |
|
|
|
|
|
{ label: "体检日期", prop: "medicalStartDate", minWidth: 100, align: "center" }, |
|
|
|
|
|
{ label: "检查日期", prop: "checkDate", minWidth: 100, align: "center" }, |
|
|
|
|
|
{ label: "检查条码", prop: "checkRequestNo", minWidth: 120, align: "center" }, |
|
|
|
|
|
{ label: "检查项目", prop: "asbitemName", minWidth: 120, align: "center" }, |
|
|
|
|
|
{ label: "检查状态", prop: "completeFlag", minWidth: 90, align: "center" }, |
|
|
|
|
|
{ label: "收费状态", prop: "isCharge", minWidth: 80, align: "center" }, |
|
|
|
|
|
{ label: "标准价格", prop: "standardPrice", minWidth: 80, align: "center" }, |
|
|
|
|
|
{ label: "应收价格", prop: "chargePrice", minWidth: 80, align: "center" }, |
|
|
|
|
|
{ label: "条码号", prop: "patientRegisterNo", minWidth: 110, align: "center" }, |
|
|
|
|
|
{ label: "档案号", prop: "patientNo", minWidth: 80, align: "center" }, |
|
|
|
|
|
{ label: "次数", prop: "medicalTimes", minWidth: 60, align: "center" }, |
|
|
|
|
|
{ label: "单位名称", prop: "customerOrgName", minWidth: 180, align: "left", showTooltip: true }, |
|
|
|
|
|
{ label: "部门名称", prop: "departmentName", minWidth: 150, align: "left", showTooltip: true }, |
|
|
|
|
|
{ label: "分组/套餐", prop: "groupPack", minWidth: 150, align: "center", showTooltip: true }, |
|
|
|
|
|
{ label: "姓名", prop: "patientName", minWidth: 60, align: "center" }, |
|
|
|
|
|
{ label: "性别", prop: "sexName", minWidth: 60, align: "center" }, |
|
|
|
|
|
{ label: "年龄", prop: "age", minWidth: 60, align: "center" }, |
|
|
|
|
|
{ label: "手机", prop: "mobileTelephone", minWidth: 130, align: "center" }, |
|
|
|
|
|
{ label: "电话", prop: "telephone", minWidth: 130, align: "center" } |
|
|
|
|
|
], |
|
|
|
|
|
tecCols:["idNo","patientRegisterNo","patientNo","mobileTelephone","telephone","medicalCardNo","jobCardNo"], // 可能存在科学计数的列 |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -153,6 +145,9 @@ export default { |
|
|
//挂载完成 |
|
|
//挂载完成 |
|
|
mounted() { |
|
|
mounted() { |
|
|
// this.btnQuery(); |
|
|
// this.btnQuery(); |
|
|
|
|
|
|
|
|
|
|
|
// 监听列拖拽 |
|
|
|
|
|
this.initColDrag() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
computed: { |
|
|
computed: { |
|
|
@ -276,6 +271,58 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 配合虚拟表导出 |
|
|
|
|
|
handleSortChange({ column, prop, order }) { |
|
|
|
|
|
// column: 当前列配置 |
|
|
|
|
|
// prop: 排序的字段名(对应列 prop) |
|
|
|
|
|
// order: 排序顺序,可选值:'ascending', 'descending', null(取消排序) |
|
|
|
|
|
//console.log('排序变化:', column, prop, order) |
|
|
|
|
|
|
|
|
|
|
|
// 执行自定义排序逻辑 |
|
|
|
|
|
if (order) { |
|
|
|
|
|
this.dataList.sort((a, b) => { |
|
|
|
|
|
let valA = a[prop], valB = b[prop] |
|
|
|
|
|
if (typeof valA == 'string') { |
|
|
|
|
|
if (['patientName', 'org', 'dept', 'address', 'remark'].includes(prop)) { |
|
|
|
|
|
if (order === 'ascending') { |
|
|
|
|
|
return valA.localeCompare(valB, 'zh'); |
|
|
|
|
|
} else { |
|
|
|
|
|
return valB.localeCompare(valA, 'zh'); |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
if (order === 'ascending') { |
|
|
|
|
|
return valA.localeCompare(valB); |
|
|
|
|
|
} else { |
|
|
|
|
|
return valB.localeCompare(valA); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
if (order === 'ascending') { |
|
|
|
|
|
return valB > valB ? 1 : -1 |
|
|
|
|
|
} else { |
|
|
|
|
|
return valA < valB ? 1 : -1 |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
// 如果不想预处理,也可以在排序方法中动态计算 |
|
|
|
|
|
chineseSort(a, b, colName) { |
|
|
|
|
|
// console.log('a, b', a, b) |
|
|
|
|
|
// const pinyinA = pinyin(a[colName], { style: pinyin.STYLE_NORMAL }).join(''); |
|
|
|
|
|
// const pinyinB = pinyin(b[colName], { style: pinyin.STYLE_NORMAL }).join(''); |
|
|
|
|
|
let valA = a[colName], valB = b[colName] |
|
|
|
|
|
if (typeof valA == 'string') { |
|
|
|
|
|
// 单位、部门、姓名、地址、备注 |
|
|
|
|
|
if (['patientName', 'org', 'dept', 'address', 'remark', 'groupPack'].includes(colName)) { |
|
|
|
|
|
return valA.localeCompare(valB, 'zh'); |
|
|
|
|
|
} else { |
|
|
|
|
|
return valA.localeCompare(valB); |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
return valA - valB |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
//查询 |
|
|
//查询 |
|
|
btnQuery() { |
|
|
btnQuery() { |
|
|
@ -351,17 +398,124 @@ export default { |
|
|
|
|
|
|
|
|
//console.log('/api/app/peisreport/getpatientregisterreport',body) |
|
|
//console.log('/api/app/peisreport/getpatientregisterreport',body) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.dataList = [] |
|
|
postapi('/api/app/peisreport/getregisterasbitemregistercheckstatus', body).then(res => { |
|
|
postapi('/api/app/peisreport/getregisterasbitemregistercheckstatus', body).then(res => { |
|
|
if (res.code != -1) { |
|
|
if (res.code != -1) { |
|
|
this.dataList = res.data; |
|
|
this.dataList = res.data; |
|
|
|
|
|
this.makeDataList(this.dataList) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//数据改组,如:合并分组/套餐 |
|
|
|
|
|
makeDataList(data) { |
|
|
|
|
|
data.forEach(e => { |
|
|
|
|
|
e.groupPack = e.customerOrgGroupName || e.medicalPackageName |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
handleExport() { |
|
|
handleExport() { |
|
|
exportToExcel("#tableChekStatus", "组合项目具体结果明细统计", false); |
|
|
exportToExcel("#tableChekStatus", "组合项目具体结果明细统计", false); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 虚拟表导出 |
|
|
|
|
|
btnExportV() { |
|
|
|
|
|
let table = `<table border="1" cellspacing="0" bordercolor="#000000" style="border-collapse:collapse">` |
|
|
|
|
|
let thead = `<thead><tr>` |
|
|
|
|
|
let th = '' |
|
|
|
|
|
|
|
|
|
|
|
// 生成表头标题 |
|
|
|
|
|
this.dragCol.forEach(e => { |
|
|
|
|
|
if (e.prop) { |
|
|
|
|
|
if (th) { |
|
|
|
|
|
th += `<th>${e.label}</th>` |
|
|
|
|
|
} else { |
|
|
|
|
|
th = `<th>${e.label}</th>` |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
thead += th + `</tr></thead>` |
|
|
|
|
|
|
|
|
|
|
|
// 生成表体 |
|
|
|
|
|
let tr = '' |
|
|
|
|
|
this.dataList.forEach((row, i) => { |
|
|
|
|
|
let newRow = Object.assign({}, row) |
|
|
|
|
|
let tds = '' |
|
|
|
|
|
this.dragCol.forEach(e => { |
|
|
|
|
|
let td = '' |
|
|
|
|
|
if (e.prop) { |
|
|
|
|
|
if (e.prop == 'sn') { |
|
|
|
|
|
td = `<td>${i + 1}</td>` |
|
|
|
|
|
} else if (e.prop == 'completeFlag') { |
|
|
|
|
|
newRow[e.prop] = dddw(this.dict.checkCompleteFlag, "id", newRow[e.prop], "displayName") |
|
|
|
|
|
td = `<td>${newRow[e.prop] || ''}</td>` |
|
|
|
|
|
} else if (e.prop == 'isCharge') { |
|
|
|
|
|
newRow[e.prop] = newRow[e.prop] == 'Y' ? '已收费' : '未收费' |
|
|
|
|
|
td = `<td>${newRow[e.prop] || ''}</td>` |
|
|
|
|
|
} else if (['isReportPrint', 'isVip', 'isUpload', 'isUploadAppoint', 'isReceiveReport', 'isPushThirdResult', 'isLock'].includes(e.prop)) { |
|
|
|
|
|
if (newRow[e.prop] == 'Y') { |
|
|
|
|
|
td = `<td>√</td>` |
|
|
|
|
|
} else { |
|
|
|
|
|
td = `<td></td>` |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
if (newRow[e.prop]) { |
|
|
|
|
|
newRow[e.prop] = `\u200C${newRow[e.prop]}` |
|
|
|
|
|
} |
|
|
|
|
|
td = `<td>${newRow[e.prop] || ''}</td>` |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (tds) { |
|
|
|
|
|
tds += td |
|
|
|
|
|
} else { |
|
|
|
|
|
tds = td |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
if (tr) { |
|
|
|
|
|
tr += `<tr>${tds}</tr>` |
|
|
|
|
|
} else { |
|
|
|
|
|
tr = `<tr>${tds}</tr>` |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
let tbody = `<tbody>${tr}</tbody>` |
|
|
|
|
|
|
|
|
|
|
|
table += thead + tbody + '</table>' |
|
|
|
|
|
|
|
|
|
|
|
let fileName = moment(new Date()).format('yyyyMMDDHHmmss') + '.xls' |
|
|
|
|
|
let blob = new Blob([table], { type: "text/plain;charset=utf-8" }); |
|
|
|
|
|
FileSaver.saveAs(blob, fileName); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//监听拖拽 |
|
|
|
|
|
initColDrag() { |
|
|
|
|
|
// 1. 获取表格的表头元素 |
|
|
|
|
|
const table = document.querySelector('.el-table__header-wrapper tr'); |
|
|
|
|
|
|
|
|
|
|
|
// 2. 创建 Sortable 实例 |
|
|
|
|
|
Sortable.create(table, { |
|
|
|
|
|
animation: 150, // 拖拽动画时长 |
|
|
|
|
|
|
|
|
|
|
|
// 开始拖拽的时候 |
|
|
|
|
|
onStart: (event) => { |
|
|
|
|
|
if (event.oldIndex == 0) { |
|
|
|
|
|
this.$alert('第1列不可以拖动', '提示') |
|
|
|
|
|
} |
|
|
|
|
|
//evt.oldIndex; // element index within parent |
|
|
|
|
|
}, |
|
|
|
|
|
// 3. 监听拖拽结束事件 |
|
|
|
|
|
onEnd: (event) => { |
|
|
|
|
|
const { oldIndex, newIndex } = event; |
|
|
|
|
|
|
|
|
|
|
|
// 4. 更新列定义数组的顺序 |
|
|
|
|
|
let movedColumn = this.dragCol.splice(oldIndex, 1)[0]; |
|
|
|
|
|
this.dragCol.splice(newIndex, 0, movedColumn); |
|
|
|
|
|
|
|
|
|
|
|
// 5. 强制表格重新渲染以更新视图 |
|
|
|
|
|
//this.tableBrush += 1; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//监听事件 |
|
|
//监听事件 |
|
|
|