瀏覽代碼

Merge branch '20201014_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201014_pc_vue_new_branch

See999 4 年之前
父節點
當前提交
260a5b84b9

+ 86 - 15
src/xt_pages/data/druguseTemplate.vue 查看文件

515
                   <el-col :span="24">
515
                   <el-col :span="24">
516
                     <el-form-item :label="edit_advice_name" required prop="advice_name">
516
                     <el-form-item :label="edit_advice_name" required prop="advice_name">
517
                       <!-- <el-input v-model="templateFormEdit.advice_name"></el-input> -->
517
                       <!-- <el-input v-model="templateFormEdit.advice_name"></el-input> -->
518
-                       <el-select
518
+                       <!-- <el-select
519
                             v-model="templateFormEdit.advice_name"
519
                             v-model="templateFormEdit.advice_name"
520
                             filterable
520
                             filterable
521
                             clearable
521
                             clearable
530
                               :label="item.drug_name"
530
                               :label="item.drug_name"
531
                               :value="item.drug_name"
531
                               :value="item.drug_name"
532
                             ></el-option>
532
                             ></el-option>
533
-                          </el-select>
533
+                          </el-select> -->
534
+                        <el-autocomplete
535
+                          style="width:100%;"
536
+                          class="inline-input"
537
+                          v-model="templateFormEdit.advice_name"
538
+                          :fetch-suggestions="querySearch"
539
+                          placeholder="请输入内容"
540
+                          @select="handleSelect"
541
+                          @input="changeDrugNameTwo"
542
+                         ></el-autocomplete>
534
                     </el-form-item>
543
                     </el-form-item>
535
                   </el-col>
544
                   </el-col>
536
                   <el-col :span="15">
545
                   <el-col :span="15">
538
                     <el-form-item label="药品规格 :" prop="advice_desc">
547
                     <el-form-item label="药品规格 :" prop="advice_desc">
539
                       <el-col :span="8">
548
                       <el-col :span="8">
540
                         <!-- <el-input v-model="templateFormEdit.advice_desc"></el-input> -->
549
                         <!-- <el-input v-model="templateFormEdit.advice_desc"></el-input> -->
541
-                           <el-select
550
+                           <!-- <el-select
542
                               v-model="templateFormEdit.advice_desc"
551
                               v-model="templateFormEdit.advice_desc"
543
                               filterable
552
                               filterable
544
                               clearable
553
                               clearable
553
                                 :label="item.drug_spec"
562
                                 :label="item.drug_spec"
554
                                 :value="item.drug_spec"
563
                                 :value="item.drug_spec"
555
                               ></el-option>
564
                               ></el-option>
556
-                           </el-select>
565
+                           </el-select> -->
566
+
567
+                             <el-autocomplete
568
+                              style="width:100px;"
569
+                              class="inline-input"
570
+                              v-model="templateFormEdit.advice_desc"
571
+                              :fetch-suggestions="querySearch1"
572
+                              placeholder="请输入内容"
573
+                              @select="handleSelect1"
574
+                              @input="changeDrugDescTwo"
575
+                            ></el-autocomplete>
557
                       </el-col>
576
                       </el-col>
558
                       <el-col class="line" :span="1">&nbsp;</el-col>
577
                       <el-col class="line" :span="1">&nbsp;</el-col>
559
                       <el-col :span="14">
578
                       <el-col :span="14">
787
                   <el-col :span="24">
806
                   <el-col :span="24">
788
                     <el-form-item label="医嘱内容 :" required prop="advice_name">
807
                     <el-form-item label="医嘱内容 :" required prop="advice_name">
789
                       <!-- <el-input v-model="templateForm.advice_name"></el-input> -->
808
                       <!-- <el-input v-model="templateForm.advice_name"></el-input> -->
790
-                    <el-select
809
+                    <!-- <el-select
791
                         v-model="templateForm.advice_name"
810
                         v-model="templateForm.advice_name"
792
                         filterable
811
                         filterable
793
                         clearable
812
                         clearable
802
                         :label="item.drug_name"
821
                         :label="item.drug_name"
803
                         :value="item.drug_name"
822
                         :value="item.drug_name"
804
                       ></el-option>
823
                       ></el-option>
805
-                     </el-select>
824
+                     </el-select> -->
825
+
826
+                       <el-autocomplete
827
+                        style="width:100%;"
828
+                        class="inline-input"
829
+                        v-model="templateForm.advice_name"
830
+                        :fetch-suggestions="querySearch"
831
+                        placeholder="请输入内容"
832
+                        @select="handleSelect"
833
+                        @input="changeDrugName"
834
+                       ></el-autocomplete>
806
                     </el-form-item>
