Kaynağa Gözat

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

csx 3 yıl önce
ebeveyn
işleme
157e61ea98
24 değiştirilmiş dosya ile 449 ekleme ve 212 silme
  1. 9 6
      src/router/index_路由未分离前.js
  2. 52 43
      src/router/modules/drugs.js
  3. 109 57
      src/xt_pages/data/components/addDrugs.vue
  4. 6 1
      src/xt_pages/dialysis/details/NavIgation.vue
  5. 6 3
      src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue
  6. 5 1
      src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue
  7. 1 1
      src/xt_pages/dialysis/details/dialysisMonitoring.vue
  8. 19 1
      src/xt_pages/dialysis/template/DialysisPrintOrderForty.vue
  9. 18 12
      src/xt_pages/outpatientCharges/components/monthPrescriptionTable.vue
  10. 6 1
      src/xt_pages/outpatientDoctorStation/components/dialysisIndex.vue
  11. 2 2
      src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue
  12. 68 11
      src/xt_pages/outpatientDoctorStation/components/prescriptionTemplateTable.vue
  13. 4 2
      src/xt_pages/outpatientDoctorStation/prescriptionTemplate.vue
  14. 8 8
      src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue
  15. 2 2
      src/xt_pages/outpatientDoctorStation/template/printThree.vue
  16. 2 2
      src/xt_pages/outpatientDoctorStation/treatTemplate/printTwo.vue
  17. 8 8
      src/xt_pages/stock/Dialog/goodInfoDailog.vue
  18. 8 6
      src/xt_pages/stock/drugs/drugStockInOrderAdd.vue
  19. 4 2
      src/xt_pages/stock/drugs/drugStockInOrderEdit.vue
  20. 1 1
      src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue
  21. 1 1
      src/xt_pages/stock/stockInOrderAdd.vue
  22. 6 21
      src/xt_pages/stock/stockOutOrder.vue
  23. 3 4
      src/xt_pages/stock/stockOutOrderAdd.vue
  24. 101 16
      src/xt_pages/stock/stockOutOrderEdit.vue

+ 9 - 6
src/router/index_路由未分离前.js Dosyayı Görüntüle

@@ -604,7 +604,7 @@ export const xt_asyncRouterMap = [
604 604
         name: 'weight',
605 605
         meta: { title: 'weight', noCache: true }
606 606
       },
607
-   
607
+
608 608
       {
609 609
         path: '/patients/patient/:id/dialysisRecord',
610 610
         component: () => import('@/xt_pages/user/dialysisRecord'),
@@ -860,21 +860,24 @@ export const xt_asyncRouterMap = [
860 860
         hidden: true,
861 861
         is_menu: false,
862 862
         meta: { title: 'stockOutOrderAdd', noCache: true }
863
-      }, {
863
+      },
864
+      {
864 865
         path: '/stock/out/detail',
865 866
         component: () => import('@/xt_pages/stock/stockOutDetail'),
866 867
         name: 'stockOutDetail',
867 868
         hidden: true,
868 869
         is_menu: false,
869 870
         meta: { title: 'stockOutDetail', noCache: true }
870
-      }, {
871
+      },
872
+      {
871 873
         path: '/stock/cancel/add',
872 874
         component: () => import('@/xt_pages/stock/cancelStockOrderAdd'),
873 875
         name: 'cancelStockOrderAdd',
874 876
         hidden: true,
875 877
         is_menu: false,
876 878
         meta: { title: 'cancelStockOrderAdd', noCache: true }
877
-      }, {
879
+      },
880
+      {
878 881
         path: '/stock/cancel/detail',
879 882
         component: () => import('@/xt_pages/stock/cancelStockDetail'),
880 883
         name: 'cancelStockDetail',
@@ -887,8 +890,8 @@ export const xt_asyncRouterMap = [
887 890
         component: () => import('@/xt_pages/stock/index'),
888 891
         name: 'config',
889 892
         meta: { title: 'config' }
890
-      },
891
-     
893
+      }
894
+
892 895
     ]
893 896
   },
