浏览代码

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

csx 3 年前
父节点
当前提交
6841aefeca
共有 43 个文件被更改,包括 1489 次插入1016 次删除
  1. 24 0
      src/api/drug/drug_stock.js
  2. 51 66
      src/api/patient.js
  3. 16 0
      src/api/stock.js
  4. 9 0
      src/router/modules/drugs.js
  5. 34 34
      src/router/modules/selfPreparedMedicine.js
  6. 11 0
      src/xt_pages/data/components/addDrugs.vue
  7. 1 1
      src/xt_pages/data/components/addInspection.vue
  8. 4 4
      src/xt_pages/data/components/consumables.vue
  9. 8 6
      src/xt_pages/data/components/drugs.vue
  10. 1 1
      src/xt_pages/data/components/inspection.vue
  11. 0 1
      src/xt_pages/data/components/project.vue
  12. 1 27
      src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue
  13. 7 2
      src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue
  14. 5 1
      src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue
  15. 19 5
      src/xt_pages/dialysis/template/DialysisPrintOrderThirtyEight.vue
  16. 1 1
      src/xt_pages/dialysis/template/DialysisPrintOrderThirtyFive.vue
  17. 15 5
      src/xt_pages/outpatientCharges/invoiceTemplate/printTwo.vue
  18. 6 2
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue
  19. 35 11
      src/xt_pages/outpatientDoctorStation/doctorDesk.vue
  20. 1 1
      src/xt_pages/outpatientDoctorStation/prescriptionTemplate.vue
  21. 2 2
      src/xt_pages/outpatientDoctorStation/template/printThree.vue
  22. 5 5
      src/xt_pages/outpatientDoctorStation/treatTemplate/printTwo.vue
  23. 6 25
      src/xt_pages/stock/Dialog/goodInfoDailog.vue
  24. 8 8
      src/xt_pages/stock/Dialog/goodTypeDialog.vue
  25. 102 28
      src/xt_pages/stock/drugs/drugStockFlow.vue
  26. 97 106
      src/xt_pages/stock/drugs/drugStockInOrder.vue
  27. 5 2
      src/xt_pages/stock/drugs/drugStockInOrderAdd.vue
  28. 1 1
      src/xt_pages/stock/drugs/drugStockInOrderDetailPrint.vue
  29. 1 1
      src/xt_pages/stock/drugs/drugStockInOrderEdit.vue
  30. 213 109
      src/xt_pages/stock/drugs/drugStockOutOrder.vue
  31. 23 58
      src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue
  32. 211 52
      src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue
  33. 68 11
      src/xt_pages/stock/drugs/query.vue
  34. 31 35
      src/xt_pages/stock/stockBatchNumber.vue
  35. 78 41
      src/xt_pages/stock/stockFlow.vue
  36. 33 64
      src/xt_pages/stock/stockInOrder.vue
  37. 51 8
      src/xt_pages/stock/stockInOrderAdd.vue
  38. 63 26
      src/xt_pages/stock/stockInOrderEdit.vue
  39. 171 142
      src/xt_pages/stock/stockOutOrder.vue
  40. 19 10
      src/xt_pages/stock/stockOutOrderAdd.vue
  41. 39 20
      src/xt_pages/stock/stockOutOrderEdit.vue
  42. 12 94
      src/xt_pages/stock/stockQuery.vue
  43. 1 0
      src/xt_pages/user/courseOfDisease.vue

+ 24 - 0
src/api/drug/drug_stock.js 查看文件

@@ -469,3 +469,27 @@ export function getStockOutList(params) {
469 469
     params: params
470 470
   })
471 471
 }
472
+
473
+export function getDrugCountList(params) {
474
+  return request({
475
+    url: '/api/drug/getdrugcountlist',
476
+    method: 'get',
477
+    params: params
478
+  })
479
+}
480
+
481
+export function getSinleOrderDetail(params) {
482
+  return request({
483
+    url: '/api/drug/getsingleorderdetail',
484
+    method: 'get',
485
+    params: params
486
+  })
487
+}
488
+
489
+export function getAutoDrugDetail(params) {
490
+  return request({
491
+    url: '/api/drug/getautodrugdetial',
492
+    method: 'Get',
493
+    params: params
494
+  })
495
+}

+ 51 - 66
src/api/patient.js 查看文件

@@ -70,7 +70,6 @@ export function createPatientDialysisSolution(id, solution, mode) {
70 70
 }
71 71
 
