123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- <template>
- <el-dialog
- title="打印"
- :visible.sync="visibility"
- :close-on-click-modal="isClose"
- :close-on-press-escape="isClose"
- >
- <el-button type="primary" @click="print" class="print_style"
- >打印</el-button
- >
- <div id="dialysis-print-box-1" class="dialysis-print-box-1">
- <div class="list_title" style="border-bottom:none;">
- <div style="width:100%;text-align:center;font-size:16px;font-weight:bold;">
- {{org_name}} <span v-if="state=='待发药'">发药单</span> <span v-if="state=='已发药'">领药单</span>
- </div>
- </div>
- <div style="display: flex;">
- <div style="margin-right: 20px;">日期:{{times}}</div>
- <div>单据号:00013756</div>
- </div>
- <div>
- <table class="table" border="1"
- style="border-collapse: collapse;border-left: none;border-right: none;width: 100%;text-align: center;border: 1;">
- <tr>
- <td>药品名称</td>
- <td>规格</td>
- <td>用量</td>
- <td>用法</td>
- <td>天数</td>
- <td>总量</td>
- <td>单价</td>
- <td>金额</td>
- <td>执行时间</td>
- </tr>
- <tr v-for="item in tableData" >
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- </table>
- </div>
- <div style="display: flex;margin: 10px 0;">
- <div style="flex: 1;">数量合计:</div>
- <div style="flex: 1;">金额合计:</div>
- <div style="flex: 1;">操作人:</div>
- <div style="flex: 1;">核对人:</div>
- </div>
-
- </div>
- </el-dialog>
- </template>
- <script>
- import Vue from "vue";
- import print from "print-js";
- import printutils from "./print.js";
- import{todaynumber} from '@/api/pharmacy'
- const moment = require("moment");
- import { uParseTime } from "@/utils/tools";
- export default {
-
- data() {
- return {
- visibility: false,
- tableData: [],
- isClose:false,
- name:"",
- DialysisNo:'',
- state:null,
- times:"",
- start_time:moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
- org_name: this.$store.getters.xt_user.org.org_name,
- baseList:[],
- Doctor:'',
- patients:{},
- doctors:[],
- Price_zong:0,
- diagnosearr:[],
- diagnosis:'',
- };
- },
- props: {
- propForm: {
- type: Object,
- },
- },
- created(){
- this.init();
- },
- methods: {
-
- init(){
-
- },
-
- hide: function () {
- this.visibility = false;
- for (let i = 0; i < this.propForm.goods.length; i++) {
- for (let key in this.propForm.goods[i]) {
- if (key != "index") {
- this.propForm.goods[i][key].isSelected = false;
- }
- }
- }
- },
- show: function (val) {
- this.tableData = []
- this.tableData = val
- this.visibility = true;
- },
-
- comfirm: function (formName) {
- this.goodInfo = [];
- this.goodInfoTableData = [];
- this.$emit("dialog-comfirm", this.getValue());
- this.$refs.multipleTable.clearSelection();
- this.$refs.table.setCurrentRow(null);
- },
- getValue() {},
-
- // 打印
- print() {
- console.log(this.org_name,'this.org_name')
- Vue.prototype.printJson = printutils.printJson;
- const style =
- '@media print {.list_title{width:940px;border-bottom:1px solid;display:flex;margin:20px auto} .table tr td{border:1px solid black;padding: 5px 0;border-left: none;border-right: none;}}';
- printJS({
- printable: "dialysis-print-box-1",
- type: "html",
- style: style,
- scanStyles: false,
- });
- },
- getSpecaiName(drug_id){
- var spc =""
- for(let i=0;i<this.baseList.length;i++){
- if(drug_id == this.baseList[i].id){
- spc = this.baseList[i].dose + this.baseList[i].dose_unit +"*"+this.baseList[i].min_number+this.baseList[i].min_unit+"/"+this.baseList[i].max_unit
- }
- }
- return spc
- },
- getTime(val) {
- if(val < 0){
- return ""
- }
- if(val == ""){
- return ""
- }else {
- return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
- }
- },
- getdoctors(id){
- for(let i in this.doctors){
- if(this.doctors[i].id == id){
- return this.doctors[i].user_name
- }
- }
- }
- },
- };
- </script>
-
- <style lang="scss" scoped>
- /deep/ .el-dialog{
- width: 60%;
- }
- /deep/ .el-table__body-wrapper::-webkit-scrollbar {
- width: 10px;
- height: 10px;
- }
- .print_style {
- position: absolute;
- right: 65px;
- top: 50px;
- }
-
- .list_title {
- width: 940px;
- border-bottom: 1px solid;
- display: flex;
- }
- .table tr td{
- border:1px solid black;
- padding: 5px 0;
- border-left: none;
- border-right: none;
- }
- </style>
-
- <style>
- .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
- font-size: 12px;
- }
-
- .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
- background: #6fb5fa;
- }
-
- .count {
- color: #bd2c00;
- }
- .el-table td,
- .el-table th.is-leaf,
- .el-table--border,
- .el-table--group {
- border-color: #d0d3da;
- }
- .el-table--border::after,
- .el-table--group::after,
- .el-table::before {
- background-color: #d0d3da;
- }
- </style>
-
|