Browse Source

SSSSS

master
pengjun 2 years ago
parent
commit
d0f46ee210
  1. 84
      src/components/doctorCheck/RegisterCheckList.vue
  2. 157
      src/components/patientRegister/PatientLis.vue
  3. 135
      src/components/patientRegister/PatientLisRequest.vue
  4. 1
      src/components/patientRegister/PatientRegisterEdit.vue
  5. 9
      src/components/patientRegister/PatientRegisterList.vue

84
src/components/doctorCheck/RegisterCheckList.vue

@ -1,13 +1,13 @@
<template>
<div>
<!-- :row-class-name="tableRowClassName" -->
<el-table :data="doctorCheck.RegisterCheckList" style="width: 100%"
:height="window.pageHeight < 600 ? 400:window.pageHeight-200"
border highlight-current-row ref='doctorCheck_RegisterCheckList'
@row-click="rowClick">
<el-table :data="doctorCheck.RegisterCheckList" style="width: 100%;"
:height="window.pageHeight < 600 ? 400 : window.pageHeight - 200" border highlight-current-row
ref='doctorCheck_RegisterCheckList' @row-click="rowClick" :row-style="{ height: '28px' }">
<el-table-column prop="asbitemName" label="组合项目" width="198">
<template slot-scope="scope">
<div>
<div :style="`padding: 0 5px;color: ${setColor(scope.row.completeFlag)};`">
<!--
<el-tooltip class="item" effect="dark" content="未检" placement="left">
<i v-show="scope.row.completeFlag == '0'" class="el-icon-circle-plus" style="font-size: 18px;color: red;"></i>
</el-tooltip>
@ -17,8 +17,9 @@
<el-tooltip class="item" effect="dark" content="弃检" placement="left">
<i v-show="scope.row.completeFlag == '2'" class="el-icon-remove" style="font-size: 18px;"></i>
</el-tooltip>
{{scope.row.asbitemName}}
</div>
-->
{{ scope.row.asbitemName }}
</div>
</template>
</el-table-column>
</el-table>
@ -32,23 +33,23 @@ export default {
components: {},
data() {
return {
};
},
created() {},
created() { },
//
mounted() {
this.registerCheckList(this.dataTransOpts.tableS.patient_register.id)
this.registerCheckList(this.dataTransOpts.tableS.patient_register.id)
},
computed:{
...mapState(['window','dataTransOpts','dict','doctorCheck']),
computed: {
...mapState(['window', 'dataTransOpts', 'dict', 'doctorCheck']),
},
methods: {
tableRowClassName({row, rowIndex}) {
tableRowClassName({ row, rowIndex }) {
//console.log('tableRowClassName',rowIndex,row)
if (row.completeFlag === '0') {
return 'danger'; //
@ -56,11 +57,28 @@ export default {
return 'info'; //
}
return '';
},
setColor(completeFlag) {
let color = '#FF5054'
switch (completeFlag) {
case '1':
color = '#52555F'
break;
case '2':
color = '#396FFA'
break;
default:
break;
}
return color
},
//
rowClick(row){
rowClick(row) {
console.log('rowClick')
this.doctorCheck.RegisterCheckId = row.id
this.dataTransOpts.tableS.register_check.id = row.id
@ -72,8 +90,8 @@ export default {
},
//
registerCheckList(patientRegisterId){
if(!patientRegisterId){
registerCheckList(patientRegisterId) {
if (!patientRegisterId) {
this.doctorCheck.RegisterCheckList = []
this.doctorCheck.RegisterCheckId = ''
this.dataTransOpts.tableS.register_check.id = ''
@ -85,19 +103,19 @@ export default {
}
console.log(`/api/app/register-check/register-check-or-asbitem/${patientRegisterId}`)
getapi(`/api/app/register-check/register-check-or-asbitem/${patientRegisterId}`)
.then((res) => {
.then((res) => {
console.log("registerCheckList", res.data);
if (res.code != -1) {
this.doctorCheck.RegisterCheckList = res.data;
// 1
if(res.data.length > 0) {
if (res.data.length > 0) {
this.doctorCheck.RegisterCheckId = res.data[0].id
this.dataTransOpts.tableS.register_check.id = res.data[0].id
this.dataTransOpts.tableS.register_check.id = res.data[0].id
// this.doctorCheck.RegisterCheckEdit = res.data[0]
this.$refs['doctorCheck_RegisterCheckList'].setCurrentRow(res.data[0])
}else{
} else {
this.dataTransOpts.tableS.register_check.id = ''
}
@ -106,30 +124,28 @@ export default {
this.dataTransOpts.refresh.register_check_item.M++ //
}, 10);
}
})
.catch((err) => {
this.$message.error({ showClose: true, message: `操作失败,原因:${err}`});
});
})
.catch((err) => {
this.$message.error({ showClose: true, message: `操作失败,原因:${err}` });
});
},
},
//
watch: {
watch: {
//
"dataTransOpts.refresh.register_check.M":{
"dataTransOpts.refresh.register_check.M": {
// immediate:true,
handler(newVal, oldVal) {
console.log(`watch 组合项目列表 newVal: ${newVal} oldVal: ${oldVal} patient_register.id: ${this.dataTransOpts.tableS.patient_register.id}`);
this.registerCheckList(this.dataTransOpts.tableS.patient_register.id)
console.log(`watch 组合项目列表 newVal: ${newVal} oldVal: ${oldVal} patient_register.id: ${this.dataTransOpts.tableS.patient_register.id}`);
this.registerCheckList(this.dataTransOpts.tableS.patient_register.id)
}
},
}
};
</script>
<style scoped>
</style>
<style scoped></style>

157
src/components/patientRegister/PatientLis.vue

@ -419,163 +419,6 @@ export default {
})
},
//
async lisRequest(prId) {
let isPrintLisRequest = false;
let res = null;
if (prId.length < 1) {
this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!" });
return;
}
try {
res = await postapi(
`/api/app/lisrequest/setlisrequest?PatientRegisterId=${prId}`
);
console.log(
`/api/app/lisrequest/setlisrequest?PatientRegisterId=${prId}`,
res
);
} catch (error) {
return;
}
if (res.code > -1) {
isPrintLisRequest = true;
}
//
if (res.code == -1 && res.message.indexOf("已申请") > -1) {
isPrintLisRequest = true;
}
if (!isPrintLisRequest) return;
try {
await this.$confirm("是否打印检验申请单?", "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
type: "info",
showClose: false,
closeOnClickModal: false,
closeOnPressEscape: false,
});
} catch (error) {
return;
}
//
this.lisPrint(prId, "0003", false);
},
//
lisPrint(prId, ReportCode, isPreview) {
if (!this.$peisAPI) {
this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" });
return;
}
let token = window.sessionStorage.getItem("token");
let user = window.sessionStorage.getItem("user");
let toOutShell = {
ReportCode,
token,
isBuildImage: 'N',
IsUploadPdf: 'N',
preViewCanPrint: "N",
Parameters: [
{ Name: "printer", Value: user },
{ Name: "hisLog", Value: "pic/hisLog.jpg" },
],
BusinessCode: prId
};
if (isPreview) {
/*
postapi(
`/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}`
)
.then((res) => {
if (res.code != -1) {
toOutShell.ReportTable = { lisRequest: res.data };
console.log(
"JSON.stringify(toOutShell)",
JSON.stringify(toOutShell)
);
return this.$peisAPI.printPre(JSON.stringify(toOutShell));
}
})
.catch((err) => {
this.$message.warning(err);
});
*/
this.$peisAPI.printPre(JSON.stringify(toOutShell))
.then(res => {
console.log('this.$peisAPI.printPre', res)
if (JSON.parse(res).code < 0) {
this.$message.warning({ showClose: true, message: JSON.parse(res).message });
}
})
.catch((err) => {
console.log('打印检验条码错误', err)
this.$message.warning({ showClose: true, message: `${err}` });
});
} else {
/*
postapi(
`/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}`
)
.then((res) => {
if (res.code != -1) {
toOutShell.ReportTable = { lisRequest: res.data };
console.log(
"JSON.stringify(toOutShell)",
JSON.stringify(toOutShell)
);
return this.$peisAPI.print(JSON.stringify(toOutShell));
}
})
.then((res) => {
//console.log("res", res);
if (JSON.parse(res).code >= 0) {
// /api/app/lisrequest/updatelisrequestisprint
// {
// "operateType": 0, 1.PatientRegisterId 2.LisRequestId
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
// }
return postapi("/api/app/lisrequest/updatelisrequestisprint", {
operateType: 1,
patientRegisterId: prId,
});
}
})
.catch((err) => {
this.$message.warning(err);
});
*/
this.$peisAPI.print(JSON.stringify(toOutShell))
.then(res => {
if (JSON.parse(res).code < 0) {
this.$message.warning({ showClose: true, message: JSON.parse(res).message });
} else {
return postapi("/api/app/lisrequest/updatelisrequestisprint", {
operateType: 1,
patientRegisterId: prId,
});
}
})
.then(res => {
if (res && res.code < 0) {
this.$message.error({ showClose: true, message: `${res.message}` });
}
})
.catch((err) => {
console.log('打印检验条码错误', err)
this.$message.error({ showClose: true, message: `${err}` });
});
}
},
//pacs
pacsPrint(prId, ReportCode, isPreview) {
if (!this.$peisAPI) {

135
src/components/patientRegister/PatientLisRequest.vue

@ -1,6 +1,6 @@
<template>
<div style="display: flex;">
<div>
<div :style="'width:' + (window.pageWidth - 200 - 145) + 'px;'">
<el-table :data="dataTransOpts.tableM.lis_request" border @row-click="rowClick"
:height="window.pageHeight < 600 ? 140 : Math.floor((window.pageHeight - 250) * 2 / 5)" size="small"
highlight-current-row ref="lis_request">
@ -40,27 +40,29 @@
<el-button type="success" class="commonbutton" @click="btnChoose(true)">全选</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '取消全选')" class="listBtn">
<el-button type="success" class="commonbutton" @click="btnChoose(false)">取消全选</el-button>
<el-button type="success" class="deleteButton" @click="btnChoose(false)">取消全选</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '打印')" class="listBtn">
<el-button type="primary" class="commonbutton" @click="lisPrint(false)">打印条码</el-button>
<el-button type="primary" class="commonbutton" @click="btnLisPrint(false)">打印条码</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '预览条码')" class="listBtn">
<el-button type="danger" class="deleteButton" @click="lisPrint(true)">预览条码</el-button>
<el-button type="danger" class="commonbutton" @click="btnLisPrint(true)">预览条码</el-button>
</div>
<!-- 预留
<div v-show="checkPagePriv(pagePriv.privs, '发送申请')" class="listBtn">
<el-button type="danger" class="deleteButton" @click="LisRequest(true)">发送申请</el-button>
<el-button type="danger" class="commonbutton" @click="LisRequest(true)">发送申请</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '撤消申请')" class="listBtn">
<el-button type="danger" class="deleteButton" @click="LisRequest(false)">撤消申请</el-button>
</div>
-->
</div>
</div>
</template>
<script>
import moment from "moment";
import { mapState } from "vuex";
import { dddw, getPagePriv, checkPagePriv, } from "../../utlis/proFunc";
import { arrayExistObj, dddw, getPagePriv, checkPagePriv, deepCopy, } from "../../utlis/proFunc";
import { getapi, postapi, putapi, deletapi } from "../../api/api";
import LisRequest from "./LisRequest.vue";
@ -72,7 +74,7 @@ export default {
routeUrlorPageName: 'patientLis', //
privs: [] //
},
chooseRows:[], //
chooseRows: [], //
};
},
@ -94,7 +96,7 @@ export default {
...mapState(["window", "dataTransOpts", "dict", "patientRegister"]),
},
methods: {
dddw, moment,checkPagePriv,
dddw, moment, checkPagePriv,
//
colorTrans(intDataColor) {
@ -104,17 +106,118 @@ export default {
},
//
rowClick(row){
rowClick(row) {
this.chooseRows = [row]
},
// /
btnChoose(isChooseAll){
// this.$refs.singleTable.setCurrentRow(row);
// lis_request
btnChoose(isChooseAll) {
if (isChooseAll) {
this.chooseRows = deepCopy(this.dataTransOpts.tableM.lis_request)
this.chooseRows.forEach(e => {
this.$refs['lis_request'].setCurrentRow(e);
});
} else {
this.chooseRows = []
this.$refs['lis_request'].setCurrentRow();
}
},
//
async btnLisRequest(isRequest) {
if (this.chooseRows.length == 0) {
this.$message.warning({ showClose: true, message: "请先选择要操作的条码记录!" })
return
}
console.log('btnLisRequest',isRequest)
},
//
async btnLisPrint(isPreview) {
if (!this.$peisAPI) {
this.$message.warning({ showClose: true, message: "此功能需要在壳客户端中方可运行!" })
return
}
if (this.chooseRows.length == 0) {
this.$message.warning({ showClose: true, message: "请先选择要操作的条码记录!" })
return
}
if (isPreview) {
lisPrint(this.chooseRows[0].lisRequestId,"0003",isPreview)
return
}
//
for (let i = 0; i < this.chooseRows.length; i++) {
let e = this.chooseRows[i];
try {
let err = await lisPrint(e.lisRequestId,"0003",isPreview)
if(!err){
let lfind = arrayExistObj(this.dataTransOpts.tableM.lis_request,"lisRequestId",e.lisRequestId)
if(lfind > -1) this.dataTransOpts.tableM.lis_request[lfind].isPrint = "Y"
}
} catch (error) {
console.log(`打印条码或更新条码打印状态失败,原因:${error}`)
this.$message.warning({ showClose: true, message: `打印条码或更新条码打印状态失败,原因:${error}`})
}
}
},
//
async lisPrint(lisRequestId, ReportCode, isPreview) {
let err = ""
let token = window.sessionStorage.getItem("token");
let user = window.sessionStorage.getItem("user");
let toOutShell = {
ReportCode,
token,
IsMoreLabel: 'N',
isBuildImage: 'N',
IsUploadPdf: 'N',
preViewCanPrint: "N",
Parameters: [
{ Name: "printer", Value: user },
{ Name: "hisLog", Value: "pic/hisLog.jpg" },
],
BusinessCode: lisRequestId
};
console.log('this.$peisAPI.print', toOutShell)
if (isPreview) {
this.$peisAPI.printPre(JSON.stringify(toOutShell))
.then(res => {
console.log('this.$peisAPI.printPre', res)
if (JSON.parse(res).code < 0) {
this.$message.warning({ showClose: true, message: JSON.parse(res).message });
}
})
.catch((err) => {
console.log('打印检验条码错误', err)
this.$message.warning({ showClose: true, message: `${err}` });
});
} else {
try {
let lres = await this.$peisAPI.print(JSON.stringify(toOutShell))
let Jres = JSON.parse(lres)
if(Jres.code < 0){
err = Jres.message
console.log('打印检验条码错误', err)
this.$message.error({ showClose: true, message: `打印检验条码错误 ${err}` });
}else{
//
// let res = await postapi('/api/app/lisrequest/updatelisrequestisprint',{});
// if(res.code < 0){
// err = res.message
// this.$message.error({ showClose: true, message: ` ${err}` });
// }
}
} catch (error) {
err = `${error}`
}
}
return err
},
//
retrieve_lis_request(patientRegisterId) {
@ -129,8 +232,6 @@ export default {
}
})
},
},
//
@ -149,7 +250,7 @@ export default {
<style scoped>
@import "../../assets/css/global.css";
.box {
display: flex;
.listBtn {
padding: 2px 0;
}
</style>

1
src/components/patientRegister/PatientRegisterEdit.vue

@ -1646,6 +1646,7 @@ export default {
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' },
],
};
console.log('this.$peisAPI.print',toOutShell)
if (isPreview) {
this.$peisAPI.printPre(JSON.stringify(toOutShell))
.then(res => {

9
src/components/patientRegister/PatientRegisterList.vue

@ -26,10 +26,10 @@
<div v-else-if="dropCol[index].prop == 'guidePrintTimes'">
<i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0" style="font-size: 20px; color: green" />
</div>
<div v-else-if="dropCol[index].prop == 'isLock'
|| dropCol[index].prop == 'isVip'
|| dropCol[index].prop == 'isUpload'
">
<div v-else-if="dropCol[index].prop == 'isLock'">
<i class="el-icon-lock" v-if="scope.row.isLock == 'Y'" style="font-size: 20px; color: red" />
</div>
<div v-else-if="dropCol[index].prop == 'isVip' || dropCol[index].prop == 'isUpload'">
{{ scope.row[dropCol[index].prop] == "Y" ? "是" : "否" }}
</div>
<div v-else-if="dropCol[index].prop == 'customerOrgParentName'">
@ -1130,6 +1130,7 @@ export default {
BusinessCode:prId
};
console.log('this.$peisAPI.print',toOutShell)
if (isPreview) {
/*
postapi(

Loading…
Cancel
Save