浏览代码

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

XMLWAN 2 年前
父节点
当前提交
8b1f76bbb4
共有 80 个文件被更改,包括 17457 次插入5184 次删除
  1. 0 4
      .idea/shelf/Uncommitted_changes_before_Update_at_2022_4_16_10_41__Default_Changelist_.xml
  2. 3 2
      src/api/dialysis_record.js
  3. 11 0
      src/api/his/his_hospital.js
  4. 97 0
      src/api/seconde.js
  5. 133 0
      src/api/warehouse.js
  6. 二进制
      src/assets/purchase/ban.png
  7. 二进制
      src/assets/purchase/set.png
  8. 2 0
      src/lang/en.js
  9. 4 0
      src/lang/zh.js
  10. 5 1
      src/router/index.js
  11. 17 0
      src/router/modules/inventoryTransfer.js
  12. 24 0
      src/router/modules/stock.js
  13. 33 0
      src/router/modules/wareHouseManage.js
  14. 1 3
      src/views/layout/Layout.vue
  15. 1 1
      src/views/layout/components/Sidebar/index.vue
  16. 1 1
      src/xt_pages/dialysis/batch_print/batch_print_order_fortyThree.vue
  17. 56 29
      src/xt_pages/dialysis/batch_print/batch_print_order_six.vue
  18. 12 0
      src/xt_pages/dialysis/bloodPresssWatch.vue
  19. 2 2
      src/xt_pages/dialysis/details/DialysisPrescription.vue
  20. 15 13
      src/xt_pages/dialysis/details/dialog/computer_dialog.vue
  21. 4 4
      src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue
  22. 1362 566
      src/xt_pages/dialysis/details/dialog/monitor_dialog.vue
  23. 8 8
      src/xt_pages/dialysis/details/dialysisMonitoring.vue
  24. 4 3
      src/xt_pages/dialysis/dialysisPrintOrder.vue
  25. 2311 891
      src/xt_pages/dialysis/template/DialysisPrintOrderFortySeven.vue
  26. 1 1
      src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue
  27. 66 37
      src/xt_pages/hospitalStation/chargeDetailManagement.vue
  28. 38 16
      src/xt_pages/hospitalStation/components/chargeDialog.vue
  29. 71 28
      src/xt_pages/hospitalStation/components/deskPrescription.vue
  30. 1110 0
      src/xt_pages/hospitalStation/components/hospitalRegisterDialog.vue
  31. 44 46
      src/xt_pages/hospitalStation/components/settlePrescriptionTable.vue
  32. 11 4
      src/xt_pages/hospitalStation/doctorDesk.vue
  33. 2 2
      src/xt_pages/hospitalStation/invoiceTemplate/printTwo.vue
  34. 136 54
      src/xt_pages/hospitalStation/outpatientChargesManagement.vue
  35. 3 2
      src/xt_pages/hospitalStation/statementTemplate/printOne.vue
  36. 386 0
      src/xt_pages/hospitalStation/statementTemplate/printOther.vue
  37. 8 2
      src/xt_pages/hospitalStation/summary.vue
  38. 420 291
      src/xt_pages/hospitalStation/template/printOne.vue
  39. 599 417
      src/xt_pages/hospitalStation/template/printThree.vue
  40. 1 1
      src/xt_pages/hospitalStation/template/printTwo.vue
  41. 30 30
      src/xt_pages/outpatientCharges/components/prescriptionTable.vue
  42. 1 1
      src/xt_pages/outpatientCharges/components/registerDialog.vue
  43. 8 4
      src/xt_pages/outpatientCharges/invoicePrint.vue
  44. 6 2
      src/xt_pages/outpatientCharges/invoiceTemplate/printFour.vue
  45. 231 0
      src/xt_pages/outpatientCharges/invoiceTemplate/printSix.vue
  46. 116 98
      src/xt_pages/outpatientCharges/outpatientChargesManagement.vue
  47. 724 503
      src/xt_pages/outpatientCharges/statementPrint.vue
  48. 9 5
      src/xt_pages/outpatientCharges/statementTemplate/printOne.vue
  49. 396 0
      src/xt_pages/outpatientCharges/statementTemplate/printSix.vue
  50. 344 0
      src/xt_pages/outpatientCharges/statementTemplate/privateChargePrint.vue
  51. 400 0
      src/xt_pages/outpatientCharges/statementTemplate/test.vue
  52. 2 3
      src/xt_pages/outpatientDoctorStation/batch_print_checkTemplate/index.vue
  53. 491 400
      src/xt_pages/outpatientDoctorStation/batch_print_checkTemplate/printOne.vue
  54. 9 14
      src/xt_pages/outpatientDoctorStation/batch_print_template/index.vue
  55. 397 286
      src/xt_pages/outpatientDoctorStation/batch_print_template/printOne.vue
  56. 18 6
      src/xt_pages/outpatientDoctorStation/batch_print_treatTemplate/printOne.vue
  57. 87 13
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue
  58. 377 223
      src/xt_pages/outpatientDoctorStation/pastInquiries.vue
  59. 9 3
      src/xt_pages/outpatientDoctorStation/print.vue
  60. 463 310
      src/xt_pages/outpatientDoctorStation/template/printOne.vue
  61. 616 420
      src/xt_pages/outpatientDoctorStation/template/printThree.vue
  62. 3 1
      src/xt_pages/outpatientDoctorStation/treatPrint.vue
  63. 566 411
      src/xt_pages/outpatientDoctorStation/treatTemplate/printTwo.vue
  64. 311 0
      src/xt_pages/outpatientTool/components/drugDetail.vue
  65. 266 0
      src/xt_pages/outpatientTool/components/goodDetail.vue
  66. 307 0
      src/xt_pages/outpatientTool/zeroSummary.vue
  67. 28 10
      src/xt_pages/stock/detail/print.vue
  68. 26 2
      src/xt_pages/stock/detail/stockOutDetail.vue
  69. 226 0
      src/xt_pages/stock/inventoryTransfer/Addtrans.vue
  70. 228 0
      src/xt_pages/stock/inventoryTransfer/index.vue
  71. 176 0
      src/xt_pages/stock/inventoryTransfer/transDetails.vue
  72. 821 0
      src/xt_pages/stock/inventoryTransfer/transEdit.vue
  73. 536 0
      src/xt_pages/stock/testOrder.vue
  74. 372 0
      src/xt_pages/stock/testOrderDetail.vue
  75. 556 0
      src/xt_pages/stock/testOrderEdit.vue
  76. 494 0
      src/xt_pages/stock/testOrderQuery.vue
  77. 220 0
      src/xt_pages/stock/warehouseManage/components/AddWareHouse.vue
  78. 368 0
      src/xt_pages/stock/warehouseManage/query.vue
  79. 198 0
      src/xt_pages/stock/warehouseManage/waresetting.vue
  80. 19 10
      src/xt_pages/supply/components/addGoodReturn.vue

+ 0 - 4
.idea/shelf/Uncommitted_changes_before_Update_at_2022_4_16_10_41__Default_Changelist_.xml 查看文件

@@ -1,4 +0,0 @@
1
-<changelist name="Uncommitted_changes_before_Update_at_2022_4_16_10_41_[Default_Changelist]" date="1650076869924" recycled="true" deleted="true">
2
-  <option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Update_at_2022_4_16_10_41_[Default_Changelist]/shelved.patch" />
3
-  <option name="DESCRIPTION" value="Uncommitted changes before Update at 2022/4/16 10:41 [Default Changelist]" />
4
-</changelist>

+ 3 - 2
src/api/dialysis_record.js 查看文件

@@ -47,7 +47,7 @@ export function editMonitor(patient_id, schedule_date, data, mode) {
47 47
   })
48 48
 }
49 49
 
50
-export function startDialysis(patient_id, schedule_date, nurse_id, bed_id, lood_drawing, puncture_nurse_id, start_time, schedual_type, mode, washpipe_nurse, change_nurse, difficult_puncture_nurse, new_fistula_nurse) {
50
+export function startDialysis(patient_id, schedule_date, nurse_id, bed_id, lood_drawing, puncture_nurse_id, start_time, schedual_type, mode, washpipe_nurse, change_nurse, difficult_puncture_nurse, new_fistula_nurse, blood_drawing) {
51 51
   var params = {
52 52
     patient_id: patient_id,
53 53
     date: schedule_date,
@@ -61,7 +61,8 @@ export function startDialysis(patient_id, schedule_date, nurse_id, bed_id, lood_
61 61
     washpipe_nurse: washpipe_nurse,
62 62
     change_nurse: change_nurse,
63 63
     difficult_puncture_nurse: difficult_puncture_nurse,
64
-    new_fistula_nurse: new_fistula_nurse
64
+    new_fistula_nurse: new_fistula_nurse,
65
+    blood_drawing: blood_drawing
65 66
   }
66 67
   console.log('params', params)
67 68
   return request({

+ 11 - 0
src/api/his/his_hospital.js 查看文件

@@ -10,3 +10,14 @@ export function upLoadChargeInfo(params) {
10 10
   });
11 11
 }
12 12
 
13
+
14
+export function refundDetail(params) {
15
+  return request({
16
+    url: "/api/hospital/refunddetail",
17
+    method: "get",
18
+    params:params
19
+  });
20
+}
21
+
22
+
23
+

+ 97 - 0
src/api/seconde.js 查看文件

@@ -0,0 +1,97 @@
1
+import request from '@/utils/request'
2
+
3
+export function getSencondeGoodList(params) {
4
+  return request({
5
+    url: '/api/seconde/getsencondegoodlist',
6
+    method: 'get',
7
+    params: params
8
+  })
9
+}
10
+
11
+export function saveSencondOrder(data, record_date, storehouse_in_id, storehouse_out_id) {
12
+  return request({
13
+    url: '/api/senconde/savesencondorder?record_date=' + record_date + '&storehouse_in_id=' + storehouse_in_id + '&storehouse_out_id=' + storehouse_out_id,
14
+    method: 'post',
15
+    data: data
16
+  })
17
+}
18
+
19
+export function getAllSecondOrderList(params) {
20
+  return request({
21
+    url: '/api/senconde/getallsecondeorderlist',
22
+    method: 'get',
23
+    params: params
24
+  })
25
+}
26
+
27
+export function getSencondOrderDetail(id, params) {
28
+  return request({
29
+    url: '/api/senconde/getsencondorderdetail?id=' + id,
30
+    method: 'get',
31
+    params: params
32
+  })
33
+}
34
+
35
+export function updateSencondOrder(data, warehousing_time, storehouse_in_id, storehouse_out_id, id) {
36
+  return request({
37
+    url: '/api/senconde/updatesencondorder?id=' + id + '&record_date=' + warehousing_time + '&storehouse_in_id=' + storehouse_in_id + '&storehouse_out_id=' + storehouse_out_id,
38
+    method: 'post',
39
+    data: data
40
+  })
41
+}
42
+
43
+export function getSecondOrderDetailList(id, params) {
44
+  return request({
45
+    url: '/api/sencond/getsecondorderbyid?id=' + id,
46
+    method: 'get',
47
+    params: params
48
+  })
49
+}
50
+
51
+export function checkSecondOrder(ids, params) {
52
+  return request({
53
+    url: '/api/sencond/checksecondorder?ids=' + ids,
54
+    method: 'get',
55
+    params: params
56
+  })
57
+}
58
+
59
+export function deleteStoreHouseList(id, params) {
60
+  return request({
61
+    url: '/api/sencond/deletestorehouselist?id=' + id,
62
+    method: 'get',
63
+    params: params
64
+  })
65
+}
66
+
67
+export function returnCheckSecondOrder(ids, params) {
68
+  return request({
69
+    url: '/api/sencond/returnchecksecondeorder?ids=' + ids,
70
+    method: 'get',
71
+    params: params
72
+  })
73
+}
74
+
75
+export function getStoreHouseGoodList(params) {
76
+  return request({
77
+    url: '/api/second/getstorehousegoodlist',
78
+    method: 'get',
79
+    params: params
80
+  })
81
+}
82
+
83
+export function getSumSecondeCount(params) {
84
+  return request({
85
+    url: '/api/second/getsumsecondecount',
86
+    method: 'get',
87
+    params: params
88
+  })
89
+}
90
+
91
+export function deleteSecondeOrderInfo(id, params) {
92
+  return request({
93
+    url: '/api/second/deletesecondorderinfo?id=' + id,
94
+    method: 'get',
95
+    params: params
96
+  })
97
+}

+ 133 - 0
src/api/warehouse.js 查看文件

@@ -0,0 +1,133 @@
1
+import request from '@/utils/request'
2
+
3
+//分页(已渲染)
4
+export function storehouselist(params) {
5
+  return request({
6
+    url: '/api/secondary/storehouselist',
7
+    method: 'get',
8
+    params: params
9
+  })
10
+}
11
+
12
+//获取当前机构的所有可用仓库名称接口(已渲染)
13
+export function getallstorehousename(params) {
14
+  return request({
15
+    url: '/api/secondary/getallstorehousename',
16
+    method: 'get',
17
+    params: params
18
+  })
19
+}
20
+
21
+//获取一条仓库数据接口(好像用不到了)
22
+export function getonestorehouse(params) {
23
+  return request({
24
+    url: '/api/secondary/getonestorehouse',
25
+    method: 'get',
26
+    params: params
27
+  })
28
+}
29
+
30
+//修改仓库接口(已渲染)
31
+export function updatestorehouse(data) {
32
+  return request({
33
+    url: '/api/secondary/updatestorehouse',
34
+    method: 'post',
35
+    data: data
36
+  })
37
+}
38
+
39
+//添加仓库接口(已渲染)
40
+export function addstorehouse(data) {
41
+  return request({
42
+    url: '/api/secondary/addstorehouse',
43
+    method: 'post',
44
+    data: data
45
+  })
46
+}
47
+
48
+//仓库地址查重接口(合并到新增)
49
+export function isstorehouseaddress(params) {
50
+  return request({
51
+    url: '/api/secondary/isstorehouseaddress',
52
+    method: 'get',
53
+    params: params
54
+  })
55
+}
56
+
57
+//仓库名称查重接口(合并到新增)
58
+export function isstorehousename(params) {
59
+  return request({
60
+    url: '/api/secondary/isstorehousename',
61
+    method: 'get',
62
+    params: params
63
+  })
64
+}
65
+
66
+//删除仓库接口(已渲染)
67
+export function deletestorehouse(params) {
68
+  return request({
69
+    url: '/api/secondary/deletestorehouse',
70
+    method: 'get',
71
+    params: params
72
+  })
73
+}
74
+
75
+//修改仓库状态接口(已渲染)
76
+export function updatestatus(params) {
77
+  return request({
78
+    url: '/api/secondary/updatestatus',
79
+    method: 'get',
80
+    params: params
81
+  })
82
+}
83
+
84
+//获取仓库编号接口(已渲染)
85
+export function getcode(params) {
86
+  return request({
87
+    url: '/api/secondary/getcode',
88
+    method: 'get',
89
+    params: params
90
+  })
91
+}
92
+
93
+//查询该机构的仓库配置(已渲染)
94
+export function findstorehouseconfig(params) {
95
+  return request({
96
+    url: '/api/secondary/findstorehouseconfig',
97
+    method: 'get',
98
+    params: params
99
+  })
100
+}
101
+
102
+//更改耗材自动入库仓库(已渲染)
103
+export function updateinfo(params) {
104
+  return request({
105
+    url: '/api/secondary/updateinfo',
106
+    method: 'get',
107
+    params: params
108
+  })
109
+}
110
+//更改耗材自动出库仓库(已渲染)
111
+export function updateoutinfo(params) {
112
+  return request({
113
+    url: '/api/secondary/updateoutinfo',
114
+    method: 'get',
115
+    params: params
116
+  })
117
+}
118
+//更改药品自动入库仓库(已渲染)
119
+export function updatedruginfo(params) {
120
+  return request({
121
+    url: '/api/secondary/updatedruginfo',
122
+    method: 'get',
123
+    params: params
124
+  })
125
+}
126
+//更改药品自动出库仓库(已渲染)
127
+export function updatedrugout(params) {
128
+  return request({
129
+    url: '/api/secondary/updatedrugout',
130
+    method: 'get',
131
+    params: params
132
+  })
133
+}

二进制
src/assets/purchase/ban.png 查看文件


二进制
src/assets/purchase/set.png 查看文件


+ 2 - 0
src/lang/en.js 查看文件

@@ -95,6 +95,8 @@ export default {
95 95
     deviceZoneManage: 'Device Zone Manage',
96 96
     deviceGroupManage: 'Device Group Manage',
97 97
     stockManage: 'Stock Manage',
98
+    wareHouseManage:'Ware House Manage',
99
+    inventoryTransfer:'inventoryTransfer',
98 100
     supplyManage: 'Supply Manage',
99 101
     supplyQuery: 'supply query',
100 102
     baseInfo: 'base Info',

+ 4 - 0
src/lang/zh.js 查看文件

@@ -1,4 +1,5 @@
1 1
 export default {
2
+// 须在src/lang中进行国际化配置
2 3
   route: {
3 4
     dashboard: '首页',
4 5
     introduction: '简述',
@@ -173,6 +174,9 @@ export default {
173 174
     selfPreparedMedicineQuery: '自备药查询',
174 175
     selfPreparedMedicineIndex: '自备药管理',
175 176
     selfPreparedMedicine: '自备药管理',
177
+    wareHouseManage:'仓库管理',
178
+    inventoryTransfer:'库存调拨',
179
+
176 180
     consumablesManagement: '耗材管理',
177 181
     warehouseReceipt: '出入库',
178 182
     warehouseReceiptOther: '出入库',

+ 5 - 1
src/router/index.js 查看文件

@@ -22,6 +22,8 @@ import slow from './modules/slow'
22 22
 import scrm from './modules/scrm'
23 23
 import shop from './modules/shop'
24 24
 import selfPreparedMedicine from './modules/selfPreparedMedicine'
25
+import wareHouseManage from './modules/wareHouseManage'
26
+import inventoryTransfer from './modules/inventoryTransfer'
25 27
 import drugs from './modules/drugs'
26 28
 import outpatientRegistration from './modules/outpatientRegistration'
27 29
 import outpatientDoctorStation from './modules/outpatientDoctorStation'
@@ -149,7 +151,9 @@ var _asy_router_map = [
149 151
   dialysis,
150 152
   stock,
151 153
   drugs,
152
-  selfPreparedMedicine,
154
+  selfPreparedMedicine,  //自备药管理模块
155
+  wareHouseManage,  //仓库管理模块
156
+  inventoryTransfer,    //库存调拨模块
153 157
   otherManagement,
154 158
   qcd,
155 159
   device,

+ 17 - 0
src/router/modules/inventoryTransfer.js 查看文件

@@ -0,0 +1,17 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+  path: '/inventoryTransfer',
5
+  component: Layout,
6
+  name:'inventoryTransfer',
7
+  redirct: 'noredirect',
8
+  children: [{
9
+    path: '/stock/inventoryTransfer',
10
+    component: () => import('@/xt_pages/stock/inventoryTransfer/index.vue'),
11
+    name: '库存调拨',
12
+    meta: {
13
+      title: '库存调拨',
14
+      noCache: true
15
+    }
16
+  },]
17
+}

+ 24 - 0
src/router/modules/stock.js 查看文件

@@ -348,6 +348,30 @@ export default {
348 348
         title: '退库打印',
349 349
         noCache: true
350 350
       }
351
+    },
352
+
353
+    {
354
+      path: '/stock/inventoryTransfer/Addtrans',
355
+      component: () => import('@/xt_pages/stock/inventoryTransfer/Addtrans'),
356
+      hidden: true,
357
+      is_menu: false,
358
+      name: 'Addtrans',
359
+      meta: {
360
+        title: '新增调拨',
361
+        noCache: true
362
+      }
363
+    },
364
+
365
+    {
366
+      path: '/stock/inventoryTransfer/transDetails',
367
+      component: () => import('@/xt_pages/stock/inventoryTransfer/transDetails'),
368
+      hidden: true,
369
+      is_menu: false,
370
+      name: 'Addtrans',
371
+      meta: {
372
+        title: '调拨详情',
373
+        noCache: true
374
+      }
351 375
     }
352 376
   ]
353 377
 }

+ 33 - 0
src/router/modules/wareHouseManage.js 查看文件

@@ -0,0 +1,33 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+    path: '/stock/wareHouseManage',
5
+    component: Layout,
6
+    redirect: 'noredirect',
7
+    name: 'wareHouseManage',
8
+    alwaysShow: true,
9
+    meta: {
10
+        title: 'wareHouseManage',
11
+        icon: 'stock',
12
+        isChild: true
13
+    },
14
+    children: [
15
+        {
16
+            path: '/stock/warehousequery',
17
+            component: () => import('@/xt_pages/stock/warehouseManage/query'),
18
+            name: 'warehousequery',
19
+            meta: { title: '仓库信息', noCache: true },
20
+        },
21
+        {
22
+            path: '/stock/waresetting',
23
+            component: () => import('@/xt_pages/stock/warehouseManage/waresetting'),
24
+            name: 'waresetting',
25
+            hidden: true,
26
+            is_menu: false,    
27
+            meta: { title: '仓库设置', noCache: true },
28
+        }
29
+
30
+    ]
31
+
32
+
33
+}

+ 1 - 3
src/views/layout/Layout.vue 查看文件

@@ -16,12 +16,10 @@
16 16
           <i class="iconfont icon-computer_fill navIcon"></i>
17 17
           <p>透析管理</p>
18 18
         </div>
19
-
20 19
        <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
21 20
          <i class="iconfont icon-kccx navIcon"></i>
22 21
          <p>采购管理</p>
23 22
       </div>
24
-
25 23
         <div v-if="kucunShow" :class="index == 3 ? 'navOne navActive' : 'navOne'" @click="clickActive(3,'库房管理')">
26 24
           <i class="iconfont icon-kccx navIcon"></i>
27 25
           <p>库房管理</p>
@@ -132,7 +130,7 @@ export default {
132 130
     let menzhen = ['hospitalStation',"hospitalRecord","hospitalCharges","hisTool",'outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy','outpatientRecord'];
133 131
     let bingli = ['User','createPatient'];
134 132
     let touxi = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control'];
135
-    let kucun = ['stockManage','stockDrugs','selfPreparedMedicine','otherManagement'];
133
+    let kucun = ['stockManage','stockDrugs','selfPreparedMedicine','inventoryTransfer','wareHouseManage','otherManagement'];
136 134
     let caigou = ['supplyManage','supplyList'];
137 135
     let peizhi = ['system','roleManage','DepartManage', 'bedManagement', 'dictionaryManagement', 'templateManagement','showconfig','printTemplate','integration_config','basicConfig'];
138 136
     let kuyishopping = ['kuyiShopping'];

+ 1 - 1
src/views/layout/components/Sidebar/index.vue 查看文件

@@ -121,7 +121,7 @@ export default {
121 121
             this.$emit('func',a)
122 122
           }
123 123
         }else if(newVal == '库房管理'){
124
-          let nameArr = ['stockManage','stockDrugs','selfPreparedMedicine','otherManagement'];
124
+          let nameArr = ['stockManage','stockDrugs','selfPreparedMedicine','inventoryTransfer','wareHouseManage','otherManagement'];
125 125
           let routerArr = [];
126 126
           this.permission_routers.map(item => {
127 127
             if(nameArr.indexOf(item.name) > -1){

+ 1 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_fortyThree.vue 查看文件

@@ -912,7 +912,7 @@ export default {
912 912
       const style =
913 913
         '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}'
914 914
       const style2 =
915
-        '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1370px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}'
915
+        '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .print-table{border: none} .print-table tr{page-break-inside:avoid;} .print-table tr td{border: 1px solid #000;}.check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1050px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}.table-box1 {border: 1px solid #000;width: 100%;line-height: 30px;font-size: 14px;border-collapse: collapse;}.table-box1 tr {border-bottom: 1px solid #000;} .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}';
916 916
       const style9 =
917 917
         '@media print {#dialysis-print-box-1{margin:0 auto;}.dialysis-print-order{width:920px;margin:0 10px;font-size:10px;}.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 940px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1050px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}.table-box1 {border: 1px solid #000;width: 100%;line-height: 30px;font-size: 14px;border-collapse: collapse;} @page {margin-top:5px;}.table-box1 tr {border-bottom: 1px solid #000;}';
918 918
       printJS({

+ 56 - 29
src/xt_pages/dialysis/batch_print/batch_print_order_six.vue 查看文件

@@ -278,7 +278,7 @@
278 278
                             style="width: 100px;text-align: center"
279 279
                             v-if="
280 280
                               record.assessment_before_dislysis.puncture_way == ''
281
-                                
281
+
282 282
                             "
283 283
                           ></div>
284 284
                           <div
@@ -295,7 +295,7 @@
295 295
                             style="width: 100px;text-align: center"
296 296
                             v-if="
297 297
                               record.assessment_before_dislysis.puncture_way.indexOf('扣眼')>-1
298
-                               
298
+
299 299
                             "
300 300
                           >
301 301
                             扣眼
@@ -305,7 +305,7 @@
305 305
                             style="width: 100px;text-align: center"
306 306
                             v-if="
307 307
                               record.assessment_before_dislysis.puncture_way.indexOf('区域')>-1
308
-                                
308
+
309 309
                             "
310 310
                           >
311 311
                             区域
@@ -330,7 +330,7 @@
330 330
                           }}
331 331
                         </div>
332 332
                       </div>
333
-                      
333
+
334 334
                     </div>
335 335
                     <div
336 336
                       class="row"
@@ -348,7 +348,7 @@
348 348
                                   .blood_access_part_id
349 349
                                 ? record.assessment_before_dislysis
350 350
                                     .blood_access_part_id
351
-                                : 0  
351
+                                : 0
352 352
                           }}
353 353
                           {{
354 354
                             record.assessment_before_dislysis &&
@@ -679,7 +679,7 @@
679 679
                           <span v-else>/</span>
680 680
                         </div>
681 681
                       </div>
682
-                      
682
+
683 683
                     </div>
684 684
 
685 685
                     <div
@@ -704,7 +704,7 @@
704 704
                                       .additional_weight
705 705
                                 ).toFixed(1)
706 706
                               : "未称重"
707
-                          }}</span>  
707
+                          }}</span>
708 708
                         </div>
709 709
                         kg
710 710
                       </div>
@@ -1092,7 +1092,7 @@
1092 1092
                           <td></td>
1093 1093
                           <td></td>
1094 1094
                           <td></td>
1095
-                          
1095
+
1096 1096
                           <td style="line-height:16px;padding:0px;">
1097 1097
                             <div
1098 1098
                               style="height:40px;line-height:20px; overflow:hidden;"
@@ -1519,8 +1519,8 @@
1519 1519
                           }}
1520 1520
                         </div>
1521 1521
                       </div>
1522
-                      
1523
-                      
1522
+
1523
+
1524 1524
                     </div>
1525 1525
 
1526 1526
                     <div
@@ -1751,7 +1751,44 @@
1751 1751
                           />
1752 1752
                         </div>
1753 1753
                       </div>
1754
-                      <div class="inline_block" style="flex:1;">
1754
+                     <div class="inline_block" style="flex:1;">
1755
+                      核对人员:
1756
+                       <div
1757
+                          class="under_line"
1758
+                          style="width: 80px;text-align: left"
1759
+                          v-if="!record.check"
1760
+                        ></div>
1761
+                      <div class="under_line" style="width: 80px;text-align: center" v-if="record.check != null && record.dialysis_order == null">
1762
+                        <span style="height: 30px;display: inline-block;" v-if="setAdminUserES(record.check, 'creater') == ''">
1763
+                         {{getAdminUser(record.check, "creater")? getAdminUser(record.check, "creater") : "/" }}
1764
+                        </span>
1765
+                        <img style="height:30px;" :src="setAdminUserES(record.check, 'creater')" alt="" srcset="" v-else />
1766
+                      </div>
1767
+                      <div class="under_line" style="width: 80px;text-align: center" v-if="record.check != null && record.dialysis_order != null && record.dialysis_order.start_nurse == record.check.modifier">
1768
+                        <span style="height: 30px;display: inline-block;" v-if="setAdminUserES(record.check, 'creater') == ''">
1769
+                         {{getAdminUser(record.check, "creater")? getAdminUser(record.check, "creater") : "/" }}
1770
+                        </span>
1771
+                        <img style="height:30px;" :src="setAdminUserES(record.check, 'creater')" alt="" srcset="" v-else />
1772
+                      </div>
1773
+                      <div class="under_line" style="width: 80px;text-align: center" v-if="record.check != null && record.dialysis_order != null && record.dialysis_order.start_nurse == record.check.creater">
1774
+                        <span style="height: 30px;display: inline-block;" v-if="setAdminUserES(record.check, 'modifier') == ''">
1775
+                          {{getAdminUser(record.check, "modifier")? getAdminUser(record.check, "modifier") : "/" }}
1776
+                        </span>
1777
+                        <img style="height:30px;" :src="setAdminUserES(record.check, 'modifier')" alt="" srcset="" v-else />
1778
+                      </div>
1779
+                      <div class="under_line" style="width: 80px;text-align: center" v-if="record.check != null && record.dialysis_order  != null && record.dialysis_order.start_nurse != record.check.creater && record.dialysis_order.start_nurse != record.check.modifier">
1780
+                        <span style="height: 30px;display: inline-block;" v-if="setAdminUserES(record.check, 'creater') == ''">
1781
+                          {{getAdminUser(record.check, "creater")? getAdminUser(record.check, "creater") : "/" }}
1782
+                        </span>
1783
+                        <img style="height:30px;" :src="setAdminUserES(record.check, 'creater')" alt="" srcset="" v-else />
1784
+                      </div>
1785
+                       <div
1786
+                          class="under_line"
1787
+                          style="width: 80px;text-align: left"
1788
+                          v-if="!record.check"
1789
+                        ></div>
1790
+                    </div>
1791
+                      <!-- <div class="inline_block" style="flex:1;">
1755 1792
                         核对人员:
1756 1793
                         <div
1757 1794
                           class="under_line"
@@ -1764,12 +1801,8 @@
1764 1801
                           style="width: 80px;text-align: left"
1765 1802
                         >
1766 1803
                           <div
1767
-                            style="width: 80px;text-align: left;display: inline-block;white-space: nowrap;"
1768
-                            v-if="
1769
-                              record.dialysis_order != null &&
1770
-                                record.dialysis_order.start_nurse ==
1771
-                                  record.check.creater
1772
-                            "
1804
+                            style="width: 80px;text-align: left;display: inline-block;white-space: nowrap;" 
1805
+                            v-if="record.dialysis_order != null && record.check.creater ==record.check.creater"
1773 1806
                           >
1774 1807
                             <span
1775 1808
                               v-if="
@@ -1790,14 +1823,11 @@
1790 1823
                               style="height: 40px;"
1791 1824
                             />
1792 1825
                           </div>
1826
+
1793 1827
                           <div
1794 1828
                             class="under_line"
1795 1829
                             style="width: 80px;text-align: left"
1796
-                            v-if="
1797
-                              record.dialysis_order != null &&
1798
-                                record.dialysis_order.start_nurse ==
1799
-                                  record.check.modifier
1800
-                            "
1830
+                            v-if=" record.dialysis_order != null &&record.dialysis_order.start_nurse ==record.check.modifier "
1801 1831
                           >
1802 1832
                             <span
1803 1833
                               v-if="
@@ -1813,15 +1843,11 @@
1813 1843
                               v-else
1814 1844
                             />
1815 1845
                           </div>
1846
+
1816 1847
                           <div
1817 1848
                             class="under_line"
1818 1849
                             style="width: 80px;text-align: left"
1819
-                            v-if="
1820
-                              record.dialysis_order != null &&
1821
-                                record.dialysis_order.start_nurse !=
1822
-                                  record.check.modifier &&
1823
-                                record.dialysis_order.start_nurse !=
1824
-                                  record.check.creater
1850
+                            v-if="record.dialysis_order != null &&record.dialysis_order.start_nurse != record.check.modifier &&record.dialysis_order.start_nurse != record.check.creater
1825 1851
                             "
1826 1852
                           >
1827 1853
                             <span
@@ -1838,13 +1864,14 @@
1838 1864
                               v-else
1839 1865
                             />
1840 1866
                           </div>
1867
+
1841 1868
                         </div>
1842 1869
                         <div
1843 1870
                           class="under_line"
1844 1871
                           style="width: 80px;text-align: left"
1845 1872
                           v-if="!record.check"
1846 1873
                         ></div>
1847
-                      </div>
1874
+                      </div> -->
1848 1875
                       <div class="inline_block" style="flex:1;">
1849 1876
                         下机护士:
1850 1877
                         <div

+ 12 - 0
src/xt_pages/dialysis/bloodPresssWatch.vue 查看文件

@@ -309,6 +309,16 @@
309 309
           >批量打印</el-button
310 310
         >
311 311
       </template>
312
+        <template v-if="this.template_id == 47">
313
+        <el-button
314
+          size="small"
315
+          icon="el-icon-printer"
316
+          :disabled="selecting_schs.length == 0"
317
+          @click="batchPrintAction"
318
+          type="primary"
319
+          >批量打印</el-button
320
+        >
321
+      </template>
312 322
     </div>
313 323
     <div class="app-container">
314 324
       <!-- <div class="filter-container">
@@ -942,6 +952,8 @@ export default {
942 952
         this.$router.push({ path: "/dialysis/print/batch/fortyOne" });
943 953
       } else if (this.template_id == 43) {
944 954
         this.$router.push({ path: "/dialysis/print/batch/fortyThree" });
955
+      } else if (this.template_id == 47) {
956
+        this.$router.push({ path: "/dialysis/print/batch/fortyThree" });
945 957
       }
946 958
     },
947 959
     batchPrintActionOne: function() {

+ 2 - 2
src/xt_pages/dialysis/details/DialysisPrescription.vue 查看文件

@@ -111,8 +111,8 @@
111 111
           <label>目标超滤量 : </label>
112 112
           <span class="content">{{ target_ultrafiltration != "0" ? target_ultrafiltration : ""}}</span>
113 113
           
114
-          <span v-if="this.$store.getters.xt_user.template_info.template_id != 17 && this.$store.getters.xt_user.template_info.template_id != 9 && this.$store.getters.xt_user.template_info.template_id != 20 && this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 22 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 24 && this.$store.getters.xt_user.template_info.template_id != 26 && this.$store.getters.xt_user.template_info.template_id != 28 && this.$store.getters.xt_user.template_info.template_id != 27 && this.$store.getters.xt_user.template_info.template_id != 29 && this.$store.getters.xt_user.template_info.template_id != 30 && this.$store.getters.xt_user.template_info.template_id != 31 && this.$store.getters.xt_user.template_info.template_id != 32 && this.$store.getters.xt_user.template_info.template_id != 34 && this.$store.getters.xt_user.template_info.template_id != 38 && this.$store.getters.xt_user.template_info.template_id != 40 && this.$store.getters.xt_user.template_info.template_id != 43 && this.$store.getters.xt_user.template_info.template_id != 45 && this.$store.getters.xt_user.template_info.org_id != 9555"  class="unit">{{ target_ultrafiltration != "0" ? "L" : "" }}</span>
115
-          <span v-if="this.$store.getters.xt_user.template_info.template_id == 17 || this.$store.getters.xt_user.template_info.template_id == 9 || this.$store.getters.xt_user.template_info.template_id == 20 || this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 22 || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 24 || this.$store.getters.xt_user.template_info.template_id == 26 || this.$store.getters.xt_user.template_info.template_id == 28 || this.$store.getters.xt_user.template_info.template_id == 27 || this.$store.getters.xt_user.template_info.template_id == 29 || this.$store.getters.xt_user.template_info.template_id == 30 || this.$store.getters.xt_user.template_info.template_id == 31 || this.$store.getters.xt_user.template_info.template_id == 32 || this.$store.getters.xt_user.template_info.template_id == 34 || this.$store.getters.xt_user.template_info.template_id == 38 || this.$store.getters.xt_user.template_info.template_id != 40 || this.$store.getters.xt_user.template_info.template_id != 43 || this.$store.getters.xt_user.template_info.template_id != 45 || this.$store.getters.xt_user.template_info.org_id == 9555" class="unit">{{ target_ultrafiltration != "0" ? "ml" : "" }}</span>
114
+          <span v-if="this.$store.getters.xt_user.template_info.template_id != 17 && this.$store.getters.xt_user.template_info.template_id != 9 && this.$store.getters.xt_user.template_info.template_id != 20 && this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 22 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 24 && this.$store.getters.xt_user.template_info.template_id != 26 && this.$store.getters.xt_user.template_info.template_id != 28 && this.$store.getters.xt_user.template_info.template_id != 27 && this.$store.getters.xt_user.template_info.template_id != 29 && this.$store.getters.xt_user.template_info.template_id != 30 && this.$store.getters.xt_user.template_info.template_id != 31 && this.$store.getters.xt_user.template_info.template_id != 32 && this.$store.getters.xt_user.template_info.template_id != 34 && this.$store.getters.xt_user.template_info.template_id != 38 && this.$store.getters.xt_user.template_info.template_id != 40 && this.$store.getters.xt_user.template_info.template_id != 43 && this.$store.getters.xt_user.template_info.template_id != 45  && this.$store.getters.xt_user.template_info.template_id != 46  && this.$store.getters.xt_user.template_info.org_id != 9555"  class="unit">{{ target_ultrafiltration != "0" ? "L" : "" }}</span>
115
+          <span v-if="this.$store.getters.xt_user.template_info.template_id == 17 || this.$store.getters.xt_user.template_info.template_id == 9 || this.$store.getters.xt_user.template_info.template_id == 20 || this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 22 || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 24 || this.$store.getters.xt_user.template_info.template_id == 26 || this.$store.getters.xt_user.template_info.template_id == 28 || this.$store.getters.xt_user.template_info.template_id == 27 || this.$store.getters.xt_user.template_info.template_id == 29 || this.$store.getters.xt_user.template_info.template_id == 30 || this.$store.getters.xt_user.template_info.template_id == 31 || this.$store.getters.xt_user.template_info.template_id == 32 || this.$store.getters.xt_user.template_info.template_id == 34 || this.$store.getters.xt_user.template_info.template_id == 38 || this.$store.getters.xt_user.template_info.template_id != 40 || this.$store.getters.xt_user.template_info.template_id != 43 || this.$store.getters.xt_user.template_info.template_id != 45 || this.$store.getters.xt_user.template_info.template_id != 46  || this.$store.getters.xt_user.template_info.org_id == 9555" class="unit">{{ target_ultrafiltration != "0" ? "ml" : "" }}</span>
116 116
         </li>
117 117
 
118 118
          <li v-if="isShow('目标超滤量') && this.$store.getters.xt_user.template_info.org_id == 10290">

+ 15 - 13
src/xt_pages/dialysis/details/dialog/computer_dialog.vue 查看文件

@@ -26,7 +26,7 @@
26 26
             <el-option v-for="(admin, index) in adminRoles" :key="index" :value="admin.id" :label="admin.name"></el-option>
27 27
           </el-select>
28 28
         </el-form-item>
29
-        
29
+
30 30
         <el-form-item label="换药护士"  v-if="isShowFiled('换药护士')">
31 31
           <el-select v-model="form.change_nurse" placeholder="换药护士">
32 32
             <el-option v-for="(admin, index) in adminRoles" :key="index" :value="admin.id" :label="admin.name"></el-option>
@@ -52,8 +52,8 @@
52 52
             </el-select>
53 53
         </el-form-item>
54 54
 
55
-     
56
-        <el-form-item label="引血(ml/min)" v-if="template_id == 6 && org_id != 10223">
55
+
56
+        <el-form-item label="引血(ml/min)" v-if="isShowFiled('引血')">
57 57
           <el-input type="number" v-model="form.blood_drawing" style="width:200px;"></el-input>
58 58
         </el-form-item>
59 59
 
@@ -157,13 +157,13 @@
157 157
       this.form.nurse_id = this.dialysis_order.id == 0 ? this.$store.getters.xt_user.user.id : this.dialysis_order.start_nurse
158 158
       this.form.puncture_nurse_id = this.dialysis_order.id == 0 ? this.$store.getters.xt_user.user.id : this.dialysis_order.puncture_nurse
159 159
       this.form.washpipe_nurse = this.dialysis_order.id == 0 ? this.$store.getters.xt_user.user.id : this.dialysis_order.washpipe_nurse
160
-      
161
-     
160
+
161
+
162 162
       if (this.form.puncture_nurse_id == 0) {
163 163
         this.form.puncture_nurse_id = this.$store.getters.xt_user.user.id
164 164
       }
165
-      
166
-     
165
+
166
+
167 167
     },
168 168
     watch: {
169 169
       patient:{
@@ -203,7 +203,7 @@
203 203
         if(this.admins.length > 0 ){
204 204
           for(let i=0;i<this.admins.length;i++){
205 205
             this.adminRoles.push(this.admins[i])
206
-          } 
206
+          }
207 207
         }
208 208
         console.log("人员",this.adminRoles)
209 209
       }
@@ -245,7 +245,7 @@
245 245
         ParamsQuery['record_date'] = this.$route.query.date
246 246
         console.log("列表33333333333333333333",ParamsQuery)
247 247
         // console.log("路由",this.$route.query.date)
248
-       
248
+
249 249
         GetSchedualNumber(ParamsQuery).then(response => {
250 250
           if (response.data.state == 0) {
251 251
             this.$message.error(response.data.msg)
@@ -357,8 +357,8 @@
357 357
         console.log(this.dialysis_order)
358 358
         this.loading = true
359 359
         let mode = '1'
360
-
361
-        startDialysis(this.patient_id, this.schedule_date ? parseTime(this.schedule_date, '{y}-{m}-{d}') : parseTime(new Date(), '{y}-{m}-{d}'), this.form.nurse_id, this.form.bed_id, this.form.lood_drawing, this.form.puncture_nurse_id, this.form.start_time, this.schedual_type, mode,this.form.washpipe_nurse,this.form.change_nurse,this.form.difficult_puncture_nurse,this.form.new_fistula_nurse).then(rs => {
360
+        var blood_drawing =  this.form.blood_drawing.toString()
361
+        startDialysis(this.patient_id, this.schedule_date ? parseTime(this.schedule_date, '{y}-{m}-{d}') : parseTime(new Date(), '{y}-{m}-{d}'), this.form.nurse_id, this.form.bed_id, this.form.lood_drawing, this.form.puncture_nurse_id, this.form.start_time, this.schedual_type, mode,this.form.washpipe_nurse,this.form.change_nurse,this.form.difficult_puncture_nurse,this.form.new_fistula_nurse,blood_drawing).then(rs => {
362 362
           this.loading = false
363 363
           var resp = rs.data
364 364
           if (resp.state == 1) {
@@ -371,7 +371,7 @@
371 371
             // axios.get('/api/index/uppatient?org_id='+ orgId + '&admin_user_id='+ this.form.nurse_id + '&patient_id=' + this.patient_id + '&up_time=' + (new Date(this.form.start_time).getTime() / 1000)).then((res) => {
372 372
             //   console.log('res',res.data)
373 373
 
374
-            // }) 
374
+            // })
375 375
             this.hide()
376 376
             this.$emit('monitor', resp.data.monitor)
377 377
             this.$message.success('上机成功')
@@ -379,7 +379,8 @@
379 379
             this.$message.error(resp.msg)
380 380
           }
381 381
         })
382
-      }, editOrder() {
382
+      },
383
+      editOrder() {
383 384
         let ParamsQuery = {}
384 385
         ParamsQuery['schedual_type'] = this.schedual_type
385 386
         ParamsQuery['id'] = this.dialysis_order.id
@@ -391,6 +392,7 @@
391 392
         ParamsQuery['change_nurse'] = this.form.change_nurse
392 393
         ParamsQuery['difficult_puncture_nurse'] = this.form.difficult_puncture_nurse
393 394
         ParamsQuery['new_fistula_nurse'] = this.form.new_fistula_nurse
395
+        ParamsQuery["blood_drawing"] = this.form.blood_drawing
394 396
         ParamsQuery['mode'] = "2"
395 397
         if (this.dialysis_order.creator != this.$store.getters.xt_user.user.id) {
396 398
           ParamsQuery['mode'] = "3"

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

@@ -87,7 +87,7 @@
87 87
                     </el-col>
88 88
 
89 89
                     <el-col :span="8"
90
-                            v-if="isShows('目标超滤量') && (this.$store.getters.xt_user.template_info.template_id == 17 || this.$store.getters.xt_user.template_info.template_id == 9 || this.$store.getters.xt_user.template_info.template_id == 20 || this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 22  || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 24 || this.$store.getters.xt_user.template_info.template_id == 26 || this.$store.getters.xt_user.template_info.template_id == 28  || this.$store.getters.xt_user.template_info.template_id == 27 || this.$store.getters.xt_user.template_info.template_id == 29 || this.$store.getters.xt_user.template_info.template_id == 30 || this.$store.getters.xt_user.template_info.template_id == 31 || this.$store.getters.xt_user.template_info.template_id == 32 || this.$store.getters.xt_user.template_info.template_id == 34 || this.$store.getters.xt_user.template_info.template_id == 38 ||  this.$store.getters.xt_user.template_info.template_id == 40 ||  this.$store.getters.xt_user.template_info.template_id == 43 ||  this.$store.getters.xt_user.template_info.template_id == 45 || this.$store.getters.xt_user.template_info.org_id == 9555 )">
90
+                            v-if="isShows('目标超滤量') && (this.$store.getters.xt_user.template_info.template_id == 17 || this.$store.getters.xt_user.template_info.template_id == 9 || this.$store.getters.xt_user.template_info.template_id == 20 || this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 22  || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 24 || this.$store.getters.xt_user.template_info.template_id == 26 || this.$store.getters.xt_user.template_info.template_id == 28  || this.$store.getters.xt_user.template_info.template_id == 27 || this.$store.getters.xt_user.template_info.template_id == 29 || this.$store.getters.xt_user.template_info.template_id == 30 || this.$store.getters.xt_user.template_info.template_id == 31 || this.$store.getters.xt_user.template_info.template_id == 32 || this.$store.getters.xt_user.template_info.template_id == 34 || this.$store.getters.xt_user.template_info.template_id == 38 ||  this.$store.getters.xt_user.template_info.template_id == 40 ||  this.$store.getters.xt_user.template_info.template_id == 43 ||  this.$store.getters.xt_user.template_info.template_id == 45  ||  this.$store.getters.xt_user.template_info.template_id == 46  || this.$store.getters.xt_user.template_info.org_id == 9555 )">
91 91
                         <el-form-item label="目标超滤量(ml):">
92 92
                             <el-input
93 93
                                     type="number"
@@ -98,7 +98,7 @@
98 98
 
99 99
 
100 100
                     <el-col :span="8"
101
-                            v-if="isShows('目标超滤量')  && this.$store.getters.xt_user.template_info.template_id != 17 && this.$store.getters.xt_user.template_info.template_id != 9 && this.$store.getters.xt_user.template_info.template_id != 20 && this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 22 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 24 && this.$store.getters.xt_user.template_info.template_id != 26 && this.$store.getters.xt_user.template_info.template_id != 28 && this.$store.getters.xt_user.template_info.template_id != 27 && this.$store.getters.xt_user.template_info.template_id != 29 && this.$store.getters.xt_user.template_info.template_id != 30 && this.$store.getters.xt_user.template_info.template_id != 31 && this.$store.getters.xt_user.template_info.template_id != 32 && this.$store.getters.xt_user.template_info.template_id != 34 && this.$store.getters.xt_user.template_info.template_id != 38 &&  this.$store.getters.xt_user.template_info.template_id != 40 &&  this.$store.getters.xt_user.template_info.template_id != 43 &&  this.$store.getters.xt_user.template_info.template_id != 45 && this.$store.getters.xt_user.template_info.org_id != 9555 ">
101
+                            v-if="isShows('目标超滤量')  && this.$store.getters.xt_user.template_info.template_id != 17 && this.$store.getters.xt_user.template_info.template_id != 9 && this.$store.getters.xt_user.template_info.template_id != 20 && this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 22 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 24 && this.$store.getters.xt_user.template_info.template_id != 26 && this.$store.getters.xt_user.template_info.template_id != 28 && this.$store.getters.xt_user.template_info.template_id != 27 && this.$store.getters.xt_user.template_info.template_id != 29 && this.$store.getters.xt_user.template_info.template_id != 30 && this.$store.getters.xt_user.template_info.template_id != 31 && this.$store.getters.xt_user.template_info.template_id != 32 && this.$store.getters.xt_user.template_info.template_id != 34 && this.$store.getters.xt_user.template_info.template_id != 38 &&  this.$store.getters.xt_user.template_info.template_id != 40 &&  this.$store.getters.xt_user.template_info.template_id != 43 &&  this.$store.getters.xt_user.template_info.template_id != 45 &&  this.$store.getters.xt_user.template_info.template_id != 46   && this.$store.getters.xt_user.template_info.org_id != 9555 ">
102 102
                         <el-form-item label="目标超滤量(L):">
103 103
                             <el-input
104 104
                                     type="number"
@@ -369,7 +369,7 @@
369 369
 
370 370
 
371 371
                     <el-col :span="8"
372
-                            v-if="isShows('置换量') && (this.$store.getters.xt_user.template_info.template_id == 20 || this.$store.getters.xt_user.template_info.template_id == 28 || this.$store.getters.xt_user.template_info.template_id == 29)"
372
+                            v-if="isShows('置换量') && (this.$store.getters.xt_user.template_info.template_id == 20 || this.$store.getters.xt_user.template_info.template_id == 28 || this.$store.getters.xt_user.template_info.template_id == 29 || this.$store.getters.xt_user.template_info.template_id == 46)"
373 373
                             v-show="zhiShow">
374 374
                         <el-form-item label="置换量(ml):">
375 375
                             <el-input
@@ -379,7 +379,7 @@
379 379
                         </el-form-item>
380 380
                     </el-col>
381 381
                     <el-col :span="8"
382
-                            v-if="isShows('置换量') && this.$store.getters.xt_user.template_info.template_id != 20 && this.$store.getters.xt_user.template_info.template_id != 28 && this.$store.getters.xt_user.template_info.template_id != 29 && this.$store.getters.xt_user.template_info.template_id != 40"
382
+                            v-if="isShows('置换量') && this.$store.getters.xt_user.template_info.template_id != 20 && this.$store.getters.xt_user.template_info.template_id != 28 && this.$store.getters.xt_user.template_info.template_id != 29 && this.$store.getters.xt_user.template_info.template_id != 40 && this.$store.getters.xt_user.template_info.template_id != 46"
383 383
                             v-show="zhiShow">
384 384
                         <el-form-item label="置换量(L):">
385 385
                             <el-input

文件差异内容过多而无法显示
+ 1362 - 566
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue


+ 8 - 8
src/xt_pages/dialysis/details/dialysisMonitoring.vue 查看文件

@@ -14,17 +14,17 @@
14 14
           <th width="76px">静脉压/动脉压({{monitores[0]&&monitores[0]['venous_pressure_type'] == 2 ? 'kpa' : 'mmHg'}})</th>
15 15
           <th v-if="isShow('血流量')" width="92px">血流量(ml/min)</th>
16 16
           <th v-if="isShow('跨膜压')" width="76px">跨膜压({{monitores[0]&&monitores[0]['transmembrane_pressure_type'] == 2 ? 'kpa' : 'mmHg'}})</th>
17
-          <th v-if=" isShow('超滤量') &&(template_id == 6 || template_id == 9 || template_id == 10 || template_id == 11 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 27 || template_id == 28 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 32 || template_id == 34 || template_id == 35 || template_id == 36 || template_id == 38 || template_id == 39 || template_id == 40  || template_id == 41 || template_id == 43 || template_id == 44 || this.$store.getters.xt_user.template_info.org_id == 9555)" width="76px" > 超滤量(ml)</th>
18
-          <th v-if=" isShow('超滤量') && template_id != 6 && template_id != 9 && template_id != 10 && template_id != 11 && template_id != 13 && template_id != 17 && template_id != 18 && template_id != 19 && template_id != 20 && template_id != 21 && template_id != 22 && template_id != 23 && template_id != 24 && template_id != 26 && template_id !=27 && template_id!=28 && template_id!=29 && template_id!=30 && template_id!=31 && template_id!=32 && template_id!=34 && template_id!=35 && template_id!=36 && template_id!=38 && template_id != 39 && template_id != 40  && template_id != 41 && template_id != 43 && template_id != 44  && this.$store.getters.xt_user.template_info.org_id != 9555"  width="76px"> 超滤量(L) </th>
19
-          <th v-if="isShow('超滤率') && (template_id ==6 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 34 || template_id == 35 || template_id == 38 || template_id == 41 || template_id == 43 || template_id == 44)" width="50px"> 超滤率 <br />(ml/h) </th>
20
-          <th v-if="isShow('超滤率') && template_id !=6 && template_id !=10 && template_id !=11 && template_id !=12 && template_id !=13 && template_id !=17 && template_id !=18 && template_id !=19 && template_id !=20 && template_id !=21 && template_id !=22 && template_id !=23 && template_id !=24 && template_id !=26 && template_id !=29 && template_id !=30 && template_id !=31 && template_id !=34 && template_id !=35 && template_id !=38  && template_id !=41 && template_id !=43 && template_id !=44" width="50px"> 超滤率 <br />(L/h) </th>
17
+          <th v-if=" isShow('超滤量') &&(template_id == 6 || template_id == 9 || template_id == 10 || template_id == 11 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 27 || template_id == 28 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 32 || template_id == 34 || template_id == 35 || template_id == 36 || template_id == 38 || template_id == 39 || template_id == 40  || template_id == 41 || template_id == 43 || template_id == 44 || template_id == 46 || template_id == 47 || this.$store.getters.xt_user.template_info.org_id == 9555)" width="76px" > 超滤量(ml)</th>
18
+          <th v-if=" isShow('超滤量') && template_id != 6 && template_id != 9 && template_id != 10 && template_id != 11 && template_id != 13 && template_id != 17 && template_id != 18 && template_id != 19 && template_id != 20 && template_id != 21 && template_id != 22 && template_id != 23 && template_id != 24 && template_id != 26 && template_id !=27 && template_id!=28 && template_id!=29 && template_id!=30 && template_id!=31 && template_id!=32 && template_id!=34 && template_id!=35 && template_id!=36 && template_id!=38 && template_id != 39 && template_id != 40  && template_id != 41 && template_id != 43 && template_id != 44 && template_id != 46  && template_id != 47  && this.$store.getters.xt_user.template_info.org_id != 9555"  width="76px"> 超滤量(L) </th>
19
+          <th v-if="isShow('超滤率') && (template_id ==6 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 34 || template_id == 35 || template_id == 38 || template_id == 41 || template_id == 43 || template_id == 44 || template_id == 46 || template_id == 47)" width="50px"> 超滤率 <br />(ml/h) </th>
20
+          <th v-if="isShow('超滤率') && template_id !=6 && template_id !=10 && template_id !=11 && template_id !=12 && template_id !=13 && template_id !=17 && template_id !=18 && template_id !=19 && template_id !=20 && template_id !=21 && template_id !=22 && template_id !=23 && template_id !=24 && template_id !=26 && template_id !=29 && template_id !=30 && template_id !=31 && template_id !=34 && template_id !=35 && template_id !=38  && template_id !=41 && template_id !=43 && template_id !=44 && template_id !=46 && template_id !=47" width="50px"> 超滤率 <br />(L/h) </th>
21 21
           <th v-if="isShow('钠浓度')" width="92px">钠浓度(mmol/L)</th>
22 22
           <th v-if="isShow('透析液温度')" width="92px">透析液温度(℃)</th>
23
-          <th v-if=" isShow('置换率') && (template_id == 6 || template_id == 10 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29) " width="92px" > 置换率(ml/min) </th>
24
-          <th v-if=" isShow('置换率') && template_id != 6 && template_id != 10 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29" width="92px" > 置换率(L/h)  </th>
23
+          <th v-if=" isShow('置换率') && (template_id == 6 || template_id == 10 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29 || template_id == 46 || template_id == 47) " width="92px" > 置换率(ml/min) </th>
24
+          <th v-if=" isShow('置换率') && template_id != 6 && template_id != 10 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29 && template_id != 46 && template_id != 47" width="92px" > 置换率(L/h)  </th>
25 25
           <th v-if=" isShow('置换量') && (template_id == 43)" width="92px"> 置换量(ml/h)  </th>
26
-          <th v-if=" isShow('置换量') && ((template_id == 6 && org_id != 9919 && org_id !=10191) || org_id == 9779 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29)" width="92px"  > 置换量(ml)  </th>
27
-          <th v-if=" isShow('置换量') && ((template_id != 6 || org_id == 9919 || org_id == 10191) && org_id != 9779 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29)" width="92px" > 置换量(L) </th>
26
+          <th v-if=" isShow('置换量') && ((template_id == 6 && org_id != 9919 && org_id !=10191) || org_id == 9779 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29 || template_id == 46 || template_id == 47)" width="92px"  > 置换量(ml)  </th>
27
+          <th v-if=" isShow('置换量') && ((template_id != 6 || org_id == 9919 || org_id == 10191) && org_id != 9779 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29 && template_id != 46 && template_id != 47)" width="92px" > 置换量(L) </th>
28 28
           <th v-if=" isShow('SpO₂') && template_id != 6 && template_id != 10 && template_id != 11  " width="92px" > SpO₂(%) </th>
29 29
           <th v-if="isShow('电导度')" width="92px">电导度(mS/m)</th>
30 30
           <th v-if="isShow('置换液流量') && template_id != 27" width="92px">置换液流量(ml/h)</th>

+ 4 - 3
src/xt_pages/dialysis/dialysisPrintOrder.vue 查看文件

@@ -978,11 +978,11 @@
978 978
             v-if="org_template_info.template_id == 44"
979 979
           >
980 980
           </DialysisPrintOrderFortyFour>
981
-          <DialysisPrintOrderFortySeven
981
+          <DialysisPrintOrderFortyFive
982 982
             v-bind:childResponse="childResponse"
983 983
             v-if="org_template_info.template_id == 45"
984 984
           >
985
-          </DialysisPrintOrderFortySeven>
985
+          </DialysisPrintOrderFortyFive>
986 986
 
987 987
           <DialysisPrintOrderFortySix
988 988
             v-bind:childResponse="childResponse"
@@ -1269,7 +1269,8 @@ export default {
1269 1269
       const style =
1270 1270
         '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
1271 1271
       const style2 =
1272
-        '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1050px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}.table-box1 {border: 1px solid #000;width: 100%;line-height: 30px;font-size: 14px;border-collapse: collapse;}.table-box1 tr {border-bottom: 1px solid #000;} .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}';
1272
+      // 防止分页错位问题:table设置border: none;.tr设置page-break-inside:avoid; // 防止table数据太多,tr分页错乱 td设置border: 1px solid #000;// 防止部分分页的tr边框线没有
1273
+        '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .print-table{border: none} .print-table tr{page-break-inside:avoid;} .print-table tr td{border: 1px solid #000;}.check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1050px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}.table-box1 {border: 1px solid #000;width: 100%;line-height: 30px;font-size: 14px;border-collapse: collapse;}.table-box1 tr {border-bottom: 1px solid #000;} .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}';
1273 1274
       const style3 =
1274 1275
         '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:16px;border-color: #000;}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #000;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}.row {font-size: 16px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line {display: inline-block;border-bottom: 1px solid #000;text-align: center;white-space: nowrap; width: 50%;}';
1275 1276
       // const style3 =

文件差异内容过多而无法显示
+ 2311 - 891
src/xt_pages/dialysis/template/DialysisPrintOrderFortySeven.vue


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

@@ -1610,7 +1610,7 @@ export default {
1610 1610
           response.data.data.dialysisOrder === null
1611 1611
             ? null
1612 1612
             : response.data.data.dialysisOrder
1613
-
1613
+        console.log("上机233232323232",this.dialysisOrder)
1614 1614
         if (this.operators.length > 0) {
1615 1615
           var operatorsLen = this.operators.length
1616 1616
           for (var index = 0; index < operatorsLen; index++) {

+ 66 - 37
src/xt_pages/hospitalStation/chargeDetailManagement.vue 查看文件

@@ -95,6 +95,15 @@
95 95
             >撤销明细
96 96
             </el-button>
97 97
 
98
+
99
+
100
+            <el-button
101
+                v-if="( this.radio == 2 &&this.hisPatientInfo.balance_accounts_type == 2  && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
102
+                size="small" @click="open(2)" type="primary"
103
+            >撤销明细
104
+            </el-button>
105
+
106
+
98 107
           </div>
99 108
           <div v-if="activeName == 'second'">
100 109
 
@@ -331,7 +340,7 @@ import charged from './components/charged'
331 340
 import medicalInsuranceRefund from './components/medicalInsuranceRefund'
332 341
 import additionalCharges from './components/additionalCharges'
333 342
 import { getHisHospitalDetailInfo, getHisHospitalDetailList, getMonthHisHospitalDetailInfo } from '@/api/his/his'
334
-import { upLoadChargeInfo } from '@/api/his/his_hospital'
343
+import { upLoadChargeInfo,refundDetail } from '@/api/his/his_hospital'
335 344
 
336 345
 import { uParseTime } from '@/utils/tools'
337 346
 
@@ -762,43 +771,65 @@ export default {
762 771
             cancelButtonText: '取 消',
763 772
             type: 'warning'
764 773
           }).then(() => {
765
-
766
-            let params = {
767
-              'settle_accounts_type': settle_accounts_type,
768
-              'patient_id': that.hisPatientInfo.patient_id,
769
-              'his_patient_id': that.hisPatientInfo.id,
770
-              'record_time': that.record_date,
771
-              'admin_user_id': that.$store.getters.xt_user.user.id
772
-            }
773
-            axios.get('http://127.0.0.1:9532/zh/api/refunddetail', {
774
-              params: params
775
-            })
776
-                .then(function(response) {
777
-                  if (response.data.state == 0) {
778
-                    that.$message.error(response.data.msg)
779
-                    that.loadingtwo = false
780
-                    return false
781
-                  } else {
782
-                    if (response.data.data.failed_code == -10) {
783
-                      // that.$message.error(response.data.data.msg)
784
-                      that.$confirm(response.data.data.msg, '医保错误信息', {
785
-                        confirmButtonText: '确 定',
786
-                        type: 'warning'
787
-                      }).then(() => {
788
-
789
-                      }).catch(() => {
790
-                      })
774
+            if (that.hisPatientInfo.balance_accounts_type != 2){
775
+              let params = {
776
+                'settle_accounts_type': settle_accounts_type,
777
+                'patient_id': that.hisPatientInfo.patient_id,
778
+                'his_patient_id': that.hisPatientInfo.id,
779
+                'record_time': that.record_date,
780
+                'admin_user_id': that.$store.getters.xt_user.user.id
781
+              }
782
+              axios.get('http://127.0.0.1:9532/zh/api/refunddetail', {
783
+                params: params
784
+              })
785
+                  .then(function(response) {
786
+                    if (response.data.state == 0) {
787
+                      that.$message.error(response.data.msg)
788
+                      that.loadingtwo = false
789
+                      return false
791 790
                     } else {
792
-                      that.$message.success('撤销明细成功')
793
-                      that.radio = 1
794
-                      that.getPatientList()
795
-                    }
791
+                      if (response.data.data.failed_code == -10) {
792
+                        // that.$message.error(response.data.data.msg)
793
+                        that.$confirm(response.data.data.msg, '医保错误信息', {
794
+                          confirmButtonText: '确 定',
795
+                          type: 'warning'
796
+                        }).then(() => {
797
+
798
+                        }).catch(() => {
799
+                        })
800
+                      } else {
801
+                        that.$message.success('撤销明细成功')
802
+                        that.radio = 1
803
+                        that.getPatientList()
804
+                      }
796 805
 
797
-                  }
798
-                })
799
-                .catch(function(error) {
800
-                })
806
+                    }
807
+                  })
808
+                  .catch(function(error) {
809
+                  })
810
+
811
+
812
+            }else{
813
+              let params = {
814
+                'settle_accounts_type': settle_accounts_type,
815
+                'patient_id': that.hisPatientInfo.patient_id,
816
+                'his_patient_id': that.hisPatientInfo.id,
817
+                'record_time': that.record_date,
818
+                'admin_user_id': that.$store.getters.xt_user.user.id
819
+              }
820
+              refundDetail(params).then(response => {
821
+                if (response.data.state == 0) {
822
+                  this.loading = false
823
+                  this.$message.error(response.data.msg)
824
+                  return false
825
+                } else {
826
+                  that.$message.success('撤销明细成功')
827
+                  that.radio = 1
828
+                  that.getPatientList()
829
+                }
830
+              })
801 831
 
832
+            }
802 833
           }).catch(() => {
803 834
           })
804 835
         } else {
@@ -927,8 +958,6 @@ export default {
927 958
               that.changePatientInfo()
928 959
             }
929 960
           })
930
-
931
-
932 961
         }
933 962
       }
934 963
     }, changePatientInfo() {

+ 38 - 16
src/xt_pages/hospitalStation/components/chargeDialog.vue 查看文件

@@ -20,6 +20,16 @@
20 20
         <el-input type="number" v-model="form.private_price" :disabled="true"></el-input>
21 21
       </el-form-item>
22 22
 
23
+      <el-form-item label="个账支出:" prop="age" :validate-event="is_Name" style="width:33%;">
24
+        <el-input type="number" v-model="form.acct_pay" :disabled="true"></el-input>
25
+      </el-form-item>
26
+
27
+
28
+      <el-form-item label="个人现金支出:" prop="age" :validate-event="is_Name" style="width:33%;">
29
+        <el-input type="number" v-model="form.psn_pay" :disabled="true"></el-input>
30
+      </el-form-item>
31
+
32
+
23 33
 
24 34
       <el-form-item label="支付方式:" style="width:100%;">
25 35
         <!-- <el-select v-model="form.pay_way" placeholder="请选择">
@@ -82,8 +92,8 @@
82 92
     </el-form>
83 93
 
84 94
     <span slot="footer" class="dialog-footer">
85
-    <el-button v-loading="loadingtwo" @click="cancel('formValue')">取 消</el-button>
86
-    <el-button v-loading="loadingtwo" type="primary" @click="confirm('formValue')">确 定</el-button>
95
+    <el-button @click="cancel('formValue')">取 消</el-button>
96
+    <el-button type="primary" @click="confirm('formValue')">确 定</el-button>
87 97
   </span>
88 98
   </el-dialog>
89 99
 
@@ -111,7 +121,10 @@
111 121
           found_price:'',
112 122
           total:0,
113 123
           fapiao_code:"",
114
-          fapiao_number:""
124
+          fapiao_number:"",
125
+          order:null,
126
+          acct_pay:'',
127
+          psn_pay:'',
115 128
 
116 129
 
117 130
         },
@@ -140,7 +153,9 @@
140 153
           reality_price:'',
141 154
           found_price:'',
142 155
           fapiao_code:"",
143
-          fapiao_number:""
156
+          fapiao_number:"",
157
+          acct_pay:"",
158
+          psn_pay:"",
144 159
         },
145 160
 
146 161
       }
@@ -167,19 +182,26 @@
167 182
     },
168 183
     methods: {
169 184
       show: function (total,order) {
170
-        this.total = total;
171
-        this.form.private_price = total;
172
-        this.form.pay_price = total;
173
-        this.form.total = total + this.form.medical_insurance_price;
174
-        this.form.discount_price = 0.0;
175
-        this.form.preferential_price = 0.0;
176
-        this.form.fapiao_code ="";
177
-        this.form.fapiao_number = "";
178
-        if(order&&order.id > 0){
179
-          this.total = order.medfee_sumamt;
180
-          this.form.private_price = order.medfee_sumamt;
181
-          this.form.pay_price = order.medfee_sumamt;
185
+        this.form.total = total
186
+        this.form.private_price = total
187
+        this.form.pay_price = total
188
+        this.form.total = total + this.form.medical_insurance_price
189
+        this.form.discount_price = 0.0
190
+        this.form.preferential_price = 0.0
191
+
192
+        this.form.fapiao_code =""
193
+        this.form.fapiao_number = ""
194
+        this.order = order
195
+
196
+        if(this.order && this.order.id > 0){
197
+          this.form.acct_pay = this.order.acct_pay
198
+          this.form.psn_pay = this.order.psn_cash_pay
199
+          this.form.total = this.order.medfee_sumamt
200
+          this.form.pay_price = this.order.medfee_sumamt
201
+          this.form.medical_insurance_price = this.order.fund_pay_sumamt
202
+          this.form.private_price =  this.order.psn_part_amt
182 203
         }
204
+
183 205
         this.visibility = true
184 206
 
185 207
       }, hide: function () {

+ 71 - 28
src/xt_pages/hospitalStation/components/deskPrescription.vue 查看文件

@@ -225,7 +225,6 @@
225 225
             <span style="color:red;"
226 226
                   v-if="dayorMonth == 'month'">{{ getMonthTotal() ? getMonthTotal() : '' }}元</span>
227 227
 
228
-
229 228
           </div>
230 229
           <span :class="order_status == '未收费' ? 'statusRed' : ''">{{ order_status }}</span>
231 230
 
@@ -295,16 +294,24 @@
295 294
                               v-if="scope.row.count%scope.row.min_number>0"> {{ scope.row.count % scope.row.min_number }}{{ scope.row.min_unit }}</span>
296 295
                         </span>
297 296
                         <span v-else> {{ scope.row.total }}{{ scope.row.total ? scope.row.min_unit : '' }}</span> -->
298
-                       
297
+
299 298
                           <span v-if="scope.row.sum_count/scope.row.min_number>0">{{ Math.floor(scope.row.sum_count / scope.row.min_number) }}{{ scope.row.max_unit }}</span>
300 299
                           <span v-if="scope.row.sum_count%scope.row.min_number>0"> {{ scope.row.sum_count % scope.row.min_number }}{{ scope.row.min_unit }}</span>
301
-                      
300
+
301
+                                          <span
302
+                                              v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10188 || org_id == 10245 || org_id == 9919 || org_id ==10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id == 9956 || org_id == 10191 || org_id == 10278 || org_id == 10217">
303
+                                              <span
304
+                                                  v-if="scope.row.count/scope.row.min_number>0">{{ Math.floor(scope.row.count / scope.row.min_number) }}{{ scope.row.max_unit }}</span>
305
+                                              <span
306
+                                                  v-if="scope.row.count%scope.row.min_number>0"> {{ scope.row.count % scope.row.min_number }}{{ scope.row.min_unit }}</span>
307
+                                            </span>
308
+                        <span v-else> {{ scope.row.total }}{{ scope.row.total ? scope.row.min_unit : '' }}</span>
302 309
                       </template>
303 310
                     </el-table-column>
304 311
                     <el-table-column label="单价" width="40">
305 312
                       <template slot-scope="scope">
306
-                        <span v-if="scope.row.batch_retai_price >0">{{scope.row.batch_retai_price}}</span> 
307
-                        <span v-else>{{ scope.row.min_price }}</span> 
313
+                        <span v-if="scope.row.batch_retai_price >0">{{scope.row.batch_retai_price}}</span>
314
+                        <span v-else>{{ scope.row.min_price }}</span>
308 315
                       </template>
309 316
                     </el-table-column>
310 317
                   </el-table>
@@ -393,6 +400,11 @@
393 400
                     </el-table-column>
394 401
                     <el-table-column label="库存" width="40">
395 402
                       <template slot-scope="scope">
403
+                                                <span
404
+                                                    v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id ==10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id == 9956 || org_id == 10191 || org_id == 10278 || org_id == 10217">
405
+                                                    {{ scope.row.stock_count }}
406
+                                                </span>
407
+                        <span v-else> {{ scope.row.total }}</span>
396 408
                         <!-- <span
397 409
                             v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id ==10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id == 9956 || org_id == 10191 || org_id == 10278">
398 410
                             {{ scope.row.stock_count }}
@@ -531,6 +543,7 @@ export default {
531 543
   },
532 544
   data() {
533 545
     return {
546
+      settle_total:0,
534 547
       start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
535 548
       end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
536 549
       register: [
@@ -1063,6 +1076,7 @@ export default {
1063 1076
       getDayOrMonthHisPrescription(params).then(response => {
1064 1077
         if (response.data.state == 1) {
1065 1078
           this.month_prescriptions = []
1079
+          this.settle_total = response.data.data.settle_total
1066 1080
 
1067 1081
           if (val == this.end_time) {
1068 1082
             var day_prescription = response.data.data.day_prescription
@@ -1186,6 +1200,8 @@ export default {
1186 1200
       getDayOrMonthHisPrescription(params).then(response => {
1187 1201
         if (response.data.state == 1) {
1188 1202
           this.month_prescriptions = []
1203
+          this.settle_total = response.data.data.settle_total
1204
+
1189 1205
           if (val == this.start_time) {
1190 1206
             var day_prescription = response.data.data.day_prescription
1191 1207
             // this.month_prescriptions = day_prescription
@@ -1553,6 +1569,8 @@ export default {
1553 1569
     }, searchProjectAction() {
1554 1570
       console.log('~~~~')
1555 1571
       console.log(this.allProject)
1572
+      console.log(this.allProject)
1573
+
1556 1574
 
1557 1575
       if (this.search_project_keyword.length == 0) {
1558 1576
         this.tabProject = this.allProject
@@ -1693,27 +1711,27 @@ export default {
1693 1711
 
1694 1712
       return total.toFixed(2)
1695 1713
     }, getMonthTotal() {
1696
-      var total = 0
1697
-      for (let i = 0; i < this.month_prescriptions.length; i++) {
1698
-        if (this.month_prescriptions[i].advices != null) {
1699
-          for (let a = 0; a < this.month_prescriptions[i].advices.length; a++) {
1700
-            total = total.toFixed(2) + (this.month_prescriptions[i].advices[a].retail_price * this.month_prescriptions[i].advices[a].prescribing_number).toFixed(2)
1701
-          }
1702
-        }
1703
-        if (this.month_prescriptions[i].project != null) {
1704
-          for (let b = 0; b < this.month_prescriptions[i].project.length; b++) {
1705
-            total = total.toFixed(2) + (this.month_prescriptions[i].project[b].price * this.month_prescriptions[i].project[b].total).toFixed(2)
1706
-          }
1707
-        }
1708
-
1709
-        if (this.month_prescriptions[i].addition != null) {
1710
-          for (let b = 0; b < this.month_prescriptions[i].addition.length; b++) {
1711
-            total = total + this.month_prescriptions[i].addition[b].price * this.month_prescriptions[i].addition[b].count
1712
-          }
1713
-        }
1714
-      }
1715
-
1716
-      return total.toFixed(2)
1714
+      // var total = 0
1715
+      // for (let i = 0; i < this.month_prescriptions.length; i++) {
1716
+      //   if (this.month_prescriptions[i].advices != null) {
1717
+      //     for (let a = 0; a < this.month_prescriptions[i].advices.length; a++) {
1718
+      //       total = total + (this.month_prescriptions[i].advices[a].retail_price* this.month_prescriptions[i].advices[a].prescribing_number)
1719
+      //     }
1720
+      //   }
1721
+      //   if (this.month_prescriptions[i].project != null) {
1722
+      //     for (let b = 0; b < this.month_prescriptions[i].project.length; b++) {
1723
+      //       total = total+ (this.month_prescriptions[i].project[b].price * this.month_prescriptions[i].project[b].total)
1724
+      //     }
1725
+      //   }
1726
+      //
1727
+      //   if (this.month_prescriptions[i].addition != null) {
1728
+      //     for (let b = 0; b < this.month_prescriptions[i].addition.length; b++) {
1729
+      //       total = total + this.month_prescriptions[i].addition[b].price * this.month_prescriptions[i].addition[b].count
1730
+      //     }
1731
+      //   }
1732
+      // }
1733
+      console.log("~~~~~~"+this.settle_total)
1734
+      return this.settle_total
1717 1735
     },
1718 1736
     createFilter(queryString) {
1719 1737
       return (restaurant) => {
@@ -2030,7 +2048,9 @@ export default {
2030 2048
       }
2031 2049
 
2032 2050
     },
2033
-    setMonthData(info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
2051
+    setMonthData(info, admin_info, doctors, department, hisPatientInfo, month_data, last_info,settle_total) {
2052
+
2053
+
2034 2054
       this.curMonthPrescriptions = {}
2035 2055
       this.curPrescriptions = {}
2036 2056
 
@@ -2134,6 +2154,8 @@ export default {
2134 2154
         this.curMonthPrescriptions = month_data[1]
2135 2155
       }
2136 2156
 
2157
+      this.settle_total = settle_total
2158
+
2137 2159
     },
2138 2160
 
2139 2161
     moreState(tab, event) {
@@ -2676,6 +2698,8 @@ export default {
2676 2698
     },
2677 2699
     selectDrugs(selection, row) {
2678 2700
         if (row.sum_count <= 0) {
2701
+      if (this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id == 3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10088 || this.org_id == 10245 || this.org_id == 9919 || this.org_id == 10106 || this.org_id == 9504 || this.org_id == 10215 || this.org_id == 10088 || this.org_id == 10188 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 9956 || this.org_id == 10191 || this.org_id == 10278 || this.org_id == 10217) {
2702
+        if (row.count <= 0) {
2679 2703
           if (selection) {
2680 2704
             selection.forEach(row => {
2681 2705
               if (row.count <= 0) {
@@ -2981,11 +3005,23 @@ export default {
2981 3005
               this.$refs.tables.toggleRowSelection(row)
2982 3006
             }else{
2983 3007
                this.$refs.tables.clearSelection()
3008
+      console.log('row', row)
3009
+      if (this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id == 3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10088 || this.org_id == 10245 || this.org_id == 9919 || this.org_id == 10106 || this.org_id == 9504 || this.org_id == 10215 || this.org_id == 10088 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 10188  || this.org_id == 9956 || this.org_id == 10191 || this.org_id == 10278 || this.org_id == 10217) {
3010
+        if (row.stock_count <= 0) {
3011
+          if (row.type == 3) {
3012
+            if (selection) {
3013
+              selection.forEach(row => {
3014
+                if (row.stock_count <= 0) {
3015
+                  this.$refs.tables.toggleRowSelection(row)
3016
+                }
3017
+              })
3018
+            } else {
3019
+              this.$refs.tables.clearSelection()
2984 3020
             }
2985 3021
              this.$message.error(row.project_name + '库存不足')
2986 3022
              return
2987 3023
           })
2988
-       }  
3024
+       }
2989 3025
       }
2990 3026
       // if (this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id == 3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10088 || this.org_id == 10245 || this.org_id == 9919 || this.org_id == 10106 || this.org_id == 9504 || this.org_id == 10215 || this.org_id == 10088 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 10188  || this.org_id == 9956 || this.org_id == 10191 || this.org_id == 10278) {
2991 3027
       //   if (row.stock_count <= 0) {
@@ -3057,6 +3093,10 @@ export default {
3057 3093
 
3058 3094
           for (let i = 0; i < good_info.length; i++) {
3059 3095
             good_info[i].stock_count = 0
3096
+            if (good_info[i].good_stock_in&&good_info[i].good_stock_in.length > 0) {
3097
+              for (let j = 0; j < good_info[i].good_stock_in.length; j++) {
3098
+                good_info[i].stock_count += good_info[i].good_stock_in[j].stock_count
3099
+              }
3060 3100
             if(good_info[i].batch_retai_price > 0){
3061 3101
               good_info[i].packing_price = 0
3062 3102
               good_info[i].packing_price = good_info[i].batch_retai_price
@@ -3086,6 +3126,9 @@ export default {
3086 3126
 
3087 3127
           this.allProject = this.tabProject
3088 3128
 
3129
+
3130
+
3131
+
3089 3132
         }
3090 3133
       })
3091 3134
 

文件差异内容过多而无法显示
+ 1110 - 0
src/xt_pages/hospitalStation/components/hospitalRegisterDialog.vue


+ 44 - 46
src/xt_pages/hospitalStation/components/settlePrescriptionTable.vue 查看文件

@@ -18,31 +18,26 @@
18 18
         width="40"
19 19
         label="序号"
20 20
       ></el-table-column>
21
-      <el-table-column align="center" prop="name" label="名称">
21
+      <el-table-column align="center" prop="name" width="400" label="名称">
22 22
         <template slot-scope="scope"
23 23
           ><span :title="scope.row.drug_name">{{
24 24
             scope.row.drug_name
25 25
           }}</span></template
26 26
         >
27 27
       </el-table-column>
28
-
29
-      <el-table-column align="center" prop="name" width="90" label="单次用量">
28
+      <el-table-column align="center" prop="name" width="80" label="单次用量">
30 29
         <template slot-scope="scope">
31
-          <!--<el-input v-model="scope.row.single_dose" readonly style="width:65%;"></el-input>-->
32
-          <div>
33
-            {{ scope.row.single_dose }}&nbsp;&nbsp;{{
34
-              scope.row.single_dose_unit
35
-            }}
36
-          </div>
30
+          <!--<el-input v-model="scope.row.delivery_way" readonly></el-input>-->
31
+          <div>{{ scope.row.single_dose }}{{ scope.row.single_dose_unit }}</div>
37 32
         </template>
38 33
       </el-table-column>
39
-      <el-table-column align="center" prop="name" width="100" label="用法">
34
+      <el-table-column align="center" prop="name" width="80" label="用法">
40 35
         <template slot-scope="scope">
41 36
           <!--<el-input v-model="scope.row.delivery_way" readonly></el-input>-->
42 37
           <div>{{ scope.row.delivery_way }}</div>
43 38
         </template>
44 39
       </el-table-column>
45
-      <el-table-column align="center" prop="name" width="100" label="频率">
40
+      <el-table-column align="center" prop="name" width="80" label="频率">
46 41
         <template slot-scope="scope">
47 42
           <div>{{ scope.row.execution_frequency }}</div>
48 43
 
@@ -50,28 +45,25 @@
50 45
         </template>
51 46
       </el-table-column>
52 47
 
53
-      <el-table-column align="center" prop="day" width="50" label="天数">
48
+      <el-table-column align="center" prop="day" width="80" label="天数">
54 49
         <template slot-scope="scope">{{ scope.row.day }}天</template>
55 50
       </el-table-column>
56 51
 
57
-      <el-table-column align="center" prop="name" width="100" label="总量">
58
-        <template slot-scope="scope">
59
-          <!--<el-input v-model="scope.row.prescribing_number" style="width:60%" readonly placeholder=""></el-input>-->
60
-          <div>
61
-            {{ scope.row.prescribing_number }}&nbsp;&nbsp;{{
62
-              scope.row.prescribing_number_unit
63
-            }}
64
-          </div>
65
-        </template>
52
+      <el-table-column align="center" prop="name" width="80" label="总量">
53
+        <template slot-scope="scope"
54
+          >{{ scope.row.prescribing_number
55
+          }}{{ scope.row.prescribing_number_unit }}</template
56
+        >
66 57
       </el-table-column>
67
-      <el-table-column align="center" prop="name" width="60" label="单价">
58
+      <el-table-column align="center" prop="name" width="100" label="单价">
68 59
         <template slot-scope="scope">
69 60
           <div>{{ scope.row.retail_price }}元</div>
70 61
 
71 62
           <!--<el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>-->
72 63
         </template>
73 64
       </el-table-column>
74
-      <el-table-column align="center" prop="name" width="60" label="总价">
65
+
66
+      <el-table-column align="center" prop="name" width="100" label="总价">
75 67
         <template slot-scope="scope">
76 68
           <div>
77 69
             {{
@@ -85,13 +77,13 @@
85 77
         </template>
86 78
       </el-table-column>
87 79
 
88
-      <el-table-column align="center" prop="name" width="60" label="全自费金额">
80
+      <el-table-column align="center" prop="name" width="80" label="全自费金额">
89 81
         <template slot-scope="scope">
90 82
           <div>{{ scope.row.fulamt_ownpay_amt }}元</div>
91 83
         </template>
92 84
       </el-table-column>
93 85
 
94
-      <el-table-column align="center" prop="name" width="60" label="超限价金额">
86
+      <el-table-column align="center" prop="name" width="80" label="超限价金额">
95 87
         <template slot-scope="scope">
96 88
           <div>{{ scope.row.overlmt_amt }}元</div>
97 89
         </template>
@@ -100,7 +92,7 @@
100 92
       <el-table-column
101 93
         align="center"
102 94
         prop="name"
103
-        width="60"
95
+        width="80"
104 96
         label="先行自付金额"
105 97
       >
106 98
         <template slot-scope="scope">
@@ -111,7 +103,7 @@
111 103
       <el-table-column
112 104
         align="center"
113 105
         prop="name"
114
-        width="60"
106
+        width="70"
115 107
         label="符合正常范围金额"
116 108
       >
117 109
         <template slot-scope="scope">
@@ -119,7 +111,7 @@
119 111
         </template>
120 112
       </el-table-column>
121 113
 
122
-      <el-table-column align="center" prop="name" width="50" label="备注">
114
+      <el-table-column align="center" prop="name" width="60" label="备注">
123 115
         <template slot-scope="scope">
124 116
           <!--<el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder="" readonly></el-input>-->
125 117
           <div>{{ scope.row.remark }}</div>
@@ -144,7 +136,12 @@
144 136
         width="40"
145 137
         label="序号"
146 138
       ></el-table-column>
147
-      <el-table-column align="center" prop="project_name" label="名称">
139
+      <el-table-column
140
+        align="center"
141
+        prop="project_name"
142
+        width="400"
143
+        label="名称"
144
+      >
148 145
         <template slot-scope="scope">{{ scope.row.project_name }}</template>
149 146
       </el-table-column>
150 147
       <el-table-column
@@ -157,15 +154,17 @@
157 154
           getGroup(scope.row.statistical_classification)
158 155
         }}</template>
159 156
       </el-table-column>
157
+
160 158
       <el-table-column
161 159
         align="center"
162 160
         prop="single_dose"
163 161
         width="80"
164 162
         label="单次用量"
165 163
       >
166
-        <template slot-scope="scope"
167
-          >{{ scope.row.single_dose }}{{ scope.row.unit }}</template
168
-        >
164
+        <template slot-scope="scope">
165
+          <!--<el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>-->
166
+          {{ scope.row.single_dose }}{{ scope.row.unit }}
167
+        </template>
169 168
       </el-table-column>
170 169
       <el-table-column
171 170
         align="center"
@@ -192,7 +191,7 @@
192 191
       <el-table-column
193 192
         align="center"
194 193
         prop="number_days"
195
-        width="50"
194
+        width="80"
196 195
         label="天数"
197 196
       >
198 197
         <template slot-scope="scope">
@@ -200,36 +199,35 @@
200 199
           {{ scope.row.number_days }}天
201 200
         </template>
202 201
       </el-table-column>
203
-      <el-table-column align="center" prop="total" width="50" label="总量">
202
+
203
+      <el-table-column align="center" prop="total" width="80" label="总量">
204 204
         <template slot-scope="scope">
205
-          <div style="display: flex">
206
-            <!--<el-input v-model="scope.row.total" placeholder="" readonly></el-input>-->
207
-            {{ scope.row.total }} {{ scope.row.unit }}
208
-          </div>
205
+          <!--<el-input v-model="scope.row.total" placeholder="" readonly></el-input>-->
206
+          {{ scope.row.total }} {{ scope.row.unit }}
209 207
         </template>
210 208
       </el-table-column>
211
-      <el-table-column align="center" prop="name" width="50" label="单价">
209
+
210
+      <el-table-column align="center" prop="name" width="100" label="单价">
212 211
         <template slot-scope="scope">
213 212
           <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
214 213
           {{ scope.row.price }}元
215 214
         </template>
216 215
       </el-table-column>
217 216
 
218
-      <el-table-column align="center" prop="name" width="60" label="总价">
217
+       <el-table-column align="center" prop="name" width="100" label="总价">
219 218
         <template slot-scope="scope">
220
-          <div>{{ (scope.row.total * scope.row.price).toFixed(2) }}元</div>
221
-
222 219
           <!--<el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>-->
220
+          {{ (scope.row.total * scope.row.price).toFixed(2) }}元
223 221
         </template>
224 222
       </el-table-column>
225 223
 
226
-      <el-table-column align="center" prop="name" width="60" label="全自费金额">
224
+      <el-table-column align="center" prop="name" width="80" label="全自费金额">
227 225
         <template slot-scope="scope">
228 226
           <div>{{ scope.row.fulamt_ownpay_amt }}元</div>
229 227
         </template>
230 228
       </el-table-column>
231 229
 
232
-      <el-table-column align="center" prop="name" width="60" label="超限价金额">
230
+      <el-table-column align="center" prop="name" width="80" label="超限价金额">
233 231
         <template slot-scope="scope">
234 232
           <div>{{ scope.row.overlmt_amt }}元</div>
235 233
         </template>
@@ -238,7 +236,7 @@
238 236
       <el-table-column
239 237
         align="center"
240 238
         prop="name"
241
-        width="60"
239
+        width="80"
242 240
         label="先行自付金额"
243 241
       >
244 242
         <template slot-scope="scope">
@@ -249,7 +247,7 @@
249 247
       <el-table-column
250 248
         align="center"
251 249
         prop="name"
252
-        width="60"
250
+        width="70"
253 251
         label="符合正常范围金额"
254 252
       >
255 253
         <template slot-scope="scope">

+ 11 - 4
src/xt_pages/hospitalStation/doctorDesk.vue 查看文件

@@ -321,6 +321,7 @@
321 321
     },
322 322
     data() {
323 323
       return {
324
+        settle_total:0,
324 325
         current_data:null,
325 326
         drugs: [],
326 327
         allDrugs: [],
@@ -821,7 +822,7 @@
821 822
         this.month_prescriptions.push(p2)
822 823
 
823 824
 
824
-        this.$refs.prescriptions.setMonthData(this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info)
825
+        this.$refs.prescriptions.setMonthData(this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info,this.settle_total)
825 826
 
826 827
       },
827 828
 
@@ -3287,6 +3288,8 @@
3287 3288
                   this.hisPatientInfo = response.data.data.his_info
3288 3289
                   this.case_history = response.data.data.case_history
3289 3290
                   var month_prescriptions = response.data.data.month_prescriptions
3291
+                  this.settle_total = response.data.data.settle_total
3292
+                  console.log(this.settle_total)
3290 3293
                   this.setMonthPrescription(month_prescriptions)
3291 3294
                   this.doctors = response.data.data.doctors
3292 3295
                   this.department = response.data.data.department
@@ -3342,7 +3345,7 @@
3342 3345
                   } else {
3343 3346
                     this.case_history.is_infect = false
3344 3347
                   }
3345
-                  this.$refs.prescriptions.setMonthData(this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info)
3348
+                  this.$refs.prescriptions.setMonthData(this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info,this.settle_total)
3346 3349
                 }
3347 3350
               })
3348 3351
             }
@@ -3710,6 +3713,8 @@
3710 3713
 
3711 3714
                   this.month_prescriptions = []
3712 3715
 
3716
+                  this.settle_total = response.data.data.settle_total
3717
+
3713 3718
                   var month_prescriptions = response.data.data.month_prescriptions
3714 3719
                   this.setMonthPrescription(month_prescriptions)
3715 3720
 
@@ -3768,7 +3773,7 @@
3768 3773
                   } else {
3769 3774
                     this.case_history.is_infect = false
3770 3775
                   }
3771
-                  this.$refs.prescriptions.setMonthData(this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info)
3776
+                  this.$refs.prescriptions.setMonthData(this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info,this.settle_total)
3772 3777
                 }
3773 3778
               })
3774 3779
 
@@ -4083,6 +4088,8 @@
4083 4088
 
4084 4089
             this.doctors = response.data.data.doctors
4085 4090
             this.department = response.data.data.department
4091
+            this.settle_total = response.data.data.settle_total
4092
+
4086 4093
 
4087 4094
             for (let i = 0; i < this.doctors.length; i++) {
4088 4095
               if (this.doctors[i].user_type == 1) {
@@ -4133,7 +4140,7 @@
4133 4140
               this.case_history.is_infect = false
4134 4141
             }
4135 4142
 
4136
-            this.$refs.prescriptions.setMonthData(this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info)
4143
+            this.$refs.prescriptions.setMonthData(this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info,this.settle_total)
4137 4144
           }
4138 4145
         })
4139 4146
 

+ 2 - 2
src/xt_pages/hospitalStation/invoiceTemplate/printTwo.vue 查看文件

@@ -6,14 +6,14 @@
6 6
         </div>
7 7
         <div style="display:flex;justify-content: space-between;">
8 8
             <!-- <div>{{ list.department_name }}</div> -->
9
-            <div  style="position: absolute;top:50px;left:260px">{{ list.his_hospital_record.id_card_no }}</div>
9
+            <div  style="position: absolute;top:50px;left:260px">{{ list.his_hospital_record.id_card_no?list.order.certno:''}}</div>
10 10
             <div></div>
11 11
         </div>
12 12
         <div style="display:flex;justify-content: space-between;">
13 13
             <!-- <div>{{ list.department_name }}</div> -->
14 14
             <div  style="position: absolute;top:70px;left:90px">门诊</div>
15 15
             <div></div>
16
-            <div  style="position: absolute;top:70px;left:240px">{{ list.his_hospital_record.number }}</div>
16
+            <div  style="position: absolute;top:70px;left:240px">{{ list.his_hospital_record.number?list.order.mdtrt_id:''}}</div>
17 17
             <div  style="position: absolute;left:470px;top:70px;">
18 18
                 <span>{{  paramsObj.setl_time ? paramsObj.setl_time.split(' ')[0].slice(0,4) : getTime(list.date, '{y}-{m}-{d}').slice(0,4) }}</span>
19 19
             </div>

+ 136 - 54
src/xt_pages/hospitalStation/outpatientChargesManagement.vue 查看文件

@@ -112,14 +112,14 @@
112 112
             </el-button>
113 113
 
114 114
             <el-button v-loading="loadingtwo"
115
-                       v-if="(this.activeName == 'third' &&this.hisPatientInfo.balance_accounts_type != 2 &&  this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1) || (this.activeName != 'first' &&this.hisPatientInfo.balance_accounts_type != 2 &&  this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1 && this.order.order_status == 1) ||   (this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1 && this.order.order_status == 3)"
115
+                       v-if="(this.radio == 1 && this.activeName == 'third' &&this.hisPatientInfo.balance_accounts_type != 2 &&  this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1) || (this.activeName != 'first' &&this.hisPatientInfo.balance_accounts_type != 2 &&  this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1 && this.order.order_status == 1) ||   (this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1 && this.order.order_status == 3)"
116 116
                        size="small"
117 117
                        @click="open(3)"
118 118
                        type="primary">收费
119 119
             </el-button>
120 120
 
121 121
             <el-button v-loading="loadingtwo"
122
-                       v-if="(this.activeName == 'third' &&this.hisPatientInfo.balance_accounts_type == 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1  && this.order.order_status != 2)"
122
+                       v-if="(this.radio == 1 &&this.activeName == 'third' &&this.hisPatientInfo.balance_accounts_type == 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1  && this.order.order_status != 2)"
123 123
                        size="small"
124 124
                        @click="open(3)"
125 125
                        type="primary">收费
@@ -175,7 +175,7 @@
175 175
                   <div class="costBox">
176 176
                     <span>当前处方总费用:<span style="color:red;">{{ settle_total }}元</span></span>
177 177
                     <span>医疗费总额:<span style="color:red;">{{
178
-                        order.medfee_sumamt ? order.medfee_sumamt.toFixed(2) : getSettleTotal() ? getSettleTotal() : ''
178
+                        order.medfee_sumamt ? order.medfee_sumamt.toFixed(2) : settle_total ? settle_total : ''
179 179
                       }}元</span></span>
180 180
                     <span>基金支付总额:<span
181 181
                         style="color:red;">{{
@@ -232,7 +232,6 @@
232 232
         :visible.sync="statementVisible">
233 233
       <statementPrint ref="print" :paramsObj='orderObj'></statementPrint>
234 234
     </el-dialog>
235
-
236 235
     <el-dialog
237 236
         class="centerDialog"
238 237
         width="1200px"
@@ -248,7 +247,6 @@
248 247
         :visible.sync="invoiceVisible">
249 248
       <invoice-print ref="print" :invoiceParams='invoiceParams'></invoice-print>
250 249
     </el-dialog>
251
-
252 250
     <el-dialog
253 251
         title="出院时间"
254 252
         :visible.sync="dialogVisible"
@@ -1105,20 +1103,6 @@ export default {
1105 1103
         }
1106 1104
       }
1107 1105
 
1108
-    },
1109
-    tabclickEventTwo(val) {
1110
-      for (let i = 0; i < this.month_prescriptions.length; i++) {
1111
-        if (this.month_prescriptions[i].name == val.name) {
1112
-
1113
-          this.curMonthPrescriptions = {}
1114
-          var temp = this.deepClone(this.month_prescriptions[i])
1115
-          this.curMonthPrescriptions = temp
1116
-        }
1117
-      }
1118
-      this.prescription_id = this.month_prescriptions.id
1119
-      this.month_total = 0
1120
-      this.month_total = this.getMonthTotalOne()
1121
-
1122 1106
     },
1123 1107
     tabclickEventThree(val) {
1124 1108
       for (let i = 0; i < this.settle_prescriptions.length; i++) {
@@ -1129,27 +1113,12 @@ export default {
1129 1113
           this.curSettlePrescriptions = temp
1130 1114
         }
1131 1115
       }
1132
-      this.prescription_id = this.settle_prescriptions.id
1133
-      this.settle_total = 0
1134
-      this.settle_total = this.getSettleTotalOne()
1116
+      // this.prescription_id = this.settle_prescriptions.id
1117
+      // this.settle_total = 0
1118
+      // this.settle_total = this.getSettleTotalOne()
1135 1119
 
1136 1120
     },
1137
-    tabclickEvent(val) {
1138
-      console.log('val', val.name)
1139
-      for (let i = 0; i < this.prescriptions.length; i++) {
1140
-        if (this.prescriptions[i].name == val.name) {
1141
-
1142
-          this.curPrescriptions = {}
1143
-          var temp = this.deepClone(this.prescriptions[i])
1144
-          this.curPrescriptions = temp
1145
-        }
1146
-      }
1147
-      console.log('9999', this.curPrescriptions)
1148
-      this.prescription_id = this.curPrescriptions.id
1149
-      this.total = 0
1150
-      this.total = this.getTotalOne()
1151 1121
 
1152
-    },
1153 1122
     deepClone(source) {
1154 1123
       if (!source && typeof source !== 'object') {
1155 1124
         throw new Error('error arguments', 'shallowClone')
@@ -1169,7 +1138,7 @@ export default {
1169 1138
       if (this.curPrescriptions.type == 1) {
1170 1139
         if (this.curPrescriptions.advices != null) {
1171 1140
           for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
1172
-            total = parseFloat(total) + parseFloat(this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number)
1141
+            total = parseFloat(total) + parseFloat(this.curPrescriptions.advices[a].retail_price  * this.curPrescriptions.advices[a].prescribing_number)
1173 1142
 
1174 1143
           }
1175 1144
         }
@@ -1190,14 +1159,14 @@ export default {
1190 1159
       if (this.curMonthPrescriptions.type == 1) {
1191 1160
         if (this.curMonthPrescriptions.advices != null) {
1192 1161
           for (let a = 0; a < this.curMonthPrescriptions.advices.length; a++) {
1193
-            total = parseFloat(total) + parseFloat(this.curMonthPrescriptions.advices[a].retail_price * this.curMonthPrescriptions.advices[a].prescribing_number)
1162
+            total = parseFloat(total) + parseFloat(this.curMonthPrescriptions.advices[a].retail_price* this.curMonthPrescriptions.advices[a].prescribing_number)
1194 1163
 
1195 1164
           }
1196 1165
         }
1197 1166
       } else {
1198 1167
         if (this.curMonthPrescriptions.project != null) {
1199 1168
           for (let b = 0; b < this.curMonthPrescriptions.project.length; b++) {
1200
-            total = parseFloat(total) + parseFloat(this.curMonthPrescriptions.project[b].price * this.curMonthPrescriptions.project[b].total)
1169
+            total = parseFloat(total) + parseFloat(this.curMonthPrescriptions.project[b].price  * this.curMonthPrescriptions.project[b].total)
1201 1170
 
1202 1171
           }
1203 1172
         }
@@ -1211,39 +1180,45 @@ export default {
1211 1180
       if (this.curSettlePrescriptions.type == 1) {
1212 1181
         if (this.curSettlePrescriptions.advices != null) {
1213 1182
           for (let a = 0; a < this.curSettlePrescriptions.advices.length; a++) {
1214
-            total = parseFloat(total) + parseFloat(this.curSettlePrescriptions.advices[a].retail_price * this.curSettlePrescriptions.advices[a].prescribing_number)
1183
+            total = parseFloat(total) + (this.curSettlePrescriptions.advices[a].retail_price * this.curSettlePrescriptions.advices[a].prescribing_number).toFixed(2)
1215 1184
 
1216 1185
           }
1217 1186
         }
1218 1187
       } else {
1219 1188
         if (this.curSettlePrescriptions.project != null) {
1220 1189
           for (let b = 0; b < this.curSettlePrescriptions.project.length; b++) {
1221
-            total = parseFloat(total) + parseFloat(this.curSettlePrescriptions.project[b].price * this.curSettlePrescriptions.project[b].total)
1190
+            total = parseFloat(total) + (this.curSettlePrescriptions.project[b].price   * this.curSettlePrescriptions.project[b].total).toFixed(2)
1222 1191
 
1223 1192
           }
1224 1193
         }
1225 1194
       }
1226 1195
 
1227
-      return total.toFixed(2)
1196
+      return total
1228 1197
 
1229 1198
     },
1230 1199
     getSettleTotal() {
1231
-      var total = 0
1200
+      var total = 0.0
1232 1201
       for (let i = 0; i < this.settle_prescriptions.length; i++) {
1233 1202
         if (this.settle_prescriptions[i].advices != null) {
1234 1203
           for (let a = 0; a < this.settle_prescriptions[i].advices.length; a++) {
1235
-            total = parseFloat(total) + parseFloat(this.settle_prescriptions[i].advices[a].retail_price * this.settle_prescriptions[i].advices[a].prescribing_number)
1204
+            // console.log(parseFloat(this.settle_prescriptions[i].advices[a].retail_price.toFixed(2)))
1205
+            // console.log(this.settle_prescriptions[i].advices[a].prescribing_number)
1206
+            total = parseFloat(total) + (parseFloat(this.settle_prescriptions[i].advices[a].retail_price.toString()) * parseFloat(this.settle_prescriptions[i].advices[a].prescribing_number.toString())).toFixed(2)
1207
+
1208
+            // console.log(parseFloat(this.settle_prescriptions[i].advices[a].retail_price.toFixed(2) * this.settle_prescriptions[i].advices[a].prescribing_number))
1209
+            // total = parseFloat(total) + parseFloat(this.settle_prescriptions[i].advices[a].retail_price).toFixed(2) * this.settle_prescriptions[i].advices[a].prescribing_number
1236 1210
           }
1237 1211
         }
1238 1212
         if (this.settle_prescriptions[i].project != null) {
1239 1213
           for (let b = 0; b < this.settle_prescriptions[i].project.length; b++) {
1214
+            total = parseFloat(total) + (parseFloat(this.settle_prescriptions[i].project[b].price.toString())  * parseFloat(this.settle_prescriptions[i].project[b].total.toString())).toFixed(2)
1240 1215
 
1241
-            total = parseFloat(total) + parseFloat(this.settle_prescriptions[i].project[b].price * this.settle_prescriptions[i].project[b].total)
1216
+            // total = parseFloat(total) + parseFloat(this.settle_prescriptions[i].project[b].price.toFixed(2))* this.settle_prescriptions[i].project[b].total
1242 1217
           }
1243 1218
         }
1244 1219
 
1245 1220
       }
1246
-      return total.toFixed(2)
1221
+      return total
1247 1222
 
1248 1223
     },
1249 1224
     getTotal() {
@@ -1257,7 +1232,7 @@ export default {
1257 1232
         if (this.prescriptions[i].project != null) {
1258 1233
           for (let b = 0; b < this.prescriptions[i].project.length; b++) {
1259 1234
 
1260
-            total = parseFloat(total) + parseFloat(this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total)
1235
+            total = parseFloat(total) + parseFloat(this.prescriptions[i].project[b].price  * this.prescriptions[i].project[b].total)
1261 1236
           }
1262 1237
         }
1263 1238
 
@@ -1276,7 +1251,7 @@ export default {
1276 1251
         if (this.month_prescriptions[i].project != null) {
1277 1252
           for (let a = 0; a < this.month_prescriptions[i].project.length; a++) {
1278 1253
 
1279
-            total = parseFloat(total) + parseFloat(this.month_prescriptions[i].project[a].price * this.month_prescriptions[i].project[a].total)
1254
+            total = parseFloat(total) + parseFloat(this.month_prescriptions[i].project[a].price  * this.month_prescriptions[i].project[a].total)
1280 1255
           }
1281 1256
         }
1282 1257
 
@@ -1448,8 +1423,8 @@ export default {
1448 1423
           this.$message.error('请先到医生工作站开处方再来结算')
1449 1424
           return
1450 1425
         }
1451
-
1452
-        this.$refs.charge.show(this.getSettleTotal(),this.order)
1426
+        console.log(this.order)
1427
+        this.$refs.charge.show(this.settle_total,this.order)
1453 1428
 
1454 1429
       } else if (index == 4) {
1455 1430
         if (this.hisPatientInfo.balance_accounts_type == 2) {
@@ -2637,7 +2612,113 @@ export default {
2637 2612
 
2638 2613
       this.curMonthPrescriptions = this.month_prescriptions[0]
2639 2614
 
2615
+
2640 2616
     },
2617
+    setSettlePrescriptionTwo(month_prescriptions) {
2618
+      this.settle_prescriptions = []
2619
+
2620
+      for (let i = 0; i < month_prescriptions.length; i++) {
2621
+        var prescription = month_prescriptions[i]
2622
+        let tempAdvice = []
2623
+        let tempProject = []
2624
+        let tempAddition = []
2625
+        for (let b = 0; b < prescription.advices.length; b++) {
2626
+          let spec = prescription.advices[b].drug.dose + prescription.advices[b].drug.dose_unit + '*' + prescription.advices[b].drug.min_number + prescription.advices[b].drug.min_unit + '/' + prescription.advices[b].drug.max_unit
2627
+
2628
+          let obj = {
2629
+            advice_id: prescription.advices[b].id,
2630
+            drug_name: prescription.advices[b].advice_name,
2631
+            single_dose: prescription.advices[b].single_dose,
2632
+            delivery_way: prescription.advices[b].delivery_way,
2633
+            execution_frequency: prescription.advices[b].execution_frequency,
2634
+            retail_price: prescription.advices[b].price.toString(),
2635
+            remark: prescription.advices[b].remark,
2636
+            day: prescription.advices[b].day,
2637
+            prescribing_number: prescription.advices[b].prescribing_number.toString(),
2638
+            single_dose_unit: prescription.advices[b].single_dose_unit,
2639
+            prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
2640
+            medical_insurance_number: prescription.advices[b].med_list_codg,
2641
+
2642
+            code: prescription.advices[b].drug.medical_insurance_number,
2643
+            spec: spec,
2644
+            det_item_fee_sumamt: prescription.advices[b].order_info.det_item_fee_sumamt,
2645
+            name_id: prescription.advices[b].drug.manufacturer,
2646
+            fulamt_ownpay_amt: prescription.advices[b].order_info.fulamt_ownpay_amt,
2647
+            overlmt_amt: prescription.advices[b].order_info.overlmt_amt,
2648
+            preselfpay_amt: prescription.advices[b].order_info.preselfpay_amt,
2649
+            inscp_scp_amt: prescription.advices[b].order_info.inscp_scp_amt
2650
+
2651
+
2652
+
2653
+          }
2654
+          tempAdvice.push(obj)
2655
+        }
2656
+
2657
+        for (let b = 0; b < prescription.project.length; b++) {
2658
+          let obj = {
2659
+            id: prescription.project[b].id,
2660
+            project_id: prescription.project[b].project.id,
2661
+            // project_name: prescription.project[b].project.project_name,
2662
+            // statistical_classification: prescription.project[b].project.statistical_classification,
2663
+            single_dose: prescription.project[b].single_dose,
2664
+            delivery_way: prescription.project[b].delivery_way,
2665
+            execution_frequency: prescription.project[b].execution_frequency,
2666
+            number_days: prescription.project[b].day,
2667
+            total: prescription.project[b].count.toString(),
2668
+            price: prescription.project[b].price,
2669
+            remark: prescription.project[b].remark,
2670
+            // medical_code: prescription.project[b].project.medical_code,
2671
+            unit: prescription.project[b].project.unit,
2672
+            type: prescription.project[b].type,
2673
+            det_item_fee_sumamt: prescription.project[b].order_info.det_item_fee_sumamt,
2674
+            fulamt_ownpay_amt: prescription.project[b].order_info.fulamt_ownpay_amt,
2675
+            overlmt_amt: prescription.project[b].order_info.overlmt_amt,
2676
+            preselfpay_amt: prescription.project[b].order_info.preselfpay_amt,
2677
+            inscp_scp_amt: prescription.project[b].order_info.inscp_scp_amt
2678
+
2679
+          }
2680
+
2681
+          if (prescription.project[b].type == 2) {
2682
+            obj['statistical_classification'] = prescription.project[b].team.project_team
2683
+            obj['medical_code'] = prescription.project[b].project.medical_code
2684
+            obj['project_name'] = prescription.project[b].project.project_name
2685
+            obj['spec'] = ''
2686
+            obj['name_id'] = 0
2687
+
2688
+          } else if (prescription.project[b].type == 3) {
2689
+            obj['statistical_classification'] = prescription.project[b].team.project_team
2690
+            obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
2691
+            obj['project_name'] = prescription.project[b].good_info.good_name
2692
+            obj['spec'] = prescription.project[b].good_info.specification_name
2693
+            obj['name_id'] = prescription.project[b].good_info.manufacturer
2694
+
2695
+          }
2696
+
2697
+          tempProject.push(obj)
2698
+        }
2699
+
2700
+        let index = i + 1
2701
+        let obj = {
2702
+          id: prescription.id,
2703
+          name: '处方' + index,
2704
+          advices: tempAdvice,
2705
+          project: tempProject,
2706
+          addition: tempAddition,
2707
+          order_status: prescription.order_status,
2708
+          type: prescription.type
2709
+        }
2710
+        this.settle_prescriptions.push(obj)
2711
+        this.curSettlePrescriptions = this.settle_prescriptions[0]
2712
+        for (let i = 0; i < this.settle_prescriptions.length; i++) {
2713
+          if (this.settle_prescriptions[i].order_status != 4) {
2714
+            this.isShowUpload = 2
2715
+          }
2716
+
2717
+        }
2718
+
2719
+      }
2720
+    },
2721
+
2641 2722
     setSettlePrescription(month_prescriptions) {
2642 2723
       this.settle_prescriptions = []
2643 2724
 
@@ -2818,6 +2899,7 @@ export default {
2818 2899
       return arr.filter((arr) => !res.has(arr.id_card_no) && res.set(arr.id_card_no, 1))
2819 2900
     },
2820 2901
     handleCurrentChange(val) {
2902
+      console.log(val)
2821 2903
       this.curPrescriptions = {}
2822 2904
       this.curMonthPrescriptions = {}
2823 2905
       this.prescriptions = []
@@ -3026,10 +3108,10 @@ export default {
3026 3108
           } else {
3027 3109
             this.curMonthPrescriptions = {}
3028 3110
           }
3029
-          this.total = 0
3111
+          // this.total = 0
3030 3112
           this.total = this.getTotalOne()
3031
-          this.month_total = this.getMonthTotalOne()
3032
-          this.settle_total = this.getSettleTotalOne()
3113
+          // this.month_total = this.getMonthTotalOne()
3114
+          this.settle_total = response.data.data.settle_total
3033 3115
 
3034 3116
         }
3035 3117
       })

+ 3 - 2
src/xt_pages/hospitalStation/statementTemplate/printOne.vue 查看文件

@@ -93,7 +93,7 @@
93 93
         <td>出院日期</td>
94 94
         <td width="100">{{info.enddate}}</td>
95 95
         <td>住院天数</td>
96
-        <td>{{getDay(info.begndate,info.enddate) + 1}}</td>
96
+        <td>{{getDay(info.begndate,info.enddate)}}</td>
97 97
 
98 98
       </tr>
99 99
       <tr>
@@ -129,6 +129,7 @@
129 129
         <td colspan="12" style="text-align:left;padding-left:10px;">
130 130
           本次就医:总费用{{info.medfee_sumamt}}元,基金支付{{info.fund_pay_sumamt}}元,个人支付{{info.psn_pay}}元。
131 131
           (起付线 {{info.act_pay_dedc}}元, 先自付 {{info.preselfpay_amt}}元, 段内自付 {{(info.psn_pay - info.preselfpay_amt).toFixed(2)}} )
132
+
132 133
         </td>
133 134
       </tr>
134 135
       <tr>
@@ -356,7 +357,7 @@
356 357
             return 1;
357 358
           }
358 359
           var days=(endDate - startDate)/(1*24*60*60*1000);
359
-          return  days;
360
+          return  days+1;
360 361
 
361 362
         },
362 363
       getNowTime: function () {

+ 386 - 0
src/xt_pages/hospitalStation/statementTemplate/printOther.vue 查看文件

@@ -0,0 +1,386 @@
1
+<template>
2
+  <div id="statement-print" class="statement-print">
3
+    <div class="statementTitle">广东省社会医疗保险医疗费用结算单</div>
4
+    <table class="statementTable" border="1">
5
+      <tr>
6
+        <td width="80">机构名称</td>
7
+        <td colspan="4">{{info.fixmedins_name}}</td>
8
+        <td width="80">机构编码</td>
9
+        <td colspan="4">{{info.fixmedins_code}}</td>
10
+        <td width="100">医保结算级别</td>
11
+        <td width="100" v-if="info.hosp_lv == '1'">三级特等</td>
12
+        <td width="100" v-if="info.hosp_lv == '2'">三级甲等</td>
13
+        <td width="100" v-if="info.hosp_lv == '3'">三级乙等</td>
14
+        <td width="100" v-if="info.hosp_lv == '4'">三级丙等</td>
15
+        <td width="100" v-if="info.hosp_lv == '5'">二级甲等</td>
16
+        <td width="100" v-if="info.hosp_lv == '6'">二级乙等</td>
17
+        <td width="100" v-if="info.hosp_lv == '7'">二级丙等</td>
18
+        <td width="100" v-if="info.hosp_lv == '8'">一级甲等</td>
19
+        <td width="100" v-if="info.hosp_lv == '9'">一级乙等</td>
20
+        <td width="100" v-if="info.hosp_lv == '10'">一级丙等</td>
21
+        <td width="100" v-if="info.hosp_lv == '11'">无等级</td>
22
+        <td width="100" v-else></td>
23
+
24
+      </tr>
25
+      <tr>
26
+        <td width="90">就医登记号</td>
27
+        <td colspan="11">{{info.mdtrt_id}}</td>
28
+      </tr>
29
+      <tr>
30
+        <td width="80">姓名</td>
31
+        <td width="80">{{info.psn_name}}</td>
32
+        <td width="80">性别</td>
33
+        <td width="50" v-if="info.gend == '1'">男</td>
34
+        <td width="50" v-if="info.gend == '2'">女</td>
35
+
36
+        <td width="80">出生日期</td>
37
+        <td width="100">{{info.brdy}}</td>
38
+        <td width="90">个人电脑号</td>
39
+        <td width="110">{{info.psn_no}}</td>
40
+        <td width="80">人员类别</td>
41
+        <td colspan="3" v-if="info.psn_type == '11'">在职</td>
42
+        <td colspan="3" v-if="info.psn_type == '1101'">职工在职</td>
43
+        <td colspan="3" v-if="info.psn_type == '1102'">公务员在职</td>
44
+        <td colspan="3" v-if="info.psn_type == '1103'">灵活就业人员在职</td>
45
+        <td colspan="3" v-if="info.psn_type == '1160'">地方其他扩展人员</td>
46
+
47
+
48
+        <td colspan="3" v-if="info.psn_type == '12'">退休人员</td>
49
+        <td colspan="3" v-if="info.psn_type == '1201'">职工退休</td>
50
+        <td colspan="3" v-if="info.psn_type == '1202'">公务员退休</td>
51
+        <td colspan="3" v-if="info.psn_type == '1203'">灵活就业人员退休</td>
52
+        <td colspan="3" v-if="info.psn_type == '1260'">地方其他扩展人员</td>
53
+
54
+
55
+        <td colspan="3" v-if="info.psn_type == '13'">离休</td>
56
+        <td colspan="3" v-if="info.psn_type == '1300'">离休人员</td>
57
+        <td colspan="3" v-if="info.psn_type == '1360'">地方其他扩展人员</td>
58
+
59
+        <td colspan="3" v-if="info.psn_type == '14'">居民(未成年)</td>
60
+        <td colspan="3" v-if="info.psn_type == '1401'">新生儿</td>
61
+        <td colspan="3" v-if="info.psn_type == '1402'">学龄前儿童</td>
62
+        <td colspan="3" v-if="info.psn_type == '1403'">中小学生</td>
63
+        <td colspan="3" v-if="info.psn_type == '1404'">大学生</td>
64
+        <td colspan="3" v-if="info.psn_type == '1405'">未成年(未入学)</td>
65
+
66
+
67
+        <td colspan="3" v-if="info.psn_type == '15'">居民(成年)</td>
68
+        <td colspan="3" v-if="info.psn_type == '1501'">普通居民(成年)</td>
69
+        <td colspan="3" v-if="info.psn_type == '1560'">地方其他扩展身份</td>
70
+
71
+        <td colspan="3" v-if="info.psn_type == '16'">居民(老年)</td>
72
+
73
+
74
+
75
+      </tr>
76
+      <tr>
77
+        <td>单位名称</td>
78
+        <td colspan="5">{{info.emp_name}}</td>
79
+        <td width="80">联系电话</td>
80
+        <td width="110"></td>
81
+        <td width="80">身份证号</td>
82
+        <td colspan="3">{{info.certno}}</td>
83
+      </tr>
84
+      <tr>
85
+        <td>住院号</td>
86
+        <td>{{info.number}}</td>
87
+        <td>科别</td>
88
+        <td width="100"></td>
89
+        <td>床号</td>
90
+        <td></td>
91
+        <td>入院日期</td>
92
+        <td>{{info.begndate}}</td>
93
+        <td>出院日期</td>
94
+        <td width="100">{{info.enddate}}</td>
95
+        <td>住院天数</td>
96
+        <td>{{getDay(info.begndate,info.enddate) + 1}}</td>
97
+
98
+      </tr>
99
+      <tr>
100
+        <td>险种</td>
101
+        <td colspan="2" v-if="info.insutype == '310'">职工基本医疗保险</td>
102
+        <td colspan="2" v-if="info.insutype == '320'">公务员医疗补助</td>
103
+        <td colspan="2" v-if="info.insutype == '330'">大额医疗费用补助</td>
104
+        <td colspan="2" v-if="info.insutype == '340'">离休人员医疗保障</td>
105
+        <td colspan="2" v-if="info.insutype == '390'">城乡居民基本医疗保险</td>
106
+        <td colspan="2" v-if="info.insutype == '392'">城乡居民大病医疗保险</td>
107
+        <td colspan="2" v-if="info.insutype == '510'">生育保险</td>
108
+
109
+
110
+        <td>入院第一诊断</td>
111
+        <td colspan="3"></td>
112
+        <td>出院第一诊断</td>
113
+        <td colspan="4"></td>
114
+      </tr>
115
+      <tr>
116
+        <td>业务类别</td>
117
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '11'">普通门诊</td>
118
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '12'">门诊挂号</td>
119
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '13'">急诊</td>
120
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '14'">门诊慢性病</td>
121
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '15'">门诊统筹</td>
122
+        <!--        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '16'">门诊慢性病</td>-->
123
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '21'">普通住院</td>
124
+
125
+        <td>结算时间</td>
126
+        <td colspan="5" style="text-align:left;padding-left:10px;">{{info.setl_time.split(' ')[0]}}</td>
127
+      </tr>
128
+      <tr>
129
+        <td colspan="12" style="text-align:left;padding-left:10px;">
130
+          本次就医:总费用{{info.medfee_sumamt}}元,基金支付{{info.fund_pay_sumamt}}元,个人支付{{info.psn_pay}}元。
131
+          (起付线 {{info.act_pay_dedc}}元, 先自付 {{info.preselfpay_amt}}元, 段内自付 )
132
+        </td>
133
+      </tr>
134
+      <tr>
135
+        <td>费用名称</td>
136
+        <td colspan="2">总费用</td>
137
+        <td>自费</td>
138
+        <td colspan="2">部分项目自付</td>
139
+        <td>费用名称</td>
140
+        <td colspan="2">总费用</td>
141
+        <td>自费</td>
142
+        <td colspan="2">部分项目自付</td>
143
+      </tr>
144
+      <tr>
145
+        <td>床位费</td>
146
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_total}}</td>
147
+        <td style="text-align:right;padding-right:10px;">{{info.bed_cost_self_total}}</td>
148
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_part_self_total}}</td>
149
+        <td>西成药</td>
150
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_total}}</td>
151
+        <td style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_self_total}}</td>
152
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_part_self_total}}</td>
153
+      </tr>
154
+      <tr>
155
+        <td>中药费</td>
156
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
157
+        <td style="text-align:right;padding-right:10px;">0</td>
158
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
159
+        <td>中成药</td>
160
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_total}}
161
+        </td>
162
+        <td style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_self_total}}</td>
163
+        <td colspan="2" style="text-align:right;padding-right:10px;">
164
+          {{info.chinese_traditional_medicine_cost_part_self_total}}
165
+        </td>
166
+      </tr>
167
+      <tr>
168
+        <td>中草药</td>
169
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
170
+        <td style="text-align:right;padding-right:10px;">0</td>
171
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
172
+        <td>检查费</td>
173
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_total}}</td>
174
+        <td style="text-align:right;padding-right:10px;">{{info.check_cost_self_total}}</td>
175
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_part_self_total}}</td>
176
+      </tr>
177
+      <tr>
178
+        <td>治疗费</td>
179
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_total}}</td>
180
+        <td style="text-align:right;padding-right:10px;">{{info.treat_cost_self_total}}</td>
181
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_part_self_total}}</td>
182
+        <td>放射费</td>
183
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
184
+        <td style="text-align:right;padding-right:10px;">0</td>
185
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
186
+      </tr>
187
+      <tr>
188
+        <td>手术费</td>
189
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_total}}</td>
190
+        <td style="text-align:right;padding-right:10px;">{{info.operation_cost_self_total}}</td>
191
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_part_self_total}}</td>
192
+        <td>化验费</td>
193
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_total}}</td>
194
+        <td style="text-align:right;padding-right:10px;">{{info.laboratory_cost_self_total}}</td>
195
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_part_self_total}}</td>
196
+      </tr>
197
+      <tr>
198
+        <td>输血费</td>
199
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
200
+        <td style="text-align:right;padding-right:10px;">0</td>
201
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
202
+        <td>输氧费</td>
203
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
204
+        <td style="text-align:right;padding-right:10px;">0</td>
205
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
206
+      </tr>
207
+      <tr>
208
+        <td>其他</td>
209
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_total}}</td>
210
+        <td style="text-align:right;padding-right:10px;">{{info.other_cost_self_total}}</td>
211
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_part_self_total}}</td>
212
+        <td>麻醉费</td>
213
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
214
+        <td style="text-align:right;padding-right:10px;">0</td>
215
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
216
+      </tr>
217
+      <tr>
218
+        <td>材料费</td>
219
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_total}}</td>
220
+        <td style="text-align:right;padding-right:10px;">{{info.material_cost_self_total}}</td>
221
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_part_self_total}}</td>
222
+        <td>特殊检查费</td>
223
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
224
+        <td style="text-align:right;padding-right:10px;">0</td>
225
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
226
+      </tr>
227
+      <tr>
228
+        <td>特殊治疗费</td>
229
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
230
+        <td style="text-align:right;padding-right:10px;">0</td>
231
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
232
+        <td style="text-align:right;padding-right:10px;"></td>
233
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
234
+        <td style="text-align:right;padding-right:10px;"></td>
235
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
236
+      </tr>
237
+      <tr>
238
+        <td>合计</td>
239
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_total) +
240
+            parseFloat(info.operation_cost_total) + parseFloat(info.other_cost_total) +
241
+            parseFloat(info.material_cost_total) + parseFloat(info.western_medicine_cost_total) +
242
+            parseFloat(info.chinese_traditional_medicine_cost_total) + parseFloat(info.check_cost_total) +
243
+            parseFloat(info.laboratory_cost_total) + parseFloat(info.treat_cost_total)).toFixed(2) }}
244
+        </td>
245
+        <td style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_self_total )+
246
+            parseFloat(info.operation_cost_self_total) + parseFloat(info.other_cost_self_total) +
247
+            parseFloat(info.material_cost_self_total) + parseFloat(info.western_medicine_cost_self_total) +
248
+            parseFloat(info.chinese_traditional_medicine_cost_self_total) + parseFloat(info.check_cost_self_total) +
249
+            parseFloat(info.laboratory_cost_self_total) + parseFloat(info.treat_cost_self_total)).toFixed(2)}}
250
+        </td>
251
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_part_self_total) +
252
+            parseFloat(info.operation_cost_part_self_total) + parseFloat(info.other_cost_part_self_total) +
253
+            parseFloat(info.material_cost_part_self_total) + parseFloat(info.western_medicine_cost_part_self_total) +
254
+            parseFloat(info.chinese_traditional_medicine_cost_part_self_total) +
255
+            parseFloat(info.check_cost_part_self_total) + parseFloat(info.laboratory_cost_part_self_total) +
256
+            parseFloat(info.treat_cost_part_self_total)).toFixed(2)}}
257
+        </td>
258
+        <td style="text-align:right;padding-right:10px;"></td>
259
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
260
+        <td style="text-align:right;padding-right:10px;"></td>
261
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
262
+      </tr>
263
+      <tr>
264
+        <td colspan="3" style="text-align:left;padding-left:10px;">基本医疗保险统筹基金支付</td>
265
+        <td colspan="3">{{info.hifp_pay}}</td>
266
+        <td colspan="3" style="text-align:left;padding-left:10px;">大额基金支付</td>
267
+        <td colspan="3">{{info.hifob_pay}}</td>
268
+      </tr>
269
+      <tr>
270
+        <td colspan="3" style="text-align:left;padding-left:10px;">大病基金支付</td>
271
+        <td colspan="3">{{info.hifmi_pay}}</td>
272
+        <td colspan="3" style="text-align:left;padding-left:10px;">补充保险基金支付</td>
273
+        <td colspan="3">{{info.hifes_pay}}</td>
274
+      </tr>
275
+      <tr>
276
+        <td colspan="3" style="text-align:left;padding-left:10px;">医疗救助基金支付</td>
277
+        <td colspan="3">{{info.maf_pay}}</td>
278
+        <td colspan="3" style="text-align:left;padding-left:10px;">公务员基金支付</td>
279
+        <td colspan="3">{{info.cvlserv_pay}}</td>
280
+      </tr>
281
+      <tr>
282
+        <td>收款人:</td>
283
+        <td colspan="2">{{info.charge_admin.user_name}}</td>
284
+        <td>审核人:</td>
285
+        <td colspan="2">{{info.p_admin.user_name}}</td>
286
+        <td>制单人:</td>
287
+        <td colspan="2">{{info.p_admin.user_name}}</td>
288
+        <td>打印日期</td>
289
+        <td colspan="2">{{getNowTime()}}</td>
290
+      </tr>
291
+      <tr>
292
+        <td colspan="12" style="text-align:left;padding-left:10px;line-height:20px;">
293
+          注: 1、部分项目自付金额是指基本医疗保险范围内的项目需参保人先按规定比例自付的金额。<br/>
294
+          &ensp;&ensp;&ensp;2、此表由医院打印。<br/>
295
+          &ensp;&ensp;&ensp;3、此表一式两份,医院、参保人各一份。
296
+        </td>
297
+      </tr>
298
+      <tr>
299
+        <td colspan="12" style="text-align:left;padding-left:10px;">
300
+          病人家属签字:
301
+        </td>
302
+      </tr>
303
+    </table>
304
+  </div>
305
+</template>
306
+<script>
307
+export default {
308
+  props: {
309
+    info: {
310
+      type: Object,
311
+      default: function() {
312
+        return {}
313
+      }
314
+    }, p_admin: {
315
+      type: Object,
316
+      default: function() {
317
+        return {}
318
+      }
319
+    }, charge_admin: {
320
+      type: Object,
321
+      default: function() {
322
+        return {}
323
+      }
324
+    }
325
+  },methods:{
326
+    getDay(dateString1,dateString2){
327
+      var  startDate = Date.parse(dateString1);
328
+      var  endDate = Date.parse(dateString2);
329
+      if (startDate>endDate){
330
+        return 0;
331
+      }
332
+      if (startDate==endDate){
333
+        return 1;
334
+      }
335
+      var days=(endDate - startDate)/(1*24*60*60*1000);
336
+      return  days;
337
+
338
+    },
339
+    getNowTime: function () {
340
+      let dateTime;
341
+      let yy = new Date().getFullYear();
342
+      let mm = new Date().getMonth() + 1;
343
+      let dd = new Date().getDate();
344
+      let hh = new Date().getHours();
345
+      let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
346
+          :
347
+          new Date().getMinutes();
348
+      let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
349
+          :
350
+          new Date().getSeconds();
351
+      dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss;
352
+      return dateTime
353
+    },
354
+
355
+  }
356
+}
357
+
358
+
359
+</script>
360
+
361
+
362
+<style lang="scss" scoped>
363
+.statement-print {
364
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
365
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
366
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
367
+  margin-bottom: 20px;
368
+  padding: 20px 10px;
369
+}
370
+
371
+.statementTitle {
372
+  font-size: 28px;
373
+  text-align: center;
374
+  font-weight: bold;
375
+  margin-bottom: 10px;
376
+}
377
+
378
+.statementTable {
379
+  width: 100%;
380
+  text-align: center;
381
+  border-collapse: collapse;
382
+  line-height: 40px;
383
+  font-size: 14px;
384
+  border-color: #000;
385
+}
386
+</style>

+ 8 - 2
src/xt_pages/hospitalStation/summary.vue 查看文件

@@ -159,8 +159,9 @@
159 159
                 width="1200px"
160 160
                 title="打印"
161 161
                 :visible.sync="statementVisible">
162
-            <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
163
-            <new-statement-print ref="print" :paramsObj='orderObj'></new-statement-print>
162
+            <statementPrint ref="print" :paramsObj='orderObj'></statementPrint>
163
+<!--            <new-statement-print ref="print" :paramsObj='orderObj'></new-statement-print>-->
164
+<!--          <state-->
164 165
         </el-dialog>
165 166
         <el-dialog
166 167
                 class="centerDialog"
@@ -182,6 +183,7 @@
182 183
                 width="1200px"
183 184
                 title="打印"
184 185
                 :visible.sync="statementVisible9504">
186
+
185 187
             <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
186 188
             <!--<new-statement-print ref="print" :paramsObj='orderObj9504'></new-statement-print>-->
187 189
             <new-statement-print-two ref="print" :paramsObj='orderObj9504'></new-statement-print-two>
@@ -218,6 +220,8 @@
218 220
   import { fetchAllAdminUsers } from '@/api/doctor'
219 221
   import axios from 'axios'
220 222
   import invoicePrint from './invoicePrint'
223
+  import statementPrint from './statementPrint'
224
+
221 225
   // import settlementPrint from './settlementPrint'
222 226
 
223 227
   export default {
@@ -227,6 +231,7 @@
227 231
       BreadCrumb,
228 232
       listPrint,
229 233
       allListPrint,
234
+      statementPrint,
230 235
       invoicePrint
231 236
       // settlementPrint
232 237
     },
@@ -263,6 +268,7 @@
263 268
           { value: 2, label: '结算时间' }
264 269
         ],
265 270
         p_types:[
271
+          { value: 0, label: '全部' },
266 272
           { value: 1, label: '住院' },
267 273
           { value: 2, label: '门诊' }
268 274
         ],

+ 420 - 291
src/xt_pages/hospitalStation/template/printOne.vue 查看文件

@@ -1,354 +1,483 @@
1 1
 <template>
2
-  <div id='prescriptionPrint'>
3
-    <div v-for="(item,index) in advicePrint" :key="index">
4
-      <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
5
-          <div class="printTitle" v-if="prescriptions[0].med_type == '1111'">{{orgname}}第一类精神药品处方笺</div>
6
-          <div class="printTitle" v-if="prescriptions[0].med_type == '1112'">{{orgname}}第二类精神药品处方笺</div>
7
-          <div class="printTitle" v-else>{{orgname}}处方笺</div>
2
+  <div id="prescriptionPrint">
3
+    <div v-for="(item, index) in advicePrint" :key="index">
4
+      <div
5
+        id="prescription-print"
6
+        class="prescription-print"
7
+        style="page-break-after: always"
8
+      >
9
+        <div class="printTitle" v-if="prescriptions[0].med_type == '1111'">
10
+          {{ orgname }}第一类精神药品处方笺
11
+        </div>
12
+        <div class="printTitle" v-if="prescriptions[0].med_type == '1112'">
13
+          {{ orgname }}第二类精神药品处方笺
14
+        </div>
15
+        <div class="printTitle" v-else>{{ orgname }}处方笺</div>
8 16
 
9
-
10
-          <div class="infoTitle">
11
-              <p>姓名:{{item.patient.name?item.patient.name:""}}</p>
12
-              <p>性别:
13
-                <span v-if="item.patient.gender == 1">男</span>
14
-                <span v-if="item.patient.gender == 2">女</span>
15
-              </p>
16
-              <p>年龄:{{getAge(item.patient)?getAge(item.patient):""}}岁</p>
17
+        <div class="infoTitle">
18
+          <p>姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
19
+          <p>
20
+            性别:
21
+            <span v-if="item.patient.gender == 1">男</span>
22
+            <span v-if="item.patient.gender == 2">女</span>
23
+          </p>
24
+          <p>年龄:{{ getAge(item.patient) ? getAge(item.patient) : "" }}岁</p>
25
+        </div>
26
+        <div class="infoMain">
27
+          <div style="margin-bottom: 10px">
28
+            门诊号:{{ hisPatient.number ? hisPatient.number : "" }}
17 29
           </div>
18
-          <div class="infoMain">
19
-              <div style="margin-bottom: 10px;">门诊号:{{hisPatient.number?hisPatient.number:""}}</div>
20
-              <div style="margin-bottom: 10px;">科室:{{item.info?getDepart(item.info.departments):''}}</div>
21
-              <div style="margin-bottom: 10px;">医保卡号:{{""}}</div>
22
-              <div style="margin-bottom: 10px;">电话:{{item.patient.phone}}</div>
23
-              <div>地址:{{item.patient.home_address}}</div>
24
-              <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div>
30
+          <div style="margin-bottom: 10px">
31
+            科室:{{ item.info ? getDepart(item.info.departments) : "" }}
32
+          </div>
33
+          <div style="margin-bottom: 10px">医保卡号:{{ "" }}</div>
34
+          <div style="margin-bottom: 10px">电话:{{ item.patient.phone }}</div>
35
+          <div>地址:{{ item.patient.home_address }}</div>
36
+          <div style="display: flex; width: 50%">
37
+            临床诊断:{{ getDiagnosis(item.info.diagnosis) }}
38
+          </div>
39
+        </div>
40
+        <div class="prescriptionBox">
41
+          <div class="Rp">Rp:</div>
42
+          <div
43
+            class="drugsBox"
44
+            v-for="(it, index) in item.advices"
45
+            :key="index"
46
+          >
47
+            <!-- <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> -->
48
+            <div class="drugsOne">
49
+              <span style="font-weight: bold">{{ index + 1 + "." }}</span
50
+              >{{ it.advice_name ? it.advice_name : "" }}&nbsp;&nbsp;<span
51
+                v-if="it.drug.min_unit != it.drug.dose_unit"
52
+                >{{ it.drug.dose }}{{ it.drug.dose_unit }}&nbsp;* &nbsp;</span
53
+              >{{ it.drug.min_number }}{{ it.drug.min_unit }}/{{
54
+                it.drug.max_unit
55
+              }}&nbsp;×&nbsp; {{ it.prescribing_number
56
+              }}{{ it.prescribing_number_unit }}
57
+            </div>
58
+            <div style="margin-left: 100px">
59
+              <span>用法:{{ it.single_dose }}{{ it.single_dose_unit }}</span
60
+              >&nbsp;&nbsp;<span
61
+                >{{ it.execution_frequency }}&nbsp;{{
62
+                  it.delivery_way
63
+                }}&nbsp;</span
64
+              >&nbsp;&nbsp;<span>{{ it.advice_desc }}</span>
65
+            </div>
66
+          </div>
67
+          <div
68
+            class="drugsBox"
69
+            v-for="(it, i) in item.additionalcharge"
70
+            :key="i"
71
+          >
72
+            <div class="drugsOne">
73
+              {{ it.item_name ? it.item_name : "" }}:&nbsp;{{ it.price }}元/{{
74
+                it.count
75
+              }}次
76
+            </div>
25 77
           </div>
26
-          <div class="prescriptionBox">
27
-              <div class="Rp">Rp:</div>
28
-              <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
29
-                  <!-- <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> -->
30
-                  <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>
31
-                  <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>
32
-              </div>
33
-              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
34
-                <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
35
-               </div>
36
-
37
-              <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
38
-                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.type == 2?getProjectName(it.project_id)?getProjectName(it.project_id):"":it.good_info.good_name}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
39
-                  <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>
40
-              </div>
41
-              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
42
-                <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
43
-               </div>
44
-               <div style="text-align:center;" >(以下空白)</div>
45 78
 
79
+          <div
80
+            class="drugsBox"
81
+            v-for="(it, index) in item.project"
82
+            :key="index"
83
+          >
84
+            <div class="drugsOne">
85
+              <span style="font-weight: bold">{{ index + 1 + "." }}</span
86
+              >{{
87
+                it.type == 2
88
+                  ? getProjectName(it.project_id)
89
+                    ? getProjectName(it.project_id)
90
+                    : ""
91
+                  : it.good_info.good_name
92
+              }}&nbsp;&nbsp;{{ it.single_dose
93
+              }}{{ it.single_dose_unit }}&nbsp;×&nbsp; {{ it.count }}{{ unit }}
94
+            </div>
95
+            <div style="margin-left: 100px">
96
+              <span>用法:{{ it.single_dose }}{{ it.single_dose_unit }}</span
97
+              >&nbsp;&nbsp;<span>{{ it.delivery_way }}</span
98
+              >&nbsp;&nbsp;<span>{{ it.advice_desc }}</span>
99
+            </div>
46 100
           </div>
47
-          <div class="doctorBox">
48
-              <p>医师:{{item.doctor?item.doctor:""}}</p>
49
-              <p>日期:{{getTime(item.pre_time)?getTime(item.pre_time):""}}</p>
101
+          <div
102
+            class="drugsBox"
103
+            v-for="(it, i) in item.additionalcharge"
104
+            :key="i"
105
+          >
106
+            <div class="drugsOne">
107
+              {{ it.project_id ? it.project_id : "" }}:&nbsp;{{ it.price }}元/{{
108
+                it.count
109
+              }}次
110
+            </div>
50 111
           </div>
51
-          <div class="actionBar">
52
-                 <!-- <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
112
+          <div style="text-align: center">(以下空白)</div>
113
+        </div>
114
+        <div class="doctorBox">
115
+          <p>
116
+            医师:
117
+            <span
118
+              style="width: 100px; display: inline-block"
119
+              v-if="setAdminUserES(item.creater) == ''"
120
+            >
121
+              {{ item.doctor }}
122
+            </span>
123
+            <img
124
+              style="height: 30px"
125
+              :src="setAdminUserES(item.creater)"
126
+              alt=""
127
+              srcset=""
128
+              v-else
129
+            />
130
+          </p>
131
+          <p>
132
+            日期:{{ getTime(item.pre_time) ? getTime(item.pre_time) : "" }}
133
+          </p>
134
+        </div>
135
+        <div class="actionBar">
136
+          <!-- <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
53 137
                  <p>配对:</p>
54 138
                  <p>核对:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
55 139
                  <p>发药:{{getDoctor(item.advices[0].execution_staff)?getDoctor(item.advices[0].execution_staff):""}}</p>
56 140
                  <p>药费:{{getTotalOne(item.id)?getTotalOne(item.id):0}}元</p> -->
57 141
 
58
-                 <p>审核:</p>
59
-                 <p>配对:</p>
60
-                 <p>核对:</p>
61
-                 <p>发药:</p>
62
-                 <p>药费:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):0}}元</p>
63
-<!--            <p>药费:551.20元</p>-->
64
-
65
-          </div>
66
-          <div style="page-break-after:always"></div>
142
+          <p>审核:</p>
143
+          <p>配对:</p>
144
+          <p>核对:</p>
145
+          <p>发药:</p>
146
+          <p>
147
+            药费:{{
148
+              getTotalOne(item.id).toFixed(2)
149
+                ? getTotalOne(item.id).toFixed(2)
150
+                : 0
151
+            }}元
152
+          </p>
153
+          <!--            <p>药费:551.20元</p>-->
154
+        </div>
155
+        <div style="page-break-after: always"></div>
67 156
       </div>
68 157
     </div>
69
-
70 158
   </div>
71
-
72
-
73 159
 </template>
74 160
 <script>
75
-import { jsGetAge, uParseTime } from '@/utils/tools'
76
-import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail} from "@/api/project/project"
77
-import {getInitData} from "@/api/his/his"
161
+import { jsGetAge, uParseTime } from "@/utils/tools";
162
+import {
163
+  getAllDoctorList,
164
+  getPrescriptionPrint,
165
+  getHisPatientDetail,
166
+} from "@/api/project/project";
167
+import { getInitData } from "@/api/his/his";
78 168
 export default {
79
-    props:{
80
-      patient_id:Number,
81
-      record_date:String,
82
-      prescription_id:Number,
83
-      ids:String
169
+  props: {
170
+    patient_id: Number,
171
+    record_date: String,
172
+    prescription_id: Number,
173
+    ids: String,
174
+  },
175
+  data() {
176
+    return {
177
+      doctorList: [],
178
+      advicePrint: {},
179
+      patient: {},
180
+      tableData: [],
181
+      prescriptionInfo: [],
182
+      hisPatient: {},
183
+      department: [],
184
+      prescriptions: [],
185
+      projectList: [],
186
+      orgname: "",
187
+      diagnoses: [],
188
+      operatorMaps: {},
189
+    };
190
+  },
191
+  methods: {
192
+    // 电子签名
193
+    setAdminUserES(id) {
194
+      if (id == 0) {
195
+        return "";
196
+      }
197
+      if (id in this.operatorMaps) {
198
+        return this.operatorMaps[id].url;
199
+      } else {
200
+        return "";
201
+      }
84 202
     },
85
-    data(){
86
-      return {
87
-        doctorList:[],
88
-        advicePrint:{},
89
-        patient:{},
90
-        tableData:[],
91
-        prescriptionInfo:[],
92
-        hisPatient:{},
93
-        department:[],
94
-        prescriptions:[],
95
-        projectList:[],
96
-        orgname:"",
97
-        diagnoses:[],
203
+    getAge(patient) {
204
+      var thisLen = patient.id_card_no.length;
205
+      var birth = "";
206
+      if (thisLen == 15) {
207
+        birth = "19" + patient.id_card_no.substr(6, 6);
208
+      } else {
209
+        birth = patient.id_card_no.substr(6, 8);
98 210
       }
211
+      var births =
212
+        birth.substr(0, 4) +
213
+        "-" +
214
+        birth.substr(4, 2) +
215
+        "-" +
216
+        birth.substr(6, 2);
217
+      return jsGetAge(births, "-");
99 218
     },
100
-   methods:{
101
-     getAge(patient){
102
-       var thisLen = patient.id_card_no.length
103
-       var birth = ''
104
-       if (thisLen == 15) {
105
-         birth = '19' + patient.id_card_no.substr(6, 6)
106
-       } else {
107
-         birth = patient.id_card_no.substr(6, 8)
108
-       }
109
-       var births =
110
-         birth.substr(0, 4) +
111
-         '-' +
112
-         birth.substr(4, 2) +
113
-         '-' +
114
-         birth.substr(6, 2)
115
-       return jsGetAge(births, '-')
116 219
 
117
-     },
220
+    getAllDoctorList() {
221
+      getAllDoctorList().then((response) => {
222
+        if (response.data.state == 1) {
223
+          var doctor = response.data.data.doctor;
118 224
 
119
-     getAllDoctorList(){
120
-      getAllDoctorList().then(response=>{
121
-        if(response.data.state == 1){
122
-               var doctor =  response.data.data.doctor
123
-
124
-               this.doctorList = doctor
125
-             }
126
-         })
127
-     },
225
+          this.doctorList = doctor;
226
+        }
227
+      });
228
+    },
128 229
 
129
-      getDoctor(id){
130
-        var name = ""
131
-        for(let i=0;i<this.doctorList.length;i++){
132
-          if(id == this.doctorList[i].admin_user_id){
133
-              name = this.doctorList[i].user_name
230
+    getDoctor(id) {
231
+      var name = "";
232
+      for (let i = 0; i < this.doctorList.length; i++) {
233
+        if (id == this.doctorList[i].admin_user_id) {
234
+          name = this.doctorList[i].user_name;
235
+        }
236
+      }
237
+      return name;
238
+    },
239
+    getTime(value, temp) {
240
+      if (value != undefined) {
241
+        return uParseTime(value, temp);
242
+      }
243
+      return "";
244
+    },
245
+    getPrescriptionPrint() {
246
+      var params = {
247
+        // patient_id:this.patient_id,
248
+        // record_date:this.record_date,
249
+        // prescription_id:this.prescription_id,
250
+        patient_id: this.patient_id,
251
+        record_date: this.record_date,
252
+        prescription_id: this.prescription_id,
253
+        ids: this.ids,
254
+        p_type: 1,
255
+      };
256
+      console.log("params", params);
257
+      getPrescriptionPrint(params).then((response) => {
258
+        if (response.data.state == 1) {
259
+          var advicePrint = response.data.data.advicePrint;
260
+          console.log("adviceprint9999", advicePrint);
261
+          this.advicePrint = advicePrint;
262
+          this.prescriptions = advicePrint;
263
+          if (this.advicePrint.length > 0) {
264
+            var operatorsLen = this.advicePrint.length;
265
+            for (var index = 0; index < operatorsLen; index++) {
266
+              this.$set(
267
+                this.operatorMaps,
268
+                this.operators[index].creator,
269
+                this.operators[index]
270
+              );
271
+            }
134 272
           }
273
+          console.log("处方222222", this.prescriptions);
274
+          var hisPatient = response.data.data.hisHospitalRecord;
275
+          this.hisPatient = hisPatient;
276
+          var projectlist = response.data.data.projectlist;
277
+          console.log("所有项目列表", projectlist);
278
+          this.projectList = projectlist;
135 279
         }
136
-        return name
137
-      },
138
-      getTime(value, temp) {
139
-        if (value != undefined) {
140
-            return uParseTime(value, temp)
280
+      });
281
+    },
282
+    getHisPatientDetail() {
283
+      const params = {
284
+        patient_id: this.patient_id,
285
+      };
286
+      getHisPatientDetail(params).then((response) => {
287
+        if (response.data.state == 1) {
288
+          var hisPatient = response.data.data.hisHospitalRecord;
289
+          console.log("挂号病人", hisPatient);
290
+          this.hisPatient = hisPatient;
141 291
         }
142
-        return ''
143
-     },
144
-       getPrescriptionPrint(){
145
-         var params = {
146
-          // patient_id:this.patient_id,
147
-          // record_date:this.record_date,
148
-          // prescription_id:this.prescription_id,
149
-          patient_id:this.patient_id,
150
-          record_date:this.record_date,
151
-          prescription_id:this.prescription_id,
152
-          ids:this.ids,
153
-          p_type:1,
292
+      });
293
+    },
294
+    getInitData() {
295
+      getInitData().then((response) => {
296
+        if (response.data.state == 1) {
297
+          this.department = response.data.data.department;
298
+          this.diagnoses = response.data.data.diagnose;
299
+          console.log("争端", this.diagnoses);
154 300
         }
155
-        console.log("params",params)
156
-       getPrescriptionPrint(params).then(response=>{
157
-         if(response.data.state == 1){
158
-            var advicePrint =  response.data.data.advicePrint
159
-            console.log("adviceprint9999",advicePrint)
160
-            this.advicePrint = advicePrint
161
-            this.prescriptions = advicePrint
162
-            console.log("处方222222",this.prescriptions)
163
-            var hisPatient = response.data.data.hisHospitalRecord
164
-            this.hisPatient = hisPatient
165
-            var projectlist =  response.data.data.projectlist
166
-            console.log("所有项目列表",projectlist)
167
-            this.projectList = projectlist
168
-          }
169
-       })
170
-     },
171
-     getHisPatientDetail(){
172
-          const params = {
173
-              patient_id:this.patient_id,
174
-          }
175
-       getHisPatientDetail(params).then(response=>{
176
-          if(response.data.state == 1){
177
-             var hisPatient =  response.data.data.hisHospitalRecord
178
-             console.log("挂号病人",hisPatient)
179
-             this.hisPatient = hisPatient
180
-          }
181
-       })
182
-     },
183
-     getInitData(){
184
-       getInitData().then(response=>{
185
-          if(response.data.state == 1){
186
-            this.department = response.data.data.department
187
-            this.diagnoses = response.data.data.diagnose
188
-            console.log("争端",this.diagnoses)
189
-          }
190
-       })
191
-     },
192
-     getDepart(id){
193
-         var name = ""
194
-       for(let i=0;i<this.department.length;i++){
195
-           if(id == this.department[i].id){
196
-               name = this.department[i].name
197
-           }
198
-       }
199
-       return name
200
-     },
301
+      });
302
+    },
303
+    getDepart(id) {
304
+      var name = "";
305
+      for (let i = 0; i < this.department.length; i++) {
306
+        if (id == this.department[i].id) {
307
+          name = this.department[i].name;
308
+        }
309
+      }
310
+      return name;
311
+    },
201 312
     getTotalOne(id) {
202
-
203
-        var total = 0
204
-        var addtotal = 0
205
-        for (let i = 0; i < this.prescriptions.length; i++) {
206
-          if(id == this.prescriptions[i].id){
207
-            if (this.prescriptions[i].project != null) {
208
-              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
209
-                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
210
-              }
313
+      var total = 0;
314
+      var addtotal = 0;
315
+      for (let i = 0; i < this.prescriptions.length; i++) {
316
+        if (id == this.prescriptions[i].id) {
317
+          if (this.prescriptions[i].project != null) {
318
+            for (let a = 0; a < this.prescriptions[i].project.length; a++) {
319
+              total =
320
+                total +
321
+                this.prescriptions[i].project[a].price *
322
+                  this.prescriptions[i].project[a].count;
211 323
             }
324
+          }
212 325
 
213
-            if (this.prescriptions[i].additionalcharge != null) {
214
-              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
215
-                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
216
-              }
326
+          if (this.prescriptions[i].additionalcharge != null) {
327
+            for (
328
+              let a = 0;
329
+              a < this.prescriptions[i].additionalcharge.length;
330
+              a++
331
+            ) {
332
+              addtotal =
333
+                addtotal +
334
+                this.prescriptions[i].additionalcharge[a].price *
335
+                  this.prescriptions[i].additionalcharge[a].count;
217 336
             }
218
-              addtotal =  Math.floor(addtotal * 100) / 100
337
+          }
338
+          addtotal = Math.floor(addtotal * 100) / 100;
219 339
         }
220
-
221
-       }
340
+      }
222 341
 
223 342
       for (let i = 0; i < this.prescriptions.length; i++) {
224
-          if(id == this.prescriptions[i].id){
225
-            if (this.prescriptions[i].advices != null) {
226
-              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
227
-                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
228
-              }
343
+        if (id == this.prescriptions[i].id) {
344
+          if (this.prescriptions[i].advices != null) {
345
+            for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
346
+              total =
347
+                total +
348
+                this.prescriptions[i].advices[a].price *
349
+                  this.prescriptions[i].advices[a].prescribing_number;
229 350
             }
351
+          }
230 352
 
231
-            if (this.prescriptions[i].additionalcharge != null) {
232
-              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
233
-                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
234
-              }
353
+          if (this.prescriptions[i].additionalcharge != null) {
354
+            for (
355
+              let a = 0;
356
+              a < this.prescriptions[i].additionalcharge.length;
357
+              a++
358
+            ) {
359
+              addtotal =
360
+                addtotal +
361
+                this.prescriptions[i].additionalcharge[a].price *
362
+                  this.prescriptions[i].additionalcharge[a].count;
235 363
             }
236
-              addtotal =  Math.floor(addtotal * 100) / 100
364
+          }
365
+          addtotal = Math.floor(addtotal * 100) / 100;
237 366
         }
238
-       }
367
+      }
239 368
 
240
-        return total + addtotal
241
-      },
369
+      return total + addtotal;
370
+    },
242 371
 
243
-     getProjectName(id){
244
-        var project_name = ""
245
-        for(let i=0;i<this.projectList.length;i++){
246
-           if(id == this.projectList[i].id){
247
-               project_name = this.projectList[i].project_name
248
-           }
372
+    getProjectName(id) {
373
+      var project_name = "";
374
+      for (let i = 0; i < this.projectList.length; i++) {
375
+        if (id == this.projectList[i].id) {
376
+          project_name = this.projectList[i].project_name;
249 377
         }
250
-        return project_name
251
-     },
252
-
253
-     getDiagnosis(id) {
254
-       let arr = id.split(',')
255
-       var name = ''
256
-       for (let i = 0; i < this.diagnoses.length; i++) {
257
-         if (arr.indexOf(String(this.diagnoses[i].id)) > -1) {
258
-           name += this.diagnoses[i].class_name + ' '
259
-         }
260
-       }
261
-       return name
262
-     },
263
-
264
-   },
265
-   created(){
266
-      this.getAllDoctorList()
267
-      this.getInitData()
268
-      this.getPrescriptionPrint()
269
-      this.getHisPatientDetail()
270
-      var xtuser = this.$store.getters.xt_user;
271
-      this.orgname = xtuser.org.org_name;
378
+      }
379
+      return project_name;
380
+    },
272 381
 
273
-   },
274
-   watch:{
275
-     ids:function(val){
276
-      this.ids = val
277
-      this.getPrescriptionPrint()
278
-    }
279
-   }
280
-}
382
+    getDiagnosis(id) {
383
+      let arr = id.split(",");
384
+      var name = "";
385
+      for (let i = 0; i < this.diagnoses.length; i++) {
386
+        if (arr.indexOf(String(this.diagnoses[i].id)) > -1) {
387
+          name += this.diagnoses[i].class_name + " ";
388
+        }
389
+      }
390
+      return name;
391
+    },
392
+  },
393
+  created() {
394
+    this.getAllDoctorList();
395
+    this.getInitData();
396
+    this.getPrescriptionPrint();
397
+    this.getHisPatientDetail();
398
+    var xtuser = this.$store.getters.xt_user;
399
+    this.orgname = xtuser.org.org_name;
400
+  },
401
+  watch: {
402
+    ids: function (val) {
403
+      this.ids = val;
404
+      this.getPrescriptionPrint();
405
+    },
406
+  },
407
+};
281 408
 </script>
282 409
 
283 410
 
284 411
 <style lang="scss" scoped>
285
-.prescription-print{
286
-  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
287
-    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
288
-    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
289
-    margin-bottom: 20px;
290
-    padding:20px 10px;
412
+.prescription-print {
413
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
414
+    0 0 60px rgba(0, 0, 0, 0.06) inset;
415
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
416
+    0 0 40px rgba(0, 0, 0, 0.06) inset;
417
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
418
+  margin-bottom: 20px;
419
+  padding: 20px 10px;
291 420
 }
292
-.printTitle{
293
-    font-size: 22px;
294
-    text-align: center;
295
-    font-weight: bold;
421
+.printTitle {
422
+  font-size: 22px;
423
+  text-align: center;
424
+  font-weight: bold;
296 425
 }
297
-.infoTitle{
298
-    display: flex;
299
-    border-bottom: 2px solid #000;
300
-    margin-top:10px;
301
-    line-height: 24px;
302
-    padding:0 10px;
426
+.infoTitle {
427
+  display: flex;
428
+  border-bottom: 2px solid #000;
429
+  margin-top: 10px;
430
+  line-height: 24px;
431
+  padding: 0 10px;
303 432
 }
304
-.infoTitle p{
305
-    width: 200px;
433
+.infoTitle p {
434
+  width: 200px;
306 435
 }
307
-.infoMain{
308
-    display: flex;
309
-    flex-wrap: wrap;
310
-    border-bottom: 2px solid #000;
311
-    padding:0 10px;
436
+.infoMain {
437
+  display: flex;
438
+  flex-wrap: wrap;
439
+  border-bottom: 2px solid #000;
440
+  padding: 0 10px;
312 441
 }
313
-.infoMain div{
314
-    width: 50%;
315
-    line-height: 24px;
442
+.infoMain div {
443
+  width: 50%;
444
+  line-height: 24px;
316 445
 }
317
-.prescriptionBox{
318
-    padding:0 10px;
319
-    min-height:450px;
446
+.prescriptionBox {
447
+  padding: 0 10px;
448
+  min-height: 450px;
320 449
 }
321
-.Rp{
322
-    font-size: 22px;
323
-    font-weight: bold;
450
+.Rp {
451
+  font-size: 22px;
452
+  font-weight: bold;
324 453
 }
325
-.drugsBox{
326
-    padding-left: 40px;
327
-    margin-bottom: 10px;
454
+.drugsBox {
455
+  padding-left: 40px;
456
+  margin-bottom: 10px;
328 457
 }
329
-.drugsBox div{
330
-    line-height: 20px;
458
+.drugsBox div {
459
+  line-height: 20px;
331 460
 }
332
-.drugsOne{
333
-    line-height: 24px;
461
+.drugsOne {
462
+  line-height: 24px;
334 463
 }
335
-.drugsOne span{
336
-    margin-right: 20px;
464
+.drugsOne span {
465
+  margin-right: 20px;
337 466
 }
338
-.doctorBox{
339
-    display: flex;
340
-    justify-content: space-between;
341
-    padding:0 10px;
342
-    line-height: 24px;
343
-    border-bottom: 2px solid #000;
467
+.doctorBox {
468
+  display: flex;
469
+  justify-content: space-between;
470
+  padding: 0 10px;
471
+  line-height: 24px;
472
+  border-bottom: 2px solid #000;
344 473
 }
345
-.actionBar{
346
-    display: flex;
347
-    justify-content: space-between;
348
-    line-height: 24px;
349
-    padding:0 10px;
474
+.actionBar {
475
+  display: flex;
476
+  justify-content: space-between;
477
+  line-height: 24px;
478
+  padding: 0 10px;
350 479
 }
351
-.actionBar p{
352
-    width:150px;
480
+.actionBar p {
481
+  width: 150px;
353 482
 }
354 483
 </style>

文件差异内容过多而无法显示
+ 599 - 417
src/xt_pages/hospitalStation/template/printThree.vue


+ 1 - 1
src/xt_pages/hospitalStation/template/printTwo.vue 查看文件

@@ -15,7 +15,7 @@
15 15
             <div style="margin-bottom: 10px;">医保卡号:{{this.hisPatient.number?this.hisPatient.number:""}}</div>
16 16
             <div style="margin-bottom: 10px;">电话:{{patient.phone}}</div>
17 17
             <div>地址:{{patient.home_address}}</div>
18
-            <div style="display:flex;width:50%;">临床诊断:22222{{ getDiagnosis(advicePrint[0].info.diagnosis) }}</div>
18
+            <div style="display:flex;width:50%;">临床诊断:{{ getDiagnosis(advicePrint[0].info.diagnosis) }}</div>
19 19
         </div>
20 20
         <div class="prescriptionBox">
21 21
             <div class="Rp">Rp:</div>

+ 30 - 30
src/xt_pages/outpatientCharges/components/prescriptionTable.vue 查看文件

@@ -6,7 +6,6 @@
6 6
       border
7 7
       style="width: 99%"
8 8
       :row-style="changColor"
9
-      :row-class-name="tableRowClassName"
10 9
       :header-cell-style="{
11 10
         color: '#606266',
12 11
       }"
@@ -19,7 +18,13 @@
19 18
         width="40"
20 19
         label="序号"
21 20
       ></el-table-column>
22
-      <el-table-column fixed align="center" prop="name" width="400" label="名称">
21
+      <el-table-column
22
+        fixed
23
+        align="center"
24
+        prop="name"
25
+        width="400"
26
+        label="名称"
27
+      >
23 28
         <template slot-scope="scope"
24 29
           ><span :title="scope.row.drug_name">{{
25 30
             scope.row.drug_name
@@ -27,14 +32,10 @@
27 32
         >
28 33
       </el-table-column>
29 34
 
30
-      <el-table-column align="center" prop="name" width="70" label="单次用量">
35
+      <el-table-column align="center" prop="name" width="80" label="单次用量">
31 36
         <template slot-scope="scope">
32
-          <!--<el-input v-model="scope.row.single_dose" readonly style="width:65%;"></el-input>-->
33
-          <div>
34
-            {{ scope.row.single_dose }}&nbsp;&nbsp;{{
35
-              scope.row.single_dose_unit
36
-            }}
37
-          </div>
37
+          <!--<el-input v-model="scope.row.delivery_way" readonly></el-input>-->
38
+          <div>{{ scope.row.single_dose }}{{ scope.row.single_dose_unit }}</div>
38 39
         </template>
39 40
       </el-table-column>
40 41
       <el-table-column align="center" prop="name" width="80" label="用法">
@@ -54,16 +55,8 @@
54 55
       <el-table-column align="center" prop="day" width="80" label="天数">
55 56
         <template slot-scope="scope">{{ scope.row.day }}天</template>
56 57
       </el-table-column>
57
-
58 58
       <el-table-column align="center" prop="name" width="80" label="总量">
59
-        <template slot-scope="scope">
60
-          <!--<el-input v-model="scope.row.prescribing_number" style="width:60%" readonly placeholder=""></el-input>-->
61
-          <div>
62
-            {{ scope.row.prescribing_number }}&nbsp;&nbsp;{{
63
-              scope.row.prescribing_number_unit
64
-            }}
65
-          </div>
66
-        </template>
59
+        <template slot-scope="scope">{{ scope.row.prescribing_number }}{{scope.row.prescribing_number_unit}}</template>
67 60
       </el-table-column>
68 61
       <el-table-column align="center" prop="name" width="80" label="单价">
69 62
         <template slot-scope="scope">
@@ -163,7 +156,13 @@
163 156
         width="40"
164 157
         label="序号"
165 158
       ></el-table-column>
166
-      <el-table-column fixed align="center" prop="project_name" width="400" label="名称">
159
+      <el-table-column
160
+        fixed
161
+        align="center"
162
+        prop="project_name"
163
+        width="400"
164
+        label="名称"
165
+      >
167 166
         <template slot-scope="scope">{{ scope.row.project_name }}</template>
168 167
       </el-table-column>
169 168
       <el-table-column
@@ -347,17 +346,18 @@ export default {
347 346
   },
348 347
   methods: {
349 348
     changColor({ row, rowIndex }) {
350
-     if (rowIndex % 2 == 1) { // 变颜色的条件
351
-		return {
352
-		backgroundColor: "#C4E1FF",
353
-    color: '#303133'  // 这个return的就是样式 可以是color 也可以是backgroundColor
354
-		}
355
-	}else{
356
-    return {
357
-      backgroundColor:"#ACD6FF",
358
-      color: '#303133'
359
-    }
360
-  }
349
+      if (rowIndex % 2 == 1) {
350
+        // 变颜色的条件
351
+        return {
352
+          backgroundColor: "#C4E1FF",
353
+          color: "#303133", // 这个return的就是样式 可以是color 也可以是backgroundColor
354
+        };
355
+      } else {
356
+        return {
357
+          backgroundColor: "#ACD6FF",
358
+          color: "#303133",
359
+        };
360
+      }
361 361
     },
362 362
 
363 363
     getName(id) {

+ 1 - 1
src/xt_pages/outpatientCharges/components/registerDialog.vue 查看文件

@@ -702,7 +702,7 @@
702 702
         this.form.id_card_type = 2
703 703
         this.form.certificates = 1
704 704
 
705
-        if (this.$store.getters.xt_user.org_id == 10188){
705
+        if (this.$store.getters.xt_user.org_id == 10188  || this.$store.getters.xt_user.org_id == 10217){
706 706
           this.form.id_card_type = 1
707 707
         }
708 708
 

+ 8 - 4
src/xt_pages/outpatientCharges/invoicePrint.vue 查看文件

@@ -13,13 +13,15 @@
13 13
     </template>
14 14
     <div class="app-container" style="padding-top:40px;">
15 15
         <div class='dialysisPage'>
16
-          <div v-if="org_id != 10106 && org_id != 10215 && org_id != 4 && org_id != 10188 && org_id != 0" >
17
-            <printOne v-if="org_id != 10088" :paramsObj="invoiceParams"></printOne>
16
+          <div v-if="org_id != 10106 && org_id != 10215 && org_id != 4 && org_id != 10188 && org_id != 10217  && org_id != 0" >
17
+            <printOne v-if="org_id != 10088 " :paramsObj="invoiceParams"></printOne>
18 18
             <printThree v-if="org_id == 10088" :paramsObj="invoiceParams"></printThree>
19 19
           </div>
20 20
           <printTwo v-if="org_id == 10106" :paramsObj="invoiceParams"></printTwo>
21 21
           <printFour v-if="org_id == 10215 || org_id == 4" :paramsObj="invoiceParams"></printFour>
22
-          <printFive v-if="org_id == 10188 || org_id == 0" :paramsObj="invoiceParams"></printFive>
22
+          <printFive v-if="org_id == 10188 " :paramsObj="invoiceParams"></printFive>
23
+
24
+          <printSix v-if="org_id == 10217|| org_id == 0" :paramsObj="invoiceParams"></printSix>
23 25
         </div>
24 26
     </div>
25 27
   </div>
@@ -31,6 +33,7 @@ import printTwo from './invoiceTemplate/printTwo'
31 33
 import printThree from './invoiceTemplate/printThree'
32 34
 import printFour from './invoiceTemplate/printFour'
33 35
 import printFive from './invoiceTemplate/printFive'
36
+import printSix from './invoiceTemplate/printSix'
34 37
 export default {
35 38
    name: "invoicePrint",
36 39
   components: {
@@ -38,7 +41,8 @@ export default {
38 41
     printTwo,
39 42
     printThree,
40 43
     printFour,
41
-    printFive
44
+    printFive,
45
+    printSix
42 46
   },
43 47
   props:{
44 48
     invoiceParams:Object

+ 6 - 2
src/xt_pages/outpatientCharges/invoiceTemplate/printFour.vue 查看文件

@@ -6,14 +6,14 @@
6 6
         </div>
7 7
         <div style="display:flex;justify-content: space-between;">
8 8
             <!-- <div>{{ list.department_name }}</div> -->
9
-            <div  style="position: absolute;top:50px;left:260px">{{ list.id_card_no }}</div>
9
+            <div  style="position: absolute;top:50px;left:260px">{{ list.order.certno?list.order.certno:list.his.id_card_no?list.his.id_card_no:list.his_hospital_record.id_card_no}}</div>
10 10
             <div></div>
11 11
         </div>
12 12
         <div style="display:flex;justify-content: space-between;">
13 13
             <!-- <div>{{ list.department_name }}</div> -->
14 14
             <div  style="position: absolute;top:70px;left:90px">门诊</div>
15 15
             <div></div>
16
-            <div  style="position: absolute;top:70px;left:240px">{{ list.number }}</div>
16
+            <div  style="position: absolute;top:70px;left:240px">{{ list.order.mdtrt_id }}</div>
17 17
             <div  style="position: absolute;left:470px;top:70px;">
18 18
                 <span>{{  paramsObj.setl_time ? paramsObj.setl_time.split(' ')[0].slice(0,4) : getTime(list.date, '{y}-{m}-{d}').slice(0,4) }}</span>
19 19
             </div>
@@ -181,6 +181,10 @@ export default {
181 181
                 this.list = res.data.data
182 182
                 this.totalPrice = this.list.westernMedicineCostTotal + this.list.checkCostTotal + this.list.treatCostTotal + this.list.bedCostTotal + this.list.chineseTraditionalMedicineCostTotal +
183 183
                                     this.list.laboratoryCostTotal + this.list.operationCostTotal + this.list.otherCostTotal + this.list.materialCostTotal
184
+                if(this.totalPrice == 0){
185
+
186
+                  this.totalPrice = this.list.medfee_sumamt
187
+                }
184 188
                 this.smalltoBIG(this.totalPrice)
185 189
                 var data = new Date(res.data.data.date * 1000);
186 190
                 var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;

+ 231 - 0
src/xt_pages/outpatientCharges/invoiceTemplate/printSix.vue 查看文件

@@ -0,0 +1,231 @@
1
+<template>
2
+    <div id='invoice-print'>
3
+        <div v-for='(i,index) in pageArr.length' :key="index">
4
+            <div :style="{position: 'absolute',top:(10 + (index * 400))  + 'px',left:130+ 'px',}">盐城大丰悦达金骆驼血液透析中心</div>
5
+            <div :style="{position: 'absolute',top:(40 + (index * 400))  + 'px',left:90+ 'px',}">{{ list.order_number }}</div>
6
+            <div style="display:flex;justify-content: space-between;">
7
+                <div :style="{position: 'absolute',top:(70 + (index * 400))  + 'px',left:80+ 'px',}">{{ paramsObj.name }}</div>
8
+            </div>
9
+            <div :style="{position: 'absolute',top:(130 + (index * 400))  + 'px',left:80+ 'px',}">
10
+                <div v-if="list.westernMedicineCostTotal">西药 {{ list.westernMedicineCostTotal }}</div>
11
+                <div v-if="list.treatCostTotal">治疗费 {{ list.treatCostTotal }}</div>
12
+                <div v-if="list.bedCostTotal">床位费 {{ list.bedCostTotal }}</div>
13
+                <div v-if="list.chineseTraditionalMedicineCostTotal">中成药 {{ list.chineseTraditionalMedicineCostTotal }}</div>
14
+                <div v-if="list.laboratoryCostTotal">化验费 {{ list.laboratoryCostTotal }}</div>
15
+                <div v-if="list.operationCostTotal">手术费 {{ list.operationCostTotal }}</div>
16
+                <div v-if="list.otherCostTotal">其他费 {{ list.otherCostTotal }}</div>
17
+                <div v-if="list.materialCostTotal">材料费 {{ list.materialCostTotal }}</div>
18
+            </div>
19
+            <div :style="{position: 'absolute',top:(130 + (index * 400))  + 'px',left:260+ 'px'}">
20
+                <div v-for="item in list.order_info.slice(index * 10,(index * 10) + pageArr[index])">
21
+                    <span style="display:inline-block;width:200px;">
22
+                        <span v-if="item.advice.id == 0">
23
+                            <span v-if="item.project.type == 2"> {{ item.project.project.project_name }}</span>
24
+                            <span v-if="item.project.type == 3">{{ item.project.good_info.good_name }}</span>
25
+                        </span>
26
+                        <span v-else>{{ item.advice.advice_name }}</span>
27
+                    </span>
28
+                    <span style="display:inline-block;width:50px;">
29
+                        <span v-if="item.advice.id == 0">
30
+                            <span v-if="item.project.type == 2">{{ item.project.count }}{{ item.project.unit }}</span>
31
+                            <span v-if="item.project.type == 3">{{ item.project.count }}{{ item.project.unit }}</span>
32
+                        </span>
33
+                        <span v-else>{{ item.advice.prescribing_number }}{{ item.advice.prescribing_number_unit }}</span>
34
+                    </span>
35
+                    <span>
36
+                        <span v-if="item.advice.id == 0">
37
+                            <span v-if="item.project.type == 2">{{ (item.project.count * item.pric).toFixed(2) }}</span>
38
+                            <span v-if="item.project.type == 3">{{ (item.project.count * item.pric).toFixed(2) }}</span>
39
+                        </span>
40
+                        <span v-else>{{ (item.advice.prescribing_number * item.pric).toFixed(2) }}</span>
41
+                    </span>
42
+                </div>
43
+            </div>
44
+            <div :style="{position: 'absolute',top:(345 + (index * 400))  + 'px',left:110+ 'px'}">{{ zhongwen }}</div>
45
+            <div :style="{position: 'absolute',top:(345 + (index * 400))  + 'px',left:460+ 'px'}">{{ list.medfee_sumamt }}</div>
46
+            <div v-if="index == pageArr.length - 1" :style="{position: 'absolute',top:(360 + (index * 400))  + 'px',left:110+ 'px',width:100 + '%',fontSize:12+'px'}">
47
+                <div style="display:flex;">
48
+                  <div style="width:140px">医疗总费用:{{ list.order.medfee_sumamt }}</div>
49
+                  <div style="width:140px">基金支付总额:{{ list.order.fund_pay_sumamt }}</div>
50
+                  <div style="width:140px">统筹支出:{{ list.order.hifp_pay }}</div>
51
+                  <div style="width:140px">大病支出:{{list.order.hifmi_pay}}</div>
52
+
53
+                </div>
54
+                <div style="display:flex;">
55
+                  <div style="width:140px">个人账户支付:{{ list.order.acct_pay }}</div>
56
+                  <div style="width:140px">现金支出:{{ list.order.psn_cash_pay }}</div>
57
+                  <div style="width:140px">本次账户:0</div>
58
+                  <div style="width:140px">上次账户:0</div>
59
+                </div>
60
+              <div style="display:flex;">
61
+                <div style="width:140px">账户余额:{{ list.order.balc }}</div>
62
+                <div style="width:140px">其他支出:{{ list.order.oth_pay }}</div>
63
+                <div style="width:140px">大病补充保险支出:0</div>
64
+                <div style="width:140px">民政支出:0</div>
65
+              </div>
66
+              <div style="display:flex;">
67
+                <div style="width:220px">医疗救助基金支出:{{ list.order.maf_pay }}</div>
68
+                <div style="width:280px">企业补充医疗保险基金支出:{{ list.order.hifes_pay }}</div>
69
+              </div>
70
+
71
+            </div>
72
+            <div>
73
+                <div :style="{position: 'absolute',top:(420 + (index * 400))  + 'px',left:100+ 'px'}">盐城大丰悦达金骆驼血液透析中心</div>
74
+                <div :style="{position: 'absolute',top:(420 + (index * 400))  + 'px',left:360+ 'px'}">{{ paramsObj.chargeName }}</div>
75
+                <div :style="{position: 'absolute',top:(420 + (index * 400))  + 'px',left:520+ 'px'}">
76
+                    <span>{{  paramsObj.setl_time ? paramsObj.setl_time.split(' ')[0].slice(0,4) : getTime(list.date, '{y}-{m}-{d}').slice(0,4) }}</span>
77
+                </div>
78
+                <div :style="{position: 'absolute',top:(420 + (index * 400))  + 'px',left:560+ 'px'}">
79
+                    <span>{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(5,7)) : getTime(list.date, '{y}-{m}-{d}').slice(5,7) }}</span>
80
+                </div>
81
+                <div :style="{position: 'absolute',top:(420 + (index * 400))  + 'px',left:600+ 'px'}">
82
+                    <span>{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(8,11)) : getTime(list.date, '{y}-{m}-{d}').slice(8,11) }}</span>
83
+                </div>
84
+            </div>
85
+        </div>
86
+    </div>
87
+</template>
88
+
89
+
90
+<script>
91
+import { getInvoice } from '@/api/project/project'
92
+import { uParseTime } from '@/utils/tools'
93
+export default {
94
+    props:{
95
+        paramsObj:Object
96
+    },
97
+    data(){
98
+        return{
99
+            list:{},
100
+            printDate:'',
101
+            zhongwen:'',
102
+            totalPrice:0.0,
103
+            org_id:'',
104
+            org_name:'',
105
+            page:1,
106
+            pageArr:[],
107
+        }
108
+    },
109
+    created(){
110
+        console.log('paramsObj',this.paramsObj)
111
+        let params = {
112
+            order_id: this.paramsObj.order_id,
113
+            patient_id: this.paramsObj.patient_id,
114
+        }
115
+        this.getInvoice(params)
116
+        // var data = new Date();
117
+        // var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
118
+        // var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
119
+        // this.printDate = data.getFullYear() + "-" + month + "-" + date;
120
+        // this.smalltoBIG(982732.21)
121
+        this.org_id = this.$store.getters.xt_user.org_id
122
+        this.org_name = this.$store.getters.xt_user.org.org_name
123
+    },
124
+    methods:{
125
+        getInvoice(params){
126
+            getInvoice(params).then((res) => {
127
+                console.log('res',res)
128
+                this.list = res.data.data
129
+                console.log(this.list,'表单内容打印记得注释')
130
+                this.totalPrice = this.list.westernMedicineCostTotal + this.list.checkCostTotal + this.list.treatCostTotal + this.list.bedCostTotal + this.list.chineseTraditionalMedicineCostTotal +
131
+                                    this.list.laboratoryCostTotal + this.list.operationCostTotal + this.list.otherCostTotal + this.list.materialCostTotal
132
+                this.smalltoBIG(this.list.medfee_sumamt)
133
+                var data = new Date(res.data.data.date * 1000);
134
+                var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
135
+                var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
136
+                this.printDate = data.getFullYear() + "-" + month + "-" + date;
137
+                this.pageArr = []
138
+                this.getPage()
139
+                console.log('pageArr',this.pageArr)
140
+            })
141
+        },
142
+        smalltoBIG(n) {
143
+            // let fraction = ['角', '分'];
144
+            // let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
145
+            // let unit = [['元.', '万,', '亿,'], ["元",'拾', '佰', '仟']];
146
+            // let head = price < 0 ? '欠' : '';
147
+            // price = Math.abs(price);
148
+            // let upper = '';
149
+            // for (let i = 0; i < fraction.length; i++) {
150
+            // upper += (digit[Math.floor(price * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
151
+            // }
152
+            // upper = upper || '整';
153
+            // price = Math.floor(price);
154
+            // for (let i = 0; i < unit[0].length && price > 0; i++) {
155
+            // let p = '';
156
+            // for (let j = 0; j < unit[1].length && price > 0; j++) {
157
+            //     p = digit[price % 10] + unit[1][j] + p;
158
+            //     price = Math.floor(price / 10);
159
+            // }
160
+            // upper = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + upper;
161
+            // }
162
+            // this.zhongwen = head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整')
163
+            // console.log('6666',head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整'))
164
+            if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n)){
165
+                return "数据非法";  //判断数据是否大于0
166
+            }
167
+
168
+            var unit = "仟佰拾亿仟佰拾万仟佰拾元角分", str = "";
169
+            n += "00";
170
+
171
+            var indexpoint = n.indexOf('.');  // 如果是小数,截取小数点前面的位数
172
+
173
+            if (indexpoint >= 0){
174
+
175
+                n = n.substring(0, indexpoint) + n.substr(indexpoint+1, 2);   // 若为小数,截取需要使用的unit单位
176
+            }
177
+
178
+            unit = unit.substr(unit.length - n.length);  // 若为整数,截取需要使用的unit单位
179
+            for (var i=0; i < n.length; i++){
180
+                str += "零壹贰叁肆伍陆柒捌玖".charAt(n.charAt(i)) + unit.charAt(i);  //遍历转化为大写的数字
181
+            }
182
+            console.log("str",str)
183
+            if(str == '零元零角零分'){
184
+                this.zhongwen = '零'
185
+            }else{
186
+                this.zhongwen =  str.replace(/零(仟|佰|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
187
+            }
188
+
189
+            console.log(this.zhongwen)
190
+        },
191
+        getTime(value, temp) {
192
+            if (value == 0) {
193
+                return ''
194
+            }
195
+            if (value != undefined) {
196
+                return uParseTime(value, temp)
197
+            }
198
+            return ''
199
+        },
200
+        getPage(){
201
+        if(this.list.order_info.length <= 10){
202
+            this.page = 1
203
+            this.pageArr.push(this.list.order_info.length)
204
+        }else if(this.list.order_info.length > 10){
205
+            this.page = parseInt(this.list.order_info.length / 10)
206
+            let num = this.list.order_info.length % 10
207
+            for (var i=0;i<this.page;i++){
208
+                this.pageArr.push(10)
209
+            }
210
+            if(num != 0){
211
+                this.pageArr.push(num)
212
+            }
213
+        }
214
+      }
215
+
216
+    },
217
+    watch:{
218
+        paramsObj:{//深度监听,可监听到对象、数组的变化
219
+            handler(val, oldVal){
220
+                let params = {
221
+                    order_id: val.order_id,
222
+                    patient_id: val.patient_id,
223
+                }
224
+                this.getInvoice(params)
225
+
226
+            },
227
+            deep:true
228
+        }
229
+    }
230
+}
231
+</script>

+ 116 - 98
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue 查看文件

@@ -46,7 +46,7 @@
46 46
           </el-button>
47 47
         </div>
48 48
         <div>
49
-          <el-table :data="patientTableData" :height="tableHeight" border style="width: 100%;"
49
+          <el-table  :data="patientTableData" :height="tableHeight" border style="width: 100%;"
50 50
                     :row-style="{ color: '#303133' }"
51 51
 
52 52
                     :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
@@ -60,6 +60,22 @@
60 60
               </template>
61 61
             </el-table-column>
62 62
           </el-table>
63
+
64
+<!--          <el-table v-else :data="monthChargePatientTableData" :height="tableHeight" border style="width: 100%;"-->
65
+<!--                    :row-style="{ color: '#303133' }"-->
66
+
67
+<!--                    :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"-->
68
+<!--                    highlight-current-row ref="tab"-->
69
+<!--                    @current-change="handleCurrentChange">-->
70
+<!--            <el-table-column align="center" prop="name" label="姓名" wdith='89'>-->
71
+<!--              <template slot-scope="scope">{{ scope.row.name }}</template>-->
72
+<!--            </el-table-column>-->
73
+<!--            <el-table-column align="center" prop="name" label="就诊号" width="110">-->
74
+<!--              <template slot-scope="scope">{{ scope.row.number ? scope.row.number : '' }}-->
75
+<!--              </template>-->
76
+<!--            </el-table-column>-->
77
+<!--          </el-table>-->
78
+
63 79
         </div>
64 80
       </div>
65 81
 
@@ -305,7 +321,6 @@
305 321
                         :editable="false"
306 322
                         style="width: 150px;"
307 323
                         type="date"
308
-                        :picker-options="pickerOptions"
309 324
                         placeholder="选择开始时间"
310 325
                         align="right"
311 326
                         format="yyyy-MM-dd"
@@ -328,9 +343,6 @@
328 343
                   <div>
329 344
                     <div class="tabsBox" v-for="(items, index) in big_month_prescriptions">
330 345
                       <div style="height: calc(100% - 60px);">
331
-
332
-
333
-                        <!-- <el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button> -->
334 346
                         <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card"
335 347
                                  @tab-click="tabclickEventTwo">
336 348
 
@@ -344,7 +356,7 @@
344 356
                           <el-button
345 357
                               v-if="radio == 1"
346 358
                               size="small"
347
-                              @click="openMonthDialog(item)"
359
+                              @click="openMonthDialog(items)"
348 360
                               type="primary"
349 361
                           >修改医疗类型
350 362
                           </el-button>
@@ -354,19 +366,21 @@
354 366
                             <div>
355 367
 
356 368
                               <el-button
357
-                                  v-if="(hisPatientInfo.id > 0 && items.curMonthPrescriptions.order.id == 0) "
369
+                                  v-if="(hisPatientInfo.balance_accounts_type != 2 && hisPatientInfo.id > 0 &&  items.curMonthPrescriptions.order.id == 0)"
358 370
                                   size="small"
359 371
                                   @click="open(8,items.med_type,items.curMonthPrescriptions.order,items.month_prescriptions)"
360 372
                                   type="primary"
361 373
                               >预结算
362 374
                               </el-button>
363
-                              <!--<el-button-->
364
-                              <!--v-if="items.curMonthPrescriptions.order.order_status == 1"-->
365
-                              <!--size="small" @click="open(11)" type="primary"-->
366
-                              <!--&gt;撤销明细-->
367
-                              <!--</el-button>-->
375
+                              <el-button
376
+                                  v-if="items.curMonthPrescriptions.order.order_status == 1"
377
+                                  size="small"
378
+                                  @click="open(11,items.med_type,items.curMonthPrescriptions.order,items.month_prescriptions)"
379
+                                  type="primary"
380
+                              >撤销明细
381
+                              </el-button>
368 382
 
369
-                              <el-button v-loading="loadingtwo"
383
+                              <el-button
370 384
                                          v-if="(hisPatientInfo.id > 0 && items.curMonthPrescriptions.order.id == 0) || items.curMonthPrescriptions.order.order_status == 1 ||  items.curMonthPrescriptions.order.order_status == 3"
371 385
                                          size="small"
372 386
                                          @click="open(4,items.med_type,items.curMonthPrescriptions.order,items.month_prescriptions)"
@@ -561,32 +575,32 @@
561 575
                                 type="primary"
562 576
                             >修改医疗类型
563 577
                             </el-button>
564
-                            <div style="margin-bottom:10px;float: right">
565
-                              <div>
566
-                                <el-button
567
-                                    v-if="(hisPatientInfo.id > 0 &&  items.prescriptions[0].order.id == 0)"
568
-                                    size="small"
569
-                                    @click="open(8,items.med_type,items.prescriptions[0].order,items.prescriptions)"
570
-                                    type="primary"
571
-                                >预结算
572
-                                </el-button>
573
-                                <el-button
574
-                                    v-if="items.curPrescriptions.order.order_status == 1 && hisPatientInfo.balance_accounts_type != 2"
575
-                                    size="small"
576
-                                    @click="open(11,items.med_type,items.prescriptions[0].order,items.prescriptions)"
577
-                                    type="primary"
578
-                                >撤销明细
579
-                                </el-button>
580
-
581
-
582
-                                <el-button v-loading="loadingtwo"
583
-                                           v-if="(hisPatientInfo.id > 0 && items.curPrescriptions.order.id == 0) || items.curPrescriptions.order.order_status == 1 ||  items.curPrescriptions.order.order_status == 3"
584
-                                           size="small"
585
-                                           @click="open(4,items.med_type,items.curPrescriptions.order,items.prescriptions)"
586
-                                           type="primary">收费
587
-                                </el-button>
588
-                              </div>
589
-                            </div>
578
+<!--                            <div style="margin-bottom:10px;float: right">-->
579
+<!--                              <div>-->
580
+<!--                                <el-button-->
581
+<!--                                    v-if="(hisPatientInfo.id > 0 &&  items.prescriptions[0].order.id == 0)"-->
582
+<!--                                    size="small"-->
583
+<!--                                    @click="open(8,items.med_type,items.prescriptions[0].order,items.prescriptions)"-->
584
+<!--                                    type="primary"-->
585
+<!--                                >预结算-->
586
+<!--                                </el-button>-->
587
+<!--                                <el-button-->
588
+<!--                                    v-if="items.curPrescriptions.order.order_status == 1 && hisPatientInfo.balance_accounts_type != 2"-->
589
+<!--                                    size="small"-->
590
+<!--                                    @click="open(11,items.med_type,items.prescriptions[0].order,items.prescriptions)"-->
591
+<!--                                    type="primary"-->
592
+<!--                                >撤销明细-->
593
+<!--                                </el-button>-->
594
+
595
+
596
+<!--                                <el-button v-loading="loadingtwo"-->
597
+<!--                                           v-if="(hisPatientInfo.id > 0 && items.curPrescriptions.order.id == 0) || items.curPrescriptions.order.order_status == 1 ||  items.curPrescriptions.order.order_status == 3"-->
598
+<!--                                           size="small"-->
599
+<!--                                           @click="open(4,items.med_type,items.curPrescriptions.order,items.prescriptions)"-->
600
+<!--                                           type="primary">收费-->
601
+<!--                                </el-button>-->
602
+<!--                              </div>-->
603
+<!--                            </div>-->
590 604
                           </el-tab-pane>
591 605
 
592 606
 
@@ -876,6 +890,7 @@ export default {
876 890
   },
877 891
   data() {
878 892
     return {
893
+      monthChargePatientTableData:[],
879 894
       invoiceVisible:false,
880 895
       invoiceParams:null,
881 896
       temp_med_type: '',
@@ -939,7 +954,9 @@ export default {
939 954
         { value: '1112', label: '精二' },
940 955
         { value: '9933', label: '门诊特殊病(9933)' },
941 956
         { value: '990602', label: '门诊特殊病(990602)' },
942
-        { value: '1402', label: '门诊特殊病(1402)' }
957
+        { value: '1402', label: '门诊特殊病(1402)' },
958
+        { value: '0', label: '自费' }
959
+
943 960
 
944 961
       ],
945 962
       register_two: [
@@ -948,7 +965,8 @@ export default {
948 965
         { value: '9922', label: '家庭通道' },
949 966
         { value: '9933', label: '门诊特殊病(9933)' },
950 967
         { value: '990602', label: '门诊特殊病(990602)' },
951
-        { value: '1402', label: '门诊特殊病(1402)' }
968
+        { value: '1402', label: '门诊特殊病(1402)' },
969
+        { value: '0', label: '自费' }
952 970
 
953 971
       ],
954 972
       loading: false,
@@ -1138,7 +1156,9 @@ export default {
1138 1156
     },
1139 1157
     openMonthDialog(item) {
1140 1158
       this.dialogVisible = true
1159
+      console.log(item)
1141 1160
       this.temp_month_prescriptions = item
1161
+      console.log(this.temp_month_prescriptions)
1142 1162
     },
1143 1163
     openMonthDialogTwo(item) {
1144 1164
       this.dialogVisible = true
@@ -1266,18 +1286,23 @@ export default {
1266 1286
       cb(results)
1267 1287
     },
1268 1288
     changeTime(val) {
1269
-      let params = {
1270
-        patient_id: this.patientInfo.id,
1271
-        start_time: val,
1272
-        end_time: this.other_end_time,
1273
-        p_type: 2,
1274
-        type: this.radio
1289
+      const params = {
1290
+        'record_date': this.record_date,
1291
+        'patient_id': this.patientInfo.id,
1292
+        'his_patient_id': this.hisPatientInfo.id,
1293
+        'start_time': val,
1294
+        'end_time': this.other_end_time,
1295
+        'type': this.radio,
1296
+        'p_type': 2,
1297
+        'order_id': this.order.id
1275 1298
 
1276 1299
       }
1277
-      getDayOrMonthHisPrescription(params).then(response => {
1300
+      getMonthCharge(params).then(response => {
1278 1301
         if (response.data.state == 1) {
1302
+          this.loading = false
1303
+
1279 1304
           this.month_prescriptions = []
1280
-          this.setMonthPrescription(response.data.data.day_prescription)
1305
+          this.setMonthPrescription(response.data.data.month_prescriptions)
1281 1306
           this.curMonthPrescriptions = this.month_prescriptions[0]
1282 1307
 
1283 1308
         } else {
@@ -1285,19 +1310,26 @@ export default {
1285 1310
         }
1286 1311
       })
1287 1312
 
1313
+
1314
+
1288 1315
     },
1289 1316
     changeEndTime(val) {
1290
-      let params = {
1291
-        patient_id: this.patientInfo.id,
1292
-        start_time: this.other_start_time,
1293
-        end_time: val,
1294
-        p_type: 2
1317
+      const params = {
1318
+        'record_date': this.record_date,
1319
+        'patient_id': this.patientInfo.id,
1320
+        'his_patient_id': this.hisPatientInfo.id,
1321
+        'start_time': this.other_start_time,
1322
+        'end_time': val,
1323
+        'type': this.radio,
1324
+        'p_type': 2,
1325
+        'order_id': this.order.id
1295 1326
 
1296 1327
       }
1297
-      getDayOrMonthHisPrescription(params).then(response => {
1328
+      getMonthCharge(params).then(response => {
1298 1329
         if (response.data.state == 1) {
1330
+          this.loading = false
1299 1331
           this.month_prescriptions = []
1300
-          this.setMonthPrescription(response.data.data.day_prescription)
1332
+          this.setMonthPrescription(response.data.data.month_prescriptions)
1301 1333
           this.curMonthPrescriptions = this.month_prescriptions[0]
1302 1334
 
1303 1335
         } else {
@@ -1422,8 +1454,8 @@ export default {
1422 1454
                   })
1423 1455
 
1424 1456
                 } else {
1425
-                  that.changeRadioAndPatient(2)
1426 1457
                   that.radio = 2
1458
+                  that.changeRadioAndPatient(2)
1427 1459
                   that.$refs.charge.hide()
1428 1460
                   that.loadingtwo = false
1429 1461
                   that.state = '已收费'
@@ -1496,6 +1528,7 @@ export default {
1496 1528
                     }).catch(() => {
1497 1529
                     })
1498 1530
                   } else {
1531
+
1499 1532
                     that.changeRadio(1)
1500 1533
                     that.$refs.register9504.hide()
1501 1534
                     that.$message({ message: '挂号成功', type: 'success' })
@@ -1561,6 +1594,7 @@ export default {
1561 1594
                   })
1562 1595
 
1563 1596
                 } else {
1597
+                  that.radio = 1
1564 1598
                   that.changeRadioAndPatient(1)
1565 1599
                   that.$message({ message: '挂号成功', type: 'success', duration: 5000 })
1566 1600
                   that.$refs.register.hide()
@@ -2185,12 +2219,12 @@ export default {
2185 2219
           'order_id': this.order.id
2186 2220
 
2187 2221
         }
2188
-        getDayOrMonthHisPrescription(params).then(response => {
2222
+        getMonthCharge(params).then(response => {
2189 2223
           if (response.data.state == 1) {
2190 2224
             this.loading = false
2191 2225
 
2192 2226
             this.month_prescriptions = []
2193
-            this.setMonthPrescription(response.data.data.day_prescription)
2227
+            this.setMonthPrescription(response.data.data.month_prescriptions)
2194 2228
             this.curMonthPrescriptions = this.month_prescriptions[0]
2195 2229
 
2196 2230
           } else {
@@ -2680,7 +2714,7 @@ export default {
2680 2714
         }
2681 2715
 
2682 2716
         if (this.hisPatientInfo.id_card_type == 1) {
2683
-          if (this.hisPatientInfo.balance_accounts_type != 2 && this.$store.getters.xt_user.org_id != 10088 && this.$store.getters.xt_user.org_id != 10106 && this.$store.getters.xt_user.org_id != 10188) {
2717
+          if (this.hisPatientInfo.balance_accounts_type != 2 && this.$store.getters.xt_user.org_id != 10088 && this.$store.getters.xt_user.org_id != 10106 && this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217) {
2684 2718
             this.pwdFormVisible = true
2685 2719
             this.pwd = ''
2686 2720
           } else {
@@ -3053,6 +3087,7 @@ export default {
3053 3087
       this.getPatientList()
3054 3088
     },
3055 3089
     changeRadioAndPatient(id) {
3090
+      this.radio = id
3056 3091
       let params = {
3057 3092
         'record_date': this.record_date
3058 3093
       }
@@ -3537,12 +3572,28 @@ export default {
3537 3572
         num = num.substring(0)
3538 3573
       }
3539 3574
       return parseFloat(num).toFixed(decimal)
3575
+    },getMonthChargePatientList(){
3576
+      let params = {
3577
+        'record_date': this.record_date,
3578
+        'start_time':this.other_start_time,
3579
+        'end_time':this.other_end_time,
3580
+      }
3581
+      getChargeHisPatientList(params).then(response => {
3582
+        if (response.data.state == 0) {
3583
+          this.$message.error(response.data.msg)
3584
+          return false
3585
+        } else {
3586
+          this.hisPatientDatas = []
3587
+
3588
+        }
3589
+      })
3590
+
3540 3591
     },
3541 3592
     //患者列表
3542 3593
     getPatientList() {
3543 3594
       let params = {
3544 3595
         'record_date': this.record_date,
3545
-        'type': this.radio
3596
+        'type': this.radio,
3546 3597
       }
3547 3598
       getChargeHisPatientList(params).then(response => {
3548 3599
         if (response.data.state == 0) {
@@ -3948,6 +3999,7 @@ export default {
3948 3999
         big_prescriptions[y]['month_prescriptions'].push(p2)
3949 4000
       }
3950 4001
       this.big_month_prescriptions = big_prescriptions
4002
+      console.log(this.big_month_prescriptions)
3951 4003
 
3952 4004
       for (let i = 0; i < this.big_month_prescriptions.length; i++) {
3953 4005
         if (this.big_month_prescriptions[i].month_prescriptions.length > 0) {
@@ -4011,6 +4063,9 @@ export default {
4011 4063
         case 9922:
4012 4064
           return '家庭通道' + '处方' + index
4013 4065
           break
4066
+        case 0:
4067
+          return '自费' + '处方' + index
4068
+          break
4014 4069
       }
4015 4070
     }, unique_four(array) {
4016 4071
       // res用来存储结果
@@ -4359,45 +4414,8 @@ export default {
4359 4414
             this.hisPatientInfo = response.data.data.his_info
4360 4415
             this.info = response.data.data.info
4361 4416
             this.order = response.data.data.order
4362
-            this.p_type = ''
4363
-            this.sick_type = ''
4364
-            this.diagnosis = []
4365
-            this.sick_history = ''
4366
-            this.form.diagnosis = []
4367
-            if (this.info.id > 0) {
4368
-              this.form.p_type = response.data.data.info.register_type
4369
-              this.form.sick_type = response.data.data.info.sick_type
4370
-              if (response.data.data.info.diagnosis.length == 0) {
4371
-                this.form.diagnosis = []
4372
-              } else {
4373
-                for (let i = 0; i < response.data.data.info.diagnosis.split(',').length; i++) {
4374
-                  this.form.diagnosis.push(parseInt(response.data.data.info.diagnosis.split(',')[i]))
4375
-                }
4376
-              }
4377
-              this.sick_history = this.info.sick_history
4378
-              if (this.info.register_type == 0) {
4379
-                this.form.p_type = ''
4380
-              }
4381
-
4382
-              if (this.info.sick_type == 0) {
4383
-                this.form.sick_type = ''
4384
-              }
4385
-            } else {
4386
-              this.form.p_type = 14
4387
-              this.form.sick_type = this.sick[0].id
4388
-              if (response.data.data.last_info.diagnoses.length == 0) {
4389
-                this.form.diagnosis = []
4390
-              } else {
4391
-                for (let i = 0; i < response.data.data.last_info.diagnosis.split(',').length; i++) {
4392
-                  this.form.diagnosis.push(parseInt(response.data.data.last_info.diagnosis.split(',')[i]))
4393
-                }
4394
-              }
4395
-
4396
-              this.sick_history = ''
4397
-            }
4398 4417
             this.addtions_charge = response.data.data.addtions_charge
4399 4418
             this.setMonthPrescription(response.data.data.month_prescriptions)
4400
-
4401 4419
           }
4402 4420
         })
4403 4421
 

文件差异内容过多而无法显示
+ 724 - 503
src/xt_pages/outpatientCharges/statementPrint.vue


+ 9 - 5
src/xt_pages/outpatientCharges/statementTemplate/printOne.vue 查看文件

@@ -2,7 +2,7 @@
2 2
   <div id="statement-print" class="statement-print">
3 3
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10188 || this.$store.getters.xt_user.org_id == 10217">江苏省社会医疗保险医疗费用结算单</div>
4 4
     <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10088">广水源生堂社会医疗保险医疗费用结算单</div>
5
-    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10088">广东省社会医疗保险医疗费用结算单</div>
5
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 &&this.$store.getters.xt_user.org_id != 10088">广东省社会医疗保险医疗费用结算单</div>
6 6
 
7 7
     <table class="statementTable" border="1">
8 8
       <tr>
@@ -80,7 +80,7 @@
80 80
         <td>单位名称</td>
81 81
         <td colspan="5">{{info.emp_name}}</td>
82 82
         <td width="80">联系电话</td>
83
-        <td width="110"></td>
83
+        <td width="110">{{info.patient.phone}}</td>
84 84
         <td width="80">身份证号</td>
85 85
         <td colspan="3">{{info.certno}}</td>
86 86
       </tr>
@@ -111,9 +111,9 @@
111 111
 
112 112
 
113 113
         <td>入院第一诊断</td>
114
-        <td colspan="3"></td>
114
+        <td colspan="3">{{info.dise_name}}</td>
115 115
         <td>出院第一诊断</td>
116
-        <td colspan="4"></td>
116
+        <td colspan="4">{{info.dise_name}}</td>
117 117
       </tr>
118 118
       <tr>
119 119
         <td>业务类别</td>
@@ -131,6 +131,8 @@
131 131
       <tr>
132 132
         <td colspan="12" style="text-align:left;padding-left:10px;">
133 133
           本次就医:总费用{{info.medfee_sumamt}}元,基金支付{{info.fund_pay_sumamt}}元,个人支付{{info.psn_pay}}元。
134
+          (起付线 {{info.act_pay_dedc}}元, 先自付 {{info.preselfpay_amt}}元, 段内自付 {{(info.psn_pay - info.preselfpay_amt).toFixed(2)}} )
135
+
134 136
         </td>
135 137
       </tr>
136 138
       <tr>
@@ -290,7 +292,9 @@
290 292
         <td>收款人:</td>
291 293
         <td colspan="2">{{info.charge_admin.user_name}}</td>
292 294
         <td>审核人:</td>
293
-        <td colspan="2">{{info.p_admin.user_name}}</td>
295
+        <td colspan="2" v-if="this.$store.getters.xt_user.org_id == 10106">{{'梅晓辉'}}</td>
296
+        <td colspan="2" v-if="this.$store.getters.xt_user.org_id != 10106">{{info.p_admin.user_name}}</td>
297
+
294 298
         <td>制单人:</td>
295 299
         <td colspan="2">{{info.p_admin.user_name}}</td>
296 300
         <td>打印日期</td>

+ 396 - 0
src/xt_pages/outpatientCharges/statementTemplate/printSix.vue 查看文件

@@ -0,0 +1,396 @@
1
+<template>
2
+  <div id="statement-print" class="statement-print">
3
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10188 || this.$store.getters.xt_user.org_id == 10217">江苏省社会医疗保险医疗费用结算单</div>
4
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10088">广水源生堂社会医疗保险医疗费用结算单</div>
5
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 &&this.$store.getters.xt_user.org_id != 10088">广东省社会医疗保险医疗费用结算单</div>
6
+
7
+    <table class="statementTable" border="1">
8
+      <tr>
9
+        <td width="80">机构名称</td>
10
+        <td colspan="4">{{info.fixmedins_name}}</td>
11
+        <td width="80">机构编码</td>
12
+        <td colspan="4">{{info.fixmedins_code}}</td>
13
+        <td width="100">医保结算级别</td>
14
+        <td width="100" v-if="info.hosp_lv == '1'">三级特等</td>
15
+        <td width="100" v-if="info.hosp_lv == '2'">三级甲等</td>
16
+        <td width="100" v-if="info.hosp_lv == '3'">三级乙等</td>
17
+        <td width="100" v-if="info.hosp_lv == '4'">三级丙等</td>
18
+        <td width="100" v-if="info.hosp_lv == '5'">二级甲等</td>
19
+        <td width="100" v-if="info.hosp_lv == '6'">二级乙等</td>
20
+        <td width="100" v-if="info.hosp_lv == '7'">二级丙等</td>
21
+        <td width="100" v-if="info.hosp_lv == '8'">一级甲等</td>
22
+        <td width="100" v-if="info.hosp_lv == '9'">一级乙等</td>
23
+        <td width="100" v-if="info.hosp_lv == '10'">一级丙等</td>
24
+        <td width="100" v-if="info.hosp_lv == '11'">无等级</td>
25
+        <td width="100" v-else></td>
26
+
27
+      </tr>
28
+      <tr>
29
+        <td width="90">就医登记号</td>
30
+        <td colspan="11">{{info.psn_no}}</td>
31
+      </tr>
32
+      <tr>
33
+        <td width="80">姓名</td>
34
+        <td width="80">{{info.psn_name}}</td>
35
+        <td width="80">性别</td>
36
+        <td width="50" v-if="info.gend == '1'">男</td>
37
+        <td width="50" v-if="info.gend == '2'">女</td>
38
+
39
+        <td width="80">出生日期</td>
40
+        <td width="100">{{info.brdy}}</td>
41
+        <td width="90">个人电脑号</td>
42
+        <td width="110"></td>
43
+        <td width="80">人员类别</td>
44
+        <td colspan="3" v-if="info.psn_type == '11'">在职</td>
45
+        <td colspan="3" v-if="info.psn_type == '1101'">职工在职</td>
46
+        <td colspan="3" v-if="info.psn_type == '1102'">公务员在职</td>
47
+        <td colspan="3" v-if="info.psn_type == '1103'">灵活就业人员在职</td>
48
+        <td colspan="3" v-if="info.psn_type == '1160'">地方其他扩展人员</td>
49
+
50
+
51
+        <td colspan="3" v-if="info.psn_type == '12'">退休人员</td>
52
+        <td colspan="3" v-if="info.psn_type == '1201'">职工退休</td>
53
+        <td colspan="3" v-if="info.psn_type == '1202'">公务员退休</td>
54
+        <td colspan="3" v-if="info.psn_type == '1203'">灵活就业人员退休</td>
55
+        <td colspan="3" v-if="info.psn_type == '1260'">地方其他扩展人员</td>
56
+
57
+
58
+        <td colspan="3" v-if="info.psn_type == '13'">离休</td>
59
+        <td colspan="3" v-if="info.psn_type == '1300'">离休人员</td>
60
+        <td colspan="3" v-if="info.psn_type == '1360'">地方其他扩展人员</td>
61
+
62
+        <td colspan="3" v-if="info.psn_type == '14'">居民(未成年)</td>
63
+        <td colspan="3" v-if="info.psn_type == '1401'">新生儿</td>
64
+        <td colspan="3" v-if="info.psn_type == '1402'">学龄前儿童</td>
65
+        <td colspan="3" v-if="info.psn_type == '1403'">中小学生</td>
66
+        <td colspan="3" v-if="info.psn_type == '1404'">大学生</td>
67
+        <td colspan="3" v-if="info.psn_type == '1405'">未成年(未入学)</td>
68
+
69
+
70
+        <td colspan="3" v-if="info.psn_type == '15'">居民(成年)</td>
71
+        <td colspan="3" v-if="info.psn_type == '1501'">普通居民(成年)</td>
72
+        <td colspan="3" v-if="info.psn_type == '1560'">地方其他扩展身份</td>
73
+
74
+        <td colspan="3" v-if="info.psn_type == '16'">居民(老年)</td>
75
+
76
+
77
+
78
+      </tr>
79
+      <tr>
80
+        <td>单位名称</td>
81
+        <td colspan="5">{{info.emp_name}}</td>
82
+        <td width="80">联系电话</td>
83
+        <td width="110">{{info.patient.phone}}</td>
84
+        <td width="80">身份证号</td>
85
+        <td colspan="3">{{info.certno}}</td>
86
+      </tr>
87
+      <tr>
88
+        <td>住院号</td>
89
+        <td>{{info.number}}</td>
90
+        <td>科别</td>
91
+        <td width="100"></td>
92
+        <td>床号</td>
93
+        <td></td>
94
+        <td>入院日期</td>
95
+        <td>{{info.begndate ? info.begndate.split(' ')[0] : ''}}</td>
96
+        <td>出院日期</td>
97
+        <td width="100">{{info.enddate ? info.enddate.split(' ')[0] : ''}}</td>
98
+        <td>住院天数</td>
99
+        <td>{{getDay(info.begndate,info.enddate)}}</td>
100
+
101
+      </tr>
102
+      <tr>
103
+        <td>险种</td>
104
+        <td colspan="2" v-if="info.insutype == '310'">职工基本医疗保险</td>
105
+        <td colspan="2" v-if="info.insutype == '320'">公务员医疗补助</td>
106
+        <td colspan="2" v-if="info.insutype == '330'">大额医疗费用补助</td>
107
+        <td colspan="2" v-if="info.insutype == '340'">离休人员医疗保障</td>
108
+        <td colspan="2" v-if="info.insutype == '390'">城乡居民基本医疗保险</td>
109
+        <td colspan="2" v-if="info.insutype == '392'">城乡居民大病医疗保险</td>
110
+        <td colspan="2" v-if="info.insutype == '510'">生育保险</td>
111
+
112
+
113
+        <td>入院第一诊断</td>
114
+        <td colspan="3">{{info.dise_name}}</td>
115
+        <td>出院第一诊断</td>
116
+        <td colspan="4">{{info.dise_name}}</td>
117
+      </tr>
118
+      <tr>
119
+        <td>业务类别</td>
120
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '11'">普通门诊</td>
121
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '12'">门诊挂号</td>
122
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '13'">急诊</td>
123
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '14'">门诊特殊病</td>
124
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '15'">门诊统筹</td>
125
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '16'">门诊慢性病</td>
126
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '21'">普通住院</td>
127
+
128
+        <td>结算时间</td>
129
+        <td colspan="5" style="text-align:left;padding-left:10px;">{{info.setl_time ? info.setl_time.split(' ')[0] : ''}}</td>
130
+      </tr>
131
+      <tr>
132
+        <td colspan="12" style="text-align:left;padding-left:10px;">
133
+          本次就医:总费用{{info.medfee_sumamt}}元,基金支付{{info.fund_pay_sumamt}}元,个人支付{{info.psn_pay}}元。
134
+        </td>
135
+      </tr>
136
+      <tr>
137
+        <td>费用名称</td>
138
+        <td colspan="2">总费用</td>
139
+        <td>自费</td>
140
+        <td colspan="2">部分项目自付</td>
141
+        <td>费用名称</td>
142
+        <td colspan="2">总费用</td>
143
+        <td>自费</td>
144
+        <td colspan="2">部分项目自付</td>
145
+      </tr>
146
+      <tr>
147
+        <td>床位费</td>
148
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_total}}</td>
149
+        <td style="text-align:right;padding-right:10px;">{{info.bed_cost_self_total}}</td>
150
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_part_self_total}}</td>
151
+        <td>西成药</td>
152
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_total}}</td>
153
+        <td style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_self_total}}</td>
154
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_part_self_total}}</td>
155
+      </tr>
156
+      <tr>
157
+        <td>中药费</td>
158
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
159
+        <td style="text-align:right;padding-right:10px;">0</td>
160
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
161
+        <td>中成药</td>
162
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_total}}
163
+        </td>
164
+        <td style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_self_total}}</td>
165
+        <td colspan="2" style="text-align:right;padding-right:10px;">
166
+          {{info.chinese_traditional_medicine_cost_part_self_total}}
167
+        </td>
168
+      </tr>
169
+      <tr>
170
+        <td>中草药</td>
171
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
172
+        <td style="text-align:right;padding-right:10px;">0</td>
173
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
174
+        <td>检查费</td>
175
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_total}}</td>
176
+        <td style="text-align:right;padding-right:10px;">{{info.check_cost_self_total}}</td>
177
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_part_self_total}}</td>
178
+      </tr>
179
+      <tr>
180
+        <td>治疗费</td>
181
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_total}}</td>
182
+        <td style="text-align:right;padding-right:10px;">{{info.treat_cost_self_total}}</td>
183
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_part_self_total}}</td>
184
+        <td>放射费</td>
185
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
186
+        <td style="text-align:right;padding-right:10px;">0</td>
187
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
188
+      </tr>
189
+      <tr>
190
+        <td>手术费</td>
191
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_total}}</td>
192
+        <td style="text-align:right;padding-right:10px;">{{info.operation_cost_self_total}}</td>
193
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_part_self_total}}</td>
194
+        <td>化验费</td>
195
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_total}}</td>
196
+        <td style="text-align:right;padding-right:10px;">{{info.laboratory_cost_self_total}}</td>
197
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_part_self_total}}</td>
198
+      </tr>
199
+      <tr>
200
+        <td>输血费</td>
201
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
202
+        <td style="text-align:right;padding-right:10px;">0</td>
203
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
204
+        <td>输氧费</td>
205
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
206
+        <td style="text-align:right;padding-right:10px;">0</td>
207
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
208
+      </tr>
209
+      <tr>
210
+        <td>其他</td>
211
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_total}}</td>
212
+        <td style="text-align:right;padding-right:10px;">{{info.other_cost_self_total}}</td>
213
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_part_self_total}}</td>
214
+        <td>麻醉费</td>
215
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
216
+        <td style="text-align:right;padding-right:10px;">0</td>
217
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
218
+      </tr>
219
+      <tr>
220
+        <td>材料费</td>
221
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_total}}</td>
222
+        <td style="text-align:right;padding-right:10px;">{{info.material_cost_self_total}}</td>
223
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_part_self_total}}</td>
224
+        <td>特殊检查费</td>
225
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
226
+        <td style="text-align:right;padding-right:10px;">0</td>
227
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
228
+      </tr>
229
+      <tr>
230
+        <td>特殊治疗费</td>
231
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
232
+        <td style="text-align:right;padding-right:10px;">0</td>
233
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
234
+        <td style="text-align:right;padding-right:10px;"></td>
235
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
236
+        <td style="text-align:right;padding-right:10px;"></td>
237
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
238
+      </tr>
239
+      <tr>
240
+        <td>合计</td>
241
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_total) +
242
+            parseFloat(info.operation_cost_total) + parseFloat(info.other_cost_total) +
243
+            parseFloat(info.material_cost_total) + parseFloat(info.western_medicine_cost_total) +
244
+            parseFloat(info.chinese_traditional_medicine_cost_total) + parseFloat(info.check_cost_total) +
245
+            parseFloat(info.laboratory_cost_total) + parseFloat(info.treat_cost_total)).toFixed(2) }}
246
+        </td>
247
+        <td style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_self_total )+
248
+            parseFloat(info.operation_cost_self_total) + parseFloat(info.other_cost_self_total) +
249
+            parseFloat(info.material_cost_self_total) + parseFloat(info.western_medicine_cost_self_total) +
250
+            parseFloat(info.chinese_traditional_medicine_cost_self_total) + parseFloat(info.check_cost_self_total) +
251
+            parseFloat(info.laboratory_cost_self_total) + parseFloat(info.treat_cost_self_total)).toFixed(2)}}
252
+        </td>
253
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_part_self_total) +
254
+            parseFloat(info.operation_cost_part_self_total) + parseFloat(info.other_cost_part_self_total) +
255
+            parseFloat(info.material_cost_part_self_total) + parseFloat(info.western_medicine_cost_part_self_total) +
256
+            parseFloat(info.chinese_traditional_medicine_cost_part_self_total) +
257
+            parseFloat(info.check_cost_part_self_total) + parseFloat(info.laboratory_cost_part_self_total) +
258
+            parseFloat(info.treat_cost_part_self_total)).toFixed(2)}}
259
+        </td>
260
+        <td style="text-align:right;padding-right:10px;"></td>
261
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
262
+        <td style="text-align:right;padding-right:10px;"></td>
263
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
264
+      </tr>
265
+      <tr>
266
+        <td colspan="3" style="text-align:left;padding-left:10px;">基本医疗保险统筹基金支付</td>
267
+        <td colspan="3">{{info.hifp_pay}}</td>
268
+        <td colspan="3" style="text-align:left;padding-left:10px;">大额基金支付</td>
269
+        <td colspan="3">{{info.hifob_pay}}</td>
270
+      </tr>
271
+      <tr>
272
+        <td colspan="3" style="text-align:left;padding-left:10px;">大病基金支付</td>
273
+        <td colspan="3">{{info.hifmi_pay}}</td>
274
+        <td colspan="3" style="text-align:left;padding-left:10px;">补充保险基金支付</td>
275
+        <td colspan="3">{{info.hifes_pay}}</td>
276
+      </tr>
277
+      <tr>
278
+        <td colspan="3" style="text-align:left;padding-left:10px;">医疗救助基金支付</td>
279
+        <td colspan="3">{{info.maf_pay}}</td>
280
+        <td colspan="3" style="text-align:left;padding-left:10px;">公务员基金支付</td>
281
+        <td colspan="3">{{info.cvlserv_pay}}</td>
282
+      </tr>
283
+      <tr>
284
+        <td colspan="3" style="text-align:left;padding-left:10px;">其他基金支付</td>
285
+        <td colspan="3">{{info.oth_pay}}</td>
286
+        <td colspan="3" style="text-align:left;padding-left:10px;">个人账户支付</td>
287
+        <td colspan="3">{{info.acct_pay}}</td>
288
+      </tr>
289
+      <tr>
290
+        <td>收款人:</td>
291
+        <td colspan="2">{{info.charge_admin.user_name}}</td>
292
+        <td>审核人:</td>
293
+        <td colspan="2" v-if="this.$store.getters.xt_user.org_id == 10106">{{'梅晓辉'}}</td>
294
+        <td colspan="2" v-if="this.$store.getters.xt_user.org_id != 10106">{{info.p_admin.user_name}}</td>
295
+
296
+        <td>制单人:</td>
297
+        <td colspan="2">{{info.p_admin.user_name}}</td>
298
+        <td>打印日期</td>
299
+        <td colspan="2">{{getNowTime()}}</td>
300
+      </tr>
301
+      <tr>
302
+        <td colspan="12" style="text-align:left;padding-left:10px;line-height:20px;">
303
+          注: 1、部分项目自付金额是指基本医疗保险范围内的项目需参保人先按规定比例自付的金额。<br/>
304
+          &ensp;&ensp;&ensp;2、此表由医院打印。<br/>
305
+          &ensp;&ensp;&ensp;3、此表一式两份,医院、参保人各一份。
306
+        </td>
307
+      </tr>
308
+      <tr>
309
+        <td colspan="12" style="text-align:left;padding-left:10px;">
310
+          病人家属签字:
311
+        </td>
312
+      </tr>
313
+    </table>
314
+  </div>
315
+</template>
316
+<script>
317
+export default {
318
+  props: {
319
+    info: {
320
+      type: Object,
321
+      default: function() {
322
+        return {}
323
+      }
324
+    }, p_admin: {
325
+      type: Object,
326
+      default: function() {
327
+        return {}
328
+      }
329
+    }, charge_admin: {
330
+      type: Object,
331
+      default: function() {
332
+        return {}
333
+      }
334
+    }
335
+  },methods:{
336
+    getDay(dateString1,dateString2){
337
+      var  startDate = Date.parse(dateString1);
338
+      var  endDate = Date.parse(dateString2);
339
+      if (startDate>endDate){
340
+        return 0;
341
+      }
342
+      if (startDate==endDate){
343
+        return 1;
344
+      }
345
+      var days=(endDate - startDate)/(1*24*60*60*1000);
346
+      return  days;
347
+
348
+    },
349
+    getNowTime: function () {
350
+      let dateTime;
351
+      let yy = new Date().getFullYear();
352
+      let mm = new Date().getMonth() + 1;
353
+      let dd = new Date().getDate();
354
+      let hh = new Date().getHours();
355
+      let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
356
+          :
357
+          new Date().getMinutes();
358
+      let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
359
+          :
360
+          new Date().getSeconds();
361
+      dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss;
362
+      return dateTime
363
+    },
364
+
365
+  }
366
+}
367
+
368
+
369
+</script>
370
+
371
+
372
+<style lang="scss" scoped>
373
+.statement-print {
374
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
375
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
376
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
377
+  margin-bottom: 20px;
378
+  padding: 20px 10px;
379
+}
380
+
381
+.statementTitle {
382
+  font-size: 28px;
383
+  text-align: center;
384
+  font-weight: bold;
385
+  margin-bottom: 10px;
386
+}
387
+
388
+.statementTable {
389
+  width: 100%;
390
+  text-align: center;
391
+  border-collapse: collapse;
392
+  line-height: 40px;
393
+  font-size: 14px;
394
+  border-color: #000;
395
+}
396
+</style>

+ 344 - 0
src/xt_pages/outpatientCharges/statementTemplate/privateChargePrint.vue 查看文件

@@ -0,0 +1,344 @@
1
+<template>
2
+  <div id="statement-print" class="statement-print">
3
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10188 || this.$store.getters.xt_user.org_id == 10217">江苏省社会医疗保险医疗费用结算单</div>
4
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10088">广水源生堂社会医疗保险医疗费用结算单</div>
5
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 &&this.$store.getters.xt_user.org_id != 10088">广东省社会医疗保险医疗费用结算单</div>
6
+
7
+    <table class="statementTable" border="1">
8
+      <tr>
9
+        <td width="80">机构名称</td>
10
+        <td colspan="4">{{info.fixmedins_name}}</td>
11
+        <td width="80">机构编码</td>
12
+        <td colspan="4">{{info.fixmedins_code}}</td>
13
+        <td width="100">医保结算级别</td>
14
+        <td width="100"></td>
15
+
16
+      </tr>
17
+      <tr>
18
+        <td width="90">就医登记号</td>
19
+        <td colspan="11"></td>
20
+      </tr>
21
+      <tr>
22
+        <td width="80">姓名</td>
23
+        <td width="80">{{info.patient.name}}</td>
24
+        <td width="80">性别</td>
25
+        <td width="50" v-if="info.patient.gender == 1">男</td>
26
+        <td width="50" v-if="info.patient.gender == 2">女</td>
27
+
28
+        <td width="80">出生日期</td>
29
+        <td width="100"></td>
30
+        <td width="90">个人电脑号</td>
31
+        <td width="110"></td>
32
+        <td width="80">人员类别</td>
33
+        <td colspan="3"></td>
34
+      </tr>
35
+      <tr>
36
+        <td>单位名称</td>
37
+        <td colspan="5"></td>
38
+        <td width="80">联系电话</td>
39
+        <td width="110">{{info.patient.phone}}</td>
40
+        <td width="80">身份证号</td>
41
+        <td colspan="3">{{info.patient.id_card_no}}</td>
42
+      </tr>
43
+      <tr>
44
+        <td>住院号</td>
45
+        <td>{{info.number}}</td>
46
+        <td>科别</td>
47
+        <td width="100"></td>
48
+        <td>床号</td>
49
+        <td></td>
50
+        <td>入院日期</td>
51
+        <td>{{info.setl_time ? info.setl_time.split(' ')[0] : ''}}</td>
52
+        <td>出院日期</td>
53
+        <td width="100">{{info.setl_time ? info.setl_time.split(' ')[0] : ''}}</td>
54
+        <td>住院天数</td>
55
+        <td>{{getDay(info.setl_time.split(' ')[0],info.setl_time.split(' ')[0])}}</td>
56
+
57
+      </tr>
58
+      <tr>
59
+        <td>险种</td>
60
+        <td colspan="2"></td>
61
+
62
+
63
+        <td>入院第一诊断</td>
64
+        <td colspan="3">{{info.diagnosis}}</td>
65
+        <td>出院第一诊断</td>
66
+        <td colspan="4">{{info.diagnosis}}</td>
67
+      </tr>
68
+      <tr>
69
+        <td>业务类别</td>
70
+        <td colspan="5" style="text-align:left;padding-left:10px;"></td>
71
+
72
+
73
+        <td>结算时间</td>
74
+        <td colspan="5" style="text-align:left;padding-left:10px;">{{info.setl_time ? info.setl_time.split(' ')[0] : ''}}</td>
75
+      </tr>
76
+      <tr>
77
+        <td colspan="12" style="text-align:left;padding-left:10px;">
78
+<!--          本次就医:总费用{{info.medfee_sumamt}}元,基金支付{{info.fund_pay_sumamt}}元,个人支付{{info.medfee_sumamt}}元。-->
79
+          本次就医:总费用{{info.medfee_sumamt}}元,基金支付{{info.fund_pay_sumamt}}元,个人支付{{info.psn_pay}}元。
80
+          (起付线 {{info.act_pay_dedc}}元, 先自付 {{info.preselfpay_amt}}元, 段内自付 {{info.medfee_sumamt}}元 )
81
+
82
+        </td>
83
+      </tr>
84
+      <tr>
85
+        <td>费用名称</td>
86
+        <td colspan="2">总费用</td>
87
+        <td>自费</td>
88
+        <td colspan="2">部分项目自付</td>
89
+        <td>费用名称</td>
90
+        <td colspan="2">总费用</td>
91
+        <td>自费</td>
92
+        <td colspan="2">部分项目自付</td>
93
+      </tr>
94
+      <tr>
95
+        <td>床位费</td>
96
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_total}}</td>
97
+        <td style="text-align:right;padding-right:10px;">{{info.bed_cost_self_total}}</td>
98
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_part_self_total}}</td>
99
+        <td>西成药</td>
100
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_total}}</td>
101
+        <td style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_self_total}}</td>
102
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_part_self_total}}</td>
103
+      </tr>
104
+      <tr>
105
+        <td>中药费</td>
106
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
107
+        <td style="text-align:right;padding-right:10px;">0</td>
108
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
109
+        <td>中成药</td>
110
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_total}}
111
+        </td>
112
+        <td style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_self_total}}</td>
113
+        <td colspan="2" style="text-align:right;padding-right:10px;">
114
+          {{info.chinese_traditional_medicine_cost_part_self_total}}
115
+        </td>
116
+      </tr>
117
+      <tr>
118
+        <td>中草药</td>
119
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
120
+        <td style="text-align:right;padding-right:10px;">0</td>
121
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
122
+        <td>检查费</td>
123
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_total}}</td>
124
+        <td style="text-align:right;padding-right:10px;">{{info.check_cost_self_total}}</td>
125
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_part_self_total}}</td>
126
+      </tr>
127
+      <tr>
128
+        <td>治疗费</td>
129
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_total}}</td>
130
+        <td style="text-align:right;padding-right:10px;">{{info.treat_cost_self_total}}</td>
131
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_part_self_total}}</td>
132
+        <td>放射费</td>
133
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
134
+        <td style="text-align:right;padding-right:10px;">0</td>
135
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
136
+      </tr>
137
+      <tr>
138
+        <td>手术费</td>
139
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_total}}</td>
140
+        <td style="text-align:right;padding-right:10px;">{{info.operation_cost_self_total}}</td>
141
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_part_self_total}}</td>
142
+        <td>化验费</td>
143
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_total}}</td>
144
+        <td style="text-align:right;padding-right:10px;">{{info.laboratory_cost_self_total}}</td>
145
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_part_self_total}}</td>
146
+      </tr>
147
+      <tr>
148
+        <td>输血费</td>
149
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
150
+        <td style="text-align:right;padding-right:10px;">0</td>
151
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
152
+        <td>输氧费</td>
153
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
154
+        <td style="text-align:right;padding-right:10px;">0</td>
155
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
156
+      </tr>
157
+      <tr>
158
+        <td>其他</td>
159
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_total}}</td>
160
+        <td style="text-align:right;padding-right:10px;">{{info.other_cost_self_total}}</td>
161
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_part_self_total}}</td>
162
+        <td>麻醉费</td>
163
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
164
+        <td style="text-align:right;padding-right:10px;">0</td>
165
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
166
+      </tr>
167
+      <tr>
168
+        <td>材料费</td>
169
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_total}}</td>
170
+        <td style="text-align:right;padding-right:10px;">{{info.material_cost_self_total}}</td>
171
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_part_self_total}}</td>
172
+        <td>特殊检查费</td>
173
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
174
+        <td style="text-align:right;padding-right:10px;">0</td>
175
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
176
+      </tr>
177
+      <tr>
178
+        <td>特殊治疗费</td>
179
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
180
+        <td style="text-align:right;padding-right:10px;">0</td>
181
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
182
+        <td style="text-align:right;padding-right:10px;"></td>
183
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
184
+        <td style="text-align:right;padding-right:10px;"></td>
185
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
186
+      </tr>
187
+      <tr>
188
+        <td>合计</td>
189
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_total) +
190
+            parseFloat(info.operation_cost_total) + parseFloat(info.other_cost_total) +
191
+            parseFloat(info.material_cost_total) + parseFloat(info.western_medicine_cost_total) +
192
+            parseFloat(info.chinese_traditional_medicine_cost_total) + parseFloat(info.check_cost_total) +
193
+            parseFloat(info.laboratory_cost_total) + parseFloat(info.treat_cost_total)).toFixed(2) }}
194
+        </td>
195
+        <td style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_self_total )+
196
+            parseFloat(info.operation_cost_self_total) + parseFloat(info.other_cost_self_total) +
197
+            parseFloat(info.material_cost_self_total) + parseFloat(info.western_medicine_cost_self_total) +
198
+            parseFloat(info.chinese_traditional_medicine_cost_self_total) + parseFloat(info.check_cost_self_total) +
199
+            parseFloat(info.laboratory_cost_self_total) + parseFloat(info.treat_cost_self_total)).toFixed(2)}}
200
+        </td>
201
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_part_self_total) +
202
+            parseFloat(info.operation_cost_part_self_total) + parseFloat(info.other_cost_part_self_total) +
203
+            parseFloat(info.material_cost_part_self_total) + parseFloat(info.western_medicine_cost_part_self_total) +
204
+            parseFloat(info.chinese_traditional_medicine_cost_part_self_total) +
205
+            parseFloat(info.check_cost_part_self_total) + parseFloat(info.laboratory_cost_part_self_total) +
206
+            parseFloat(info.treat_cost_part_self_total)).toFixed(2)}}
207
+        </td>
208
+        <td style="text-align:right;padding-right:10px;"></td>
209
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
210
+        <td style="text-align:right;padding-right:10px;"></td>
211
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
212
+      </tr>
213
+      <tr>
214
+        <td colspan="3" style="text-align:left;padding-left:10px;">基本医疗保险统筹基金支付</td>
215
+        <td colspan="3"></td>
216
+        <td colspan="3" style="text-align:left;padding-left:10px;">大额基金支付</td>
217
+        <td colspan="3"></td>
218
+      </tr>
219
+      <tr>
220
+        <td colspan="3" style="text-align:left;padding-left:10px;">大病基金支付</td>
221
+        <td colspan="3"></td>
222
+        <td colspan="3" style="text-align:left;padding-left:10px;">补充保险基金支付</td>
223
+        <td colspan="3"></td>
224
+      </tr>
225
+      <tr>
226
+        <td colspan="3" style="text-align:left;padding-left:10px;">医疗救助基金支付</td>
227
+        <td colspan="3"></td>
228
+        <td colspan="3" style="text-align:left;padding-left:10px;">公务员基金支付</td>
229
+        <td colspan="3"></td>
230
+      </tr>
231
+      <tr>
232
+        <td colspan="3" style="text-align:left;padding-left:10px;">其他基金支付</td>
233
+        <td colspan="3"></td>
234
+        <td colspan="3" style="text-align:left;padding-left:10px;">个人账户支付</td>
235
+        <td colspan="3"></td>
236
+      </tr>
237
+      <tr>
238
+        <td>收款人:</td>
239
+        <td colspan="2">{{info.charge_admin.user_name}}</td>
240
+        <td>审核人:</td>
241
+        <td colspan="2" v-if="this.$store.getters.xt_user.org_id == 10106">{{'梅晓辉'}}</td>
242
+        <td colspan="2" v-if="this.$store.getters.xt_user.org_id != 10106">{{info.p_admin.user_name}}</td>
243
+
244
+        <td>制单人:</td>
245
+        <td colspan="2">{{info.p_admin.user_name}}</td>
246
+        <td>打印日期</td>
247
+        <td colspan="2">{{getNowTime()}}</td>
248
+      </tr>
249
+      <tr>
250
+        <td colspan="12" style="text-align:left;padding-left:10px;line-height:20px;">
251
+          注: 1、部分项目自付金额是指基本医疗保险范围内的项目需参保人先按规定比例自付的金额。<br/>
252
+          &ensp;&ensp;&ensp;2、此表由医院打印。<br/>
253
+          &ensp;&ensp;&ensp;3、此表一式两份,医院、参保人各一份。
254
+        </td>
255
+      </tr>
256
+      <tr>
257
+        <td colspan="12" style="text-align:left;padding-left:10px;">
258
+          病人家属签字:
259
+        </td>
260
+      </tr>
261
+    </table>
262
+  </div>
263
+</template>
264
+<script>
265
+export default {
266
+  props: {
267
+    info: {
268
+      type: Object,
269
+      default: function() {
270
+        return {}
271
+      }
272
+    }, p_admin: {
273
+      type: Object,
274
+      default: function() {
275
+        return {}
276
+      }
277
+    }, charge_admin: {
278
+      type: Object,
279
+      default: function() {
280
+        return {}
281
+      }
282
+    }
283
+  },methods:{
284
+    getDay(dateString1,dateString2){
285
+      var  startDate = Date.parse(dateString1);
286
+      var  endDate = Date.parse(dateString2);
287
+      if (startDate>endDate){
288
+        return 0;
289
+      }
290
+      if (startDate==endDate){
291
+        return 1;
292
+      }
293
+      var days=(endDate - startDate)/(1*24*60*60*1000);
294
+      return  days;
295
+
296
+    },
297
+    getNowTime: function () {
298
+      let dateTime;
299
+      let yy = new Date().getFullYear();
300
+      let mm = new Date().getMonth() + 1;
301
+      let dd = new Date().getDate();
302
+      let hh = new Date().getHours();
303
+      let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
304
+          :
305
+          new Date().getMinutes();
306
+      let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
307
+          :
308
+          new Date().getSeconds();
309
+      dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss;
310
+      return dateTime
311
+    },
312
+
313
+  }
314
+}
315
+
316
+
317
+</script>
318
+
319
+
320
+<style lang="scss" scoped>
321
+.statement-print {
322
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
323
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
324
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
325
+  margin-bottom: 20px;
326
+  padding: 20px 10px;
327
+}
328
+
329
+.statementTitle {
330
+  font-size: 28px;
331
+  text-align: center;
332
+  font-weight: bold;
333
+  margin-bottom: 10px;
334
+}
335
+
336
+.statementTable {
337
+  width: 100%;
338
+  text-align: center;
339
+  border-collapse: collapse;
340
+  line-height: 40px;
341
+  font-size: 14px;
342
+  border-color: #000;
343
+}
344
+</style>

+ 400 - 0
src/xt_pages/outpatientCharges/statementTemplate/test.vue 查看文件

@@ -0,0 +1,400 @@
1
+<template>
2
+  <div id="statement-print" class="statement-print">
3
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10188 || this.$store.getters.xt_user.org_id == 10217">江苏省社会医疗保险医疗费用结算单</div>
4
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id == 10088">广水源生堂社会医疗保险医疗费用结算单</div>
5
+    <div class="statementTitle" v-if="this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 &&this.$store.getters.xt_user.org_id != 10088">广东省社会医疗保险医疗费用结算单</div>
6
+
7
+    <table class="statementTable" border="1">
8
+      <tr>
9
+        <td width="80">机构名称</td>
10
+        <td colspan="4">{{info.fixmedins_name}}</td>
11
+        <td width="80">机构编码</td>
12
+        <td colspan="4">{{info.fixmedins_code}}</td>
13
+        <td width="100">医保结算级别</td>
14
+        <td width="100" v-if="info.hosp_lv == '1'">三级特等</td>
15
+        <td width="100" v-if="info.hosp_lv == '2'">三级甲等</td>
16
+        <td width="100" v-if="info.hosp_lv == '3'">三级乙等</td>
17
+        <td width="100" v-if="info.hosp_lv == '4'">三级丙等</td>
18
+        <td width="100" v-if="info.hosp_lv == '5'">二级甲等</td>
19
+        <td width="100" v-if="info.hosp_lv == '6'">二级乙等</td>
20
+        <td width="100" v-if="info.hosp_lv == '7'">二级丙等</td>
21
+        <td width="100" v-if="info.hosp_lv == '8'">一级甲等</td>
22
+        <td width="100" v-if="info.hosp_lv == '9'">一级乙等</td>
23
+        <td width="100" v-if="info.hosp_lv == '10'">一级丙等</td>
24
+        <td width="100" v-if="info.hosp_lv == '11'">无等级</td>
25
+        <td width="100" v-else></td>
26
+
27
+      </tr>
28
+      <tr>
29
+        <td width="90">就医登记号</td>
30
+        <td colspan="11">{{info.psn_no}}</td>
31
+      </tr>
32
+      <tr>
33
+        <td width="80">姓名</td>
34
+        <td width="80">{{info.psn_name}}</td>
35
+        <td width="80">性别</td>
36
+        <td width="50" v-if="info.gend == '1'">男</td>
37
+        <td width="50" v-if="info.gend == '2'">女</td>
38
+
39
+        <td width="80">出生日期</td>
40
+        <td width="100">{{info.brdy}}</td>
41
+        <td width="90">个人电脑号</td>
42
+        <td width="110"></td>
43
+        <td width="80">人员类别</td>
44
+        <td colspan="3" v-if="info.psn_type == '11'">在职</td>
45
+        <td colspan="3" v-if="info.psn_type == '1101'">职工在职</td>
46
+        <td colspan="3" v-if="info.psn_type == '1102'">公务员在职</td>
47
+        <td colspan="3" v-if="info.psn_type == '1103'">灵活就业人员在职</td>
48
+        <td colspan="3" v-if="info.psn_type == '1160'">地方其他扩展人员</td>
49
+
50
+
51
+        <td colspan="3" v-if="info.psn_type == '12'">退休人员</td>
52
+        <td colspan="3" v-if="info.psn_type == '1201'">职工退休</td>
53
+        <td colspan="3" v-if="info.psn_type == '1202'">公务员退休</td>
54
+        <td colspan="3" v-if="info.psn_type == '1203'">灵活就业人员退休</td>
55
+        <td colspan="3" v-if="info.psn_type == '1260'">地方其他扩展人员</td>
56
+
57
+
58
+        <td colspan="3" v-if="info.psn_type == '13'">离休</td>
59
+        <td colspan="3" v-if="info.psn_type == '1300'">离休人员</td>
60
+        <td colspan="3" v-if="info.psn_type == '1360'">地方其他扩展人员</td>
61
+
62
+        <td colspan="3" v-if="info.psn_type == '14'">居民(未成年)</td>
63
+        <td colspan="3" v-if="info.psn_type == '1401'">新生儿</td>
64
+        <td colspan="3" v-if="info.psn_type == '1402'">学龄前儿童</td>
65
+        <td colspan="3" v-if="info.psn_type == '1403'">中小学生</td>
66
+        <td colspan="3" v-if="info.psn_type == '1404'">大学生</td>
67
+        <td colspan="3" v-if="info.psn_type == '1405'">未成年(未入学)</td>
68
+
69
+
70
+        <td colspan="3" v-if="info.psn_type == '15'">居民(成年)</td>
71
+        <td colspan="3" v-if="info.psn_type == '1501'">普通居民(成年)</td>
72
+        <td colspan="3" v-if="info.psn_type == '1560'">地方其他扩展身份</td>
73
+
74
+        <td colspan="3" v-if="info.psn_type == '16'">居民(老年)</td>
75
+
76
+
77
+
78
+      </tr>
79
+      <tr>
80
+        <td>单位名称</td>
81
+        <td colspan="5">{{info.emp_name}}</td>
82
+        <td width="80">联系电话</td>
83
+        <!-- <td width="110">{{info.patient.phone}}</td> -->
84
+        <td>13535320234</td>
85
+        <td width="80">身份证号</td>
86
+        <td colspan="3">{{info.certno}}</td>
87
+      </tr>
88
+      <tr>
89
+        <td>住院号</td>
90
+        <td>{{info.number}}</td>
91
+        <td>科别</td>
92
+        <td width="100"></td>
93
+        <td>床号</td>
94
+        <td></td>
95
+        <td>入院日期</td>
96
+        <td>{{info.begndate ? info.begndate.split(' ')[0] : ''}}</td>
97
+        <td>出院日期</td>
98
+        <td width="100">{{info.enddate ? info.enddate.split(' ')[0] : ''}}</td>
99
+        <td>住院天数</td>
100
+        <td>{{getDay(info.begndate,info.enddate)}}</td>
101
+
102
+      </tr>
103
+      <tr>
104
+        <td>险种</td>
105
+        <td colspan="2" v-if="info.insutype == '310'">职工基本医疗保险</td>
106
+        <td colspan="2" v-if="info.insutype == '320'">公务员医疗补助</td>
107
+        <td colspan="2" v-if="info.insutype == '330'">大额医疗费用补助</td>
108
+        <td colspan="2" v-if="info.insutype == '340'">离休人员医疗保障</td>
109
+        <td colspan="2" v-if="info.insutype == '390'">城乡居民基本医疗保险</td>
110
+        <td colspan="2" v-if="info.insutype == '392'">城乡居民大病医疗保险</td>
111
+        <td colspan="2" v-if="info.insutype == '510'">生育保险</td>
112
+
113
+
114
+        <td>入院第一诊断</td>
115
+        <td colspan="3">{{info.dise_name}}</td>
116
+        <td>出院第一诊断</td>
117
+        <td colspan="4">{{info.dise_name}}</td>
118
+      </tr>
119
+      <tr>
120
+        <td>业务类别</td>
121
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '11'">普通门诊</td>
122
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '12'">门诊挂号</td>
123
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '13'">急诊</td>
124
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '14'">门诊特殊病</td>
125
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '15'">门诊统筹</td>
126
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '16'">门诊慢性病</td>
127
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '21'">普通住院</td>
128
+
129
+        <td>结算时间</td>
130
+        <td colspan="5" style="text-align:left;padding-left:10px;">{{info.setl_time ? info.setl_time.split(' ')[0] : ''}}</td>
131
+      </tr>
132
+      <tr>
133
+        <td colspan="12" style="text-align:left;padding-left:10px;">
134
+          本次就医:总费用{{info.medfee_sumamt}}元,基金支付{{info.fund_pay_sumamt}}元,个人支付{{info.psn_pay}}元。
135
+            
136
+        </td>
137
+      </tr>
138
+      <tr>
139
+        <td>费用名称</td>
140
+        <td colspan="2">总费用</td>
141
+        <td>自费</td>
142
+        <td colspan="2">部分项目自付</td>
143
+        <td>费用名称</td>
144
+        <td colspan="2">总费用</td>
145
+        <td>自费</td>
146
+        <td colspan="2">部分项目自付</td>
147
+      </tr>
148
+      <tr>
149
+        <td>床位费</td>
150
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_total}}</td>
151
+        <td style="text-align:right;padding-right:10px;">{{info.bed_cost_self_total}}</td>
152
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_part_self_total}}</td>
153
+        <td>西成药</td>
154
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_total}}</td>
155
+        <td style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_self_total}}</td>
156
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_part_self_total}}</td>
157
+      </tr>
158
+      <tr>
159
+        <td>中药费</td>
160
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
161
+        <td style="text-align:right;padding-right:10px;">0</td>
162
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
163
+        <td>中成药</td>
164
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_total}}
165
+        </td>
166
+        <td style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_self_total}}</td>
167
+        <td colspan="2" style="text-align:right;padding-right:10px;">
168
+          {{info.chinese_traditional_medicine_cost_part_self_total}}
169
+        </td>
170
+      </tr>
171
+      <tr>
172
+        <td>中草药</td>
173
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
174
+        <td style="text-align:right;padding-right:10px;">0</td>
175
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
176
+        <td>检查费</td>
177
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_total}}</td>
178
+        <td style="text-align:right;padding-right:10px;">{{info.check_cost_self_total}}</td>
179
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_part_self_total}}</td>
180
+      </tr>
181
+      <tr>
182
+        <td>治疗费</td>
183
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_total}}</td>
184
+        <td style="text-align:right;padding-right:10px;">{{info.treat_cost_self_total}}</td>
185
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_part_self_total}}</td>
186
+        <td>放射费</td>
187
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
188
+        <td style="text-align:right;padding-right:10px;">0</td>
189
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
190
+      </tr>
191
+      <tr>
192
+        <td>手术费</td>
193
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_total}}</td>
194
+        <td style="text-align:right;padding-right:10px;">{{info.operation_cost_self_total}}</td>
195
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_part_self_total}}</td>
196
+        <td>化验费</td>
197
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_total}}</td>
198
+        <td style="text-align:right;padding-right:10px;">{{info.laboratory_cost_self_total}}</td>
199
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_part_self_total}}</td>
200
+      </tr>
201
+      <tr>
202
+        <td>输血费</td>
203
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
204
+        <td style="text-align:right;padding-right:10px;">0</td>
205
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
206
+        <td>输氧费</td>
207
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
208
+        <td style="text-align:right;padding-right:10px;">0</td>
209
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
210
+      </tr>
211
+      <tr>
212
+        <td>其他</td>
213
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_total}}</td>
214
+        <td style="text-align:right;padding-right:10px;">{{info.other_cost_self_total}}</td>
215
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_part_self_total}}</td>
216
+        <td>麻醉费</td>
217
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
218
+        <td style="text-align:right;padding-right:10px;">0</td>
219
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
220
+      </tr>
221
+      <tr>
222
+        <td>材料费</td>
223
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_total}}</td>
224
+        <td style="text-align:right;padding-right:10px;">{{info.material_cost_self_total}}</td>
225
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_part_self_total}}</td>
226
+        <td>特殊检查费</td>
227
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
228
+        <td style="text-align:right;padding-right:10px;">0</td>
229
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
230
+      </tr>
231
+      <tr>
232
+        <td>特殊治疗费</td>
233
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
234
+        <td style="text-align:right;padding-right:10px;">0</td>
235
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
236
+        <td style="text-align:right;padding-right:10px;"></td>
237
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
238
+        <td style="text-align:right;padding-right:10px;"></td>
239
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
240
+      </tr>
241
+      <tr>
242
+        <td>合计</td>
243
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_total) +
244
+          parseFloat(info.operation_cost_total) + parseFloat(info.other_cost_total) +
245
+          parseFloat(info.material_cost_total) + parseFloat(info.western_medicine_cost_total) +
246
+          parseFloat(info.chinese_traditional_medicine_cost_total) + parseFloat(info.check_cost_total) +
247
+          parseFloat(info.laboratory_cost_total) + parseFloat(info.treat_cost_total)).toFixed(2) }}
248
+        </td>
249
+        <td style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_self_total )+
250
+          parseFloat(info.operation_cost_self_total) + parseFloat(info.other_cost_self_total) +
251
+          parseFloat(info.material_cost_self_total) + parseFloat(info.western_medicine_cost_self_total) +
252
+          parseFloat(info.chinese_traditional_medicine_cost_self_total) + parseFloat(info.check_cost_self_total) +
253
+          parseFloat(info.laboratory_cost_self_total) + parseFloat(info.treat_cost_self_total)).toFixed(2)}}
254
+        </td>
255
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_part_self_total) +
256
+          parseFloat(info.operation_cost_part_self_total) + parseFloat(info.other_cost_part_self_total) +
257
+          parseFloat(info.material_cost_part_self_total) + parseFloat(info.western_medicine_cost_part_self_total) +
258
+          parseFloat(info.chinese_traditional_medicine_cost_part_self_total) +
259
+          parseFloat(info.check_cost_part_self_total) + parseFloat(info.laboratory_cost_part_self_total) +
260
+          parseFloat(info.treat_cost_part_self_total)).toFixed(2)}}
261
+        </td>
262
+        <td style="text-align:right;padding-right:10px;"></td>
263
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
264
+        <td style="text-align:right;padding-right:10px;"></td>
265
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
266
+      </tr>
267
+      <tr>
268
+        <td colspan="3" style="text-align:left;padding-left:10px;">基本医疗保险统筹基金支付</td>
269
+        <td colspan="3">{{info.hifp_pay}}</td>
270
+        <td colspan="3" style="text-align:left;padding-left:10px;">大额基金支付</td>
271
+        <td colspan="3">{{info.hifob_pay}}</td>
272
+      </tr>
273
+      <tr>
274
+        <td colspan="3" style="text-align:left;padding-left:10px;">大病基金支付</td>
275
+        <td colspan="3">{{info.hifmi_pay}}</td>
276
+        <td colspan="3" style="text-align:left;padding-left:10px;">补充保险基金支付</td>
277
+        <td colspan="3">{{info.hifes_pay}}</td>
278
+      </tr>
279
+      <tr>
280
+        <td colspan="3" style="text-align:left;padding-left:10px;">医疗救助基金支付</td>
281
+        <td colspan="3">{{info.maf_pay}}</td>
282
+        <td colspan="3" style="text-align:left;padding-left:10px;">公务员基金支付</td>
283
+        <td colspan="3">{{info.cvlserv_pay}}</td>
284
+      </tr>
285
+      <tr>
286
+        <td colspan="3" style="text-align:left;padding-left:10px;">其他基金支付</td>
287
+        <td colspan="3">{{info.oth_pay}}</td>
288
+        <td colspan="3" style="text-align:left;padding-left:10px;">个人账户支付</td>
289
+        <td colspan="3">{{info.acct_pay}}</td>
290
+      </tr>
291
+      <tr>
292
+        <td>收款人:</td>
293
+        <!-- <td colspan="2">{{info.charge_admin.user_name}}</td> -->
294
+        <td colspan="2">高慧与</td> 
295
+        <td>审核人:</td>
296
+        <td colspan="2" v-if="this.$store.getters.xt_user.org_id == 10106">{{'梅晓辉'}}</td>
297
+        <!-- <td colspan="2" v-if="this.$store.getters.xt_user.org_id != 10106">{{info.p_admin.user_name}}</td> -->
298
+        <td colspan="2">梅晓辉</td>
299
+        <td>制单人:</td>
300
+        <!-- <td colspan="2">{{info.p_admin.user_name}}</td> -->
301
+        <td colspan="2">梅晓辉</td>
302
+        <td>打印日期</td>
303
+        <td colspan="2">{{getNowTime()}}</td>
304
+      </tr>
305
+      <tr>
306
+        <td colspan="12" style="text-align:left;padding-left:10px;line-height:20px;">
307
+          注: 1、部分项目自付金额是指基本医疗保险范围内的项目需参保人先按规定比例自付的金额。<br/>
308
+          &ensp;&ensp;&ensp;2、此表由医院打印。<br/>
309
+          &ensp;&ensp;&ensp;3、此表一式两份,医院、参保人各一份。
310
+        </td>
311
+      </tr>
312
+      <tr rowspan="2">
313
+        <td  colspan="12" style="text-align:left;padding-left:10px;">
314
+          病人家属签字:
315
+        </td>
316
+      </tr>
317
+    </table>
318
+  </div>
319
+</template>
320
+<script>
321
+  export default {
322
+    props: {
323
+      info: {
324
+        type: Object,
325
+        default: function() {
326
+          return {}
327
+        }
328
+      }, p_admin: {
329
+        type: Object,
330
+        default: function() {
331
+          return {}
332
+        }
333
+      }, charge_admin: {
334
+        type: Object,
335
+        default: function() {
336
+          return {}
337
+        }
338
+      }
339
+    },methods:{
340
+      getDay(dateString1,dateString2){
341
+          var  startDate = Date.parse(dateString1);
342
+          var  endDate = Date.parse(dateString2);
343
+          if (startDate>endDate){
344
+            return 0;
345
+          }
346
+          if (startDate==endDate){
347
+            return 1;
348
+          }
349
+          var days=(endDate - startDate)/(1*24*60*60*1000);
350
+          return  days;
351
+
352
+        },
353
+      getNowTime: function () {
354
+        let dateTime;
355
+        let yy = new Date().getFullYear();
356
+        let mm = new Date().getMonth() + 1;
357
+        let dd = new Date().getDate();
358
+        let hh = new Date().getHours();
359
+        let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
360
+          :
361
+          new Date().getMinutes();
362
+        let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
363
+          :
364
+          new Date().getSeconds();
365
+        dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss;
366
+        return dateTime
367
+      },
368
+
369
+    }
370
+  }
371
+
372
+
373
+</script>
374
+
375
+
376
+<style lang="scss" scoped>
377
+  .statement-print {
378
+    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
379
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
380
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
381
+    margin-bottom: 20px;
382
+    padding: 20px 10px;
383
+  }
384
+
385
+  .statementTitle {
386
+    font-size: 28px;
387
+    text-align: center;
388
+    font-weight: bold;
389
+    margin-bottom: 10px;
390
+  }
391
+
392
+  .statementTable {
393
+    width: 100%;
394
+    text-align: center;
395
+    border-collapse: collapse;
396
+    line-height: 40px;
397
+    font-size: 14px;
398
+    border-color: #000;
399
+  }
400
+</style>

+ 2 - 3
src/xt_pages/outpatientDoctorStation/batch_print_checkTemplate/index.vue 查看文件

@@ -13,7 +13,7 @@
13 13
       </template> -->
14 14
 
15 15
       <div class='dialysisPage' style="padding-top:40px;">
16
-        <printOne :printData="printData"></printOne>
16
+        <printOne :printData="printData" ref="printOne"></printOne>
17 17
       </div>
18 18
   </div>
19 19
 </template>
@@ -66,13 +66,11 @@ export default {
66 66
                 scanStyles: false
67 67
             });
68 68
         },500)
69
-
70 69
     },
71 70
     getAllDoctorList(){
72 71
       getAllDoctorList().then(response=>{
73 72
         if(response.data.state == 1){
74 73
                var doctor =  response.data.data.doctor
75
-
76 74
                this.doctorList = doctor
77 75
              }
78 76
          })
@@ -85,6 +83,7 @@ export default {
85 83
 
86 84
   created() {
87 85
     this.org_id = this.$store.getters.xt_user.org_id
86
+    console.log('oo')
88 87
   },
89 88
 
90 89
 };

+ 491 - 400
src/xt_pages/outpatientDoctorStation/batch_print_checkTemplate/printOne.vue 查看文件

@@ -1,464 +1,555 @@
1 1
 <template>
2
-    <div>
3
-        <div id='prescription-print3' class="prescription-print">
4
-          <div v-for="(i,index) in printData">
5
-<!--            <img style="width:100%;height:80px" v-if="org_id == 10138" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">-->
6
-<!--/*             <img style="width:100%;height:80px" v-if="org_id == 10278" src="https://kuyi.shengws.com/bailinbeier.png" alt="">*/-->
7
-            <div class="printTitle">检验申请单</div>
8
-
9
-            <div style="border:1px solid #000;">
10
-                <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;line-height:40px;padding:0 10px;">
11
-                    <div>是否急诊:否</div>
12
-                    <div>结算方式:{{ i.his_patient.id != 0 ? i.his_patient.balance_accounts_type == 1 ? '医保' : '自费' : '' }}</div>
13
-                    <div>金额:{{ total }}</div>
14
-                </div>
15
-                <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;line-height:40px;padding:0 10px;">
16
-                    <div>姓名:{{i.his_patient.id != 0?i.his_patient.name:i.name}}</div>
17
-                    <div>性别:
18
-                        <span v-if="i.his_patient.id != 0">
19
-                          <span v-if="i.his_patient.gend == 1">男</span>
20
-                          <span v-if="i.his_patient.gend == 2">女</span>
21
-                        </span>
22
-                        <span v-else>
23
-                          <span v-if="i.gender == 1">男</span>
24
-                          <span v-if="i.gender == 2">女</span>
25
-                        </span>
26
-                    </div>
27
-                    <div>年龄:{{i.age?i.age:""}}岁</div>
28
-                </div>
29
-                <!-- <div style="margin-bottom:20px;padding:10px 10px 0;">病史摘要:{{history.history_of_present_illness?history.history_of_present_illness:''}}</div> -->
30
-                <!-- <div style="margin-bottom:20px;padding:0 10px;">体格检查:
2
+  <div id="prescriptionPrint" class="prescription-print">
3
+    <div
4
+      v-for="(i, index) in printData"
5
+      :key="index"
6
+      style="
7
+        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
8
+          0 0 40px rgba(0, 0, 0, 0.06) inset;
9
+      "
10
+    >
11
+      <!--            <img style="width:100%;height:80px" v-if="org_id == 10138" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">-->
12
+      <!--/*             <img style="width:100%;height:80px" v-if="org_id == 10278" src="https://kuyi.shengws.com/bailinbeier.png" alt="">*/-->
13
+      <div
14
+        id="prescription-print"
15
+        class="prescription-print"
16
+        style="page-break-after: always"
17
+        v-for="(item, index) in i.prescriptions"
18
+        :key="index"
19
+      >
20
+        <div class="printTitle">检验申请单</div>
21
+
22
+        <div style="border: 1px solid #000">
23
+          <div
24
+            style="
25
+              display: flex;
26
+              justify-content: space-between;
27
+              border-bottom: 1px solid #000;
28
+              line-height: 40px;
29
+              padding: 0 10px;
30
+            "
31
+          >
32
+            <div>是否急诊:否</div>
33
+            <div>
34
+              结算方式:{{
35
+                i.his_patient.id != 0
36
+                  ? i.his_patient.balance_accounts_type == 1
37
+                    ? "医保"
38
+                    : "自费"
39
+                  : ""
40
+              }}
41
+            </div>
42
+            <div
43
+              v-for="item in getSingleTeam(i.prescriptions)"
44
+              :key="item"
45
+              style="margin-bottom: 10px"
46
+            >
47
+              金额:{{ item }}
48
+            </div>
49
+          </div>
50
+          <div
51
+            style="
52
+              display: flex;
53
+              justify-content: space-between;
54
+              border-bottom: 1px solid #000;
55
+              line-height: 40px;
56
+              padding: 0 10px;
57
+            "
58
+          >
59
+            <div>
60
+              姓名:{{ i.his_patient.id != 0 ? i.his_patient.name : i.name }}
61
+            </div>
62
+            <div>
63
+              性别:
64
+              <span v-if="i.his_patient.id != 0">
65
+                <span v-if="i.his_patient.gend == 1">男</span>
66
+                <span v-if="i.his_patient.gend == 2">女</span>
67
+              </span>
68
+              <span v-else>
69
+                <span v-if="i.gender == 1">男</span>
70
+                <span v-if="i.gender == 2">女</span>
71
+              </span>
72
+            </div>
73
+            <div>年龄:{{ i.age ? i.age : "" }}岁</div>
74
+          </div>
75
+          <!-- <div style="margin-bottom:20px;padding:10px 10px 0;">病史摘要:{{history.history_of_present_illness?history.history_of_present_illness:''}}</div> -->
76
+          <!-- <div style="margin-bottom:20px;padding:0 10px;">体格检查:
31 77
                     <span>体温:{{ history.temperature ? history.temperature + '℃' : '/' }}</span>
32 78
                     <span>脉搏:{{ history.pulse ? history.pulse + '次/分' : '/' }}</span>
33 79
                     <span>呼吸:{{ history.breathing ? history.breathing + '次/分' : '/' }}</span>
34 80
                     <span>血压:{{ history.sbp }}/{{ history.dbp }}mmHg</span>
35 81
                 </div> -->
36
-                <div style="margin:20px 0;padding:0 10px;">临床诊断:{{getDiagnosis(i.info.diagnosis)}}</div>
37
-                <div style="display:flex;margin-bottom:20px;padding:0 10px;">
38
-                    <div>检验项目:</div>
39
-                    <div>
40
-                        <div v-for="item in getTeam(i.prescriptions)" style="margin-bottom:10px;">{{ item.team.project_team }}</div>
41
-                        <div v-for="item in getSingleTeam(i.prescriptions)" style="margin-bottom:10px;">{{ item.project.project_name }}</div>
42
-                    </div>
43
-                </div>
44
-                <div style="display:flex;justify-content: space-between;border-top:1px solid #000;line-height:40px;padding:0 10px;">
45
-                    <div>开单医生:{{ i.info.doctor ? i.info.doctor : '' }}</div>
46
-                    <div>开单日期:
47
-                        {{getTime(i.info.ctime) ? getTime(i.info.ctime).split(' ')[0] : ''}}
48
-                    </div>
49
-                    <div>医生签字:{{ i.info.doctor ? i.info.doctor : '' }}</div>
50
-                </div>
82
+          <div style="margin: 20px 0; padding: 0 10px">
83
+            临床诊断:{{ getDiagnosis(i.info.diagnosis) }}
84
+          </div>
85
+          <div style="display: flex; margin-bottom: 20px; padding: 0 10px">
86
+            <div>检验项目:</div>
87
+            <div>
88
+              <div
89
+                v-for="item in getTeam(i.prescriptions)"
90
+                :key="item.id"
91
+                style="margin-bottom: 10px"
92
+              >
93
+                {{ item.team.project_team }}
94
+              </div>
95
+            </div>
96
+          </div>
97
+          <div
98
+            style="
99
+              display: flex;
100
+              justify-content: space-between;
101
+              border-top: 1px solid #000;
102
+              line-height: 40px;
103
+              padding: 0 10px;
104
+            "
105
+          >
106
+            <div>开单医生:{{ i.info.doctor ? i.info.doctor : "" }}</div>
107
+            <div>
108
+              开单日期:
109
+              {{
110
+                getTime(i.info.ctime) ? getTime(i.info.ctime).split(" ")[0] : ""
111
+              }}
51 112
             </div>
52
-<!--            <img style="width:100%;" v-if="org_id == 10138" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">-->
53
-<!--            <img style="width:100%;" v-if="org_id == 10278" src="https://kuyi.shengws.com/bailinbeier.png" alt="">-->
113
+            <div>医生签字:{{ i.info.doctor ? i.info.doctor : "" }}</div>
114
+          </div>
54 115
         </div>
116
+        <!--            <img style="width:100%;" v-if="org_id == 10138" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">-->
117
+        <!--            <img style="width:100%;" v-if="org_id == 10278" src="https://kuyi.shengws.com/bailinbeier.png" alt="">-->
55 118
       </div>
56 119
     </div>
57
-
120
+  </div>
58 121
 </template>
59 122
 <script>
60
-import { jsGetAge, uParseTime } from '@/utils/tools'
61
-import {getAllDoctorList} from "@/api/project/project"
62
-import {getInitData} from "@/api/his/his"
123
+import { jsGetAge, uParseTime } from "@/utils/tools";
124
+import { getAllDoctorList } from "@/api/project/project";
125
+import { getInitData } from "@/api/his/his";
63 126
 export default {
64
-    props:{
65
-      printData:Array
127
+  props: {
128
+    printData: Array,
129
+  },
130
+  data() {
131
+    return {
132
+      doctorList: [],
133
+      advicePrint: {},
134
+      patient: {},
135
+      tableData: [],
136
+      prescriptionInfo: [],
137
+      hisPatient: {},
138
+      department: [],
139
+      prescriptions: [],
140
+      projectList: [],
141
+      orgname: "",
142
+      diagnoses: [],
143
+      pageArr: [],
144
+      faber: {},
145
+      total: 0,
146
+      projectPrint: [],
147
+      time: "",
148
+      doctor: "",
149
+      org_id: "",
150
+      singleProjectPrint: [],
151
+      total_copy: [],
152
+    };
153
+  },
154
+
155
+  methods: {
156
+    getAllDoctorList() {
157
+      getAllDoctorList().then((response) => {
158
+        if (response.data.state == 1) {
159
+          var doctor = response.data.data.doctor;
160
+
161
+          this.doctorList = doctor;
162
+        }
163
+      });
66 164
     },
67
-    data(){
68
-      return {
69
-        doctorList:[],
70
-        advicePrint:{},
71
-        patient:{},
72
-        tableData:[],
73
-        prescriptionInfo:[],
74
-        hisPatient:{},
75
-        department:[],
76
-        prescriptions:[],
77
-        projectList:[],
78
-        orgname:"",
79
-        diagnoses:[],
80
-        pageArr:[],
81
-        faber:{},
82
-        total:0,
83
-        projectPrint:[],
84
-        time:'',
85
-        doctor:'',
86
-        org_id:'',
87
-        singleProjectPrint:[]
165
+    getDoctor(id) {
166
+      var name = "";
167
+      for (let i = 0; i < this.doctorList.length; i++) {
168
+        if (id == this.doctorList[i].admin_user_id) {
169
+          name = this.doctorList[i].user_name;
170
+        }
88 171
       }
172
+      return name;
173
+    },
174
+    getTime(value, temp) {
175
+      if (value != undefined) {
176
+        return uParseTime(value, temp);
177
+      }
178
+      return "";
89 179
     },
90
-   methods:{
91
-     getAllDoctorList(){
92
-      getAllDoctorList().then(response=>{
93
-        if(response.data.state == 1){
94
-               var doctor =  response.data.data.doctor
95
-
96
-               this.doctorList = doctor
97
-             }
98
-         })
99
-     },
100
-     getDoctor(id){
101
-        var name = ""
102
-        for(let i=0;i<this.doctorList.length;i++){
103
-          if(id == this.doctorList[i].admin_user_id){
104
-              name = this.doctorList[i].user_name
105
-          }
106
-        }
107
-        return name
108
-      },
109
-     getTime(value, temp) {
110
-        if (value != undefined) {
111
-            return uParseTime(value, temp)
112
-        }
113
-        return ''
114
-     },
115
-     getTeam(prescriptions){
116
-        let projectPrint = []
117
-        let total = 0
118
-        prescriptions.map(item => {
119
-          if(item.project.length > 0){
120
-              item.project.map(it => {
121
-                    if(it.type == 2){
122
-                        if(it.project.cost_classify == 3){
123
-                            projectPrint.push(it)
124
-                            total += (it.project.price*parseInt(it.count))
125
-                        }
126
-                    }
127
-              })
128 180
 
181
+    getTeam(prescriptions, isUpdate = false) {
182
+      let projectPrint = [];
183
+      prescriptions.forEach((item) => {
184
+        // !此为修改前的处理方法,因考虑到可能有逻辑错误的存在故注释,若后续需求以这个为准可放开此条!
185
+        // if (item.project.length > 0) {
186
+        //   item.project.map((it) => {
187
+        //     if (it.type == 2) {
188
+        //       if (it.project.cost_classify == 3) {
189
+        //         projectPrint.push(it);
190
+        //       }
191
+        //     }
192
+        //   });
193
+        // }
194
+
195
+        if (item.project.length > 0) {
196
+          item.project.map((it) => {
197
+            projectPrint.push(it);
198
+          });
199
+        }
200
+      });
201
+
202
+      let data = [];
203
+      projectPrint.map((item) => {
204
+        console.log(item, "999");
205
+        if (item.team.id == 0) {
206
+          data.push(item);
207
+        } else {
208
+          let status = data.some((it) => it.team.id == item.team.id);
209
+          if (!status) {
210
+            data.push(item);
129 211
           }
130
-        })
131
-        let data = []
132
-        projectPrint.map(item => {
133
-          if(item.team.id != 0){
134
-            let status = data.some(it => (it.team.id == item.team.id))
135
-            if(!status){
136
-              data.push(item)
137
-            }
138
-          }
139
-
140
-        })
141
-
142
-        this.total = total.toFixed(2)
143
-        this.projectPrint = data
144
-        return data
145
-     },
146
-     getSingleTeam(prescriptions){
147
-        let projectPrint = []
148
-        let total = 0
149
-        prescriptions.map(item => {
150
-          if(item.project.length > 0){
151
-              item.project.map(it => {
152
-                    if(it.type == 2){
153
-                        if(it.project.cost_classify == 3){
154
-                            projectPrint.push(it)
155
-                            total += (it.project.price*parseInt(it.count))
156
-                        }
157
-                    }
158
-              })
212
+        }
213
+      });
214
+      if (isUpdate) {
215
+        this.projectPrint = data;
216
+      }
217
+      return data;
218
+    },
159 219
 
160
-          }
161
-        })
162
-        let data = []
163
-        projectPrint.map(item => {
164
-          if(item.team.id == 0){
165
-                data.push(item)
220
+    // 计算金额(单独从上面的方法割开来,防止进入死循环)
221
+    getSingleTeam(prescriptions) {
222
+      let projectPrint = [];
223
+      let total = 0;
224
+      prescriptions.map((item) => {
225
+        if (item.project.length > 0) {
226
+          item.project.map((it) => {
227
+            if (it.type == 2) {
228
+              if (it.project.cost_classify == 3) {
229
+                projectPrint.push(it);
230
+                total += it.project.price * parseInt(it.count);
166 231
               }
232
+            }
233
+          });
234
+        }
235
+      });
236
+      let total_copy = [];
237
+      total_copy.push(total.toFixed(2));
238
+      return total_copy;
239
+    },
167 240
 
168
-        })
169
-
170
-        this.total = total.toFixed(2)
171
-        return data
172
-     },
173
-
174
-     getInitData(){
175
-       getInitData().then(response=>{
176
-          if(response.data.state == 1){
177
-            this.department = response.data.data.department
178
-            this.diagnoses = response.data.data.diagnose.sort(this.compare('id'))
179
-          }
180
-       })
181
-     },
182
-     getDepart(id){
183
-         var name = ""
184
-       for(let i=0;i<this.department.length;i++){
185
-           if(id == this.department[i].id){
186
-               name = this.department[i].name
187
-           }
188
-       }
189
-       return name
190
-     },
241
+    getInitData() {
242
+      getInitData().then((response) => {
243
+        if (response.data.state == 1) {
244
+          this.department = response.data.data.department;
245
+          this.diagnoses = response.data.data.diagnose.sort(this.compare("id"));
246
+        }
247
+      });
248
+    },
249
+    getDepart(id) {
250
+      var name = "";
251
+      for (let i = 0; i < this.department.length; i++) {
252
+        if (id == this.department[i].id) {
253
+          name = this.department[i].name;
254
+        }
255
+      }
256
+      return name;
257
+    },
191 258
     getTotalOne(id) {
192
-
193
-        var total = 0
194
-        var addtotal = 0
195
-        for (let i = 0; i < this.prescriptions.length; i++) {
196
-          if(id == this.prescriptions[i].id){
197
-            if (this.prescriptions[i].project != null) {
198
-              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
199
-                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
200
-              }
259
+      var total = 0;
260
+      var addtotal = 0;
261
+      for (let i = 0; i < this.prescriptions.length; i++) {
262
+        if (id == this.prescriptions[i].id) {
263
+          if (this.prescriptions[i].project != null) {
264
+            for (let a = 0; a < this.prescriptions[i].project.length; a++) {
265
+              total =
266
+                total +
267
+                this.prescriptions[i].project[a].price *
268
+                  this.prescriptions[i].project[a].count;
201 269
             }
270
+          }
202 271
 
203
-            if (this.prescriptions[i].additionalcharge != null) {
204
-              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
205
-                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
206
-              }
272
+          if (this.prescriptions[i].additionalcharge != null) {
273
+            for (
274
+              let a = 0;
275
+              a < this.prescriptions[i].additionalcharge.length;
276
+              a++
277
+            ) {
278
+              addtotal =
279
+                addtotal +
280
+                this.prescriptions[i].additionalcharge[a].price *
281
+                  this.prescriptions[i].additionalcharge[a].count;
207 282
             }
208
-              addtotal =  Math.floor(addtotal * 100) / 100
283
+          }
284
+          addtotal = Math.floor(addtotal * 100) / 100;
209 285
         }
210
-
211
-       }
286
+      }
212 287
 
213 288
       for (let i = 0; i < this.prescriptions.length; i++) {
214
-          if(id == this.prescriptions[i].id){
215
-            if (this.prescriptions[i].advices != null) {
216
-              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
217
-                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
218
-              }
289
+        if (id == this.prescriptions[i].id) {
290
+          if (this.prescriptions[i].advices != null) {
291
+            for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
292
+              total =
293
+                total +
294
+                this.prescriptions[i].advices[a].price *
295
+                  this.prescriptions[i].advices[a].prescribing_number;
219 296
             }
297
+          }
220 298
 
221
-            if (this.prescriptions[i].additionalcharge != null) {
222
-              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
223
-                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
224
-              }
299
+          if (this.prescriptions[i].additionalcharge != null) {
300
+            for (
301
+              let a = 0;
302
+              a < this.prescriptions[i].additionalcharge.length;
303
+              a++
304
+            ) {
305
+              addtotal =
306
+                addtotal +
307
+                this.prescriptions[i].additionalcharge[a].price *
308
+                  this.prescriptions[i].additionalcharge[a].count;
225 309
             }
226
-              addtotal =  Math.floor(addtotal * 100) / 100
310
+          }
311
+          addtotal = Math.floor(addtotal * 100) / 100;
227 312
         }
228
-       }
313
+      }
229 314
 
230
-        return total + addtotal
231
-      },
315
+      return total + addtotal;
316
+    },
232 317
 
233
-     getProjectName(id){
234
-        var project_name = ""
235
-        for(let i=0;i<this.projectList.length;i++){
236
-           if(id == this.projectList[i].id){
237
-               project_name = this.projectList[i].project_name
238
-           }
318
+    getProjectName(id) {
319
+      var project_name = "";
320
+      for (let i = 0; i < this.projectList.length; i++) {
321
+        if (id == this.projectList[i].id) {
322
+          project_name = this.projectList[i].project_name;
239 323
         }
240
-        return project_name
241
-     },
242
-
243
-     getDiagnosis(ids){
244
-        let newIds = ids.split(',').sort(function(a,b){
245
-          return a-b;
246
-        })
247
-
248
-        let nameArr = []
249
-        for(let i=0;i<this.diagnoses.length;i++){
250
-          if(newIds.indexOf(this.diagnoses[i].id.toString()) > -1){
251
-            // name += diagnoses[i].class_name + ' '
252
-            nameArr.push(this.diagnoses[i].class_name)
253
-          }
324
+      }
325
+      return project_name;
326
+    },
327
+
328
+    getDiagnosis(ids) {
329
+      let newIds = ids.split(",").sort(function (a, b) {
330
+        return a - b;
331
+      });
332
+
333
+      let nameArr = [];
334
+      for (let i = 0; i < this.diagnoses.length; i++) {
335
+        if (newIds.indexOf(this.diagnoses[i].id.toString()) > -1) {
336
+          // name += diagnoses[i].class_name + ' '
337
+          nameArr.push(this.diagnoses[i].class_name);
254 338
         }
255
-        let newNameArr = []
256
-        nameArr.map((item,index) => {
257
-          if(item == '尿毒症'){
258
-            newNameArr.push(item)
259
-            nameArr.splice(index,1,'')
260
-          }
261
-        })
262
-        newNameArr.push(...nameArr)
263
-        return newNameArr.join(' ')
264
-     },
265
-     compare(property) {
266
-        return function(a,b){
267
-          var value1 = a[property];
268
-          var value2 = b[property];
269
-          return value1 - value2;//升序排序
339
+      }
340
+      let newNameArr = [];
341
+      nameArr.map((item, index) => {
342
+        if (item == "尿毒症") {
343
+          newNameArr.push(item);
344
+          nameArr.splice(index, 1, "");
270 345
         }
271
-      },
272
-     getPage(){
273
-        this.page = 1
274
-        this.pageArr = []
275
-
276
-        this.advicePrint.map(item => {
277
-          let arr = []
278
-          item.pageArr = []
279
-          if(item.advices.length <= 5){
280
-            this.page = 1
281
-            arr.push(item.advices.length)
282
-            item.pageArr.push(arr)
283
-
284
-          }else if(item.advices.length > 5){
285
-            this.page = parseInt(item.advices.length / 5)
286
-            let num = item.advices.length % 5
287
-            for (var i=0;i<this.page;i++){
288
-              item.pageArr.push([5])
289
-            }
290
-            if(num != 0){
291
-              item.pageArr.push([num])
292
-            }
346
+      });
347
+      newNameArr.push(...nameArr);
348
+      return newNameArr.join(" ");
349
+    },
350
+
351
+    compare(property) {
352
+      return function (a, b) {
353
+        var value1 = a[property];
354
+        var value2 = b[property];
355
+        return value1 - value2; //升序排序
356
+      };
357
+    },
358
+    getPage() {
359
+      this.page = 1;
360
+      this.pageArr = [];
361
+
362
+      this.advicePrint.map((item) => {
363
+        let arr = [];
364
+        item.pageArr = [];
365
+        if (item.advices.length <= 5) {
366
+          this.page = 1;
367
+          arr.push(item.advices.length);
368
+          item.pageArr.push(arr);
369
+        } else if (item.advices.length > 5) {
370
+          this.page = parseInt(item.advices.length / 5);
371
+          let num = item.advices.length % 5;
372
+          for (var i = 0; i < this.page; i++) {
373
+            item.pageArr.push([5]);
293 374
           }
294
-        })
295
-        // console.log('this.pageArr',this.pageArr)
296
-      },
297
-      getName(list) {
298
-        console.log('list',list)
299
-        let new_list = []
300
-        for (let i = 0; i < list.length; i++) {
301
-          if (list[i].aac031 == '1') {
302
-            new_list.push(list[i])
375
+          if (num != 0) {
376
+            item.pageArr.push([num]);
303 377
           }
304 378
         }
305
-
306
-        switch (new_list[0].bcc334) {
307
-          case "A31001":
308
-            return "深圳医保1档"
309
-            break
310
-          case "A31002":
311
-            return "深圳医保2档"
312
-
313
-            break
314
-          case "A31003":
315
-            return "深圳医保3档"
316
-
317
-            break
318
-          case "A31004":
319
-            return "二档(少儿)"
320
-
321
-            break
322
-          case "A31005":
323
-            return "学生二档"
324
-
325
-            break
326
-          case "A31006":
327
-            return "大学生二档"
328
-
329
-            break
330
-          case "A32001":
331
-            return "在职公务员"
332
-            break
333
-          case "A32002":
334
-            return "在职驻深公务员"
335
-
336
-            break
337
-          case "A39301":
338
-            return "家属统筹医疗"
339
-
340
-            break
341
-          case "A41001":
342
-            return "工伤在职"
343
-
344
-            break
345
-          case "A51001":
346
-            return "生育在职"
347
-
348
-            break
349
-          case "A52001":
350
-            return "生育医疗一档"
351
-
352
-            break
353
-          case "A52002":
354
-            return "生育医疗一档"
355
-
356
-            break
357
-          case "C31001":
358
-            return "一档医疗退休"
359
-
360
-            break
361
-          case "C31002":
362
-            return "二档医疗退休"
363
-            break
364
-
379
+      });
380
+      // console.log('this.pageArr',this.pageArr)
381
+    },
382
+    getName(list) {
383
+      console.log("list", list);
384
+      let new_list = [];
385
+      for (let i = 0; i < list.length; i++) {
386
+        if (list[i].aac031 == "1") {
387
+          new_list.push(list[i]);
365 388
         }
389
+      }
366 390
 
367
-
368
-
369
-      },
370
-
371
-   },
372
-   created(){
373
-      // this.getAllDoctorList()
374
-      this.getInitData()
375
-      // this.getPrescriptionPrint()
376
-      // this.getHisPatientDetail()
377
-      // this.getPatientCaseHistory()
378
-      var xtuser = this.$store.getters.xt_user;
379
-      this.orgname = xtuser.org.org_name;
380
-      this.org_id = this.$store.getters.xt_user.org_id
381
-
382
-   },
383
-   watch:{
384
-     ids:function(val){
385
-      this.ids = val
386
-      this.getPrescriptionPrint()
387
-    }
388
-   }
389
-}
391
+      switch (new_list[0].bcc334) {
392
+        case "A31001":
393
+          return "深圳医保1档";
394
+          break;
395
+        case "A31002":
396
+          return "深圳医保2档";
397
+
398
+          break;
399
+        case "A31003":
400
+          return "深圳医保3档";
401
+
402
+          break;
403
+        case "A31004":
404
+          return "二档(少儿)";
405
+
406
+          break;
407
+        case "A31005":
408
+          return "学生二档";
409
+
410
+          break;
411
+        case "A31006":
412
+          return "大学生二档";
413
+
414
+          break;
415
+        case "A32001":
416
+          return "在职公务员";
417
+          break;
418
+        case "A32002":
419
+          return "在职驻深公务员";
420
+
421
+          break;
422
+        case "A39301":
423
+          return "家属统筹医疗";
424
+
425
+          break;
426
+        case "A41001":
427
+          return "工伤在职";
428
+
429
+          break;
430
+        case "A51001":
431
+          return "生育在职";
432
+
433
+          break;
434
+        case "A52001":
435
+          return "生育医疗一档";
436
+
437
+          break;
438
+        case "A52002":
439
+          return "生育医疗一档";
440
+
441
+          break;
442
+        case "C31001":
443
+          return "一档医疗退休";
444
+
445
+          break;
446
+        case "C31002":
447
+          return "二档医疗退休";
448
+          break;
449
+      }
450
+    },
451
+  },
452
+  created() {
453
+    // this.getAllDoctorList()
454
+    this.getInitData();
455
+    // this.getPrescriptionPrint()
456
+    // this.getHisPatientDetail()
457
+    // this.getPatientCaseHistory()
458
+    var xtuser = this.$store.getters.xt_user;
459
+    this.orgname = xtuser.org.org_name;
460
+    this.org_id = this.$store.getters.xt_user.org_id;
461
+  },
462
+  watch: {
463
+    ids: function (val) {
464
+      this.ids = val;
465
+      this.getPrescriptionPrint();
466
+    },
467
+    // printData: {
468
+    //   immediate: true,
469
+    //   deep: true,
470
+    //   handler(val) {
471
+    //     console.log(val, "val");
472
+    //     val.forEach((el) => {
473
+    //       this.getTeam(el.prescriptions, true);
474
+    //     });
475
+    //   },
476
+    // },
477
+  },
478
+};
390 479
 </script>
391 480
 
392 481
 
393 482
 <style lang="scss" scoped>
394
-.prescription-print{
395
-  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
396
-    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
397
-    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
398
-    margin-bottom: 20px;
399
-    padding:20px 10px;
483
+.prescription-print {
484
+  // -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
485
+  //   0 0 60px rgba(0, 0, 0, 0.06) inset;
486
+  // -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
487
+  //   0 0 40px rgba(0, 0, 0, 0.06) inset;
488
+  // box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
489
+  margin-bottom: 20px;
490
+  padding: 20px 10px;
400 491
 }
401
-.printTitle{
402
-    font-size: 22px;
403
-    text-align: center;
404
-    font-weight: bold;
405
-    margin-bottom: 10px;
492
+.printTitle {
493
+  font-size: 22px;
494
+  text-align: center;
495
+  font-weight: bold;
496
+  margin-bottom: 10px;
406 497
 }
407
-.infoTitle{
408
-    display: flex;
409
-    margin-top:10px;
410
-    line-height: 24px;
498
+.infoTitle {
499
+  display: flex;
500
+  margin-top: 10px;
501
+  line-height: 24px;
411 502
 }
412
-.infoTitle div{
413
-    width: 200px;
503
+.infoTitle div {
504
+  width: 200px;
414 505
 }
415
-.infoMain{
416
-    display: flex;
417
-    flex-wrap: wrap;
418
-    margin-top:10px;
506
+.infoMain {
507
+  display: flex;
508
+  flex-wrap: wrap;
509
+  margin-top: 10px;
419 510
 }
420
-.infoMain div{
421
-    width: 50%;
422
-    line-height: 24px;
511
+.infoMain div {
512
+  width: 50%;
513
+  line-height: 24px;
423 514
 }
424
-.prescriptionBox{
425
-    padding:0 10px;
426
-    min-height:400px;
515
+.prescriptionBox {
516
+  padding: 0 10px;
517
+  min-height: 400px;
427 518
 }
428
-.Rp{
429
-    font-size: 22px;
430
-    font-weight: bold;
519
+.Rp {
520
+  font-size: 22px;
521
+  font-weight: bold;
431 522
 }
432
-.drugsBox{
433
-    padding-left: 40px;
434
-    margin-bottom: 10px;
523
+.drugsBox {
524
+  padding-left: 40px;
525
+  margin-bottom: 10px;
435 526
 }
436
-.drugsBox div{
437
-    line-height: 20px;
527
+.drugsBox div {
528
+  line-height: 20px;
438 529
 }
439
-.drugsOne{
440
-    line-height: 24px;
530
+.drugsOne {
531
+  line-height: 24px;
441 532
 }
442
-.drugsOne span{
443
-    margin-right: 20px;
533
+.drugsOne span {
534
+  margin-right: 20px;
444 535
 }
445
-.doctorBox{
446
-    display: flex;
447
-    justify-content: space-between;
448
-    padding:0 10px;
449
-    line-height: 24px;
450
-    border-bottom: 2px solid #000;
536
+.doctorBox {
537
+  display: flex;
538
+  justify-content: space-between;
539
+  padding: 0 10px;
540
+  line-height: 24px;
541
+  border-bottom: 2px solid #000;
451 542
 }
452
-.actionBar{
453
-    display: flex;
454
-    justify-content: space-between;
455
-    line-height: 24px;
456
-    padding:0 10px;
543
+.actionBar {
544
+  display: flex;
545
+  justify-content: space-between;
546
+  line-height: 24px;
547
+  padding: 0 10px;
457 548
 }
458
-.actionBar p{
459
-    width:150px;
549
+.actionBar p {
550
+  width: 150px;
460 551
 }
461
-.under_line{
552
+.under_line {
462 553
   display: inline-block;
463 554
   border-bottom: 1px solid #000;
464 555
   flex: 1;

+ 9 - 14
src/xt_pages/outpatientDoctorStation/batch_print_template/index.vue 查看文件

@@ -67,7 +67,7 @@ export default {
67 67
        patient_id:"",
68 68
        prescription_id:"",
69 69
        ids:'',
70
-       paramsObj:{},
70
+      //  paramsObj:{},
71 71
        org_id:''
72 72
     };
73 73
   },
@@ -148,7 +148,6 @@ export default {
148 148
       this.patient_id = row.patient_id
149 149
       this.record_date = this.record_date
150 150
       this.prescription_id = this.prescription_id
151
-      console.log("row",row)
152 151
         // var params = {
153 152
         //   patient_id:row.patient_id,
154 153
         //   record_date:this.record_date,
@@ -178,21 +177,17 @@ export default {
178 177
   },
179 178
 
180 179
   created() {
181
-    this.org_id = this.$store.getters.xt_user.org_id
182
-    this.getAllDoctorList()
183
-    var record_date = this.paramsObj.record
184
-    this.record_date = record_date
185
-    console.log("record_date",record_date)
186
-    var prescription_id = this.paramsObj.prescription_id
187
-    this.prescription_id = prescription_id
188
-    this.patient_id = this.paramsObj.patient_id
189
-    this.ids = this.paramsObj.ids
190
-    // var record_date = this.$route.query.record
180
+    // console.log(this.paramsObj,'打印测试')
181
+    // this.org_id = this.$store.getters.xt_user.org_id
182
+    // this.getAllDoctorList()
183
+    // var record_date = this.paramsObj.record
191 184
     // this.record_date = record_date
192 185
     // console.log("record_date",record_date)
193
-    // var prescription_id = this.$route.query.prescription_id
186
+    // var prescription_id = this.paramsObj.prescription_id
194 187
     // this.prescription_id = prescription_id
195
-    this.getAllHisPatientList(record_date)
188
+    // this.patient_id = this.paramsObj.patient_id
189
+    // this.ids = this.paramsObj.ids
190
+    // this.getAllHisPatientList(record_date)
196 191
   },
197 192
   watch:{
198 193
     // paramsObj:{//深度监听,可监听到对象、数组的变化

+ 397 - 286
src/xt_pages/outpatientDoctorStation/batch_print_template/printOne.vue 查看文件

@@ -1,340 +1,451 @@
1 1
 <template>
2
-  <div id='prescriptionPrint'>
3
-    <div v-for="(i,index) in printData">
4
-      <div v-for="(item,index) in i.prescriptions" :key="index">
5
-        <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
6
-            <div class="printTitle" v-if="item.med_type == '1111'">{{orgname}}第一类精神处方笺</div>
7
-            <div class="printTitle"  v-if="item.med_type == '1112'">{{orgname}}第二类精神处方笺</div>
8
-            <div class="printTitle" v-if="item.med_type != '1111' && item.med_type != '1112'">{{orgname}}处方笺</div>
9
-            <!--<div class="printTitle">{{orgname}}处方笺</div>-->
10
-            <div class="infoTitle">
11
-                <p>姓名:{{i.his_patient.id != 0?i.his_patient.name:i.name}}</p>
12
-                <p>性别:
13
-                  <span>
14
-                    <span v-if="i.gender == 1">男</span>
15
-                    <span v-if="i.gender == 2">女</span>
16
-                  </span>
17
-                </p>
18
-                <p>年龄:{{i.his_patient.id != 0?getAge(i.his_patient):i.age}}岁</p>
2
+  <div id="prescriptionPrint">
3
+    <div v-for="(i, index) in printData" :key="index">
4
+      <div v-for="(item, index) in i.prescriptions" :key="index">
5
+        <div
6
+          id="prescription-print"
7
+          class="prescription-print"
8
+          style="page-break-after: always"
9
+        >
10
+          <div class="printTitle" v-if="item.med_type == '1111'">
11
+            {{ orgname }}第一类精神处方笺
12
+          </div>
13
+          <div class="printTitle" v-if="item.med_type == '1112'">
14
+            {{ orgname }}第二类精神处方笺
15
+          </div>
16
+          <div
17
+            class="printTitle"
18
+            v-if="item.med_type != '1111' && item.med_type != '1112'"
19
+          >
20
+            {{ orgname }}处方笺
21
+          </div>
22
+          <!--<div class="printTitle">{{orgname}}处方笺</div>-->
23
+          <div class="infoTitle">
24
+            <p>
25
+              姓名:{{ i.his_patient.id != 0 ? i.his_patient.name : i.name }}
26
+            </p>
27
+            <p>
28
+              性别:
29
+              <span>
30
+                <span v-if="i.gender == 1">男</span>
31
+                <span v-if="i.gender == 2">女</span>
32
+              </span>
33
+            </p>
34
+            <p>
35
+              年龄:{{
36
+                i.his_patient.id != 0 ? getAge(i.his_patient) : i.age
37
+              }}岁
38
+            </p>
39
+          </div>
40
+          <div class="infoMain">
41
+            <div style="margin-bottom: 10px">
42
+              门诊号:{{ i.his_patient.id != 0 ? i.his_patient.number : "" }}
19 43
             </div>
20
-            <div class="infoMain">
21
-                <div style="margin-bottom: 10px;">门诊号:{{i.his_patient.id != 0?i.his_patient.number:""}}</div>
22
-                <div style="margin-bottom: 10px;">科室:{{i.his_patient.id != 0?getDepart(i.his_patient.departments):''}}</div>
23
-                <div style="margin-bottom: 10px;">医保卡号:{{i.his_patient.id != 0?i.his_patient.id_card_no:""}}</div>
24
-                <div style="margin-bottom: 10px;" v-if="org_id != 10188">电话:{{i.phone}}</div>
25
-                <div style="margin-bottom: 10px;" v-else>日期:{{getTime(i.info.ctime)?getTime(i.info.ctime):""}}</div>
26
-                <div>地址:{{i.home_address}}</div>
27
-                <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(i.info.diagnosis)}}</div>
44
+            <div style="margin-bottom: 10px">
45
+              科室:{{
46
+                i.his_patient.id != 0
47
+                  ? getDepart(i.his_patient.departments)
48
+                  : ""
49
+              }}
28 50
             </div>
29
-            <div class="prescriptionBox">
30
-                <div class="Rp">Rp:</div>
31
-                <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
32
-                    <!-- <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> -->
33
-                    <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>
34
-                    <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>
35
-                </div>
36
-                <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
37
-                  <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
38
-                </div>
39
-
40
-                <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
41
-                    <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.type == 2?getProjectName(it.project_id)?getProjectName(it.project_id):"":it.good_info.good_name}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
42
-                    <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>
43
-                </div>
44
-                <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
45
-                  <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price.toFixed(2)}}元/{{it.count}}次</div>
46
-                </div>
47
-                <div style="text-align:center;" >(以下空白)</div>
48
-
51
+            <div style="margin-bottom: 10px">
52
+              医保卡号:{{
53
+                i.his_patient.id != 0 ? i.his_patient.id_card_no : ""
54
+              }}
55
+            </div>
56
+            <div style="margin-bottom: 10px" v-if="org_id != 10188">
57
+              电话:{{ i.phone }}
58
+            </div>
59
+            <div style="margin-bottom: 10px" v-else>
60
+              日期:{{ getTime(i.info.ctime) ? getTime(i.info.ctime) : "" }}
61
+            </div>
62
+            <div>地址:{{ i.home_address }}</div>
63
+            <div style="display: flex; width: 50%">
64
+              临床诊断:{{ getDiagnosis(i.info.diagnosis)}}
65
+            </div>
66
+          </div>
67
+          <div class="prescriptionBox">
68
+            <div class="Rp">Rp:</div>
69
+            <div
70
+              class="drugsBox"
71
+              v-for="(it, index) in item.advices"
72
+              :key="index"
73
+            >
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">
76
+                <span style="font-weight: bold">{{ index + 1 + "." }}</span
77
+                >{{ it.advice_name ? it.advice_name : "" }}&nbsp;&nbsp;<span
78
+                  v-if="it.drug.min_unit != it.drug.dose_unit"
79
+                  >{{ it.drug.dose }}{{ it.drug.dose_unit }}&nbsp;* &nbsp;</span
80
+                >{{ it.drug.min_number }}{{ it.drug.min_unit }}/{{
81
+                  it.drug.max_unit
82
+                }}&nbsp;×&nbsp; {{ it.prescribing_number
83
+                }}{{ it.prescribing_number_unit }}
84
+              </div>
85
+              <div style="margin-left: 100px">
86
+                <span>用法:{{ it.single_dose }}{{ it.single_dose_unit }}</span
87
+                >&nbsp;&nbsp;<span
88
+                  >{{ it.execution_frequency }}&nbsp;{{
89
+                    it.delivery_way
90
+                  }}&nbsp;</span
91
+                >&nbsp;&nbsp;<span>{{ it.advice_desc }}</span>
92
+              </div>
49 93
             </div>
50
-            <div class="doctorBox" v-if="org_id != 10188">
51
-                <p>医师:{{i.info.doctor?i.info.doctor:""}}</p>
52
-                <p>日期:{{getTime(i.info.ctime)?getTime(i.info.ctime):""}}</p>
94
+            <div
95
+              class="drugsBox"
96
+              v-for="(it, i) in item.additionalcharge"
97
+              :key="i"
98
+            >
99
+              <div class="drugsOne">
100
+                {{ it.item_name ? it.item_name : "" }}:&nbsp;{{ it.price }}元/{{
101
+                  it.count
102
+                }}次
103
+              </div>
53 104
             </div>
54
-            <div class="doctorBox" v-else>
55
-              <p>药师:</p>
56
-              <p>医师:{{i.info.doctor?i.info.doctor:""}}</p>
105
+
106
+            <div
107
+              class="drugsBox"
108
+              v-for="(it, index) in item.project"
109
+              :key="index"
110
+            >
111
+              <div class="drugsOne">
112
+                <span style="font-weight: bold">{{ index + 1 + "." }}</span
113
+                >{{
114
+                  it.type == 2
115
+                    ? getProjectName(it.project_id)
116
+                      ? getProjectName(it.project_id)
117
+                      : ""
118
+                    : it.good_info.good_name
119
+                }}&nbsp;&nbsp;{{ it.single_dose
120
+                }}{{ it.single_dose_unit }}&nbsp;×&nbsp; {{ it.count
121
+                }}{{ unit }}
122
+              </div>
123
+              <div style="margin-left: 100px">
124
+                <span>用法:{{ it.single_dose }}{{ it.single_dose_unit }}</span
125
+                >&nbsp;&nbsp;<span>{{ it.delivery_way }}</span
126
+                >&nbsp;&nbsp;<span>{{ it.advice_desc }}</span>
127
+              </div>
128
+            </div>
129
+            <div
130
+              class="drugsBox"
131
+              v-for="(it, i) in item.additionalcharge"
132
+              :key="i"
133
+            >
134
+              <div class="drugsOne">
135
+                {{ it.project_id ? it.project_id : "" }}:&nbsp;{{
136
+                  it.price.toFixed(2)
137
+                }}元/{{ it.count }}次
138
+              </div>
57 139
             </div>
58
-            <div class="actionBar" v-if="org_id != 10188">
59
-                  <!-- <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
140
+            <div style="text-align: center">(以下空白)</div>
141
+          </div>
142
+          <div class="doctorBox" v-if="org_id != 10188">
143
+            <p>医师:{{ i.info.doctor ? i.info.doctor : "" }}</p>
144
+            <p>
145
+              日期:{{ getTime(i.info.ctime) ? getTime(i.info.ctime) : "" }}
146
+            </p>
147
+          </div>
148
+          <div class="doctorBox" v-else>
149
+            <p>药师:</p>
150
+            <p>医师:{{ i.info.doctor ? i.info.doctor : "" }}</p>
151
+          </div>
152
+          <div class="actionBar" v-if="org_id != 10188">
153
+            <!-- <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
60 154
                   <p>配对:</p>
61 155
                   <p>核对:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
62 156
                   <p>发药:{{getDoctor(item.advices[0].execution_staff)?getDoctor(item.advices[0].execution_staff):""}}</p>
63 157
                   <p>药费:{{getTotalOne(item.id)?getTotalOne(item.id):0}}元</p> -->
64 158
 
65
-                  <p>审核:</p>
66
-                  <p>配对:</p>
67
-                  <p>核对:</p>
68
-                  <p>发药:</p>
69
-                  <p>药费:{{getTotalOne(item.advices).toFixed(2)?getTotalOne(item.advices).toFixed(2):0}}元</p>
70
-  <!--            <p>药费:466.2元</p>-->
71
-
72
-            </div>
73
-            <div class="actionBar" v-else>
74
-              <p style="visibility: hidden;">审核:</p>
75
-              <p style="visibility: hidden;">配对:</p>
76
-              <p style="visibility: hidden;">核对:</p>
77
-              <p style="visibility: hidden;">发药:</p>
78
-              <p>药费:{{getTotalOne(item.advices).toFixed(2)?getTotalOne(item.advices).toFixed(2):0}}元</p>
79
-  <!--            <p>药费:551.2元</p>-->
80
-  <!--            <p>药费:466.2元</p>-->
81
-
82
-
83
-            </div>
84
-            <div style="page-break-after:always"></div>
159
+            <p>审核:</p>
160
+            <p>配对:</p>
161
+            <p>核对:</p>
162
+            <p>发药:</p>
163
+            <p>
164
+              药费:{{
165
+                getTotalOne(item.advices).toFixed(2)
166
+                  ? getTotalOne(item.advices).toFixed(2)
167
+                  : 0
168
+              }}元
169
+            </p>
170
+            <!--            <p>药费:466.2元</p>-->
171
+          </div>
172
+          <div class="actionBar" v-else>
173
+            <p style="visibility: hidden">审核:</p>
174
+            <p style="visibility: hidden">配对:</p>
175
+            <p style="visibility: hidden">核对:</p>
176
+            <p style="visibility: hidden">发药:</p>
177
+            <p>
178
+              药费:{{
179
+                getTotalOne(item.advices).toFixed(2)
180
+                  ? getTotalOne(item.advices).toFixed(2)
181
+                  : 0
182
+              }}元
183
+            </p>
184
+            <!--            <p>药费:551.2元</p>-->
185
+            <!--            <p>药费:466.2元</p>-->
186
+          </div>
187
+          <div style="page-break-after: always"></div>
85 188
         </div>
86 189
       </div>
87 190
     </div>
88 191
   </div>
89
-
90
-
91 192
 </template>
92 193
 <script>
93
-import { jsGetAge, uParseTime } from '@/utils/tools'
94
-import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail} from "@/api/project/project"
95
-import {getInitData} from "@/api/his/his"
194
+import { jsGetAge, uParseTime } from "@/utils/tools";
195
+import {
196
+  getAllDoctorList,
197
+  getPrescriptionPrint,
198
+  getHisPatientDetail,
199
+} from "@/api/project/project";
200
+import { getInitData } from "@/api/his/his";
96 201
 export default {
97
-    props:{
98
-      patient_id:Number,
99
-      record_date:String,
100
-      prescription_id:Number,
101
-      ids:String,
102
-      printData:Array
103
-    },
104
-    data(){
105
-      return {
106
-        doctorList:[],
107
-        advicePrint:{},
108
-        patient:{},
109
-        tableData:[],
110
-        prescriptionInfo:[],
111
-        hisPatient:{},
112
-        department:[],
113
-        prescriptions:[],
114
-        projectList:[],
115
-        orgname:"",
116
-        diagnoses:[],
117
-        org_id: 0
202
+  props: {
203
+    patient_id: String,
204
+    record_date: String,
205
+    prescription_id: String,
206
+    ids: String,
207
+    printData: Array,
208
+  },
209
+  data() {
210
+    return {
211
+      doctorList: [],
212
+      advicePrint: {},
213
+      patient: {},
214
+      tableData: [],
215
+      prescriptionInfo: [],
216
+      hisPatient: {},
217
+      department: [],
218
+      prescriptions: [],
219
+      projectList: [],
220
+      orgname: "",
221
+      diagnoses: [],
222
+      org_id: 0,
223
+    };
224
+  },
225
+  methods: {
226
+    getAge(patient) {
227
+      var thisLen = patient.id_card_no.length;
228
+      var birth = "";
229
+      if (thisLen == 15) {
230
+        birth = "19" + patient.id_card_no.substr(6, 6);
231
+      } else {
232
+        birth = patient.id_card_no.substr(6, 8);
118 233
       }
234
+      var births =
235
+        birth.substr(0, 4) +
236
+        "-" +
237
+        birth.substr(4, 2) +
238
+        "-" +
239
+        birth.substr(6, 2);
240
+      return jsGetAge(births, "-");
119 241
     },
120
-   methods:{
121
-     getAge(patient){
122
-       var thisLen = patient.id_card_no.length
123
-       var birth = ''
124
-       if (thisLen == 15) {
125
-         birth = '19' + patient.id_card_no.substr(6, 6)
126
-       } else {
127
-         birth = patient.id_card_no.substr(6, 8)
128
-       }
129
-       var births =
130
-         birth.substr(0, 4) +
131
-         '-' +
132
-         birth.substr(4, 2) +
133
-         '-' +
134
-         birth.substr(6, 2)
135
-       return jsGetAge(births, '-')
136
-
137
-     },
138 242
 
139
-     getAllDoctorList(){
140
-      getAllDoctorList().then(response=>{
141
-        if(response.data.state == 1){
142
-               var doctor =  response.data.data.doctor
243
+    getAllDoctorList() {
244
+      getAllDoctorList().then((response) => {
245
+        if (response.data.state == 1) {
246
+          var doctor = response.data.data.doctor;
143 247
 
144
-               this.doctorList = doctor
145
-             }
146
-         })
147
-     },
248
+          this.doctorList = doctor;
249
+        }
250
+      });
251
+    },
148 252
 
149
-      getDoctor(id){
150
-        var name = ""
151
-        for(let i=0;i<this.doctorList.length;i++){
152
-          if(id == this.doctorList[i].admin_user_id){
153
-              name = this.doctorList[i].user_name
154
-          }
253
+    getDoctor(id) {
254
+      var name = "";
255
+      for (let i = 0; i < this.doctorList.length; i++) {
256
+        if (id == this.doctorList[i].admin_user_id) {
257
+          name = this.doctorList[i].user_name;
155 258
         }
156
-        return name
157
-      },
158
-      getTime(value, temp) {
159
-        if (value != undefined) {
160
-            return uParseTime(value, temp)
259
+      }
260
+      return name;
261
+    },
262
+    getTime(value, temp) {
263
+      if (value != undefined) {
264
+        return uParseTime(value, temp);
265
+      }
266
+      return "";
267
+    },
268
+    getPrescriptionPrint() {
269
+      var params = {
270
+        // patient_id:this.patient_id,
271
+        // record_date:this.record_date,
272
+        // prescription_id:this.prescription_id,
273
+        patient_id: this.patient_id,
274
+        record_date: this.record_date,
275
+        prescription_id: this.prescription_id,
276
+        ids: this.ids,
277
+      };
278
+      console.log("params", params);
279
+      getPrescriptionPrint(params).then((response) => {
280
+        if (response.data.state == 1) {
281
+          var advicePrint = response.data.data.advicePrint;
282
+          console.log("adviceprint9999", advicePrint);
283
+          this.advicePrint = advicePrint;
284
+          this.prescriptions = advicePrint;
285
+          console.log("处方222222", this.prescriptions);
286
+          var hisPatient = response.data.data.hisPatient;
287
+          console.log("hisPatient", hisPatient);
288
+          this.hisPatient = hisPatient;
289
+          var projectlist = response.data.data.projectlist;
290
+          console.log("所有项目列表", projectlist);
291
+          this.projectList = projectlist;
161 292
         }
162
-        return ''
163
-     },
164
-       getPrescriptionPrint(){
165
-         var params = {
166
-          // patient_id:this.patient_id,
167
-          // record_date:this.record_date,
168
-          // prescription_id:this.prescription_id,
169
-          patient_id:this.patient_id,
170
-          record_date:this.record_date,
171
-          prescription_id:this.prescription_id,
172
-          ids:this.ids
293
+      });
294
+    },
295
+    getHisPatientDetail() {
296
+      const params = {
297
+        patient_id: this.patient_id,
298
+      };
299
+      getHisPatientDetail(params).then((response) => {
300
+        if (response.data.state == 1) {
301
+          var hisPatient = response.data.data.hisPatient;
302
+          console.log("挂号病人", hisPatient);
303
+          this.hisPatient = hisPatient;
173 304
         }
174
-        console.log("params",params)
175
-       getPrescriptionPrint(params).then(response=>{
176
-         if(response.data.state == 1){
177
-            var advicePrint =  response.data.data.advicePrint
178
-            console.log("adviceprint9999",advicePrint)
179
-            this.advicePrint = advicePrint
180
-            this.prescriptions = advicePrint
181
-            console.log("处方222222",this.prescriptions)
182
-            var hisPatient = response.data.data.hisPatient
183
-            console.log("hisPatient",hisPatient)
184
-            this.hisPatient = hisPatient
185
-            var projectlist =  response.data.data.projectlist
186
-            console.log("所有项目列表",projectlist)
187
-            this.projectList = projectlist
188
-          }
189
-       })
190
-     },
191
-     getHisPatientDetail(){
192
-          const params = {
193
-              patient_id:this.patient_id
194
-          }
195
-       getHisPatientDetail(params).then(response=>{
196
-          if(response.data.state == 1){
197
-             var hisPatient =  response.data.data.hisPatient
198
-             console.log("挂号病人",hisPatient)
199
-             this.hisPatient = hisPatient
200
-          }
201
-       })
202
-     },
203
-     getInitData(){
204
-       getInitData().then(response=>{
205
-          if(response.data.state == 1){
206
-            this.department = response.data.data.department
207
-            this.diagnoses = response.data.data.diagnose
208
-            console.log("争端",this.diagnoses)
209
-          }
210
-       })
211
-     },
212
-     getDepart(id){
213
-         var name = ""
214
-       for(let i=0;i<this.department.length;i++){
215
-           if(id == this.department[i].id){
216
-               name = this.department[i].name
217
-           }
218
-       }
219
-       return name
220
-     },
305
+      });
306
+    },
307
+    getInitData() {
308
+      getInitData().then((response) => {
309
+        if (response.data.state == 1) {
310
+          this.department = response.data.data.department;
311
+          this.diagnoses = response.data.data.diagnose;
312
+          console.log("争端", this.diagnoses);
313
+        }
314
+      });
315
+    },
316
+    getDepart(id) {
317
+      var name = "";
318
+      for (let i = 0; i < this.department.length; i++) {
319
+        if (id == this.department[i].id) {
320
+          name = this.department[i].name;
321
+        }
322
+      }
323
+      return name;
324
+    },
221 325
     getTotalOne(advices) {
222
-      let total = 0
223
-      advices.map(item => {
224
-        total += item.price * item.prescribing_number
225
-      })
226
-      return total
326
+      let total = 0;
327
+      advices.map((item) => {
328
+        total += item.price * item.prescribing_number;
329
+      });
330
+      return total;
227 331
     },
228 332
 
229
-     getProjectName(id){
230
-        var project_name = ""
231
-        for(let i=0;i<this.projectList.length;i++){
232
-           if(id == this.projectList[i].id){
233
-               project_name = this.projectList[i].project_name
234
-           }
333
+    getProjectName(id) {
334
+      var project_name = "";
335
+      for (let i = 0; i < this.projectList.length; i++) {
336
+        if (id == this.projectList[i].id) {
337
+          project_name = this.projectList[i].project_name;
235 338
         }
236
-        return project_name
237
-     },
339
+      }
340
+      return project_name;
341
+    },
342
+
343
+    getDiagnosis(id) {
344
+      let id_ = id.split(",");
345
+      let nameArr = [];
346
+      let name = "";
238 347
 
239
-     getDiagnosis(id){
240
-        var name = ""
241
-        for(let i=0;i<this.diagnoses.length;i++){
242
-          if(id == this.diagnoses[i].id){
243
-             name = this.diagnoses[i].class_name
348
+      for (let i = 0; i < this.diagnoses.length; i++) {
349
+        for (let j = 0; j < id_.length; j++) {
350
+          if (id_[j] == this.diagnoses[i].id) {
351
+            nameArr[j] = this.diagnoses[i].class_name;
352
+            name = nameArr.join(',')
244 353
           }
245 354
         }
246
-        return name
247
-     }
248
-
249
-   },
250
-   created(){
251
-      console.log('this.printData',this.printData)
252
-      // this.getAllDoctorList()
253
-      this.getInitData()
254
-      // this.getPrescriptionPrint()
255
-      // this.getHisPatientDetail()
256
-      var xtuser = this.$store.getters.xt_user;
257
-      this.orgname = xtuser.org.org_name;
258
-      this.org_id = xtuser.org.id
259
-   },
260
-   watch:{
261
-     ids:function(val){
262
-      this.ids = val
355
+      }
356
+      return name;
357
+    },
358
+  },
359
+  created() {
360
+    console.log("this.printData", this.printData);
361
+    // this.getAllDoctorList()
362
+    this.getInitData();
363
+    // this.getPrescriptionPrint()
364
+    // this.getHisPatientDetail()
365
+    var xtuser = this.$store.getters.xt_user;
366
+    this.orgname = xtuser.org.org_name;
367
+    this.org_id = xtuser.org.id;
368
+  },
369
+  watch: {
370
+    ids: function (val) {
371
+      this.ids = val;
263 372
       // this.getPrescriptionPrint()
264
-    }
265
-   }
266
-}
373
+    },
374
+  },
375
+};
267 376
 </script>
268 377
 
269 378
 
270 379
 <style lang="scss" scoped>
271
-.prescription-print{
272
-  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
273
-    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
274
-    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
275
-    margin-bottom: 20px;
276
-    padding:20px 10px;
380
+.prescription-print {
381
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
382
+    0 0 60px rgba(0, 0, 0, 0.06) inset;
383
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
384
+    0 0 40px rgba(0, 0, 0, 0.06) inset;
385
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
386
+  margin-bottom: 20px;
387
+  padding: 20px 10px;
277 388
 }
278
-.printTitle{
279
-    font-size: 22px;
280
-    text-align: center;
281
-    font-weight: bold;
389
+.printTitle {
390
+  font-size: 22px;
391
+  text-align: center;
392
+  font-weight: bold;
282 393
 }
283
-.infoTitle{
284
-    display: flex;
285
-    border-bottom: 2px solid #000;
286
-    margin-top:10px;
287
-    line-height: 24px;
288
-    padding:0 10px;
394
+.infoTitle {
395
+  display: flex;
396
+  border-bottom: 2px solid #000;
397
+  margin-top: 10px;
398
+  line-height: 24px;
399
+  padding: 0 10px;
289 400
 }
290
-.infoTitle p{
291
-    width: 200px;
401
+.infoTitle p {
402
+  width: 200px;
292 403
 }
293
-.infoMain{
294
-    display: flex;
295
-    flex-wrap: wrap;
296
-    border-bottom: 2px solid #000;
297
-    padding:0 10px;
404
+.infoMain {
405
+  display: flex;
406
+  flex-wrap: wrap;
407
+  border-bottom: 2px solid #000;
408
+  padding: 0 10px;
298 409
 }
299
-.infoMain div{
300
-    width: 50%;
301
-    line-height: 24px;
410
+.infoMain div {
411
+  width: 50%;
412
+  line-height: 24px;
302 413
 }
303
-.prescriptionBox{
304
-    padding:0 10px;
305
-    min-height:450px;
414
+.prescriptionBox {
415
+  padding: 0 10px;
416
+  min-height: 450px;
306 417
 }
307
-.Rp{
308
-    font-size: 22px;
309
-    font-weight: bold;
418
+.Rp {
419
+  font-size: 22px;
420
+  font-weight: bold;
310 421
 }
311
-.drugsBox{
312
-    padding-left: 40px;
313
-    margin-bottom: 10px;
422
+.drugsBox {
423
+  padding-left: 40px;
424
+  margin-bottom: 10px;
314 425
 }
315
-.drugsBox div{
316
-    line-height: 20px;
426
+.drugsBox div {
427
+  line-height: 20px;
317 428
 }
318
-.drugsOne{
319
-    line-height: 24px;
429
+.drugsOne {
430
+  line-height: 24px;
320 431
 }
321
-.drugsOne span{
322
-    margin-right: 20px;
432
+.drugsOne span {
433
+  margin-right: 20px;
323 434
 }
324
-.doctorBox{
325
-    display: flex;
326
-    justify-content: space-between;
327
-    padding:0 10px;
328
-    line-height: 24px;
329
-    border-bottom: 2px solid #000;
435
+.doctorBox {
436
+  display: flex;
437
+  justify-content: space-between;
438
+  padding: 0 10px;
439
+  line-height: 24px;
440
+  border-bottom: 2px solid #000;
330 441
 }
331
-.actionBar{
332
-    display: flex;
333
-    justify-content: space-between;
334
-    line-height: 24px;
335
-    padding:0 10px;
442
+.actionBar {
443
+  display: flex;
444
+  justify-content: space-between;
445
+  line-height: 24px;
446
+  padding: 0 10px;
336 447
 }
337
-.actionBar p{
338
-    width:150px;
448
+.actionBar p {
449
+  width: 150px;
339 450
 }
340 451
 </style>

+ 18 - 6
src/xt_pages/outpatientDoctorStation/batch_print_treatTemplate/printOne.vue 查看文件

@@ -35,7 +35,7 @@
35 35
                 </div>
36 36
                 <div style="margin-bottom: 10px;width:25%">参保类型:{{i.his_patient.id != 0?i.his_patient.social_type:''}}
37 37
                 </div>
38
-                <div style="margin-bottom: 10px;width:50%;">联系电话:{{i.his_patient.id != 0 ? i.his_patient.phone_number : i.phone}}</div>
38
+                <div style="margin-bottom: 10px;width:50%;">联系电话:{{i.his_patient.id != 0 ? i.his_patient.phone : i.phone}}</div>
39 39
                 <div style="width:50%;">地址:{{i.home_address}}</div>
40 40
                 <div style="width:100%;">诊断:{{getDiagnosis(i.info.diagnosis)}}</div>
41 41
             </div>
@@ -261,6 +261,13 @@
261 261
         diagnoses: []
262 262
       }
263 263
     },
264
+
265
+    watch:{
266
+      printData:function(val){
267
+        console.log(val,'打印props')
268
+      }
269
+    },
270
+
264 271
     methods: {
265 272
       getAge(patient){
266 273
         var thisLen = patient.id_card_no.length
@@ -375,13 +382,18 @@
375 382
         })
376 383
       },
377 384
       getDiagnosis(id) {
378
-        var name = ''
379
-        for (let i = 0; i < this.diagnoses.length; i++) {
380
-          if (id == this.diagnoses[i].id) {
381
-            name = this.diagnoses[i].class_name
385
+      let id_ = id.split(",");
386
+      let nameArr = [];
387
+      let name = "";
388
+      for (let i = 0; i < this.diagnoses.length; i++) {
389
+        for (let j = 0; j < id_.length; j++) {
390
+          if (id_[j] == this.diagnoses[i].id) {
391
+            nameArr[j] = this.diagnoses[i].class_name;
392
+            name = nameArr.join(',')
382 393
           }
383 394
         }
384
-        return name
395
+      }
396
+      return name;
385 397
       }
386 398
     },
387 399
     created() {

+ 87 - 13
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue 查看文件

@@ -287,6 +287,7 @@
287 287
                                         <el-table-column label="库存" width="60">
288 288
                                             <template slot-scope="scope">
289 289
                                               <!-- <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id == 10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id ==9956 || org_id == 10188 || org_id == 10191 || org_id == 10278">
290
+                                              <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id == 10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id ==9956 || org_id == 10188 || org_id == 10191 || org_id == 10278 || org_id == 10217">
290 291
                                                <span v-if="scope.row.count/scope.row.min_number>0">{{Math.floor(scope.row.count/scope.row.min_number)}}{{scope.row.max_unit}}</span>
291 292
                                                <span v-if="scope.row.count%scope.row.min_number>0"> {{scope.row.count%scope.row.min_number}}{{scope.row.min_unit}}</span>
292 293
                                               </span>
@@ -298,8 +299,8 @@
298 299
                                         </el-table-column>
299 300
                                         <el-table-column label="单价" width="40">
300 301
                                             <template slot-scope="scope">
301
-                                              <span v-if="scope.row.batch_retai_price >0">{{scope.row.batch_retai_price}}</span> 
302
-                                              <span v-else>{{ scope.row.min_price }}</span> 
302
+                                              <span v-if="scope.row.batch_retai_price >0">{{scope.row.batch_retai_price}}</span>
303
+                                              <span v-else>{{ scope.row.min_price }}</span>
303 304
                                            </template>
304 305
                                         </el-table-column>
305 306
                                     </el-table>
@@ -389,6 +390,7 @@
389 390
                                         <el-table-column label="库存" width="40">
390 391
                                             <template slot-scope="scope">
391 392
                                               <!-- <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id == 10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id == 9956 || org_id == 10188 || org_id == 10191 || org_id == 10278">
393
+                                              <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id == 10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id == 9956 || org_id == 10188 || org_id == 10191 || org_id == 10278 || org_id == 10217">
392 394
                                                    {{scope.row.stock_count}}
393 395
                                               </span>
394 396
                                               <span v-else> {{ scope.row.total }}</span> -->
@@ -544,6 +546,10 @@
544 546
           { value: 1111, label: '精一' },
545 547
           { value: 1112, label: '精二' },
546 548
           { value: 9922, label: '家庭通道' },
549
+          { value: 9933, label: '门诊特殊病(9933)' },
550
+          { value: 990602, label: '门诊特殊病(990602)' },
551
+          { value: 1402, label: '门诊特殊病(1402)' },
552
+          { value: 0, label: '自费' }
547 553
 
548 554
 
549 555
 
@@ -1359,9 +1365,7 @@
1359 1365
         this.$emit('setData', this.prescriptions)
1360 1366
 
1361 1367
       }, changevalue(val) {
1362
-
1363 1368
         this.$forceUpdate()
1364
-
1365 1369
       },
1366 1370
       callCancel() {
1367 1371
         this.$refs.call_prescription.close()
@@ -2223,12 +2227,12 @@
2223 2227
                 }
2224 2228
               }
2225 2229
             }
2226
-            for (let i = 0; i < this.prescriptions.length; i++) {
2227
-              if (this.prescriptions[i].med_type == 0 || this.prescriptions[i].med_type == '') {
2228
-                this.$message.error('处方医疗类型不能为空')
2229
-                return
2230
-              }
2231
-            }
2230
+            // for (let i = 0; i < this.prescriptions.length; i++) {
2231
+            //   if (this.prescriptions[i].med_type == 0 || this.prescriptions[i].med_type == '') {
2232
+            //     this.$message.error('处方医疗类型不能为空')
2233
+            //     return
2234
+            //   }
2235
+            // }
2232 2236
             if (index == 1) {
2233 2237
               console.log(this.prescriptions)
2234 2238
 
@@ -2711,6 +2715,37 @@
2711 2715
         //       return
2712 2716
         //     }
2713 2717
         // }
2718
+        console.log('selection', selection)
2719
+        console.log('row', row)
2720
+        if(this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id == 3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10188 || this.org_id == 10245 || this.org_id == 9919 || this.org_id == 10106 || this.org_id == 9504 || this.org_id ==10215 || this.org_id == 10188 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 9956 || this.org_id == 10188 || this.org_id == 10191 || this.org_id == 10278 || this.org_id == 10217){
2721
+            if (row.count <= 0) {
2722
+              if (selection) {
2723
+                selection.forEach(row => {
2724
+                  if (row.count <= 0) {
2725
+                    this.$refs.multipleTable.toggleRowSelection(row)
2726
+                  }
2727
+                })
2728
+              } else {
2729
+                this.$refs.multipleTable.clearSelection()
2730
+              }
2731
+              this.$message.error(row.drug_name + '库存不足')
2732
+              return
2733
+            }
2734
+        }else{
2735
+           if (row.total <= 0) {
2736
+              if (selection) {
2737
+                selection.forEach(row => {
2738
+                  if (row.total <= 0) {
2739
+                    this.$refs.multipleTable.toggleRowSelection(row)
2740
+                  }
2741
+                })
2742
+              } else {
2743
+                this.$refs.multipleTable.clearSelection()
2744
+              }
2745
+              this.$message.error(row.drug_name + '库存不足')
2746
+              return
2747
+            }
2748
+        }
2714 2749
 
2715 2750
         this.curDrugs = selection
2716 2751
       },
@@ -2970,7 +3005,7 @@
2970 3005
                 this.$message.error(row.project_name + '库存不足')
2971 3006
                 return
2972 3007
               })
2973
-          }  
3008
+          }
2974 3009
         }
2975 3010
         // if(this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id ==3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10188 || this.org_id ==10245 || this.org_id == 9919  || this.org_id == 10106 || this.org_id == 9504 || this.org_id ==10215 ||  this.org_id == 10188 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 9956 || this.org_id == 10188 || this.org_id == 10191 || this.org_id == 10278){
2976 3011
         //    if (row.stock_count <= 0) {
@@ -3004,6 +3039,39 @@
3004 3039
         //       return
3005 3040
         //     }
3006 3041
         //   }
3042
+        console.log('row', row)
3043
+        if(this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id ==3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10188 || this.org_id ==10245 || this.org_id == 9919  || this.org_id == 10106 || this.org_id == 9504 || this.org_id ==10215 ||  this.org_id == 10188 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 9956 || this.org_id == 10188 || this.org_id == 10191 || this.org_id == 10278 || this.org_id == 10217){
3044
+           if (row.stock_count <= 0) {
3045
+            if (row.type == 3) {
3046
+              if (selection) {
3047
+                selection.forEach(row => {
3048
+                  if (row.stock_count <= 0) {
3049
+                    this.$refs.tables.toggleRowSelection(row)
3050
+                  }
3051
+                })
3052
+              } else {
3053
+                this.$refs.tables.clearSelection()
3054
+              }
3055
+              this.$message.error(row.project_name + '库存不足')
3056
+              return
3057
+            }
3058
+          }
3059
+        }else{
3060
+           if (row.total <= 0) {
3061
+            if (row.type == 3) {
3062
+              if (selection) {
3063
+                selection.forEach(row => {
3064
+                  if (row.total <= 0) {
3065
+                    this.$refs.tables.toggleRowSelection(row)
3066
+                  }
3067
+                })
3068
+              } else {
3069
+                this.$refs.tables.clearSelection()
3070
+              }
3071
+              this.$message.error(row.project_name + '库存不足')
3072
+              return
3073
+            }
3074
+          }
3007 3075
 
3008 3076
         // }
3009 3077
         this.teamList.push(row)
@@ -3044,11 +3112,17 @@
3044 3112
 
3045 3113
             for (let i = 0; i < good_info.length; i++) {
3046 3114
                good_info[i].stock_count = 0
3047
-               
3115
+
3048 3116
                if(good_info[i].batch_retai_price > 0){
3049 3117
                   good_info[i].packing_price = 0
3050 3118
                   good_info[i].packing_price = good_info[i].batch_retai_price
3051 3119
                }
3120
+              if(good_info[i].good_stock_in&&good_info[i].good_stock_in.length >0 ){
3121
+                for(let j=0;j<good_info[i].good_stock_in.length;j++){
3122
+                   good_info[i].stock_count += good_info[i].good_stock_in[j].stock_count
3123
+                }
3124
+              }
3125
+               console.log("耗材列表2323232322332",good_info)
3052 3126
               let obj = {
3053 3127
                 id: good_info[i].id,
3054 3128
                 project_name: good_info[i].good_name,
@@ -3071,7 +3145,7 @@
3071 3145
               }
3072 3146
               this.tabProject.push(obj)
3073 3147
             }
3074
-           
3148
+
3075 3149
             console.log("猎豹33323232323223323223233223",this.tabProject)
3076 3150
             this.allProject = this.tabProject
3077 3151
 

+ 377 - 223
src/xt_pages/outpatientDoctorStation/pastInquiries.vue 查看文件

@@ -1,45 +1,116 @@
1 1
 <template>
2 2
   <div class="main-contain">
3 3
     <div class="position">
4
-      <bread-crumb :crumbs='crumbs'></bread-crumb>
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5 5
     </div>
6 6
     <div class="app-container">
7 7
       <div class="cell clearfix">
8
-        <el-input size="small" style="width:150px;" v-model="keywords"
9
-                  class="filter-item"/>
10
-        <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="searchAction">搜索
8
+        <el-input
9
+          size="small"
10
+          style="width: 150px"
11
+          v-model="keywords"
12
+          class="filter-item"
13
+        />
14
+        <el-button
15
+          size="small"
16
+          style="margin: 0 10px"
17
+          class="filter-item"
18
+          type="primary"
19
+          @click="searchAction"
20
+          >搜索
11 21
         </el-button>
12
-        <el-date-picker v-model="record_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange"
13
-                        :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date"
14
-                        format="yyyy-MM-dd"
15
-                        value-format="yyyy-MM-dd"
16
-                        placeholder="选择日期时间" align="right"></el-date-picker>
17
-       <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="batchPrint(1)">处方筏批量打印</el-button>
18
-        <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="batchPrint(2)">治疗单批量打印</el-button>
19
-        <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="batchPrint(3)">检验单批量打印</el-button>
22
+        <el-date-picker
23
+          v-model="record_date"
24
+          prefix-icon="el-icon-date"
25
+          @change="handleScheduleDateChange"
26
+          :editable="false"
27
+          :clearable="false"
28
+          style="width: 196px; margin-right: 10px"
29
+          type="date"
30
+          format="yyyy-MM-dd"
31
+          value-format="yyyy-MM-dd"
32
+          placeholder="选择日期时间"
33
+          align="right"
34
+        ></el-date-picker>
35
+        <el-button
36
+          size="small"
37
+          style="margin: 0 10px"
38
+          class="filter-item"
39
+          type="primary"
40
+          @click="batchPrint(1)"
41
+          >处方筏批量打印</el-button
42
+        >
43
+        <el-button
44
+          size="small"
45
+          style="margin: 0 10px"
46
+          class="filter-item"
47
+          type="primary"
48
+          @click="batchPrint(2)"
49
+          >治疗单批量打印</el-button
50
+        >
51
+        <el-button
52
+          size="small"
53
+          style="margin: 0 10px"
54
+          class="filter-item"
55
+          type="primary"
56
+          @click="batchPrint(3)"
57
+          >检验单批量打印</el-button
58
+        >
20 59
       </div>
21
-      <el-table :data="tableData" border ref="table" style="width: 100%;" :row-style="{ color: '#303133' }" @selection-change="handleSelectionChange"
22
-                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
23
-        <el-table-column align="center" type="selection" width="55"></el-table-column>
24
-        <el-table-column align="center" label="序号" width="60" type="index"></el-table-column>
60
+      <el-table
61
+        :data="tableData"
62
+        border
63
+        ref="table"
64
+        style="width: 100%"
65
+        :row-style="{ color: '#303133' }"
66
+        @selection-change="handleSelectionChange"
67
+        :header-cell-style="{
68
+          backgroundColor: 'rgb(245, 247, 250)',
69
+          color: '#606266',
70
+        }"
71
+        highlight-current-row
72
+      >
73
+        <el-table-column
74
+          align="center"
75
+          type="selection"
76
+          width="55"
77
+        ></el-table-column>
78
+        <el-table-column
79
+          align="center"
80
+          label="序号"
81
+          width="60"
82
+          type="index"
83
+        ></el-table-column>
25 84
         <el-table-column align="center" prop="name" label="姓名" width="100">
26
-          <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template>
85
+          <template slot-scope="scope">{{
86
+            scope.row.patients ? scope.row.patients.name : ""
87
+          }}</template>
27 88
         </el-table-column>
28
-        <el-table-column align="center" prop="name" label="处方日期" width="200">
29
-          <template slot-scope="scope"> {{getTimes(scope.row.ctime)}}</template>
30
-
89
+        <el-table-column
90
+          align="center"
91
+          prop="name"
92
+          label="处方日期"
93
+          width="200"
94
+        >
95
+          <template slot-scope="scope">
96
+            {{ getTimes(scope.row.ctime) }}</template
97
+          >
31 98
         </el-table-column>
32 99
         <!--<el-table-column align="center" prop="name" label="患者类型">-->
33
-          <!--<template slot-scope="scope">{{}}</template>-->
100
+        <!--<template slot-scope="scope">{{}}</template>-->
34 101
         <!--</el-table-column>-->
35 102
         <el-table-column align="center" prop="name" label="处方号">
36
-          <template slot-scope="scope">{{scope.row.prescription_number}}</template>
103
+          <template slot-scope="scope">{{
104
+            scope.row.prescription_number
105
+          }}</template>
37 106
         </el-table-column>
38 107
         <el-table-column align="center" prop="name" label="开立医生">
39
-          <template slot-scope="scope">{{scope.row.doctor}}</template>
108
+          <template slot-scope="scope">{{ scope.row.doctor }}</template>
40 109
         </el-table-column>
41 110
         <el-table-column align="center" prop="name" label="诊断">
42
-          <template slot-scope="scope">{{getDiagnosis(scope.row.diagnosis)}}</template>
111
+          <template slot-scope="scope">{{
112
+            getDiagnosis(scope.row.diagnosis)
113
+          }}</template>
43 114
         </el-table-column>
44 115
         <el-table-column align="center" prop="name" label="状态" width="100">
45 116
           <template slot-scope="scope">
@@ -49,7 +120,12 @@
49 120
         </el-table-column>
50 121
         <el-table-column align="center" prop="name" label="操作" width="100">
51 122
           <template slot-scope="scope">
52
-            <el-button size="mini" type="primary" @click="handerShowDetail(scope.row)">详情</el-button>
123
+            <el-button
124
+              size="mini"
125
+              type="primary"
126
+              @click="handerShowDetail(scope.row)"
127
+              >详情</el-button
128
+            >
53 129
           </template>
54 130
         </el-table-column>
55 131
       </el-table>
@@ -59,239 +135,317 @@
59 135
         :page-sizes="[10, 50, 100]"
60 136
         :page-size="10"
61 137
         background
62
-        style="margin-top:20px;float: right"
138
+        style="margin-top: 20px; float: right"
63 139
         layout="total, sizes, prev, pager, next, jumper"
64 140
         :total="total"
65 141
       >
66 142
       </el-pagination>
67 143
       <inquiries-detail ref="inquiriesDetail"></inquiries-detail>
68 144
       <el-dialog
69
-          class="centerDialog"
70
-          width="600px"
71
-          title="打印"
72
-          :visible.sync="innerVisible"
73
-          append-to-body>
145
+        class="centerDialog"
146
+        width="600px"
147
+        title="打印"
148
+        :visible.sync="innerVisible"
149
+        append-to-body
150
+      >
74 151
         <template>
75 152
           <el-button
76
-              style="float:right;"
77
-              size="small"
78
-              icon="el-icon-printer"
79
-              @click="printThisPage"
80
-              type="primary"
81
-          >打印
153
+            style="float: right"
154
+            size="small"
155
+            icon="el-icon-printer"
156
+            @click="printThisPage(printData)"
157
+            type="primary"
158
+            >打印
82 159
           </el-button>
83 160
         </template>
84
-        <div id='printMain'>
85
-          <print ref="print" v-if="printType == 1" :printData='printData'></print>
86
-          <treatPrint ref="treatPrint" v-if="printType == 2" :printData='printData'></treatPrint>
87
-          <checkPrint ref="checkPrint" v-if="printType == 3" :printData='printData'></checkPrint>
161
+        <div id="printMain">
162
+          <print
163
+            ref="print"
164
+            v-if="printType == 1"
165
+            :printData="printData"
166
+          ></print>
167
+          <treatPrint
168
+            ref="treatPrint"
169
+            v-if="printType == 2"
170
+            :printData="printData"
171
+          ></treatPrint>
172
+          <checkPrint
173
+            ref="checkPrint"
174
+            v-if="printType == 3"
175
+            :printData="printData"
176
+          ></checkPrint>
88 177
         </div>
89
-
90 178
       </el-dialog>
91 179
     </div>
92 180
   </div>
93 181
 </template>
94 182
 
95 183
 <script>
96
-  import BreadCrumb from '@/xt_pages/components/bread-crumb'
97
-  import inquiriesDetail from './components/inquiriesDetail'
98
-  import { getHisPrescriptionList } from '@/api/his/his'
99
-  import { uParseTime } from '@/utils/tools'
100
-  import { getInitData, getBatchPrint } from '@/api/his/his'
101
-  import print from './batch_print_template/index'
102
-  import treatPrint from './batch_print_treatTemplate/index'
103
-  import checkPrint from './batch_print_checkTemplate/index'
104
-  export default {
105
-    components: {
106
-      BreadCrumb,
107
-      inquiriesDetail,
108
-      print,
109
-      treatPrint,
110
-      checkPrint
111
-    },
112
-    data() {
113
-      return {
114
-        keywords:"",
115
-        total:0,
116
-        record_date:"",
117
-        page:1,
118
-        limit:10,
119
-        crumbs: [
120
-          { path: false, name: '门诊医生站' },
121
-          { path: false, name: '既往查询' }
122
-        ],
123
-        tableData: [],
124
-        diagnoses:[],
125
-        innerVisible: false,
126
-        selecting_schs:[],
127
-        printData:[],
128
-        printType: 0,
129
-        org_id:'',
130
-      }
131
-    },
132
-    methods: {
133
-      printThisPage() {
134
-        if(this.org_id == 10138){
135
-          const style =
136
-              '@media print {#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 88%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 87%;}}}'
137
-          printJS({
138
-            printable: 'printMain',
139
-            type: 'html',
140
-            style: style,
141
-            scanStyles: false
142
-          })
143
-        }else{
144
-          const style =
145
-              '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;font-size:14px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 88%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}}'
146
-          printJS({
147
-            printable: 'printMain',
148
-            type: 'html',
149
-            style: style,
150
-            scanStyles: false
184
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
185
+import inquiriesDetail from "./components/inquiriesDetail";
186
+import { getHisPrescriptionList } from "@/api/his/his";
187
+import { uParseTime } from "@/utils/tools";
188
+import { getInitData, getBatchPrint } from "@/api/his/his";
189
+import print from "./batch_print_template/index";
190
+import treatPrint from "./batch_print_treatTemplate/index";
191
+import checkPrint from "./batch_print_checkTemplate/index";
192
+export default {
193
+  components: {
194
+    BreadCrumb,
195
+    inquiriesDetail,
196
+    print,
197
+    treatPrint,
198
+    checkPrint,
199
+  },
200
+  data() {
201
+    return {
202
+      keywords: "",
203
+      total: 0,
204
+      record_date: "",
205
+      page: 1,
206
+      limit: 10,
207
+      crumbs: [
208
+        { path: false, name: "门诊医生站" },
209
+        { path: false, name: "既往查询" },
210
+      ],
211
+      tableData: [],
212
+      diagnoses: [],
213
+      innerVisible: false,
214
+      selecting_schs: [],
215
+      printData: [],
216
+      printType: 0,
217
+      org_id: "",
218
+    };
219
+  },
220
+  methods: {
221
+    printThisPage(printData) {
222
+      printData.forEach((item) => {
223
+        const print = new Promise((resolve, reject) => {
224
+          if (item.prescriptions.length != 0) {
225
+            resolve(item.prescriptions);
226
+          } else {
227
+            reject(false);
228
+          }
229
+        });
230
+        print
231
+          .then((printData) => {
232
+            if (this.org_id == 10138) {
233
+              const style =
234
+                "@media print {#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 88%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 87%;}}}";
235
+              printJS({
236
+                printable: "printMain",
237
+                type: "html",
238
+                style: style,
239
+                scanStyles: false,
240
+              });
241
+            }
242
+            if (this.printType == 3) {
243
+              const style =
244
+                "@media print {html {zoom: 80%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}#prescriptionPrint div{box-shadow:none;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 20px;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}}";
245
+              printJS({
246
+                printable: "printMain",
247
+                type: "html",
248
+                style: style,
249
+                scanStyles: false,
250
+              });
251
+            } else {
252
+              const style =
253
+                "@media print {html {height: auto;margin: 0px;} #prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;font-size:14px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 80%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 20px;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}}";
254
+              printJS({
255
+                printable: "printMain",
256
+                type: "html",
257
+                style: style,
258
+                scanStyles: false,
259
+              });
260
+            }
151 261
           })
152
-        }
153
-        this.innerVisible = false
154
-        // this.$nextTick(() => {
155
-        //   this.$refs.print.printThisPage()
156
-        //   this.$refs.treatPrint.printThisPage()
157
-        //   this.$refs.checkPrint.printThisPage()
158
-        // })
159
-      },
160
-
161
-      searchAction(){
162
-        this.page = 1;
163
-        this.limit = 10;
164
-        this.getHisPrescriptionList()
262
+          .catch((reject) => {});
263
+      });
165 264
 
166
-      },
167
-      handleScheduleDateChange(){
168
-        this.page = 1;
169
-        this.limit = 10;
170
-        this.getHisPrescriptionList()
171
-
172
-      },
173
-      handleCurrentChange(page) {
174
-        this.page = page;
175
-        this.getHisPrescriptionList()
176
-
177
-      },
178
-
179
-      handleSizeChange(limit) {
180
-        this.limit = limit;
181
-        this.getHisPrescriptionList()
265
+      this.innerVisible = false;
266
+      // this.$nextTick(() => {
267
+      //   this.$refs.print.printThisPage()
268
+      //   this.$refs.treatPrint.printThisPage()
269
+      //   this.$refs.checkPrint.printThisPage()
270
+      // })
271
+    },
182 272
 
273
+    searchAction() {
274
+      this.page = 1;
275
+      this.limit = 10;
276
+      this.getHisPrescriptionList();
277
+    },
278
+    handleScheduleDateChange() {
279
+      this.page = 1;
280
+      this.limit = 10;
281
+      this.getHisPrescriptionList();
282
+    },
283
+    handleCurrentChange(page) {
284
+      this.page = page;
285
+      this.getHisPrescriptionList();
286
+    },
183 287
 
184
-      },
185
-      getTimes(time) {
186
-        return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
187
-      },
188
-      handerShowDetail(row) {
189
-        if(row.id == 0){
190
-          this.$message.error("未就诊")
191
-          return
288
+    handleSizeChange(limit) {
289
+      this.limit = limit;
290
+      this.getHisPrescriptionList();
291
+    },
292
+    getTimes(time) {
293
+      return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
294
+    },
295
+    handerShowDetail(row) {
296
+      if (row.id == 0) {
297
+        this.$message.error("未就诊");
298
+        return;
299
+      }
300
+      this.$refs.inquiriesDetail.show(row.id);
301
+    },
302
+    getHisPrescriptionList() {
303
+      let params = {
304
+        record_date: this.record_date,
305
+        page: this.page,
306
+        limit: this.limit,
307
+        keywords: this.keywords,
308
+      };
309
+      getHisPrescriptionList(params).then((response) => {
310
+        if (response.data.state == 0) {
311
+          this.$message.error(response.data.msg);
312
+          return false;
313
+        } else {
314
+          this.tableData = response.data.data.order;
315
+          this.total = response.data.data.total;
316
+          this.$nextTick(() => {
317
+            this.$refs.table.doLayout(); //解决表格错位
318
+          });
192 319
         }
193
-        this.$refs.inquiriesDetail.show(row.id)
194
-      }, getHisPrescriptionList() {
195
-        let params = {
196
-          record_date:this.record_date,
197
-          page: this.page,
198
-          limit: this.limit,
199
-          keywords: this.keywords,
320
+      });
321
+    },
322
+    getInitData() {
323
+      getInitData().then((response) => {
324
+        if (response.data.state == 0) {
325
+          this.$message.error(response.data.msg);
326
+          return false;
327
+        } else {
328
+          this.diagnoses = response.data.data.diagnose;
329
+          console.log("诊断列表", this.diagnoses);
200 330
         }
201
-        getHisPrescriptionList(params).then(response => {
202
-          if (response.data.state == 0) {
203
-            this.$message.error(response.data.msg)
204
-            return false
205
-          } else {
206
-            this.tableData = response.data.data.order
207
-            this.total = response.data.data.total
208
-            this.$nextTick(() => {
209
-              this.$refs.table.doLayout(); //解决表格错位
210
-            });
211
-          }
212
-        })
213
-
214
-      },
215
-       getInitData() {
216
-        getInitData().then(response => {
217
-          if (response.data.state == 0) {
218
-            this.$message.error(response.data.msg)
219
-            return false
220
-          } else {
221
-            this.diagnoses = response.data.data.diagnose
222
-            console.log("诊断列表",this.diagnoses)
223
-          }
224
-        })
225
-      },
226
-      getDiagnosis(id){
227
-        let ids = id.split(",")
228
-        var name = ""
229
-        for(let i = 0; i < ids.length; i++){
230
-
231
-          for(let b=0;b<this.diagnoses.length;b++){
232
-            if(parseInt(ids[i]) == this.diagnoses[b].id){
233
-              if(name.length == 0){
234
-                name = this.diagnoses[b].class_name
235
-              }else{
236
-                name = name +"," + this.diagnoses[b].class_name
237
-
238
-              }
331
+      });
332
+    },
333
+    getDiagnosis(id) {
334
+      let ids = id.split(",");
335
+      var name = "";
336
+      for (let i = 0; i < ids.length; i++) {
337
+        for (let b = 0; b < this.diagnoses.length; b++) {
338
+          if (parseInt(ids[i]) == this.diagnoses[b].id) {
339
+            if (name.length == 0) {
340
+              name = this.diagnoses[b].class_name;
341
+            } else {
342
+              name = name + "," + this.diagnoses[b].class_name;
239 343
             }
240 344
           }
241
-
242
-        }
243
-
244
-
245
-
246
-
247
-        return name
248
-      },
249
-      handleSelectionChange(val) {
250
-
251
-        this.selecting_schs = val;
252
-
253
-      },
254
-      batchPrint(type){
255
-        this.printType = type
256
-        if (this.selecting_schs.length === 0) {
257
-          this.$message.error("请至少选择一条需要打印的内容");
258
-          return false;
259 345
         }
260
-        this.innerVisible = true
346
+      }
347
+      return name;
348
+    },
349
+    handleSelectionChange(val) {
350
+      this.selecting_schs = val;
351
+    },
352
+    batchPrint(type) {
353
+      this.printType = type;
354
+      if (this.selecting_schs.length === 0) {
355
+        this.$message.error("请至少选择一条需要打印的内容");
356
+        return false;
357
+      } else {
261 358
         var sch_ids = [];
262
-
263 359
         for (let index = 0; index < this.selecting_schs.length; index++) {
264 360
           sch_ids.push(this.selecting_schs[index].patient_id);
265 361
         }
266
-        console.log('sch_ids',sch_ids)
267 362
         let params = {
268 363
           record_date: this.record_date,
269 364
           patient_ids: sch_ids.join(","),
270
-          type: type
271
-        }
272
-        getBatchPrint(params).then(res => {
273
-          console.log('res',res)
274
-          let printData = res.data.data.patients
275
-          this.printData = printData
276
-        })
365
+          type: type,
366
+        };
367
+        getBatchPrint(params).then((res) => {
368
+          let Arr = res.data.data.patients;
369
+          let new_patients = [];
370
+          if (type != 3) {
371
+            Arr.forEach((i) => {
372
+              if (i.prescriptions.length != 0) {
373
+                new_patients.push(i);
374
+              }
375
+            });
376
+          } else {
377
+            // 过滤检查单数据出来,筛选出有检查项目的单子,不显示没有检查项目的单子
378
+            Arr.forEach((el) => {
379
+              el.prescriptions.forEach((o) => {
380
+                o.project.forEach((i) => {
381
+                  if (i.team.project_team != "") {
382
+                    new_patients.push(el);
383
+                  }
384
+                });
385
+              });
386
+            });
387
+            let projectPrint = [];
388
+            new_patients.forEach((el) => {
389
+              el.prescriptions.map((item) => {
390
+                if (item.project.length > 0) {
391
+                  item.project.map((it) => {
392
+                    // if (it.type == 2) {
393
+                    //   if (it.project.cost_classify == 3) {
394
+                    //     projectPrint.push(it);
395
+                    //   }
396
+                    // }
397
+                    projectPrint.push(it);
398
+                  });
399
+                }
400
+              });
401
+            });
402
+            console.log(projectPrint, "projectPrint----去重前");
403
+            // 数组去重
404
+            projectPrint = this.split_project(projectPrint);
405
+            // 配对
406
+            let data = [];
407
+            projectPrint.map((item) => {
408
+              if (item.team.id == 0) {
409
+                data.push(item);
410
+              } else {
411
+                if(item.team.project_team != ""){
412
+                  new_patients.push(item)
413
+                }
414
+              }
415
+            });
416
+          }
417
+
418
+          this.printData = new_patients;
419
+        });
277 420
       }
278
-    }, created() {
279
-      var nowDate = new Date()
280
-      var nowYear = nowDate.getFullYear()
281
-      var nowMonth = nowDate.getMonth() + 1
282
-      var nowDay = nowDate.getDate()
283
-      this.record_date =
284
-        nowYear +
285
-        '-' +
286
-        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
287
-        '-' +
288
-        (nowDay < 10 ? '0' + nowDay : nowDay)
421
+      this.innerVisible = true;
422
+    },
289 423
 
290
-      this.org_id = this.$store.getters.xt_user.template_info.org_id
424
+    split_project(Arr) {
425
+      let hash = {};
426
+      Arr = Arr.reduce((preVal, curVal) => {
427
+        hash[curVal.id] ? "" : (hash[curVal.id] = true && preVal.push(curVal));
428
+        return preVal;
429
+      }, []);
430
+      return Arr;
431
+    },
432
+  },
433
+  created() {
434
+    var nowDate = new Date();
435
+    var nowYear = nowDate.getFullYear();
436
+    var nowMonth = nowDate.getMonth() + 1;
437
+    var nowDay = nowDate.getDate();
438
+    this.record_date =
439
+      nowYear +
440
+      "-" +
441
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
442
+      "-" +
443
+      (nowDay < 10 ? "0" + nowDay : nowDay);
291 444
 
292
-      this.getHisPrescriptionList()
293
-      this.getInitData()
445
+    this.org_id = this.$store.getters.xt_user.template_info.org_id;
294 446
 
295
-    }
296
-  }
447
+    this.getHisPrescriptionList();
448
+    this.getInitData();
449
+  },
450
+};
297 451
 </script>

+ 9 - 3
src/xt_pages/outpatientDoctorStation/print.vue 查看文件

@@ -11,9 +11,14 @@
11 11
           >打印</el-button
12 12
         >
13 13
       </template> -->
14
-
14
+<!-- 机构id列表
15
+3877 :测试
16
+10138、10243:百霖
17
+0:本地
18
+9675:测试
19
+ -->
15 20
     <div class="dialysisPage" style="padding-top: 40px">
16
-      <div v-if="org_id != 10138 && org_id != 10278 && org_id != 10243 && org_id != 9675">
21
+      <div v-if="org_id != 10138 && org_id != 10278 && org_id != 10243 && org_id != 4 && org_id !=0">
17 22
         <printOne v-if="org_id != 10088 && org_id != 10215" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
18 23
 
19 24
         <!--        <printSix-->
@@ -55,7 +60,7 @@
55 60
 
56 61
         <!-- <printSix v-if="org_id != 10088 && org_id != 10215" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printSix> -->
57 62
       </div>
58
-      <div v-else-if="org_id == 10243 || org_id == 9675 || org_id == 0 ">
63
+      <div v-else-if="org_id == 10243 || org_id == 9675">
59 64
         <printSix
60 65
           v-bind:childResponse="childResponse"
61 66
           :advicePrint="advicePrint"
@@ -248,6 +253,7 @@ export default {
248 253
 
249 254
   created() {
250 255
     this.org_id = this.$store.getters.xt_user.org_id;
256
+    console.log(this.org_id,'机构id')
251 257
     this.getAllDoctorList();
252 258
     var record_date = this.paramsObj.record;
253 259
     this.record_date = record_date;

+ 463 - 310
src/xt_pages/outpatientDoctorStation/template/printOne.vue 查看文件

@@ -1,372 +1,525 @@
1 1
 <template>
2
-  <div id='prescriptionPrint'>
3
-    <div v-for="(item,index) in advicePrint" :key="index">
4
-      <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
5
-          <div class="printTitle" v-if="prescriptions[index].med_type == '1111'">{{orgname}}第一类精神处方笺</div>
6
-          <div class="printTitle"  v-if="prescriptions[index].med_type == '1112'">{{orgname}}第二类精神处方笺</div>
7
-          <div class="printTitle" v-if="prescriptions[index].med_type != '1111' && prescriptions[index].med_type != '1112'">{{orgname}}处方笺</div>
8
-          <!--<div class="printTitle">{{orgname}}处方笺</div>-->
9
-          <div class="infoTitle">
10
-              <p>姓名:{{item.patient.name?item.patient.name:""}}</p>
11
-              <p>性别:
12
-                <span v-if="item.patient.gender == 1">男</span>
13
-                <span v-if="item.patient.gender == 2">女</span>
14
-              </p>
15
-              <p>年龄:{{getAge(item.patient)?getAge(item.patient):""}}岁</p>
2
+  <div id="prescriptionPrint">
3
+    <div v-for="(item, index) in advicePrint" :key="index">
4
+      <div
5
+        id="prescription-print"
6
+        class="prescription-print"
7
+        style="page-break-after: always"
8
+      >
9
+        <div class="printTitle" v-if="prescriptions[index].med_type == '1111'">
10
+          {{ orgname }}第一类精神处方笺
11
+        </div>
12
+        <div class="printTitle" v-if="prescriptions[index].med_type == '1112'">
13
+          {{ orgname }}第二类精神处方笺
14
+        </div>
15
+        <div
16
+          class="printTitle"
17
+          v-if="
18
+            prescriptions[index].med_type != '1111' &&
19
+            prescriptions[index].med_type != '1112'
20
+          "
21
+        >
22
+          {{ orgname }}处方笺
23
+        </div>
24
+        <!--<div class="printTitle">{{orgname}}处方笺</div>-->
25
+        <div class="infoTitle">
26
+          <p>姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
27
+          <p>
28
+            性别:
29
+            <span v-if="item.patient.gender == 1">男</span>
30
+            <span v-if="item.patient.gender == 2">女</span>
31
+          </p>
32
+          <p>年龄:{{ getAge(item.patient) ? getAge(item.patient) : "" }}岁</p>
33
+        </div>
34
+        <div class="infoMain">
35
+          <div style="margin-bottom: 10px">
36
+            门诊号:{{ hisPatient.number ? hisPatient.number : "" }}
16 37
           </div>
17
-          <div class="infoMain">
18
-              <div style="margin-bottom: 10px;">门诊号:{{hisPatient.number?hisPatient.number:""}}</div>
19
-              <div style="margin-bottom: 10px;">科室:{{item.info?getDepart(item.info.departments):''}}</div>
20
-              <div style="margin-bottom: 10px;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div>
21
-              <div style="margin-bottom: 10px;" v-if="org_id != 10188">电话:{{item.patient.phone}}</div>
22
-              <div style="margin-bottom: 10px;" v-else>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</div>
23
-              <div>地址:{{item.patient.home_address}}</div>
24
-              <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div>
38
+          <div style="margin-bottom: 10px">
39
+            科室:{{ item.info ? getDepart(item.info.departments) : "" }}
25 40
           </div>
26
-          <div class="prescriptionBox">
27
-              <div class="Rp">Rp:</div>
28
-              <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
29
-                  <!-- <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> -->
30
-                  <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>
31
-                  <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>
32
-              </div>
33
-              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
34
-                <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
35
-               </div>
36
-
37
-              <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
38
-                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.type == 2?getProjectName(it.project_id)?getProjectName(it.project_id):"":it.good_info.good_name}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
39
-                  <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>
40
-              </div>
41
-              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
42
-                <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price.toFixed(2)}}元/{{it.count}}次</div>
43
-               </div>
44
-               <div style="text-align:center;" >(以下空白)</div>
45
-
41
+          <div style="margin-bottom: 10px">
42
+            医保卡号:{{ item.hisPatient.number ? item.hisPatient.number : "" }}
43
+          </div>
44
+          <div style="margin-bottom: 10px" v-if="org_id != 10188">
45
+            电话:{{ item.patient.phone }}
46
+          </div>
47
+          <div style="margin-bottom: 10px" v-else>
48
+            日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}
46 49
           </div>
47
-          <div class="doctorBox" v-if="org_id != 10188">
48
-              <p>医师:{{item.doctor?item.doctor:""}}</p>
49
-              <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>
50
+          <div>地址:{{ item.patient.home_address }}</div>
51
+          <div style="display: flex; width: 50%">
52
+            临床诊断:{{ getDiagnosis(item.info.diagnosis) }}
53
+          </div>
54
+        </div>
55
+        <div class="prescriptionBox">
56
+          <div class="Rp">Rp:</div>
57
+          <div
58
+            class="drugsBox"
59
+            v-for="(it, index) in item.advices"
60
+            :key="index"
61
+          >
62
+            <!-- <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> -->
63
+            <div class="drugsOne">
64
+              <span style="font-weight: bold">{{ index + 1 + "." }}</span
65
+              >{{ it.advice_name ? it.advice_name : "" }}&nbsp;&nbsp;<span
66
+                v-if="it.drug.min_unit != it.drug.dose_unit"
67
+                >{{ it.drug.dose }}{{ it.drug.dose_unit }}&nbsp;* &nbsp;</span
68
+              >{{ it.drug.min_number }}{{ it.drug.min_unit }}/{{
69
+                it.drug.max_unit
70
+              }}&nbsp;×&nbsp; {{ it.prescribing_number
71
+              }}{{ it.prescribing_number_unit }}
72
+            </div>
73
+            <div style="margin-left: 100px">
74
+              <span>用法:{{ it.single_dose }}{{ it.single_dose_unit }}</span
75
+              >&nbsp;&nbsp;<span
76
+                >{{ it.execution_frequency }}&nbsp;{{
77
+                  it.delivery_way
78
+                }}&nbsp;</span
79
+              >&nbsp;&nbsp;<span>{{ it.advice_desc }}</span>
80
+            </div>
81
+          </div>
82
+          <div
83
+            class="drugsBox"
84
+            v-for="(it, i) in item.additionalcharge"
85
+            :key="i"
86
+          >
87
+            <div class="drugsOne">
88
+              {{ it.item_name ? it.item_name : "" }}:&nbsp;{{ it.price }}元/{{
89
+                it.count
90
+              }}次
91
+            </div>
92
+          </div>
93
+
94
+          <div
95
+            class="drugsBox"
96
+            v-for="(it, index) in item.project"
97
+            :key="index"
98
+          >
99
+            <div class="drugsOne">
100
+              <span style="font-weight: bold">{{ index + 1 + "." }}</span
101
+              >{{
102
+                it.type == 2
103
+                  ? getProjectName(it.project_id)
104
+                    ? getProjectName(it.project_id)
105
+                    : ""
106
+                  : it.good_info.good_name
107
+              }}&nbsp;&nbsp;{{ it.single_dose
108
+              }}{{ it.single_dose_unit }}&nbsp;×&nbsp; {{ it.count }}{{ unit }}
109
+            </div>
110
+            <div style="margin-left: 100px">
111
+              <span>用法:{{ it.single_dose }}{{ it.single_dose_unit }}</span
112
+              >&nbsp;&nbsp;<span>{{ it.delivery_way }}</span
113
+              >&nbsp;&nbsp;<span>{{ it.advice_desc }}</span>
114
+            </div>
50 115
           </div>
51
-          <div class="doctorBox" v-else>
52
-            <p>药师:</p>
53
-            <p>医师:{{item.doctor?item.doctor:""}}</p>
116
+          <div
117
+            class="drugsBox"
118
+            v-for="(it, i) in item.additionalcharge"
119
+            :key="i"
120
+          >
121
+            <div class="drugsOne">
122
+              {{ it.project_id ? it.project_id : "" }}:&nbsp;{{
123
+                it.price.toFixed(2)
124
+              }}元/{{ it.count }}次
125
+            </div>
54 126
           </div>
55
-          <div class="actionBar" v-if="org_id != 10188">
56
-                 <!-- <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
127
+          <div style="text-align: center">(以下空白)</div>
128
+        </div>
129
+        <div class="doctorBox" v-if="org_id != 10188">
130
+          <p>
131
+            医师:
132
+            <!-- {{ item.doctor ? item.doctor : "" }} -->
133
+            <span
134
+              style="width: 100px; display: inline-block"
135
+              v-if="item.creator == ''"
136
+            >
137
+              {{ item.doctor }}
138
+            </span>
139
+            <img
140
+              style="height: 30px"
141
+              :src="setAdminUserES(item.creator)"
142
+              alt=""
143
+              srcset=""
144
+              v-else
145
+            />
146
+          </p>
147
+          <p>日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</p>
148
+        </div>
149
+        <div class="doctorBox" v-else>
150
+          <p>药师:</p>
151
+          <p>医师:{{ item.doctor ? item.doctor : "" }}</p>
152
+        </div>
153
+        <div class="actionBar" v-if="org_id != 10188">
154
+          <!-- <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
57 155
                  <p>配对:</p>
58 156
                  <p>核对:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
59 157
                  <p>发药:{{getDoctor(item.advices[0].execution_staff)?getDoctor(item.advices[0].execution_staff):""}}</p>
60 158
                  <p>药费:{{getTotalOne(item.id)?getTotalOne(item.id):0}}元</p> -->
61 159
 
62
-                 <p>审核:</p>
63
-                 <p>配对:</p>
64
-                 <p>核对:</p>
65
-                 <p>发药:</p>
66
-                 <p>药费:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):0}}元</p>
67
-<!--            <p>药费:466.2元</p>-->
68
-
69
-          </div>
70
-          <div class="actionBar" v-else>
71
-            <p style="visibility: hidden;">审核:</p>
72
-            <p style="visibility: hidden;">配对:</p>
73
-            <p style="visibility: hidden;">核对:</p>
74
-            <p style="visibility: hidden;">发药:</p>
75
-            <p>药费:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):0}}元</p>
76
-<!--            <p>药费:551.2元</p>-->
77
-<!--            <p>药费:466.2元</p>-->
78
-
79
-
80
-          </div>
81
-          <div style="page-break-after:always"></div>
160
+          <p>审核:</p>
161
+          <p>配对:</p>
162
+          <p>核对:</p>
163
+          <p>发药:</p>
164
+          <p>
165
+            药费:{{
166
+              getTotalOne(item.id).toFixed(2)
167
+                ? getTotalOne(item.id).toFixed(2)
168
+                : 0
169
+            }}元
170
+          </p>
171
+          <!--            <p>药费:466.2元</p>-->
172
+        </div>
173
+        <div class="actionBar" v-else>
174
+          <p style="visibility: hidden">审核:</p>
175
+          <p style="visibility: hidden">配对:</p>
176
+          <p style="visibility: hidden">核对:</p>
177
+          <p style="visibility: hidden">发药:</p>
178
+          <p>
179
+            药费:{{
180
+              getTotalOne(item.id).toFixed(2)
181
+                ? getTotalOne(item.id).toFixed(2)
182
+                : 0
183
+            }}元
184
+          </p>
185
+          <!--            <p>药费:551.2元</p>-->
186
+          <!--            <p>药费:466.2元</p>-->
187
+        </div>
188
+        <div style="page-break-after: always"></div>
82 189
       </div>
83 190
     </div>
84
-
85 191
   </div>
86
-
87
-
88 192
 </template>
89 193
 <script>
90
-import { jsGetAge, uParseTime } from '@/utils/tools'
91
-import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail} from "@/api/project/project"
92
-import {getInitData} from "@/api/his/his"
194
+import { jsGetAge, uParseTime } from "@/utils/tools";
195
+import {
196
+  getAllDoctorList,
197
+  getPrescriptionPrint,
198
+  getHisPatientDetail,
199
+} from "@/api/project/project";
200
+import { getInitData } from "@/api/his/his";
93 201
 export default {
94
-    props:{
95
-      patient_id:Number,
96
-      record_date:String,
97
-      prescription_id:Number,
98
-      ids:String
202
+  props: {
203
+    patient_id: Number,
204
+    record_date: String,
205
+    prescription_id: Number,
206
+    ids: String,
207
+  },
208
+  data() {
209
+    return {
210
+      doctorList: [],
211
+      advicePrint: {},
212
+      patient: {},
213
+      tableData: [],
214
+      prescriptionInfo: [],
215
+      hisPatient: {},
216
+      department: [],
217
+      prescriptions: [],
218
+      projectList: [],
219
+      orgname: "",
220
+      diagnoses: [],
221
+      org_id: 0,
222
+      operatorMaps: {},
223
+      operators: [],
224
+      doctorList_1: []
225
+    };
226
+  },
227
+  methods: {
228
+    // 电子签名
229
+    setAdminUserES(id) {
230
+      if (id == 0) {
231
+        return "";
232
+      }
233
+      if (id in this.operatorMaps) {
234
+        return this.operatorMaps[id].url;
235
+      } else {
236
+        return "";
237
+      }
99 238
     },
100
-    data(){
101
-      return {
102
-        doctorList:[],
103
-        advicePrint:{},
104
-        patient:{},
105
-        tableData:[],
106
-        prescriptionInfo:[],
107
-        hisPatient:{},
108
-        department:[],
109
-        prescriptions:[],
110
-        projectList:[],
111
-        orgname:"",
112
-        diagnoses:[],
113
-        org_id: 0
239
+    getAge(patient) {
240
+      var thisLen = patient.id_card_no.length;
241
+      var birth = "";
242
+      if (thisLen == 15) {
243
+        birth = "19" + patient.id_card_no.substr(6, 6);
244
+      } else {
245
+        birth = patient.id_card_no.substr(6, 8);
114 246
       }
247
+      var births =
248
+        birth.substr(0, 4) +
249
+        "-" +
250
+        birth.substr(4, 2) +
251
+        "-" +
252
+        birth.substr(6, 2);
253
+      return jsGetAge(births, "-");
115 254
     },
116
-   methods:{
117
-     getAge(patient){
118
-       var thisLen = patient.id_card_no.length
119
-       var birth = ''
120
-       if (thisLen == 15) {
121
-         birth = '19' + patient.id_card_no.substr(6, 6)
122
-       } else {
123
-         birth = patient.id_card_no.substr(6, 8)
124
-       }
125
-       var births =
126
-         birth.substr(0, 4) +
127
-         '-' +
128
-         birth.substr(4, 2) +
129
-         '-' +
130
-         birth.substr(6, 2)
131
-       return jsGetAge(births, '-')
132 255
 
133
-     },
256
+    getAllDoctorList() {
257
+      getAllDoctorList().then((response) => {
258
+        if (response.data.state == 1) {
259
+          var doctor = response.data.data.doctor;
134 260
 
135
-     getAllDoctorList(){
136
-      getAllDoctorList().then(response=>{
137
-        if(response.data.state == 1){
138
-               var doctor =  response.data.data.doctor
261
+          this.doctorList = doctor;
262
+        }
263
+      });
264
+    },
139 265
 
140
-               this.doctorList = doctor
141
-             }
142
-         })
143
-     },
266
+    getDoctor(id) {
267
+      var name = "";
268
+      for (let i = 0; i < this.doctorList.length; i++) {
269
+        if (id == this.doctorList[i].admin_user_id) {
270
+          name = this.doctorList[i].user_name;
271
+        }
272
+      }
273
+      return name;
274
+    },
275
+    getTime(value, temp) {
276
+      if (value != undefined) {
277
+        return uParseTime(value, temp);
278
+      }
279
+      return "";
280
+    },
281
+    getPrescriptionPrint() {
282
+      var params = {
283
+        // patient_id:this.patient_id,
284
+        // record_date:this.record_date,
285
+        // prescription_id:this.prescription_id,
286
+        patient_id: this.patient_id,
287
+        record_date: this.record_date,
288
+        prescription_id: this.prescription_id,
289
+        ids: this.ids,
290
+        p_type: 2,
291
+      };
292
+      console.log("params", params);
293
+      getPrescriptionPrint(params).then((response) => {
294
+        if (response.data.state == 1) {
295
+          var advicePrint = response.data.data.advicePrint;
296
+          console.log("adviceprint9999", advicePrint);
297
+          this.advicePrint = advicePrint;
298
+          this.prescriptions = advicePrint;
144 299
 
145
-      getDoctor(id){
146
-        var name = ""
147
-        for(let i=0;i<this.doctorList.length;i++){
148
-          if(id == this.doctorList[i].admin_user_id){
149
-              name = this.doctorList[i].user_name
300
+          this.doctorList_1 = response.data.data.eles;
301
+          console.log(this.doctorList_1, "医生列表");
302
+          if (this.doctorList_1.length > 0) {
303
+            var operatorsLen = this.doctorList_1.length;
304
+            for (var index = 0; index < operatorsLen; index++) {
305
+              this.$set(
306
+                this.operatorMaps,
307
+                this.doctorList_1[index].creator,
308
+                this.doctorList_1[index]
309
+              );
310
+            }
150 311
           }
312
+
313
+          console.log("处方222222", this.prescriptions);
314
+          var hisPatient = response.data.data.hisPatient;
315
+          console.log("hisPatient", hisPatient);
316
+          this.hisPatient = hisPatient;
317
+          var projectlist = response.data.data.projectlist;
318
+          console.log("所有项目列表", projectlist);
319
+          this.projectList = projectlist;
320
+        }
321
+      });
322
+    },
323
+    getHisPatientDetail() {
324
+      const params = {
325
+        patient_id: this.patient_id,
326
+      };
327
+      getHisPatientDetail(params).then((response) => {
328
+        if (response.data.state == 1) {
329
+          var hisPatient = response.data.data.hisPatient;
330
+          console.log("挂号病人", hisPatient);
331
+          this.hisPatient = hisPatient;
151 332
         }
152
-        return name
153
-      },
154
-      getTime(value, temp) {
155
-        if (value != undefined) {
156
-            return uParseTime(value, temp)
333
+      });
334
+    },
335
+    getInitData() {
336
+      getInitData().then((response) => {
337
+        if (response.data.state == 1) {
338
+          this.department = response.data.data.department;
339
+          this.diagnoses = response.data.data.diagnose;
340
+          console.log("争端", this.diagnoses);
157 341
         }
158
-        return ''
159
-     },
160
-       getPrescriptionPrint(){
161
-         var params = {
162
-          // patient_id:this.patient_id,
163
-          // record_date:this.record_date,
164
-          // prescription_id:this.prescription_id,
165
-          patient_id:this.patient_id,
166
-          record_date:this.record_date,
167
-          prescription_id:this.prescription_id,
168
-          ids:this.ids,
169
-           p_type:2,
170
-
171
-         }
172
-        console.log("params",params)
173
-       getPrescriptionPrint(params).then(response=>{
174
-         if(response.data.state == 1){
175
-            var advicePrint =  response.data.data.advicePrint
176
-            console.log("adviceprint9999",advicePrint)
177
-            this.advicePrint = advicePrint
178
-            this.prescriptions = advicePrint
179
-            console.log("处方222222",this.prescriptions)
180
-            var hisPatient = response.data.data.hisPatient
181
-            console.log("hisPatient",hisPatient)
182
-            this.hisPatient = hisPatient
183
-            var projectlist =  response.data.data.projectlist
184
-            console.log("所有项目列表",projectlist)
185
-            this.projectList = projectlist
186
-          }
187
-       })
188
-     },
189
-     getHisPatientDetail(){
190
-          const params = {
191
-              patient_id:this.patient_id
192
-          }
193
-       getHisPatientDetail(params).then(response=>{
194
-          if(response.data.state == 1){
195
-             var hisPatient =  response.data.data.hisPatient
196
-             console.log("挂号病人",hisPatient)
197
-             this.hisPatient = hisPatient
198
-          }
199
-       })
200
-     },
201
-     getInitData(){
202
-       getInitData().then(response=>{
203
-          if(response.data.state == 1){
204
-            this.department = response.data.data.department
205
-            this.diagnoses = response.data.data.diagnose
206
-            console.log("争端",this.diagnoses)
207
-          }
208
-       })
209
-     },
210
-     getDepart(id){
211
-         var name = ""
212
-       for(let i=0;i<this.department.length;i++){
213
-           if(id == this.department[i].id){
214
-               name = this.department[i].name
215
-           }
216
-       }
217
-       return name
218
-     },
342
+      });
343
+    },
344
+    getDepart(id) {
345
+      var name = "";
346
+      for (let i = 0; i < this.department.length; i++) {
347
+        if (id == this.department[i].id) {
348
+          name = this.department[i].name;
349
+        }
350
+      }
351
+      return name;
352
+    },
219 353
     getTotalOne(id) {
220
-
221
-        var total = 0
222
-        var addtotal = 0
223
-        for (let i = 0; i < this.prescriptions.length; i++) {
224
-          if(id == this.prescriptions[i].id){
225
-            if (this.prescriptions[i].project != null) {
226
-              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
227
-                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
228
-              }
354
+      var total = 0;
355
+      var addtotal = 0;
356
+      for (let i = 0; i < this.prescriptions.length; i++) {
357
+        if (id == this.prescriptions[i].id) {
358
+          if (this.prescriptions[i].project != null) {
359
+            for (let a = 0; a < this.prescriptions[i].project.length; a++) {
360
+              total =
361
+                total +
362
+                this.prescriptions[i].project[a].price *
363
+                  this.prescriptions[i].project[a].count;
229 364
             }
365
+          }
230 366
 
231
-            if (this.prescriptions[i].additionalcharge != null) {
232
-              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
233
-                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
234
-              }
367
+          if (this.prescriptions[i].additionalcharge != null) {
368
+            for (
369
+              let a = 0;
370
+              a < this.prescriptions[i].additionalcharge.length;
371
+              a++
372
+            ) {
373
+              addtotal =
374
+                addtotal +
375
+                this.prescriptions[i].additionalcharge[a].price *
376
+                  this.prescriptions[i].additionalcharge[a].count;
235 377
             }
236
-              addtotal =  Math.floor(addtotal * 100) / 100
378
+          }
379
+          addtotal = Math.floor(addtotal * 100) / 100;
237 380
         }
238
-
239
-       }
381
+      }
240 382
 
241 383
       for (let i = 0; i < this.prescriptions.length; i++) {
242
-          if(id == this.prescriptions[i].id){
243
-            if (this.prescriptions[i].advices != null) {
244
-              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
245
-                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
246
-              }
384
+        if (id == this.prescriptions[i].id) {
385
+          if (this.prescriptions[i].advices != null) {
386
+            for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
387
+              total =
388
+                total +
389
+                this.prescriptions[i].advices[a].price *
390
+                  this.prescriptions[i].advices[a].prescribing_number;
247 391
             }
392
+          }
248 393
 
249
-            if (this.prescriptions[i].additionalcharge != null) {
250
-              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
251
-                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
252
-              }
394
+          if (this.prescriptions[i].additionalcharge != null) {
395
+            for (
396
+              let a = 0;
397
+              a < this.prescriptions[i].additionalcharge.length;
398
+              a++
399
+            ) {
400
+              addtotal =
401
+                addtotal +
402
+                this.prescriptions[i].additionalcharge[a].price *
403
+                  this.prescriptions[i].additionalcharge[a].count;
253 404
             }
254
-              addtotal =  Math.floor(addtotal * 100) / 100
405
+          }
406
+          addtotal = Math.floor(addtotal * 100) / 100;
255 407
         }
256
-       }
408
+      }
257 409
 
258
-        return total + addtotal
259
-      },
410
+      return total + addtotal;
411
+    },
260 412
 
261
-     getProjectName(id){
262
-        var project_name = ""
263
-        for(let i=0;i<this.projectList.length;i++){
264
-           if(id == this.projectList[i].id){
265
-               project_name = this.projectList[i].project_name
266
-           }
413
+    getProjectName(id) {
414
+      var project_name = "";
415
+      for (let i = 0; i < this.projectList.length; i++) {
416
+        if (id == this.projectList[i].id) {
417
+          project_name = this.projectList[i].project_name;
267 418
         }
268
-        return project_name
269
-     },
270
-
271
-     getDiagnosis(id){
272
-       let arr = id.split(',')
273
-       var name = ""
274
-       for(let i=0;i<this.diagnoses.length;i++){
275
-         if(arr.indexOf(String(this.diagnoses[i].id)) > -1){
276
-           name += this.diagnoses[i].class_name + ' '
277
-         }
278
-       }
279
-       return name
280
-     }
419
+      }
420
+      return project_name;
421
+    },
281 422
 
282
-   },
283
-   created(){
284
-      this.getAllDoctorList()
285
-      this.getInitData()
286
-      this.getPrescriptionPrint()
287
-      this.getHisPatientDetail()
288
-      var xtuser = this.$store.getters.xt_user;
289
-      this.orgname = xtuser.org.org_name;
290
-      this.org_id = xtuser.org.id
291
-   },
292
-   watch:{
293
-     ids:function(val){
294
-      this.ids = val
295
-      this.getPrescriptionPrint()
296
-    }
297
-   }
298
-}
423
+    getDiagnosis(id) {
424
+      let arr = id.split(",");
425
+      var name = "";
426
+      for (let i = 0; i < this.diagnoses.length; i++) {
427
+        if (arr.indexOf(String(this.diagnoses[i].id)) > -1) {
428
+          name += this.diagnoses[i].class_name + " ";
429
+        }
430
+      }
431
+      return name;
432
+    },
433
+  },
434
+  created() {
435
+    this.getAllDoctorList();
436
+    this.getInitData();
437
+    this.getPrescriptionPrint();
438
+    this.getHisPatientDetail();
439
+    var xtuser = this.$store.getters.xt_user;
440
+    this.orgname = xtuser.org.org_name;
441
+    this.org_id = xtuser.org.id;
442
+  },
443
+  watch: {
444
+    ids: function (val) {
445
+      this.ids = val;
446
+      this.getPrescriptionPrint();
447
+    },
448
+  },
449
+};
299 450
 </script>
300 451
 
301 452
 
302 453
 <style lang="scss" scoped>
303
-.prescription-print{
304
-  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
305
-    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
306
-    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
307
-    margin-bottom: 20px;
308
-    padding:20px 10px;
454
+.prescription-print {
455
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
456
+    0 0 60px rgba(0, 0, 0, 0.06) inset;
457
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
458
+    0 0 40px rgba(0, 0, 0, 0.06) inset;
459
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
460
+  margin-bottom: 20px;
461
+  padding: 20px 10px;
309 462
 }
310
-.printTitle{
311
-    font-size: 22px;
312
-    text-align: center;
313
-    font-weight: bold;
463
+.printTitle {
464
+  font-size: 22px;
465
+  text-align: center;
466
+  font-weight: bold;
314 467
 }
315
-.infoTitle{
316
-    display: flex;
317
-    border-bottom: 2px solid #000;
318
-    margin-top:10px;
319
-    line-height: 24px;
320
-    padding:0 10px;
468
+.infoTitle {
469
+  display: flex;
470
+  border-bottom: 2px solid #000;
471
+  margin-top: 10px;
472
+  line-height: 24px;
473
+  padding: 0 10px;
321 474
 }
322
-.infoTitle p{
323
-    width: 200px;
475
+.infoTitle p {
476
+  width: 200px;
324 477
 }
325
-.infoMain{
326
-    display: flex;
327
-    flex-wrap: wrap;
328
-    border-bottom: 2px solid #000;
329
-    padding:0 10px;
478
+.infoMain {
479
+  display: flex;
480
+  flex-wrap: wrap;
481
+  border-bottom: 2px solid #000;
482
+  padding: 0 10px;
330 483
 }
331
-.infoMain div{
332
-    width: 50%;
333
-    line-height: 24px;
484
+.infoMain div {
485
+  width: 50%;
486
+  line-height: 24px;
334 487
 }
335
-.prescriptionBox{
336
-    padding:0 10px;
337
-    min-height:450px;
488
+.prescriptionBox {
489
+  padding: 0 10px;
490
+  min-height: 450px;
338 491
 }
339
-.Rp{
340
-    font-size: 22px;
341
-    font-weight: bold;
492
+.Rp {
493
+  font-size: 22px;
494
+  font-weight: bold;
342 495
 }
343
-.drugsBox{
344
-    padding-left: 40px;
345
-    margin-bottom: 10px;
496
+.drugsBox {
497
+  padding-left: 40px;
498
+  margin-bottom: 10px;
346 499
 }
347
-.drugsBox div{
348
-    line-height: 20px;
500
+.drugsBox div {
501
+  line-height: 20px;
349 502
 }
350
-.drugsOne{
351
-    line-height: 24px;
503
+.drugsOne {
504
+  line-height: 24px;
352 505
 }
353
-.drugsOne span{
354
-    margin-right: 20px;
506
+.drugsOne span {
507
+  margin-right: 20px;
355 508
 }
356
-.doctorBox{
357
-    display: flex;
358
-    justify-content: space-between;
359
-    padding:0 10px;
360
-    line-height: 24px;
361
-    border-bottom: 2px solid #000;
509
+.doctorBox {
510
+  display: flex;
511
+  justify-content: space-between;
512
+  padding: 0 10px;
513
+  line-height: 24px;
514
+  border-bottom: 2px solid #000;
362 515
 }
363
-.actionBar{
364
-    display: flex;
365
-    justify-content: space-between;
366
-    line-height: 24px;
367
-    padding:0 10px;
516
+.actionBar {
517
+  display: flex;
518
+  justify-content: space-between;
519
+  line-height: 24px;
520
+  padding: 0 10px;
368 521
 }
369
-.actionBar p{
370
-    width:150px;
522
+.actionBar p {
523
+  width: 150px;
371 524
 }
372 525
 </style>

文件差异内容过多而无法显示
+ 616 - 420
src/xt_pages/outpatientDoctorStation/template/printThree.vue


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

@@ -13,7 +13,9 @@
13 13
       </template> -->
14 14
             
15 15
       <div class='dialysisPage' style="padding-top:40px;">
16
-        <printOne v-if="org_id != 10138 && org_id != 10278" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
16
+        <!-- 此下条为本地开发下页面 -->
17
+        <!-- <printTwo v-if="org_id == 4" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printTwo> -->
18
+        <printOne v-if="org_id != 10138 && org_id != 10278 && org_id !=4&& org_id !=0" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
17 19
         <printTwo v-else v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printTwo>
18 20
       </div>
19 21
   </div>

文件差异内容过多而无法显示
+ 566 - 411
src/xt_pages/outpatientDoctorStation/treatTemplate/printTwo.vue


+ 311 - 0
src/xt_pages/outpatientTool/components/drugDetail.vue 查看文件

@@ -0,0 +1,311 @@
1
+<template>
2
+    <div>
3
+        <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
4
+            <div>
5
+                <el-input size="small" style="width:150px;" v-model="keywords" 
6
+                          @keyup.enter.native='searchAction'
7
+                          placeholder="请输入药品名称"
8
+                          class="filter-item"/>
9
+                 <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
10
+                <el-date-picker
11
+                        v-model="chargeDate"
12
+                        type="daterange"
13
+                        value-format="yyyy-MM-dd"
14
+                        range-separator="至"
15
+                        start-placeholder="开始日期"
16
+                        @change="changeDate"
17
+                        end-placeholder="结束日期">
18
+                </el-date-picker>
19
+            </div>
20
+        </div>
21
+        <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
22
+                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
23
+                  max-height="600"
24
+                  highlight-current-row>
25
+
26
+            <el-table-column align="center" prop="name" label="序号">
27
+                <template slot-scope="scope">
28
+                    {{scope.$index + 1}}
29
+                </template>
30
+            </el-table-column>
31
+          
32
+            <el-table-column align="center" prop="name" label="日期">
33
+                <template slot-scope="scope">
34
+                    {{getTime(scope.row.advice_date)}}
35
+                </template>
36
+            </el-table-column>
37
+            <el-table-column align="center" prop="name" label="药品类型">
38
+                <template slot-scope="scope">
39
+                    {{getDrugTypeName(scope.row.drug_id)}}
40
+                </template>
41
+            </el-table-column>
42
+            <el-table-column align="center" prop="name" label="药品名称">
43
+                <template slot-scope="scope">
44
+                    {{getDrugName(scope.row.drug_id)}}
45
+                </template>
46
+            </el-table-column>
47
+            <el-table-column align="center" prop="name" label="规格">
48
+                <template slot-scope="scope">
49
+                  {{getSpecialName(scope.row.drug_id)}}   
50
+                </template>
51
+            </el-table-column>
52
+            <el-table-column align="center" prop="name" label="数量">
53
+                <template slot-scope="scope">
54
+                  {{getCount(scope.row.child,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}
55
+                </template>
56
+            </el-table-column>
57
+
58
+            <el-table-column align="center" prop="name" label="单位">
59
+                <template slot-scope="scope">
60
+                  {{scope.row.prescribing_number_unit}}
61
+                </template>
62
+            </el-table-column>
63
+
64
+            <el-table-column align="center" prop="total" label="操作">
65
+                <template slot-scope="scope">
66
+                  <div style="color: #589ff8" @click="jump(scope.row.child,scope.row.min_number,scope.row.drug_id)">使用明细</div>
67
+                </template>
68
+            </el-table-column>
69
+
70
+        </el-table>
71
+
72
+       
73
+       <el-dialog
74
+        title="药品明细"
75
+        :visible.sync="dialogVisible"
76
+        width="60%">
77
+        <div style="margin-bottom:10px"> <span>药品类型:{{getDrugTypeName(drug_id)}}</span>
78
+              <span>药品名称:{{getDrugName(drug_id)}}</span>
79
+        </div>
80
+        <span>
81
+            <el-table :data="tableList" border :row-style="{ color: '#303133' }" ref="table"
82
+                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
83
+                  max-height="600"
84
+                  highlight-current-row>
85
+
86
+            <el-table-column align="center" prop="name" label="序号">
87
+                <template slot-scope="scope">
88
+                    {{scope.$index + 1}}
89
+                </template>
90
+            </el-table-column>
91
+          
92
+            <el-table-column align="center" prop="name" label="使用日期">
93
+                <template slot-scope="scope">
94
+                    {{getTime(scope.row.advice_date)}}
95
+                </template>
96
+            </el-table-column>
97
+            <el-table-column align="center" prop="name" label="患者名字">
98
+                <template slot-scope="scope">
99
+                   {{getPatientName(scope.row.patient_id)}}
100
+                </template>
101
+            </el-table-column>
102
+            <el-table-column align="center" prop="name" label="数量">
103
+                <template slot-scope="scope">
104
+                    {{scope.row.prescribing_number/min_number}}
105
+                </template>
106
+            </el-table-column>
107
+            <el-table-column align="center" prop="name" label="单位">
108
+                <template slot-scope="scope">
109
+                  {{scope.row.prescribing_number_unit}}   
110
+                </template>
111
+            </el-table-column>
112
+        
113
+        </el-table>
114
+        </span>
115
+        <span slot="footer" class="dialog-footer">
116
+            <el-button @click="dialogVisible = false">取 消</el-button>
117
+            <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
118
+        </span>
119
+     </el-dialog>
120
+
121
+    </div>
122
+
123
+   
124
+</template>
125
+
126
+
127
+<script>
128
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
129
+  import {getDrugDetailSummary} from "@/api/stock"
130
+  import { uParseTime } from '@/utils/tools'
131
+import { min } from 'moment'
132
+  const moment = require('moment')
133
+  export default {
134
+    components: {
135
+      BreadCrumb
136
+
137
+    },
138
+    data() {
139
+      return {
140
+        detail_loading: false,
141
+        tempArr: [],
142
+        pos: 0,
143
+        sameRowArr: [],
144
+        keywords: '',
145
+        tableData: [],
146
+        chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
147
+        limit:10,
148
+        page:1,
149
+        total:0,
150
+       drugList:[],
151
+       drugTypeList:[],
152
+       dialogVisible:false,
153
+       tableList:[],
154
+       patients:[],
155
+       min_number:0,
156
+       drug_type:"",
157
+       drug_id:0,
158
+      }
159
+    },
160
+    methods:{
161
+      changeDate(){
162
+        this.getlist()
163
+       },
164
+       getlist(){
165
+        let start_time = this.chargeDate[0]
166
+        let end_time = this.chargeDate[1]
167
+        var params = {
168
+            start_time: start_time,
169
+            end_time: end_time,
170
+            keyword: this.keywords,
171
+            limit:this.limit,
172
+            page:this.page,
173
+        }  
174
+       
175
+        getDrugDetailSummary(params).then(response=>{
176
+          if(response.data.state == 1){
177
+            var list = response.data.data.list
178
+           
179
+            var total = response.data.data.total
180
+            var drug = response.data.data.drug
181
+            this.patients = response.data.data.patients
182
+            for(let i =0;i<list.length;i++){
183
+               
184
+              for(let j=0;j<drug.length;j++){
185
+                if(list[i].drug_id == drug[j].id){
186
+                  for(let z=0;z<list[i].child.length;z++){
187
+                    if(list[i].child[z].prescribing_number_unit == drug[j].max_unit){
188
+                       list[i].child[z].prescribing_number = parseInt(list[i].child[z].prescribing_number) * drug[j].min_number
189
+                    }
190
+                  }
191
+                }
192
+              }
193
+            }
194
+            this.drugList = drug
195
+            this.total = total
196
+            this.drugTypeList = response.data.data.drugTypeList
197
+            for(let i=0;i<list.length;i++){
198
+                list[i].min_number = 0
199
+                list[i].max_unit = ""
200
+                list[i].min_unit = ""
201
+             for(let j=0;j<drug.length;j++){
202
+               if(list[i].drug_id == drug[j].id){
203
+                 list[i].min_number = drug[j].min_number
204
+                 list[i].max_unit = drug[j].max_unit
205
+                 list[i].min_unit = drug[j].min_unit
206
+                 this.tableData.push(list[i])
207
+               }
208
+             }
209
+            }
210
+           
211
+          }
212
+        })  
213
+      },
214
+     getTime(val) {
215
+         if(val < 0){
216
+           return ""
217
+         }
218
+         if(val == ""){
219
+          return ""
220
+         }else {
221
+          return uParseTime(val, '{y}-{m}-{d}')
222
+         }
223
+      },  
224
+     getDrugName(id){
225
+       var drug_name = ""
226
+       for(let i=0;i<this.drugList.length;i++){
227
+        if(id == this.drugList[i].id){
228
+           drug_name = this.drugList[i].drug_name
229
+        }
230
+       } 
231
+       return drug_name 
232
+     },
233
+     getSpecialName(id){
234
+       var specification_name = ""
235
+        for(let i=0;i<this.drugList.length;i++){
236
+        if(id == this.drugList[i].id){
237
+           specification_name = this.drugList[i].dose + this.drugList[i].dose_unit +"*" + this.drugList[i].min_number +this.drugList[i].min_unit +"/" + this.drugList[i].max_unit;
238
+        }
239
+       } 
240
+       return specification_name    
241
+     },
242
+     searchAction(){
243
+       this.getlist()  
244
+     },
245
+     getDrugTypeName(drug_id){
246
+      
247
+       var drug_type = ""
248
+       for(let i=0;i<this.drugList.length;i++){
249
+         if(drug_id == this.drugList[i].id){
250
+            drug_type = this.drugList[i].drug_type
251
+         }
252
+       }
253
+       var type_name = ""
254
+       for(let i=0;i<this.drugTypeList.length;i++ ){
255
+          if(drug_type == this.drugTypeList[i].value){
256
+            type_name = this.drugTypeList[i].name
257
+          }
258
+       }  
259
+       return type_name
260
+     },
261
+     getCount(val,min_number,max_unit,min_unit){
262
+   
263
+       var total = 0
264
+       var min_str = ""
265
+       var max_str = ""
266
+       if(val.length > 0){
267
+         for(let i=0;i<val.length;i++){
268
+           total += parseInt(val[i].prescribing_number)
269
+         }
270
+       }
271
+    
272
+        if (total < min_number){
273
+          min_str = total + min_unit
274
+        }
275
+        if (total == 0) {
276
+          min_str = ""
277
+          max_str = ""
278
+        }
279
+        if (total >=min_number) {
280
+           if(parseInt(total/min_number)!=0){
281
+              max_str = parseInt(total/min_number) + max_unit
282
+           }
283
+           if(total%min_number!=0){
284
+              min_str = total%min_number + min_unit
285
+           }
286
+
287
+        }
288
+        return max_str + min_str
289
+       },
290
+       jump(val,min_number,drug_id){
291
+         this.dialogVisible = true
292
+         this.tableList= val
293
+         this.min_number = min_number
294
+         this.drug_id = drug_id
295
+       },
296
+       getPatientName(id){
297
+         var name = ""
298
+         for(let i=0;i<this.patients.length;i++){
299
+            if(id == this.patients[i].id){
300
+              name = this.patients[i].name
301
+            }
302
+         }
303
+         return name
304
+       }
305
+     
306
+    },
307
+    created() {
308
+      this.getlist()
309
+    }
310
+  }
311
+</script>

+ 266 - 0
src/xt_pages/outpatientTool/components/goodDetail.vue 查看文件

@@ -0,0 +1,266 @@
1
+<template>
2
+    <div>
3
+        <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
4
+            <div>
5
+                <el-input size="small" style="width:150px;" v-model="keywords" 
6
+                          @keyup.enter.native='searchAction'
7
+                          placeholder="请输入耗材名称"
8
+                          class="filter-item"/>
9
+                 <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
10
+                <el-date-picker
11
+                        v-model="chargeDate"
12
+                        type="daterange"
13
+                        value-format="yyyy-MM-dd"
14
+                        range-separator="至"
15
+                        start-placeholder="开始日期"
16
+                        @change="changeDate"
17
+                        end-placeholder="结束日期">
18
+                </el-date-picker>
19
+            </div>
20
+        </div>
21
+        <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
22
+                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
23
+                  max-height="600"
24
+                  highlight-current-row>
25
+
26
+            <el-table-column align="center" prop="name" label="序号">
27
+                <template slot-scope="scope">
28
+                    {{scope.$index +1}}
29
+                </template>
30
+            </el-table-column>
31
+          
32
+            <el-table-column align="center" prop="name" label="日期">
33
+                <template slot-scope="scope">
34
+                {{getTime(scope.row.record_date)}}
35
+                </template>
36
+            </el-table-column>
37
+            <el-table-column align="center" prop="name" label="耗材类型">
38
+                <template slot-scope="scope">
39
+                 {{getGoodType(scope.row.project_id)}}
40
+                </template>
41
+            </el-table-column>
42
+            <el-table-column align="center" prop="name" label="耗材名称">
43
+                <template slot-scope="scope">
44
+                  {{getGoodName(scope.row.project_id)}}
45
+                </template>
46
+            </el-table-column>
47
+            <el-table-column align="center" prop="name" label="规格">
48
+                <template slot-scope="scope">
49
+                    {{getSpecificatioName(scope.row.project_id)}}
50
+                </template>
51
+            </el-table-column>
52
+            <el-table-column align="center" prop="name" label="数量">
53
+                <template slot-scope="scope">
54
+                  {{getCount(scope.row.child)}}
55
+                </template>
56
+            </el-table-column>
57
+
58
+            <el-table-column align="center" prop="name" label="单位">
59
+                <template slot-scope="scope">
60
+                   {{getUnit(scope.row.project_id)}}
61
+                </template>
62
+            </el-table-column>
63
+
64
+            <el-table-column align="center" prop="total" label="操作">
65
+                <template slot-scope="scope">
66
+                   <div style="color: #589ff8" @click="jump(scope.row.child,scope.row.project_id)">使用明细</div>
67
+                </template>
68
+            </el-table-column>
69
+
70
+        </el-table>
71
+
72
+
73
+             
74
+       <el-dialog
75
+        title="耗材明细"
76
+        :visible.sync="dialogVisible"
77
+        width="60%">
78
+        <div style="margin-bottom:10px"> <span>耗材类型:{{getGoodType(good_id)}}</span>
79
+              <span>耗材名称:{{getGoodName(good_id)}}</span>
80
+        </div>
81
+        <span>
82
+            <el-table :data="tableList" border :row-style="{ color: '#303133' }" ref="table"
83
+                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
84
+                  max-height="600"
85
+                  highlight-current-row>
86
+
87
+            <el-table-column align="center" prop="name" label="序号">
88
+                <template slot-scope="scope">
89
+                    {{scope.$index + 1}}
90
+                </template>
91
+            </el-table-column>
92
+          
93
+            <el-table-column align="center" prop="name" label="使用日期">
94
+                <template slot-scope="scope">
95
+                    {{getTime(scope.row.record_date)}}
96
+                </template>
97
+            </el-table-column>
98
+            <el-table-column align="center" prop="name" label="患者名字">
99
+                <template slot-scope="scope">
100
+                   {{getPatientName(scope.row.patient_id)}}
101
+                </template>
102
+            </el-table-column>
103
+            <el-table-column align="center" prop="name" label="数量">
104
+                <template slot-scope="scope">
105
+                   {{scope.row.count}}
106
+                </template>
107
+            </el-table-column>
108
+            <el-table-column align="center" prop="name" label="单位">
109
+                <template slot-scope="scope">
110
+                  {{getUnit(scope.row.project_id)}}   
111
+                </template>
112
+            </el-table-column>
113
+        
114
+        </el-table>
115
+        </span>
116
+        <span slot="footer" class="dialog-footer">
117
+            <el-button @click="dialogVisible = false">取 消</el-button>
118
+            <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
119
+        </span>
120
+     </el-dialog>
121
+    </div>
122
+
123
+</template>
124
+
125
+
126
+<script>
127
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
128
+  const moment = require('moment')
129
+import {getGoodDetailSummary} from "@/api/stock"
130
+  import { uParseTime } from '@/utils/tools'
131
+  export default {
132
+    components: {
133
+      BreadCrumb
134
+
135
+    },
136
+    data() {
137
+      return {
138
+        detail_loading: false,
139
+        tempArr: [],
140
+        pos: 0,
141
+        sameRowArr: [],
142
+        keywords: '',
143
+        tableData: [],
144
+        chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
145
+        limit:10,
146
+        page:1,
147
+        total:0,
148
+        goodList:[],
149
+        patients:[],
150
+        good_id:0,
151
+        goodType:[],
152
+        dialogVisible:false,
153
+        tableList:[],
154
+      }
155
+    },
156
+    methods:{
157
+     changeDate(){
158
+         
159
+     },
160
+     getlist(){
161
+       let start_time = this.chargeDate[0]
162
+        let end_time = this.chargeDate[1]
163
+        var params = {
164
+            start_time: start_time,
165
+            end_time: end_time,
166
+            keyword: this.keywords,
167
+            limit:this.limit,
168
+            page:this.page,
169
+        }  
170
+       getGoodDetailSummary(params).then(response=>{
171
+         if(response.data.state == 1){
172
+           var list = response.data.data.list
173
+         
174
+           this.total = response.data.data.total
175
+           this.goodList = response.data.data.good
176
+           this.goodType = response.data.data.goodType
177
+           for(let i=0;i<list.length;i++){
178
+            for(let j=0;j<this.goodList.length;j++){
179
+              if(list[i].project_id == this.goodList[j].id){
180
+                 this.tableData.push(list[i])
181
+              }
182
+            }
183
+           }
184
+           this.patients = response.data.data.patients
185
+         }
186
+       })   
187
+     },
188
+     jump(val,good_id){
189
+         this.dialogVisible = true
190
+         this.tableList= val
191
+         this.good_id = good_id
192
+       },
193
+       getPatientName(id){
194
+         var name = ""
195
+         for(let i=0;i<this.patients.length;i++){
196
+            if(id == this.patients[i].id){
197
+              name = this.patients[i].name
198
+            }
199
+         }
200
+         return name
201
+       },
202
+       getTime(val) {
203
+         if(val < 0){
204
+           return ""
205
+         }
206
+         if(val == ""){
207
+          return ""
208
+         }else {
209
+          return uParseTime(val, '{y}-{m}-{d}')
210
+         }
211
+      },  
212
+      getGoodType(id){
213
+       var good_type = 0
214
+       for(let i=0;i<this.goodList.length;i++){
215
+         if(id == this.goodList[i].id){
216
+           good_type = this.goodList[i].good_type_id
217
+         }
218
+       }
219
+       var type_name = ""
220
+       for(let i=0;i<this.goodType.length;i++){
221
+         if(good_type == this.goodType[i].id){
222
+           type_name = this.goodType[i].type_name
223
+         }
224
+       }
225
+       return type_name
226
+      },
227
+      getGoodName(good_id){
228
+        var good_name = ""
229
+        for(let i=0;i<this.goodList.length;i++){
230
+          if(good_id == this.goodList[i].id){
231
+             good_name = this.goodList[i].good_name
232
+          }
233
+        }
234
+        return good_name
235
+      },
236
+      getSpecificatioName(good_id){
237
+        var specification_name = ""
238
+        for(let i=0;i<this.goodList.length;i++){
239
+          if(good_id == this.goodList[i].id){
240
+             specification_name = this.goodList[i].specification_name
241
+          }
242
+        }
243
+        return specification_name
244
+      },
245
+      getCount(val){
246
+        var total = 0
247
+        for(let i=0;i<val.length;i++){
248
+           total +=val[i].count
249
+        }
250
+        return total
251
+      },
252
+      getUnit(id){
253
+        var packing_unit = ""
254
+        for(let i=0;i<this.goodList.length;i++){
255
+          if(id == this.goodList[i].id){
256
+            packing_unit = this.goodList[i].packing_unit
257
+          }
258
+        }
259
+        return packing_unit
260
+      }
261
+    },
262
+    created() {
263
+      this.getlist()
264
+    }
265
+  }
266
+</script>

+ 307 - 0
src/xt_pages/outpatientTool/zeroSummary.vue 查看文件

@@ -0,0 +1,307 @@
1
+<template>
2
+    <div class="main-contain new-main-contain">
3
+        <div class="position">
4
+            <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+        </div>
6
+        <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
7
+
8
+            <div class="mainRight">
9
+                <el-tabs v-model="titleType">
10
+                    <el-tab-pane label="药品零用" name="药品零用"></el-tab-pane>
11
+                    <el-tab-pane label="耗材零用" name="耗材零用"></el-tab-pane>
12
+                </el-tabs>
13
+                <drugDetail v-if="titleType == '药品零用'"></drugDetail>
14
+                <goodDetail v-if="titleType == '耗材零用'"></goodDetail>
15
+               
16
+               
17
+            </div>
18
+        </div>
19
+    </div>
20
+</template>
21
+
22
+<script>
23
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
24
+  import goodDetail from './components/goodDetail'
25
+  import drugDetail from './components/drugDetail'
26
+
27
+
28
+  const moment = require('moment')
29
+
30
+  export default {
31
+    components: {
32
+      goodDetail,
33
+      drugDetail,
34
+      BreadCrumb
35
+
36
+    },
37
+    data() {
38
+      return {
39
+        titleType: '药品零用',
40
+        crumbs: [
41
+        { path: false, name: "零用明细汇总" },
42
+        { path: false, name: "药品零用" }
43
+      ],
44
+      }
45
+    },
46
+    methods: {
47
+    
48
+    },
49
+    created() {
50
+     
51
+    },
52
+
53
+    mounted() {
54
+
55
+    },
56
+    watch: {}
57
+  }
58
+</script>
59
+
60
+<style lang="scss" scoped>
61
+    .new-main-contain {
62
+        height: 100%;
63
+        display: flex;
64
+        flex-direction: column;
65
+    }
66
+
67
+    .app-container {
68
+        height: 100%;
69
+    }
70
+
71
+    .mainCell {
72
+        height: 36px;
73
+        display: flex;
74
+        align-items: center;
75
+    }
76
+
77
+    .mainLeft {
78
+        width: 200px;
79
+        height: 100%;
80
+        display: flex;
81
+        flex-direction: column;
82
+
83
+    .el-radio {
84
+        margin-right: 5px;
85
+    }
86
+
87
+    }
88
+    .mainRight {
89
+        margin-left: 10px;
90
+        flex: 1;
91
+        height: 100%;
92
+        display: flex;
93
+        flex-direction: column;
94
+        overflow-y: auto;
95
+
96
+    .cellSpan {
97
+        min-width: 80px;
98
+        display: inline-block;
99
+        margin-right: 10px;
100
+    }
101
+
102
+    }
103
+    .mainCenter {
104
+        display: flex;
105
+        flex: 1;
106
+    }
107
+
108
+    .centerLeft {
109
+        flex: 1;
110
+        display: flex;
111
+        flex-direction: column;
112
+        position: relative;
113
+
114
+    .el-form-item {
115
+        width: 32%;
116
+        margin-right: 1%;
117
+        float: left;
118
+    }
119
+
120
+    .el-form-item__label {
121
+        text-align: left;
122
+    }
123
+
124
+    }
125
+    .backColor {
126
+        background: #f6f8f9;
127
+        height: 5px;
128
+        margin-bottom: 5px;
129
+    }
130
+
131
+    .tabsBox {
132
+        position: relative;
133
+        height: 76%;
134
+        overflow-y: auto;
135
+        margin-bottom: 60px;
136
+
137
+    .el-tabs__item {
138
+        padding: 0 10px;
139
+    }
140
+
141
+    }
142
+    .preTabs {
143
+        height: 100%;
144
+        display: flex;
145
+        flex-direction: column;
146
+
147
+    .el-tabs__content {
148
+        flex: 1;
149
+        overflow-y: auto;
150
+    }
151
+
152
+    }
153
+
154
+    .costBox {
155
+        width: 100%;
156
+        height: 60px;
157
+        background: #fff;
158
+        position: absolute;
159
+        bottom: 0;
160
+        display: flex;
161
+        align-items: center;
162
+    }
163
+
164
+    .addTab {
165
+        position: absolute;
166
+        right: 0;
167
+        top: 14px;
168
+        z-index: 20;
169
+    }
170
+
171
+    .centerRight {
172
+        width: 300px;
173
+        margin-left: 10px;
174
+        display: flex;
175
+        flex-direction: column;
176
+        position: relative;
177
+    }
178
+
179
+    .rightTab {
180
+        height: 40px;
181
+        width: 100%;
182
+        border: 1px solid #d2d2d2;
183
+        box-sizing: border-box;
184
+
185
+    p {
186
+        width: 50%;
187
+        height: 40px;
188
+        line-height: 40px;
189
+        text-align: center;
190
+        background: #eee;
191
+        float: left;
192
+    }
193
+
194
+    > p:last-child {
195
+        border-left: 1px solid #d2d2d2;
196
+        float: right;
197
+    }
198
+
199
+    .activeP {
200
+        background: #409EFF;
201
+        color: #fff;
202
+    }
203
+
204
+    }
205
+    .comfirmBox {
206
+        width: 100%;
207
+        height: 60px;
208
+        background: #fff;
209
+        position: absolute;
210
+        bottom: 0;
211
+        display: flex;
212
+        align-items: center;
213
+        justify-content: space-between;
214
+    }
215
+
216
+    .mainHeader {
217
+        width: 100%;
218
+        background: #fff;
219
+        position: fixed;
220
+        z-index: 100;
221
+        height: 36px;
222
+    }
223
+
224
+    .titleBox {
225
+        position: fixed;
226
+        z-index: 99;
227
+        background: #fff;
228
+    }
229
+
230
+    .fixedCell {
231
+        position: fixed;
232
+        z-index: 99;
233
+        right: 30px;
234
+        background: #fff;
235
+        width: 300px;
236
+        display: flex;
237
+        justify-content: space-between;
238
+    }
239
+</style>
240
+
241
+<style lang="scss">
242
+    .centerLeft {
243
+
244
+    .el-form-item__label {
245
+        text-align: left;
246
+    }
247
+
248
+    }
249
+    .tabsBox {
250
+
251
+    .el-tabs__item {
252
+        padding: 0 10px;
253
+    }
254
+
255
+    .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2) {
256
+        padding: 0 10px;
257
+    }
258
+
259
+    .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:last-child {
260
+        padding: 0 10px;
261
+    }
262
+
263
+    .el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable {
264
+        padding: 0 10px;
265
+    }
266
+
267
+    }
268
+    .centerRight {
269
+
270
+    .el-tabs__nav-scroll {
271
+        display: flex;
272
+    }
273
+
274
+    .el-tabs__nav {
275
+        margin: 0 auto;
276
+    }
277
+
278
+    .el-table th .cell, .el-table td .cell {
279
+        padding: 0 2px;
280
+    }
281
+
282
+    }
283
+    .preTabs {
284
+
285
+    .el-tabs__content {
286
+
287
+    }
288
+
289
+    }
290
+    .rightTabs {
291
+        height: 100%;
292
+
293
+
294
+    .el-tabs__content {
295
+
296
+    }
297
+
298
+    }
299
+    .centerDialog {
300
+
301
+    .el-dialog__body {
302
+        max-height: calc(100vh - 100px) !important;
303
+        padding: 0 20px;
304
+    }
305
+
306
+    }
307
+</style>

+ 28 - 10
src/xt_pages/stock/detail/print.vue 查看文件

@@ -51,8 +51,9 @@
51 51
               <td style="line-height: 50px">
52 52
                 <span v-if="type == 1"> {{ item.warehousing_count }}</span>
53 53
                 <span v-if="type == 2"> 
54
-                  <span  v-if= "org_id == 3907 || org_id == 9919 || org_id == 9583">{{getStockCount(item.good_id) }}</span>  
55
-                  <span v-else>{{getStockCount(item.good_id) }}</span>
54
+                  <span  v-if="org_id == 3907 || org_id == 9919 || org_id == 9583">{{getStockCount(item.good_id) }}</span> 
55
+                   <span  v-if="org_id == 10265">{{getMySelfCount(item.good_id) }}</span>   
56
+                  <span v-if="org_id!=3907&&org_id!=10265&&org_id!=10285&&org_id!=9583">{{getStockCount(item.good_id) }}</span>
56 57
                 </span>
57 58
                
58 59
                 <span v-if="type == 4"> {{ item.count }}</span>
@@ -63,7 +64,7 @@
63 64
               <td style="line-height:50px">
64 65
                 <span v-if="type == 1"> {{ item.price }}</span>
65 66
                 <span v-if="type == 2"> 
66
-                  <span v-if="org_id == 9919 || org_id == 9671">{{ item.buy_price }}</span>  
67
+                  <span v-if="org_id == 9919">{{ item.buy_price }}</span>  
67 68
                   <span v-else>
68 69
                     {{ item.packing_price }} 
69 70
                   </span>  
@@ -73,10 +74,11 @@
73 74
               <td style="line-height:50px">
74 75
                 <span v-if="type == 1">{{(item.warehousing_count * item.price).toFixed(2)}}</span>
75 76
                 <span v-if="type == 2">
76
-                  <span v-if="org_id == 3907 || org_id ==9919 || org_id == 9671">
77
-                     {{(getStockCount(item.good_id) * item.buy_price).toFixed(2) }}
77
+                  <span v-if="org_id == 3907 || org_id ==9919">
78
+                     {{(getStockCount(item.good_id) * item.buy_price).toFixed(2)}}
78 79
                   </span>
79
-                  <span v-else>{{(getStockCount(item.good_id) * item.packing_price).toFixed(2)}}</span>
80
+                  <span v-if="org_id == 10265">{{(getMySelfCount(item.good_id)*item.packing_price).toFixed(2)}}</span>
81
+                  <span v-if="org_id!=3907&&org_id!=10265&&org_id!=9919">{{(getStockCount(item.good_id) * item.packing_price).toFixed(2)}}</span>
80 82
                 </span>
81 83
                 <span v-if="type == 4">{{(item.count * item.price).toFixed(2)}}</span>
82 84
               </td>
@@ -97,8 +99,9 @@
97 99
               <td style="line-height: 50px"  width="80">
98 100
                 <span v-if="type == 1">{{getWareInfoTotal().toFixed(2)}}</span> 
99 101
                 <span v-if="type == 2">
100
-                  <span v-if="org_id == 3907 || org_id == 9919 || org_id == 9671">{{getWareOutTotalOne().toFixed(2)}}</span>
101
-                  <span v-else> {{getWareOutTotal().toFixed(2)}}</span>
102
+                  <span v-if="org_id == 3907 || org_id == 9919">{{getWareOutTotalOne().toFixed(2)}}</span>
103
+                  <span v-if="org_id == 10265">{{getWareOutTotalSix().toFixed(2)}}</span>
104
+                  <span v-if="org_id!=3907 && org_id!=9919 && org_id!=10265"> {{getWareOutTotal().toFixed(2)}}</span>
102 105
                  </span> 
103 106
                 <span v-if="type == 4">{{getWareOutTotal().toFixed(2)}}</span> 
104 107
               </td>
@@ -406,13 +409,28 @@
406 409
        return total
407 410
      },
408 411
      getWareOutTotalOne(){
409
-       console.log("数据23332323",this.stockDatas)
410 412
        var total = 0
411 413
        for(let i=0;i<this.stockDatas.length;i++){
412 414
          total+= this.getStockCount(this.stockDatas[i].good_id) * this.stockDatas[i].buy_price
413 415
        }
414 416
        return total
415
-     }
417
+     },
418
+     getMySelfCount(good_id){
419
+       var total = 0
420
+       for(let i=0;i<this.stockDatas.length;i++){
421
+         if(good_id == this.stockDatas[i].good_id){
422
+            total+= this.stockDatas[i].count
423
+         }
424
+       }
425
+       return total
426
+     },
427
+     getWareOutTotalSix(){
428
+       var total = 0
429
+       for(let i=0;i<this.stockDatas.length;i++){
430
+         total+= this.getMySelfCount(this.stockDatas[i].good_id) * this.stockDatas[i].packing_price
431
+       }
432
+       return total
433
+     },
416 434
     },
417 435
     created() {
418 436
       var xtuser = this.$store.getters.xt_user

+ 26 - 2
src/xt_pages/stock/detail/stockOutDetail.vue 查看文件

@@ -754,10 +754,18 @@ export default {
754 754
         if(this.orgId == 9919){
755 755
           this.tableOut[i].total_price = (this.tableOut[i].count * this.tableOut[i].buy_price).toFixed(2)
756 756
           this.tableOut[i].packing_price = this.tableOut[i].buy_price
757
+        }else if(this.orgId == 10265){
758
+          this.tableOut[i].total_price = (this.getMySelfCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
757 759
         }else{
758 760
           this.tableOut[i].total_price = (this.getStockCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
759 761
         }
760
-        this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
762
+       
763
+        if(this.orgId  == 10265){
764
+        
765
+         this.tableOut[i].out_count = this.getMySelfCount(this.tableOut[i].good_id)
766
+        }else{
767
+          this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
768
+        }
761 769
        }
762 770
        import('@/vendor/Export2Excel').then(excel => {
763 771
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
@@ -845,7 +853,7 @@ export default {
845 853
       getGoodDetailPrintList(params).then(response=>{
846 854
         if(response.data.state == 1){
847 855
           var list = response.data.data.list
848
-        
856
+          console.log("lisrt23323223233232232323232323",list)
849 857
           this.tableOut = list
850 858
           var stockTotal = response.data.data.stockTotal
851 859
           console.log("list88888888888888888888",stockTotal)
@@ -863,6 +871,22 @@ export default {
863 871
         }
864 872
         return count
865 873
     }, 
874
+    getMySelfCount(good_id){
875
+       var total = 0
876
+       for(let i=0;i<this.tableOut.length;i++){
877
+         if(good_id == this.tableOut[i].good_id){
878
+            total+= this.tableOut[i].count
879
+         }
880
+       }
881
+       return total
882
+     },
883
+     getWareOutTotalSix(){
884
+       var total = 0
885
+       for(let i=0;i<this.tableOut.length;i++){
886
+         total+= this.getMySelfCount(this.tableOut[i].good_id) * this.tableOut[i].packing_price
887
+       }
888
+       return total
889
+     },
866 890
   }
867 891
 };
868 892
 </script>

+ 226 - 0
src/xt_pages/stock/inventoryTransfer/Addtrans.vue 查看文件

@@ -0,0 +1,226 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      <div>
6
+        <el-button type="primary" @click="save">保存</el-button>
7
+        <el-button type="warning" @click="examine">审核</el-button>
8
+      </div>
9
+    </div>
10
+    <div class="app-container">
11
+      <div
12
+        style="
13
+          justify-content: flex-start;
14
+          margin: 0px 0 12px 0;
15
+          display: flex;
16
+          align-items: center;
17
+        "
18
+      >
19
+        <el-form
20
+          :inline="true"
21
+          :rules="rules"
22
+          :model="formInline"
23
+          class="demo-form-inline"
24
+        >
25
+          <el-form-item label="单据日期:">
26
+            <el-date-picker
27
+              v-model="value1"
28
+              type="date"
29
+              placeholder="选择日期"
30
+            ></el-date-picker>
31
+          </el-form-item>
32
+          <el-form-item label="调出仓库:" prop="region">
33
+            <el-select v-model="formInline.region" placeholder="活动区域">
34
+              <el-option label="区域一" value="shanghai"></el-option>
35
+              <el-option label="区域二" value="beijing"></el-option>
36
+            </el-select>
37
+          </el-form-item>
38
+          <el-form-item label="调入仓库:" prop="region">
39
+            <el-select v-model="formInline.region" placeholder="活动区域">
40
+              <el-option label="区域一" value="shanghai"></el-option>
41
+              <el-option label="区域二" value="beijing"></el-option>
42
+            </el-select>
43
+          </el-form-item>
44
+        </el-form>
45
+      </div>
46
+      <el-table
47
+        :row-style="changColor"
48
+        :header-cell-style="{
49
+          backgroundColor: 'rgb(245, 247, 250)',
50
+          color: '#606266',
51
+        }"
52
+        :data="tableData"
53
+        :class="signAndWeighBoxPatients"
54
+        border
55
+      >
56
+        >
57
+        <el-table-column label="单据编号" align="center">
58
+          <template slot-scope="scope">
59
+            <span>{{ scope.row.drug_name ? scope.row.drug_name : "" }}</span>
60
+          </template>
61
+        </el-table-column>
62
+        <el-table-column align="center">
63
+          <template slot="header" slot-scope="scope">
64
+            商品名称<span style="color:red;">*</span>
65
+          </template>
66
+          <template slot-scope="scope">
67
+        <span>{{ scope.row.Count ? scope.row.Count : "" }}</span>
68
+          </template>
69
+        </el-table-column>
70
+        <el-table-column label="商品类型" align="center">
71
+          <template slot-scope="scope">
72
+            <span>{{ scope.row.Count ? scope.row.Count : "" }}</span>
73
+          </template>
74
+        </el-table-column>
75
+        <el-table-column label="规格&&单位" align="center">
76
+          <template slot-scope="scope">
77
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
78
+          </template>
79
+        </el-table-column>
80
+        <el-table-column label="调拨数量" align="center">
81
+          <template slot-scope="scope">
82
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
83
+          </template>
84
+        </el-table-column>
85
+        <el-table-column label="库存总数" align="center">
86
+          <template slot-scope="scope">
87
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
88
+          </template>
89
+        </el-table-column>
90
+        <el-table-column label="制单人" align="center">
91
+          <template slot-scope="scope">
92
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
93
+          </template>
94
+        </el-table-column>
95
+        <el-table-column label="备注" align="center">
96
+          <template slot-scope="scope">
97
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
98
+          </template>
99
+        </el-table-column>
100
+
101
+
102
+
103
+        <el-table-column label="操作" align="center" width="260px">
104
+          <template slot-scope="scope">
105
+            <el-tooltip class="item" content="新增" placement="top-start">
106
+              <el-button
107
+                icon="el-icon-plus"
108
+                size="small"
109
+                type="primary"
110
+                @click="toAdd(scope.row)"
111
+              >
112
+              </el-button>
113
+            </el-tooltip>
114
+
115
+            <el-tooltip class="item" content="删除" placement="top-start">
116
+              <el-button
117
+                icon="el-icon-delete"
118
+                size="small"
119
+                type="danger"
120
+                @click="toDelete(scope.row, scope.row.$index)"
121
+              >
122
+              </el-button>
123
+            </el-tooltip>
124
+          </template>
125
+        </el-table-column>
126
+      </el-table>
127
+      <el-pagination
128
+        @size-change="handleSizeChange"
129
+        @current-change="handleCurrentChange"
130
+        :page-sizes="[10, 50, 100, 200, 500, 1000]"
131
+        :page-size="10"
132
+        background
133
+        align="right"
134
+        style="margin-top: 20px"
135
+        layout="total, sizes, prev, pager, next, jumper"
136
+        :total="total"
137
+      >
138
+      </el-pagination>
139
+    </div>
140
+  </div>
141
+</template>
142
+
143
+<script>
144
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
145
+export default {
146
+  components: {
147
+    BreadCrumb,
148
+  },
149
+  data() {
150
+    return {
151
+      crumbs: [
152
+        { path: false, name: "库房管理" },
153
+        { path: "/stock/warehousequery", name: "新增调拨" },
154
+      ],
155
+      value1: "",
156
+      total: 0,
157
+      page: 1,
158
+      limit: 10,
159
+      tableData: [{}, {}],
160
+      formInline: {
161
+        user: "",
162
+        region: "",
163
+      },
164
+      rules: {
165
+        region: [
166
+          { required: true, message: "请选择活动区域", trigger: "change" },
167
+        ],
168
+      },
169
+    };
170
+  },
171
+
172
+  methods: {
173
+    // 初始化数据
174
+    init() {},
175
+
176
+    // 反审核
177
+    approval() {},
178
+
179
+    // 审核
180
+    examine() {},
181
+
182
+    // 保存
183
+    save() {},
184
+
185
+    // 表单添加
186
+    toAdd() {},
187
+
188
+    // 删除
189
+    toDelete() {},
190
+
191
+    // 详情查看
192
+    toDetails() {},
193
+
194
+    // 表单全选
195
+    handleSelectionChange() {},
196
+
197
+    // 页表操作
198
+    handleSizeChange(val) {
199
+      this.limit = val;
200
+      this.init();
201
+    },
202
+    handleCurrentChange(val) {
203
+      this.page = val;
204
+      this.init();
205
+    },
206
+
207
+    // 表格样式
208
+    changColor({ rowIndex }) {
209
+      if (rowIndex % 2 == 1) {
210
+        return {
211
+          backgroundColor: "#C4E1FF",
212
+          color: "#303133",
213
+        };
214
+      } else {
215
+        return {
216
+          backgroundColor: "#ACD6FF",
217
+          color: "#303133",
218
+        };
219
+      }
220
+    },
221
+  },
222
+};
223
+</script>
224
+
225
+<style rel="stylesheet/css" lang="scss" scoped>
226
+</style>

+ 228 - 0
src/xt_pages/stock/inventoryTransfer/index.vue 查看文件

@@ -0,0 +1,228 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      <div>
6
+        <el-button type="warning" @click="approval">反审核</el-button>
7
+        <el-button type="warning" @click="examine">审核</el-button>
8
+        <el-button type="primary" @click="Add">新增</el-button>
9
+      </div>
10
+    </div>
11
+    <div class="app-container">
12
+      <div
13
+        style="
14
+          justify-content: flex-start;
15
+          margin: 0px 0 12px 0;
16
+          display: flex;
17
+          align-items: center;
18
+        "
19
+      >
20
+        <div>
21
+          <el-input
22
+            size="small"
23
+            style="width: 200px; margin-left: 10px"
24
+            class="filter-item"
25
+            v-model.trim="keywords"
26
+          />
27
+          <el-button
28
+            size="small"
29
+            class="filter-item"
30
+            type="primary"
31
+            icon="el-icon-search"
32
+            @click="search"
33
+            >查看</el-button
34
+          >
35
+        </div>
36
+        <div>
37
+          单据日期:
38
+          <el-date-picker v-model="value1" type="date" placeholder="选择日期">
39
+          </el-date-picker>
40
+          <el-button
41
+            size="small"
42
+            class="filter-item"
43
+            type="primary"
44
+            icon="el-icon-search"
45
+            @click="search"
46
+            >查看</el-button
47
+          >
48
+        </div>
49
+      </div>
50
+      <el-table
51
+        :row-style="changColor"
52
+        :header-cell-style="{
53
+          backgroundColor: 'rgb(245, 247, 250)',
54
+          color: '#606266',
55
+        }"
56
+        :data="tableData"
57
+        :class="signAndWeighBoxPatients"
58
+        border
59
+        @selection-change="handleSelectionChange"
60
+      >
61
+        >
62
+        <el-table-column type="selection" width="55"> </el-table-column>
63
+        <el-table-column label="单据编号" align="center">
64
+          <template slot-scope="scope">
65
+            <span>{{ scope.row.drug_name ? scope.row.drug_name : "" }}</span>
66
+          </template>
67
+        </el-table-column>
68
+        <el-table-column label="单据日期" align="center">
69
+          <template slot-scope="scope">
70
+            <span>{{ scope.row.drug_spec ? scope.row.drug_spec : "" }}</span>
71
+          </template>
72
+        </el-table-column>
73
+        <el-table-column label="商品名称" align="center">
74
+          <template slot-scope="scope">
75
+            <span>{{ scope.row.Count ? scope.row.Count : "" }}</span>
76
+          </template>
77
+        </el-table-column>
78
+        <el-table-column label="调出仓库" align="center">
79
+          <template slot-scope="scope">
80
+            <span>{{ scope.row.Count ? scope.row.Count : "" }}</span>
81
+          </template>
82
+        </el-table-column>
83
+        <el-table-column label="调入仓库" align="center">
84
+          <template slot-scope="scope">
85
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
86
+          </template>
87
+        </el-table-column>
88
+        <el-table-column label="制单人" align="center">
89
+          <template slot-scope="scope">
90
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
91
+          </template>
92
+        </el-table-column>
93
+        <el-table-column label="审核人" align="center">
94
+          <template slot-scope="scope">
95
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
96
+          </template>
97
+        </el-table-column>
98
+        <el-table-column label="审核时间" align="center">
99
+          <template slot-scope="scope">
100
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
101
+          </template>
102
+        </el-table-column>
103
+        <el-table-column label="操作" align="center" width="260px">
104
+          <template slot-scope="scope">
105
+            <el-tooltip class="item" content="编辑" placement="top-start">
106
+              <el-button
107
+                icon="el-icon-edit-outline"
108
+                size="small"
109
+                type="primary"
110
+                @click="toEdit(scope.row)"
111
+              >
112
+              </el-button>
113
+            </el-tooltip>
114
+
115
+            <el-tooltip class="item" content="删除" placement="top-start">
116
+              <el-button
117
+                icon="el-icon-delete"
118
+                size="small"
119
+                type="danger"
120
+                @click="toDelete(scope.row, scope.row.$index)"
121
+              >
122
+              </el-button>
123
+            </el-tooltip>
124
+
125
+            <el-tooltip class="item" content="详情" placement="top-start">
126
+              <el-button
127
+                icon="el-icon-view"
128
+                size="small"
129
+                type="primary"
130
+                @click="toDetails(scope.row, scope.row.$index)"
131
+              >
132
+              </el-button>
133
+            </el-tooltip>
134
+          </template>
135
+        </el-table-column>
136
+      </el-table>
137
+      <el-pagination
138
+        @size-change="handleSizeChange"
139
+        @current-change="handleCurrentChange"
140
+        :page-sizes="[10, 50, 100, 200, 500, 1000]"
141
+        :page-size="10"
142
+        background
143
+        align="right"
144
+        style="margin-top: 20px"
145
+        layout="total, sizes, prev, pager, next, jumper"
146
+        :total="total"
147
+      >
148
+      </el-pagination>
149
+    </div>
150
+  </div>
151
+</template>
152
+
153
+<script>
154
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
155
+export default {
156
+  components: {
157
+    BreadCrumb,
158
+  },
159
+  data() {
160
+    return {
161
+      crumbs: [
162
+        { path: false, name: "库房管理" },
163
+        { path: "/stock/warehousequery", name: "库存调拨" },
164
+      ],
165
+      value1: "",
166
+      total: 0,
167
+      page: 1,
168
+      limit: 10,
169
+      tableData: [{}, {}],
170
+    };
171
+  },
172
+
173
+  methods: {
174
+    // 初始化数据
175
+    init() {},
176
+
177
+    // 反审核
178
+    approval() {},
179
+
180
+    // 审核
181
+    examine() {},
182
+
183
+    // 添加
184
+    Add() {
185
+        this.$router.push({path:"/stock/inventoryTransfer/Addtrans"})
186
+    },
187
+
188
+    // 删除
189
+    toDelete() {},
190
+
191
+    // 详情查看
192
+    toDetails() {
193
+        this.$router.push({path:"/stock/inventoryTransfer/transDetails"})
194
+    },
195
+
196
+    // 表单全选
197
+    handleSelectionChange() {},
198
+
199
+    // 页表操作
200
+    handleSizeChange(val) {
201
+      this.limit = val;
202
+      this.init();
203
+    },
204
+    handleCurrentChange(val) {
205
+      this.page = val;
206
+      this.init();
207
+    },
208
+
209
+    // 表格样式
210
+    changColor({ rowIndex }) {
211
+      if (rowIndex % 2 == 1) {
212
+        return {
213
+          backgroundColor: "#C4E1FF",
214
+          color: "#303133",
215
+        };
216
+      } else {
217
+        return {
218
+          backgroundColor: "#ACD6FF",
219
+          color: "#303133",
220
+        };
221
+      }
222
+    },
223
+  },
224
+};
225
+</script>
226
+
227
+<style rel="stylesheet/css" lang="scss" scoped>
228
+</style>

+ 176 - 0
src/xt_pages/stock/inventoryTransfer/transDetails.vue 查看文件

@@ -0,0 +1,176 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+    </div>
6
+    <div class="app-container">
7
+      <el-table
8
+        :row-style="changColor"
9
+        :header-cell-style="{
10
+          backgroundColor: 'rgb(245, 247, 250)',
11
+          color: '#606266',
12
+        }"
13
+        :data="tableData"
14
+        :class="signAndWeighBoxPatients"
15
+        border
16
+      >
17
+        >
18
+        <el-table-column align="center">
19
+          <template slot="header" slot-scope="scope">
20
+            商品名称<span style="color: red">*</span>
21
+          </template>
22
+          <template slot-scope="scope">
23
+            <span>{{ scope.row.Count ? scope.row.Count : "" }}</span>
24
+          </template>
25
+        </el-table-column>
26
+        <el-table-column label="商品类型" align="center">
27
+          <template slot-scope="scope">
28
+            <span>{{ scope.row.Count ? scope.row.Count : "" }}</span>
29
+          </template>
30
+        </el-table-column>
31
+        <el-table-column label="规格&&单位" align="center">
32
+          <template slot-scope="scope">
33
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
34
+          </template>
35
+        </el-table-column>
36
+        <el-table-column label="调拨数量" align="center">
37
+          <template slot-scope="scope">
38
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
39
+          </template>
40
+        </el-table-column>
41
+        <el-table-column label="调出仓库" align="center">
42
+          <template slot-scope="scope">
43
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
44
+          </template>
45
+        </el-table-column>
46
+        <el-table-column label="调入仓库" align="center">
47
+          <template slot-scope="scope">
48
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
49
+          </template>
50
+        </el-table-column>
51
+        <el-table-column label="库存总数" align="center">
52
+          <template slot-scope="scope">
53
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
54
+          </template>
55
+        </el-table-column>
56
+        <el-table-column label="制单人" align="center">
57
+          <template slot-scope="scope">
58
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
59
+          </template>
60
+        </el-table-column>
61
+        <el-table-column label="审核人" align="center">
62
+          <template slot-scope="scope">
63
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
64
+          </template>
65
+        </el-table-column>
66
+        <el-table-column label="审核时间" align="center">
67
+          <template slot-scope="scope">
68
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
69
+          </template>
70
+        </el-table-column>
71
+        <el-table-column label="备注" align="center">
72
+          <template slot-scope="scope">
73
+            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
74
+          </template>
75
+        </el-table-column>
76
+      </el-table>
77
+      <el-pagination
78
+        @size-change="handleSizeChange"
79
+        @current-change="handleCurrentChange"
80
+        :page-sizes="[10, 50, 100, 200, 500, 1000]"
81
+        :page-size="10"
82
+        background
83
+        align="right"
84
+        style="margin-top: 20px"
85
+        layout="total, sizes, prev, pager, next, jumper"
86
+        :total="total"
87
+      >
88
+      </el-pagination>
89
+    </div>
90
+  </div>
91
+</template>
92
+
93
+<script>
94
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
95
+export default {
96
+  components: {
97
+    BreadCrumb,
98
+  },
99
+  data() {
100
+    return {
101
+      crumbs: [
102
+        { path: false, name: "库房管理" },
103
+        { path: "/stock/warehousequery", name: "调拨详情" },
104
+      ],
105
+      value1: "",
106
+      total: 0,
107
+      page: 1,
108
+      limit: 10,
109
+      tableData: [{}, {}],
110
+      formInline: {
111
+        user: "",
112
+        region: "",
113
+      },
114
+      rules: {
115
+        region: [
116
+          { required: true, message: "请选择活动区域", trigger: "change" },
117
+        ],
118
+      },
119
+    };
120
+  },
121
+
122
+  methods: {
123
+    // 初始化数据
124
+    init() {},
125
+
126
+    // 反审核
127
+    approval() {},
128
+
129
+    // 审核
130
+    examine() {},
131
+
132
+    // 保存
133
+    save() {},
134
+
135
+    // 表单添加
136
+    toAdd() {},
137
+
138
+    // 删除
139
+    toDelete() {},
140
+
141
+    // 详情查看
142
+    toDetails() {},
143
+
144
+    // 表单全选
145
+    handleSelectionChange() {},
146
+
147
+    // 页表操作
148
+    handleSizeChange(val) {
149
+      this.limit = val;
150
+      this.init();
151
+    },
152
+    handleCurrentChange(val) {
153
+      this.page = val;
154
+      this.init();
155
+    },
156
+
157
+    // 表格样式
158
+    changColor({ rowIndex }) {
159
+      if (rowIndex % 2 == 1) {
160
+        return {
161
+          backgroundColor: "#C4E1FF",
162
+          color: "#303133",
163
+        };
164
+      } else {
165
+        return {
166
+          backgroundColor: "#ACD6FF",
167
+          color: "#303133",
168
+        };
169
+      }
170
+    },
171
+  },
172
+};
173
+</script>
174
+
175
+<style rel="stylesheet/css" lang="scss" scoped>
176
+</style>

+ 821 - 0
src/xt_pages/stock/inventoryTransfer/transEdit.vue 查看文件

@@ -0,0 +1,821 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      <div>
6
+        <el-button type="primary" @click="submit">保存</el-button>
7
+        <el-button type="warning" @click="examine" v-if="is_check == 2">审核</el-button>
8
+        <el-button type="warning" @click="approval" v-if="is_check == 1">反审核</el-button>
9
+      </div>
10
+    </div>
11
+    <div class="app-container" v-loading="loading">
12
+      <div
13
+        style="
14
+          justify-content: flex-start;
15
+          margin: 0px 0 12px 0;
16
+          display: flex;
17
+          align-items: center;
18
+        "
19
+      >
20
+        <el-form
21
+          :inline="true"
22
+          :model="formInline"
23
+          class="demo-form-inline"
24
+        >
25
+          <el-form-item label="单据日期:">
26
+            <el-date-picker
27
+              :disabled="store_disabled"
28
+              v-model="warehousing_time"
29
+              type="date"
30
+              format="yyyy-MM-dd"
31
+              value-format="yyyy-MM-dd"
32
+              placeholder="选择日期"
33
+            ></el-date-picker>
34
+          </el-form-item>
35
+          <span><span style="color:red">*</span>调出仓库:</span>
36
+          <el-form-item  prop="storehouse_out_id">
37
+              <el-select size="small" v-model="storehouse_out_id" filterable placeholder="请选择调出仓库"  :disabled="store_disabled"  @change="changeHouseList">
38
+                <el-option
39
+                  v-for="(option, index) in houseList"
40
+                  :key="index"
41
+                  :label="option.storehouse_name"
42
+                  :value="option.id">
43
+                </el-option>
44
+              </el-select>
45
+          </el-form-item>
46
+          <span><span style="color:red">*</span>调入仓库:</span>
47
+          <el-form-item prop="storehouse_in_id">
48
+            <el-select size="small" v-model="storehouse_in_id" filterable placeholder="请选择调入仓库"  :disabled="store_disabled">
49
+            <el-option
50
+              v-for="(option, index) in houseList"
51
+              :key="index"
52
+              :label="option.storehouse_name"
53
+              :value="option.id">
54
+            </el-option>
55
+           </el-select>
56
+          </el-form-item>
57
+        </el-form>
58
+      </div>
59
+     <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
60
+      <el-table
61
+        :row-style="changColor"
62
+        :header-cell-style="{
63
+          backgroundColor: 'rgb(245, 247, 250)',
64
+          color: '#606266',
65
+        }"
66
+        :data="recordInfo.recordData"
67
+        border
68
+       
69
+      >
70
+      >
71
+    
72
+        <el-table-column align="center"  width="230">
73
+          <template slot="header" slot-scope="scope" >
74
+            商品名称<span style="color:red;">*</span>
75
+          </template>
76
+          <template slot-scope="scope">
77
+           <el-form-item
78
+                :prop="'recordData.' + scope.$index + '.name'"
79
+                :rules="tableRules.name"
80
+              >
81
+                <el-select
82
+                  v-model="scope.row.name"
83
+                  style="width:200"
84
+                  filterable
85
+                  placeholder="请选择商品"
86
+                  @change="changeName"
87
+                  @input="changeGoodName(scope.$index)"
88
+                  :disabled="store_disabled"
89
+                >
90
+                  <el-option
91
+                    v-for="(item, index) in tabList"
92
+                    :key="index"
93
+                    :label="item.project_name"
94
+                    :value="item"
95
+                  >
96
+                  </el-option>
97
+                </el-select>
98
+              </el-form-item>
99
+          </template>
100
+        </el-table-column>
101
+        <el-table-column align="center"  width="200">
102
+          <template slot="header" slot-scope="scope">
103
+              <span>商品类型<span style="color: red">*</span></span>
104
+            </template>
105
+     
106
+            <template slot-scope="scope">
107
+              <el-form-item style="padding-top: 20px;">
108
+                <el-input v-model="scope.row.project_type" :disabled="true" style="width:180px"></el-input>
109
+              </el-form-item>
110
+            </template>
111
+        </el-table-column>
112
+        <el-table-column  align="center" width="250">
113
+         <template slot="header" slot-scope="scope" >
114
+              <span>规格<span style="color: red">*</span></span>
115
+            </template>
116
+            <template slot-scope="scope">
117
+
118
+              <el-form-item style="padding-top: 20px">
119
+                 <el-input v-model="scope.row.second_specification_name" style="width:200px" :disabled="true"></el-input>
120
+              </el-form-item>
121
+
122
+            </template>
123
+        </el-table-column>
124
+        <el-table-column  align="center" width="250">
125
+             <template slot="header" slot-scope="scope">
126
+              <span>调拨数量<span style="color: red">*</span></span>
127
+            </template>
128
+            <template slot-scope="scope">
129
+              <el-form-item style="padding-top: 20px" :prop="'recordData.' + scope.$index + '.count'"
130
+                            :rules='tableRules.count' >
131
+                <el-input v-model="scope.row.count" style="width:100px"  :disabled="store_disabled"  @input="selectCount(scope.row.project_id,scope.row.sencond_unit,scope.row.is_source,scope.row.count,scope.$index)"></el-input>
132
+                <el-select
133
+                 :disabled="store_disabled"
134
+                  v-model="scope.row.sencond_unit"
135
+                  style="width: 100px"
136
+                  filterable
137
+                  placeholder="请选择"
138
+                >
139
+                  <el-option
140
+                    v-for="(item, index) in scope.row.unitList"
141
+                    :key="index"
142
+                    :label="item.name"
143
+                    :value="item.name"
144
+                  >
145
+                  </el-option>
146
+                </el-select>
147
+              </el-form-item>
148
+            </template>
149
+        </el-table-column>
150
+        <el-table-column label="库存总数" align="center" width="200">
151
+           <template slot="header" slot-scope="scope">
152
+              <span>库存总数<span style="color: red">*</span></span>
153
+            </template>
154
+            <template slot-scope="scope">
155
+              <el-form-item  style="padding-top: 20px">
156
+                <el-input v-model="scope.row.second_total" style="width:150px" :disabled="true"></el-input>
157
+              </el-form-item>
158
+            </template>
159
+         </el-table-column>
160
+      
161
+        <el-table-column label="备注" align="center" width="200">
162
+          <template slot-scope="scope">
163
+            <el-input v-model="scope.row.remake" style="width:160px"  :disabled="store_disabled"></el-input>
164
+          </template>
165
+        </el-table-column>
166
+
167
+        <el-table-column label="操作" align="center" width="190px">
168
+          <template slot-scope="scope">
169
+            <el-tooltip class="item" content="新增" placement="top-start">
170
+              <el-button
171
+                icon="el-icon-plus"
172
+                size="small"
173
+                type="primary"
174
+                @click="toAdd(scope.row)"
175
+              >
176
+              </el-button>
177
+            </el-tooltip>
178
+
179
+            <el-tooltip class="item" content="删除" placement="top-start">
180
+              <el-button
181
+                icon="el-icon-delete"
182
+                size="small"
183
+                type="danger"
184
+                @click="toDelete(scope.row, scope.$index)"
185
+              >
186
+              </el-button>
187
+            </el-tooltip>
188
+          </template>
189
+        </el-table-column>
190
+      </el-table>
191
+    </el-form>
192
+    </div>
193
+  </div>
194
+</template>
195
+
196
+<script>
197
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
198
+import { uParseTime } from '@/utils/tools'
199
+import {getSencondeGoodList,updateSencondOrder,getSencondOrderDetail,returnCheckSecondOrder,getSumSecondeCount,checkSecondOrder,getStoreHouseGoodList,deleteSecondeOrderInfo} from '@/api/seconde'
200
+export default {
201
+  components: {
202
+    BreadCrumb,
203
+  },
204
+  data() {
205
+    return {
206
+      crumbs: [
207
+        { path: false, name: "库房管理" },
208
+        { path: "/stock/warehousequery", name: "编辑调拨" },
209
+      ],
210
+      value1: "",
211
+      total: 0,
212
+      page: 1,
213
+      limit: 10,
214
+      tableData: [{}, {}],
215
+      formInline: {
216
+        user: "",
217
+        region: "",
218
+      },
219
+      currentIndex: 0,
220
+      tableRules: {
221
+          name: [
222
+            { required: true, message: '商品名称不能为空', trigger: 'blur' }
223
+          ],
224
+          count: [
225
+            { required: true, message: '调拨数量不能为空', trigger: 'blur' }
226
+          ],
227
+        },
228
+        goodType: [],
229
+        manufacturerList:[],
230
+        goodList:[],
231
+        loading:false,
232
+        list:[],
233
+        configlist:{},
234
+        recordInfo: {
235
+          recordData: [],
236
+        },
237
+        drugList:[],
238
+        goodTypeList:[],
239
+        drugTypeList:[],
240
+        houseList:[],
241
+        tabList:[],
242
+        disabled:false,
243
+        storehouse_out_id:"",
244
+        storehouse_in_id:"",
245
+        is_check:0,
246
+        store_disabled:false,
247
+        loading:false,
248
+        warehousing_time:"",
249
+    };
250
+  },
251
+
252
+  methods: {
253
+    // 初始化数据
254
+    init() {},
255
+
256
+    // 反审核
257
+      
258
+    // 反审核
259
+    approval() {
260
+      this.loading = true
261
+      var id = this.$route.query.id
262
+      var array = []
263
+      array.push(id)
264
+      var ids = array.join(",")
265
+      returnCheckSecondOrder(ids).then(response=>{
266
+         if(response.data.state == 1){
267
+          this.loading = false
268
+          var msg = response.data.data.msg
269
+          if(msg == 0){
270
+            this.$message.success("反审核失败!")
271
+            this.getlist()
272
+          }
273
+          if(msg == 1){
274
+            this.$message.success("反审核成功!")
275
+            this.getlist()
276
+          }
277
+          if(msg == 2){
278
+            var good_name = response.data.data.good_name
279
+            var specification_name = response.data.data.specification_name
280
+            var storehose_name = response.data.data.storehose_name
281
+
282
+            this.$message.error(storehose_name + " "+good_name+"*"+specification_name+"库存不足,无法调拨,请修改调拨数量!")
283
+          }
284
+          if(msg == 3){
285
+            var drug_name =  response.data.data.drug_name
286
+            var dose = response.data.data.dose
287
+            var dose_unit = response.data.data.dose_unit
288
+            var min_number = response.data.data.min_number
289
+            var min_unit =  response.data.data.min_unit
290
+            var max_unit =  response.data.data.max_unit
291
+            var str = drug_name + " " + dose + dose_unit + "*" + min_number + min_unit+"/"+max_unit
292
+            var storehose_name = response.data.data.storehose_name
293
+            this.$message.error(storehose_name +" "+str +"库存不足,无法调拨,请修改调拨数量!")
294
+
295
+          }
296
+         }
297
+      })
298
+
299
+    },
300
+    // 审核
301
+    examine() {
302
+      this.loading= true
303
+      var array = []
304
+      var id = parseInt(this.$route.query.id)
305
+      array.push(id)
306
+      var ids = array.join(",")
307
+      console.log("ids233232232332",array)
308
+      checkSecondOrder(ids).then(response=>{
309
+        if(response.data.state == 1){
310
+          var msg = response.data.data.msg
311
+          this.loading = false
312
+          if(msg == 1){
313
+            this.$message.success("审核成功!")
314
+            this.$router.push({path:"/stock/inventoryTransfer"})
315
+          }
316
+          if(msg == 2){
317
+            var good_name = response.data.data.good_name
318
+            var specification_name = response.data.data.specification_name
319
+            var storehose_name = response.data.data.storehose_name
320
+
321
+            this.$message.error(storehose_name + " "+good_name+"*"+specification_name+"库存不足,无法调拨,请修改调拨数量!")
322
+          }
323
+          if(msg == 3){
324
+            var drug_name =  response.data.data.drug_name
325
+            var dose = response.data.data.dose
326
+            var dose_unit = response.data.data.dose_unit
327
+            var min_number = response.data.data.min_number
328
+            var min_unit =  response.data.data.min_unit
329
+            var max_unit =  response.data.data.max_unit
330
+            var str = drug_name + " " + dose + dose_unit + "*" + min_number + min_unit+"/"+max_unit
331
+            var storehose_name = response.data.data.storehose_name
332
+            this.$message.error(storehose_name +" "+str +"库存不足,无法调拨,请修改调拨数量!")
333
+
334
+          }
335
+
336
+        }
337
+      })
338
+    },
339
+
340
+    // 表单添加
341
+    toAdd() {
342
+      if(this.is_check == 1){
343
+       this.$message.error("已审核的数据不能新增!")
344
+       return 
345
+      }
346
+      const tempObj = {}
347
+      tempObj["id"] = 0
348
+      tempObj["name"] = "";
349
+      tempObj['project_name'] = ""
350
+      tempObj['project_type'] = ""
351
+      tempObj['second_specification_name'] = ''
352
+      tempObj['sencond_unit'] = ''
353
+      tempObj['count'] = ''
354
+      tempObj['second_total'] = ''
355
+      tempObj["is_source"] = 0
356
+      tempObj["remake"] = ''
357
+      tempObj["project_id"] = 0
358
+      tempObj["min_price"] = 0
359
+      this.recordInfo.recordData.push(tempObj)
360
+    },
361
+
362
+    // 删除
363
+    toDelete(val,index) {
364
+      if(this.is_check == 1){
365
+        this.$message.error("已审核的数据不能删除!")
366
+        return 
367
+      }
368
+      if (this.recordInfo.recordData.length <= 1) {
369
+        this.$message.error('只有一条记录的时候无法删除')
370
+        return
371
+      }
372
+      this.$confirm("确认删除吗?", "删除", {
373
+        confirmButtonText: "确 定",
374
+        cancelButtonText: "取 消",
375
+        type: "warning",
376
+      }).then(() => {
377
+        deleteSecondeOrderInfo(val.id).then((response) => {
378
+            if (response.data.state == 1) {
379
+              var msg = response.data.data.msg;
380
+              this.$message.success("删除成功");
381
+              this.recordInfo.recordData.splice(index, 1)
382
+            } else {
383
+              this.$message.error("删除失败");
384
+            }
385
+          });
386
+        }).catch(() => {});
387
+    },
388
+
389
+    // 详情查看
390
+    toDetails() {},
391
+
392
+    // 表单全选
393
+    handleSelectionChange() {},
394
+
395
+    // 页表操作
396
+    handleSizeChange(val) {
397
+      this.limit = val;
398
+      this.init();
399
+    },
400
+    handleCurrentChange(val) {
401
+      this.page = val;
402
+      this.init();
403
+    },
404
+
405
+    // 表格样式
406
+    changColor({ rowIndex }) {
407
+      if (rowIndex % 2 == 1) {
408
+        return {
409
+          backgroundColor: "#C4E1FF",
410
+          color: "#303133",
411
+        };
412
+      } else {
413
+        return {
414
+          backgroundColor: "#ACD6FF",
415
+          color: "#303133",
416
+        };
417
+      }
418
+    },
419
+    //获取基本数据信息
420
+    getlist(){
421
+      getSencondeGoodList().then(response=>{
422
+        if(response.data.state == 1){
423
+         
424
+          var houseList =  response.data.data.houseList
425
+          this.houseList = houseList
426
+
427
+        }
428
+      })
429
+    },
430
+    getTime(val, temp) {
431
+      if (val != 0) {
432
+        return uParseTime(val, temp)
433
+      } else {
434
+        return ''
435
+      }
436
+    },
437
+    changeGoodName(val) {
438
+      this.currentIndex = val;
439
+    },
440
+    changeName(val) {
441
+      for (let i = 0; i < this.recordInfo.recordData.length; i++) {
442
+        if (this.currentIndex == i) {
443
+          this.recordInfo.recordData[i].project_id = val.id;
444
+          this.recordInfo.recordData[i].is_source = val.is_source;
445
+          this.recordInfo.recordData[i].name = val.name;
446
+          this.recordInfo.recordData[i].project_name = val.project_name;
447
+          this.recordInfo.recordData[i].project_type = val.project_type;
448
+          this.recordInfo.recordData[i].second_specification_name = val.second_specification_name;
449
+          this.recordInfo.recordData[i].second_total = val.second_total;
450
+          this.recordInfo.recordData[i].sencond_unit = val.sencond_unit
451
+          this.recordInfo.recordData[i].min_price = val.min_price
452
+          if (val.count == NaN) {
453
+            this.recordInfo.recordData[i].count = "";
454
+          } else {
455
+            this.recordInfo.recordData[i].count = val.count? val.count : "";
456
+          }
457
+          this.recordInfo.recordData[i].unitList = val.unitList;
458
+        }
459
+      }
460
+    },
461
+    getWarehoseInfo(arr, max_unit, min_unit, min_number) {
462
+        var total = 0;
463
+        var max_str = "";
464
+        var min_str = "";
465
+        if (arr.length > 0) {
466
+            for (let i = 0; i < arr.length; i++) {
467
+            total += parseInt(arr[i].stock_max_number + arr[i].stock_min_number);
468
+            }
469
+        }
470
+        if (total < min_number) {
471
+            min_str = total + min_unit;
472
+        }
473
+        if (total == 0) {
474
+            min_str = "";
475
+            max_str = "";
476
+        }
477
+        if (total >= min_number) {
478
+            if (parseInt(total / min_number) != 0) {
479
+            max_str = parseInt(total / min_number) + max_unit;
480
+            }
481
+            if (total % min_number != 0) {
482
+            min_str = (total % min_number) + min_unit;
483
+            }
484
+        }
485
+        return max_str + min_str;
486
+      },
487
+      getTotalStockCount(arr) {
488
+        var total_count = 0;
489
+        for (let i = 0; i < arr.length; i++) {
490
+            total_count += arr[i].stock_count;
491
+        }
492
+        return total_count;
493
+      },
494
+    getSencondOrderDetail(){
495
+       var id = parseInt(this.$route.query.id)
496
+      getSencondOrderDetail(id).then(response=>{
497
+         if(response.data.state == 1){
498
+           var warehouse = response.data.data.warehouse
499
+           this.storehouse_in_id = warehouse.storehouse_in_id
500
+           this.storehouse_out_id = warehouse.storehouse_out_id
501
+           this.is_check = warehouse.is_check
502
+
503
+           if(warehouse.is_check == 1){
504
+             this.store_disabled = true
505
+           }
506
+           if(warehouse.is_check == 2){
507
+             this.store_disabled = false
508
+           }
509
+           var list = response.data.data.list
510
+           for(let i=0;i<list.length;i++){
511
+              list[i].id = list[i].id
512
+              list[i].name = list[i].project_name
513
+           }
514
+           this.recordInfo.recordData = list
515
+          this.warehousing_time = this.getTime(warehouse.record_date,"{y}-{m}-{d}")
516
+          var drugList = response.data.data.drugList
517
+          this.drugList= drugList
518
+          var goodList = response.data.data.goodList
519
+          this.goodList = goodList
520
+          var manufactuerList = response.data.data.manufacturerList
521
+          console.log("manufactuerList233232",manufactuerList)
522
+          var goodTypeList = response.data.data.goodTypeList
523
+          this.goodTypeList = goodTypeList
524
+          var drugTypeList = response.data.data.drugTypeList
525
+          this.drugTypeList = drugTypeList
526
+
527
+          for(let i=0;i<drugList.length;i++){
528
+            for (let j = 0; j < manufactuerList.length; j++) {
529
+              if (drugList[i].manufacturer == manufactuerList[j].id) {
530
+                drugList[i].manufacturer = manufactuerList[j].manufacturer_name;
531
+              }
532
+            }
533
+            for (let z = 0; z < drugList[i].drug_warehouse_info.length; z++) {
534
+              if (drugList[i].max_unit ==drugList[i].drug_warehouse_info[z].max_unit) {
535
+                  drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number *drugList[i].min_number;
536
+              }
537
+              }
538
+              for (let y = 0; y < this.drugTypeList.length; y++) {
539
+                if (drugList[i].drug_type == this.drugTypeList[y].value) {
540
+                    drugList[i].drug_type = this.drugTypeList[y].name;
541
+                  }
542
+              }
543
+              drugList[i].name =drugList[i].drug_name 
544
+              drugList[i].project_name =drugList[i].drug_name + " " +drugList[i].dose + drugList[i].dose_unit + "*" +drugList[i].min_number +drugList[i].min_unit + "/" + drugList[i].max_unit + " " +drugList[i].manufacturer;
545
+              drugList[i].project_type = drugList[i].drug_type;
546
+              drugList[i].second_specification_name = drugList[i].dose + drugList[i].dose_unit +"*" + drugList[i].min_number +drugList[i].min_unit +"/" + drugList[i].max_unit;
547
+              drugList[i].second_total = this.getWarehoseInfo(drugList[i].drug_warehouse_info,drugList[i].max_unit,drugList[i].min_unit,drugList[i].min_number);
548
+              drugList[i].is_source = 1
549
+              drugList[i].count = ""
550
+              drugList[i].remake = ""
551
+              drugList[i].min_price = drugList[i].min_price
552
+            if (drugList[i].max_unit != drugList[i].min_unit) {
553
+              drugList[i].unitList = [
554
+                  { id: 1, name: "" },
555
+                  { id: 2, name: "" },
556
+              ];
557
+            }
558
+            if (drugList[i].max_unit == drugList[i].min_unit) {
559
+                drugList[i].unitList = [{ id: 1, name: "" }];
560
+            }
561
+
562
+           drugList[i].sencond_unit = drugList[i].max_unit;
563
+            for (let j = 0; j < drugList[i].unitList.length; j++) {
564
+              if (drugList[i].max_unit != drugList[i].min_unit) {
565
+                drugList[i].unitList[0].name = drugList[i].max_unit;
566
+                drugList[i].unitList[1].name = drugList[i].min_unit;
567
+              }
568
+              if (drugList[i].max_unit == drugList[i].min_unit) {
569
+                drugList[i].unitList[0].name = drugList[i].max_unit;
570
+              }
571
+            }
572
+          this.tabList.push(drugList[i]);
573
+          }
574
+
575
+            for (let i = 0; i < goodList.length; i++) {
576
+              for (let j = 0; j < manufactuerList.length; j++) {
577
+                if (goodList[i].manufacturer == manufactuerList[j].id) {
578
+                    goodList[i].manufacturer = manufactuerList[j].manufacturer_name;
579
+                }
580
+              }
581
+              for (let y = 0; y < this.goodTypeList.length; y++) {
582
+                if (goodList[i].good_type_id == this.goodTypeList[y].id) {
583
+                  goodList[i].good_type_id = this.goodTypeList[y].type_name;
584
+                }
585
+              }
586
+              goodList[i].name = goodList[i].good_name
587
+              goodList[i].project_name = goodList[i].good_name + " " + goodList[i].specification_name + " " + goodList[i].manufacturer;
588
+              goodList[i].project_type = goodList[i].good_type_id;
589
+              goodList[i].second_specification_name = goodList[i].specification_name;
590
+              goodList[i].second_total = this.getTotalStockCount(
591
+                goodList[i].good_warehouse_info
592
+              );
593
+              goodList[i].count = ""
594
+              goodList[i].is_source = 2;
595
+              goodList[i].name = goodList[i].good_name;
596
+              goodList[i].unitList = [{ id: 1, name: "" }];
597
+              goodList[i].sencond_unit = goodList[i].packing_unit;
598
+              goodList[i].remake = ""
599
+              goodList[i].min_price = goodList[i].retail_price
600
+              for (let j = 0; j < goodList[i].unitList.length; j++) {
601
+                goodList[i].unitList[0].name = goodList[i].packing_unit;
602
+              }
603
+              this.tabList.push(goodList[i]);
604
+            }
605
+         }
606
+      })   
607
+    },
608
+    submit() {
609
+        this.$refs['tableForm'].validate((valid) => {
610
+          if (valid) {
611
+            const loading = this.$loading({
612
+              lock: true,
613
+              text: 'Loading',
614
+              spinner: 'el-icon-loading',
615
+              background: 'rgba(0, 0, 0, 0.7)'
616
+            })
617
+            this.loading = true
618
+            const array = this.recordInfo.recordData
619
+            if(this.storehouse_in_id <=0){
620
+              this.$message.error("调入仓库不能为空!")
621
+              this.loading = false
622
+              loading.close()
623
+              return
624
+            }
625
+            if(this.storehouse_out_id <=0){
626
+              this.$message.error("调出仓库不能为空!")
627
+              this.loading = false
628
+              loading.close()
629
+              return
630
+            }
631
+            for (let i = 0; i < array.length; i++) {
632
+              array[i].count = parseInt(array[i].count)
633
+              array[i].second_total = array[i].second_total.toString()
634
+            }
635
+
636
+            const params = {
637
+              'stockIn': this.recordInfo.recordData
638
+            }
639
+            var storehouse_in_id = parseInt(this.storehouse_in_id)
640
+            var storehouse_out_id = parseInt(this.storehouse_out_id)
641
+            var id = parseInt(this.$route.query.id)
642
+            var warehouse_time =  this.warehousing_time
643
+            
644
+            updateSencondOrder(params,warehouse_time,storehouse_in_id,storehouse_out_id,id).then(response => {
645
+              if (response.data.state == 1) {
646
+                var warehousingInfo = response.data.data.warehousingInfo   
647
+                this.$message.success('保存成功')
648
+                this.loading = false 
649
+                loading.close()
650
+                this.$router.push({path:"/stock/inventoryTransfer"})
651
+              } else {
652
+                this.$message.error("保存失败")
653
+                loading.close()
654
+                this.loading = false
655
+              }
656
+            })
657
+          } else {
658
+            return false
659
+          }
660
+        })
661
+      },
662
+    selectCount(project_id,sencond_unit,is_source,count,index){
663
+      var params = {
664
+        project_id:project_id,
665
+        sencond_unit:sencond_unit,
666
+        is_source:parseInt(is_source),
667
+        count:parseInt(count),
668
+        storehouse_out_id:this.storehouse_out_id
669
+      }
670
+      console.log("params23323232",params)
671
+      getSumSecondeCount(params).then(response=>{
672
+         if(response.data.state == 1){
673
+           var msg = response.data.data.msg
674
+           if(msg == 2){
675
+             this.$message.error("调拨数量不能大于库存总量!")
676
+             for(let i=0;i<this.recordInfo.recordData.length;i++){
677
+               if(index == i){
678
+                 this.recordInfo.recordData[i].count = ""
679
+               }
680
+             }
681
+           }
682
+         }
683
+      })
684
+
685
+    },
686
+
687
+     changeHouseList(){
688
+         var params = {
689
+           storehouse_out_id:this.storehouse_out_id,
690
+         }
691
+        console.log("para323232233223",params)
692
+        getStoreHouseGoodList(params).then(response=>{
693
+          var drugList = response.data.data.drugList
694
+          this.drugList = []
695
+          this.drugList= drugList
696
+          var goodList = response.data.data.goodList
697
+          this.goodList = []
698
+          this.goodList = goodList
699
+          var goodTypeList = response.data.data.goodTypeList
700
+          this.goodTypeList = []
701
+          this.goodTypeList = goodTypeList
702
+          var drugTypeList = response.data.data.drugTypeList
703
+          this.drugTypeList = []
704
+          this.drugTypeList = drugTypeList
705
+          this.tabList = []
706
+          var manufactuerList = response.data.data.manufacturerList
707
+          console.log("manufactuerList23323232",manufactuerList)
708
+          for(let i=0;i<drugList.length;i++){
709
+             for (let j = 0; j < manufactuerList.length; j++) {
710
+                if (drugList[i].manufacturer == manufactuerList[j].id) {
711
+                  drugList[i].manufacturer = manufactuerList[j].manufacturer_name;
712
+                }
713
+              }
714
+            for (let z = 0; z < drugList[i].drug_warehouse_info.length; z++) {
715
+              if (drugList[i].max_unit ==drugList[i].drug_warehouse_info[z].max_unit) {
716
+                  drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number *drugList[i].min_number;
717
+              }
718
+              }
719
+              for (let y = 0; y < this.drugTypeList.length; y++) {
720
+                if (drugList[i].drug_type == this.drugTypeList[y].value) {
721
+                    drugList[i].drug_type = this.drugTypeList[y].name;
722
+                  }
723
+              }
724
+              drugList[i].name =drugList[i].drug_name 
725
+              drugList[i].project_name =drugList[i].drug_name + " " +drugList[i].dose + drugList[i].dose_unit + "*" +drugList[i].min_number +drugList[i].min_unit + "/" + drugList[i].max_unit + " " +drugList[i].manufacturer;
726
+              drugList[i].project_type = drugList[i].drug_type;
727
+              drugList[i].second_specification_name = drugList[i].dose + drugList[i].dose_unit +"*" + drugList[i].min_number +drugList[i].min_unit +"/" + drugList[i].max_unit;
728
+              drugList[i].second_total = this.getWarehoseInfo(drugList[i].drug_warehouse_info,drugList[i].max_unit,drugList[i].min_unit,drugList[i].min_number);
729
+              drugList[i].is_source = 1
730
+              drugList[i].count = ""
731
+              drugList[i].remake = ""
732
+              drugList[i].min_price = drugList[i].min_price
733
+            if (drugList[i].max_unit != drugList[i].min_unit) {
734
+              drugList[i].unitList = [
735
+                  { id: 1, name: "" },
736
+                  { id: 2, name: "" },
737
+              ];
738
+            }
739
+          if (drugList[i].max_unit == drugList[i].min_unit) {
740
+              drugList[i].unitList = [{ id: 1, name: "" }];
741
+          }
742
+
743
+          drugList[i].sencond_unit = drugList[i].max_unit;
744
+          for (let j = 0; j < drugList[i].unitList.length; j++) {
745
+            if (drugList[i].max_unit != drugList[i].min_unit) {
746
+              drugList[i].unitList[0].name = drugList[i].max_unit;
747
+              drugList[i].unitList[1].name = drugList[i].min_unit;
748
+            }
749
+            if (drugList[i].max_unit == drugList[i].min_unit) {
750
+              drugList[i].unitList[0].name = drugList[i].max_unit;
751
+            }
752
+          }
753
+          this.tabList.push(drugList[i]);
754
+          }
755
+
756
+        for (let i = 0; i < goodList.length; i++) {
757
+          for (let j = 0; j < manufactuerList.length; j++) {
758
+            if (goodList[i].manufacturer == manufactuerList[j].id) {
759
+                goodList[i].manufacturer = manufactuerList[j].manufacturer_name;
760
+            }
761
+          }
762
+          for (let y = 0; y < this.goodTypeList.length; y++) {
763
+            if (goodList[i].good_type_id == this.goodTypeList[y].id) {
764
+              goodList[i].good_type_id = this.goodTypeList[y].type_name;
765
+            }
766
+          }
767
+          goodList[i].name = goodList[i].good_name
768
+          goodList[i].project_name = goodList[i].good_name + " " + goodList[i].specification_name + " " + goodList[i].manufacturer;
769
+          goodList[i].project_type = goodList[i].good_type_id;
770
+          goodList[i].second_specification_name = goodList[i].specification_name;
771
+          goodList[i].second_total = this.getTotalStockCount(
772
+            goodList[i].good_warehouse_info
773
+          );
774
+          goodList[i].count = ""
775
+          goodList[i].is_source = 2;
776
+          goodList[i].name = goodList[i].good_name;
777
+          goodList[i].unitList = [{ id: 1, name: "" }];
778
+          goodList[i].sencond_unit = goodList[i].packing_unit;
779
+          goodList[i].remake = ""
780
+          goodList[i].min_price = goodList[i].retail_price
781
+          for (let j = 0; j < goodList[i].unitList.length; j++) {
782
+            goodList[i].unitList[0].name = goodList[i].packing_unit;
783
+          }
784
+          this.tabList.push(goodList[i]);
785
+        }
786
+       })
787
+      },
788
+  },
789
+  created(){
790
+    // var nowDate = new Date()
791
+    // var nowYear = nowDate.getFullYear()
792
+    // var nowMonth = nowDate.getMonth() + 1
793
+    // var nowDay = nowDate.getDate()
794
+    // this.warehousing_time =
795
+    //   nowYear +
796
+    //   '-' +
797
+    //   (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
798
+    //   '-' +
799
+    //   (nowDay < 10 ? '0' + nowDay : nowDay)
800
+    const tempObj = {}
801
+    tempObj["id"] =  0;
802
+    tempObj["name"] = "";
803
+    tempObj['project_name'] = ""
804
+    tempObj['project_type'] = ""
805
+    tempObj['second_specification_name'] = ''
806
+    tempObj['sencond_unit'] = ''
807
+    tempObj['count'] = ''
808
+    tempObj['second_total'] = ''
809
+    tempObj["remake"] = ''
810
+    tempObj["is_source"] = 0
811
+    tempObj["project_id"] = 0
812
+    tempObj["min_price"] = 0
813
+    this.recordInfo.recordData.push(tempObj)
814
+    this.getlist()  
815
+    this.getSencondOrderDetail()
816
+  }
817
+};
818
+</script>
819
+
820
+<style rel="stylesheet/css" lang="scss" scoped>
821
+</style>

+ 536 - 0
src/xt_pages/stock/testOrder.vue 查看文件

@@ -0,0 +1,536 @@
1
+<template>
2
+
3
+  <div class="main-contain">
4
+    <div class="position">
5
+      <bread-crumb  :crumbs='crumbs'></bread-crumb>
6
+     
7
+      <div style="float:right;">
8
+        <el-button size="small" @click="back()" class="filter-item">取 消</el-button>
9
+        <el-button size="small" type="primary" @click="submit()" class="filter-item">保 存</el-button>
10
+      </div>
11
+    </div>
12
+    <div class="app-container" v-loading="loading">
13
+
14
+      <div class="cell clearfix">
15
+      
16
+        <label class="title"><span class="name">入库时间</span> : </label>
17
+        <el-date-picker size="small" v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false"
18
+                        style="width: 196px;" type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
19
+                        value-format="yyyy-MM-dd"></el-date-picker>
20
+       <label class="title"><span class="name">调入仓库</span> : </label>
21
+        <el-select size="small" v-model="storehouse_in_id" filterable placeholder="请选择仓库">
22
+          <el-option
23
+            v-for="(option, index) in houseList"
24
+            :key="index"
25
+            :label="option.storehouse_name"
26
+            :value="option.id">
27
+          </el-option>
28
+        </el-select>
29
+
30
+        <label class="title"><span class="name">调出仓库</span> : </label>
31
+        <el-select size="small" v-model="storehouse_out_id" filterable placeholder="请选择仓库">
32
+          <el-option
33
+            v-for="(option, index) in houseList"
34
+            :key="index"
35
+            :label="option.storehouse_name"
36
+            :value="option.id">
37
+          </el-option>
38
+        </el-select>
39
+      </div>
40
+
41
+    
42
+      <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
43
+        <el-table id="oictable" :data="recordInfo.recordData" :class="signAndWeighBoxPatients" border
44
+                  style="width: 100%"
45
+                  max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
46
+        >
47
+          <el-table-column align="center" width="200" fixed="left">
48
+             <template slot="header" slot-scope="scope">
49
+              <span>商品名称</span>
50
+            </template>
51
+            <template slot-scope="scope">
52
+              <el-form-item
53
+                :prop="'tableList.' + scope.$index + '.name'"
54
+                :rules="tableRules.name"
55
+              >
56
+                <el-select
57
+                  v-model="scope.row.name"
58
+                  style="width: 160"
59
+                  filterable
60
+                  placeholder="请选择商品"
61
+                  @change="changeName"
62
+                  @input="changeGoodName(scope.$index)"
63
+                  :disabled="disabled"
64
+                >
65
+                  <el-option
66
+                    v-for="(item, index) in tabList"
67
+                    :key="index"
68
+                    :label="item.project_name"
69
+                    :value="item"
70
+                  >
71
+                  </el-option>
72
+                </el-select>
73
+              </el-form-item>
74
+            </template>
75
+          </el-table-column>
76
+          <el-table-column align="center" width="200">
77
+            
78
+            <template slot="header" slot-scope="scope">
79
+              <span>商品类型<span style="color: red">*</span></span>
80
+            </template>
81
+     
82
+            <template slot-scope="scope">
83
+              <el-form-item style="padding-top: 20px;">
84
+                <el-input v-model="scope.row.project_type" :disabled="true" style="width:180px"></el-input>
85
+              </el-form-item>
86
+            </template>
87
+          </el-table-column>
88
+          <el-table-column align="center" width="300">
89
+            
90
+            <template slot="header" slot-scope="scope">
91
+              <span>规格<span style="color: red">*</span></span>
92
+            </template>
93
+            <template slot-scope="scope">
94
+
95
+              <el-form-item style="padding-top: 20px">
96
+                 <el-input v-model="scope.row.second_specification_name" style="width:200px" :disabled="true"></el-input>
97
+              </el-form-item>
98
+
99
+            </template>
100
+          </el-table-column>
101
+        
102
+          <el-table-column align="center" width="250">
103
+            <template slot="header" slot-scope="scope">
104
+              <span>调拨数量<span style="color: red">*</span></span>
105
+            </template>
106
+            <template slot-scope="scope">
107
+              <el-form-item style="padding-top: 20px" :prop="'recordData.' + scope.$index + '.number'"
108
+                            :rules='tableRules.number' >
109
+                <el-input v-model="scope.row.count" style="width:100px"></el-input>
110
+                <el-select
111
+                  v-model="scope.row.sencond_unit"
112
+                  style="width: 100px"
113
+                  filterable
114
+                  placeholder="请选择"
115
+                  :disabled="disabled"
116
+                >
117
+                  <el-option
118
+                    v-for="(item, index) in scope.row.unitList"
119
+                    :key="index"
120
+                    :label="item.name"
121
+                    :value="item.name"
122
+                  >
123
+                  </el-option>
124
+                </el-select>
125
+              </el-form-item>
126
+            </template>
127
+          </el-table-column>
128
+
129
+
130
+    
131
+          <el-table-column align="center" width="220">
132
+            <template slot="header" slot-scope="scope">
133
+              <span>库存总数<span style="color: red">*</span></span>
134
+            </template>
135
+            <template slot-scope="scope">
136
+            
137
+              <el-form-item :prop="'recordData.' + scope.$index + '.packing_price'" :rules='tableRules.packing_price'
138
+                            style="padding-top: 20px">
139
+                <el-input v-model="scope.row.second_total" style="width:200px"></el-input>
140
+              </el-form-item>
141
+
142
+
143
+            </template>
144
+          </el-table-column>
145
+      
146
+          <el-table-column label="备注" align="center" width="300">
147
+            <template slot-scope="scope">
148
+               <el-input v-model="scope.row.remake" style="width:200px"></el-input>
149
+            </template>
150
+          </el-table-column>
151
+          
152
+          <el-table-column label="操作" align="center" fixed="right" width="150">
153
+            <template slot-scope="scope">
154
+              <el-tooltip class="item" effect="dark" content="新增" placement="top">
155
+                <el-button
156
+                  size="mini"
157
+                  type="primary"
158
+                  icon="el-icon-circle-plus-outline"
159
+                  @click="handleEdit(scope.$index, scope.row)">
160
+                </el-button>
161
+              </el-tooltip>
162
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
163
+
164
+                <el-button
165
+                  size="mini"
166
+                  type="danger"
167
+                  icon="el-icon-delete"
168
+                  @click="handleDelete(scope.$index, scope.row)">
169
+                </el-button>
170
+              </el-tooltip>
171
+
172
+            </template>
173
+          </el-table-column>
174
+
175
+        </el-table>
176
+      </el-form>
177
+
178
+
179
+    </div>
180
+  </div>
181
+
182
+</template>
183
+
184
+<script>
185
+  import { uParseTime } from '@/utils/tools'
186
+  import {getSencondeGoodList,saveSencondOrder} from '@/api/seconde'
187
+  import BreadCrumb from '../components/bread-crumb'
188
+
189
+  export default {
190
+    components: { BreadCrumb },
191
+    name: 'stockIn',
192
+
193
+    data() {
194
+     
195
+      return {
196
+        crumbs: [
197
+          { path: false, name: '库存管理' },
198
+          { path: false, name: '耗材入库单' },
199
+          { path: false, name: '新增入库单' }
200
+        ],
201
+        crumbs2: [
202
+          { path: false, name: '库存管理' },
203
+          { path: false, name: '其他入库单' },
204
+          { path: false, name: '新增入库单' }
205
+        ],
206
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
207
+        warehousing_time: '',
208
+        adminUserOptions: null,
209
+        currentIndex: 0,
210
+        tableRules: {
211
+          price: [
212
+            { required: true, message: '单价不能为空', trigger: 'blur' }
213
+          ],
214
+        },
215
+        goodType: [],
216
+        manufacturerList:[],
217
+        goodList:[],
218
+        loading:false,
219
+        list:[],
220
+        configlist:{},
221
+        recordInfo: {
222
+          recordData: [],
223
+        },
224
+        drugList:[],
225
+        goodTypeList:[],
226
+        drugTypeList:[],
227
+        houseList:[],
228
+        tabList:[],
229
+        disabled:false,
230
+        storehouse_out_id:"",
231
+        storehouse_in_id:"",
232
+      }
233
+    },
234
+    methods: {
235
+      handleEdit: function(index, row) {
236
+        const tempObj = {}
237
+        tempObj["name"] = "";
238
+        tempObj['project_name'] = ""
239
+        tempObj['project_type'] = ""
240
+        tempObj['second_specification_name'] = ''
241
+        tempObj['sencond_unit'] = ''
242
+        tempObj['count'] = ''
243
+        tempObj['second_total'] = ''
244
+        tempObj["is_source"] = 0
245
+        tempObj["remake"] = ''
246
+        tempObj["project_id"] = 0
247
+        tempObj["min_price"] = 0
248
+        this.recordInfo.recordData.push(tempObj)
249
+      }, 
250
+      handleDelete: function(index, row) {
251
+        if (this.recordInfo.recordData.length <= 1) {
252
+          this.$message.error('只有一条记录的时候无法删除')
253
+          return
254
+        } else {
255
+          this.recordInfo.recordData.splice(index, 1)
256
+        }
257
+      }, calculate: function(val) {
258
+        if (val == 0) {
259
+          return ''
260
+        }
261
+        return Math.round(parseFloat(val) * 100) / 100
262
+      }, 
263
+    getTime(val, temp) {
264
+        if (val != 0) {
265
+          return uParseTime(val, temp)
266
+        } else {
267
+          return ''
268
+        }
269
+      },
270
+      submit() {
271
+        if(this.storehouse_out_id <=0){
272
+          this.$message.error("调出仓库不能为空!")
273
+          return
274
+        }
275
+        if(this.storehouse_in_id <=0){
276
+          this.$message.error("调入仓库不能为空!")
277
+          return
278
+        }
279
+        this.$refs['tableForm'].validate((valid) => {
280
+          if (valid) {
281
+            this.loading = true
282
+            const array = this.recordInfo.recordData
283
+           
284
+          
285
+            for (let i = 0; i < array.length; i++) {
286
+              array[i].count = parseInt(array[i].count)
287
+              array[i].second_total = array[i].second_total.toString()
288
+            }
289
+
290
+            const loading = this.$loading({
291
+              lock: true,
292
+              text: 'Loading',
293
+              spinner: 'el-icon-loading',
294
+              background: 'rgba(0, 0, 0, 0.7)'
295
+            })
296
+            const params = {
297
+              'stockIn': this.recordInfo.recordData
298
+            }
299
+            var storehouse_in_id = parseInt(this.storehouse_in_id)
300
+            var storehouse_out_id = parseInt(this.storehouse_out_id)
301
+            saveSencondOrder(params, this.warehousing_time,storehouse_in_id,storehouse_out_id).then(response => {
302
+              if (response.data.state == 1) {
303
+                var warehousingInfo = response.data.data.warehousingInfo   
304
+                this.$message.success('保存成功')
305
+                this.loading = false 
306
+                loading.close()
307
+              } else {
308
+                this.$message.error("保存失败")
309
+                loading.close()
310
+              }
311
+            })
312
+          } else {
313
+            return false
314
+          }
315
+        })
316
+      },
317
+      changeGoodName(val){
318
+        this.currentIndex = val
319
+      },
320
+      //获取基本数据信息
321
+      getlist(){
322
+       getSencondeGoodList().then(response=>{
323
+         if(response.data.state == 1){
324
+            var drugList = response.data.data.drugList
325
+            this.drugList= drugList
326
+            var goodList = response.data.data.goodList
327
+            this.goodList = goodList
328
+            var manufactuerList = response.data.data.manufactuerList
329
+            var goodTypeList = response.data.data.goodTypeList
330
+            this.goodTypeList = goodTypeList
331
+            var drugTypeList = response.data.data.drugTypeList
332
+            this.drugTypeList = drugTypeList
333
+            var houseList =  response.data.data.houseList
334
+            this.houseList = houseList
335
+
336
+            for(let i=0;i<drugList.length;i++){
337
+              for (let z = 0; z < drugList[i].drug_warehouse_info.length; z++) {
338
+                if (drugList[i].max_unit ==drugList[i].drug_warehouse_info[z].max_unit) {
339
+                    drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number *drugList[i].min_number;
340
+                }
341
+               }
342
+               for (let y = 0; y < this.drugTypeList.length; y++) {
343
+                  if (drugList[i].drug_type == this.drugTypeList[y].value) {
344
+                     drugList[i].drug_type = this.drugTypeList[y].name;
345
+                   }
346
+                }
347
+                drugList[i].name =drugList[i].drug_name + " " +drugList[i].dose + drugList[i].dose_unit + "*" +drugList[i].min_number +drugList[i].min_unit + "/" + drugList[i].max_unit + " " +drugList[i].manufacturer;
348
+                drugList[i].project_name =drugList[i].drug_name + " " +drugList[i].dose + drugList[i].dose_unit + "*" +drugList[i].min_number +drugList[i].min_unit + "/" + drugList[i].max_unit + " " +drugList[i].manufacturer;
349
+                drugList[i].project_type = drugList[i].drug_type;
350
+                drugList[i].second_specification_name = drugList[i].dose + drugList[i].dose_unit +"*" + drugList[i].min_number +drugList[i].min_unit +"/" + drugList[i].max_unit;
351
+                drugList[i].second_total = this.getWarehoseInfo(drugList[i].drug_warehouse_info,drugList[i].max_unit,drugList[i].min_unit,drugList[i].min_number);
352
+                drugList[i].is_source = 1
353
+                drugList[i].count = ""
354
+                drugList[i].remake = ""
355
+                drugList[i].min_price = drugList[i].min_price
356
+             if (drugList[i].max_unit != drugList[i].min_unit) {
357
+                drugList[i].unitList = [
358
+                    { id: 1, name: "" },
359
+                    { id: 2, name: "" },
360
+                ];
361
+             }
362
+            if (drugList[i].max_unit == drugList[i].min_unit) {
363
+               drugList[i].unitList = [{ id: 1, name: "" }];
364
+            }
365
+
366
+            drugList[i].sencond_unit = drugList[i].max_unit;
367
+            for (let j = 0; j < drugList[i].unitList.length; j++) {
368
+              if (drugList[i].max_unit != drugList[i].min_unit) {
369
+                drugList[i].unitList[0].name = drugList[i].max_unit;
370
+                drugList[i].unitList[1].name = drugList[i].min_unit;
371
+              }
372
+              if (drugList[i].max_unit == drugList[i].min_unit) {
373
+                drugList[i].unitList[0].name = drugList[i].max_unit;
374
+              }
375
+            }
376
+            this.tabList.push(drugList[i]);
377
+            }
378
+
379
+           for (let i = 0; i < goodList.length; i++) {
380
+            for (let y = 0; y < this.goodTypeList.length; y++) {
381
+              if (goodList[i].good_type_id == this.goodTypeList[y].id) {
382
+                goodList[i].good_type_id = this.goodTypeList[y].type_name;
383
+              }
384
+            }
385
+            goodList[i].project_name = goodList[i].good_name + " " + goodList[i].specification_name + " " + goodList[i].manufacturer;
386
+            goodList[i].project_type = goodList[i].good_type_id;
387
+            goodList[i].second_specification_name = goodList[i].specification_name;
388
+            goodList[i].second_total = this.getTotalStockCount(
389
+              goodList[i].good_warehouse_info
390
+            );
391
+            goodList[i].count = ""
392
+            goodList[i].is_source = 2;
393
+            goodList[i].name = goodList[i].good_name;
394
+            goodList[i].unitList = [{ id: 1, name: "" }];
395
+            goodList[i].sencond_unit = goodList[i].packing_unit;
396
+            goodList[i].remake = ""
397
+            goodList[i].min_price = goodList[i].retail_price
398
+            for (let j = 0; j < goodList[i].unitList.length; j++) {
399
+              goodList[i].unitList[0].name = goodList[i].packing_unit;
400
+            }
401
+            this.tabList.push(goodList[i]);
402
+          }
403
+            
404
+         }
405
+       })
406
+      },
407
+      
408
+      getWarehoseInfo(arr, max_unit, min_unit, min_number) {
409
+        var total = 0;
410
+        var max_str = "";
411
+        var min_str = "";
412
+        if (arr.length > 0) {
413
+            for (let i = 0; i < arr.length; i++) {
414
+            total += parseInt(arr[i].stock_max_number + arr[i].stock_min_number);
415
+            }
416
+        }
417
+        if (total < min_number) {
418
+            min_str = total + min_unit;
419
+        }
420
+        if (total == 0) {
421
+            min_str = "";
422
+            max_str = "";
423
+        }
424
+        if (total >= min_number) {
425
+            if (parseInt(total / min_number) != 0) {
426
+            max_str = parseInt(total / min_number) + max_unit;
427
+            }
428
+            if (total % min_number != 0) {
429
+            min_str = (total % min_number) + min_unit;
430
+            }
431
+        }
432
+        return max_str + min_str;
433
+      },
434
+      getTotalStockCount(arr) {
435
+        var total_count = 0;
436
+        for (let i = 0; i < arr.length; i++) {
437
+            total_count += arr[i].stock_count;
438
+        }
439
+        return total_count;
440
+      },
441
+     changeGoodName(val) {
442
+      this.currentIndex = val;
443
+    },
444
+    changeName(val) {
445
+      for (let i = 0; i < this.recordInfo.recordData.length; i++) {
446
+        if (this.currentIndex == i) {
447
+          this.recordInfo.recordData[i].project_id = val.id;
448
+          this.recordInfo.recordData[i].is_source = val.is_source;
449
+          this.recordInfo.recordData[i].name = val.name;
450
+          this.recordInfo.recordData[i].project_name = val.project_name;
451
+          this.recordInfo.recordData[i].project_type = val.project_type;
452
+          this.recordInfo.recordData[i].second_specification_name = val.second_specification_name;
453
+          this.recordInfo.recordData[i].second_total = val.second_total;
454
+          this.recordInfo.recordData[i].sencond_unit = val.sencond_unit
455
+          this.recordInfo.recordData[i].min_price = val.min_price
456
+          if (val.count == NaN) {
457
+            this.recordInfo.recordData[i].count = "";
458
+          } else {
459
+            this.recordInfo.recordData[i].count = val.count? val.count : "";
460
+          }
461
+          this.recordInfo.recordData[i].unitList = val.unitList;
462
+        }
463
+      }
464
+    },
465
+    },
466
+    created() {
467
+      var nowDate = new Date()
468
+      var nowYear = nowDate.getFullYear()
469
+      var nowMonth = nowDate.getMonth() + 1
470
+      var nowDay = nowDate.getDate()
471
+      this.warehousing_time =
472
+        nowYear +
473
+        '-' +
474
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
475
+        '-' +
476
+        (nowDay < 10 ? '0' + nowDay : nowDay)
477
+      const tempObj = {}
478
+      tempObj["name"] = "";
479
+      tempObj['project_name'] = ""
480
+      tempObj['project_type'] = ""
481
+      tempObj['second_specification_name'] = ''
482
+      tempObj['sencond_unit'] = ''
483
+      tempObj['count'] = ''
484
+      tempObj['second_total'] = ''
485
+      tempObj["remake"] = ''
486
+      tempObj["is_source"] = 0
487
+      tempObj["project_id"] = 0
488
+      tempObj["min_price"] = 0
489
+      this.recordInfo.recordData.push(tempObj)
490
+      this.getlist()
491
+    }
492
+
493
+  }
494
+</script>
495
+
496
+<style>
497
+  #oictable ::-webkit-scrollbar {
498
+    height: 15px;
499
+  }
500
+</style>
501
+
502
+<style rel="stylesheet/css" lang="scss" scoped>
503
+  .information {
504
+    border: 1px #dcdfe6 solid;
505
+    padding: 30px 20px 30px 20px;
506
+
507
+  .border {
508
+    border-bottom: 1px #dcdfe6 solid;
509
+    margin: 0px 0 20px 0;
510
+  }
511
+
512
+  }
513
+
514
+  .edit_separater {
515
+    border-top: 1px solid rgb(233, 233, 233);
516
+    margin-top: 15px;
517
+    margin-bottom: 15px;
518
+  }
519
+  
520
+
521
+</style>
522
+
523
+<style>
524
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
525
+    font-size: 12px;
526
+  }
527
+
528
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
529
+    background: #6fb5fa;
530
+  }
531
+  .el-autocomplete-suggestion{
532
+    width: 400px !important;
533
+  }
534
+  
535
+
536
+</style>

+ 372 - 0
src/xt_pages/stock/testOrderDetail.vue 查看文件

@@ -0,0 +1,372 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+    </div>
6
+    <div class="app-container">
7
+      <el-table
8
+        :row-style="{ color: '#303133' }"
9
+        :header-cell-style="{
10
+          backgroundColor: 'rgb(245, 247, 250)',
11
+          color: '#606266',
12
+        }"
13
+        :data="tableList"
14
+        :class="signAndWeighBoxPatients"
15
+        border
16
+      >
17
+        <el-table-column label="商品名称" align="center">
18
+          <template slot-scope="scope">
19
+             {{scope.row.project_name}}
20
+          </template>
21
+        </el-table-column>
22
+        <el-table-column label="商品类型" align="center">
23
+          <template slot-scope="scope">
24
+           {{scope.row.project_type}}
25
+          </template>
26
+        </el-table-column>
27
+       
28
+        <el-table-column label="规格" align="center" width="150">
29
+          <template slot-scope="scope">
30
+            {{scope.row.second_specification_name}}
31
+          </template>
32
+        </el-table-column>
33
+        <el-table-column label="调拨数量" align="center">
34
+          <template slot-scope="scope">
35
+            {{scope.row.count}}
36
+          </template>
37
+        </el-table-column>
38
+
39
+        <el-table-column label="调出仓库" align="center">
40
+          <template slot-scope="scope">
41
+            {{getHouseName(scope.row.storehouse_out_id)}}
42
+          </template>
43
+        </el-table-column>
44
+        <el-table-column label="调入仓库" align="center">
45
+          <template slot-scope="scope">
46
+            {{getHouseName(scope.row.storehouse_in_id)}}
47
+          </template>
48
+        </el-table-column>
49
+
50
+        <el-table-column label="库存总数" align="center">
51
+          <template slot-scope="scope">
52
+            {{scope.row.second_total}}
53
+          </template>
54
+        </el-table-column>
55
+
56
+        <el-table-column label="制单人" align="center">
57
+          <template slot-scope="scope">
58
+            {{getDocName(warehouse.creater)}}
59
+          </template>
60
+        </el-table-column>
61
+
62
+        <el-table-column label="审核人" align="center">
63
+          <template slot-scope="scope">
64
+          {{getDocName(warehouse.checker)}}
65
+          </template>
66
+        </el-table-column>
67
+
68
+        <el-table-column label="审核时间" align="center">
69
+          <template slot-scope="scope">
70
+           <span v-if="warehouse.check_time >0">{{getTimes(warehouse.check_time)}}</span>  
71
+          </template>
72
+        </el-table-column>
73
+
74
+      </el-table>
75
+      
76
+    </div>
77
+  </div>
78
+</template>
79
+
80
+<script>
81
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
82
+import {getSecondOrderDetailList} from "@/api/seconde";
83
+import { uParseTime } from "@/utils/tools";
84
+export default {
85
+  name: "stockIn",
86
+  components: {},
87
+  components: {
88
+    BreadCrumb,
89
+  },
90
+  data() {
91
+    return {
92
+      isActive: false,
93
+      Color_txt: true,
94
+      crumbs: [
95
+        { path: false, name: "采购管理" },
96
+        { path: "/supply/query", name: "采购订单" },
97
+      ],
98
+      keywords: "",
99
+      total: 0,
100
+      multipleSelection: [],
101
+      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
102
+      start_time: "",
103
+      end_time: "",
104
+      page: 1,
105
+      limit: 10,
106
+      goodType: [],
107
+      goodInfo: [],
108
+      org_id: 0,
109
+      types: [],
110
+      tableList: [],
111
+      type_name: "",
112
+      checkList: [
113
+        { id: 0, name: "请选择" },
114
+        { id: 1, name: "已审核" },
115
+        { id: 2, name: "未审核" },
116
+      ],
117
+      supplyList: [],
118
+      check_id: 0,
119
+      doctorList: [],
120
+      houseList:[],
121
+      warehouse:{},
122
+    };
123
+  },
124
+  methods: {
125
+    toAdd() {
126
+      this.$router.push({ path: "/purchase/order/add" });
127
+    },
128
+    getTimes(time) {
129
+      if (time === "") {
130
+        return "";
131
+      }
132
+      return uParseTime(time, "{y}-{m}-{d}");
133
+    },
134
+    getlist() {
135
+       var id = parseInt(this.$route.query.id)
136
+      getSecondOrderDetailList(id).then((response) => {
137
+        if (response.data.state == 1) {
138
+          var list = response.data.data.list;
139
+          this.tableList = list;
140
+          this.houseList = response.data.data.houseList
141
+          this.doctorList = response.data.data.doctorList
142
+          var warehouse = response.data.data.warehouse
143
+          this.warehouse = warehouse
144
+        }
145
+      });
146
+    },
147
+    getName(id) {
148
+      var name = "";
149
+      for (let i = 0; i < this.supplyList.length; i++) {
150
+        if (id == this.supplyList[i].id) {
151
+          name = this.supplyList[i].supplier_name;
152
+        }
153
+      }
154
+      return name;
155
+    },
156
+    getDocName(id) {
157
+      var user_name = "";
158
+      for (let i = 0; i < this.doctorList.length; i++) {
159
+        if (id == this.doctorList[i].admin_user_id) {
160
+          user_name = this.doctorList[i].user_name;
161
+        }
162
+      }
163
+      return user_name;
164
+    },
165
+    getAllBuyPrice(arr) {
166
+      var buy_price = 0;
167
+      if (arr != undefined && arr.length > 0) {
168
+        for (let i = 0; i < arr.length; i++) {
169
+          buy_price += arr[i].count * arr[i].price;
170
+        }
171
+      }
172
+      return buy_price.toFixed(2);
173
+    },
174
+    getAllCount(arr) {
175
+      var count = 0;
176
+      if (arr != undefined && arr.length > 0) {
177
+        for (let i = 0; i < arr.length; i++) {
178
+          count += parseInt(arr[i].count);
179
+        }
180
+      }
181
+      if (count == 0) {
182
+        return "";
183
+      }
184
+      if (count > 0) {
185
+        return count;
186
+      }
187
+    },
188
+    toClick(id) {
189
+      window.sessionStorage.setItem('purchase_start_time',this.start_time)
190
+      window.sessionStorage.setItem('purchase_end_time',this.end_time)
191
+      this.$router.push({ path: "/stock/in/test/edit?id=" + id });
192
+    },
193
+    toDetail(id){
194
+      this.$router.push({ path: "/stock/in/test/detail?id=" + id });
195
+    },
196
+    toDelete(val, index) {
197
+      if (val.is_check == 1) {
198
+        this.$message.error("已审核单据,不能删除!");
199
+        return false;
200
+      }
201
+      if (val.orderOut.length > 0) {
202
+        this.$message.error("已关联单据,不能删除!");
203
+        return false;
204
+      }
205
+      this.$confirm("确认删除吗?", "删除", {
206
+        confirmButtonText: "确 定",
207
+        cancelButtonText: "取 消",
208
+        type: "warning",
209
+      }).then(() => {
210
+          deletePurchaseOrder(val.id).then((response) => {
211
+            if (response.data.state == 1) {
212
+              var msg = response.data.data.msg;
213
+              this.tableList.splice(index, 1);
214
+              this.getlist()
215
+              this.$message.success("删除成功");
216
+            } else {
217
+              this.$message.error("删除失败");
218
+            }
219
+          });
220
+        })
221
+        .catch(() => {});
222
+    },
223
+    // 动态改变表格样式
224
+    Color_Change() {
225
+      this.Color_txt = true;
226
+      console.log(this.Color_txt, "op");
227
+    },
228
+
229
+    Color_Changeleave() {
230
+      this.Color_txt = false;
231
+      console.log(this.Color_txt, "false");
232
+    },
233
+    getTime(time) {
234
+      if (time === '') {
235
+      return ''
236
+      }
237
+      return uParseTime(time, '{y}-{m}-{d}')
238
+     },
239
+    getHouseName(id){
240
+      var storehouse_name = ""
241
+      for(let i=0;i<this.houseList.length;i++){
242
+         if(id == this.houseList[i].id){
243
+           storehouse_name = this.houseList[i].storehouse_name
244
+         }
245
+      }
246
+      return storehouse_name
247
+    },
248
+   getDocName(id){
249
+      var user_name = ""
250
+      for(let i=0;i<this.doctorList.length;i++){
251
+        if(id == this.doctorList[i].admin_user_id){
252
+          user_name = this.doctorList[i].user_name
253
+        }
254
+      }
255
+      return user_name
256
+     },
257
+  },
258
+  created() {
259
+ 
260
+    var now = new Date(); //当前日期
261
+    var nowMonth = now.getMonth(); //当前月
262
+    var nowYear = now.getFullYear(); //当前年
263
+    //本月的开始时间
264
+    var monthStartDate = new Date(nowYear, nowMonth, 1);
265
+    this.start_time = this.getTimes(monthStartDate);
266
+    this.end_time = this.getTimes(new Date());
267
+
268
+    this.org_id = this.$store.getters.xt_user.org_id;
269
+    var start_time =  window.sessionStorage.getItem('purchase_start_time')
270
+    
271
+    var end_time =  window.sessionStorage.getItem('purchase_end_time')
272
+   
273
+    if(start_time !=null){
274
+      this.start_time = ""
275
+      this.start_time = start_time
276
+    }
277
+    if(end_time!=null){
278
+      this.end_time = ""
279
+      this.end_time = end_time
280
+    }
281
+    window.sessionStorage.removeItem('purchase_start_time')
282
+    window.sessionStorage.removeItem('purchase_end_time')
283
+   
284
+    this.getlist();
285
+   
286
+  },
287
+};
288
+</script>
289
+<style lang="scss">
290
+.cluster-rs {
291
+  text-align: center;
292
+}
293
+.annotation-rs {
294
+  width: 100%;
295
+  height: 100%;
296
+  border: none;
297
+  td {
298
+    width: 155px;
299
+    padding: 5px;
300
+    border-right: none;
301
+    text-align: center;
302
+    vertical-align: middle;
303
+  }
304
+}
305
+tr:last-child {
306
+  td {
307
+    border-bottom: none;
308
+  }
309
+}
310
+</style>
311
+
312
+<style rel="stylesheet/css" lang="scss" scoped>
313
+.information {
314
+  border: 1px #dcdfe6 solid;
315
+  padding: 30px 20px 30px 20px;
316
+
317
+  .border {
318
+    border-bottom: 1px #dcdfe6 solid;
319
+    margin: 0px 0 20px 0;
320
+  }
321
+}
322
+
323
+.title {
324
+  background: #409eff;
325
+  height: 44px;
326
+  line-height: 44px;
327
+  padding: 0 0 0 10px;
328
+  color: #fff;
329
+  margin: 0 0 10px 0;
330
+}
331
+
332
+.edit_separater {
333
+  border-top: 1px solid rgb(233, 233, 233);
334
+  margin-top: 15px;
335
+  margin-bottom: 15px;
336
+}
337
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
338
+  width: 10px;
339
+  height: 10px;
340
+}
341
+</style>
342
+
343
+<style>
344
+.sign-and-weigh-box .sign-and-weigh-box-patients .cell {
345
+  font-size: 12px;
346
+}
347
+
348
+.sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
349
+  background: #6fb5fa;
350
+}
351
+
352
+.count {
353
+  color: #bd2c00;
354
+}
355
+.el-table td,
356
+.el-table th.is-leaf,
357
+.el-table--border,
358
+.el-table--group {
359
+  border-color: #d0d3da;
360
+}
361
+.el-table--border::after,
362
+.el-table--group::after,
363
+.el-table::before {
364
+  background-color: #d0d3da;
365
+}
366
+
367
+.color {
368
+  background: none !important;
369
+  display: flex;
370
+  flex-direction: column;
371
+}
372
+</style>

+ 556 - 0
src/xt_pages/stock/testOrderEdit.vue 查看文件

@@ -0,0 +1,556 @@
1
+<template>
2
+
3
+  <div class="main-contain">
4
+    <div class="position">
5
+      <bread-crumb  :crumbs='crumbs'></bread-crumb>
6
+     
7
+      <div style="float:right;">
8
+        <el-button size="small" @click="back()" class="filter-item">取 消</el-button>
9
+        <el-button size="small" type="primary" @click="submit()" class="filter-item">保 存</el-button>
10
+      </div>
11
+    </div>
12
+    <div class="app-container" v-loading="loading">
13
+
14
+      <div class="cell clearfix">
15
+      
16
+        <label class="title"><span class="name">入库时间</span> : </label>
17
+        <el-date-picker size="small" v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false"
18
+                        style="width: 196px;" type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
19
+                        value-format="yyyy-MM-dd"></el-date-picker>
20
+       <label class="title"><span class="name">调入仓库</span> : </label>
21
+        <el-select size="small" v-model="storehouse_in_id" filterable placeholder="请选择仓库">
22
+          <el-option
23
+            v-for="(option, index) in houseList"
24
+            :key="index"
25
+            :label="option.storehouse_name"
26
+            :value="option.id">
27
+          </el-option>
28
+        </el-select>
29
+
30
+        <label class="title"><span class="name">调出仓库</span> : </label>
31
+        <el-select size="small" v-model="storehouse_out_id" filterable placeholder="请选择仓库">
32
+          <el-option
33
+            v-for="(option, index) in houseList"
34
+            :key="index"
35
+            :label="option.storehouse_name"
36
+            :value="option.id">
37
+          </el-option>
38
+        </el-select>
39
+      </div>
40
+
41
+    
42
+      <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
43
+        <el-table id="oictable" :data="recordInfo.recordData" :class="signAndWeighBoxPatients" border
44
+                  style="width: 100%"
45
+                  max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
46
+        >
47
+          <el-table-column align="center" width="200" fixed="left">
48
+             <template slot="header" slot-scope="scope">
49
+              <span>商品名称</span>
50
+            </template>
51
+            <template slot-scope="scope">
52
+              <el-form-item
53
+                :prop="'tableList.' + scope.$index + '.name'"
54
+                :rules="tableRules.name"
55
+              >
56
+                <el-select
57
+                  v-model="scope.row.name"
58
+                  style="width: 160"
59
+                  filterable
60
+                  placeholder="请选择商品"
61
+                  @change="changeName"
62
+                  @input="changeGoodName(scope.$index)"
63
+                  :disabled="disabled"
64
+                >
65
+                  <el-option
66
+                    v-for="(item, index) in tabList"
67
+                    :key="index"
68
+                    :label="item.project_name"
69
+                    :value="item"
70
+                  >
71
+                  </el-option>
72
+                </el-select>
73
+              </el-form-item>
74
+            </template>
75
+          </el-table-column>
76
+          <el-table-column align="center" width="200">
77
+            
78
+            <template slot="header" slot-scope="scope">
79
+              <span>商品类型<span style="color: red">*</span></span>
80
+            </template>
81
+     
82
+            <template slot-scope="scope">
83
+              <el-form-item style="padding-top: 20px;">
84
+                <el-input v-model="scope.row.project_type" :disabled="true" style="width:180px"></el-input>
85
+              </el-form-item>
86
+            </template>
87
+          </el-table-column>
88
+          <el-table-column align="center" width="300">
89
+            
90
+            <template slot="header" slot-scope="scope">
91
+              <span>规格<span style="color: red">*</span></span>
92
+            </template>
93
+            <template slot-scope="scope">
94
+
95
+              <el-form-item style="padding-top: 20px">
96
+                 <el-input v-model="scope.row.second_specification_name" style="width:200px" :disabled="true"></el-input>
97
+              </el-form-item>
98
+
99
+            </template>
100
+          </el-table-column>
101
+        
102
+          <el-table-column align="center" width="250">
103
+            <template slot="header" slot-scope="scope">
104
+              <span>调拨数量<span style="color: red">*</span></span>
105
+            </template>
106
+            <template slot-scope="scope">
107
+              <el-form-item style="padding-top: 20px" :prop="'recordData.' + scope.$index + '.number'"
108
+                            :rules='tableRules.number' >
109
+                <el-input v-model="scope.row.count" style="width:100px"></el-input>
110
+                <el-select
111
+                  v-model="scope.row.sencond_unit"
112
+                  style="width: 100px"
113
+                  filterable
114
+                  placeholder="请选择"
115
+                  :disabled="disabled"
116
+                >
117
+                  <el-option
118
+                    v-for="(item, index) in scope.row.unitList"
119
+                    :key="index"
120
+                    :label="item.name"
121
+                    :value="item.name"
122
+                  >
123
+                  </el-option>
124
+                </el-select>
125
+              </el-form-item>
126
+            </template>
127
+          </el-table-column>
128
+
129
+
130
+    
131
+          <el-table-column align="center" width="220">
132
+            <template slot="header" slot-scope="scope">
133
+              <span>库存总数<span style="color: red">*</span></span>
134
+            </template>
135
+            <template slot-scope="scope">
136
+            
137
+              <el-form-item :prop="'recordData.' + scope.$index + '.packing_price'" :rules='tableRules.packing_price'
138
+                            style="padding-top: 20px">
139
+                <el-input v-model="scope.row.second_total" style="width:200px"></el-input>
140
+              </el-form-item>
141
+
142
+
143
+            </template>
144
+          </el-table-column>
145
+      
146
+          <el-table-column label="备注" align="center" width="300">
147
+            <template slot-scope="scope">
148
+               <el-input v-model="scope.row.remake" style="width:200px"></el-input>
149
+            </template>
150
+          </el-table-column>
151
+          
152
+          <el-table-column label="操作" align="center" fixed="right" width="150">
153
+            <template slot-scope="scope">
154
+              <el-tooltip class="item" effect="dark" content="新增" placement="top">
155
+                <el-button
156
+                  size="mini"
157
+                  type="primary"
158
+                  icon="el-icon-circle-plus-outline"
159
+                  @click="handleEdit(scope.$index, scope.row)">
160
+                </el-button>
161
+              </el-tooltip>
162
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
163
+
164
+                <el-button
165
+                  size="mini"
166
+                  type="danger"
167
+                  icon="el-icon-delete"
168
+                  @click="handleDelete(scope.$index, scope.row)">
169
+                </el-button>
170
+              </el-tooltip>
171
+
172
+            </template>
173
+          </el-table-column>
174
+
175
+        </el-table>
176
+      </el-form>
177
+
178
+
179
+    </div>
180
+  </div>
181
+
182
+</template>
183
+
184
+<script>
185
+  import { uParseTime } from '@/utils/tools'
186
+  import {getSencondeGoodList,updateSencondOrder,getSencondOrderDetail} from '@/api/seconde'
187
+  import BreadCrumb from '../components/bread-crumb'
188
+
189
+  export default {
190
+    components: { BreadCrumb },
191
+    name: 'stockIn',
192
+
193
+    data() {
194
+     
195
+      return {
196
+        crumbs: [
197
+          { path: false, name: '库存管理' },
198
+          { path: false, name: '耗材入库单' },
199
+          { path: false, name: '新增入库单' }
200
+        ],
201
+        crumbs2: [
202
+          { path: false, name: '库存管理' },
203
+          { path: false, name: '其他入库单' },
204
+          { path: false, name: '新增入库单' }
205
+        ],
206
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
207
+        warehousing_time: '',
208
+        adminUserOptions: null,
209
+        currentIndex: 0,
210
+        tableRules: {
211
+          price: [
212
+            { required: true, message: '单价不能为空', trigger: 'blur' }
213
+          ],
214
+        },
215
+        goodType: [],
216
+        manufacturerList:[],
217
+        goodList:[],
218
+        loading:false,
219
+        list:[],
220
+        configlist:{},
221
+        recordInfo: {
222
+          recordData: [],
223
+        },
224
+        drugList:[],
225
+        goodTypeList:[],
226
+        drugTypeList:[],
227
+        houseList:[],
228
+        tabList:[],
229
+        disabled:false,
230
+        storehouse_out_id:"",
231
+        storehouse_in_id:"",
232
+      }
233
+    },
234
+    methods: {
235
+      handleEdit: function(index, row) {
236
+        const tempObj = {}
237
+        tempObj["id"] = 0
238
+        tempObj["name"] = "";
239
+        tempObj['project_name'] = ""
240
+        tempObj['project_type'] = ""
241
+        tempObj['second_specification_name'] = ''
242
+        tempObj['sencond_unit'] = ''
243
+        tempObj['count'] = ''
244
+        tempObj['second_total'] = ''
245
+        tempObj["is_source"] = 0
246
+        tempObj["remake"] = ''
247
+        tempObj["project_id"] = 0
248
+        tempObj["min_price"] = 0
249
+        this.recordInfo.recordData.push(tempObj)
250
+      }, 
251
+      handleDelete: function(index, row) {
252
+        if (this.recordInfo.recordData.length <= 1) {
253
+          this.$message.error('只有一条记录的时候无法删除')
254
+          return
255
+        } else {
256
+          this.recordInfo.recordData.splice(index, 1)
257
+        }
258
+      }, calculate: function(val) {
259
+        if (val == 0) {
260
+          return ''
261
+        }
262
+        return Math.round(parseFloat(val) * 100) / 100
263
+      }, 
264
+    getTime(val, temp) {
265
+        if (val != 0) {
266
+          return uParseTime(val, temp)
267
+        } else {
268
+          return ''
269
+        }
270
+      },
271
+      submit() {
272
+       
273
+        this.$refs['tableForm'].validate((valid) => {
274
+          if (valid) {
275
+            this.loading = true
276
+            const array = this.recordInfo.recordData
277
+            if(this.storehouse_in_id <=0){
278
+              this.$message.error("调入仓库不能为空!")
279
+              return
280
+            }
281
+            if(this.storehouse_out_id <=0){
282
+              this.$message.error("调出仓库不能为空!")
283
+              return
284
+            }
285
+            for (let i = 0; i < array.length; i++) {
286
+              array[i].count = parseInt(array[i].count)
287
+              array[i].second_total = array[i].second_total.toString()
288
+            }
289
+
290
+            const loading = this.$loading({
291
+              lock: true,
292
+              text: 'Loading',
293
+              spinner: 'el-icon-loading',
294
+              background: 'rgba(0, 0, 0, 0.7)'
295
+            })
296
+            const params = {
297
+              'stockIn': this.recordInfo.recordData
298
+            }
299
+            var storehouse_in_id = parseInt(this.storehouse_in_id)
300
+            var storehouse_out_id = parseInt(this.storehouse_out_id)
301
+            var id = parseInt(this.$route.query.id)
302
+            updateSencondOrder(params, this.warehousing_time,storehouse_in_id,storehouse_out_id,id).then(response => {
303
+              if (response.data.state == 1) {
304
+                var warehousingInfo = response.data.data.warehousingInfo   
305
+                this.$message.success('保存成功')
306
+                this.loading = false 
307
+                loading.close()
308
+              } else {
309
+                this.$message.error("保存失败")
310
+                loading.close()
311
+              }
312
+            })
313
+          } else {
314
+            return false
315
+          }
316
+        })
317
+      },
318
+      changeGoodName(val){
319
+        this.currentIndex = val
320
+      },
321
+      //获取基本数据信息
322
+      getlist(){
323
+       getSencondeGoodList().then(response=>{
324
+         if(response.data.state == 1){
325
+            var drugList = response.data.data.drugList
326
+            this.drugList= drugList
327
+            var goodList = response.data.data.goodList
328
+            this.goodList = goodList
329
+            var manufactuerList = response.data.data.manufactuerList
330
+            var goodTypeList = response.data.data.goodTypeList
331
+            this.goodTypeList = goodTypeList
332
+            var drugTypeList = response.data.data.drugTypeList
333
+            this.drugTypeList = drugTypeList
334
+            var houseList =  response.data.data.houseList
335
+            this.houseList = houseList
336
+
337
+            for(let i=0;i<drugList.length;i++){
338
+              for (let z = 0; z < drugList[i].drug_warehouse_info.length; z++) {
339
+                if (drugList[i].max_unit ==drugList[i].drug_warehouse_info[z].max_unit) {
340
+                    drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number *drugList[i].min_number;
341
+                }
342
+               }
343
+               for (let y = 0; y < this.drugTypeList.length; y++) {
344
+                  if (drugList[i].drug_type == this.drugTypeList[y].value) {
345
+                     drugList[i].drug_type = this.drugTypeList[y].name;
346
+                   }
347
+                }
348
+                drugList[i].name =drugList[i].drug_name + " " +drugList[i].dose + drugList[i].dose_unit + "*" +drugList[i].min_number +drugList[i].min_unit + "/" + drugList[i].max_unit + " " +drugList[i].manufacturer;
349
+                drugList[i].project_name =drugList[i].drug_name + " " +drugList[i].dose + drugList[i].dose_unit + "*" +drugList[i].min_number +drugList[i].min_unit + "/" + drugList[i].max_unit + " " +drugList[i].manufacturer;
350
+                drugList[i].project_type = drugList[i].drug_type;
351
+                drugList[i].second_specification_name = drugList[i].dose + drugList[i].dose_unit +"*" + drugList[i].min_number +drugList[i].min_unit +"/" + drugList[i].max_unit;
352
+                drugList[i].second_total = this.getWarehoseInfo(drugList[i].drug_warehouse_info,drugList[i].max_unit,drugList[i].min_unit,drugList[i].min_number);
353
+                drugList[i].is_source = 1
354
+                drugList[i].count = ""
355
+                drugList[i].remake = ""
356
+                drugList[i].min_price = drugList[i].min_price
357
+             if (drugList[i].max_unit != drugList[i].min_unit) {
358
+                drugList[i].unitList = [
359
+                    { id: 1, name: "" },
360
+                    { id: 2, name: "" },
361
+                ];
362
+             }
363
+            if (drugList[i].max_unit == drugList[i].min_unit) {
364
+               drugList[i].unitList = [{ id: 1, name: "" }];
365
+            }
366
+
367
+            drugList[i].sencond_unit = drugList[i].max_unit;
368
+            for (let j = 0; j < drugList[i].unitList.length; j++) {
369
+              if (drugList[i].max_unit != drugList[i].min_unit) {
370
+                drugList[i].unitList[0].name = drugList[i].max_unit;
371
+                drugList[i].unitList[1].name = drugList[i].min_unit;
372
+              }
373
+              if (drugList[i].max_unit == drugList[i].min_unit) {
374
+                drugList[i].unitList[0].name = drugList[i].max_unit;
375
+              }
376
+            }
377
+            this.tabList.push(drugList[i]);
378
+            }
379
+
380
+           for (let i = 0; i < goodList.length; i++) {
381
+            for (let y = 0; y < this.goodTypeList.length; y++) {
382
+              if (goodList[i].good_type_id == this.goodTypeList[y].id) {
383
+                goodList[i].good_type_id = this.goodTypeList[y].type_name;
384
+              }
385
+            }
386
+            goodList[i].project_name = goodList[i].good_name + " " + goodList[i].specification_name + " " + goodList[i].manufacturer;
387
+            goodList[i].project_type = goodList[i].good_type_id;
388
+            goodList[i].second_specification_name = goodList[i].specification_name;
389
+            goodList[i].second_total = this.getTotalStockCount(
390
+              goodList[i].good_warehouse_info
391
+            );
392
+            goodList[i].count = ""
393
+            goodList[i].is_source = 2;
394
+            goodList[i].name = goodList[i].good_name;
395
+            goodList[i].unitList = [{ id: 1, name: "" }];
396
+            goodList[i].sencond_unit = goodList[i].packing_unit;
397
+            goodList[i].remake = ""
398
+            goodList[i].min_price = goodList[i].retail_price
399
+            for (let j = 0; j < goodList[i].unitList.length; j++) {
400
+              goodList[i].unitList[0].name = goodList[i].packing_unit;
401
+            }
402
+            this.tabList.push(goodList[i]);
403
+          }
404
+            
405
+         }
406
+       })
407
+      },
408
+      
409
+      getWarehoseInfo(arr, max_unit, min_unit, min_number) {
410
+        var total = 0;
411
+        var max_str = "";
412
+        var min_str = "";
413
+        if (arr.length > 0) {
414
+            for (let i = 0; i < arr.length; i++) {
415
+            total += parseInt(arr[i].stock_max_number + arr[i].stock_min_number);
416
+            }
417
+        }
418
+        if (total < min_number) {
419
+            min_str = total + min_unit;
420
+        }
421
+        if (total == 0) {
422
+            min_str = "";
423
+            max_str = "";
424
+        }
425
+        if (total >= min_number) {
426
+            if (parseInt(total / min_number) != 0) {
427
+            max_str = parseInt(total / min_number) + max_unit;
428
+            }
429
+            if (total % min_number != 0) {
430
+            min_str = (total % min_number) + min_unit;
431
+            }
432
+        }
433
+        return max_str + min_str;
434
+      },
435
+      getTotalStockCount(arr) {
436
+        var total_count = 0;
437
+        for (let i = 0; i < arr.length; i++) {
438
+            total_count += arr[i].stock_count;
439
+        }
440
+        return total_count;
441
+      },
442
+     changeGoodName(val) {
443
+      this.currentIndex = val;
444
+    },
445
+    changeName(val) {
446
+      for (let i = 0; i < this.recordInfo.recordData.length; i++) {
447
+        if (this.currentIndex == i) {
448
+          this.recordInfo.recordData[i].project_id = val.id;
449
+          this.recordInfo.recordData[i].is_source = val.is_source;
450
+          this.recordInfo.recordData[i].name = val.name;
451
+          this.recordInfo.recordData[i].project_name = val.project_name;
452
+          this.recordInfo.recordData[i].project_type = val.project_type;
453
+          this.recordInfo.recordData[i].second_specification_name = val.second_specification_name;
454
+          this.recordInfo.recordData[i].second_total = val.second_total;
455
+          this.recordInfo.recordData[i].sencond_unit = val.sencond_unit
456
+          this.recordInfo.recordData[i].min_price = val.min_price
457
+          if (val.count == NaN) {
458
+            this.recordInfo.recordData[i].count = "";
459
+          } else {
460
+            this.recordInfo.recordData[i].count = val.count? val.count : "";
461
+          }
462
+          this.recordInfo.recordData[i].unitList = val.unitList;
463
+        }
464
+      }
465
+    },
466
+    getSencondOrderDetail(){
467
+       var id = parseInt(this.$route.query.id)
468
+      getSencondOrderDetail(id).then(response=>{
469
+         if(response.data.state == 1){
470
+           var warehouse = response.data.data.warehouse
471
+           this.storehouse_in_id = warehouse.storehouse_in_id
472
+           this.storehouse_out_id = warehouse.storehouse_out_id
473
+           var list = response.data.data.list
474
+           for(let i=0;i<list.length;i++){
475
+              list[i].id = list[i].id
476
+              list[i].name = list[i].project_name
477
+           }
478
+           this.recordInfo.recordData = list
479
+           console.log("list23233223323232322323",list)
480
+         }
481
+      })   
482
+    }
483
+    },
484
+    created() {
485
+      var nowDate = new Date()
486
+      var nowYear = nowDate.getFullYear()
487
+      var nowMonth = nowDate.getMonth() + 1
488
+      var nowDay = nowDate.getDate()
489
+      this.warehousing_time =
490
+        nowYear +
491
+        '-' +
492
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
493
+        '-' +
494
+        (nowDay < 10 ? '0' + nowDay : nowDay)
495
+      const tempObj = {}
496
+      tempObj["name"] = "";
497
+      tempObj['project_name'] = ""
498
+      tempObj['project_type'] = ""
499
+      tempObj['second_specification_name'] = ''
500
+      tempObj['sencond_unit'] = ''
501
+      tempObj['count'] = ''
502
+      tempObj['second_total'] = ''
503
+      tempObj["remake"] = ''
504
+      tempObj["is_source"] = 0
505
+      tempObj["project_id"] = 0
506
+      tempObj["min_price"] = 0
507
+      tempObj["id"] = 0
508
+      this.recordInfo.recordData.push(tempObj)
509
+      this.getlist()
510
+      this.getSencondOrderDetail()
511
+    }
512
+
513
+  }
514
+</script>
515
+
516
+<style>
517
+  #oictable ::-webkit-scrollbar {
518
+    height: 15px;
519
+  }
520
+</style>
521
+
522
+<style rel="stylesheet/css" lang="scss" scoped>
523
+  .information {
524
+    border: 1px #dcdfe6 solid;
525
+    padding: 30px 20px 30px 20px;
526
+
527
+  .border {
528
+    border-bottom: 1px #dcdfe6 solid;
529
+    margin: 0px 0 20px 0;
530
+  }
531
+
532
+  }
533
+
534
+  .edit_separater {
535
+    border-top: 1px solid rgb(233, 233, 233);
536
+    margin-top: 15px;
537
+    margin-bottom: 15px;
538
+  }
539
+  
540
+
541
+</style>
542
+
543
+<style>
544
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
545
+    font-size: 12px;
546
+  }
547
+
548
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
549
+    background: #6fb5fa;
550
+  }
551
+  .el-autocomplete-suggestion{
552
+    width: 400px !important;
553
+  }
554
+  
555
+
556
+</style>

+ 494 - 0
src/xt_pages/stock/testOrderQuery.vue 查看文件

@@ -0,0 +1,494 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+    </div>
6
+    <div class="app-container">
7
+      <div
8
+        style="
9
+          justify-content: space-between;
10
+          margin: 0px 0 12px 0;
11
+          display: flex;
12
+          align-items: center;
13
+        "
14
+      >
15
+        <div>
16
+          <el-date-picker
17
+            size="small"
18
+            v-model="start_time"
19
+            prefix-icon="el-icon-date"
20
+            :editable="false"
21
+            style="width: 196px"
22
+            type="date"
23
+            placeholder="选择日期时间"
24
+            align="right"
25
+            format="yyyy-MM-dd"
26
+            value-format="yyyy-MM-dd"
27
+            @change="startTimeChange"
28
+          ></el-date-picker
29
+          >-
30
+          <el-date-picker
31
+            size="small"
32
+            v-model="end_time"
33
+            prefix-icon="el-icon-date"
34
+            :editable="false"
35
+            style="width: 196px"
36
+            type="date"
37
+            placeholder="选择日期时间"
38
+            align="right"
39
+            format="yyyy-MM-dd"
40
+            value-format="yyyy-MM-dd"
41
+            @change="endTimeChange"
42
+          ></el-date-picker>
43
+          <span>审核状态:</span>
44
+          <el-select
45
+            v-model="check_id"
46
+            style="width: 140px; margin-right: 10px"
47
+            placeholder="请选择"
48
+            @change="changeTypeName"
49
+          >
50
+            <el-option
51
+              v-for="item in checkList"
52
+              :key="item.id"
53
+              :label="item.name"
54
+              :value="item.id"
55
+            >
56
+            </el-option>
57
+          </el-select>
58
+          <el-input
59
+            size="small"
60
+            style="width: 200px; margin-left: 10px"
61
+            class="filter-item"
62
+            v-model.trim="keywords"
63
+            placeholder="单据编号,仓库名称"
64
+          />
65
+          <el-button
66
+            size="small"
67
+            class="filter-item"
68
+            type="primary"
69
+            icon="el-icon-search"
70
+            @click="search"
71
+            >搜索</el-button
72
+          >
73
+        </div>
74
+        <div>
75
+          <el-button size="small" type="primary" @click="toAdd">新增</el-button>
76
+        </div>
77
+      </div>
78
+
79
+      <el-table
80
+        :row-style="{ color: '#303133' }"
81
+        :header-cell-style="{
82
+          backgroundColor: 'rgb(245, 247, 250)',
83
+          color: '#606266',
84
+        }"
85
+        :data="tableList"
86
+        :class="signAndWeighBoxPatients"
87
+        border
88
+      >
89
+        <el-table-column label="单据编号" align="center">
90
+          <template slot-scope="scope">
91
+            {{scope.row.second_order_number}}
92
+          </template>
93
+        </el-table-column>
94
+        <el-table-column label="单据日期" align="center">
95
+          <template slot-scope="scope">
96
+            {{getTime(scope.row.record_date)}}
97
+          </template>
98
+        </el-table-column>
99
+       
100
+        <el-table-column label="调出仓库" align="center" width="150">
101
+          <template slot-scope="scope">
102
+            {{getHouseName(scope.row.storehouse_out_id)}}
103
+          </template>
104
+        </el-table-column>
105
+        <el-table-column label="调入仓库" align="center">
106
+          <template slot-scope="scope">
107
+            {{getHouseName(scope.row.storehouse_in_id)}}
108
+          </template>
109
+        </el-table-column>
110
+
111
+        <el-table-column label="制单人" align="center">
112
+          <template slot-scope="scope">
113
+            {{getDocName(scope.row.creater)}}
114
+          </template>
115
+        </el-table-column>
116
+        <el-table-column label="审核人" align="center">
117
+          <template slot-scope="scope">
118
+           {{getDocName(scope.row.checker)}}
119
+          </template>
120
+        </el-table-column>
121
+
122
+        <el-table-column label="审核时间" align="center">
123
+          <template slot-scope="scope">
124
+          {{getTime(scope.row.checker)}}
125
+          </template>
126
+        </el-table-column>
127
+
128
+    
129
+        <el-table-column label="操作" align="center" width="300px">
130
+          <template slot-scope="scope">
131
+            <el-button
132
+              icon="el-icon-edit-outline"
133
+              size="small"
134
+              type="primary"
135
+              @click="toClick(scope.row.id)"
136
+              >编辑
137
+            </el-button>
138
+             <el-button
139
+              icon="el-icon-edit-outline"
140
+              size="small"
141
+              type="primary"
142
+              @click="toDetail(scope.row.id)"
143
+              >详情
144
+            </el-button>
145
+            <el-button
146
+              icon="el-icon-delete"
147
+              size="small"
148
+              type="danger"
149
+              @click="toDelete(scope.row, scope.$index)"
150
+              >删除
151
+            </el-button>
152
+          </template>
153
+        </el-table-column>
154
+      </el-table>
155
+      <el-pagination
156
+        @size-change="handleSizeChange"
157
+        @current-change="handleCurrentChange"
158
+        :page-sizes="[10, 50, 100, 200, 500, 1000]"
159
+        :page-size="10"
160
+        background
161
+        align="right"
162
+        style="margin-top: 20px"
163
+        layout="total, sizes, prev, pager, next, jumper"
164
+        :total="total"
165
+      >
166
+      </el-pagination>
167
+    </div>
168
+  </div>
169
+</template>
170
+
171
+<script>
172
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
173
+
174
+import {
175
+  getAllSecondOrderList
176
+} from "@/api/seconde";
177
+import { uParseTime } from "@/utils/tools";
178
+export default {
179
+  name: "stockIn",
180
+  components: {},
181
+  components: {
182
+    BreadCrumb,
183
+  },
184
+  data() {
185
+    return {
186
+      isActive: false,
187
+      Color_txt: true,
188
+      crumbs: [
189
+        { path: false, name: "采购管理" },
190
+        { path: "/supply/query", name: "采购订单" },
191
+      ],
192
+      keywords: "",
193
+      total: 0,
194
+      multipleSelection: [],
195
+      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
196
+      start_time: "",
197
+      end_time: "",
198
+      page: 1,
199
+      limit: 10,
200
+      goodType: [],
201
+      goodInfo: [],
202
+      org_id: 0,
203
+      types: [],
204
+      tableList: [{}],
205
+      type_name: "",
206
+      checkList: [
207
+        { id: 0, name: "请选择" },
208
+        { id: 1, name: "已审核" },
209
+        { id: 2, name: "未审核" },
210
+      ],
211
+      supplyList: [],
212
+      check_id: 0,
213
+      doctorList: [],
214
+      houseList:[],
215
+    };
216
+  },
217
+  methods: {
218
+    toAdd() {
219
+      this.$router.push({ path: "/purchase/order/add" });
220
+    },
221
+    changeTypeName() {
222
+      this.getlist();
223
+    },
224
+    startTimeChange() {
225
+      this.getlist();
226
+    },
227
+    endTimeChange() {
228
+      this.getlist();
229
+    },
230
+    search() {
231
+      this.getlist();
232
+    },
233
+    handleSizeChange(val) {
234
+      this.limit = val;
235
+      this.getlist();
236
+    },
237
+    handleCurrentChange(val) {
238
+      this.page = val;
239
+      this.getlist();
240
+    },
241
+    getTimes(time) {
242
+      if (time === "") {
243
+        return "";
244
+      }
245
+      return uParseTime(time, "{y}-{m}-{d}");
246
+    },
247
+    getlist() {
248
+      var params = {
249
+        check_id: this.check_id,
250
+        start_time: this.start_time,
251
+        end_time: this.end_time,
252
+        keyword: this.keywords,
253
+        page: this.page,
254
+        limit: this.limit,
255
+      };
256
+      console.log("params2332232332", params);
257
+      getAllSecondOrderList(params).then((response) => {
258
+        if (response.data.state == 1) {
259
+          var list = response.data.data.list;
260
+          console.log("list2323322332323232232323",list)
261
+          this.tableList = list;
262
+          var total = response.data.data.total;
263
+          this.total = total;
264
+          this.houseList = response.data.data.houseList
265
+          this.doctorList = response.data.data.doctorList
266
+        }
267
+      });
268
+    },
269
+    getName(id) {
270
+      var name = "";
271
+      for (let i = 0; i < this.supplyList.length; i++) {
272
+        if (id == this.supplyList[i].id) {
273
+          name = this.supplyList[i].supplier_name;
274
+        }
275
+      }
276
+      return name;
277
+    },
278
+    getDocName(id) {
279
+      var user_name = "";
280
+      for (let i = 0; i < this.doctorList.length; i++) {
281
+        if (id == this.doctorList[i].admin_user_id) {
282
+          user_name = this.doctorList[i].user_name;
283
+        }
284
+      }
285
+      return user_name;
286
+    },
287
+    getAllBuyPrice(arr) {
288
+      var buy_price = 0;
289
+      if (arr != undefined && arr.length > 0) {
290
+        for (let i = 0; i < arr.length; i++) {
291
+          buy_price += arr[i].count * arr[i].price;
292
+        }
293
+      }
294
+      return buy_price.toFixed(2);
295
+    },
296
+    getAllCount(arr) {
297
+      var count = 0;
298
+      if (arr != undefined && arr.length > 0) {
299
+        for (let i = 0; i < arr.length; i++) {
300
+          count += parseInt(arr[i].count);
301
+        }
302
+      }
303
+      if (count == 0) {
304
+        return "";
305
+      }
306
+      if (count > 0) {
307
+        return count;
308
+      }
309
+    },
310
+    toClick(id) {
311
+      window.sessionStorage.setItem('purchase_start_time',this.start_time)
312
+      window.sessionStorage.setItem('purchase_end_time',this.end_time)
313
+      this.$router.push({ path: "/stock/in/test/edit?id=" + id });
314
+    },
315
+    toDetail(id){
316
+      this.$router.push({ path: "/stock/in/test/detail?id=" + id });
317
+    },
318
+    toDelete(val, index) {
319
+      if (val.is_check == 1) {
320
+        this.$message.error("已审核单据,不能删除!");
321
+        return false;
322
+      }
323
+      if (val.orderOut.length > 0) {
324
+        this.$message.error("已关联单据,不能删除!");
325
+        return false;
326
+      }
327
+      this.$confirm("确认删除吗?", "删除", {
328
+        confirmButtonText: "确 定",
329
+        cancelButtonText: "取 消",
330
+        type: "warning",
331
+      }) .then(() => {
332
+          deletePurchaseOrder(val.id).then((response) => {
333
+            if (response.data.state == 1) {
334
+              var msg = response.data.data.msg;
335
+              this.tableList.splice(index, 1);
336
+              this.getlist()
337
+              this.$message.success("删除成功");
338
+            } else {
339
+              this.$message.error("删除失败");
340
+            }
341
+          });
342
+        }).catch(() => {});
343
+    },
344
+    // 动态改变表格样式
345
+    Color_Change() {
346
+      this.Color_txt = true;
347
+      console.log(this.Color_txt, "op");
348
+    },
349
+
350
+    Color_Changeleave() {
351
+      this.Color_txt = false;
352
+      console.log(this.Color_txt, "false");
353
+    },
354
+    getTime(time) {
355
+      if (time === '') {
356
+      return ''
357
+      }
358
+      return uParseTime(time, '{y}-{m}-{d}')
359
+     },
360
+    getHouseName(id){
361
+      var storehouse_name = ""
362
+      for(let i=0;i<this.houseList.length;i++){
363
+         if(id == this.houseList[i].id){
364
+           storehouse_name = this.houseList[i].storehouse_name
365
+         }
366
+      }
367
+      return storehouse_name
368
+    },
369
+   getDocName(id){
370
+      var user_name = ""
371
+      for(let i=0;i<this.doctorList.length;i++){
372
+        if(id == this.doctorList[i].admin_user_id){
373
+          user_name = this.doctorList[i].user_name
374
+        }
375
+      }
376
+      return user_name
377
+     },
378
+  },
379
+  created() {
380
+ 
381
+    var now = new Date(); //当前日期
382
+    var nowMonth = now.getMonth(); //当前月
383
+    var nowYear = now.getFullYear(); //当前年
384
+    //本月的开始时间
385
+    var monthStartDate = new Date(nowYear, nowMonth, 1);
386
+    this.start_time = this.getTimes(monthStartDate);
387
+    this.end_time = this.getTimes(new Date());
388
+
389
+    this.org_id = this.$store.getters.xt_user.org_id;
390
+    var start_time =  window.sessionStorage.getItem('purchase_start_time')
391
+    
392
+    var end_time =  window.sessionStorage.getItem('purchase_end_time')
393
+   
394
+    if(start_time !=null){
395
+      this.start_time = ""
396
+      this.start_time = start_time
397
+    }
398
+    if(end_time!=null){
399
+      this.end_time = ""
400
+      this.end_time = end_time
401
+    }
402
+    window.sessionStorage.removeItem('purchase_start_time')
403
+    window.sessionStorage.removeItem('purchase_end_time')
404
+   
405
+
406
+    this.getlist();
407
+   
408
+  },
409
+};
410
+</script>
411
+<style lang="scss">
412
+.cluster-rs {
413
+  text-align: center;
414
+}
415
+.annotation-rs {
416
+  width: 100%;
417
+  height: 100%;
418
+  border: none;
419
+  td {
420
+    width: 155px;
421
+    padding: 5px;
422
+    border-right: none;
423
+    text-align: center;
424
+    vertical-align: middle;
425
+  }
426
+}
427
+tr:last-child {
428
+  td {
429
+    border-bottom: none;
430
+  }
431
+}
432
+</style>
433
+
434
+<style rel="stylesheet/css" lang="scss" scoped>
435
+.information {
436
+  border: 1px #dcdfe6 solid;
437
+  padding: 30px 20px 30px 20px;
438
+
439
+  .border {
440
+    border-bottom: 1px #dcdfe6 solid;
441
+    margin: 0px 0 20px 0;
442
+  }
443
+}
444
+
445
+.title {
446
+  background: #409eff;
447
+  height: 44px;
448
+  line-height: 44px;
449
+  padding: 0 0 0 10px;
450
+  color: #fff;
451
+  margin: 0 0 10px 0;
452
+}
453
+
454
+.edit_separater {
455
+  border-top: 1px solid rgb(233, 233, 233);
456
+  margin-top: 15px;
457
+  margin-bottom: 15px;
458
+}
459
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
460
+  width: 10px;
461
+  height: 10px;
462
+}
463
+</style>
464
+
465
+<style>
466
+.sign-and-weigh-box .sign-and-weigh-box-patients .cell {
467
+  font-size: 12px;
468
+}
469
+
470
+.sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
471
+  background: #6fb5fa;
472
+}
473
+
474
+.count {
475
+  color: #bd2c00;
476
+}
477
+.el-table td,
478
+.el-table th.is-leaf,
479
+.el-table--border,
480
+.el-table--group {
481
+  border-color: #d0d3da;
482
+}
483
+.el-table--border::after,
484
+.el-table--group::after,
485
+.el-table::before {
486
+  background-color: #d0d3da;
487
+}
488
+
489
+.color {
490
+  background: none !important;
491
+  display: flex;
492
+  flex-direction: column;
493
+}
494
+</style>

+ 220 - 0
src/xt_pages/stock/warehouseManage/components/AddWareHouse.vue 查看文件

@@ -0,0 +1,220 @@
1
+<template>
2
+  <el-dialog
3
+    title="新增仓库信息"
4
+    :visible.sync="dialogVisible"
5
+    width="30%"
6
+    :before-close="closePop"
7
+  >
8
+    <div class="main_contain">
9
+      <el-form
10
+        :model="ruleForm"
11
+        :rules="rules"
12
+        :label-position="labelPosition"
13
+        ref="ruleForm"
14
+        label-width="100px"
15
+        class="demo-ruleForm"
16
+      >
17
+        <el-form-item label="仓库编号">
18
+          <span>{{storehouse_code}}</span>
19
+        </el-form-item>
20
+        <el-form-item label="仓库名称" prop="storehouse_name">
21
+          <el-input v-model="ruleForm.storehouse_name"></el-input>
22
+        </el-form-item>
23
+        <el-form-item label="仓库地址" prop="address">
24
+          <el-input type="textarea" v-model="ruleForm.address"></el-input>
25
+        </el-form-item>
26
+        <el-form-item label="状态" prop="status">
27
+          <el-radio-group v-model="ruleForm.status">
28
+            <el-radio :label="1" >启用</el-radio>
29
+            <el-radio :label="0" >禁用</el-radio>
30
+          </el-radio-group>
31
+        </el-form-item>
32
+        <el-form-item label="仓库管理员" ><!--prop="region">-->
33
+          admin
34
+<!--          <el-select v-model="ruleForm.region" placeholder="请选择管理员">-->
35
+<!--            <el-option label="admin" value="0"></el-option>-->
36
+<!--          </el-select>-->
37
+        </el-form-item>
38
+      </el-form>
39
+    </div>
40
+    <span slot="footer" class="dialog-footer">
41
+      <el-button @click="closePop">取 消</el-button>
42
+      <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
43
+    </span>
44
+  </el-dialog>
45
+</template>
46
+
47
+<script>
48
+import { getcode,addstorehouse,updatestorehouse } from "@/api/warehouse";
49
+import login from '../../../../mock/login'
50
+export default {
51
+  data() {
52
+    return {
53
+      show_type: 1,
54
+      storehouse_id: "",
55
+      storehouse_code:"coco",
56
+      dialogVisible: false,
57
+      labelPosition:'left',
58
+      ruleForm: {
59
+        admin_name:"",
60
+        storehouse_name: "",
61
+        region: "",
62
+        date1: "",
63
+        date2: "",
64
+        delivery: false,
65
+        type: [],
66
+        status: "",
67
+        address: "",
68
+      },
69
+      //表单验证规则
70
+      rules: {
71
+        storehouse_name:[{
72
+          required:true,message:"仓库名称不能为空",trigger: "change"
73
+        }],
74
+        address:[{
75
+          required:true,message:"仓库地址不能为空",trigger: "change"
76
+        }],
77
+        // region: [{ required: true, message: "请选择活动区域", trigger: "change" }],
78
+        type: [{
79
+            type: "array",
80
+            required: true,
81
+            message: "请至少选择一个活动性质",
82
+            trigger: "change",
83
+          },],
84
+        desc: [{ required: true, message: "请填写活动形式", trigger: "blur" }],
85
+      },
86
+      type:"",
87
+      // storehouse:{
88
+      //   storehouse_code:"",
89
+      // },
90
+    };
91
+  },
92
+  methods: {
93
+    show(data, type) {
94
+      if (type == 1) {
95
+        this.initstorehouseData();
96
+        this.show_type = 1;
97
+        this.title = "新增仓库";
98
+        this.dialogVisible = true;
99
+      } else if (type == 2) {
100
+        console.log("data:::::::::::",data);
101
+        this.show_type = 2;
102
+        this.storehouse_id = data.id;
103
+        this.title = "编辑仓库";
104
+        this.storehouse_code = data.storehouse_code;
105
+        this.ruleForm.address = data.storehouse_address;
106
+        this.ruleForm.status = data.storehouse_status;
107
+        this.ruleForm.storehouse_name = data.storehouse_name;
108
+        this.ruleForm.admin_name = data.storehouse_admin_name;
109
+        console.log("this.ruleForm.admin_name",this.ruleForm.admin_name);
110
+        this.dialogVisible = true;
111
+      }
112
+    },
113
+    // 获取仓库编码接口
114
+    initstorehouseData() {
115
+      getcode().then((res) => {
116
+        if (res.data.state == 1) {
117
+          this.storehouse_code =
118
+            res.data.data.list;
119
+        }
120
+      });
121
+    },
122
+    //清除表单数据
123
+    closePop() {
124
+      console.log("this.ruleForm",this.ruleForm)
125
+      this.dialogVisible = false;
126
+      this.ruleForm.storehouse_name = "";
127
+      this.ruleForm.region = "";
128
+      this.ruleForm.date1 = "";
129
+      this.ruleForm.date2 = "";
130
+      this.ruleForm.type = [];
131
+      this.ruleForm.status = "";
132
+      this.ruleForm.address = "";
133
+    },
134
+
135
+
136
+    //  验证表单内容
137
+    submitForm(ruleForm) {
138
+      if (this.show_type == 1) {
139
+        this.$refs[ruleForm].validate((valid) => {
140
+          if (valid) {
141
+            console.log("this.ruleForm.status",this.ruleForm.status);
142
+            let params = {
143
+              storehouse_code: this.storehouse_code || "",
144
+              storehouse_name: this.ruleForm.storehouse_name || "",
145
+              storehouse_address: this.ruleForm.address || "",
146
+              storehouse_status:parseInt(this.ruleForm.status)
147
+              // storehouse_admin_id: this.ruleForm.storehouse_admin_id || "",
148
+              // storehouse_admin_name: this.ruleForm.storehouse_admin_name || "",
149
+            };
150
+            console.log("params::::",params)
151
+            console.log("status::::",this.ruleForm.status)
152
+            addstorehouse(params).then((res) => {
153
+              if (res.data.state == 1) {
154
+                this.$message.success("新增成功");
155
+                this.closePop();
156
+                this.$emit("init");
157
+              } else {
158
+                this.$message.error("新增失败:" + res.data.msg);
159
+                setTimeout(() => {
160
+                  this.closePop();
161
+                }, 2000);
162
+              }
163
+            });
164
+          } else {
165
+            return false;
166
+          }
167
+        });
168
+      } else if (this.show_type == 2) {
169
+        this.$refs[ruleForm].validate((valid) => {
170
+          if (valid) {
171
+            console.log("this.ruleForm.status",this.ruleForm.status);
172
+            let params = {
173
+              storehouse_code: this.storehouse_code || "",
174
+              storehouse_name: this.ruleForm.storehouse_name || "",
175
+              storehouse_address: this.ruleForm.address || "",
176
+              storehouse_status:parseInt(this.ruleForm.status),
177
+              id: this.storehouse_id
178
+              // storehouse_admin_id: this.ruleForm.storehouse_admin_id || "",
179
+              // storehouse_admin_name: this.ruleForm.storehouse_admin_name || "",
180
+            };
181
+            updatestorehouse(params).then((res) => {
182
+              if (res.data.state == 1) {
183
+                this.$message.success("保存成功");
184
+                this.closePop();
185
+                this.$emit("init");
186
+              } else {
187
+                this.$message.error("保存失败:" + res.data.msg);
188
+                setTimeout(() => {
189
+                  this.closePop();
190
+                }, 2000);
191
+              }
192
+            });
193
+          } else {
194
+            return false;
195
+          }
196
+        });
197
+      }
198
+      this.contactsinfo();
199
+    },
200
+
201
+
202
+
203
+
204
+  },
205
+};
206
+</script>
207
+
208
+<style lang="scss" scoped>
209
+.main_contain {
210
+  width: 60%;
211
+  display: flex;
212
+  flex-direction: column;
213
+  margin: 0 auto;
214
+  .main_list {
215
+    height: 30px;
216
+    display: flex;
217
+    line-height: 30px;
218
+  }
219
+}
220
+</style>

+ 368 - 0
src/xt_pages/stock/warehouseManage/query.vue 查看文件

@@ -0,0 +1,368 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+    </div>
6
+    <div class="app-container">
7
+      <div
8
+        style="
9
+          justify-content: space-between;
10
+          margin: 0px 0 12px 0;
11
+          display: flex;
12
+          align-items: center;
13
+        "
14
+      >
15
+        <div>
16
+          <el-input
17
+            size="small"
18
+            style="width: 200px; margin-left: 10px"
19
+            class="filter-item"
20
+            v-model.trim="keyword"
21
+            placeholder=""
22
+          />
23
+          <el-button
24
+            size="small"
25
+            class="filter-item"
26
+            type="primary"
27
+            icon="el-icon-search"
28
+            @click="search"
29
+            >搜索</el-button
30
+          >
31
+        </div>
32
+        <div>
33
+          <el-button size="small" type="primary" @click="AddWareHouse(1)">新增</el-button>
34
+          <el-button size="small" type="primary" @click="toPrint">设置</el-button>
35
+        </div>
36
+      </div>
37
+
38
+      <el-table
39
+        :row-style="{ color: '#303133' }"
40
+        :header-cell-style="{
41
+          backgroundColor: 'rgb(245, 247, 250)',
42
+          color: '#606266',
43
+        }"
44
+        :data="tableData"
45
+        :class="signAndWeighBoxPatients"
46
+        border
47
+      >
48
+        <el-table-column label="仓库编号" align="center">
49
+          <template slot-scope="scope">
50
+            <span>{{ scope.row.storehouse_code ? scope.row.storehouse_code : "" }}</span>
51
+          </template>
52
+        </el-table-column>
53
+        <el-table-column label="仓库名称" align="center">
54
+          <template slot-scope="scope">
55
+            <span>{{ scope.row.storehouse_name ? scope.row.storehouse_name : "" }}</span>
56
+          </template>
57
+        </el-table-column>
58
+        <el-table-column label="仓库地址" align="center">
59
+          <template slot-scope="scope">
60
+            <span>{{ scope.row.storehouse_address ? scope.row.storehouse_address : "" }}</span>
61
+          </template>
62
+        </el-table-column>
63
+        <el-table-column label="仓库管理员" align="center">
64
+          <template slot-scope="scope">
65
+            <span>{{ scope.row.storehouse_admin_name ? scope.row.storehouse_admin_name : "" }}</span>
66
+          </template>
67
+        </el-table-column>
68
+        <el-table-column label="状态" align="center">
69
+          <template slot-scope="scope">
70
+            <span v-if="scope.row.storehouse_status == 1">启用</span>
71
+            <span v-if="scope.row.storehouse_status == 0">禁用</span>
72
+          </template>
73
+        </el-table-column>
74
+
75
+        <el-table-column label="操作" align="center" width="260px">
76
+          <template slot-scope="scope">
77
+            <el-tooltip class="item" content="编辑" placement="top-start">
78
+              <el-button
79
+                icon="el-icon-edit-outline"
80
+                size="small"
81
+                type="primary"
82
+                @click="toEdit(scope.row,2)"
83
+              >
84
+              </el-button>
85
+            </el-tooltip>
86
+
87
+            <el-tooltip class="item" content="禁用" placement="top-start">
88
+              <el-button
89
+                size="small"
90
+                type="danger"
91
+                @click="toDisable(scope.row, scope.row.$index)"
92
+                ><img
93
+                  src="../../../assets/purchase/ban.png"
94
+                  alt=""
95
+                  style="width: 12px"
96
+                />
97
+              </el-button>
98
+            </el-tooltip>
99
+
100
+            <el-tooltip class="item" content="删除" placement="top-start">
101
+              <el-button
102
+                icon="el-icon-delete"
103
+                size="small"
104
+                type="danger"
105
+                @click="toDelete(scope.row, scope.row.$index)"
106
+              >
107
+              </el-button>
108
+            </el-tooltip>
109
+          </template>
110
+        </el-table-column>
111
+      </el-table>
112
+      <el-pagination
113
+        @size-change="handleSizeChange"
114
+        @current-change="handleCurrentChange"
115
+        :page-sizes="[10, 50, 100, 200, 500, 1000]"
116
+        :page-size="10"
117
+        background
118
+        align="right"
119
+        style="margin-top: 20px"
120
+        layout="total, sizes, prev, pager, next, jumper"
121
+        :total="total"
122
+      >
123
+      </el-pagination>
124
+    </div>
125
+
126
+    <AddWareHouse ref="AddWareHouse" @init="initData" ></AddWareHouse>
127
+  </div>
128
+</template>
129
+
130
+<script>
131
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
132
+import { getDictionaryDataConfig, getDataConfig } from "@/utils/data";
133
+import { storehouselist,updatestatus,deletestorehouse } from "@/api/warehouse";
134
+import AddWareHouse from "./components/AddWareHouse.vue";
135
+export default {
136
+  name: "stockIn",
137
+  created() {
138
+    var types = getDictionaryDataConfig("system", "drug_type");
139
+    console.log("44444", types);
140
+    var arr = [];
141
+    var obj = { id: 0, name: "全部" };
142
+    arr.push(obj);
143
+    arr.push(...types);
144
+    this.drugType = arr;
145
+    console.log("arrr", arr);
146
+    this.getlist();
147
+  },
148
+  components: {
149
+    BreadCrumb,
150
+    AddWareHouse,
151
+  },
152
+  data() {
153
+    return {
154
+      crumbs: [
155
+        { path: false, name: "库房管理" },
156
+        { path: "/stock/warehousequery", name: "仓库管理" },
157
+      ],
158
+      keyword: "",
159
+      total: 0,
160
+      multipleSelection: [],
161
+      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
162
+      page: 1,
163
+      limit: 10,
164
+      tableData: [],
165
+      drugType: [],
166
+      stockOutData: [],
167
+    };
168
+  },
169
+  methods: {
170
+    initData() {
171
+      let params = {
172
+        limit: this.limit,
173
+        page: this.page,
174
+        keyword:this.keyword,
175
+      };
176
+      //请求分页接口
177
+      storehouselist(params).then((response) => {
178
+        if (response.data.state == 1) {
179
+          this.tableData = response.data.data.list;
180
+          this.total = response.data.data.total;
181
+        }
182
+      });
183
+    },
184
+
185
+    getlist() {
186
+      var params = {
187
+        keyword: this.keyword,
188
+        page: this.page,
189
+        limit: this.limit,
190
+      };
191
+      console.log("params", params);
192
+      //请求分页接口
193
+      storehouselist(params).then((response) => {
194
+        if (response.data.state == 1) {
195
+          this.tableData = response.data.data.list;
196
+          this.total = response.data.data.total;
197
+        }
198
+      });
199
+    },
200
+    handleSizeChange(val) {
201
+      this.limit = val;
202
+      this.getlist();
203
+    },
204
+    handleCurrentChange(val) {
205
+      this.page = val;
206
+      this.getlist();
207
+    },
208
+
209
+    startTimeChange: function (val) {
210
+      var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
211
+
212
+      if (time > 0) {
213
+        this.$message.error("开始时间不能大于结束时间");
214
+        this.start_time = "";
215
+      } else {
216
+        this.getlist();
217
+      }
218
+    },
219
+    endTimeChange: function (val) {
220
+      var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
221
+      if (time < 0) {
222
+        this.$message.error("结束时间不能小于开始时间");
223
+        this.end_time = "";
224
+      } else {
225
+        this.getlist();
226
+      }
227
+    },
228
+
229
+    search: function () {
230
+      this.getlist();
231
+    },
232
+    // 新增仓库
233
+    AddWareHouse(val) {
234
+      this.$refs.AddWareHouse.show(1, val);
235
+    },
236
+    // 编辑仓库
237
+    toEdit(data,val) {
238
+      console.log("data is :",data)
239
+      this.$refs.AddWareHouse.show(data,val);
240
+    },
241
+    // 禁用仓库
242
+    toDisable(val, index) {
243
+      var params = {
244
+        id:val.id,
245
+      };
246
+      this.$confirm("是否确定将此仓库禁用?", "禁用仓库信息", {
247
+        confirmButtonText: "确 定",
248
+        cancelButtonText: "取 消",
249
+        type: "warning",
250
+      }).then(() => {
251
+        updatestatus(params).then((res) => {
252
+          if (res.data.state == 1) {
253
+            this.$message.success(res.data.data.list);
254
+          }else {
255
+            this.$message.error(res.data.msg);
256
+          }
257
+        })//刷新
258
+        .then(() =>{
259
+          this.initData();
260
+        })
261
+        .catch((err) => {
262
+          console.log(err)
263
+        })
264
+        }).catch(() => {});
265
+    },
266
+    //删除仓库
267
+    toDelete(val, index) {
268
+      var params = {
269
+        id:val.id,
270
+      };
271
+      this.$confirm("是否确定将此仓库删除?", "删除仓库信息", {
272
+        confirmButtonText: "确 定",
273
+        cancelButtonText: "取 消",
274
+        type: "warning",
275
+      }).then(() => {
276
+        deletestorehouse(params).then((res) => {
277
+          if (res.data.state == 1) {
278
+            this.$message.success(res.data.data.list);
279
+          }else {
280
+            this.$message.error(res.data.msg);
281
+          }
282
+        })//刷新
283
+          .then(() =>{
284
+            this.initData();
285
+          })
286
+          .catch((err) => {
287
+            console.log(err)
288
+          })
289
+      }).catch(() => {});
290
+    },
291
+
292
+    formatJson(filterVal, jsonData) {
293
+      return jsonData.map((v) => filterVal.map((j) => v[j]));
294
+    },
295
+    changeTypeName() {
296
+      this.getlist();
297
+    },
298
+
299
+    //路由跳转 ----- 仓库设置
300
+    toPrint() {
301
+      this.$router.push({ path: "/stock/waresetting" });
302
+    },
303
+
304
+    getTimestamp(time) {
305
+      // 把时间日期转成时间戳
306
+      return new Date(time).getTime() / 1000;
307
+    },
308
+    getDictionaryDataConfig(module, filed_name) {
309
+      return getDictionaryDataConfig(module, filed_name);
310
+    },
311
+    getDataConfig(module, filed_name) {
312
+      return getDataConfig(module, filed_name);
313
+    },
314
+  },
315
+};
316
+</script>
317
+
318
+<style rel="stylesheet/css" lang="scss" scoped>
319
+.information {
320
+  border: 1px #dcdfe6 solid;
321
+  padding: 30px 20px 30px 20px;
322
+
323
+  .border {
324
+    border-bottom: 1px #dcdfe6 solid;
325
+    margin: 0px 0 20px 0;
326
+  }
327
+}
328
+
329
+.title {
330
+  background: #409eff;
331
+  height: 44px;
332
+  line-height: 44px;
333
+  padding: 0 0 0 10px;
334
+  color: #fff;
335
+  margin: 0 0 10px 0;
336
+}
337
+
338
+.edit_separater {
339
+  border-top: 1px solid rgb(233, 233, 233);
340
+  margin-top: 15px;
341
+  margin-bottom: 15px;
342
+}
343
+</style>
344
+
345
+<style>
346
+.sign-and-weigh-box .sign-and-weigh-box-patients .cell {
347
+  font-size: 12px;
348
+}
349
+
350
+.sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
351
+  background: #6fb5fa;
352
+}
353
+
354
+.count {
355
+  color: #bd2c00;
356
+}
357
+.el-table td,
358
+.el-table th.is-leaf,
359
+.el-table--border,
360
+.el-table--group {
361
+  border-color: #d0d3da;
362
+}
363
+.el-table--border::after,
364
+.el-table--group::after,
365
+.el-table::before {
366
+  background-color: #d0d3da;
367
+}
368
+</style>

+ 198 - 0
src/xt_pages/stock/warehouseManage/waresetting.vue 查看文件

@@ -0,0 +1,198 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+
6
+      <el-button type="primary" @click="returnTo">返回</el-button>
7
+    </div>
8
+    <div class="app-container">
9
+      <div class="set-contanin">
10
+        <div class="select-list">
11
+          <div style="line-height: 36px; white-space: nowrap">
12
+            请选择耗材自动入库仓库:
13
+          </div>
14
+          <el-select v-model="h1" placeholder="请选择" @select="handleSelect1" @change="updateconfig1(h1)" >
15
+            <el-option
16
+              v-for="item in options"
17
+              :key="item.storehouse_name"
18
+              :label="item.storehouse_name"
19
+              :value="item.id"
20
+            >
21
+            </el-option>
22
+          </el-select>
23
+        </div>
24
+        <div class="select-list">
25
+          <div style="line-height: 36px; white-space: nowrap">
26
+            请选择耗材自动出库仓库:
27
+          </div>
28
+          <el-select v-model="h2" placeholder="请选择" @select="handleSelect2" @change="updateconfig2(h2)">
29
+            <el-option
30
+              v-for="item in options"
31
+              :key="item.storehouse_name"
32
+              :label="item.storehouse_name"
33
+              :value="item.id"
34
+            >
35
+            </el-option>
36
+          </el-select>
37
+        </div>
38
+        <div class="select-list">
39
+          <div style="line-height: 36px; white-space: nowrap">
40
+            请选择药品自动入库仓库:
41
+          </div>
42
+          <el-select v-model="h3" placeholder="请选择" @select="handleSelect3" @change="updateconfig3(h3)">
43
+            <el-option
44
+              v-for="item in options"
45
+              :key="item.storehouse_name"
46
+              :label="item.storehouse_name"
47
+              :value="item.id"
48
+            >
49
+            </el-option>
50
+          </el-select>
51
+        </div>
52
+        <div class="select-list">
53
+          <div style="line-height: 36px; white-space: nowrap">
54
+            请选择药品自动出库仓库:
55
+          </div>
56
+          <el-select v-model="h4" placeholder="请选择" @select="handleSelect4" @change="updateconfig4(h4)">
57
+            <el-option
58
+              v-for="item in options"
59
+              :key="item.storehouse_name"
60
+              :label="item.storehouse_name"
61
+              :value="item.id"
62
+            >
63
+            </el-option>
64
+          </el-select>
65
+        </div>
66
+      </div>
67
+    </div>
68
+  </div>
69
+</template>
70
+
71
+<script>
72
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
73
+import { getallstorehousename,findstorehouseconfig,updateinfo,updateoutinfo,updatedruginfo,updatedrugout } from "@/api/warehouse";
74
+export default {
75
+  components: {
76
+    BreadCrumb,
77
+  },
78
+  data() {
79
+    return {
80
+      crumbs: [
81
+        { path: false, name: "库房管理" },
82
+        { path: false, name: "仓库管理" },
83
+        { path: false, name: "仓库设置" },
84
+      ],
85
+      options:[],
86
+      h1:"",
87
+      h2:"",
88
+      h3:"",
89
+      h4:"",
90
+    };
91
+  },
92
+
93
+  created(){
94
+    this.initData()
95
+  },
96
+
97
+  methods:{
98
+      returnTo(){
99
+          this.$router.back(-1)
100
+      },
101
+    initData() {
102
+      let params = {};
103
+      //获取当前机构的所有可用仓库名称接口
104
+      getallstorehousename(params).then((response) => {
105
+        if (response.data.state == 1) {
106
+          this.options = response.data.data.list;
107
+        }
108
+      });
109
+      let param ={}
110
+      findstorehouseconfig(param).then((response) => {
111
+        if (response.data.state == 1) {
112
+          console.log("response",response)
113
+          this.h1 = response.data.data.storehouse_info;
114
+          this.h2 = response.data.data.storehouse_out_info;
115
+          this.h3 = response.data.data.drug_storehouse_info;
116
+          this.h4 = response.data.data.drug_storehouse_out;
117
+        }
118
+      });
119
+    },
120
+
121
+    handleSelect1(item) {
122
+      this.h1 = item.storehouse_name;
123
+    },
124
+    handleSelect2(item) {
125
+      this.h2 = item.storehouse_name;
126
+    },
127
+    handleSelect3(item) {
128
+      this.h3 = item.storehouse_name;
129
+    },
130
+    handleSelect4(item) {
131
+      this.h4 = item.storehouse_name;
132
+    },
133
+    updateconfig1(h1){
134
+      let params = {
135
+        id:h1
136
+      };
137
+      updateinfo(params).then((response) => {
138
+        if (response.data.state == 1) {
139
+          this.$message.success("修改成功");
140
+        }
141
+      });
142
+    },
143
+    updateconfig2(h2){
144
+      let params = {
145
+        id:h2
146
+      };
147
+      updateoutinfo(params).then((response) => {
148
+        if (response.data.state == 1) {
149
+          this.$message.success("修改成功");
150
+        }
151
+      });
152
+    },
153
+    updateconfig3(h3){
154
+      let params = {
155
+        id:h3
156
+      };
157
+      updatedruginfo(params).then((response) => {
158
+        if (response.data.state == 1) {
159
+          this.$message.success("修改成功");
160
+        }
161
+      });
162
+    },
163
+    updateconfig4(h4){
164
+      let params = {
165
+        id:h4
166
+      };
167
+      updatedrugout(params).then((response) => {
168
+        if (response.data.state == 1) {
169
+          this.$message.success("修改成功");
170
+        }
171
+      });
172
+    },
173
+
174
+
175
+  }
176
+};
177
+</script>
178
+
179
+<style rel="stylesheet/css" lang="scss" scoped>
180
+.set-contanin {
181
+  width: 30%;
182
+  height: 50%;
183
+  position: absolute;
184
+  top: 0;
185
+  left: 0;
186
+  right: 0;
187
+  bottom: 0;
188
+  /* 横竖都居中 */
189
+  margin: auto;
190
+  .select-list {
191
+    display: flex;
192
+    padding: 10px 0;
193
+  }
194
+}
195
+/deep/ .el-input__inner {
196
+  width: 202px;
197
+}
198
+</style>

+ 19 - 10
src/xt_pages/supply/components/addGoodReturn.vue 查看文件

@@ -717,12 +717,15 @@ export default {
717 717
       this.recordInfo.tableList.push(tempObj);
718 718
     },
719 719
     handleDelete: function (index, row) {
720
-      if (this.recordInfo.tableList.length <= 1) {
721
-        this.$message.error("只有一条记录的时候无法删除");
722
-        return;
723
-      }else{
724
-        this.recordInfo.tableList.splice(index, 1);
720
+      if(row.id == 0){
721
+       if (this.recordInfo.tableList.length <= 1) {
722
+          this.$message.error("只有一条记录的时候无法删除");
723
+          return;
724
+        }else{
725
+          this.recordInfo.tableList.splice(index, 1);
726
+        }
725 727
       }
728
+     
726 729
       if (row.id > 0) {
727 730
         const params = {
728 731
             id: row.id
@@ -821,10 +824,18 @@ export default {
821 824
     },
822 825
   getAllPrice() {
823 826
       var total_price = 0;
827
+      console.log(this.recordInfo.tableList,'this.recordInfo.tableList')
824 828
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
825
-        total_price += this.recordInfo.tableList[i].supply_price *this.recordInfo.tableList[i].supply_count - (this.recordInfo.tableList[i].supply_price*this.recordInfo.tableList[i].supply_count*(this.recordInfo.tableList[i].deposit_rate/100));
829
+        total_price += 
830
+        this.recordInfo.tableList[i].supply_price*
831
+        this.recordInfo.tableList[i].supply_count - 
832
+        (this.recordInfo.tableList[i].supply_price*
833
+        this.recordInfo.tableList[i].supply_count*
834
+        (this.recordInfo.tableList[i].deposit_rate/100));
835
+        console.log(total_price,'this.total_price')
826 836
       }
827 837
       this.total_price = total_price;
838
+      
828 839
       // this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
829 840
       if(total_price > 0){
830 841
         return total_price.toFixed(2);
@@ -889,12 +900,12 @@ export default {
889 900
       var ids = this.$route.query.ids;
890 901
       getGoodOrderDetailList(id,ids).then((response) => {
891 902
         if (response.data.state == 1) {
903
+          console.log(response.data.data.list,'oooresponse.data.data.list')
892 904
           var out = response.data.data.out;
893 905
           this.id = out.id;
894 906
           this.supplier_name = out.supplier_id;
895 907
           this.rate_of_concession = out.rate_of_concession;
896 908
           this.discount_amount = out.discount_amount;
897
-
898 909
           this.start_time = this.getTimes(out.document_date);
899 910
           var orderInfo = response.data.data.list;
900 911
           console.log("orderINFO233232232332", orderInfo);
@@ -974,8 +985,6 @@ export default {
974 985
                   orderInfo[i].unitList[0].name = goodList[j].packing_unit;
975 986
                   orderInfo[i].count =  this.getTotalStockCountSix(orderInfo[i].good_warehouse_info,orderInfo[i].warehouse_out_id)
976 987
                 }
977
-
978
-               
979 988
               }
980 989
               orderInfo[i].sum_count = orderInfo[i].count
981 990
               orderInfo[i].min_number = 0
@@ -1222,7 +1231,7 @@ export default {
1222 1231
        warehouse_out_id:this.warehouse_out_id,
1223 1232
        id:this.id,
1224 1233
      }
1225
-     console.log("审核2322323232323",params)
1234
+    //  console.log("审核2322323232323",params)
1226 1235
  
1227 1236
      checkReturnOrder(params).then(response=>{
1228 1237
        if(response.data.state == 1){