Merge remote-tracking branch 'origin/dev_ksck_z' into dev_ksck_z

20240912_adapter_z
anthonywj 8 months ago
commit 5470175486

@ -26,6 +26,12 @@ export function downloadPrescribe(query) {
}
export function deleteDataByCode(query) {
return axios({
url: "/udiwms/basic/sk/prescribe/deleteDataByCode",
method: "post",
data: query
});
}

@ -26,6 +26,14 @@ export function downloadSick(query) {
});
}
export function prescribeSave(query) {
return axios({
url: "/udiwms/basic/sk/prescribe/save",
method: "post",
data: query
});
}
/**
* 远程下载
*/
@ -83,6 +91,19 @@ export function dlSickerOnline(query) {
});
}
/**
* 在线实时获取患者信息
* @param query
* @returns {AxiosPromise}
*/
export function prescribeOnline(query) {
return axios({
url: "/udiwms/basic/sk/sicker/prescribe/filter/onLine",
method: "get",
params: query
});
}

@ -93,7 +93,7 @@
>查询
</el-button
>
<el-button type="primary" icon="el-icon-download" @click="onSubmit"
<el-button type="primary" icon="el-icon-download" @click="downloadPrescription"
>下载处方
</el-button
>
@ -336,6 +336,19 @@
</el-tab-pane>
</el-tabs>
<el-dialog
title="下载处方"
:visible.sync="downloadPrescriptionVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="downloadPrescriptionVisible"
width="65%"
append-to-body
>
<prescribeDownloadDialog
:closeDialog="this.closeDialog"
></prescribeDownloadDialog>
</el-dialog>
</div>
</template>
@ -347,8 +360,9 @@ import {executeFuc, getHead} from "@/utils/customConfig";
import store from "@/store";
import {filterOrder} from "@/api/inout/order";
import {convertDate} from "@/utils/date";
import {detail, page as prescribePage} from "@/api/basic/sicker/prescribeApi";
import {detail, page as prescribePage,deleteDataByCode} from "@/api/basic/sicker/prescribeApi";
import {materialPrescribePage} from "@/api/inout/splitCode";
import prescribeDownloadDialog from "@/views/inout/split/prescribeDownloadDialog";
export default {
name: "prescribePanel",
@ -379,8 +393,8 @@ export default {
loading: false,
list: [],
total: 0,
downloadPrescriptionVisible:false,
deleteData:{},
preLoading: false,
preDetailList: [],
preTotal: 0,
@ -393,7 +407,7 @@ export default {
},
components: {
addOrder, errOrder
addOrder, errOrder,prescribeDownloadDialog
},
methods: {
@ -427,6 +441,12 @@ export default {
this.actDateRange = [];
this.getList();
},
downloadPrescription(){
this.downloadPrescriptionVisible = true
},
closeDialog(){
this.getList();
},
onSubmit() {
this.filterQuery.page = 1;
this.getList();
@ -480,6 +500,41 @@ export default {
this.getPrescribeDetail(this, null);
},
deleteDialog(_this,row) {
_this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
_this.deleteOrders(row.code);
})
.catch(() => {
});
},
deleteOrders(data) {
this.loading = true;
this.deleteData.code = data;
deleteDataByCode(this.deleteData)
.then((response) => {
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
} else if (response.code == 520) {
this.$message.error(response.message);
this.getList();
} else {
this.$message.error(response.message);
this.getList();
}
})
.catch(() => {
});
},
},
created() {

@ -1,10 +1,461 @@
<template>
<div>
<el-card>
<el-form v-if="queryList && queryList.length > 0 && showSearch" :model="filterQuery" class="query-form"
size="mini" label-width="100px">
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
@change="executeFuc($event,'5',item.checkRules)"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
value-format="yyyy-MM-dd"
:disabled="executeEval(null,item.disabledFuc,false)"
type="date"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item>
</template>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group>
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
>重置
</el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmit"
>查询
</el-button
>
<el-button type="primary" icon="el-icon-download" @click="downloadPrescription"
>下载选择处方
</el-button
>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%;" border highlight-current-row
ref="multipleTable"
:default-sort="defaultSort"
:row-style="{ height: '32px' }" @selection-change="handleUserSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{
item.lableRuleObj[scope.row[item.columnName]]
}}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag
:type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{
item.lableRuleObj ? item.lableRuleObj[scope.row[item.columnName]] : scope.row[item.columnName]
}}</span>
</el-tag>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"-->
<!-- :prop="item.columnName"-->
<!-- :label="item.columnDesc"-->
<!-- :width="item.width"-->
<!-- :key="item.columnName"-->
<!-- fixed="right"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"-->
<!-- :type="buttonItem.type"-->
<!-- :size="buttonItem.size"-->
<!-- :style="buttonItem.style"-->
<!-- :key="buttonItem"-->
<!-- v-if="executeEval(scope.row,buttonItem.hasPermi,true)"-->
<!-- :disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"-->
<!-- @click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"-->
<!-- >{{ buttonItem.name }}-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
scope.row[item.columnName]
}}</span>
</template>
</el-table-column>
</template>
</el-table>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="handleCurrentChange"
></pagination>
</el-card>
</div>
</template>
<script>
import {prescribeOnline,prescribeSave} from "@/api/basic/sicker/skPersonApi";
import {executeFuc, getHead} from "@/utils/customConfig";
export default {
name: "prescribeDownloadDialog"
name: "prescribeDownloadDialog",
props: {
closeDialog: {
type: Function,
required: true,
},
},
data() {
return {
actDateRange: [],
auditDateRange: [],
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
selectList: [],
//
//
tableHeader: [],
queryList: [],
tableObj: [],
fromList: [],
//
tableHeader1: [],
queryList1: [],
tableObj1: [],
fromList1: [],
showSearch: true,
filterQuery: {
billNo: null,
page: 1,
limit: 10,
},
defaultSort: {prop: 'createTime', order: 'desc'},
loading: false,
list: [],
total: 0,
downloadPrescriptionVisible:false,
deleteData:{},
preLoading: false,
preDetailList: [],
preTotal: 0,
preQuery: {
prescribeCode: null,
page: 1,
limit: 10,
},
}
},
methods: {
//------------
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
}
return defaultRet;
},
handleSortChange(column, prop, order) {
if (column.order === 'descending') {
this.query.sort = 'desc'
} else {
this.query.sort = 'asc'
}
this.query.orderBy = column.prop;
this.getList();
},
///------------end
hideSearch() {
this.showSearch = !this.showSearch;
},
onReset() {
this.filterQuery = {};
this.actDateRange = [];
this.getList();
},
downloadPrescription(){
if (this.selectList.length == 0){
this.$message.error("请选择下载处方")
return
}else {
//
prescribeSave(this.selectList).then(res => {
if (res.code == 20000){
this.closeDialog()
this.$message.success("操作成功")
}else {
this.$message.error(res.message)
}
}).catch(() => {
this.$message.error(res.message)
})
}
},
handleUserSelectionChange(val) {
this.selectList = val.map(i=>i)
},
onSubmit() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
this.loading = true;
if (this.actDateRange !== null) {
this.filterQuery.startTime = this.actDateRange[0];
this.filterQuery.endTime = this.actDateRange[1];
} else {
this.filterQuery.startTime = null;
this.filterQuery.endTime = null;
}
prescribeOnline(this.filterQuery).then(res => {
this.loading = false
this.list = res.data.list || []
this.total = res.data.total || 0
}).catch(() => {
this.loading = false
this.list = []
this.total = 0
})
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
prescribeClick(_this, row) {
this.getPrescribeDetail(_this, row)
this.getCodeDetail(_this, row)
},
getPrescribeDetail(_this, row) {
if (row != null) {
_this.preQuery.page = 1
_this.preQuery.prescribeCode = row.code
}
_this.preLoading = true;
detail(_this.preQuery).then(res => {
_this.preLoading = false
if (res.code != 20000) {
_this.$message.error(res.message)
return
}
_this.preDetailList = res.data.items
_this.preLoading = false
}).catch(() => {
_this.preLoading = false
_this.$message.error("数据加载失败")
})
},
preHandleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getPrescribeDetail(this, null);
},
deleteDialog(_this,row) {
_this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
_this.deleteOrders(row.code);
})
.catch(() => {
});
},
deleteOrders(data) {
this.loading = true;
this.deleteData.code = data;
deleteDataByCode(this.deleteData)
.then((response) => {
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
} else if (response.code == 520) {
this.$message.error(response.message);
this.getList();
} else {
this.$message.error(response.message);
this.getList();
}
})
.catch(() => {
});
},
},
created() {
getHead("prescribePanel-3", "1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
// this.getList();
});
}
}
</script>

Loading…
Cancel
Save