72 72
 export function editPatientDialysisSolution(patient, id, solution, mode) {
73
-  
74 73
   return request({
75 74
     url: '/api/patients/dialysissolution/edit?patient=' + patient + '&id=' + id + '&mode=' + mode,
76 75
     method: 'put',
@@ -158,18 +157,17 @@ export function getCourseOfDiseaseRecords(patient_id, start_time_ymd, end_time_y
158 157
 }
159 158
 
160 159
 export function createCourseOfDiseaseRecord(patient_id, content, record_time, title) {
161
-  
162 160
   var params = {
163 161
     patient_id: patient_id,
164 162
     content: content,
165 163
     record_time: record_time,
166 164
     title: title
167 165
   }
168
-  console.log("params222222",params)
166
+  console.log('params222222', params)
169 167
   return request({
170 168
     url: '/api/patient/course/create',
171
-    method: 'post',
172
-    data: params
169
+    method: 'get',
170
+    params: params
173 171
   })
174 172
 }
175 173
 
@@ -185,8 +183,8 @@ export function modifyCourseOfDiseaseRecord(patient_id, content, record_time, id
185 183
   }
186 184
   return request({
187 185
     url: '/api/patient/course/modify',
188
-    method: 'post',
189
-    data: params
186
+    method: 'get',
187
+    params: params
190 188
   })
191 189
 }
192 190
 
@@ -376,7 +374,6 @@ export function modifyDryWeightData(params) {
376 374
 }
377 375
 
378 376
 export function deleteDryWeight(id, data) {
379
- 
380 377
   return request({
381 378
     url: '/api/patient/deletedryweight?id=' + id,
382 379
     method: 'delete',
@@ -384,102 +381,90 @@ export function deleteDryWeight(id, data) {
384 381
   })
385 382
 }
386 383
 
387
-
388
-export function saveVasularAccess(params){
389
-   
384
+export function saveVasularAccess(params) {
390 385
   return request({
391
-    url:"/api/patient/savevasularaccess",
392
-    method:"Get",
393
-    params:params
386
+    url: '/api/patient/savevasularaccess',
387
+    method: 'Get',
388
+    params: params
394 389
   })
395
-} 
390
+}
396 391
 
397
-export function getAllVascularAccessList(params){
398
-  
392
+export function getAllVascularAccessList(params) {
399 393
   return request({
400
-    url:"/api/patient/getallvascualraccesslist",
401
-    method:"Get",
402
-    params:params
394
+    url: '/api/patient/getallvascualraccesslist',
395
+    method: 'Get',
396
+    params: params
403 397
   })
404 398
 }
405 399
 
406
-export function getVascularAccessByDetail(id,params){
407
-  
400
+export function getVascularAccessByDetail(id, params) {
408 401
   return request({
409
-    url:"/api/patient/getvascularaccessbydetial?id="+id,
410
-    method:"get",
411
-    params:params,
402
+    url: '/api/patient/getvascularaccessbydetial?id=' + id,
403
+    method: 'get',
404
+    params: params
412 405
   })
413 406
 }
414 407
 
415
-export function updatedVasularAccess(params){
416
-  
408
+export function updatedVasularAccess(params) {
417 409
   return request({
418
-    url:"/api/patient/updatevasularaccess",
419
-    method:"get",
420
-    params:params
410
+    url: '/api/patient/updatevasularaccess',
411
+    method: 'get',
412
+    params: params
421 413
   })
422 414
 }
423 415
 
424
-export function DeleteVascularAccess(id,params){
425
-  
416
+export function DeleteVascularAccess(id, params) {
426 417
   return request({
427
-    url:"/api/patient/deletevascularaccess?id="+id,
428
-    method:"get",
429
-    params:params
418
+    url: '/api/patient/deletevascularaccess?id=' + id,
419
+    method: 'get',
420
+    params: params
430 421
   })
431 422
 }
432 423
 
433
-export function savePasswayAssessment(params){
434
-  
424
+export function savePasswayAssessment(params) {
435 425
   return request({
436
-    url:"/api/patient/savepasswayassessment",
437
-    method:"get",
438
-    params:params
426
+    url: '/api/patient/savepasswayassessment',
427
+    method: 'get',
428
+    params: params
439 429
   })
440 430
 }
441 431
 
442
-export function getAllPassWayAssessmentList(params){
443
-  
432
+export function getAllPassWayAssessmentList(params) {
444 433
   return request({
445
-    url:"/api/patient/getallpasswayassessment",
446
-    method:"get",
447
-    params:params
434
+    url: '/api/patient/getallpasswayassessment',
435
+    method: 'get',
436
+    params: params
448 437
   })
449 438
 }
450 439
 
451
-export function getPassWayAssessmentById(id,params){
452
-  
440
+export function getPassWayAssessmentById(id, params) {
453 441
   return request({
454
-    url:"/api/patient/getpasswayassmentbyid?id="+id,
455
-    method:"Get",
456
-    params:params,
442
+    url: '/api/patient/getpasswayassmentbyid?id=' + id,
443
+    method: 'Get',
444
+    params: params
457 445
   })
458 446
 }
459 447
 
460
-export function updatePasswayAssessment(params){
461
-  
448
+export function updatePasswayAssessment(params) {
462 449
   return request({
463
-    url:"/api/patient/updatepasswayassesment",
464
-    method:"get",
465
-    params:params
450
+    url: '/api/patient/updatepasswayassesment',
451
+    method: 'get',
452
+    params: params
466 453
   })
467 454
 }
468 455
 
469
-export function DeletePassWayAssessMent(id,params){
470
-  
456
+export function DeletePassWayAssessMent(id, params) {
471 457
   return request({
472
-    url:"/api/patient/deletepasswayassessment?id="+id,
473
-    method:"get",
474
-    params:params
458
+    url: '/api/patient/deletepasswayassessment?id=' + id,
459
+    method: 'get',
460
+    params: params
475 461
   })
476 462
 }
477 463
 
478
-export function getAccessList(params){
479
-  
464
+export function getAccessList(params) {
480 465
   return request({
481
-    url:"/api/patient/getaccesslist",
482
-    method:"get",
483
-    params:params
466
+    url: '/api/patient/getaccesslist',
467
+    method: 'get',
468
+    params: params
484 469
   })
485
-}
470
+}

+ 16 - 0
src/api/stock.js 查看文件

@@ -633,3 +633,19 @@ export function getStockDrugCount(params) {
633 633
     params: params
634 634
   })
635 635
 }
636
+
637
+export function getOrderDetailByOrderId(params) {
638
+  return request({
639
+    url: '/api/good/getorderdetialbyorderid',
640
+    method: 'get',
641
+    params: params
642
+  })
643
+}
644
+
645
+export function getOrderDetailById(params) {
646
+  return request({
647
+    url: '/api/good/getorderdetaibyid',
648
+    method: 'Get',
649
+    params: params
650
+  })
651
+}

+ 9 - 0
src/router/modules/drugs.js 查看文件

@@ -199,6 +199,15 @@ export default {
199 199
       hidden: true,
200 200
       is_menu: false,
201 201
       meta: { title: 'stockBatchNumber' }
202
+    },
203
+    {
204
+      path: '/drug/out/drugstockoutorderedit',
205
+      component: () => import('@/xt_pages/stock/drugs/drugStockOutOrderEdit'),
206
+      name: 'drugStockOutOrderEdit',
207
+      hidden: true,
208
+      is_menu: false,
209
+      meta: { title: 'drugStockOutOrderEdit' }
210
+
202 211
     }
203 212
 
204 213
   ]

+ 34 - 34
src/router/modules/selfPreparedMedicine.js 查看文件

@@ -21,30 +21,30 @@ export default {
21 21
     },
22 22
 
23 23
     {
24
-        path: '/stock/selfPreparedMedicineIndex',
25
-        component: () => import('@/xt_pages/stock/selfPreparedMedicine/index'),
26
-        name: 'selfPreparedMedicineIndex',
27
-        meta: { title: 'selfPreparedMedicineIndex', noCache: true }
24
+      path: '/stock/selfPreparedMedicineIndex',
25
+      component: () => import('@/xt_pages/stock/selfPreparedMedicine/index'),
26
+      name: 'selfPreparedMedicineIndex',
27
+      meta: { title: 'selfPreparedMedicineIndex', noCache: true }
28 28
     },
29 29
     {
30
-        path: '/stock/selfPreparedMedicineQuery',
31
-        component: () => import('@/xt_pages/stock/selfPreparedMedicine/query'),
32
-        name: 'selfPreparedMedicineQuery',
33
-        meta: { title: 'selfPreparedMedicineQuery', noCache: true }
30
+      path: '/stock/selfPreparedMedicineQuery',
31
+      component: () => import('@/xt_pages/stock/selfPreparedMedicine/query'),
32
+      name: 'selfPreparedMedicineQuery',
33
+      meta: { title: 'selfPreparedMedicineQuery', noCache: true }
34 34
     },
35 35
     {
36
-        path: '/stock/selfPreparedMedicineQueryPrint',
37
-        component: () => import('@/xt_pages/stock/selfPreparedMedicine/queryPrint'),
38
-        name: 'selfPreparedMedicineQueryPrint',
39
-        hidden: true,
40
-        is_menu: false,
41
-        meta: { title: 'selfPreparedMedicineQueryPrint', noCache: true }
36
+      path: '/stock/selfPreparedMedicineQueryPrint',
37
+      component: () => import('@/xt_pages/stock/selfPreparedMedicine/queryPrint'),
38
+      name: 'selfPreparedMedicineQueryPrint',
39
+      hidden: true,
40
+      is_menu: false,
41
+      meta: { title: 'selfPreparedMedicineQueryPrint', noCache: true }
42 42
     },
43 43
     {
44
-        path: '/stock/selfPreparedMedicineInfo',
45
-        component: () => import('@/xt_pages/stock/selfPreparedMedicine/info'),
46
-        name: 'selfPreparedMedicineInfo',
47
-        meta: { title: 'selfPreparedMedicineInfo', noCache: true }
44
+      path: '/stock/selfPreparedMedicineInfo',
45
+      component: () => import('@/xt_pages/stock/selfPreparedMedicine/info'),
46
+      name: 'selfPreparedMedicineInfo',
47
+      meta: { title: 'selfPreparedMedicineInfo', noCache: true }
48 48
     },
49 49
     {
50 50
       path: '/stock/stockprint',
@@ -53,40 +53,40 @@ export default {
53 53
       hidden: true,
54 54
       is_menu: false,
55 55
       meta: { title: 'stockprint', noCache: true }
56
-     },
57
-     {
58
-       path:"/stock/selfstockprint",
59
-       component:()=>import('@/xt_pages/stock/selfStockPrint'),
60
-       name:'selfStockQuery',
61
-       hidden:true,
62
-       is_menu:false,
63
-       meta:{title:'selfStockPrint',noCache:true}
64
-     },
56
+    },
57
+    {
58
+      path: '/stock/selfstockprint',
59
+      component: () => import('@/xt_pages/stock/selfStockPrint'),
60
+      name: 'selfStockQuery',
61
+      hidden: true,
62
+      is_menu: false,
63
+      meta: { title: 'selfStockPrint', noCache: true }
64
+    },
65 65
 
66
-     {
66
+    {
67 67
       path: '/stock/stockprint',
68 68
       component: () => import('@/xt_pages/stock/stockPrint'),
69 69
       name: 'stockqueryprint',
70 70
       hidden: true,
71 71
       is_menu: false,
72 72
       meta: { title: 'stockprint', noCache: true }
73
-     },
73
+    },
74 74
 
75
-     {
75
+    {
76 76
       path: '/stock/in/detail/print',
77 77
       component: () => import('@/xt_pages/stock/stockInOrderDetailPrint'),
78 78
       name: 'stockInDetailPrint',
79 79
       hidden: true,
80 80
       is_menu: false,
81
-      meta: { title: 'stockInDetailPrint',noCache: true }
81
+      meta: { title: 'stockInDetailPrint', noCache: true }
82 82
     },
83 83
     {
84
-      path: '/stock/out/detail',
84
+      path: '/stock/out/detail/print',
85 85
       component: () => import('@/xt_pages/stock/stockOutOrderDetailPrint'),
86 86
       name: 'stockOutDetailPrint',
87 87
       hidden: true,
88 88
       is_menu: false,
89
-      meta: { title: 'stockOutDetailPrint',noCache: true }
90
-    },
89
+      meta: { title: 'stockOutDetailPrint', noCache: true }
90
+    }
91 91
   ]
92 92
 }

+ 11 - 0
src/xt_pages/data/components/addDrugs.vue 查看文件

@@ -757,6 +757,17 @@
757 757
           if(unitArr.indexOf(this.form.drug_dose_unit) == -1){
758 758
             this.form.drug_dose_unit = ''
759 759
           }
760
+          if(obj.dose_unit == obj.min_unit){
761
+            this.dosageShow = true
762
+          }else{
763
+            this.dosageShow = false
764
+          }
765
+
766
+          if(obj.min_unit == obj.max_unit){
767
+            this.minNumberShow = true
768
+          }else{
769
+            this.minNumberShow = false
770
+          }
760 771
 
761 772
         }
762 773
         this.getAdviceConfig()

+ 1 - 1
src/xt_pages/data/components/addInspection.vue 查看文件

@@ -313,7 +313,7 @@
313 313
             this.projectList[i].number =  this.projectList[i].number.toString()
314 314
             this.tableData.push(this.projectList[i])
315 315
             this.form.project_detail = ""
316
-            this.form.number = ""
316
+            this.form.number = 1
317 317
           }
318 318
         }
319 319
         // console.log("33333",this.tableData)

+ 4 - 4
src/xt_pages/data/components/consumables.vue 查看文件

@@ -105,7 +105,7 @@
105 105
           {{ getGoodUnit(scope.row.good_unit) }}
106 106
         </template>
107 107
       </el-table-column> -->
108
-      <el-table-column label="零售价" width="60" align="center">
108
+      <el-table-column label="零售价" width="100" align="center">
109 109
         <template slot-scope="scope">
110 110
           {{ scope.row.retail_price }}
111 111
         </template>
@@ -124,18 +124,18 @@
124 124
 
125 125
       </el-table-column>
126 126
 
127
-      <el-table-column prop="date" label="操作" width="300" align="center">
127
+      <el-table-column prop="date" label="操作" width="320" align="center">
128 128
         <template slot-scope="scope">
129 129
           <el-button @click="handleGoodInfoEdit(scope.$index, scope.row)" type="primary" size="small">编辑</el-button>
130 130
           <!--<el-button type="primary" size="small" @click="clickSelfPayment(scope.row.id)">自付比例</el-button>-->
131 131
           <el-button type="danger" size="small" @click="handleGoodInfoDelete(scope.$index, scope.row)">删除</el-button>
132 132
 
133
-          <el-button type="primary" size="small" icon="el-icon-refresh-left" @click="toReturn(scope.row.id,scope.row.is_mark)" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 10138">
133
+          <el-button type="primary" size="small" @click="toReturn(scope.row.id,scope.row.is_mark)" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 10138">
134 134
              <span v-if="scope.row.is_mark == 0">备案</span>
135 135
              <span v-if="scope.row.is_mark == 1">撤销</span>
136 136
           </el-button>
137 137
 
138
-          <el-button type="primary" size="small" icon="el-icon-refresh-left" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028">
138
+          <el-button type="primary" size="small" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028">
139 139
             <span v-if="scope.row.is_mark == 0 || scope.row.is_mark == 2"  @click="putOnRecord(scope.row.id)" >目录对照</span>
140 140
             <span v-if="scope.row.is_mark == 1"  @click="putOnUnRecord(scope.row.id)" >撤消对照</span>
141 141
           </el-button>

+ 8 - 6
src/xt_pages/data/components/drugs.vue 查看文件

@@ -17,7 +17,7 @@
17 17
             :value="item.id">
18 18
           </el-option>
19 19
         </el-select>
20
-        <label class="title"><span class="name">是否收费</span> : </label>
20
+        <label class="title"><span class="name">是否备案</span> : </label>
21 21
         <el-select v-model="is_charge" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeCharge">
22 22
           <el-option
23 23
             v-for="item in options"
@@ -76,15 +76,17 @@
76 76
        ></el-table-column>
77 77
       <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
78 78
 
79
-      <el-table-column prop="date" label="药品名称" align="center" width="100">
79
+      <el-table-column prop="date" label="药品名称" align="center" >
80 80
         <template slot-scope="scope">
81 81
           <div>{{scope.row.drug_name}}</div>
82 82
         </template>
83 83
       </el-table-column>
84
-      <el-table-column prop="date" label="单位&规格" width="120" align="center">
84
+      <el-table-column prop="date" label="单位&规格" align="center">
85 85
         <template slot-scope="scope">
86 86
           <!-- <div>{{scope.row.drug_spec}}</div> -->
87
-          <div>{{scope.row.dose}}{{scope.row.dose_unit}}&nbsp;* &nbsp;{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}</div>
87
+          <div>
88
+            <span v-if="scope.row.min_unit != scope.row.dose_unit">{{scope.row.dose}}{{scope.row.dose_unit}}&nbsp;* &nbsp;</span>{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
89
+          </div>
88 90
         </template>
89 91
       </el-table-column>
90 92
       <!-- <el-table-column prop="date" label="最大单位" width="60" align="center">
@@ -97,12 +99,12 @@
97 99
           <div>{{scope.row.min_unit}}</div>
98 100
         </template>
99 101
       </el-table-column> -->
100
-      <el-table-column prop="date" label="进货价" width="60" align="center">
102
+      <el-table-column prop="date" label="进货价" width="100" align="center">
101 103
         <template slot-scope="scope">
102 104
           <div>{{scope.row.last_price}}</div>
103 105
         </template>
104 106
       </el-table-column>
105
-      <el-table-column label="零售价" width="60" align="center">
107
+      <el-table-column label="零售价" width="100" align="center">
106 108
         <template slot-scope="scope">
107 109
           <div>{{scope.row.retail_price}}</div>
108 110
         </template>

+ 1 - 1
src/xt_pages/data/components/inspection.vue 查看文件

@@ -37,7 +37,7 @@
37 37
                    {{scope.row.wubi}}
38 38
                 </template>
39 39
             </el-table-column>
40
-            <el-table-column label="价格" width="60" align="center">
40
+            <el-table-column label="价格" width="100" align="center">
41 41
                 <template slot-scope="scope">
42 42
                    {{scope.row.price}}
43 43
                 </template>

+ 0 - 1
src/xt_pages/data/components/project.vue 查看文件

@@ -228,7 +228,6 @@ export default {
228 228
               label: '未备案'
229 229
           }],
230 230
           is_mark:"",
231
-          limit:100,
232 231
           page:1,
233 232
           departMentList:[],
234 233
            dialogVisible:false,

+ 1 - 27
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue 查看文件

@@ -24,33 +24,7 @@
24 24
       </div>
25 25
 
26 26
 
27
-      <!--<el-table-->
28
-      <!--:header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"-->
29
-      <!--:data="other_doctor_advices"-->
30
-      <!--border-->
31
-      <!--style="width: 100%"-->
32
-      <!--ref="advices_list"-->
33
-      <!--@row-click="cellMouseEnter"-->
34
-      <!--:row-class-name="tableRowClassName"-->
35
-      <!--:span-method="objectSpanMethod"-->
36
-      <!--:cell-class-name="adviceNameShow"-->
37
-      <!--:modal-append-to-body="false"-->
38
-      <!--highlight-current-row-->
39
-      <!--@current-change="handleCurrentChange"-->
40
-      <!--&gt;-->
41
-
42
-      <!--<el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">-->
43
-      <!--<template slot-scope="scope">-->
44
-      <!--<span class="el-dropdown-link">-->
45
-      <!--{{ getAdviceContent(scope.row, 1)-->
46
-      <!--}}-->
47
-      <!--<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
48
-      <!--</span>-->
49
-      <!--</template>-->
50
-      <!--</el-table-column>-->
51
-
52
-
53
-      <!--</el-table>-->
27
+      
54 28
       <el-form
55 29
         ref="adForm"
56 30
         :rules="adRules"

+ 7 - 2
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue 查看文件

@@ -693,13 +693,17 @@ export default {
693 693
             adviceNames: [],
694 694
             advice_doctor: this.groupForm.advice_doctor,
695 695
             remark: this.groupForm.remark,
696
-            parent_id: this.groupForm.parent_id
696
+            parent_id: this.groupForm.parent_id,
697
+            id:this.groupForm.id,
697 698
           };
698 699
          
699 700
           var adviceNames = [];
700 701
           for (const index in this.groupForm.adviceNames) {
701 702
             adviceNames.unshift(this.groupForm.adviceNames[index]);
702 703
           }
704
+          for(let i=0;i<adviceNames.length;i++){
705
+            adviceNames[i].template_id = "888888888"
706
+          }
703 707
           submitForm.adviceNames = adviceNames;
704 708
           let mode = "1";
705 709
           
@@ -729,7 +733,7 @@ export default {
729 733
              }
730 734
           }
731 735
           console.log("2222",submitForm)
732
-          
736
+  
733 737
           CreateGroupAdvice(this.patientID, 0, submitForm, mode).then(
734 738
             response => {
735 739
               if (response.data.state == 0) {
@@ -1684,6 +1688,7 @@ export default {
1684 1688
   created(){
1685 1689
     //获取自备药
1686 1690
     this.getSelfMedicalList()
1691
+    console.log("模板数据",this.adviceTemplates)
1687 1692
   }
1688 1693
 };
1689 1694
 </script>

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

@@ -1837,8 +1837,12 @@
1837 1837
         // 入口
1838 1838
         var pre = pre
1839 1839
         this.dialysisPrescription.mode_id = this.$route.query.mode_id ? this.$route.query.mode_id : this.mode_id
1840
+        if(pre.id > 0){
1841
+          this.dialysisPrescription.mode_id = pre.mode_id
1842
+        }
1840 1843
         console.log('this.dialysisPrescription.mode_id',this.dialysisPrescription.mode_id)
1841
-        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) {
1844
+        console.log('this.schedual',schedual.mode_id)
1845
+        if (pre.mode_id == 2 || pre.mode_id == 5 || pre.mode_id == 12 || schedual.mode_id == 2 || schedual.mode_id == 5 || schedual.mode_id == 12) {
1842 1846
           this.zhiShow = true
1843 1847
           this.huShow = true
1844 1848
           this.totalShow = true

+ 19 - 5
src/xt_pages/dialysis/template/DialysisPrintOrderThirtyEight.vue 查看文件

@@ -112,6 +112,7 @@
112 112
           <div class="widthLength25">实际进食量:{{ afterdialysis.dialysis_during ? afterdialysis.dialysis_during : '' }} g</div>
113 113
           <div class="widthLength25">透后体重:{{ afterdialysis.weight_after ? afterdialysis.weight_after : "" }} Kg</div>
114 114
           <div class="widthLength25">脉搏:{{ afterdialysis.weight_after ? afterdialysis.weight_after : "" }} 次/分</div>
115
+          <div class="widthLength25"></div>
115 116
       </div>
116 117
       <div class="lineHeight">治疗方案:</div>
117 118
       <div class="lineHeight">
@@ -297,7 +298,7 @@
297 298
             <td>&nbsp;{{ monitor.transmembrane_pressure ? monitor.transmembrane_pressure : "" }}</td>
298 299
             <td>&nbsp;{{ monitor.ultrafiltration_rate ? monitor.ultrafiltration_rate : "" }}</td>
299 300
             <td>&nbsp;{{ monitor.ultrafiltration_volume ? monitor.ultrafiltration_volume : "" }}</td>
300
-            <td>&nbsp;{{ monitor.complication ? monitor.complication : "" }}</td>
301
+            <td>&nbsp;{{ monitor.complication ? getComplication(monitor.complication) : "" }}</td>
301 302
             <td style="text-align:left;padding-left:10px;">
302 303
               <div v-if="monitor.operate_time" style="line-height:20px;text-align: left;display: inline-block;">
303 304
                 {{ monitor.dispose ? monitor.dispose : '无' }}
@@ -328,7 +329,7 @@
328 329
           <div class="widthLength25">实际治疗时长:{{ afterdialysis.actual_treatment_hour ? afterdialysis.actual_treatment_hour : 0 }}小时
329 330
             {{ afterdialysis.actual_treatment_minute ? afterdialysis.actual_treatment_minute : 0 }}分钟
330 331
           </div>
331
-          <div class="widthLength25">静脉管道:
332
+          <!-- <div class="widthLength25">静脉管道:
332 333
             <span v-if="afterdialysis.intravenous_tube == 1">0级</span>
333 334
             <span v-if="afterdialysis.intravenous_tube == 2">I级</span>
334 335
             <span v-if="afterdialysis.intravenous_tube == 3">Ⅱ级</span>
@@ -339,8 +340,10 @@
339 340
             <span v-if="afterdialysis.arterial_tube == 2">I级</span>
340 341
             <span v-if="afterdialysis.arterial_tube == 3">Ⅱ级</span>
341 342
             <span v-if="afterdialysis.arterial_tube == 4">Ⅲ级</span>
342
-          </div>
343
+          </div> -->
343 344
           <div class="widthLength25">透析器凝血:{{ afterdialysis.cruor ? afterdialysis.cruor : "" }}</div>
345
+          <div class="widthLength25"></div>
346
+          <div class="widthLength25"></div>
344 347
           
345 348
       </div>
346 349
       <div class="lineHeight">
@@ -568,10 +571,20 @@ export default {
568 571
         finish_nurse: "",
569 572
         url: ""
570 573
       },
571
-      displaceLiquiPartOptions: []
574
+      displaceLiquiPartOptions: [],
575
+      complicationList:[]
572 576
     };
573 577
   },
574 578
   methods: {
579
+    getComplication(id){
580
+      var name = "";
581
+      for(let i=0;i<this.complicationList.length;i++){
582
+         if(id == this.complicationList[i].id){
583
+            name = this.complicationList[i].name
584
+         }
585
+      }
586
+      return name
587
+    },
575 588
     getDisplaceLiquiPart: function(val) {
576 589
       let displace_liqui_part_name = "/";
577 590
       const displace_liqui_part = this.displaceLiquiPartOptions;
@@ -722,7 +735,7 @@ export default {
722 735
           this.assessmentafter = response.data.data.assessmentAfterDislysis;
723 736
           console.log("上次透后体重", this.assessmentafter);
724 737
           var doctorAdevieInfo = response.data.data.doctorAdevieInfo;
725
-          var doctorAdevieInfo = response.data.data.advices;
738
+          var doctorAdevieInfo = JSON.parse(JSON.stringify(response.data.data.advices))
726 739
           var tableAdvice = doctorAdevieInfo;
727 740
           console.log("医生", tableAdvice);
728 741
           if (tableAdvice.length === 0) {
@@ -1274,6 +1287,7 @@ export default {
1274 1287
     this.lapse_arr = getDataConfig("hemodialysis", "lapse");
1275 1288
     this.displaceLiquiPartOptions = this.$store.getters.displace_liqui;
1276 1289
     // this.bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
1290
+    this.complicationList = getDataConfig('hemodialysis','complication')
1277 1291
 
1278 1292
     var bloodAccessParOpera = getDataConfig(
1279 1293
       "hemodialysis",

+ 1 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderThirtyFive.vue 查看文件

@@ -1367,7 +1367,7 @@ export default {
1367 1367
           if (patientInfo.gender === 2) {
1368 1368
             patientInfo.gender = "女";
1369 1369
           }
1370
-          console.log("patientInfo", patientInfo);
1370
+          // console.log("patientInfo", patientInfo);
1371 1371
           this.patientInfo = patientInfo;
1372 1372
           this.patientInfo.birth = uParseTime(
1373 1373
             this.patientInfo.birthday,

+ 15 - 5
src/xt_pages/outpatientCharges/invoiceTemplate/printTwo.vue 查看文件

@@ -9,17 +9,17 @@
9 9
             <div  style="position: absolute;top:40px;left:300px">{{ list.number }}</div>
10 10
             <div></div>
11 11
             <div>
12
-                <span style="position: absolute;left:590px;top:40px;">{{ printDate.slice(0,4) }}</span>
13
-                <span style="position: absolute;left:630px;top:40px;">{{ printDate.slice(5,7) }}</span>
14
-                <span style="position: absolute;left:690px;top:40px;">{{ printDate.slice(8,11) }}</span>
12
+                <span style="position: absolute;left:590px;top:40px;">{{ paramsObj.setl_time.split(' ')[0].slice(0,4) }}</span>
13
+                <span style="position: absolute;left:630px;top:40px;">{{ paramsObj.setl_time.split(' ')[0].slice(5,7) }}</span>
14
+                <span style="position: absolute;left:690px;top:40px;">{{ paramsObj.setl_time.split(' ')[0].slice(8,11) }}</span>
15 15
             </div>
16 16
         </div>
17 17
         <div style="display:flex;justify-content: space-between;">
18 18
             <div style="position: absolute;top:60px;left:120px;"> {{ paramsObj.name }}</div>
19 19
             <div style="position: absolute;top:60px;left:210px;">√</div>
20 20
             <!-- <div>{{ list.pay_way }}</div> -->
21
-            <div style="position: absolute;top:60px;left:460px;">{{ paramsObj.setl_time.split(' ')[0] }}</div>
22
-            <div style="position: absolute;top:60px;left:640px;">{{ paramsObj.setl_time.split(' ')[0] }}</div>
21
+            <div style="position: absolute;top:60px;left:460px;">{{ getTime(list.date, '{y}-{m}-{d}') }}</div>
22
+            <div style="position: absolute;top:60px;left:640px;">{{ getTime(list.date, '{y}-{m}-{d}') }}</div>
23 23
         </div>
24 24
         <div style="display:flex;justify-content: space-between;">
25 25
             <!-- <div>{{ paramsObj.gend == 1 ? '男' : '女' }}</div> -->
@@ -115,6 +115,7 @@
115 115
 
116 116
 <script>
117 117
 import { getInvoice } from '@/api/project/project'
118
+import { uParseTime } from '@/utils/tools'
118 119
 export default {
119 120
     props:{
120 121
         paramsObj:Object
@@ -202,6 +203,15 @@ export default {
202 203
             this.zhongwen =  str.replace(/零(仟|佰|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
203 204
             console.log(this.zhongwen)
204 205
         },
206
+        getTime(value, temp) {
207
+            if (value == 0) {
208
+                return ''
209
+            }
210
+            if (value != undefined) {
211
+                return uParseTime(value, temp)
212
+            }
213
+            return ''
214
+        },
205 215
 
206 216
     },
207 217
     watch:{

+ 6 - 2
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue 查看文件

@@ -268,7 +268,10 @@
268 268
                                             <template slot-scope="scope">{{ scope.row.drug_name }}</template>
269 269
                                         </el-table-column>
270 270
                                         <el-table-column label="规格" width="60">
271
-                                            <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
271
+                                            <template slot-scope="scope">
272
+                                              <!-- {{ scope.row.drug_spec }} -->
273
+                                              <span v-if="scope.row.min_unit != scope.row.dose_unit">{{scope.row.dose}}{{scope.row.dose_unit}}&nbsp;* &nbsp;</span>{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
274
+                                            </template>
272 275
                                         </el-table-column>
273 276
                                         <el-table-column label="库存" width="60">
274 277
                                             <template slot-scope="scope">
@@ -283,7 +286,7 @@
283 286
                                             <template slot-scope="scope">{{ scope.row.retail_price }}</template>
284 287
                                         </el-table-column>
285 288
                                     </el-table>
286
-                                    <div>{{3*(2/3)}}</div>
289
+                                    <!-- <div>{{3*(2/3)}}</div> -->
287 290
                                 </div>
288 291
 
289 292
                             </el-tab-pane>
@@ -2598,6 +2601,7 @@
2598 2601
             this.curPrescriptions = this.prescriptions[i]
2599 2602
             this.$refs.multipleTable.clearSelection()
2600 2603
             this.$refs.tables.clearSelection()
2604
+            this.clearSelection()
2601 2605
 
2602 2606
           }
2603 2607
         }

+ 35 - 11
src/xt_pages/outpatientDoctorStation/doctorDesk.vue 查看文件

@@ -190,7 +190,7 @@
190 190
             <span slot="footer" class="dialog-footer">
191 191
         <el-button @click="centerDialogVisible = false">取 消</el-button>
192 192
         <el-button type="primary" @click="savePrint">确 定</el-button>
193
-      </span>
193
+      </span>
194 194
         </el-dialog>
195 195
         <el-dialog
196 196
                 class="centerDialog"
@@ -437,10 +437,10 @@
437 437
             case 0:
438 438
               this.all_data = this.all_data_two
439 439
               break
440
-            case 1:
440
+            case 2:
441 441
               this.cure_data = this.cure_data_two
442 442
               break
443
-            case 2:
443
+            case 1:
444 444
               this.un_cure_data = this.un_cure_data_two
445 445
               break
446 446
           }
@@ -452,12 +452,13 @@
452 452
               for (let i = 0; i < this.all_data.length; i++) {
453 453
                 if (this.all_data[i].name.indexOf(this.search_input) != -1 || this.all_data[i].number.indexOf(this.search_input) != -1) {
454 454
                   arr = arr.concat(this.all_data[i])
455
+                  console.log(arr)
455 456
                 }
456 457
               }
457 458
               this.all_data = arr
458 459
 
459 460
               break
460
-            case 1:
461
+            case 2:
461 462
               let arr2 = []
462 463
               for (let i = 0; i < this.cure_data.length; i++) {
463 464
                 if (this.cure_data[i].name.indexOf(this.search_input) != -1 || this.cure_data[i].number.indexOf(this.search_input) != -1) {
@@ -467,7 +468,7 @@
467 468
               this.cure_data = arr2
468 469
 
469 470
               break
470
-            case 2:
471
+            case 1:
471 472
               let arr3 = []
472 473
               for (let i = 0; i < this.un_cure_data.length; i++) {
473 474
                 if (this.un_cure_data[i].name.indexOf(this.search_input) != -1 || this.un_cure_data[i].number.indexOf(this.search_input) != -1) {
@@ -3577,7 +3578,7 @@
3577 3578
           this.$refs.prescriptions.open(1, this.saveLoading)
3578 3579
         } else if (index == 2) {
3579 3580
 
3580
-          this.getPrescriptionList(this.patientInfo.id)
3581
+          this.getPrescriptionList(this.patientInfo.id,1)
3581 3582
           // this.$router.push("/outpatientDoctorStation/print?record="+this.record_date+"&prescription_id="+this.prescription_id)
3582 3583
         } else if (index == 3) {
3583 3584
           this.$refs.prescriptions.open(3)
@@ -3585,7 +3586,7 @@
3585 3586
           this.$refs.prescriptions.open(4)
3586 3587
         } else if (index == 6) {
3587 3588
           // this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
3588
-          this.getPrescriptionList(this.patientInfo.id)
3589
+          this.getPrescriptionList(this.patientInfo.id,2)
3589 3590
           // this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
3590 3591
 
3591 3592
         }
@@ -3626,15 +3627,20 @@
3626 3627
         this.prescription_id = data
3627 3628
       },
3628 3629
 
3629
-      getPrescriptionList(id) {
3630
+      getPrescriptionList(id,type) {
3630 3631
         getPrescriptionList(id,2).then(response => {
3631 3632
           if (response.data.state == 1) {
3632 3633
             this.centerDialogVisible = true
3633 3634
             var list = response.data.data.list
3635
+            let arr = []
3634 3636
             for (let i = 0; i < list.length; i++) {
3635
-              list[i].prescription_number = list[i].prescription_number + i
3637
+              if(list[i].type == type){
3638
+                list[i].prescription_number = list[i].prescription_number + i
3639
+                arr.push(list[i])
3640
+              }
3641
+              
3636 3642
             }
3637
-            this.tableData = list
3643
+            this.tableData = arr
3638 3644
           }
3639 3645
         })
3640 3646
       },
@@ -3643,7 +3649,25 @@
3643 3649
       },
3644 3650
       handleClick() {
3645 3651
         if(this.titleType == "电子处方"){
3646
-          this.getPatientInfo()
3652
+          if(this.radio == 1){
3653
+            this.un_cure_data.map(item => {
3654
+              if(item.id == this.patientid){
3655
+                this.getPatientInfo(item)
3656
+              }
3657
+            })
3658
+          }else if(this.radio == 2){
3659
+            this.cure_data.map(item => {
3660
+              if(item.id == this.patientid){
3661
+                this.getPatientInfo(item)
3662
+              }
3663
+            })
3664
+          }else{
3665
+            this.all_data.map(item => {
3666
+              if(item.id == this.patientid){
3667
+                this.getPatientInfo(item)
3668
+              }
3669
+            })
3670
+          }
3647 3671
         }
3648 3672
 
3649 3673
       },

+ 1 - 1
src/xt_pages/outpatientDoctorStation/prescriptionTemplate.vue 查看文件

@@ -24,7 +24,7 @@
24 24
                               highlight-current-row
25 25
                               ref="tab">
26 26
                         <el-table-column prop="name" label="姓名">
27
-                            <template slot-scope="scope">{{scope.row.name}}</template>
27
+                            <template slot-scope="scope">{{scope.row.name}}({{ scope.row.dialysis_no }})</template>
28 28
                         </el-table-column>
29 29
                     </el-table>
30 30
                 </div>

+ 2 - 2
src/xt_pages/outpatientDoctorStation/template/printThree.vue 查看文件

@@ -35,7 +35,7 @@
35 35
               <div class="Rp">Rp:</div>
36 36
               <div class="drugsBox" v-for="(it,index) in item.advices.slice(pageIndex * 5,(pageIndex * 5) + item.pageArr[pageIndex])" :key="index">
37 37
                   <!-- <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div> -->
38
-                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;{{it.drug.drug_spec}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div>
38
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;<span v-if="it.drug.min_unit != it.drug.dose_unit">{{it.drug.dose}}{{it.drug.dose_unit}}&nbsp;* &nbsp;</span>{{it.drug.min_number}}{{it.drug.min_unit}}/{{it.drug.max_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div>
39 39
                   <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.execution_frequency}}&nbsp;{{it.delivery_way}}&nbsp;</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
40 40
               </div>
41 41
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
@@ -43,7 +43,7 @@
43 43
                </div>
44 44
                
45 45
               <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
46
-                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{getProjectName(it.project_id)?getProjectName(it.project_id):""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
46
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{ it.type == 2 ? it.project.project_name : it.good_info.good_name }}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
47 47
                   <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.delivery_way}}</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
48 48
               </div>
49 49
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">

+ 5 - 5
src/xt_pages/outpatientDoctorStation/treatTemplate/printTwo.vue 查看文件

@@ -5,9 +5,9 @@
5 5
         <img src="../../../assets/img/bailinTop.jpg" style="width:100%" alt="">
6 6
         <div class="printTitle">治疗单</div>
7 7
         <div style="display:flex;">
8
-            <div style="width:33%;display:flex;">费别:<span class="under_line">深圳医保1档</span></div>
9
-            <div style="width:33%;display:flex;">电脑号:<span class="under_line">1111111</span></div>
10
-            <div style="width:33%;display:flex;">处方编号:<span class="under_line">8972392771</span></div>
8
+            <div style="width:33%;display:flex;">费别:<span class="under_line"></span></div>
9
+            <div style="width:33%;display:flex;">电脑号:<span class="under_line"></span></div>
10
+            <div style="width:33%;display:flex;">处方编号:<span class="under_line"></span></div>
11 11
         </div>
12 12
 
13 13
 
@@ -72,10 +72,10 @@
72 72
               <div class="Rp">Rp:</div>
73 73
               <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
74 74
                   <!-- <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div> -->
75
-                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;{{it.drug.drug_spec}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div>
75
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;<span v-if="it.drug.min_unit != it.drug.dose_unit">{{it.drug.dose}}{{it.drug.dose_unit}}&nbsp;* &nbsp;</span>{{it.drug.min_number}}{{it.drug.min_unit}}/{{it.drug.max_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div>
76 76
               </div>
77 77
               <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
78
-                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{getProjectName(it.project_id)?getProjectName(it.project_id):""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
78
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{ it.type == 2 ? it.project.project_name : it.good_info.good_name }}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
79 79
               </div>
80 80
               <div style="text-align:center;" >(以下空白)</div>
81 81
         </div>

+ 6 - 25
src/xt_pages/stock/Dialog/goodInfoDailog.vue 查看文件

@@ -15,12 +15,6 @@
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%">
19
-              <el-input v-model="form.pinyin" placeholder="" maxlength="30"></el-input>
20
-            </el-form-item>
21
-            <el-form-item label="五笔 : " prop="wubi" style="width:50%">
22
-              <el-input v-model="form.wubi" placeholder="" maxlength="30"></el-input>
23
-            </el-form-item> -->
24 18
             <el-form-item label="耗材种类 : " prop="good_kind">
25 19
               <el-select v-model="form.good_kind" style="width:160px;" placeholder="请选择">
26 20
                 <el-option
@@ -63,8 +57,8 @@
63 57
                 <el-form-item prop="min_number" class="noMargin">
64 58
                   <el-input v-model="form.min_number" :disabled="showMinNumber" style="width:100px" type="number" placeholder="拆零"> </el-input>
65 59
                 </el-form-item>
66
-                <!-- <el-form-item prop="min_unit" class="noMargin">
67
-                  <el-select v-model="form.min_unit" style="width:160px;"  placeholder="拆零单位"  @change="changeMinUnit">
60
+                <el-form-item prop="packing_unit" class="noMargin">
61
+                  <el-select v-model="form.packing_unit" style="width:160px;" placeholder="包装单位" @change="changePackingUnit">
68 62
                     <el-option
69 63
                       v-for="(item,index) in getDataConfig('hemodialysis','units')"
70 64
                       :key="index"
@@ -72,18 +66,7 @@
72 66
                       :value="item.name">
73 67
                     </el-option>
74 68
                   </el-select>
75
-              </el-form-item> -->
76
-
77
-              <el-form-item prop="packing_unit" class="noMargin">
78
-                <el-select v-model="form.packing_unit" style="width:160px;" placeholder="包装单位" @change="changePackingUnit">
79
-                  <el-option
80
-                    v-for="(item,index) in getDataConfig('hemodialysis','units')"
81
-                    :key="index"
82
-                    :label="item.name"
83
-                    :value="item.name">
84
-                  </el-option>
85
-                </el-select>
86
-              </el-form-item>
69
+                </el-form-item>
87 70
             </div>
88 71
 
89 72
             <el-form-item label="生产厂商 : " prop="manufacturer" style="width:100%">
@@ -110,9 +93,9 @@
110 93
             <el-form-item label="包装零售价 : " prop="retail_price">
111 94
               <el-input v-model="form.packing_price" style="width:160px;" placeholder="" maxlength="30"></el-input>
112 95
             </el-form-item>
113
-            <el-form-item label="拆零零售价 : " prop="retail_price">
96
+            <!-- <el-form-item label="拆零零售价 : " prop="retail_price">
114 97
               <el-input v-model="form.retail_price" style="width:160px;" placeholder="" maxlength="30"></el-input>
115
-            </el-form-item>
98
+            </el-form-item> -->
116 99
 
117 100
             <el-form-item label="进货价 : " prop="buy_price">
118 101
               <el-input v-model="form.buy_price" style="width:160px;" placeholder="" maxlength="30"></el-input>
@@ -366,7 +349,7 @@
366 349
           statistics_category: '',
367 350
           agent: '',
368 351
           good_status: '',
369
-          default_count: '',
352
+          default_count:1,
370 353
           sign: '',
371 354
           is_default: '',
372 355
           is_charge_use: '',
@@ -406,8 +389,6 @@
406 389
             { required: true, message: '请选择生产厂商', trigger: 'blur' }
407 390
           ], good_unit: [
408 391
             { required: true, message: '请选择单位', trigger: 'blur' }
409
-          ], retail_price: [
410
-            { required: true, message: '请输入零价', trigger: 'blur' }
411 392
           ], stock_warn_count: [
412 393
             { required: true, message: '请输入库存警戒', trigger: 'blur' }
413 394
           ],social_security_directory_code:[

+ 8 - 8
src/xt_pages/stock/Dialog/goodTypeDialog.vue 查看文件

@@ -71,7 +71,7 @@ export default {
71 71
       },
72 72
        out_stock: '1',
73 73
        stock_attribute:"1",
74
-       showAttribute:false
74
+       showAttribute:true
75 75
     };
76 76
   },
77 77
   props: {
@@ -89,13 +89,13 @@ export default {
89 89
   },
90 90
   methods: {
91 91
     show:function(val){
92
-      console.log("val22222222",this.formValue)
93
-      if(this.formValue.stock_attribute == "1"){
94
-        this.showAttribute = false
95
-      }
96
-      if(this.formValue.stock_attribute == "2" || this.formValue.stock_attribute =="3"){
97
-        this.showAttribute = true
98
-      }
92
+      // console.log("val22222222",this.formValue)
93
+      // if(this.formValue.stock_attribute == "1"){
94
+      //   this.showAttribute = false
95
+      // }
96
+      // if(this.formValue.stock_attribute == "2" || this.formValue.stock_attribute =="3"){
97
+      //   this.showAttribute = true
98
+      // }
99 99
    
100 100
       this.visibility = true
101 101
 

+ 102 - 28
src/xt_pages/stock/drugs/drugStockFlow.vue 查看文件

@@ -55,60 +55,62 @@
55 55
         :data="tableList"
56 56
         border
57 57
         style="width: 100%">
58
-        <el-table-column prop="date" label="序号" width="180">
58
+        <el-table-column prop="date" label="序号" width="180" align="center">
59 59
            <template  slot-scope="scope">
60 60
               {{scope.$index + 1}}
61 61
            </template>
62 62
         </el-table-column>
63
-        <el-table-column prop="drug_type" label="出入库方式" width="180">
63
+        <el-table-column prop="drug_type" label="出入库方式" width="180" align="center">
64 64
            <template slot-scope="scope">
65
-             <span v-if="scope.row.drug_way == 4">入库</span>
66
-             <span v-if="scope.row.drug_way == 2">出库</span>
65
+             <span v-if="scope.row.drug_way == 4">手动入库</span>
66
+             <span v-if="scope.row.drug_way == 2">手动出库</span>
67 67
            </template>
68 68
         </el-table-column>
69
-        <el-table-column prop="drug_name" label="出/入库单据编码">
69
+        <el-table-column prop="drug_name" label="出/入库单据编码" align="center">
70 70
            <template slot-scope="scope">
71 71
              <span v-if="scope.row.drug_way == 2"> {{scope.row.warehouse_out_order_number}}</span>
72 72
              <span v-if="scope.row.drug_way == 4">{{scope.row.warehousing_order}}</span>
73 73
             
74 74
            </template>
75 75
         </el-table-column>
76
-        <el-table-column prop="drug_name" label="操作日期">
76
+        <el-table-column prop="drug_name" label="操作日期" align="center">
77 77
            <template slot-scope="scope">
78 78
              {{getTime(scope.row.ctime)}}
79 79
            </template>
80 80
         </el-table-column>
81
-         <el-table-column prop="drug_name" label="出入库数量">
81
+         <el-table-column prop="drug_name" label="出入库数量" align="center">
82 82
            <template slot-scope="scope">
83
-             <span v-if="scope.row.drug_way == 4"> {{scope.row.warehouse_out_order_number}}</span>
84
-             <span v-if="scope.row.drug_way == 2">{{scope.row.warehousing_order}}</span>
83
+             <span v-if="scope.row.drug_way == 4"> {{scope.row.warehousing_count}}</span>
84
+             <span v-if="scope.row.drug_way == 2">{{scope.row.count}}</span>
85 85
            </template>
86 86
         </el-table-column>
87
-         <el-table-column prop="drug_name" label="库存剩余量">
87
+         <el-table-column prop="drug_name" label="剩余库存量" align="center">
88 88
            <template slot-scope="scope">
89
-             <span v-if="scope.row.drug_way == 4"> {{scope.row.stock_max_numbe}}{{scope.row.max_unit}}{{scope.row.stock_min_number}}{{scope.row.min_unit}}</span>
90
-             <span v-if="scope.row.drug_way == 2">{{scope.row.count}}</span>
89
+             <!-- <span v-if="scope.row.drug_way == 4"> {{scope.row.stock_max_numbe}}{{scope.row.max_unit}}{{scope.row.stock_min_number}}{{scope.row.min_unit}}</span>
90
+             <span v-if="scope.row.drug_way == 2">{{scope.row.count}}</span> -->
91
+              {{getInCount(scope.row.drug_id) - getOutCount(scope.row.drug_id) - getAutoCount(scope.row.drug_id)}}
92
+             <span></span>
91 93
            </template>
92 94
         </el-table-column>
93
-        <el-table-column prop="drug_name" label="进/出货单价">
95
+        <el-table-column prop="drug_name" label="进/出货单价" align="center">
94 96
            <template slot-scope="scope">
95 97
              <span v-if="scope.row.drug_way == 4"> {{scope.row.price}}</span>
96 98
              <span v-if="scope.row.drug_way == 2">{{scope.row.price}}</span>
97 99
            </template>
98 100
         </el-table-column>
99
-         <el-table-column prop="drug_name" label="有效期">
101
+         <el-table-column prop="drug_name" label="有效期" align="center">
100 102
            <template slot-scope="scope">
101 103
              <span v-if="scope.row.drug_way == 4"> {{getTime(scope.row.expiry_date)}}</span>
102 104
              <span v-if="scope.row.drug_way == 2">{{getTime(scope.row.expiry_date)}}</span>
103 105
            </template>
104 106
         </el-table-column>
105
-        <el-table-column prop="drug_name" label="批号">
107
+        <el-table-column prop="drug_name" label="批号" align="center">
106 108
            <template slot-scope="scope">
107 109
              <span v-if="scope.row.drug_way == 2"> {{scope.row.number}}</span>
108 110
              <span v-if="scope.row.drug_way == 4">{{scope.row.number}}</span>
109 111
            </template>
110 112
         </el-table-column>
111
-        <el-table-column prop="drug_name" label="供应商">
113
+        <el-table-column prop="drug_name" label="生产商" align="center">
112 114
            <template slot-scope="scope">
113 115
              <span v-if="scope.row.drug_way == 4"> {{getManufacturer(scope.row.manufacturer)}}</span>
114 116
              <span v-if="scope.row.drug_way == 2">{{getManufacturer(scope.row.manufacturer)}}</span>
@@ -140,7 +142,7 @@
140 142
 <script>
141 143
   import { uParseTime } from '@/utils/tools'
142 144
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
143
-  import { getDrugStockFlow,getOutDrugStockFlow } from '@/api/drug/drug_stock'
145
+  import { getDrugStockFlow,getOutDrugStockFlow,getDrugCountList } from '@/api/drug/drug_stock'
144 146
   import SettingDialog from './settingDialog/index'
145 147
   import { getDictionaryDataConfig } from "@/utils/data";
146 148
   export default {
@@ -151,6 +153,7 @@
151 153
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
152 154
       this.getlist()
153 155
       this.getOutList()
156
+      this.getDrugCountList()
154 157
     },
155 158
     components: {
156 159
       SettingDialog,
@@ -193,10 +196,13 @@
193 196
           {id:0,name:"全部"},
194 197
           {id:1,name:"手动出库"},
195 198
           {id:2,name:"自动出库"},
196
-          {id:3,name:"入库"},
199
+          {id:3,name:"手动入库"},
197 200
 
198 201
         ],
199 202
         outList:[],
203
+        countList:[],
204
+        outCountList:[],
205
+        autoCountList:[],
200 206
       }
201 207
     },
202 208
     methods:{
@@ -213,7 +219,7 @@
213 219
          getDrugStockFlow(params).then(response=>{
214 220
            if(response.data.state == 1){
215 221
             var list = response.data.data.list
216
-            console.log("入库数据",list)
222
+            console.log("入库数据0000",list)
217 223
             for(let i=0;i<list.length;i++){
218 224
                list[i].drug_way = 4
219 225
                this.tableList.push(list[i])
@@ -244,20 +250,17 @@
244 250
                   outList[i].drug_way = 2
245 251
                   this.tableList.push(outList[i])
246 252
                }
247
-              // for(let i=0;i<this.tableList.length;i++){
248
-              //   this.tableList[i].index = i+1
249
-              // }
250 253
               console.log("列表数据",this.tableList)
251 254
             }
252 255
          })
253 256
        },
254 257
        handleSizeChange(val) {
255 258
         this.limit = val
256
-        this.GetAllDrugStockQueryList()
259
+        this.getlist()
257 260
       },
258 261
       handleCurrentChange(val) {
259 262
         this.page = val
260
-        this.GetAllDrugStockQueryList()
263
+        this.getlist()
261 264
       },
262 265
         
263 266
     startTimeChange: function(val) {
@@ -267,7 +270,7 @@
267 270
         this.$message.error("开始时间不能大于结束时间");
268 271
         this.start_time = "";
269 272
       } else {
270
-        this.GetAllDrugStockQueryList();
273
+        this.getlist();
271 274
       }
272 275
     },
273 276
     endTimeChange: function(val) {
@@ -276,15 +279,14 @@
276 279
         this.$message.error("结束时间不能小于开始时间");
277 280
         this.end_time = "";
278 281
       } else {
279
-        this.GetAllDrugStockQueryList();
282
+        this.getlist();
280 283
       }
281 284
      },
282
-     changeDrug(){},
283 285
      getManufacturer(id){
284 286
        var name = ""
285 287
        for(let i=0;i<this.manufacturerList.length;i++){
286 288
          if(id == this.manufacturerList[i].id){
287
-            name = this.manufacturerList[i].name
289
+            name = this.manufacturerList[i].manufacturer_name
288 290
          }
289 291
        }
290 292
        return name
@@ -299,6 +301,78 @@
299 301
         return uParseTime(val, '{y}-{m}-{d}')
300 302
       }
301 303
      },
304
+    getDrugCountList(){
305
+         var params = {
306
+          keyword: this.keywords,
307
+          start_time:this.start_time,
308
+          end_time:this.end_time,
309
+         }
310
+      getDrugCountList(params).then(response=>{
311
+          if(response.data.state == 1){
312
+            var countlist =  response.data.data.countList
313
+            console.log("入库数据",countlist)
314
+            this.countList = countlist
315
+            var outcountlist = response.data.data.outCountList
316
+            console.log("出库数据",outcountlist)
317
+            this.outCountList = outcountlist
318
+            var aucountlist = response.data.data.auCountList
319
+            console.log("自动数据",aucountlist)
320
+            this.autoCountList = aucountlist
321
+          }
322
+        })
323
+      },
324
+      getInCount(id){
325
+        var count = ""
326
+        for(let i=0;i<this.countList.length;i++){
327
+           if(id == this.countList[i].drug_id){
328
+             count = this.countList[i].count
329
+           }
330
+        }
331
+        return count
332
+      },
333
+
334
+      getOutCount(id){
335
+        var count = ""
336
+        for(let i=0;i<this.outCountList.length;i++){
337
+           if(id == this.outCountList[i].drug_id){
338
+               count = this.outCountList[i].count
339
+           }
340
+        }
341
+        return count
342
+      },
343
+      getAutoCount(id){
344
+        var count= ""
345
+        for(let i=0;i<this.autoCountList.length;i++){
346
+          if(id == this.autoCountList[i].drug_id){
347
+            count = this.autoCountList[i].count
348
+          }
349
+        }
350
+        return count
351
+      },
352
+      getTimestamp(time) { // 把时间日期转成时间戳
353
+        return (new Date(time)).getTime() / 1000
354
+      },
355
+      changeDrug(val){
356
+        
357
+        var arr = []
358
+        if(val == 3){
359
+          for(let i=0;i<this.tableList.length;i++){
360
+            if(this.tableList[i].drug_way == 4){
361
+
362
+              arr.push(this.tableList[i])
363
+            }
364
+          }
365
+          this.tableList = arr
366
+        }
367
+        if(val == 1){
368
+          for(let i=0;i<this.tableList.length;i++){
369
+            if(this.tableList[i].drug_way == 2){
370
+              arr.push(this.tableList[i])
371
+            }
372
+          }
373
+          this.tableList = arr
374
+        }
375
+      }
302 376
     }
303 377
   }
304 378
 </script>

+ 97 - 106
src/xt_pages/stock/drugs/drugStockInOrder.vue 查看文件

@@ -1,7 +1,6 @@
1 1
 <template>
2 2
   <div class="main-contain">
3 3
     <div class="position">
4
-      <!--<bread-crumb :crumbs='crumbs'></bread-crumb>-->
5 4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
6 5
       <el-button
7 6
         size="small"
@@ -71,9 +70,8 @@
71 70
           @change="changeAllSelected"
72 71
           >全选</el-checkbox
73 72
         >
74
-        <el-button size="small" icon="el-icon-delete" @click="batchDelete"
75
-          >删除</el-button
76
-        >
73
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
74
+        <el-button size="small" type="primary" @click="drugPrint()">打印</el-button>
77 75
       </div>
78 76
 
79 77
       <el-table
@@ -178,14 +176,91 @@
178 176
       <el-pagination
179 177
         @size-change="handleSizeChange"
180 178
         @current-change="handleCurrentChange"
181
-        :page-sizes="[10, 50, 100]"
182
-        :page-size="10"
179
+        :page-sizes="[5, 10, 50, 100]"
180
+        :page-size="5"
183 181
         background
184
-        style="margin-top:20px;float: right"
182
+        style="margin-top:20px;text-align: right"
185 183
         layout="total, sizes, prev, pager, next, jumper"
186 184
         :total="total"
187 185
       >
188 186
       </el-pagination>
187
+      <el-table
188
+        v-show="showOne"
189
+        :data="WarehouseInfo.warehouseInfoDate"
190
+        :class="signAndWeighBoxPatients"
191
+        style="width: 100%;margin-top:10px;"
192
+        border
193
+        highlight-current-row
194
+        v-loading="Warehouse.loading"
195
+        ref="multipleTable"
196
+        @selection-change="select"
197
+        :row-style="{ color: '#303133' }"
198
+        :header-cell-style="{
199
+          backgroundColor: 'rgb(245, 247, 250)',
200
+          color: '#606266'
201
+        }"
202
+      >
203
+        <el-table-column label="药品名称" align="center">
204
+          <template slot-scope="scope">
205
+             {{scope.row.drug.drug_name}}
206
+          </template>
207
+        </el-table-column>
208
+        <el-table-column label="药品类型" align="center">
209
+          <template slot-scope="scope">
210
+              {{getDrugType(scope.row.drug.drug_type)}}
211
+          </template>
212
+        </el-table-column>
213
+        <el-table-column label="规格&单位" align="center">
214
+          <template slot-scope="scope">
215
+            {{scope.row.drug.dose}}&nbsp;{{scope.row.drug.dose_unit}}*{{scope.row.drug.min_number}}{{scope.row.drug.min_unit}}/{{scope.row.drug.max_unit}}
216
+          </template>
217
+        </el-table-column>
218
+        <el-table-column label="批号" align="center">
219
+          <template slot-scope="scope">
220
+            {{scope.row.number}}
221
+          </template>
222
+        </el-table-column>
223
+        <el-table-column label="入库数量" align="center">
224
+          <template slot-scope="scope">
225
+            {{scope.row.warehousing_count}}
226
+          </template>
227
+        </el-table-column>
228
+        <el-table-column label="进货价" align="center">
229
+          <template slot-scope="scope">
230
+            {{scope.row.price}}
231
+          </template>
232
+        </el-table-column>
233
+        <el-table-column label="总价" align="center">
234
+          <template slot-scope="scope">
235
+            {{scope.row.total_price}}
236
+          </template>
237
+        </el-table-column>
238
+        <el-table-column label="生产厂家" align="center">
239
+          <template slot-scope="scope">
240
+            {{getManufacturer(scope.row.drug.manufacturer)}}
241
+          </template>
242
+        </el-table-column>
243
+       <el-table-column label="生产日期" align="center">
244
+          <template slot-scope="scope">
245
+             {{getTime(scope.row.product_date)}}
246
+          </template>
247
+        </el-table-column>
248
+        <el-table-column label="有效日期" align="center">
249
+          <template slot-scope="scope">
250
+            {{getTime(scope.row.expiry_date)}}
251
+          </template>
252
+        </el-table-column>
253
+        <el-table-column label="批准文号" align="center">
254
+          <template slot-scope="scope">
255
+             {{scope.row.number}}
256
+          </template>
257
+        </el-table-column>
258
+        <el-table-column label="备注" align="center">
259
+          <template slot-scope="scope">
260
+            {{scope.row.remark}}
261
+          </template>
262
+        </el-table-column>
263
+      </el-table>
189 264
     </div>
190 265
 
191 266
 
@@ -287,104 +362,9 @@
287 362
     
288 363
 
289 364
 
290
-      <el-table
291
-        v-show="showOne"
292
-        :data="WarehouseInfo.warehouseInfoDate"
293
-        :class="signAndWeighBoxPatients"
294
-        style="width: 100%"
295
-        border
296
-        highlight-current-row
297
-        v-loading="Warehouse.loading"
298
-        ref="multipleTable"
299
-        @selection-change="select"
300
-        :row-style="{ color: '#303133' }"
301
-        :header-cell-style="{
302
-          backgroundColor: 'rgb(245, 247, 250)',
303
-          color: '#606266'
304
-        }"
305
-      >
306
-        <el-table-column align="center" type="selection" width="55">
307
-        </el-table-column>
308
-
309
-        <el-table-column label="药品名称" align="center">
310
-          <template slot-scope="scope">
311
-             {{scope.row.drug.drug_name}}
312
-          </template>
313
-        </el-table-column>
314
-
315
-        <el-table-column label="药品类型" align="center">
316
-          <template slot-scope="scope">
317
-              {{getDrugType(scope.row.drug.drug_type)}}
318
-          </template>
319
-        </el-table-column>
320
-
321
-        <el-table-column label="规格&单位" align="center">
322
-          <template slot-scope="scope">
323
-             {{scope.row.drug.dose}}&nbsp;{{scope.row.drug.dose_unit}}*{{scope.row.drug.min_number}}{{scope.row.drug.min_unit}}/{{scope.row.drug.max_unit}}
324
-          </template>
325
-        </el-table-column>
326
-       
327
-        <el-table-column label="批号" align="center">
328
-          <template slot-scope="scope">
329
-           {{scope.row.number}}
330
-          </template>
331
-        </el-table-column>
332
-        
333
-        <el-table-column label="入库数量" align="center">
334
-          <template slot-scope="scope">
335
-             {{scope.row.warehousing_count}}
336
-          </template>
337
-        </el-table-column>
338
-
339
-       <el-table-column label="进货价" align="center">
340
-          <template slot-scope="scope">
341
-            {{scope.row.price}}
342
-          </template>
343
-        </el-table-column>
344
-
345
-      
346
-       <el-table-column label="总价" align="center">
347
-          <template slot-scope="scope">
348
-             {{scope.row.total_price}}
349
-          </template>
350
-        </el-table-column>
351 365
       
352 366
 
353
-       <el-table-column label="生产厂家" align="center">
354
-          <template slot-scope="scope">
355
-             {{getManufacturer(scope.row.drug.manufacturer)}}
356
-          </template>
357
-        </el-table-column>
358
-
359
-
360
-       <el-table-column label="生产日期" align="center">
361
-          <template slot-scope="scope">
362
-             {{getTime(scope.row.product_date)}}
363
-          </template>
364
-        </el-table-column>
365
-       
366
-
367
-       <el-table-column label="有效日期" align="center">
368
-          <template slot-scope="scope">
369
-             {{getTime(scope.row.expiry_date)}}
370
-          </template>
371
-        </el-table-column>
372
-
373
-        <el-table-column label="批准文号" align="center">
374
-          <template slot-scope="scope">
375
-             {{scope.row.number}}
376
-          </template>
377
-        </el-table-column>
378
-
379
-
380
-        <el-table-column label="备注" align="center">
381
-          <template slot-scope="scope">
382
-            {{scope.row.remark}}
383
-          </template>
384
-        </el-table-column>
385
-      </el-table>
386
-
387
-      <el-pagination
367
+      <!-- <el-pagination
388 368
         @size-change="handleSizeChange"
389 369
         @current-change="handleCurrentChange"
390 370
         :page-sizes="[10, 50, 100]"
@@ -394,7 +374,7 @@
394 374
         layout="total, sizes, prev, pager, next, jumper"
395 375
         :total="total"
396 376
       >
397
-      </el-pagination>
377
+      </el-pagination> -->
398 378
 
399 379
   </div>
400 380
 </template>
@@ -452,7 +432,7 @@ export default {
452 432
       searchKey: "",
453 433
       type: 1,
454 434
       page: 1,
455
-      limit: 10,
435
+      limit: 5,
456 436
       checked: false,
457 437
       total: 0,
458 438
       pageTotal: 0,
@@ -478,7 +458,8 @@ export default {
478 458
       dialogVisible:false,
479 459
       showOne:false,
480 460
       drugTypeList:[],
481
-      manufacturerList:[]
461
+      manufacturerList:[],
462
+      order_id:""
482 463
     };
483 464
   },
484 465
   methods: {
@@ -735,6 +716,8 @@ export default {
735 716
       }
736 717
     },
737 718
     select(selection) {
719
+      console.log("selection",selection)
720
+      this.order_id = selection[0].id
738 721
       this.selectedTableData = selection;
739 722
     },
740 723
     batchDelete() {
@@ -823,6 +806,14 @@ export default {
823 806
      getDictionaryDataConfig(module, filed_name) {
824 807
         return getDictionaryDataConfig(module, filed_name)
825 808
       },
809
+    drugPrint(){
810
+      if(this.order_id == 0){
811
+         this.$message.error("请选择入库单")
812
+      }else{
813
+        this.$router.push({path:"/stock/drugStockInOrderDetailPrint?id="+this.order_id})
814
+      }
815
+      
816
+    }
826 817
   }
827 818
 };
828 819
 </script>

+ 5 - 2
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue 查看文件

@@ -87,7 +87,7 @@
87 87
                   >
88 88
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
89 89
                   <template slot-scope="{ item }">
90
-                    <div class="name">{{ item.drug_name }}</div>
90
+                    <div class="name">{{ item.drug_name + item.dose + "*"+ item.dose_unit +item.min_number + item.min_unit +"/" + item.max_unit}}</div>
91 91
                   </template>
92 92
                  </el-autocomplete>
93 93
               </el-form-item>
@@ -98,7 +98,7 @@
98 98
               <span>药品类型</span>
99 99
             </template>
100 100
              <template slot-scope="scope">
101
-               <el-select v-model="scope.row.drug_type" filterable placeholder="请选择厂商">
101
+               <el-select v-model="scope.row.drug_type" filterable placeholder="请选择药品类型">
102 102
                 <el-option
103 103
                   v-for="(option, index) in drugTypeList"
104 104
                   :key="index"
@@ -878,5 +878,8 @@
878 878
   .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
879 879
     background: #6fb5fa;
880 880
   }
881
+  .el-autocomplete-suggestion{
882
+    width: 400px !important;
883
+  }
881 884
 
882 885
 </style>

+ 1 - 1
src/xt_pages/stock/drugs/drugStockInOrderDetailPrint.vue 查看文件

@@ -2,7 +2,7 @@
2 2
   <div class="main-contain">
3 3
     <div class="position">
4 4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
5
-      <el-button :loading="loading" size="small" icon="el-icon-printer" @click="printThisPage" type="primary">打印
5
+      <el-button  size="small" icon="el-icon-printer" @click="printThisPage" type="primary">打印
6 6
       </el-button>
7 7
     </div>
8 8
     <div class="app-container ">

+ 1 - 1
src/xt_pages/stock/drugs/drugStockInOrderEdit.vue 查看文件

@@ -128,7 +128,7 @@
128 128
                   >
129 129
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
130 130
                   <template slot-scope="{ item }">
131
-                    <div class="name">{{ item.drug_name }}</div>
131
+                    <div class="name">{{ item.drug_name + item.dose + "*"+ item.dose_unit +item.min_number + item.min_unit +"/" + item.max_unit}}</div>
132 132
                   </template>
133 133
                  </el-autocomplete>
134 134
               </el-form-item>

+ 213 - 109
src/xt_pages/stock/drugs/drugStockOutOrder.vue 查看文件

@@ -68,9 +68,8 @@
68 68
           @change="changeAllSelected"
69 69
           >全选</el-checkbox
70 70
         >
71
-        <el-button size="small" icon="el-icon-delete" @click="batchDelete"
72
-          >删除</el-button
73
-        >
71
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
72
+        <el-button size="small" type="primary" @click="toPrint">打印</el-button>
74 73
       </div>
75 74
 
76 75
       <el-table
@@ -119,7 +118,7 @@
119 118
           </template>
120 119
         </el-table-column>
121 120
 
122
-        <el-table-column label="厂家" align="center">
121
+        <!-- <el-table-column label="厂家" align="center">
123 122
           <template slot-scope="scope">
124 123
             {{scope.row.manufacturers ? scope.row.manufacturers.manufacturer_name:''}}
125 124
           </template>
@@ -129,7 +128,7 @@
129 128
           <template slot-scope="scope">
130 129
             {{scope.row.dealers ? scope.row.dealers.dealer_name:''}}
131 130
           </template>
132
-        </el-table-column>
131
+        </el-table-column> -->
133 132
 
134 133
 
135 134
         <el-table-column label="操作" align="center" width="240">
@@ -185,110 +184,102 @@
185 184
       <el-pagination
186 185
         @size-change="handleSizeChange"
187 186
         @current-change="handleCurrentChange"
188
-        :page-sizes="[10, 50, 100]"
189
-        :page-size="10"
187
+        :page-sizes="[5, 10, 50, 100]"
188
+        :page-size="5"
190 189
         background
191
-        style="margin-top:20px;float: right"
190
+        style="margin-top:20px;text-align: right"
192 191
         layout="total, sizes, prev, pager, next, jumper"
193 192
         :total="total"
194 193
       >
195 194
       </el-pagination>
196
-    </div>
197
-
198
-    <div v-show="tableShow" style="margin-bottom:10px">
199
-      <el-table
200
-        :data="tableList"
201
-        :class="signAndWeighBoxPatients"
202
-        style="width: 100%"
203
-        border
204
-        highlight-current-row
205
-        ref="multipleTable"
206
-        @selection-change="select"
207
-        :row-style="{ color: '#303133' }"
208
-        :header-cell-style="{
209
-          backgroundColor: 'rgb(245, 247, 250)',
210
-          color: '#606266'
211
-        }"
212
-      >
213
-        <el-table-column type="selection" width="55" align="center"> </el-table-column>
214
-
215
-        <el-table-column label="药品名称" align="center">
216
-          <template slot-scope="scope">
217
-             {{scope.row.drug.drug_name}}
218
-          </template>
219
-        </el-table-column>
220
-        <el-table-column label="药品类型" align="center">
221
-          <template slot-scope="scope">
222
-              {{getDrugType(scope.row.drug.drug_type)}}
223
-          </template>
224
-        </el-table-column>
225
-         <el-table-column label="规格&单位" align="center">
226
-          <template slot-scope="scope">
227
-             {{scope.row.drug.dose}}&nbsp;{{scope.row.drug.dose_unit}}*{{scope.row.drug.min_number}}{{scope.row.drug.min_unit}}/{{scope.row.drug.max_unit}}
228
-          </template>
229
-        </el-table-column>
230
-       
231
-        <el-table-column label="批号" align="center">
232
-          <template slot-scope="scope">
233
-           {{scope.row.number}}
234
-          </template>
235
-        </el-table-column>
236
-        
237
-        <el-table-column label="出库数量" align="center">
238
-          <template slot-scope="scope">
239
-             {{scope.row.count}}
240
-          </template>
241
-        </el-table-column>
242
-
243
-       <el-table-column label="进货价" align="center">
244
-          <template slot-scope="scope">
245
-            {{scope.row.price}}
246
-          </template>
247
-        </el-table-column>
248
-
249
-      
250
-       <el-table-column label="总价" align="center">
251
-          <template slot-scope="scope">
252
-             {{scope.row.total_price}}
253
-          </template>
254
-        </el-table-column>
255
-      
256
-
257
-       <el-table-column label="生产厂家" align="center">
258
-          <template slot-scope="scope">
259
-             {{getManufacturerName(scope.row.drug.manufacturer)}}
260
-          </template>
261
-        </el-table-column>
262
-
263
-
264
-       <el-table-column label="生产日期" align="center">
265
-          <template slot-scope="scope">
266
-             {{getTime(scope.row.product_date)}}
267
-          </template>
268
-        </el-table-column>
269
-       
270
-
271
-       <el-table-column label="有效日期" align="center">
272
-          <template slot-scope="scope">
273
-             {{getTime(scope.row.expiry_date)}}
274
-          </template>
275
-        </el-table-column>
195
+      <!-- 使用详情 -->
196
+      <div v-show="tableShow" style="margin-top:10px">
197
+        <el-table
198
+          :data="tableList"
199
+          :class="signAndWeighBoxPatients"
200
+          style="width: 100%"
201
+          border
202
+          highlight-current-row
203
+          ref="multipleTable"
204
+          @selection-change="select"
205
+          :row-style="{ color: '#303133' }"
206
+          :header-cell-style="{
207
+            backgroundColor: 'rgb(245, 247, 250)',
208
+            color: '#606266'
209
+          }"
210
+        >
211
+          <el-table-column label="药品名称" align="center">
212
+            <template slot-scope="scope">
213
+              {{scope.row.drug_name}}
214
+            </template>
215
+          </el-table-column>
216
+          <el-table-column label="药品类型" align="center">
217
+            <template slot-scope="scope">
218
+                {{getDrugType(scope.row.drug_type)}}
219
+            </template>
220
+          </el-table-column>
221
+          <el-table-column label="规格&单位" align="center">
222
+            <template slot-scope="scope">
223
+              {{scope.row.dose}}&nbsp;{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
224
+            </template>
225
+          </el-table-column>
226
+          <!-- <el-table-column label="批号" align="center">
227
+            <template slot-scope="scope">
228
+            {{scope.row.number}}
229
+            </template>
230
+          </el-table-column> -->
231
+          <el-table-column label="出库数量" align="center">
232
+            <template slot-scope="scope">
233
+              {{scope.row.count}}
234
+            </template>
235
+          </el-table-column>
236
+          <el-table-column label="进货价" align="center">
237
+            <template slot-scope="scope">
238
+              {{scope.row.last_price}}
239
+            </template>
240
+          </el-table-column>
241
+          <el-table-column label="总价" align="center">
242
+            <template slot-scope="scope">
243
+              {{scope.row.count * scope.row.last_price}}
244
+            </template>
245
+          </el-table-column>
246
+          <el-table-column label="生产厂家" align="center">
247
+            <template slot-scope="scope">
248
+              {{getManufacturerName(scope.row.manufacturer)}}
249
+            </template>
250
+          </el-table-column>
251
+          <el-table-column label="生产日期" align="center">
252
+            <template slot-scope="scope">
253
+              {{getTime(scope.row.product_date)}}
254
+            </template>
255
+          </el-table-column>
256
+          <el-table-column label="有效日期" align="center">
257
+            <template slot-scope="scope">
258
+              {{getTime(scope.row.expiry_date)}}
259
+            </template>
260
+          </el-table-column>
261
+          <!-- <el-table-column label="批准文号" align="center">
262
+            <template slot-scope="scope">
263
+              {{scope.row.number}}
264
+            </template>
265
+          </el-table-column> -->
266
+          <el-table-column label="备注" align="center">
267
+            <template slot-scope="scope">
268
+              {{scope.row.remark}}
269
+            </template>
270
+          </el-table-column>
271
+          <el-table-column label="操作" align="center">
272
+            <template slot-scope="scope">
273
+              <span style="color: #589ff8" v-if="scope.row.is_sys == 1" @click="toDetail(scope.row)">使用明细</span>
274
+            </template>
275
+          </el-table-column>
276
+        </el-table>
276 277
 
277
-        <el-table-column label="批准文号" align="center">
278
-          <template slot-scope="scope">
279
-             {{scope.row.number}}
280
-          </template>
281
-        </el-table-column>
278
+      </div>
279
+    </div>
282 280
 
283 281
 
284
-        <el-table-column label="备注" align="center">
285
-          <template slot-scope="scope">
286
-            {{scope.row.remark}}
287
-          </template>
288
-        </el-table-column>
289
-      </el-table>
290 282
 
291
-    </div>
292 283
 
293 284
 
294 285
     <el-dialog
@@ -442,7 +433,63 @@
442 433
         <el-button type="primary" @click="dialogVisibleTwo = false">确 定</el-button>
443 434
       </span>
444 435
     </el-dialog>
445
-  </div>
436
+
437
+
438
+   
439
+    <el-dialog
440
+      title="提示"
441
+      :visible.sync="drugDialogVisible"
442
+      width="90%">
443
+      <span>
444
+        <el-table :data="userList" :class="signAndWeighBoxPatients" style="width: 50%"
445
+                  border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
446
+        >
447
+          <el-table-column min-width="35" align="center">
448
+            <template slot="header" slot-scope="scope">
449
+              <span>序号</span>
450
+            </template>
451
+            <template slot-scope="scope">
452
+              <span v-if="scope.row.is_total == 0">{{scope.$index+1}}</span>
453
+              <span v-if="scope.row.is_total == 1">{{'合计'}}</span>
454
+            </template>
455
+          </el-table-column>
456
+
457
+          <el-table-column min-width="35" align="center">
458
+            <template slot="header" slot-scope="scope">
459
+              <span>使用人</span>
460
+            </template>
461
+            <template slot-scope="scope">
462
+              <span v-if="scope.row.is_total == 0">{{scope.row.user.name}}</span>
463
+              <span v-if="scope.row.is_total == 1"></span>
464
+            </template>
465
+          </el-table-column>
466
+          <el-table-column min-width="35" align="center">
467
+            <template slot="header" slot-scope="scope">
468
+              <span>使用数量</span>
469
+            </template>
470
+            <template slot-scope="scope">
471
+              <span >{{scope.row.count}}</span>
472
+            </template>
473
+          </el-table-column>
474
+
475
+          <el-table-column min-width="35" align="center">
476
+            <template slot="header" slot-scope="scope">
477
+              <span>使用时间</span>
478
+            </template>
479
+            <template slot-scope="scope">
480
+              <span  v-if="scope.row.is_total == 0">{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
481
+              <span  v-if="scope.row.is_total == 1">{{scope.row.total}} </span>
482
+            </template>
483
+          </el-table-column>
484
+
485
+        </el-table>
486
+      </span>
487
+      <span slot="footer" class="dialog-footer">
488
+        <el-button @click="drugDialogVisible = false">取 消</el-button>
489
+        <el-button type="primary" @click="drugDialogVisible = false">确 定</el-button>
490
+      </span>
491
+    </el-dialog>
492
+   </div>
446 493
 </template>
447 494
 
448 495
 <script>
@@ -455,7 +502,9 @@ import {
455 502
   getDrugWarehouseOutList,
456 503
   getDrugWarehouseOutInfo,
457 504
   getDrugWarehouseOutUser,
458
-  getDrugAutoMaticList
505
+  getDrugAutoMaticList,
506
+  getSinleOrderDetail,
507
+  getAutoDrugDetail
459 508
 } from "@/api/drug/drug_stock";
460 509
 import BreadCrumb from "../../components/bread-crumb";
461 510
 import { getInitializtion } from '@/api/stock'
@@ -495,7 +544,7 @@ export default {
495 544
         { path: false, name: "出库单" }
496 545
       ],
497 546
       page: 1,
498
-      limit: 10,
547
+      limit: 5,
499 548
       checked: false,
500 549
       total: 0,
501 550
       pageTotal: 0,
@@ -527,6 +576,8 @@ export default {
527 576
       drugTypeList:[],
528 577
       tableShow:false,
529 578
       manufacturerList:[],
579
+      drugDialogVisible:false,
580
+      order_id:0,
530 581
     };
531 582
   },
532 583
   methods: {
@@ -667,10 +718,11 @@ export default {
667 718
     },
668 719
 
669 720
     handleEdit: function(index, row) {
670
-      this.$router.push({
671
-        name: "drugStockOutDetail",
672
-        query: { id: row.id, type: this.type }
673
-      });
721
+      // this.$router.push({
722
+      //   name: "drugStockOutDetail",
723
+      //   query: { id: row.id, type: this.type }
724
+      // });
725
+      this.$router.push({path:"/drug/out/drugstockoutorderedit?id="+row.id+"&type="+this.type})
674 726
     },
675 727
     // handleSearch(id,time,warehouse_out_order_number){
676 728
     //   this.warehousingOutInfo.warehousingOutData = []
@@ -680,10 +732,12 @@ export default {
680 732
     //   this.dialogVisible = true
681 733
     // },
682 734
     handleSearch(val){
735
+       console.log("val2222222222",val)
683 736
        this.getInitializtion()
684
-       this.GetOrderDetail(val.id)
737
+       this.getSinleOrderDetail(val.id)
685 738
        this.list = []
686 739
        this.getDrugAutoMaticList(val.id,val.time,val.warehouse_out_order_number)
740
+
687 741
     },
688 742
     GetOrderDetail(order_id) {
689 743
         const params = {
@@ -702,7 +756,7 @@ export default {
702 756
               this.tableList.push(response.data.data.list[i])
703 757
 
704 758
             }
705
-            console.log("详情",this.tableList)
759
+            console.log("详情222",this.tableList)
706 760
             this.warehousingOutInfo.info = response.data.data.info
707 761
             var manulist = response.data.data.manulist
708 762
             this.manufacturerList = manulist
@@ -757,6 +811,7 @@ export default {
757 811
       }
758 812
     },
759 813
     select(selection) {
814
+      this.order_id = selection[0].id
760 815
       this.selectedTableData = selection;
761 816
     },
762 817
     batchDelete() {
@@ -900,6 +955,8 @@ export default {
900 955
            var drugList = response.data.data.drugList
901 956
            console.log("药品列表",drugList)
902 957
            this.drugList = drugList
958
+           var manulist = response.data.data.manufacturerList
959
+           this.manufacturerList = manulist
903 960
          }
904 961
       })
905 962
     },
@@ -958,7 +1015,54 @@ export default {
958 1015
        }
959 1016
      }
960 1017
      return name
1018
+   },
1019
+   getSinleOrderDetail(id){
1020
+       var params = {
1021
+         id:id,
1022
+       }
1023
+     getSinleOrderDetail(params).then(response=>{
1024
+        if(response.data.state == 1){
1025
+          this.tableShow = true
1026
+          this.tableList = []
1027
+          var list =  response.data.data.list
1028
+          console.log("list",list)
1029
+          this.tableList = list
1030
+        }
1031
+     })
1032
+   },
1033
+   toDetail(val){
1034
+    
1035
+     console.log("val",val)
1036
+     var params = {
1037
+       drug_id:val.drug_id,
1038
+       record_time:val.sys_record_time,
1039
+     }
1040
+     this.userList = []
1041
+     getAutoDrugDetail(params).then(response=>{
1042
+       if(response.data.state == 1){
1043
+        this.drugDialogVisible = true
1044
+        var total = 0
1045
+        for (let i = 0; i < response.data.data.list.length; i++) {
1046
+          var obj = response.data.data.list[i]
1047
+          obj['is_total'] = 0
1048
+          this.userList.push(obj)
1049
+          total = total + response.data.data.list[i].count
1050
+        }
1051
+        this.userList.push({
1052
+          is_total: 1,
1053
+          total: total,
1054
+        })
1055
+       }
1056
+     })
1057
+   },
1058
+   toPrint(){
1059
+     if(this.order_id == 0){
1060
+        this.$message.error("请选择出库单")
1061
+     }else{
1062
+       this.$router.push({path:"/stock/drugStockOutOrderDetailPrint?id="+this.order_id})
1063
+     }
961 1064
    }
1065
+    
962 1066
   }
963 1067
 };
964 1068
 </script>

+ 23 - 58
src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue 查看文件

@@ -25,13 +25,7 @@
25 25
     </div>
26 26
 
27 27
     <div class="app-container">
28
-    <!---->
29
-      <!--<stock-in-dialog-->
30
-        <!--ref="dialog" :propForm="propForm"-->
31
-        <!--:visibility="isVisibility"-->
32
-        <!--v-on:dialog-comfirm="comfirm"-->
33
-        <!--v-on:dialog-cancle="cancle"-->
34
-      <!--&gt;</stock-in-dialog>-->
28
+  
35 29
 
36 30
       <drugs-stock-dialog
37 31
         ref="dialog" :propForm="propForm"
@@ -57,7 +51,7 @@
57 51
         ></el-date-picker>
58 52
       </div>
59 53
 
60
-      <div class="cell clearfix">
54
+      <!-- <div class="cell clearfix">
61 55
         <label class="title"><span class="name">经销商</span> : </label>
62 56
         <el-select
63 57
           size="small"
@@ -75,9 +69,9 @@
75 69
           >
76 70
           </el-option>
77 71
         </el-select>
78
-      </div>
72
+      </div> -->
79 73
 
80
-      <div class="cell clearfix">
74
+      <!-- <div class="cell clearfix">
81 75
         <label class="title"><span class="name">厂商</span> : </label>
82 76
         <el-select
83 77
           size="small"
@@ -95,7 +89,7 @@
95 89
           >
96 90
           </el-option>
97 91
         </el-select>
98
-      </div>
92
+      </div> -->
99 93
 
100 94
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
101 95
         <el-table
@@ -126,7 +120,7 @@
126 120
                   >
127 121
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
128 122
                   <template slot-scope="{ item }">
129
-                    <div class="name">{{ item.drug_name }}</div>
123
+                    <div class="name">{{ item.drug_name + item.dose + "*"+ item.dose_unit +item.min_number + item.min_unit +"/" + item.max_unit}}</div>
130 124
                   </template>
131 125
                  </el-autocomplete>
132 126
               </el-form-item>
@@ -161,7 +155,7 @@
161 155
               </el-form-item>
162 156
             </template>
163 157
           </el-table-column>
164
-          <el-table-column align="center" width="150">
158
+          <!-- <el-table-column align="center" width="150">
165 159
             <template slot="header" slot-scope="scope" >
166 160
                   <span>批号</span>
167 161
               </template>
@@ -173,7 +167,7 @@
173 167
                     ></el-input>
174 168
                   </el-form-item>
175 169
               </template>
176
-          </el-table-column>
170
+          </el-table-column> -->
177 171
           <el-table-column width="120" align="center">
178 172
             <template slot="header" slot-scope="scope">
179 173
               <span>出库数量<span style="color: red">*</span></span>
@@ -216,47 +210,12 @@
216 210
             </template>
217 211
           </el-table-column>
218 212
 
219
-        
220
-         
221
-          
222
-          <!-- <el-table-column width="80" align="center">
223
-            <template slot="header" slot-scope="scope">
224
-              <span>单位<span style="color: red">*</span></span>
225
-            </template>
226
-            <template slot-scope="scope">
227
-              <el-select v-model="scope.row.min_unit" style="width:100px;" placeholder="请选择">
228
-                <el-option
229
-                  v-for="(item,index) in getDataConfig('hemodialysis','units')"
230
-                  :key="index"
231
-                  :label="item.name"
232
-                  :value="item.name">
233
-                </el-option>
234
-              </el-select>
235
-            </template>
236
-          </el-table-column>
237
-          -->
238
-
239
-          
240
-
241 213
           <el-table-column label="总价" width="80" align="center">
242 214
             <template slot-scope="scope">
243 215
               {{ calculate(scope.row.last_price * scope.row.count) }}
244 216
             </template>
245 217
           </el-table-column>
246
-
247
-
248
-          <!-- <el-table-column label="零售价" align="center" width="150">
249
-            <template slot-scope="scope">
250
-              {{ scope.row.retail_price }}
251
-            </template>
252
-          </el-table-column>
253
-
254
-          <el-table-column label="零价总价" align="center" width="150">
255
-            <template slot-scope="scope">
256
-              {{ calculate(scope.row.retail_price * scope.row.count) }}
257
-            </template>
258
-          </el-table-column> -->
259
-          
218
+   
260 219
           <el-table-column label="生产厂家" width="140" align="center">
261 220
             <template slot-scope="scope">
262 221
                <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
@@ -297,7 +256,7 @@
297 256
               ></el-date-picker>
298 257
             </template>
299 258
           </el-table-column>
300
-        
259
+<!--         
301 260
         <el-table-column align="center" width="150" label="批准文号">
302 261
             <template slot-scope="scope">
303 262
               <el-form-item style="padding-top: 20px">
@@ -307,7 +266,7 @@
307 266
                 ></el-input>
308 267
               </el-form-item>
309 268
             </template>
310
-          </el-table-column>
269
+          </el-table-column> -->
311 270
 
312 271
           <el-table-column label="备注" width="120" align="center">
313 272
             <template slot-scope="scope">
@@ -546,6 +505,9 @@ export default {
546 505
       tempObj["retail_price"] = "";
547 506
       tempObj["remark"] = "";
548 507
       tempObj["min_unit"] = "";
508
+      tempObj['dose'] = ""
509
+      tempObj['dose_unit'] = ""
510
+      tempObj["min_number"] = ""
549 511
       this.recordInfo.recordData.push(tempObj);
550 512
     },
551 513
     handleDelete: function(index, row) {
@@ -654,7 +616,7 @@ export default {
654 616
             stockOut: this.recordInfo.recordData
655 617
           };
656 618
           console.log("params222222",params)
657
-      
619
+          
658 620
           postDrugWarehouseOut(
659 621
             params,
660 622
             this.warehouse_out_time,
@@ -730,7 +692,7 @@ export default {
730 692
             this.recordInfo.recordData[i].max_unit = val.max_unit
731 693
             this.recordInfo.recordData[i].min_number = val.min_number
732 694
             this.recordInfo.recordData[i].min_unit = val.min_unit
733
-            this.recordInfo.recordData[i].packing_unit = val.packing_unit
695
+         
734 696
             this.recordInfo.recordData[i].number = val.number
735 697
             this.recordInfo.recordData[i].last_price = val.last_price
736 698
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
@@ -816,18 +778,18 @@ export default {
816 778
       (nowDay < 10 ? "0" + nowDay : nowDay);
817 779
     const tempObj = {};
818 780
     tempObj["drug_id"] = 0;
819
-    tempObj['dosage'] = ''
820 781
     tempObj['max_unit'] = ''
821
-    tempObj['unval'] = ''
822 782
     tempObj['min_unit'] = '',
823
-    tempObj['packing_unit'] = '',
824 783
     tempObj["return_count"] = 0;
825 784
     tempObj["price"] = "";
826 785
     tempObj["remark"] = "";
827
-    tempObj["min_unit"] = "";
828 786
     tempObj['manufacturer'] = ''
829 787
     tempObj['batch_number'] = ''
830 788
     tempObj['drug_type'] = ''
789
+    tempObj['dose'] = ""
790
+    tempObj['dose_unit'] = ""
791
+    tempObj["min_number"] = ""
792
+    
831 793
     this.recordInfo.recordData.push(tempObj);
832 794
     this.GetConfigInfo();
833 795
     this.propForm.goodUnit = this.$store.getters.good_unit;
@@ -861,4 +823,7 @@ export default {
861 823
 .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
862 824
   background: #6fb5fa;
863 825
 }
826
+.el-autocomplete-suggestion{
827
+  width: 400px !important;
828
+}
864 829
 </style>

+ 211 - 52
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue 查看文件

@@ -38,16 +38,16 @@
38 38
       >
39 39
       </drugs-stock-dialog>
40 40
 
41
-      <div class="cell clearfix">
41
+      <!-- <div class="cell clearfix">
42 42
         <label class="title"><span class="name">出库时间</span> : </label>
43 43
         <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false"
44 44
                         style="width: 196px;"
45 45
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
46 46
                         value-format="yyyy-MM-dd"></el-date-picker>
47
-      </div>
47
+      </div> -->
48 48
 
49 49
 
50
-      <div class="cell clearfix">
50
+      <!-- <div class="cell clearfix">
51 51
         <label class="title"><span class="name">经销商</span> : </label>
52 52
         <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer">
53 53
           <el-option
@@ -57,9 +57,9 @@
57 57
             :value="option.id">
58 58
           </el-option>
59 59
         </el-select>
60
-      </div>
61
-
60
+      </div> -->
62 61
 
62
+<!-- 
63 63
       <div class="cell clearfix">
64 64
         <label class="title"><span class="name">厂商</span> : </label>
65 65
 
@@ -71,99 +71,183 @@
71 71
             :value="option.id">
72 72
           </el-option>
73 73
         </el-select>
74
-      </div>
74
+      </div> -->
75 75
 
76 76
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
77 77
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
78 78
                   max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
79 79
         >
80 80
 
81
-          <el-table-column align="center" width="200">
81
+          <el-table-column align="center" width="150px">
82 82
             <template slot="header" slot-scope="scope">
83 83
               <span>药品名称<span style="color: red">*</span></span>
84 84
             </template>
85 85
 
86 86
             <template slot-scope="scope">
87 87
               <el-form-item style="padding-top: 15px">
88
-                <el-input
89
-                  placeholder="请输入药品名称"
90
-                  v-model="scope.row.drug_id"
91
-                  :value="typeName(scope.row.drug_id)"
92
-                  @focus="showDialog(scope.$index, scope.row)"
93
-                ></el-input>
88
+                 <el-autocomplete
89
+                    class="checkSearch"
90
+                    popper-class="my-autocomplete"
91
+                    v-model="scope.row.drug_name"
92
+                    :fetch-suggestions="querySearchAsync"
93
+                    :trigger-on-focus="false"
94
+                    placeholder="请输入药品名称"
95
+                    @select="handleSelect"
96
+                    @input="changeDrugName(scope.$index)"
97
+                    style="width:160px;"
98
+                  >
99
+                    <i class="el-icon-search el-input__icon" slot="suffix"></i>
100
+                  <template slot-scope="{ item }">
101
+                    <div class="name">{{ item.drug_name + item.dose + "*"+ item.dose_unit +item.min_number + item.min_unit +"/" + item.max_unit}}</div>
102
+                  </template>
103
+                 </el-autocomplete>
94 104
               </el-form-item>
95 105
             </template>
96 106
           </el-table-column>
97
-          <el-table-column align="center" width="200">
107
+          <el-table-column align="center" width="140">
108
+            <template slot="header" slot-scope="scope">
109
+              <span>药品类型</span>
110
+            </template>
111
+             <template slot-scope="scope">
112
+               <el-select v-model="scope.row.drug_type" filterable placeholder="请选择厂商">
113
+                <el-option
114
+                  v-for="(option, index) in drugTypeList"
115
+                  :key="index"
116
+                  :label="option.name"
117
+                  :value="option.id">
118
+                </el-option>
119
+               </el-select>
120
+            </template>
121
+          </el-table-column>
122
+          <el-table-column align="center" width="140">
98 123
             <template slot="header" slot-scope="scope">
99
-              <span>规格名称<span style="color: red">*</span></span>
124
+              <span>规格&单位</span>
100 125
             </template>
101 126
             <template slot-scope="scope">
102
-              <el-form-item style="padding-top: 15px">
127
+              <el-form-item style="padding-top: 20px">
103 128
                 <el-input
104
-                  placeholder="请输入规格名称"
105
-                  v-model="scope.row.drug_id"
106
-                  :value="specificationName(scope.row.drug_id)"
107
-                  @focus="showDialog(scope.$index, scope.row)"
129
+                  :disabled="true"
130
+                  placeholder="请输入规格&单位"
131
+                  v-model="scope.row.name"
108 132
                 ></el-input>
109 133
               </el-form-item>
110 134
             </template>
111 135
           </el-table-column>
112
-
113
-
114
-          <el-table-column min-width="23" align="center">
136
+         <!-- <el-table-column align="center" width="150">
137
+            <template slot="header" slot-scope="scope" >
138
+                  <span>批号</span>
139
+              </template>
140
+                <template slot-scope="scope">
141
+                  <el-form-item style="padding-top: 20px">
142
+                    <el-input
143
+                      placeholder="请输入批号"
144
+                      v-model="scope.row.batch_number"
145
+                    ></el-input>
146
+                  </el-form-item>
147
+              </template>
148
+          </el-table-column> -->
149
+           <el-table-column width="120" align="center">
115 150
             <template slot="header" slot-scope="scope">
116
-              <span>进价<span style="color: red">*</span></span>
151
+              <span>出库数量<span style="color: red">*</span></span>
117 152
             </template>
118 153
             <template slot-scope="scope">
119
-              <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
120
-              <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price'
121
-                            style="padding-top: 17px">
122
-                <el-input type="number" v-model="scope.row.price"></el-input>
154
+              <el-form-item
155
+                :prop="'recordData.' + scope.$index + '.count'"
156
+                :rules="tableRules.count"
157
+                style="padding-top: 20px"
158
+              >
159
+                <div style="display:flex;">
160
+                  <el-input
161
+                    placeholder="请输入出库数量"
162
+                    type="number"
163
+                    v-model="scope.row.count"
164
+                  ></el-input>
165
+                  {{scope.row.packing_unit}}
166
+                </div>
123 167
               </el-form-item>
124
-
125
-
168
+              
126 169
             </template>
127 170
           </el-table-column>
128
-
129
-          <el-table-column min-width="23" align="center">
171
+         <el-table-column width="120" align="center">
130 172
             <template slot="header" slot-scope="scope">
131
-              <span>出库数量<span style="color: red">*</span></span>
173
+              <span>出货价<span style="color: red">*</span></span>
132 174
             </template>
133 175
             <template slot-scope="scope">
134
-              <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
135
-                            style="padding-top: 17px">
136
-                <el-input type="number" v-model="scope.row.count"></el-input>
176
+            
177
+              <el-form-item
178
+                :prop="'recordData.' + scope.$index + '.last_price'"
179
+                :rules="tableRules.last_price"
180
+                style="padding-top: 20px"
181
+              >
182
+                <el-input
183
+                  placeholder="请输入出货价"
184
+                  type="number"
185
+                  v-model="scope.row.last_price"
186
+                ></el-input>
137 187
               </el-form-item>
138 188
             </template>
139 189
           </el-table-column>
140
-
141
-          <el-table-column label="进价总价" min-width="20" align="center">
190
+           <el-table-column label="总价" width="80" align="center">
142 191
             <template slot-scope="scope">
143
-              {{calculate(scope.row.price*scope.row.count)}}
192
+              {{ calculate(scope.row.last_price * scope.row.count) }}
144 193
             </template>
145 194
           </el-table-column>
146
-
147
-
148
-          <el-table-column label="零价" align="center" width="150">
195
+          <el-table-column label="生产厂家" width="140" align="center">
149 196
             <template slot-scope="scope">
150
-              {{ scope.row.retail_price }}
197
+               <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
198
+                <el-option
199
+                  v-for="(option, index) in manufacturerList"
200
+                  :key="index"
201
+                  :label="option.manufacturer_name"
202
+                  :value="option.id">
203
+                </el-option>
204
+               </el-select>
151 205
             </template>
152 206
           </el-table-column>
153
-
154
-          <el-table-column label="零价总价" align="center" width="150">
207
+            <el-table-column label="生产日期" width="180" align="center">
155 208
             <template slot-scope="scope">
156
-              {{ calculate(scope.row.retail_price * scope.row.count) }}
209
+              <el-date-picker
210
+                prefix-icon="el-icon-date"
211
+                style="width: 145px"
212
+                v-model="scope.row.product_date"
213
+                type="date"
214
+                placeholder="选择日期时间"
215
+                format="yyyy-MM-dd"
216
+                value-format="yyyy-MM-dd"
217
+              ></el-date-picker>
157 218
             </template>
158 219
           </el-table-column>
220
+          <el-table-column label="有效日期" width="180" align="center">
221
+            <template slot-scope="scope">
222
+              <el-date-picker
223
+                prefix-icon="el-icon-date"
224
+                style="width: 145px"
225
+                v-model="scope.row.expiry_date"
226
+                type="date"
227
+                placeholder="选择日期时间"
228
+                format="yyyy-MM-dd"
229
+                value-format="yyyy-MM-dd"
230
+              ></el-date-picker>
231
+            </template>
232
+          </el-table-column>
233
+           <!-- <el-table-column align="center" width="150" label="批准文号">
234
+            <template slot-scope="scope">
235
+              <el-form-item style="padding-top: 20px">
236
+                <el-input
237
+                  placeholder="请输入批准文号"
238
+                  v-model="scope.row.number"
239
+                ></el-input>
240
+              </el-form-item>
241
+            </template>
242
+          </el-table-column> -->
159 243
 
160
-
161
-          <el-table-column label="备注" min-width="20" align="center">
244
+          <el-table-column label="备注" width="120" align="center">
162 245
             <template slot-scope="scope">
163 246
               <el-input v-model="scope.row.remark"></el-input>
164 247
             </template>
165 248
           </el-table-column>
166
-          <el-table-column label="操作" align="center" min-width="20">
249
+
250
+          <el-table-column label="操作" align="center" width="150" fixed="right">
167 251
             <template slot-scope="scope">
168 252
               <el-tooltip class="item" effect="dark" content="新增" placement="top">
169 253
 
@@ -200,7 +284,8 @@
200 284
   import { deleteDrugWarehouseOutInfo, editDrugWarehouseoutInfo, getDrugSalesReturnConfig, getDrugWarehouseOutInfo,GetAllConfig,GetAllDrugInfoByID } from '@/api/drug/drug_stock'
201 285
   import BreadCrumb from '../../components/bread-crumb'
202 286
   import DrugsStockDialog from './drugsStockDialog/index'
203
-
287
+  import {postSearchDrugList } from "@/api/data"
288
+  import { getDictionaryDataConfig } from "@/utils/data";
204 289
   export default {
205 290
     components: { DrugsStockDialog, BreadCrumb},
206 291
     name: 'salesReturnEdit',
@@ -264,6 +349,8 @@
264 349
         dealer: [],
265 350
         goodType: [],
266 351
         goodInfo:[],
352
+        drugTypeList:[],
353
+        manufacturerList:[]
267 354
       }
268 355
     },
269 356
     methods: {
@@ -461,6 +548,7 @@
461 548
             const params = {
462 549
               'stockOut': this.recordInfo.recordData
463 550
             }
551
+            console.log("params----",params)
464 552
             editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
465 553
               if (response.data.state == 0) {
466 554
                 this.$message.error(response.data.msg)
@@ -474,7 +562,8 @@
474 562
             return false
475 563
           }
476 564
         })
477
-      }, GetOrderDetail: function(order_id) {
565
+      }, 
566
+      GetOrderDetail: function(order_id) {
478 567
         const params = {
479 568
           'id': order_id
480 569
         }
@@ -483,12 +572,28 @@
483 572
             this.$message.error(response.data.msg)
484 573
             return false
485 574
           } else {
575
+             console.log("list222222",response.data.data.list)
576
+            var manulist = response.data.data.manulist
486 577
             for (let i = 0; i < response.data.data.list.length; i++) {
578
+              response.data.data.list[i].drug_name = response.data.data.list[i].drug.drug_name,
579
+              response.data.data.list[i].drug_type = response.data.data.list[i].drug.drug_type
580
+              response.data.data.list[i].name = response.data.data.list[i].drug.dose + response.data.data.list[i].drug.dose_unit +"*"+response.data.data.list[i].drug.min_number+response.data.data.list[i].drug.min_unit + "/" + response.data.data.list[i].drug.max_unit
581
+              response.data.data.list[i].last_price = response.data.data.list[i].drug.last_price.toString()
582
+              response.data.data.list[i].number = response.data.data.list[i].drug.number
583
+              response.data.data.list[i].manufacturer = response.data.data.list[i].drug.manufacturer
487 584
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
488 585
               response.data.data.list[i].retail_price = response.data.data.list[i].retail_price.toString()
489 586
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
490 587
               this.recordInfo.recordData.push(response.data.data.list[i])
491 588
             }
589
+             for(let j=0;j<this.recordInfo.recordData.length;j++){
590
+               for(let i=0;i<manulist.length;i++){
591
+                  if(this.recordInfo.recordData[j].manufacturer == manulist[i].id){
592
+                     this.recordInfo.recordData[j].manufacturer = manulist[i].manufacturer_name
593
+                  }
594
+               }
595
+              }
596
+
492 597
             this.warehouseOut = response.data.data.info
493 598
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
494 599
             this.form.manufacturer = this.warehouseOut.manufacturer
@@ -517,9 +622,63 @@
517 622
         this.propForm.manufacturer = val
518 623
       }, changeDealer(val) {
519 624
         this.propForm.dealer = val
520
-      }
625
+      },
626
+      querySearchAsync(keyword, cb) {
627
+        let key = '';
628
+        if (keyword != undefined) {
629
+          key = keyword
630
+        }
631
+        let searchArray = [];
632
+        postSearchDrugList(key).then(response => {
633
+          if (response.data.state == 1) {
634
+            searchArray = response.data.data.list;
635
+            
636
+             var list = response.data.data.list
637
+             console.log("猎豹22222222222",list)
638
+
639
+             this.drugList = list
640
+             var manufacturerList = response.data.data.manufacturerList
641
+             this.manufacturerList = manufacturerList
642
+             for(let i=0;i<this.drugList.length;i++){
643
+             
644
+                for(let j=0;j<this.manufacturerList.length;j++){
645
+                  if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
646
+                     this.drugList[i].manufacturer = this.manufacturerList[j].manufacturer_name
647
+                  }
648
+                }
649
+             }
650
+           
651
+             cb(this.drugList)
652
+          } else {
653
+            cb([])
654
+          }
655
+        })
656
+      },
657
+     changeDrugName(val){
658
+        this.currentIndex = val
659
+      },
660
+      handleSelect(val){
661
+         for(let i=0;i<this.recordInfo.recordData.length;i++){
662
+           if(i == this.currentIndex){
663
+             this.recordInfo.recordData[i].drug_id  = val.id
664
+             this.recordInfo.recordData[i].drug_name = val.drug_name
665
+             this.recordInfo.recordData[i].drug_type = val.drug_type
666
+             this.recordInfo.recordData[i].name  = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
667
+             this.recordInfo.recordData[i].last_price = val.last_price
668
+             this.recordInfo.recordData[i].manufacturer =  val.manufacturer
669
+             this.recordInfo.recordData[i].batch_number = val.number
670
+             this.recordInfo.recordData[i].max_unit = val.max_unit
671
+             this.recordInfo.recordData[i].min_unit = val.min_unit
672
+           }
673
+        }
674
+        console.log("333333",this.recordInfo.recordData)
675
+      },
676
+      getDictionaryDataConfig(module, filed_name) {
677
+        return getDictionaryDataConfig(module, filed_name)
678
+      },
521 679
     },
522 680
     created() {
681
+      this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
523 682
       this.GetConfigInfo()
524 683
       this.propForm.goodUnit = this.$store.getters.good_unit
525 684
       const order_id = this.$route.query.id

+ 68 - 11
src/xt_pages/stock/drugs/query.vue 查看文件

@@ -68,7 +68,7 @@
68 68
             style="width: 200px;"
69 69
             class="filter-item"
70 70
             v-model.trim="keywords"
71
-            placeholder="商品名称/规格名称"
71
+            placeholder="药品名称"
72 72
           />
73 73
           <el-button
74 74
             size="small"
@@ -111,14 +111,19 @@
111 111
              {{getManufacturerList(scope.row.manufacturer)}}
112 112
            </template>
113 113
         </el-table-column>
114
+        <el-table-column prop="drug_name" label="入库数量" align="center">
115
+           <template slot-scope="scope">
116
+              {{getInCount(scope.row.drug_id)}}
117
+           </template>
118
+        </el-table-column>
119
+        <el-table-column prop="drug_name" label="出库数量" align="center">
120
+           <template slot-scope="scope">
121
+             {{getOutCount(scope.row.drug_id) + getAutoCount(scope.row.drug_id)}}
122
+           </template>
123
+        </el-table-column>
114 124
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
115 125
            <template slot-scope="scope">
116
-            <span v-if="scope.row.stock_max_number!=''">
117
-              {{scope.row.stock_max_number}}{{scope.row.max_unit}}
118
-              <span v-if="scope.row.stock_min_number!=''">
119
-                {{scope.row.stock_min_number}}{{scope.row.min_unit}}
120
-              </span>
121
-            </span> 
126
+            {{getInCount(scope.row.drug_id) - getOutCount(scope.row.drug_id) - getAutoCount(scope.row.drug_id)}}
122 127
            </template>
123 128
         </el-table-column>
124 129
         <el-table-column prop="drug_name" label="操作" align="center">
@@ -163,7 +168,7 @@
163 168
 <script>
164 169
   import { uParseTime } from '@/utils/tools'
165 170
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
166
-  import { getAllDrugStockQueryList,getDrugStockList } from '@/api/drug/drug_stock'
171
+  import { getAllDrugStockQueryList,getDrugStockList,getDrugCountList } from '@/api/drug/drug_stock'
167 172
   import SettingDialog from './settingDialog/index'
168 173
   import { getDictionaryDataConfig } from "@/utils/data";
169 174
   export default {
@@ -174,6 +179,7 @@
174 179
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
175 180
   
176 181
       this.getlist()
182
+      this.getDrugCountList()
177 183
     },
178 184
     components: {
179 185
       SettingDialog,
@@ -208,7 +214,11 @@
208 214
         ],
209 215
         drugTypeList:[],
210 216
         tableList:[],
211
-        manufacturerList:[]
217
+        manufacturerList:[],
218
+        countList:[],
219
+        outCountList:[],
220
+        autoCountList:[],
221
+        keyword:"",
212 222
       }
213 223
     },
214 224
     methods: {
@@ -396,7 +406,6 @@
396 406
       showCancelStockDetailDialog: function() {
397 407
       },
398 408
       search: function() {
399
-        // this.GetAllDrugStockQueryList()
400 409
         this.getlist()
401 410
       }, 
402 411
       setting: function() {
@@ -449,7 +458,7 @@
449 458
           start_time:this.start_time,
450 459
           end_time:this.end_time,
451 460
         }
452
-        
461
+         
453 462
         getDrugStockList(params).then(response=>{
454 463
           if(response.data.state == 1){
455 464
              var list = response.data.data.list
@@ -489,6 +498,54 @@
489 498
       },
490 499
       handleBatch(id){
491 500
         this.$router.push({path:'/drugstock/in/drugbatchnumber?drug_id='+id})
501
+      },
502
+      getDrugCountList(){
503
+         var params = {
504
+          keyword: this.keywords,
505
+          start_time:this.start_time,
506
+          end_time:this.end_time,
507
+         }
508
+        getDrugCountList(params).then(response=>{
509
+          if(response.data.state == 1){
510
+            var countlist =  response.data.data.countList
511
+            console.log("入库数据",countlist)
512
+            this.countList = countlist
513
+            var outcountlist = response.data.data.outCountList
514
+            console.log("出库数据",outcountlist)
515
+            this.outCountList = outcountlist
516
+            var aucountlist = response.data.data.auCountList
517
+            console.log("自动数据",aucountlist)
518
+            this.autoCountList = aucountlist
519
+          }
520
+        })
521
+      },
522
+      getInCount(id){
523
+        var count = ""
524
+        for(let i=0;i<this.countList.length;i++){
525
+           if(id == this.countList[i].drug_id){
526
+             count = this.countList[i].count
527
+           }
528
+        }
529
+        return count
530
+      },
531
+
532
+      getOutCount(id){
533
+        var count = ""
534
+        for(let i=0;i<this.outCountList.length;i++){
535
+           if(id == this.outCountList[i].drug_id){
536
+               count = this.outCountList[i].count
537
+           }
538
+        }
539
+        return count
540
+      },
541
+      getAutoCount(id){
542
+        var count= ""
543
+        for(let i=0;i<this.autoCountList.length;i++){
544
+          if(id == this.autoCountList[i].drug_id){
545
+            count = this.autoCountList[i].count
546
+          }
547
+        }
548
+        return count
492 549
       }
493 550
     }
494 551
   }

+ 31 - 35
src/xt_pages/stock/stockBatchNumber.vue 查看文件

@@ -38,7 +38,7 @@
38 38
               @change="endTimeChange"
39 39
           ></el-date-picker>
40 40
 
41
-        <span>出入库方式:</span>
41
+        <!-- <span>出入库方式:</span>
42 42
         <el-select v-model="stock_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
43 43
             <el-option
44 44
               v-for="(item,index) in stockType"
@@ -46,7 +46,7 @@
46 46
               :label="item.name"
47 47
               :value="item.id">
48 48
             </el-option>
49
-        </el-select>
49
+        </el-select> -->
50 50
         
51 51
         
52 52
       </div>
@@ -79,19 +79,19 @@
79 79
         </el-table-column>
80 80
          <el-table-column prop="drug_name" label="批号" align="center">
81 81
            <template slot-scope="scope" >
82
-             <span v-if="scope.row.stock_way == 4 && scope.row.stock_count!=0">{{scope.row.stock_count}} </span>
82
+             <span v-if="scope.row.stock_way == 4">{{scope.row.number}} </span>
83 83
            </template>
84 84
         </el-table-column>
85 85
         <el-table-column prop="drug_name" label="入库数量" align="center">
86 86
            <template slot-scope="scope">
87
-             <span v-if="scope.row.stock_way == 4"> {{scope.row.price}}</span>
88
-             <span v-if="scope.row.stock_way == 2">{{scope.row.price}}</span>
87
+             <span v-if="scope.row.stock_way == 4"> {{scope.row.warehousing_count}}</span>
88
+             <span v-if="scope.row.stock_way == 2">{{scope.row.count}}</span>
89 89
            </template>
90 90
         </el-table-column>
91
-         <el-table-column prop="drug_name" label="进货价" align="center">
91
+         <el-table-column prop="drug_name" label="进货价" align="center">
92 92
            <template slot-scope="scope">
93
-             <span v-if="scope.row.stock_way == 4"> {{getTime(scope.row.expiry_date)}}</span>
94
-             <span v-if="scope.row.stock_way == 2">{{getTime(scope.row.expiry_date)}}</span>
93
+             <span v-if="scope.row.stock_way == 4"> {{scope.row.price}}</span>
94
+             <span v-if="scope.row.stock_way == 2">{{scope.row.price}}</span>
95 95
            </template>
96 96
         </el-table-column>
97 97
        </el-table>
@@ -114,7 +114,7 @@
114 114
 <script>
115 115
   import { uParseTime } from '@/utils/tools'
116 116
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
117
-  import {getStockInList,getStockOutList} from "@/api/drug/drug_stock";
117
+  import {getStockInList} from "@/api/drug/drug_stock";
118 118
   export default {
119 119
     name: 'stockIn',
120 120
     created() {
@@ -166,15 +166,13 @@
166 166
       }
167 167
     },
168 168
     methods:{
169
-    
170
-     
171 169
        handleSizeChange(val) {
172 170
         this.limit = val
173
-        this.GetAllDrugStockQueryList()
171
+        this.getlist()
174 172
       },
175 173
       handleCurrentChange(val) {
176 174
         this.page = val
177
-        this.GetAllDrugStockQueryList()
175
+        this.getlist()
178 176
       },
179 177
         
180 178
     startTimeChange: function(val) {
@@ -184,7 +182,7 @@
184 182
         this.$message.error("开始时间不能大于结束时间");
185 183
         this.start_time = "";
186 184
       } else {
187
-        this.GetAllDrugStockQueryList();
185
+        this.getlist()
188 186
       }
189 187
     },
190 188
     endTimeChange: function(val) {
@@ -193,7 +191,7 @@
193 191
         this.$message.error("结束时间不能小于开始时间");
194 192
         this.end_time = "";
195 193
       } else {
196
-        this.GetAllDrugStockQueryList();
194
+       this.getlist()
197 195
       }
198 196
      },
199 197
      changeDrug(){},
@@ -229,35 +227,33 @@
229 227
          if(response.data.state == 1){
230 228
            var list = response.data.data.list
231 229
            console.log("入库数据",list)
230
+           for(let i=0;i<list.length;i++){
231
+             list[i].stock_way = 4
232
+           }
232 233
            this.tableList = list
233 234
            var total = response.data.data.total
234 235
            this.total = total
235 236
            console.log("入库数据",this.tableList)
236 237
            var manufacturerList = response.data.data.manufacturerList
237 238
            this.manufacturerList = manufacturerList
239
+
240
+          // var outlist =  response.data.data.outList
241
+          // console.log("outlist",outlist)
242
+          // for(let i=0;i<outlist.length;i++){
243
+          //     outlist[i].stock_way = 2
244
+          //     this.tableList.push(outlist[i])
245
+          // }
246
+          
247
+           
238 248
          }
239 249
       })
240 250
      },