835
                     </el-form-item>
807
                   </el-col>
836
                   </el-col>
808
                   <el-col :span="12">
837
                   <el-col :span="12">
810
                     <el-form-item label="药品规格 :" prop="advice_desc">
839
                     <el-form-item label="药品规格 :" prop="advice_desc">
811
                       <el-col :span="9">
840
                       <el-col :span="9">
812
                         <!-- <el-input v-model="templateForm.advice_desc"></el-input> -->
841
                         <!-- <el-input v-model="templateForm.advice_desc"></el-input> -->
813
-                      <el-select
842
+                      <!-- <el-select
814
                           v-model="templateForm.advice_desc"
843
                           v-model="templateForm.advice_desc"
815
                           filterable
844
                           filterable
816
                           clearable
845
                           clearable
824
                           :label="item.drug_spec"
853
                           :label="item.drug_spec"
825
                           :value="item.drug_spec"
854
                           :value="item.drug_spec"
826
                         ></el-option>
855
                         ></el-option>
827
-                        </el-select>
856
+                        </el-select> -->
857
+
858
+                         <el-autocomplete
859
+                          style="width:100px;"
860
+                          class="inline-input"
861
+                          v-model="templateForm.advice_desc"
862
+                          :fetch-suggestions="querySearch1"
863
+                          placeholder="请输入内容"
864
+                          @select="handleSelect1"
865
+                          @input="changeDrugDesc"
866
+                         ></el-autocomplete>
828
                       </el-col>
867
                       </el-col>
829
                       <el-col class="line" :span="1">&nbsp;</el-col>
868
                       <el-col class="line" :span="1">&nbsp;</el-col>
830
                       <el-col :span="14">
869
                       <el-col :span="14">
1395
           delivery_way: '',
1434
           delivery_way: '',
1396
           execution_frequency: '',
1435
           execution_frequency: '',
1397
           id: 0,
1436
           id: 0,
1398
-          drug_id:"",
1399
-          way:""
1437
+          drug_id:0,
1438
+          way:0
1400
         },
1439
         },
1401
         dialogConfigVisible:false,
1440
         dialogConfigVisible:false,
1402
         templateFormEdit: {
1441
         templateFormEdit: {
1463
          current_drug_spec: "",
1502
          current_drug_spec: "",
1464
          drug_id: 0,
1503
          drug_id: 0,
1465
          src_type:"",
1504
          src_type:"",
1466
-         way:""
1505
+         way:0
1467
       }
1506
       }
1468
     },
1507
     },
1469
     created() {
1508
     created() {
2153
       
2192
       
2154
       //编辑医嘱
2193
       //编辑医嘱
2155
       submitEditTemplate(formName) {
2194
       submitEditTemplate(formName) {
2156
-         
2157
-         var drug_id = ""
2195
+        
2196
+         var drug_id = 0
2158
          for(let i=0;i<this.all_drug.length;i++){
2197
          for(let i=0;i<this.all_drug.length;i++){
2159
            if(this.templateFormEdit.advice_name == this.all_drug[i].drug_name){
2198
            if(this.templateFormEdit.advice_name == this.all_drug[i].drug_name){
2160
               drug_id = this.all_drug[i].id
2199
               drug_id = this.all_drug[i].id
2162
          } 
2201
          } 
2163
         this.templateFormEdit.drug_id = drug_id
2202
         this.templateFormEdit.drug_id = drug_id
2164
        
2203
        
2165
-        
2204
+        console.log("2222",this.templateFormEdit)
2166
         this.$refs[formName].validate(valid => {
2205
         this.$refs[formName].validate(valid => {
2206
+
2167
           this.templateFormEdit.single_dose = parseFloat(this.templateFormEdit.single_dose)
2207
           this.templateFormEdit.single_dose = parseFloat(this.templateFormEdit.single_dose)
2168
           this.templateFormEdit.prescribing_number = parseFloat(this.templateFormEdit.prescribing_number)
2208
           this.templateFormEdit.prescribing_number = parseFloat(this.templateFormEdit.prescribing_number)
2169
 
2209
 
2170
           if (isNaN(this.templateFormEdit.single_dose)) {
2210
           if (isNaN(this.templateFormEdit.single_dose)) {
2171
-            this.templateFormEdit.single_dose = 0
2211
+             this.templateFormEdit.single_dose = 0
2172
           }
2212
           }
2173
           if (isNaN(this.templateFormEdit.prescribing_number)) {
2213
           if (isNaN(this.templateFormEdit.prescribing_number)) {
2174
             this.templateFormEdit.prescribing_number = 0
2214
             this.templateFormEdit.prescribing_number = 0
2847
           }
2887
           }
2848
         }
2888
         }
2849
       },
2889
       },
2890
+      
2850
 
2891
 
2892
+     querySearch(queryString, cb) {
2893
+        console.log('queryString',queryString)
2894
+        var restaurants = this.all_drug;
2895
+        restaurants.map(item => {
2896
+          item.value = item.drug_name
2897
+        })
2898
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
2899
+        // 调用 callback 返回建议列表的数据
2900
+        console.log('results',results)
2901
+        cb(results);
2902
+     },
2903
+
2904
+     createFilter(queryString) {
2905
+        return (restaurant) => {
2906
+          return (restaurant.drug_name.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
2907
+        };
2908
+     },
2909
+
2910
+     querySearch1(queryString, cb) {
2911
+        console.log('queryString',queryString)
2912
+        var restaurants = this.drugSpec;
2913
+         console.log(restaurants)
2914
+        restaurants.map(item => {
2915
+          item.value = item.drug_spec
2916
+        })
2917
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
2918
+        // 调用 callback 返回建议列表的数据
2919
+        console.log('results',results)
2920
+        cb(results);
2921
+      },
2851
     }
2922
     }
2852
   }
2923
   }
2853
 </script>
2924
 </script>

+ 2 - 1
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue 查看文件

1472
             this.huShow = false
1472
             this.huShow = false
1473
             this.totalShow = false
1473
             this.totalShow = false
1474
           }
1474
           }
1475
-          this.dialysisPrescription.mode_id = schedual.mode_id
1475
+          // this.dialysisPrescription.mode_id = schedual.mode_id
1476
 
1476
 
1477
         }
