Преглед изворни кода

11月14日 库存扣减更新

XMLWAN пре 3 година
родитељ
комит
04d30e086e

+ 1 - 5
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Прегледај датотеку

2310
             //   }
2310
             //   }
2311
             // })
2311
             // })
2312
             if (num == 0) {
2312
             if (num == 0) {
2313
-             
2313
+
2314
               createHisPrescription(data, params).then(response => {
2314
               createHisPrescription(data, params).then(response => {
2315
                 if (response.data.state == 1) {
2315
                 if (response.data.state == 1) {
2316
                   this.$emit('change', this.patientInfo.id)
2316
                   this.$emit('change', this.patientInfo.id)
2482
           this.$message.error('该处方已经结算,无法删除')
2482
           this.$message.error('该处方已经结算,无法删除')
2483
           return
2483
           return
2484
         }
2484
         }
2485
-        if (targetName == '处方1') {
2486
-          this.$message.error('该处方无法删除')
2487
-          return
2488
-        }
2489
         this.$confirm('处方删除后不可恢复,是否确认删除', '删除', {
2485
         this.$confirm('处方删除后不可恢复,是否确认删除', '删除', {
2490
           confirmButtonText: '确 定',
2486
           confirmButtonText: '确 定',
2491
           cancelButtonText: '取 消',
2487
           cancelButtonText: '取 消',

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

204
                       <p>IUF+HD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
204
                       <p>IUF+HD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
205
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
205
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
206
                   </span>
206
                   </span>
207
+                  <span v-if="item.mode_id == 'CVVHDF'">
208
+                      <p>IUF+HD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
209
+                      <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
210
+                  </span>
207
                </div>
211
                </div>
208
               </div>
212
               </div>
209
             </div>
213
             </div>

+ 36 - 4
src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue Прегледај датотеку

262
               if(modeIdCount[i].mode_id == 19){
262
               if(modeIdCount[i].mode_id == 19){
263
                modeIdCount[i].mode_id = "IUF+HD"
263
                modeIdCount[i].mode_id = "IUF+HD"
264
             }
264
             }
265
+             if(modeIdCount[i].mode_id == 28){
266
+               modeIdCount[i].mode_id = "CVVHDF"
267
+            }
265
           }
268
           }
266
           this.modeIdCount = modeIdCount
269
           this.modeIdCount = modeIdCount
267
           let dataInfo = {}
270
           let dataInfo = {}
423
             patients[i].mode_id = "HDF后置换"
426
             patients[i].mode_id = "HDF后置换"
424
         }else if(patients[i].mode_id == 19){
427
         }else if(patients[i].mode_id == 19){
425
           patients[i].mode_id = "IUF+HD"
428
           patients[i].mode_id = "IUF+HD"
429
+        }else if(patients[i].mode_id == 28){
430
+          patients[i].mode_id = "CVVHDF"
426
         }
431
         }
427
       }
432
       }
428
     },
433
     },
467
         console.log("DialysisData",this.DialysisData)
472
         console.log("DialysisData",this.DialysisData)
468
        for(let i=0;i<this.DialysisData.length;i++){
473
        for(let i=0;i<this.DialysisData.length;i++){
469
          this.DialysisData[i].index = i+1
474
          this.DialysisData[i].index = i+1
470
-         this.DialysisData[i].dialysis_mode = this.getModeIdCount(this.DialysisData[i].patient_id)
475
+         this.DialysisData[i].HD = this.getHdModeIdCount(this.DialysisData[i].patient_id,"HD")
476
+         this.DialysisData[i].HDF = this.getHdModeIdCount(this.DialysisData[i].patient_id,"HDF")
477
+         this.DialysisData[i].HDHP = this.getHdModeIdCount(this.DialysisData[i].patient_id,"HD+HP")
478
+         this.DialysisData[i].HP = this.getHdModeIdCount(this.DialysisData[i].patient_id,"HP")
479
+         this.DialysisData[i].HF = this.getHdModeIdCount(this.DialysisData[i].patient_id,"HF")
480
+         this.DialysisData[i].SCUF = this.getHdModeIdCount(this.DialysisData[i].patient_id,"SCUF")
481
+         this.DialysisData[i].IUF = this.getHdModeIdCount(this.DialysisData[i].patient_id,"IUF")
482
+         this.DialysisData[i].HFHDHP = this.getHdModeIdCount(this.DialysisData[i].patient_id,"HFHD+HP")
483
+         this.DialysisData[i].HDFHP = this.getHdModeIdCount(this.DialysisData[i].patient_id,"HDF+HP")
484
+         this.DialysisData[i].CRRT = this.getHdModeIdCount(this.DialysisData[i].patient_id,"CRRT")
485
+         this.DialysisData[i].OTR = this.getHdModeIdCount(this.DialysisData[i].patient_id,"腹水回输")
471
          this.DialysisData[i].age = this.getAge(this.DialysisData[i].id_card_no)
486
          this.DialysisData[i].age = this.getAge(this.DialysisData[i].id_card_no)
472
          this.DialysisData[i].total_count = this.getDialysisCount(this.DialysisData[i].patient_id)
487
          this.DialysisData[i].total_count = this.getDialysisCount(this.DialysisData[i].patient_id)
473
        }
488
        }
489
+       console.log("hhh2323323232",this.DialysisData)
474
        import('@/vendor/Export2Excel').then(excel => {
490
        import('@/vendor/Export2Excel').then(excel => {
475
-        const tHeader = ['序号','姓名', '年龄', '透析号','透析模式','透析总次数']
476
-        const filterVal = ['index','name', 'age', 'dialysis_no','dialysis_mode','total_count']
477
-        
491
+        const tHeader = ['序号','姓名', '年龄', '透析号','HD','HDF','HD+HP','HP','HF','SCUF','IUF','HFHD','HFHD+HP','HFR','HDF+HP','CRRT','腹水回输','总数']
492
+        const filterVal = ['index','name', 'age', 'dialysis_no','HD','HDF','HDHP','HP','HF','SCUF','IUF','HFHD','HFHDHP','HFR','HDFHP','CRRT','OTR','total_count']
493
+
478
         const data = this.formatJson(filterVal, this.DialysisData)
494
         const data = this.formatJson(filterVal, this.DialysisData)
479
        
495
        
480
         excel.export_json_to_excel({
496
         excel.export_json_to_excel({
495
             }
511
             }
496
           })
512
           })
497
        );
513
        );
514
+     },
515
+     getHdModeIdCount(id,mode_name){
516
+        var count = 0
517
+        var arr = []
518
+        for(let i = 0;i<this.modeIdCount.length;i++){
519
+           if(id == this.modeIdCount[i].patient_id && this.modeIdCount[i].mode_id == mode_name){
520
+             arr.push(this.modeIdCount[i])
521
+           }
522
+        }
523
+        if(arr.length > 0){
524
+          for(let i=0;i<arr.length;i++){
525
+            count += arr[i].Count
526
+          }
527
+        }
528
+       
529
+        return count
498
      }
530
      }