241
-    //  getOutList(){
242
-    //   var params= {
243
-    //       limit:this.limit,
244
-    //       page:this.page,
245
-    //       id:this.$route.query.id,
246
-    //       start_time:this.start_time,
247
-    //       end_time:this.end_time, 
248
-    //     } 
249
-    //    getStockOutList(params).then(response=>{
250
-    //       if(response.data.state == 1){
251
-    //          var outlist = response.data.data.outList
252
-    //          console.log("出库数据",outlist)
253
-    //          for(let i=0;i<outlist.length;i++){
254
-    //            outlist[i].stock_way = 2
255
-    //            this.tableList.push(outlist[i])
256
-    //          }
257
-    //          console.log("hhhhhhhhhhh",this.tableList)
258
-    //       }
259
-    //    })  
260
-    //  }
251
+     getTimestamp(time) {
252
+      // 把时间日期转成时间戳
253
+      return new Date(time).getTime() / 1000;
254
+     },
255
+     
256
+
261 257
     }
262 258
   }
263 259
 </script>

+ 78 - 41
src/xt_pages/stock/stockFlow.vue 查看文件

@@ -6,8 +6,9 @@
6 6
     <div class="app-container ">
7 7
       <div class="cell clearfix">
8 8
        耗材名称:{{this.$route.query.good_name}}
