Sfoglia il codice sorgente

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

csx 3 anni fa
parent
commit
e377c1e75d

+ 34 - 1
src/xt_pages/hospitalStation/components/settlePrescriptionTable.vue Vedi File

1
 <template>
1
 <template>
2
   <div class="prescriptionTable">
2
   <div class="prescriptionTable">
3
+<!--    <el-button-->
4
+<!--        size="small"-->
5
+<!--        type="primary"-->
6
+<!--        icon="el-icon-download"-->
7
+<!--        @click="exportData"-->
8
+<!--    >导出</el-button>-->
3
     <el-table
9
     <el-table
4
       v-if="prescription.type == 1"
10
       v-if="prescription.type == 1"
5
       :data="prescription.advices"
11
       :data="prescription.advices"
119
       </el-table-column>
125
       </el-table-column>
120
     </el-table>
126
     </el-table>
121
     <el-table
127
     <el-table
122
-      v-if="prescription.type == 2"
128
+        id="out-table"
129
+        v-if="prescription.type == 2"
123
       :data="prescription.project"
130
       :data="prescription.project"
124
       border
131
       border
125
       style="width: 99%"
132
       style="width: 99%"
305
     };
312
     };
306
   },
313
   },
307
   mounted() {
314
   mounted() {
315
+
308
     getInitData().then((response) => {
316
     getInitData().then((response) => {
309
       if (response.data.state == 0) {
317
       if (response.data.state == 0) {
310
         this.$message.error(response.data.msg);
318
         this.$message.error(response.data.msg);
316
     });
324
     });
317
   },
325
   },
318
   methods: {
326
   methods: {
327
+    exportData(){
328
+        let excelName = '导出表格名称.xlsx';
329
+        var xlsxParam = { raw: true };//转换成excel时,使用原始的格式
330
+        // 克隆节点
331
+        let tables = document.getElementById("out-table").cloneNode(true);
332
+        // 判断是否为固定列,解决(为固定列时,会重复生成表格)
333
+        if (tables.querySelector('.el-table__fixed') !== null) {
334
+          tables.removeChild(tables.querySelector('.el-table__fixed'))
335
+        }
336
+        let table_book = this.$XLSX.utils.table_to_book(tables, xlsxParam);
337
+        var table_write = this.$XLSX.write(table_book, {
338
+          bookType: "xlsx",
339
+          bookSST: true,
340
+          type: "array"
341
+        });
342
+        try {
343
+          this.$FileSaver.saveAs(
344
+              new Blob([table_write], { type: "application/octet-stream" }),
345
+              excelName
346
+          );
347
+        } catch (e) {
348
+          if (typeof console !== "undefined") console.log(e, table_write);
349
+        }
350
+        return table_write;
351
+    },
319
     changColor({ row, rowIndex }) {
352
     changColor({ row, rowIndex }) {
320
       if (rowIndex % 2 == 1) {
353
       if (rowIndex % 2 == 1) {
321
         // 变颜色的条件
354
         // 变颜色的条件

+ 4 - 2
src/xt_pages/outpatientCharges/listTemplate/listPrintTwo.vue Vedi File

27
           <td style="width:5%">序号</td>
27
           <td style="width:5%">序号</td>
28
           <td style="width:15%">处方日期</td>
28
           <td style="width:15%">处方日期</td>
29
           <td style="width:10%">费用编号</td>
29
           <td style="width:10%">费用编号</td>
30
-          <td style="width:40%">费用名称/规格</td>
30
+          <td style="width:30%">费用名称</td>
31
+          <td style="width:10%">规格</td>
31
           <td style="width:5%">单位</td>
32
           <td style="width:5%">单位</td>
32
           <td style="width:5%">数量</td>
33
           <td style="width:5%">数量</td>
33
           <td style="width:10%">单价</td>
34
           <td style="width:10%">单价</td>
38
             <td style="width:5%">{{index + 1}}</td>
39
             <td style="width:5%">{{index + 1}}</td>
39
             <td style="width:15%">{{item.p_time}}</td>
40
             <td style="width:15%">{{item.p_time}}</td>
40
             <td style="width:10%">{{item.feedetl_sn.split("-")[2]}}</td>
41
             <td style="width:10%">{{item.feedetl_sn.split("-")[2]}}</td>
41
-            <td style="width:40%">{{item.name}}/{{item.spec}}</td>
42
+            <td style="width:30%">{{item.name}}</td>
43
+            <td style="width:10%">{{item.spec}}</td>
42
             <td style="width:5%">{{item.unit}}</td>
44
             <td style="width:5%">{{item.unit}}</td>
43
             <td style="width:5%">{{ item.count }}</td>
45
             <td style="width:5%">{{ item.count }}</td>
44
             <td style="width:10%">{{ item.price }}</td>
46
             <td style="width:10%">{{ item.price }}</td>

+ 14 - 14
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Vedi File

85
 
85
 
86
 
86
 
87
           <div>
87
           <div>
88
-<!--            <el-button size="small"-->
89
-<!--                       @click="openZb(1)"-->
90
-<!--                       type="primary">登记-->
91
-<!--            </el-button>-->
92
-
93
-<!--            <el-button  size="small"-->
94
-<!--                       @click="openZb(2)"-->
95
-<!--                       type="primary">记账-->
96
-<!--            </el-button>-->
97
-
98
-<!--            <el-button   size="small"-->
99
-<!--                       @click="openZb(3)"-->
100
-<!--                       type="primary">撤销记账-->
101
-<!--            </el-button>-->
88
+            <el-button size="small"
89
+                       @click="openZb(1)"
90
+                       type="primary">登记
91
+            </el-button>
92
+
93
+            <el-button  size="small"
94
+                       @click="openZb(2)"
95
+                       type="primary">记账
96
+            </el-button>
97
+
98
+            <el-button   size="small"
99
+                       @click="openZb(3)"
100
+                       type="primary">撤销记账
101
+            </el-button>
102
 
102
 
103
 
103
 
104
             <el-button v-loading="loadingone" size="small"
104
             <el-button v-loading="loadingone" size="small"