499
 
531
 
500
   },
532
   },

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

62
           :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
62
           :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
63
         >
63
         >
64
        
64
        
65
-          <el-table-column align="center" width="230" fixed="left">
65
+         <el-table-column align="center" width="320" fixed="left">
66
              <template slot="header" slot-scope="scope">
66
              <template slot="header" slot-scope="scope">
67
               <span>耗材名称</span>
67
               <span>耗材名称</span>
68
             </template>
68
             </template>
76
                     placeholder="请输入耗材名称"
76
                     placeholder="请输入耗材名称"
77
                     @select="handleSelect"
77
                     @select="handleSelect"
78
                     @input="changeGoodName(scope.$index)"
78
                     @input="changeGoodName(scope.$index)"
79
-                    style="width:200px;"
79
+                    style="width:280px;"
80
                   >
80
                   >
81
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
81
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
82
                   <template slot-scope="{ item }">
82
                   <template slot-scope="{ item }">
85
                  </el-autocomplete>
85
                  </el-autocomplete>
86
             </template>
86
             </template>
87
           </el-table-column>
87
           </el-table-column>
88
-          <el-table-column align="center" width="200">
88
+          <el-table-column align="center" width="140">
89
             <template slot="header" slot-scope="scope">
89
             <template slot="header" slot-scope="scope">
90
               <span>规格&单位<span style="color: red">*</span></span>
90
               <span>规格&单位<span style="color: red">*</span></span>
91
             </template>
91
             </template>
98
             </template>
98
             </template>
99
           </el-table-column>
99
           </el-table-column>
100
         
100
         
101
-          <el-table-column width="150" align="center">
101
+          <el-table-column width="120" align="center">
102
             <template slot="header" slot-scope="scope">
102
             <template slot="header" slot-scope="scope">
103
               <span>退库数量<span style="color: red">*</span></span>
103
               <span>退库数量<span style="color: red">*</span></span>
104
             </template>
104
             </template>
118
             
118
             
119
             </template>
119
             </template>
120
           </el-table-column>
120
           </el-table-column>
121
-          <el-table-column width="150" align="center">
121
+          <el-table-column width="120" align="center">
122
             <template slot="header" slot-scope="scope">
122
             <template slot="header" slot-scope="scope">
123
               <span>单价<span style="color: red">*</span></span>
123
               <span>单价<span style="color: red">*</span></span>
124
             </template>
124
             </template>

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

28
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
28
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
29
              max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}">
29
              max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}">
30
 
30
 
31
-          <el-table-column align="center" width="230">
31
+          <el-table-column align="center" width="320">
32
              <template slot="header" slot-scope="scope">
32
              <template slot="header" slot-scope="scope">
33
               <span>耗材名称</span>
33
               <span>耗材名称</span>
34
             </template>
34
             </template>
42
                     placeholder="请输入耗材名称"
42
                     placeholder="请输入耗材名称"
43
                     @select="handleSelect"
43
                     @select="handleSelect"
44
                     @input="changeGoodName(scope.$index)"
44
                     @input="changeGoodName(scope.$index)"
45
-                    style="width:200px;"
45
+                    style="width:280px;"
46
                   >
46
                   >
47
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
47
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
48
                   <template slot-scope="{ item }">