9
-       <!-- 库存:
10
-       厂家: -->
9
+       库存:{{getInCount(this.$route.query.id)}}
10
+       <!-- 厂家:{{this.$route.query.manufacturer}}
11
+       规格: -->
11 12
       </div>
12 13
       <div class="cell clearfix">
13 14
         <span>日期查询:</span>
@@ -38,15 +39,15 @@
38 39
               @change="endTimeChange"
39 40
           ></el-date-picker>
40 41
 
41
-        <span>出入库方式:</span>
42
-        <el-select v-model="stock_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
42
+        <!-- <span>出入库方式:</span> -->
43
+        <!-- <el-select v-model="stock_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
43 44
             <el-option
44 45
               v-for="(item,index) in stockType"
45 46
               :key="index"
46 47
               :label="item.name"
47 48
               :value="item.id">
48 49
             </el-option>
49
-        </el-select>
50
+        </el-select> -->
50 51
         
51 52
         
52 53
       </div>
@@ -78,15 +79,16 @@
78 79
              {{getTime(scope.row.ctime)}}
79 80
            </template>
80 81
         </el-table-column>
81
-         <el-table-column prop="drug_name" label="入库数量"  align="center">
82
+         <el-table-column prop="drug_name" label="入库数量"  align="center">
82 83
            <template slot-scope="scope">
