28169 před 2 měsíci
rodič
revize
8bd1bb9be0

+ 19 - 0
src/api/stock.js Zobrazit soubor

@@ -1132,4 +1132,23 @@ export function getGoodStockInventoryList(params){
1132 1132
     method:"get",
1133 1133
     params:params
1134 1134
   })
1135
+}
1136
+
1137
+
1138
+export function getStockInventoryPrintList(params){
1139
+
1140
+  return request({
1141
+    url:"/api/good/getstockinventoryprintlist",
1142
+    method:"get",
1143
+    params:params
1144
+  })
1145
+}
1146
+
1147
+export function getStockInventroyModePrintList(params){
1148
+  
1149
+  return request({
1150
+    url:"/api/good/getstockinventoymodeprintlist",
1151
+    method:"get",
1152
+    params:params
1153
+  })
1135 1154
 }

+ 9 - 0
src/router/modules/stock.js Zobrazit soubor

@@ -124,6 +124,15 @@ export default {
124 124
       meta: { title: 'stockInventoryPrint', noCache: true }
125 125
     },
126 126
 
127
+    {
128
+      path: '/stock/stockInventoryModePrint',
129
+      component: () => import('@/xt_pages/stock/stockInventoryModePrint'),
130
+      name: 'stockInventoryModePrint',
131
+      hidden: true,
132
+      is_menu: false,
133
+      meta: { title: 'stockInventoryModePrint', noCache: true }
134
+    },
135
+
127 136
     // {
128 137
     //   path: "/stock/",
129 138
     //   component: Layout,

+ 34 - 10
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue Zobrazit soubor

@@ -2149,10 +2149,7 @@
2149 2149
                           </span>
2150 2150
 
2151 2151
                         </td>
2152
-                        <!-- <td height="35px">
2153
-                      <span v-if="setAdminUserES(advice.checker) == ''">{{getAdminUser(advice.checker)}}</span>
2154
-                      <img style="height:20px;" :src="setAdminUserES(advice.checker)" alt="" srcset="" v-else>
2155
-                    </td> -->
2152
+                     
2156 2153
                         <td height="32px">
2157 2154
                           <span v-if="advice!=null && advice.execution_staff>0">
2158 2155
                             <span
@@ -2169,7 +2166,8 @@
2169 2166
                         </span>
2170 2167
                         </td>
2171 2168
                         <td v-if="org_id == 10598 || org_id==10489 ">
2172
-                          <span v-if="advice!=null && advice.checker>0">
2169
+                          <span v-if="org_id!=10489">
2170
+                            <span v-if="advice!=null && advice.checker>0">
2173 2171
                               <span v-if="setAdminUserES(advice.checker) == ''">{{ getAdminUser(advice.checker)}}</span>
2174 2172
                               <img
2175 2173
                                 style="height: 30px"
@@ -2178,12 +2176,35 @@
2178 2176
                                 srcset=""
2179 2177
                                 v-else
2180 2178
                               />
2179
+                            </span>
2181 2180
                           </span>
2181
+
2182
+                          <span v-if="org_id == 10489">
2183
+                            <span v-if="advice.execution_time">{{
2184
+                              getTime(advice.execution_time, "{h}:{i}")
2185
+                             }}</span>
2186
+                          </span>
2187
+                         
2182 2188
                         </td>
2183 2189
                         <td height="32px">
2184
-                          <span v-if="advice.execution_time">{{
2185
-                            getTime(advice.execution_time, "{h}:{i}")
2186
-                          }}</span>
2190
+                          <span v-if="org_id!=10489">
2191
+                             <span v-if="advice.execution_time">{{
2192
+                              getTime(advice.execution_time, "{h}:{i}")
2193
+                             }}</span>
2194
+                          </span>
2195
+                          <span v-if="org_id == 10489">
2196
+                            <span v-if="advice!=null && advice.checker>0">
2197
+                              <span v-if="setAdminUserES(advice.checker) == ''">{{ getAdminUser(advice.checker)}}</span>
2198
+                              <img
2199
+                                style="height: 30px"
2200
+                                :src="setAdminUserES(advice.checker)"
2201
+                                alt=""
2202
+                                srcset=""
2203
+                                v-else
2204
+                              />
2205
+                            </span>
2206
+                          </span>
2207
+                         
2187 2208
                         </td>
