see999 3 yıl önce
ebeveyn
işleme
564a2b6e13

+ 77 - 33
src/xt_pages/stock/drugs/drugStockInOrderDetailPrint.vue Dosyayı Görüntüle

@@ -8,7 +8,8 @@
8 8
     <div class="app-container ">
9 9
       <div id="dialysis-print-box">
10 10
         <div class="dialysis-print-order">
11
-          <div class="order-title">药品入库登记表</div>
11
+          <div style="font-size:22px;font-weight:bold;text-align:center;">{{ orgName }}</div>
12
+          <div class="order-title" style="font-size:18px;padding-top:0;">药品入库登记表</div>
12 13
          
13 14
           <div style="float: right;margin-bottom: 10px;">{{getDateTwo()}}</div>
14 15
 
@@ -16,52 +17,51 @@
16 17
             <tbody>
17 18
             <tr>
18 19
               <td width="80">药品名称</td>
19
-              <td width="80">注册证号/批准文号/备案凭证号</td>
20
-              <td width="80">规格型号</td>
21
-              <td width="80">生产厂商</td>
22
-              <td width="80">单位</td>
23
-              <td width="80">进货价</td>
24
-              <td width="80">入库数量</td> 
25
-              <td width="80">总价</td>
26
-              <td width="80">批号</td>
27
-              <td width="80">生产日期</td>
28
-              <td width="80">有效日期</td>
29
-              <td width="80">质检意见</td>
30
-              <td width="80">验收结论</td>
20
+              <td style="line-height:18px;" width="80">注册证号/批准文号/备案凭证号</td>
21
+              <td style="line-height:18px;" width="80">规格<br>型号</td>
22
+              <td style="line-height:18px;" width="80">生产<br>厂商</td>
23
+              <td style="line-height:18px;" width="80">单位</td>
24
+              <td style="line-height:18px;" width="80">进货价</td>
25
+              <td style="line-height:18px;" width="80">入库<br>数量</td> 
26
+              <td style="line-height:18px;" width="60">总价</td>
27
+              <td style="line-height:18px;" width="80">批号</td>
28
+              <td style="line-height:18px;" width="120">生产日期</td>
29
+              <td style="line-height:18px;" width="120">有效日期</td>
30
+              <td style="line-height:18px;" width="60">质检<br>意见</td>
31
+              <td style="line-height:18px;" width="60">验收<br>结论</td>
31 32
             </tr>
32 33
 
33 34
             <tr v-for="(item,index) in WarehouseInfo.warehouseInfoDate" :key="item.id">
34
-              <td style="line-height: 50px">
35
+              <td style="line-height: 18px">
35 36
                  <span v-if="item.drug_id != 0">{{item.drug.drug_name}}</span>
36 37
               </td>
37
-              <td>{{ item.remark }}</td>
38
-              <td style="line-height: 50px">
38
+              <td style="line-height: 18px">{{ item.remark }}</td>
39
+              <td style="line-height: 18px">
39 40
                  <span v-if="item.drug_id != 0">{{item.drug?item.drug.drug_spec:''}}</span>
40 41
               </td>
41
-              <td>{{ getManufacturer(item.manufacturer) }}</td>
42
-              <td style="line-height: 50px">
42
+              <td style="line-height: 18px">{{ getManufacturer(item.manufacturer) }}</td>
43
+              <td style="line-height: 18px">
43 44
                 <span>{{getUnit(item.drug_id)}}</span>
44 45
               </td>
45
-              <td style="line-height:50px">
46
+              <td style="line-height:18px">
46 47
                   {{item.price}}
47 48
               </td>
48
-              <td style="line-height: 50px">
49
+              <td style="line-height: 18px">
49 50
                    <span>{{ item.warehousing_count }}</span>
50 51
               </td>
51 52
               
52
-              <td style="line-height:50px">
53
+              <td style="line-height:18px">
53 54
                   <span>{{(item.warehousing_count * item.price).toFixed(2)}}</span>
54 55
               </td>
55
-              <td>{{ item.number }}</td>
56
-              <td>{{ item.product_date | parseTime("{y}-{m}-{d}") }}</td>
57
-              <td>{{ item.expiry_date | parseTime("{y}-{m}-{d}") }}</td>
58
-              <td>正常入库</td>
59
-              <td>合格</td>
56
+              <td style="line-height:18px">{{ item.number }}</td>
57
+              <td style="line-height:18px">{{ item.product_date | parseTime("{y}-{m}-{d}") }}</td>
58
+              <td style="line-height:18px">{{ item.expiry_date | parseTime("{y}-{m}-{d}") }}</td>
59
+              <td style="line-height:18px">正常<br>入库</td>
60
+              <td style="line-height:18px">合格</td>
60 61
             </tr>