83 84
              <span v-if="scope.row.stock_way == 4 && scope.row.warehousing_count!=0"> {{scope.row.warehousing_count}}</span>
84 85
              <span v-if="scope.row.stock_way == 2 && scope.row.count!=0">{{scope.row.count}}</span>
85 86
            </template>
86 87
         </el-table-column>
87
-         <el-table-column prop="drug_name" label="库存剩余量"  align="center">
88
+         <el-table-column prop="drug_name" label="剩余库存量"  align="center">
88 89
            <template slot-scope="scope">
89
-             <span v-if="scope.row.stock_way == 4 && scope.row.stock_count!=0">{{scope.row.stock_count}} </span>
90
+             <!-- <span v-if="scope.row.stock_way == 4 && scope.row.stock_count!=0">{{scope.row.stock_count}} </span> -->
91
+              {{getInCount(scope.row.good_id)- getOutCount(scope.row.good_id) - getAutoCount(scope.row.good_id)}}
90 92
            </template>
91 93
         </el-table-column>
92 94
         <el-table-column prop="drug_name" label="进/出货单价"  align="center">
@@ -107,7 +109,7 @@
107 109
              <span v-if="scope.row.stock_way == 4">{{scope.row.number}}</span>
108 110
            </template>
109 111
         </el-table-column>
110
-        <el-table-column prop="drug_name" label="供应商" align="center">
112
+        <el-table-column prop="drug_name" label="生产商" align="center">
111 113
            <template slot-scope="scope">
112 114
              <span v-if="scope.row.stock_way == 4"> {{getManufacturer(scope.row.manufacturer)}}</span>
113 115
              <span v-if="scope.row.stock_way == 2">{{getManufacturer(scope.row.manufacturer)}}</span>
@@ -133,15 +135,15 @@
133 135
 <script>
134 136
   import { uParseTime } from '@/utils/tools'
135 137
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
136
-  import {getStockInList,getStockOutList} from "@/api/drug/drug_stock";
138
+  import {getStockInList} from "@/api/drug/drug_stock";
139
+  import {getStockDrugCount} from "@/api/stock"
137 140
   export default {
138 141
     name: 'stockIn',
139 142
     created() {
140
-    //   var drugCategory = getDictionaryDataConfig('system','drug_category')
141
-    //   this.drugCategory.push(...drugCategory)
142
-    //   this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
143
+     
143 144
       this.getlist()
144
-      this.getOutList()
145
+      this.getStockDrugCount()
146
+
145 147
     },
146 148
     components: {
147 149
       BreadCrumb
@@ -184,7 +186,11 @@
184 186
           {id:2,name:"自动出库"},
185 187
           {id:3,name:"入库"},
186 188
         ],
187
-      
189
+        countList:[],
190
+        outCountList:[],
191
+        autoCountList:[],
192
+        keywords:"",
193
+        obj:{},
188 194
       }
189 195
     },
190 196
     methods:{
@@ -192,11 +198,11 @@
192 198
      
193 199
        handleSizeChange(val) {
194 200
         this.limit = val
195
-        this.GetAllDrugStockQueryList()
201
+        this.getlist()
196 202
       },
197 203
       handleCurrentChange(val) {
198 204
         this.page = val
199
-        this.GetAllDrugStockQueryList()
205
+        this.getlist()
200 206
       },
201 207
         
202 208
     startTimeChange: function(val) {
@@ -206,7 +212,7 @@
206 212
         this.$message.error("开始时间不能大于结束时间");
207 213
         this.start_time = "";
208 214
       } else {
209
-        this.GetAllDrugStockQueryList();
215
+        this.getlist()
210 216
       }
211 217
     },
212 218
     endTimeChange: function(val) {
@@ -215,15 +221,14 @@
215 221
         this.$message.error("结束时间不能小于开始时间");
216 222
         this.end_time = "";
217 223
       } else {
218
-        this.GetAllDrugStockQueryList();
224
+       this.getlist()
219 225
       }
220 226
      },
221
-     changeDrug(){},
222 227
      getManufacturer(id){
223 228
        var name = ""
224 229
        for(let i=0;i<this.manufacturerList.length;i++){
225 230
          if(id == this.manufacturerList[i].id){
226
-            name = this.manufacturerList[i].name
231
+            name = this.manufacturerList[i].manufacturer_name
227 232
          }
228 233
        }
229 234
        return name
@@ -262,26 +267,58 @@
262 267
          }
263 268
       })
264 269
      },
265
-    //  getOutList(){
266
-    //   var params= {
267
-    //       limit:this.limit,
268
-    //       page:this.page,
269
-    //       id:this.$route.query.id,
270
-    //       start_time:this.start_time,
271
-    //       end_time:this.end_time, 
272
-    //     } 
273
-    //    getStockOutList(params).then(response=>{
274
-    //       if(response.data.state == 1){
275
-    //          var outlist = response.data.data.outList
276
-    //          console.log("出库数据",outlist)
277
-    //          for(let i=0;i<outlist.length;i++){
278
-    //            outlist[i].stock_way = 2
279
-    //            this.tableList.push(outlist[i])
280
-    //          }
281
-    //          console.log("hhhhhhhhhhh",this.tableList)
282
-    //       }
283
-    //    })  
284
-    //  }
270
+    getStockDrugCount(){
271
+        var params ={
272
+          keywords: this.keywords,
273
+          start_time:this.start_time,
274
+          end_time:this.end_time,
275
+        }
276
+      getStockDrugCount(params).then(response=>{
277
+         if(response.data.state == 1){
278
+           var count = response.data.data.count
279
+           console.log("详情入库统计",count)
280
+           this.countList = count
281
+           var outlist = response.data.data.outList
282
+           console.log("详情出库数量",outlist)
283
+           this.outCountList = outlist
284
+           var autoCount = response.data.data.autoCount
285
+           console.log("详情自动出库",autoCount)
286
+           this.autoCountList = autoCount
287
+         }
288
+      })
289
+    },
290
+    getInCount(id){
291
+      var count= ""
292
+      for(let i=0;i<this.countList.length;i++){
293
+          if(id == this.countList[i].good_id){
294
+              count = this.countList[i].count
295
+          }
296
+        }
297
+        return count
298
+        },
299
+      getOutCount(id){
300
+        console.log("id222",id)
301
+        var count = ""
302
+        for(let i=0;i<this.outCountList.length;i++){
303
+          if(id == this.outCountList[i].good_id){
304
+            count = this.outCountList[i].count
305
+          }
306
+        }
307
+        return count
308
+      },
309
+      getAutoCount(id){
310
+        var count= ""
311
+        for(let i=0;i<this.autoCountList.length;i++){
312
+          if(id == this.autoCountList[i].good_id){
313
+            count = this.autoCountList[i].count
314
+          }
315
+        }
316
+        return count
317
+      },
318
+     getTimestamp(time) {
319
+      // 把时间日期转成时间戳
320
+      return new Date(time).getTime() / 1000;
321
+     },
285 322
     }
286 323
   }
287 324
 </script>

+ 33 - 64
src/xt_pages/stock/stockInOrder.vue 查看文件

@@ -113,18 +113,6 @@
113 113
           </template>
114 114
         </el-table-column>
115 115
 
116
-        <el-table-column label="厂家" align="center">
117
-          <template slot-scope="scope">
118
-            {{ getManufactuerName(scope.row.manufacturer) }}
119
-          </template>
120
-        </el-table-column>
121
-
122
-        <el-table-column label="经销商" align="center">
123
-          <template slot-scope="scope">
124
-            {{ getDealerName(scope.row.dealer) }}
125
-          </template>
126
-        </el-table-column>
127
-
128 116
         <el-table-column label="操作" align="center" width="260px">
129 117
           <template slot-scope="scope">
130 118
             <!-- <el-tooltip
@@ -177,112 +165,93 @@
177 165
       <el-pagination
178 166
         @size-change="handleSizeChange"
179 167
         @current-change="handleCurrentChange"
180
-        :page-sizes="[10, 50, 100]"
181
-        :page-size="10"
168
+        :page-sizes="[5, 10, 50, 100]"
169
+        :page-size="5"
182 170
         background
183
-        style="margin-top:20px;float: right"
171
+        style="margin-top:20px;text-align: right"
184 172
         layout="total, sizes, prev, pager, next, jumper"
185 173
         :total="total"
186 174
       >
187 175
       </el-pagination>
188
-    </div>
189
-
190
-
191
-   <div v-show="tableShow" style="margin-top:80px">
192
-      <el-table
193
-        :data="tableList"
194
-        :class="signAndWeighBoxPatients"
195
-        style="width: 100%"
196
-        border
197
-        highlight-current-row
198
-        v-loading="Warehouse.loading"
199
-        ref="multipleTable"
200
-        @selection-change="select"
201
-        :row-style="{ color: '#303133' }"
202
-        :header-cell-style="{
203
-          backgroundColor: 'rgb(245, 247, 250)',
204
-          color: '#606266'
205
-        }"
206
-      >
207
-       <!-- <el-table-column align="center" type="selection" width="55">
208
-       </el-table-column> -->
209
-
210
-       <el-table-column label="耗材名称" align="center">
176
+      <div v-show="tableShow" style="margin-top:10px;">
177
+        <el-table
178
+          :data="tableList"
179
+          :class="signAndWeighBoxPatients"
180
+          style="width: 100%"
181
+          border
182
+          highlight-current-row
183
+          v-loading="Warehouse.loading"
184
+          ref="multipleTable"
185
+          @selection-change="select"
186
+          :row-style="{ color: '#303133' }"
187
+          :header-cell-style="{
188
+            backgroundColor: 'rgb(245, 247, 250)',
189
+            color: '#606266'
190
+          }"
191
+        >
192
+        <el-table-column label="耗材名称" align="center">
211 193
           <template slot-scope="scope">
212 194
             {{ scope.row.GoodInfo.good_name }}
213 195
           </template>
214 196
         </el-table-column>
215
-      
216 197
         <el-table-column label="耗材类型" align="center">
217 198
           <template slot-scope="scope">
218 199
             {{  getTypeName(scope.row.GoodInfo.good_type_id)}}
219 200
           </template>
220 201
         </el-table-column>
221
-
222
-
223
-       <el-table-column label="规格&单位" align="center">
202
+        <el-table-column label="规格&单位" align="center">
224 203
           <template slot-scope="scope">
225 204
             {{ scope.row.GoodInfo.specification_name}} * {{scope.row.GoodInfo.min_number}}{{scope.row.GoodInfo.min_unit}}
226 205
           </template>
227 206
         </el-table-column>
228
-
229
-
230
-       <el-table-column label="批号" align="center">
207
+        <el-table-column label="批号" align="center">
231 208
           <template slot-scope="scope">
232 209
             {{ scope.row.number}}
233 210
           </template>
234 211
         </el-table-column>
235
-        
236 212
         <el-table-column label="入库数量" align="center">
237 213
           <template slot-scope="scope">
238 214
             {{ scope.row.warehousing_count}}
239 215
           </template>
240 216
         </el-table-column>
241
-
242
-
243 217
         <el-table-column label="进货价" align="center">
244 218
           <template slot-scope="scope">
245 219
             {{ scope.row.price}}
246 220
           </template>
247 221
         </el-table-column>
248
-
249
-
250
-       <el-table-column label="总价" align="center">
222
+        <el-table-column label="总价" align="center">
251 223
           <template slot-scope="scope">
252 224
             {{ (scope.row.warehousing_count * scope.row.price).toFixed(2)}}
253 225
           </template>
254 226
         </el-table-column>
255
-
256
-
257
-         <el-table-column label="生产厂家" align="center">
227
+        <el-table-column label="生产厂家" align="center">
258 228
           <template slot-scope="scope">
259 229
             {{ getManufactuerName(scope.row.GoodInfo.manufacturer)}}
260 230
           </template>
261 231
         </el-table-column>
262
-
263 232
         <el-table-column label="生产日期" align="center">
264 233
           <template slot-scope="scope">
265 234
             {{ getTime(scope.row.product_date)}}
266 235
           </template>
267 236
         </el-table-column>
268
-
269
-
270
-       <el-table-column label="有效期" align="center">
237
+        <el-table-column label="有效期" align="center">
271 238
           <template slot-scope="scope">
272 239
             {{ getTime(scope.row.expiry_date)}}
273 240
           </template>
274 241
         </el-table-column>
275
-
276 242
         <el-table-column label="备注" align="center">
277 243
           <template slot-scope="scope">
278 244
             {{ scope.row.remark }}
279 245
           </template>
280 246
         </el-table-column>
281
-       
282
-      </el-table>
247
+        </el-table>
248
+      </div>
283 249
     </div>
284 250
 
285 251
 
252
+   
253
+
254
+
286 255
     <el-dialog
287 256
       title="详情"
288 257
       :visible.sync="dialogVisible"
