123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387 |
- <template>
- <div class="prescriptionTable">
- <el-table
- v-if="prescription.type == 1"
- :data="prescription.advices"
- border
- style="width: 99%"
- :row-style="changColor"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266',
- }"
- highlight-current-row
- >
- <el-table-column
- align="center"
- type="index"
- width="40"
- label="序号"
- ></el-table-column>
- <el-table-column align="center" prop="name" width="400" label="名称">
- <template slot-scope="scope"
- ><span :title="scope.row.drug_name">{{
- scope.row.drug_name
- }}</span></template
- >
- </el-table-column>
- <el-table-column align="center" prop="name" width="80" label="单次用量">
- <template slot-scope="scope">
- <!--<el-input v-model="scope.row.delivery_way" readonly></el-input>-->
- <div>{{ scope.row.single_dose }}{{ scope.row.single_dose_unit }}</div>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="name" width="80" label="用法">
- <template slot-scope="scope">
- <!--<el-input v-model="scope.row.delivery_way" readonly></el-input>-->
- <div>{{ scope.row.delivery_way }}</div>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="name" width="80" label="频率">
- <template slot-scope="scope">
- <div>{{ scope.row.execution_frequency }}</div>
-
- <!--<el-input v-model="scope.row.execution_frequency" readonly></el-input>-->
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="day" width="80" label="天数">
- <template slot-scope="scope">{{ scope.row.day }}天</template>
- </el-table-column>
-
- <el-table-column align="center" prop="name" width="80" label="总量">
- <template slot-scope="scope"
- >{{ scope.row.prescribing_number
- }}{{ scope.row.prescribing_number_unit }}</template
- >
- </el-table-column>
- <el-table-column align="center" prop="name" width="100" label="单价">
- <template slot-scope="scope">
- <div>{{ scope.row.retail_price }}元</div>
-
- <!--<el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>-->
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="name" width="100" label="总价">
- <template slot-scope="scope">
- <div>
- {{
- (scope.row.prescribing_number * scope.row.retail_price).toFixed(
- 2
- )
- }}元
- </div>
-
- <!--<el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>-->
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="name" width="80" label="全自费金额">
- <template slot-scope="scope">
- <div>{{ scope.row.fulamt_ownpay_amt }}元</div>
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="name" width="80" label="超限价金额">
- <template slot-scope="scope">
- <div>{{ scope.row.overlmt_amt }}元</div>
- </template>
- </el-table-column>
-
- <el-table-column
- align="center"
- prop="name"
- width="80"
- label="先行自付金额"
- >
- <template slot-scope="scope">
- <div>{{ scope.row.preselfpay_amt }}元</div>
- </template>
- </el-table-column>
-
- <el-table-column
- align="center"
- prop="name"
- width="70"
- label="符合正常范围金额"
- >
- <template slot-scope="scope">
- <div>{{ scope.row.inscp_scp_amt }}元</div>
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="name" width="60" label="备注">
- <template slot-scope="scope">
- <!--<el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder="" readonly></el-input>-->
- <div>{{ scope.row.remark }}</div>
- </template>
- </el-table-column>
- </el-table>
- <el-table
- v-if="prescription.type == 2"
- :data="prescription.project"
- border
- style="width: 99%"
- :row-style="changColor"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266',
- }"
- highlight-current-row
- >
- <el-table-column
- align="center"
- type="index"
- width="40"
- label="序号"
- ></el-table-column>
- <el-table-column
- align="center"
- prop="project_name"
- width="400"
- label="名称"
- >
- <template slot-scope="scope">{{ scope.row.project_name }}</template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="statistical_classification"
- width="100"
- label="组"
- >
- <template slot-scope="scope">{{
- getGroup(scope.row.statistical_classification)
- }}</template>
- </el-table-column>
-
- <el-table-column
- align="center"
- prop="single_dose"
- width="80"
- label="单次用量"
- >
- <template slot-scope="scope">
- <!--<el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>-->
- {{ scope.row.single_dose }}{{ scope.row.unit }}
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="delivery_way"
- width="80"
- label="用法"
- >
- <template slot-scope="scope">
- <!--<el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>-->
- {{ scope.row.delivery_way }}
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="execution_frequency"
- width="80"
- label="频率"
- >
- <template slot-scope="scope">
- <!--<el-input v-model="scope.row.execution_frequency" placeholder="" readonly></el-input>-->
- {{ scope.row.execution_frequency }}
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="number_days"
- width="80"
- label="天数"
- >
- <template slot-scope="scope">
- <!--<el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>-->
- {{ scope.row.number_days }}天
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="total" width="80" label="总量">
- <template slot-scope="scope">
- <!--<el-input v-model="scope.row.total" placeholder="" readonly></el-input>-->
- {{ scope.row.total }} {{ scope.row.unit }}
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="name" width="100" label="单价">
- <template slot-scope="scope">
- <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
- {{ scope.row.price }}元
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="name" width="100" label="总价">
- <template slot-scope="scope">
- <!--<el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>-->
- {{ (scope.row.total * scope.row.price).toFixed(2) }}元
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="name" width="80" label="全自费金额">
- <template slot-scope="scope">
- <div>{{ scope.row.fulamt_ownpay_amt }}元</div>
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="name" width="80" label="超限价金额">
- <template slot-scope="scope">
- <div>{{ scope.row.overlmt_amt }}元</div>
- </template>
- </el-table-column>
-
- <el-table-column
- align="center"
- prop="name"
- width="80"
- label="先行自付金额"
- >
- <template slot-scope="scope">
- <div>{{ scope.row.preselfpay_amt }}元</div>
- </template>
- </el-table-column>
-
- <el-table-column
- align="center"
- prop="name"
- width="70"
- label="符合正常范围金额"
- >
- <template slot-scope="scope">
- <div>{{ scope.row.inscp_scp_amt }}元</div>
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="name" width="50" label="备注">
- <template slot-scope="scope">
- <!--<el-input v-model="scope.row.remark" readonly></el-input>-->
- {{ scope.row.remark }}
- </template>
- </el-table-column>
- </el-table>
-
- <div class="additionalBox">
- <div
- class="additionalOne"
- v-for="(item, index) in prescription.addition"
- :key="index"
- >
- <span :title="item.item_name">{{ item.item_name }}</span>
- <el-input
- v-model="item.price"
- placeholder=""
- style="width: 50px"
- readonly
- ></el-input>
- 共
- <el-input
- v-model="item.count"
- placeholder=""
- style="width: 50px"
- readonly
- ></el-input>
- 次
- <!--<i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>-->
- </div>
- </div>
- </div>
- </template>
-
- <script>
- import { getInitData } from "@/api/his/his";
- import { getDictionaryDataConfig } from "@/utils/data";
-
- export default {
- props: {
- prescription: Object,
- },
- data() {
- return {
- drugways: [],
- efs: [],
- };
- },
- mounted() {
- getInitData().then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.drugways = response.data.data.drugways;
- this.efs = response.data.data.efs;
- }
- });
- },
- methods: {
- changColor({ row, rowIndex }) {
- if (rowIndex % 2 == 1) {
- // 变颜色的条件
- return {
- backgroundColor: "#C4E1FF",
- color: "#303133", // 这个return的就是样式 可以是color 也可以是backgroundColor
- };
- } else {
- return {
- backgroundColor: "#ACD6FF",
- color: "#303133",
- };
- }
- },
-
- getGroup(id) {
- var name = "";
- var statistics_category = getDictionaryDataConfig(
- "system",
- "statistics_category"
- );
- console.log("2235", statistics_category);
- for (let i = 0; i < statistics_category.length; i++) {
- if (id == statistics_category[i].id) {
- name = statistics_category[i].name;
- }
- }
- return name;
- },
- },
- };
- </script>
-
- <style lang="scss">
- .prescriptionTable {
- .additionalBox {
- margin-top: 20px;
- display: flex;
- flex-wrap: wrap;
- .additionalOne {
- margin-right: 20px;
- margin-bottom: 10px;
- display: flex;
- align-items: center;
- > span {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- width: 80px;
- display: inline-block;
- font-size: 14px;
- }
- }
- .deleteIcon {
- color: red;
- margin-left: 5px;
- }
- }
- .el-table th .cell,
- .el-table td .cell {
- padding: 0 2px;
- white-space: pre-line;
- }
- .el-icon-delete {
- color: red;
- }
- }
- </style>
|