61 62
             <tr>
62 63
               <td>合计</td>
63
-              <td colspan="11"></td>
64
-              <td>{{allPrice.toFixed(2)}}</td>
64
+              <td colspan="12" style="text-align:right;">{{allPrice.toFixed(2)}}</td>
65 65
             </tr>
66 66
             </tbody>
67 67
           </table>
@@ -70,9 +70,9 @@
70 70
           <div style="display:flex;margin-top:20px;float:right;">
71 71
             <div style="width:50px;">审批:</div><div style="width:100px;"></div>
72 72
             <div style="width:80px;">药材主任:</div><div style="width:100px;"></div>
73
-            <div style="width:50px;">会计:</div><div style="width:100px;"></div>
74
-            <div style="width:50px;">审核:</div><div style="width:100px;"></div>
75
-            <div style="width:70px;">制单人:</div><div style="width:100px;"></div>
73
+            <div style="width:50px;">会计:</div><div style="width:100px;"><span v-if='orgId == 10024'>徐立琼</span></div>
74
+            <div style="width:50px;">审核:</div><div style="width:100px;"><span v-if='orgId == 10024'>徐立琼</span></div>
75
+            <div style="width:70px;">制单人:</div><div style="width:100px;">{{ getXuserName(this.WarehouseInfo.warehouse.creater) }}</div>
76 76
           </div>
77 77
         </div>
78 78
 
@@ -91,6 +91,7 @@
91 91
   import print from 'print-js'
92 92
   import {getDrugWarehouseInfoList} from "@/api/drug/drug_stock";
93 93
   import {getBaseDrugLibList} from '@/api/data'
94
+  import { fetchAllAdminUsers } from "@/api/doctor";
94 95
   export default {
95 96
     name: 'dialysisPrintOrder',
96 97
     components: {
@@ -130,7 +131,10 @@
130 131
         is_inject:"",
131 132
         page:1,
132 133
         limit:10000,
133
-        keywords:""
134
+        keywords:"",
135
+        orgName:'',
136
+        orgId:'',
137
+        adminUserOptions:[]
134 138
       }
135 139
     },
136 140
     methods: {
@@ -154,7 +158,7 @@
154 158
       printThisPage() {
155 159
         var ptime = Math.round(new Date().getTime() / 1000)
156 160
         this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
157
-        const style = '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}'
161
+        const style = '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px} .dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 1px 5px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}'
158 162
         printJS({
159 163
           printable: 'dialysis-print-box',
160 164
           type: 'html',
@@ -246,8 +250,48 @@
246 250
             }
247 251
         });
248 252
       },
253
+      fetchAllAdminUsers() {
254
+        fetchAllAdminUsers().then(response => {
255
+          console.log(response);
256
+          if (response.data.state == 1) {
257
+            this.adminUserOptions = response.data.data.users;
258
+            var alen = this.adminUserOptions.length;
259
+            for (let index = 0; index < alen; index++) {
260
+              if (this.adminUserOptions[index].user_type == 2) {
261
+                // this.doctorOptions.push(this.adminUserOptions[index]);
262
+              }
263
+            }
264
+          }
265
+        });
266
+      },
267
+      getXuserName(id) {
268
+        if (id <= 0) {
269
+          return "";
270
+        }
271
+        var name = "";
272
+        if (
273
+          this.adminUserOptions == null ||
274
+          typeof this.adminUserOptions.length === "undefined"
275
+        ) {
276
+          return name;
277
+        }
278
+        var leng = this.adminUserOptions.length;
279
+        if (leng == 0) {
280
+          return name;
281
+        }
282
+        for (let index = 0; index < leng; index++) {
283
+          if (this.adminUserOptions[index].id == id) {
284
+            name = this.adminUserOptions[index].name;
285
+            break;
286
+          }
287
+        }
288
+        return name;
289
+      },
249 290
     },