2188 2209
                         <td height="32px" v-if="org_id == 10223 || org_id == 9538  ||
2189 2210
                             org_id ==10375 || org_id ==10571 || org_id ==10600">
@@ -2203,7 +2224,7 @@
2203 2224
 
2204 2225
 
2205 2226
                       <tr
2206
-                      v-if="org_id ==10206 || org_id == 10644 || org_id == 0"
2227
+                      v-if="org_id ==10206 || org_id == 10644 || org_id == 0 || org_id ==10489"
2207 2228
                       v-for="(advice, advice_index) in projectsOne"
2208 2229
                       :key="advice_index"
2209 2230
                     >
@@ -2260,6 +2281,7 @@
2260 2281
                         />
2261 2282
                       </td>
2262 2283
                         <td height="32px">
2284
+                          
2263 2285
                           <span v-if="advice.execution_time">{{
2264 2286
                             getTime(advice.execution_time, "{h}:{i}")
2265 2287
                           }}</span>
@@ -2282,6 +2304,8 @@
2282 2304
                   </table>
2283 2305
                 </td>
2284 2306
               </tr>
2307
+
2308
+
2285 2309
               <tr v-if="org_id ==10206">
2286 2310
                 <td style="padding: 0; position: relative" colspan="2">
2287 2311
                   <table class="inside_table">
@@ -5679,7 +5703,7 @@ export default {
5679 5703
         }
5680 5704
 
5681 5705
         //HIS客户显示临时医嘱的地方