48
                   <template slot-scope="{ item }">
53
           </el-table-column>
53
           </el-table-column>
54
 
54
 
55
 
55
 
56
-         <el-table-column align="center" width="200">
56
+         <el-table-column align="center" width="140">
57
             
57
             
58
             <template slot="header" slot-scope="scope">
58
             <template slot="header" slot-scope="scope">
59
               <span>规格&单位<span style="color: red">*</span></span>
59
               <span>规格&单位<span style="color: red">*</span></span>

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

8
     <div class="app-container ">
8
     <div class="app-container ">
9
       <div id="dialysis-print-box">
9
       <div id="dialysis-print-box">
10
         <div class="dialysis-print-order" v-for="(it,index) in tableList" :key="index">
10
         <div class="dialysis-print-order" v-for="(it,index) in tableList" :key="index">
11
-         <div class="order-yy-name" style="font-size:22px;font-weight:bold;letter-spacing:0px;">{{orgName}}</div>
11
+         <div class="order-yy-name" style="font-size:22px;font-weight:bold;letter-spacing:0px;margin-top:40px">{{orgName}}</div>
12
           <div class="order-title" style="font-weight:500;font-size:18px;">耗材退库登记表</div>
12
           <div class="order-title" style="font-weight:500;font-size:18px;">耗材退库登记表</div>
13
 
13
 
14
           <div style="float: left;margin-bottom: 1px;">单据编号:{{it.order_number}}</div>
14
           <div style="float: left;margin-bottom: 1px;">单据编号:{{it.order_number}}</div>

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

8
     <div class="app-container ">
8
     <div class="app-container ">
9
       <div id="dialysis-print-box">
9
       <div id="dialysis-print-box">
10
         <div class="dialysis-print-order" v-for="(it,index) in tableList" :key="index">
10
         <div class="dialysis-print-order" v-for="(it,index) in tableList" :key="index">
11
-         <div class="order-yy-name" style="font-size:22px;font-weight:bold;letter-spacing:0px;">{{orgName}}</div>
11
+         <div class="order-yy-name" style="font-size:22px;font-weight:bold;letter-spacing:0px;margin-top:40px">{{orgName}}</div>
12
           <div class="order-title" style="font-weight:500;font-size:18px;">药品退库登记表</div>
12
           <div class="order-title" style="font-weight:500;font-size:18px;">药品退库登记表</div>
13
 
13
 
14
           <div style="float: left;margin-bottom: 1px;">单据编号:{{it.order_number}}</div>
14
           <div style="float: left;margin-bottom: 1px;">单据编号:{{it.order_number}}</div>

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

576
             cancelStock: this.recordInfo.recordData
576
             cancelStock: this.recordInfo.recordData
577
           };
577
           };
578
          console.log("params2222",params,this.return_time)
578
          console.log("params2222",params,this.return_time)
579
-        
579
+          
580
           postDrugCancelStock(
580
           postDrugCancelStock(
581
             params,
581
             params,
582
             this.return_time,
582
             this.return_time,

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

478
       return name
478
       return name
479
     },
479
     },