250 291
     created() {
292
+      this.orgName = this.$store.getters.xt_user.org.org_name;
293
+      this.orgId = this.$store.getters.xt_user.org.id;
294
+      this.fetchAllAdminUsers()
251 295
       this.GetConfigInfo()
252 296
       const order_id = this.$route.query.id;
253 297
       this.GetOrderDetail(order_id);

+ 80 - 37
src/xt_pages/stock/stockInOrderDetailPrint.vue Dosyayı Görüntüle

@@ -12,7 +12,8 @@
12 12
             <div id="print_content">
13 13
                 <div class="print_main_content">
14 14
                     <div class="order_title_panl">
15
-                        <span class="main_title">耗材入库登记单</span>
15
+                        <div style="font-size:22px;font-weight:bold;">{{ orgName }}</div>
16
+                        <span style="font-weight:500;font-size:18px;">耗材入库登记单</span>
16 17
                     </div>
17 18
                     <div style="text-align:right;margin-bottom:20px;font-size: 18px;">
18 19
                       打印时间:{{time_now}}
@@ -21,41 +22,40 @@
21 22
                         <table class="table">
22 23
                             <thead>
23 24
                                 <tr>
24
-                                    <td width="80">耗材名称</td>
25
-                                    <td width="80">注册证号/批准文号/备案凭证号</td>
26
-                                    <td width="80">规格型号</td>
27
-                                    <td width="80">生产厂商</td>
28
-                                    <td width="80">单位</td>
29
-                                    <td width="80">进货价</td>
30
-                                    <td width="80">入库数量</td> 
31
-                                    <td width="80">总价</td>
32
-                                    <td width="80">批号</td>
33
-                                    <td width="80">生产日期</td>
34
-                                    <td width="80">有效日期</td>
35
-                                    <td width="80">质检意见</td>
36
-                                    <td width="80">验收结论</td>
25
+                                    <td style="line-height:18px;" width="80">耗材<br>名称</td>
26
+                                    <td style="line-height:18px;" width="80">注册证号/批准文号/备案凭证号</td>
27
+                                    <td style="line-height:18px;" width="80">规格<br>型号</td>
28
+                                    <td style="line-height:18px;" width="80">生产<br>厂商</td>
29
+                                    <td style="line-height:18px;" width="80">单位</td>
30
+                                    <td style="line-height:18px;" width="80">进货价</td>
31
+                                    <td style="line-height:18px;" width="80">入库<br>数量</td> 
32
+                                    <td style="line-height:18px;" width="60">总价</td>
33
+                                    <td style="line-height:18px;" width="80">批号</td>
34
+                                    <td style="line-height:18px;" width="120">生产日期</td>
35
+                                    <td style="line-height:18px;" width="120">有效日期</td>
36
+                                    <td style="line-height:18px;" width="60">质检<br>意见</td>
37
+                                    <td style="line-height:18px;" width="60">验收<br>结论</td>
37 38
                                 </tr>
38 39
                             </thead>
39 40
                             <tbody>
40 41
                                 <tr v-for='(item,index) in WarehouseInfo.warehouseInfoDate' :key="index">
41
-                                    <td><span v-if="item.good_id != 0">{{getTypeNameOne(item.good_id)}}</span></td>
42
-                                    <td>{{ item.remark }}</td>
43
-                                    <td><span v-if="item.good_id != 0">{{getSpecificationName(item.good_id)}}</span></td>
44
-                                    <td>{{ getManufacturer(item.manufacturer) }}</td>
45
-                                    <td><span v-if="item.good_id!=0">{{getUnit(item.good_id)}}</span></td>
46
-                                    <td>{{item.price}}</td>
47
-                                    <td>{{item.warehousing_count}}</td> 
48
-                                    <td>{{(item.warehousing_count*item.price).toFixed(2)}}</td>
49
-                                    <td>{{ item.number }}</td>
50
-                                    <td>{{ item.product_date | parseTime("{y}-{m}-{d}") }}</td>
51
-                                    <td>{{ item.expiry_date | parseTime("{y}-{m}-{d}") }}</td>
52
-                                    <td>正常入库</td>
53
-                                    <td>合格</td>
42
+                                    <td style="line-height:18px;"><span v-if="item.good_id != 0">{{getTypeNameOne(item.good_id)}}</span></td>
43
+                                    <td style="line-height:18px;">{{ item.remark }}</td>
44
+                                    <td style="line-height:18px;"><span v-if="item.good_id != 0">{{getSpecificationName(item.good_id)}}</span></td>
45
+                                    <td style="line-height:18px;">{{ getManufacturer(item.manufacturer) }}</td>
46
+                                    <td style="line-height:18px;"><span v-if="item.good_id!=0">{{getUnit(item.good_id)}}</span></td>
47
+                                    <td style="line-height:18px;">{{item.price}}</td>
48
+                                    <td style="line-height:18px;">{{item.warehousing_count}}</td> 
49
+                                    <td style="line-height:18px;">{{(item.warehousing_count*item.price).toFixed(2)}}</td>
50
+                                    <td style="line-height:18px;">{{ item.number }}</td>
51
+                                    <td style="line-height:18px;">{{ item.product_date | parseTime("{y}-{m}-{d}") }}</td>
52
+                                    <td style="line-height:18px;">{{ item.expiry_date | parseTime("{y}-{m}-{d}") }}</td>
53
+                                    <td style="line-height:18px;">正常<br>入库</td>
54
+                                    <td style="line-height:18px;">合格</td>
54 55
                                 </tr>
55 56
                                 <tr>
56 57
                                   <td>合计</td>
57
-                                  <td colspan="11"></td>
58
-                                  <td>{{allPrice.toFixed(2)}}</td>
58
+                                  <td colspan="12" style="text-align:right;">{{allPrice.toFixed(2)}}</td>
59 59
                                </tr>
60 60
                             </tbody>
61 61
                         </table>
@@ -63,9 +63,9 @@
63 63
                         <div style="display:flex;margin-top:20px;float:right;">
64 64
                             <div style="width:50px;">审批:</div><div style="width:100px;"></div>
65 65
                             <div style="width:80px;">药材主任:</div><div style="width:100px;"></div>
66
-                            <div style="width:50px;">会计:</div><div style="width:100px;"></div>
67
-                            <div style="width:50px;">审核:</div><div style="width:100px;"></div>
68
-                            <div style="width:70px;">制单人:</div><div style="width:100px;"></div>
66
+                            <div style="width:50px;">会计:</div><div style="width:100px;"><span v-if='orgId == 10024'>徐立琼</span></div>
67
+                            <div style="width:50px;">审核:</div><div style="width:100px;"><span v-if='orgId == 10024'>徐立琼</span></div>
68
+                            <div style="width:70px;">制单人:</div><div style="width:100px;">{{ getXuserName(this.WarehouseInfo.warehouse.creater) }}</div>
69 69
                        </div>
70 70
                     </div>
71 71
                 </div>
@@ -81,6 +81,7 @@ import {
81 81
   getWarehouseInfoList,
82 82
   getGoodInfoList
83 83
 } from "@/api/stock";
84
+import { fetchAllAdminUsers } from "@/api/doctor";
84 85
 import print from 'print-js'
85 86
 const moment = require('moment')
86 87
 export default {
@@ -120,12 +121,15 @@ export default {
120 121
             is_use:"",
121 122
             good_kind:"",
122 123
             is_charge:"",
123
-            list:[]
124
+            list:[],
125
+            orgName:'',
126
+            orgId:'',
127
+            adminUserOptions:[]
124 128
         }
125 129
     },
126 130
     methods:{
127 131
       printAction: function() {
128
-          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
132
+          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 1px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
129 133
           printJS({
130 134
           printable: 'print_content',
131 135
           type: 'html',
@@ -251,11 +255,50 @@ export default {
251 255
           }
252 256
         })
253 257
         return name
254
-      }
258
+      },
259
+      fetchAllAdminUsers() {
260
+        fetchAllAdminUsers().then(response => {
261
+          console.log(response);
262
+          if (response.data.state == 1) {
263
+            this.adminUserOptions = response.data.data.users;
264
+            var alen = this.adminUserOptions.length;
265
+            for (let index = 0; index < alen; index++) {
266
+              if (this.adminUserOptions[index].user_type == 2) {
267
+                // this.doctorOptions.push(this.adminUserOptions[index]);
268
+              }
269
+            }
270
+          }
271
+        });
272
+      },
273
+      getXuserName(id) {
274
+        if (id <= 0) {
275
+          return "";
276
+        }
277
+        var name = "";
278
+        if (
279
+          this.adminUserOptions == null ||
280
+          typeof this.adminUserOptions.length === "undefined"
281
+        ) {
282
+          return name;
283
+        }
284
+        var leng = this.adminUserOptions.length;
285
+        if (leng == 0) {
286
+          return name;
287
+        }
288
+        for (let index = 0; index < leng; index++) {
289
+          if (this.adminUserOptions[index].id == id) {
290
+            name = this.adminUserOptions[index].name;
291
+            break;
292
+          }
293
+        }
294
+        return name;
295
+      },
255 296
     },
256 297
     created(){
257
-
298
+      this.orgName = this.$store.getters.xt_user.org.org_name;
299
+      this.orgId = this.$store.getters.xt_user.org.id;
258 300
       const order_id = this.$route.query.id;
301
+      this.fetchAllAdminUsers()
259 302
       this.GetConfigInfo();
260 303
       this.GetOrderDetail(order_id);
261 304
       this.getList()
@@ -294,7 +337,7 @@ export default {
294 337
             border: 1px solid;
295 338
             text-align: center;
296 339
             font-size: 18px;
297
-            padding: 15px 5px;
340
+            padding: 1px 5px;
298 341
           }
299 342
         }
300 343
       }