12 changed files with 329 additions and 138 deletions
-
4src/components/customerOrg/ContactPerson.vue
-
2src/components/customerOrg/customerOrgRegister.vue
-
54src/components/patientRegister/LisRequest.vue
-
238src/components/patientRegister/MergeAsbitem.vue
-
30src/components/patientRegister/PatientRegisterEdit.vue
-
4src/components/patientRegister/PatientRegisterItem.vue
-
4src/components/patientRegister/PatientRegisterList.vue
-
27src/components/patientRegister/patientRegisterAsbItem.vue
-
2src/components/patientRegister/patientRegisterQuery.vue
-
3src/store/index.js
-
48src/views/customerOrg/customerOrg.vue
-
51src/views/customerOrg/patientRegister.vue
@ -0,0 +1,238 @@ |
|||
<template> |
|||
<div> |
|||
<div> |
|||
<el-table :data="tableData" border style="width: 100%" row-key="id" height="300" highlight-current-row size="small"> |
|||
<el-table-column label="组合项目" width="120" prop="asbitemName" /> |
|||
<el-table-column label="操作" width="130" prop="operate"> |
|||
<template slot-scope="scope"> |
|||
<el-select v-model="scope.row.operate" placeholder="请操作方式" size="small" :disabled="scope.row.disabled" |
|||
@change="changeOperate(scope.row)"> |
|||
<el-option v-for="(item, index) in options" :key="index" :label="item.label" :value="item.value" /> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="条码分组" width="120" prop="sampleGroupName" /> |
|||
<el-table-column label="检验申请号" width="180" prop="lisRequestNo"> |
|||
<template slot-scope="scope"> |
|||
<el-select v-model="scope.row.lisRequestNo" size="small" :disabled="scope.row.disabled"> |
|||
<el-option v-for="(item, index) in lisRequestNos" :key="index" :label="item.lisRequestNo" |
|||
:value="item.lisRequestId" /> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<!-- 按钮区域 --> |
|||
<div style="display: flex; margin-top: 30px; margin-left: 280px"> |
|||
<div style="margin-left: 10px"> |
|||
<el-button type="primary" @click="submit" style="width:80px;">合并项目</el-button> |
|||
</div> |
|||
<div style="margin-left: 10px"> |
|||
<el-button type="info" @click="lisPrint('0002', false)" style="width:80px;">取消合并</el-button> |
|||
</div> |
|||
<div style="margin-left: 10px"> |
|||
<el-button type="danger" @click="patientRegister.mergeAsbitemVisble = false" style="width:80px;">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapState } from "vuex"; |
|||
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|||
import { examinationgender } from "@/request/systemapi"; |
|||
import { dddw, arrayExistObj } from "../../utlis/proFunc"; |
|||
// import |
|||
export default { |
|||
props: ["id", "brushTimes"], |
|||
data() { |
|||
return { |
|||
tableData: [], //组合项目数据 |
|||
options: [ |
|||
{ label: "无", value: "no" }, |
|||
{ label: "追加到以前条码", value: "append" }, |
|||
{ label: "申请新的条码", value: "new" }, |
|||
], //操作方式 |
|||
lisRequestNos: [], //可选条码 |
|||
}; |
|||
}, |
|||
|
|||
created() { }, |
|||
|
|||
mounted() { |
|||
this.getAsbItemList(this.id); |
|||
}, |
|||
computed: { |
|||
...mapState(["patientRegister"]), |
|||
}, |
|||
methods: { |
|||
parseData(asbItem) { |
|||
// "registerAsbitemId": "3a0d2e90-db36-09fe-4210-53fadb4f7d02", |
|||
// asbitemId": "3a0c5600-ae78-9ed4-e3c1-993ef41d3c51", |
|||
// "asbitemName": "外科", |
|||
// "isCharge": "N", |
|||
// "completeFlag": "0", |
|||
// "sampleGroupId": "3a0c55c2-0f26-71a1-1f1a-ebbcbd77105b", |
|||
// "sampleGroupName": "测试新增1", |
|||
// "lisRequestId": "3a0d2fa9-aaba-4837-0775-20d13937f357", |
|||
// "lisRequestNo": "T202308220016" |
|||
if (asbItem.length < 1) return; |
|||
let lfind = -1; |
|||
this.lisRequestNos = []; |
|||
|
|||
asbItem.forEach((e) => { |
|||
if (e.lisRequestNo) { |
|||
e["operate"] = "no"; |
|||
e["disabled"] = true; |
|||
|
|||
lfind = arrayExistObj( |
|||
this.lisRequestNos, |
|||
"lisRequestNo", |
|||
e.lisRequestNo |
|||
); |
|||
if (lfind == -1) { |
|||
this.lisRequestNos.push({ |
|||
sampleGroupId: e.sampleGroupId, |
|||
lisRequestNo: e.lisRequestNo, |
|||
lisRequestId: e.lisRequestId, |
|||
}); |
|||
} |
|||
} else { |
|||
e["disabled"] = false; |
|||
} |
|||
return e; |
|||
}); |
|||
}, |
|||
|
|||
getAsbItemList(id) { |
|||
this.tableData = []; |
|||
postapi( |
|||
`/api/app/lisrequest/getregisterasbitemlisrequest?PatientRegisterId=${id}` |
|||
).then((res) => { |
|||
this.tableData = res.data; |
|||
this.parseData(this.tableData); |
|||
}); |
|||
}, |
|||
|
|||
//操作方式 |
|||
changeOperate(row) { |
|||
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() { |
|||
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 { |
|||
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); |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
|
|||
|
|||
}, |
|||
|
|||
//监听事件 |
|||
watch: { |
|||
//itemId','ReferenceRangeTypeFlag' |
|||
// "id"(newVal, oldVal) { |
|||
// if (newVal != oldVal && newVal != "") { |
|||
// this.getAsbItemList(newVal); |
|||
// } |
|||
// }, |
|||
|
|||
brushTimes(newVal, oldVal) { |
|||
if (newVal != oldVal && newVal != "") { |
|||
this.getAsbItemList(this.id); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style scoped> |
|||
::v-deep .el-input__inner { |
|||
/*text-align: center;*/ |
|||
padding-left: 1px; |
|||
padding-right: 1px; |
|||
} |
|||
|
|||
::v-deep .el-table th.el-table__cell { |
|||
/*text-align: center;*/ |
|||
padding-left: 1px; |
|||
padding-right: 1px; |
|||
} |
|||
|
|||
::v-deep .el-table td.el-table__cell { |
|||
padding-left: 1px; |
|||
padding-right: 1px; |
|||
} |
|||
|
|||
::v-deep .el-table .cell { |
|||
padding-left: 1px; |
|||
padding-right: 1px; |
|||
} |
|||
|
|||
::v-deep input[type="number"]::-webkit-inner-spin-button, |
|||
input[type="number"]::-webkit-outer-spin-button { |
|||
-webkit-appearance: none !important; |
|||
margin: 0 !important; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue