XMLWAN пре 2 година
родитељ
комит
b28523c454

+ 8 - 0
src/api/config.js Прегледај датотеку

@@ -202,3 +202,11 @@ export function changePrescriptionConfig(params) {
202 202
     params: params
203 203
   })
204 204
 }
205
+
206
+export function changeDrugOpenConfig(params) {
207
+  return request({
208
+    url: '/api/changedrugopenconfig',
209
+    method: 'get',
210
+    params: params
211
+  })
212
+}

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

@@ -39,6 +39,9 @@
39 39
             <p style="margin-top:20px;">耗材先出库再执行:
40 40
                 <el-switch v-model="is_open_is_type" @change="changeFuncType"></el-switch>
41 41
             </p>
42
+            <!-- <p style="margin-top:20px;">药品在保存处方时出库:
43
+                <el-switch v-model="drug_out_open" @change="changeDrugOpen"></el-switch>
44
+            </p> -->
42 45
         </div>
43 46
 
44 47
 
@@ -94,7 +97,7 @@
94 97
 
95 98
 <script>
96 99
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
97
-import { getAllIsOpenInit,postXtHisIsOpen,postMonitorIsOpen,changeFuncPrint,getDataPrintList,postXtHisProjectIsOpen,changeStockSetting,changeAdviceConfig,changePrescriptionConfig} from '@/api/config'
100
+import { getAllIsOpenInit,postXtHisIsOpen,postMonitorIsOpen,changeFuncPrint,getDataPrintList,postXtHisProjectIsOpen,changeStockSetting,changeAdviceConfig,changePrescriptionConfig,changeDrugOpenConfig} from '@/api/config'
98 101
 
99 102
 export default {
100 103
   name: "printTemplate",
@@ -115,6 +118,7 @@ export default {
115 118
       is_open_is_type:false,
116 119
       is_open_advice_xt_his:false,
117 120
       is_open_prescription_xt_his:false,
121
+      drug_out_open:false,
118 122
     };
119 123
   },
120 124
   methods: {
@@ -154,6 +158,12 @@ export default {
154 158
               this.is_open_prescription_xt_his = false
155 159
             }
156 160
 
161
+            if(response.data.data.is_open == 1){
162
+              this.drug_out_open = true
163
+            }else{
164
+              this.drug_out_open = false
165
+            }
166
+
157 167
           } else {
158 168
             this.$message.error(response.data.msg)
159 169
           }
@@ -376,6 +386,25 @@ export default {
376 386
             this.$message.success("保存成功!")
377 387
           }
378 388
       })
389
+    },
390
+    changeDrugOpen(){
391
+      var drug_out_open = 0
392
+      if(this.drug_out_open == false){
393
+        drug_out_open = 2
394
+      }
395
+      if(this.drug_out_open == false){
396
+        drug_out_open = 2
397
+      }
398
+      var params = {
399
+        drug_out_open:drug_out_open,
400
+      }
401
+      changeDrugOpenConfig(params).then(response=>{
402
+        if(response.data.state == 1){
403
+           var msg =  response.data.data.msg
404
+           this.$message.success("保存成功!")
405
+        }
406
+      })
407
+
379 408
     }
380 409
 
381 410
   },

+ 21 - 25
src/xt_pages/stock/drugs/components/drugOutDetail.vue Прегледај датотеку

@@ -159,26 +159,17 @@
159 159
         </el-table-column>
160 160
         <el-table-column label="总价" align="center">
161 161
           <template slot-scope="scope">
162
-           <span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span> 
163
-           <span v-if="org_id == 10210 ">{{(scope.row.price * scope.row.count).toFixed(2)}} </span> 
164
-           <span v-if="org_id == 9671 ">{{(scope.row.price * scope.row.count).toFixed(2)}} </span> 
165
-           <span v-if ="org_id!=9919 && org_id!=10210 && org_id!=9671">
166
-             <!-- <span v-if="scope.row.price >0">
167
-                <span v-if="scope.row.count_unit == scope.row.min_unit">
168
-                  {{(scope.row.price * scope.row.count).toFixed(2)}}
169
-                </span>  
170
-                <span v-if="scope.row.count_unit == scope.row.max_unit">{{(scope.row.price * scope.row.count * scope.row.min_number).toFixed(2)}}</span>
171
-              </span>
172
-             <span v-if="scope.row.price  == 0">
173
-               <span v-if="scope.row.count_unit  == scope.row.min_unit">
174
-                 {{((getPrice(scope.row.drug_id)* scope.row.count)).toFixed(2)}}
175
-               </span> 
176
-               <span v-if="scope.row.count_unit == scope.row.max_unit">
177
-                 {{(getPrice(scope.row.drug_id)* scope.row.count * scope.row.min_number).toFixed(2)}}
178
-              </span>
179
-             </span> -->
180
-             {{scope.row.total_price}}
181
-           </span>
162
+            <span v-if="scope.row.is_total !=1">
163
+              <span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span> 
164
+              <span v-if="org_id == 10210 ">{{(scope.row.price * scope.row.count).toFixed(2)}} </span> 
165
+              <span v-if="org_id == 9671 ">{{(scope.row.price * scope.row.count).toFixed(2)}} </span> 
166
+              <span v-if ="org_id!=9919 && org_id!=10210 && org_id!=9671">
167
+                 {{scope.row.total_price}}
168
+               </span>
169
+            </span>
170
+            <span v-if="scope.row.is_total == 1">
171
+              {{scope.row.total_price}}
172
+            </span>
182 173
           </template>
183 174
         </el-table-column>
184 175
       </el-table>
@@ -437,10 +428,11 @@ export default {
437 428
                order[i].total_price = order[i].count * order[i].last_price
438 429
                total_price += order[i].count * order[i].last_price
439 430
              }else{
431
+               console.log("555555555555",order[i])
440 432
                if(order[i].price > 0){
433
+                console.log("近来33232323322323")
441 434
                  if(order[i].count_unit == order[i].min_unit && order[i].max_unit!=order[i].min_unit){
442 435
                    order[i].total_price = order[i].count * order[i].price
443
-                  total_price += order[i].total_price
444 436
                  }
445 437
                  if(order[i].count_unit == order[i].max_unit){
446 438
                    if(order[i].is_sys == 0){
@@ -449,12 +441,15 @@ export default {
449 441
                      order[i].total_price += order[i].count * order[i].price * order[i].min_number
450 442
                    }
451 443
                  }
444
+
445
+                total_price += order[i].total_price
452 446
                 
453 447
                }
448
+
454 449
                if(order[i].price ==0 ){
455 450
                  if(order[i].count_unit == order[i].min_unit && order[i].max_unit!=order[i].min_unit){
456 451
                     order[i].total_price = order[i].count * this.getPrice(order[i].drug_id)
457
-                   total_price +=order[i].total_price
452
+                  
458 453
                     order[i].price = this.getPrice(order[i].drug_id)
459 454
                  }
460 455
                 
@@ -466,13 +461,13 @@ export default {
466 461
                    }
467 462
                    order[i].price = this.getPrice(order[i].drug_id)
468 463
                 }
469
-                 
464
+                total_price +=order[i].total_price
470 465
                } 
471 466
                
472 467
              }
473 468
             
474 469
           }