894 897
   {

+ 52 - 43
src/router/modules/drugs.js Dosyayı Görüntüle

@@ -13,40 +13,40 @@ export default {
13 13
   },
14 14
   children: [
15 15
     {
16
-        path: '/stock/drugs/stock/query',
17
-        component: () => import('@/xt_pages/stock/drugs/query'),
18
-        name: 'drugsQuery',
19
-        meta: { title: 'drugsQuery', noCache: true }
16
+      path: '/stock/drugs/stock/query',
17
+      component: () => import('@/xt_pages/stock/drugs/query'),
18
+      name: 'drugsQuery',
19
+      meta: { title: 'drugsQuery', noCache: true }
20 20
     },
21 21
     {
22
-        path: '/stock/drugs/stock/in',
23
-        component: () => import('@/xt_pages/stock/drugs/drugStockInOrder'),
24
-        name: 'drugsStockIn',
25
-        meta: { title: 'drugsStockIn', noCache: true }
22
+      path: '/stock/drugs/stock/in',
23
+      component: () => import('@/xt_pages/stock/drugs/drugStockInOrder'),
24
+      name: 'drugsStockIn',
25
+      meta: { title: 'drugsStockIn', noCache: true }
26 26
     },
27 27
     {
28
-        path: '/stock/drugs/stock/out',
29
-        component: () => import('@/xt_pages/stock/drugs/drugStockOutOrder'),
30
-        name: 'drugsStockOut',
31
-        meta: { title: 'drugsStockOut', noCache: true }
28
+      path: '/stock/drugs/stock/out',
29
+      component: () => import('@/xt_pages/stock/drugs/drugStockOutOrder'),
30
+      name: 'drugsStockOut',
31
+      meta: { title: 'drugsStockOut', noCache: true }
32 32
     },
33 33
     {
34
-        path: '/stock/drugs/stock/return',
35
-        component: () => import('@/xt_pages/stock/drugs/drugSalesReturnOrder'),
36
-        name: 'drugsStockReturn',
37
-        meta: { title: 'drugsStockReturn', noCache: true }
34
+      path: '/stock/drugs/stock/return',
35
+      component: () => import('@/xt_pages/stock/drugs/drugSalesReturnOrder'),
36
+      name: 'drugsStockReturn',
37
+      meta: { title: 'drugsStockReturn', noCache: true }
38 38
     },
39 39
     {
40
-        path: '/stock/drugs/stock/cancel',
41
-        component: () => import('@/xt_pages/stock/drugs/cancelDrugStockOrder'),
42
-        name: 'drugsStockCancel',
43
-        meta: { title: 'drugsStockCancel', noCache: true }
40
+      path: '/stock/drugs/stock/cancel',
41
+      component: () => import('@/xt_pages/stock/drugs/cancelDrugStockOrder'),
42
+      name: 'drugsStockCancel',
43
+      meta: { title: 'drugsStockCancel', noCache: true }
44 44
     },
45 45
     {
46
-      path:'/stock/drugs/stock/detail',
47
-      component:()=>import('@/xt_pages/stock/drugs/drugIndex'),
48
-      name:'drugDetail',
49
-      meta:{title:'明细查询',noCache:true}
46
+      path: '/stock/drugs/stock/detail',
47
+      component: () => import('@/xt_pages/stock/drugs/drugIndex'),
48
+      name: 'drugDetail',
49
+      meta: { title: '明细查询', noCache: true }
50 50
     },
51 51
     // {
52 52
     //     path: '/stock/drugs/stock/adjustPrice',
@@ -122,7 +122,7 @@ export default {
122 122
       hidden: true,
123 123
       is_menu: false,
124 124
       meta: { title: 'cancelDrugStockOrderAdd', noCache: true }
125
-    },{
125
+    }, {
126 126
       path: '/drugstock/cancel/detail',
127 127
       component: () => import('@/xt_pages/stock/drugs/cancelDrugStockDetail'),
128 128
       name: 'cancelDrugStockDetail',
@@ -139,31 +139,40 @@ export default {
139 139
       meta: { title: 'drugStockUserDetail', noCache: true }
140 140
     },
141 141
 
142
-    //编辑药品入库单
142
+    // 编辑药品入库单
143 143
     {
144
-      path:'/drugstock/in/order/edit',
145
-      component:()=>import('@/xt_pages/stock/drugs/drugStockInOrderEdit'),
146
-      name:'drugStockInOrderEdit',
147
-      hidden:true,
148
-      is_menu:false,
144
+      path: '/drugstock/in/order/edit',
145
+      component: () => import('@/xt_pages/stock/drugs/drugStockInOrderEdit'),
146
+      name: 'drugStockInOrderEdit',
147
+      hidden: true,
148
+      is_menu: false,
149 149
       meta: { title: 'drugStockInOrderEdit', noCache: true }
150 150
     },
151 151
 
152 152
     {
153
-      path:'/drugstock/in/drugstockflow',
154
-      component:()=>import('@/xt_pages/stock/drugs/drugStockFlow'),
155
-      name:"drugStockFlow",
156
-      hidden:true,
157
-      is_menu:false,
158
-      meta:{title:"drugStockFlow",noCache:true}
153
+      path: '/drugstock/in/drugstockflow',
154
+      component: () => import('@/xt_pages/stock/drugs/drugStockFlow'),
155
+      name: 'drugStockFlow',
156
+      hidden: true,
157
+      is_menu: false,
158
+      meta: { title: 'drugStockFlow', noCache: true }
159
+    },
160
+    {
161
+      path: '/drugstock/in/drugbatchnumber',
162
+      component: () => import('@/xt_pages/stock/drugs/drugBatchNumber'),
163
+      name: 'drugBatchNumber',
164
+      hidden: true,
165
+      is_menu: false,
166
+      meta: { title: 'drugBatchNumber', noCache: true }
159 167
     },
160 168
     {
161
-      path:'/drugstock/in/drugbatchnumber',
162
-      component:()=>import('@/xt_pages/stock/drugs/drugBatchNumber'),
163
-      name:"drugBatchNumber",
164
-      hidden:true,
165
-      is_menu:false,
166
-      meta:{title:"drugBatchNumber",noCache:true}
169
+      path: '/stock/stockoutorderedit',
170
+      component: () => import('@/xt_pages/stock/stockOutOrderEdit'),
171
+      name: 'stockOutOrderEdit',
172
+      hidden: true,
173
+      is_menu: false,
174
+      meta: { title: 'stockOutOrderEdit', noCache: true }
167 175
     }
176
+
168 177
   ]
169 178
 }

+ 109 - 57
src/xt_pages/data/components/addDrugs.vue Dosyayı Görüntüle

@@ -14,12 +14,12 @@
14 14
                             <el-input v-model="form.drug_name" style="width:160px;" placeholder=""
15 15
                                       maxlength="30"></el-input>
16 16
                         </el-form-item>
17
-                      
17
+
18 18
                         <el-form-item label="药品别名 : ">
19 19
                             <el-input v-model="form.drug_alias" style="width:160px;" placeholder=""
20 20
                                       maxlength="30"></el-input>
21 21
                         </el-form-item>
22
-                        
22
+
23 23
                         <el-form-item label="药品类别 : " prop="drug_category">
24 24
                             <el-select v-model="form.drug_category" style="width:160px;" placeholder="请选择">
25 25
                                 <el-option
@@ -31,11 +31,11 @@
31 31
                             </el-select>
32 32
                         </el-form-item>
33 33
                         <div style="width:100%;">
34
-                          <div><span style="color:red;">*</span>单位&规格: <span style="color:#999">例如:0.75 g * 60 粒 / 盒</span></div>
34
+                          <div><span style="width:120px;text-align:right;display:inline-block"><span style="color:red;">*</span>单位&规格:</span><span style="color:#999">例如:0.75 g * 60 粒 / 盒</span></div>
35 35
                         </div>
36
-                        <div style="width:100%;display:flex;align-items:center;">
36
+                        <div style="width:100%;display:flex;align-items:center;margin-left:120px;">
37 37
                             <el-form-item prop="dose" class="noMargin">
38
-                              <el-input v-model="form.dose" type="number" style="width:100px" placeholder="剂量" :disabled="dosageShow"></el-input>  
38
+                              <el-input v-model="form.dose" type="number" style="width:100px;margin-right:5px;" placeholder="剂量" :disabled="dosageShow"></el-input>
39 39
                             </el-form-item>
40 40
                             <el-form-item prop="dose_unit" class="noMargin">
41 41
                               <el-select v-model="form.dose_unit" style="width:160px;" placeholder="剂量单位" @change="changeMaxUnit">
@@ -45,11 +45,11 @@
45 45
                                   :label="item.name"
46 46
                                   :value="item.name">
47 47
                                 </el-option>
48
-                            </el-select>
49
-                          </el-form-item>
50
-                            *
48
+                              </el-select>
49
+                            </el-form-item>
50
+                            <span style="margin-bottom:20px;font-size:20px;">*</span>
51 51
                             <el-form-item prop="min_number" class="noMargin">
52
-                              <el-input v-model="form.min_number" style="width:100px" type="number" placeholder="拆零"> </el-input>
52
+                              <el-input v-model="form.min_number" style="width:100px;margin-right:5px;" :disabled="dosageShow" type="number" placeholder="拆零"> </el-input>
53 53
                             </el-form-item>
54 54
                             <el-form-item prop="min_unit" class="noMargin">
55 55
                               <el-select v-model="form.min_unit" style="width:160px;"  placeholder="拆零单位"  @change="changeMinUnit">
@@ -60,8 +60,8 @@
60 60
                                   :value="item.name">
61 61
                                 </el-option>
62 62
                               </el-select>
63
-                          </el-form-item>
64
-                          /
63
+                            </el-form-item>
64
+                          <span style="margin-bottom:20px;font-size:20px;">/</span>
65 65
                           <el-form-item prop="max_unit" class="noMargin">
66 66
                             <el-select v-model="form.max_unit" style="width:160px;" placeholder="包装单位">
67 67
                               <el-option
@@ -73,8 +73,8 @@
73 73
                             </el-select>
74 74
                           </el-form-item>
75 75
                         </div>
76
-                       
77
-                        
76
+
77
+
78 78
                         <el-form-item label="药品类型 : " prop="drug_type">
79 79
                             <el-select v-model="form.drug_type" style="width:160px;" placeholder="请选择">
80 80
                                 <el-option
@@ -106,7 +106,7 @@
106 106
                             </el-option>
107 107
                         </el-select>
108 108
                     </el-form-item>
109
-                  
109
+
110 110
                     <el-form-item label="默认单次用量 : " prop="drug_dose">
111 111
                          <el-input v-model="form.drug_dose" style="width:70px;margin-right:5px;" placeholder=""
112 112
                                       maxlength="30"></el-input>
@@ -155,7 +155,7 @@
155 155
                                 </el-option>
156 156
                             </el-select>
157 157
                         </el-form-item>
158
-                       
158
+
159 159
                         <el-form-item label="单位换算 : ">
160 160
                             <el-input v-model="form.unit_matrixing" style="width:160px;" placeholder=""
161 161
                                       maxlength="30"></el-input>
@@ -196,7 +196,7 @@
196 196
                                 </el-option>
197 197
                             </el-select>
198 198
                         </el-form-item>
199
-                      
199
+
200 200
 
201 201
 
202 202
                         <el-form-item label="限制性用药 : ">
@@ -228,7 +228,7 @@
228 228
                                       maxlength="30"></el-input>
229 229
                         </el-form-item>
230 230
                         <el-form-item label="生产厂商 : " prop="manufacturer">
231
-                           
231
+
232 232
                             <el-select v-model="form.manufacturer" style="width:160px;" filterable placeholder="请选择">
233 233
                                 <el-option
234 234
                                         v-for="(item,index) in manufacturerList"
@@ -295,13 +295,14 @@
295 295
                         </el-form-item>
296 296
 
297 297
                         <el-form-item label="社保目录编码">
298
-                            <el-input v-model="form.social_security_directory_code" style="width:180px"></el-input>
298
+                            <el-input v-model="form.social_security_directory_code" style="width:160px"></el-input>
299 299
                         </el-form-item>
300 300
 
301 301
 
302 302
 
303 303
                         <el-form-item label="备案日期:">
304 304
                             <el-date-picker
305
+                                    style="width:160px"
305 306
                                     value-format="yyyy-MM-dd"
306 307
                                     v-model="form.record_date"
307 308
                                     type="date"
@@ -310,9 +311,9 @@
310 311
                         </el-form-item>
311 312
 
312 313
                         <el-form-item label="药品备注:">
313
-                            <el-input v-model="form.drug_remark" style="width:180px"></el-input>
314
+                            <el-input v-model="form.drug_remark" style="width:160px"></el-input>
314 315
                         </el-form-item>
315
-                      
316
+
316 317
                         <el-form-item label="经销商: " style="width:100%">
317 318
 
318 319
                             <el-select v-model="form.dealer" style="width:100%;" filterable placeholder="请选择">
@@ -348,7 +349,7 @@
348 349
             <el-tab-pane label="扩展数据" name="second">
349 350
                 <el-form :model="form" label-width="120px"
350 351
                          style="display: flex;flex-wrap: wrap;justify-content: space-between;">
351
-           
352
+
352 353
                     <el-form-item label="标签:" prop="label">
353 354
                         <el-select v-model="form.label" style="width:160px;" placeholder="请选择">
354 355
                             <el-option
@@ -539,8 +540,9 @@
539 540
           drug_name: [{ required: true, message: '请填写药品名称', trigger: 'blur' }],
540 541
           drug_alias: [{ required: true, message: '请选择药品类别', trigger: 'change' }],
541 542
           // drug_spec: [{ required: true, message: '请填写药品规格', trigger: 'blur' }],
542
-          dosage:[{required:true,message:'请输入药品剂量',trigger:'blur'}],
543
-          max_unit: [{ required: true, message: '请填写剂量单位', trigger: 'change' }],
543
+          dose:[{required:true,message:'请输入剂量',trigger:'blur'}],
544
+          dose_unit:[{required:true,message:"请填写剂量",trigger:'blur'}],
545
+          max_unit: [{ required: true, message: '请填写包装单位', trigger: 'change' }],
544 546
           min_unit: [{ required: true, message: '请填写拆零单位', trigger: 'change' }],
545 547
           unval:[{required:true,message:"请填写拆零",trigger:'change'}],
546 548
           min_number:[{required:true,message:"请填写拆零",trigger:'change'}],
@@ -550,7 +552,7 @@
550 552
           drug_origin_place: [{ required: true, message: '请填写产地', trigger: 'blur' }],
551 553
           drug_dosage_form: [{ required: true, message: '请填写药品剂型', trigger: 'blur' }],
552 554
           medical_insurance_level: [{ required: true, message: '请选择医保等级', trigger: 'change' }],
553
-         
555
+
554 556
           unit_matrixing: [{ required: true, message: '请填写单位换算', trigger: 'blur' }],
555 557
           retail_price: [{ required: true, message: '请填写拆零零售价', trigger: 'blur' }],
556 558
           last_price: [{ required: true, message: '请填写进货价', trigger: 'blur' }],
@@ -565,7 +567,7 @@
565 567
           drug_remark: [{ required: true, message: '请填写药品备注' }],
566 568
           lmt_used_flag:[{ required: true, message: '请选择是否限制用药' }],
567 569
           hosp_appr_flag:[{ required: true, message: '请选择审批标志' }],
568
-      
570
+
569 571
         },