5682
-        if(this.org_id == 10510 || this.org_id ==10567 || this.org_id == 10489){
5706
+        if(this.org_id == 10510 || this.org_id ==10567 || this.org_id == 10489 || this.org_id == 0 || this.org_id == 10644){
5683 5707
           if(response.data.data.doctorAdevieInfo!=null && response.data.data.doctorAdevieInfo.length>0){
5684 5708
 
5685 5709
             for(let i=0;i<response.data.data.doctorAdevieInfo.length;i++){

+ 25 - 9
src/xt_pages/stock/inventoryRecord.vue Zobrazit soubor

@@ -63,6 +63,13 @@
63 63
         </div>
64 64
         <el-table :data="tableData" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }" @selection-change="changePrice" >
65 65
             <el-table-column type="selection" width="55" align="center"> </el-table-column>
66
+
67
+            
68
+            <el-table-column prop="name" label="盘点时间"  width="100" align="center">
69
+                <template slot-scope="scope">
70
+                   {{ getTime(scope.row.record_date) }}
71
+                </template>
72
+            </el-table-column>
66 73
             <el-table-column prop="date" label="耗材名称" align="center">
67 74
                 <template slot-scope="scope">
68 75
                   {{scope.row.good_name}}
@@ -129,17 +136,12 @@
129 136
                 </template>
130 137
             </el-table-column>
131 138
 
132
-            <el-table-column prop="name" label="盘点时间"  width="100" align="center">
133
-                <template slot-scope="scope">
134
-                   {{ getTime(scope.row.record_date) }}
135
-                </template>
136
-            </el-table-column>
137 139
           
138 140
         </el-table>
139 141
         <el-pagination
140 142
             @size-change="handleSizeChange"
141 143
             @current-change="handleCurrentChange"
142
-            :page-sizes="[10, 20, 40, 100]"
144
+            :page-sizes="[100, 200, 400, 600,800,1000,2000]"
143 145
             :page-size="10"
144 146
             background
145 147
             style="margin-top:20px;text-align: right"
@@ -153,6 +155,7 @@
153 155
 <script>
154 156
 import { uParseTime } from '@/utils/tools'
155 157
 import { getGoodStockInventoryList } from "@/api/stock"
158
+const moment = require('moment');
156 159
 import user from '../../store/modules/user';
157 160
 
158 161
 export default {
@@ -168,7 +171,7 @@ export default {
168 171
                 name: '',
169 172
             },
170 173
             total: 0,
171
-            limit:10,
174
+            limit:100,
172 175
             page:1,
173 176
             ids:"",
174 177
             damageList:[],
@@ -188,7 +191,7 @@ export default {
188 191
              this.$message.error("请勾选需要打印的内容")
189 192
              return false
190 193
           }              
191
-          this.$router.push({path:'/stock/stockInventoryPrint?storehouse_id='+this.storehouse_id+"&good_name="+this.searchKey+"&limit="+this.limit+"&page="+this.page+"&ids="+this.ids})
194
+          this.$router.push({path:'/stock/stockInventoryPrint?storehouse_id='+this.storehouse_id+"&keyword="+this.searchKey+"&limit="+this.limit+"&page="+this.page+"&ids="+this.ids})
192 195
         },
193 196
 
194 197
         search(){
@@ -279,7 +282,20 @@ export default {
279 282
          }
280 283
        },
281 284
       inventoryExportList(){
282
-        this.$router.push({path:'/stock/inventoryPrint'})
285
+       
286
+        var start_time_one = ""
287
+        var end_time_one = ""
288
+        if(this.start_time!="" && this.end_time !=""){
289
+           start_time_one = this.start_time
290
+           end_time_one = this.end_time
291
+        }
292
+        if(this.start_time=="" && this.end_time ==""){
293
+
294
+          start_time_one = moment().startOf('month').format("YYYY-MM-DD")
295
+          end_time_one= moment().endOf('month').format("YYYY-MM-DD")
296
+
297
+        }
298
+        this.$router.push({path:'/stock/stockInventoryModePrint?start_time='+start_time_one+"&end_time="+end_time_one})
283 299
       },
284 300
       getStorehouseName(id){
285 301
         var storehouse_name = ""

+ 170 - 0
src/xt_pages/stock/stockInventoryPrint.vue Zobrazit soubor

@@ -0,0 +1,170 @@
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 text-align="center">耗材名称</td>
22
+                        <td text-align="center">规格</td>
23
+                        <td text-align="center">批号</td>
24
+                        <td text-align="center">生产厂商</td>
25
+                        <td text-align="center">仓库名称</td>
26
+                        <td text-align="center">盘点前数量</td> 
27
+                        <td text-align="center">盘点后数量</td>
28
+                        <td text-align="center">盈亏类型</td>
29
+                        <td text-align="center">盘点人</td>
30
+                       
31
+                    </tr>
32
+                    <tr v-for="(item,index) in tableList" :key="index">
33
+                        <td>{{item.good_name}}</td>
34
+                        <td>{{item.specification_name}}</td>
35
+                        <td>{{item.batch_number}}</td>
36
+                        <td>{{item.manufacturer_name}}</td>
37
+                        <td>{{getHouseName(item.storehouse_id)}}</td>
38
+                        <td>{{item.befor_count}}</td>
39
+                        <td>{{item.after_count}}</td>
40
+                        <td>
41
+                          <span v-if="item.befor_count > item.after_count">盘亏</span>
42
+                          <span v-if="item.befor_count < item.after_count">盘盈</span></td>
43
+                        <td><span> {{getName(item.creater)}}</span></td>
44
+                      
45
+                    </tr>
46
+                    </tbody>
47
+                </table>
48
+            </div>
49
+        </div>
50
+    </div>
51
+</template>
52
+
53
+<script>
54
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
55
+const moment = require('moment');
56
+import { uParseTime } from '@/utils/tools'
57
+import { getStockInventoryPrintList } from "@/api/stock"
58
+import print from "print-js";
59
+export default {
60
+    components:{
61
+        BreadCrumb
62
+    },
63
+    data(){
64
+        return{
65
+          crumbs: [
66
+            { path: false, name: '库存管理' },
67
+            { path: false, name: '耗材管理' },
68
+            { path: false, name: '耗材盘点打印' },
69
+          ],
70
+          org_name: this.$store.getters.xt_user.org.org_name,
71
+          ids:"",
72
+          tableList:[],
73
+          manufacturerList:[],
74
+          houseList:[],
75
+          doclist:[]
76
+        }
77
+    },
78
+    methods:{
79
+        getName(admin_user_id){
80
+         var user_name = ""
81
+         for(let i=0;i<this.docList.length;i++){
82
+           if(admin_user_id == this.docList[i].admin_user_id){
83
+               user_name = this.docList[i].user_name
84
+           }
85
+         }
86
+         return user_name
87
+        },
88
+        printAction: function() {
89
+            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;} }';
90
+            printJS({ 
91
+            printable: 'print_content',
92
+            type: 'html',
93
+            documentTitle: '  ',
94
+            style: style,
95
+            scanStyles: false
96
+            })
97
+        },
98
+        getTime(val) {
99
+         if(val < 0){
100
+            return ""
101
+          }
102
+         if(val == ""){
103
+            return ""
104
+          }else {
105
+            return uParseTime(val, '{y}-{m}-{d}')
106
+         }
107
+        },
108
+        getlist(){
109
+          var params = {
110
+            storehouse_id:this.$route.query.storehouse_id,
111
+            keyword:this.$route.query.keyword,
112
+            limit:this.$route.query.limit,
113
+            page:this.$route.query.page,
114
+            ids:this.$route.query.ids,
115
+          }
116
+         getStockInventoryPrintList(params).then(response=>{
117
+           if(response.data.state == 1){
118
+             var list = response.data.data.list
119
+             console.log("list232332232323",response.data.data.list)
120
+             this.tableList = list
121
+             console.log("list233233232323",this.tableList)
122
+             this.houseList = response.data.data.storeHouseList
123
+
124
+             this.docList = response.data.data.doclist
125
+           }
126
+         })
127
+        },
128
+        getManufacturerName(id){
129
+           var name = ""
130
+           for(let i=0;i<this.manufacturerList.length;i++){
131
+              if(id == this.manufacturerList[i].id){
132
+                  name = this.manufacturerList[i].manufacturer_name
133
+              }
134
+           }
135
+           return name
136
+        },
137
+        getHouseName(id){
138
+         var storehouse_name = ""
139
+         for(let i=0;i<this.houseList.length;i++){
140
+           if(id == this.houseList[i].id){
141
+              storehouse_name = this.houseList[i].storehouse_name
142
+           }
143
+         }
144
+         if(storehouse_name == "全部"){
145
+           return ""
146
+         }else{
147
+           return storehouse_name
148
+         }
149
+       }
150
+    },
151
+    created(){
152
+
153
+      this.getlist()
154
+    }
155
+}
156
+</script>
157
+
158
+
159
+<style rel="stylesheet/scss" lang="scss" scoped>
160
+.printTitle{font-size: 22px;text-align: center;}
161
+.flex{display: flex;justify-content: space-between;}
162
+.tableTitle{display: flex;border-top:1px solid #000;border-bottom: 1px solid #000;padding: 10px 0;}
163
+.tableTr{display: flex;border-bottom: 1px dashed #000;padding: 10px 0;}
164
+.tableBottom{display: flex;border-bottom: 1px solid #000;padding: 10px 0;}
165
+.printTable{width:100%;border-collapse: collapse;}
166
+.printTable td{padding:5px;}
167
+.print_head{border: none;display: table-header-group;}
168
+.print_head tr td{text-align: center;border: none;}
169
+.print_body tr td{border:1px solid}
170
+</style>