huangyw пре 2 година
родитељ
комит
01c514f8ee

+ 1 - 1
src/xt_pages/stock/drugs/cancelDrugOrderPrint.vue Прегледај датотеку

@@ -65,7 +65,7 @@
65 65
           </div>
66 66
           <div v-if="orgId == 10024" style="display:flex;margin-top:1px;float:right;">
67 67
             <div style="width:50px;">科室:</div><div style="width:60px;"></div>
68
-            <div style="width:70px;">领人:</div><div style="width:60px;"></div>
68
+            <div style="width:70px;">领人:</div><div style="width:60px;"></div>
69 69
             <div style="width:80px;">审批:</div><div style="width:100px;">肖庆娥</div>
70 70
             <div style="width:50px;">会计:</div><div style="width:100px;">徐立琼</div>
71 71
             <div style="width:50px;">审核:</div><div style="width:100px;">徐立琼</div>

+ 2 - 2
src/xt_pages/stock/drugs/drugStockOutOrderDetailPrint.vue Прегледај датотеку

@@ -68,7 +68,7 @@
68 68
           </div>
69 69
           <div v-if="orgId == 10024" style="display:flex;margin-top:1px;float:right;">
70 70
             <div style="width:50px;">科室:</div><div style="width:60px;"></div>
71
-            <div style="width:70px;">领人:</div><div style="width:60px;"></div>
71
+            <div style="width:70px;">领人:</div><div style="width:60px;"></div>
72 72
             <div style="width:80px;">审批:</div><div style="width:100px;">肖庆娥</div>
73 73
             <div style="width:50px;">会计:</div><div style="width:100px;">徐立琼</div>
74 74
             <div style="width:50px;">审核:</div><div style="width:100px;">徐立琼</div>
@@ -144,7 +144,7 @@
144 144
           </div>
145 145
           <div v-if="orgId == 10024" style="display:flex;margin-top:1px;float:right;">
146 146
             <div style="width:50px;">科室:</div><div style="width:60px;"></div>
147
-            <div style="width:70px;">领人:</div><div style="width:60px;"></div>
147
+            <div style="width:70px;">领人:</div><div style="width:60px;"></div>
148 148
             <div style="width:80px;">审批:</div><div style="width:100px;">肖庆娥</div>
149 149
             <div style="width:50px;">会计:</div><div style="width:100px;">徐立琼</div>
150 150
             <div style="width:50px;">审核:</div><div style="width:100px;">徐立琼</div>

+ 4 - 0
src/xt_pages/stock/drugs/inventoryDetails.vue Прегледај датотеку

@@ -27,6 +27,7 @@
27 27
                 >
28 28
             </div>
29 29
             <div>
30
+               <el-button size="small" type="primary" @click="print_1">打印</el-button>
30 31
                <el-button size="small" type="primary" @click="print">盘点模版打印</el-button>
31 32
             </div>
32 33
             <!-- <div>