@@ -714,7 +683,7 @@ export default {
714 683
       searchKey: "",
715 684
       type: 1,
716 685
       page: 1,
717
-      limit: 10,
686
+      limit: 5,
718 687
       checked: false,
719 688
       total: 0,
720 689
       pageTotal: 0,
@@ -764,7 +733,7 @@ export default {
764 733
         dealer:0
765 734
       }, 
766 735
       warehousing_time: '',
767
-     warehouse:{},
736
+      warehouse:{},
768 737
       propForm: {
769 738
         goods: [],
770 739
         goodType: [],
@@ -785,7 +754,7 @@ export default {
785 754
       },
786 755
         isCreated: 1,
787 756
         isVisibility: false,
788
-       drug_id:1,
757
+        drug_id:1,
789 758
       },
790 759
       drug_id:1,
791 760
       tableShow:false,

+ 51 - 8
src/xt_pages/stock/stockInOrderAdd.vue 查看文件

@@ -186,7 +186,18 @@
186 186
 
187 187
             </template>
188 188
           </el-table-column>
189
-         
189
+           <el-table-column label="经销商" align="center" width="150">
190
+             <template slot-scope="scope">
191
+               <el-select size="small" v-model="scope.row.dealer" filterable placeholder="请选择厂商">
192
+                <el-option
193
+                  v-for="(option, index) in dealerList"
194
+                  :key="index"
195
+                  :label="option.dealer_name"
196
+                  :value="option.id">
197
+                </el-option>
198
+               </el-select>
199
+            </template>
200
+          </el-table-column>
190 201
 
191 202
           <el-table-column label="备注" align="center" width="150">
192 203
             <template slot-scope="scope">
@@ -348,7 +359,7 @@
348 359
         },
349 360
 
350 361
         manufacturer: [],
351
-        dealer: [],
362
+        dealerList: [],
352 363
         goodType: [],
353 364
         manufacturerList:[],
354 365
         goodList:[]
@@ -636,7 +647,6 @@
636 647
           if (valid) {
637 648
             const array = this.recordInfo.recordData
638 649
             console.log("array9999999",array)
639
-           
640 650
             for (let i = 0; i < array.length; i++) {
641 651
               if (array[i].good_type_id == 0) {
642 652
                 this.$message.error('商品类型不能为空')
@@ -649,10 +659,26 @@
649 659
               this.$message.success('请添加入库商品')
650 660
               return
651 661
             }
652
-          
662
+            for(let i=0;i<this.recordInfo.recordData.length;i++){
663
+              for(let j=0;j<this.manufacturerList.length;j++){
664
+                 if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
665
+               
666
+                  this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].id
667
+                 }
668
+              }
669
+            }
670
+
671
+            for(let i=0;i<this.recordInfo.recordData.length;i++){
672
+              for(let j=0;j<this.dealerList.length;j++){
673
+                 if(this.recordInfo.recordData[i].dealer == this.dealerList[j].dealer_name){
674
+                    this.recordInfo.recordData[i].dealer = this.dealerList[j].id
675
+                 }
676
+              }
677
+            }
653 678
             const params = {
654 679
               'stockIn': this.recordInfo.recordData
655 680
             }
681
+            console.log("stockIn",this.recordInfo.recordData)
656 682
            
657 683
             postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
658 684
               if (response.data.state == 0) {
@@ -672,7 +698,8 @@
672 698
       ,
673 699
       changeManufacturer(val) {
674 700
 
675
-      }, changeDealer(val) {
701
+      }, 
702
+      changeDealer(val) {
676 703
 
677 704
       },
678 705
       getDataConfig(module, filed_name){
@@ -683,14 +710,16 @@
683 710
         if (keyword != undefined) {
684 711
           key = keyword
685 712
         }
686
-        console.log("keyrowrd",key)
687 713
         postSearchGoodList(key).then(response => {
688 714
           if (response.data.state == 1) {
689 715
            
690 716
              var list = response.data.data.list
717
+             
691 718
              this.goodList = list
692 719
              var manufacturerList = response.data.data.manufacturerList
693 720
              this.manufacturerList = manufacturerList
721
+             var dealer =  response.data.data.dealerList
722
+             this.dealerList = dealer
694 723
              for(let i=0;i<this.goodList.length;i++){
695 724
                 for(let j=0;j<this.manufacturerList.length;j++){
696 725
                   if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
@@ -698,6 +727,14 @@
698 727
                   }
699 728
                 }
700 729
              }
730
+
731
+             for(let i=0;i<this.goodList.length;i++){
732
+               for(let j=0;j<this.dealerList.length;j++){
733
+                  if(this.goodList[i].dealer == this.dealerList[j].id){
734
+                    this.goodList[i].dealer = this.dealerList[j].dealer_name
735
+                  }
736
+               }
737
+             }
701 738
            
702 739
              cb(this.goodList)
703 740
           } else {
@@ -715,14 +752,15 @@
715 752
               this.recordInfo.recordData[i].good_type_id = val.id
716 753
               this.recordInfo.recordData[i].good_name = val.good_name
717 754
               this.recordInfo.recordData[i].good_type_id = val.good_type_id
718
-              this.recordInfo.recordData[i].name = val.specification_name + "*" + val.min_number+val.min_unit
755
+              this.recordInfo.recordData[i].name = val.specification_name + "*" + val.min_number+val.packing_unit
719 756
               this.recordInfo.recordData[i].number =  val.number
720 757
               this.recordInfo.recordData[i].manufacturer = val.manufacturer
721 758
               this.recordInfo.recordData[i].remark = val.remark
722 759
               this.recordInfo.recordData[i].price = val.buy_price
723 760
               this.recordInfo.recordData[i].specification_name = val.specification_name
724 761
               this.recordInfo.recordData[i].good_id = val.id
725
-              this.recordInfo.recordData[i].min_unit = val.min_unit
762
+              this.recordInfo.recordData[i].packing_unit = val.packing_unit
763
+              this.recordInfo.recordData[i].dealer = val.dealer
726 764
            }
727 765
          }
728 766
       }
@@ -787,6 +825,7 @@
787 825
     margin-top: 15px;
788 826
     margin-bottom: 15px;
789 827
   }
828
+  
790 829
 
791 830
 </style>
792 831
 
@@ -798,5 +837,9 @@
798 837
   .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
799 838
     background: #6fb5fa;
800 839
   }
840
+  .el-autocomplete-suggestion{
841
+    width: 400px !important;
842
+  }
843
+  
801 844
 
802 845
 </style>

+ 63 - 26
src/xt_pages/stock/stockInOrderEdit.vue 查看文件

@@ -211,6 +211,18 @@
211 211
               {{ calculate(scope.row.price * scope.row.warehousing_count) }}
212 212
             </template>
213 213
           </el-table-column>
214
+          <el-table-column label="生产厂家" align="center" width="150">
215
+             <template slot-scope="scope">
216
+               <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
217
+                <el-option
218
+                  v-for="(option, index) in manufacturerList"
219
+                  :key="index"
220
+                  :label="option.manufacturer_name"
221
+                  :value="option.id">
222
+                </el-option>
223
+               </el-select>
224
+            </template>
225
+          </el-table-column>
214 226
 
215 227
           <el-table-column align="center" width="150">
216 228
             <template slot="header" slot-scope="scope">
@@ -228,7 +240,6 @@
228 240
 
229 241
           <el-table-column label="生产日期" width="180" align="center">
230 242
             <template slot-scope="scope">
231
-              <!--{{scope.row.product_date | parseTime("{y}-{m}-{d}")}}-->
232 243
               <el-date-picker
233 244
                 prefix-icon="el-icon-date"
234 245
                 style="width: 145px"
@@ -242,7 +253,6 @@
242 253
           </el-table-column>
243 254
           <el-table-column label="有效日期" width="180" align="center">
244 255
             <template slot-scope="scope">
245
-              <!--{{ scope.row.expiry_date | parseTime("{y}-{m}-{d}")}}-->
246 256
               <el-date-picker
247 257
                 prefix-icon="el-icon-date"
248 258
                 style="width: 145px"
@@ -254,6 +264,18 @@
254 264
               ></el-date-picker>
255 265
             </template>
256 266
           </el-table-column>
267
+          <el-table-column label="经销商" align="center" width="150">
268
+             <template slot-scope="scope">
269
+               <el-select size="small" v-model="scope.row.dealer" filterable placeholder="请选择厂商">
270
+                <el-option
271
+                  v-for="(option, index) in dealerList"
272
+                  :key="index"
273
+                  :label="option.dealer_name"
274
+                  :value="option.id">
275
+                </el-option>
276
+               </el-select>
277
+            </template>
278
+          </el-table-column>
257 279
           <el-table-column label="备注" width="150" align="center">
258 280
             <template slot-scope="scope">
259 281
               <el-input v-model="scope.row.remark"></el-input>
@@ -311,9 +333,6 @@ import {
311 333
   GetAllConfig,
312 334
   getWarehouseInfoList,
313 335
   GetAllGoodInfoByID,
314
-  getWarehouseInfoByOrdeNumber,
315
-  modifyWarehouseInfo,
316
-  deleteWarehouseInfo,
317 336
   DeleteWarehouseInfoItem,
318 337
   EditWarehouse,
319 338
   postSearchGoodList
@@ -384,8 +403,9 @@ export default {
384 403
       },
385 404
       warehouse: {},
386 405
       manufacturer: [],
387
-      dealer: [],
388
-      goodType: []
406
+      dealerList: [],
407
+      goodType: [],
408
+      manufacturerList:[]
389 409
     };
390 410
   },
391 411
   methods: {
@@ -447,11 +467,13 @@ export default {
447 467
           return false;
448 468
         } else {
449 469
           this.manufacturer = response.data.data.manufacturer;
470
+          this.manufacturerList = response.data.data.manufacturer
471
+          this.dealerList = response.data.data.dealer
450 472
           this.dealer = response.data.data.dealer;
451 473
           this.goodType = response.data.data.goodType;
452 474
           this.goodInfo = response.data.data.goodInfo;
453
-          this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: "全部" });
454
-          this.dealer.splice(0, 0, { id: 0, dealer_name: "全部" });
475
+          // this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: "全部" });
476
+          // this.dealer.splice(0, 0, { id: 0, dealer_name: "全部" });
455 477
         }
456 478
         loading.close();
457 479
       });
@@ -610,10 +632,14 @@ export default {
610 632
               return;
611 633
             }
612 634
           }
613
-
635
+          for(let i=0;i<this.recordInfo.recordData.length;i++){
636
+            this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
637
+          }
614 638
           const params = {
615 639
             stockIn: this.recordInfo.recordData
616 640
           };
