Browse Source

518合并代码

XMLWAN 3 years ago
parent
commit
0f48884dec

+ 9 - 6
src/xt_pages/outpatientTool/components/drugDetail.vue View File

@@ -159,6 +159,7 @@ import { min } from 'moment'
159 159
     },
160 160
     methods:{
161 161
       changeDate(){
162
+        this.tableData = []
162 163
         this.getlist()
163 164
        },
164 165
        getlist(){
@@ -183,9 +184,11 @@ import { min } from 'moment'
183 184
                
184 185
               for(let j=0;j<drug.length;j++){
185 186
                 if(list[i].drug_id == drug[j].id){
186
-                  for(let z=0;z<list[i].child.length;z++){
187
-                    if(list[i].child[z].prescribing_number_unit == drug[j].max_unit){
188
-                       list[i].child[z].prescribing_number = parseInt(list[i].child[z].prescribing_number) * drug[j].min_number
187
+                  if(list[i].child!=null && list[i].child.length > 0){
188
+                    for(let z=0;z<list[i].child.length;z++){
189
+                      if(list[i].child[z].prescribing_number_unit == drug[j].max_unit){
190
+                        list[i].child[z].prescribing_number = parseInt(list[i].child[z].prescribing_number) * drug[j].min_number
191
+                      }
189 192
                     }
190 193
                   }
191 194
                 }
@@ -207,7 +210,6 @@ import { min } from 'moment'
207 210
                }
208 211
              }
209 212
             }
210
-            console.log("tabl2323323232",this.tableData)
211 213
           }
212 214
         })  
213 215
       },
@@ -240,6 +242,7 @@ import { min } from 'moment'
240 242
        return specification_name    
241 243
      },
242 244
      searchAction(){
245
+       this.tableData = []
243 246
        this.getlist()  
244 247
      },
245 248
      getDrugTypeName(drug_id){
@@ -259,11 +262,11 @@ import { min } from 'moment'
259 262
        return type_name
260 263
      },
