|
|
|
@ -17,8 +17,8 @@ |
|
|
|
size="small">下载导入模版</el-button></a> |
|
|
|
</div> |
|
|
|
<div style="padding: 0 5px;" v-show="checkPagePriv(pagePriv.privs, '下载职业病导入模版')"> |
|
|
|
<a :underline="false" href="/files/职业病体检人员名单导入模板.xlsx"><el-button class="commonbutton" |
|
|
|
size="small" style="width:140px;">下载职业病导入模版</el-button></a> |
|
|
|
<a :underline="false" href="/files/职业病体检人员名单导入模板.xlsx"><el-button class="commonbutton" size="small" |
|
|
|
style="width:140px;">下载职业病导入模版</el-button></a> |
|
|
|
</div> |
|
|
|
<div style="padding: 0 5px;" v-show="checkPagePriv(pagePriv.privs, '导入')"> |
|
|
|
<el-button class="commonbutton" @click="seq = 0" size="small">导入</el-button> |
|
|
|
@ -36,8 +36,8 @@ |
|
|
|
<el-table-column type="index" label="序号" width="40" align="center" /> |
|
|
|
<el-table-column prop="importState" label="导入状态" min-width="80" sortable /> |
|
|
|
<el-table-column prop="importDes" label="导入描述" min-width="180" sortable /> |
|
|
|
<el-table-column v-for="(item, index) in importCols" :key="`col${index}`" :prop="item.dispLabel" align="center" |
|
|
|
:label="item.dataLabel || item.dispLabel" min-width="100" /> |
|
|
|
<el-table-column v-for="(item, index) in importCols" :key="`col${index}`" :prop="item.dispLabel" |
|
|
|
align="center" :label="item.dataLabel || item.dispLabel" min-width="100" /> |
|
|
|
</el-table> |
|
|
|
<el-table :data="tableData" border v-if="mode == '20'" :row-class-name="importRowClassName" |
|
|
|
:height="window.pageHeight < 600 ? 440 : (window.pageHeight - 210)" highlight-current-row size="small" |
|
|
|
@ -75,8 +75,8 @@ |
|
|
|
|
|
|
|
<!--弹窗--> |
|
|
|
<div> |
|
|
|
<el-dialog title="请选择导入方式" :visible.sync="dialogGroup.mode" width="700px" :show-close="false" :append-to-body="true" |
|
|
|
:close-on-click-modal="false"> |
|
|
|
<el-dialog title="请选择导入方式" :visible.sync="dialogGroup.mode" width="700px" :show-close="false" |
|
|
|
:append-to-body="true" :close-on-click-modal="false"> |
|
|
|
<div style="height:400px;margin-left: 200px;"> |
|
|
|
<br /><el-radio v-model="mode" label="10">从Excle导入</el-radio> |
|
|
|
<br /> |
|
|
|
@ -181,8 +181,8 @@ |
|
|
|
<div style="display: flex;margin:20px;"> |
|
|
|
<div> |
|
|
|
<span>体检单位:</span> |
|
|
|
<el-cascader v-model="customerOrgIds" :options="customerOrgTree" popper-class="example" style="width:260px;" |
|
|
|
@change="changeCustomerOrg" filterable |
|
|
|
<el-cascader v-model="customerOrgIds" :options="customerOrgTree" popper-class="example" |
|
|
|
style="width:260px;" @change="changeCustomerOrg" filterable |
|
|
|
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" |
|
|
|
:show-all-levels="true" size="small"> |
|
|
|
</el-cascader> |
|
|
|
@ -242,19 +242,24 @@ |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="同名人员信息确认" :visible.sync="dialogSameMan" width="500px" :show-close="false" |
|
|
|
<el-dialog title="同名人员信息确认" :visible.sync="dialogSameMan" width="600px" :show-close="false" |
|
|
|
:close-on-click-modal="false"> <!--:append-to-body="true" --> |
|
|
|
<div style="margin: 5px 0px 0px;"> <!-- --> |
|
|
|
<el-table :data="sameMans" border ref="sameMans" height="260" @row-click="rowClickSameMan" row-key="patientId" |
|
|
|
highlight-current-row size="small"> |
|
|
|
<el-table-column type="index" align="center" label="序号" min-width="40" /> |
|
|
|
<el-table-column prop="patientNo" align="center" label="档案号" min-width="80" /> |
|
|
|
<el-table-column prop="displayName" align="center" label="姓名" min-width="80" /> |
|
|
|
<el-table-column prop="sexId" align="center" label="性别" min-width="40" /> |
|
|
|
<!--displayName,sexId--> |
|
|
|
<el-table-column prop="patientName" align="center" label="姓名" min-width="80" /> |
|
|
|
<el-table-column prop="sexName" align="center" label="性别" min-width="40" /> |
|
|
|
<el-table-column prop="idNo" align="center" label="身份证号" min-width="150" /> |
|
|
|
<el-table-column prop="birthDate" align="center" label="出生日期" min-width="110" /> |
|
|
|
<el-table-column prop="telephone" align="center" label="电话" min-width="100" /> |
|
|
|
<el-table-column prop="mobileTelephone" align="center" label="手机" min-width="100" /> |
|
|
|
<el-table-column prop="birthDate" align="center" label="出生日期" min-width="110"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ moment(scope.row.birthDate).format('yyyy-MM-DD') }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="telephone" align="center" label="电话" min-width="130" /> |
|
|
|
<el-table-column prop="mobileTelephone" align="center" label="手机" min-width="130" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
@ -274,8 +279,8 @@ |
|
|
|
<span class="spanLeftClass">体检单位:</span> |
|
|
|
<el-cascader v-model="query.customerOrgIds" :options="customerOrgTree" style="width:260px;" |
|
|
|
@change="changeQueryCustomerOrg" filterable popper-class="example" |
|
|
|
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" :show-all-levels="true" |
|
|
|
size="small"> |
|
|
|
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" |
|
|
|
:show-all-levels="true" size="small"> |
|
|
|
</el-cascader> |
|
|
|
<div style="margin-left: 20px"> |
|
|
|
<span>单位体检次数:</span> |
|
|
|
@ -289,7 +294,8 @@ |
|
|
|
<div style="display: flex;margin:20px;"> |
|
|
|
|
|
|
|
<span class="spanLeftClass">登记日期:</span> |
|
|
|
<el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small" style="width:130px;" /> |
|
|
|
<el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small" |
|
|
|
style="width:130px;" /> |
|
|
|
|
|
|
|
<span class="spanMidClass">至</span> |
|
|
|
<el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small" style="width:130px;" /> |
|
|
|
@ -459,8 +465,8 @@ |
|
|
|
<el-radio v-model="newCustomerOrgFlag" :label="true">新单位或部门</el-radio> |
|
|
|
</div> |
|
|
|
<div style="margin-left:5px;" v-if="newCustomerOrgFlag"> |
|
|
|
<el-cascader v-model="customerOrgIds" :options="customerOrgTree" popper-class="example" style="width:260px;" |
|
|
|
@change="changeCustomerOrg" filterable |
|
|
|
<el-cascader v-model="customerOrgIds" :options="customerOrgTree" popper-class="example" |
|
|
|
style="width:260px;" @change="changeCustomerOrg" filterable |
|
|
|
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" |
|
|
|
:show-all-levels="true" size="small"> |
|
|
|
</el-cascader> |
|
|
|
@ -586,7 +592,7 @@ export default { |
|
|
|
{ dispLabel: '介绍人', val: 'salesman' }, |
|
|
|
{ dispLabel: '支付方式', val: 'payTypeFlag' }, |
|
|
|
], |
|
|
|
masterCols:{}, // 批量导入必填的项目 |
|
|
|
masterCols: {}, // 批量导入必填的项目 |
|
|
|
|
|
|
|
tableData: [], //导入数据状态显示 |
|
|
|
|
|
|
|
@ -697,7 +703,7 @@ export default { |
|
|
|
clearProcess() { |
|
|
|
|
|
|
|
let elo = document.getElementById('fileNames') |
|
|
|
if(elo) elo.value = ''; // 清空选择的文件 |
|
|
|
if (elo) elo.value = ''; // 清空选择的文件 |
|
|
|
|
|
|
|
this.workBook = null //EXCEL 工作薄 |
|
|
|
this.sheetNames = [] //EXCEL 工作薄中的表单 {sheetName:} |
|
|
|
@ -977,7 +983,7 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
data.forEach((item) => { |
|
|
|
console.log('item,column.property',item,column.property) |
|
|
|
console.log('item,column.property', item, column.property) |
|
|
|
if (item[column.property]) { |
|
|
|
fail++ |
|
|
|
} else { |
|
|
|
@ -1269,7 +1275,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 导入必填项验证 |
|
|
|
checkValide(body){ |
|
|
|
checkValide(body) { |
|
|
|
let msg = '' |
|
|
|
// patientName,personnelTypeName,medicalTypeName,salesman |
|
|
|
let keys = Object.keys(this.masterCols) |
|
|
|
@ -1278,21 +1284,21 @@ export default { |
|
|
|
switch (key) { |
|
|
|
case 'patientName': |
|
|
|
case 'name': |
|
|
|
if(!body.patientName) msg = this.masterCols[key] + ' 未填值' |
|
|
|
if (!body.patientName) msg = this.masterCols[key] + ' 未填值' |
|
|
|
break; |
|
|
|
case 'medicalTypeId': //体检类别 |
|
|
|
if(!body.medicalTypeName) msg = this.masterCols[key] + ' 未填值' |
|
|
|
if (!body.medicalTypeName) msg = this.masterCols[key] + ' 未填值' |
|
|
|
break; |
|
|
|
case 'personnelTypeId': //人员类别 |
|
|
|
if(!body.personnelTypeName) msg = this.masterCols[key] + ' 未填值' |
|
|
|
if (!body.personnelTypeName) msg = this.masterCols[key] + ' 未填值' |
|
|
|
break; |
|
|
|
case 'salesman': //介绍人 |
|
|
|
if(!body.salesman) msg = this.masterCols[key] + ' 未填值' |
|
|
|
if (!body.salesman) msg = this.masterCols[key] + ' 未填值' |
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
|
if(msg) break; |
|
|
|
if (msg) break; |
|
|
|
} |
|
|
|
return msg |
|
|
|
}, |
|
|
|
@ -1315,9 +1321,9 @@ export default { |
|
|
|
|
|
|
|
// 判断是否必填: |
|
|
|
let msg = this.checkValide(body) |
|
|
|
if(msg){ |
|
|
|
if (msg) { |
|
|
|
this.tableData.push(Object.assign({ importState: '导入失败', importDes: msg }, this.choosedData[i])) |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
try { |
|
|
|
// 同一人判断 |
|
|
|
if (this.choosedSameMan.patientNo) { |
|
|
|
@ -1364,10 +1370,11 @@ export default { |
|
|
|
async isSamePatient(startRowNameType, body) { |
|
|
|
console.log('isSamePatient', startRowNameType, body) |
|
|
|
let result = { |
|
|
|
isContinue: true, |
|
|
|
isContinue: true, // 默认继续 |
|
|
|
err: '' |
|
|
|
} |
|
|
|
let res |
|
|
|
// 有身份证则按身份证找是否有档案号 |
|
|
|
if (body.idNo) { |
|
|
|
try { |
|
|
|
res = await postapi('/api/app/patient/GetByIdNo', { idNo: body.idNo }) |
|
|
|
@ -1382,8 +1389,7 @@ export default { |
|
|
|
result.err = `身份证号查重错误,原因:${error}` |
|
|
|
return result |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
// 没有身份证号或身份证号未找到同名人员时,按姓名查重 |
|
|
|
let url, localBody = { |
|
|
|
customerOrgId: body.customerOrgId, |
|
|
|
@ -1408,6 +1414,7 @@ export default { |
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
return result |
|
|
|
|
|
|
|
// if (this.choosedSameMan.patientNo) { |
|
|
|
@ -1469,7 +1476,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
if(this.seq > 30){ |
|
|
|
if (this.seq > 30) { |
|
|
|
body.isOccupationalDisease = 'Y' |
|
|
|
body.isDefaultMedicalType = 'Y' |
|
|
|
} |
|
|
|
|