570 572
         page: 1,
571 573
         limit: 500,
@@ -598,7 +600,7 @@
598 600
         type: Number,
599 601
         default: 1
600 602
       },
601
-     
603
+
602 604
 
603 605
     },
604 606
     methods: {
@@ -609,7 +611,7 @@
609 611
         this.$refs[formName].validate((valid) => {
610 612
           console.log(valid)
611 613
           if (valid) {
612
-            console.log(1111,this.getValue())
614
+            // console.log(1111,this.getValue())
613 615
             this.$emit('dialog-comfirm', this.getValue())
614 616
           }
615 617
         })
@@ -639,7 +641,7 @@
639 641
         this.form.intro = ''
640 642
       },
641 643
       show(id, obj) {
642
-        
644
+
643 645
         this.unitList = []
644 646
         var arr =  getDataConfig('hemodialysis','units')
645 647
         for(let i=0;i<arr.length;i++){
@@ -652,6 +654,7 @@
652 654
               this.unitList.push(arr[i])
653 655
             }
654 656
         }
657
+        console.log('this.unitList',this.unitList)
655 658
         this.getInitializtion()
656 659
         this.getlist()
657 660
         this.GetAllConfig()
@@ -660,11 +663,11 @@
660 663
         }else{
661 664
           obj.drug_classify = parseInt(obj.drug_classify)
662 665
         }
663
-       
666
+
664 667
         if(obj.dealer == 0){
665 668
            obj.dealer = ""
666 669
         }
667
-        
670
+
668 671
         this.visible = true
669 672
         if (id == 0) {
670 673
           this.formTitle = '新增'
@@ -716,7 +719,12 @@
716 719
         this.form.prescription_mark = ''
717 720
         this.form.record_date = ''
718 721
         this.form.drug_remark = ''
719
-
722
+        this.form.dose = ''
723
+        this.form.dose_unit = ""
724
+        this.form.min_number= ""
725
+        this.form.min_unit = ""
726
+        this.form.max_unit = ""
727
+        this.form.min_price = ""
720 728
         this.visible = false
721 729
       },
722 730
       getValue: function() {
@@ -790,7 +798,7 @@
790 798
 
791 799
         getManufacturerList(params).then(response => {
792 800
           var manufacturerList = response.data.data.manufacturer
793
-         
801
+
794 802
           this.manufacturerList = manufacturerList
795 803
         })
796 804
       },
@@ -809,28 +817,28 @@
809 817
         getInitializtion().then(response=>{
810 818
            if(response.data.state ==1){
811 819
              var drugCategoryList =  response.data.data.drugCategoryList
812
-            
820
+
813 821
              this.drugCategoryList = drugCategoryList
814 822
              var drugTypeList = response.data.data.drugTypeList
815
-             
823
+
816 824
               this.drugTypeList = drugTypeList
817 825
              var drugDosageFormList =  response.data.data.drugDosageFormList
818
-            
826
+
819 827
              this.drugDosageFormList = drugDosageFormList
820 828
              var medicalInsuranceLevelList =  response.data.data.medicalInsuranceLevelList
821
-           
829
+
822 830
              this.medicalInsuranceLevelList = medicalInsuranceLevelList
823 831
              var drugControlList = response.data.data.drugControlList
824
-             
832
+
825 833
              this.drugControlList = drugControlList
826 834
              var drugClassifyList = response.data.data.drugClassifyList
827
-           
835
+
828 836
              this.drugClassifyList = drugClassifyList
829 837
              var statisticsCategoryList =  response.data.data.statisticsCategoryList
830
-            
838
+
831 839
              this.statisticsCategoryList = statisticsCategoryList
832 840
              var pharmacologyCategoryList = response.data.data.pharmacologyCategoryList
833
-           
841
+
834 842
              this.pharmacologyCategoryList = pharmacologyCategoryList
835 843
            }
836 844
         })
@@ -838,39 +846,83 @@
838 846
       changeMaxUnit(val){
839 847
         if(val == this.form.min_unit){
840 848
           this.form.dose = 1
849
+          this.form.min_number = this.form.dose
841 850
           this.dosageShow = true
842 851
         }
843 852
         if(val !=this.form.min_unit){
844
-          this.dosageShow = false 
845
-        } 
846
-       var arr =  getDataConfig('hemodialysis','units')
847
-      
848
-       for(let i=0;i<arr.length;i++){
853
+          this.dosageShow = false
854
+        }
855
+        var arr =  getDataConfig('hemodialysis','units')
856
+        this.unitList = []
857
+        for(let i=0;i<arr.length;i++){
858
+
859
+          if(this.form.min_unit == arr[i].name){
860
+            this.unitList.push(arr[i])
861
+          }
849 862
           if(val == arr[i].name){
850
-             this.unitList.push(arr[i])
863
+            this.unitList.push(arr[i])
851 864
           }
852
-       }
853
-               
865
+          let idArr = []
866
+          this.unitList.map(item => {
867
+            idArr.push(item.id)
868
+          })
869
+          if(idArr.indexOf(this.form.drug_dose_unit) == -1){
870
+            if(this.form.drug_dose_unit == arr[i].id){
871
+              this.unitList.push(arr[i])
872
+            }
873
+          }
874
+
875
+        }
876
+        let ojb = {};
877
+        this.unitList = this.unitList.reduce(function(prevArr, currentItem) {
878
+            //利用对象的键名无法重复的特点,mch_id是唯一区别的属性值
879
+            ojb[currentItem.name] ? '' : ojb[currentItem.name] = true && prevArr.push(currentItem);
880
+            return prevArr
881
+        }, [])
882
+
854 883
       },
855 884
       changeMinUnit(val){
856 885
         if(val == this.form.max_unit){
857 886
           this.form.dose = 1
887
+          this.form.min_number = this.form.dose
858 888
           this.dosageShow = true
859 889
         }
860 890
         if(val != this.form.max_unit){
861 891
           this.dosageShow = false
862 892
         }
863
-        
864
-        if(this.form.dosage == "" || this.form.max_unit == ""){
865
-           this.form.min_number = 1
866
-        } 
867
-        var arr =  getDataConfig('hemodialysis','units')
893
+
894
+        // if(this.form.dosage == "" || this.form.max_unit == ""){
895
+        //    this.form.min_number = 1
896
+        // }
897
+        var arr = getDataConfig('hemodialysis','units')
898
+        this.unitList = []
868 899
         for(let i=0;i<arr.length;i++){
869 900
             if(val == arr[i].name){
870 901
               this.unitList.push(arr[i])
871 902
             }
903
+            if(this.form.max_unit == arr[i].name){
904
+              this.unitList.push(arr[i])
905
+            }
906
+            if(this.form.drug_dose_unit == arr[i].id){
907
+              this.unitList.push(arr[i])
908
+            }
909
+            let idArr = []
910
+            this.unitList.map(item => {
911
+              idArr.push(item.id)
912
+            })
913
+            if(idArr.indexOf(this.form.drug_dose_unit) == -1){
914
+              if(this.form.drug_dose_unit == arr[i].id){
915
+                this.unitList.push(arr[i])
916
+              }
917
+            }
872 918
         }
873
-       
919
+        let ojb = {};
920
+        this.unitList = this.unitList.reduce(function(prevArr, currentItem) {
921
+          //利用对象的键名无法重复的特点,mch_id是唯一区别的属性值
922
+          ojb[currentItem.name] ? '' : ojb[currentItem.name] = true && prevArr.push(currentItem);
923
+          return prevArr
924
+        }, [])
925
+
874 926
       }
875 927
     }, watch: {
876 928
       visible(val) {
@@ -883,9 +935,9 @@
883 935
        //获取所有经销商
884 936
       this.GetAllConfig()
885 937
       this.getlist()
886
-      
887
-      
888
-     
938
+
939
+
940
+
889 941
     }
890 942
   }