261 264
      getCount(val,min_number,max_unit,min_unit){
262
-   
265
+      
263 266
        var total = 0
264 267
        var min_str = ""
265 268
        var max_str = ""
266
-       if(val.length > 0){
269
+       if(val!=null && val!=undefined  && val.length > 0){
267 270
          for(let i=0;i<val.length;i++){
268 271
            total += parseInt(val[i].prescribing_number)
269 272
          }

+ 4 - 2
src/xt_pages/outpatientTool/components/goodDetail.vue View File

@@ -154,7 +154,8 @@ import {getGoodDetailSummary} from "@/api/stock"
154 154
     },
155 155
     methods:{
156 156
      changeDate(){
157
-         
157
+      this.tableData = []
158
+      this.getlist()
158 159
      },
159 160
      getlist(){
160 161
        let start_time = this.chargeDate[0]
@@ -245,7 +246,7 @@ import {getGoodDetailSummary} from "@/api/stock"
245 246
       getCount(val){
246 247
         var total = 0
247 248
         for(let i=0;i<val.length;i++){
248
-           total +=val[i].count
249
+           total += parseInt(val[i].count)
249 250
         }
250 251
         return total
251 252
       },
@@ -259,6 +260,7 @@ import {getGoodDetailSummary} from "@/api/stock"
259 260
         return packing_unit
260 261
       },
261 262
       searchAction(){
263
+        this.tableData = []
262 264
         this.getlist()
263 265
       }
264 266
     },

+ 28 - 64
src/xt_pages/stock/drugs/components/drugCancelDetail.vue View File

@@ -23,18 +23,9 @@
23 23
       >汇总导出
24 24
     </el-button>
25 25
     <div class="cell clearfix">
26
-     <label class="title"><span class="name">仓库</span> :</label>
27
-      <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeHouseList">
28
-          <el-option
29
-            v-for="(option, index) in houseList"
30
-            :key="index"
31
-            :label="option.storehouse_name"
32
-            :value="option.id">
33
-          </el-option>
34
-      </el-select>  
35 26
       <el-input
36 27
         size="small"
37
-        style="width: 200px;"
28
+        style="width: 400px;"
38 29
         class="filter-item"
39 30
         v-model.trim="searchKey"
40 31
         placeholder="单据编码/制单人/药品名称"
@@ -47,7 +38,7 @@
47 38
         @click="search"
48 39
         >搜索</el-button
49 40
       >
50
-    
41
+      <div style="margin-left:10px;">
51 42
         <label class="title"><span class="name">日期查询</span> : </label>
52 43
         <el-date-picker
53 44
           size="small"
@@ -76,7 +67,7 @@
76 67
           value-format="yyyy-MM-dd"
77 68
           @change="endTimeChange"
78 69
         ></el-date-picker>
79
-     
70
+      </div>
80 71
     </div>
81 72
 
82 73
     <el-row :gutter="12" style="margin-top: 10px">
@@ -137,11 +128,6 @@
137 128
           {{getAdminUser(scope.row.creater)}}
138 129
           </template>
139 130
         </el-table-column>
140
-       <el-table-column label="仓库名称" align="center">
141
-          <template slot-scope="scope">
142
-          {{getStorehouseName(scope.row.storehouse_id)}}
143
-          </template>
144
-        </el-table-column>
145 131
         <el-table-column label="退货价" align="center">
146 132
           <template slot-scope="scope">
147 133
           {{scope.row.price}}
@@ -249,8 +235,6 @@ export default {
249 235
       tableList:[],
250 236
       tableDataList:[],
251 237
       drugTypeList:[],
252
-      storehouse_id:0,
253
-      houseList:[],
254 238
     };
255 239
   },
256 240
   methods: {
@@ -288,7 +272,7 @@ export default {
288 272
    
289 273
     fetchAllAdminUsers() {
290 274
       fetchAllAdminUsers().then(response => {
291
-     
275
+        console.log(response);
292 276
         if (response.data.state == 1) {
293 277
           this.adminUserOptions = response.data.data.users;
294 278
         }
@@ -359,18 +343,12 @@ export default {
359 343
         keyword:this.searchKey,
360 344
         limit:this.limit,
361 345
         page:this.page,
362
-        storehouse_id:this.storehouse_id,
363 346
        }
364 347
       getDrugCancelDetail(params).then(response=>{
365 348
          if(response.data.state == 1){
366 349
            var order =  response.data.data.order
367 350
            var list = response.data.data.orderPrint
368
-           var obj = {id:0,storehouse_name:"全部"}
369
-            this.houseList = []
370
-            this.houseList.push(obj)
371
-            for(let i=0;i<response.data.data.houseList.length;i++){
372
-            this.houseList.push(response.data.data.houseList[i])
373
-            }
351
+           //this.drugTypeList = response.data.data.drugTypeList
374 352
            for(let i=0;i<list.length;i++){
375 353
              list[i].child = []
376 354
             for(let j=0;j<order.length;j++){
@@ -391,6 +369,7 @@ export default {
391 369
             order_number: "合计",
392 370
             is_total: 1,
393 371
             specification_name:"",
372
+            unit:"",
394 373
             ctime:"",
395 374
             total_price:total_price.toFixed(2),
396 375
           });
@@ -430,7 +409,7 @@ export default {
430 409
         //  if(this.tableDataList[i].drug_type == 3){
431 410
         //     this.tableDataList[i].drug_type == "成药"
432 411
         //   }
433
-          this.tableList[i].drug_type = this.getTypeList(scope.row.drug_type)
412
+          this.tableDataList[i].drug_type = this.getTypeList(this.tableDataList[i].drug_type)
434 413
           this.tableDataList[i].index = i+1
435 414
           this.tableDataList[i].unit = this.tableDataList[i].dose + this.tableDataList[i].dose_unit + "*"+this.tableDataList[i].min_number + this.tableDataList[i].min_unit+"/"+this.tableDataList[i].max_unit
436 415
           this.tableDataList[i].user_name = this.getAdminUser(this.tableDataList[i].creater)
@@ -440,7 +419,7 @@ export default {
440 419
         }
441 420
        import('@/vendor/Export2Excel').then(excel => {
442 421
         const tHeader = ['序号','单据编号', '药品名称', '规格型号','单据类型','操作时间','制单人','数量','退库价','总价']
443
-        const filterVal = ['index','order_number','drug_name', 'unit', 'drug_type','ctime','user_name','total_count','price','total_price']
422
+        const filterVal = ['index','order_number','drug_name', 'specification_name', 'drug_type','ctime','user_name','total_count','price','total_price']
444 423
         
445 424
         const data = this.formatJson(filterVal, this.tableDataList)
446 425
 
@@ -456,33 +435,35 @@ export default {
456 435
         return jsonData.map(v => filterVal.map(j => v[j]));
457 436
      },
458 437
     exportListOne(){
459
-      let obj = {'index':'合计','total_price':0}
438
+      // let obj = {'index':'合计','total_price':0}
439
+      console.log("@332322323232332",this.tableList)
440
+      
460 441
        for(let i=0;i<this.tableList.length;i++){
461 442
           this.tableList[i].index = i+1
462 443
           this.tableList[i].unit = this.tableList[i].dose + this.tableList[i].dose_unit + "*"+this.tableList[i].min_number + this.tableList[i].min_unit+"/"+this.tableList[i].max_unit
463
-          if(this.tableData[i].drug_type == 1){
464
-             this.tableData[i].drugtype = "西药"
444
+          if(this.tableList[i].drug_type == 1){
445
+             this.tableList[i].drugtype = "西药"
465 446
           }
466
-          if(this.tableData[i].drug_type == 2){
467
-             this.tableData[i].drugtype = "草药"
447
+          if(this.tableList[i].drug_type == 2){
448
+             this.tableList[i].drugtype = "草药"
468 449
           }
469
-          if(this.tableData[i].drug_type == 3){
470
-             this.tableData[i].drugtype = "成药"
450
+          if(this.tableList[i].drug_type == 3){
451
+             this.tableList[i].drugtype = "成药"
471 452
           }
472
-          this.tableData[i].time = this.getTime(this.tableData[i].ctime)
473
-          this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
453
+          this.tableList[i].time = this.getTime(this.tableList[i].ctime)
454
+          this.tableList[i].user_name = this.getAdminUser(this.tableList[i].creater)
474 455
           
475
-          this.tableData[i].total_price = this.tableData[i].count * this.tableData[i].price
476
-           obj.total_price += this.tabelePrintList[i].count * this.tabelePrintList[i].price
456
+          //this.tableList[i].total_price = this.tableList[i].count * this.tableList[i].price
457
+          //  obj.total_price += this.tableList[i].count * this.tableList[i].price
477 458
         }
478
-        obj.total_price = obj.total_price.toFixed(2)
479
-       this.tableData.push(obj)
480
-       for(let i=0;i<this.tableData.length;i++){
481
-         this.tableData[i].total_price = this.tableData[i].total_price.toFixed(2)
482
-       }
459
+      //   obj.total_price = obj.total_price.toFixed(2)
460
+      //  this.tableList.push(obj)
461
+      //  for(let i=0;i<this.tableData.length;i++){
462
+      //    this.tableData[i].total_price = (this.tableData[i].total_price).toFixed(2)
463
+      //  }
483 464
        import('@/vendor/Export2Excel').then(excel => {
484 465
        const tHeader = ['序号','单据编号', '药品类型','药品名称', '规格型号','操作时间','制单人','退货价','数量','总价']
485
-       const filterVal = ['index','order_number','drugtype','drug_name', 'unit', 'time','user_name','price','count','total_price']
466
+       const filterVal = ['index','order_number','drugtype','drug_name', 'specification_name', 'time','user_name','price','count','total_price']
486 467
        
487 468
        const data = this.formatJson(filterVal, this.tableList)
488 469
        
@@ -511,24 +492,7 @@ export default {
511 492
         }
512 493
       }
513 494
       return name
514
-    },
515
-    getStorehouseName(id){
516
-       var storehouse_name = ""
517
-       for(let i=0;i<this.houseList.length;i++){
518
-         if(id == this.houseList[i].id){
519
-           storehouse_name = this.houseList[i].storehouse_name
520
-         }
521
-       }
522
-       if(storehouse_name == "全部"){
523
-          return ""
524
-       }else{
525
-         return storehouse_name
526
-       }
527
-     },
528
-     changeHouseList(){
529
-       this.houseList = []
530
-       this.getlist()
531
-     }  
495
+    } 
532 496
   }
533 497
 };
534 498
 </script>

+ 6 - 6
src/xt_pages/workforce/remind_print_setting.vue View File

@@ -36,8 +36,8 @@
36 36
                    <span>{{getAnticoagulant(main_collection.dialysissolution.mode_id)}}</span>
37 37
                   </span>
38 38
                 </div>
39
-               <div v-if="org_id == 10188">首剂:{{main_collection.dialysissolution.anticoagulant_shouji}}</div>
40
-                <div v-if="org_id == 10188">维持:{{main_collection.dialysissolution.anticoagulant_weichi}}</div>
39
+               <div v-if="org_id == 10188 || org_id == 10217">首剂:{{main_collection.dialysissolution.anticoagulant_shouji}}</div>
40
+                <div v-if="org_id == 10188 || org_id == 10217">维持:{{main_collection.dialysissolution.anticoagulant_weichi}}</div>
41 41
                 <div v-if="printObj.anticoagulant_zongliang == 1">
42 42
                   用量:
43 43
                   <span v-if="main_collection.dialysissolution.anticoagulant == 1">
@@ -74,9 +74,9 @@
74 74
                     {{main_collection.dialysissolution.anticoagulant_zongliang}}iu
75 75
                    </span>
76 76
                 </div>
77
-                <div v-if="org_id == 10188">干体重:{{main_collection.assessmentbefor.dry_weight}}</div>
78
-                <div v-if="org_id == 10188">透前体重:{{main_collection.assessmentbefor.weight_before}}</div>
79
-                <div v-if="org_id == 10188">体重增加:{{(main_collection.assessmentbefor.weight_before - main_collection.assessmentbefor.dry_weight).toFixed(2)}}</div>
77
+                <div v-if="org_id == 10188 || org_id == 10217">干体重:{{main_collection.assessmentbefor.dry_weight}}</div>
78
+                <div v-if="org_id == 10188 || org_id == 10217">透前体重:{{main_collection.assessmentbefor.weight_before}}</div>
79
+                <div v-if="org_id == 10188 || org_id == 10217">体重增加:{{(main_collection.assessmentbefor.weight_before - main_collection.assessmentbefor.dry_weight).toFixed(2)}}</div>
80 80
                 <div>用法:静脉注射</div>
81 81
                 <div>打印时间:{{currentDate}}</div>
82 82
               </div>
@@ -294,7 +294,7 @@
294 294
       printAction: function() {
295 295
         const style = '@media print {.signPrint{margin-left:30px;} .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } .printCell span{display: inline-block;width: 180px;} @page {margin-top:10px;}}'
296 296
         const style1 = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } .printCell span{display: inline-block;width: 170px;} @page {margin-top:10px;}}'
297
-        if(this.org_id == 10188){
297
+        if(this.org_id == 10188 || this.org_id == 10217){
298 298
           printJS({
299 299
             printable: 'print_content',
300 300
             type: 'html',