475
-         
470
+           console.log("toal_p3232332332233232",total_price)
476 471
            order.push({
477 472
             warehouse_out_order_number: "合计",
478 473
             is_total: 1,
@@ -487,6 +482,7 @@ export default {
487 482
        
488 483
           console.log("233223322323322332232323",order)
489 484
           this.tableData = order
485
+
490 486
            let objInfo = {}
491 487
           order.forEach((item,index)=>{
492 488
              let { drug_id } = item
@@ -579,7 +575,7 @@ export default {
579 575
           this.tablePrint[i].index = i+1
580 576
         }
581 577
         for(let i=0;i<this.tablePrint.length;i++){
582
-           if(this.org_id == 9919 ){
578
+           if(this.org_id == 9919){
583 579
            
584 580
              this.tablePrint[i].count = this.getCountSix(this.tablePrint[i].drug_id,this.tablePrint[i].child)
585 581
              this.tablePrint[i].total_price = this.getCountSenven(this.tablePrint.drug_id,this.tablePrint[i].child,this.tablePrint[i].price)

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

@@ -7,6 +7,7 @@
7 7
     </div>
8 8
     <div class="app-container ">
9 9
       <div id="dialysis-print-box">
10
+        <div v-if="org_id!=9671">
10 11
         <div class="dialysis-print-order" v-for="(it,index) in tableList" :key="index">
11 12
          <div class="order-yy-name" style="font-size:22px;font-weight:bold;letter-spacing:0px;margin-top:40px">{{orgName}}</div>
12 13
           <div class="order-title" style="font-weight:500;font-size:18px;">药品出库登记表</div>
@@ -58,8 +59,77 @@
58 59
              </tr>
59 60
             </tbody>
60 61
           </table>
62
+          <div v-if="orgId != 10024" style="display:flex;margin-top:1px;float:right;">
63
+            <div style="width:50px;">审批:</div><div style="width:100px;"></div>
64
+            <div style="width:80px;">药材主任:</div><div style="width:100px;"></div>
65
+            <div style="width:50px;">会计:</div><div style="width:100px;"></div>
66
+            <div style="width:50px;">审核:</div><div style="width:100px;"></div>
67
+            <div style="width:70px;">制单人:</div><div style="width:100px;"></div>
68
+          </div>
69
+          <div v-if="orgId == 10024" style="display:flex;margin-top:1px;float:right;">
70
+            <div style="width:50px;">科室:</div><div style="width:60px;"></div>
71
+            <div style="width:70px;">领料人:</div><div style="width:60px;"></div>
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>
76
+          </div>
77
+        </div>
78
+      </div> 
79
+
61 80
 
81
+      <div v-if="org_id == 9671">
82
+       <div class="dialysis-print-order" v-for="(it,index) in tableData" :key="index" >
83
+         <div class="order-yy-name" style="font-size:22px;font-weight:bold;letter-spacing:0px;margin-top:40px">{{orgName}}</div>
84
+          <div class="order-title" style="font-weight:500;font-size:18px;">药品出库登记表</div>
62 85
 
86
+          <div style="float: left;margin-bottom: 1px;">单据编号:{{it.warehouse_out_order_number}}</div>
87
+          <div style="float: right;margin-bottom: 1px;">{{getDateTwo()}}</div>
88
+
89
+          <table class="print-table" border="1">
90
+            <tbody>
91
+            <tr>
92
+              <td style="line-height: 50px" width="230">药品名称</td>
93
+              <td style="line-height: 50px" width="230">规格型号</td>
94
+              <td style="line-height: 50px" width="80">出货数量</td>
95
+              <td style="line-height: 50px" width="50">单位</td>
96
+              <td style="line-height:50px" width="80">出库价格</td>
97
+              <td style="line-height: 50px" width="80">总价</td>
98
+              <td style="line-height: 50px" width="80">批号</td>
99
+              <td style="line-height: 50px" width="80">生产日期</td>
100
+              <td style="line-height: 50px" width="80">有效日期</td>
101
+            </tr>
102
+
103
+            <tr v-for="(item,i) in it.xt_drug_warehouse_out_info" :key="i">
104
+              <td style="line-height: 50px">
105
+                <span>{{item.drug.drug_name}}</span>
106
+              </td>
107
+              <td style="line-height: 50px">
108
+                  <span>{{item.drug.dose}}{{item.dose_unit}}*{{item.drug.min_number}}{{item.drug.min_unit}}/{{item.drug.max_unit}}</span>
109
+              </td>
110
+              <td style="line-height: 50px">
111
+                  {{item.count}}
112
+              </td>
113
+              <td style="line-height: 50px">
114
+                <span>{{item.count_unit}}</span>
115
+              </td>
116
+              <td style="line-height:50px">
117
+                  {{item.price}}
118
+              </td>
119
+             <td  style="line-height:50px">
120
+                {{(item.count * item.price).toFixed(2)}}
121
+             </td>
122
+             <td>{{item.batch_number}}</td>
123
+             <td>{{(getTime(item.product_date))}}</td>
124
+             <td>{{(getTime(item.expire_date))}}</td>
125
+            </tr>
126
+             <tr>
127
+               <td style="line-height:50px">合计</td>
128
+               <td colspan="7"></td>
129
+               <td>{{getTotalPrince(it.xt_drug_warehouse_out_info).toFixed(2)}}</td>
130
+             </tr>
131
+            </tbody>
132
+          </table>
63 133
           <div v-if="orgId != 10024" style="display:flex;margin-top:1px;float:right;">
64 134
             <div style="width:50px;">审批:</div><div style="width:100px;"></div>
65 135
             <div style="width:80px;">药材主任:</div><div style="width:100px;"></div>
@@ -77,6 +147,7 @@
77 147
           </div>
78 148
         </div>
79 149
 
150
+       </div>
80 151
       </div>
81 152
 
82 153
     </div>
@@ -133,7 +204,8 @@
133 204
         manufactureList:[],
134 205
         tableList:[],
135 206
         loading:false,
136
-        warehouseList:[]
207
+        warehouseList:[],
208
+        tableData:[],
137 209
       }
138 210
     },
139 211
     methods: {
@@ -175,25 +247,25 @@
175 247
             const params = {
176 248
             'id': order_id
177 249
             };
178
-            getDrugWarehouseOutInfo(params).then(response => {
179
-            if (response.data.state == 0) {
250
+     getDrugWarehouseOutInfo(params).then(response => {
251
+        if (response.data.state == 0) {
180 252
 
181
-                this.$message.error(response.data.msg);
182
-                return false
183
-            } else {
184
-              for (let i = 0; i < response.data.data.list.length; i++) {
185
-                this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
186
-               }
187
-               var total_price = 0;
188
-               for(let i=0;i<this.warehousingOutInfo.warehousingOutData.length;i++){
189
-                 total_price += this.warehousingOutInfo.warehousingOutData[i].count * this.warehousingOutInfo.warehousingOutData[i].price
190
-               }
191
-               this.allPrice = total_price;
192
-               this.warehousingOutInfo.info = response.data.data.info;
193
-               this.handleSpanTempArr()
253
+            this.$message.error(response.data.msg);
254
+            return false
255
+        } else {
256
+          for (let i = 0; i < response.data.data.list.length; i++) {
257
+            this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
194 258
             }
195
-            })
196
-        },
259
+            var total_price = 0;
260
+            for(let i=0;i<this.warehousingOutInfo.warehousingOutData.length;i++){
261
+              total_price += this.warehousingOutInfo.warehousingOutData[i].count * this.warehousingOutInfo.warehousingOutData[i].price
262
+            }
263
+            this.allPrice = total_price;
264
+            this.warehousingOutInfo.info = response.data.data.info;
265
+            this.handleSpanTempArr()
266
+        }
267
+      })
268
+     },
197 269
         getList() {
198 270
         let params = {
199 271
           page: this.page,
@@ -213,7 +285,7 @@
213 285
             for (let i = 0; i < response.data.data.list.length; i++) {
214 286
               this.list.push(response.data.data.list[i])
215 287
             }
216
-            console.log("list222222",this.list)
288
+           
217 289
           }
218 290
         })
219 291
       },
@@ -265,7 +337,6 @@
265 337
         getDrugWarehouseOrderInfo().then(response=>{
266 338
            if(response.data.state == 1){
267 339
              var list =  response.data.data.list
268
-             console.log("入库单详情",list)
269 340
              this.drugOrderList = list
270 341
            }
271 342
         })
@@ -315,9 +386,7 @@
315 386
         getDrugOutOrderDetailPrint(params).then(response=>{
316 387
           if(response.data.state ==1){
317 388
              var info = response.data.data.info
318
-             console.log("info",info)
319 389
             var warehousing = response.data.data.warehousing
320
-            console.log("ware2232",warehousing)
321 390
             this.warehouseList = warehousing
322 391
           
323 392
             for(let i=0;i<info.length;i++){
@@ -330,10 +399,11 @@
330 399
             }
331 400
             
332 401
             var manufacturerList = response.data.data.manufacturerList
333
-            console.log("manufacturelist",manufacturerList)
402
+           
334 403
             this.manufactureList = manufacturerList
335
-            console.log("列表",info)
404
+
336 405
             this.tableList = info
406
+            this.tableData = response.data.data.drug_warhouse_out
337 407
             this.loading = false
338 408
           }
339 409
         })
@@ -346,7 +416,14 @@
346 416
           }
347 417
         }
348 418
         return count
349
-      }
419
+      },
420
+      getTotalPrice(val){
421
+        var count = 0
422
+        for(let i=0;i<val.length;i++){
423
+           count +=val[i].count * val[i].price
424
+          }
425
+         return count.toFixed(2)
426
+        }
350 427
     },
351 428
     created() {
352 429
       this.orgName = this.$store.getters.xt_user.org.org_name;