891 943
 </script>

+ 6 - 1
src/xt_pages/dialysis/details/NavIgation.vue Dosyayı Görüntüle

@@ -90,6 +90,7 @@
90 90
       :schedual="temp_schedual"
91 91
       :stockType="stockType"
92 92
       :lastAssessment="lastAssessment"
93
+      :mode_id="mode_id"
93 94
     ></dialysis-prescription-dialog>
94 95
 
95 96
     <double-check-dialog
@@ -209,12 +210,16 @@ export default {
209 210
 
210 211
   data() {
211 212
     return {
212
-      temp_schedual: {}
213
+      temp_schedual: {},
214
+      mode_id:1
213 215
     };
214 216
   },
215 217
   mounted() {},
216 218
 
217 219
   props: {
220
+    mode_id:{
221
+      type:Number
222
+    },
218 223
     longAdvices: {
219 224
       // 临时医嘱
220 225
       type: Array,

+ 6 - 3
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue Dosyayı Görüntüle

@@ -1308,13 +1308,16 @@
1308 1308
                 type: 'success',
1309 1309
                 duration: 2000
1310 1310
               })
1311
+              var msg = response.data.data.msg
1312
+              if(msg == "ok"){
1313
+                 this.$message.error("请入库,库存不足")
1314
+              }
1315
+            
1311 1316
               var exid = response.data.data.advice.id
1312 1317
               if (response.data.data.advice.parent_id > 0) {
1313 1318
                 exid = response.data.data.advice.parent_id
1314 1319
               }
1315
-              // if (this.currentRow.parent_id > 0) {
1316
-              //     exid = this.currentRow.parent_id;
1317
-              // }
1320
+             
1318 1321
               this.currentRow.execution_state = 1
1319 1322
               this.currentRow.execution_staff =
1320 1323
                 response.data.data.advice.execution_staff

+ 5 - 1
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Dosyayı Görüntüle

@@ -804,6 +804,9 @@
804 804
     name: 'dialysisPrescriptionDialog',
805 805
     components: { MsgTip,multiSelectBox },
806 806
     props: {
807
+      mode_id:{
808
+        type:Number
809
+      },
807 810
       schedual: {
808 811
         type: Object
809 812
       },
@@ -1815,7 +1818,8 @@
1815 1818
 
1816 1819
         // 入口
1817 1820
         var pre = pre
1818
-        this.dialysisPrescription.mode_id = this.$route.query.mode_id
1821
+        this.dialysisPrescription.mode_id = this.$route.query.mode_id ? this.$route.query.mode_id : this.mode_id
1822
+        console.log('this.dialysisPrescription.mode_id',this.dialysisPrescription.mode_id)
1819 1823
         if (pre.mode_id == 2 || pre.mode_id == 5 || pre.mode_id == 12 || this.schedual.mode_id == 2 || this.schedual.mode_id == 5 || this.schedual.mode_id == 12) {
1820 1824
           this.zhiShow = true
1821 1825
           this.huShow = true

+ 1 - 1
src/xt_pages/dialysis/details/dialysisMonitoring.vue Dosyayı Görüntüle

@@ -15,7 +15,7 @@
15 15
           <th v-if="isShow('血流量')" width="92px">血流量(ml/min)</th>
16 16
           <th v-if="isShow('跨膜压')" width="76px">跨膜压({{monitores[0]&&monitores[0]['transmembrane_pressure_type'] == 2 ? 'kpa' : 'mmHg'}})</th>
17 17
           <th v-if=" isShow('超滤量') &&(template_id == 6 || template_id == 9 || template_id == 10 || template_id == 11 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 27 || template_id == 28 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 32 || template_id == 34 || template_id == 35 || template_id == 36 || template_id == 38 || template_id == 39 || template_id == 40 || this.$store.getters.xt_user.template_info.org_id == 9555)" width="76px" > 超滤量(ml)</th>
18
-          <th v-if=" isShow('超滤量') && template_id != 6 && template_id != 9 && template_id != 10 && template_id != 11 && template_id != 13 && template_id != 17 && template_id != 18 && template_id != 19 && template_id != 20 && template_id != 21 && template_id != 22 && template_id != 23 && template_id != 24 && template_id != 26 && template_id !=27 && template_id!=28 && template_id!=29 && template_id!=30 && template_id!=31 && template_id!=32 && template_id!=34 && template_id!=35 && template_id!=36 && template_id!=38 && template_id != 39 && template_id == 40 && this.$store.getters.xt_user.template_info.org_id != 9555"  width="76px"> 超滤量(L) </th>
18
+          <th v-if=" isShow('超滤量') && template_id != 6 && template_id != 9 && template_id != 10 && template_id != 11 && template_id != 13 && template_id != 17 && template_id != 18 && template_id != 19 && template_id != 20 && template_id != 21 && template_id != 22 && template_id != 23 && template_id != 24 && template_id != 26 && template_id !=27 && template_id!=28 && template_id!=29 && template_id!=30 && template_id!=31 && template_id!=32 && template_id!=34 && template_id!=35 && template_id!=36 && template_id!=38 && template_id != 39 && template_id != 40 && this.$store.getters.xt_user.template_info.org_id != 9555"  width="76px"> 超滤量(L) </th>
19 19
           <th v-if="isShow('超滤率') && (template_id ==6 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 34 || template_id == 35 || template_id == 38)" width="50px"> 超滤率 <br />(ml/h) </th>
20 20
           <th v-if="isShow('超滤率') && template_id !=6 && template_id !=10 && template_id !=11 && template_id !=12 && template_id !=13 && template_id !=17 && template_id !=18 && template_id !=19 && template_id !=20 && template_id !=21 && template_id !=22 && template_id !=23 && template_id !=24 && template_id !=26 && template_id !=29 && template_id !=30 && template_id !=31 && template_id !=34 && template_id !=35 && template_id !=38" width="50px"> 超滤率 <br />(L/h) </th>
21 21
           <th v-if="isShow('钠浓度')" width="92px">钠浓度(mmol/L)</th>

+ 19 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderForty.vue Dosyayı Görüntüle

@@ -880,7 +880,8 @@
880 880
         <td>&nbsp;{{monitor.dialysate_temperature}}</td>
881 881
         <td>&nbsp;{{monitor.replacement_rate}}</td> -->
882 882
           <td>
883
-            &nbsp;{{ monitor.symptom }} &nbsp;{{ monitor.dispose }} &nbsp;{{ monitor.result }}
883
+            <template v-if="(dialysisOrder && monitor.operate_time == dialysisOrder.start_time)">【开始透析】</template>
884
+            {{ monitor.end }}&nbsp;{{ monitor.symptom }} &nbsp;{{ monitor.dispose }} &nbsp;{{ monitor.result }}
884 885
           </td>
885 886
           <td>
886 887
             <span v-if="setAdminUserES(monitor.monitoring_nurse) == ''">
@@ -2096,12 +2097,29 @@ export default {
2096 2097
             if (this.org_template_info.org_id == 9535) {
2097 2098
               this.isShowZero = true
2098 2099
             }
2100
+            var tempmonitorflag = true;
2101
+            for (let index = 0; index < this.monitors.length; index++) {
2102
+              const monitor = this.monitors[index]
2103
+              this.monitors[index].end = ''
2104
+              if (Object.keys(monitor).length > 0 && index > 1) {
2105
+                if (this.dialysisOrder && monitor.operate_time == this.dialysisOrder.end_time) {
2106
+                  this.monitors[index].end = '【结束透析】'
2107
+                  tempmonitorflag = false
2108
+                }
2109
+                if (tempmonitorflag && index == this.monitors.length - 1) {
2110
+                  this.monitors[index].end = '【结束透析】'
2111
+                }
2112
+              }
2113
+            }
2099 2114
             if (this.monitors.length < 6) {
2100 2115
               var nl = 6 - this.monitors.length
2101 2116
               for (let index = 0; index < nl; index++) {
2102 2117
                 this.monitors.push([])
2103 2118
               }
2104 2119
             }
2120
+
2121
+            
2122
+            console.log('this.monitors',this.monitors)
2105 2123
             this.jilurow = this.monitors.length + 1
2106 2124
 
2107 2125
             this.advice_jilurow = this.advices.length + 1

+ 18 - 12
src/xt_pages/outpatientCharges/components/monthPrescriptionTable.vue Dosyayı Görüntüle

@@ -44,23 +44,25 @@
44 44
 
45 45
       <el-table-column align="center" prop="day" width="50" label="天数">
46 46
         <template slot-scope="scope">
47
-          <el-input v-model="scope.row.day" placeholder="" readonly></el-input>
48
-          <div>{{'天'}}</div>
47
+          <div style="display:flex;align-items:center;">
48
+            <el-input v-model="scope.row.day" placeholder="" readonly></el-input>
49
+            <span>{{'天'}}</span>
50
+          </div>
49 51
         </template>
50 52
       </el-table-column>
51 53
 
52 54
       <el-table-column align="center" prop="prescribing_number" width="80" label="总量">
53 55
         <template slot-scope="scope">
54 56
           <div style="display:flex;align-items:center;">
55
-            <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder="" readonly></el-input>
56
-            <div> {{scope.row.prescribing_number_unit}}</div>
57
+            <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder="" readonly></el-input>{{scope.row.prescribing_number_unit}}
57 58
           </div>
58 59
         </template>
59 60
       </el-table-column>
60
-      <el-table-column align="center" prop="retail_price" width="60" label="单价">
61
+      <el-table-column align="center" prop="retail_price" width="70" label="单价">
61 62
         <template slot-scope="scope">
62
-          <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
63
-          <div>{{'元'}}</div>
63
+          <div style="display:flex;align-items:center;">
64
+          <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>{{'元'}}
65
+          </div>
64 66
         </template>
65 67
       </el-table-column>
66 68
       <el-table-column align="center" prop="remark" width="50" label="备注">
@@ -105,8 +107,10 @@
105 107
       </el-table-column>
106 108
       <el-table-column align="center" prop="number_days" width="50" label="天数">
107 109
         <template slot-scope="scope">
108
-          <el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>
109
-          <div>{{'天'}}</div>
110
+          <div style="display:flex;align-items:center;">
111
+            <el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>
112
+            <div>{{'天'}}</div>
113
+          </div>
110 114
         </template>
111 115
       </el-table-column>
112 116
       <el-table-column align="center" prop="total" width="70" label="总量">
@@ -117,10 +121,12 @@
117 121
           </div>
118 122
         </template>
119 123
       </el-table-column>
120
-      <el-table-column align="center" prop="name" width="50" label="单价">
124
+      <el-table-column align="center" prop="name" width="70" label="单价">
121 125
         <template slot-scope="scope">
122
-          <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
123
-          <div>{{'元'}}</div>
126
+          <div style="display:flex;align-items:center;">
127
+            <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
128
+            <div>{{'元'}}</div>
129
+          </div>
124 130
         </template>
125 131
       </el-table-column>
126 132
       <el-table-column align="center" prop="name" width="50" label="备注">

+ 6 - 1
src/xt_pages/outpatientDoctorStation/components/dialysisIndex.vue Dosyayı Görüntüle

@@ -61,6 +61,7 @@
61 61
           :his_is_open="his_is_open"
62 62
           :lastAssessment="lastAssessment"
63 63
           :stockType="stockType"
64
+          :mode_id="mode_id"
64 65
         >
65 66
         </nav-igation>
66 67
 
@@ -309,7 +310,8 @@ export default {
309 310
       queueConfig:{},
310 311
       stockType:[],
311 312
       preparestock:[],
312
-      dialysisShow:false
313
+      dialysisShow:false,
314
+      mode_id:1
313 315
     }
314 316
   },
315 317
   created() {
@@ -326,6 +328,8 @@ export default {
326 328
         schedules.map(item => {
327 329
           if(item.patient_id == this.patient_id){
328 330
             arr.push(item.patient_id)
331
+            console.log('item',item)
332
+            this.mode_id = item.mode_id
329 333
           }
330 334
         })
331 335
         if(arr.length > 0){
@@ -362,6 +366,7 @@ export default {
362 366
                   schedules.map(item => {
363 367
                     if(item.patient_id == this.patient_id){
364 368
                       arr.push(item.patient_id)
369
+                      this.mode_id = item.mode_id
365 370
                     }
366 371
                   })
367 372
                   if(arr.length > 0){

+ 2 - 2
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue Dosyayı Görüntüle

@@ -411,7 +411,7 @@
411 411
           scope.row.prescribing_number = 1
412 412
         }
413 413
         if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
414
-          scope.row.retail_price = scope.row.drug.min_price * scope.row.prescribing_number
414
+          // scope.row.retail_price = scope.row.drug.min_price * scope.row.prescribing_number
415 415
           if(scope.row.prescribing_number > scope.row.drug.total){
416 416
             this.$message.error(scope.row.drug_name + '库存不足')
417 417
           }
@@ -419,7 +419,7 @@
419 419
           if((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total){
420 420
             this.$message.error(scope.row.drug_name + '库存不足')
421 421
           }
422
-          scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
422
+          // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
423 423
         }
424 424
         
425 425
       },

+ 68 - 11
src/xt_pages/outpatientDoctorStation/components/prescriptionTemplateTable.vue Dosyayı Görüntüle

@@ -7,11 +7,15 @@
7 7
                 <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span></template>
8 8
             </el-table-column>
9 9
 
10
-            <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
10
+            <el-table-column align="center" prop="single_dose" width="120" label="单次用量">
11 11
                 <template slot-scope="scope">
12 12
                     <div style="display:flex;align-items:center;">
13
-                        <el-input v-model="scope.row.single_dose" @input="getSingleDose(scope)" style="width:65%;"></el-input>
14
-                        <div>{{scope.row.single_dose_unit}}</div>
13
+                        <el-input v-model="scope.row.single_dose" @input="getSingleDose(scope)" style="width:50%;"></el-input>
14
+                        <!-- <div>{{scope.row.single_dose_unit}}</div> -->
15
+                        <el-select v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;" @change="getAllChange(scope)">
16
+                          <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
17
+                          <el-option :label="scope.row.drug.dose_unit" :value="scope.row.drug.dose_unit"></el-option>
18
+                        </el-select>
15 19
                     </div>
16 20
                 </template>
17 21
             </el-table-column>
@@ -29,7 +33,7 @@
29 33
             </el-table-column>
30 34
             <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
31 35
                 <template slot-scope="scope">
32
-                    <el-select v-model="scope.row.execution_frequency" placehold er="请选择">
36
+                    <el-select v-model="scope.row.execution_frequency" placehold er="请选择" @change="getAllChange(scope)">
33 37
                         <el-option
34 38
                                 v-for="item,index in efs"
35 39
                                 :key="index"
@@ -44,16 +48,20 @@
44 48
             <el-table-column align="center" prop="day" width="70" label="天数">
45 49
                 <template slot-scope="scope">
46 50
                     <div style="display:flex;align-items:center;">
47
-                        <el-input v-model="scope.row.day" @input="getDay(scope)" placeholder=""></el-input>{{'天'}}
51
+                        <el-input v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>{{'天'}}
48 52
                     </div>
49 53
                 </template>
50 54
             </el-table-column>
51 55
 
52
-            <el-table-column align="center" prop="prescribing_number" width="80" label="总量">
56
+            <el-table-column align="center" prop="prescribing_number" width="120" label="总量">
53 57
                 <template slot-scope="scope">
54 58
                     <div style="display:flex;align-items:center;">
55
-                        <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder=""></el-input>
56
-                        <div> {{scope.row.prescribing_number_unit}}</div>
59
+                        <el-input v-model="scope.row.prescribing_number" style="width:50%" @input="changePrescribingNumber(scope)" placeholder=""></el-input>
60
+                        <!-- <div> {{scope.row.prescribing_number_unit}}</div> -->
61
+                        <el-select v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;" @change="getAllChange(scope)">
62
+                          <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
63
+                          <el-option :label="scope.row.drug.max_unit" :value="scope.row.drug.max_unit"></el-option>
64
+                        </el-select>
57 65
                     </div>
58 66
                 </template>
59 67
             </el-table-column>
@@ -89,8 +97,10 @@
89 97
             </el-table-column>
90 98
             <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
91 99
                 <template slot-scope="scope">
100
+                  <div style="display:flex;align-items:center;">
92 101
                     <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)" placeholder=""></el-input>
93 102
                     <div>{{scope.row.unit}}</div>
103
+                  </div>
94 104
 
95 105
                 </template>
96 106
             </el-table-column>
@@ -127,10 +137,12 @@
127 137
                     </div>
128 138
                 </template>
129 139
             </el-table-column>
130
-            <el-table-column align="center" prop="name" width="50" label="单价">
140
+            <el-table-column align="center" prop="name" width="70" label="单价">
131 141
                 <template slot-scope="scope">
132
-                    <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
133
-                    <div>{{'元'}}</div>
142
+                    <div style="display:flex;align-items:center;">
143
+                      <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
144
+                      <div>{{'元'}}</div>
145
+                    </div>
134 146
 
135 147
                 </template>
136 148
             </el-table-column>
@@ -375,6 +387,51 @@
375 387
           .catch(() => {});
376 388
 
377 389
       },
390
+      getAllChange(scope){
391
+        if(scope.row.drug.min_unit == scope.row.single_dose_unit){
392
+          if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
393
+            console.log(1)
394
+            scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
395
+          }else{
396
+            console.log(12)
397
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency)) * scope.row.day / scope.row.drug.min_number) 
398
+          }
399
+        }else{
400
+          if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
401
+            console.log(123)
402
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose) 
403
+          }else{
404
+            console.log(1234)
405
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose / scope.row.drug.min_number)
406
+          }
407
+        }
408
+        if(scope.row.prescribing_number == 0){
409
+          scope.row.prescribing_number = 1
410
+        }
411
+        if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
412
+          // scope.row.retail_price = scope.row.drug.min_price * scope.row.prescribing_number
413
+          if(scope.row.prescribing_number > scope.row.drug.total){
414
+            this.$message.error(scope.row.drug_name + '库存不足')
415
+          }
416
+        }else{
417
+          if((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total){
418
+            this.$message.error(scope.row.drug_name + '库存不足')
419
+          }
420
+          // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
421
+        }
422
+        
423
+      },
424
+      changePrescribingNumber(scope){
425
+        if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
426
+          if(parseInt(scope.row.prescribing_number) > scope.row.drug.total){
427
+            this.$message.error(scope.row.drug_name + '库存不足')
428
+          }
429
+        }else{
430
+          if((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total){
431
+            this.$message.error(scope.row.drug_name + '库存不足')
432
+          }
433
+        }
434
+      },
378 435
       getSingleDose(scope){
379 436
         this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
380 437
       },

