소스 검색

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

csx 3 년 전
부모
커밋
5a82cfbb1e
4개의 변경된 파일101개의 추가작업 그리고 32개의 파일을 삭제
  1. 16 30
      package-lock.json
  2. 1 0
      package.json
  3. 73 0
      src/xt_pages/outpatientTool/labelPrint.vue
  4. 11 2
      src/xt_pages/outpatientTool/signPrint.vue

+ 16 - 30
package-lock.json 파일 보기

@@ -4751,8 +4751,7 @@
4751 4751
         "ansi-regex": {
4752 4752
           "version": "2.1.1",
4753 4753
           "bundled": true,
4754
-          "dev": true,
4755
-          "optional": true
4754
+          "dev": true
4756 4755
         },
4757 4756
         "aproba": {
4758 4757
           "version": "1.2.0",
@@ -4775,15 +4774,13 @@
4775 4774
         "balanced-match": {
4776 4775
           "version": "1.0.0",
4777 4776
           "bundled": true,
4778
-          "dev": true,
4779
-          "optional": true
4777
+          "dev": true
4780 4778
         },
4781 4779
         "brace-expansion": {
4782 4780
           "version": "1.1.11",
4783 4781
           "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
4784 4782
           "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
4785 4783
           "dev": true,
4786
-          "optional": true,
4787 4784
           "requires": {
4788 4785
             "balanced-match": "^1.0.0",
4789 4786
             "concat-map": "0.0.1"
@@ -4799,22 +4796,19 @@
4799 4796
         "code-point-at": {
4800 4797
           "version": "1.1.0",
4801 4798
           "bundled": true,
4802
-          "dev": true,
4803
-          "optional": true
4799
+          "dev": true
4804 4800
         },
4805 4801
         "concat-map": {
4806 4802
           "version": "0.0.1",
4807 4803
           "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
4808 4804
           "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
4809
-          "dev": true,
4810
-          "optional": true
4805
+          "dev": true
4811 4806
         },
4812 4807
         "console-control-strings": {
4813 4808
           "version": "1.1.0",
4814 4809
           "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
4815 4810
           "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
4816
-          "dev": true,
4817
-          "optional": true
4811
+          "dev": true
4818 4812
         },
4819 4813
         "core-util-is": {
4820 4814
           "version": "1.0.2",
@@ -4944,8 +4938,7 @@
4944 4938
         "inherits": {
4945 4939
           "version": "2.0.3",
4946 4940
           "bundled": true,
4947
-          "dev": true,
4948
-          "optional": true
4941
+          "dev": true
4949 4942
         },
4950 4943
         "ini": {
4951 4944
           "version": "1.3.5",
@@ -4959,7 +4952,6 @@
4959 4952
           "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
4960 4953
           "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
4961 4954
           "dev": true,
4962
-          "optional": true,
4963 4955
           "requires": {
4964 4956
             "number-is-nan": "^1.0.0"
4965 4957
           }
@@ -4976,7 +4968,6 @@
4976 4968
           "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
4977 4969
           "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
4978 4970
           "dev": true,
4979
-          "optional": true,
4980 4971
           "requires": {
4981 4972
             "brace-expansion": "^1.1.7"
4982 4973
           }
@@ -4984,15 +4975,13 @@
4984 4975
         "minimist": {
4985 4976
           "version": "0.0.8",
4986 4977
           "bundled": true,
4987
-          "dev": true,
4988
-          "optional": true
4978
+          "dev": true
4989 4979
         },
4990 4980
         "minipass": {
4991 4981
           "version": "2.3.5",
4992 4982
           "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz",
4993 4983
           "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
4994 4984
           "dev": true,
4995
-          "optional": true,
4996 4985
           "requires": {
4997 4986
             "safe-buffer": "^5.1.2",
4998 4987
             "yallist": "^3.0.0"
@@ -5013,7 +5002,6 @@
5013 5002
           "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
5014 5003
           "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
5015 5004
           "dev": true,
5016
-          "optional": true,
5017 5005
           "requires": {
5018 5006
             "minimist": "0.0.8"
5019 5007
           }
@@ -5101,8 +5089,7 @@
5101 5089
         "number-is-nan": {
5102 5090
           "version": "1.0.1",
5103 5091
           "bundled": true,
5104
-          "dev": true,
5105
-          "optional": true
5092
+          "dev": true
5106 5093
         },
5107 5094
         "object-assign": {
5108 5095
           "version": "4.1.1",
@@ -5116,7 +5103,6 @@
5116 5103
           "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
5117 5104
           "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
5118 5105
           "dev": true,
5119
-          "optional": true,
5120 5106
           "requires": {
5121 5107
             "wrappy": "1"
5122 5108
           }
@@ -5211,8 +5197,7 @@
5211 5197
         "safe-buffer": {
5212 5198
           "version": "5.1.2",
5213 5199
           "bundled": true,
5214
-          "dev": true,
5215
-          "optional": true
5200
+          "dev": true
5216 5201
         },
5217 5202
         "safer-buffer": {
5218 5203
           "version": "2.1.2",
@@ -5254,7 +5239,6 @@
5254 5239
           "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
5255 5240
           "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
5256 5241
           "dev": true,
5257
-          "optional": true,
5258 5242
           "requires": {
5259 5243
             "code-point-at": "^1.0.0",
5260 5244
             "is-fullwidth-code-point": "^1.0.0",
@@ -5276,7 +5260,6 @@
5276 5260
           "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
5277 5261
           "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
5278 5262
           "dev": true,
5279
-          "optional": true,
5280 5263
           "requires": {
5281 5264
             "ansi-regex": "^2.0.0"
5282 5265
           }
@@ -5324,15 +5307,13 @@
5324 5307
         "wrappy": {
5325 5308
           "version": "1.0.2",
5326 5309
           "bundled": true,
5327
-          "dev": true,
5328
-          "optional": true
5310
+          "dev": true
5329 5311
         },
5330 5312
         "yallist": {
5331 5313
           "version": "3.0.3",
5332 5314
           "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
5333 5315
           "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
5334
-          "dev": true,
5335
-          "optional": true
5316
+          "dev": true
5336 5317
         }
5337 5318
       }
5338 5319
     },
@@ -6697,6 +6678,11 @@
6697 6678
         "esprima": "^2.6.0"
6698 6679
       }
6699 6680
     },
6681
+    "jsbarcode": {
6682
+      "version": "3.11.5",
6683
+      "resolved": "https://registry.nlark.com/jsbarcode/download/jsbarcode-3.11.5.tgz",
6684
+      "integrity": "sha1-OQs+/QJx81udaMe4r26XJEWWkBQ="
6685
+    },
6700 6686
     "jsbn": {
6701 6687
       "version": "0.1.1",
6702 6688
       "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",

+ 1 - 0
package.json 파일 보기

@@ -51,6 +51,7 @@
51 51
     "file-saver": "^1.3.8",
52 52
     "font-awesome": "4.7.0",
53 53
     "js-cookie": "2.2.0",
54
+    "jsbarcode": "^3.11.5",
54 55
     "jsonlint": "1.6.3",
55 56
     "jszip": "3.1.5",
56 57
     "mockjs": "1.0.1-beta3",

+ 73 - 0
src/xt_pages/outpatientTool/labelPrint.vue 파일 보기

@@ -89,7 +89,40 @@
89 89
             >
90 90
             </el-pagination>
91 91
         </div>
92
+
93
+        <el-dialog title="打印" :visible.sync="labelVisible">
94
+            <div>
95
+                <el-row style="float:right;">
96
+                    <el-col :span="24">
97
+                        <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印
98
+                        </el-button>
99
+                    </el-col>
100
+                </el-row>
101
+                <div class="app-container" style="background-color: white;">
102
+                    <div id="sign" class="signPrint">
103
+                        <div style="display:flex;margin-bottom:10px;">
104
+                            <div style="margin-left:15px;">
105
+                                <div>C</div>
106
+                                <div>{{getTime(current_ctime,'{m}-{d}')}}</div>
107
+                                <div>{{getTime(current_ctime,'{h}:{i}')}}</div>
108
+                            </div>
109
+                            <img id="barcode">
110
+                        </div>
111
+                        <div>{{current_number}}</div>
112
+                        <div style="display:flex;">
113
+                            <div style="padding-left:20px;">{{current_project_name}}</div>
114
+                            <div style="font-size:24px;">{{current_name}}</div>
115
+                        </div>
116
+                    </div>
117
+                </div>
118
+            </div>
119
+            <div slot="footer" class="dialog-footer">
120
+                <el-button @click="labelVisible = false">取 消</el-button>
121
+                <el-button type="primary" @click="labelVisible = false">确 定</el-button>
122
+            </div>
123
+        </el-dialog>
92 124
     </div>
125
+
93 126
 </template>
94 127
 
95 128
 
@@ -97,15 +130,25 @@
97 130
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
98 131
   import { GetLabelList } from '@/api/his/his'
99 132
   import { uParseTime } from '@/utils/tools'
133
+  import SignPrint from '../dialysis/signPrint'
134
+  import JsBarcode from 'jsbarcode'
135
+
100 136
   // import NewStatementPrint from './newStatementPrint'
101 137
   const moment = require('moment')
102 138
   export default {
103 139
     components: {
140
+      SignPrint,
104 141
       BreadCrumb
105 142
 
106 143
     },
107 144
     data() {
108 145
       return {
146
+        current_ctime: 0,
147
+        current_number: '',
148
+        current_project_name: '',
149
+        current_name: '',
150
+
151
+        labelVisible: false,
109 152
         crumbs: [
110 153
           { path: false, name: 'HIS工具' },
111 154
           { path: false, name: '标签打印' }
@@ -116,6 +159,7 @@
116 159
         page: 1,
117 160
         limit: 10,
118 161
         total: 0,
162
+        current_id: 0,
119 163
         sameRowArr: [],
120 164
         keywords: '',
121 165
         tableData: [],
@@ -129,6 +173,16 @@
129 173
       }
130 174
     },
131 175
     methods: {
176
+      printAction: function() {
177
+        const style = '@media print { .sign{width:960px;margin: 0 auto;text-align: center;border-collapse: collapse;}.order_title_panl {text-align: center;.main_title {font-size: 18px;line-height: 40px;font-weight: 500;}}.dialysisTable tr{padding: 10px 0;}.dialysisTable th {color: #000;padding: 0;margin: 0;height: 30px;}.dialysisTable tr td {padding: 12px 0;}.subadvice_content {text-align: left;padding-left: 25px !important;padding-right: 5px !important;}.advice_content {text-align: left;padding-left: 5px !important;padding-right: 5px !important;padding: 15px 5px !important;} }'
178
+        printJS({
179
+          printable: 'sign',
180
+          type: 'html',
181
+          documentTitle: '  ',
182
+          style: style,
183
+          scanStyles: false
184
+        })
185
+      },
132 186
       getTime(value, temp) {
133 187
         if (value != undefined) {
134 188
           return uParseTime(value, temp)
@@ -136,6 +190,23 @@
136 190
         return ''
137 191
       },
138 192
       Print(row, index) {
193
+        this.labelVisible = true
194
+        this.current_ctime = row.ctime
195
+        this.current_number = row.number
196
+        this.current_project_name = row.project_name
197
+        this.current_name = row.patient_name
198
+
199
+        this.$nextTick(() => {
200
+          JsBarcode('#barcode', 'DY2020080400088', {
201
+            format: 'CODE39',
202
+            lineColor: '#000',
203
+            background: '#EBEEF5',
204
+            width: 2,
205
+            height: 100,
206
+            displayValue: false
207
+          })
208
+
209
+        });
139 210
 
140 211
       },
141 212
       handleCurrentChange(page) {
@@ -191,6 +262,8 @@
191 262
     created() {
192 263
       this.getList()
193 264
 
265
+    }, mounted() {
266
+
194 267
     }
195 268
   }
196 269
 </script>

+ 11 - 2
src/xt_pages/outpatientTool/signPrint.vue 파일 보기

@@ -17,7 +17,7 @@
17 17
                         <div>09-15</div>
18 18
                     </div>
19 19
                     <div style="width:100px;">
20
-                        <img src="" alt="">
20
+                        <img id="barcode">
21 21
                     </div>
22 22
                 </div>
23 23
                 <div>6821737912312983</div>
@@ -34,6 +34,7 @@ import BreadCrumb from '@/xt_pages/components/bread-crumb'
34 34
 import { getSchedualDoctors } from '@/api/advice'
35 35
 import { parseTime } from '@/utils'
36 36
 import print from 'print-js'
37
+import JsBarcode from 'jsbarcode'
37 38
 const moment = require('moment')
38 39
 export default {
39 40
     components:{
@@ -59,9 +60,17 @@ export default {
59 60
             scanStyles: false
60 61
             })
61 62
         },
62
-    
63
+
63 64
     },
64 65
     created(){
66
+      JsBarcode('#barcode', 'DY2020080400088', {
67
+        format: 'CODE39',
68
+        lineColor: '#000',
69
+        background: '#EBEEF5',
70
+        width: 2,
71
+        height: 40,
72
+        displayValue: false
73
+      })
65 74
     }
66 75
 }
67 76
 </script>