1477
         }
1478
         var thismode = parseInt(this.dialysisPrescription.anticoagulant)
1478
         var thismode = parseInt(this.dialysisPrescription.anticoagulant)
3025
                       response.data.data.system_prescription[key]
3025
                       response.data.data.system_prescription[key]
3026
                   }
3026
                   }
3027
                 }
3027
                 }
3028
+                
3028
               } else {
3029
               } else {
3029
                 for (const key in this.dialysisPrescription) {
3030
                 for (const key in this.dialysisPrescription) {
3030
                   // 临时处方为空
3031
                   // 临时处方为空

+ 5 - 2
src/xt_pages/stock/selfPreparedMedicine/query.vue 查看文件

140
          const tHeader = ['序号', '透析号', '姓名','药品名称','规格名称','自备量','已使用','剩余']
140
          const tHeader = ['序号', '透析号', '姓名','药品名称','规格名称','自备量','已使用','剩余']
141
          const filterVal = ['index', 'dialysis_no', 'name','drug_name','drug_spec','Total','Count','margin']
141
          const filterVal = ['index', 'dialysis_no', 'name','drug_name','drug_spec','Total','Count','margin']
142
          for(let i=0;i<this.tableData.length;i++){
142
          for(let i=0;i<this.tableData.length;i++){
143
-            this.tableData[i].margin = this.tableData[i].Total - this.tableData[i].Count
143
+            this.tableData[i].margin = (this.tableData[i].Total?this.tableData[i].Total:0) - this.tableData[i].Count
144
          }
144
          }
145
          const data = this.formatJson(filterVal, this.tableData)
145
          const data = this.formatJson(filterVal, this.tableData)
146
          excel.export_json_to_excel({
146
          excel.export_json_to_excel({
269
              for(let i=0;i<outStockList.length;i++){
269
              for(let i=0;i<outStockList.length;i++){
270
                  for(let j=0;j<stocklist.length;j++){
270
                  for(let j=0;j<stocklist.length;j++){
271
                      if(outStockList[i].patient_id == stocklist[j].patient_id &&outStockList[i].drug_name == stocklist[j].drug_name && outStockList[i].drug_spec == stocklist[j].drug_spec){
271
                      if(outStockList[i].patient_id == stocklist[j].patient_id &&outStockList[i].drug_name == stocklist[j].drug_name && outStockList[i].drug_spec == stocklist[j].drug_spec){
272
+                       if(!stocklist[j].Total){
273
+                          outStockList[i].Total = 0
274
+                       }
272
                       outStockList[i].Total = stocklist[j].Total
275
                       outStockList[i].Total = stocklist[j].Total
273
                    } 
276
                    } 
274
                  }
277
                  }
275
               }
278
               }
276
 
279
 
277
-
280
+              console.log("outStockList",outStockList)
278
               this.tableData = outStockList
281
               this.tableData = outStockList
279
             }
282
             }
280
         })   
283
         })