+ 4 - 2
src/xt_pages/outpatientDoctorStation/prescriptionTemplate.vue Dosyayı Görüntüle

@@ -94,7 +94,8 @@
94 94
         page: 1,
95 95
         limit: 10,
96 96
         patient_id: 0,
97
-        total:0
97
+        total:0,
98
+        patient_name:''
98 99
       }
99 100
     },
100 101
     methods: {
@@ -132,7 +133,7 @@
132 133
         })
133 134
       },
134 135
       jumpDetail(row) {
135
-        this.$router.push('/outpatientDoctorStation/prescriptionTemplatedetail?id=' + row.id + '&patient_id=' + this.patient_id)
136
+        this.$router.push('/outpatientDoctorStation/prescriptionTemplatedetail?id=' + row.id + '&patient_id=' + this.patient_id + '&patient_name=' + this.patient_name)
136 137
       },
137 138
       getMode(id) {
138 139
         let name = ''
@@ -170,6 +171,7 @@
170 171
         this.page = 1
171 172
         this.limit = 10
172 173
         this.patient_id = val.id
174
+        this.patient_name = val.name
173 175
         let params = {
174 176
           patient_id: val.id,
175 177
           page: this.page,

+ 8 - 8
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue Dosyayı Görüntüle

@@ -1,13 +1,13 @@
1 1
 <template>
2 2
     <div class="main-contain new-main-contain">
3 3
 
4
-        <div style="height: calc(100% - 58px);display: flex;flex-direction: column;margin-top: 56px;">
5
-            <div class="position">
6
-                <bread-crumb :crumbs='crumbs'></bread-crumb>
7
-                <el-button type="primary" @click="save">保存</el-button>
8
-
4
+        <div style="height: calc(100% - 0px);display: flex;flex-direction: column;">
5
+            <div style="display:flex;justify-content: space-between;align-items:center;margin-bottom:10px;padding:0 10px;color:#606266;">
6
+              <div>姓名:{{ $route.query.patient_name }}</div>
7
+              <el-button size="small" @click="save" type="primary">保存</el-button>
9 8
             </div>
10
-            <div class="mainCenter" v-loading="loading">
9
+
10
+            <div class="mainCenter" style="padding:0 10px;" v-loading="loading">
11 11
                 <div class="centerLeft">
12 12
                     <el-form :model="tempForm" ref="tempForm" label-width="80px"
13 13
                              style="display: flex;flex-wrap: wrap;justify-content: space-between;">
@@ -1322,8 +1322,8 @@
1322 1322
                   prescribing_number: temp[b].prescribing_number,
1323 1323
                   single_dose_unit: temp[b].min_unit,
1324 1324
                   prescribing_number_unit: temp[b].max_unit,
1325
-                  medical_insurance_number: temp[b].medical_insurance_number
1326
-
1325
+                  medical_insurance_number: temp[b].medical_insurance_number,
1326
+                  drug: temp[b]
1327 1327
                 }
1328 1328
 
1329 1329
                 if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {

+ 2 - 2
src/xt_pages/outpatientDoctorStation/template/printThree.vue Dosyayı Görüntüle

@@ -3,7 +3,7 @@
3 3
   <div id='prescriptionPrint'>
4 4
     <div v-for="(item,index) in advicePrint" :key="index">
5 5
       <div id='prescription-print'  v-for='(i,pageIndex) in item.pageArr.length' :key="pageIndex" class="prescription-print" style="page-break-after: always;">
6
-          <img src="../../../assets/img/bailinTop.jpg" alt="">
6
+          <img src="../../../assets/img/bailinTop.jpg" style="width:100%" alt="">
7 7
           <div class="printTitle">处方笺</div>
8 8
           <div style="display:flex;">
9 9
             <div style="width:33%;display:flex;">费别:<span class="under_line"></span></div>
@@ -66,7 +66,7 @@
66 66
           </div>
67 67
           <div>*处方当日有效,特殊情况可适当延长,一般不超过3天</div>
68 68
           <div>*药品属于特殊商品,非质量问题不允许退换</div>
69
-          <img src="../../../assets/img/bailinBottom.jpg" alt="">
69
+          <img src="../../../assets/img/bailinBottom.jpg" style="width:100%" alt="">
70 70
           <!-- <div class="doctorBox">
71 71
               <p>医师:{{item.doctor?item.doctor:""}}</p>
72 72
               <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>

+ 2 - 2
src/xt_pages/outpatientDoctorStation/treatTemplate/printTwo.vue Dosyayı Görüntüle

@@ -2,7 +2,7 @@
2 2
    <div id='prescriptionPrint'>
3 3
     <div id='prescription-print' class="prescription-print" v-for="(item,index) in advicePrint" :key="index">
4 4
 
5
-        <img src="../../../assets/img/bailinTop.jpg" alt="">
5
+        <img src="../../../assets/img/bailinTop.jpg" style="width:100%" alt="">
6 6
         <div class="printTitle">治疗单</div>
7 7
         <div style="display:flex;">
8 8
             <div style="width:33%;display:flex;">费别:<span class="under_line">深圳医保1档</span></div>
@@ -89,7 +89,7 @@
89 89
           <div style="display:flex;">
90 90
             打印时间:<span style="border-bottom:1px solid #000;">{{getTime(new Date())?getTime(new Date()):""}}</span>
91 91
           </div>
92
-          <img src="../../../assets/img/bailinBottom.jpg" alt="">
92
+          <img src="../../../assets/img/bailinBottom.jpg" style="width:100%" alt="">
93 93
           <div style="page-break-after:always"></div>
94 94
      </div>
95 95
 

+ 8 - 8
src/xt_pages/stock/Dialog/goodInfoDailog.vue Dosyayı Görüntüle

@@ -15,12 +15,12 @@
15 15
             <el-form-item label="耗材名称 : " prop="good_name" style="width:100%">
16 16
               <el-input v-model="form.good_name" placeholder="" maxlength="30"></el-input>
17 17
             </el-form-item>
18
-            <el-form-item label="拼音 : " prop="pinyin" style="width:50%">
18
+            <!-- <el-form-item label="拼音 : " prop="pinyin" style="width:50%">
19 19
               <el-input v-model="form.pinyin" placeholder="" maxlength="30"></el-input>
20 20
             </el-form-item>
21 21
             <el-form-item label="五笔 : " prop="wubi" style="width:50%">
22 22
               <el-input v-model="form.wubi" placeholder="" maxlength="30"></el-input>
23
-            </el-form-item>
23
+            </el-form-item> -->
24 24
             <el-form-item label="耗材种类 : " prop="good_kind">
25 25
               <el-select v-model="form.good_kind" style="width:160px;" placeholder="请选择">
26 26
                 <el-option
@@ -53,17 +53,17 @@
53 53
             </el-form-item>
54 54
            
55 55
            <div style="width:100%;">
56
-              <div><span style="color:red;">*</span>单位&规格: <span style="color:#999">例如:0.75 g * 60 粒 / 盒</span></div>
56
+              <div><span style="color:red;">*</span>单位&规格: <span style="color:#999">例如:FX80 * 60盒</span></div>
57 57
           </div>
58 58
           <div style="width:100%;display:flex;align-items:center;">
59 59
                <el-form-item label="规格型号 : " prop="specification_name" style="width:200px">
60 60
                  <el-input v-model="form.specification_name" placeholder="" maxlength="30"></el-input>
61 61
                </el-form-item>
62
-          
62
+                *
63 63
                 <el-form-item prop="min_number" class="noMargin">
64 64
                   <el-input v-model="form.min_number" :disabled="showMinNumber" style="width:100px" type="number" placeholder="拆零"> </el-input>
65 65
                 </el-form-item>
66
-                <el-form-item prop="min_unit" class="noMargin">
66
+                <!-- <el-form-item prop="min_unit" class="noMargin">
67 67
                   <el-select v-model="form.min_unit" style="width:160px;"  placeholder="拆零单位"  @change="changeMinUnit">
68 68
                     <el-option
69 69
                       v-for="(item,index) in getDataConfig('hemodialysis','units')"
@@ -72,8 +72,8 @@
72 72
                       :value="item.name">
73 73
                     </el-option>
74 74
                   </el-select>
75
-              </el-form-item>
76
-              /
75
+              </el-form-item> -->
76
+            
77 77
               <el-form-item prop="packing_unit" class="noMargin">
78 78
                 <el-select v-model="form.packing_unit" style="width:160px;" placeholder="包装单位" @change="changePackingUnit">
79 79
                   <el-option
@@ -511,7 +511,7 @@
511 511
               packing_unit:"",
512 512
               packing_price:'',
513 513
               default_count_unit:"",
514
-            
514
+              min_unit:"",
515 515
             }
516 516
           this.good_status = []
517 517
           for (let key in tempform) {

+ 8 - 6
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue Dosyayı Görüntüle

@@ -28,7 +28,7 @@
28 28
                         style="width: 196px;" type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
29 29
                         value-format="yyyy-MM-dd"></el-date-picker>
30 30
          <div class="titleOne">制单人:{{this.$store.getters.xt_user.user.user_name}}</div>
31
-         <div class="titleOne">当前进货价合计:</div>
31
+         <!-- <div class="titleOne">当前进货价合计:</div> -->
32 32
       </div>
33 33
      
34 34
       <!-- <div class="cell clearfix">
@@ -80,7 +80,7 @@
80 80
                     v-model="scope.row.drug_name"
81 81
                     :fetch-suggestions="querySearchAsync"
82 82
                     :trigger-on-focus="false"
83
-                    placeholder="请输入病人名字"
83
+                    placeholder="请输入药品名称"
84 84
                     @select="handleSelect"
85 85
                     @input="changeDrugName(scope.$index)"
86 86
                     style="width:160px;"
@@ -528,7 +528,7 @@
528 528
         let name = ""
529 529
         for(let i=0;i<this.recordInfo.recordData.length;i++){
530 530
            if(drug_id == this.recordInfo.recordData[i].id){
531
-              name = this.recordInfo.recordData[i].dosage + this.recordInfo.recordData[i].max_unit + "*" + this.recordInfo.recordData[i].min_number + this.recordInfo.recordData[i].min_unit + "/"+this.recordInfo.recordData[i].packing_unit
531
+              name = this.recordInfo.recordData[i].dose + this.recordInfo.recordData[i].dose_unit + "*" + this.recordInfo.recordData[i].min_number + this.recordInfo.recordData[i].min_unit + "/"+this.recordInfo.recordData[i].max_unit
532 532
            }
533 533
         }
534 534
         return name
@@ -549,6 +549,8 @@
549 549
         tempObj['min_unit'] = ''
550 550
         tempObj["drug_type"] = ''
551 551
         tempObj['batch_number'] = ''
552
+        tempObj['dose']= ''
553
+        tempObj['dose_unit']=''
552 554
         this.recordInfo.recordData.push(tempObj)
553 555
       }, handleDelete: function(index, row) {
554 556
         if (this.recordInfo.recordData.length <= 1) {
@@ -594,7 +596,7 @@
594 596
 
595 597
             } else {
596 598
               loading.close()
597
-               console.log("3333333",response.data.data.drugs)
599
+             
598 600
               if (response.data.data.drugs.length <= 0) {
599 601
                 this.$message.error('该厂商或经销商没有药品信息')
600 602
                 return
@@ -681,6 +683,7 @@
681 683
               'stockIn': this.recordInfo.recordData
682 684
             }
683 685
             console.log("params2222222",params)
686
+            
684 687
             postDrugWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
685 688
               if (response.data.state == 0) {
686 689
                 this.$message.error(response.data.msg)
@@ -732,7 +735,6 @@
732 735
       },
733 736
 
734 737
       changeDrugName(val){
735
-        console.log("val22222",val)
736 738
         this.showOne = false
737 739
         this.showTwo = true
738 740
       },
@@ -781,6 +783,7 @@
781 783
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
782 784
              this.recordInfo.recordData[i].batch_number = val.number
783 785
              this.recordInfo.recordData[i].max_unit = val.max_unit
786
+             this.recordInfo.recordData[i].min_unit = val.min_unit
784 787
            }
785 788
         }
786 789
         console.log("333333",this.recordInfo.recordData)
@@ -808,7 +811,6 @@
808 811
       tempObj['dosage'] = ''
809 812
       tempObj['max_unit'] = ''
810 813
       tempObj['min_unit'] = '',
811
-      tempObj['packing_unit'] = '',
812 814
       tempObj['lot_number'] = ''
813 815
       tempObj['product_date'] = ''
814 816
       tempObj['expiry_date'] = ''

+ 4 - 2
src/xt_pages/stock/drugs/drugStockInOrderEdit.vue Dosyayı Görüntüle

@@ -121,7 +121,7 @@
121 121
                     v-model="scope.row.drug_name"
122 122
                     :fetch-suggestions="querySearchAsync"
123 123
                     :trigger-on-focus="false"
124
-                    placeholder="请输入病人名字"
124
+                    placeholder="请输入药品名称"
125 125
                     @select="handleSelect"
126 126
                     @input="changeDrugName(scope.$index)"
127 127
                     style="width:160px;"
@@ -636,7 +636,7 @@ export default {
636 636
             stockIn: this.recordInfo.recordData
637 637
           };
638 638
           console.log("params22222222222",params)
639
-         
639
+        
640 640
           EditDrugWarehouse(
641 641
             params,
642 642
             this.warehousing_time,
@@ -765,6 +765,7 @@ export default {
765 765
       handleSelect(val){
766 766
         for(let i=0;i<this.recordInfo.recordData.length;i++){
767 767
            if(i == this.currentIndex){
768
+             this.recordInfo.recordData[i].drug_id = val.id
768 769
              this.recordInfo.recordData[i].lot_number = ""
769 770
              this.recordInfo.recordData[i].drug_name = val.drug_name
770 771
              this.recordInfo.recordData[i].drug_type = val.drug_type
@@ -773,6 +774,7 @@ export default {
773 774
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
774 775
              this.recordInfo.recordData[i].batch_number = val.number
775 776
              this.recordInfo.recordData[i].max_unit = val.max_unit
777
+             this.recordInfo.recordData[i].min_unit = val.min_unit
776 778
            }
777 779
         }
778 780
       },

+ 1 - 1
src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue Dosyayı Görüntüle

@@ -117,7 +117,7 @@
117 117
                     v-model="scope.row.drug_name"
118 118
                     :fetch-suggestions="querySearchAsync"
119 119
                     :trigger-on-focus="false"
120
-                    placeholder="请输入病人名字"
120
+                    placeholder="请输入药品名称"
121 121
                     @select="handleSelect"
122 122
                     style="width:160px;"
123 123
                   >

+ 1 - 1
src/xt_pages/stock/stockInOrderAdd.vue Dosyayı Görüntüle

@@ -69,7 +69,7 @@
69 69
                     v-model="scope.row.good_name"
70 70
                     :fetch-suggestions="querySearchAsync"
71 71
                     :trigger-on-focus="false"
72
-                    placeholder="请输入病人名字"
72
+                    placeholder="请输入耗材名称"
73 73
                     @select="handleSelect"
74 74
                     @input="changeGoodName(scope.$index)"
75 75
                     style="width:160px;"

+ 6 - 21
src/xt_pages/stock/stockOutOrder.vue Dosyayı Görüntüle

@@ -552,22 +552,6 @@ export default {
552 552
     nowMonth = nowDate.getMonth() + 1;
553 553
     nowDay = nowDate.getDate();
554 554
 
555
-
556
-      
557
-    // var date1 = new Date();
558
-    // var date2 = new Date(date1);
559
-
560
-    // //-30为30天前,+30可以获得30天后的日期
561
-    // date2.setDate(date1.getDate() - 30);
562
-
563
-    // //30天前(月份判断是否小于10,小于10的前面+0)
564
-    // var agoDay = `${date2.getFullYear()}-${date2.getMonth() + 1<10?`0${date2.getMonth() + 1}`:date2.getMonth() + 1}-${date2.getDate()}`;
565
-      
566
-    // //当前日期
567
-    // var nowDay = `${date1.getFullYear()}-${date1.getMonth() + 1<10?`0${date1.getMonth() + 1}`:date1.getMonth() + 1}-${date1.getDate()}`;
568
-
569
-    //  this.start_time = agoDay
570
-    //  console.log("333333332222",this.start_time)
571 555
     this.start_time =
572 556
       nowYear +
573 557
       "-" +
@@ -815,11 +799,12 @@ export default {
815 799
       }
816 800
     },
817 801
     handleEdit: function(index, row) {
818
-      
819
-      this.$router.push({
820
-        name: "stockOutDetail",
821
-        query: { id: row.id, type: this.type,warehouse_out_time:row.warehouse_out_time }
822
-      });
802
+      // this.$router.push({
803
+      //   name: "stockOutDetail",
804
+      //   query: { id: row.id, type: this.type,warehouse_out_time:row.warehouse_out_time }
805
+      // });
806
+      this.$router.push({path:'/stock/stockoutorderedit?id='+row.id})
807
+       
823 808
     },
824 809
     handleDelete: function(index, row) {
825 810
       const ids = [];

+ 3 - 4
src/xt_pages/stock/stockOutOrderAdd.vue Dosyayı Görüntüle

@@ -114,7 +114,7 @@
114 114
                     v-model="scope.row.good_name"
115 115
                     :fetch-suggestions="querySearchAsync"
116 116
                     :trigger-on-focus="false"
117
-                    placeholder="请输入病人名字"
117
+                    placeholder="请输入耗材名称"
118 118
                     @select="handleSelect"
119 119
                     @input="changeGoodName(scope.$index)"
120 120
                     style="width:150px;"
@@ -140,7 +140,6 @@
140 140
                   placeholder="请输入商品类型"
141 141
                   v-model="scope.row.good_type_id"
142 142
                   :value="typeName(scope.row.good_type_id)"
143
-                  @focus="showDialog(scope.$index, scope.row)"
144 143
                 ></el-input>
145 144
               </el-form-item>
146 145
             </template>
@@ -654,9 +653,9 @@ export default {
654 653
             this.recordInfo.recordData[i].price = val.buy_price
655 654
             this.recordInfo.recordData[i].specification_name = val.specification_name
656 655
             this.recordInfo.recordData[i].good_id = val.id
657
-          }
658
-        }
656
+         }
659 657
       }
658
+    }
660 659
   },
