浏览代码

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
     params: params
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
 }
70
 }
71
 
71
 
72
 export function editPatientDialysisSolution(patient, id, solution, mode) {
72
 export function editPatientDialysisSolution(patient, id, solution, mode) {
73
-  
74
   return request({
73
   return request({
75
     url: '/api/patients/dialysissolution/edit?patient=' + patient + '&id=' + id + '&mode=' + mode,
74
     url: '/api/patients/dialysissolution/edit?patient=' + patient + '&id=' + id + '&mode=' + mode,
76
     method: 'put',
75
     method: 'put',
158
 }
157
 }
159
 
158
 
160
 export function createCourseOfDiseaseRecord(patient_id, content, record_time, title) {
159
 export function createCourseOfDiseaseRecord(patient_id, content, record_time, title) {
161
-  
162
   var params = {
160
   var params = {
163
     patient_id: patient_id,
161
     patient_id: patient_id,
164
     content: content,
162
     content: content,
165
     record_time: record_time,
163
     record_time: record_time,
166
     title: title
164
     title: title
167
   }
165
   }
168
-  console.log("params222222",params)
166
+  console.log('params222222', params)
169
   return request({
167
   return request({
170
     url: '/api/patient/course/create',
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
   }
183
   }
186
   return request({
184
   return request({
187
     url: '/api/patient/course/modify',
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
 }
374
 }
377
 
375
 
378
 export function deleteDryWeight(id, data) {
376
 export function deleteDryWeight(id, data) {
379
- 
380
   return request({
377
   return request({
381
     url: '/api/patient/deletedryweight?id=' + id,
378
     url: '/api/patient/deletedryweight?id=' + id,
382
     method: 'delete',
379
     method: 'delete',
384
   })
381
   })
385
 }
382
 }
386
 
383
 
387
-
388
-export function saveVasularAccess(params){
389
-   
384
+export function saveVasularAccess(params) {
390
   return request({
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
   return request({
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
   return request({
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
   return request({
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
   return request({
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
   return request({
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
   return request({
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
   return request({
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
   return request({
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
   return request({
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
   return request({
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
     params: params
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
       hidden: true,
199
       hidden: true,
200
       is_menu: false,
200
       is_menu: false,
201
       meta: { title: 'stockBatchNumber' }
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
     },
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
       path: '/stock/stockprint',
50
       path: '/stock/stockprint',
53
       hidden: true,
53
       hidden: true,
54
       is_menu: false,
54
       is_menu: false,
55
       meta: { title: 'stockprint', noCache: true }
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
       path: '/stock/stockprint',
67
       path: '/stock/stockprint',
68
       component: () => import('@/xt_pages/stock/stockPrint'),
68
       component: () => import('@/xt_pages/stock/stockPrint'),
69
       name: 'stockqueryprint',
69
       name: 'stockqueryprint',
70
       hidden: true,
70
       hidden: true,
71
       is_menu: false,
71
       is_menu: false,
72
       meta: { title: 'stockprint', noCache: true }
72
       meta: { title: 'stockprint', noCache: true }
73
-     },
73
+    },
74
 
74
 
75
-     {
75
+    {
76
       path: '/stock/in/detail/print',
76
       path: '/stock/in/detail/print',
77
       component: () => import('@/xt_pages/stock/stockInOrderDetailPrint'),
77
       component: () => import('@/xt_pages/stock/stockInOrderDetailPrint'),
78
       name: 'stockInDetailPrint',
78
       name: 'stockInDetailPrint',
79
       hidden: true,
79
       hidden: true,
80
       is_menu: false,
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
       component: () => import('@/xt_pages/stock/stockOutOrderDetailPrint'),
85
       component: () => import('@/xt_pages/stock/stockOutOrderDetailPrint'),
86
       name: 'stockOutDetailPrint',
86
       name: 'stockOutDetailPrint',
87
       hidden: true,
87
       hidden: true,
88
       is_menu: false,
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
           if(unitArr.indexOf(this.form.drug_dose_unit) == -1){
757
           if(unitArr.indexOf(this.form.drug_dose_unit) == -1){
758
             this.form.drug_dose_unit = ''
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
         this.getAdviceConfig()
773
         this.getAdviceConfig()

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

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

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

105
           {{ getGoodUnit(scope.row.good_unit) }}
105
           {{ getGoodUnit(scope.row.good_unit) }}
106
         </template>
106
         </template>
107
       </el-table-column> -->
107
       </el-table-column> -->
108
-      <el-table-column label="零售价" width="60" align="center">
108
+      <el-table-column label="零售价" width="100" align="center">
109
         <template slot-scope="scope">
109
         <template slot-scope="scope">
110
           {{ scope.row.retail_price }}
110
           {{ scope.row.retail_price }}
111
         </template>
111
         </template>
124
 
124
 
125
       </el-table-column>
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
         <template slot-scope="scope">
128
         <template slot-scope="scope">
129
           <el-button @click="handleGoodInfoEdit(scope.$index, scope.row)" type="primary" size="small">编辑</el-button>
129
           <el-button @click="handleGoodInfoEdit(scope.$index, scope.row)" type="primary" size="small">编辑</el-button>
130
           <!--<el-button type="primary" size="small" @click="clickSelfPayment(scope.row.id)">自付比例</el-button>-->
130
           <!--<el-button type="primary" size="small" @click="clickSelfPayment(scope.row.id)">自付比例</el-button>-->
131
           <el-button type="danger" size="small" @click="handleGoodInfoDelete(scope.$index, scope.row)">删除</el-button>
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
              <span v-if="scope.row.is_mark == 0">备案</span>
134
              <span v-if="scope.row.is_mark == 0">备案</span>
135
              <span v-if="scope.row.is_mark == 1">撤销</span>
135
              <span v-if="scope.row.is_mark == 1">撤销</span>
136
           </el-button>
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
             <span v-if="scope.row.is_mark == 0 || scope.row.is_mark == 2"  @click="putOnRecord(scope.row.id)" >目录对照</span>
139
             <span v-if="scope.row.is_mark == 0 || scope.row.is_mark == 2"  @click="putOnRecord(scope.row.id)" >目录对照</span>
140
             <span v-if="scope.row.is_mark == 1"  @click="putOnUnRecord(scope.row.id)" >撤消对照</span>
140
             <span v-if="scope.row.is_mark == 1"  @click="putOnUnRecord(scope.row.id)" >撤消对照</span>
141
           </el-button>
141
           </el-button>

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

17
             :value="item.id">
17
             :value="item.id">
18
           </el-option>
18
           </el-option>
19
         </el-select>
19
         </el-select>
20
-        <label class="title"><span class="name">是否收费</span> : </label>
20
+        <label class="title"><span class="name">是否备案</span> : </label>
21
         <el-select v-model="is_charge" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeCharge">
21
         <el-select v-model="is_charge" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeCharge">
22
           <el-option
22
           <el-option
23
             v-for="item in options"
23
             v-for="item in options"
76
        ></el-table-column>
76
        ></el-table-column>
77
       <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
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
         <template slot-scope="scope">
80
         <template slot-scope="scope">
81
           <div>{{scope.row.drug_name}}</div>
81
           <div>{{scope.row.drug_name}}</div>
82
         </template>
82
         </template>
83
       </el-table-column>
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
         <template slot-scope="scope">
85
         <template slot-scope="scope">
86
           <!-- <div>{{scope.row.drug_spec}}</div> -->
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
         </template>
90
         </template>
89
       </el-table-column>
91
       </el-table-column>
90
       <!-- <el-table-column prop="date" label="最大单位" width="60" align="center">
92
       <!-- <el-table-column prop="date" label="最大单位" width="60" align="center">
97
           <div>{{scope.row.min_unit}}</div>
99
           <div>{{scope.row.min_unit}}</div>
98
         </template>
100
         </template>
99
       </el-table-column> -->
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
         <template slot-scope="scope">
103
         <template slot-scope="scope">
102
           <div>{{scope.row.last_price}}</div>
104
           <div>{{scope.row.last_price}}</div>
103
         </template>
105
         </template>
104
       </el-table-column>
106
       </el-table-column>
105
-      <el-table-column label="零售价" width="60" align="center">
107
+      <el-table-column label="零售价" width="100" align="center">
106
         <template slot-scope="scope">
108
         <template slot-scope="scope">
107
           <div>{{scope.row.retail_price}}</div>
109
           <div>{{scope.row.retail_price}}</div>
108
         </template>
110
         </template>

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

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

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

228
               label: '未备案'
228
               label: '未备案'
229
           }],
229
           }],
230
           is_mark:"",
230
           is_mark:"",
231
-          limit:100,
232
           page:1,
231
           page:1,
233
           departMentList:[],
232
           departMentList:[],
234
            dialogVisible:false,
233
            dialogVisible:false,

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

24
       </div>
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
       <el-form
28
       <el-form
55
         ref="adForm"
29
         ref="adForm"
56
         :rules="adRules"
30
         :rules="adRules"

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

693
             adviceNames: [],
693
             adviceNames: [],
694
             advice_doctor: this.groupForm.advice_doctor,
694
             advice_doctor: this.groupForm.advice_doctor,
695
             remark: this.groupForm.remark,
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
           var adviceNames = [];
700
           var adviceNames = [];
700
           for (const index in this.groupForm.adviceNames) {
701
           for (const index in this.groupForm.adviceNames) {
701
             adviceNames.unshift(this.groupForm.adviceNames[index]);
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
           submitForm.adviceNames = adviceNames;
707
           submitForm.adviceNames = adviceNames;
704
           let mode = "1";
708
           let mode = "1";
705
           
709
           
729
              }
733
              }
730
           }
734
           }
731
           console.log("2222",submitForm)
735
           console.log("2222",submitForm)
732
-          
736
+  
733
           CreateGroupAdvice(this.patientID, 0, submitForm, mode).then(
737
           CreateGroupAdvice(this.patientID, 0, submitForm, mode).then(
734
             response => {
738
             response => {
735
               if (response.data.state == 0) {
739
               if (response.data.state == 0) {
1684
   created(){
1688
   created(){
1685
     //获取自备药
1689
     //获取自备药
1686
     this.getSelfMedicalList()
1690
     this.getSelfMedicalList()
1691
+    console.log("模板数据",this.adviceTemplates)
1687
   }
1692
   }
1688
 };
1693
 };
1689
 </script>
1694
 </script>

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

1837
         // 入口
1837
         // 入口
1838
         var pre = pre
1838
         var pre = pre
1839
         this.dialysisPrescription.mode_id = this.$route.query.mode_id ? this.$route.query.mode_id : this.mode_id
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
         console.log('this.dialysisPrescription.mode_id',this.dialysisPrescription.mode_id)
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
           this.zhiShow = true
1846
           this.zhiShow = true
1843
           this.huShow = true
1847
           this.huShow = true
1844
           this.totalShow = true
1848
           this.totalShow = true

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

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

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

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

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

9
             <div  style="position: absolute;top:40px;left:300px">{{ list.number }}</div>
9
             <div  style="position: absolute;top:40px;left:300px">{{ list.number }}</div>
10
             <div></div>
10
             <div></div>
11
             <div>
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
             </div>
15
             </div>
16
         </div>
16
         </div>
17
         <div style="display:flex;justify-content: space-between;">
17
         <div style="display:flex;justify-content: space-between;">
18
             <div style="position: absolute;top:60px;left:120px;"> {{ paramsObj.name }}</div>
18
             <div style="position: absolute;top:60px;left:120px;"> {{ paramsObj.name }}</div>
19
             <div style="position: absolute;top:60px;left:210px;">√</div>
19
             <div style="position: absolute;top:60px;left:210px;">√</div>
20
             <!-- <div>{{ list.pay_way }}</div> -->
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
         </div>
23
         </div>
24
         <div style="display:flex;justify-content: space-between;">
24
         <div style="display:flex;justify-content: space-between;">
25
             <!-- <div>{{ paramsObj.gend == 1 ? '男' : '女' }}</div> -->
25
             <!-- <div>{{ paramsObj.gend == 1 ? '男' : '女' }}</div> -->
115
 
115
 
116
 <script>
116
 <script>
117
 import { getInvoice } from '@/api/project/project'
117
 import { getInvoice } from '@/api/project/project'
118
+import { uParseTime } from '@/utils/tools'
118
 export default {
119
 export default {
119
     props:{
120
     props:{
120
         paramsObj:Object
121
         paramsObj:Object
202
             this.zhongwen =  str.replace(/零(仟|佰|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
203
             this.zhongwen =  str.replace(/零(仟|佰|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
203
             console.log(this.zhongwen)
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
     watch:{
217
     watch:{

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

268
                                             <template slot-scope="scope">{{ scope.row.drug_name }}</template>
268
                                             <template slot-scope="scope">{{ scope.row.drug_name }}</template>
269
                                         </el-table-column>
269
                                         </el-table-column>
270
                                         <el-table-column label="规格" width="60">
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
                                         </el-table-column>
275
                                         </el-table-column>
273
                                         <el-table-column label="库存" width="60">
276
                                         <el-table-column label="库存" width="60">
274
                                             <template slot-scope="scope">
277
                                             <template slot-scope="scope">
283
                                             <template slot-scope="scope">{{ scope.row.retail_price }}</template>
286
                                             <template slot-scope="scope">{{ scope.row.retail_price }}</template>
284
                                         </el-table-column>
287
                                         </el-table-column>
285
                                     </el-table>
288
                                     </el-table>
286
-                                    <div>{{3*(2/3)}}</div>
289
+                                    <!-- <div>{{3*(2/3)}}</div> -->
287
                                 </div>
290
                                 </div>
288
 
291
 
289
                             </el-tab-pane>
292
                             </el-tab-pane>
2598
             this.curPrescriptions = this.prescriptions[i]
2601
             this.curPrescriptions = this.prescriptions[i]
2599
             this.$refs.multipleTable.clearSelection()
2602
             this.$refs.multipleTable.clearSelection()
2600
             this.$refs.tables.clearSelection()
2603
             this.$refs.tables.clearSelection()
2604
+            this.clearSelection()
2601
 
2605
 
2602
           }
2606
           }
2603
         }
2607
         }

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

190
             <span slot="footer" class="dialog-footer">
190
             <span slot="footer" class="dialog-footer">
191
         <el-button @click="centerDialogVisible = false">取 消</el-button>
191
         <el-button @click="centerDialogVisible = false">取 消</el-button>
192
         <el-button type="primary" @click="savePrint">确 定</el-button>
192
         <el-button type="primary" @click="savePrint">确 定</el-button>
193
-      </span>
193
+      </span>
194
         </el-dialog>
194
         </el-dialog>
195
         <el-dialog
195
         <el-dialog
196
                 class="centerDialog"
196
                 class="centerDialog"
437
             case 0:
437
             case 0:
438
               this.all_data = this.all_data_two
438
               this.all_data = this.all_data_two
439
               break
439
               break
440
-            case 1:
440
+            case 2:
441
               this.cure_data = this.cure_data_two
441
               this.cure_data = this.cure_data_two
442
               break
442
               break
443
-            case 2:
443
+            case 1:
444
               this.un_cure_data = this.un_cure_data_two
444
               this.un_cure_data = this.un_cure_data_two
445
               break
445
               break
446
           }
446
           }
452
               for (let i = 0; i < this.all_data.length; i++) {
452
               for (let i = 0; i < this.all_data.length; i++) {
453
                 if (this.all_data[i].name.indexOf(this.search_input) != -1 || this.all_data[i].number.indexOf(this.search_input) != -1) {
453
                 if (this.all_data[i].name.indexOf(this.search_input) != -1 || this.all_data[i].number.indexOf(this.search_input) != -1) {
454
                   arr = arr.concat(this.all_data[i])
454
                   arr = arr.concat(this.all_data[i])
455
+                  console.log(arr)
455
                 }
456
                 }
456
               }
457
               }
457
               this.all_data = arr
458
               this.all_data = arr
458
 
459
 
459
               break
460
               break
460
-            case 1:
461
+            case 2:
461
               let arr2 = []
462
               let arr2 = []
462
               for (let i = 0; i < this.cure_data.length; i++) {
463
               for (let i = 0; i < this.cure_data.length; i++) {
463
                 if (this.cure_data[i].name.indexOf(this.search_input) != -1 || this.cure_data[i].number.indexOf(this.search_input) != -1) {
464
                 if (this.cure_data[i].name.indexOf(this.search_input) != -1 || this.cure_data[i].number.indexOf(this.search_input) != -1) {
467
               this.cure_data = arr2
468
               this.cure_data = arr2
468
 
469
 
469
               break
470
               break
470
-            case 2:
471
+            case 1:
471
               let arr3 = []
472
               let arr3 = []
472
               for (let i = 0; i < this.un_cure_data.length; i++) {
473
               for (let i = 0; i < this.un_cure_data.length; i++) {
473
                 if (this.un_cure_data[i].name.indexOf(this.search_input) != -1 || this.un_cure_data[i].number.indexOf(this.search_input) != -1) {
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
           this.$refs.prescriptions.open(1, this.saveLoading)
3578
           this.$refs.prescriptions.open(1, this.saveLoading)
3578
         } else if (index == 2) {
3579
         } else if (index == 2) {
3579
 
3580
 
3580
-          this.getPrescriptionList(this.patientInfo.id)
3581
+          this.getPrescriptionList(this.patientInfo.id,1)
3581
           // this.$router.push("/outpatientDoctorStation/print?record="+this.record_date+"&prescription_id="+this.prescription_id)
3582
           // this.$router.push("/outpatientDoctorStation/print?record="+this.record_date+"&prescription_id="+this.prescription_id)
3582
         } else if (index == 3) {
3583
         } else if (index == 3) {
3583
           this.$refs.prescriptions.open(3)
3584
           this.$refs.prescriptions.open(3)
3585
           this.$refs.prescriptions.open(4)
3586
           this.$refs.prescriptions.open(4)
3586
         } else if (index == 6) {
3587
         } else if (index == 6) {
3587
           // this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
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
           // this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
3590
           // this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
3590
 
3591
 
3591
         }
3592
         }
3626
         this.prescription_id = data
3627
         this.prescription_id = data
3627
       },
3628
       },
3628
 
3629
 
3629
-      getPrescriptionList(id) {
3630
+      getPrescriptionList(id,type) {
3630
         getPrescriptionList(id,2).then(response => {
3631
         getPrescriptionList(id,2).then(response => {
3631
           if (response.data.state == 1) {
3632
           if (response.data.state == 1) {
3632
             this.centerDialogVisible = true
3633
             this.centerDialogVisible = true
3633
             var list = response.data.data.list
3634
             var list = response.data.data.list
3635
+            let arr = []
3634
             for (let i = 0; i < list.length; i++) {
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
       },
3649
       },
3644
       handleClick() {
3650
       handleClick() {
3645
         if(this.titleType == "电子处方"){
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
                               highlight-current-row
24
                               highlight-current-row
25
                               ref="tab">
25
                               ref="tab">
26
                         <el-table-column prop="name" label="姓名">
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
                         </el-table-column>
28
                         </el-table-column>
29
                     </el-table>
29
                     </el-table>
30
                 </div>
30
                 </div>

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

35
               <div class="Rp">Rp:</div>
35
               <div class="Rp">Rp:</div>
36
               <div class="drugsBox" v-for="(it,index) in item.advices.slice(pageIndex * 5,(pageIndex * 5) + item.pageArr[pageIndex])" :key="index">
36
               <div class="drugsBox" v-for="(it,index) in item.advices.slice(pageIndex * 5,(pageIndex * 5) + item.pageArr[pageIndex])" :key="index">
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> -->
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
                   <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>
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
               </div>
40
               </div>
41
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
41
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
43
                </div>
43
                </div>
44
                
44
                
45
               <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
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
                   <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>
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
               </div>
48
               </div>
49
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
49
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">

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

5
         <img src="../../../assets/img/bailinTop.jpg" style="width:100%" alt="">
5
         <img src="../../../assets/img/bailinTop.jpg" style="width:100%" alt="">
6
         <div class="printTitle">治疗单</div>
6
         <div class="printTitle">治疗单</div>
7
         <div style="display:flex;">
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
         </div>
11
         </div>
12
 
12
 
13
 
13
 
72
               <div class="Rp">Rp:</div>
72
               <div class="Rp">Rp:</div>
73
               <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
73
               <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
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> -->
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
               </div>
76
               </div>
77
               <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
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
               </div>
79
               </div>
80
               <div style="text-align:center;" >(以下空白)</div>
80
               <div style="text-align:center;" >(以下空白)</div>
81
         </div>
81
         </div>

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

15
             <el-form-item label="耗材名称 : " prop="good_name" style="width:100%">
15
             <el-form-item label="耗材名称 : " prop="good_name" style="width:100%">
16
               <el-input v-model="form.good_name" placeholder="" maxlength="30"></el-input>
16
               <el-input v-model="form.good_name" placeholder="" maxlength="30"></el-input>
17
             </el-form-item>
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
             <el-form-item label="耗材种类 : " prop="good_kind">
18
             <el-form-item label="耗材种类 : " prop="good_kind">
25
               <el-select v-model="form.good_kind" style="width:160px;" placeholder="请选择">
19
               <el-select v-model="form.good_kind" style="width:160px;" placeholder="请选择">
26
                 <el-option
20
                 <el-option
63
                 <el-form-item prop="min_number" class="noMargin">
57
                 <el-form-item prop="min_number" class="noMargin">
64
                   <el-input v-model="form.min_number" :disabled="showMinNumber" style="width:100px" type="number" placeholder="拆零"> </el-input>
58
                   <el-input v-model="form.min_number" :disabled="showMinNumber" style="width:100px" type="number" placeholder="拆零"> </el-input>
65
                 </el-form-item>
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
                     <el-option
62
                     <el-option
69
                       v-for="(item,index) in getDataConfig('hemodialysis','units')"
63
                       v-for="(item,index) in getDataConfig('hemodialysis','units')"
70
                       :key="index"
64
                       :key="index"
72
                       :value="item.name">
66
                       :value="item.name">
73
                     </el-option>
67
                     </el-option>
74
                   </el-select>
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
             </div>
70
             </div>
88
 
71
 
89
             <el-form-item label="生产厂商 : " prop="manufacturer" style="width:100%">
72
             <el-form-item label="生产厂商 : " prop="manufacturer" style="width:100%">
110
             <el-form-item label="包装零售价 : " prop="retail_price">
93
             <el-form-item label="包装零售价 : " prop="retail_price">
111
               <el-input v-model="form.packing_price" style="width:160px;" placeholder="" maxlength="30"></el-input>
94
               <el-input v-model="form.packing_price" style="width:160px;" placeholder="" maxlength="30"></el-input>
112
             </el-form-item>
95
             </el-form-item>
113
-            <el-form-item label="拆零零售价 : " prop="retail_price">
96
+            <!-- <el-form-item label="拆零零售价 : " prop="retail_price">
114
               <el-input v-model="form.retail_price" style="width:160px;" placeholder="" maxlength="30"></el-input>
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
             <el-form-item label="进货价 : " prop="buy_price">
100
             <el-form-item label="进货价 : " prop="buy_price">
118
               <el-input v-model="form.buy_price" style="width:160px;" placeholder="" maxlength="30"></el-input>
101
               <el-input v-model="form.buy_price" style="width:160px;" placeholder="" maxlength="30"></el-input>
366
           statistics_category: '',
349
           statistics_category: '',
367
           agent: '',
350
           agent: '',
368
           good_status: '',
351
           good_status: '',
369
-          default_count: '',
352
+          default_count:1,
370
           sign: '',
353
           sign: '',
371
           is_default: '',
354
           is_default: '',
372
           is_charge_use: '',
355
           is_charge_use: '',
406
             { required: true, message: '请选择生产厂商', trigger: 'blur' }
389
             { required: true, message: '请选择生产厂商', trigger: 'blur' }
407
           ], good_unit: [
390
           ], good_unit: [
408
             { required: true, message: '请选择单位', trigger: 'blur' }
391
             { required: true, message: '请选择单位', trigger: 'blur' }
409
-          ], retail_price: [
410
-            { required: true, message: '请输入零价', trigger: 'blur' }
411
           ], stock_warn_count: [
392
           ], stock_warn_count: [
412
             { required: true, message: '请输入库存警戒', trigger: 'blur' }
393
             { required: true, message: '请输入库存警戒', trigger: 'blur' }
413
           ],social_security_directory_code:[
394
           ],social_security_directory_code:[

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

71
       },
71
       },
72
        out_stock: '1',
72
        out_stock: '1',
73
        stock_attribute:"1",
73
        stock_attribute:"1",
74
-       showAttribute:false
74
+       showAttribute:true
75
     };
75
     };
76
   },
76
   },
77
   props: {
77
   props: {
89
   },
89
   },
90
   methods: {
90
   methods: {
91
     show:function(val){
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
       this.visibility = true
100
       this.visibility = true
101
 
101
 

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

55
         :data="tableList"
55
         :data="tableList"
56
         border
56
         border
57
         style="width: 100%">
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
            <template  slot-scope="scope">
59
            <template  slot-scope="scope">
60
               {{scope.$index + 1}}
60
               {{scope.$index + 1}}
61
            </template>
61
            </template>
62
         </el-table-column>
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
            <template slot-scope="scope">
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
            </template>
67
            </template>
68
         </el-table-column>
68
         </el-table-column>
69
-        <el-table-column prop="drug_name" label="出/入库单据编码">
69
+        <el-table-column prop="drug_name" label="出/入库单据编码" align="center">
70
            <template slot-scope="scope">
70
            <template slot-scope="scope">
71
              <span v-if="scope.row.drug_way == 2"> {{scope.row.warehouse_out_order_number}}</span>
71
              <span v-if="scope.row.drug_way == 2"> {{scope.row.warehouse_out_order_number}}</span>
72
              <span v-if="scope.row.drug_way == 4">{{scope.row.warehousing_order}}</span>
72
              <span v-if="scope.row.drug_way == 4">{{scope.row.warehousing_order}}</span>
73
             
73
             
74
            </template>
74
            </template>
75
         </el-table-column>
75
         </el-table-column>
76
-        <el-table-column prop="drug_name" label="操作日期">
76
+        <el-table-column prop="drug_name" label="操作日期" align="center">
77
            <template slot-scope="scope">
77
            <template slot-scope="scope">
78
              {{getTime(scope.row.ctime)}}
78
              {{getTime(scope.row.ctime)}}
79
            </template>
79
            </template>
80
         </el-table-column>
80
         </el-table-column>
81
-         <el-table-column prop="drug_name" label="出入库数量">
81
+         <el-table-column prop="drug_name" label="出入库数量" align="center">
82
            <template slot-scope="scope">
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
            </template>
85
            </template>
86
         </el-table-column>
86
         </el-table-column>
87
-         <el-table-column prop="drug_name" label="库存剩余量">
87
+         <el-table-column prop="drug_name" label="剩余库存量" align="center">
88
            <template slot-scope="scope">
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
            </template>
93
            </template>
92
         </el-table-column>
94
         </el-table-column>
93
-        <el-table-column prop="drug_name" label="进/出货单价">
95
+        <el-table-column prop="drug_name" label="进/出货单价" align="center">
94
            <template slot-scope="scope">
96
            <template slot-scope="scope">
95
              <span v-if="scope.row.drug_way == 4"> {{scope.row.price}}</span>
97
              <span v-if="scope.row.drug_way == 4"> {{scope.row.price}}</span>
96
              <span v-if="scope.row.drug_way == 2">{{scope.row.price}}</span>
98
              <span v-if="scope.row.drug_way == 2">{{scope.row.price}}</span>
97
            </template>
99
            </template>
98
         </el-table-column>
100
         </el-table-column>
99
-         <el-table-column prop="drug_name" label="有效期">
101
+         <el-table-column prop="drug_name" label="有效期" align="center">
100
            <template slot-scope="scope">
102
            <template slot-scope="scope">
101
              <span v-if="scope.row.drug_way == 4"> {{getTime(scope.row.expiry_date)}}</span>
103
              <span v-if="scope.row.drug_way == 4"> {{getTime(scope.row.expiry_date)}}</span>
102
              <span v-if="scope.row.drug_way == 2">{{getTime(scope.row.expiry_date)}}</span>
104
              <span v-if="scope.row.drug_way == 2">{{getTime(scope.row.expiry_date)}}</span>
103
            </template>
105
            </template>
104
         </el-table-column>
106
         </el-table-column>
105
-        <el-table-column prop="drug_name" label="批号">
107
+        <el-table-column prop="drug_name" label="批号" align="center">
106
            <template slot-scope="scope">
108
            <template slot-scope="scope">
107
              <span v-if="scope.row.drug_way == 2"> {{scope.row.number}}</span>
109
              <span v-if="scope.row.drug_way == 2"> {{scope.row.number}}</span>
108
              <span v-if="scope.row.drug_way == 4">{{scope.row.number}}</span>
110
              <span v-if="scope.row.drug_way == 4">{{scope.row.number}}</span>
109
            </template>
111
            </template>
110
         </el-table-column>
112
         </el-table-column>
111
-        <el-table-column prop="drug_name" label="供应商">
113
+        <el-table-column prop="drug_name" label="生产商" align="center">
112
            <template slot-scope="scope">
114
            <template slot-scope="scope">
113
              <span v-if="scope.row.drug_way == 4"> {{getManufacturer(scope.row.manufacturer)}}</span>
115
              <span v-if="scope.row.drug_way == 4"> {{getManufacturer(scope.row.manufacturer)}}</span>
114
              <span v-if="scope.row.drug_way == 2">{{getManufacturer(scope.row.manufacturer)}}</span>
116
              <span v-if="scope.row.drug_way == 2">{{getManufacturer(scope.row.manufacturer)}}</span>
140
 <script>
142
 <script>
141
   import { uParseTime } from '@/utils/tools'
143
   import { uParseTime } from '@/utils/tools'
142
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
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
   import SettingDialog from './settingDialog/index'
146
   import SettingDialog from './settingDialog/index'
145
   import { getDictionaryDataConfig } from "@/utils/data";
147
   import { getDictionaryDataConfig } from "@/utils/data";
146
   export default {
148
   export default {
151
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
153
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
152
       this.getlist()
154
       this.getlist()
153
       this.getOutList()
155
       this.getOutList()
156
+      this.getDrugCountList()
154
     },
157
     },
155
     components: {
158
     components: {
156
       SettingDialog,
159
       SettingDialog,
193
           {id:0,name:"全部"},
196
           {id:0,name:"全部"},
194
           {id:1,name:"手动出库"},
197
           {id:1,name:"手动出库"},
195
           {id:2,name:"自动出库"},
198
           {id:2,name:"自动出库"},
196
-          {id:3,name:"入库"},
199
+          {id:3,name:"手动入库"},
197
 
200
 
198
         ],
201
         ],
199
         outList:[],
202
         outList:[],
203
+        countList:[],
204
+        outCountList:[],
205
+        autoCountList:[],
200
       }
206
       }
201
     },
207
     },
202
     methods:{
208
     methods:{
213
          getDrugStockFlow(params).then(response=>{
219
          getDrugStockFlow(params).then(response=>{
214
            if(response.data.state == 1){
220
            if(response.data.state == 1){
215
             var list = response.data.data.list
221
             var list = response.data.data.list
216
-            console.log("入库数据",list)
222
+            console.log("入库数据0000",list)
217
             for(let i=0;i<list.length;i++){
223
             for(let i=0;i<list.length;i++){
218
                list[i].drug_way = 4
224
                list[i].drug_way = 4
219
                this.tableList.push(list[i])
225
                this.tableList.push(list[i])
244
                   outList[i].drug_way = 2
250
                   outList[i].drug_way = 2
245
                   this.tableList.push(outList[i])
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
               console.log("列表数据",this.tableList)
253
               console.log("列表数据",this.tableList)
251
             }
254
             }
252
          })
255
          })
253
        },
256
        },
254
        handleSizeChange(val) {
257
        handleSizeChange(val) {
255
         this.limit = val
258
         this.limit = val
256
-        this.GetAllDrugStockQueryList()
259
+        this.getlist()
257
       },
260
       },
258
       handleCurrentChange(val) {
261
       handleCurrentChange(val) {
259
         this.page = val
262
         this.page = val
260
-        this.GetAllDrugStockQueryList()
263
+        this.getlist()
261
       },
264
       },
262
         
265
         
263
     startTimeChange: function(val) {
266
     startTimeChange: function(val) {
267
         this.$message.error("开始时间不能大于结束时间");
270
         this.$message.error("开始时间不能大于结束时间");
268
         this.start_time = "";
271
         this.start_time = "";
269
       } else {
272
       } else {
270
-        this.GetAllDrugStockQueryList();
273
+        this.getlist();
271
       }
274
       }
272
     },
275
     },
273
     endTimeChange: function(val) {
276
     endTimeChange: function(val) {
276
         this.$message.error("结束时间不能小于开始时间");
279
         this.$message.error("结束时间不能小于开始时间");
277
         this.end_time = "";
280
         this.end_time = "";
278
       } else {
281
       } else {
279
-        this.GetAllDrugStockQueryList();
282
+        this.getlist();
280
       }
283
       }
281
      },
284
      },
282
-     changeDrug(){},
283
      getManufacturer(id){
285
      getManufacturer(id){
284
        var name = ""
286
        var name = ""
285
        for(let i=0;i<this.manufacturerList.length;i++){
287
        for(let i=0;i<this.manufacturerList.length;i++){
286
          if(id == this.manufacturerList[i].id){
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
        return name
292
        return name
299
         return uParseTime(val, '{y}-{m}-{d}')
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
 </script>
378
 </script>

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

1
 <template>
1
 <template>
2
   <div class="main-contain">
2
   <div class="main-contain">
3
     <div class="position">
3
     <div class="position">
4
-      <!--<bread-crumb :crumbs='crumbs'></bread-crumb>-->
5
       <bread-crumb :crumbs="crumbs"></bread-crumb>
4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
6
       <el-button
5
       <el-button
7
         size="small"
6
         size="small"
71
           @change="changeAllSelected"
70
           @change="changeAllSelected"
72
           >全选</el-checkbox
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
       </div>
75
       </div>
78
 
76
 
79
       <el-table
77
       <el-table
178
       <el-pagination
176
       <el-pagination
179
         @size-change="handleSizeChange"
177
         @size-change="handleSizeChange"
180
         @current-change="handleCurrentChange"
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
         background
181
         background
184
-        style="margin-top:20px;float: right"
182
+        style="margin-top:20px;text-align: right"
185
         layout="total, sizes, prev, pager, next, jumper"
183
         layout="total, sizes, prev, pager, next, jumper"
186
         :total="total"
184
         :total="total"
187
       >
185
       >
188
       </el-pagination>
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
     </div>
264
     </div>
190
 
265
 
191
 
266
 
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
         @size-change="handleSizeChange"
368
         @size-change="handleSizeChange"
389
         @current-change="handleCurrentChange"
369
         @current-change="handleCurrentChange"
390
         :page-sizes="[10, 50, 100]"
370
         :page-sizes="[10, 50, 100]"
394
         layout="total, sizes, prev, pager, next, jumper"
374
         layout="total, sizes, prev, pager, next, jumper"
395
         :total="total"
375
         :total="total"
396
       >
376
       >
397
-      </el-pagination>
377
+      </el-pagination> -->
398
 
378
 
399
   </div>
379
   </div>
400
 </template>
380
 </template>
452
       searchKey: "",
432
       searchKey: "",
453
       type: 1,
433
       type: 1,
454
       page: 1,
434
       page: 1,
455
-      limit: 10,
435
+      limit: 5,
456
       checked: false,
436
       checked: false,
457
       total: 0,
437
       total: 0,
458
       pageTotal: 0,
438
       pageTotal: 0,
478
       dialogVisible:false,
458
       dialogVisible:false,
479
       showOne:false,
459
       showOne:false,
480
       drugTypeList:[],
460
       drugTypeList:[],
481
-      manufacturerList:[]
461
+      manufacturerList:[],
462
+      order_id:""
482
     };
463
     };
483
   },
464
   },
484
   methods: {
465
   methods: {
735
       }
716
       }
736
     },
717
     },
737
     select(selection) {
718
     select(selection) {
719
+      console.log("selection",selection)
720
+      this.order_id = selection[0].id
738
       this.selectedTableData = selection;
721
       this.selectedTableData = selection;
739
     },
722
     },
740
     batchDelete() {
723
     batchDelete() {
823
      getDictionaryDataConfig(module, filed_name) {
806
      getDictionaryDataConfig(module, filed_name) {
824
         return getDictionaryDataConfig(module, filed_name)
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
 </script>
819
 </script>

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

87
                   >
87
                   >
88
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
88
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
89
                   <template slot-scope="{ item }">
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
                   </template>
91
                   </template>
92
                  </el-autocomplete>
92
                  </el-autocomplete>
93
               </el-form-item>
93
               </el-form-item>
98
               <span>药品类型</span>
98
               <span>药品类型</span>
99
             </template>
99
             </template>
100
              <template slot-scope="scope">
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
                 <el-option
102
                 <el-option
103
                   v-for="(option, index) in drugTypeList"
103
                   v-for="(option, index) in drugTypeList"
104
                   :key="index"
104
                   :key="index"
878
   .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
878
   .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
879
     background: #6fb5fa;
879
     background: #6fb5fa;
880
   }
880
   }
881
+  .el-autocomplete-suggestion{
882
+    width: 400px !important;
883
+  }
881
 
884
 
882
 </style>
885
 </style>

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

2
   <div class="main-contain">
2
   <div class="main-contain">
3
     <div class="position">
3
     <div class="position">
4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
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
       </el-button>
6
       </el-button>
7
     </div>
7
     </div>
8
     <div class="app-container ">
8
     <div class="app-container ">

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

128
                   >
128
                   >
129
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
129
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
130
                   <template slot-scope="{ item }">
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
                   </template>
132
                   </template>
133
                  </el-autocomplete>
133
                  </el-autocomplete>
134
               </el-form-item>
134
               </el-form-item>

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

68
           @change="changeAllSelected"
68
           @change="changeAllSelected"
69
           >全选</el-checkbox
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
       </div>
73
       </div>
75
 
74
 
76
       <el-table
75
       <el-table
119
           </template>
118
           </template>
120
         </el-table-column>
119
         </el-table-column>
121
 
120
 
122
-        <el-table-column label="厂家" align="center">
121
+        <!-- <el-table-column label="厂家" align="center">
123
           <template slot-scope="scope">
122
           <template slot-scope="scope">
124
             {{scope.row.manufacturers ? scope.row.manufacturers.manufacturer_name:''}}
123
             {{scope.row.manufacturers ? scope.row.manufacturers.manufacturer_name:''}}
125
           </template>
124
           </template>
129
           <template slot-scope="scope">
128
           <template slot-scope="scope">
130
             {{scope.row.dealers ? scope.row.dealers.dealer_name:''}}
129
             {{scope.row.dealers ? scope.row.dealers.dealer_name:''}}
131
           </template>
130
           </template>
132
-        </el-table-column>
131
+        </el-table-column> -->
133
 
132
 
134
 
133
 
135
         <el-table-column label="操作" align="center" width="240">
134
         <el-table-column label="操作" align="center" width="240">
185
       <el-pagination
184
       <el-pagination
186
         @size-change="handleSizeChange"
185
         @size-change="handleSizeChange"
187
         @current-change="handleCurrentChange"
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
         background
189
         background
191
-        style="margin-top:20px;float: right"
190
+        style="margin-top:20px;text-align: right"
192
         layout="total, sizes, prev, pager, next, jumper"
191
         layout="total, sizes, prev, pager, next, jumper"
193
         :total="total"
192
         :total="total"
194
       >
193
       >
195
       </el-pagination>
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
     <el-dialog
285
     <el-dialog
442
         <el-button type="primary" @click="dialogVisibleTwo = false">确 定</el-button>
433
         <el-button type="primary" @click="dialogVisibleTwo = false">确 定</el-button>
443
       </span>
434
       </span>
444
     </el-dialog>
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
 </template>
493
 </template>
447
 
494
 
448
 <script>
495
 <script>
455
   getDrugWarehouseOutList,
502
   getDrugWarehouseOutList,
456
   getDrugWarehouseOutInfo,
503
   getDrugWarehouseOutInfo,
457
   getDrugWarehouseOutUser,
504
   getDrugWarehouseOutUser,
458
-  getDrugAutoMaticList
505
+  getDrugAutoMaticList,
506
+  getSinleOrderDetail,
507
+  getAutoDrugDetail
459
 } from "@/api/drug/drug_stock";
508
 } from "@/api/drug/drug_stock";
460
 import BreadCrumb from "../../components/bread-crumb";
509
 import BreadCrumb from "../../components/bread-crumb";
461
 import { getInitializtion } from '@/api/stock'
510
 import { getInitializtion } from '@/api/stock'
495
         { path: false, name: "出库单" }
544
         { path: false, name: "出库单" }
496
       ],
545
       ],
497
       page: 1,
546
       page: 1,
498
-      limit: 10,
547
+      limit: 5,
499
       checked: false,
548
       checked: false,
500
       total: 0,
549
       total: 0,
501
       pageTotal: 0,
550
       pageTotal: 0,
527
       drugTypeList:[],
576
       drugTypeList:[],
528
       tableShow:false,
577
       tableShow:false,
529
       manufacturerList:[],
578
       manufacturerList:[],
579
+      drugDialogVisible:false,
580
+      order_id:0,
530
     };
581
     };
531
   },
582
   },
532
   methods: {
583
   methods: {
667
     },
718
     },
668
 
719
 
669
     handleEdit: function(index, row) {
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
     // handleSearch(id,time,warehouse_out_order_number){
727
     // handleSearch(id,time,warehouse_out_order_number){
676
     //   this.warehousingOutInfo.warehousingOutData = []
728
     //   this.warehousingOutInfo.warehousingOutData = []
680
     //   this.dialogVisible = true
732
     //   this.dialogVisible = true
681
     // },
733
     // },
682
     handleSearch(val){
734
     handleSearch(val){
735
+       console.log("val2222222222",val)
683
        this.getInitializtion()
736
        this.getInitializtion()
684
-       this.GetOrderDetail(val.id)
737
+       this.getSinleOrderDetail(val.id)
685
        this.list = []
738
        this.list = []
686
        this.getDrugAutoMaticList(val.id,val.time,val.warehouse_out_order_number)
739
        this.getDrugAutoMaticList(val.id,val.time,val.warehouse_out_order_number)
740
+
687
     },
741
     },
688
     GetOrderDetail(order_id) {
742
     GetOrderDetail(order_id) {
689
         const params = {
743
         const params = {
702
               this.tableList.push(response.data.data.list[i])
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
             this.warehousingOutInfo.info = response.data.data.info
760
             this.warehousingOutInfo.info = response.data.data.info
707
             var manulist = response.data.data.manulist
761
             var manulist = response.data.data.manulist
708
             this.manufacturerList = manulist
762
             this.manufacturerList = manulist
757
       }
811
       }
758
     },
812
     },
759
     select(selection) {
813
     select(selection) {
814
+      this.order_id = selection[0].id
760
       this.selectedTableData = selection;
815
       this.selectedTableData = selection;
761
     },
816
     },
762
     batchDelete() {
817
     batchDelete() {
900
            var drugList = response.data.data.drugList
955
            var drugList = response.data.data.drugList
901
            console.log("药品列表",drugList)
956
            console.log("药品列表",drugList)
902
            this.drugList = drugList
957
            this.drugList = drugList
958
+           var manulist = response.data.data.manufacturerList
959
+           this.manufacturerList = manulist
903
          }
960
          }
904
       })
961
       })
905
     },
962
     },
958
        }
1015
        }
959
      }
1016
      }
960
      return name
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
 </script>
1068
 </script>

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

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

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

38
       >
38
       >
39
       </drugs-stock-dialog>
39
       </drugs-stock-dialog>
40
 
40
 
41
-      <div class="cell clearfix">
41
+      <!-- <div class="cell clearfix">
42
         <label class="title"><span class="name">出库时间</span> : </label>
42
         <label class="title"><span class="name">出库时间</span> : </label>
43
         <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false"
43
         <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false"
44
                         style="width: 196px;"
44
                         style="width: 196px;"
45
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
45
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
46
                         value-format="yyyy-MM-dd"></el-date-picker>
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
         <label class="title"><span class="name">经销商</span> : </label>
51
         <label class="title"><span class="name">经销商</span> : </label>
52
         <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer">
52
         <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer">
53
           <el-option
53
           <el-option
57
             :value="option.id">
57
             :value="option.id">
58
           </el-option>
58
           </el-option>
59
         </el-select>
59
         </el-select>
60
-      </div>
61
-
60
+      </div> -->
62
 
61
 
62
+<!-- 
63
       <div class="cell clearfix">
63
       <div class="cell clearfix">
64
         <label class="title"><span class="name">厂商</span> : </label>
64
         <label class="title"><span class="name">厂商</span> : </label>
65
 
65
 
71
             :value="option.id">
71
             :value="option.id">
72
           </el-option>
72
           </el-option>
73
         </el-select>
73
         </el-select>
74
-      </div>
74
+      </div> -->
75
 
75
 
76
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
76
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
77
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
77
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
78
                   max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
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
             <template slot="header" slot-scope="scope">
82
             <template slot="header" slot-scope="scope">
83
               <span>药品名称<span style="color: red">*</span></span>
83
               <span>药品名称<span style="color: red">*</span></span>
84
             </template>
84
             </template>
85
 
85
 
86
             <template slot-scope="scope">
86
             <template slot-scope="scope">
87
               <el-form-item style="padding-top: 15px">
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
               </el-form-item>
104
               </el-form-item>
95
             </template>
105
             </template>
96
           </el-table-column>
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
             <template slot="header" slot-scope="scope">
123
             <template slot="header" slot-scope="scope">
99
-              <span>规格名称<span style="color: red">*</span></span>
124
+              <span>规格&单位</span>
100
             </template>
125
             </template>
101
             <template slot-scope="scope">
126
             <template slot-scope="scope">
102
-              <el-form-item style="padding-top: 15px">
127
+              <el-form-item style="padding-top: 20px">
103
                 <el-input
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
                 ></el-input>
132
                 ></el-input>
109
               </el-form-item>
133
               </el-form-item>
110
             </template>
134
             </template>
111
           </el-table-column>
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
             <template slot="header" slot-scope="scope">
150
             <template slot="header" slot-scope="scope">
116
-              <span>进价<span style="color: red">*</span></span>
151
+              <span>出库数量<span style="color: red">*</span></span>
117
             </template>
152
             </template>
118
             <template slot-scope="scope">
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
               </el-form-item>
167
               </el-form-item>
124
-
125
-
168
+              
126
             </template>
169
             </template>
127
           </el-table-column>
170
           </el-table-column>
128
-
129
-          <el-table-column min-width="23" align="center">
171
+         <el-table-column width="120" align="center">
130
             <template slot="header" slot-scope="scope">
172
             <template slot="header" slot-scope="scope">
131
-              <span>出库数量<span style="color: red">*</span></span>
173
+              <span>出货价<span style="color: red">*</span></span>
132
             </template>
174
             </template>
133
             <template slot-scope="scope">
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
               </el-form-item>
187
               </el-form-item>
138
             </template>
188
             </template>
139
           </el-table-column>
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
             <template slot-scope="scope">
191
             <template slot-scope="scope">
143
-              {{calculate(scope.row.price*scope.row.count)}}
192
+              {{ calculate(scope.row.last_price * scope.row.count) }}
144
             </template>
193
             </template>
145
           </el-table-column>
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
             <template slot-scope="scope">
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
             </template>
205
             </template>
152
           </el-table-column>
206
           </el-table-column>
153
-
154
-          <el-table-column label="零价总价" align="center" width="150">
207
+            <el-table-column label="生产日期" width="180" align="center">
155
             <template slot-scope="scope">
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
             </template>
218
             </template>
158
           </el-table-column>
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
             <template slot-scope="scope">
245
             <template slot-scope="scope">
163
               <el-input v-model="scope.row.remark"></el-input>
246
               <el-input v-model="scope.row.remark"></el-input>
164
             </template>
247
             </template>
165
           </el-table-column>
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
             <template slot-scope="scope">
251
             <template slot-scope="scope">
168
               <el-tooltip class="item" effect="dark" content="新增" placement="top">
252
               <el-tooltip class="item" effect="dark" content="新增" placement="top">
169
 
253
 
200
   import { deleteDrugWarehouseOutInfo, editDrugWarehouseoutInfo, getDrugSalesReturnConfig, getDrugWarehouseOutInfo,GetAllConfig,GetAllDrugInfoByID } from '@/api/drug/drug_stock'
284
   import { deleteDrugWarehouseOutInfo, editDrugWarehouseoutInfo, getDrugSalesReturnConfig, getDrugWarehouseOutInfo,GetAllConfig,GetAllDrugInfoByID } from '@/api/drug/drug_stock'
201
   import BreadCrumb from '../../components/bread-crumb'
285
   import BreadCrumb from '../../components/bread-crumb'
202
   import DrugsStockDialog from './drugsStockDialog/index'
286
   import DrugsStockDialog from './drugsStockDialog/index'
203
-
287
+  import {postSearchDrugList } from "@/api/data"
288
+  import { getDictionaryDataConfig } from "@/utils/data";
204
   export default {
289
   export default {
205
     components: { DrugsStockDialog, BreadCrumb},
290
     components: { DrugsStockDialog, BreadCrumb},
206
     name: 'salesReturnEdit',
291
     name: 'salesReturnEdit',
264
         dealer: [],
349
         dealer: [],
265
         goodType: [],
350
         goodType: [],
266
         goodInfo:[],
351
         goodInfo:[],
352
+        drugTypeList:[],
353
+        manufacturerList:[]
267
       }
354
       }
268
     },
355
     },
269
     methods: {
356
     methods: {
461
             const params = {
548
             const params = {
462
               'stockOut': this.recordInfo.recordData
549
               'stockOut': this.recordInfo.recordData
463
             }
550
             }
551
+            console.log("params----",params)
464
             editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
552
             editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
465
               if (response.data.state == 0) {
553
               if (response.data.state == 0) {
466
                 this.$message.error(response.data.msg)
554
                 this.$message.error(response.data.msg)
474
             return false
562
             return false
475
           }
563
           }
476
         })
564
         })
477
-      }, GetOrderDetail: function(order_id) {
565
+      }, 
566
+      GetOrderDetail: function(order_id) {
478
         const params = {
567
         const params = {
479
           'id': order_id
568
           'id': order_id
480
         }
569
         }
483
             this.$message.error(response.data.msg)
572
             this.$message.error(response.data.msg)
484
             return false
573
             return false
485
           } else {
574
           } else {
575
+             console.log("list222222",response.data.data.list)
576
+            var manulist = response.data.data.manulist
486
             for (let i = 0; i < response.data.data.list.length; i++) {
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
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
584
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
488
               response.data.data.list[i].retail_price = response.data.data.list[i].retail_price.toString()
585
               response.data.data.list[i].retail_price = response.data.data.list[i].retail_price.toString()
489
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
586
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
490
               this.recordInfo.recordData.push(response.data.data.list[i])
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
             this.warehouseOut = response.data.data.info
597
             this.warehouseOut = response.data.data.info
493
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
598
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
494
             this.form.manufacturer = this.warehouseOut.manufacturer
599
             this.form.manufacturer = this.warehouseOut.manufacturer
517
         this.propForm.manufacturer = val
622
         this.propForm.manufacturer = val
518
       }, changeDealer(val) {
623
       }, changeDealer(val) {
519
         this.propForm.dealer = val
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
     created() {
680
     created() {
681
+      this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
523
       this.GetConfigInfo()
682
       this.GetConfigInfo()
524
       this.propForm.goodUnit = this.$store.getters.good_unit
683
       this.propForm.goodUnit = this.$store.getters.good_unit
525
       const order_id = this.$route.query.id
684
       const order_id = this.$route.query.id

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

68
             style="width: 200px;"
68
             style="width: 200px;"
69
             class="filter-item"
69
             class="filter-item"
70
             v-model.trim="keywords"
70
             v-model.trim="keywords"
71
-            placeholder="商品名称/规格名称"
71
+            placeholder="药品名称"
72
           />
72
           />
73
           <el-button
73
           <el-button
74
             size="small"
74
             size="small"
111
              {{getManufacturerList(scope.row.manufacturer)}}
111
              {{getManufacturerList(scope.row.manufacturer)}}
112
            </template>
112
            </template>
113
         </el-table-column>
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
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
124
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
115
            <template slot-scope="scope">
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
            </template>
127
            </template>
123
         </el-table-column>
128
         </el-table-column>
124
         <el-table-column prop="drug_name" label="操作" align="center">
129
         <el-table-column prop="drug_name" label="操作" align="center">
163
 <script>
168
 <script>
164
   import { uParseTime } from '@/utils/tools'
169
   import { uParseTime } from '@/utils/tools'
165
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
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
   import SettingDialog from './settingDialog/index'
172
   import SettingDialog from './settingDialog/index'
168
   import { getDictionaryDataConfig } from "@/utils/data";
173
   import { getDictionaryDataConfig } from "@/utils/data";
169
   export default {
174
   export default {
174
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
179
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
175
   
180
   
176
       this.getlist()
181
       this.getlist()
182
+      this.getDrugCountList()
177
     },
183
     },
178
     components: {
184
     components: {
179
       SettingDialog,
185
       SettingDialog,
208
         ],
214
         ],
209
         drugTypeList:[],
215
         drugTypeList:[],
210
         tableList:[],
216
         tableList:[],
211
-        manufacturerList:[]
217
+        manufacturerList:[],
218
+        countList:[],
219
+        outCountList:[],
220
+        autoCountList:[],
221
+        keyword:"",
212
       }
222
       }
213
     },
223
     },
214
     methods: {
224
     methods: {
396
       showCancelStockDetailDialog: function() {
406
       showCancelStockDetailDialog: function() {
397
       },
407
       },
398
       search: function() {
408
       search: function() {
399
-        // this.GetAllDrugStockQueryList()
400
         this.getlist()
409
         this.getlist()
401
       }, 
410
       }, 
402
       setting: function() {
411
       setting: function() {
449
           start_time:this.start_time,
458
           start_time:this.start_time,
450
           end_time:this.end_time,
459
           end_time:this.end_time,
451
         }
460
         }
452
-        
461
+         
453
         getDrugStockList(params).then(response=>{
462
         getDrugStockList(params).then(response=>{
454
           if(response.data.state == 1){
463
           if(response.data.state == 1){
455
              var list = response.data.data.list
464
              var list = response.data.data.list
489
       },
498
       },
490
       handleBatch(id){
499
       handleBatch(id){
491
         this.$router.push({path:'/drugstock/in/drugbatchnumber?drug_id='+id})
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
               @change="endTimeChange"
38
               @change="endTimeChange"
39
           ></el-date-picker>
39
           ></el-date-picker>
40
 
40
 
41
-        <span>出入库方式:</span>
41
+        <!-- <span>出入库方式:</span>
42
         <el-select v-model="stock_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
42
         <el-select v-model="stock_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
43
             <el-option
43
             <el-option
44
               v-for="(item,index) in stockType"
44
               v-for="(item,index) in stockType"
46
               :label="item.name"
46
               :label="item.name"
47
               :value="item.id">
47
               :value="item.id">
48
             </el-option>
48
             </el-option>
49
-        </el-select>
49
+        </el-select> -->
50
         
50
         
51
         
51
         
52
       </div>
52
       </div>
79
         </el-table-column>
79
         </el-table-column>
80
          <el-table-column prop="drug_name" label="批号" align="center">
80
          <el-table-column prop="drug_name" label="批号" align="center">
81
            <template slot-scope="scope" >
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
            </template>
83
            </template>
84
         </el-table-column>
84
         </el-table-column>
85
         <el-table-column prop="drug_name" label="入库数量" align="center">
85
         <el-table-column prop="drug_name" label="入库数量" align="center">
86
            <template slot-scope="scope">
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
            </template>
89
            </template>
90
         </el-table-column>
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
            <template slot-scope="scope">
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
            </template>
95
            </template>
96
         </el-table-column>
96
         </el-table-column>
97
        </el-table>
97
        </el-table>
114
 <script>
114
 <script>
115
   import { uParseTime } from '@/utils/tools'
115
   import { uParseTime } from '@/utils/tools'
116
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
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
   export default {
118
   export default {
119
     name: 'stockIn',
119
     name: 'stockIn',
120
     created() {
120
     created() {
166
       }
166
       }
167
     },
167
     },
168
     methods:{
168
     methods:{
169
-    
170
-     
171
        handleSizeChange(val) {
169
        handleSizeChange(val) {
172
         this.limit = val
170
         this.limit = val
173
-        this.GetAllDrugStockQueryList()
171
+        this.getlist()
174
       },
172
       },
175
       handleCurrentChange(val) {
173
       handleCurrentChange(val) {
176
         this.page = val
174
         this.page = val
177
-        this.GetAllDrugStockQueryList()
175
+        this.getlist()
178
       },
176
       },
179
         
177
         
180
     startTimeChange: function(val) {
178
     startTimeChange: function(val) {
184
         this.$message.error("开始时间不能大于结束时间");
182
         this.$message.error("开始时间不能大于结束时间");
185
         this.start_time = "";
183
         this.start_time = "";
186
       } else {
184
       } else {
187
-        this.GetAllDrugStockQueryList();
185
+        this.getlist()
188
       }
186
       }
189
     },
187
     },
190
     endTimeChange: function(val) {
188
     endTimeChange: function(val) {
193
         this.$message.error("结束时间不能小于开始时间");
191
         this.$message.error("结束时间不能小于开始时间");
194
         this.end_time = "";
192
         this.end_time = "";
195
       } else {
193
       } else {
196
-        this.GetAllDrugStockQueryList();
194
+       this.getlist()
197
       }
195
       }
198
      },
196
      },
199
      changeDrug(){},
197
      changeDrug(){},
229
          if(response.data.state == 1){
227
          if(response.data.state == 1){
230
            var list = response.data.data.list
228
            var list = response.data.data.list
231
            console.log("入库数据",list)
229
            console.log("入库数据",list)
230
+           for(let i=0;i<list.length;i++){
231
+             list[i].stock_way = 4
232
+           }
232
            this.tableList = list
233
            this.tableList = list
233
            var total = response.data.data.total
234
            var total = response.data.data.total
234
            this.total = total
235
            this.total = total
235
            console.log("入库数据",this.tableList)
236
            console.log("入库数据",this.tableList)
236
            var manufacturerList = response.data.data.manufacturerList
237
            var manufacturerList = response.data.data.manufacturerList
237
            this.manufacturerList = manufacturerList
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
 </script>
259
 </script>

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

6
     <div class="app-container ">
6
     <div class="app-container ">
7
       <div class="cell clearfix">
7
       <div class="cell clearfix">
8
        耗材名称:{{this.$route.query.good_name}}
8
        耗材名称:{{this.$route.query.good_name}}
9
-       <!-- 库存:
10
-       厂家: -->
9
+       库存:{{getInCount(this.$route.query.id)}}
10
+       <!-- 厂家:{{this.$route.query.manufacturer}}
11
+       规格: -->
11
       </div>
12
       </div>
12
       <div class="cell clearfix">
13
       <div class="cell clearfix">
13
         <span>日期查询:</span>
14
         <span>日期查询:</span>
38
               @change="endTimeChange"
39
               @change="endTimeChange"
39
           ></el-date-picker>
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
             <el-option
44
             <el-option
44
               v-for="(item,index) in stockType"
45
               v-for="(item,index) in stockType"
45
               :key="index"
46
               :key="index"
46
               :label="item.name"
47
               :label="item.name"
47
               :value="item.id">
48
               :value="item.id">
48
             </el-option>
49
             </el-option>
49
-        </el-select>
50
+        </el-select> -->
50
         
51
         
51
         
52
         
52
       </div>
53
       </div>
78
              {{getTime(scope.row.ctime)}}
79
              {{getTime(scope.row.ctime)}}
79
            </template>
80
            </template>
80
         </el-table-column>
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
            <template slot-scope="scope">
83
            <template slot-scope="scope">
83
              <span v-if="scope.row.stock_way == 4 && scope.row.warehousing_count!=0"> {{scope.row.warehousing_count}}</span>
84
              <span v-if="scope.row.stock_way == 4 && scope.row.warehousing_count!=0"> {{scope.row.warehousing_count}}</span>
84
              <span v-if="scope.row.stock_way == 2 && scope.row.count!=0">{{scope.row.count}}</span>
85
              <span v-if="scope.row.stock_way == 2 && scope.row.count!=0">{{scope.row.count}}</span>
85
            </template>
86
            </template>
86
         </el-table-column>
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
            <template slot-scope="scope">
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
            </template>
92
            </template>
91
         </el-table-column>
93
         </el-table-column>
92
         <el-table-column prop="drug_name" label="进/出货单价"  align="center">
94
         <el-table-column prop="drug_name" label="进/出货单价"  align="center">
107
              <span v-if="scope.row.stock_way == 4">{{scope.row.number}}</span>
109
              <span v-if="scope.row.stock_way == 4">{{scope.row.number}}</span>
108
            </template>
110
            </template>
109
         </el-table-column>
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
            <template slot-scope="scope">
113
            <template slot-scope="scope">
112
              <span v-if="scope.row.stock_way == 4"> {{getManufacturer(scope.row.manufacturer)}}</span>
114
              <span v-if="scope.row.stock_way == 4"> {{getManufacturer(scope.row.manufacturer)}}</span>
113
              <span v-if="scope.row.stock_way == 2">{{getManufacturer(scope.row.manufacturer)}}</span>
115
              <span v-if="scope.row.stock_way == 2">{{getManufacturer(scope.row.manufacturer)}}</span>
133
 <script>
135
 <script>
134
   import { uParseTime } from '@/utils/tools'
136
   import { uParseTime } from '@/utils/tools'
135
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
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
   export default {
140
   export default {
138
     name: 'stockIn',
141
     name: 'stockIn',
139
     created() {
142
     created() {
140
-    //   var drugCategory = getDictionaryDataConfig('system','drug_category')
141
-    //   this.drugCategory.push(...drugCategory)
142
-    //   this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
143
+     
143
       this.getlist()
144
       this.getlist()
144
-      this.getOutList()
145
+      this.getStockDrugCount()
146
+
145
     },
147
     },
146
     components: {
148
     components: {
147
       BreadCrumb
149
       BreadCrumb
184
           {id:2,name:"自动出库"},
186
           {id:2,name:"自动出库"},
185
           {id:3,name:"入库"},
187
           {id:3,name:"入库"},
186
         ],
188
         ],
187
-      
189
+        countList:[],
190
+        outCountList:[],
191
+        autoCountList:[],
192
+        keywords:"",
193
+        obj:{},
188
       }
194
       }
189
     },
195
     },
190
     methods:{
196
     methods:{
192
      
198
      
193
        handleSizeChange(val) {
199
        handleSizeChange(val) {
194
         this.limit = val
200
         this.limit = val
195
-        this.GetAllDrugStockQueryList()
201
+        this.getlist()
196
       },
202
       },
197
       handleCurrentChange(val) {
203
       handleCurrentChange(val) {
198
         this.page = val
204
         this.page = val
199
-        this.GetAllDrugStockQueryList()
205
+        this.getlist()
200
       },
206
       },
201
         
207
         
202
     startTimeChange: function(val) {
208
     startTimeChange: function(val) {
206
         this.$message.error("开始时间不能大于结束时间");
212
         this.$message.error("开始时间不能大于结束时间");
207
         this.start_time = "";
213
         this.start_time = "";
208
       } else {
214
       } else {
209
-        this.GetAllDrugStockQueryList();
215
+        this.getlist()
210
       }
216
       }
211
     },
217
     },
212
     endTimeChange: function(val) {
218
     endTimeChange: function(val) {
215
         this.$message.error("结束时间不能小于开始时间");
221
         this.$message.error("结束时间不能小于开始时间");
216
         this.end_time = "";
222
         this.end_time = "";
217
       } else {
223
       } else {
218
-        this.GetAllDrugStockQueryList();
224
+       this.getlist()
219
       }
225
       }
220
      },
226
      },
221
-     changeDrug(){},
222
      getManufacturer(id){
227
      getManufacturer(id){
223
        var name = ""
228
        var name = ""
224
        for(let i=0;i<this.manufacturerList.length;i++){
229
        for(let i=0;i<this.manufacturerList.length;i++){
225
          if(id == this.manufacturerList[i].id){
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
        return name
234
        return name
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
 </script>
324
 </script>

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

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

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

186
 
186
 
187
             </template>
187
             </template>
188
           </el-table-column>
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
           <el-table-column label="备注" align="center" width="150">
202
           <el-table-column label="备注" align="center" width="150">
192
             <template slot-scope="scope">
203
             <template slot-scope="scope">
348
         },
359
         },
349
 
360
 
350
         manufacturer: [],
361
         manufacturer: [],
351
-        dealer: [],
362
+        dealerList: [],
352
         goodType: [],
363
         goodType: [],
353
         manufacturerList:[],
364
         manufacturerList:[],
354
         goodList:[]
365
         goodList:[]
636
           if (valid) {
647
           if (valid) {
637
             const array = this.recordInfo.recordData
648
             const array = this.recordInfo.recordData
638
             console.log("array9999999",array)
649
             console.log("array9999999",array)
639
-           
640
             for (let i = 0; i < array.length; i++) {
650
             for (let i = 0; i < array.length; i++) {
641
               if (array[i].good_type_id == 0) {
651
               if (array[i].good_type_id == 0) {
642
                 this.$message.error('商品类型不能为空')
652
                 this.$message.error('商品类型不能为空')
649
               this.$message.success('请添加入库商品')
659
               this.$message.success('请添加入库商品')
650
               return
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
             const params = {
678
             const params = {
654
               'stockIn': this.recordInfo.recordData
679
               'stockIn': this.recordInfo.recordData
655
             }
680
             }
681
+            console.log("stockIn",this.recordInfo.recordData)
656
            
682
            
657
             postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
683
             postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
658
               if (response.data.state == 0) {
684
               if (response.data.state == 0) {
672
       ,
698
       ,
673
       changeManufacturer(val) {
699
       changeManufacturer(val) {
674
 
700
 
675
-      }, changeDealer(val) {
701
+      }, 
702
+      changeDealer(val) {
676
 
703
 
677
       },
704
       },
678
       getDataConfig(module, filed_name){
705
       getDataConfig(module, filed_name){
683
         if (keyword != undefined) {
710
         if (keyword != undefined) {
684
           key = keyword
711
           key = keyword
685
         }
712
         }
686
-        console.log("keyrowrd",key)
687
         postSearchGoodList(key).then(response => {
713
         postSearchGoodList(key).then(response => {
688
           if (response.data.state == 1) {
714
           if (response.data.state == 1) {
689
            
715
            
690
              var list = response.data.data.list
716
              var list = response.data.data.list
717
+             
691
              this.goodList = list
718
              this.goodList = list
692
              var manufacturerList = response.data.data.manufacturerList
719
              var manufacturerList = response.data.data.manufacturerList
693
              this.manufacturerList = manufacturerList
720
              this.manufacturerList = manufacturerList
721
+             var dealer =  response.data.data.dealerList
722
+             this.dealerList = dealer
694
              for(let i=0;i<this.goodList.length;i++){
723
              for(let i=0;i<this.goodList.length;i++){
695
                 for(let j=0;j<this.manufacturerList.length;j++){
724
                 for(let j=0;j<this.manufacturerList.length;j++){
696
                   if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
725
                   if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
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
              cb(this.goodList)
739
              cb(this.goodList)
703
           } else {
740
           } else {
715
               this.recordInfo.recordData[i].good_type_id = val.id
752
               this.recordInfo.recordData[i].good_type_id = val.id
716
               this.recordInfo.recordData[i].good_name = val.good_name
753
               this.recordInfo.recordData[i].good_name = val.good_name
717
               this.recordInfo.recordData[i].good_type_id = val.good_type_id
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
               this.recordInfo.recordData[i].number =  val.number
756
               this.recordInfo.recordData[i].number =  val.number
720
               this.recordInfo.recordData[i].manufacturer = val.manufacturer
757
               this.recordInfo.recordData[i].manufacturer = val.manufacturer
721
               this.recordInfo.recordData[i].remark = val.remark
758
               this.recordInfo.recordData[i].remark = val.remark
722
               this.recordInfo.recordData[i].price = val.buy_price
759
               this.recordInfo.recordData[i].price = val.buy_price
723
               this.recordInfo.recordData[i].specification_name = val.specification_name
760
               this.recordInfo.recordData[i].specification_name = val.specification_name
724
               this.recordInfo.recordData[i].good_id = val.id
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
     margin-top: 15px;
825
     margin-top: 15px;
788
     margin-bottom: 15px;
826
     margin-bottom: 15px;
789
   }
827
   }
828
+  
790
 
829
 
791
 </style>
830
 </style>
792
 
831
 
798
   .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
837
   .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
799
     background: #6fb5fa;
838
     background: #6fb5fa;
800
   }
839
   }
840
+  .el-autocomplete-suggestion{
841
+    width: 400px !important;
842
+  }
843
+  
801
 
844
 
802
 </style>
845
 </style>

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

211
               {{ calculate(scope.row.price * scope.row.warehousing_count) }}
211
               {{ calculate(scope.row.price * scope.row.warehousing_count) }}
212
             </template>
212
             </template>
213
           </el-table-column>
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
           <el-table-column align="center" width="150">
227
           <el-table-column align="center" width="150">
216
             <template slot="header" slot-scope="scope">
228
             <template slot="header" slot-scope="scope">
228
 
240
 
229
           <el-table-column label="生产日期" width="180" align="center">
241
           <el-table-column label="生产日期" width="180" align="center">
230
             <template slot-scope="scope">
242
             <template slot-scope="scope">
231
-              <!--{{scope.row.product_date | parseTime("{y}-{m}-{d}")}}-->
232
               <el-date-picker
243
               <el-date-picker
233
                 prefix-icon="el-icon-date"
244
                 prefix-icon="el-icon-date"
234
                 style="width: 145px"
245
                 style="width: 145px"
242
           </el-table-column>
253
           </el-table-column>
243
           <el-table-column label="有效日期" width="180" align="center">
254
           <el-table-column label="有效日期" width="180" align="center">
244
             <template slot-scope="scope">
255
             <template slot-scope="scope">
245
-              <!--{{ scope.row.expiry_date | parseTime("{y}-{m}-{d}")}}-->
246
               <el-date-picker
256
               <el-date-picker
247
                 prefix-icon="el-icon-date"
257
                 prefix-icon="el-icon-date"
248
                 style="width: 145px"
258
                 style="width: 145px"
254
               ></el-date-picker>
264
               ></el-date-picker>
255
             </template>
265
             </template>
256
           </el-table-column>
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
           <el-table-column label="备注" width="150" align="center">
279
           <el-table-column label="备注" width="150" align="center">
258
             <template slot-scope="scope">
280
             <template slot-scope="scope">
259
               <el-input v-model="scope.row.remark"></el-input>
281
               <el-input v-model="scope.row.remark"></el-input>
311
   GetAllConfig,
333
   GetAllConfig,
312
   getWarehouseInfoList,
334
   getWarehouseInfoList,
313
   GetAllGoodInfoByID,
335
   GetAllGoodInfoByID,
314
-  getWarehouseInfoByOrdeNumber,
315
-  modifyWarehouseInfo,
316
-  deleteWarehouseInfo,
317
   DeleteWarehouseInfoItem,
336
   DeleteWarehouseInfoItem,
318
   EditWarehouse,
337
   EditWarehouse,
319
   postSearchGoodList
338
   postSearchGoodList
384
       },
403
       },
385
       warehouse: {},
404
       warehouse: {},
386
       manufacturer: [],
405
       manufacturer: [],
387
-      dealer: [],
388
-      goodType: []
406
+      dealerList: [],
407
+      goodType: [],
408
+      manufacturerList:[]
389
     };
409
     };
390
   },
410
   },
391
   methods: {
411
   methods: {
447
           return false;
467
           return false;
448
         } else {
468
         } else {
449
           this.manufacturer = response.data.data.manufacturer;
469
           this.manufacturer = response.data.data.manufacturer;
470
+          this.manufacturerList = response.data.data.manufacturer
471
+          this.dealerList = response.data.data.dealer
450
           this.dealer = response.data.data.dealer;
472
           this.dealer = response.data.data.dealer;
451
           this.goodType = response.data.data.goodType;
473
           this.goodType = response.data.data.goodType;
452
           this.goodInfo = response.data.data.goodInfo;
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
         loading.close();
478
         loading.close();
457
       });
479
       });
610
               return;
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
           const params = {
638
           const params = {
615
             stockIn: this.recordInfo.recordData
639
             stockIn: this.recordInfo.recordData
616
           };
640
           };
641
+          console.log("params2222",params)
642
+       
617
           EditWarehouse(
643
           EditWarehouse(
618
             params,
644
             params,
619
             this.warehousing_time,
645
             this.warehousing_time,
646
           return false;
672
           return false;
647
         } else {
673
         } else {
648
           console.log("列表2222222",response.data.data.info)
674
           console.log("列表2222222",response.data.data.info)
675
+         
649
           for (let i = 0; i < response.data.data.info.length; i++) {
676
           for (let i = 0; i < response.data.data.info.length; i++) {
650
             response.data.data.info[i].product_date = this.getTime(
677
             response.data.data.info[i].product_date = this.getTime(
651
               response.data.data.info[i].product_date,
678
               response.data.data.info[i].product_date,
658
             response.data.data.info[i].price = response.data.data.info[i].price.toString();
685
             response.data.data.info[i].price = response.data.data.info[i].price.toString();
659
             response.data.data.info[i].warehousing_count = response.data.data.info[i].warehousing_count.toString();
686
             response.data.data.info[i].warehousing_count = response.data.data.info[i].warehousing_count.toString();
660
             response.data.data.info[i].good_name = response.data.data.info[i].GoodInfo.good_name
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
             this.recordInfo.recordData.push(response.data.data.info[i]);
693
             this.recordInfo.recordData.push(response.data.data.info[i]);
694
+           
664
             console.log("列表",this.recordInfo.recordData)
695
             console.log("列表",this.recordInfo.recordData)
665
           }
696
           }
666
 
697
 
667
           this.warehouse = response.data.data.warehousing;
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
           this.warehousing_time = this.getTime(
701
           this.warehousing_time = this.getTime(
672
             this.warehouse.warehousing_time,
702
             this.warehouse.warehousing_time,
696
         if (keyword != undefined) {
726
         if (keyword != undefined) {
697
           key = keyword
727
           key = keyword
698
         }
728
         }
699
-        console.log("keyrowrd",key)
700
         postSearchGoodList(key).then(response => {
729
         postSearchGoodList(key).then(response => {
701
           if (response.data.state == 1) {
730
           if (response.data.state == 1) {
702
           
731
           
703
             var list = response.data.data.list
732
             var list = response.data.data.list
704
             this.goodList = list
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
             cb(this.goodList)
751
             cb(this.goodList)
716
           } else {
752
           } else {
717
             cb([])
753
             cb([])
735
             this.recordInfo.recordData[i].price = val.buy_price
771
             this.recordInfo.recordData[i].price = val.buy_price
736
             this.recordInfo.recordData[i].specification_name = val.specification_name
772
             this.recordInfo.recordData[i].specification_name = val.specification_name
737
             this.recordInfo.recordData[i].good_id = val.id
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
           @change="changeAllSelected"
69
           @change="changeAllSelected"
70
           >全选</el-checkbox
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
       </div>
74
       </div>
76
 
75
 
77
       <el-table
76
       <el-table
108
             {{ getXuserName(scope.row.creater) }}
107
             {{ getXuserName(scope.row.creater) }}
109
           </template>
108
           </template>
110
         </el-table-column>
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
         <el-table-column label="操作" align="center" width="300px">
112
         <el-table-column label="操作" align="center" width="300px">
124
           <template slot-scope="scope">
113
           <template slot-scope="scope">
173
       <el-pagination
162
       <el-pagination
174
         @size-change="handleSizeChange"
163
         @size-change="handleSizeChange"
175
         @current-change="handleCurrentChange"
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
         background
167
         background
179
-        style="margin-top:20px;float: right"
168
+        style="margin-top:20px;text-align: right"
180
         layout="total, sizes, prev, pager, next, jumper"
169
         layout="total, sizes, prev, pager, next, jumper"
181
         :total="total"
170
         :total="total"
182
       >
171
       >
183
       </el-pagination>
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
     </div>
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
   
575
   
605
     <el-dialog
576
     <el-dialog
606
       title="出库明细"
577
       title="出库明细"
607
-      :visible.sync="editdialogVisibleTwo"
578
+      :visible.sync="editdialogVisibleThree"
608
       width="60%">
579
       width="60%">
609
       <span>
580
       <span>
610
          <div class="app-container">
581
          <div class="app-container">
665
     </div>
636
     </div>
666
       </span>
637
       </span>
667
       <span slot="footer" class="dialog-footer">
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
       </span>
641
       </span>
671
     </el-dialog>
642
     </el-dialog>
672
 
643
 
697
   deleteWarehouseOutInfo,
668
   deleteWarehouseOutInfo,
698
   GetAllGoodInfoByID,
669
   GetAllGoodInfoByID,
699
   editWarehouseoutInfo,
670
   editWarehouseoutInfo,
671
+  getOrderDetailByOrderId,
672
+  getOrderDetailById
700
 } from "@/api/stock";
673
 } from "@/api/stock";
701
 import BreadCrumb from "../components/bread-crumb";
674
 import BreadCrumb from "../components/bread-crumb";
702
 import StockInDialog from './Dialog/stockInDialog'
675
 import StockInDialog from './Dialog/stockInDialog'
747
         { path: false, name: "出库单" }
720
         { path: false, name: "出库单" }
748
       ],
721
       ],
749
       page: 1,
722
       page: 1,
750
-      limit: 10,
723
+      limit: 5,
751
       checked: false,
724
       checked: false,
752
       total: 0,
725
       total: 0,
753
       pageTotal: 0,
726
       pageTotal: 0,
812
       tableList:[],
785
       tableList:[],
813
       dialogVisibleTwo:false,
786
       dialogVisibleTwo:false,
814
       userList:[],
787
       userList:[],
815
-      editdialogVisibleTwo:false
788
+      editdialogVisibleTwo:false,
789
+      editdialogVisibleThree:false,
790
+      order_id:0,
791
+      warehouse_out_time:"",
816
     };
792
     };
817
   },
793
   },
818
   methods: {
794
   methods: {
1025
       }
1001
       }
1026
     },
1002
     },
1027
     select(selection) {
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
       this.selectedTableData = selection;
1007
       this.selectedTableData = selection;
1029
     },
1008
     },
1030
     batchDelete() {
1009
     batchDelete() {
1086
 
1065
 
1087
     handleSearch(val){
1066
     handleSearch(val){
1088
       this.tableList = []
1067
       this.tableList = []
1068
+    
1069
+      this.editdialogVisibleThree = false
1089
       this.GetOrderDetailOne(val.id)
1070
       this.GetOrderDetailOne(val.id)
1090
       this.GetTotalCount(val.warehouse_out_time)
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
         const params = {
1097
         const params = {
1096
           'id': id
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
       getTypeName: function(id) {
1112
       getTypeName: function(id) {
1118
         let name = ''
1113
         let name = ''
1158
     },
1153
     },
1159
 
1154
 
1160
      GetOrderDetail: function(order_id) {
1155
      GetOrderDetail: function(order_id) {
1156
+       this.userList = []
1161
         const params = {
1157
         const params = {
1162
           'id': order_id
1158
           'id': order_id
1163
         }
1159
         }
1164
-      
1165
         getWarehouseOutUser(params).then(response => {
1160
         getWarehouseOutUser(params).then(response => {
1166
           if (response.data.state == 0) {
1161
           if (response.data.state == 0) {
1167
             this.$message.error(response.data.msg)
1162
             this.$message.error(response.data.msg)
1183
             // this.type_name = this.userList[0].type.type_name
1178
             // this.type_name = this.userList[0].type.type_name
1184
             // this.specification_name = this.userList[0].info.specification_name
1179
             // this.specification_name = this.userList[0].info.specification_name
1185
             console.log("详情数据区",this.userList)
1180
             console.log("详情数据区",this.userList)
1186
-            this.editdialogVisibleTwo = true
1181
+            this.editdialogVisibleThree = true
1187
           }
1182
           }
1188
         })
1183
         })
1189
       },
1184
       },
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
 </script>
1539
 </script>

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

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

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

32
       </div>
32
       </div>
33
 
33
 
34
 
34
 
35
-      <div class="cell clearfix">
35
+      <!-- <div class="cell clearfix">
36
         <label class="title"><span class="name">经销商</span> : </label>
36
         <label class="title"><span class="name">经销商</span> : </label>
37
         <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer" style="width: 200px;">
37
         <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer" style="width: 200px;">
38
           <el-option
38
           <el-option
42
             :value="option.id">
42
             :value="option.id">
43
           </el-option>
43
           </el-option>
44
         </el-select>
44
         </el-select>
45
-      </div>
45
+      </div> -->
46
 
46
 
47
 
47
 
48
-      <div class="cell clearfix">
48
+      <!-- <div class="cell clearfix">
49
         <label class="title"><span class="name">厂商</span> : </label>
49
         <label class="title"><span class="name">厂商</span> : </label>
50
         <el-select size="small" v-model="form.manufacturer" clearable placeholder="请选择厂商" @change="changeManufacturer" style="width: 200px;">
50
         <el-select size="small" v-model="form.manufacturer" clearable placeholder="请选择厂商" @change="changeManufacturer" style="width: 200px;">
51
           <el-option
51
           <el-option
55
             :value="option.id">
55
             :value="option.id">
56
           </el-option>
56
           </el-option>
57
         </el-select>
57
         </el-select>
58
-      </div>
58
+      </div> -->
59
 
59
 
60
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
60
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
61
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
61
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
164
               {{calculate(scope.row.price*scope.row.count)}}
164
               {{calculate(scope.row.price*scope.row.count)}}
165
             </template>
165
             </template>
166
           </el-table-column>
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
           <el-table-column label="备注" min-width="20" align="center">
179
           <el-table-column label="备注" min-width="20" align="center">
168
             <template slot-scope="scope">
180
             <template slot-scope="scope">
169
               <el-input v-model="scope.row.remark"></el-input>
181
               <el-input v-model="scope.row.remark"></el-input>
311
         this.propForm.goods = [];
323
         this.propForm.goods = [];
312
 
324
 
313
         this.propForm.goodType = [];
325
         this.propForm.goodType = [];
314
-      }, GetConfigInfo: function() {
326
+      }, 
327
+      GetConfigInfo: function() {
315
         const loading = this.$loading({
328
         const loading = this.$loading({
316
           lock: true,
329
           lock: true,
317
           text: "Loading",
330
           text: "Loading",
323
             this.$message.error(response.data.msg);
336
             this.$message.error(response.data.msg);
324
             return false;
337
             return false;
325
           } else {
338
           } else {
326
-            this.manufacturer = response.data.data.manufacturer;
339
+            this.manufacturerList = response.data.data.manufacturer;
327
             this.dealer = response.data.data.dealer;
340
             this.dealer = response.data.data.dealer;
328
             this.goodType = response.data.data.goodType;
341
             this.goodType = response.data.data.goodType;
329
             this.goodInfo = response.data.data.goodInfo;
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
           loading.close();
346
           loading.close();
334
         });
347
         });
471
                 return
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
             const params = {
490
             const params = {
476
               'stockOut': this.recordInfo.recordData
491
               'stockOut': this.recordInfo.recordData
477
             }
492
             }
478
-            
479
            
493
            
494
+            console.log("stockout",params)
495
+            
480
             editWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
496
             editWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
481
               if (response.data.state == 0) {
497
               if (response.data.state == 0) {
482
                 this.$message.error(response.data.msg)
498
                 this.$message.error(response.data.msg)
490
             return false
506
             return false
491
           }
507
           }
492
         })
508
         })
493
-      }, GetOrderDetail: function(order_id) {
509
+      }, 
510
+      GetOrderDetail: function(order_id) {
494
         const params = {
511
         const params = {
495
           'id': order_id
512
           'id': order_id
496
         }
513
         }
505
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
522
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
506
               response.data.data.list[i].good_name = response.data.data.list[i].GoodInfo.good_name
523
               response.data.data.list[i].good_name = response.data.data.list[i].GoodInfo.good_name
507
               response.data.data.list[i].name = response.data.data.list[i].GoodInfo.good_name + "*" + response.data.data.list[i].GoodInfo.specification_name
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
               this.recordInfo.recordData.push(response.data.data.list[i])
526
               this.recordInfo.recordData.push(response.data.data.list[i])
509
             }
527
             }
510
             this.warehouseOut = response.data.data.info
528
             this.warehouseOut = response.data.data.info
546
           
564
           
547
             var list = response.data.data.list
565
             var list = response.data.data.list
548
             this.goodList = list
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
             cb(this.goodList)
577
             cb(this.goodList)
560
         } else {
578
         } else {
579
             this.recordInfo.recordData[i].price = val.buy_price
597
             this.recordInfo.recordData[i].price = val.buy_price
580
             this.recordInfo.recordData[i].specification_name = val.specification_name
598
             this.recordInfo.recordData[i].specification_name = val.specification_name
581
             this.recordInfo.recordData[i].good_id = val.id
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
       </div>
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
        <el-table
68
        <el-table
158
         :row-style="{ color: '#303133' }"
69
         :row-style="{ color: '#303133' }"
159
         :header-cell-style="{
70
         :header-cell-style="{
185
             {{scope.row.price}}
96
             {{scope.row.price}}
186
           </template>
97
           </template>
187
         </el-table-column>
98
         </el-table-column>
188
-        <el-table-column label="商" align="center">
99
+        <el-table-column label="生产商" align="center">
189
           <template slot-scope="scope">
100
           <template slot-scope="scope">
190
            {{getManufacture(scope.row.manufacturer)}}
101
            {{getManufacture(scope.row.manufacturer)}}
191
           </template>
102
           </template>
197
        </el-table-column>
108
        </el-table-column>
198
        <el-table-column label="出库数量" align="center">
109
        <el-table-column label="出库数量" align="center">
199
          <template slot-scope="scope">
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
          </template>
113
          </template>
203
        </el-table-column>
114
        </el-table-column>
350
 
261
 
351
          }
262
          }
352
 
263
 
353
-        console.log("数据2222222",this.WarehouseInfo.warehouseInfoDate)
264
+       
354
       });
265
       });
355
     },
266
     },
356
 
267
 
544
        return name
455
        return name
545
     },
456
     },
546
     toClick(val){
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
     toClickOne(val){
467
     toClickOne(val){
550
       this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.good_id+"&good_name="+val.good_name})
468
       this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.good_id+"&good_name="+val.good_name})
591
      var count= ""
509
      var count= ""
592
      for(let i=0;i<this.autoCountList.length;i++){
510
      for(let i=0;i<this.autoCountList.length;i++){
593
        if(id == this.autoCountList[i].good_id){
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
      return count
515
      return count

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

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