确定
+
+ 条码打印
+
关闭
@@ -40,7 +44,7 @@ import { examinationgender } from "@/request/systemapi";
import { dddw, arrayExistObj } from "../../utlis/proFunc";
// import
export default {
- props: ["id","brushTimes"],
+ props: ["id", "brushTimes"],
data() {
return {
tableData: [], //组合项目数据
@@ -60,6 +64,7 @@ export default {
methods: {
parseData(asbItem) {
+ // "registerAsbitemId": "3a0d2e90-db36-09fe-4210-53fadb4f7d02",
// asbitemId": "3a0c5600-ae78-9ed4-e3c1-993ef41d3c51",
// "asbitemName": "外科",
// "isCharge": "N",
@@ -70,6 +75,8 @@ export default {
// "lisRequestNo": "T202308220016"
if (asbItem.length < 1) return;
let lfind = -1;
+ this.lisRequestNos = [];
+
asbItem.forEach(e => {
if (e.lisRequestNo) {
e['operate'] = 'no';
@@ -94,9 +101,8 @@ export default {
getAsbItemList(id) {
this.tableData = [];
- //http://140.143.162.39:9529/api/app/lis-request/register-asbitem-lis-request/3a0d2e90-da68-3746-6775-bf17e5f9b295
- getapi(
- `/api/app/lis-request/register-asbitem-lis-request/${id}`
+ postapi(
+ `/api/app/lisrequest/getregisterasbitemlisrequest?PatientRegisterId=${id}`
).then((res) => {
this.tableData = res.data;
this.parseData(this.tableData);
@@ -105,35 +111,128 @@ export default {
//操作方式
changeOperate(row) {
- if(row.operate == 'append'){
- //2期 考虑根据分组ID 过滤 lisRequestNos
- }else{
+ let lfind = -1
+ if (row.operate == 'append') {
+ if (row.sampleGroupId) {
+ lfind = arrayExistObj(this.lisRequestNos, 'sampleGroupId', row.sampleGroupId);
+ if (lfind > -1) {
+ row.lisRequestNo = this.lisRequestNos[lfind].lisRequestNo;
+ row.lisRequestId = this.lisRequestNos[lfind].lisRequestId;
+ }
+ }
+ } else {
row.lisRequestNo = '';
row.lisRequestId = '';
- }
+ }
},
//确定
submit() {
- this.$refs["form"].validate((v) => {
- if (v) {
- if (!this.id) {
- postapi("/api/app/reference-range", this.form).then((res) => {
- this.$message.success("新增成功");
- this.getlist(this.itemId, this.ReferenceRangeTypeFlag);
- console.log("res", res);
- this.id = res.data.id;
- });
+ let append = [], news = [];
+ let validMsg = '', lfind = -1;
+
+ this.tableData.forEach(item => {
+ if (item.operate == 'append') {
+ if (item.lisRequestId) {
+ lfind = arrayExistObj(append, 'lisRequestId', item.lisRequestId);
+ if (lfind = -1) {
+ append.push(
+ {
+ lisRequestId: item.lisRequestId,
+ registerAsbitemIds: [item.registerAsbitemId],
+ }
+ )
+ } else {
+ append[lfind]['registerAsbitemIds'].push(item.registerAsbitemId);
+ }
} else {
- putapi(`/api/app/reference-range/${this.id}`, this.form).then(
- (res) => {
- this.$message.success("修改成功");
- this.getlist(this.itemId, this.ReferenceRangeTypeFlag);
- }
- );
+ validMsg = row.asbitemName + '项目,未选择追加到哪个检验申请单号!'
}
+ } else if (item.operate == 'new') {
+ news.push(item.registerAsbitemId);
}
});
+
+ if (validMsg) {
+ this.$message.warning(validMsg);
+ return;
+ }
+
+ if (append.length > 0) {
+ postapi('/api/app/lisrequest/appendlisrequestmany', append)
+ .then(res => {
+ if (res.code != -1) {
+ this.$message.success('项目追加到检验申请单成功!');
+ this.getAsbItemList(this.id);
+ }
+ });
+ }
+ if (news.length > 0) {
+ postapi('/api/app/lisrequest/addlisrequest', news)
+ .then(res => {
+ if (res.code != -1) {
+ this.$message.success('项目创建检验申请单成功!');
+ this.getAsbItemList(this.id);
+ }
+ });
+ }
+ },
+
+ //条码打印
+ lisPrint(ReportCode, isPreview) {
+
+ let token = localStorage.getItem('token');
+ let user = localStorage.getItem('user');
+ let toOutShell = {
+ ReportCode, token,
+ Parameters: [
+ { Name: 'printer', Value: user },
+ { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
+ ],
+ };
+
+
+ if (isPreview) {
+ //http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295
+ //this.multipleSelection.forEach((item,index) =>{
+ postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.id}`)
+ .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);
+ });
+ // });
+ } else {
+
+ postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.id}`)
+ .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 => {
+ if (res.toLowerCase() == 'success') {
+ //更新打印状态 /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: this.id })
+ }
+ })
+ .catch(err => {
+ this.$message.warning(err);
+ });
+
+ }
},
},
@@ -145,7 +244,7 @@ export default {
// this.getAsbItemList(newVal);
// }
// },
-
+
"brushTimes"(newVal, oldVal) {
if (newVal != oldVal && newVal != "") {
this.getAsbItemList(this.id);
diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue
index d92366f..af72abe 100644
--- a/src/components/patientRegister/PatientRegisterEdit.vue
+++ b/src/components/patientRegister/PatientRegisterEdit.vue
@@ -397,7 +397,7 @@
-
+
@@ -423,7 +423,7 @@ export default {
data() {
return {
apiurl: mm.apiurl,
- brushTimes:0,
+ brushTimes: 0,
form: {
id: "", //id
patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
@@ -753,7 +753,7 @@ export default {
.then(res => {
if (res.toLowerCase() == 'success') {
//更新打印次数
- return postapi('api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
+ return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
}
})
.then(res => {
@@ -776,15 +776,46 @@ export default {
},
//检验申请
- lisRequest() {
+ async lisRequest() {
+ let isPrintLisRequest = false
+ let res = null
if (this.form.id.length < 1) {
this.$message.info("人员信息尚未保存,不可执行此操作!");
return;
}
- getapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`)
- .then(res => {
- if (res.code != -1) this.$message.info("发送检验申请成功!");
+
+ try {
+ res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`);
+ console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`, res)
+ } catch (error) {
+ return;
+ }
+ if (res.Code != -1) {
+ this.$message.info("发送检验申请成功!");
+ 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('0003', false);
},
//条码打印
@@ -806,9 +837,9 @@ export default {
if (isPreview) {
- //http://140.143.162.39:9529/api/app/print-report/lis-request-report/3a0c7f6e-3ff1-fef6-c568-6f541aabe87a
+ //http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295
//this.multipleSelection.forEach((item,index) =>{
- getapi(`/api/app/print-report/lis-request-report/${this.form.id}`)
+ postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`)
.then((res) => {
if (res.code != -1) {
toOutShell.ReportTable = { lisRequest: res.data };
@@ -822,7 +853,7 @@ export default {
// });
} else {
- getapi(`/api/app/print-report/lis-request-report/${this.form.id}`)
+ postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`)
.then((res) => {
if (res.code != -1) {
toOutShell.ReportTable = { lisRequest: res.data };
@@ -832,22 +863,15 @@ export default {
})
.then(res => {
if (res.toLowerCase() == 'success') {
- //更新打印次数
- return postapi('api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
+ //更新打印状态 /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: this.form.id })
}
- })
- .then(res => {
- if (res.code != -1) {
- lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
- if (lfind > -1) {
- if (this.patientRegister.prList[lfind].guidePrintTimes) {
- this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
- } else {
- this.patientRegister.prList[lfind].guidePrintTimes = 1;
- }
- }
- }
- })
+ })
.catch(err => {
this.$message.warning(err);
});
@@ -920,4 +944,5 @@ export default {
text-align: left;
padding-left: 5px;
padding-right: 15px;
-}
+}
+
diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue
index 8bb5a14..dc96350 100644
--- a/src/components/patientRegister/PatientRegisterList.vue
+++ b/src/components/patientRegister/PatientRegisterList.vue
@@ -1,9 +1,8 @@
-
-
+
+
@@ -14,8 +13,8 @@
-
-
+
+
@@ -177,15 +176,6 @@
指引单预览
-
- 检验申请
-
-
- 检验条码
-
-
- 补打条码
-
@@ -233,7 +223,10 @@ export default {
guideMsg: 'guideMsg',
tabChoosed: "1",
formInitData: {}, //体检登记初始表单数据
- editTimes: 0,
+ editTimes: 0,
+
+ rClickRow: null, //右击的行
+ rClickColumn: null, //右击的列(预留)
};
},
@@ -251,11 +244,12 @@ export default {
async guidePrint(ReportCode, isPreview) {
let token = localStorage.getItem('token');
let user = localStorage.getItem('user');
- let toOutShell = { ReportCode, token,
+ let toOutShell = {
+ ReportCode, token,
Parameters: [
{ Name: 'printer', Value: user },
- { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
- ],
+ { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
+ ],
};
let lfind = -1;
@@ -464,11 +458,11 @@ export default {
async query() {
this.patientRegister.prList = [];
const loading = this.$loading({
- lock: true,
- text: 'Loading',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- });
+ lock: true,
+ text: 'Loading',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ });
let body = {}
@@ -504,12 +498,12 @@ export default {
console.log('/api/app/patientregister/getlistinfilter', body)
postapi('/api/app/patientregister/getlistinfilter', body)
.then((res) => {
- if(res.code != -1 ){
+ if (res.code != -1) {
this.patientRegister.prList = res.data.items;
- }
+ }
loading.close();
})
- .catch((err) =>{
+ .catch((err) => {
loading.close();
});
// try {
@@ -520,6 +514,218 @@ export default {
// }
},
+ //右击菜单
+ onCellRightClick(row, column) {
+ this.rClickRow = { ...row }; //右击的行
+ this.rClickColumn = { ...column }; //右击的列(预留)
+ console.log(row, column.property);
+ },
+ onContextmenu(event) {
+ //console.log('onContextmenu',event);
+ if (!this.rClickRow) return false;
+ let row = { ...this.rClickRow };
+ this.$contextmenu({
+ items: [
+ {
+ label: "发送检验申请",
+ onClick: () => {
+ this.lisRequest(row.id);
+ }
+ },
+ {
+ label: "预览检验条码",
+ onClick: () => {
+ this.lisPrint(row.id, '0002', true);
+ }
+ },
+ {
+ label: "打印检验条码",
+ onClick: () => {
+ this.lisPrint(row.id, '0002', false);
+ }
+ },
+ {
+ label: "预览Pacs条码",
+ onClick: () => {
+ this.pacsPrint(row.id, '0004', true);
+ }
+ },
+ {
+ label: "打印Pacs条码",
+ onClick: () => {
+ this.pacsPrint(row.id, '0004', false);
+ }
+ },
+ ],
+ event,
+ //x: event.clientX,
+ //y: event.clientY,
+ customClass: "custom-class",
+ zIndex: 3,
+ minWidth: 80,
+ });
+
+ this.rClickRow = null;
+ return false;
+ },
+
+ //检验申请
+ async lisRequest(prId) {
+ let isPrintLisRequest = false
+ let res = null
+ if (prId.length < 1) {
+ this.$message.info("人员信息尚未保存,不可执行此操作!");
+ 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) {
+ this.$message.info("发送检验申请成功!");
+ 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) {
+
+ let token = localStorage.getItem('token');
+ let user = localStorage.getItem('user');
+ let toOutShell = {
+ ReportCode, token,
+ Parameters: [
+ { Name: 'printer', Value: user },
+ { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
+ ],
+ };
+
+
+ if (isPreview) {
+ //http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295
+ //this.multipleSelection.forEach((item,index) =>{
+ 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);
+ });
+ // });
+ } 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 => {
+ if (res.toLowerCase() == 'success') {
+ //更新打印状态 /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);
+ });
+
+ }
+ },
+
+ //pacs条码打印
+ pacsPrint(prId, ReportCode, isPreview) {
+
+ let token = localStorage.getItem('token');
+ let user = localStorage.getItem('user');
+ let toOutShell = {
+ ReportCode, token,
+ Parameters: [
+ { Name: 'printer', Value: user },
+ { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
+ ],
+ };
+
+
+ if (isPreview) {
+ //http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295
+ //this.multipleSelection.forEach((item,index) =>{
+ 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);
+ });
+ // });
+ } 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 => {
+ if (res.toLowerCase() == 'success') {
+ //更新打印状态 /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);
+ });
+
+ }
+ },
+
},
//监听事件
diff --git a/src/main.js b/src/main.js
index 0ec0f6d..eae3c06 100644
--- a/src/main.js
+++ b/src/main.js
@@ -8,8 +8,10 @@ import axios from "axios";
import JsonExcel from "vue-json-excel"; //vue全局导入导出excel
import Print from "vue-print-nb";
import Meta from 'vue-meta'
+import Contextmenu from 'vue-contextmenujs' //'vue-contextmenu'
+Vue.use(Contextmenu);
Vue.use(Meta);
Vue.use(ElementUI);