480
      exportList(){
480
      exportList(){
481
+        console.log("hhh233223232323",this.tabelePrintList)
481
         for(let i=0;i<this.tabelePrintList.length;i++){
482
         for(let i=0;i<this.tabelePrintList.length;i++){
482
           this.tabelePrintList[i].index = i+1
483
           this.tabelePrintList[i].index = i+1
483
           this.tabelePrintList[i].drug_name = this.tabelePrintList[i].XtBaseDrug.drug_name
484
           this.tabelePrintList[i].drug_name = this.tabelePrintList[i].XtBaseDrug.drug_name
487
         
488
         
488
        import('@/vendor/Export2Excel').then(excel => {
489
        import('@/vendor/Export2Excel').then(excel => {
489
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
490
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
490
-       const filterVal = ['index','drug_name', 'unit', 'min_unit','warehousing_count','price','total_price','remark']
491
+       const filterVal = ['index','drug_name', 'unit', 'max_unit','warehousing_count','price','total_price','remark']
491
        let obj = {'index':'合计','total_price':0}
492
        let obj = {'index':'合计','total_price':0}
492
        for(let i=0;i<this.tabelePrintList.length;i++){
493
        for(let i=0;i<this.tabelePrintList.length;i++){
493
          obj.total_price += this.tabelePrintList[i].price * this.tabelePrintList[i].warehousing_count
494
          obj.total_price += this.tabelePrintList[i].price * this.tabelePrintList[i].warehousing_count

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

181
         </el-table-column>
181
         </el-table-column>
182
         <el-table-column label="总价" align="center">
182
         <el-table-column label="总价" align="center">
183
           <template slot-scope="scope">
183
           <template slot-scope="scope">
184
-            <!-- {{scope.row.price * scope.row.count}} -->
184
+            
185
             {{scope.row.total_price}}
185
             {{scope.row.total_price}}
186
           </template>
186
           </template>
187
         </el-table-column>
187
         </el-table-column>
432
             is_total: 1,
432
             is_total: 1,
433
             specification_name:"",
433
             specification_name:"",
434
             ctime:"",
434
             ctime:"",
435
-            total_price:total_price.toFixed(2),
435
+            total_price:total_price,
436
           });
436
           });
437
+         
438
+          for(let i=0;i<order.length;i++){
439
+            order[i].total_price = order[i].total_price.toFixed(2)
440
+          }
437
           this.tableData = order
441
           this.tableData = order
438
            let objInfo = {}
442
            let objInfo = {}
439
           order.forEach((item,index)=>{
443
           order.forEach((item,index)=>{
477
           for(let i=0;i<list.length;i++){
481
           for(let i=0;i<list.length;i++){
478
              list[i].total_price = list[i].count * list[i].price
482
              list[i].total_price = list[i].count * list[i].price
479
           }
483
           }
480
-         
481
-          this.tableList = list
484
+       
485
+          this.tableList = list 
482
           var total = response.data.data.total
486
           var total = response.data.data.total
483
           this.total = total
487
           this.total = total
484
         } 
488
         } 

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

8
     <div class="app-container ">
8
     <div class="app-container ">
9
       <div id="dialysis-print-box">
9
       <div id="dialysis-print-box">
10
         <div class="dialysis-print-order" v-for="(it,index) in tableList" :key="index">
10
         <div class="dialysis-print-order" v-for="(it,index) in tableList" :key="index">
11
-          <div style="font-size:22px;font-weight:bold;text-align:center;">{{ orgName }}</div>
11
+          <div style="font-size:22px;font-weight:bold;text-align:center;margin-top:40px">{{ orgName }}</div>
12
           <div class="order-title" style="font-size:18px;padding-top:0;">药品入库登记表</div>
12
           <div class="order-title" style="font-size:18px;padding-top:0;">药品入库登记表</div>
13
 
13
 
14
           <div style="float: left;margin-bottom: 1px;">单据编号:{{it.warehousing_order}}</div>
14
           <div style="float: left;margin-bottom: 1px;">单据编号:{{it.warehousing_order}}</div>

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

688
             stockIn: this.recordInfo.recordData
688
             stockIn: this.recordInfo.recordData
689
           };
689
           };
690
           console.log("params22222222222",params)
690
           console.log("params22222222222",params)
691
-        
691
+         
692
           EditDrugWarehouse(
692
           EditDrugWarehouse(
693
             params,
693
             params,
694
             this.warehousing_time,
694
             this.warehousing_time,

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

1162
           this.$message.error("请勾选出库单")
1162
           this.$message.error("请勾选出库单")
1163
           return
1163
           return
1164
         }
1164
         }
1165
+        console.log("hh2323232322323",this.exportList)
1165
         for(let i=0;i<this.exportList.length;i++){
1166
         for(let i=0;i<this.exportList.length;i++){
1166
           if(this.exportList[i].dealer == 0){
1167
           if(this.exportList[i].dealer == 0){
1167
             this.exportList[i].dealer = ""
1168
             this.exportList[i].dealer = ""
1172
           this.exportList[i].unit = this.exportList[i].dose + this.exportList[i].dose_unit + "*" + this.exportList[i].min_number + this.exportList[i].min_unit + "/"+this.exportList[i].max_unit
1173
           this.exportList[i].unit = this.exportList[i].dose + this.exportList[i].dose_unit + "*" + this.exportList[i].min_number + this.exportList[i].min_unit + "/"+this.exportList[i].max_unit
1173
 
1174
 
1174
           this.exportList[i].total_price = (this.exportList[i].count * this.exportList[i].price).toFixed(2)
1175
           this.exportList[i].total_price = (this.exportList[i].count * this.exportList[i].price).toFixed(2)
1175
-          this.exportList[i].expiry_date  = this.getTime(this.exportList[i].expiry_date,"{y}-{h}-{d}")
1176
-           this.exportList[i].product_date = this.getTime(this.exportList[i].product_date,"{y}-{h}-{d}")
1176
+          this.exportList[i].expiry_date  = this.getTime(this.exportList[i].expire_date)
1177
+           this.exportList[i].product_date = this.getTime(this.exportList[i].product_date)
1177
           for(let j=0;j<this.manufacturerList.length;j++){
1178
           for(let j=0;j<this.manufacturerList.length;j++){
1178
             if(this.exportList[i].manufacturer == this.manufacturerList[j].id){
1179
             if(this.exportList[i].manufacturer == this.manufacturerList[j].id){
1179
               this.exportList[i].manufacturer = this.manufacturerList[j].manufacturer_name
1180
               this.exportList[i].manufacturer = this.manufacturerList[j].manufacturer_name

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

8
     <div class="app-container ">
8
     <div class="app-container ">
9
       <div id="dialysis-print-box">
9
       <div id="dialysis-print-box">
10
         <div class="dialysis-print-order" v-for="(it,index) in tableList" :key="index">
10
         <div class="dialysis-print-order" v-for="(it,index) in tableList" :key="index">
11
-         <div class="order-yy-name" style="font-size:22px;font-weight:bold;letter-spacing:0px;">{{orgName}}</div>
11
+         <div class="order-yy-name" style="font-size:22px;font-weight:bold;letter-spacing:0px;margin-top:40px">{{orgName}}</div>
12
           <div class="order-title" style="font-weight:500;font-size:18px;">药品出库登记表</div>
12
           <div class="order-title" style="font-weight:500;font-size:18px;">药品出库登记表</div>
13
 
13
 
14
           <div style="float: left;margin-bottom: 1px;">单据编号:{{it.warehouse_out_order_number}}</div>
14
           <div style="float: left;margin-bottom: 1px;">单据编号:{{it.warehouse_out_order_number}}</div>

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

587
               'stockOut': this.recordInfo.recordData
587
               'stockOut': this.recordInfo.recordData
588
             }
588
             }
589
             console.log("param23322323233222323",params)
589
             console.log("param23322323233222323",params)
590
-          
590
+           
591
             editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
591
             editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
592
               if (response.data.state == 0) {
592
               if (response.data.state == 0) {
593
                 this.$message.error(response.data.msg)
593
                 this.$message.error(response.data.msg)

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

7
                 style="width: 200px;margin-left:10px;"
7
                 style="width: 200px;margin-left:10px;"
8
                 class="filter-item"
8
                 class="filter-item"
9
                 v-model.trim="searchKey"
9
                 v-model.trim="searchKey"
10
-               placeholder="请输入单据编号或操作人姓名"
10
+               placeholder="请输入药品名称"
11
                 />
11
                 />
12
                 <el-button
12
                 <el-button
13
                 size="small"
13
                 size="small"

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

110
             <span v-if="getWarehoseInfo(scope.row.drug_warehouse_info)!=0">{{getWarehoseInfo(scope.row.drug_warehouse_info)}}{{scope.row.max_unit}}</span>
110
             <span v-if="getWarehoseInfo(scope.row.drug_warehouse_info)!=0">{{getWarehoseInfo(scope.row.drug_warehouse_info)}}{{scope.row.max_unit}}</span>
111
            </template>
111
            </template>
112
         </el-table-column>
112
         </el-table-column>
113
-        <el-table-column prop="drug_name" label="出库数量" align="center">
113
+        <el-table-column prop="drug_name" label="出库数量" align="center" v-if="showOne">
114
            <template slot-scope="scope">
114
            <template slot-scope="scope">
115
-             <!-- <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10138 || org_id ==10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919">
116
-                <span>
117
-                 {{getOutFlush(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,scope.row.drug_cancel_stock_info)}}
118
-                </span>
119
-             </span>
120
-             <span v-else>{{getOutCount(scope.row.id)+getAutoCount(scope.row.id)}}{{scope.row.max_unit}}</span> -->
121
               <span>
115
               <span>
122
                  {{getOutFlush(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,scope.row.drug_cancel_stock_info)}}
116
                  {{getOutFlush(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,scope.row.drug_cancel_stock_info)}}
123
               </span>
117
               </span>
124
            </template>
118
            </template>
125
         </el-table-column>
119
         </el-table-column>
120
+
121
+        <el-table-column prop="drug_name" label="出库数量" align="center" v-if="showTwo">
122
+           <template slot-scope="scope">
123
+           
124
+             <span>{{getOutCount(scope.row.id)+getAutoCount(scope.row.id)}}{{scope.row.max_unit}}</span>
125
+             
126
+           </template>
127
+        </el-table-column>
126
         
128
         
127
-        <el-table-column prop="drug_name" label="剩余库存量" align="center">
129
+        <el-table-column prop="drug_name" label="剩余库存量" align="center" v-if="showThree">
128
            <template slot-scope="scope">
130
            <template slot-scope="scope">
129
             <div v-if="getWarehoseInfo(scope.row.drug_warehouse_info)!=0">
131
             <div v-if="getWarehoseInfo(scope.row.drug_warehouse_info)!=0">
130
-               <!-- <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10138 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919">
131
-                {{ getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)?getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number):0}}
132
-               </span>
133
-
134
-               <span v-else>{{getWarehoseInfo(scope.row.drug_warehouse_info) - getOutCount(scope.row.id) - getAutoCount(scope.row.id)}}{{scope.row.max_unit}} </span> -->
135
                 {{ getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)?getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number):0}}
132
                 {{ getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)?getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number):0}}
136
             </div>
133
             </div>
137
            </template>
134
            </template>
138
         </el-table-column>
135
         </el-table-column>
136
+        <el-table-column prop="drug_name" label="剩余库存量" align="center" v-if="showFour">
137
+           <template slot-scope="scope">
138
+            <div v-if="getWarehoseInfo(scope.row.drug_warehouse_info)!=0">
139
+               <span>{{getWarehoseInfo(scope.row.drug_warehouse_info) - getOutCount(scope.row.id) - getAutoCount(scope.row.id)}}{{scope.row.max_unit}} </span>         
140
+            </div>
141
+           </template>
142
+        </el-table-column>
139
         <el-table-column prop="drug_name" label="操作" align="center" width="200px">
143
         <el-table-column prop="drug_name" label="操作" align="center" width="200px">
140
           <template slot-scope="scope">
144
           <template slot-scope="scope">
141
             <el-button
145
             <el-button
254
         cancelCountList:[],
258
         cancelCountList:[],
255
         allCountList:[],
259
         allCountList:[],
256
         org_id:"",
260
         org_id:"",
261
+        showOne:true,
262
+        showTwo:false,
263
+        showThree:true,
264
+        showFour:false,
257
       }
265
       }
258
     },
266
     },
259
     methods: {
267
     methods: {
395
         this.$message.error("结束时间不能小于开始时间");
403
         this.$message.error("结束时间不能小于开始时间");
396
         this.end_time = "";
404
         this.end_time = "";
397
       } else {
405
       } else {
398
-
399
-        this.getlist()
406
+        if(this.end_time == ""){
407
+          this.showOne = true
408
+          this.showTwo = false
409
+          this.showThree = true
410
+          this.showFour = false
411
+           this.getlist()
412
+        }
413
+        if(this.end_time !=""){
414
+          this.showOne = false
415
+          this.showTwo = true
416
+          this.showThree = false
417
+          this.showFour = true
418
+          this.getlist()
419
+          this.getDrugCountList()
420
+        }
421
+       
400
       }
422
       }
401
 
423
 
402
     },
424
     },
443
            this.tableList[i].drug_type_name = this.getDrugType(this.tableList[i].drug_type)
465
            this.tableList[i].drug_type_name = this.getDrugType(this.tableList[i].drug_type)
444
            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
466
            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
445
            this.tableList[i].manufacturer_name = this.getManufacturerList(this.tableList[i].manufacturer)
467
            this.tableList[i].manufacturer_name = this.getManufacturerList(this.tableList[i].manufacturer)
446
-        
447
           this.tableList[i].inCount =  this.getWarehoseInfo(this.tableList[i].drug_warehouse_info)
468
           this.tableList[i].inCount =  this.getWarehoseInfo(this.tableList[i].drug_warehouse_info)
448
-          this.tableList[i].outCount = this.getWarehouseOutInfo(this.tableList[i].drug_warehouse_out,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
449
-          this.tableList[i].overplusCount =  this.getOverFlushInfo(this.tableList[i].drug_warehouse_info,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
450
-         }
469
+          if(this.end_time == 0){
470
+            this.tableList[i].outCount = this.getWarehouseOutInfo(this.tableList[i].drug_warehouse_out,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
471
+            this.tableList[i].overplusCount =  this.getOverFlushInfo(this.tableList[i].drug_warehouse_info,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
472
+          }
473
+          if(this.end_time!=0){
474
+             this.tableList[i].outCount = this.getOutCount(this.tableList[i].id)+ this.getAutoCount(this.tableList[i].id)
475
+             this.tableList[i].overplusCount  = this.getWarehoseInfo(this.tableList[i].drug_warehouse_info) - this.getOutCount(this.tableList[i].id) - this.getAutoCount(this.tableList[i].id)
451
 
476
 
452
-         console.log("hhhhhhhadhfadf 列表",this.tableList)
477
+          }   
478
+         }
453
          import('@/vendor/Export2Excel').then(excel => {
479
          import('@/vendor/Export2Excel').then(excel => {
454
          const tHeader = ['序号', '药品类型', '药品名称','规格型号&单位','进货单价','厂家','入库数量','出库数量','剩余库存量']
480
          const tHeader = ['序号', '药品类型', '药品名称','规格型号&单位','进货单价','厂家','入库数量','出库数量','剩余库存量']
455
          const filterVal = ['index', 'drug_type_name', 'drug_name','unit','last_price','manufacturer_name','inCount','outCount','overplusCount']
481
          const filterVal = ['index', 'drug_type_name', 'drug_name','unit','last_price','manufacturer_name','inCount','outCount','overplusCount']
666
        }
692
        }
667
        return str+str_min
693
        return str+str_min
668
      },
694
      },
669
-      getCancelCount(id){
695
+     getCancelCount(id){
670
         var count= 0
696
         var count= 0
671
         for(let i=0;i<this.cancelCountList.length;i++){
697
         for(let i=0;i<this.cancelCountList.length;i++){
672
           if(id == this.cancelCountList[i].drug_id){
698
           if(id == this.cancelCountList[i].drug_id){

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

99
           max-height="450"
99
           max-height="450"
100
           :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
100
           :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
101
         > 
101
         > 
102
-         <el-table-column align="center" width="200">
102
+         <el-table-column align="center" width="300">
103
              <template slot="header" slot-scope="scope">
103
              <template slot="header" slot-scope="scope">
104
               <span>耗材名称</span>
104
               <span>耗材名称</span>
105
             </template>
105
             </template>
113
                     placeholder="请输入耗材名称"
113
                     placeholder="请输入耗材名称"
114
                     @select="handleSelect"
114
                     @select="handleSelect"
115
                     @input="changeGoodName(scope.$index)"
115
                     @input="changeGoodName(scope.$index)"
116
-                    style="width:160px;"
116
+                    style="width:250px;"
117
                   >
117
                   >
118
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
118
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
119
                   <template slot-scope="{ item }">
119
                   <template slot-scope="{ item }">
150
 
150
 
151
             </template>
151
             </template>
152
           </el-table-column>
152
           </el-table-column>
153
-          <!-- <el-table-column align="center" width="200">
153
+       
154
+         <el-table-column align="center" width="150">
154
             <template slot="header" slot-scope="scope">
155
             <template slot="header" slot-scope="scope">
155
-              <span>规格名称<span style="color: red">*</span></span>
156
+              <span>批号<span style="color: red">*</span></span>
156
             </template>
157
             </template>
157
             <template slot-scope="scope">
158
             <template slot-scope="scope">
158
-              <el-form-item style="padding-top: 15px">
159
-                <el-input
160
-                  placeholder="请输入规格名称"
161
-                  v-model="scope.row.good_id"
162
-                  :value="specificationName(scope.row.good_id)"
163
-                  @focus="showDialog(scope.$index, scope.row)"
164
-                ></el-input>
159
+              <el-form-item style="padding-top: 20px" :prop="'recordData.' + scope.$index + '.number'"
160
+                            :rules='tableRules.number' >
161
+                <el-input placeholder="请输入批号" v-model="scope.row.number"></el-input>
165
               </el-form-item>
162
               </el-form-item>
166
             </template>
163
             </template>
167
-          </el-table-column> -->
164
+          </el-table-column>
168
 
165
 
169
           <el-table-column align="center" width="120">
166
           <el-table-column align="center" width="120">
170
             <template slot="header" slot-scope="scope">
167
             <template slot="header" slot-scope="scope">
256
             </template>
253
             </template>
257
           </el-table-column>
254
           </el-table-column>
258
 
255
 
259
-          <el-table-column align="center" width="150">
260
-            <template slot="header" slot-scope="scope">
261
-              <span>批号</span>
262
-            </template>
263
-            <template slot-scope="scope">
264
-              <el-form-item style="padding-top: 20px">
265
-                <el-input
266
-                  placeholder="请输入批号"
267
-                  v-model="scope.row.number"
268
-                ></el-input>
269
-              </el-form-item>
270
-            </template>
271
-          </el-table-column>
256
+         
272
         
257
         
273
            <el-table-column align="center" width="150">
258
            <el-table-column align="center" width="150">
274
             <template slot="header" slot-scope="scope">
259
             <template slot="header" slot-scope="scope">
403
         expiry_date:[
388
         expiry_date:[
404
          { required: true, message: '有效日期不能为空', trigge: 'blur' }
389
          { required: true, message: '有效日期不能为空', trigge: 'blur' }
405
         ],
390
         ],
391
+        number:[
392
+            { required: true, message: '批号不能为空', trigge: 'blur' }
393
+        ],
406
       },
394
       },
407
 
395
 
408
       total: "",
396
       total: "",

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

402
       const order_id = this.$route.query.id;
402
       const order_id = this.$route.query.id;
403
       const warehouse_out_time = this.$route.query.warehouse_out_time;
403
       const warehouse_out_time = this.$route.query.warehouse_out_time;
404
       this.GetConfigInfo();
404
       this.GetConfigInfo();
405
-      // this.GetTotalCount(warehouse_out_time);
406
       this.GetOrderDetailOne(order_id)
405
       this.GetOrderDetailOne(order_id)
407
       this.getList()
406
       this.getList()
408
       this.getStockDrugCount()
407
       this.getStockDrugCount()

+ 70 - 4
src/xt_pages/user/patients.vue Прегледај датотеку

320
           >
320
           >
321
           </el-option>
321
           </el-option>
322
         </el-select>
322
         </el-select>
323
+        <el-button type="primary" size="small" style="float:right" @click="toExport">导出</el-button>
323
       </div>
324
       </div>
324
 
325
 
325
       <el-table
326
       <el-table
463
         @size-change="handleSizeChange"
464
         @size-change="handleSizeChange"
464
         @current-change="handleCurrentChange"
465
         @current-change="handleCurrentChange"
465
         :current-page="listQuery.page"
466
         :current-page="listQuery.page"
466
-        :page-sizes="[10, 20, 50, 100]"
467
+        :page-sizes="[10, 20, 50, 100,200,500,1000,2000]"
467
         :page-size="listQuery.limit"
468
         :page-size="listQuery.limit"
468
         background
469
         background
469
         style="margin-top:20px;"
470
         style="margin-top:20px;"
604
             @size-change="handleSizeChangeOne"
605
             @size-change="handleSizeChangeOne"
605
             @current-change="handleCurrentChangeOne"
606
             @current-change="handleCurrentChangeOne"
606
             :page-size="5"
607
             :page-size="5"
608
+            :page-sizes="[10, 20, 50, 100,500,1000,2000]"
607
             background
609
             background
608
             style="margin-top:20px;float: right"
610
             style="margin-top:20px;float: right"
609
             :total="value"
611
             :total="value"
616
 <script>
618
 <script>
617
   import { code, EditLapseto, fetchList, getMaxDialysisNo, OpenView, postExportPatients,GetRemind } from '@/api/patient'
619
   import { code, EditLapseto, fetchList, getMaxDialysisNo, OpenView, postExportPatients,GetRemind } from '@/api/patient'
618
   import { generateLog } from '@/api/config'
620
   import { generateLog } from '@/api/config'
619
-
620
   import QRCode from 'qrcodejs2'
621
   import QRCode from 'qrcodejs2'
621
   import Vue from 'vue'
622
   import Vue from 'vue'
622
   import { Base64 } from 'js-base64'
623
   import { Base64 } from 'js-base64'
623
-  import { uParseTime } from '@/utils/tools'
624
+  import { jsGetAge,uParseTime } from '@/utils/tools'
624
   import { log } from 'util'
625
   import { log } from 'util'
625
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
626
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
626
   import UploadExcel from '@/xt_pages/components/UploadExcel'
627
   import UploadExcel from '@/xt_pages/components/UploadExcel'
1336
         return new Date(time).getTime() / 1000
1337
         return new Date(time).getTime() / 1000
1337
       },
1338
       },
1338
       search() {
1339
       search() {
1339
-        this.listQuery.limit = 700
1340
+        
1340
         this.listQuery.keywords = this.searchKey
1341
         this.listQuery.keywords = this.searchKey
1341
         this.getList()
1342
         this.getList()
1342
       },
1343
       },
1354
             console.log('病人是', this.tableData)
1355
             console.log('病人是', this.tableData)
1355
             this.pageTotal = this.tableData.length
1356
             this.pageTotal = this.tableData.length
1356
             this.total = response.data.data.total
1357
             this.total = response.data.data.total
1358
+           
1357
           }
1359
           }
1358
         })
1360
         })
