处方相关修改

20240912_adapter_z
anthonywj 8 months ago
parent 5c5fe6e6e3
commit d061ea69c2

@ -357,11 +357,8 @@
import addOrder from "@/views/inout/DialogCreateOrder";
import errOrder from "@/views/inout/IoCreateErrorOrder";
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,deleteDataByCode} from "@/api/basic/sicker/prescribeApi";
import {materialPrescribePage} from "@/api/inout/splitCode";
import prescribeDownloadDialog from "@/views/inout/split/prescribeDownloadDialog";
export default {
@ -445,6 +442,7 @@ export default {
this.downloadPrescriptionVisible = true
},
closeDialog(){
this.downloadPrescriptionVisible = false;
this.getList();
},
onSubmit() {

@ -93,8 +93,12 @@
>查询
</el-button
>
<el-button type="primary" icon="el-icon-download" @click="downloadPrescription"
>下载选择处方
<el-button type="primary" icon="el-icon-check" @click="downloadPrescription"
>按查询结果下载
</el-button
>
<el-button type="primary" icon="el-icon-check" @click="downloadPrescription"
>选中下载
</el-button
>
</el-button-group>

@ -1,346 +1,141 @@
<template>
<div>
<el-form :model="formData" class="order-el-form" ref="formData" label-width="120px">
<el-card>
<el-row :gutter="0">
<el-col :span="22" align="right">
<el-button-group>
<el-button
type="primary"
@click.native="selectPrescribe()"
>选入处方
</el-button>
</el-button-group>
</el-col>
</el-row>
<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-row :gutter="20" class="order-el-row" style="margin-top: 20px ">
<el-col :span="12">
<el-form-item prop="code" label="处方编码:">
<el-input
v-model="formData.code"
auto-complete="off"
clearable
disabled
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="sickName" label="患者名称:">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
v-model="formData.sickName"
auto-complete="off"
clearable
disabled
></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-col>
<el-col :span="12">
<el-form-item prop="adNum" label="住院号:">
<el-input
v-model="formData.adNum"
auto-complete="off"
clearable
disabled
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="expireDate" label="就诊卡号:">
<el-input
v-model="formData.cpmctymc"
auto-complete="off"
clearable
disabled
></el-input>
</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-col>
<el-col :span="12">
<el-form-item prop="createDr" label="开方医生:">
<el-input
v-model="formData.createDr"
auto-complete="off"
clearable
disabled
></el-input>
</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-col>
<el-col :span="12">
<el-form-item prop="prescribeDate" label="开方时间:">
<el-input
v-model="formData.prescribeDate"
auto-complete="off"
clearable
disabled
></el-input>
</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-col>
<el-col :span="12">
<el-form-item prop="deptName" label="就诊科室:">
<el-input
v-model="formData.deptName"
auto-complete="off"
clearable
disabled
></el-input>
</el-form-item>
</template>
</el-col>
<el-col :span="12">
<el-form-item prop="amount" label="处方费用:">
<el-input
v-model="formData.amount"
auto-complete="off"
clearable
disabled
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="remark" label="处方备注:">
<el-input
v-model="formData.remark"
auto-complete="off"
clearable
></el-input>
</el-form-item>
</el-col>
</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-plus" @click="onSubmit"
>新增处方赋码
</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
@row-click="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)" ref="multipleTable"
:default-sort="defaultSort"
:row-style="{ height: '32px' }"
@sort-change="handleSortChange">
<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>
<el-tabs type="border-card" style="margin: 15px">
<el-tab-pane label="处方明细">
<el-table v-loading="preLoading" :data="preDetailList" style="width: 100%" border>
<template v-for="(item, index) in tableHeader1">
<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' && !(item.columnName == 'productDate' || item.columnName == 'expireDate') && 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>
<el-table-column
v-if="item.columnType == 'text' && (item.columnName == 'productDate' || item.columnName == 'expireDate') && 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])}">{{
convertDateFun(scope.row[item.columnName])
}}</span>
</template>
</el-table-column>
</template>
</el-table>
<pagination
v-show="preTotal>0"
:total="preTotal"
:limit.sync="preQuery.limit"
:page.sync="preQuery.page"
@pagination="preHandleCurrentChange"
></pagination>
</el-tab-pane>
</el-card>
<el-tab-pane label="赋码明细">
<el-card>
<el-row :gutter="0">
<el-col :span="20">
<el-form-item prop="code" label="扫码关联:">
<el-input
id="inputer"
@focus="getInputFocus($event)"
@keypress.enter.native="enterKey($event)"
ref="inputRef"
style="ime-mode: disabled"
type="tel"
v-model="filterQuery.code"
></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-button
type="primary"
size="mini"
@click.native.stop="addCode()"
style="margin-left: 15px"
>添加
</el-button>
</el-col>
</el-row>
<el-table v-loading="codeLoading" :data="codeDetailList" style="width: 100%" border>
<template v-for="(item, index) in tableHeader2">
<el-table v-loading="loading" :data="list" style="width: 100%" border>
<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>
@ -452,18 +247,31 @@
</el-table>
<pagination
v-show="codeTotal>0"
:total="codeTotal"
:limit.sync="codeQuery.limit"
:page.sync="codeQuery.page"
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="codeHandleCurrentChange"
></pagination>
</el-tab-pane>
</el-tabs>
</el-card>
<el-dialog
title="选择处方"
:visible.sync="selectPrescriptionVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="selectPrescriptionVisible"
width="65%"
append-to-body
>
<selectPrescribeDialog
:confirmSelect="this.confirmSelect"
:closeDialog="this.closeDialog"
></selectPrescribeDialog>
</el-dialog>
</el-form>
</div>
</template>
@ -471,33 +279,23 @@
import addOrder from "@/views/inout/DialogCreateOrder";
import errOrder from "@/views/inout/IoCreateErrorOrder";
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 {materialPrescribePage} from "@/api/inout/splitCode";
import {detail, page as prescribePage} from "@/api/basic/sicker/prescribeApi";
import selectPrescribeDialog from "@/views/inout/split/selectPrescribeDialog";
export default {
name: "prescribePanel",
name: "prescribeTagCodeDeal",
data() {
return {
//
//
loading: false,
tableHeader: [],
queryList: [],
tableObj: [],
fromList: [],
//
tableHeader1: [],
queryList1: [],
tableObj1: [],
fromList1: [],
//
tableHeader2: [],
queryList2: [],
tableObj2: [],
fromList2: [],
convertDateFun: convertDate,
//-------------end
@ -507,32 +305,18 @@ export default {
page: 1,
limit: 10,
},
defaultSort: {prop: 'createTime', order: 'desc'},
loading: false,
list: [],
total: 0,
defaultSort: {prop: 'createTime', order: 'desc'},
preLoading: false,
preDetailList: [],
preTotal: 0,
preQuery: {
prescribeCode: null,
page: 1,
limit: 10,
},
codeLoading: false,
codeDetailList: [],
codeTotal: 0,
codeQuery: {
page: 1,
limit: 10,
},
formData: {},
selectPrescriptionVisible: false,
}
},
components: {
addOrder, errOrder
addOrder, errOrder, selectPrescribeDialog
},
methods: {
@ -614,7 +398,6 @@ export default {
},
getCodeDetail(_this, row) {
if (row != null) {
_this.codeQuery.page = 1
_this.codeQuery.prescribeNum = row.code
@ -647,40 +430,48 @@ export default {
this.getCodeDetail(this, null);
},
getInputFocus(event) {
event.currentTarget.select();
},
enterKey(event) {
},
addCode() {
},
selectPrescribe() {
this.selectPrescriptionVisible = true;
},
closeDialog() {
this.selectPrescriptionVisible = false;
},
confirmSelect(row) {
this.selectPrescriptionVisible = false;
this.formData = row;
}
},
created() {
getHead("prescribePanel", "1").then((re) => {
getHead("prescribeTagCodeDeal", "1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
});
getHead("prescribePanel-1", "1").then((re) => {
//
this.tableObj1 = re.data;
this.tableHeader1 = re.data.tableList;
this.queryList1 = re.data.queryList;
this.fromList1 = re.data.fromList;
this.getList();
});
getHead("prescribePanel-2", "1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
this.getList();
});
}
}
</script>
<style scoped>
.el-col {
margin-top: -5px;
margin-bottom: -5px;
}
</style>

@ -0,0 +1,537 @@
<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-check" @click="onConfirm"
>选入
</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
@row-click="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
ref="multipleTable"
@current-change="handleChange"
:default-sort="defaultSort"
:row-style="{ height: '32px' }"
@sort-change="handleSortChange">
<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>
<el-tabs type="border-card" style="margin: 15px">
<el-tab-pane label="处方明细">
<el-table v-loading="preLoading" :data="preDetailList" style="width: 100%" border>
<template v-for="(item, index) in tableHeader1">
<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' && !(item.columnName == 'productDate' || item.columnName == 'expireDate') && 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>
<el-table-column
v-if="item.columnType == 'text' && (item.columnName == 'productDate' || item.columnName == 'expireDate') && 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])}">{{
convertDateFun(scope.row[item.columnName])
}}</span>
</template>
</el-table-column>
</template>
</el-table>
<pagination
v-show="preTotal>0"
:total="preTotal"
:limit.sync="preQuery.limit"
:page.sync="preQuery.page"
@pagination="preHandleCurrentChange"
></pagination>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import addOrder from "@/views/inout/DialogCreateOrder";
import errOrder from "@/views/inout/IoCreateErrorOrder";
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, deleteDataByCode} from "@/api/basic/sicker/prescribeApi";
import {materialPrescribePage} from "@/api/inout/splitCode";
import prescribeDownloadDialog from "@/views/inout/split/prescribeDownloadDialog";
export default {
name: "selectPrescribeDialog",
props: {
confirmSelect: {
type: Function,
required: true,
},
closeDialog: {
type: Function,
required: true,
},
},
data() {
return {
//
//
tableHeader: [],
queryList: [],
tableObj: [],
fromList: [],
//
tableHeader1: [],
queryList1: [],
tableObj1: [],
fromList1: [],
convertDateFun: convertDate,
//-------------end
showSearch: true,
filterQuery: {
billNo: null,
page: 1,
limit: 10,
},
defaultSort: {prop: 'createTime', order: 'desc'},
loading: false,
list: [],
total: 0,
deleteData: {},
preLoading: false,
preDetailList: [],
preTotal: 0,
radioCheck: null,
currentRow: null,
preQuery: {
prescribeCode: null,
page: 1,
limit: 10,
},
}
},
components: {
addOrder, errOrder, prescribeDownloadDialog
},
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();
},
closeDialog() {
this.getList();
},
onSubmit() {
this.filterQuery.page = 1;
this.getList();
},
onConfirm() {
this.confirmSelect(this.currentRow)
},
getList() {
this.loading = true;
prescribePage(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);
},
handleChange(val) {
this.radioCheck = val.id;
this.currentRow = val;
},
},
created() {
getHead("selectTagPrescribe", "1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
});
getHead("selectTagPrescribe-1", "1").then((re) => {
//
this.tableObj1 = re.data;
this.tableHeader1 = re.data.tableList;
this.queryList1 = re.data.queryList;
this.fromList1 = re.data.fromList;
this.getList();
});
}
}
</script>
<style scoped>
</style>

@ -411,33 +411,7 @@
></pagination>
</el-card>
<el-dialog
title="库存详情"
:visible.sync="detailDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="detailDialogVisible"
>
<invProductsDetail
:inputQuery="inputQuery"
v-on:closeDetailDialog="closeDetailDialog"
></invProductsDetail>
</el-dialog>
<el-dialog
title="添加库存预警设置"
:visible.sync="addInvRemindSetDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="60%"
v-if="addInvRemindSetDialogVisible"
>
<addInvRemindSetDialog
:invId="invId"
:closeDialog="closeRemindSetDialog"
></addInvRemindSetDialog>
</el-dialog>
</div>

Loading…
Cancel
Save