641
+          console.log("params2222",params)
642
+       
617 643
           EditWarehouse(
618 644
             params,
619 645
             this.warehousing_time,
@@ -646,6 +672,7 @@ export default {
646 672
           return false;
647 673
         } else {
648 674
           console.log("列表2222222",response.data.data.info)
675
+         
649 676
           for (let i = 0; i < response.data.data.info.length; i++) {
650 677
             response.data.data.info[i].product_date = this.getTime(
651 678
               response.data.data.info[i].product_date,
@@ -658,15 +685,18 @@ export default {
658 685
             response.data.data.info[i].price = response.data.data.info[i].price.toString();
659 686
             response.data.data.info[i].warehousing_count = response.data.data.info[i].warehousing_count.toString();
660 687
             response.data.data.info[i].good_name = response.data.data.info[i].GoodInfo.good_name
661
-            response.data.data.info[i].name = response.data.data.info[i].GoodInfo.specification_name + "*" + response.data.data.info[i].GoodInfo.min_number+response.data.data.info[i].GoodInfo.min_unit
662
-            response.data.data.info[i].min_unit = response.data.data.info[i].GoodInfo.min_unit
688
+            response.data.data.info[i].name = response.data.data.info[i].GoodInfo.specification_name + "*" + response.data.data.info[i].GoodInfo.min_number+response.data.data.info[i].GoodInfo.packing_unit
689
+            response.data.data.info[i].packing_unit = response.data.data.info[i].GoodInfo.packing_unit
690
+            
691
+           
692
+           
663 693
             this.recordInfo.recordData.push(response.data.data.info[i]);
694
+           
664 695
             console.log("列表",this.recordInfo.recordData)
665 696
           }
666 697
 
667 698
           this.warehouse = response.data.data.warehousing;
668
-          this.form.manufacturer = this.warehouse.manufacturer;
669
-          this.form.dealer = this.warehouse.dealer;
699
+        
670 700
 
671 701
           this.warehousing_time = this.getTime(
672 702
             this.warehouse.warehousing_time,
@@ -696,22 +726,28 @@ export default {
696 726
         if (keyword != undefined) {
697 727
           key = keyword
698 728
         }
699
-        console.log("keyrowrd",key)
700 729
         postSearchGoodList(key).then(response => {
701 730
           if (response.data.state == 1) {
702 731
           
703 732
             var list = response.data.data.list
704 733
             this.goodList = list
705
-            var manufacturerList = response.data.data.manufacturerList
706
-            this.manufacturerList = manufacturerList
707
-            for(let i=0;i<this.goodList.length;i++){
708
-                for(let j=0;j<this.manufacturerList.length;j++){
709
-                  if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
710
-                    this.goodList[i].manufacturer = this.manufacturerList[j].manufacturer_name
711
-                  }
712
-                }
713
-            }
714
-          
734
+            // var manufacturerList = response.data.data.manufacturerList
735
+            // this.dealerList = response.data.data.dealerList
736
+            // this.manufacturerList = manufacturerList
737
+            // for(let i=0;i<this.goodList.length;i++){
738
+            //     for(let j=0;j<this.manufacturerList.length;j++){
739
+            //       if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
740
+            //         this.goodList[i].manufacturer = this.manufacturerList[j].manufacturer_name
741
+            //       }
742
+            //     }
743
+            // }
744
+            // for(let i=0;i<this.goodList.length;i++){
745
+            //    for(let j=0;j<this.dealerList.length;j++){
746
+            //       if(this.goodList[i].dealer == this.dealerList[j].id){
747
+            //         this.goodList[i].dealer = this.dealerList[j].dealer_name
748
+            //       }
749
+            //    }
750
+            //  }
715 751
             cb(this.goodList)
716 752
           } else {
717 753
             cb([])
@@ -735,7 +771,8 @@ export default {
735 771
             this.recordInfo.recordData[i].price = val.buy_price
736 772
             this.recordInfo.recordData[i].specification_name = val.specification_name
737 773
             this.recordInfo.recordData[i].good_id = val.id
738
-            this.recordInfo.recordData[i].min_unit = val.min_unit
774
+            this.recordInfo.recordData[i].packing_unit = val.packing_unit
775
+            this.recordInfo.recordData[i].dealer = val.dealer
739 776
           }
740 777
         }
741 778
     }

+ 171 - 142
src/xt_pages/stock/stockOutOrder.vue 查看文件

@@ -69,9 +69,8 @@
69 69
           @change="changeAllSelected"
70 70
           >全选</el-checkbox
71 71
         >
72
-        <el-button size="small" icon="el-icon-delete" @click="batchDelete"
73
-          >删除</el-button
74
-        >
72
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
73
+        <el-button size="small" type="primary" @click="toPrint">打印</el-button>
75 74
       </div>
76 75
 
77 76
       <el-table
@@ -108,17 +107,7 @@
108 107
             {{ getXuserName(scope.row.creater) }}
109 108
           </template>
110 109
         </el-table-column>
111
-        <el-table-column label="厂家" align="center">
112
-          <template slot-scope="scope">
113
-            {{ getManufactuerName(scope.row.manufacturer) }}
114
-          </template>
115
-        </el-table-column>
116
-
117
-        <el-table-column label="经销商" align="center">
118
-          <template slot-scope="scope">
119
-            {{ getDealerName(scope.row.dealer) }}
120
-          </template>
121
-        </el-table-column>
110
+       
122 111
 
123 112
         <el-table-column label="操作" align="center" width="300px">
124 113
           <template slot-scope="scope">
@@ -173,116 +162,98 @@
173 162
       <el-pagination
174 163
         @size-change="handleSizeChange"
175 164
         @current-change="handleCurrentChange"
176
-        :page-sizes="[10, 50, 100]"
177
-        :page-size="10"
165
+        :page-sizes="[5, 10, 50, 100]"
166
+        :page-size="5"
178 167
         background
179
-        style="margin-top:20px;float: right"
168
+        style="margin-top:20px;text-align: right"
180 169
         layout="total, sizes, prev, pager, next, jumper"
181 170
         :total="total"
182 171
       >
183 172
       </el-pagination>
173
+      <!--  详情 -->
174
+      <div v-show="tableShow" style="margin-top:10px;">
175
+        <el-table
176
+            :data="tableList"
177
+            :class="signAndWeighBoxPatients"
178
+            style="width: 100%"
179
+            border
180
+            highlight-current-row
181
+            ref="multipleTable"
182
+            @selection-change="select"
183
+            :row-style="{ color: '#303133' }"
184
+            :header-cell-style="{
185
+              backgroundColor: 'rgb(245, 247, 250)',
186
+              color: '#606266'
187
+            }"
188
+          >
189
+          <el-table-column label="耗材名称" align="center">
190
+            <template slot-scope="scope">
191
+              {{ scope.row.good_name }}
192
+            </template>
193
+          </el-table-column>
194
+          <el-table-column label="耗材类型" align="center">
195
+            <template slot-scope="scope">
196
+              {{  getTypeName(scope.row.good_type_id)}}
197
+            </template>
198
+          </el-table-column>
199
+          <el-table-column label="规格&单位" align="center">
200
+            <template slot-scope="scope">
201
+              {{ scope.row.specification_name}} * {{scope.row.min_number}}{{scope.row.min_unit}}
202
+            </template>
203
+          </el-table-column>
204
+          <!-- <el-table-column label="批号" align="center">
205
+            <template slot-scope="scope">
206
+              {{ scope.row.number}}
207
+            </template>
208
+          </el-table-column> -->
209
+          <el-table-column label="出库数量" align="center">
210
+            <template slot-scope="scope">
211
+              <span v-if="scope.row.is_sys == 0">{{ scope.row.count}}</span> 
212
+              <span v-if="scope.row.is_sys == 1">{{getOutStockCount(scope.row.good_id)}}</span> 
213
+            </template>
214
+          </el-table-column>
215
+          <el-table-column label="出货价" align="center">
216
+            <template slot-scope="scope">
217
+              {{ scope.row.price}}
218
+            </template>
219
+          </el-table-column>
220
+          <el-table-column label="总价" align="center">
221
+            <template slot-scope="scope">
222
+              {{ (scope.row.count * scope.row.price).toFixed(2)}}
223
+            </template>
224
+          </el-table-column>
225
+          <el-table-column label="生产厂家" align="center">
226
+            <template slot-scope="scope">
227
+              {{ getManufactuerName(scope.row.manufacturer)}}
228
+            </template>
229
+          </el-table-column>
230
+          <!-- <el-table-column label="生产日期" align="center">
231
+            <template slot-scope="scope">
232
+              {{ getTime(scope.row.product_date)}}
233
+            </template>
234
+          </el-table-column>
235
+          <el-table-column label="有效期" align="center">
236
+            <template slot-scope="scope">
237
+              {{ getTime(scope.row.expiry_date)}}
238
+            </template>
239
+          </el-table-column> -->
240
+          <el-table-column label="备注" align="center">
241
+            <template slot-scope="scope">
242
+              {{ scope.row.remark }}
243
+            </template>
244
+          </el-table-column>
245
+          <el-table-column label="操作" align="center">
246
+            <template slot-scope="scope">
247
+              <span v-if="scope.row.is_sys == 1"  style="color: #589ff8" @click="GetOrderDetailById(scope.row)">使用明细</span>
248
+            </template>
249
+          </el-table-column>
250
+        </el-table>
251
+      </div>
184 252
     </div>
185 253
 
186 254
 
187 255
 
188
-   <!--  详情 -->
189
-  <div v-show="tableShow">
190
-     <el-table
191
-        :data="tableList"
192
-        :class="signAndWeighBoxPatients"
193
-        style="width: 100%"
194
-        border
195
-        highlight-current-row
196
-        ref="multipleTable"
197
-        @selection-change="select"
198
-        :row-style="{ color: '#303133' }"
199
-        :header-cell-style="{
200
-          backgroundColor: 'rgb(245, 247, 250)',
201
-          color: '#606266'
202
-        }"
203
-      >
204
-       <el-table-column align="center" type="selection" width="55">
205
-       </el-table-column>
206
-
207
-       <el-table-column label="耗材名称" align="center">
208
-          <template slot-scope="scope">
209
-            {{ scope.row.GoodInfo.good_name }}
210
-          </template>
211
-        </el-table-column>
212
-      
213
-        <el-table-column label="耗材类型" align="center">
214
-          <template slot-scope="scope">
215
-            {{  getTypeName(scope.row.GoodInfo.good_type_id)}}
216
-          </template>
217
-        </el-table-column>
218
-
219
-
220
-       <el-table-column label="规格&单位" align="center">
221
-          <template slot-scope="scope">
222
-            {{ scope.row.GoodInfo.specification_name}} * {{scope.row.GoodInfo.min_number}}{{scope.row.GoodInfo.min_unit}}
223
-          </template>
224
-        </el-table-column>
225
-
226
-
227
-       <el-table-column label="批号" align="center">
228
-          <template slot-scope="scope">
229
-            {{ scope.row.number}}
230
-          </template>
231
-        </el-table-column>
232
-        
233
-        <el-table-column label="出库数量" align="center">
234
-          <template slot-scope="scope">
235
-            {{ scope.row.count}}
236
-          </template>
237
-        </el-table-column>
238
-
239
-
240
-        <el-table-column label="出货价" align="center">
241
-          <template slot-scope="scope">
242
-            {{ scope.row.price}}
243
-          </template>
244
-        </el-table-column>
245
-
246
-
247
-       <el-table-column label="总价" align="center">
248
-          <template slot-scope="scope">
249
-            {{ (scope.row.count * scope.row.price).toFixed(2)}}
250
-          </template>
251
-        </el-table-column>
252
-
253
-
254
-         <el-table-column label="生产厂家" align="center">
255
-          <template slot-scope="scope">
256
-            {{ getManufactuerName(scope.row.GoodInfo.manufacturer)}}
257
-          </template>
258
-        </el-table-column>
259
-
260
-        <el-table-column label="生产日期" align="center">
261
-          <template slot-scope="scope">
262
-            {{ getTime(scope.row.product_date)}}
263
-          </template>
264
-        </el-table-column>
265
-
266
-
267
-       <el-table-column label="有效期" align="center">
268
-          <template slot-scope="scope">
269
-            {{ getTime(scope.row.expiry_date)}}
270
-          </template>
271
-        </el-table-column>
272
-
273
-        <el-table-column label="备注" align="center">
274
-          <template slot-scope="scope">
275
-            {{ scope.row.remark }}
276
-          </template>
277
-        </el-table-column>
278
-        <el-table-column label="操作" align="center">
279
-          <template slot-scope="scope">
280
-            <span v-if="scope.row.is_sys == 1"  style="color: #589ff8" @click="GetOrderDetail(scope.row.id)">使用明细</span>
281
-          </template>
282
-        </el-table-column>
283
-      </el-table>  
284
-    
285
-  </div>
256
+  
286 257
 
287 258
 
288 259
     <!-- 新增弹窗 -->
@@ -604,7 +575,7 @@
604 575
   
605 576
     <el-dialog
606 577
       title="出库明细"
607
-      :visible.sync="editdialogVisibleTwo"
578
+      :visible.sync="editdialogVisibleThree"
608 579
       width="60%">
609 580
       <span>
610 581
          <div class="app-container">
@@ -665,8 +636,8 @@
665 636
     </div>
666 637
       </span>
667 638
       <span slot="footer" class="dialog-footer">
668
-        <el-button @click="editdialogVisibleTwo = false">取 消</el-button>
669
-        <el-button type="primary" @click="editdialogVisibleTwo = false">确 定</el-button>
639
+        <el-button @click="editdialogVisibleThree = false">取 消</el-button>
640
+        <el-button type="primary" @click="editdialogVisibleThree = false">确 定</el-button>
670 641
       </span>
671 642
     </el-dialog>
672 643
 
@@ -697,6 +668,8 @@ import {
697 668
   deleteWarehouseOutInfo,
698 669
   GetAllGoodInfoByID,
699 670
   editWarehouseoutInfo,
671
+  getOrderDetailByOrderId,
672
+  getOrderDetailById
700 673
 } from "@/api/stock";
701 674
 import BreadCrumb from "../components/bread-crumb";
702 675
 import StockInDialog from './Dialog/stockInDialog'
@@ -747,7 +720,7 @@ export default {
747 720
         { path: false, name: "出库单" }
748 721
       ],
749 722
       page: 1,
750
-      limit: 10,
723
+      limit: 5,
751 724
       checked: false,
752 725
       total: 0,
753 726
       pageTotal: 0,
@@ -812,7 +785,10 @@ export default {
812 785
       tableList:[],
813 786
       dialogVisibleTwo:false,
814 787
       userList:[],
815
-      editdialogVisibleTwo:false
788
+      editdialogVisibleTwo:false,
789
+      editdialogVisibleThree:false,
790
+      order_id:0,
791
+      warehouse_out_time:"",
816 792
     };
817 793
   },
818 794
   methods: {
@@ -1025,6 +1001,9 @@ export default {
1025 1001
       }
1026 1002
     },
1027 1003
     select(selection) {
1004
+      console.log("selection",selection)
1005
+      this.order_id = selection[0].id
1006
+      this.warehouse_out_time = selection[0].warehouse_out_time
1028 1007
       this.selectedTableData = selection;
1029 1008
     },
1030 1009
     batchDelete() {
@@ -1086,33 +1065,49 @@ export default {
1086 1065
 
1087 1066
     handleSearch(val){
1088 1067
       this.tableList = []
1068
+    
1069
+      this.editdialogVisibleThree = false
1089 1070
       this.GetOrderDetailOne(val.id)
1090 1071
       this.GetTotalCount(val.warehouse_out_time)
1091 1072
     },
1092 1073
   
1093 1074
     //获取出库单详情数据
1094
-    GetOrderDetailOne(id) {
1075
+    // GetOrderDetailOne(id) {
1076
+    //     const params = {
1077
+    //       'id': id
1078
+    //     }
1079
+    //     console.log("#3333333",id)
1080
+    //   getWarehouseOutInfo(params).then(response => {
1081
+    //       if (response.data.state == 0) {
1082
+
1083
+    //         this.$message.error(response.data.msg)
1084
+    //         return false
1085
+    //       } else {
1086
+    //         this.tableShow = true
1087
+    //         for (let i = 0; i < response.data.data.list.length; i++) {
1088
+    //           this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
1089
+    //           console.log("表格00000000",this.tableList)
1090
+    //           this.tableList.push(response.data.data.list[i])
1091
+    //         }
1092
+    //         this.warehousingOutInfo.info = response.data.data.info
1093
+    //       }
1094
+    //     })
1095
+    //  }, 
1096
+     GetOrderDetailOne(id){
1095 1097
         const params = {
1096 1098
           'id': id
1097 1099
         }
1098
-        console.log("#3333333",id)
1099
-      getWarehouseOutInfo(params).then(response => {
1100
-          if (response.data.state == 0) {
1101
-
1102
-            this.$message.error(response.data.msg)
1103
-            return false
1104
-          } else {
1105
-            this.tableShow = true
1106
-            for (let i = 0; i < response.data.data.list.length; i++) {
1107
-              this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
1108
-              console.log("表格00000000",this.tableList)
1109
-              this.tableList.push(response.data.data.list[i])
1110
-            }
1111
-            this.warehousingOutInfo.info = response.data.data.info
1112
-            // this.handleSpanTempArr()
1113
-          }
1100
+        getOrderDetailByOrderId(params).then(response=>{
1101
+           if(response.data.state == 1){
1102
+             this.tableShow = true
1103
+             var list = response.data.data.list
1104
+             console.log("list22222222",list)
1105
+             for(let i=0;i<list.length;i++){
1106
+               this.tableList.push(list[i])
1107
+             }
1108
+           }
1114 1109
         })
1115
-     }, 
1110
+     },
1116 1111
 
1117 1112
       getTypeName: function(id) {
1118 1113
         let name = ''
@@ -1158,10 +1153,10 @@ export default {
1158 1153
     },
1159 1154
 
1160 1155
      GetOrderDetail: function(order_id) {
1156
+       this.userList = []
1161 1157
         const params = {
1162 1158
           'id': order_id
1163 1159
         }
1164
-      
1165 1160
         getWarehouseOutUser(params).then(response => {
1166 1161
           if (response.data.state == 0) {
1167 1162
             this.$message.error(response.data.msg)
@@ -1183,7 +1178,7 @@ export default {
1183 1178
             // this.type_name = this.userList[0].type.type_name
1184 1179
             // this.specification_name = this.userList[0].info.specification_name
1185 1180
             console.log("详情数据区",this.userList)
1186
-            this.editdialogVisibleTwo = true
1181
+            this.editdialogVisibleThree = true
1187 1182
           }
1188 1183
         })
1189 1184
       },
@@ -1503,8 +1498,42 @@ export default {
1503 1498
         })
1504 1499
       }, 
1505 1500
      
1506
-     
1507
-
1501
+      GetOrderDetailById(val){
1502
+         this.userList =[]
1503
+         var params = {
1504
+           good_id:val.good_id,
1505
+           record_time:val.sys_record_time,
1506
+          }
1507
+         getOrderDetailById(params).then(response=>{
1508
+            if(response.data.state == 1){
1509
+              var total = 0
1510
+              var list = response.data.data.list
1511
+              var arrList =  this.unique(list)
1512
+              for (let i = 0; i < arrList.length; i++) {
1513
+                var obj = arrList[i]
1514
+                obj['is_total'] = 0
1515
+                this.userList.push(obj)
1516
+                total = total + arrList[i].count
1517
+              }
1518
+              this.userList.push({
1519
+                is_total: 1,
1520
+                total: total,
1521
+              })
1522
+              // this.type_name = this.userList[0].type.type_name
1523
+              // this.specification_name = this.userList[0].info.specification_name
1524
+              console.log("详情数据区",this.userList)
1525
+              this.editdialogVisibleThree = true
1526
+            }
1527
+         })
1528
+      },
1529
+      toPrint(){
1530
+        if(this.order_id == 0){
1531
+          this.$message.error("请选择出库单")
1532
+        }else{
1533
+            this.$router.push({path:"/stock/out/detail/print?id="+this.order_id+"&warehouse_out_time="+this.warehouse_out_time})
1534
+        }
1535
+      
1536
+      }
1508 1537
   }
1509 1538
 };
1510 1539
 </script>

+ 19 - 10
src/xt_pages/stock/stockOutOrderAdd.vue 查看文件

@@ -54,7 +54,7 @@
54 54
         ></el-date-picker>
55 55
       </div>
56 56
 
57
-      <div class="cell clearfix">
57
+      <!-- <div class="cell clearfix">
58 58
         <label class="title"><span class="name">经销商</span> : </label>
59 59
         <el-select
60 60
           size="small"
@@ -72,9 +72,9 @@
72 72
           >
73 73
           </el-option>
74 74
         </el-select>
75
-      </div>
75
+      </div> -->
76 76
 
77
-      <div class="cell clearfix">
77
+      <!-- <div class="cell clearfix">
78 78
         <label class="title"><span class="name">厂商</span> : </label>
79 79
         <el-select
80 80
           size="small"
@@ -92,7 +92,7 @@
92 92
           >
93 93
           </el-option>
94 94
         </el-select>
95
-      </div>
95
+      </div> -->
96 96
 
97 97
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
98 98
         <el-table
@@ -159,14 +159,14 @@
159 159
             </template>
160 160
           </el-table-column>
161 161
           
162
-          <el-table-column  width="150" align="center">
162
+          <!-- <el-table-column  width="150" align="center">
163 163
              <template slot="header" slot-scope="scope">
164
-              <span>批号<span style="color: red">*</span></span>
164
+              <span>批号<span style="color: red"></span></span>
165 165
             </template>
166 166
             <template slot-scope="scope">
167 167
                <el-input placeholder="请输入批号" v-model="scope.row.number"></el-input>
168 168
             </template>
169
-          </el-table-column>
169
+          </el-table-column> -->
170 170
 
171 171
          <el-table-column  width="150" align="center">
172 172
             <template slot="header" slot-scope="scope">
@@ -355,7 +355,7 @@ export default {
355 355
       },
356 356
       warehouseInfoList: [],
357 357
       manufacturer: [],
358
-      dealer: [],
358
+      dealerList: [],
359 359
       goodType: [],
360 360
       goodInfo:[],
361 361
       goodList:[],
@@ -579,11 +579,18 @@ export default {
579 579
           for(let i=0;i<this.recordInfo.recordData.length;i++){
580 580
              this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
581 581
           }
582
+          for(let i=0;i<this.recordInfo.recordData.length;i++){
583
+            for(let j=0;j<this.manufacturerList.length;j++){
584
+              if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
585
+                 this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].id
586
+              }
587
+            }
588
+          }
582 589
           const params = {
583 590
             stockOut: this.recordInfo.recordData
584 591
           };
585 592
           console.log("2323223223",this.recordInfo.recordData);
586
-          
593
+        
587 594
           postWarehouseOut(
588 595
             params,
589 596
             this.warehouse_out_time,
@@ -649,7 +656,6 @@ export default {
649 656
             this.recordInfo.recordData[i].good_name = val.good_name
650 657
             this.recordInfo.recordData[i].good_type_id = val.good_type_id
651 658
             this.recordInfo.recordData[i].name = val.specification_name + "*" + val.min_number+val.min_unit +"/"+val.packing_unit
652
-            // this.recordInfo.recordData[i].number =  val.number
653 659
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
654 660
             this.recordInfo.recordData[i].remark = val.remark
655 661
             this.recordInfo.recordData[i].price = val.buy_price
@@ -712,4 +718,7 @@ export default {
712 718
 .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
713 719
   background: #6fb5fa;
714 720
 }
721
+.el-autocomplete-suggestion{
722
+  width: 400px !important;
723
+}
715 724
 </style>

+ 39 - 20
src/xt_pages/stock/stockOutOrderEdit.vue 查看文件

@@ -32,7 +32,7 @@
32 32
       </div>
33 33
 
34 34
 
35
-      <div class="cell clearfix">
35
+      <!-- <div class="cell clearfix">
36 36
         <label class="title"><span class="name">经销商</span> : </label>
37 37
         <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer" style="width: 200px;">
38 38
           <el-option
@@ -42,10 +42,10 @@
42 42
             :value="option.id">
43 43
           </el-option>
44 44
         </el-select>
45
-      </div>
45
+      </div> -->
46 46
 
47 47
 
48
-      <div class="cell clearfix">
48
+      <!-- <div class="cell clearfix">
49 49
         <label class="title"><span class="name">厂商</span> : </label>
50 50
         <el-select size="small" v-model="form.manufacturer" clearable placeholder="请选择厂商" @change="changeManufacturer" style="width: 200px;">
51 51
           <el-option
@@ -55,7 +55,7 @@
55 55
             :value="option.id">
56 56
           </el-option>
57 57
         </el-select>
58
-      </div>
58
+      </div> -->
59 59
 
60 60
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
61 61
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
@@ -164,6 +164,18 @@
164 164
               {{calculate(scope.row.price*scope.row.count)}}
165 165
             </template>
166 166
           </el-table-column>
167
+          <el-table-column label="生产厂商"  width="150" align="center">
168
+            <template slot-scope="scope">
169
+               <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
170
+                <el-option
171
+                  v-for="(option, index) in manufacturerList"
172
+                  :key="index"
173
+                  :label="option.manufacturer_name"
174
+                  :value="option.id">
175
+                </el-option>
176
+               </el-select>
177
+            </template>   
178
+          </el-table-column>
167 179
           <el-table-column label="备注" min-width="20" align="center">
168 180
             <template slot-scope="scope">
169 181
               <el-input v-model="scope.row.remark"></el-input>
@@ -311,7 +323,8 @@
311 323
         this.propForm.goods = [];
312 324
 
313 325
         this.propForm.goodType = [];
314
-      }, GetConfigInfo: function() {
326
+      }, 
327
+      GetConfigInfo: function() {
315 328
         const loading = this.$loading({
316 329
           lock: true,
317 330
           text: "Loading",
@@ -323,12 +336,12 @@
323 336
             this.$message.error(response.data.msg);
324 337
             return false;
325 338
           } else {
326
-            this.manufacturer = response.data.data.manufacturer;
339
+            this.manufacturerList = response.data.data.manufacturer;
327 340
             this.dealer = response.data.data.dealer;
328 341
             this.goodType = response.data.data.goodType;
329 342
             this.goodInfo = response.data.data.goodInfo;
330
-            this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: "全部" });
331
-            this.dealer.splice(0, 0, { id: 0, dealer_name: "全部" });
343
+            // this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: "全部" });
344
+            // this.dealer.splice(0, 0, { id: 0, dealer_name: "全部" });
332 345
           }
333 346
           loading.close();
334 347
         });
@@ -471,12 +484,15 @@
471 484
                 return
472 485
               }
473 486
             }
474
-
487
+            for(let i=0;i<this.recordInfo.recordData.length;i++){
488
+               this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
489
+            }
475 490
             const params = {
476 491
               'stockOut': this.recordInfo.recordData
477 492
             }
478
-            
479 493
            
494
+            console.log("stockout",params)
495
+            
480 496
             editWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
481 497
               if (response.data.state == 0) {
482 498
                 this.$message.error(response.data.msg)
@@ -490,7 +506,8 @@
490 506
             return false
491 507
           }
492 508
         })
493
-      }, GetOrderDetail: function(order_id) {
509
+      }, 
510
+      GetOrderDetail: function(order_id) {
494 511
         const params = {
495 512
           'id': order_id
496 513
         }
@@ -505,6 +522,7 @@
505 522
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
506 523
               response.data.data.list[i].good_name = response.data.data.list[i].GoodInfo.good_name
507 524
               response.data.data.list[i].name = response.data.data.list[i].GoodInfo.good_name + "*" + response.data.data.list[i].GoodInfo.specification_name
525
+
508 526
               this.recordInfo.recordData.push(response.data.data.list[i])
509 527
             }
510 528
             this.warehouseOut = response.data.data.info
@@ -546,15 +564,15 @@
546 564
           
547 565
             var list = response.data.data.list
548 566
             this.goodList = list
549
-            var manufacturerList = response.data.data.manufacturerList
550
-            this.manufacturerList = manufacturerList
551
-            for(let i=0;i<this.goodList.length;i++){
552
-              for(let j=0;j<this.manufacturerList.length;j++){
553
-                if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
554
-                    this.goodList[i].manufacturer = this.manufacturerList[j].manufacturer_name
555
-                }
556
-              }
557
-            }
567
+            // var manufacturerList = response.data.data.manufacturerList
568
+            // this.manufacturerList = manufacturerList
569
+            // for(let i=0;i<this.goodList.length;i++){
570
+            //   for(let j=0;j<this.manufacturerList.length;j++){
571
+            //     if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
572
+            //         this.goodList[i].manufacturer = this.manufacturerList[j].manufacturer_name
573
+            //     }
574
+            //   }
575
+            // }
558 576
           
559 577
             cb(this.goodList)
560 578
         } else {
@@ -579,6 +597,7 @@
579 597
             this.recordInfo.recordData[i].price = val.buy_price
580 598
             this.recordInfo.recordData[i].specification_name = val.specification_name
581 599
             this.recordInfo.recordData[i].good_id = val.id
600
+
582 601
          }
583 602
       }
584 603
     }

+ 12 - 94
src/xt_pages/stock/stockQuery.vue 查看文件

@@ -64,96 +64,7 @@
64 64
       </div>
65 65
 
66 66
 
67
-      <!-- <el-table
68
-        :row-style="{ color: '#303133' }"
69
-        :header-cell-style="{
70
-          backgroundColor: 'rgb(245, 247, 250)',
71
-          color: '#606266'
72
-        }"
73
-        :data="WarehouseInfo.warehouseInfoDate"
74
-        :class="signAndWeighBoxPatients"
75
-        border
76
-        v-loading="WarehouseInfo.loading"
77
-      >
78
-        <el-table-column label="商品编码" align="center">
79
-          <template slot-scope="scope">
80
-            {{ scope.row.good_code }}
81
-          </template>
82
-        </el-table-column>
83
-        <el-table-column label="耗材名称" align="center">
84
-          <template slot-scope="scope">
85
-            {{ scope.row.good_name }}
86
-          </template>
87
-        </el-table-column>
88
-        <el-table-column label="耗材类型" align="center">
89
-          <template slot-scope="scope">
90
-            <span>{{ scope.row.type.type_name }}</span>
91
-          </template>
92
-        </el-table-column>
93
-        <el-table-column label="规格型号" align="center">
94
-          <template slot-scope="scope">
95
-            <span>{{ scope.row.specification_name }}</span>
96
-          </template>
97
-        </el-table-column>
98
-        <el-table-column label="单位" align="center">
99
-          <template slot-scope="scope">
100
-            <span>{{getUnit(scope.row.good_unit)}}</span>
101
-          </template>
102
-        </el-table-column>
103
-        <el-table-column label="进货价" align="center">
104
-          <template slot-scope="scope">
105
-            <span v-if="scope.row.query_warehousing_info.length>0">{{scope.row.query_warehousing_info[0].price?scope.row.query_warehousing_info[0].price:""}}</span>
106
-          </template>
107
-        </el-table-column>
108
-        <el-table-column label="入库数量" align="center">
109
-          <template slot-scope="scope">
110
-            <span
111
-              @click="showStockInDetailDialog(scope.row.good_id)"
112
-              >{{ stockInCount(scope.row) }}</span
113
-            >
114
-          </template>
115
-        </el-table-column>
116
-        <el-table-column label="入库退货" align="center">
117
-          <template slot-scope="scope">
118
-            <span
119
-              @click="showSaleReturnDetailDialog(scope.row)"
120
-              >{{ salesReturnCount(scope.row) }}</span
121
-            >
122
-          </template>
123
-        </el-table-column>
124
-        <el-table-column label="实际入库" align="center">
125
-          <template slot-scope="scope">
126
-            {{ stockInCount(scope.row) - salesReturnCount(scope.row) }}
127
-          </template>
128
-        </el-table-column>
129
-        <el-table-column label="出库数量" align="center">
130
-          <template slot-scope="scope">
131
-            <span
132
-              @click="showStockOutDetailDialog(scope.row.good_id)"
133
-              >{{ stockOutCount(scope.row) }}</span
134
-            >
135
-          </template>
136
-        </el-table-column>
137
-        <el-table-column label="出库退库" align="center">
138
-          <template slot-scope="scope">
139
-            <span
140
-              @click="showCancelStockDetailDialog(scope.row)"
141
-              >{{ cancelStockCount(scope.row) }}</span
142
-            >
143
-          </template>
144
-        </el-table-column>
145
-        <el-table-column label="实际出库" align="center">
146
-          <template slot-scope="scope">
147
-            {{ stockOutCount(scope.row) - cancelStockCount(scope.row) }}
148
-          </template>
149
-        </el-table-column>
150 67
 
151
-        <el-table-column label="剩余库存" align="center">
152
-          <template slot-scope="scope">
153
-            <span>{{stockInCount(scope.row)  - stockOutCount(scope.row) }}</span>
154
-          </template>
155
-        </el-table-column>
156
-      </el-table> -->
157 68
        <el-table
158 69
         :row-style="{ color: '#303133' }"
159 70
         :header-cell-style="{
@@ -185,7 +96,7 @@
185 96
             {{scope.row.price}}
186 97
           </template>
187 98
         </el-table-column>
188
-        <el-table-column label="商" align="center">
99
+        <el-table-column label="生产商" align="center">
189 100
           <template slot-scope="scope">
190 101
            {{getManufacture(scope.row.manufacturer)}}
191 102
           </template>
@@ -197,7 +108,7 @@
197 108
        </el-table-column>
198 109
        <el-table-column label="出库数量" align="center">
199 110
          <template slot-scope="scope">
200
-           <span>{{getOutCount(scope.row.good_id)+getAutoCount(scope.row.good_id)}}</span>
111
+           <span>{{getOutCount(scope.row.good_id) + getAutoCount(scope.row.good_id)}}</span>
201 112
 
202 113
          </template>
203 114
        </el-table-column>
@@ -350,7 +261,7 @@ export default {
350 261
 
351 262
          }
352 263
 
353
-        console.log("数据2222222",this.WarehouseInfo.warehouseInfoDate)
264
+       
354 265
       });
355 266
     },
356 267
 
@@ -544,7 +455,14 @@ export default {
544 455
        return name
545 456
     },
546 457
     toClick(val){
547
-      this.$router.push({path:"/stock/in/stockflow?id="+val.good_id+"&good_name="+val.good_name})
458
+       var manufacturer_name = ""
459
+       for(let i=0;i<this.manufacturerList.length;i++){
460
+          if(val.manufacturer == this.manufacturerList[i].id){
461
+            manufacturer_name = this.manufacturerList[i].manufacturer_name  
462
+          }
463
+       }
464
+      console.log("厂家22222",manufacturer_name)
465
+      this.$router.push({path:"/stock/in/stockflow?id="+val.good_id+"&good_name="+val.good_name+"&manufacturer="+manufacturer_name})
548 466
     },
549 467
     toClickOne(val){
550 468
       this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.good_id+"&good_name="+val.good_name})
@@ -591,7 +509,7 @@ export default {
591 509
      var count= ""
592 510
      for(let i=0;i<this.autoCountList.length;i++){
593 511
        if(id == this.autoCountList[i].good_id){
594
-         count = this.outCountList[i].count
512
+         count = this.autoCountList[i].count
595 513
        }
596 514
      }
597 515
      return count

+ 1 - 0
src/xt_pages/user/courseOfDisease.vue 查看文件

@@ -335,6 +335,7 @@
335 335
           return
336 336
         }
337 337
         this.uploading_new_record = true
338
+        
338 339
         createCourseOfDiseaseRecord(this.patient_id, this.new_content, this.course_of_disease_time, this.title).then(rs => {
339 340
           this.uploading_new_record = false
340 341
           var resp = rs.data