1359
       },
1361
       },
1515
         }
1517
         }
1516
 
1518
 
1517
       },
1519
       },
1520
+     toExport(){
1521
+      import('@/vendor/Export2Excel').then(excel => {
1522
+      
1523
+        console.log("hhhh323223",this.tableData)
1524
+        for(let i=0;i<this.tableData.length;i++){
1525
+          if(this.tableData[i].gender == 1){
1526
+            this.tableData[i].genders = "男"
1527
+          }
1528
+          if(this.tableData[i].gender == 2){
1529
+            this.tableData[i].genders = "女"
1530
+          }
1531
+          this.tableData[i].age_year = this.tranAge(this.tableData[i])
1532
+          this.tableData[i].first_dialysis_date = this.getTime(this.tableData[i].first_dialysis_date)
1533
+          if(this.tableData[i].lapseto == 0){
1534
+            this.tableData[i].lapesetos = ""
1535
+          }
1536
+          if(this.tableData[i].lapseto == 1){
1537
+            this.tableData[i].lapesetos = "留治"
1538
+          }
1539
+          if(this.tableData[i].lapseto == 2){
1540
+            this.tableData[i].lapesetos = "转归"
1541
+          }
1542
+           if(this.tableData[i].source == 0){
1543
+             this.tableData[i].sources = ""
1544
+          }
1545
+          if(this.tableData[i].source == 1){
1546
+             this.tableData[i].sources = "门诊"
1547
+          }
1548
+           if(this.tableData[i].source == 2){
1549
+             this.tableData[i].sources = "住院"
1550
+          }
1551
+         if(this.tableData[i].is_infectious == 0){
1552
+             this.tableData[i].is_infectiouss = ""
1553
+          }
1554
+          if(this.tableData[i].is_infectious == 1){
1555
+             this.tableData[i].is_infectiouss = "阴性"
1556
+          }
1557
+          if(this.tableData[i].is_infectious == 2){
1558
+             this.tableData[i].is_infectiouss = "阳性"
1559
+          }
1560
+        }
1561
+       
1562
+        const tHeader = ['姓名', '性别', '身份证号码','年龄','透析号','首次治疗时间','本人电话','患者来源','治疗状态','传染病']
1563
+        const filterVal = ['name', 'genders', 'id_card_no','age_year','dialysis_no','first_dialysis_date','phone','sources','lapesetos','is_infectiouss']
1564
+        console.log("table",this.tableData)
1565
+      
1566
+        const data = this.formatJson(filterVal, this.tableData)
1567
+        excel.export_json_to_excel({
1568
+          header: tHeader,
1569
+          data,
1570
+          filename: '患者名单'
1571
+        })
1572
+        this.downloadLoading = false
1573
+     })
1574
+    },
1575
+    formatJson(filterVal, jsonData) {
1576
+      return jsonData.map(v => filterVal.map(j => v[j]));
1577
+    },
1578
+    tranAge(val) {
1579
+      if(val.birthday){
1580
+        var birth = uParseTime(val.birthday, '{y}-{m}-{d}');
1581
+        return jsGetAge(birth, '-');
1582
+      }
1583
+    },
1518
     }
1584
     }
1519
   }
1585
   }
1520
   Vue.prototype.$QRCode = function() {
1586
   Vue.prototype.$QRCode = function() {

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

521
         },
521
         },
522
         options:[
522
         options:[
523
          {id:1,name:"启用"},
523
          {id:1,name:"启用"},
524
-         {id:2,name:"停用"}
524
+         {id:2,name:"停用"},
525
+         {id:3,name:"备用"}
525
         ],
526
         ],
526
         optionsPass:[
527
         optionsPass:[
527
           {id:1,name:"流入-动脉"},
528
           {id:1,name:"流入-动脉"},