Browse Source

import

master
pengjun 2 years ago
parent
commit
c0b968ef12
  1. 94
      src/views/customerOrg/patientRegisterImport.vue
  2. 168
      src/views/fee-settings/SysParmSet.vue

94
src/views/customerOrg/patientRegisterImport.vue

@ -11,15 +11,46 @@
</div> </div>
</div> </div>
<div> <div>
<el-table :data="tableData" border
<el-table :data="tableData" border v-if="mode=='10'"
:height="window.pageHeight < 600 ? 405 : (window.pageHeight - 195)" :height="window.pageHeight < 600 ? 405 : (window.pageHeight - 195)"
highlight-current-row size="small" > highlight-current-row size="small" >
<el-table-column type="index" label="序号" width="40" align="center"/> <el-table-column type="index" label="序号" width="40" align="center"/>
<el-table-column prop="importState" label="导入状态" min-width="80"/>
<el-table-column prop="importDes" label="导入描述" min-width="150"/>
<el-table-column prop="importState" label="导入状态" min-width="80"/>
<el-table-column prop="importDes" label="导入描述" min-width="150"/>
<el-table-column v-for="(item,index) in importCols" :key="`col${index}`" :prop="item.dispLabel" align="center" <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"/> :label="item.dataLabel || item.dispLabel" min-width="100"/>
</el-table> </el-table>
<el-table :data="tableData" border v-if="mode=='20'"
:height="window.pageHeight < 600 ? 405 : (window.pageHeight - 195)"
highlight-current-row size="small" >
<el-table-column type="index" label="序号" width="40" align="center"/>
<el-table-column prop="importState" label="导入状态" min-width="80"/>
<el-table-column prop="importDes" label="导入描述" min-width="150"/>
<el-table-column prop="patientNo" align="center" label="档案号" min-width="80"/>
<el-table-column prop="medicalTimes" align="center" label="体检次数" min-width="80"/>
<el-table-column prop="patientName" align="center" label="姓名" min-width="80"/>
<el-table-column prop="sexId" align="center" label="性别" min-width="40">
<template slot-scope="scope">
<div>{{ dddw(dict.sex, "id", scope.row.sexId, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="birthDate" align="center" label="出生日期" min-width="80">
<template slot-scope="scope">
<div>{{ scope.row.birthDate ? moment(new Date(scope.row.birthDate)).format('yyyy-MM-DD'):'' }}</div>
</template>
</el-table-column>
<el-table-column prop="age" align="center" label="年龄" min-width="40"/>
<el-table-column prop="customerOrgParentName" align="center" label="单位" min-width="150"/>
<el-table-column prop="customerOrgName" align="center" label="部门" min-width="120"/>
<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="creatorName" align="center" label="登记人员" min-width="80"/>
<el-table-column prop="creationTime" align="center" label="登记日期" min-width="80">
<template slot-scope="scope">
<div>{{ scope.row.birthDate ? moment(new Date(scope.row.creationTime)).format('yyyy-MM-DD'):'' }}</div>
</template>
</el-table-column>
</el-table>
</div> </div>
</el-card> </el-card>
@ -304,14 +335,21 @@
</el-table-column> </el-table-column>
<el-table-column prop="birthDate" align="center" label="出生日期" min-width="80"> <el-table-column prop="birthDate" align="center" label="出生日期" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ moment(new Date(scope.row.birthDate)).format('yyyy-MM-DD') }}</div>
<div>{{ scope.row.birthDate ? moment(new Date(scope.row.birthDate)).format('yyyy-MM-DD'):'' }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="age" align="center" label="年龄" min-width="40"/> <el-table-column prop="age" align="center" label="年龄" min-width="40"/>
<el-table-column prop="customerOrgParentName" align="center" label="单位" min-width="150"/> <el-table-column prop="customerOrgParentName" align="center" label="单位" min-width="150"/>
<el-table-column prop="customerOrgName" align="center" label="部门" min-width="120"/> <el-table-column prop="customerOrgName" align="center" label="部门" min-width="120"/>
<el-table-column prop="telephone" align="center" label="电话" min-width="100"/> <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="mobileTelephone" align="center" label="手机" min-width="100"/>
<el-table-column prop="creatorName" align="center" label="登记人员" min-width="80"/>
<el-table-column prop="creationTime" align="center" label="登记日期" min-width="80">
<template slot-scope="scope">
<div>{{ scope.row.birthDate ? moment(new Date(scope.row.creationTime)).format('yyyy-MM-DD'):'' }}</div>
</template>
</el-table-column>
<!-- <!--
"patientRegisterNo": "T4724", "patientRegisterNo": "T4724",
"patientId": "3a0eeeeb-55b6-86d7-a578-a9c9e332e7ed", "patientId": "3a0eeeeb-55b6-86d7-a578-a9c9e332e7ed",
@ -1397,7 +1435,7 @@ export default {
}, },
// //
btnImportFromDataBase(){
async btnImportFromDataBase(){
let customerOrgIds = [] let customerOrgIds = []
let customerOrgId = "" let customerOrgId = ""
if(this.newCustomerOrgFlag){ if(this.newCustomerOrgFlag){
@ -1416,7 +1454,51 @@ export default {
return return
} }
let body = {
customerOrgRegisterId:this.customerOrgRegister.id,
customerOrgGroupId:this.curGroup.id,
completeFlag:this.dataImportOpts.completeFlag,
payTypeFlag:this.payTypeFlag,
organizationUnitId:this.peisid,
}
// {
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "customerOrgGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "completeFlag": "string",
// "payTypeFlag": "string",
// "organizationUnitId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
// }
this.elProgress.display = true
this.elProgress.percentage = 0
for(let i=0;i<this.prList.length;i++){
this.elProgress.percentage = Math.floor(((i + 1) * 100) / this.prList.length);
if(!this.prList[i].choosed) continue
body.patientRegisterId = this.prList[i].id
body.customerOrgId = this.newCustomerOrgFlag ? customerOrgId:this.prList[i].customerOrgId
try {
let res = await postapi('/api/app/patientregister/createpatientregisterhistory',body)
if(res.code != -1){
if(res.data.code != -1){
this.tableData.push(Object.assign({importState:'导入成功'},this.prList[i]))
}else{
this.tableData.push(Object.assign({importState:'导入失败',importDes:res.data.msg},this.prList[i]))
}
}else{
this.tableData.push(Object.assign({importState:'导入失败',importDes:res.message},this.prList[i]))
}
} catch (error) {
this.tableData.push(Object.assign({importState:'导入失败',importDes:res.message},this.prList[i]))
}
}
this.elProgress.display = false
this.seq = -1
}, },
}, },