@@ -141,6 +142,9 @@ export default {
141 142
         print(){
142 143
             this.$router.push({path:'/stock/drugs/inventoryPrint'}) 
143 144
         },
145
+        print_1(){
146
+           this.$router.push({path:'/stock/drugs/print'}) 
147
+        },
144 148
         handleSizeChange(val){
145 149
          this.limit = val
146 150
          this.getlist()

+ 137 - 0
src/xt_pages/stock/drugs/print.vue Прегледај датотеку

@@ -0,0 +1,137 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+            <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+            </el-col>
9
+        </el-row>
10
+        </div>
11
+        <div class="app-container" style="background-color: white;">
12
+            <div id="print_content">
13
+
14
+                <table class="printTable" border="0" cellspacing="0" align="center">
15
+                    <thead class="print_head">
16
+                        <tr><td colspan="11">{{org_name}}</td></tr>
17
+                        <tr><td colspan="11">药品盘点</td></tr>
18
+                    </thead>  
19
+                    <tbody class="print_body">
20
+                    <tr>
21
+                        <td>药品名称</td>
22
+                        <td>规格</td>
23
+                        <td>单位</td>
24
+                        <td>批号</td>
25
+                        <td>生产厂商</td>
26
+                        <td>仓库名称</td>
27
+                        <td>盘点前数量</td> 
28
+                        <td>盘点后数量</td>
29
+                        <td>盈亏类型</td>
30
+                        <td>进货单价</td>
31
+                        <td width="60">总额</td>
32
+                        
33
+                    </tr>
34
+                    <tr v-for="(item,index) in tableData" :key="index">
35
+                        <td>{{item.good_name}}</td>
36
+                        <td>{{item.specification_name}}</td>
37
+                        <td>{{item.packing_unit}}</td>
38
+                        <td>{{item.number}}</td>
39
+                        <td></td>
40
+                        <td></td>
41
+                        <td></td>
42
+                        <td></td>
43
+                        <td></td>
44
+                        <td></td>
45
+                        <td></td>
46
+                    </tr>
47
+                    </tbody>
48
+                </table>
49
+            </div>
50
+        </div>
51
+    </div>
52
+</template>
53
+
54
+<script>
55
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
56
+const moment = require('moment');
57
+import { uParseTime } from '@/utils/tools'
58
+import { getInventoryExportList } from "@/api/stock"
59
+import print from "print-js";
60
+export default {
61
+    components:{
62
+        BreadCrumb
63
+    },
64
+    data(){
65
+        return{
66
+          crumbs: [
67
+            { path: false, name: '库存管理' },
68
+            { path: false, name: '耗材管理' },
69
+            { path: false, name: '耗材盘点打印' },
70
+          ],
71
+          org_name:"",
72
+          ids:"",
73
+          tableData:[],
74
+          manufacturerList:[],
75
+        }
76
+    },
77
+    methods:{
78
+        printAction: function() {
79
+            const style = '@page{size:landscape;margin: 10mm;} @media print { print_content{width:960px;margin:0} .flex{display: flex;justify-content: space-between;} .printTable{width:100%;border-collapse: collapse;border:0px;margin:10px 0;} .printTable thead{text-align:center}.printTable td{padding:5px;} .print_body tr td{border: 1px solid;font-size:12px;border-collapse:collapse;} }';
80
+            printJS({ 
81
+            printable: 'print_content',
82
+            type: 'html',
83
+            documentTitle: '  ',
84
+            style: style,
85
+            scanStyles: false
86
+            })
87
+        },
88
+        getTime(val) {
89
+         if(val < 0){
90
+            return ""
91
+          }
92
+         if(val == ""){
93
+            return ""
94
+          }else {
95
+            return uParseTime(val, '{y}-{m}-{d}')
96
+         }
97
+        },
98
+        getlist(){
99
+         getInventoryExportList().then(response=>{
100
+           if(response.data.state == 1){
101
+             var list =  response.data.data.list
102
+             console.log("list233233232323",list)
103
+             this.tableData = list
104
+             this.manufacturerList = response.data.data.manufacturerList
105
+           }
106
+         })
107
+        },
108
+        getManufacturerName(id){
109
+
110
+           var name = ""
111
+           for(let i=0;i<this.manufacturerList.length;i++){
112
+              if(id == this.manufacturerList[i].id){
113
+                  name = this.manufacturerList[i].manufacturer_name
114
+              }
115
+           }
116
+           return name
117
+        }
118
+    },
119
+    created(){
120
+      this.getlist()
121
+    }
122
+}
123
+</script>
124
+
125
+
126
+<style rel="stylesheet/scss" lang="scss" scoped>
127
+.printTitle{font-size: 22px;text-align: center;}
128
+.flex{display: flex;justify-content: space-between;}
129
+.tableTitle{display: flex;border-top:1px solid #000;border-bottom: 1px solid #000;padding: 10px 0;}
130
+.tableTr{display: flex;border-bottom: 1px dashed #000;padding: 10px 0;}
131
+.tableBottom{display: flex;border-bottom: 1px solid #000;padding: 10px 0;}
132
+.printTable{width:100%;border-collapse: collapse;}
133
+.printTable td{padding:5px;}
134
+.print_head{border: none;display: table-header-group;}
135
+.print_head tr td{text-align: center;border: none;}
136
+.print_body tr td{border:1px solid}
137
+</style>

+ 5 - 0
src/xt_pages/stock/inventoryDetails.vue Прегледај датотеку

@@ -26,6 +26,7 @@
26 26
                 @click="search">搜索</el-button>
27 27
             </div>
28 28
             <div>
29
+              <el-button type="primary" @click="toprint">打印</el-button>
29 30
               <el-button type="primary" @click="inventoryExportList">盘点模版打印</el-button>
30 31
             </div>
31 32
             <!-- <div>
@@ -128,6 +129,10 @@ export default {
128 129
          }
129 130
     },
130 131
     methods:{
132
+        toprint(){
133
+          this.$router.push({path:'/stock/print_all'})
134
+        },
135
+
131 136
         search(){
132 137
          this.getlist()
133 138
         },

+ 1 - 1
src/xt_pages/stock/inventoryPrint.vue Прегледај датотеку

@@ -66,7 +66,7 @@ export default {
66 66
     },
67 67
     methods:{
68 68
         printAction: function() {
69
-            const style = '@media print { .printTitle{font-size: 22px;text-align: center;}.flex{display: flex;justify-content: space-between;}.tableTitle{display: flex;border-top:1px solid #000;border-bottom: 1px solid #000;padding: 10px 0;}.tableTr{display: flex;border-bottom: 1px dashed #000;padding: 10px 0;}.tableBottom{display: flex;border-bottom: 1px solid #000;padding: 10px 0;}.printTable td{padding:5px;} }';
69
+            const style = '@media print { .printTitle{font-size: 22px;text-align: center;}.flex{display: flex;justify-content: space-between;}.tableTitle{display: flex;border-top:1px solid #000;border-bottom: 1px solid #000;padding: 10px 0;}.tableTr{display: flex;border-bottom: 1px dashed #000;padding: 10px 0;}.tableBottom{display: flex;border-bottom: 1px solid #000;padding: 10px 0;}.printTable{width:100%;border-collapse: collapse;}.printTable td{padding:5px;} }';
70 70
             printJS({
71 71
             printable: 'print_content',
72 72
             type: 'html',

+ 1 - 1
src/xt_pages/stock/stockOutOrderDetailPrint.vue Прегледај датотеку

@@ -67,7 +67,7 @@
67 67
                         </div>
68 68
                         <div v-if="orgId == 10024" style="display:flex;margin-top:1px;float:right;">
69 69
                           <div style="width:50px;">科室:</div><div style="width:60px;"></div>
70
-                          <div style="width:70px;">领人:</div><div style="width:60px;"></div>
70
+                          <div style="width:70px;">领人:</div><div style="width:60px;"></div>
71 71
                           <div style="width:80px;">审批:</div><div style="width:100px;">肖庆娥</div>
72 72
                           <div style="width:50px;">会计:</div><div style="width:100px;">徐立琼</div>
73 73
                           <div style="width:50px;">审核:</div><div style="width:100px;">徐立琼</div>