661 660
   created() {
662 661
     var nowDate = new Date();

+ 101 - 16
src/xt_pages/stock/stockOutOrderEdit.vue Dosyayı Görüntüle

@@ -13,13 +13,7 @@
13 13
 
14 14
     <div class="app-container">
15 15
 
16
-      <!--<stock-in-dialog-->
17
-        <!--ref="dialog"-->
18
-        <!--:propForm="propForm"-->
19
-        <!--:visibility="isVisibility"-->
20
-        <!--v-on:dialog-comfirm="comfirm"-->
21
-        <!--v-on:dialog-cancle="cancle"-->
22
-      <!--&gt;</stock-in-dialog>-->
16
+  
23 17
       <stock-in-dialog
24 18
         ref="dialog"
25 19
         :propForm="propForm"
@@ -69,22 +63,61 @@
69 63
                   max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
70 64
         >
71 65
 
72
-          <el-table-column min-width="35" align="center">
73
-
66
+       
67
+          <el-table-column width="150" align="center">
68
+              <template slot="header" slot-scope="scope">
69
+                <span>耗材名称</span>
70
+              </template>
71
+
72
+              <template slot-scope="scope">
73
+                <el-form-item style="padding-top: 15px">
74
+                  <el-autocomplete
75
+                      class="checkSearch"
76
+                      popper-class="my-autocomplete"
77
+                      v-model="scope.row.good_name"
78
+                      :fetch-suggestions="querySearchAsync"
79
+                      :trigger-on-focus="false"
80
+                      placeholder="请输入病人名字"
81
+                      @select="handleSelect"
82
+                      @input="changeGoodName(scope.$index)"
83
+                      style="width:150px;"
84
+                    >
85
+                      <i class="el-icon-search el-input__icon" slot="suffix"></i>
86
+                    <template slot-scope="{ item }">
87
+                      <div class="name">{{ item.good_name }}</div>
88
+                    </template>
89
+                  </el-autocomplete>
90
+                </el-form-item>
91
+              </template>
92
+            </el-table-column>
93
+           <el-table-column width="150" align="center">
74 94
             <template slot="header" slot-scope="scope">
75 95
               <span>耗材类型<span style="color: red">*</span></span>
76 96
             </template>
77 97
 
78 98
             <template slot-scope="scope">
79 99
               <el-form-item style="padding-top: 15px">
80
-                <el-input placeholder="请输入商品类型" v-model="scope.row.good_type_id"
81
-                          :value="typeName(scope.row.good_type_id)"
82
-                          @focus="showDialog(scope.$index, scope.row)"></el-input>
100
+                <el-input
101
+                  placeholder="请输入商品类型"
102
+                  v-model="scope.row.good_type_id"
103
+                  :value="typeName(scope.row.good_type_id)"
104
+                ></el-input>
83 105
               </el-form-item>
84 106
             </template>
85 107
           </el-table-column>
86 108
           
87
-          <el-table-column min-width="35" align="center">
109
+             
110
+          <el-table-column width="150" align="center">
111
+            <template slot="header" slot-scope="scope">
112
+              <span>规格&&单位<span style="color: red">*</span></span>
113
+            </template>
114
+            <template slot-scope="scope">
115
+              <el-form-item style="padding-top: 15px">
116
+                <el-input v-model="scope.row.name"></el-input>
117
+              </el-form-item>
118
+            </template>
119
+          </el-table-column>
120
+          <!-- <el-table-column min-width="35" align="center">
88 121
             <template slot="header" slot-scope="scope">
89 122
               <span>规格名称<span style="color: red">*</span></span>
90 123
             </template>
@@ -97,7 +130,7 @@
97 130
               </el-form-item>
98 131
 
99 132
             </template>
100
-          </el-table-column>
133
+          </el-table-column> -->
101 134
 
102 135
 
103 136
           <el-table-column min-width="23" align="center">
@@ -171,13 +204,13 @@
171 204
 <script>
172 205
   import { uParseTime } from '@/utils/tools'
173 206
 
174
-  import { deleteWarehouseOutInfo, editWarehouseoutInfo, getSalesReturnConfig, getWarehouseOutInfo,GetAllConfig,GetAllGoodInfoByID } from '@/api/stock'
207
+  import { deleteWarehouseOutInfo, editWarehouseoutInfo, getSalesReturnConfig, getWarehouseOutInfo,GetAllConfig,GetAllGoodInfoByID,postSearchGoodList } from '@/api/stock'
175 208
   import BreadCrumb from '../components/bread-crumb'
176 209
   import StockInDialog from './Dialog/stockInDialog'
177 210
 
178 211
   export default {
179 212
     components: { StockInDialog, BreadCrumb},
180
-    name: 'salesReturnEdit',
213
+    name: 'stockOutOrderEdit',
181 214
 
182 215
     data() {
183 216
       return {
@@ -443,6 +476,8 @@
443 476
             const params = {
444 477
               'stockOut': this.recordInfo.recordData
445 478
             }
479
+            console.log("9999999",stockOut)
480
+            return
446 481
             editWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
447 482
               if (response.data.state == 0) {
448 483
                 this.$message.error(response.data.msg)
@@ -465,9 +500,12 @@
465 500
             this.$message.error(response.data.msg)
466 501
             return false
467 502
           } else {
503
+            console.log("详情",response.data.data.list)
468 504
             for (let i = 0; i < response.data.data.list.length; i++) {
469 505
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
470 506
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
507
+              response.data.data.list[i].good_name = response.data.data.list[i].GoodInfo.good_name
508
+              response.data.data.list[i].name = response.data.data.list[i].GoodInfo.good_name + "*" + response.data.data.list[i].GoodInfo.specification_name
471 509
               this.recordInfo.recordData.push(response.data.data.list[i])
472 510
             }
473 511
             this.warehouseOut = response.data.data.info
@@ -497,7 +535,54 @@
497 535
         this.propForm.manufacturer = val
498 536
       }, changeDealer(val) {
499 537
         this.propForm.dealer = val
538
+      },
539
+       querySearchAsync(keyword, cb) {
540
+      let key = '';
541
+      if (keyword != undefined) {
542
+        key = keyword
500 543
       }
544
+      console.log("keyrowrd",key)
545
+      postSearchGoodList(key).then(response => {
546
+        if (response.data.state == 1) {
547
+          
548
+            var list = response.data.data.list
549
+            this.goodList = list
550
+            var manufacturerList = response.data.data.manufacturerList
551
+            this.manufacturerList = manufacturerList
552
+            for(let i=0;i<this.goodList.length;i++){
553
+              for(let j=0;j<this.manufacturerList.length;j++){
554
+                if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
555
+                    this.goodList[i].manufacturer = this.manufacturerList[j].manufacturer_name
556
+                }
557
+              }
558
+            }
559
+          
560
+            cb(this.goodList)
561
+        } else {
562
+          cb([])
563
+        }
564
+      })
565
+    },
566
+    changeGoodName(val){
567
+      this.currentIndex = val
568
+    },
569
+    handleSelect(val){
570
+      console.log("val",val)
571
+        for(let i=0;i<this.recordInfo.recordData.length;i++){
572
+          if(this.currentIndex == i){
573
+            this.recordInfo.recordData[i].good_type_id = val.id
574
+            this.recordInfo.recordData[i].good_name = val.good_name
575
+            this.recordInfo.recordData[i].good_type_id = val.good_type_id
576
+            this.recordInfo.recordData[i].name = val.specification_name + "*" + val.min_number+val.min_unit +"/"+val.packing_unit
577
+            // this.recordInfo.recordData[i].number =  val.number
578
+            this.recordInfo.recordData[i].manufacturer = val.manufacturer
579
+            this.recordInfo.recordData[i].remark = val.remark
580
+            this.recordInfo.recordData[i].price = val.buy_price
581
+            this.recordInfo.recordData[i].specification_name = val.specification_name
582
+            this.recordInfo.recordData[i].good_id = val.id
583
+         }
584
+      }
585
+    }
501 586
     },
502 587
     created() {
503 588
       this.GetConfigInfo()