168
src/views/fee-settings/SysParmSet.vue

@ -10,46 +10,16 @@
@node-click="nodeClick" @node-click="nodeClick"
/> />
</div> </div>
<div :style="'margin-left: 5px;width:'+ (window.pageWidth < 600 ? 350 : window.pageWidth - 200 - 50) + 'px;'">
<div style="display: flex">
<div>
<span>体检中心</span>
<el-select
v-model="organizationId"
placeholder="请选择体检中心"
style="margin-left: 15px"
filterable
size="small"
@change="changeOrganization"
>
<el-option
v-for="item in organization"
:key="item.id"
:label="item.displayName"
:value="item.id"
>
</el-option>
</el-select>
</div>
<!--
<div style="display: flex">
<el-color-picker v-model="color16" @change="chooseColor" />
<el-input v-model="color10" @input="inputColor" />
</div>
-->
<div style="margin-left: 30px">
<el-button type="success" @click="save" size="small">保存</el-button>
</div>
</div>
<div style="margin-top: 2px">
<div :style="'margin-left: 5px;width:'+ (window.pageWidth < 600 ? 350 : window.pageWidth - 200 - 50) + 'px;'">
<div>
<el-table <el-table
:data="sysParms" :data="sysParms"
border border
:height="window.pageHeight < 600 ? 418 : window.pageHeight - 182" :height="window.pageHeight < 600 ? 418 : window.pageHeight - 182"
size="small"
size="small" :span-method="spanMethod"
highlight-current-row highlight-current-row
> >
<el-table-column prop="id" label="参数ID" min-width="150"/>
<el-table-column prop="sysParmId" label="参数ID" min-width="150"/>
<el-table-column <el-table-column
prop="displayName" prop="displayName"
label="参数名称" label="参数名称"
@ -57,6 +27,7 @@
/> />
<el-table-column prop="organizationUnitId" label="体检中心" min-width="100"> <el-table-column prop="organizationUnitId" label="体检中心" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<!--
<el-select <el-select
v-model="scope.row.organizationUnitId" v-model="scope.row.organizationUnitId"
placeholder="请选择体检中心" placeholder="请选择体检中心"
@ -71,6 +42,8 @@
> >
</el-option> </el-option>
</el-select> </el-select>
-->
<div>{{ dddw(organization,'id',scope.row.organizationUnitId,'displayName')}}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="sysParmValueName" label="参数值" min-width="80"> <el-table-column prop="sysParmValueName" label="参数值" min-width="80">
@ -98,6 +71,33 @@
<el-table-column prop="remark" label="参数说明" min-width="150"/> <el-table-column prop="remark" label="参数说明" min-width="150"/>
</el-table> </el-table>
</div> </div>
<div style="margin-top:2px; display: flex;justify-content:space-between;">
<!--
<div>
<span>体检中心</span>
<el-select
v-model="organizationId"
placeholder="请选择体检中心"
style="margin-left: 15px"
filterable
size="small"
@change="changeOrganization"
>
<el-option
v-for="item in organization"
:key="item.id"
:label="item.displayName"
:value="item.id"
>
</el-option>
</el-select>
</div>
-->
<div></div>
<div>
<el-button type="success" @click="btnSave" size="small">保存</el-button>
</div>
</div>
</div> </div>
</div> </div>
</el-card> </el-card>
@ -106,7 +106,7 @@
<script> <script>
import { mapState } from "vuex"; import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { tcdate, objCopy } from "../../utlis/proFunc";
import { tcdate, objCopy, dddw } from "../../utlis/proFunc";
export default { export default {
components: {}, components: {},
data() { data() {
@ -120,6 +120,7 @@ export default {
organization: [], // organization: [], //
organizationId: "00000000-0000-0000-0000-000000000000", organizationId: "00000000-0000-0000-0000-000000000000",
sysParmTypeId: "", sysParmTypeId: "",
spanRow:[],
sysParms: [], // sysParms: [], //
color16: "#409EFF", color16: "#409EFF",
color10: 1089274, color10: 1089274,
@ -138,15 +139,8 @@ export default {
...mapState(["window", "dict"]), ...mapState(["window", "dict"]),
}, },
methods: { methods: {
chooseColor(v) {
this.color10 = eval(v.replace("#", "0x"));
},
inputColor(v) {
this.color10 = Number(v);
let temp = "000000" + this.color10.toString(16);
this.color16 = "#" + temp.substring(temp.length - 6, temp.length);
},
dddw,
// //
getOraniztion() { getOraniztion() {
getapi("/api/app/organization-units/organization-unit-by-is-peis").then( getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
@ -191,16 +185,94 @@ export default {
getapi(`${url}`).then((res) => { getapi(`${url}`).then((res) => {
if (res.code != -1) { if (res.code != -1) {
this.sysParms = res.data; this.sysParms = res.data;
this.spanRow = this.parseSpanRow(this.sysParms,'sysParmId')
} }
}); });
}, },
save() {
let body = [];
//
spanMethod({ row, column, rowIndex, columnIndex }) {
console.log(row, column, rowIndex, columnIndex);
if(columnIndex == 0 || columnIndex == 1 || columnIndex == 5){
for (let i = 0; i < this.spanRow.length; i++) {
if (rowIndex == this.spanRow[i].startRow) {
return {
rowspan: Number(this.spanRow[i].endRow - this.spanRow[i].startRow) + 1,
colspan: 1
};
} else if (this.spanRow[i].startRow < rowIndex && rowIndex <= this.spanRow[i].endRow) {
return {
rowspan: 0,
colspan: 0
}
}
}
}
// if (columnIndex == 3) {
// for (let i = 0; i < this.spanRow.length; i++) {
// if (rowIndex == this.spanRow[i].startRow) {
// return {
// rowspan: Number(this.spanRow[i].endRow - this.spanRow[i].startRow) + 1,
// colspan: 1
// };
// }
// }
// }
// if (columnIndex == 4) {
// for (let i = 0; i < this.spanRow.length; i++) {
// if (rowIndex == this.spanRow[i].startRow) {
// return {
// rowspan: Number(this.spanRow[i].endRow - this.spanRow[i].startRow) + 1,
// colspan: 1
// };
// } else if (this.spanRow[i].startRow < rowIndex && rowIndex <= this.spanRow[i].endRow) {
// return {
// rowspan: 0,
// colspan: 0
// }
// }
// }
// }
},
//
parseSpanRow(arrayData,key) {
let spanRow = [];
let preVal = '', curVal = '';
let startRow = 0;
for (let i = 0; i < arrayData.length; i++) {
if (i == 0) {
preVal = arrayData[i][key];
curVal = arrayData[i][key];
} else {
curVal = arrayData[i][key];
if (preVal !== curVal) {
if (startRow !== i - 1) spanRow.push({ startRow, endRow: i - 1 });
startRow = i;
preVal = arrayData[i][key];
}
if (i == arrayData.length - 1 && preVal === curVal){
spanRow.push({ startRow, endRow: i });
}
}
}
return spanRow
},
btnSave() {
let body = {
sysParmTypeId:this.sysParmTypeId,
details:[]
}
if (this.sysParms.length < 1) return; if (this.sysParms.length < 1) return;
this.sysParms.forEach((item) => { this.sysParms.forEach((item) => {
body.push({
sysParmId: item.id,
body.details.push({
sysParmId: item.sysParmId,
organizationUnitId: item.organizationUnitId, organizationUnitId: item.organizationUnitId,
parmValue: item.sysParmValueName, parmValue: item.sysParmValueName,
remark: item.valueRemark, remark: item.valueRemark,

Loading…
Cancel
Save