浏览代码

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

csx 2 年前
父节点
当前提交
090278a743
共有 87 个文件被更改,包括 14531 次插入2239 次删除
  1. 47 65
      src/api/config.js
  2. 12 12
      src/api/drug/drug_stock.js
  3. 97 0
      src/api/seconde.js
  4. 26 11
      src/api/stock.js
  5. 22 21
      src/api/warehouse.js
  6. 6 2
      src/lang/zh.js
  7. 7 2
      src/router/modules/hisTool.js
  8. 12 0
      src/router/modules/stock.js
  9. 28 1
      src/xt_pages/data/basicConfig.vue
  10. 20 36
      src/xt_pages/data/components/addInspection.vue
  11. 15 0
      src/xt_pages/data/components/editInspection.vue
  12. 248 155
      src/xt_pages/dialysis/PatientBox.vue
  13. 13 1
      src/xt_pages/dialysis/bloodPresssWatch.vue
  14. 38 1
      src/xt_pages/dialysis/dialysisPrintOrder.vue
  15. 3709 0
      src/xt_pages/dialysis/template/DialysisPrintOrderFifty.vue
  16. 2 2
      src/xt_pages/dialysis/template/DialysisPrintOrderFortyEight.vue
  17. 2238 0
      src/xt_pages/dialysis/template/DialysisPrintOrderFortyNine.vue
  18. 10 5
      src/xt_pages/dialysis/template/DialysisPrintOrderFortySeven.vue
  19. 5 0
      src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue
  20. 1 1
      src/xt_pages/hospitalStation/allListTemplate/printOne.vue
  21. 1 0
      src/xt_pages/hospitalStation/doctorDesk.vue
  22. 5 4
      src/xt_pages/outpatientCharges/allListTemplate/summaryPrint.vue
  23. 3 4
      src/xt_pages/outpatientCharges/listTemplate/listPrintTwo.vue
  24. 583 441
      src/xt_pages/outpatientDoctorStation/checkTemplate/printOne.vue
  25. 3 0
      src/xt_pages/outpatientDoctorStation/doctorDesk.vue
  26. 1 1
      src/xt_pages/outpatientDoctorStation/print.vue
  27. 11 3
      src/xt_pages/outpatientDoctorStation/template/printOne.vue
  28. 1 0
      src/xt_pages/outpatientDoctorStation/template/printSix.vue
  29. 314 0
      src/xt_pages/outpatientTool/components/drugDetail.vue
  30. 271 0
      src/xt_pages/outpatientTool/components/goodDetail.vue
  31. 307 0
      src/xt_pages/outpatientTool/zeroSummary.vue
  32. 1 1
      src/xt_pages/qcd/indicatorControlAnalysis/weight.vue
  33. 55 16
      src/xt_pages/stock/cancelStockOrder.vue
  34. 26 12
      src/xt_pages/stock/cancelStockOrderAdd.vue
  35. 16 2
      src/xt_pages/stock/cancelStockOrderEdit.vue
  36. 0 0
      src/xt_pages/stock/config/stock_setting.vue
  37. 48 47
      src/xt_pages/stock/detail/cancelStockDetail.vue
  38. 50 8
      src/xt_pages/stock/detail/stockInDetail.vue
  39. 77 37
      src/xt_pages/stock/detail/stockOutDetail.vue
  40. 56 11
      src/xt_pages/stock/drugs/cancelDrugStockOrder.vue
  41. 20 3
      src/xt_pages/stock/drugs/cancelDrugStockOrderAdd.vue
  42. 24 12
      src/xt_pages/stock/drugs/cancelDrugStockOrderEdit.vue
  43. 22 19
      src/xt_pages/stock/drugs/components/drugCancelDetail.vue
  44. 54 10
      src/xt_pages/stock/drugs/components/drugInOrder.vue
  45. 56 18
      src/xt_pages/stock/drugs/components/drugOutDetail.vue
  46. 25 9
      src/xt_pages/stock/drugs/drugBatchNumber.vue
  47. 39 0
      src/xt_pages/stock/drugs/drugDamaged.vue
  48. 39 25
      src/xt_pages/stock/drugs/drugStockFlow.vue
  49. 70 20
      src/xt_pages/stock/drugs/drugStockInOrder.vue
  50. 22 7
      src/xt_pages/stock/drugs/drugStockInOrderAdd.vue
  51. 33 18
      src/xt_pages/stock/drugs/drugStockInOrderEdit.vue
  52. 72 28
      src/xt_pages/stock/drugs/drugStockOutOrder.vue
  53. 51 9
      src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue
  54. 3 1
      src/xt_pages/stock/drugs/drugStockOutOrderDetail.vue
  55. 64 8
      src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue
  56. 41 3
      src/xt_pages/stock/drugs/inventory.vue
  57. 41 3
      src/xt_pages/stock/drugs/inventoryDetails.vue
  58. 234 35
      src/xt_pages/stock/drugs/query.vue
  59. 3 1
      src/xt_pages/stock/index.vue
  60. 110 70
      src/xt_pages/stock/inventory.vue
  61. 42 0
      src/xt_pages/stock/inventoryDetails.vue
  62. 668 116
      src/xt_pages/stock/inventoryTransfer/Addtrans.vue
  63. 301 38
      src/xt_pages/stock/inventoryTransfer/index.vue
  64. 86 26
      src/xt_pages/stock/inventoryTransfer/transDetails.vue
  65. 1021 0
      src/xt_pages/stock/inventoryTransfer/transEdit.vue
  66. 24 12
      src/xt_pages/stock/stockBatchNumber.vue
  67. 43 24
      src/xt_pages/stock/stockDamaged.vue
  68. 31 20
      src/xt_pages/stock/stockFlow.vue
  69. 75 24
      src/xt_pages/stock/stockInOrder.vue
  70. 24 10
      src/xt_pages/stock/stockInOrderAdd.vue
  71. 37 7
      src/xt_pages/stock/stockInOrderEdit.vue
  72. 73 10
      src/xt_pages/stock/stockOutOrder.vue
  73. 58 18
      src/xt_pages/stock/stockOutOrderAdd.vue
  74. 105 53
      src/xt_pages/stock/stockOutOrderEdit.vue
  75. 535 640
      src/xt_pages/stock/stockQuery.vue
  76. 536 0
      src/xt_pages/stock/testOrder.vue
  77. 372 0
      src/xt_pages/stock/testOrderDetail.vue
  78. 556 0
      src/xt_pages/stock/testOrderEdit.vue
  79. 494 0
      src/xt_pages/stock/testOrderQuery.vue
  80. 0 2
      src/xt_pages/supply/components/addGoodOrder.vue
  81. 2 2
      src/xt_pages/supply/components/editGoodReturn.vue
  82. 2 1
      src/xt_pages/supply/purchaseOrderQuery.vue
  83. 1 0
      src/xt_pages/supply/supplyQuery.vue
  84. 16 3
      src/xt_pages/user/components/PatientDetail.vue
  85. 14 23
      src/xt_pages/user/components/PatientForm.vue
  86. 1 3
      src/xt_pages/user/doctorAdvice.vue
  87. 6 6
      src/xt_pages/workforce/remind_print_setting.vue

+ 47 - 65
src/api/config.js 查看文件

@@ -35,7 +35,7 @@ export function getConfig(params) {
35 35
   return request({
36 36
     url: '/api/dataupload/config/get',
37 37
     method: 'get',
38
-    params:params
38
+    params: params
39 39
   })
40 40
 }
41 41
 
@@ -43,35 +43,29 @@ export function getIsDocking(params) {
43 43
   return request({
44 44
     url: '/api/dataupload/is_docking/get',
45 45
     method: 'get',
46
-    params:params
46
+    params: params
47 47
 
48 48
   })
49 49
 }
50 50
 
51
-
52
-
53
-
54
-
55 51
 export function getAllSystemPrescription() {
56 52
   return request({
57 53
     url: '/api/systemprescription/all',
58
-    method: 'get',
54
+    method: 'get'
59 55
   })
60 56
 }
61 57
 
62
-
63 58
 export function getSystemPrescription(params) {
64 59
   return request({
65 60
     url: '/api/systemprescription/get',
66 61
     method: 'get',
67
-    params:params
62
+    params: params
68 63
 
69 64
   })
70 65
 }
71 66
 
72
-
73 67
 export function postSystemPrescription(params) {
74
-  console.log("params2222222",params)
68
+  console.log('params2222222', params)
75 69
   return request({
76 70
     url: '/api/systemprescription/commit',
77 71
     method: 'post',
@@ -80,54 +74,45 @@ export function postSystemPrescription(params) {
80 74
   })
81 75
 }
82 76
 
83
-
84
-export function updateSystemPrescription(id,params) {
77
+export function updateSystemPrescription(id, params) {
85 78
   return request({
86
-    url: '/api/systemprescription/update?id='+id,
79
+    url: '/api/systemprescription/update?id=' + id,
87 80
     method: 'post',
88 81
     data: params
89 82
 
90 83
   })
91 84
 }
92 85
 
93
-
94 86
 export function getOrgs() {
95 87
   return request({
96 88
     url: '/api/public/orgs',
97
-    method: 'get',
89
+    method: 'get'
98 90
   })
99 91
 }
100 92
 
101
-
102
-
103 93
 export function changeOrg(params) {
104 94
   return request({
105 95
     url: '/api/org/change',
106 96
     method: 'post',
107
-    params:params,
97
+    params: params
108 98
   })
109 99
 }
110 100
 
111
-
112
-
113 101
 export function generateLog(params) {
114 102
   return request({
115 103
     url: '/api/log/generate',
116 104
     method: 'get',
117
-    params:params,
105
+    params: params
118 106
   })
119 107
 }
120 108
 
121
-
122
-
123 109
 export function getAllIsOpenInit() {
124 110
   return request({
125 111
     url: '/api/isopen/init',
126
-    method: 'get',
112
+    method: 'get'
127 113
   })
128 114
 }
129 115
 
130
-
131 116
 export function postXtHisIsOpen(params) {
132 117
   return request({
133 118
     url: '/api/xtconfig/isopen',
@@ -136,71 +121,68 @@ export function postXtHisIsOpen(params) {
136 121
   })
137 122
 }
138 123
 
139
-
140
-export function postMonitorIsOpen(params){
141
-  console.log("params",params)
124
+export function postMonitorIsOpen(params) {
125
+  console.log('params', params)
142 126
   return request({
143
-    url:"/api/monitor/open",
144
-    method:"get",
145
-    params:params
127
+    url: '/api/monitor/open',
128
+    method: 'get',
129
+    params: params
146 130
   })
147 131
 }
148 132
 
149
-
150
-export function getMonitorConfig(params){
151
-
133
+export function getMonitorConfig(params) {
152 134
   return request({
153
-    url:"/api/monitor/getmonitorconfig",
154
-    method:"Get",
155
-    params:params,
135
+    url: '/api/monitor/getmonitorconfig',
136
+    method: 'Get',
137
+    params: params
156 138
   })
157 139
 }
158 140
 
159
-
160
-export function addOrderConfig(params){
161
-
141
+export function addOrderConfig(params) {
162 142
   return request({
163
-    url:"/api/order/addorderconfig",
164
-    method:"Get",
165
-    params:params,
143
+    url: '/api/order/addorderconfig',
144
+    method: 'Get',
145
+    params: params
166 146
 
167 147
   })
168 148
 }
169 149
 
170
-export function getOrderConfig(params){
171
-
150
+export function getOrderConfig(params) {
172 151
   return request({
173
-    url:"/api/order/getorderconfig",
174
-    method:"get",
175
-    params:params,
152
+    url: '/api/order/getorderconfig',
153
+    method: 'get',
154
+    params: params
176 155
   })
177 156
 }
178 157
 
179
-export function changeFuncPrint(params){
180
-
158
+export function changeFuncPrint(params) {
181 159
   return request({
182
-    url:"/api/order/changefuncprint",
183
-    method:"get",
184
-    params:params
160
+    url: '/api/order/changefuncprint',
161
+    method: 'get',
162
+    params: params
185 163
   })
186 164
 }
187 165
 
188
-export function getDataPrintList(params){
189
-
166
+export function getDataPrintList(params) {
190 167
   return request({
191
-    url:"/api/order/getdataprint",
192
-    method:"get",
193
-    params:params
168
+    url: '/api/order/getdataprint',
169
+    method: 'get',
170
+    params: params
194 171
   })
195 172
 }
196 173
 
174
+export function postXtHisProjectIsOpen(params) {
175
+  return request({
176
+    url: '/api/xtconfigproject/isopen',
177
+    method: 'post',
178
+    params: params
179
+  })
180
+}
197 181
 
198
-
199
-export function postXtHisProjectIsOpen(params){
200
-
182
+export function changeStockSetting(params) {
201 183
   return request({
202
-    url:"/api/xtconfigproject/isopen",
203
-    method:"post",
204
-    params:params
184
+    url: '/api/changestocksetting/isopen',
185
+    method: 'get',
186
+    params: params
205 187
   })
206 188
 }

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

@@ -1,8 +1,8 @@
1 1
 import request from '@/utils/request'
2 2
 
3
-export function postDrugWarehouse(params, warehousing_time, manufacturer_id, dealer_id, type) {
3
+export function postDrugWarehouse(params, warehousing_time, manufacturer_id, dealer_id, type, storehouse_id) {
4 4
   return request({
5
-    url: '/api/drugwarehouse/create?warehousing_time=' + warehousing_time + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&type=' + type,
5
+    url: '/api/drugwarehouse/create?warehousing_time=' + warehousing_time + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&type=' + type + '&storehouse_id=' + storehouse_id,
6 6
     method: 'post',
7 7
     data: params
8 8
   })
@@ -72,9 +72,9 @@ export function getDrugWarehouseOutInfoList(params) {
72 72
   })
73 73
 }
74 74
 
75
-export function postDrugWarehouseOut(params, warehousing_time, dealer_id, manufacturer_id, type) {
75
+export function postDrugWarehouseOut(params, warehousing_time, dealer_id, manufacturer_id, type, storehouse_id) {
76 76
   return request({
77
-    url: '/api/drugwarehouseout/create?warehousing_out_time=' + warehousing_time + '&dealer_id=' + dealer_id + '&manufacturer_id=' + manufacturer_id + '&type=' + type,
77
+    url: '/api/drugwarehouseout/create?warehousing_out_time=' + warehousing_time + '&dealer_id=' + dealer_id + '&manufacturer_id=' + manufacturer_id + '&type=' + type + '&storehouse_id=' + storehouse_id,
78 78
     method: 'post',
79 79
     data: params
80 80
   })
@@ -185,9 +185,9 @@ export function DeleteDrugWarehouseInfoItem(params) {
185 185
   })
186 186
 }
187 187
 
188
-export function EditDrugWarehouse(params, warehousing_time, id, type, manufacturer_id, dealer_id) {
188
+export function EditDrugWarehouse(params, warehousing_time, id, type, manufacturer_id, dealer_id, storehouse_id) {
189 189
   return request({
190
-    url: '/api/drugwarehouse/edit?warehousing_time=' + warehousing_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id,
190
+    url: '/api/drugwarehouse/edit?warehousing_time=' + warehousing_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&storehouse_id=' + storehouse_id,
191 191
     method: 'post',
192 192
     data: params
193 193
   })
@@ -273,9 +273,9 @@ export function getDrugWarehouseOutInfo(params) {
273 273
   })
274 274
 }
275 275
 
276
-export function editDrugWarehouseoutInfo(params, warehouse_out_time, id, type, manufacturer_id, dealer_id) {
276
+export function editDrugWarehouseoutInfo(params, warehouse_out_time, id, type, manufacturer_id, dealer_id, storehouse_id) {
277 277
   return request({
278
-    url: '/api/drugwarehouseout/edit?warehouse_out_time=' + warehouse_out_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id,
278
+    url: '/api/drugwarehouseout/edit?warehouse_out_time=' + warehouse_out_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&storehouse_id=' + storehouse_id,
279 279
     method: 'post',
280 280
     data: params
281 281
   })
@@ -289,9 +289,9 @@ export function getDrugCancelStockList(params) {
289 289
   })
290 290
 }
291 291
 
292
-export function editDrugCancelStockInfo(params, cancel_stock_time, id, type, manufacturer_id, dealer_id) {
292
+export function editDrugCancelStockInfo(params, cancel_stock_time, id, type, manufacturer_id, dealer_id, storehouse_id) {
293 293
   return request({
294
-    url: '/api/drugcancelstockinfo/edit?cancel_time=' + cancel_stock_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id,
294
+    url: '/api/drugcancelstockinfo/edit?cancel_time=' + cancel_stock_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&storehouse_id=' + storehouse_id,
295 295
     method: 'post',
296 296
     data: params
297 297
   })
@@ -321,9 +321,9 @@ export function deleteDrugCancelStockInfo(params) {
321 321
   })
322 322
 }
323 323
 
324
-export function postDrugCancelStock(params, cancelStockTime, manufacturer_id, dealer_id, type) {
324
+export function postDrugCancelStock(params, cancelStockTime, manufacturer_id, dealer_id, type, storehouse_id) {
325 325
   return request({
326
-    url: '/api/drugcancelstock/create?time=' + cancelStockTime + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&type=' + type,
326
+    url: '/api/drugcancelstock/create?time=' + cancelStockTime + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&type=' + type + '&storehouse_id=' + storehouse_id,
327 327
     method: 'post',
328 328
     data: params
329 329
   })

+ 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
+}

+ 26 - 11
src/api/stock.js 查看文件

@@ -201,9 +201,9 @@ export function GetAllGoodInfo(params) {
201 201
   })
202 202
 }
203 203
 
204
-export function postWarehouse(params, warehousing_time, manufacturer_id, dealer_id, type) {
204
+export function postWarehouse(params, warehousing_time, manufacturer_id, dealer_id, type, storehouse_id) {
205 205
   return request({
206
-    url: '/api/warehouse/create?warehousing_time=' + warehousing_time + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&type=' + type,
206
+    url: '/api/warehouse/create?warehousing_time=' + warehousing_time + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&type=' + type + '&storehouse_id=' + storehouse_id,
207 207
     method: 'post',
208 208
     data: params
209 209
   })
@@ -273,9 +273,9 @@ export function getWarehouseOutInfoList(params) {
273 273
   })
274 274
 }
275 275
 
276
-export function postWarehouseOut(params, warehousing_time, dealer_id, manufacturer_id, type) {
276
+export function postWarehouseOut(params, warehousing_time, dealer_id, manufacturer_id, type, storehouse_id) {
277 277
   return request({
278
-    url: '/api/warehouseout/create?warehousing_out_time=' + warehousing_time + '&dealer_id=' + dealer_id + '&manufacturer_id=' + manufacturer_id + '&type=' + type,
278
+    url: '/api/warehouseout/create?warehousing_out_time=' + warehousing_time + '&dealer_id=' + dealer_id + '&manufacturer_id=' + manufacturer_id + '&type=' + type + '&storehouse_id=' + storehouse_id,
279 279
     method: 'post',
280 280
     data: params
281 281
   })
@@ -386,9 +386,9 @@ export function DeleteWarehouseInfoItem(params) {
386 386
   })
387 387
 }
388 388
 
389
-export function EditWarehouse(params, warehousing_time, id, type, manufacturer_id, dealer_id) {
389
+export function EditWarehouse(params, warehousing_time, id, type, manufacturer_id, dealer_id, storehouse_id) {
390 390
   return request({
391
-    url: '/api/warehouse/edit?warehousing_time=' + warehousing_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id,
391
+    url: '/api/warehouse/edit?warehousing_time=' + warehousing_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&storehouse_id=' + storehouse_id,
392 392
     method: 'post',
393 393
     data: params
394 394
   })
@@ -474,9 +474,9 @@ export function getWarehouseOutInfo(params) {
474 474
   })
475 475
 }
476 476
 
477
-export function editWarehouseoutInfo(params, warehouse_out_time, id, type, manufacturer_id, dealer_id) {
477
+export function editWarehouseoutInfo(params, warehouse_out_time, id, type, manufacturer_id, dealer_id, storehouse_id) {
478 478
   return request({
479
-    url: '/api/warehouseout/edit?warehouse_out_time=' + warehouse_out_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id,
479
+    url: '/api/warehouseout/edit?warehouse_out_time=' + warehouse_out_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&storehouse_id=' + storehouse_id,
480 480
     method: 'post',
481 481
     data: params
482 482
   })
@@ -522,9 +522,9 @@ export function deleteCancelStockInfo(params) {
522 522
   })
523 523
 }
524 524
 
525
-export function postCancelStock(params, cancelStockTime, manufacturer_id, dealer_id, type) {
525
+export function postCancelStock(params, cancelStockTime, manufacturer_id, dealer_id, type, storehouse_id) {
526 526
   return request({
527
-    url: '/api/cancelstock/create?time=' + cancelStockTime + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&type=' + type,
527
+    url: '/api/cancelstock/create?time=' + cancelStockTime + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&type=' + type + '&storehouse_id=' + storehouse_id,
528 528
     method: 'post',
529 529
     data: params
530 530
   })
@@ -779,7 +779,6 @@ export function saveReportStock(data) {
779 779
 }
780 780
 
781 781
 export function getReportStockList(params) {
782
-  console.log('params', params)
783 782
   return request({
784 783
     url: '/api/stock/getreportstocklist',
785 784
     method: 'get',
@@ -978,3 +977,19 @@ export function getInventoryExportList(params) {
978 977
     params: params
979 978
   })
980 979
 }
980
+
981
+export function getDrugDetailSummary(params) {
982
+  return request({
983
+    url: '/api/stock/getdrugdetailsummary',
984
+    method: 'get',
985
+    params: params
986
+  })
987
+}
988
+
989
+export function getGoodDetailSummary(params) {
990
+  return request({
991
+    url: '/api/stock/getgooddetialsummary',
992
+    method: 'Get',
993
+    params: params
994
+  })
995
+}

+ 22 - 21
src/api/warehouse.js 查看文件

@@ -1,6 +1,6 @@
1 1
 import request from '@/utils/request'
2 2
 
3
-//分页(已渲染)
3
+// 分页(已渲染)
4 4
 export function storehouselist(params) {
5 5
   return request({
6 6
     url: '/api/secondary/storehouselist',
@@ -9,7 +9,7 @@ export function storehouselist(params) {
9 9
   })
10 10
 }
11 11
 
12
-//获取当前机构的所有可用仓库名称接口(已渲染)
12
+// 获取当前机构的所有可用仓库名称接口(已渲染)
13 13
 export function getallstorehousename(params) {
14 14
   return request({
15 15
     url: '/api/secondary/getallstorehousename',
@@ -18,7 +18,7 @@ export function getallstorehousename(params) {
18 18
   })
19 19
 }
20 20
 
21
-//获取一条仓库数据接口(好像用不到了)
21
+// 获取一条仓库数据接口(好像用不到了)
22 22
 export function getonestorehouse(params) {
23 23
   return request({
24 24
     url: '/api/secondary/getonestorehouse',
@@ -27,7 +27,7 @@ export function getonestorehouse(params) {
27 27
   })
28 28
 }
29 29
 
30
-//修改仓库接口(已渲染)
30
+// 修改仓库接口(已渲染)
31 31
 export function updatestorehouse(data) {
32 32
   return request({
33 33
     url: '/api/secondary/updatestorehouse',
@@ -36,7 +36,7 @@ export function updatestorehouse(data) {
36 36
   })
37 37
 }
38 38
 
39
-//添加仓库接口(已渲染)
39
+// 添加仓库接口(已渲染)
40 40
 export function addstorehouse(data) {
41 41
   return request({
42 42
     url: '/api/secondary/addstorehouse',
@@ -45,7 +45,7 @@ export function addstorehouse(data) {
45 45
   })
46 46
 }
47 47
 
48
-//仓库地址查重接口(合并到新增)
48
+// 仓库地址查重接口(合并到新增)
49 49
 export function isstorehouseaddress(params) {
50 50
   return request({
51 51
     url: '/api/secondary/isstorehouseaddress',
@@ -54,7 +54,7 @@ export function isstorehouseaddress(params) {
54 54
   })
55 55
 }
56 56
 
57
-//仓库名称查重接口(合并到新增)
57
+// 仓库名称查重接口(合并到新增)
58 58
 export function isstorehousename(params) {
59 59
   return request({
60 60
     url: '/api/secondary/isstorehousename',
@@ -63,7 +63,7 @@ export function isstorehousename(params) {
63 63
   })
64 64
 }
65 65
 
66
-//删除仓库接口(已渲染)
66
+// 删除仓库接口(已渲染)
67 67
 export function deletestorehouse(params) {
68 68
   return request({
69 69
     url: '/api/secondary/deletestorehouse',
@@ -72,7 +72,7 @@ export function deletestorehouse(params) {
72 72
   })
73 73
 }
74 74
 
75
-//修改仓库状态接口(已渲染)
75
+// 修改仓库状态接口(已渲染)
76 76
 export function updatestatus(params) {
77 77
   return request({
78 78
     url: '/api/secondary/updatestatus',
@@ -81,7 +81,7 @@ export function updatestatus(params) {
81 81
   })
82 82
 }
83 83
 
84
-//获取仓库编号接口(已渲染)
84
+// 获取仓库编号接口(已渲染)
85 85
 export function getcode(params) {
86 86
   return request({
87 87
     url: '/api/secondary/getcode',
@@ -90,7 +90,7 @@ export function getcode(params) {
90 90
   })
91 91
 }
92 92
 
93
-//查询该机构的仓库配置(已渲染)
93
+// 查询该机构的仓库配置(已渲染)
94 94
 export function findstorehouseconfig(params) {
95 95
   return request({
96 96
     url: '/api/secondary/findstorehouseconfig',
@@ -99,7 +99,7 @@ export function findstorehouseconfig(params) {
99 99
   })
100 100
 }
101 101
 
102
-//更改耗材自动入库仓库(已渲染)
102
+// 更改耗材自动入库仓库(已渲染)
103 103
 export function updateinfo(params) {
104 104
   return request({
105 105
     url: '/api/secondary/updateinfo',
@@ -107,7 +107,7 @@ export function updateinfo(params) {
107 107
     params: params
108 108
   })
109 109
 }
110
-//更改耗材自动出库仓库(已渲染)
110
+// 更改耗材自动出库仓库(已渲染)
111 111
 export function updateoutinfo(params) {
112 112
   return request({
113 113
     url: '/api/secondary/updateoutinfo',
@@ -115,7 +115,7 @@ export function updateoutinfo(params) {
115 115
     params: params
116 116
   })
117 117
 }
118
-//更改药品自动入库仓库(已渲染)
118
+// 更改药品自动入库仓库(已渲染)
119 119
 export function updatedruginfo(params) {
120 120
   return request({
121 121
     url: '/api/secondary/updatedruginfo',
@@ -123,7 +123,7 @@ export function updatedruginfo(params) {
123 123
     params: params
124 124
   })
125 125
 }
126
-//更改药品自动出库仓库(已渲染)
126
+// 更改药品自动出库仓库(已渲染)
127 127
 export function updatedrugout(params) {
128 128
   return request({
129 129
     url: '/api/secondary/updatedrugout',
@@ -131,18 +131,19 @@ export function updatedrugout(params) {
131 131
     params: params
132 132
   })
133 133
 }
134
-//获取管理员列表(已渲染)
135
-export function getusername(params) {
134
+
135
+// 获取当前登录人的id(已渲染)
136
+export function getcreaterid(params) {
136 137
   return request({
137
-    url: '/api/secondary/getusername',
138
+    url: '/api/secondary/getcreaterid',
138 139
     method: 'get',
139 140
     params: params
140 141
   })
141 142
 }
142
-//获取当前登录人的id(已渲染)
143
-export function getcreaterid(params) {
143
+// 获取管理员列表(已渲染)
144
+export function getusername(params) {
144 145
   return request({
145
-    url: '/api/secondary/getcreaterid',
146
+    url: '/api/secondary/getusername',
146 147
     method: 'get',
147 148
     params: params
148 149
   })

+ 6 - 2
src/lang/zh.js 查看文件

@@ -169,12 +169,15 @@ export default {
169 169
     drugsStockOut: '出库单',
170 170
     drugsStockIn: '入库单',
171 171
     stockDrugs: '药品管理',
172
+    allocationManagement: '调拨管理',
172 173
     selfPreparedMedicineInfo: '自备药信息',
173 174
     selfPreparedMedicineQuery: '自备药查询',
174 175
     selfPreparedMedicineIndex: '自备药管理',
175 176
     selfPreparedMedicine: '自备药管理',
177
+    wareHouseManage: '仓库管理',
178
+    inventoryTransfer: '库存调拨',
176 179
     wareHouseManage:'仓库管理',
177
-    
180
+
178 181
     inventoryTransfer:'库存调拨',
179 182
 
180 183
     consumablesManagement: '耗材管理',
@@ -277,7 +280,8 @@ export default {
277 280
     labelPrint: '标签打印',
278 281
     faPiao: '发票设置',
279 282
     chargeDetailManagement: '收费明细',
280
-    yidiClear:'异地清分',
283
+    yidiClear: '异地清分',
284
+    zeroSummary: '零用明细汇总'
281 285
   },
282 286
   navbar: {
283 287
     logOut: '退出登录',

+ 7 - 2
src/router/modules/hisTool.js 查看文件

@@ -34,7 +34,7 @@ export default {
34 34
       component: () => import('@/xt_pages/outpatientRecord/outpatientRecord'),
35 35
       name: 'outpatientSickRecord',
36 36
       meta: { title: 'outpatientSickRecord', noCache: true }
37
-    },{
37
+    }, {
38 38
       path: '/hisTool/summary',
39 39
       component: () => import('@/xt_pages/outpatientTool/summary'),
40 40
       name: 'outpatientSickRecord',
@@ -63,6 +63,11 @@ export default {
63 63
       name: 'statistics',
64 64
       meta: { title: 'statistics', noCache: true }
65 65
     },
66
-
66
+    {
67
+      path: '/hisTool/zeroSummary',
68
+      component: () => import('@/xt_pages/outpatientTool/zeroSummary'),
69
+      name: 'zeroSummary',
70
+      meta: { title: 'zeroSummary', noCache: true }
71
+    }
67 72
   ]
68 73
 }

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

@@ -372,6 +372,18 @@ export default {
372 372
         title: '调拨详情',
373 373
         noCache: true
374 374
       }
375
+    },
376
+
377
+    {
378
+      path: '/stock/inventoryTransfer/transedit',
379
+      component: () => import('@/xt_pages/stock/inventoryTransfer/transEdit'),
380
+      hidden: true,
381
+      is_menu: false,
382
+      name: 'transEdit',
383
+      meta: {
384
+        title: '编辑调拨',
385
+        noCache: true
386
+      }
375 387
     }
376 388
   ]
377 389
 }

+ 28 - 1
src/xt_pages/data/basicConfig.vue 查看文件

@@ -32,6 +32,9 @@
32 32
             <p style="margin-top:20px;">门诊处方项目同步到透析医嘱:
33 33
                 <el-switch v-model="is_open_xt_his_project" @change="changeFuncProject"></el-switch>
34 34
             </p>
35
+            <p style="margin-top:20px;">耗材先出库再执行:
36
+                <el-switch v-model="is_open_is_type" @change="changeFuncType"></el-switch>
37
+            </p>
35 38
         </div>
36 39
 
37 40
 
@@ -87,7 +90,7 @@
87 90
 
88 91
 <script>
89 92
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
90
-import { getAllIsOpenInit,postXtHisIsOpen,postMonitorIsOpen,changeFuncPrint,getDataPrintList,postXtHisProjectIsOpen} from '@/api/config'
93
+import { getAllIsOpenInit,postXtHisIsOpen,postMonitorIsOpen,changeFuncPrint,getDataPrintList,postXtHisProjectIsOpen,changeStockSetting} from '@/api/config'
91 94
 
92 95
 export default {
93 96
   name: "printTemplate",
@@ -105,6 +108,7 @@ export default {
105 108
       is_open_order:false,
106 109
       is_open_print:false,
107 110
       is_open_xt_his_project: false,
111
+      is_open_is_type:false,
108 112
     };
109 113
   },
110 114
   methods: {
@@ -126,6 +130,12 @@ export default {
126 130
               this.is_open_xt_his_project = false
127 131
             }
128 132
 
133
+            if(response.data.data.is_open_stock == 1){
134
+              this.is_open_is_type = true
135
+            }else{
136
+              this.is_open_is_type = false
137
+            }
138
+
129 139
           } else {
130 140
             this.$message.error(response.data.msg)
131 141
           }
@@ -301,6 +311,23 @@ export default {
301 311
            }
302 312
          }
303 313
       })
314
+    },
315
+    changeFuncType(){
316
+       var is_type = 2
317
+       if(this.is_open_is_type == false){
318
+         is_type = 2
319
+       }
320
+       if(this.is_open_is_type == true){
321
+         is_type = 1
322
+       }
323
+       var params = {
324
+         is_type:is_type,
325
+       }
326
+      changeStockSetting(params).then(response=>{
327
+        if(response.data.state == 1){
328
+           this.$message.success("保存成功!")
329
+        }
330
+      })
304 331
     }
305 332
 
306 333
   },

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

@@ -94,6 +94,7 @@
94 94
             filterable
95 95
             placeholder="请选择"
96 96
             @change="changeProject"
97
+            
97 98
           >
98 99
             <el-option
99 100
               v-for="item in projectList"
@@ -249,7 +250,8 @@ export default {
249 250
         }
250 251
       }
251 252
     },
252
-    changeProject() {
253
+    changeProject(val) {
254
+      console.log("i23232323323",val.id)
253 255
       this.form.number = 1;
254 256
     },
255 257
     querySearch(queryString, cb) {
@@ -270,6 +272,7 @@ export default {
270 272
       };
271 273
     },
272 274
     handleSelect(val) {
275
+      console.log("val3223322323232323",val)
273 276
       this.project_name = val.project_name;
274 277
       this.form.project_detail = val.id;
275 278
     },
@@ -405,45 +408,26 @@ export default {
405 408
       });
406 409
     },
407 410
     addProjectList() {
408
-      console.log(this.tableData, "this.tableData");
409
-      console.log(this.form.project_detail, "form.project_detail");
410
-      let obj = {new_id:this.form.project_detail}
411
-      if (this.tableData.length <= 0) {
411
+        if(this.tableData.length > 0){
412
+          for(let i=0;i<this.tableData.length;i++){
413
+            if(this.tableData[i].new_id == this.form.project_detail){
414
+               this.$message.error("项目名称已存在")
415
+               return
416
+            }
417
+          }
418
+        }
412 419
         for (let i = 0; i < this.projectList.length; i++) {
413 420
           if (this.form.project_detail == this.projectList[i].new_id) {
414
-            this.projectList[i].number = this.form.number;
415
-            this.projectList[i].number = this.projectList[i].number.toString();
416
-
417
-            this.tableData.push(this.projectList[i]);
418
-            this.form.project_detail = "";
419
-            this.form.number = 1;
421
+            this.projectList[i].number = this.form.number
422
+            this.projectList[i].number = this.projectList[i].number.toString()
423
+            
424
+            this.tableData.push(this.projectList[i])
425
+            this.form.project_detail = ''
426
+            this.form.number = 1
420 427
           }
421 428
         }
422
-      } else {
423
-        console.log(obj,'obj')
424
-        this.tableData.forEach((el) => {
425
-          if (this.form.project_detail == el.new_id) {
426
-            this.$message.error("已存在!");
427
-            return;
428
-          } else {
429
-            console.log("oo");
430
-
431
-            // for (let i = 0; i < this.projectList.length; i++) {
432
-            //   if (this.form.project_detail == this.projectList[i].new_id) {
433
-            //     this.projectList[i].number = this.form.number;
434
-            //     this.projectList[i].number =
435
-            //       this.projectList[i].number.toString();
436
-
437
-            //     this.tableData.push(this.projectList[i]);
438
-            //     this.form.project_detail = "";
439
-            //     this.form.number = 1;
440
-            //   }
441
-            // }
442
-          }
443
-        });
444
-
445
-      }
446
-    },
429
+       
430
+      },
447 431
     DeleteProject(id, index) {
448 432
       this.$confirm("确认删除此项目吗?", "删除", {
449 433
         confirmButtonText: "确 定",

+ 15 - 0
src/xt_pages/data/components/editInspection.vue 查看文件

@@ -347,6 +347,21 @@
347 347
         return name
348 348
       },
349 349
       addProjectList() {
350
+       
351
+        var project_name = ""
352
+        for(let i=0;i<this.projectList.length;i++){
353
+          if(this.form.project_detail == this.projectList[i].new_id){
354
+             project_name = this.projectList[i].project_name
355
+          }
356
+        }
357
+        if(this.tableData.length > 0){
358
+          for(let i=0;i<this.tableData.length;i++){
359
+            if(this.tableData[i].project_name == project_name){
360
+               this.$message.error("项目名称已存在")
361
+               return
362
+            }
363
+          }
364
+        }
350 365
         for (let i = 0; i < this.projectList.length; i++) {
351 366
           if (this.form.project_detail == this.projectList[i].new_id) {
352 367
             this.projectList[i].number = this.form.number

+ 248 - 155
src/xt_pages/dialysis/PatientBox.vue 查看文件

@@ -20,34 +20,69 @@
20 20
             alt=""
21 21
           />
22 22
           <div>
23
-          <div class="right">
24
-            <h3 class="name">
25
-              {{ schedule.patient.name
26
-              }}<span class="yc" v-show="isAbnormal(schedule)">异常</span>
27
-            </h3>
28
-            <span class="num"
29
-              >{{ genderText(schedule) }} | {{ getAge(schedule) }} 岁</span
23
+            <div class="right">
24
+              <h3 class="name">
25
+                {{ schedule.patient.name
26
+                }}<span class="yc" v-show="isAbnormal(schedule)">异常</span>
27
+              </h3>
28
+              <span class="num"
29
+                >{{ genderText(schedule) }} | {{ getAge(schedule) }} 岁</span
30
+              >
31
+              <div
32
+                style="
33
+                  margin-left: 10px;
34
+                  font-size: 12px;
35
+                  color: #34495e;
36
+                  margin-right: 5px;
37
+                "
38
+                v-if="
39
+                  schedule.assessment_before_dislysis && patientStateVal == 1
40
+                "
41
+              >
42
+                签到时间:{{
43
+                  getTime(schedule.assessment_before_dislysis.created_time)
44
+                }}
45
+              </div>
46
+            </div>
47
+            <div
48
+              style="
49
+                margin-top: 5px;
50
+                text-align: left;
51
+                height: 24px;
52
+                min-width: 205px;
53
+              "
30 54
             >
31
-            <div style="margin-left:10px;font-size:12px;color:#34495e;margin-right: 5px;" v-if="schedule.assessment_before_dislysis && patientStateVal == 1">签到时间:{{ getTime(schedule.assessment_before_dislysis.created_time) }}</div>
32
-          </div>
33
-          <div style="margin-top:5px;text-align:left;height:24px;">
34
-            <span class="tip1" v-if="schedule.prescription == null || schedule.prescription.creater == 0" @click.stop="open(schedule)">
35
-              开处方
36
-            </span>
37
-            <span class="tip2" v-if="schedule.treatment_summary == null || schedule.treatment_summary.dialysis_summary == ''" @click.stop="open1(schedule)">
38
-              开小结
39
-            </span>
40
-            <span class="online" v-show="computeState(schedule) != 4">
41
-              <span :class="stateColor(schedule)">{{ stateText(schedule) }}</span>
42
-            </span>
55
+              <span
56
+                class="tip1"
57
+                v-if="
58
+                  schedule.prescription == null ||
59
+                  schedule.prescription.creater == 0
60
+                "
61
+                @click.stop="open(schedule)"
62
+              >
63
+                开处方
64
+              </span>
65
+              <span
66
+                class="tip2"
67
+                v-if="
68
+                  schedule.treatment_summary == null ||
69
+                  schedule.treatment_summary.dialysis_summary == ''
70
+                "
71
+                @click.stop="open1(schedule)"
72
+              >
73
+                开小结
74
+              </span>
75
+              <span class="online" v-show="computeState(schedule) != 4">
76
+                <span :class="stateColor(schedule)">{{
77
+                  stateText(schedule)
78
+                }}</span>
79
+              </span>
80
+            </div>
43 81
           </div>
44
-
45
-          <!-- <div class="difficult">
82
+          <!-- v-if="schedule.patient.troble_shoot == 1" -->
83
+          <div class="difficult" v-if="schedule.patient.troble_shoot == 1">
46 84
             疑难内瘘
47
-          </div> -->
48
-        </div>
49
-        </div>
50
-        <div>
85
+          </div>
51 86
           <!-- <div style="height:24px;margin-right: 10px;">
52 87
             <div class="online" v-show="computeState(schedule) != 4">
53 88
               <p :class="stateColor(schedule)">{{ stateText(schedule) }}</p>
@@ -57,32 +92,92 @@
57 92
         </div>
58 93
       </div>
59 94
       <div class="dislysisInfo">
60
-        <p>体重(前/后kg):
61
-          {{ schedule.assessment_before_dislysis ? schedule.assessment_before_dislysis.weight_before : '' }}
62
-          <span v-if="schedule.assessment_after_dislysis && schedule.assessment_after_dislysis.weight_after>0">/{{ schedule.assessment_after_dislysis ? schedule.assessment_after_dislysis.weight_after : '' }}</span> </p>
63
-        <p>目标超滤量:
64
-          <span v-if="schedule.prescription && schedule.prescription.target_ultrafiltration>0">{{ schedule.prescription ? schedule.prescription.target_ultrafiltration : '' }}</span>
65
-       
95
+        <p>
96
+          体重(前/后kg):
97
+          {{
98
+            schedule.assessment_before_dislysis
99
+              ? schedule.assessment_before_dislysis.weight_before
100
+              : ""
101
+          }}
102
+          <span
103
+            v-if="
104
+              schedule.assessment_after_dislysis &&
105
+              schedule.assessment_after_dislysis.weight_after > 0
106
+            "
107
+            >/{{
108
+              schedule.assessment_after_dislysis
109
+                ? schedule.assessment_after_dislysis.weight_after
110
+                : ""
111
+            }}</span
112
+          >
66 113
         </p>
67
-        <p :title="schedule.prescription ? schedule.prescription.dialyzer_perfusion_apparatus : ''">
68
-          透析器/灌流器:{{ schedule.prescription ? schedule.prescription.dialyzer_perfusion_apparatus : '' }}
69
-           <span v-if="schedule.prescription!=null">{{schedule.prescription?schedule.prescription.dialysis_dialyszers:''}}</span>
70
-           <span v-if="schedule.prescription!=null && schedule.prescription.dialysis_irrigation!=''">/</span>
71
-           <span v-if="schedule.prescription!=null">{{schedule.prescription?schedule.prescription.dialysis_irrigation:''}}</span>
114
+        <p>
115
+          目标超滤量:
116
+          <span
117
+            v-if="
118
+              schedule.prescription &&
119
+              schedule.prescription.target_ultrafiltration > 0
120
+            "
121
+            >{{
122
+              schedule.prescription
123
+                ? schedule.prescription.target_ultrafiltration
124
+                : ""
125
+            }}</span
126
+          >
127
+        </p>
128
+        <p
129
+          :title="
130
+            schedule.prescription
131
+              ? schedule.prescription.dialyzer_perfusion_apparatus
132
+              : ''
133
+          "
134
+        >
135
+          透析器/灌流器:{{
136
+            schedule.prescription
137
+              ? schedule.prescription.dialyzer_perfusion_apparatus
138
+              : ""
139
+          }}
140
+          <span v-if="schedule.prescription != null">{{
141
+            schedule.prescription
142
+              ? schedule.prescription.dialysis_dialyszers
143
+              : ""
144
+          }}</span>
145
+          <span
146
+            v-if="
147
+              schedule.prescription != null &&
148
+              schedule.prescription.dialysis_irrigation != ''
149
+            "
150
+            >/</span
151
+          >
152
+          <span v-if="schedule.prescription != null">{{
153
+            schedule.prescription
154
+              ? schedule.prescription.dialysis_irrigation
155
+              : ""
156
+          }}</span>
72 157
         </p>
73 158
       </div>
74
-      <div class="function" :class="functionColor(schedule)" :id="modeColor(schedule.mode_id)">
159
+      <div
160
+        class="function"
161
+        :class="functionColor(schedule)"
162
+        :id="modeColor(schedule.mode_id)"
163
+      >
75 164
         <ul>
76 165
           <li>
77
-            <span class="iconfont" :id="modeColor(schedule.mode_id)">&#xe6f5;</span>班次 :
166
+            <span class="iconfont" :id="modeColor(schedule.mode_id)"
167
+              >&#xe6f5;</span
168
+            >班次 :
78 169
             {{ timeTypeText(schedule) }}
79 170
           </li>
80 171
           <li>
81
-            <span class="iconfont" :id="modeColor(schedule.mode_id)">&#xe6de;</span>床位号 :
172
+            <span class="iconfont" :id="modeColor(schedule.mode_id)"
173
+              >&#xe6de;</span
174
+            >床位号 :
82 175
             {{ schedule.device_number.number }}
83 176
           </li>
84 177
           <li>
85
-            <span class="iconfont" :id="modeColor(schedule.mode_id)">&#xe6f6;</span>透析模式 :
178
+            <span class="iconfont" :id="modeColor(schedule.mode_id)"
179
+              >&#xe6f6;</span
180
+            >透析模式 :
86 181
             {{
87 182
               schedule.mode_id &&
88 183
               $store.getters.treatment_mode[schedule.mode_id]
@@ -126,7 +221,7 @@
126 221
       :last_prescription="lastDialysisPrescribe"
127 222
       :dry_weight="lastDryWeightDislysis"
128 223
       :schedual="temp_schedual"
129
-      :date='date'
224
+      :date="date"
130 225
       :stockType="stockType"
131 226
     ></dialysis-prescription-dialog>
132 227
     <treatment-summary-dialog
@@ -139,7 +234,6 @@
139 234
 </template>
140 235
 
141 236
 <script>
142
-
143 237
 import { parseTime } from "@/utils";
144 238
 import { jsGetAge } from "@/utils/tools";
145 239
 import dialysisPrescriptionDialog from "../dialysis/details/dialog/dialysisPrescriptionDialog";
@@ -151,9 +245,9 @@ import {
151 245
 
152 246
 export default {
153 247
   name: "PatientBox",
154
-  components:{
248
+  components: {
155 249
     dialysisPrescriptionDialog,
156
-    treatmentSummaryDialog
250
+    treatmentSummaryDialog,
157 251
   },
158 252
   data() {
159 253
     return {
@@ -163,29 +257,29 @@ export default {
163 257
           yc: false,
164 258
           name: "张三",
165 259
           sex: "女",
166
-          age: 90
260
+          age: 90,
167 261
         },
168 262
         {
169 263
           state: 3,
170 264
           yc: true,
171 265
           name: "张三",
172 266
           sex: "女",
173
-          age: 90
267
+          age: 90,
174 268
         },
175 269
         {
176 270
           state: 4,
177 271
           yc: true,
178 272
           name: "张三",
179 273
           sex: "女",
180
-          age: 90
274
+          age: 90,
181 275
         },
182 276
         {
183 277
           state: 1,
184 278
           yc: true,
185 279
           name: "张三",
186 280
           sex: "女",
187
-          age: 90
188
-        }
281
+          age: 90,
282
+        },
189 283
       ],
190 284
       //
191 285
       longAdvices: [],
@@ -236,20 +330,20 @@ export default {
236 330
       headNurses: [],
237 331
       lastDialysisPrescribe: { id: 0 },
238 332
       temp_schedual: null,
239
-      date:'',
240
-      modedata:0,
241
-      stockType:[],
333
+      date: "",
334
+      modedata: 0,
335
+      stockType: [],
242 336
     };
243 337
   },
244 338
   props: {
245 339
     schedules: {
246
-      type: Array
340
+      type: Array,
247 341
     },
248
-    patientStateVal:Number
342
+    patientStateVal: Number,
249 343
   },
250
- 
344
+
251 345
   methods: {
252
-    stateColor: function(schedual) {
346
+    stateColor: function (schedual) {
253 347
       var state = this.computeState(schedual);
254 348
       if (state == 1) {
255 349
         return "blue";
@@ -261,7 +355,7 @@ export default {
261 355
         return "blue";
262 356
       }
263 357
     },
264
-    functionColor: function(schedual) {
358
+    functionColor: function (schedual) {
265 359
       var state = this.computeState(schedual);
266 360
       if (state == 1 || state == 3) {
267 361
         return "blue";
@@ -271,7 +365,7 @@ export default {
271 365
         return "blue";
272 366
       }
273 367
     },
274
-    borderColor: function(schedual) {
368
+    borderColor: function (schedual) {
275 369
       var yc = this.isAbnormal(schedual);
276 370
       if (yc == true) {
277 371
         return "red";
@@ -279,7 +373,7 @@ export default {
279 373
         return "gray";
280 374
       }
281 375
     },
282
-    stateText: function(schedual) {
376
+    stateText: function (schedual) {
283 377
       var state = this.computeState(schedual);
284 378
       if (state == 1) {
285 379
         return "已上机";
@@ -292,7 +386,7 @@ export default {
292 386
         return "未上机";
293 387
       }
294 388
     },
295
-    computeState: function(schedual) {
389
+    computeState: function (schedual) {
296 390
       if (schedual.dialysis_order == null) {
297 391
         // 未上机
298 392
         return 4;
@@ -311,7 +405,7 @@ export default {
311 405
       }
312 406
     },
313 407
 
314
-    orderState: function(schedual) {
408
+    orderState: function (schedual) {
315 409
       if (schedual.dialysis_order == null) {
316 410
         // 未上机
317 411
         return 4;
@@ -329,10 +423,10 @@ export default {
329 423
         return 1;
330 424
       }
331 425
     },
332
-    isAbnormal: function(schedual) {
426
+    isAbnormal: function (schedual) {
333 427
       return false; // schedual.yc;
334 428
     },
335
-    timeTypeText: function(schedual) {
429
+    timeTypeText: function (schedual) {
336 430
       if (schedual.schedule_type == 1) {
337 431
         return "上午";
338 432
       } else if (schedual.schedule_type == 2) {
@@ -341,7 +435,7 @@ export default {
341 435
         return "晚上";
342 436
       }
343 437
     },
344
-    genderText: function(schedual) {
438
+    genderText: function (schedual) {
345 439
       if (schedual.patient.gender == 0) {
346 440
         return "未知";
347 441
       } else if (schedual.patient.gender == 1) {
@@ -350,7 +444,7 @@ export default {
350 444
         return "女";
351 445
       }
352 446
     },
353
-    age: function(schedual) {
447
+    age: function (schedual) {
354 448
       if (schedual.patient.birthday == 0) {
355 449
         return "";
356 450
       } else {
@@ -367,7 +461,7 @@ export default {
367 461
       // // console.log(birthdayYear)
368 462
       // return nowYear - birthdayYear
369 463
     },
370
-    getAge: function(val) {
464
+    getAge: function (val) {
371 465
       var thisLen = val.patient.id_card_no.length;
372 466
       var birth = "";
373 467
       if (thisLen == 15) {
@@ -385,7 +479,7 @@ export default {
385 479
       var age = jsGetAge(birthtwo, "-");
386 480
       return age;
387 481
     },
388
-    detailAction: function(schedual) {
482
+    detailAction: function (schedual) {
389 483
       var patient_id = schedual.patient_id;
390 484
       var date = schedual.schedule_date;
391 485
       this.$router.push({
@@ -394,42 +488,42 @@ export default {
394 488
           patient_id: patient_id,
395 489
           date: date,
396 490
           patient_name: schedual.patient.name,
397
-          mode_id:schedual.mode_id
398
-        }
491
+          mode_id: schedual.mode_id,
492
+        },
399 493
       });
400 494
     },
401 495
     //
402
-    getScheduleDetail: function() {
496
+    getScheduleDetail: function () {
403 497
       var dateStr = parseTime(this.date, "{y}-{m}-{d}");
404 498
       this.doctor_advices = [];
405
-      getDialysisScheduleDetail(this.patient_id, dateStr).then(rs => {
499
+      getDialysisScheduleDetail(this.patient_id, dateStr).then((rs) => {
406 500
         var resp = rs.data;
407 501
         if (resp.state == 1) {
408 502
           var patient = resp.data.patient; // 患者信息
409
-         
503
+
410 504
           var schedual = resp.data.schedual; // 患者排班信息
411 505
           var prescription = resp.data.prescription; // 透析处方
412
-          if(prescription!=null){
413
-              if(prescription.body_fluid == -2 ){
414
-                 prescription.body_fluid = 0
415
-             }
506
+          if (prescription != null) {
507
+            if (prescription.body_fluid == -2) {
508
+              prescription.body_fluid = 0;
509
+            }
416 510
           }
417
-          console.log("透析处方323332323223323223",prescription)
511
+          console.log("透析处方323332323223323223", prescription);
418 512
           var solution = resp.data.solution; // 透析方案
419 513
           var receiver_treatment_access = resp.data.receiver_treatment_access; // 接诊评估
420
-          console.log("receiver_treatment_access",receiver_treatment_access)
514
+          console.log("receiver_treatment_access", receiver_treatment_access);
421 515
           var predialysis_evaluation = resp.data.predialysis_evaluation; // 透前评估
422
-          console.log("透前评估",predialysis_evaluation)
423
-           if(predialysis_evaluation !=null){
424
-             if(predialysis_evaluation.blood_access_part_id == -2){
425
-                predialysis_evaluation.blood_access_part_id = 0
426
-             }
427
-           }
516
+          console.log("透前评估", predialysis_evaluation);
517
+          if (predialysis_evaluation != null) {
518
+            if (predialysis_evaluation.blood_access_part_id == -2) {
519
+              predialysis_evaluation.blood_access_part_id = 0;
520
+            }
521
+          }
428 522
           var doctor_advices = resp.data.doctor_advices; // 临时医嘱
429
-          
523
+
430 524
           var double_check = resp.data.double_check; // 双人核对
431 525
           var assessment_after_dislysis = resp.data.assessment_after_dislysis; // 透后评估
432
-        
526
+
433 527
           var treatment_summary = resp.data.treatment_summary; // 治疗小结
434 528
           var monitor_records = resp.data.monitor_records; // 透析监测
435 529
           var dialysis_order = resp.data.dialysis_order; // 透析记录
@@ -449,11 +543,11 @@ export default {
449 543
           var aliquid_info = resp.data.aliquid_info;
450 544
 
451 545
           var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation;
452
-          console.log("上次透前评估",lastPredialysisEvaluation)
453
-          if(lastPredialysisEvaluation !=null){
454
-             if(lastPredialysisEvaluation.blood_access_part_id == -2){
455
-               lastPredialysisEvaluation.blood_access_part_id = 0
456
-             }
546
+          console.log("上次透前评估", lastPredialysisEvaluation);
547
+          if (lastPredialysisEvaluation != null) {
548
+            if (lastPredialysisEvaluation.blood_access_part_id == -2) {
549
+              lastPredialysisEvaluation.blood_access_part_id = 0;
550
+            }
457 551
           }
458 552
           var lastMonitorRecord = resp.data.lastMonitorRecord;
459 553
           var lastAssessmentAfterDislysis =
@@ -462,11 +556,11 @@ export default {
462 556
           var lastDryWeightDislysis = resp.data.lastDryWeightDislysis;
463 557
 
464 558
           var system_prescribe = resp.data.system_prescribe;
465
-          
466
-          var stockType =  resp.data.stockType
467
-          this.stockType = stockType
468
-          console.log("元单快乐222222",this.stockType)
469
-          
559
+
560
+          var stockType = resp.data.stockType;
561
+          this.stockType = stockType;
562
+          console.log("元单快乐222222", this.stockType);
563
+
470 564
           this.$refs.prescription.setLastRecord(
471 565
             schedual,
472 566
             lastAssessmentAfterDislysis,
@@ -505,9 +599,9 @@ export default {
505 599
           this.patient = patient;
506 600
           this.schedual = schedual == null ? { id: 0 } : schedual;
507 601
           this.prescription = prescription == null ? { id: 0 } : prescription;
508
-          console.log('this.prescription',this.prescription)
602
+          console.log("this.prescription", this.prescription);
509 603
           this.solution = solution == null ? { id: 0 } : solution;
510
-          console.log('this.solution',this.solution)
604
+          console.log("this.solution", this.solution);
511 605
           this.receiver_treatment_access =
512 606
             receiver_treatment_access == null
513 607
               ? { id: 0 }
@@ -533,8 +627,6 @@ export default {
533 627
           this.devices = resp.data.devices;
534 628
           this.device_numbers = resp.data.device_numbers;
535 629
 
536
-          
537
-
538 630
           var device_map = {};
539 631
           for (let index = 0; index < this.devices.length; index++) {
540 632
             const device = this.devices[index];
@@ -555,10 +647,9 @@ export default {
555 647
             device_number_map[device_number.id] = device_number;
556 648
           }
557 649
           this.device_number_map = device_number_map;
558
-          this.getLongAdvice()
650
+          this.getLongAdvice();
559 651
         } else {
560 652
           this.$message.error(resp.msg);
561
-         
562 653
         }
563 654
 
564 655
         if (this.lastDialysisPrescribe != null) {
@@ -571,9 +662,9 @@ export default {
571 662
     },
572 663
     getLongAdvice() {
573 664
       let params = {
574
-        patient_id: this.patient_id
665
+        patient_id: this.patient_id,
575 666
       };
576
-      getLongAdvice(params).then(rs => {
667
+      getLongAdvice(params).then((rs) => {
577 668
         var resp = rs.data;
578 669
         if (resp.state == 1) {
579 670
           var status = parseInt(resp.data.status);
@@ -616,48 +707,49 @@ export default {
616 707
         }
617 708
       });
618 709
     },
619
-    adviceFunc: function() {
710
+    adviceFunc: function () {
620 711
       this.$emit("advice");
621 712
     },
622
-    open(schedual){
623
-     
624
-      this.date = schedual.schedule_date
625
-      this.patient_id = schedual.patient_id
626
-      this.modedata = 1
627
-      this.getScheduleDetail()
713
+    open(schedual) {
714
+      this.date = schedual.schedule_date;
715
+      this.patient_id = schedual.patient_id;
716
+      this.modedata = 1;
717
+      this.getScheduleDetail();
628 718
       // this.getLongAdvice()
629
-      this.$refs.prescription.show(this.prescription,schedual);
630
-      
719
+      this.$refs.prescription.show(this.prescription, schedual);
631 720
     },
632
-    open1(schedual){
633
-      this.date = schedual.schedule_date
634
-      this.patient_id = schedual.patient_id
635
-      this.getScheduleDetail()
636
-      this.getLongAdvice()
637
-      this.$refs.treatmentSummary.show(this.treatment_summary,this.date);
638
-      
721
+    open1(schedual) {
722
+      this.date = schedual.schedule_date;
723
+      this.patient_id = schedual.patient_id;
724
+      this.getScheduleDetail();
725
+      this.getLongAdvice();
726
+      this.$refs.treatmentSummary.show(this.treatment_summary, this.date);
639 727
     },
640
-    getTime(date){
641
-      date = new Date(date * 1000)
642
-      var Y = date.getFullYear() + '-';
643
-      var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1);
644
-      var D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate());
645
-      var h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours());
646
-      var m = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes());
647
-      var s = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds());
648
-      
649
-      let strDate = h  + ':' + m;
728
+    getTime(date) {
729
+      date = new Date(date * 1000);
730
+      var Y = date.getFullYear() + "-";
731
+      var M =
732
+        date.getMonth() + 1 < 10
733
+          ? "0" + (date.getMonth() + 1)
734
+          : date.getMonth() + 1;
735
+      var D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
736
+      var h = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
737
+      var m =
738
+        date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
739
+      var s =
740
+        date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
741
+
742
+      let strDate = h + ":" + m;
650 743
       return strDate;
651 744
     },
652
-    modeColor (id) {
745
+    modeColor(id) {
653 746
       if (id == 1) {
654
-
655 747
       } else if (id == 2) {
656
-        return 'modeRed'
748
+        return "modeRed";
657 749
       } else if (id == 3) {
658
-        return 'modePurple'
750
+        return "modePurple";
659 751
       }
660
-    }
752
+    },
661 753
   },
662 754
 };
663 755
 </script>
@@ -705,7 +797,7 @@ export default {
705 797
     .tx {
706 798
       @include display-flex;
707 799
       // @include align-items-center;
708
-      width: 90%;
800
+      width: 100%;
709 801
       img {
710 802
         width: 45px;
711 803
         height: 45px;
@@ -716,7 +808,7 @@ export default {
716 808
       .right {
717 809
         // float: left;
718 810
         // text-align: left;
719
-        display:flex;
811
+        display: flex;
720 812
         align-items: center;
721 813
         margin-top: 6px;
722 814
         .name {
@@ -725,7 +817,7 @@ export default {
725 817
           font-weight: bold;
726 818
           height: 20px;
727 819
           line-height: 20px;
728
-          margin-right:10px;
820
+          margin-right: 10px;
729 821
           .yc {
730 822
             background: #ff7979;
731 823
             color: #fff;
@@ -744,7 +836,7 @@ export default {
744 836
           color: #7b8a97;
745 837
         }
746 838
       }
747
-      .tip1{
839
+      .tip1 {
748 840
         background: #4fc7cb;
749 841
         border-radius: 5px;
750 842
         text-align: center;
@@ -756,7 +848,7 @@ export default {
756 848
         height: 24px;
757 849
         line-height: 24px;
758 850
       }
759
-      .tip2{
851
+      .tip2 {
760 852
         background: #7bce91;
761 853
         border-radius: 5px;
762 854
         text-align: center;
@@ -783,7 +875,7 @@ export default {
783 875
         border-radius: 4px;
784 876
         margin: 0 auto;
785 877
         font-size: 12px;
786
-        margin-top:4px;
878
+        margin-top: 4px;
787 879
         display: inline-block;
788 880
       }
789 881
       .blue {
@@ -807,38 +899,39 @@ export default {
807 899
       }
808 900
     }
809 901
   }
810
-  .dislysisInfo{
902
+  .dislysisInfo {
811 903
     color: rgb(123, 138, 151);
812 904
     border-bottom: 1px solid rgb(229, 229, 229);
813 905
     padding-left: 80px;
814
-    >p{
906
+    > p {
815 907
       margin-bottom: 5px;
816
-      overflow:hidden;
817
-      text-overflow:ellipsis;
818
-      white-space:nowrap;
908
+      overflow: hidden;
909
+      text-overflow: ellipsis;
910
+      white-space: nowrap;
819 911
     }
820 912
   }
821 913
 }
822 914
 .red {
823 915
   border: 1px #ff7979 solid;
824 916
 }
825
-#modeRed{
826
-  color:#ed5555;
917
+#modeRed {
918
+  color: #ed5555;
827 919
 }
828
-#modePurple{
920
+#modePurple {
829 921
   color: #53b86e;
830 922
 }
831 923
 
832
-.difficult{
833
-  width: 100px;
834
-  height: 40px;
924
+.difficult {
925
+  width: 71px;
926
+  height: 25px;
927
+  font-size: 12px;
835 928
   border-radius: 0 0 0 30px;
836 929
   background: #78d660;
837 930
   text-align: center;
838
-  line-height: 40px;
931
+  line-height: 25px;
839 932
   position: relative;
840
-  bottom: 64px;
841
-  left: 179px;
933
+  bottom: 10px;
934
+  left: 3px;
842 935
   color: white;
843 936
 }
844 937
 </style>

+ 13 - 1
src/xt_pages/dialysis/bloodPresssWatch.vue 查看文件

@@ -90,7 +90,7 @@
90 90
           >
91 91
         </div>
92 92
       </template>
93
-      <template v-if="this.template_id == 6">
93
+      <template v-if="this.template_id == 6 || this.template_id == 48">
94 94
         <el-button
95 95
           size="small"
96 96
           icon="el-icon-printer"
@@ -319,6 +319,16 @@
319 319
           >批量打印</el-button
320 320
         >
321 321
       </template>
322
+      <!-- <template v-if="this.template_id == 48">
323
+        <el-button
324
+          size="small"
325
+          icon="el-icon-printer"
326
+          :disabled="selecting_schs.length == 0"
327
+          @click="batchPrintAction"
328
+          type="primary"
329
+          >批量打印</el-button
330
+        >
331
+      </template> -->
322 332
     </div>
323 333
     <div class="app-container">
324 334
       <!-- <div class="filter-container">
@@ -954,6 +964,8 @@ export default {
954 964
         this.$router.push({ path: "/dialysis/print/batch/fortyThree" });
955 965
       } else if (this.template_id == 47) {
956 966
         this.$router.push({ path: "/dialysis/print/batch/fortyThree" });
967
+      } else if (this.template_id == 48) {
968
+        this.$router.push({ path: "/dialysis/print/batch/six" });
957 969
       }
958 970
     },
959 971
     batchPrintActionOne: function() {

+ 38 - 1
src/xt_pages/dialysis/dialysisPrintOrder.vue 查看文件

@@ -644,6 +644,26 @@
644 644
           >打印</el-button
645 645
         >
646 646
       </template>
647
+       <template v-if="org_template_info.template_id == 49">
648
+        <el-button
649
+          :loading="loading"
650
+          size="small"
651
+          icon="el-icon-printer"
652
+          @click="printThisPage"
653
+          type="primary"
654
+          >打印</el-button
655
+        >
656
+      </template>
657
+      <template v-if="org_template_info.template_id == 50">
658
+        <el-button
659
+          :loading="loading"
660
+          size="small"
661
+          icon="el-icon-printer"
662
+          @click="printThisPage"
663
+          type="primary"
664
+          >打印</el-button
665
+        >
666
+      </template>
647 667
     </div>
648 668
     <div class="app-container" style="min-height: 0">
649 669
       <!--<div class="order-print-btn"-->
@@ -1011,6 +1031,17 @@
1011 1031
             v-if="org_template_info.template_id == 48"
1012 1032
           >
1013 1033
           </DialysisPrintOrderFortyEight>
1034
+
1035
+            <DialysisPrintOrderFortyNine
1036
+            v-bind:childResponse="childResponse"
1037
+            v-if="org_template_info.template_id == 49"
1038
+          >
1039
+          </DialysisPrintOrderFortyNine>
1040
+          <DialysisPrintOrderFifty
1041
+            v-bind:childResponse="childResponse"
1042
+            v-if="org_template_info.template_id == 50"
1043
+          >
1044
+          </DialysisPrintOrderFifty>
1014 1045
         </div>
1015 1046
       </el-container>
1016 1047
     </div>
@@ -1077,9 +1108,13 @@ import DialysisPrintOrderFortyFive from "./template/DialysisPrintOrderFortyFive"
1077 1108
 import DialysisPrintOrderFortySix from "./template/DialysisPrintOrderFortySix";
1078 1109
 import DialysisPrintOrderFortySeven from "./template/DialysisPrintOrderFortySeven";
1079 1110
 import DialysisPrintOrderFortyEight from "./template/DialysisPrintOrderFortyEight";
1111
+import DialysisPrintOrderFortyNine from "./template/DialysisPrintOrderFortyNine";
1112
+import DialysisPrintOrderFifty from "./template/DialysisPrintOrderFifty";
1080 1113
 export default {
1081 1114
   name: "dialysisPrintOrder",
1082 1115
   components: {
1116
+    DialysisPrintOrderFifty,
1117
+    DialysisPrintOrderFortyNine,
1083 1118
     DialysisPrintOrderFortyEight,
1084 1119
     DialysisPrintOrderFortySeven,
1085 1120
     DialysisPrintOrderFortySix,
@@ -1353,7 +1388,9 @@ export default {
1353 1388
       } else if (
1354 1389
         this.org_template_info.template_id == 6 ||
1355 1390
         this.org_template_info.template_id == 10 ||
1356
-        this.org_template_info.template_id == 11
1391
+        this.org_template_info.template_id == 11 ||
1392
+        this.org_template_info.template_id == 49 ||
1393
+        this.org_template_info.template_id == 50
1357 1394
       ) {
1358 1395
         printJS({
1359 1396
           printable: "dialysis-print-box-1",

文件差异内容过多而无法显示
+ 3709 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderFifty.vue


+ 2 - 2
src/xt_pages/dialysis/template/DialysisPrintOrderFortyEight.vue 查看文件

@@ -990,7 +990,7 @@
990 990
             </td>
991 991
             <td style="min-width: 80px">
992 992
               置换量
993
-              <br />L
993
+              <br />ml
994 994
             </td>
995 995
             <td style="min-width: 80px">
996 996
               血压
@@ -1772,7 +1772,7 @@ export default {
1772 1772
       return name;
1773 1773
     },
1774 1774
     setAdminUserES(id) {
1775
-      console.log(this.operatorMaps, "this.operatorMaps");
1775
+      // console.log(this.operatorMaps, "this.operatorMaps");
1776 1776
       if (id === 0) {
1777 1777
         return "";
1778 1778
       }

文件差异内容过多而无法显示
+ 2238 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderFortyNine.vue


+ 10 - 5
src/xt_pages/dialysis/template/DialysisPrintOrderFortySeven.vue 查看文件

@@ -1261,12 +1261,16 @@
1261 1261
                         </td>
1262 1262
                         <!-- 超滤量 -->
1263 1263
                         <td>
1264
-                          {{
1265
-                            monitor.ultrafiltration_volume
1266
-                              ? monitor.ultrafiltration_volume
1267
-                              : ""
1268
-                          }}
1264
+                          <span v-if="monindex == 0"> 0 </span>
1265
+                          <span v-else>
1266
+                            {{
1267
+                              monitor.ultrafiltration_volume
1268
+                                ? monitor.ultrafiltration_volume
1269
+                                : ""
1270
+                            }}
1271
+                          </span>
1269 1272
                         </td>
1273
+                        <!-- 置换量 -->
1270 1274
                         <td
1271 1275
                           v-if="
1272 1276
                             prescription.mode_id == 2 ||
@@ -1283,6 +1287,7 @@
1283 1287
                                 : ""
1284 1288
                             }}
1285 1289
                           </span>
1290
+                          
1286 1291
                         </td>
1287 1292
                         <!-- <td
1288 1293
                           v-if="

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

@@ -861,11 +861,16 @@
861 861
                   <td height="32px" colspan="2" class="advice-name" style="padding-left:7px;">
862 862
                     <span v-if="advice.parent_id > 0">---></span>
863 863
                     <span>{{ advice.advice_name }}</span>
864
+
864 865
                     <span v-if="advice && advice.advice_desc">({{ advice.advice_desc }}{{ advice.drug_spec_unit }})</span>
866
+                    
865 867
                     <span v-if="advice.prescribing_number">&nbsp;&nbsp; {{ advice.prescribing_number }}{{ advice.prescribing_number_unit }}</span>
868
+                    
866 869
                     <span v-if="advice.single_dose != 0">{{ advice.single_dose }}{{ advice.single_dose_unit }}</span>
867 870
                     <span v-if="advice.parent_id == 0">{{ advice.delivery_way }}</span>
871
+                    
868 872
                     <span v-if="advice.parent_id == 0">{{ advice.execution_frequency }}</span>
873
+                   
869 874
                     <span v-if="advice.parent_id == 0 && advice.remark.length > 0">({{ advice.remark }})</span>
870 875
                   </td>
871 876
                   <!-- <td colspan="2" height="60px" style="text-align: center" v-else >

+ 1 - 1
src/xt_pages/hospitalStation/allListTemplate/printOne.vue 查看文件

@@ -24,7 +24,7 @@
24 24
                         <td style="width:10%">{{item.med_chrgitm_type}}</td>
25 25
                         <td style="width:50%">{{item.name}}</td>
26 26
                         <td style="width:10%">{{item.spec}}</td>
27
-                        <td style="width:10%">{{(item.price).toFixed(2)}}</td>
27
+                        <td style="width:10%text-align:right;">{{(item.price).toFixed(2)}}</td>
28 28
                         <td style="width:10%">{{item.count}}{{item.unit}}</td>
29 29
                         <td style="width:10%">{{(item.price * item.count).toFixed(2)}}</td>
30 30
                     </tr>

+ 1 - 0
src/xt_pages/hospitalStation/doctorDesk.vue 查看文件

@@ -1001,6 +1001,7 @@
1001 1001
                  }
1002 1002
               }
1003 1003
             }
1004
+            
1004 1005
             this.drugs = drugs
1005 1006
             console.log("所有药品信息",this.drugs)
1006 1007
             this.allDrugs = response.data.data.drugs

+ 5 - 4
src/xt_pages/outpatientCharges/allListTemplate/summaryPrint.vue 查看文件

@@ -15,7 +15,7 @@
15 15
     </div>
16 16
 
17 17
     <div class="allListInfo">
18
-      <div>西药:{{order.westernMedicineCostTotal?order.westernMedicineCostTotal:''}}</div>
18
+      <div>西药:&nbsp;&nbsp;&nbsp;{{order.westernMedicineCostTotal?order.westernMedicineCostTotal:''}}</div>
19 19
       <div >中成药:{{order.chineseTraditionalMedicineCostTotal?order.chineseTraditionalMedicineCostTotal:''}}</div>
20 20
       <div >中草药:</div>
21 21
       <div >检查费:{{order.checkCostTotal?order.checkCostTotal:''}}</div>
@@ -42,6 +42,7 @@
42 42
       <div >麻醉费:</div>
43 43
       <div >材料费:{{order.materialCostTotal?order.materialCostTotal:''}}</div>
44 44
       <div >其他费:{{order.otherCostTotal?order.otherCostTotal:''}}</div>
45
+      <div style="visibility: hidden;">其他费:</div>
45 46
     </div>
46 47
     <!--    <div style="display:flex;justify-content: space-between;">-->
47 48
 <!--          <div style="position: absolute;top:160px;left:40px">西药</div>-->
@@ -97,12 +98,12 @@
97 98
       <template v-for='(item,index) in list'>
98 99
         <tr>
99 100
           <td style="width:10%">{{ item.med_chrgitm_type }}</td>
100
-          <td style="width:35%">{{ item.name }}</td>
101
+          <td style="width:35%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.name }}</td>
101 102
           <td style="width:15%">{{ item.spec }}</td>
102 103
           <td style="width:5%">{{ item.unit }}</td>
103 104
           <td style="width:10%">{{ item.count }}</td>
104
-          <td style="width:10%">{{ item.price }}</td>
105
-          <td style="width:10%">{{ (item.price * item.count).toFixed(2) }}</td>
105
+          <td style="width:10%;text-align:right;">{{ item.price }}</td>
106
+          <td style="width:10%;text-align:right;">{{ (item.price * item.count).toFixed(2) }}</td>
106 107
           <td style="width:10%">{{ item.medicine_insurance_kind }}</td>
107 108
 
108 109
         </tr>

+ 3 - 4
src/xt_pages/outpatientCharges/listTemplate/listPrintTwo.vue 查看文件

@@ -39,12 +39,11 @@
39 39
             <td style="width:5%">{{index + 1}}</td>
40 40
             <td style="width:15%">{{item.p_time}}</td>
41 41
             <td style="width:10%">{{item.feedetl_sn.split("-")[2]}}</td>
42
-            <td style="width:30%">{{item.name}}</td>
43
-            <td style="width:10%">{{item.spec}}</td>
42
+            <td style="width:40%;white-space: nowrap;overflow: hidden;">{{item.name}}/{{item.spec}}</td>
44 43
             <td style="width:5%">{{item.unit}}</td>
45 44
             <td style="width:5%">{{ item.count }}</td>
46
-            <td style="width:10%">{{ item.price }}</td>
47
-            <td style="width:10%">{{ (item.price * item.count).toFixed(2) }}</td>
45
+            <td style="width:10%;text-align:right;">{{ item.price }}</td>
46
+            <td style="width:10%;text-align:right;">{{ (item.price * item.count).toFixed(2) }}</td>
48 47
           </tr>
49 48
         </template>
50 49
       </table>

文件差异内容过多而无法显示
+ 583 - 441
src/xt_pages/outpatientDoctorStation/checkTemplate/printOne.vue


+ 3 - 0
src/xt_pages/outpatientDoctorStation/doctorDesk.vue 查看文件

@@ -1207,6 +1207,9 @@ export default {
1207 1207
               }
1208 1208
             }
1209 1209
           }
1210
+          // if(drugs.){
1211
+
1212
+          // }
1210 1213
           this.drugs = drugs
1211 1214
           console.log('五一劳动节2332323322332', this.drugs)
1212 1215
 

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

@@ -18,7 +18,7 @@
18 18
 9675:测试
19 19
  -->
20 20
     <div class="dialysisPage" style="padding-top: 40px">
21
-      <div v-if="org_id != 10138 && org_id != 10278 && org_id != 10243 && org_id != 4 && org_id !=0">
21
+      <div v-if="org_id != 10138 && org_id != 10278 && org_id != 10243">
22 22
 
23 23
         <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>
24 24
 

+ 11 - 3
src/xt_pages/outpatientDoctorStation/template/printOne.vue 查看文件

@@ -136,9 +136,15 @@
136 136
             >
137 137
               {{ item.doctor }}
138 138
             </span>
139
+            <span
140
+              style="width: 100px; display: inline-block"
141
+              v-else-if="doc_name != ''"
142
+            >
143
+              {{ doc_name }}
144
+            </span>
139 145
             <img
140 146
               style="height: 30px"
141
-              :src="setAdminUserES(item.creator)"
147
+              :src="setAdminUserES(item.creator,item.doctor)"
142 148
               alt=""
143 149
               srcset=""
144 150
               v-else
@@ -207,6 +213,7 @@ export default {
207 213
   },
208 214
   data() {
209 215
     return {
216
+      doc_name:"",
210 217
       doctorList: [],
211 218
       advicePrint: {},
212 219
       patient: {},
@@ -221,18 +228,19 @@ export default {
221 228
       org_id: 0,
222 229
       operatorMaps: {},
223 230
       operators: [],
224
-      doctorList_1: []
231
+      doctorList_1: [],
225 232
     };
226 233
   },
227 234
   methods: {
228 235
     // 电子签名
229
-    setAdminUserES(id) {
236
+    setAdminUserES(id,name) {
230 237
       if (id == 0) {
231 238
         return "";
232 239
       }
233 240
       if (id in this.operatorMaps) {
234 241
         return this.operatorMaps[id].url;
235 242
       } else {
243
+        this.doc_name = name
236 244
         return "";
237 245
       }
238 246
     },

+ 1 - 0
src/xt_pages/outpatientDoctorStation/template/printSix.vue 查看文件

@@ -147,6 +147,7 @@
147 147
             <div style="width:120px;">
148 148
                 医师:
149 149
             <span>{{ item.doctor ? item.doctor : "" }} </span>
150
+            
150 151
             </div>
151 152
           
152 153
           </div>

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

@@ -0,0 +1,314 @@
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.tableData = []
163
+        this.getlist()
164
+       },
165
+       getlist(){
166
+        let start_time = this.chargeDate[0]
167
+        let end_time = this.chargeDate[1]
168
+        var params = {
169
+            start_time: start_time,
170
+            end_time: end_time,
171
+            keyword: this.keywords,
172
+            limit:this.limit,
173
+            page:this.page,
174
+        }  
175
+       
176
+        getDrugDetailSummary(params).then(response=>{
177
+          if(response.data.state == 1){
178
+            var list = response.data.data.list
179
+           
180
+            var total = response.data.data.total
181
+            var drug = response.data.data.drug
182
+            this.patients = response.data.data.patients
183
+            for(let i =0;i<list.length;i++){
184
+               
185
+              for(let j=0;j<drug.length;j++){
186
+                if(list[i].drug_id == drug[j].id){
187
+                  if(list[i].child!=null && list[i].child.length > 0){
188
+                    for(let z=0;z<list[i].child.length;z++){
189
+                      if(list[i].child[z].prescribing_number_unit == drug[j].max_unit){
190
+                        list[i].child[z].prescribing_number = parseInt(list[i].child[z].prescribing_number) * drug[j].min_number
191
+                      }
192
+                    }
193
+                  }
194
+                }
195
+              }
196
+            }
197
+            this.drugList = drug
198
+            this.total = total
199
+            this.drugTypeList = response.data.data.drugTypeList
200
+            for(let i=0;i<list.length;i++){
201
+                list[i].min_number = 0
202
+                list[i].max_unit = ""
203
+                list[i].min_unit = ""
204
+             for(let j=0;j<drug.length;j++){
205
+               if(list[i].drug_id == drug[j].id){
206
+                 list[i].min_number = drug[j].min_number
207
+                 list[i].max_unit = drug[j].max_unit
208
+                 list[i].min_unit = drug[j].min_unit
209
+                 this.tableData.push(list[i])
210
+               }
211
+             }
212
+            }
213
+          }
214
+        })  
215
+      },
216
+     getTime(val) {
217
+         if(val < 0){
218
+           return ""
219
+         }
220
+         if(val == ""){
221
+          return ""
222
+         }else {
223
+          return uParseTime(val, '{y}-{m}-{d}')
224
+         }
225
+      },  
226
+     getDrugName(id){
227
+       var drug_name = ""
228
+       for(let i=0;i<this.drugList.length;i++){
229
+        if(id == this.drugList[i].id){
230
+           drug_name = this.drugList[i].drug_name
231
+        }
232
+       } 
233
+       return drug_name 
234
+     },
235
+     getSpecialName(id){
236
+       var specification_name = ""
237
+        for(let i=0;i<this.drugList.length;i++){
238
+        if(id == this.drugList[i].id){
239
+           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;
240
+        }
241
+       } 
242
+       return specification_name    
243
+     },
244
+     searchAction(){
245
+       this.tableData = []
246
+       this.getlist()  
247
+     },
248
+     getDrugTypeName(drug_id){
249
+      
250
+       var drug_type = ""
251
+       for(let i=0;i<this.drugList.length;i++){
252
+         if(drug_id == this.drugList[i].id){
253
+            drug_type = this.drugList[i].drug_type
254
+         }
255
+       }
256
+       var type_name = ""
257
+       for(let i=0;i<this.drugTypeList.length;i++ ){
258
+          if(drug_type == this.drugTypeList[i].value){
259
+            type_name = this.drugTypeList[i].name
260
+          }
261
+       }  
262
+       return type_name
263
+     },
264
+     getCount(val,min_number,max_unit,min_unit){
265
+      
266
+       var total = 0
267
+       var min_str = ""
268
+       var max_str = ""
269
+       if(val!=null && val!=undefined  && val.length > 0){
270
+         for(let i=0;i<val.length;i++){
271
+           total += parseInt(val[i].prescribing_number)
272
+         }
273
+       }
274
+    
275
+        if (total < min_number){
276
+          min_str = total + min_unit
277
+        }
278
+        if (total == 0) {
279
+          min_str = ""
280
+          max_str = ""
281
+        }
282
+        if (total >=min_number) {
283
+           if(parseInt(total/min_number)!=0){
284
+              max_str = parseInt(total/min_number) + max_unit
285
+           }
286
+           if(total%min_number!=0){
287
+              min_str = total%min_number + min_unit
288
+           }
289
+
290
+        }
291
+        return max_str + min_str
292
+       },
293
+       jump(val,min_number,drug_id){
294
+         this.dialogVisible = true
295
+         this.tableList= val
296
+         this.min_number = min_number
297
+         this.drug_id = drug_id
298
+       },
299
+       getPatientName(id){
300
+         var name = ""
301
+         for(let i=0;i<this.patients.length;i++){
302
+            if(id == this.patients[i].id){
303
+              name = this.patients[i].name
304
+            }
305
+         }
306
+         return name
307
+       }
308
+     
309
+    },
310
+    created() {
311
+      this.getlist()
312
+    }
313
+  }
314
+</script>

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

@@ -0,0 +1,271 @@
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
+                          placeholder="请输入耗材名称"
7
+                          class="filter-item"/>
8
+                 <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
9
+                <el-date-picker
10
+                        v-model="chargeDate"
11
+                        type="daterange"
12
+                        value-format="yyyy-MM-dd"
13
+                        range-separator="至"
14
+                        start-placeholder="开始日期"
15
+                        @change="changeDate"
16
+                        end-placeholder="结束日期">
17
+                </el-date-picker>
18
+            </div>
19
+        </div>
20
+        <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
21
+                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
22
+                  max-height="600"
23
+                  highlight-current-row>
24
+
25
+            <el-table-column align="center" prop="name" label="序号">
26
+                <template slot-scope="scope">
27
+                    {{scope.$index +1}}
28
+                </template>
29
+            </el-table-column>
30
+          
31
+            <el-table-column align="center" prop="name" label="日期">
32
+                <template slot-scope="scope">
33
+                {{getTime(scope.row.record_date)}}
34
+                </template>
35
+            </el-table-column>
36
+            <el-table-column align="center" prop="name" label="耗材类型">
37
+                <template slot-scope="scope">
38
+                 {{getGoodType(scope.row.project_id)}}
39
+                </template>
40
+            </el-table-column>
41
+            <el-table-column align="center" prop="name" label="耗材名称">
42
+                <template slot-scope="scope">
43
+                  {{getGoodName(scope.row.project_id)}}
44
+                </template>
45
+            </el-table-column>
46
+            <el-table-column align="center" prop="name" label="规格">
47
+                <template slot-scope="scope">
48
+                    {{getSpecificatioName(scope.row.project_id)}}
49
+                </template>
50
+            </el-table-column>
51
+            <el-table-column align="center" prop="name" label="数量">
52
+                <template slot-scope="scope">
53
+                  {{getCount(scope.row.child)}}
54
+                </template>
55
+            </el-table-column>
56
+
57
+            <el-table-column align="center" prop="name" label="单位">
58
+                <template slot-scope="scope">
59
+                   {{getUnit(scope.row.project_id)}}
60
+                </template>
61
+            </el-table-column>
62
+
63
+            <el-table-column align="center" prop="total" label="操作">
64
+                <template slot-scope="scope">
65
+                   <div style="color: #589ff8" @click="jump(scope.row.child,scope.row.project_id)">使用明细</div>
66
+                </template>
67
+            </el-table-column>
68
+
69
+        </el-table>
70
+
71
+
72
+             
73
+       <el-dialog
74
+        title="耗材明细"
75
+        :visible.sync="dialogVisible"
76
+        width="60%">
77
+        <div style="margin-bottom:10px"> <span>耗材类型:{{getGoodType(good_id)}}</span>
78
+              <span>耗材名称:{{getGoodName(good_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.record_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.count}}
105
+                </template>
106
+            </el-table-column>
107
+            <el-table-column align="center" prop="name" label="单位">
108
+                <template slot-scope="scope">
109
+                  {{getUnit(scope.row.project_id)}}   
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
+    </div>
121
+
122
+</template>
123
+
124
+
125
+<script>
126
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
127
+  const moment = require('moment')
128
+import {getGoodDetailSummary} from "@/api/stock"
129
+  import { uParseTime } from '@/utils/tools'
130
+  export default {
131
+    components: {
132
+      BreadCrumb
133
+
134
+    },
135
+    data() {
136
+      return {
137
+        detail_loading: false,
138
+        tempArr: [],
139
+        pos: 0,
140
+        sameRowArr: [],
141
+        keywords: '',
142
+        tableData: [],
143
+        chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
144
+        limit:10,
145
+        page:1,
146
+        total:0,
147
+        goodList:[],
148
+        patients:[],
149
+        good_id:0,
150
+        goodType:[],
151
+        dialogVisible:false,
152
+        tableList:[],
153
+      }
154
+    },
155
+    methods:{
156
+     changeDate(){
157
+      this.tableData = []
158
+      this.getlist()
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
+           console.log("@33232322332",this.tableData)
186
+         }
187
+       })   
188
+     },
189
+     jump(val,good_id){
190
+         this.dialogVisible = true
191
+         this.tableList= val
192
+         this.good_id = good_id
193
+       },
194
+       getPatientName(id){
195
+         var name = ""
196
+         for(let i=0;i<this.patients.length;i++){
197
+            if(id == this.patients[i].id){
198
+              name = this.patients[i].name
199
+            }
200
+         }
201
+         return name
202
+       },
203
+       getTime(val) {
204
+         if(val < 0){
205
+           return ""
206
+         }
207
+         if(val == ""){
208
+          return ""
209
+         }else {
210
+          return uParseTime(val, '{y}-{m}-{d}')
211
+         }
212
+      },  
213
+      getGoodType(id){
214
+       var good_type = 0
215
+       for(let i=0;i<this.goodList.length;i++){
216
+         if(id == this.goodList[i].id){
217
+           good_type = this.goodList[i].good_type_id
218
+         }
219
+       }
220
+       var type_name = ""
221
+       for(let i=0;i<this.goodType.length;i++){
222
+         if(good_type == this.goodType[i].id){
223
+           type_name = this.goodType[i].type_name
224
+         }
225
+       }
226
+       return type_name
227
+      },
228
+      getGoodName(good_id){
229
+        var good_name = ""
230
+        for(let i=0;i<this.goodList.length;i++){
231
+          if(good_id == this.goodList[i].id){
232
+             good_name = this.goodList[i].good_name
233
+          }
234
+        }
235
+        return good_name
236
+      },
237
+      getSpecificatioName(good_id){
238
+        var specification_name = ""
239
+        for(let i=0;i<this.goodList.length;i++){
240
+          if(good_id == this.goodList[i].id){
241
+             specification_name = this.goodList[i].specification_name
242
+          }
243
+        }
244
+        return specification_name
245
+      },
246
+      getCount(val){
247
+        var total = 0
248
+        for(let i=0;i<val.length;i++){
249
+           total += parseInt(val[i].count)
250
+        }
251
+        return total
252
+      },
253
+      getUnit(id){
254
+        var packing_unit = ""
255
+        for(let i=0;i<this.goodList.length;i++){
256
+          if(id == this.goodList[i].id){
257
+            packing_unit = this.goodList[i].packing_unit
258
+          }
259
+        }
260
+        return packing_unit
261
+      },
262
+      searchAction(){
263
+        this.tableData = []
264
+        this.getlist()
265
+      }
266
+    },
267
+    created() {
268
+      this.getlist()
269
+    }
270
+  }
271
+</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>

+ 1 - 1
src/xt_pages/qcd/indicatorControlAnalysis/weight.vue 查看文件

@@ -168,7 +168,7 @@
168 168
                 @size-change="handleSizeChange"
169 169
                 @current-change="handleCurrentChange"
170 170
                 :current-page="query.page"
171
-                :page-sizes="[10, 20, 50, 100]"
171
+                :page-sizes="[10, 20, 50, 100,500,1000,2000,5000]"
172 172
                 :page-size="10"
173 173
                 background
174 174
                 style="margin-top:20px;"

+ 55 - 16
src/xt_pages/stock/cancelStockOrder.vue 查看文件

@@ -15,12 +15,21 @@
15 15
 
16 16
     <div class="app-container">
17 17
       <div class="cell clearfix">
18
+        <label class="title"><span class="name">仓库</span> :</label>
19
+        <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeStoreHouse">
20
+            <el-option
21
+              v-for="(option, index) in houseList"
22
+              :key="index"
23
+              :label="option.storehouse_name"
24
+              :value="option.id">
25
+            </el-option>
26
+        </el-select> 
18 27
         <el-input
19 28
           size="small"
20
-          style="width: 400px;"
29
+          style="width: 200px;"
21 30
           class="filter-item"
22 31
           v-model.trim="searchKey"
23
-          placeholder="单据编码/制单人/厂商"
32
+          placeholder="单据编码/制单人"
24 33
         />
25 34
         <el-button
26 35
           size="small"
@@ -105,6 +114,12 @@
105 114
             </template>
106 115
           </el-table-column>
107 116
 
117
+          <el-table-column label="仓库名称" align="center">
118
+            <template slot-scope="scope">
119
+              {{getHouseName(scope.row.storehouse_id) }}
120
+            </template>
121
+          </el-table-column>
122
+
108 123
           <el-table-column label="制单人" align="center">
109 124
             <template slot-scope="scope">
110 125
               {{ getXuserName(scope.row.creater) }}
@@ -192,6 +207,12 @@
192 207
             </template>
193 208
           </el-table-column>
194 209
 
210
+         <el-table-column label="仓库名称" align="center">
211
+            <template slot-scope="scope">
212
+              {{getHouseName(scope.row.storehouse_id)}}
213
+            </template>
214
+          </el-table-column>
215
+
195 216
           <el-table-column label="退库数量" align="center">
196 217
             <template slot-scope="scope">
197 218
               {{ scope.row.count}}{{scope.row.GoodInfo.packing_unit}}
@@ -321,7 +342,9 @@ export default {
321 342
       tableList:[],
322 343
       showTable:false,
323 344
       order_id:"",
324
-      exportList:[]
345
+      exportList:[],
346
+      houseList:[],
347
+      storehouse_id:0,
325 348
     };
326 349
   },
327 350
   methods: {
@@ -332,7 +355,8 @@ export default {
332 355
         start_time: this.start_time,
333 356
         end_time: this.end_time,
334 357
         type: this.type,
335
-        keywords: this.searchKey
358
+        keywords: this.searchKey,
359
+        storehouse_id:this.storehouse_id,
336 360
       };
337 361
       this.cancelStockDate = [];
338 362
       getCancelStockList(Params).then(response => {
@@ -344,6 +368,7 @@ export default {
344 368
           for (let i = 0; i < response.data.data.list.length; i++) {
345 369
             this.cancelStockDate.push(response.data.data.list[i]);
346 370
           }
371
+          this.houseList = response.data.data.houseList
347 372
         }
348 373
       });
349 374
     },
@@ -359,7 +384,8 @@ export default {
359 384
         limit: this.limit,
360 385
         start_time: this.start_time,
361 386
         end_time: this.end_time,
362
-        type: this.type
387
+        type: this.type,
388
+        storehouse_id:this.storehouse_id,
363 389
       };
364 390
       this.cancelStockDate = [];
365 391
       getCancelStockList(Params).then(response => {
@@ -371,6 +397,13 @@ export default {
371 397
           for (let i = 0; i < response.data.data.list.length; i++) {
372 398
             this.cancelStockDate.push(response.data.data.list[i]);
373 399
           }
400
+          var obj = {id:0,storehouse_name:"全部"}
401
+          this.houseList = []
402
+          this.houseList.push(obj)
403
+          for(let i=0;i<response.data.data.houseList.length;i++){
404
+            this.houseList.push(response.data.data.houseList[i])
405
+          }
406
+        
374 407
         }
375 408
       });
376 409
     },
@@ -399,7 +432,7 @@ export default {
399 432
     },
400 433
     fetchAllAdminUsers() {
401 434
       fetchAllAdminUsers().then(response => {
402
-        console.log(response);
435
+     
403 436
         if (response.data.state == 1) {
404 437
           this.adminUserOptions = response.data.data.users;
405 438
           var alen = this.adminUserOptions.length;
@@ -474,7 +507,7 @@ export default {
474 507
       }
475 508
     },
476 509
     handleEdit: function(index, row) {
477
-      console.log("row22222",row.id)
510
+    
478 511
       this.$router.push({"path":"/stock/cancel/cancelstockorderedit?id="+row.id})
479 512
     },
480 513
     handleDelete: function(index, row) {
@@ -485,8 +518,7 @@ export default {
485 518
       const params = {
486 519
         ids: idStr
487 520
       };
488
-      console.log("params233223232323232323",params)
489
-     
521
+
490 522
       this.$confirm("确认删除退库单记录?", "删除退库单记录", {
491 523
         confirmButtonText: "确定",
492 524
         cancelButtonText: "取消",
@@ -583,18 +615,15 @@ export default {
583 615
       getSingCancelOrder(params).then(response=>{
584 616
         if(response.data.state == 1){
585 617
           var list = response.data.data.list
586
-          console.log("list0000000000",list)
587 618
           this.tableList = list
588 619
           this.showTable = true
589 620
         }
590 621
       }) 
591 622
     },
592 623
     toPrint(){
593
-      console.log("22222",this.order_id)
594 624
       if(this.order_id == ""){
595 625
         this.$message.error("请勾选退库单")
596 626
       }else{
597
-        console.log("232332332")
598 627
         this.$router.push({path:'/stock/drugs/cancelstockorderprint?order_id='+this.order_id+"&start_time="+this.start_time+"&end_time="+this.end_time})
599 628
       }
600 629
     },
@@ -614,11 +643,10 @@ export default {
614 643
         end_time: this.end_time,
615 644
         order_id:this.order_id,
616 645
       };
617
-      console.log("params2323232",Params)
646
+
618 647
      getCancelExportList(Params).then(response=>{
619 648
         if(response.data.state == 1){
620 649
           var list =  response.data.data.list
621
-          console.log("list2323232",list)
622 650
           this.exportList = list
623 651
         }
624 652
      })
@@ -630,7 +658,6 @@ export default {
630 658
         return
631 659
       }
632 660
      import('@/vendor/Export2Excel').then(excel => {
633
-      console.log("23232323",this.exportList)
634 661
       for(let i=0;i<this.exportList.length;i++){
635 662
         this.exportList[i].total_price = this.exportList[i].count * this.exportList[i].price
636 663
         this.exportList[i].good_name = this.exportList[i].GoodInfo.good_name
@@ -647,7 +674,7 @@ export default {
647 674
       }
648 675
       const tHeader = ['耗材名称',  '规格&单位','退库数量','退库单价','批次','品名/注册证号(备案凭证号)','生产厂家','生产日期','有效期','退库原因']
649 676
       const filterVal = ['good_name', 'unit','count','price','number','register_account','manufacturer','product_date','expiry_date','remark']
650
-      console.log("table",this.exportList)
677
+
651 678
      
652 679
       const data = this.formatJson(filterVal, this.exportList)
653 680
       excel.export_json_to_excel({
@@ -661,6 +688,18 @@ export default {
661 688
     formatJson(filterVal, jsonData) {
662 689
     return jsonData.map(v => filterVal.map(j => v[j]));
663 690
    },
691
+    getHouseName(id){
692
+      var storehouse_name = ""
693
+      for(let i=0;i<this.houseList.length;i++){
694
+        if(id == this.houseList[i].id){
695
+          storehouse_name = this.houseList[i].storehouse_name
696
+        }
697
+      }
698
+      return storehouse_name
699
+    },
700
+    changeStoreHouse(){
701
+      this.GetCancelStock()
702
+    }
664 703
   }
665 704
 };
666 705
 </script>

+ 26 - 12
src/xt_pages/stock/cancelStockOrderAdd.vue 查看文件

@@ -35,8 +35,16 @@
35 35
       ></stock-in-dialog>
36 36
       <div class="filter-container">
37 37
         <div class="cell clearfix">
38
+         <label class="title"><span class="name"><span style="color:red">*</span>仓库</span> :</label>
39
+         <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px">
40
+              <el-option
41
+                v-for="(option, index) in list"
42
+                :key="index"
43
+                :label="option.storehouse_name"
44
+                :value="option.id">
45
+              </el-option>
46
+         </el-select>
38 47
           <label class="title"><span class="name">退库时间</span> : </label>
39
-
40 48
           <el-date-picker
41 49
             size="small"
42 50
             v-model="return_time"
@@ -63,6 +71,7 @@
63 71
         >
64 72
        
65 73
          <el-table-column align="center" width="320" fixed="left">
74
+       
66 75
              <template slot="header" slot-scope="scope">
67 76
               <span>耗材名称</span>
68 77
             </template>
@@ -346,7 +355,9 @@ export default {
346 355
       goodInfo:[],
347 356
       numberList:[],
348 357
       dealerList:[],
349
-      manufacturerList:[]
358
+      manufacturerList:[],
359
+      list:[],
360
+      storehouse_id:"",
350 361
     };
351 362
   },
352 363
   methods: {
@@ -402,6 +413,8 @@ export default {
402 413
           this.dealer.splice(0, 0, { id: -1, dealer_name: '其他' })
403 414
           this.form.manufacturer = 0
404 415
           this.form.dealer = 0
416
+          this.list = response.data.data.list
417
+          this.storehouse_id = response.data.data.configlist.storehouse_out_info
405 418
         }
406 419
         loading.close()
407 420
       })
@@ -569,15 +582,14 @@ export default {
569 582
           const params = {
570 583
             cancelStock: this.recordInfo.recordData
571 584
           };
572
-        
573
-          console.log("parasm23233222332323",params)
574
-          
585
+         
575 586
           postCancelStock(
576 587
             params,
577 588
             this.return_time,
578 589
             this.form.manufacturer,
579 590
             this.form.dealer,
580
-            this.type
591
+            this.type,
592
+            this.storehouse_id,
581 593
           ).then(response => {
582 594
             if (response.data.state == 0) {
583 595
               this.$message.error(response.data.msg);
@@ -585,18 +597,22 @@ export default {
585 597
               return false;
586 598
             } else {
587 599
              var msg =  response.data.data.msg
600
+             var good_name = response.data.data.good_name
601
+             var specification_name = response.data.data.specification_name
602
+             var storehose_name = response.data.data.storehouse_name
603
+            var str = storehose_name + " " + good_name +"*" + specification_name +"该批次退库数量大于出库数量"
588 604
              if (msg == 1){
589 605
                 this.$message.error("无出库记录")
590 606
                 return
591 607
              }
592 608
              if(msg == 2){
593
-               this.$message.error("该批次退库数量大于出库数量")
609
+               this.$message.error(str)
594 610
              }
595 611
               if(msg == 4){
596
-               this.$message.error("该批次退库数量大于入库数量")
612
+               this.$message.error(str)
597 613
              }
598 614
              if(msg == 5){
599
-              this.$message.error("该批次退库数量大于入库数量")
615
+              this.$message.error(str)
600 616
              }
601 617
              if(msg == 3){
602 618
                this.$notify({
@@ -662,7 +678,7 @@ export default {
662 678
       this.currentIndex = val
663 679
     },
664 680
     handleSelect(val){
665
-      console.log("列表23323232332",this.recordInfo.recordData)
681
+     
666 682
       for(let i=0;i<this.recordInfo.recordData.length;i++){
667 683
         if(this.currentIndex == i){
668 684
           this.recordInfo.recordData[i].good_name = val.good_name
@@ -697,8 +713,6 @@ export default {
697 713
       getStockBatchNumber(params).then(response=>{
698 714
         if(response.data.state == 1){
699 715
           var list = response.data.data.list
700
-          console.log("list2243444",list)
701
-
702 716
           this.numberList = []
703 717
           this.numberList = list
704 718
         }

+ 16 - 2
src/xt_pages/stock/cancelStockOrderEdit.vue 查看文件

@@ -16,7 +16,16 @@
16 16
         v-on:dialog-cancle="cancle"
17 17
       ></stock-in-dialog>
18 18
       <div class="cell clearfix">
19
-
19
+      
20
+         <label class="title"><span class="name"><span style="color:red">*</span>仓库</span> :</label>
21
+         <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" :disabled="true">
22
+              <el-option
23
+                v-for="(option, index) in list"
24
+                :key="index"
25
+                :label="option.storehouse_name"
26
+                :value="option.id">
27
+              </el-option>
28
+         </el-select>
20 29
         <label class="title"><span class="name">退库时间</span> : </label>
21 30
         <el-date-picker size="small" v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22 31
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
@@ -315,7 +324,9 @@
315 324
         manufacturerList:[],
316 325
         dealerList:[],
317 326
         numberList:[],
318
-        numberShow:true
327
+        numberShow:true,
328
+        storehouse_id:"",
329
+        list:[],
319 330
       }
320 331
     },
321 332
     methods: {
@@ -365,6 +376,8 @@
365 376
             this.dealer.splice(0, 0, { id: -1, dealer_name: '其他' })
366 377
             this.form.manufacturer = 0
367 378
             this.form.dealer = 0
379
+            this.list = response.data.data.list
380
+          
368 381
           }
369 382
           loading.close()
370 383
         })
@@ -598,6 +611,7 @@
598 611
               this.recordInfo.recordData.push(response.data.data.list[i])
599 612
             }
600 613
             this.cancelStock = response.data.data.info
614
+            this.storehouse_id = response.data.data.info.storehouse_id
601 615
             this.return_time = this.getTime(this.cancelStock.return_time, '{y}-{m}-{d}')
602 616
             this.form.manufacturer = this.cancelStock.manufacturer
603 617
             this.form.dealer = this.cancelStock.dealer

+ 0 - 0
src/xt_pages/stock/config/stock_setting.vue 查看文件


+ 48 - 47
src/xt_pages/stock/detail/cancelStockDetail.vue 查看文件

@@ -23,9 +23,18 @@
23 23
       >汇总导出
24 24
     </el-button>
25 25
     <div class="cell clearfix">
26
+     <label class="title"><span class="name">仓库</span> :</label>
27
+      <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeHouseList">
28
+          <el-option
29
+            v-for="(option, index) in houseList"
30
+            :key="index"
31
+            :label="option.storehouse_name"
32
+            :value="option.id">
33
+          </el-option>
34
+      </el-select>  
26 35
       <el-input
27 36
         size="small"
28
-        style="width: 400px;"
37
+        style="width:200px;"
29 38
         class="filter-item"
30 39
         v-model.trim="searchKey"
31 40
         placeholder="单据编码/制单人/规格名称/耗材名称"
@@ -38,7 +47,7 @@
38 47
         @click="search"
39 48
         >搜索</el-button
40 49
       >
41
-      <div style="margin-left:10px;">
50
+     
42 51
         <label class="title"><span class="name">日期查询</span> : </label>
43 52
         <el-date-picker
44 53
           size="small"
@@ -67,49 +76,10 @@
67 76
           value-format="yyyy-MM-dd"
68 77
           @change="endTimeChange"
69 78
         ></el-date-picker>
70
-      </div>
71
-    </div>
72
-
73 79
     
80
+    </div>
74 81
 
75
-    <!-- <div class="cell clearfix">
76
-      <label class="title"><span class="name">单据类型</span> : </label>
77
-      <el-select
78
-        size="small"
79
-        v-model="order_type"
80
-        clearable
81
-        placeholder="单据类型"
82
-        @change="changeType"
83
-      >
84
-        <el-option
85
-          v-for="item in orderTypeArr"
86
-          :key="item.value"
87
-          :label="item.label"
88
-          :value="item.value"
89
-        >
90
-        </el-option>
91
-      </el-select>
92
-    </div> -->
93
-
94
-    <!-- <div class="cell clearfix">
95
-      <label class="title"><span class="name">其它</span> : </label>
96
-      <el-select
97
-        size="small"
98
-        v-model="manufacturer_id"
99
-        clearable
100
-        placeholder="厂商"
101
-        @change="changeManufacturer"
102
-      >
103
-        <el-option
104
-          v-for="item in manufacturer"
105
-          :key="item.id"
106
-          :label="item.manufacturer_name"
107
-          :value="item.id"
108
-        >
109
-        </el-option>
110
-      </el-select>
111
-    </div> -->
112
-
82
+  
113 83
     <el-row :gutter="12" style="margin-top: 10px">
114 84
       <el-table
115 85
         :data="cancelStockDate"
@@ -166,6 +136,12 @@
166 136
           </template>
167 137
         </el-table-column>
168 138
 
139
+        <el-table-column label="仓库名称" align="center">
140
+          <template slot-scope="scope">
141
+            {{ getStorehouseName(scope.row.storehouse_id) }}
142
+          </template>
143
+        </el-table-column>
144
+
169 145
         <el-table-column label="数量" align="center">
170 146
           <template slot-scope="scope">
171 147
             {{ scope.row.count }}
@@ -280,6 +256,8 @@ export default {
280 256
       goodUnit:[],
281 257
       tableDataList:[],
282 258
       table:[],
259
+      houseList:[],
260
+      storehouse_id:0
283 261
     };
284 262
   },
285 263
   methods: {
@@ -390,9 +368,10 @@ export default {
390 368
         manufacturer: this.manufacturer_id,
391 369
         order_type: this.order_type,
392 370
         dealer: this.dealer_id,
393
-        keywords: this.searchKey
371
+        keywords: this.searchKey,
372
+        storehouse_id:this.storehouse_id,
394 373
       };
395
-      // console.log("Params23232233223232332",Params)
374
+    
396 375
       this.cancelStockDate = [];
397 376
       getStockDetail(Params).then(response => {
398 377
         if (response.data.state == 0) {
@@ -400,7 +379,12 @@ export default {
400 379
           return false;
401 380
         } else {
402 381
           this.total = response.data.data.total;
403
-          // console.log("数据源头",response.data.data.list)
382
+          var obj = {id:0,storehouse_name:"全部"}
383
+          this.houseList = []
384
+          this.houseList.push(obj)
385
+          for(let i=0;i<response.data.data.houseList.length;i++){
386
+           this.houseList.push(response.data.data.houseList[i])
387
+          }
404 388
           var total = 0
405 389
           for (let i = 0; i < response.data.data.list.length; i++) {
406 390
             
@@ -728,7 +712,24 @@ export default {
728 712
         }
729 713
       }
730 714
       return total
731
-    }
715
+    },
716
+   getStorehouseName(id){
717
+       var storehouse_name = ""
718
+       for(let i=0;i<this.houseList.length;i++){
719
+         if(id == this.houseList[i].id){
720
+           storehouse_name = this.houseList[i].storehouse_name
721
+         }
722
+       }
723
+       if(storehouse_name == "全部"){
724
+          return ""
725
+       }else{
726
+         return storehouse_name
727
+       }
728
+     },
729
+     changeHouseList(){
730
+       this.houseList = []
731
+       this.GetCancelStock()
732
+     }
732 733
   }
733 734
 };
734 735
 </script>

+ 50 - 8
src/xt_pages/stock/detail/stockInDetail.vue 查看文件

@@ -26,9 +26,18 @@
26 26
     </el-button>
27 27
 
28 28
     <div class="cell clearfix">
29
+      <label class="title"><span class="name">仓库</span> :</label>
30
+      <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeHouseList">
31
+          <el-option
32
+            v-for="(option, index) in houseList"
33
+            :key="index"
34
+            :label="option.storehouse_name"
35
+            :value="option.id">
36
+          </el-option>
37
+      </el-select>  
29 38
       <el-input
30 39
         size="small"
31
-        style="width: 400px;"
40
+        style="width: 180px;"
32 41
         class="filter-item"
33 42
         v-model.trim="searchKey"
34 43
         placeholder="单据编码/制单人/规格名称/耗材名称"
@@ -41,7 +50,7 @@
41 50
         @click="search"
42 51
         >搜索</el-button
43 52
       >
44
-      <div style="margin-left:10px;">
53
+    
45 54
         <label class="title"><span class="name">日期查询</span> : </label>
46 55
         <el-date-picker
47 56
           size="small"
@@ -70,7 +79,7 @@
70 79
           value-format="yyyy-MM-dd"
71 80
           @change="endTimeChange"
72 81
         ></el-date-picker>
73
-      </div>
82
+      
74 83
     </div>
75 84
 
76 85
     <el-row :gutter="12" style="margin-top: 10px">
@@ -102,12 +111,14 @@
102 111
         <el-table-column label="耗材名称" align="center">
103 112
           <template slot-scope="scope">
104 113
             {{ typeNameOne(scope.row.good_id) }}
114
+          
105 115
           </template>
106 116
         </el-table-column>
107 117
 
108 118
         <el-table-column label="规格型号" align="center">
109 119
           <template slot-scope="scope">
110 120
             {{ specificationName(scope.row.good_id) }}
121
+           
111 122
           </template>
112 123
         </el-table-column>
113 124
 
@@ -122,6 +133,11 @@
122 133
             {{ getXuserName(scope.row.Warehousing.creater) }}
123 134
           </template>
124 135
         </el-table-column>
136
+        <el-table-column label="仓库名称" align="center">
137
+          <template slot-scope="scope">
138
+            {{getStorehouseName(scope.row.storehouse_id) }}
139
+          </template>
140
+        </el-table-column>
125 141
         <el-table-column label="进货价" align="center">
126 142
           <template slot-scope="scope">
127 143
             {{ scope.row.price }}
@@ -247,6 +263,8 @@ export default {
247 263
       org_id:0,
248 264
       tableInfo:[],
249 265
       tableDataList:[],
266
+      houseList:[],
267
+      storehouse_id:0,
250 268
     };
251 269
   },
252 270
   methods: {
@@ -308,7 +326,8 @@ export default {
308 326
         start_time: this.start_time,
309 327
         end_time: this.end_time,
310 328
         type: this.type,
311
-        keywords: this.searchKey
329
+        keywords: this.searchKey,
330
+        storehouse_id:this.storehouse_id,
312 331
       };
313 332
       this.cancelStockDate = [];
314 333
       this.tableList = []
@@ -361,7 +380,8 @@ export default {
361 380
         manufacturer: this.manufacturer_id,
362 381
         order_type: this.order_type,
363 382
         dealer: this.dealer_id,
364
-        keywords: this.searchKey
383
+        keywords: this.searchKey,
384
+        storehouse_id:this.storehouse_id,
365 385
       };
366 386
       this.cancelStockDate = [];
367 387
       getStockDetail(Params).then(response => {
@@ -370,6 +390,12 @@ export default {
370 390
           return false;
371 391
         } else {
372 392
           this.total = response.data.data.total;
393
+          var obj = {id:0,storehouse_name:"全部"}
394
+          this.houseList = []
395
+          this.houseList.push(obj)
396
+          for(let i=0;i<response.data.data.houseList.length;i++){
397
+           this.houseList.push(response.data.data.houseList[i])
398
+          }
373 399
           var total_price = 0
374 400
           for (let i = 0; i < response.data.data.list.length; i++) {
375 401
             total_price += parseInt(response.data.data.list[i].warehousing_count) * response.data.data.list[i].price
@@ -379,6 +405,8 @@ export default {
379 405
             this.cancelStockDate.push(obj);
380 406
           }
381 407
           this.tableDataList = response.data.data.list
408
+          console.log("表格发3223332322332332323232332233",this.cancelStockDate)
409
+         
382 410
           this.cancelStockDate.push({
383 411
             warehousing_order: "合计",
384 412
             is_total: 1,
@@ -430,12 +458,10 @@ export default {
430 458
       this.multipleSelection = val;
431 459
     },
432 460
     handleSizeChange(val) {
433
-      console.log("val2332323223",val)
434 461
       this.limit = val;
435 462
       this.GetCancelStock();
436 463
     },
437 464
     handleCurrentChange(val) {
438
-      console.log("888888",val)
439 465
       this.page = val;
440 466
       this.GetCancelStock();
441 467
     },
@@ -795,10 +821,26 @@ export default {
795 821
       getGoodDetailPrintList(params).then(response=>{
796 822
         if(response.data.state == 1){
797 823
           var list = response.data.data.list
798
-          // console.log("入库详情单",list)
799 824
           this.tableInfo = list
800 825
         }
801 826
       })
827
+     },
828
+     getStorehouseName(id){
829
+       var storehouse_name = ""
830
+       for(let i=0;i<this.houseList.length;i++){
831
+         if(id == this.houseList[i].id){
832
+           storehouse_name = this.houseList[i].storehouse_name
833
+         }
834
+       }
835
+       if(storehouse_name == "全部"){
836
+          return ""
837
+       }else{
838
+         return storehouse_name
839
+       }
840
+     },
841
+     changeHouseList(){
842
+       this.houseList = []
843
+       this.GetCancelStock()
802 844
      }
803 845
   }
804 846
 };

+ 77 - 37
src/xt_pages/stock/detail/stockOutDetail.vue 查看文件

@@ -23,9 +23,18 @@
23 23
       >汇总导出
24 24
     </el-button>
25 25
     <div class="cell clearfix">
26
+      <label class="title"><span class="name">仓库</span> :</label>
27
+      <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeHouseList">
28
+          <el-option
29
+            v-for="(option, index) in houseList"
30
+            :key="index"
31
+            :label="option.storehouse_name"
32
+            :value="option.id">
33
+          </el-option>
34
+      </el-select>
26 35
       <el-input
27 36
         size="small"
28
-        style="width: 400px;"
37
+        style="width:180px;"
29 38
         class="filter-item"
30 39
         v-model.trim="searchKey"
31 40
         placeholder="单据编码/制单人/规格名称/耗材名称"
@@ -38,7 +47,7 @@
38 47
         @click="search"
39 48
         >搜索</el-button
40 49
       >
41
-      <div style="margin-left:10px;">
50
+
42 51
         <label class="title"><span class="name">日期查询</span> : </label>
43 52
         <el-date-picker
44 53
           size="small"
@@ -67,7 +76,7 @@
67 76
           value-format="yyyy-MM-dd"
68 77
           @change="endTimeChange"
69 78
         ></el-date-picker>
70
-      </div>
79
+
71 80
     </div>
72 81
 
73 82
     <el-row :gutter="12" style="margin-top: 10px">
@@ -123,13 +132,18 @@
123 132
           <template slot-scope="scope">
124 133
             {{ getXuserName(scope.row.WarehouseOut.creater) }}
125 134
           </template>
135
+        </el-table-column>
136
+         <el-table-column label="仓库名称" align="center">
137
+          <template slot-scope="scope">
138
+            {{ getStorehouseName(scope.row.storehouse_id) }}
139
+          </template>
126 140
         </el-table-column>
127 141
         <el-table-column label="出货价" align="center">
128 142
           <template slot-scope="scope">
129 143
             <span v-if="scope.row.is_total == 0 && (orgId == 9919)">{{scope.row.GoodInfo.buy_price}}</span>
130
-            <span v-else> 
131
-              <span v-if="scope.row.price > 0"> {{ scope.row.price }} </span> 
132
-               <span v-if="scope.row.price == 0"> {{ scope.row.GoodInfo.packing_price }} </span> 
144
+            <span v-else>
145
+              <span v-if="scope.row.price > 0"> {{ scope.row.price }} </span>
146
+               <span v-if="scope.row.price == 0"> {{ scope.row.GoodInfo.packing_price }} </span>
133 147
             </span>
134 148
           </template>
135 149
         </el-table-column>
@@ -170,7 +184,7 @@ import { deleteCancelStock, GetAllConfig, getStockDetail,getPrintStockGood,getGo
170 184
 
171 185
 export default {
172 186
   name: "stockOutDetail",
173
-  
187
+
174 188
   created() {
175 189
     var nowDate = new Date();
176 190
     var nowYear = nowDate.getFullYear();
@@ -201,7 +215,7 @@ export default {
201 215
       this.end_time = end_time
202 216
     }
203 217
     window.sessionStorage.removeItem('start')
204
-    window.sessionStorage.removeItem('end')  
218
+    window.sessionStorage.removeItem('end')
205 219
     this.getGoodDetailPrintList()
206 220
     this.GetCancelStock();
207 221
     this.GetConfigInfo();
@@ -209,8 +223,8 @@ export default {
209 223
     this.goodUnit = this.$store.getters.good_unit
210 224
     var org_id = this.$store.getters.xt_user.org.id
211 225
     this.orgId = org_id
212
-    
213
-    
226
+
227
+
214 228
   },
215 229
   data() {
216 230
     return {
@@ -249,6 +263,8 @@ export default {
249 263
       tableData:[],
250 264
       tableOut:[],
251 265
       tableDataList:[],
266
+      storehouse_id:0,
267
+      houseList:[],
252 268
     };
253 269
   },
254 270
   methods: {
@@ -256,7 +272,7 @@ export default {
256 272
       this.order_type = val;
257 273
       this.GetCancelStock();
258 274
       this.getGoodDetailPrintList()
259
-      
275
+
260 276
     },
261 277
     changeManufacturer: function(val) {
262 278
       this.manufacturer_id = val;
@@ -323,12 +339,12 @@ export default {
323 339
           var total = 0
324 340
           for (let i = 0; i < response.data.data.list.length; i++) {
325 341
             this.tableData.push(response.data.data.list[i])
326
-            
342
+
327 343
             var obj = response.data.data.list[i];
328 344
             total += response.data.data.list[i].price * response.data.data.list[i].count
329 345
             obj["is_total"] = 0;
330 346
             this.cancelStockDate.push(obj);
331
-       
347
+
332 348
           }
333 349
           this.cancelStockDate.push({
334 350
             warehouse_out_order_number: "合计",
@@ -338,6 +354,7 @@ export default {
338 354
               warehouse_out_time: 0
339 355
             }
340 356
           });
357
+
341 358
         }
342 359
       });
343 360
     },
@@ -357,7 +374,8 @@ export default {
357 374
         manufacturer: this.manufacturer_id,
358 375
         order_type: this.order_type,
359 376
         dealer: this.dealer_id,
360
-        keywords: this.searchKey
377
+        keywords: this.searchKey,
378
+        storehouse_id:this.storehouse_id,
361 379
       };
362 380
       this.cancelStockDate = [];
363 381
       getStockDetail(Params).then(response => {
@@ -367,7 +385,12 @@ export default {
367 385
         } else {
368 386
 
369 387
           this.total = response.data.data.total;
370
-         
388
+          var obj = {id:0,storehouse_name:"全部"}
389
+          this.houseList = []
390
+          this.houseList.push(obj)
391
+          for(let i=0;i<response.data.data.houseList.length;i++){
392
+           this.houseList.push(response.data.data.houseList[i])
393
+          }
371 394
           var total = 0
372 395
           for (let i = 0; i < response.data.data.list.length; i++) {
373 396
             this.tableData.push(response.data.data.list[i])
@@ -378,13 +401,13 @@ export default {
378 401
             if(response.data.data.list[i].price == 0){
379 402
                total += response.data.data.list[i].GoodInfo.packing_price * response.data.data.list[i].count
380 403
             }
381
-           
404
+
382 405
             obj["is_total"] = 0;
383 406
             this.cancelStockDate.push(obj);
384 407
           }
385
-          
408
+
386 409
           this.tableDataList = response.data.data.list
387
-          
410
+
388 411
           this.cancelStockDate.push({
389 412
             warehouse_out_order_number: "合计",
390 413
             is_total: 1,
@@ -393,7 +416,7 @@ export default {
393 416
               warehouse_out_time: 0
394 417
             }
395 418
           });
396
-          
419
+
397 420
         }
398 421
       });
399 422
     },
@@ -456,7 +479,7 @@ export default {
456 479
         this.cancelStockDate = []
457 480
         this.GetCancelStock();
458 481
         this.getGoodDetailPrintList()
459
-       
482
+
460 483
       }
461 484
     },
462 485
     endTimeChange(val) {
@@ -649,7 +672,7 @@ export default {
649 672
     //   getPrintStockGood(params).then(response=>{
650 673
     //       if(response.data.state == 1){
651 674
     //         var stockTotal =  response.data.data.stockTotal
652
-          
675
+
653 676
     //         this.stockTotal = stockTotal
654 677
     //         var list =  response.data.data.list
655 678
     //         this.tableList = []
@@ -727,7 +750,7 @@ export default {
727 750
           is_mark:"",
728 751
           manufacturer:"",
729 752
         }
730
-       
753
+
731 754
         getGoodInfoList(params).then(response => {
732 755
           if (response.data.state == 0) {
733 756
             this.$message.error(response.data.msg)
@@ -737,7 +760,7 @@ export default {
737 760
             for (let i = 0; i < response.data.data.list.length; i++) {
738 761
               this.goodInfoData.push(response.data.data.list[i])
739 762
             }
740
-           
763
+
741 764
           }
742 765
         })
743 766
       },
@@ -758,9 +781,9 @@ export default {
758 781
         }else{
759 782
           this.tableOut[i].total_price = (this.getStockCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
760 783
         }
761
-       
784
+
762 785
         if(this.orgId  == 10265 || this.orgId ==10215 ){
763
-        
786
+
764 787
          this.tableOut[i].out_count = this.getMySelfCount(this.tableOut[i].good_id)
765 788
         }
766 789
         if(this.orgId!=10265 && this.orgId !=10215){
@@ -773,8 +796,8 @@ export default {
773 796
        const filterVal = ['index','good_name', 'specification_name', 'packing_unit','out_count','packing_price','total_price','remark']
774 797
 
775 798
        const data = this.formatJson(filterVal, this.tableOut)
776
-       console.log("date2332323232",data)
777
-      
799
+
800
+
778 801
         excel.export_json_to_excel({
779 802
            header: tHeader,
780 803
            data,
@@ -802,19 +825,19 @@ export default {
802 825
             this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].price).toFixed(2)
803 826
             total += this.tableDataList[i].count * this.tableDataList[i].price
804 827
           }
805
-         
806
-         
828
+
829
+
807 830
         }
808 831
         obj.total_price = total.toFixed(2)
809
-      
832
+
810 833
         this.tableDataList.push(obj)
811 834
        import('@/vendor/Export2Excel').then(excel => {
812 835
        const tHeader = ['序号','单据编号', '耗材类型', '耗材名称','规格型号','操作时间','制单人','出货价','数量','总价']
813 836
        const filterVal = ['index','warehouse_out_order_number', 'good_type_name', 'good_name','specification_name','time','user_name','price','out_count','total_price']
814 837
 
815 838
        const data = this.formatJson(filterVal, this.tableDataList)
816
- 
817
-      
839
+
840
+
818 841
         excel.export_json_to_excel({
819 842
            header: tHeader,
820 843
            data,
@@ -842,7 +865,7 @@ export default {
842 865
        }
843 866
        return total_price
844 867
      },
845
-   
868
+
846 869
      getGoodDetailPrintList(){
847 870
         const params = {
848 871
           start_time:this.start_time,
@@ -853,16 +876,16 @@ export default {
853 876
       getGoodDetailPrintList(params).then(response=>{
854 877
         if(response.data.state == 1){
855 878
           var list = response.data.data.list
856
-          console.log("lisrt23323223233232232323232323",list)
879
+
857 880
           this.tableOut = list
858 881
           var stockTotal = response.data.data.stockTotal
859
-          console.log("list88888888888888888888",stockTotal)
882
+
860 883
           this.stockTotal = stockTotal
861 884
         }
862 885
       })
863 886
      },
864 887
      getStockCount(id){
865
-     
888
+
866 889
         var count = ""
867 890
         for(let i=0;i<this.stockTotal.length;i++){
868 891
             if(id == this.stockTotal[i].good_id){
@@ -870,7 +893,7 @@ export default {
870 893
             }
871 894
         }
872 895
         return count
873
-    }, 
896
+    },
874 897
     getMySelfCount(good_id){
875 898
        var total = 0
876 899
        for(let i=0;i<this.tableOut.length;i++){
@@ -887,6 +910,23 @@ export default {
887 910
        }
888 911
        return total
889 912
      },
913
+    getStorehouseName(id){
914
+       var storehouse_name = ""
915
+       for(let i=0;i<this.houseList.length;i++){
916
+         if(id == this.houseList[i].id){
917
+           storehouse_name = this.houseList[i].storehouse_name
918
+         }
919
+       }
920
+       if(storehouse_name == "全部"){
921
+          return ""
922
+       }else{
923
+         return storehouse_name
924
+       }
925
+     },
926
+     changeHouseList(){
927
+       this.houseList = []
928
+       this.GetCancelStock()
929
+     }
890 930
   }
891 931
 };
892 932
 </script>

+ 56 - 11
src/xt_pages/stock/drugs/cancelDrugStockOrder.vue 查看文件

@@ -14,13 +14,23 @@
14 14
     </div>
15 15
 
16 16
     <div class="app-container">
17
+      
17 18
       <div class="cell clearfix">
19
+        <label class="title"><span class="name">仓库</span> :</label>
20
+        <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeStoreHouse">
21
+            <el-option
22
+              v-for="(option, index) in houseList"
23
+              :key="index"
24
+              :label="option.storehouse_name"
25
+              :value="option.id">
26
+            </el-option>
27
+        </el-select> 
18 28
         <el-input
19 29
           size="small"
20
-          style="width: 400px;"
30
+          style="width: 200px;"
21 31
           class="filter-item"
22 32
           v-model.trim="searchKey"
23
-          placeholder="单据编码/制单人/厂商"
33
+          placeholder="单据编码/制单人"
24 34
         />
25 35
         <el-button
26 36
           size="small"
@@ -104,6 +114,13 @@
104 114
           </template>
105 115
         </el-table-column>
106 116
 
117
+        <el-table-column label="仓库名称" align="center">
118
+          <template slot-scope="scope">
119
+            {{getHouseName(scope.row.storehouse_id)}}
120
+          </template>
121
+        </el-table-column>
122
+
123
+
107 124
         <el-table-column label="制单人" align="center">
108 125
           <template slot-scope="scope">
109 126
             {{ getXuserName(scope.row.creater) }}
@@ -187,6 +204,14 @@
187 204
                 {{ scope.row.BaseDrugLib.medical_insurance_number}}
188 205
               </template>
189 206
             </el-table-column>
207
+
208
+
209
+            <el-table-column label="仓库名称" align="center">
210
+              <template slot-scope="scope">
211
+                {{getHouseName(scope.row.storehouse_id)}}
212
+              </template>
213
+            </el-table-column>
214
+
190 215
             <el-table-column label="退库数量" align="center">
191 216
               <template slot-scope="scope">
192 217
                 {{ scope.row.count}}
@@ -326,7 +351,9 @@ export default {
326 351
       tableList:[],
327 352
       showTable:false,
328 353
       order_id:"",
329
-      exportList:[]
354
+      exportList:[],
355
+      houseList:[],
356
+      storehouse_id:0,
330 357
     };
331 358
   },
332 359
   methods: {
@@ -337,7 +364,8 @@ export default {
337 364
         start_time: this.start_time,
338 365
         end_time: this.end_time,
339 366
         type: this.type,
340
-        keywords: this.searchKey
367
+        keywords: this.searchKey,
368
+        storehouse_id:this.storehouse_id,
341 369
       };
342 370
       this.cancelStockDate = [];
343 371
       getDrugCancelStockList(Params).then(response => {
@@ -364,7 +392,8 @@ export default {
364 392
         limit: this.limit,
365 393
         start_time: this.start_time,
366 394
         end_time: this.end_time,
367
-        type: this.type
395
+        type: this.type,
396
+        storehouse_id:this.storehouse_id,
368 397
       };
369 398
       this.cancelStockDate = [];
370 399
       getDrugCancelStockList(Params).then(response => {
@@ -372,12 +401,18 @@ export default {
372 401
           this.$message.error(response.data.msg);
373 402
           return false;
374 403
         } else {
375
-          console.log("列表23232323232323",response.data.data.list)
404
+         
376 405
           
377 406
           this.total = response.data.data.total;
378 407
           for (let i = 0; i < response.data.data.list.length; i++) {
379 408
             this.cancelStockDate.push(response.data.data.list[i]);
380 409
           }
410
+          var obj= {id:0,storehouse_name:"全部"}
411
+          this.houseList = []
412
+          this.houseList.push(obj)
413
+          for(let i=0;i<response.data.data.houseList.length;i++){
414
+            this.houseList.push(response.data.data.houseList[i])
415
+          }
381 416
         }
382 417
       });
383 418
     },
@@ -555,8 +590,7 @@ export default {
555 590
         confirmButtonText: "确定",
556 591
         cancelButtonText: "取消",
557 592
         type: "warning"
558
-      })
559
-        .then(() => {
593
+      }).then(() => {
560 594
           deleteDrugCancelStock(params).then(response => {
561 595
             if (response.data.state == 0) {
562 596
               this.$message.error(response.data.msg);
@@ -582,23 +616,22 @@ export default {
582 616
         .catch(() => {});
583 617
     },
584 618
     handleCurrentChangeOne(val) {
619
+     if(val!=null){
585 620
       this.getCancelStockDetail(val.id)
621
+     }
586 622
     },
587 623
     getCancelStockDetail(id){
588
-      console.log("id232233223",id)
589 624
         var params = {
590 625
           id:id
591 626
         }
592 627
       getCancelStockDetail(params).then(response=>{
593 628
        if(response.data.state == 1){
594 629
          var list =  response.data.data.list
595
-         console.log("hhhh23233323223",list)
596 630
          for(let i=0;i<list.length;i++){
597 631
            list[i].product_date = this.getTime(list[i].product_date,"{y}-{h}-{d}")
598 632
            list[i].expiry_date = this.getTime(list[i].expiry_date,"{y}-{h}-{d}")
599 633
          }
600 634
          this.tableList = list
601
-        //  console.log("list23232",list)
602 635
          this.showTable = true
603 636
        }
604 637
       })
@@ -669,6 +702,18 @@ export default {
669 702
     formatJson(filterVal, jsonData) {
670 703
     return jsonData.map(v => filterVal.map(j => v[j]));
671 704
    },
705
+   getHouseName(id){
706
+    var storehouse_name = ""
707
+    for(let i=0;i<this.houseList.length;i++){
708
+        if(id == this.houseList[i].id){
709
+          storehouse_name = this.houseList[i].storehouse_name
710
+        }
711
+    }
712
+    return storehouse_name
713
+  },
714
+  changeStoreHouse(){
715
+    this.GetCancelStock()
716
+  }
672 717
   }
673 718
 };
674 719
 </script>

+ 20 - 3
src/xt_pages/stock/drugs/cancelDrugStockOrderAdd.vue 查看文件

@@ -38,8 +38,16 @@
38 38
 
39 39
       <div class="filter-container">
40 40
         <div class="cell clearfix">
41
+          <label class="title"><span class="name"><span style="color:red">*</span>仓库</span> :</label>
42
+          <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px">
43
+              <el-option
44
+                v-for="(option, index) in list"
45
+                :key="index"
46
+                :label="option.storehouse_name"
47
+                :value="option.id">
48
+              </el-option>
49
+            </el-select>
41 50
           <label class="title"><span class="name">退库时间</span> : </label>
42
-
43 51
           <el-date-picker
44 52
             size="small"
45 53
             v-model="return_time"
@@ -365,7 +373,9 @@ export default {
365 373
       dealerList:[],
366 374
       manufacturerList:[],
367 375
       numberList:[],
368
-      unitList:[]
376
+      unitList:[],
377
+      list:[],
378
+      storehouse_id:"",
369 379
     };
370 380
   },
371 381
   methods: {
@@ -425,6 +435,8 @@ export default {
425 435
 
426 436
           this.form.manufacturer = 0
427 437
           this.form.dealer = 0
438
+          this.list = response.data.data.list
439
+          this.storehouse_id = response.data.data.configlist.drug_storehouse_out
428 440
         }
429 441
         loading.close()
430 442
       })
@@ -546,6 +558,10 @@ export default {
546 558
       this.$router.go(-1);
547 559
     },
548 560
     submit() {
561
+      if(this.storehouse_id == ""){
562
+        this.$message.error("仓库不能为空!")
563
+        return
564
+      }
549 565
       this.$refs["tableForm"].validate(valid => {
550 566
         if (valid) {
551 567
           const array = this.recordInfo.recordData;
@@ -584,7 +600,8 @@ export default {
584 600
             this.return_time,
585 601
             this.form.manufacturer,
586 602
             this.form.dealer,
587
-            this.type
603
+            this.type,
604
+            this.storehouse_id,
588 605
           ).then(response => {
589 606
             if (response.data.state == 0) {
590 607
               this.$message.error(response.data.msg);

+ 24 - 12
src/xt_pages/stock/drugs/cancelDrugStockOrderEdit.vue 查看文件

@@ -18,7 +18,15 @@
18 18
       >
19 19
       </drugs-stock-dialog>
20 20
       <div class="cell clearfix">
21
-
21
+        <label class="title"><span class="name"><span style="color:red">*</span>仓库</span> :</label>
22
+          <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" :disabled="true">
23
+            <el-option
24
+              v-for="(option, index) in houseList"
25
+              :key="index"
26
+              :label="option.storehouse_name"
27
+              :value="option.id">
28
+            </el-option>
29
+          </el-select>
22 30
         <label class="title"><span class="name">退库时间</span> : </label>
23 31
         <el-date-picker size="small" v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
24 32
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
@@ -342,7 +350,9 @@
342 350
         dealerList:[],
343 351
         numberList:[],
344 352
         unitList:[],
345
-        canCelShow:true
353
+        canCelShow:true,
354
+        storehouse_id:"",
355
+        houseList:[],
346 356
       }
347 357
     },
348 358
     methods: {
@@ -420,7 +430,7 @@
420 430
         }
421 431
         return name;
422 432
       },  specificationName: function(drug_id) {
423
-        console.log(this.goodInfo)
433
+
424 434
         let name = "";
425 435
         for (let i = 0; i < this.goodInfo.length; i++) {
426 436
           if (this.goodInfo[i].id == drug_id) {
@@ -555,9 +565,9 @@
555 565
             const params = {
556 566
               'cancelStock': this.recordInfo.recordData
557 567
             }
558
-            console.log("232323223",this.recordInfo.recordData)
568
+           
559 569
             
560
-            editDrugCancelStockInfo(params, this.return_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer,this.form.dealer).then(response => {
570
+            editDrugCancelStockInfo(params, this.return_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer,this.form.dealer,this.storehouse_id).then(response => {
561 571
               if (response.data.state == 0) {
562 572
                 this.$message.error(response.data.msg)
563 573
                 return false
@@ -590,7 +600,7 @@
590 600
             this.$message.error(response.data.msg)
591 601
             return false
592 602
           } else {
593
-            console.log("list232323",response.data.data.list)
603
+           
594 604
             for (let i = 0; i < response.data.data.list.length; i++) {
595 605
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
596 606
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
@@ -603,10 +613,12 @@
603 613
               this.recordInfo.recordData.push(response.data.data.list[i])
604 614
             }
605 615
             this.cancelStock = response.data.data.info
606
-            console.log("hhhh23hh2hh23h223",this.cancelStock)
616
+           
617
+            this.storehouse_id = response.data.data.info.storehouse_id
607 618
             this.return_time = this.getTime(this.cancelStock.return_time, '{y}-{m}-{d}')
608 619
             this.form.manufacturer = this.cancelStock.manufacturer
609 620
             this.form.dealer = this.cancelStock.dealer
621
+            this.houseList = response.data.data.houselist
610 622
           }
611 623
           if (this.recordInfo.recordData.length == 0) {
612 624
             const tempObj = {}
@@ -634,7 +646,7 @@
634 646
             searchArray = response.data.data.list;
635 647
             
636 648
              var list = response.data.data.list
637
-             console.log("猎豹22222222222",list)
649
+      
638 650
 
639 651
              this.drugList = list
640 652
              var manufacturerList = response.data.data.manufacturerList
@@ -672,13 +684,13 @@
672 684
             arr.push(this.recordInfo.recordData[i].drug_id)
673 685
          }
674 686
          var str = arr.join(",")
675
-         console.log("str",str)
687
+       
676 688
          if(str.indexOf(val.id)!=-1){
677 689
             this.$message.error("该药品已存在列表中")
678 690
             return
679 691
          }
680 692
          this.getDrugBatchNumber(val.id)
681
-         console.log("val2323232323223",val)
693
+
682 694
          for(let i=0;i<this.recordInfo.recordData.length;i++){
683 695
            if(i == this.currentIndex){
684 696
              this.recordInfo.recordData[i].drug_id  = val.id
@@ -699,7 +711,7 @@
699 711
             
700 712
            }
701 713
         }
702
-        console.log("333333",this.recordInfo.recordData)
714
+       
703 715
       },
704 716
       getDrugBatchNumber(id){
705 717
           var params = {
@@ -708,7 +720,7 @@
708 720
         getDrugBatchNumber(params).then(response=>{
709 721
            if(response.data.state == 1){
710 722
              var list = response.data.data.list
711
-             console.log("list2222",list)
723
+       
712 724
              for(let i=0;i<list.length;i++){
713 725
                this.numberList.push(list[i])
714 726
              }

+ 22 - 19
src/xt_pages/stock/drugs/components/drugCancelDetail.vue 查看文件

@@ -369,6 +369,7 @@ export default {
369 369
             order_number: "合计",
370 370
             is_total: 1,
371 371
             specification_name:"",
372
+            unit:"",
372 373
             ctime:"",
373 374
             total_price:total_price.toFixed(2),
374 375
           });
@@ -408,7 +409,7 @@ export default {
408 409
         //  if(this.tableDataList[i].drug_type == 3){
409 410
         //     this.tableDataList[i].drug_type == "成药"
410 411
         //   }
411
-          this.tableList[i].drug_type = this.getTypeList(scope.row.drug_type)
412
+          this.tableDataList[i].drug_type = this.getTypeList(this.tableDataList[i].drug_type)
412 413
           this.tableDataList[i].index = i+1
413 414
           this.tableDataList[i].unit = this.tableDataList[i].dose + this.tableDataList[i].dose_unit + "*"+this.tableDataList[i].min_number + this.tableDataList[i].min_unit+"/"+this.tableDataList[i].max_unit
414 415
           this.tableDataList[i].user_name = this.getAdminUser(this.tableDataList[i].creater)
@@ -418,7 +419,7 @@ export default {
418 419
         }
419 420
        import('@/vendor/Export2Excel').then(excel => {
420 421
         const tHeader = ['序号','单据编号', '药品名称', '规格型号','单据类型','操作时间','制单人','数量','退库价','总价']
421
-        const filterVal = ['index','order_number','drug_name', 'unit', 'drug_type','ctime','user_name','total_count','price','total_price']
422
+        const filterVal = ['index','order_number','drug_name', 'specification_name', 'drug_type','ctime','user_name','total_count','price','total_price']
422 423
         
423 424
         const data = this.formatJson(filterVal, this.tableDataList)
424 425
 
@@ -434,33 +435,35 @@ export default {
434 435
         return jsonData.map(v => filterVal.map(j => v[j]));
435 436
      },
436 437
     exportListOne(){
437
-      let obj = {'index':'合计','total_price':0}
438
+      // let obj = {'index':'合计','total_price':0}
439
+      console.log("@332322323232332",this.tableList)
440
+      
438 441
        for(let i=0;i<this.tableList.length;i++){
439 442
           this.tableList[i].index = i+1
440 443
           this.tableList[i].unit = this.tableList[i].dose + this.tableList[i].dose_unit + "*"+this.tableList[i].min_number + this.tableList[i].min_unit+"/"+this.tableList[i].max_unit
441
-          if(this.tableData[i].drug_type == 1){
442
-             this.tableData[i].drugtype = "西药"
444
+          if(this.tableList[i].drug_type == 1){
445
+             this.tableList[i].drugtype = "西药"
443 446
           }
444
-          if(this.tableData[i].drug_type == 2){
445
-             this.tableData[i].drugtype = "草药"
447
+          if(this.tableList[i].drug_type == 2){
448
+             this.tableList[i].drugtype = "草药"
446 449
           }
447
-          if(this.tableData[i].drug_type == 3){
448
-             this.tableData[i].drugtype = "成药"
450
+          if(this.tableList[i].drug_type == 3){
451
+             this.tableList[i].drugtype = "成药"
449 452
           }
450
-          this.tableData[i].time = this.getTime(this.tableData[i].ctime)
451
-          this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
453
+          this.tableList[i].time = this.getTime(this.tableList[i].ctime)
454
+          this.tableList[i].user_name = this.getAdminUser(this.tableList[i].creater)
452 455
           
453
-          this.tableData[i].total_price = this.tableData[i].count * this.tableData[i].price
454
-           obj.total_price += this.tabelePrintList[i].count * this.tabelePrintList[i].price
456
+          //this.tableList[i].total_price = this.tableList[i].count * this.tableList[i].price
457
+          //  obj.total_price += this.tableList[i].count * this.tableList[i].price
455 458
         }
456
-        obj.total_price = obj.total_price.toFixed(2)
457
-       this.tableData.push(obj)
458
-       for(let i=0;i<this.tableData.length;i++){
459
-         this.tableData[i].total_price = this.tableData[i].total_price.toFixed(2)
460
-       }
459
+      //   obj.total_price = obj.total_price.toFixed(2)
460
+      //  this.tableList.push(obj)
461
+      //  for(let i=0;i<this.tableData.length;i++){
462
+      //    this.tableData[i].total_price = (this.tableData[i].total_price).toFixed(2)
463
+      //  }
461 464
        import('@/vendor/Export2Excel').then(excel => {
462 465
        const tHeader = ['序号','单据编号', '药品类型','药品名称', '规格型号','操作时间','制单人','退货价','数量','总价']
463
-       const filterVal = ['index','order_number','drugtype','drug_name', 'unit', 'time','user_name','price','count','total_price']
466
+       const filterVal = ['index','order_number','drugtype','drug_name', 'specification_name', 'time','user_name','price','count','total_price']
464 467
        
465 468
        const data = this.formatJson(filterVal, this.tableList)
466 469
        

+ 54 - 10
src/xt_pages/stock/drugs/components/drugInOrder.vue 查看文件

@@ -23,11 +23,20 @@
23 23
       type="primary"
24 24
       >汇总导出
25 25
     </el-button>
26
-
26
+   
27 27
     <div class="cell clearfix">
28
+      <label class="title"><span class="name">仓库</span> :</label>
29
+      <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeHouseList">
30
+          <el-option
31
+            v-for="(option, index) in houseList"
32
+            :key="index"
33
+            :label="option.storehouse_name"
34
+            :value="option.id">
35
+          </el-option>
36
+      </el-select>  
28 37
       <el-input
29 38
         size="small"
30
-        style="width: 400px;"
39
+        style="width: 200px;"
31 40
         class="filter-item"
32 41
         v-model.trim="searchKey"
33 42
         placeholder="单据编码/制单人/药品名称"
@@ -40,7 +49,6 @@
40 49
         @click="search"
41 50
         >搜索</el-button
42 51
       >
43
-      <div style="margin-left:10px;">
44 52
         <label class="title"><span class="name">日期查询</span> : </label>
45 53
         <el-date-picker
46 54
           size="small"
@@ -70,7 +78,6 @@
70 78
           value-format="yyyy-MM-dd"
71 79
           @change="endTimeChange"
72 80
         ></el-date-picker>
73
-      </div>
74 81
     </div>
75 82
 
76 83
     <el-row :gutter="12" style="margin-top: 10px">
@@ -124,6 +131,11 @@
124 131
            {{getAdminUser(scope.row.creater)}}
125 132
           </template>
126 133
         </el-table-column>
134
+        <el-table-column label="仓库名称" align="center">
135
+          <template slot-scope="scope">
136
+           {{getStorehouseName(scope.row.storehouse_id)}}
137
+          </template>
138
+        </el-table-column>
127 139
         <el-table-column label="进货价" align="center">
128 140
           <template slot-scope="scope">
129 141
             {{scope.row.price}}
@@ -134,6 +146,11 @@
134 146
             {{scope.row.warehousing_count}}
135 147
           </template>
136 148
         </el-table-column>
149
+        <el-table-column label="单位" align="center">
150
+          <template slot-scope="scope">
151
+            {{scope.row.count_unit}}
152
+          </template>
153
+        </el-table-column>
137 154
         <el-table-column label="总价" align="center">
138 155
           <template slot-scope="scope">
139 156
             {{scope.row.total_price}}
@@ -190,7 +207,6 @@ export default {
190 207
     
191 208
     var end_time =  window.sessionStorage.getItem('drug_end_in_time')
192 209
     if(start_time !=null){
193
-      console.log("hh232323232红红火火")
194 210
       this.start_time = start_time
195 211
     }
196 212
     if(end_time!=null){
@@ -238,6 +254,8 @@ export default {
238 254
       tableList:[],
239 255
       tabelePrintList:[],
240 256
       drugTypeList:[],
257
+      storehouse_id:0,
258
+      houseList:[],
241 259
     };
242 260
   },
243 261
   methods: {
@@ -342,16 +360,24 @@ export default {
342 360
         keyword:this.searchKey,
343 361
         limit:this.limit,
344 362
         page:this.page,
363
+        storehouse_id:this.storehouse_id,
345 364
        }
346 365
       getDrugIndetail(params).then(response=>{
347 366
         if(response.data.state == 1){
348 367
           var drugInOrder = response.data.data.detail
349 368
           var drugTypeParent = response.data.data.drugTypeParent
350
-          console.log("药品类型",drugTypeParent)
351
-        //  this.drugTypeList = drugTypeParent
369
+          var obj = {id:0,storehouse_name:"全部"}
370
+          this.houseList = []
371
+          this.houseList.push(obj)
372
+          for(let i=0;i<response.data.data.houseList.length;i++){
373
+           this.houseList.push(response.data.data.houseList[i])
374
+          }
352 375
           var total_price = 0
353 376
           for(let i=0;i<drugInOrder.length;i++){
354 377
              drugInOrder[i].specification_name  = drugInOrder[i].dose + drugInOrder[i].dose_unit + "*" + drugInOrder[i].min_number +  drugInOrder[i].min_unit + "/" + drugInOrder[i].max_unit
378
+             if(drugInOrder[i].storehouse_id > 0){
379
+               drugInOrder[i].total_price = (drugInOrder[i].warehousing_count * drugInOrder[i].price).toFixed(2)
380
+             }
355 381
              drugInOrder[i].is_total = 0
356 382
              total_price += drugInOrder[i].warehousing_count * drugInOrder[i].price
357 383
           }
@@ -362,6 +388,7 @@ export default {
362 388
             ctime:"",
363 389
             total_price:total_price.toFixed(2),
364 390
           });
391
+          console.log("drugInOrder232332322323233232322332322332",drugInOrder)
365 392
           this.cancelStockDate = drugInOrder
366 393
            let objInfo = {}
367 394
           drugInOrder.forEach((item,index)=>{
@@ -416,7 +443,7 @@ export default {
416 443
         end_time:this.end_time,
417 444
         order_type:this.order_type,
418 445
       }
419
-     console.log("药品入库232323223",params)
446
+    
420 447
      getDrugWarehouseInfoPrint(params).then(response=>{
421 448
           if(response.data.state == 1){
422 449
             var list = response.data.data.list
@@ -443,7 +470,7 @@ export default {
443 470
       return name
444 471
     },
445 472
      exportList(){
446
-        console.log("hhh233223232323",this.tabelePrintList)
473
+       
447 474
         for(let i=0;i<this.tabelePrintList.length;i++){
448 475
           this.tabelePrintList[i].index = i+1
449 476
           this.tabelePrintList[i].drug_name = this.tabelePrintList[i].XtBaseDrug.drug_name
@@ -517,7 +544,24 @@ export default {
517 544
         }
518 545
       }
519 546
       return name
520
-    }
547
+    },
548
+   getStorehouseName(id){
549
+       var storehouse_name = ""
550
+       for(let i=0;i<this.houseList.length;i++){
551
+         if(id == this.houseList[i].id){
552
+           storehouse_name = this.houseList[i].storehouse_name
553
+         }
554
+       }
555
+       if(storehouse_name == "全部"){
556
+          return ""
557
+       }else{
558
+         return storehouse_name
559
+       }
560
+     },
561
+     changeHouseList(){
562
+       this.houseList = []
563
+       this.getlist()
564
+     }
521 565
   }
522 566
 };
523 567
 </script>

+ 56 - 18
src/xt_pages/stock/drugs/components/drugOutDetail.vue 查看文件

@@ -24,9 +24,18 @@
24 24
     </el-button>
25 25
    
26 26
     <div class="cell clearfix">
27
+       <label class="title"><span class="name">仓库</span> :</label>
28
+      <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeHouseList">
29
+          <el-option
30
+            v-for="(option, index) in houseList"
31
+            :key="index"
32
+            :label="option.storehouse_name"
33
+            :value="option.id">
34
+          </el-option>
35
+      </el-select>  
27 36
       <el-input
28 37
         size="small"
29
-        style="width: 400px;"
38
+        style="width: 200px;"
30 39
         class="filter-item"
31 40
         v-model.trim="searchKey"
32 41
         placeholder="单据编码/制单人/药品名称"
@@ -39,7 +48,6 @@
39 48
         @click="search"
40 49
         >搜索</el-button
41 50
       >
42
-      <div style="margin-left:10px;">
43 51
         <label class="title"><span class="name">日期查询</span> : </label>
44 52
         <el-date-picker
45 53
           size="small"
@@ -68,7 +76,7 @@
68 76
           value-format="yyyy-MM-dd"
69 77
           @change="endTimeChange"
70 78
         ></el-date-picker>
71
-      </div>
79
+     
72 80
     </div>
73 81
 
74 82
   
@@ -125,6 +133,11 @@
125 133
            {{getAdminUser(scope.row.creater)}}
126 134
           </template>
127 135
         </el-table-column>
136
+        <el-table-column label="仓库名称" align="center">
137
+          <template slot-scope="scope">
138
+           {{getStorehouseName(scope.row.storehouse_id)}}
139
+          </template>
140
+        </el-table-column>
128 141
         <el-table-column label="出货价" align="center">
129 142
           <template slot-scope="scope">
130 143
            <span v-if="org_id == 9919">{{scope.row.last_price}} </span> 
@@ -265,6 +278,8 @@ export default {
265 278
       tablePrint:[],
266 279
       org_id:0,
267 280
       drugTypeList:[],
281
+      storehouse_id:0,
282
+      houseList:[],
268 283
     };
269 284
   },
270 285
   methods: {
@@ -317,7 +332,7 @@ export default {
317 332
     },
318 333
     fetchAllAdminUsers() {
319 334
       fetchAllAdminUsers().then(response => {
320
-        console.log(response);
335
+       
321 336
         if (response.data.state == 1) {
322 337
           this.adminUserOptions = response.data.data.users;
323 338
         }
@@ -396,13 +411,19 @@ export default {
396 411
          keyword:this.searchKey,
397 412
          page:this.page,
398 413
          limit:this.limit,
414
+         storehouse_id:this.storehouse_id,
399 415
       }  
400 416
       getDrugOutDetail(params).then(response=>{
401 417
         this.tableData = []
402 418
         this.tableList = []
403 419
         if(response.data.state == 1){
404 420
           var order = response.data.data.order
405
-          console.log("出库数据",order)
421
+          var obj = {id:0,storehouse_name:"全部"}
422
+          this.houseList = []
423
+          this.houseList.push(obj)
424
+          for(let i=0;i<response.data.data.houseList.length;i++){
425
+           this.houseList.push(response.data.data.houseList[i])
426
+          }
406 427
           var total_price = 0
407 428
           for(let i=0;i<order.length;i++){
408 429
              order[i].specification_name  = order[i].dose + order[i].dose_unit + "*" + order[i].min_number +  order[i].min_unit + "/" + order[i].max_unit
@@ -424,7 +445,7 @@ export default {
424 445
              }
425 446
             
426 447
           }
427
-          console.log("total_price23322332232332323232",order)
448
+         
428 449
            order.push({
429 450
             warehouse_out_order_number: "合计",
430 451
             is_total: 1,
@@ -437,7 +458,7 @@ export default {
437 458
             order[i].total_price = order[i].total_price.toFixed(2)
438 459
           }
439 460
        
440
-          console.log("order232233232232323232332",order)
461
+         
441 462
           this.tableData = order
442 463
            let objInfo = {}
443 464
           order.forEach((item,index)=>{
@@ -526,7 +547,7 @@ export default {
526 547
     },
527 548
 
528 549
      exportList(){
529
-        console.log("hh23233223",this.tablePrint)
550
+    
530 551
         for(let i=0;i<this.tablePrint.length;i++){
531 552
           this.tablePrint[i].index = i+1
532 553
         }
@@ -544,7 +565,7 @@ export default {
544 565
               this.tablePrint[i].total = this.getTotalPriceOne(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].min_price) 
545 566
            }
546 567
         }
547
-       console.log("列表数据333333333",this.tablePrint)
568
+  
548 569
        
549 570
        import('@/vendor/Export2Excel').then(excel => {
550 571
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
@@ -556,7 +577,7 @@ export default {
556 577
        obj.total_price = obj.total_price.toFixed(2)
557 578
        this.tablePrint.push(obj)
558 579
        const data = this.formatJson(filterVal, this.tablePrint)
559
-       console.log("data",data)
580
+  
560 581
        
561 582
        excel.export_json_to_excel({
562 583
            header: tHeader,
@@ -610,7 +631,7 @@ export default {
610 631
          }
611 632
        }
612 633
        const data = this.formatJson(filterVal, this.tableData)
613
-       console.log("data",data)
634
+  
614 635
      
615 636
        excel.export_json_to_excel({
616 637
            header: tHeader,
@@ -641,7 +662,7 @@ export default {
641 662
             for (let i = 0; i < response.data.data.list.length; i++) {
642 663
               this.drugList.push(response.data.data.list[i])
643 664
             }
644
-            console.log("药品列表",this.drugList)
665
+ 
645 666
           }
646 667
         })
647 668
       },
@@ -651,11 +672,11 @@ export default {
651 672
          end_time:this.end_time,
652 673
          order_type:2,
653 674
       }  
654
-      console.log("poara232323223233223",params)
675
+     
655 676
      getDrugOutOrderPrint(params).then(response=>{
656 677
         if(response.data.state == 1){
657 678
             var list = response.data.data.list
658
-            console.log("药品出库详情",list)
679
+          
659 680
             let objInfo = {}
660 681
             if(this.org_id == 9671 || this.org_id == 9919){
661 682
               list.forEach((item,index)=>{
@@ -712,7 +733,7 @@ export default {
712 733
               }
713 734
             }
714 735
            this.tablePrint = newArr
715
-           console.log(" this.tablePrint",this.tablePrint)  
736
+          
716 737
         }
717 738
      })
718 739
     },
@@ -755,7 +776,7 @@ export default {
755 776
         for(let j=0;j<arr.length;j++){
756 777
           total +=arr[j].count
757 778
         }
758
-        console.log("total23232",total)
779
+        
759 780
         return (total*min_price).toFixed(2)
760 781
       },
761 782
 
@@ -771,7 +792,7 @@ export default {
771 792
         for(let j=0;j<arr.length;j++){
772 793
           total +=arr[j].count
773 794
         }
774
-        console.log("total23232",total)
795
+     
775 796
         return total*min_price
776 797
       },
777 798
       getCountSix(drug_id,val){
@@ -813,7 +834,24 @@ export default {
813 834
           }
814 835
         }
815 836
         return price
816
-      } 
837
+      },
838
+      getStorehouseName(id){
839
+       var storehouse_name = ""
840
+       for(let i=0;i<this.houseList.length;i++){
841
+         if(id == this.houseList[i].id){
842
+           storehouse_name = this.houseList[i].storehouse_name
843
+         }
844
+       }
845
+       if(storehouse_name == "全部"){
846
+          return ""
847
+       }else{
848
+         return storehouse_name
849
+       }
850
+     },
851
+     changeHouseList(){
852
+       this.houseList = []
853
+       this.getlist()
854
+     } 
817 855
   }
818 856
 };
819 857
 </script>

+ 25 - 9
src/xt_pages/stock/drugs/drugBatchNumber.vue 查看文件

@@ -44,7 +44,7 @@
44 44
         :data="tableList"
45 45
         border
46 46
         style="width: 100%">
47
-        <el-table-column prop="date" label="序号" width="180" align="center">
47
+        <el-table-column prop="date" label="序号" width="100" align="center">
48 48
            <template  slot-scope="scope">
49 49
               {{scope.$index + 1}}
50 50
            </template>
@@ -73,6 +73,11 @@
73 73
            <template slot-scope="scope">
74 74
               {{scope.row.batch_number}}
75 75
            </template>
76
+        </el-table-column>
77
+        <el-table-column prop="drug_name" label="仓库名称" width="200" align="center">
78
+           <template slot-scope="scope">
79
+              <span>{{getHouseName(scope.row.storehouse_id)}}</span>
80
+           </template>
76 81
         </el-table-column>
77 82
          <el-table-column prop="drug_name" label="数量" align="center">
78 83
            <template slot-scope="scope">
@@ -187,6 +192,7 @@
187 192
         minCount:[],
188 193
         drugOutList:[],
189 194
         drug:{},
195
+        houseList:[],
190 196
       }
191 197
     },
192 198
     methods:{
@@ -199,13 +205,14 @@
199 205
         getBatchOrderDetail(params).then(response=>{
200 206
            if(response.data.state == 1){
201 207
               var detail =  response.data.data.detail
202
-              console.log("detail2343434",detail)
208
+             
203 209
               this.tableList = detail
204 210
               this.manufacturerList = response.data.data.manufacturerList
205 211
               var total = response.data.data.total
206
-              console.log("total",total)
212
+              
207 213
               this.total = total
208 214
               this.drug =  response.data.data.drug
215
+              this.houseList = response.data.data.houseList
209 216
            }
210 217
         })
211 218
       },
@@ -244,16 +251,16 @@
244 251
       getDrugCountList(params).then(response=>{
245 252
           if(response.data.state == 1){
246 253
             var countlist =  response.data.data.countList
247
-            console.log("入库数据",countlist)
254
+          
248 255
             this.countList = countlist
249 256
             var outcountlist = response.data.data.outCountList
250
-            console.log("出库数据",outcountlist)
257
+           
251 258
             this.outCountList = outcountlist
252 259
             var aucountlist = response.data.data.auCountList
253
-            console.log("自动数据",aucountlist)
260
+           
254 261
             this.autoCountList = aucountlist
255 262
              var minCount = response.data.data.minCount
256
-            console.log("minCount",minCount)
263
+            
257 264
             this.minCount = minCount
258 265
             var info = response.data.data.info
259 266
             for(let i=0;i<info.length;i++){
@@ -261,7 +268,7 @@
261 268
                  info[i].count = info[i].count * info[i].min_number
262 269
               }
263 270
             }
264
-            console.log("info2222222",info)
271
+          
265 272
             this.drugOutList = info
266 273
           }
267 274
         })
@@ -362,7 +369,16 @@
362 369
            name = this.drug.drug_name
363 370
         }
364 371
         return name
365
-     }
372
+     },
373
+     getHouseName(id){
374
+      var storehouse_name = ""
375
+      for(let i=0;i<this.houseList.length;i++){
376
+        if(id == this.houseList[i].id){
377
+          storehouse_name = this.houseList[i].storehouse_name
378
+        }
379
+      }
380
+      return storehouse_name
381
+     },
366 382
     }
367 383
   }
368 384
 </script>

+ 39 - 0
src/xt_pages/stock/drugs/drugDamaged.vue 查看文件

@@ -1,6 +1,14 @@
1 1
 <template>
2 2
   <div>
3 3
     <div  style="margin-bottom:10px;">
4
+    <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changehouseList">
5
+        <el-option
6
+          v-for="(option, index) in houseList"
7
+          :key="index"
8
+          :label="option.storehouse_name"
9
+          :value="option.id">
10
+        </el-option>
11
+      </el-select>   
4 12
       <el-input
5 13
       size="small"
6 14
       style="width: 200px;"
@@ -60,6 +68,11 @@
60 68
               {{getTotalPrice(scope.row.drug_id,scope.row.min_price)}}
61 69
             </template>
62 70
         </el-table-column>
71
+        <el-table-column prop="name" label="仓库名称" align="center">
72
+            <template slot-scope="scope">
73
+              {{getHouseName(scope.row.storehouse_id)}}
74
+            </template>
75
+        </el-table-column>
63 76
         <el-table-column prop="name" label="操作人" align="center">
64 77
             <template slot-scope="scope">
65 78
               {{getDoctorName(scope.row.creater)}}
@@ -219,6 +232,7 @@ export default {
219 232
                 product_date:"",
220 233
                 stock_max_number:"",
221 234
                 stock_min_number:"",
235
+                storehouse_id:"",
222 236
             },
223 237
             drugList:[],
224 238
             manufacturerList:[],
@@ -258,6 +272,7 @@ export default {
258 272
             min_unit:"",
259 273
             min_price:0,
260 274
             drug_id:0,
275
+            storehouse_id:0,
261 276
         }
262 277
     },
263 278
     methods:{
@@ -295,6 +310,7 @@ export default {
295 310
           start_time:this.start_time,
296 311
           end_time:this.end_time,
297 312
           keyword:this.searchKey,
313
+          storehouse_id:this.storehouse_id,
298 314
         }
299 315
 
300 316
         getDrugDamageList(params).then(response=>{
@@ -304,6 +320,12 @@ export default {
304 320
              this.doctorList = response.data.data.doctorList
305 321
              var datamagelist = response.data.data.damagelist
306 322
              this.datamageList = datamagelist
323
+             var obj = {id:0,storehouse_name:"全部"}
324
+             this.houseList = []
325
+             this.houseList.push(obj)
326
+             for(let i=0;i<response.data.data.houseList.length;i++){
327
+              this.houseList.push(response.data.data.houseList[i])
328
+             }
307 329
            }
308 330
         })
309 331
       },
@@ -432,6 +454,23 @@ export default {
432 454
        all_count =  total_count * this.min_number
433 455
 
434 456
        return (count / all_count).toFixed(2)*100
457
+     },
458
+     changehouseList(){
459
+       this.houseList = []
460
+       this.getlist()
461
+     },
462
+     getHouseName(id){
463
+      var storehouse_name  = ""
464
+      for(let i=0;i<this.houseList.length;i++){
465
+        if(id == this.houseList[i].id){
466
+          storehouse_name = this.houseList[i].storehouse_name
467
+        }
468
+      }
469
+      if(storehouse_name == "全部"){
470
+        return ""
471
+      }else{
472
+        return storehouse_name
473
+      }
435 474
      }
436 475
     },
437 476
     created(){

+ 39 - 25
src/xt_pages/stock/drugs/drugStockFlow.vue 查看文件

@@ -71,16 +71,18 @@
71 71
              <span v-if="scope.row.consumable_type == 7">自动退库</span>
72 72
              <span v-if="scope.row.consumable_type == 5">报损数量</span>
73 73
              <span v-if="scope.row.consumable_type == 10">盘盈</span>
74
-            <span v-if="scope.row.consumable_type == 11">盘亏</span>
74
+             <span v-if="scope.row.consumable_type == 11">盘亏</span>
75
+             <span v-if="scope.row.consumable_type == 12">调拨出库</span>
76
+             <span v-if="scope.row.consumable_type == 13">调拨入库</span>
75 77
            </template>
76 78
         </el-table-column>
77 79
         <el-table-column prop="drug_name" label="出/入库单据编码" align="center">
78 80
            <template slot-scope="scope">
79 81
              <span v-if="scope.row.consumable_type == 1">{{scope.row.warehousing_order}}</span>
80
-              <span v-if="scope.row.consumable_type == 2 || scope.row.consumable_type == 3">{{scope.row.warehouse_out_order_number}}</span>
82
+              <span v-if="scope.row.consumable_type == 2 || scope.row.consumable_type == 3 || scope.row.consumable_type == 12">{{scope.row.warehouse_out_order_number}}</span>
81 83
               <span v-if="scope.row.consumable_type == 4 || scope.row.consumable_type == 7">{{scope.row.cancel_order_number}}</span>
82 84
               <span v-if="scope.row.consumable_type == 5">{{scope.row.warehouse_out_order_number}}</span>
83
-              <span v-if="scope.row.consumable_type == 10 || scope.row.consumable_type == 11">{{scope.row.warehousing_order}}</span>
85
+              <span v-if="scope.row.consumable_type == 10 || scope.row.consumable_type == 11 || scope.row.consumable_type == 13">{{scope.row.warehousing_order}}</span>
84 86
            </template>
85 87
         </el-table-column>
86 88
         <el-table-column prop="drug_name" label="操作日期" align="center">
@@ -88,6 +90,11 @@
88 90
              {{getTime(scope.row.ctime,"{y}-{h}-{d}")}}
89 91
            </template>
90 92
         </el-table-column>
93
+        <el-table-column prop="drug_name" label="仓库名称" align="center">
94
+           <template slot-scope="scope">
95
+              <span>{{getHouseName(scope.row.storehouse_id)}}</span>
96
+           </template>
97
+        </el-table-column>
91 98
         <el-table-column prop="drug_name" label="数量" align="center">
92 99
            <template slot-scope="scope">
93 100
               {{scope.row.count}}
@@ -184,10 +191,7 @@
184 191
       var drugCategory = getDictionaryDataConfig('system','drug_category')
185 192
       this.drugCategory.push(...drugCategory)
186 193
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
187
-      // this.getlist()
188
-      // this.getOutList()
189
-      // this.getDrugCountList()
190
-
194
+  
191 195
       this.getDrugFlow()
192 196
     },
193 197
     components: {
@@ -234,7 +238,9 @@
234 238
           {id:3,name:"自动出库"},
235 239
           {id:4,name:"手动退库"},
236 240
           {id:10,name:"盘盈"},
237
-          {id:11,name:"盘亏"}
241
+          {id:11,name:"盘亏"},
242
+          {id:12,name:"调拨出库"},
243
+          {id:13,name:"调拨入库"}
238 244
         ],
239 245
         outList:[],
240 246
         countList:[],
@@ -243,11 +249,11 @@
243 249
         drugOutList:[],
244 250
         total:0,
245 251
         drug:{},
252
+        houseList:[],
246 253
       }
247 254
     },
248 255
     methods:{
249 256
        getlist(){
250
-         console.log("2332233232",this.$route.query.drug_id)
251 257
            var params = {
252 258
              drug_id:this.$route.query.drug_id,
253 259
              start_time:this.start_time,
@@ -256,11 +262,10 @@
256 262
              limit:this.limit,
257 263
              stock_type:this.stock_type,  
258 264
            }
259
-          console.log("params23322323232332",params)
260 265
          getDrugStockFlow(params).then(response=>{
261 266
            if(response.data.state == 1){
262 267
             var list = response.data.data.list
263
-            console.log("库存数量",list)
268
+          
264 269
             for(let i=0;i<list.length;i++){
265 270
                list[i].drug_way = 4
266 271
                this.tableList.push(list[i])
@@ -286,7 +291,7 @@
286 291
          getOutDrugStockFlow(params).then(response=>{
287 292
             if(response.data.state == 1){
288 293
                var outList = response.data.data.outList
289
-               console.log("outlist",outList)
294
+              
290 295
 
291 296
               for(let i=0;i<outList.length;i++){
292 297
                
@@ -294,13 +299,13 @@
294 299
                   outList[i].drug_way = 2
295 300
                 }
296 301
                 if(outList[i].is_sys == 0){
297
-                  console.log("进来22222")
302
+                 
298 303
                   outList[i].drug_way = 1
299 304
                 }
300 305
                 this.tableList.push(outList[i])
301 306
               }
302 307
               this.total = response.data.data.total
303
-              console.log("出库列表数据",this.tableList)
308
+            
304 309
             }
305 310
          })
306 311
        },
@@ -360,16 +365,16 @@
360 365
       getDrugCountList(params).then(response=>{
361 366
           if(response.data.state == 1){
362 367
             var countlist =  response.data.data.countList
363
-            // console.log("入库数据",countlist)
368
+           
364 369
             this.countList = countlist
365 370
             var outcountlist = response.data.data.outCountList
366
-            // console.log("出库数据",outcountlist)
371
+         
367 372
             this.outCountList = outcountlist
368 373
             var aucountlist = response.data.data.auCountList
369
-            // console.log("自动数据",aucountlist)
374
+            
370 375
             this.autoCountList = aucountlist
371 376
              var minCount = response.data.data.minCount
372
-            // console.log("minCount",minCount)
377
+           
373 378
             this.minCount = minCount
374 379
             var info = response.data.data.info
375 380
             for(let i=0;i<info.length;i++){
@@ -377,7 +382,7 @@
377 382
                  info[i].count = info[i].count * info[i].min_number
378 383
               }
379 384
             }
380
-            // console.log("info2222222",info)
385
+           
381 386
             this.drugOutList = info
382 387
           }
383 388
         })
@@ -469,8 +474,6 @@
469 474
        if((count%min_number)!=0){
470 475
          str_min = count%min_number + min_unit
471 476
        }
472
-       console.log("str2323222",str)
473
-       console.log("str22333333",str_min)
474 477
        return str+str_min
475 478
      },
476 479
 
@@ -486,16 +489,18 @@
486 489
        getDrugFlow(params).then(response=>{
487 490
           if(response.data.state ==1){
488 491
             var list = response.data.data.list
489
-            console.log("list232323232",list)
492
+           
490 493
             this.tableList = list
491 494
             var total = response.data.data.total
492
-            console.log("total23232",total)
495
+           
493 496
             this.total =total
494 497
             this.manufacturerList = response.data.data.manufacturerList
495 498
             this.dealerList = response.data.data.dealerList
496 499
             var drug = response.data.data.drug
497
-            console.log("drug233223232323223",drug)
500
+           
498 501
             this.drug = drug
502
+
503
+            this.houseList = response.data.data.houseList
499 504
           }
500 505
        })
501 506
      },
@@ -527,7 +532,16 @@
527 532
          min_price = this.drug.min_price
528 533
        }
529 534
        return min_price
530
-     }
535
+     },
536
+     getHouseName(id){
537
+      var storehouse_name = ""
538
+      for(let i=0;i<this.houseList.length;i++){
539
+        if(id == this.houseList[i].id){
540
+          storehouse_name = this.houseList[i].storehouse_name
541
+        }
542
+      }
543
+      return storehouse_name
544
+     },
531 545
     }
532 546
   }
533 547
 </script>

+ 70 - 20
src/xt_pages/stock/drugs/drugStockInOrder.vue 查看文件

@@ -15,9 +15,18 @@
15 15
 
16 16
     <div class="app-container">
17 17
       <div class="cell clearfix">
18
+       <label class="title"><span class="name">仓库</span> :</label>
19
+        <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeStoreHouse">
20
+            <el-option
21
+              v-for="(option, index) in houseList"
22
+              :key="index"
23
+              :label="option.storehouse_name"
24
+              :value="option.id">
25
+            </el-option>
26
+        </el-select> 
18 27
         <el-input
19 28
           size="small"
20
-          style="width: 400px;"
29
+          style="width: 200px;"
21 30
           v-model.trim="searchKey"
22 31
           class="filter-item"
23 32
           placeholder="单据编码/制单人/药品名称"
@@ -31,6 +40,7 @@
31 40
           >搜索</el-button
32 41
         >
33 42
         <div style="margin-left:10px;">
43
+
34 44
           <label class="title"><span class="name">入库时间</span> : </label>
35 45
           <el-date-picker
36 46
             size="small"
@@ -107,12 +117,25 @@
107 117
           </template>
108 118
         </el-table-column>
109 119
 
120
+        <el-table-column label="仓库名称" align="center">
121
+          <template slot-scope="scope">
122
+            {{getHouseName(scope.row.storehouse_id)}}
123
+          </template>
124
+        </el-table-column>
125
+
110 126
         <el-table-column label="制单人" align="center">
111 127
           <template slot-scope="scope">
112 128
             {{ getXuserName(scope.row.creater) }}
113 129
           </template>
114 130
         </el-table-column>
115 131
 
132
+       <el-table-column label="入库方式" align="center">
133
+          <template slot-scope="scope">
134
+           <span v-if="scope.row.is_sys == 13">调拨入库</span>
135
+           <span v-else>手动入库</span>
136
+          </template>
137
+        </el-table-column>
138
+
116 139
         <el-table-column label="操作" align="center" width="240">
117 140
           <template slot-scope="scope">
118 141
 
@@ -200,6 +223,11 @@
200 223
             {{scope.row.batch_number}}
201 224
           </template>
202 225
         </el-table-column>
226
+        <el-table-column label="仓库名称" align="center">
227
+          <template slot-scope="scope">
228
+            {{getHouseName(scope.row.storehouse_id)}}
229
+          </template>
230
+        </el-table-column>
203 231
         <el-table-column label="入库数量" align="center">
204 232
           <template slot-scope="scope">
205 233
             {{scope.row.warehousing_count}}{{scope.row.max_unit}}
@@ -437,6 +465,8 @@ export default {
437 465
       order_id:"",
438 466
       dealerList:[],
439 467
       exportList:[],
468
+      houseList:[],
469
+      storehouse_id:0,
440 470
     };
441 471
   },
442 472
   methods: {
@@ -447,9 +477,9 @@ export default {
447 477
         start_time: this.start_time,
448 478
         end_time: this.end_time,
449 479
         type: this.type,
450
-        keywords: this.searchKey
480
+        keywords: this.searchKey,
481
+        storehouse_id:this.storehouse_id,
451 482
       };
452
-      console.log("parasm2222222",Params)
453 483
       this.Warehouse.warehouseDate = [];
454 484
       getDrugWarehouseList(Params).then(response => {
455 485
         if (response.data.state == 0) {
@@ -462,7 +492,6 @@ export default {
462 492
           for (let i = 0; i < response.data.data.list.length; i++) {
463 493
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
464 494
           }
465
-          
466 495
         }
467 496
       });
468 497
     },
@@ -474,6 +503,7 @@ export default {
474 503
         end_time: this.end_time,
475 504
         type: this.type,
476 505
         keywords:this.searchKey,
506
+        storehouse_id:this.storehouse_id,
477 507
       };
478 508
       this.Warehouse.warehouseDate = [];
479 509
       getDrugWarehouseList(Params).then(response => {
@@ -487,7 +517,12 @@ export default {
487 517
           for (let i = 0; i < response.data.data.list.length; i++) {
488 518
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
489 519
           }
490
-          // console.log("列表999988888",this.warehouse.warehouseDate)
520
+          var obj = {id:0,storehouse_name:"全部"}
521
+          this.houseList = []
522
+          this.houseList.push(obj)
523
+          for(let i=0;i<response.data.data.houseList.length;i++){
524
+             this.houseList.push(response.data.data.houseList[i])
525
+          }
491 526
         }
492 527
       });
493 528
     },
@@ -549,10 +584,10 @@ export default {
549 584
     },
550 585
     fetchAllAdminUsers() {
551 586
       fetchAllAdminUsers().then(response => {
552
-        console.log(response);
587
+       
553 588
         if (response.data.state == 1) {
554 589
           this.adminUserOptions = response.data.data.users;
555
-          console.log("制单人2222222",this.adminUserOptions)
590
+         
556 591
           var alen = this.adminUserOptions.length;
557 592
           for (let index = 0; index < alen; index++) {
558 593
             if (this.adminUserOptions[index].user_type == 2) {
@@ -563,7 +598,6 @@ export default {
563 598
       });
564 599
     },
565 600
     clicks: function() {
566
-      console.log(this.WarehouseInfo.warehouseInfoDate);
567 601
     },
568 602
     handleWarehouse: function() {
569 603
       this.$router.push({ path: "/drugstock/in/add", query: { type: this.type } });
@@ -619,7 +653,7 @@ export default {
619 653
     handleEdit:function(index,row){
620 654
        this.$router.push({
621 655
          name:"drugStockInOrderEdit",
622
-         query:{id:row.id,type:this.type,supply_warehouse_id:row.supply_warehouse_id}
656
+         query:{id:row.id,type:this.type,supply_warehouse_id:row.supply_warehouse_id,is_sys:row.is_sys}
623 657
        })
624 658
     },
625 659
     handleSearch(id){
@@ -631,18 +665,18 @@ export default {
631 665
       const params = {
632 666
         id: order_id
633 667
       };
634
-      console.log("parasm222222222",params)
668
+
635 669
       this.WarehouseInfo.warehouseInfoDate = []
636 670
       getDrugWarehouseInfoList(params).then(response => {
637 671
         if (response.data.state == 0) {
638 672
           this.$message.error(response.data.msg);
639 673
           return false;
640 674
         } else {
641
-          console.log("hhhhhhhhhh",response.data.data.info)
675
+         
642 676
           for (let i = 0; i < response.data.data.info.length; i++) {
643 677
             this.showOne = true
644 678
             this.WarehouseInfo.warehouseInfoDate.push(response.data.data.info[i]);
645
-            console.log("列表详情",this.WarehouseInfo.warehouseInfoDate)
679
+           
646 680
           }
647 681
           this.WarehouseInfo.warehouse = response.data.data.warehousing;
648 682
           this.getAllDrugList()
@@ -650,7 +684,10 @@ export default {
650 684
       });
651 685
     },
652 686
     handleDelete: function(index, row) {
653
-      console.log("rowe23323223",row)
687
+      if(row.is_sys ==13){
688
+        this.$message.error("调拨入库数据不能删除!")
689
+        return false
690
+      }
654 691
       if(row.supply_warehouse_id >0 ){
655 692
         this.$message.error("自动入库数据不能删除!")
656 693
         return false
@@ -717,10 +754,14 @@ export default {
717 754
       const ids = [];
718 755
       const idOne = []
719 756
       for (let i = 0; i < this.selectedTableData.length; i++) {
757
+        if(this.selectedTableData[i].is_sys== 13){
758
+          this.$message.error("调拨入库数据不能删除!")
759
+          return false
760
+        }
720 761
         ids.push(this.selectedTableData[i].id);
721 762
         idOne.push(this.selectedTableData[i].supply_warehouse_id)
722 763
       }
723
-      console.log("idson233223233223",idOne)
764
+     
724 765
       for(let i=0;i<idOne.length;i++){
725 766
         if(idOne[i] >0 ){
726 767
            this.$message.error("自动入库数据不能删除!")
@@ -830,7 +871,7 @@ export default {
830 871
       exportDrugList(params).then(response=>{
831 872
          if(response.data.state == 1){
832 873
           var list =  response.data.data.list
833
-          console.log("list23232323",list)
874
+          
834 875
           for(let i=0;i<list.length;i++){
835 876
             list[i].product_date = this.getTime(list[i].product_date)
836 877
             list[i].expiry_date = this.getTime(list[i].expiry_date)
@@ -839,7 +880,7 @@ export default {
839 880
           var manufacturerList = response.data.data.manufacturerList
840 881
           this.manufacturerList = manufacturerList
841 882
           var dealerList = response.data.data.dealerList
842
-          console.log("经销是,",dealerList)
883
+        
843 884
           this.dealerList = dealerList
844 885
          }
845 886
       })
@@ -849,7 +890,6 @@ export default {
849 890
       if(this.order_id == ""){
850 891
         this.$message.error("请勾选入库单")
851 892
       }
852
-      console.log("hhhh2323",this.exportList)
853 893
       for(let i=0;i<this.exportList.length;i++){
854 894
         this.exportList[i].index = i+1
855 895
         this.exportList[i].unit = this.exportList[i].dose + this.exportList[i].dose_unit + "*" + this.exportList[i].min_number + this.exportList[i].min_unit + "/"+this.exportList[i].max_unit
@@ -875,8 +915,6 @@ export default {
875 915
       }
876 916
       
877 917
       import('@/vendor/Export2Excel').then(excel => {
878
-        console.log("232323",this.drugTypeList)
879
-        console.log("hhh23",this.exportList)
880 918
          for(let i=0;i<this.exportList.length;i++){
881 919
            for(let j=0;j<this.drugTypeList.length;j++){
882 920
              if(this.exportList[i].drug_type == this.drugTypeList[j].id){
@@ -889,7 +927,7 @@ export default {
889 927
         const filterVal = ['index','drug_name', 'drug_type','unit','batch_number','warehousing_count','price','total_price','manufacturer','product_date','expiry_date','dealer','number','remark']
890 928
          
891 929
      
892
-        console.log("table",this.exportList)
930
+
893 931
         
894 932
         const data = this.formatJson(filterVal, this.exportList)
895 933
         excel.export_json_to_excel({
@@ -903,6 +941,18 @@ export default {
903 941
    formatJson(filterVal, jsonData) {
904 942
     return jsonData.map(v => filterVal.map(j => v[j]));
905 943
    },
944
+  getHouseName(id){
945
+    var storehouse_name = ""
946
+    for(let i=0;i<this.houseList.length;i++){
947
+        if(id == this.houseList[i].id){
948
+          storehouse_name = this.houseList[i].storehouse_name
949
+        }
950
+    }
951
+    return storehouse_name
952
+  },
953
+  changeStoreHouse(){
954
+    this.GetWarehouse()
955
+  }
906 956
   }
907 957
 };
908 958
 </script>

+ 22 - 7
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue 查看文件

@@ -23,6 +23,15 @@
23 23
 
24 24
 
25 25
       <div class="cell clearfix">
26
+        <label class="title"><span class="name"><span style="color:red">*</span>仓库</span> :</label>
27
+        <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px">
28
+            <el-option
29
+              v-for="(option, index) in list"
30
+              :key="index"
31
+              :label="option.storehouse_name"
32
+              :value="option.id">
33
+            </el-option>
34
+          </el-select>
26 35
         <label class="title"><span class="name">入库时间</span> : </label>
27 36
         <el-date-picker size="small" v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false"
28 37
                         style="width: 196px;" type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
@@ -452,6 +461,8 @@
452 461
         totalPrice:0,
453 462
         unitList:[],
454 463
         loading:false,
464
+        list:[],
465
+        storehouse_id:"",
455 466
       }
456 467
     },
457 468
     methods: {
@@ -527,7 +538,7 @@
527 538
           } else {
528 539
             this.manufacturer = response.data.data.manufacturer;
529 540
             this.dealer = response.data.data.dealer;
530
-            console.log("2222333333",response.data.data.drugs)
541
+            
531 542
             for(let i = 0; i<  response.data.data.drugs.length;i++){
532 543
               this.goodType.push(response.data.data.drugs[i])
533 544
               if(response.data.data.drugs[i].drug_specs != null) {
@@ -541,6 +552,8 @@
541 552
 
542 553
             this.form.manufacturer = 0
543 554
             this.form.dealer = 0
555
+            this.list = response.data.data.list
556
+            this.storehouse_id = response.data.data.configlist.drug_storehouse_info
544 557
           }
545 558
           loading.close()
546 559
 
@@ -631,7 +644,7 @@
631 644
           manufacturer_id: this.form.manufacturer,
632 645
           dealer_id: this.form.dealer
633 646
         }
634
-        console.log("2222",this.form.dealer)
647
+      
635 648
         GetAllDrugInfoByID(params).then(response => {
636 649
           
637 650
             if (response.data.state == 0) {
@@ -708,7 +721,10 @@
708 721
           if (valid) {
709 722
             this.loading = true
710 723
             const array = this.recordInfo.recordData
711
-          
724
+            if(this.storehouse_id == 0){
725
+             this.$message.error("仓库不能为空!")
726
+             return false
727
+            }
712 728
             for (let i = 0; i < array.length; i++) {
713 729
 
714 730
               if (array[i].drug_id == 0) {
@@ -745,9 +761,8 @@
745 761
             const params = {
746 762
               'stockIn': this.recordInfo.recordData
747 763
             }
748
-            console.log("params2222222",params)
749 764
            
750
-            postDrugWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
765
+            postDrugWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type,this.storehouse_id).then(response => {
751 766
               if (response.data.state == 0) {
752 767
                 this.loading = false
753 768
                 this.$message.error(response.data.msg)
@@ -814,7 +829,7 @@
814 829
             searchArray = response.data.data.list;
815 830
             
816 831
              var list = response.data.data.list
817
-             console.log("猎豹22222222222",list)
832
+            
818 833
 
819 834
              this.drugList = list
820 835
              var manufacturerList = response.data.data.manufacturerList
@@ -872,7 +887,7 @@
872 887
             
873 888
            }
874 889
         }
875
-        console.log("333333",this.recordInfo.recordData)
890
+       
876 891
       }
877 892
      
878 893
     }

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

@@ -36,6 +36,15 @@
36 36
       </drugs-stock-dialog>
37 37
 
38 38
       <div class="cell clearfix">
39
+        <label class="title"><span class="name"><span style="color:red">*</span>仓库</span> :</label>
40
+        <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" :disabled="true">
41
+            <el-option
42
+              v-for="(option, index) in list"
43
+              :key="index"
44
+              :label="option.storehouse_name"
45
+              :value="option.id">
46
+            </el-option>
47
+        </el-select>
39 48
         <label class="title"><span class="name">入库时间</span> : </label>
40 49
         <el-date-picker
41 50
           size="small"
@@ -452,6 +461,8 @@ export default {
452 461
       drug_show:false,
453 462
       loading:false,
454 463
       disabled:false,
464
+      storehouse_id:"",
465
+      list:[],
455 466
     };
456 467
   },
457 468
   methods: {
@@ -491,9 +502,6 @@ export default {
491 502
           }
492 503
         }
493 504
       }
494
-
495
-      // console.log( this.recordInfo.recordData)
496
-
497 505
       this.currentIndex = -1;
498 506
     },
499 507
     cancle: function() {
@@ -551,7 +559,10 @@ export default {
551 559
       return name;
552 560
     },
553 561
     handleEdit: function(index, row) {
554
-      console.log("row23323223",row)
562
+      if(parseInt(this.$route.query.is_sys)==13){
563
+        this.$message.error("调拨入库数据不能新增!")
564
+        return false
565
+      }
555 566
       if(row.supply_warehouse_id > 0){
556 567
         this.$message.error("自动入库数据不能新增!")
557 568
         return false
@@ -573,6 +584,10 @@ export default {
573 584
       this.recordInfo.recordData.push(tempObj);
574 585
     },
575 586
     handleDelete: function(index, row) {
587
+      if(parseInt(this.$route.query.is_sys)==13){
588
+        this.$message.error("调拨入库数据不能删除!")
589
+        return false
590
+      }
576 591
       if(row.supply_warehouse_id > 0){
577 592
         this.$message.error("自动入库数据不能删除!")
578 593
         return false
@@ -587,8 +602,7 @@ export default {
587 602
           confirmButtonText: "确定",
588 603
           cancelButtonText: "取消",
589 604
           type: "warning"
590
-        })
591
-          .then(() => {
605
+        }).then(() => {
592 606
             DeleteDrugWarehouseInfoItem(params).then(response => {
593 607
               if (response.data.state == 0) {
594 608
                 this.$message.error(response.data.msg);
@@ -673,7 +687,10 @@ export default {
673 687
         if (valid) {
674 688
           this.loading = true
675 689
           const array = this.recordInfo.recordData;
676
-        
690
+          if(this.storehouse_id == 0){
691
+            this.$message.error("仓库不能为空!")
692
+            return false
693
+          }
677 694
           for (let i = 0; i < array.length; i++) {
678 695
             if (array[i].drug_id == 0) {
679 696
               this.$message.error("药品名称或者药品规格名称不能为空");
@@ -710,15 +727,14 @@ export default {
710 727
           const params = {
711 728
             stockIn: this.recordInfo.recordData
712 729
           };
713
-          console.log("params22222222222",params)
714
-        
715 730
           EditDrugWarehouse(
716 731
             params,
717 732
             this.warehousing_time,
718 733
             this.$route.query.id,
719 734
             this.$route.query.type,
720 735
             this.form.manufacturer,
721
-            this.form.dealer
736
+            this.form.dealer,
737
+            this.storehouse_id,
722 738
           ).then(response => {
723 739
             if (response.data.state == 0) {
724 740
               this.$message.error(response.data.msg);
@@ -753,7 +769,7 @@ export default {
753 769
           var dealerList  = response.data.data.dealerList
754 770
         
755 771
           this.dealerList = dealerList
756
-          console.log("详情32332323232323232232323323232323232",response.data.data.info)
772
+         
757 773
           for (let i = 0; i < response.data.data.info.length; i++) {
758 774
             response.data.data.info[i].product_date = this.getTime(
759 775
               response.data.data.info[i].product_date,
@@ -805,13 +821,9 @@ export default {
805 821
                }
806 822
             }
807 823
           }
808
-          console.log("列表详情",this.recordInfo.recordData)
809
-
810
-
811 824
           this.warehouse = response.data.data.warehousing;
812
-          // this.form.manufacturer = this.warehouse.manufacturer;
813
-          // this.form.dealer = this.warehouse.dealer;
814
-
825
+          this.storehouse_id = response.data.data.warehousing.storehouse_id
826
+          this.list = response.data.data.list
815 827
           this.warehousing_time = this.getTime(
816 828
             this.warehouse.warehousing_time,
817 829
             "{y}-{m}-{d}"
@@ -867,7 +879,6 @@ export default {
867 879
         this.currentIndex = val
868 880
       },
869 881
       handleSelect(val){
870
-        console.log("val2222",val)
871 882
         for(let i=0;i<this.recordInfo.recordData.length;i++){
872 883
            if(i == this.currentIndex){
873 884
              this.recordInfo.recordData[i].drug_id = val.id
@@ -912,6 +923,10 @@ export default {
912 923
     if( parseInt(this.$route.query.supply_warehouse_id)>0){
913 924
       this.disabled = true
914 925
     }
926
+    if(parseInt(this.$route.query.is_sys) == 13){
927
+      this.disabled = true
928
+    }
929
+
915 930
   }
916 931
 };
917 932
 </script>

+ 72 - 28
src/xt_pages/stock/drugs/drugStockOutOrder.vue 查看文件

@@ -13,9 +13,18 @@
13 13
     </div>
14 14
     <div class="app-container">
15 15
       <div class="cell clearfix">
16
+        <label class="title"><span class="name">仓库</span> :</label>
17
+        <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeStoreHouse">
18
+            <el-option
19
+              v-for="(option, index) in houseList"
20
+              :key="index"
21
+              :label="option.storehouse_name"
22
+              :value="option.id">
23
+            </el-option>
24
+        </el-select> 
16 25
         <el-input
17 26
           size="small"
18
-          style="width: 400px;"
27
+          style="width: 200px;"
19 28
           class="filter-item"
20 29
           v-model.trim="searchKey"
21 30
           placeholder="单据编码/制单人/厂商"
@@ -103,6 +112,12 @@
103 112
           </template>
104 113
         </el-table-column>
105 114
 
115
+        <el-table-column label="仓库名称" align="center">
116
+          <template slot-scope="scope">
117
+            {{getHouseName(scope.row.storehouse_id)}}
118
+          </template>
119
+        </el-table-column>
120
+
106 121
         <el-table-column label="制单人" align="center">
107 122
           <template slot-scope="scope">
108 123
             {{ getXuserName(scope.row.creater) }}
@@ -115,24 +130,12 @@
115 130
           </template>
116 131
           <template slot-scope="scope">
117 132
             <span v-if="scope.row.is_sys == 1">{{"自动出库"}}</span>
118
-            <span v-if="scope.row.is_sys != 1">{{"手动出库"}}</span>
119
-
120
-          </template>
121
-        </el-table-column>
122
-
123
-        <!-- <el-table-column label="厂家" align="center">
124
-          <template slot-scope="scope">
125
-            {{scope.row.manufacturers ? scope.row.manufacturers.manufacturer_name:''}}
133
+            <span v-if="scope.row.is_sys == 0">{{"手动出库"}}</span>
134
+            <span v-if="scope.row.is_sys == 12">{{"调拨出库"}}</span>
126 135
           </template>
127 136
         </el-table-column>
128 137
 
129
-        <el-table-column label="经销商" align="center">
130
-          <template slot-scope="scope">
131
-            {{scope.row.dealers ? scope.row.dealers.dealer_name:''}}
132
-          </template>
133
-        </el-table-column> -->
134
-
135
-
138
+  
136 139
         <el-table-column label="操作" align="center" width="240">
137 140
           <template slot-scope="scope">
138 141
 
@@ -216,13 +219,24 @@
216 219
               {{scope.row.medical_insurance_number}}
217 220
             </template>
218 221
           </el-table-column>
222
+          <el-table-column label="仓库名称" align="center">
223
+          <template slot-scope="scope">
224
+            {{getHouseName(scope.row.storehouse_id)}}
225
+          </template>
226
+        </el-table-column>
227
+
219 228
           <el-table-column label="出库数量" align="center">
220 229
             <template slot-scope="scope">
221 230
               <!-- <span v-if="scope.row.is_sys ==  0">{{getTotalCount(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}</span> -->
222 231
               <span> {{getTotalCountOne(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}</span>
223 232
             </template>
224 233
           </el-table-column>
225
-          <el-table-column label="出库单价" align="center">
234
+          <el-table-column label="出库对象" align="center" v-if="is_sys == 0">
235
+            <template slot-scope="scope">
236
+              <span>{{getXuserName(scope.row.admin_user_id)}} </span>  
237
+            </template>
238
+          </el-table-column>
239
+          <el-table-column label="出货单价" align="center">
226 240
             <template slot-scope="scope">
227 241
               <span v-if="scope.row.price > 0"> {{scope.row.price}}</span>
228 242
               <span v-if="scope.row.price == 0"> {{scope.row.retail_price}}</span>
@@ -235,8 +249,8 @@
235 249
           </el-table-column> -->
236 250
           <el-table-column label="总价" align="center">
237 251
             <template slot-scope="scope">
238
-              <span v-if="scope.row.price > 0">{{(getAllPriceOne(scope.row.drug_id,scope.row.price,scope.row.price/scope.row.min_number)/scope.row.min_number).toFixed(2)}}</span>
239
-              <span v-if="scope.row.price == 0">{{(getAllPriceOne(scope.row.drug_id,scope.row.retail_price,scope.row.min_price)/scope.row.min_number).toFixed(2)}}</span>
252
+              <span v-if="scope.row.price > 0">{{getAllPriceOne(scope.row.drug_id,scope.row.price,scope.row.price).toFixed(2)}}</span>
253
+              <span v-if="scope.row.price == 0">{{getAllPriceOne(scope.row.drug_id,scope.row.retail_price,scope.row.min_price).toFixed(2)}}</span>
240 254
             </template>
241 255
           </el-table-column>
242 256
           <el-table-column label="生产厂家" align="center">
@@ -488,6 +502,9 @@ export default {
488 502
       exportList:[],
489 503
       batchNumberList:[],
490 504
       drugFlowList:[],
505
+      houseList:[],
506
+      storehouse_id:0,
507
+      is_sys:0,
491 508
     };
492 509
   },
493 510
   methods: {
@@ -498,7 +515,8 @@ export default {
498 515
         start_time: this.start_time,
499 516
         end_time: this.end_time,
500 517
         type: this.type,
501
-        keywords: this.searchKey
518
+        keywords: this.searchKey,
519
+        storehouse_id:this.storehouse_id,
502 520
       };
503 521
       this.warehouseOutDate = [];
504 522
       getDrugWarehouseOutList(Params).then(response => {
@@ -510,6 +528,7 @@ export default {
510 528
           for (let i = 0; i < response.data.data.list.length; i++) {
511 529
             this.warehouseOutDate.push(response.data.data.list[i]);
512 530
           }
531
+          this.houseList = response.data.data.houseList
513 532
         }
514 533
       });
515 534
     },
@@ -526,7 +545,8 @@ export default {
526 545
         start_time: this.start_time,
527 546
         end_time: this.end_time,
528 547
         type: this.type,
529
-        keywords: this.searchKey
548
+        keywords: this.searchKey,
549
+        storehouse_id:this.storehouse_id,
530 550
       };
531 551
       this.warehouseOutDate = [];
532 552
       getDrugWarehouseOutList(Params).then(response => {
@@ -538,7 +558,12 @@ export default {
538 558
           for (let i = 0; i < response.data.data.list.length; i++) {
539 559
             this.warehouseOutDate.push(response.data.data.list[i]);
540 560
           }
541
-
561
+          var obj = {id:0,storehouse_name:"全部"}
562
+          this.houseList = []
563
+          this.houseList.push(obj)
564
+          for(let i=0;i<response.data.data.houseList.length;i++){
565
+            this.houseList.push(response.data.data.houseList[i])
566
+          }
542 567
         }
543 568
       });
544 569
     },
@@ -631,7 +656,7 @@ export default {
631 656
       this.$router.push({path:"/drug/out/drugstockoutorderedit?id="+row.id+"&type="+this.type+"&is_sys="+row.is_sys+"&supply_cancel_out_id="+row.supply_cancel_out_id})
632 657
     },
633 658
     handleSearch(val){
634
-
659
+       this.is_sys = val.is_sys
635 660
        this.getInitializtion()
636 661
        this.getSinleOrderDetail(val.id,val.warehouse_out_time,val.is_sys)
637 662
        this.list = []
@@ -639,6 +664,10 @@ export default {
639 664
     },
640 665
 
641 666
     handleDelete: function(index, row) {
667
+      if(row.is_sys == 12){
668
+       this.$message.error("调拨出库数据不能删除!")
669
+       return
670
+      }
642 671
       if(row.supply_cancel_out_id >0){
643 672
         this.$message.error("采购出库数据不能删除!")
644 673
         return
@@ -711,6 +740,10 @@ export default {
711 740
           this.$message.error("自动出库数据不能删除!")
712 741
           return false
713 742
         }
743
+        if(this.selectedTableData[i].is_sys == 12){
744
+          this.$message.error("调拨出库数据不能删除!")
745
+          return false
746
+        }
714 747
         if(this.selectedTableData[i].is_sys == 0){
715 748
           ids.push(this.selectedTableData[i].id);
716 749
           idsOne.push(this.selectedTableData[i].supply_cancel_out_id)
@@ -924,7 +957,6 @@ export default {
924 957
          id:id,
925 958
          start_time:start_time,
926 959
        }
927
-      console.log("is_sys22222",is_sys)
928 960
      getSinleOrderDetail(params).then(response=>{
929 961
         if(response.data.state == 1){
930 962
           this.tableShow = true
@@ -934,6 +966,7 @@ export default {
934 966
          this.manufacturerList = response.data.data.manufacturerList
935 967
          this.dealerList = response.data.data.dealerList
936 968
          var drugFlowList = response.data.data.drugFlowList
969
+        
937 970
          if (is_sys == 1){
938 971
            if(drugFlowList.length >0){
939 972
             for(let i=0;i<drugFlowList.length;i++){
@@ -949,7 +982,7 @@ export default {
949 982
         
950 983
             this.drugFlowList = drugFlowList
951 984
          }
952
-         if(is_sys == 0){
985
+         if(is_sys == 0 || is_sys == 12){
953 986
             var flowlist = response.data.data.flowlist
954 987
             this.drugFlowList = []
955 988
             for(let i=0;i<flowlist.length;i++){
@@ -972,7 +1005,7 @@ export default {
972 1005
               list[i].number = ""
973 1006
            }
974 1007
          }
975
-         console.log("list233223323233223",list)
1008
+        
976 1009
          this.tableList = list
977 1010
         }
978 1011
      })
@@ -995,7 +1028,7 @@ export default {
995 1028
 
996 1029
           this.drugDialogVisible = true
997 1030
         }
998
-        if(val.is_sys == 0){
1031
+        if(val.is_sys == 0 || val.is_sys == 12){
999 1032
 
1000 1033
           this.drugDialogVisibleTwo = true
1001 1034
         }
@@ -1094,7 +1127,6 @@ export default {
1094 1127
          return str + min_str
1095 1128
       },
1096 1129
       getTotalCountOne(id,min_number,max_unit,min_unit){
1097
-        console.log("hhhahdhhff",this.drugFlowList)
1098 1130
         var arr = []
1099 1131
         for(let i=0;i<this.drugFlowList.length;i++){
1100 1132
           if(id == this.drugFlowList[i].drug_id){
@@ -1237,6 +1269,18 @@ export default {
1237 1269
 
1238 1270
         return  all_price
1239 1271
       },
1272
+    getHouseName(id){
1273
+      var storehouse_name = ""
1274
+      for(let i=0;i<this.houseList.length;i++){
1275
+          if(id == this.houseList[i].id){
1276
+            storehouse_name = this.houseList[i].storehouse_name
1277
+          }
1278
+      }
1279
+      return storehouse_name
1280
+    },
1281
+    changeStoreHouse(){
1282
+      this.GetWarehouseOut()
1283
+    }
1240 1284
   }
1241 1285
 };
1242 1286
 </script>

+ 51 - 9
src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue 查看文件

@@ -27,6 +27,15 @@
27 27
     <div class="app-container">
28 28
   
29 29
       <div class="cell clearfix">
30
+        <label class="title"><span class="name"><span style="color:red">*</span>仓库</span> :</label>
31
+        <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px">
32
+            <el-option
33
+              v-for="(option, index) in list"
34
+              :key="index"
35
+              :label="option.storehouse_name"
36
+              :value="option.id">
37
+            </el-option>
38
+          </el-select>
30 39
         <label class="title"><span class="name">出库时间</span> : </label>
31 40
         <el-date-picker
32 41
           size="small"
@@ -141,6 +150,20 @@
141 150
             </template>
142 151
 
143 152
           </el-table-column>
153
+
154
+          <el-table-column label="出库对象" width="140" align="center">
155
+            <template slot-scope="scope">
156
+               <el-select v-model="scope.row.admin_user_id" filterable placeholder="请选择厂商">
157
+                <el-option
158
+                  v-for="(option, index) in doctorList"
159
+                  :key="index"
160
+                  :label="option.user_name"
161
+                  :value="option.admin_user_id">
162
+                </el-option>
163
+               </el-select>
164
+            </template>
165
+          </el-table-column>
166
+
144 167
           <el-table-column width="120" align="center">
145 168
             <template slot="header" slot-scope="scope">
146 169
               <span>出货价<span style="color: red">*</span></span>
@@ -346,6 +369,9 @@ export default {
346 369
       unitList:[],
347 370
       numberList:[],
348 371
       listLoading: false,
372
+      storehouse_id:"",
373
+      list:[],
374
+      doctorList:[],
349 375
     };
350 376
   },
351 377
   methods: {
@@ -382,6 +408,9 @@ export default {
382 408
 
383 409
           this.form.manufacturer = 0
384 410
           this.form.dealer = 0
411
+          this.storehouse_id = response.data.data.configlist.drug_storehouse_out
412
+          this.list = response.data.data.list
413
+          this.doctorList = response.data.data.doctorList
385 414
         }
386 415
         loading.close()
387 416
 
@@ -424,6 +453,7 @@ export default {
424 453
       tempObj["warehouse_info_id"] = 0
425 454
       tempObj["dealer"] = ""
426 455
       tempObj['manufacturer'] = ''
456
+      tempObj["admin_user_id"] =  this.$store.getters.xt_user.user.user_name
427 457
       this.recordInfo.recordData.push(tempObj);
428 458
     },
429 459
     handleDelete: function(index, row) {
@@ -521,6 +551,10 @@ export default {
521 551
             }
522 552
             total = total + array[i].price * array[i].return_count;
523 553
           }
554
+          if(this.storehouse_id == 0){
555
+            this.$message.error("仓库不能为空!")
556
+            return false
557
+          }
524 558
           if (this.recordInfo.recordData.length <= 0) {
525 559
             this.$message.success("请添加出库商品");
526 560
             return;
@@ -548,13 +582,19 @@ export default {
548 582
                 this.recordInfo.recordData[i].batch_number = this.numberList[y].batch_number
549 583
                 this.recordInfo.recordData[i].warehouse_info_id = this.numberList[y].id
550 584
               }
551
-           
552 585
             }
586
+           for(let s=0;s<this.doctorList.length;s++){
587
+            if(this.recordInfo.recordData[i].admin_user_id == this.doctorList[s].user_name){
588
+              this.recordInfo.recordData[i].admin_user_id = this.doctorList[s].admin_user_id
589
+            }
590
+
591
+            }
592
+
553 593
           }
554 594
           const params = {
555 595
             stockOut: this.recordInfo.recordData
556 596
           };
557
-          console.log("param23323232",params)
597
+       
558 598
          
559 599
           const loading = this.$loading({
560 600
             lock: true,
@@ -567,7 +607,8 @@ export default {
567 607
             this.warehouse_out_time,
568 608
             this.form.dealer,
569 609
             this.form.manufacturer,
570
-            this.type
610
+            this.type,
611
+            this.storehouse_id
571 612
           ).then(response => {
572 613
             if (response.data.state == 0) {
573 614
               this.$message.error("库存不足");
@@ -623,13 +664,13 @@ export default {
623 664
           if (response.data.state == 1) {
624 665
             searchArray = response.data.data.list;
625 666
              var list = response.data.data.list
626
-             console.log("list99999999",list)
667
+     
627 668
              this.drugList = list
628 669
              var manufacturerList = response.data.data.manufacturerList
629 670
              this.manufacturerList = manufacturerList
630 671
              var dealerList = response.data.data.dealerList
631 672
              this.dealerList = dealerList
632
-             console.log("经销商",this.dealerList)
673
+           
633 674
              for(let i=0;i<this.drugList.length;i++){
634 675
                 for(let j=0;j<this.manufacturerList.length;j++){
635 676
                   if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
@@ -659,7 +700,7 @@ export default {
659 700
             arr.push(this.recordInfo.recordData[i].drug_id)
660 701
          }
661 702
          var str = arr.join(",")
662
-         console.log("str",str)
703
+       
663 704
          if(str.indexOf(val.id)!=-1){
664 705
             this.$message.error("该药品已存在列表中")
665 706
             return
@@ -706,14 +747,14 @@ export default {
706 747
         getDrugBatchNumber(params).then(response=>{
707 748
            if(response.data.state == 1){
708 749
              var list = response.data.data.list
709
-             console.log("list2222",list)
750
+            
710 751
              this.numberList = []
711 752
              this.numberList = list
712 753
            }
713 754
         })
714 755
       },
715 756
       changeUnit(val){
716
-        console.log("val2323232322323",val,this.recordInfo.recordData)
757
+       
717 758
         this.getDrugBatchNumber(val.drug_id)
718 759
         for(let i=0;i<this.recordInfo.recordData.length;i++){
719 760
           if(this.recordInfo.recordData[i].drug_id == val.drug_id){
@@ -732,7 +773,7 @@ export default {
732 773
         }
733 774
       },
734 775
       changeBatchNumber(val){
735
-        console.log("val",val)
776
+       
736 777
         this.getDrugBatchNumber(val.drug_id)
737 778
         for(let i=0;i<this.recordInfo.recordData.length;i++){
738 779
             if(this.currentIndex == i){
@@ -775,6 +816,7 @@ export default {
775 816
     tempObj["number"] = ""
776 817
     tempObj["warehouse_info_id"] = 0
777 818
     tempObj["count"] = ""
819
+    tempObj["admin_user_id"] =  this.$store.getters.xt_user.user.user_name
778 820
     this.recordInfo.recordData.push(tempObj);
779 821
     this.GetConfigInfo();
780 822
     this.propForm.goodUnit = this.$store.getters.good_unit;

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

@@ -144,7 +144,8 @@
144 144
           loading: false,
145 145
           warehousingOutData: [],
146 146
           info: {}
147
-        }
147
+        },
148
+        doctorList:[],
148 149
       }
149 150
     },
150 151
     methods: {
@@ -168,6 +169,7 @@
168 169
               this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
169 170
             }
170 171
             this.warehousingOutInfo.info = response.data.data.info
172
+            this.doctorList = response.data.data.doctorList
171 173
             this.handleSpanTempArr()
172 174
           }
173 175
         })

+ 64 - 8
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue 查看文件

@@ -21,7 +21,32 @@
21 21
         v-on:dialog-cancle="cancle"
22 22
       >
23 23
       </drugs-stock-dialog>
24
-
24
+        
25
+      <div class="cell clearfix">
26
+        <label class="title"><span class="name"><span style="color:red">*</span>仓库</span> :</label>
27
+        <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" :disabled="true">
28
+            <el-option
29
+              v-for="(option, index) in houstList"
30
+              :key="index"
31
+              :label="option.storehouse_name"
32
+              :value="option.id">
33
+            </el-option>
34
+          </el-select>
35
+        <label class="title"><span class="name">出库时间</span> : </label>
36
+        <el-date-picker
37
+          :disabled="drug_show"
38
+          size="small"
39
+          v-model="warehouse_out_time"
40
+          prefix-icon="el-icon-date"
41
+          :editable="false"
42
+          style="width: 200px;"
43
+          type="date"
44
+          placeholder="选择日期时间"
45
+          align="right"
46
+          format="yyyy-MM-dd"
47
+          value-format="yyyy-MM-dd"
48
+        ></el-date-picker>
49
+      </div>
25 50
 
26 51
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
27 52
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
@@ -133,6 +158,18 @@
133 158
 
134 159
             </template>
135 160
           </el-table-column>
161
+          <el-table-column label="出库对象" width="140" align="center">
162
+            <template slot-scope="scope">
163
+               <el-select v-model="scope.row.admin_user_id" filterable placeholder="请选择厂商"  :disabled="drug_show">
164
+                <el-option
165
+                  v-for="(option, index) in doctorList"
166
+                  :key="index"
167
+                  :label="option.user_name"
168
+                  :value="option.admin_user_id">
169
+                </el-option>
170
+               </el-select>
171
+            </template>
172
+          </el-table-column>
136 173
          <el-table-column width="120" align="center">
137 174
             <template slot="header" slot-scope="scope">
138 175
               <span>出货价<span style="color: red">*</span></span>
@@ -334,7 +371,9 @@
334 371
         drug_show:false,
335 372
         unitList:[],
336 373
         unitShow:true,
337
-        numberList:[]
374
+        numberList:[],
375
+        houstList:[],
376
+        storehouse_id:"",
338 377
       }
339 378
     },
340 379
     methods: {
@@ -429,6 +468,10 @@
429 468
         return name;
430 469
       },
431 470
        handleEdit: function(index, row) {
471
+        if(parseInt(this.$route.query.is_sys) == 12){
472
+          this.$message.error("调拨出库数据不能新增!")
473
+          return
474
+        }
432 475
         if(row.supply_cancel_out_id >0){
433 476
          this.$message.error("采购出库数据不能新增!")
434 477
          return
@@ -451,9 +494,13 @@
451 494
         tempObj['dealer'] = ""
452 495
         tempObj['manufacturer'] = ""
453 496
         tempObj['warehouse_info_id'] = 0
497
+        tempObj["admin_user_id"] =  this.$store.getters.xt_user.user.user_name
454 498
         this.recordInfo.recordData.push(tempObj)
455 499
       }, handleDelete: function(index, row) {
456
-        console.log("row323232232",row)
500
+        if(parseInt(this.$route.query.is_sys) == 12){
501
+          this.$message.error("调拨出库数据不能删除!")
502
+          return
503
+        }
457 504
         if(row.supply_cancel_out_id >0){
458 505
          this.$message.error("采购出库数据不能删除!")
459 506
          return
@@ -591,7 +638,13 @@
591 638
                      this.recordInfo.recordData[i].warehouse_info_id =  this.numberList[y].id
592 639
                   }
593 640
                }
641
+              
642
+               for(let s=0;s<this.doctorList.length;s++){
643
+                  if(this.recordInfo.recordData[i].admin_user_id == this.doctorList[s].user_name){
644
+                    this.recordInfo.recordData[i].admin_user_id = this.doctorList[s].admin_user_id
645
+                  }
594 646
 
647
+               }
595 648
             }
596 649
             const loading = this.$loading({
597 650
               lock: true,
@@ -602,9 +655,8 @@
602 655
             const params = {
603 656
               'stockOut': this.recordInfo.recordData
604 657
             }
605
-            console.log("param23322323233222323",params)
606
-
607
-            editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
658
+         
659
+            editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer,this.storehouse_id).then(response => {
608 660
               if (response.data.state == 0) {
609 661
                 this.$message.error(response.data.msg)
610 662
                 loading.close()
@@ -692,9 +744,10 @@
692 744
               }
693 745
 
694 746
             this.warehouseOut = response.data.data.info
747
+            this.storehouse_id = response.data.data.info.storehouse_id
695 748
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
696
-
697
-
749
+            this.houstList = response.data.data.houstList
750
+            this.doctorList = response.data.data.doctorList
698 751
           }
699 752
 
700 753
           if (this.recordInfo.recordData.length == 0) {
@@ -818,6 +871,9 @@
818 871
       if(sys == 1){
819 872
         this.drug_show = true
820 873
       }
874
+      if(sys == 12){
875
+        this.drug_show = true
876
+      }
821 877
       if(parseInt(this.$route.query.supply_cancel_out_id)>0){
822 878
         this.drug_show = true
823 879
       }

+ 41 - 3
src/xt_pages/stock/drugs/inventory.vue 查看文件

@@ -1,6 +1,15 @@
1 1
 <template>
2 2
   <div>
3 3
     <div v-show="showSearch">
4
+    <label class="title"><span class="name">仓库</span> :</label>
5
+      <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px">
6
+          <el-option
7
+            v-for="(option, index) in houseList"
8
+            :key="index"
9
+            :label="option.storehouse_name"
10
+            :value="option.id">
11
+          </el-option>
12
+      </el-select>   
4 13
      <el-autocomplete
5 14
         class="checkSearch"
6 15
         popper-class="my-autocomplete"
@@ -62,6 +71,11 @@
62 71
                     {{scope.row.manufacturer_name}}
63 72
                   </template> 
64 73
               </el-table-column>
74
+             <el-table-column prop="name" label="仓库名称" width="100"  align="center">
75
+                  <template slot-scope="scope">
76
+                    {{getHouseName(scope.row.storehouse_id)}}
77
+                  </template> 
78
+              </el-table-column>
65 79
               <el-table-column prop="name" label="盘点前数量" width="180"  align="center">
66 80
                 <template slot-scope="scope">
67 81
                     <span><el-input style="width:50px" v-model="scope.row.stock_max_number" :disabled="true"></el-input>{{scope.row.max_unit}}</span> 
@@ -96,6 +110,15 @@
96 110
               </el-table-column>
97 111
           </el-table>
98 112
       </el-collapse-item>
113
+     <label class="title"><span class="name">仓库</span> :</label>
114
+      <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px">
115
+          <el-option
116
+            v-for="(option, index) in houseList"
117
+            :key="index"
118
+            :label="option.storehouse_name"
119
+            :value="option.id">
120
+          </el-option>
121
+      </el-select>   
99 122
       <el-autocomplete
100 123
           class="checkSearch"
101 124
           popper-class="my-autocomplete"
@@ -166,6 +189,7 @@ export default {
166 189
                 proof_count:"",
167 190
                 min_count:"",
168 191
                 min_unit:"",
192
+                storehouse_id:"",
169 193
             },
170 194
             total: 0,
171 195
             editdialogVisible:false,
@@ -201,6 +225,8 @@ export default {
201 225
             showTableOne:false,
202 226
             panShow:true,
203 227
             panOneShow:true,
228
+            houseList:[],
229
+            storehouse_id:"",
204 230
         }
205 231
     },
206 232
     methods:{
@@ -234,6 +260,7 @@ export default {
234 260
             }
235 261
              var params = {
236 262
                 keyword:key,
263
+                storehouse_id:this.storehouse_id,
237 264
              }
238 265
             
239 266
             postSearchDrugWarehouseList(params).then(response => {
@@ -279,7 +306,8 @@ export default {
279 306
             return
280 307
           }
281 308
            var params = {
282
-              id:val.drug_id
309
+              id:val.drug_id,
310
+              storehouse_id:this.storehouse_id,
283 311
             }
284 312
            getDrugWarehouseInfoList(params).then(response=>{
285 313
              if(response.data.state == 1){
@@ -566,7 +594,9 @@ export default {
566 594
               
567 595
               this.doctorList =  response.data.data.doctorList
568 596
               
597
+              this.houseList = response.data.data.houseList
569 598
 
599
+              this.storehouse_id = response.data.data.houseConfig.drug_storehouse_out
570 600
             }
571 601
           })
572 602
         },
@@ -860,7 +890,7 @@ export default {
860 890
        var params = {
861 891
          tableData:arr
862 892
        }
863
-      console.log("paramse32323232",params)
893
+     
864 894
       saveInentoryList(params).then(response=>{
865 895
         if(response.data.state == 1){
866 896
            var inventory = response.data.data.inventory
@@ -870,11 +900,19 @@ export default {
870 900
           
871 901
         }
872 902
       })
903
+    },
904
+    getHouseName(id){
905
+      var storehouse_name = ""
906
+      for(let i=0;i<this.houseList.length;i++){
907
+        if(id == this.houseList[i].id){
908
+          storehouse_name = this.houseList[i].storehouse_name
909
+        }
910
+      }
911
+      return storehouse_name
873 912
     }
874 913
     },
875 914
     created(){
876 915
       this.unitList =  this.getDataConfig('hemodialysis','units')
877
-      console.log("单位",this.unitList)
878 916
       this.getlist()
879 917
     },
880 918
     mounted() {

+ 41 - 3
src/xt_pages/stock/drugs/inventoryDetails.vue 查看文件

@@ -2,6 +2,14 @@
2 2
     <div>
3 3
         <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom:10px;">
4 4
             <div>
5
+              <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changehouseList">
6
+                <el-option
7
+                  v-for="(option, index) in houseList"
8
+                  :key="index"
9
+                  :label="option.storehouse_name"
10
+                  :value="option.id">
11
+                </el-option>
12
+              </el-select>   
5 13
                 <el-input
6 14
                 size="small"
7 15
                 style="width: 200px;margin-left:10px;"
@@ -61,6 +69,12 @@
61 69
                    {{getTime(scope.row.expiry_date)}}
62 70
                 </template>  
63 71
             </el-table-column>
72
+
73
+           <el-table-column prop="name" label="仓库名称" width="200"  align="center">
74
+                <template slot-scope="scope">
75
+                   {{getHouseName(scope.row.storehouse_id)}}
76
+                </template>  
77
+            </el-table-column>
64 78
            
65 79
            <el-table-column prop="name" label="盘点前数量" width="100"  align="center">
66 80
                 <template slot-scope="scope">
@@ -117,7 +131,7 @@ export default {
117 131
             total: 0,
118 132
             limit:10,
119 133
             page:1,
120
-            
134
+            storehouse_id:0,
121 135
         }
122 136
     },
123 137
     methods:{
@@ -140,14 +154,22 @@ export default {
140 154
               limit:this.limit,
141 155
               page:this.page,
142 156
               keyword:this.searchKey,
157
+              storehouse_id:this.storehouse_id,
143 158
             }
144 159
         
145 160
           getInventoryDetailList(params).then(response=>{
146 161
              if(response.data.state == 1){
147 162
               this.total =  response.data.data.total
148 163
               this.tableData = response.data.data.list
149
-              console.log("比阿哥",this.tableData)
164
+           
150 165
               this.doctorList = response.data.data.doctorList
166
+              var obj = {id:0,storehouse_name:"全部"}
167
+              this.houseList= []
168
+              this.houseList.push(obj)
169
+              for(let i=0;i<response.data.data.houseList.length;i++){
170
+                this.houseList.push(response.data.data.houseList[i])
171
+              }
172
+
151 173
              }
152 174
           })   
153 175
         },
@@ -165,7 +187,23 @@ export default {
165 187
             return uParseTime(val, '{y}-{m}-{d}')
166 188
          }
167 189
         },
168
-
190
+       changehouseList(){
191
+         this.houseList = []
192
+         this.getlist()
193
+       },
194
+       getHouseName(id){
195
+         var storehouse_name = ""
196
+         for(let i=0;i<this.houseList.length;i++){
197
+           if(id == this.houseList[i].id){
198
+              storehouse_name = this.houseList[i].storehouse_name
199
+           }
200
+         }
201
+         if(storehouse_name == "全部"){
202
+           return ""
203
+         }else{
204
+           return storehouse_name
205
+         }
206
+       }
169 207
     },
170 208
     created(){
171 209
       this.getlist()

+ 234 - 35
src/xt_pages/stock/drugs/query.vue 查看文件

@@ -30,15 +30,39 @@
30 30
     </div>
31 31
     <div class="app-container ">
32 32
       <div class="cell clearfix">
33
-         <el-select v-model="drug_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
33
+        <div>
34
+          <span>仓库名称:</span>
35
+          <el-select v-model="storehouse_id" style="width:200px;margin-right:10px;" placeholder="请选择"
36
+          filterable
37
+           @change="changeStorehouseName">
38
+            <el-option
39
+              v-for="item in storeList"
40
+              :key="item.id"
41
+              :label="item.storehouse_name"
42
+              :value="item.id">
43
+            </el-option>
44
+          </el-select>
45
+          <span>药品名称:</span>
46
+          <el-select v-model="drug_id" style="width:200px;margin-right:10px;" placeholder="请选择" 
47
+          filterable
48
+           @change="changeDrugName">
49
+            <el-option
50
+              v-for="item in medicalList"
51
+              :key="item.id"
52
+              :label="item.drug_name"
53
+              :value="item.id">
54
+            </el-option>
55
+          </el-select> 
56
+        </div>
57
+         <!-- <el-select v-model="drug_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
34 58
             <el-option
35 59
               v-for="(item,index) in drugTypeList"
36 60
               :key="index"
37 61
               :label="item.name"
38 62
               :value="item.id">
39 63
             </el-option>
40
-        </el-select>
41
-         <el-date-picker
64
+        </el-select> -->
65
+         <!-- <el-date-picker
42 66
             v-model="start_time"
43 67
             prefix-icon="el-icon-date"
44 68
             :editable="false"
@@ -61,8 +85,8 @@
61 85
               format="yyyy-MM-dd"
62 86
               value-format="yyyy-MM-dd"
63 87
               @change="endTimeChange"
64
-          ></el-date-picker>
65
-          <el-input
88
+          ></el-date-picker> -->
89
+          <!-- <el-input
66 90
             style="width: 200px;"
67 91
             class="filter-item"
68 92
             v-model.trim="keywords"
@@ -75,12 +99,12 @@
75 99
             icon="el-icon-search"
76 100
             @click="search"
77 101
           >搜索
78
-          </el-button>
102
+          </el-button> -->
79 103
       </div>
80 104
 
81
-       <el-table :data="tableList" border style="width: 100%">
82
-
83
-        <el-table-column prop="drug_type" label="药品类型" width="180" align="center">
105
+       <el-table :data="tableList" border style="width: 100%"   :cell-class-name="cellStyle">
106
+ 
107
+        <el-table-column prop="drug_type" label="药品类型" width="100" align="center">
84 108
            <template slot-scope="scope">
85 109
              {{getDrugType(scope.row.drug_type)}}
86 110
            </template>
@@ -110,43 +134,51 @@
110 134
              {{getManufacturerList(scope.row.manufacturer)}}
111 135
            </template>
112 136
         </el-table-column>
137
+       <el-table-column prop="drug_name" label="仓库名称" align="center">
138
+           <template slot-scope="scope">
139
+            <tr style="background: none" v-for="(item,index) in scope.row.drug_warehouse" :key="index">
140
+              <td style="border-right: none; border-inline-end: none;text-align: center">
141
+                {{getHouseName(item.storehouse_id)}}
142
+              </td>
143
+            </tr>
144
+           </template>
145
+        </el-table-column>
113 146
         <el-table-column prop="drug_name" label="入库数量" align="center">
114 147
            <template slot-scope="scope">
115
-            <span v-if="getWarehoseInfo(scope.row.drug_warehouse_info)>0">
116
-              {{getWarehoseInfoOne(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}
117
-            </span>
148
+             <tr style="background: none" v-for="(item,index) in scope.row.drug_warehouse" :key="index">
149
+              <td style="border-right: none; border-inline-end: none;text-align: center">
150
+               {{getWarehoseInfoSeven(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,item.storehouse_id)}}&nbsp;
151
+              </td>
152
+            </tr>
118 153
            </template>
119 154
         </el-table-column>
120
-        <el-table-column prop="drug_name" label="出库数量" align="center" v-if="showOne">
155
+        <el-table-column prop="drug_name" label="出库数量" align="center">
121 156
            <template slot-scope="scope">
122
-              <span>
123
-                 {{getOutFlush(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,scope.row.drug_cancel_stock_info)}}
124
-              </span>
157
+            <tr style="background: none" v-for="(item,index) in scope.row.drug_warehouse" :key="index">
158
+              <td style="border-right: none; border-inline-end: none;text-align: center">
159
+              {{getOutFlushNight(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,scope.row.drug_cancel_stock_info,item.storehouse_id)}}&nbsp;
160
+              </td>
161
+            </tr>
125 162
            </template>
126 163
         </el-table-column>
127 164
 
128
-        <el-table-column prop="drug_name" label="出库数量" align="center" v-if="showTwo">
165
+        <el-table-column prop="drug_name" label="剩余库存量" align="center">
129 166
            <template slot-scope="scope">
130
-           
131
-             <span>{{getOutCount(scope.row.id)+getAutoCount(scope.row.id)}}{{scope.row.max_unit}}</span>
132
-             
167
+              <tr style="background: none" v-for="(item,index) in scope.row.drug_warehouse" :key="index">
168
+                <td style="border-right: none; border-inline-end: none;text-align: center">
169
+                {{getOverFlushInfoEight(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,item.storehouse_id,scope.row.storehouse_id)}}&nbsp;
170
+                </td>
171
+            </tr>
133 172
            </template>
134 173
         </el-table-column>
135
-        
136
-        <el-table-column prop="drug_name" label="剩余库存量" align="center" v-if="showThree">
174
+
175
+       <el-table-column prop="drug_name" label="总库存量" align="center" v-if="showThree">
137 176
            <template slot-scope="scope">
138 177
             <div v-if="getWarehoseInfo(scope.row.drug_warehouse_info)>0">
139 178
                 {{ getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)?getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number):0}}
140 179
             </div>
141 180
            </template>
142
-        </el-table-column>
143
-        <el-table-column prop="drug_name" label="剩余库存量" align="center" v-if="showFour">
144
-           <template slot-scope="scope">
145
-            <div v-if="getWarehoseInfo(scope.row.drug_warehouse_info) >0">
146
-               <span>{{getWarehoseInfo(scope.row.drug_warehouse_info) - getOutCount(scope.row.id) - getAutoCount(scope.row.id)}}{{scope.row.max_unit}} </span>         
147
-            </div>
148
-           </template>
149
-        </el-table-column>
181
+        </el-table-column> 
150 182
         <el-table-column prop="drug_name" label="操作" align="center" width="200px">
151 183
           <template slot-scope="scope">
152 184
             <el-button
@@ -213,10 +245,6 @@ import { min } from 'moment'
213 245
       var drugTypeList = getDictionaryDataConfig('system','drug_type')
214 246
       this.drugTypeList.push(...drugTypeList)
215 247
       this.org_id =  this.$store.getters.xt_user.org.id
216
-      console.log("机构ID",this.org_id)
217
-      // this.getDrugCountList()
218
-
219
-
220 248
     },
221 249
     components: {
222 250
       SettingDialog,
@@ -269,6 +297,11 @@ import { min } from 'moment'
269 297
         showTwo:false,
270 298
         showThree:true,
271 299
         showFour:false,
300
+        houseList:[],
301
+        medicalList:[],
302
+        storehouse_id:0,
303
+        drug_id:0,
304
+        storeList:[],
272 305
       }
273 306
     },
274 307
     methods: {
@@ -281,6 +314,8 @@ import { min } from 'moment'
281 314
           drug_type:this.drug_type,
282 315
           start_time:this.start_time,
283 316
           end_time:this.end_time,
317
+          drug_id:this.drug_id,
318
+          storehouse_id:this.storehouse_id,
284 319
         }
285 320
         getDrugStockList(params).then(response=>{
286 321
           if(response.data.state == 1){
@@ -305,12 +340,36 @@ import { min } from 'moment'
305 340
                  }
306 341
                }
307 342
              }
308
-             console.log("列表list232323323232323223",list)
309 343
              this.tableList = list
310 344
              var total = response.data.data.total
311 345
              this.total = total
312 346
              this.manufacturerList = response.data.data.manufacturerList
347
+             this.houseList = []
348
+             this.storeList = []
349
+             var obj = {
350
+               id:0,storehouse_name:"全部"
351
+             }
352
+             var objOne = {
353
+               id:0,drug_name:"全部"
354
+             }
313 355
 
356
+             this.storeList.push(obj)
357
+             for(let i=0;i<response.data.data.houseList.length;i++){
358
+               this.houseList.push(response.data.data.houseList[i])
359
+               this.storeList.push(response.data.data.houseList[i])
360
+             }
361
+             this.medicalList = []
362
+             this.medicalList.push(objOne)
363
+             for(let i=0;i<response.data.data.medicalList.length;i++){
364
+               for(let j=0;j<response.data.data.manufacturerList.length;j++){
365
+                if(response.data.data.medicalList[i].manufacturer == response.data.data.manufacturerList[j].id){
366
+                   response.data.data.medicalList[i].manufacturer = response.data.data.manufacturerList[j].manufacturer_name
367
+                }
368
+              }
369
+              response.data.data.medicalList[i].drug_name = response.data.data.medicalList[i].drug_name +response.data.data.medicalList[i].dose + response.data.data.medicalList[i].dose_unit + "*" + response.data.data.medicalList[i].min_number +  response.data.data.medicalList[i].min_unit+ "/"+ response.data.data.medicalList[i].max_unit +  " " +response.data.data.medicalList[i].manufacturer
370
+               this.medicalList.push(response.data.data.medicalList[i])
371
+             }
372
+             
314 373
            }
315 374
         })
316 375
       },
@@ -892,7 +951,126 @@ import { min } from 'moment'
892 951
            str_min =  over_count%min_number + min_unit
893 952
          }
894 953
        return str+str_min
954
+      },
955
+    getHouseName(id){
956
+      var storehouse_name = ""
957
+      for(let i=0;i<this.houseList.length;i++){
958
+        if(id == this.houseList[i].id){
959
+          storehouse_name = this.houseList[i].storehouse_name
960
+        }
895 961
       }
962
+      return storehouse_name
963
+     },
964
+     getWarehoseInfoSeven(arr,max_unit,min_unit,min_number,storehouse_id){
965
+        var total = 0
966
+        var max_str=  ""
967
+         var min_str = ""
968
+        if (arr.length > 0) {
969
+          for(let i=0;i<arr.length;i++){
970
+            if(arr[i].storehouse_id == storehouse_id){
971
+              total += parseInt(arr[i].warehousing_count)
972
+            } 
973
+          }
974
+        }
975
+        if (total < min_number){
976
+          min_str = total + min_unit
977
+        }
978
+        if (total == 0) {
979
+          min_str = ""
980
+          max_str = ""
981
+        }
982
+        if (total >=min_number) {
983
+           if(parseInt(total/min_number)!=0){
984
+              max_str = parseInt(total/min_number) + max_unit
985
+           }
986
+           if(total%min_number!=0){
987
+              min_str = total%min_number + min_unit
988
+           }
989
+
990
+        }
991
+        return max_str + min_str
992
+      },
993
+           
994
+      getOverFlushInfoEight(arr,max_unit,min_unit,min_number,storehouse_id){
995
+
996
+         var max_str=  ""
997
+         var min_str = ""
998
+         var total = 0
999
+         var newarr = arr
1000
+         if(newarr.length > 0 ){
1001
+           for(let i=0;i<newarr.length;i++){
1002
+            if(newarr[i].storehouse_id == storehouse_id){
1003
+              total += (newarr[i].stock_max_number+newarr[i].stock_min_number)
1004
+            }
1005
+           }
1006
+         }
1007
+         if (total < min_number){
1008
+           min_str = total + min_unit
1009
+         }
1010
+         if (total == 0) {
1011
+            min_str = ""
1012
+            max_str = ""
1013
+         }
1014
+         if (total >=min_number) {
1015
+           if(parseInt(total/min_number)!=0){
1016
+              max_str = parseInt(total/min_number) + max_unit
1017
+           }
1018
+           if(total%min_number!=0){
1019
+              min_str = total%min_number + min_unit
1020
+           }
1021
+
1022
+         }
1023
+        return max_str + min_str
1024
+      },
1025
+      getOutFlushNight(info,max_unit,min_unit,min_number,cancel_info,storehouse_id){
1026
+
1027
+        var str = ""
1028
+        var str_min = ""
1029
+        //总库存
1030
+        var total = 0
1031
+        var out_count = 0
1032
+        var over_count = 0
1033
+        var cancel_count = 0
1034
+        for(let i=0;i<info.length;i++){
1035
+          if(info[i].storehouse_id == storehouse_id){
1036
+            total += info[i].warehousing_count
1037
+          }
1038
+          
1039
+        }
1040
+        
1041
+        for(let j=0;j<info.length;j++){
1042
+          if(info[j].storehouse_id == storehouse_id){
1043
+            out_count += (info[j].stock_max_number + info[j].stock_min_number)
1044
+          }
1045
+          
1046
+        }
1047
+       
1048
+        // for(let z=0;z<cancel_info.length;z++){
1049
+        //    cancel_count += cancel_info[z].count
1050
+        // }
1051
+       // over_count = total - out_count + cancel_count
1052
+         over_count = total - out_count 
1053
+        if(parseInt(over_count/min_number)!=0){
1054
+            str = parseInt(over_count/min_number)+ max_unit
1055
+         }
1056
+         if(over_count%min_number !=0){
1057
+           str_min =  over_count%min_number + min_unit
1058
+         }
1059
+       return str+str_min
1060
+      },
1061
+      changeStorehouseName(){
1062
+        this.getlist()
1063
+     },
1064
+      changeDrugName(){
1065
+        this.getlist()
1066
+      },
1067
+     // 合并单元格样式
1068
+     cellStyle({ row, column, rowIndex, columnIndex }) {
1069
+      let arr = [6, 7, 8, 9];
1070
+      if (arr.indexOf(columnIndex) > -1) {
1071
+        return "spanClass";
1072
+      }
1073
+    },
896 1074
     }
897 1075
   }
898 1076
 </script>
@@ -950,4 +1128,25 @@ import { min } from 'moment'
950 1128
   .el-table::before {
951 1129
     background-color: #d0d3da;
952 1130
   }
1131
+
1132
+
1133
+/* 合并表格线样式 */
1134
+.spanClass .cell {
1135
+  padding: 0 !important;
1136
+}
1137
+
1138
+.spanClass .cell tr {
1139
+  display: inline-block;
1140
+  width: 100%;
1141
+}
1142
+
1143
+.spanClass .cell tr td {
1144
+  padding: 10px 0;
1145
+  border-bottom: 1px solid #ebeef5;
1146
+  display: block;
1147
+  width: 100%;
1148
+}
1149
+.spanClass .cell tr:last-of-type td{
1150
+  border-bottom: none;
1151
+}
953 1152
 </style>

+ 3 - 1
src/xt_pages/stock/index.vue 查看文件

@@ -37,6 +37,7 @@
37 37
   import GoodType from './config/goodType'
38 38
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
39 39
   import AutomaticReduce from './config/automaticReduce'
40
+  
40 41
   export default {
41 42
     name: 'service',
42 43
     components: {
@@ -45,7 +46,8 @@
45 46
       GoodInfo,
46 47
       Manufacturer,
47 48
       Dealer,
48
-      BreadCrumb
49
+      BreadCrumb,
50
+      
49 51
     },
50 52
     data() {
51 53
       return {

+ 110 - 70
src/xt_pages/stock/inventory.vue 查看文件

@@ -1,6 +1,15 @@
1 1
 <template>
2 2
   <div>
3 3
     <div v-show="showSearch">
4
+      <label class="title"><span class="name">仓库</span> :</label>
5
+        <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeHouseList">
6
+            <el-option
7
+              v-for="(option, index) in houseList"
8
+              :key="index"
9
+              :label="option.storehouse_name"
10
+              :value="option.id">
11
+            </el-option>
12
+       </el-select>  
4 13
      <el-autocomplete
5 14
         class="checkSearch"
6 15
         popper-class="my-autocomplete"
@@ -62,6 +71,12 @@
62 71
                     {{scope.row.manufacturer_name}}
63 72
                   </template> 
64 73
               </el-table-column>
74
+
75
+             <el-table-column prop="name" label="仓库名称" width="100"  align="center">
76
+                  <template slot-scope="scope">
77
+                    {{getStorehouseName(scope.row.storehouse_id)}}
78
+                  </template> 
79
+              </el-table-column>
65 80
               <el-table-column prop="name" label="盘点前数量" width="120"  align="center">
66 81
                 <template slot-scope="scope">
67 82
                     <span><el-input style="width:80px" v-model="scope.row.stock_count" :disabled="true"></el-input>{{scope.row.max_unit}}</span> 
@@ -94,6 +109,15 @@
94 109
               </el-table-column>
95 110
           </el-table>
96 111
       </el-collapse-item>
112
+        <label class="title"><span class="name">仓库</span>:</label>
113
+          <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeHouseList">
114
+                <el-option
115
+                  v-for="(option, index) in houseList"
116
+                  :key="index"
117
+                  :label="option.storehouse_name"
118
+                  :value="option.id">
119
+                </el-option>
120
+          </el-select>
97 121
       <el-autocomplete
98 122
           class="checkSearch"
99 123
           popper-class="my-autocomplete"
@@ -160,6 +184,7 @@ export default {
160 184
                 product_date:"",
161 185
                 number:"",
162 186
                 proof_count:"",
187
+                storehouse_id:"",
163 188
             },
164 189
          manufacturerList:[],
165 190
          dealerList:[],
@@ -194,6 +219,8 @@ export default {
194 219
          inventory_total:0,
195 220
          WarehouseList:[],
196 221
          showTableOne:false,
222
+         houseList:[],
223
+         storehouse_id:"",
197 224
         }
198 225
     },
199 226
     methods:{
@@ -203,13 +230,14 @@ export default {
203 230
                 key = keyword
204 231
             }
205 232
             var params = {
206
-              keyword:key
233
+              keyword:key,
234
+              storehouse_id:this.storehouse_id,
207 235
             }
208 236
             postSearchGoodWarehouseList(params).then(response => {
209 237
             if (response.data.state == 1) {
210 238
             
211 239
                 var list = response.data.data.list
212
-                console.log("列表数据",list)
240
+              
213 241
                 this.goodList = list
214 242
                 var manufacturerList = response.data.data.manufacturerList
215 243
                 this.manufacturerList = manufacturerList
@@ -272,72 +300,76 @@ export default {
272 300
           this.page = val
273 301
           this.getlist()
274 302
         },
275
-    getlist(){
276
-      var params = {
277
-            keyword:this.searchKey,
278
-            start_time:this.start_time,
279
-            end_time:this.end_time,
280
-            inventory_status:this.inventory_status, 
281
-            page:this.page,
282
-            limit:this.limit,
283
-          }
284
-          console.log("我爱你中国parasm",params)
285
-        getInventoryList(params).then(response=>{
286
-            if(response.data.state ==1 ){
287
-            var list =  response.data.data.list
288
-            console.log("列表23232323232",list)
289
-            this.tableList = list
290
-            var total = response.data.data.total
291
-            this.total = total
292
-            this.doctorList =  response.data.data.doctorlist
303
+      changeHouseList(){
304
+        this.querySearchAsync()
305
+      },
306
+      getlist(){
307
+        var params = {
308
+              keyword:this.searchKey,
309
+              start_time:this.start_time,
310
+              end_time:this.end_time,
311
+              inventory_status:this.inventory_status, 
312
+              page:this.page,
313
+              limit:this.limit,
293 314
             }
294
-        })
315
+          getInventoryList(params).then(response=>{
316
+              if(response.data.state ==1 ){
317
+              var list =  response.data.data.list
318
+              this.tableList = list
319
+              var total = response.data.data.total
320
+              this.total = total
321
+              this.doctorList =  response.data.data.doctorlist
322
+              this.houseList = response.data.data.houseList
323
+              var houseConfig = response.data.data.houseConfig
324
+              this.storehouse_id = houseConfig.storehouse_out_info
325
+              }
326
+          })
327
+        },
328
+      getChecker(id){
329
+        var name = ""
330
+        for(let i=0;i<this.doctorList.length;i++){
331
+            if(id == this.doctorList[i].admin_user_id){
332
+              name = this.doctorList[i].user_name
333
+            }
334
+        }
335
+        return name
295 336
       },
296
-     getChecker(id){
297
-       var name = ""
298
-       for(let i=0;i<this.doctorList.length;i++){
299
-          if(id == this.doctorList[i].admin_user_id){
300
-             name = this.doctorList[i].user_name
301
-          }
302
-       }
303
-       return name
304
-     },
305
-    toCheck(){
306
-      if(this.ids.length <=0){
307
-         this.$message.error("请勾选核对数据")
308
-         return
309
-       }else{
310
-         this.checkDialogVisible = true
311
-       }
312
-     },
313
-    changePrice(val){  
314
-       var arr = []
337
+      toCheck(){
338
+        if(this.ids.length <=0){
339
+          this.$message.error("请勾选核对数据")
340
+          return
341
+        }else{
342
+          this.checkDialogVisible = true
343
+        }
344
+      },
345
+      changePrice(val){  
346
+        var arr = []
347
+        
348
+        for(let i=0;i<val.length;i++){
349
+          arr.push(val[i].id)
350
+        }
351
+        var str = arr.join(",")
315 352
       
316
-       for(let i=0;i<val.length;i++){
317
-         arr.push(val[i].id)
318
-       }
319
-      var str = arr.join(",")
320
-    
321
-      console.log("str",str)
322
-      this.ids = str
323 353
      
324
-     },
325
-     SaveCheckedInventory(){
326
-         var params = {
327
-            ids:this.ids,
328
-            check_time:this.getTime(this.check_time),
329
-            checker:this.checker,
330
-         }
331
-       console.log("params",params)
332
-       SaveCheckedInventory(params).then(response=>{
333
-         if(response.data.state == 1){
334
-           this.$message.success("保存成功")
335
-           var inventory = response.data.data.inventory
336
-           this.checkDialogVisible = false
337
-           this.getlist()
338
-         }
339
-       })
340
-     },
354
+        this.ids = str
355
+      
356
+      },
357
+      SaveCheckedInventory(){
358
+          var params = {
359
+              ids:this.ids,
360
+              check_time:this.getTime(this.check_time),
361
+              checker:this.checker,
362
+
363
+          }
364
+        SaveCheckedInventory(params).then(response=>{
365
+          if(response.data.state == 1){
366
+            this.$message.success("保存成功")
367
+            var inventory = response.data.data.inventory
368
+            this.checkDialogVisible = false
369
+            this.getlist()
370
+          }
371
+        })
372
+      },
341 373
       toDelete(index){
342 374
        this.tableData.splice(index,1)
343 375
      },
@@ -345,7 +377,7 @@ export default {
345 377
        getInventoryDetail(id).then(response=>{
346 378
           if(response.data.state == 1){
347 379
             var detail =  response.data.data.detail
348
-            console.log("detial",detail)
380
+         
349 381
             this.form.good_name = detail.good_name
350 382
             this.form.specification_name = detail.specification_name
351 383
             this.form.count = detail.count
@@ -415,6 +447,7 @@ export default {
415 447
     getGoodInventoryWarehouseList(id){
416 448
        var params = {
417 449
          id:id,
450
+         storehouse_id:this.storehouse_id,
418 451
        }
419 452
       getGoodInventoryWarehouseList(params).then(response=>{
420 453
          if(response.data.state == 1){
@@ -458,7 +491,7 @@ export default {
458 491
                 }
459 492
               }
460 493
             }
461
-          console.log("newList2333232323232",newList)
494
+        
462 495
           
463 496
           this.tableData = newList
464 497
           this.showSearch = false
@@ -497,7 +530,6 @@ export default {
497 530
       })
498 531
     },
499 532
     toMove(item,index){
500
-      console.log("index",item)
501 533
        this.$confirm('此操作将移除耗材整个批次, 是否继续?', '提示', {
502 534
           confirmButtonText: '确定',
503 535
           cancelButtonText: '取消',
@@ -542,10 +574,9 @@ export default {
542 574
         
543 575
       }
544 576
        var params = {
545
-         tableData:arr
577
+         tableData:arr,
578
+         storehouse_id:this.storehouse_id,
546 579
        }
547
-      console.log("params2323323",params)
548
-     
549 580
       saveStockInentoryList(params).then(response=>{
550 581
         if(response.data.state == 1){
551 582
            var inventory = response.data.data.inventory
@@ -554,6 +585,15 @@ export default {
554 585
            this.tableData = []
555 586
         }
556 587
       })
588
+    },
589
+    getStorehouseName(id){
590
+      var storehouse_name = ""
591
+      for(let i=0;i<this.houseList.length;i++){
592
+        if(id == this.houseList[i].id){
593
+          storehouse_name = this.houseList[i].storehouse_name
594
+        }
595
+      }
596
+      return storehouse_name
557 597
     }
558 598
    },
559 599
     created(){

+ 42 - 0
src/xt_pages/stock/inventoryDetails.vue 查看文件

@@ -2,6 +2,15 @@
2 2
     <div>
3 3
         <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom:10px;">
4 4
             <div>
5
+             <label class="title"><span class="name">仓库</span> :</label>
6
+              <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeHouseList">
7
+                  <el-option
8
+                    v-for="(option, index) in houseList"
9
+                    :key="index"
10
+                    :label="option.storehouse_name"
11
+                    :value="option.id">
12
+                  </el-option>
13
+               </el-select>  
5 14
                 <el-input
6 15
                 size="small"
7 16
                 style="width: 200px;margin-left:10px;"
@@ -42,6 +51,12 @@
42 51
                  {{getTime(scope.row.product_date)}}
43 52
                </template>
44 53
             </el-table-column>
54
+
55
+           <el-table-column  prop="name" label="仓库名称" width="200" align="center">
56
+               <template slot-scope="scope">
57
+                 {{getStorehouseName(scope.row.storehouse_id)}}
58
+               </template>
59
+            </el-table-column>
45 60
            
46 61
             <el-table-column prop="name" label="盘点前数量" width="100" align="center">
47 62
               <template slot-scope="scope">
@@ -108,6 +123,8 @@ export default {
108 123
             page:1,
109 124
             ids:"",
110 125
             damageList:[],
126
+            storehouse_id:0,
127
+            houseList:[],
111 128
          }
112 129
     },
113 130
     methods:{
@@ -134,6 +151,7 @@ export default {
134 151
             keyword:this.searchKey,
135 152
             limit:this.limit,
136 153
             page:this.page,
154
+            storehouse_id:this.storehouse_id,
137 155
           }
138 156
           this.tableData = []
139 157
           getInventoryDetailList(params).then(response=>{
@@ -143,6 +161,13 @@ export default {
143 161
              
144 162
                this.tableData = list
145 163
                this.total = response.data.data.total
164
+               var obj = {id:0,storehouse_name:"全部"}
165
+               this.houseList = []
166
+               this.houseList.push(obj)
167
+               for(let i=0;i<response.data.data.houseList.length;i++){
168
+                 this.houseList.push(response.data.data.houseList[i])
169
+               }
170
+              
146 171
              }
147 172
           })
148 173
         },
@@ -188,6 +213,23 @@ export default {
188 213
        },
189 214
       inventoryExportList(){
190 215
         this.$router.push({path:'/stock/inventoryPrint'})
216
+      },
217
+      getStorehouseName(id){
218
+        var storehouse_name = ""
219
+        for(let i=0;i<this.houseList.length;i++){
220
+          if(id == this.houseList[i].id){
221
+            storehouse_name = this.houseList[i].storehouse_name
222
+          }
223
+        }
224
+        if(storehouse_name == "全部"){
225
+          return ""
226
+        }else{
227
+          return storehouse_name
228
+        }
229
+      },
230
+      changeHouseList(){
231
+        this.houseList = []
232
+        this.getlist()
191 233
       }
192 234
     },
193 235
     created(){

+ 668 - 116
src/xt_pages/stock/inventoryTransfer/Addtrans.vue 查看文件

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

+ 301 - 38
src/xt_pages/stock/inventoryTransfer/index.vue 查看文件

@@ -18,25 +18,51 @@
18 18
         "
19 19
       >
20 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
21
+          <!-- <el-button
28 22
             size="small"
29 23
             class="filter-item"
30 24
             type="primary"
31 25
             icon="el-icon-search"
32 26
             @click="search"
33 27
             >查看</el-button
34
-          >
28
+          > -->
35 29
         </div>
36 30
         <div>
37 31
           单据日期:
38
-          <el-date-picker v-model="value1" type="date" placeholder="选择日期">
39
-          </el-date-picker>
32
+          <el-date-picker
33
+            size="small"
34
+            v-model="start_time"
35
+            prefix-icon="el-icon-date"
36
+            :editable="false"
37
+            style="width: 196px"
38
+            type="date"
39
+            placeholder="选择日期时间"
40
+            align="right"
41
+            format="yyyy-MM-dd"
42
+            value-format="yyyy-MM-dd"
43
+            @change="startTimeChange"
44
+          ></el-date-picker
45
+          >-
46
+          <el-date-picker
47
+            size="small"
48
+            v-model="end_time"
49
+            prefix-icon="el-icon-date"
50
+            :editable="false"
51
+            style="width: 196px"
52
+            type="date"
53
+            placeholder="选择日期时间"
54
+            align="right"
55
+            format="yyyy-MM-dd"
56
+            value-format="yyyy-MM-dd"
57
+            @change="endTimeChange"
58
+          ></el-date-picker>
59
+          <el-input
60
+            size="small"
61
+            style="width: 200px; margin-left: 10px"
62
+            class="filter-item"
63
+            placeholder="请输入单据编号,仓库名称"
64
+            v-model.trim="keywords"
65
+          />
40 66
           <el-button
41 67
             size="small"
42 68
             class="filter-item"
@@ -60,42 +86,38 @@
60 86
         <el-table-column type="selection" width="55"> </el-table-column>
61 87
         <el-table-column label="单据编号" align="center">
62 88
           <template slot-scope="scope">
63
-            <span>{{ scope.row.drug_name ? scope.row.drug_name : "" }}</span>
89
+            <span>{{scope.row.second_order_number}}</span>
64 90
           </template>
65 91
         </el-table-column>
66 92
         <el-table-column label="单据日期" align="center">
67 93
           <template slot-scope="scope">
68
-            <span>{{ scope.row.drug_spec ? scope.row.drug_spec : "" }}</span>
69
-          </template>
70
-        </el-table-column>
71
-        <el-table-column label="商品名称" align="center">
72
-          <template slot-scope="scope">
73
-            <span>{{ scope.row.Count ? scope.row.Count : "" }}</span>
94
+             {{getTime(scope.row.record_date)}}
74 95
           </template>
75 96
         </el-table-column>
97
+      
76 98
         <el-table-column label="调出仓库" align="center">
77 99
           <template slot-scope="scope">
78
-            <span>{{ scope.row.Count ? scope.row.Count : "" }}</span>
100
+             {{getHouseName(scope.row.storehouse_out_id)}}
79 101
           </template>
80 102
         </el-table-column>
81 103
         <el-table-column label="调入仓库" align="center">
82 104
           <template slot-scope="scope">
83
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
105
+            {{getHouseName(scope.row.storehouse_in_id)}}
84 106
           </template>
85 107
         </el-table-column>
86 108
         <el-table-column label="制单人" align="center">
87 109
           <template slot-scope="scope">
88
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
110
+            {{getDocName(scope.row.creater)}}
89 111
           </template>
90 112
         </el-table-column>
91 113
         <el-table-column label="审核人" align="center">
92 114
           <template slot-scope="scope">
93
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
115
+           {{getDocName(scope.row.checker)}}
94 116
           </template>
95 117
         </el-table-column>
96 118
         <el-table-column label="审核时间" align="center">
97 119
           <template slot-scope="scope">
98
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
120
+            {{getTime(scope.row.check_time)}}
99 121
           </template>
100 122
         </el-table-column>
101 123
         <el-table-column label="操作" align="center" width="260px">
@@ -114,7 +136,7 @@
114 136
                 icon="el-icon-delete"
115 137
                 size="small"
116 138
                 type="danger"
117
-                @click="toDelete(scope.row, scope.row.$index)"
139
+                @click="toDelete(scope.row, scope.$index)"
118 140
               >
119 141
               </el-button>
120 142
             </el-tooltip>
@@ -150,6 +172,8 @@
150 172
 
151 173
 <script>
152 174
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
175
+import {getAllSecondOrderList,checkSecondOrder,deleteStoreHouseList,returnCheckSecondOrder} from "@/api/seconde";
176
+import { uParseTime } from "@/utils/tools";
153 177
 export default {
154 178
   components: {
155 179
     BreadCrumb,
@@ -164,44 +188,200 @@ export default {
164 188
       total: 0,
165 189
       page: 1,
166 190
       limit: 10,
167
-      tableData: [{}, {}],
191
+      tableData: [],
192
+      keywords:"",
193
+      start_time:"",
194
+      end_time:"",
195
+      supplyList: [],
196
+      check_id: 0,
197
+      doctorList: [],
198
+      houseList:[],
199
+      check_id:0,
200
+      ids:"",
201
+      array:[],
202
+      checkArray:[],
203
+      returnArray:[],
168 204
     };
169 205
   },
170 206
 
171 207
   methods: {
172
-    // 初始化数据
173
-    init() {},
174
-
208
+   
175 209
     // 反审核
176
-    approval() {},
210
+    approval() {
211
+      if(this.array.length<=0){
212
+       this.$message.error("请勾选需要反审核的订单!")
213
+       return
214
+      }
215
+      if(this.returnArray.length >0){
216
+        this.$message.error("不能勾选未审核的单据!")
217
+        return
218
+      }
219
+      var ids = this.array.join(",")
220
+      returnCheckSecondOrder(ids).then(response=>{
221
+         if(response.data.state == 1){
222
+          var msg = response.data.data.msg
223
+          if(msg == 0){
224
+            this.$message.success("反审核失败!")
225
+            this.getlist()
226
+          }
227
+          if(msg == 1){
228
+            this.$message.success("反审核成功!")
229
+            this.getlist()
230
+          }
231
+          if(msg == 2){
232
+            var good_name = response.data.data.good_name
233
+            var specification_name = response.data.data.specification_name
234
+            var storehose_name = response.data.data.storehose_name
235
+
236
+            this.$message.error(storehose_name + " "+good_name+"*"+specification_name+"已有出库数据不能反审核")
237
+          }
238
+          if(msg == 3){
239
+            var drug_name =  response.data.data.drug_name
240
+            var dose = response.data.data.dose
241
+            var dose_unit = response.data.data.dose_unit
242
+            var min_number = response.data.data.min_number
243
+            var min_unit =  response.data.data.min_unit
244
+            var max_unit =  response.data.data.max_unit
245
+            var str = drug_name + " " + dose + dose_unit + "*" + min_number + min_unit+"/"+max_unit
246
+            var storehose_name = response.data.data.storehose_name
247
+            this.$message.error(storehose_name +" "+str +"已有出库数据不能反审核!")
248
+
249
+          }
250
+         }
251
+      })
252
+
253
+    },
177 254
 
178 255
     // 审核
179
-    examine() {},
256
+    examine() {
257
+      if(this.checkArray.length >0){
258
+       this.$message.error("不能勾选已审核的单据!")
259
+       return
260
+      }
261
+
262
+      if(this.array.length <=0){
263
+       this.$message.error("请勾选需要审核的订单!")
264
+       return
265
+      }
266
+      var ids = this.array.join(",")
267
+      checkSecondOrder(ids).then(response=>{
268
+        if(response.data.state == 1){
269
+          var msg = response.data.data.msg
270
+         
271
+          if(msg == 1){
272
+            this.$message.success("审核成功!")
273
+            this.getlist()
274
+          }
275
+          if(msg == 2){
276
+            var good_name = response.data.data.good_name
277
+            var specification_name = response.data.data.specification_name
278
+            var storehose_name = response.data.data.storehose_name
279
+
280
+            this.$message.error("审核失败" + " "+storehose_name + " "+good_name+"*"+specification_name+"库存不足,无法调拨,请修改调拨数量!")
281
+          }
282
+          if(msg == 3){
283
+            var drug_name =  response.data.data.drug_name
284
+            var dose = response.data.data.dose
285
+            var dose_unit = response.data.data.dose_unit
286
+            var min_number = response.data.data.min_number
287
+            var min_unit =  response.data.data.min_unit
288
+            var max_unit =  response.data.data.max_unit
289
+            var str = drug_name + " " + dose + dose_unit + "*" + min_number + min_unit+"/"+max_unit
290
+            var storehose_name = response.data.data.storehose_name
291
+            this.$message.error("审核失败" + " " + storehose_name +" "+str +"库存不足,无法调拨,请修改调拨数量!")
292
+
293
+          }
294
+
295
+        }
296
+      })
297
+    },
180 298
 
181 299
     // 添加
182 300
     Add() {
183
-        this.$router.push({path:"/stock/inventoryTransfer/Addtrans"})
301
+      this.$router.push({path:"/stock/inventoryTransfer/Addtrans"})
184 302
     },
185 303
 
186 304
     // 删除
187
-    toDelete() {},
305
+    toDelete(row,index) {
306
+      if(row.is_check == 1){
307
+        this.$message.error("已审核数据不能删除!")
308
+        return 
309
+      }
310
+      this.$confirm("确认删除库存调拨单记录?", "删除库存调拨单记录", {
311
+        confirmButtonText: "确定",
312
+        cancelButtonText: "取消", 
313
+        type: "warning"
314
+      }).then(() => {
315
+          deleteStoreHouseList(row.id).then(response => {
316
+            if (response.data.state == 0) {
317
+              this.$message.error(response.data.msg);
318
+              return false;
319
+            } else {
320
+              this.$notify({
321
+                title: "成功",
322
+                message: "删除成功",
323
+                type: "success",
324
+                duration: 2000
325
+              });
326
+              this.tableData.splice(index,1)
327
+            }
328
+          });
329
+        }).catch(() => {});
330
+    },
188 331
 
189 332
     // 详情查看
190
-    toDetails() {
191
-        this.$router.push({path:"/stock/inventoryTransfer/transDetails"})
333
+    toDetails(row) {
334
+        this.$router.push({path:"/stock/inventoryTransfer/transDetails?id="+row.id})
335
+    },
336
+    changeTypeName() {
337
+      this.getlist();
338
+    },
339
+    startTimeChange() {
340
+      
341
+      this.getlist();
342
+    },
343
+    endTimeChange() {
344
+     
345
+      this.getlist();
346
+    },
347
+    search() {
348
+      this.getlist();
349
+    },
350
+    getTimes(time) {
351
+      if (time === "") {
352
+        return "";
353
+      }
354
+      return uParseTime(time, "{y}-{m}-{d}");
192 355
     },
193
-
194 356
     // 表单全选
195
-    handleSelectionChange() {},
196
-
357
+    handleSelectionChange(val) {
358
+      this.array = []
359
+      this.checkArray = []
360
+      this.returnArray = []
361
+     for(let i=0;i<val.length;i++){
362
+      this.array.push(val[i].id)
363
+      if(val[i].is_check == 1){
364
+        this.checkArray.push(val[i].is_check)
365
+      }
366
+      if(val[i].is_check == 2){
367
+        this.returnArray.push(val[i].is_check)
368
+      }
369
+     }
370
+    },
197 371
     // 页表操作
198 372
     handleSizeChange(val) {
373
+      this.array= []
374
+      this.checkArray = []
375
+      this.returnArray = []
199 376
       this.limit = val;
200
-      this.init();
377
+      this.getlist();
201 378
     },
202 379
     handleCurrentChange(val) {
380
+      this.array= []
381
+      this.checkArray = []
382
+      this.returnArray = []
203 383
       this.page = val;
204
-      this.init();
384
+      this.getlist();
205 385
     },
206 386
 
207 387
     // 表格样式
@@ -218,7 +398,90 @@ export default {
218 398
         };
219 399
       }
220 400
     },
401
+    getlist() {
402
+      var params = {
403
+        check_id: this.check_id,
404
+        start_time: this.start_time,
405
+        end_time: this.end_time,
406
+        keyword: this.keywords,
407
+        page: this.page,
408
+        limit: this.limit,
409
+      };
410
+      console.log("params32232332323",params)
411
+      getAllSecondOrderList(params).then((response) => {
412
+        if (response.data.state == 1) {
413
+          var list = response.data.data.list;
414
+          this.tableData = list;
415
+          var total = response.data.data.total;
416
+          this.total = total;
417
+          this.houseList = response.data.data.houseList
418
+          this.doctorList = response.data.data.doctorList
419
+        }
420
+      });
421
+    },
422
+    getName(id) {
423
+      var name = "";
424
+      for (let i = 0; i < this.supplyList.length; i++) {
425
+        if (id == this.supplyList[i].id) {
426
+          name = this.supplyList[i].supplier_name;
427
+        }
428
+      }
429
+      return name;
430
+    },
431
+    getDocName(id) {
432
+      var user_name = "";
433
+      for (let i = 0; i < this.doctorList.length; i++) {
434
+        if (id == this.doctorList[i].admin_user_id) {
435
+          user_name = this.doctorList[i].user_name;
436
+        }
437
+      }
438
+      return user_name;
439
+    },
440
+    getTime(time) {
441
+      if (time === "") {
442
+        return "";
443
+      }
444
+      return uParseTime(time, "{y}-{m}-{d}");
445
+    },
446
+    getHouseName(id){
447
+      var storehouse_name = ""
448
+      for(let i=0;i<this.houseList.length;i++){
449
+         if(id == this.houseList[i].id){
450
+           storehouse_name = this.houseList[i].storehouse_name
451
+         }
452
+      }
453
+      return storehouse_name
454
+    },
455
+    toEdit(row){
456
+      this.$router.push("/stock/inventoryTransfer/transedit?id="+row.id)
457
+    }
221 458
   },
459
+  created(){
460
+    var now = new Date(); //当前日期
461
+    var nowMonth = now.getMonth(); //当前月
462
+    var nowYear = now.getFullYear(); //当前年
463
+    //本月的开始时间
464
+    var monthStartDate = new Date(nowYear, nowMonth, 1);
465
+    this.start_time = this.getTimes(monthStartDate);
466
+    this.end_time = this.getTimes(new Date());
467
+
468
+    // this.org_id = this.$store.getters.xt_user.org_id;
469
+    // var start_time =  window.sessionStorage.getItem('purchase_start_time')
470
+    
471
+    // var end_time =  window.sessionStorage.getItem('purchase_end_time')
472
+   
473
+    // if(start_time !=null){
474
+    //   this.start_time = ""
475
+    //   this.start_time = start_time
476
+    // }
477
+    // if(end_time!=null){
478
+    //   this.end_time = ""
479
+    //   this.end_time = end_time
480
+    // }
481
+    // window.sessionStorage.removeItem('purchase_start_time')
482
+    // window.sessionStorage.removeItem('purchase_end_time')
483
+    this.getlist();
484
+  }
222 485
 };
223 486
 </script>
224 487
 

+ 86 - 26
src/xt_pages/stock/inventoryTransfer/transDetails.vue 查看文件

@@ -10,8 +10,7 @@
10 10
           backgroundColor: 'rgb(245, 247, 250)',
11 11
           color: '#606266',
12 12
         }"
13
-        :data="tableData"
14
-        :class="signAndWeighBoxPatients"
13
+        :data="tableList"
15 14
         border
16 15
       >
17 16
         >
@@ -20,78 +19,69 @@
20 19
             商品名称<span style="color: red">*</span>
21 20
           </template>
22 21
           <template slot-scope="scope">
23
-            <span>{{ scope.row.Count ? scope.row.Count : "" }}</span>
22
+           {{scope.row.project_name}}
24 23
           </template>
25 24
         </el-table-column>
26 25
         <el-table-column label="商品类型" align="center">
27 26
           <template slot-scope="scope">
28
-            <span>{{ scope.row.Count ? scope.row.Count : "" }}</span>
27
+           {{scope.row.project_type}}
29 28
           </template>
30 29
         </el-table-column>
31
-        <el-table-column label="规格&&单位" align="center">
30
+        <el-table-column label="规格" align="center">
32 31
           <template slot-scope="scope">
33
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
32
+             {{scope.row.second_specification_name}}
34 33
           </template>
35 34
         </el-table-column>
36 35
         <el-table-column label="调拨数量" align="center">
37 36
           <template slot-scope="scope">
38
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
37
+            {{scope.row.count}}{{scope.row.sencond_unit}}
39 38
           </template>
40 39
         </el-table-column>
41 40
         <el-table-column label="调出仓库" align="center">
42 41
           <template slot-scope="scope">
43
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
42
+           {{getHouseName(scope.row.storehouse_out_id)}}
44 43
           </template>
45 44
         </el-table-column>
46 45
         <el-table-column label="调入仓库" align="center">
47 46
           <template slot-scope="scope">
48
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
47
+           {{getHouseName(scope.row.storehouse_in_id)}}
49 48
           </template>
50 49
         </el-table-column>
51 50
         <el-table-column label="库存总数" align="center">
52 51
           <template slot-scope="scope">
53
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
52
+            {{scope.row.second_total}}
54 53
           </template>
55 54
         </el-table-column>
56 55
         <el-table-column label="制单人" align="center">
57 56
           <template slot-scope="scope">
58
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
57
+            {{getDocName(warehouse.creater)}}
59 58
           </template>
60 59
         </el-table-column>
61 60
         <el-table-column label="审核人" align="center">
62 61
           <template slot-scope="scope">
63
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
62
+            {{getDocName(warehouse.checker)}}
64 63
           </template>
65 64
         </el-table-column>
66 65
         <el-table-column label="审核时间" align="center">
67 66
           <template slot-scope="scope">
68
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
67
+           <span v-if="warehouse.check_time >0">{{getTimes(warehouse.check_time)}}</span>  
69 68
           </template>
70 69
         </el-table-column>
71 70
         <el-table-column label="备注" align="center">
72 71
           <template slot-scope="scope">
73
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
72
+            <span>{{ scope.row.remake ? scope.row.remake : "" }}</span>
74 73
           </template>
75 74
         </el-table-column>
76 75
       </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>
76
+     
89 77
     </div>
90 78
   </div>
91 79
 </template>
92 80
 
93 81
 <script>
94 82
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
83
+import {getSecondOrderDetailList} from "@/api/seconde";
84
+import { uParseTime } from "@/utils/tools";
95 85
 export default {
96 86
   components: {
97 87
     BreadCrumb,
@@ -116,6 +106,12 @@ export default {
116 106
           { required: true, message: "请选择活动区域", trigger: "change" },
117 107
         ],
118 108
       },
109
+      supplyList: [],
110
+      check_id: 0,
111
+      doctorList: [],
112
+      houseList:[],
113
+      warehouse:{},
114
+      tableList:[],
119 115
     };
120 116
   },
121 117
 
@@ -168,7 +164,71 @@ export default {
168 164
         };
169 165
       }
170 166
     },
167
+       getTimes(time) {
168
+      if (time === "") {
169
+        return "";
170
+      }
171
+      return uParseTime(time, "{y}-{m}-{d}");
172
+    },
173
+    getlist() {
174
+       var id = parseInt(this.$route.query.id)
175
+      getSecondOrderDetailList(id).then((response) => {
176
+        if (response.data.state == 1) {
177
+          var list = response.data.data.list;
178
+          this.tableList = list;
179
+          this.houseList = response.data.data.houseList
180
+          this.doctorList = response.data.data.doctorList
181
+          var warehouse = response.data.data.warehouse
182
+          this.warehouse = warehouse
183
+        }
184
+      });
185
+    },
186
+    getHouseName(id){
187
+      var storehouse_name = ""
188
+      for(let i=0;i<this.houseList.length;i++){
189
+         if(id == this.houseList[i].id){
190
+           storehouse_name = this.houseList[i].storehouse_name
191
+         }
192
+      }
193
+      return storehouse_name
194
+    },
195
+    getDocName(id) {
196
+      var user_name = "";
197
+      for (let i = 0; i < this.doctorList.length; i++) {
198
+        if (id == this.doctorList[i].admin_user_id) {
199
+          user_name = this.doctorList[i].user_name;
200
+        }
201
+      }
202
+      return user_name;
203
+    }
171 204
   },
205
+  created(){
206
+    var now = new Date(); //当前日期
207
+    var nowMonth = now.getMonth(); //当前月
208
+    var nowYear = now.getFullYear(); //当前年
209
+    //本月的开始时间
210
+    var monthStartDate = new Date(nowYear, nowMonth, 1);
211
+    this.start_time = this.getTimes(monthStartDate);
212
+    this.end_time = this.getTimes(new Date());
213
+
214
+    this.org_id = this.$store.getters.xt_user.org_id;
215
+    // var start_time =  window.sessionStorage.getItem('purchase_start_time')
216
+    
217
+    // var end_time =  window.sessionStorage.getItem('purchase_end_time')
218
+  
219
+    // if(start_time !=null){
220
+    //   this.start_time = ""
221
+    //   this.start_time = start_time
222
+    // }
223
+    // if(end_time!=null){
224
+    //   this.end_time = ""
225
+    //   this.end_time = end_time
226
+    // }
227
+    // window.sessionStorage.removeItem('purchase_start_time')
228
+    // window.sessionStorage.removeItem('purchase_end_time')
229
+  
230
+    this.getlist();
231
+  }
172 232
 };
173 233
 </script>
174 234
 

文件差异内容过多而无法显示
+ 1021 - 0
src/xt_pages/stock/inventoryTransfer/transEdit.vue


+ 24 - 12
src/xt_pages/stock/stockBatchNumber.vue 查看文件

@@ -71,6 +71,11 @@
71 71
              <span>{{scope.row.number}} </span>
72 72
            </template>
73 73
         </el-table-column>
74
+        <el-table-column prop="drug_name" label="仓库名称" align="center">
75
+           <template slot-scope="scope">
76
+              <span>{{getHouseName(scope.row.storehouse_id)}}</span>
77
+           </template>
78
+        </el-table-column>
74 79
         <el-table-column prop="drug_name" label="入库数量" align="center">
75 80
            <template slot-scope="scope">
76 81
              <span> {{scope.row.warehousing_count}}{{packing_unit}}</span>
@@ -183,6 +188,7 @@
183 188
         keywords:"",
184 189
         packing_unit:"",
185 190
         cancelCountList:[],
191
+        houseList:[],
186 192
       }
187 193
     },
188 194
     methods:{
@@ -246,16 +252,13 @@
246 252
       getStockInList(params).then(response=>{
247 253
          if(response.data.state == 1){
248 254
            var list = response.data.data.list
249
-           console.log("入库数据",list)
250
-          //  for(let i=0;i<list.length;i++){
251
-          //    list[i].stock_way = 4
252
-          //  }
255
+        
253 256
            this.tableList = list
254 257
            var total = response.data.data.total
255 258
            this.total = total
256
-           console.log("入库数据",this.tableList)
257 259
            var manufacturerList = response.data.data.manufacturerList
258 260
            this.manufacturerList = manufacturerList
261
+           this.houseList = response.data.data.houseList
259 262
          }
260 263
       })
261 264
      },
@@ -269,7 +272,6 @@
269 272
         return count
270 273
      },
271 274
      getOutCount(id){
272
-        console.log("id222",id)
273 275
         var count = ""
274 276
         for(let i=0;i<this.outCountList.length;i++){
275 277
           if(id == this.outCountList[i].good_id){
@@ -309,18 +311,19 @@
309 311
         getStockDrugCount(params).then(response=>{
310 312
           if(response.data.state == 1){
311 313
             var count = response.data.data.count
312
-            console.log("详情入库统计",count)
314
+           
313 315
             this.countList = count
314 316
             var outlist = response.data.data.outList
315
-            console.log("详情出库数量",outlist)
316
-            
317
+           
317 318
             this.outCountList = outlist
318 319
             var autoCount = response.data.data.autoCount
319
-            console.log("详情自动出库",autoCount)
320
+           
320 321
             this.autoCountList = autoCount
321 322
             var totalCount = response.data.data.totalCount
322
-            console.log("totalcount",totalCount)
323
+  
323 324
             this.cancelCountList = totalCount
325
+
326
+           
324 327
           }
325 328
         })
326 329
       },
@@ -332,7 +335,16 @@
332 335
           }
333 336
         }
334 337
        return stock_count
335
-      }
338
+      },
339
+      getHouseName(id){
340
+        var storehouse_name = ""
341
+        for(let i=0;i<this.houseList.length;i++){
342
+          if(id == this.houseList[i].id){
343
+            storehouse_name = this.houseList[i].storehouse_name
344
+          }
345
+        }
346
+        return storehouse_name
347
+     },
336 348
       
337 349
 
338 350
     }

+ 43 - 24
src/xt_pages/stock/stockDamaged.vue 查看文件

@@ -1,6 +1,15 @@
1 1
 <template>
2 2
   <div>
3 3
     <div  style="margin-bottom:10px;">
4
+       <label class="title"><span class="name">仓库</span> :</label>
5
+       <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeHouseList">
6
+          <el-option
7
+            v-for="(option, index) in houseList"
8
+            :key="index"
9
+            :label="option.storehouse_name"
10
+            :value="option.id">
11
+          </el-option>
12
+        </el-select>  
4 13
         <el-input
5 14
         size="small"
6 15
         style="width: 200px;"
@@ -60,6 +69,11 @@
60 69
             {{getAllDamageCount(scope.row.good_id,scope.row.buy_price)}}
61 70
             </template>    
62 71
         </el-table-column>
72
+        <el-table-column prop="date" label="仓库名称"  align="center">
73
+          <template  slot-scope="scope">
74
+            {{getStorehouseName(scope.row.storehouse_id)}}
75
+            </template>    
76
+        </el-table-column>
63 77
         <el-table-column prop="name" label="操作"  align="center">
64 78
           <template  slot-scope="scope">
65 79
             <el-button type="primary" @click="toDamagedDetail(scope.row.good_id)">查看详情</el-button>
@@ -444,6 +458,8 @@ export default {
444 458
             good_name:"",
445 459
             price:0,
446 460
             good_id:0,
461
+            storehouse_id:0,
462
+            houseList:[],
447 463
         }
448 464
     },
449 465
     methods:{
@@ -641,18 +657,23 @@ export default {
641 657
           keyword:this.searchKey,
642 658
           limit:this.limit,
643 659
           page:this.page,
660
+          storehouse_id:this.storehouse_id,
644 661
          }
645 662
        getReportStockList(params).then(response=>{
646 663
           if(response.data.state == 1){
647 664
             var list = response.data.data.list
648
-            console.log("报损金额22222",list)
649 665
             this.total = response.data.data.total
650 666
             this.tableList = list
651 667
            var doctorlist = response.data.data.doctorlist
652 668
            this.doctorList = doctorlist
653 669
            var damageList =  response.data.data.damageList
654
-          
655
-          this.damageList = damageList
670
+           this.damageList = damageList
671
+           var obj = {id:0,storehouse_name:"全部"}
672
+           this.houseList = []
673
+           this.houseList.push(obj)
674
+           for(let i=0;i<response.data.data.houseList.length;i++){
675
+            this.houseList.push(response.data.data.houseList[i])
676
+           }
656 677
           }
657 678
        })   
658 679
       },
@@ -793,30 +814,28 @@ export default {
793 814
       },
794 815
       toQuery(){
795 816
         this.toDamagedDetail(this.good_id)
817
+      },
818
+      getStorehouseName(id){
819
+        var storehouse_name = ""
820
+        for(let i=0;i<this.houseList.length;i++){
821
+          if(id == this.houseList[i].id){
822
+            storehouse_name = this.houseList[i].storehouse_name
823
+          }
824
+        }
825
+        if(storehouse_name == "全部"){
826
+          return ""
827
+        }else{
828
+          return storehouse_name
829
+        }
830
+      },
831
+      changeHouseList(){
832
+        this.houseList = []
833
+        this.getlist()
796 834
       }
797 835
     },
798 836
     created(){
799
-        // var nowDate = new Date();
800
-        // var nowYear = nowDate.getFullYear();
801
-        // var nowMonth = nowDate.getMonth() + 1;
802
-        // var nowDay = nowDate.getDate();
803
-        // this.end_time =
804
-        // nowYear +
805
-        // "-" +
806
-        // (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
807
-        // "-" +
808
-        // (nowDay < 10 ? "0" + nowDay : nowDay);
809
-        // nowDate.setMonth(nowDate.getMonth() - 1);
810
-        // nowYear = nowDate.getFullYear();
811
-        // nowMonth = nowDate.getMonth() + 1;
812
-        // nowDay = nowDate.getDate();
813
-        // this.start_time =
814
-        // nowYear +
815
-        // "-" +
816
-        // (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
817
-        // "-" +
818
-        // (nowDay < 10 ? "0" + nowDay : nowDay);
819
-         this.getlist()
837
+  
838
+       this.getlist()
820 839
     },
821 840
   
822 841
     mounted() {

+ 31 - 20
src/xt_pages/stock/stockFlow.vue 查看文件

@@ -68,6 +68,8 @@
68 68
              <span v-if="scope.row.consumable_type == 7">自动退库</span>
69 69
              <span v-if="scope.row.consumable_type == 10">盘盈</span>
70 70
              <span v-if="scope.row.consumable_type == 11">盘亏</span>
71
+             <span v-if="scope.row.consumable_type == 12">调拨出库</span>
72
+             <span v-if="scope.row.consumable_type == 13">调拨入库</span>
71 73
            </template>
72 74
         </el-table-column>
73 75
         <el-table-column prop="drug_name" label="出/入库单据编码" align="center">
@@ -78,25 +80,26 @@
78 80
             <span v-if="scope.row.consumable_type == 4 || scope.row.consumable_type == 7">{{scope.row.cancel_order_number}}</span>  
79 81
             <span v-if="scope.row.consumable_type == 10">{{scope.row.warehouse_out_order_number}}</span>
80 82
             <span v-if="scope.row.consumable_type == 11">{{scope.row.warehouse_out_order_number}}</span>
83
+            <span v-if="scope.row.consumable_type == 12">{{scope.row.warehouse_out_order_number}}</span>
84
+            <span v-if="scope.row.consumable_type == 13">{{scope.row.warehousing_order}}</span>
81 85
            </template>
82 86
         </el-table-column>
83 87
         <el-table-column prop="drug_name" label="操作日期" align="center">
84 88
            <template slot-scope="scope">
85 89
              {{getTime(scope.row.ctime)}}
86 90
            </template>
91
+        </el-table-column>
92
+        <el-table-column prop="drug_name" label="仓库名称"  align="center">
93
+           <template slot-scope="scope">
94
+             <span>{{getHouseName(scope.row.storehouse_id)}}</span>
95
+           </template>
87 96
         </el-table-column>
88 97
          <el-table-column prop="drug_name" label="数量"  align="center">
89 98
            <template slot-scope="scope">
90 99
              <span>{{scope.row.count}}{{packing_unit}}</span>
91 100
            </template>
92 101
         </el-table-column>
93
-     
94
-       <!-- <el-table-column label="是否退库" align="center">
95
-         <template slot-scope="scope">
96
-           <span v-if="scope.row.is_edit == 2">是</span>
97
-           <span v-if="scope.row.is_edit ==1">否</span>   
98
-         </template>
99
-       </el-table-column> -->
102
+   
100 103
 
101 104
        <!-- <el-table-column label="批次" align="center">
102 105
          <template slot-scope="scope">
@@ -170,10 +173,7 @@
170 173
         (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
171 174
         "-" +
172 175
         (nowDay < 10 ? "0" + nowDay : nowDay);
173
-      // this.getlist()
174
-      // this.getStockOutList()
175
-      // this.getStockDrugCount()
176
-    
176
+      
177 177
       this.getStockFlow()
178 178
       this.packing_unit = this.$route.query.packing_unit
179 179
     },
@@ -220,6 +220,8 @@
220 220
           {id:4,name:"手动退库"},
221 221
           {id:10,name:"盘盈"},
222 222
           {id:11,name:"盘亏"},
223
+          {id:12,name:"调拨出库"},
224
+          {id:13,name:"调拨入库"},
223 225
         ],
224 226
         countList:[],
225 227
         outCountList:[],
@@ -228,7 +230,8 @@
228 230
         obj:{},
229 231
         packing_unit:"",
230 232
         cancelCountList:[],
231
-        good:{}
233
+        good:{},
234
+        houseList:[],
232 235
       }
233 236
     },
234 237
     methods:{
@@ -345,17 +348,17 @@
345 348
       getStockDrugCount(params).then(response=>{
346 349
          if(response.data.state == 1){
347 350
            var count = response.data.data.count
348
-          //  console.log("详情入库统计",count)
351
+         
349 352
            this.countList = count
350 353
            var outlist = response.data.data.outList
351
-          //  console.log("详情出库数量",outlist)
354
+        
352 355
           
353 356
            this.outCountList = outlist
354 357
            var autoCount = response.data.data.autoCount
355
-          //  console.log("详情自动出库",autoCount)
358
+         
356 359
            this.autoCountList = autoCount
357 360
            var totalCount = response.data.data.totalCount
358
-          //  console.log("totalcount",totalCount)
361
+         
359 362
            this.cancelCountList = totalCount
360 363
          }
361 364
       })
@@ -370,7 +373,7 @@
370 373
         return count
371 374
         },
372 375
       getOutCount(id){
373
-        console.log("id222",id)
376
+       
374 377
         var count = ""
375 378
         for(let i=0;i<this.outCountList.length;i++){
376 379
           if(id == this.outCountList[i].good_id){
@@ -429,17 +432,25 @@
429 432
        getStockFlow(params).then(response=>{
430 433
           if(response.data.state == 1){
431 434
             var list =  response.data.data.list
432
-            console.log("list2323",list)
433 435
             var total = response.data.data.total
434
-            console.log("total",total)
435 436
             this.tableList = list
436 437
             this.total = total
437 438
             this.good = response.data.data.good
438 439
            var manufacturerList = response.data.data.manufacturerList
439 440
            this.manufacturerList = manufacturerList
441
+           this.houseList = response.data.data.houseList
440 442
           }
441 443
        })
442
-     }
444
+     },
445
+     getHouseName(id){
446
+        var storehouse_name = ""
447
+        for(let i=0;i<this.houseList.length;i++){
448
+          if(id == this.houseList[i].id){
449
+            storehouse_name = this.houseList[i].storehouse_name
450
+          }
451
+        }
452
+        return storehouse_name
453
+     },
443 454
     }
444 455
   }
445 456
 </script>

+ 75 - 24
src/xt_pages/stock/stockInOrder.vue 查看文件

@@ -15,10 +15,20 @@
15 15
     </div>
16 16
 
17 17
     <div class="app-container">
18
+      
18 19
       <div class="cell clearfix">
20
+        <label class="title"><span class="name">仓库</span> :</label>
21
+        <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeStoreHouse">
22
+            <el-option
23
+              v-for="(option, index) in list"
24
+              :key="index"
25
+              :label="option.storehouse_name"
26
+              :value="option.id">
27
+            </el-option>
28
+        </el-select>
19 29
         <el-input
20 30
           size="small"
21
-          style="width: 400px;"
31
+          style="width: 200px;"
22 32
           v-model.trim="searchKey"
23 33
           class="filter-item"
24 34
           placeholder="单据编码/制单人/耗材名称"
@@ -110,12 +120,25 @@
110 120
           </template>
111 121
         </el-table-column>
112 122
 
123
+       <el-table-column label="仓库名称" align="center">
124
+          <template slot-scope="scope">
125
+            {{getHouseName(scope.row.storehouse_id)}}
126
+          </template>
127
+        </el-table-column>
128
+
113 129
         <el-table-column label="制单人" align="center">
114 130
           <template slot-scope="scope">
115 131
             {{ getXuserName(scope.row.creater) }}
116 132
           </template>
117 133
         </el-table-column>
118 134
 
135
+        <el-table-column label="入库方式" align="center">
136
+          <template slot-scope="scope">
137
+            <span v-if="scope.row.is_sys == 12">调拨入库</span>
138
+            <span v-if="scope.row.is_sys == 0">手动入库</span>
139
+          </template>
140
+        </el-table-column>
141
+
119 142
         <el-table-column label="操作" align="center" width="260px">
120 143
           <template slot-scope="scope">
121 144
             <el-tooltip
@@ -203,6 +226,12 @@
203 226
             {{ scope.row.number}}
204 227
           </template>
205 228
         </el-table-column>
229
+         <el-table-column label="仓库名称" align="center">
230
+          <template slot-scope="scope">
231
+            {{getHouseName(scope.row.storehouse_id)}}
232
+          </template>
233
+        </el-table-column>
234
+
206 235
         <el-table-column label="入库数量" align="center">
207 236
           <template slot-scope="scope">
208 237
             {{ scope.row.warehousing_count}}{{scope.row.GoodInfo.packing_unit}}
@@ -775,6 +804,8 @@ export default {
775 804
       order_id:0,
776 805
       exportList:[],
777 806
       checkAllStatus:false,
807
+      list:[],
808
+      storehouse_id:0,
778 809
     };
779 810
     
780 811
   
@@ -793,7 +824,8 @@ export default {
793 824
         start_time: this.start_time,
794 825
         end_time: this.end_time,
795 826
         type: this.type,
796
-        keywords: this.searchKey
827
+        keywords: this.searchKey,
828
+        storehouse_id:this.storehouse_id,
797 829
       };
798 830
       this.Warehouse.warehouseDate = [];
799 831
       getWarehouseList(Params).then(response => {
@@ -807,6 +839,7 @@ export default {
807 839
           for (let i = 0; i < response.data.data.list.length; i++) {
808 840
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
809 841
           }
842
+        
810 843
         }
811 844
       });
812 845
     },
@@ -816,9 +849,10 @@ export default {
816 849
         limit: this.limit,
817 850
         start_time: this.start_time,
818 851
         end_time: this.end_time,
819
-        type: this.type
852
+        type: this.type,
853
+        storehouse_id:this.storehouse_id,
820 854
       };
821
-      console.log("parasm22222",Params)
855
+
822 856
       this.Warehouse.warehouseDate = [];
823 857
       getWarehouseList(Params).then(response => {
824 858
         if (response.data.state == 0) {
@@ -831,6 +865,13 @@ export default {
831 865
           for (let i = 0; i < response.data.data.list.length; i++) {
832 866
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
833 867
           }
868
+          this.list = []
869
+          var obj = {id:0,storehouse_name:"全部"}
870
+          this.list.push(obj)
871
+          for(let i=0;i<response.data.data.houselist.length;i++){
872
+            this.list.push(response.data.data.houselist[i])
873
+          }
874
+          
834 875
         }
835 876
       });
836 877
     },
@@ -890,7 +931,6 @@ export default {
890 931
     },
891 932
     fetchAllAdminUsers() {
892 933
       fetchAllAdminUsers().then(response => {
893
-        console.log(response);
894 934
         if (response.data.state == 1) {
895 935
           this.adminUserOptions = response.data.data.users;
896 936
           var alen = this.adminUserOptions.length;
@@ -922,8 +962,6 @@ export default {
922 962
       return name;
923 963
     },
924 964
     getTypeNameOne:function(id){
925
-      console.log("999999",this.goodInfo)
926
-     
927 965
       let name = "";
928 966
       for (let i = 0; i < this.goodInfo.length; i++) {
929 967
         if (this.goodInfo[i].id == id) {
@@ -960,7 +998,7 @@ export default {
960 998
       });
961 999
     },
962 1000
     clicks: function() {
963
-      console.log(this.WarehouseInfo.warehouseInfoDate);
1001
+
964 1002
     },
965 1003
     handleWarehouse: function() {
966 1004
       this.$router.push({ path: "/stock/in/add", query: { type: this.type } });
@@ -1038,8 +1076,7 @@ export default {
1038 1076
         } else {
1039 1077
           this.manufacturer = response.data.data.manufacturer;
1040 1078
           this.dealer = response.data.data.dealer;
1041
-          // this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: "全部" });
1042
-          // this.dealer.splice(0, 0, { id: 0, dealer_name: "全部" });
1079
+          // this.list = response.data.data.list
1043 1080
           this.getlist()
1044 1081
         }
1045 1082
       });
@@ -1059,11 +1096,13 @@ export default {
1059 1096
       }
1060 1097
     },
1061 1098
     handleEdit: function(index, row) {
1062
-      console.log("rowe232323232332",row)
1063
-      this.$router.push({path:"/stock/in/order/edit?id="+row.id+"&supply_warehouse_id="+row.supply_warehouse_id})
1099
+      this.$router.push({path:"/stock/in/order/edit?id="+row.id+"&supply_warehouse_id="+row.supply_warehouse_id+"&is_sys="+row.is_sys})
1064 1100
     },
1065 1101
     handleDelete: function(index, row) {
1066
-     
1102
+      if(row.is_sys== 12){
1103
+        this.$message.error("调拨入库数据不能删除!")
1104
+        return false
1105
+      }
1067 1106
       if(row.supply_warehouse_id > 0){
1068 1107
         this.$message.error("采购入库单不能删除!")
1069 1108
         return false
@@ -1107,7 +1146,6 @@ export default {
1107 1146
     },
1108 1147
    
1109 1148
     select(selection) {
1110
-      console.log("selection",selection)
1111 1149
       var ids= []
1112 1150
       for(let i=0;i<selection.length;i++){
1113 1151
         ids.push(selection[i].id)
@@ -1126,10 +1164,13 @@ export default {
1126 1164
       const ids = [];
1127 1165
       const idOne = []
1128 1166
       for (let i = 0; i < this.selectedTableData.length; i++) {
1167
+        if(this.selectedTableData[i].is_sys ==12){
1168
+          this.$message.error("调拨入库数据不能删除!")
1169
+          return false
1170
+        }
1129 1171
         ids.push(this.selectedTableData[i].id);
1130 1172
         idOne.push(this.selectedTableData[i].supply_warehouse_id)
1131 1173
       }
1132
-      console.log("idson23322323",idOne)
1133 1174
       for(let i=0;i<idOne.length;i++){
1134 1175
         if(idOne[i] >0){
1135 1176
           this.$message.error("采购入库数据不能删除!")
@@ -1203,11 +1244,10 @@ export default {
1203 1244
 
1204 1245
             this.recordInfo.recordData.push(response.data.data.info[i]);
1205 1246
             this.tableList.push(response.data.data.info[i])
1206
-            console.log("详情",this.tableList)
1207 1247
           }
1208 1248
            this.warehouse = response.data.data.warehousing;
1209 1249
            this.warehousing_time = this.getTime(this.warehouse.warehousing_time,"{y}-{m}-{d}");
1210
-           console.log("单据日期",this.warehousing_time)
1250
+
1211 1251
           this.WarehouseInfo.warehouse = response.data.data.warehousing;
1212 1252
          
1213 1253
         }
@@ -1336,7 +1376,7 @@ export default {
1336 1376
       this.$refs["tableForm"].validate(valid => {
1337 1377
         if (valid) {
1338 1378
           const array = this.recordInfo.recordData;
1339
-          console.log('array',array)
1379
+
1340 1380
           for (let i = 0; i < array.length; i++) {
1341 1381
             if (array[i].good_type_id == 0) {
1342 1382
               this.$message.error("商品类型不能为空");
@@ -1483,12 +1523,13 @@ export default {
1483 1523
         id:this.order_id,
1484 1524
         start_time:this.start_time,
1485 1525
         end_time:this.end_time,
1526
+        storehouse_id:this.storehouse_id,
1486 1527
       }
1487
-      console.log("params",params)
1528
+     
1488 1529
       getExportStockList(params).then(response=>{
1489 1530
         if(response.data.state == 1){
1490 1531
            var list = response.data.data.list
1491
-           console.log("数据导出222222",list)
1532
+          
1492 1533
            for(let i=0;i<this.goodType.length;i++){
1493 1534
              for(let j=0;j<list.length;j++){
1494 1535
                if(this.goodType[i].id == list[j].good_type_id){
@@ -1506,15 +1547,12 @@ export default {
1506 1547
                   list[i].manufacturer = this.manufacturer[j].manufacturer_name
1507 1548
                }
1508 1549
             }
1509
-           console.log("经销⬆商",this.dealer)
1510 1550
            for(let z=0;z<this.dealer.length;z++){
1511 1551
                if(list[i].dealer == this.dealer[z].id){
1512 1552
                  list[i].dealer = this.dealer[z].dealer_name
1513 1553
                }
1514 1554
             }
1515 1555
           }
1516
-          console.log("表格2222222",this.exportList)
1517
-          
1518 1556
           this.exportList = list
1519 1557
         }
1520 1558
       })
@@ -1545,7 +1583,7 @@ export default {
1545 1583
       const tHeader = ['耗材名称','耗材类型', '规格&单位','批号','入库数量','进货价','总价','生产厂家','生产日期','有效期','经销商','批准文号','备注']
1546 1584
       const filterVal = ['good_name', 'good_type_id', 'unit','number','warehousing_count','price','total_price','manufacturer','product_date','expiry_date','dealer','license_number','remark']
1547 1585
 
1548
-      console.log("table",this.exportList)
1586
+
1549 1587
      
1550 1588
       const data = this.formatJson(filterVal, this.exportList)
1551 1589
       excel.export_json_to_excel({
@@ -1559,6 +1597,19 @@ export default {
1559 1597
     formatJson(filterVal, jsonData) {
1560 1598
     return jsonData.map(v => filterVal.map(j => v[j]));
1561 1599
    },
1600
+   getHouseName(id){
1601
+    var storehouse_name = ""
1602
+    for(let i=0;i<this.list.length;i++){
1603
+        if(id == this.list[i].id){
1604
+          storehouse_name = this.list[i].storehouse_name
1605
+        }
1606
+    }
1607
+    return storehouse_name
1608
+    },
1609
+    changeStoreHouse(){
1610
+      this.GetWarehouse();
1611
+      this.getlist()
1612
+    }
1562 1613
   }
1563 1614
 };
1564 1615
 </script>

+ 24 - 10
src/xt_pages/stock/stockInOrderAdd.vue 查看文件

@@ -20,6 +20,15 @@
20 20
 
21 21
 
22 22
       <div class="cell clearfix">
23
+         <label class="title"><span class="name"><span style="color:red">*</span>仓库</span> :</label>
24
+         <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px">
25
+              <el-option
26
+                v-for="(option, index) in list"
27
+                :key="index"
28
+                :label="option.storehouse_name"
29
+                :value="option.id">
30
+              </el-option>
31
+           </el-select>
23 32
         <label class="title"><span class="name">入库时间</span> : </label>
24 33
         <el-date-picker size="small" v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false"
25 34
                         style="width: 196px;" type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
@@ -378,6 +387,8 @@
378 387
         manufacturerList:[],
379 388
         goodList:[],
380 389
         loading:false,
390
+        list:[],
391
+        storehouse_id:"",
381 392
       }
382 393
     },
383 394
     methods: {
@@ -467,7 +478,8 @@
467 478
             }
468 479
           }
469 480
         })
470
-      }, GetConfigInfo: function() {
481
+      },
482
+      GetConfigInfo: function() {
471 483
         const loading = this.$loading({
472 484
           lock: true,
473 485
           text: 'Loading',
@@ -490,6 +502,8 @@
490 502
             this.dealer.splice(0, 0, { id: -1, dealer_name: '其他' })
491 503
             this.form.manufacturer = 0
492 504
             this.form.dealer = 0
505
+            this.list = response.data.data.list
506
+            this.storehouse_id = response.data.data.configlist.storehouse_info
493 507
           }
494 508
           loading.close()
495 509
 
@@ -660,12 +674,14 @@
660 674
       }
661 675
       ,
662 676
       submit() {
663
-        console.log("res23322332",this.$refs)
664 677
         this.$refs['tableForm'].validate((valid) => {
665 678
           if (valid) {
666 679
             this.loading = true
667 680
             const array = this.recordInfo.recordData
668
-            console.log("array9999999",array)
681
+            if(this.storehouse_id == 0){
682
+              this.$message.error("仓库不能为空!")
683
+              return
684
+            }
669 685
             for (let i = 0; i < array.length; i++) {
670 686
               if (array[i].good_type_id == 0) {
671 687
                 this.$message.error('商品类型不能为空')
@@ -679,6 +695,7 @@
679 695
               this.$message.success('请添加入库商品')
680 696
               return
681 697
             }
698
+
682 699
             for(let i=0;i<this.recordInfo.recordData.length;i++){
683 700
              if(this.recordInfo.recordData[i].dealer == ""){
684 701
                 this.recordInfo.recordData[i].dealer = 0
@@ -707,9 +724,8 @@
707 724
             const params = {
708 725
               'stockIn': this.recordInfo.recordData
709 726
             }
710
-            console.log("stockIn",this.recordInfo.recordData)
711
-            
712
-            postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
727
+           
728
+            postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type,this.storehouse_id).then(response => {
713 729
               if (response.data.state == 0) {
714 730
                 this.loading = false
715 731
                 this.$message.error(response.data.msg)
@@ -778,7 +794,6 @@
778 794
         this.currentIndex = val
779 795
       },
780 796
       handleSelect(val){
781
-         console.log("val3232232323",val)
782 797
          for(let i=0;i<this.recordInfo.recordData.length;i++){
783 798
            if(this.currentIndex == i){
784 799
               this.recordInfo.recordData[i].good_type_id = val.id
@@ -812,7 +827,8 @@
812 827
              
813 828
            }
814 829
          }
815
-      }
830
+      },
831
+   
816 832
     }
817 833
     ,
818 834
     created() {
@@ -846,8 +862,6 @@
846 862
       this.recordInfo.recordData.push(tempObj)
847 863
       this.GetConfigInfo()
848 864
       this.propForm.goodUnit = this.$store.getters.good_unit
849
-
850
-      console.log("单位",this.getDataConfig('hemodialysis','units'))
851 865
     }
852 866
 
853 867
   }

+ 37 - 7
src/xt_pages/stock/stockInOrderEdit.vue 查看文件

@@ -34,6 +34,15 @@
34 34
       ></stock-in-dialog>
35 35
 
36 36
       <div class="cell clearfix">
37
+         <label class="title"><span class="name"><span style="color:red">*</span>仓库</span> :</label>
38
+         <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" :disabled="true">
39
+              <el-option
40
+                v-for="(option, index) in list"
41
+                :key="index"
42
+                :label="option.storehouse_name"
43
+                :value="option.id">
44
+              </el-option>
45
+          </el-select>
37 46
         <label class="title"><span class="name">入库时间</span> : </label>
38 47
         <el-date-picker
39 48
           size="small"
@@ -402,6 +411,8 @@ export default {
402 411
       numberList:[],
403 412
       loading:false,
404 413
       disabled:false,
414
+      storehouse_id:0,
415
+      list:[],
405 416
     };
406 417
   },
407 418
   methods: {
@@ -468,6 +479,7 @@ export default {
468 479
           this.dealer = response.data.data.dealer;
469 480
           this.goodType = response.data.data.goodType;
470 481
           this.goodInfo = response.data.data.goodInfo;
482
+          this.list = response.data.data.list
471 483
           // this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: "全部" });
472 484
           // this.dealer.splice(0, 0, { id: 0, dealer_name: "全部" });
473 485
         }
@@ -497,6 +509,11 @@ export default {
497 509
         this.$message.error("采购入库数据不能新增!")
498 510
         return false
499 511
       }
512
+      
513
+      if(parseInt(this.$route.query.is_sys) >0){
514
+        this.$message.error("调拨入库数据不能新增!")
515
+        return false
516
+      }
500 517
       const tempObj = {};
501 518
       tempObj["id"] = 0;
502 519
       tempObj["good_type_id"] = 0;
@@ -514,6 +531,10 @@ export default {
514 531
       this.recordInfo.recordData.push(tempObj);
515 532
     },
516 533
     handleDelete: function(index, row) {
534
+      if(parseInt(this.$route.query.is_sys) >0){
535
+        this.$message.error("调拨入库数据不能删除!")
536
+        return false
537
+      }
517 538
       if(row.supply_warehouse_id >0){
518 539
         this.$message.error("采购入库数据不能删除!")
519 540
         return false
@@ -629,6 +650,10 @@ export default {
629 650
         if (valid) {
630 651
           this.loading = true
631 652
           const array = this.recordInfo.recordData;
653
+          if(this.storehouse_id == 0){
654
+            this.$message.error("仓库不能为空!")
655
+            return
656
+          }    
632 657
           for (let i = 0; i < array.length; i++) {
633 658
             if (array[i].good_type_id == 0) {
634 659
               this.$message.error("商品类型不能为空");
@@ -661,7 +686,7 @@ export default {
661 686
           const params = {
662 687
             stockIn: this.recordInfo.recordData
663 688
           };
664
-          console.log("params2222",params)
689
+          
665 690
           const loading = this.$loading({
666 691
             lock: true,
667 692
             text: 'Loading',
@@ -674,7 +699,8 @@ export default {
674 699
             this.$route.query.id,
675 700
             this.$route.query.type,
676 701
             this.form.manufacturer,
677
-            this.form.dealer
702
+            this.form.dealer,
703
+            this.storehouse_id,
678 704
           ).then(response => {
679 705
             if (response.data.state == 0) {
680 706
               this.loading =false
@@ -697,13 +723,13 @@ export default {
697 723
       const params = {
698 724
         id: order_id
699 725
       };
700
-      console.log("parm2222222222",params)
726
+
701 727
       getWarehouseInfoList(params).then(response => {
702 728
         if (response.data.state == 0) {
703 729
           this.$message.error(response.data.msg);
704 730
           return false;
705 731
         } else {
706
-          console.log("列表2222222",response.data.data.info)
732
+        
707 733
          
708 734
           for (let i = 0; i < response.data.data.info.length; i++) {
709 735
             response.data.data.info[i].product_date = this.getTime(
@@ -729,12 +755,12 @@ export default {
729 755
            
730 756
             this.recordInfo.recordData.push(response.data.data.info[i]);
731 757
            
732
-            console.log("列表",this.recordInfo.recordData)
758
+           
733 759
           }
734 760
 
735 761
           this.warehouse = response.data.data.warehousing;
736
-          console.log("jhhahfhh",this.warehouse)
737
- 
762
+          this.storehouse_id = response.data.data.warehousing[0].storehouse_id
763
+       
738 764
           this.warehousing_time = this.getTime(
739 765
             this.warehouse[0].warehousing_time,
740 766
             "{y}-{m}-{d}"
@@ -835,9 +861,13 @@ export default {
835 861
     this.propForm.goodUnit = this.$store.getters.good_unit;
836 862
     const order_id = this.$route.query.id;
837 863
     var supply_warehouse_id =  parseInt(this.$route.query.supply_warehouse_id)  
864
+    var is_sys = parseInt(this.$route.query.is_sys)
838 865
     if(supply_warehouse_id > 0){
839 866
       this.disabled = true
840 867
     }
868
+    if(is_sys == 12){
869
+      this.disabled = true
870
+    }
841 871
     this.GetOrderDetail(order_id);
842 872
 
843 873
   }

+ 73 - 10
src/xt_pages/stock/stockOutOrder.vue 查看文件

@@ -14,9 +14,18 @@
14 14
     </div>
15 15
     <div class="app-container">
16 16
       <div class="cell clearfix">
17
+        <label class="title"><span class="name">仓库</span> :</label>
18
+        <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeStoreHouse">
19
+            <el-option
20
+              v-for="(option, index) in houselist"
21
+              :key="index"
22
+              :label="option.storehouse_name"
23
+              :value="option.id">
24
+            </el-option>
25
+        </el-select> 
17 26
         <el-input
18 27
           size="small"
19
-          style="width: 400px;"
28
+          style="width: 200px;"
20 29
           class="filter-item"
21 30
           v-model.trim="searchKey"
22 31
           placeholder="单据编码/制单人/耗材名称"
@@ -103,6 +112,12 @@
103 112
             {{ scope.row.warehouse_out_order_number }}
104 113
           </template>
105 114
         </el-table-column>
115
+       
116
+        <el-table-column label="仓库名称" align="center">
117
+          <template slot-scope="scope">
118
+            {{getHouseName(scope.row.storehouse_id)}}
119
+          </template>
120
+        </el-table-column>
106 121
 
107 122
         <el-table-column label="制单人" align="center">
108 123
           <template slot-scope="scope">
@@ -114,6 +129,7 @@
114 129
           <template slot-scope="scope">
115 130
             <span v-if="scope.row.is_sys == 1">自动出库</span>
116 131
             <span v-if="scope.row.is_sys == 0">手动出库</span>
132
+            <span v-if="scope.row.is_sys == 12">调拨出库</span>
117 133
           </template>
118 134
         </el-table-column>
119 135
        
@@ -197,6 +213,12 @@
197 213
               {{ scope.row.social_security_directory_code}}
198 214
             </template>
199 215
           </el-table-column>
216
+
217
+          <el-table-column label="仓库名称" align="center">
218
+            <template slot-scope="scope">
219
+              {{getHouseName(scope.row.storehouse_id)}}
220
+            </template>
221
+          </el-table-column>
200 222
          
201 223
           <el-table-column label="出库数量" align="center">
202 224
             <template slot-scope="scope">
@@ -204,6 +226,11 @@
204 226
               <span v-if="scope.row.is_sys == 1">{{getOutStockCount(scope.row.good_id)}}{{scope.row.packing_unit}}</span> 
205 227
             </template>
206 228
           </el-table-column>
229
+          <el-table-column label="出库对象" align="center" v-if="is_sys== 0">
230
+            <template slot-scope="scope">
231
+             {{getXuserName(scope.row.admin_user_id)}}
232
+            </template>
233
+          </el-table-column>
207 234
           <el-table-column label="出货价" align="center">
208 235
             <template slot-scope="scope">
209 236
               <span v-if="scope.row.price >0">{{ scope.row.price}}</span> 
@@ -788,7 +815,11 @@ export default {
788 815
       exportList:[],
789 816
       is_sys:0,
790 817
       infoList:[],
791
-      stockFlowList:[]
818
+      stockFlowList:[],
819
+      list:[],
820
+      houselist:[],
821
+      storehouse_id:0,
822
+      is_sys:0,
792 823
     };
793 824
   },
794 825
   methods: {
@@ -799,7 +830,8 @@ export default {
799 830
         start_time: this.start_time,
800 831
         end_time: this.end_time,
801 832
         type: this.type,
802
-        keywords: this.searchKey
833
+        keywords: this.searchKey,
834
+        storehouse_id:this.storehouse_id,
803 835
       };
804 836
       this.warehouseOutDate = [];
805 837
       getWarehouseOutList(Params).then(response => {
@@ -826,7 +858,8 @@ export default {
826 858
         limit: this.limit,
827 859
         start_time: this.start_time,
828 860
         end_time: this.end_time,
829
-        type: this.type
861
+        type: this.type,
862
+        storehouse_id:this.storehouse_id,
830 863
       };
831 864
       this.warehouseOutDate = [];
832 865
       getWarehouseOutList(Params).then(response => {
@@ -834,14 +867,18 @@ export default {
834 867
           this.$message.error(response.data.msg);
835 868
           return false;
836 869
         } else {
837
-          console.log("parsm",response.data.data)
838
-          
870
+         
839 871
           this.total = response.data.data.total;
840 872
           for (let i = 0; i < response.data.data.list.length; i++) {
841 873
             
842 874
             this.warehouseOutDate.push(response.data.data.list[i]);
843 875
           }
844
-          console.log("2222222",this.warehouseOutDate)
876
+          var obj = {id:0,storehouse_name:"全部"}
877
+          this.houselist = []
878
+          this.houselist.push(obj)
879
+          for(let i=0;i<response.data.data.houselist.length;i++){
880
+            this.houselist.push(response.data.data.houselist[i])
881
+          }
845 882
         }
846 883
       });
847 884
     },
@@ -933,6 +970,7 @@ export default {
933 970
           this.dealer = response.data.data.dealer;
934 971
           this.goodInfo = response.data.data.goodInfo
935 972
           this.goodType = response.data.data.goodType
973
+          this.list = response.data.data.list
936 974
           // this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: "全部" });
937 975
           // this.dealer.splice(0, 0, { id: 0, dealer_name: "全部" });
938 976
           this.getlist()
@@ -958,7 +996,10 @@ export default {
958 996
        
959 997
     },
960 998
     handleDelete: function(index, row) {
961
-     
999
+      if(row.is_sys == 12){
1000
+        this.$message.error("调拨出库数据不能删除!")
1001
+        return false
1002
+      }
962 1003
       if(row.supply_cancel_out_id >0){
963 1004
         this.$message.error("采购出库数据不能删除!")
964 1005
         return false
@@ -1034,6 +1075,10 @@ export default {
1034 1075
         if(this.selectedTableData[i].is_sys == 1){
1035 1076
           this.$message.error("自动出库数据不能删除!")
1036 1077
           return false
1078
+        }
1079
+        if(this.selectedTableData[i].is_sys ==12){
1080
+          this.$message.error("调拨出库数据不能删除!")
1081
+          return false
1037 1082
         }
1038 1083
          if(this.selectedTableData[i].is_sys == 0){
1039 1084
            ids.push(this.selectedTableData[i].id);
@@ -1075,15 +1120,16 @@ export default {
1075 1120
               }
1076 1121
             }
1077 1122
           });
1078
-        })
1079
-        .catch(() => {});
1123
+        }).catch(() => {});
1080 1124
     },
1081 1125
 
1082 1126
 
1083 1127
     handleSearch(val){
1128
+      this.is_sys = val.is_sys
1084 1129
       this.tableList = []
1085 1130
       this.editdialogVisibleThree = false
1086 1131
       this.GetOrderDetailOne(val.id)
1132
+
1087 1133
       this.GetTotalCount(val.warehouse_out_time)
1088 1134
     },
1089 1135
   
@@ -1678,6 +1724,23 @@ export default {
1678 1724
      }
1679 1725
      arr = this.unique(arr)
1680 1726
      return arr.join(',')
1727
+   },
1728
+   getHouseName(id){
1729
+    var storehouse_name = ""
1730
+    for(let i=0;i<this.houselist.length;i++){
1731
+        if(id == this.houselist[i].id){
1732
+          storehouse_name = this.houselist[i].storehouse_name
1733
+        }
1734
+    }
1735
+    if(storehouse_name == "全部"){
1736
+      return ""
1737
+    }else{
1738
+       return storehouse_name
1739
+    }
1740
+   
1741
+   },
1742
+   changeStoreHouse(){
1743
+     this.GetWarehouseOut()
1681 1744
    }
1682 1745
   }
1683 1746
 };

+ 58 - 18
src/xt_pages/stock/stockOutOrderAdd.vue 查看文件

@@ -37,6 +37,15 @@
37 37
 
38 38
 
39 39
       <div class="cell clearfix">
40
+         <label class="title"><span class="name"><span style="color:red">*</span>仓库</span> :</label>
41
+         <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px">
42
+              <el-option
43
+                v-for="(option, index) in list"
44
+                :key="index"
45
+                :label="option.storehouse_name"
46
+                :value="option.id">
47
+              </el-option>
48
+         </el-select>
40 49
         <label class="title"><span class="name">出库时间</span> : </label>
41 50
         <el-date-picker
42 51
           size="small"
@@ -140,6 +149,19 @@
140 149
             </template>
141 150
           </el-table-column>
142 151
 
152
+          <el-table-column label="出库对象"  width="150" align="center">
153
+            <template slot-scope="scope">
154
+               <el-select size="small" v-model="scope.row.admin_user_id" filterable placeholder="请选择出库对象">
155
+                <el-option
156
+                  v-for="(option, index) in doctorList"
157
+                  :key="index"
158
+                  :label="option.user_name"
159
+                  :value="option.admin_user_id">
160
+                </el-option>
161
+               </el-select>
162
+            </template>   
163
+          </el-table-column>
164
+
143 165
           <el-table-column  width="150" align="center">
144 166
             <template slot="header" slot-scope="scope">
145 167
               <span>出货单价<span style="color: red">*</span></span>
@@ -339,6 +361,9 @@ export default {
339 361
       goodList:[],
340 362
       manufacturerList:[],
341 363
       numberList:[],
364
+      storehouse_id:"",
365
+      list:[],
366
+      doctorList:[],
342 367
     };
343 368
   },
344 369
   methods: {
@@ -347,7 +372,7 @@ export default {
347 372
       this.propForm.goods = []
348 373
 
349 374
       this.$refs.dialog.hide()
350
-      console.log(val)
375
+    
351 376
       if (val.selectedGoodInfo.length > 0) {
352 377
         for (let i = val.selectedGoodInfo.length - 1; i >= 0; i--) {
353 378
           if (i == 0) {
@@ -401,7 +426,9 @@ export default {
401 426
           this.dealer.splice(0, 0, { id: 0, dealer_name: '全部' })
402 427
           this.manufacturer.splice(0, 0, { id: -1, manufacturer_name: '其他' })
403 428
           this.dealer.splice(0, 0, { id: -1, dealer_name: '其他' })
404
-
429
+          this.list = response.data.data.list
430
+          this.storehouse_id = response.data.data.configlist.storehouse_out_info
431
+          this.doctorList =  response.data.data.doctorList
405 432
         }
406 433
       });
407 434
     },
@@ -446,6 +473,7 @@ export default {
446 473
       tempObj["product_date"] = ""
447 474
       tempObj["license_number"] = ""
448 475
       tempObj["warehouse_info_id"] = 0
476
+      tempObj["admin_user_id"] = this.$store.getters.xt_user.user.user_name
449 477
       this.recordInfo.recordData.push(tempObj);
450 478
     },
451 479
     handleDelete: function(index, row) {
@@ -530,7 +558,7 @@ export default {
530 558
             this.propForm.goods.push(goodObj)
531 559
 
532 560
           }
533
-          console.log( this.propForm.goods)
561
+       
534 562
         }
535 563
       )
536 564
 
@@ -573,6 +601,7 @@ export default {
573 601
            
574 602
              this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
575 603
           }
604
+       
576 605
           for(let i=0;i<this.recordInfo.recordData.length;i++){
577 606
             for(let j=0;j<this.manufacturerList.length;j++){
578 607
               if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
@@ -590,10 +619,19 @@ export default {
590 619
                    this.recordInfo.recordData[i].number = this.numberList[y].number
591 620
                }
592 621
             }
622
+            
623
+            for(let s=0;s<this.doctorList.length;s++){
624
+
625
+              if(this.recordInfo.recordData[i].admin_user_id == this.doctorList[s].user_name){
626
+                this.recordInfo.recordData[i].admin_user_id = this.doctorList[s].admin_user_id
627
+              }
628
+
629
+            }
593 630
           }
594 631
           const params = {
595 632
             stockOut: this.recordInfo.recordData
596 633
           };
634
+        
597 635
           const loading = this.$loading({
598 636
             lock: true,
599 637
             text: 'Loading',
@@ -605,7 +643,8 @@ export default {
605 643
             this.warehouse_out_time,
606 644
             this.form.dealer,
607 645
             this.form.manufacturer,
608
-            this.type
646
+            this.type,
647
+            this.storehouse_id
609 648
           ).then(response => {
610 649
             if (response.data.state == 0) {
611 650
               this.$message.error("库存不足")
@@ -615,7 +654,8 @@ export default {
615 654
                var msg = response.data.data.msg
616 655
                var good_name = response.data.data.good_name
617 656
                var specification_name = response.data.data.specification_name
618
-               var str = good_name +"*" + specification_name +"无库存,请入库"
657
+               var storehose_name = response.data.data.storehose_name
658
+               var str = storehose_name + " " + good_name +"*" + specification_name +"无库存,请入库"
619 659
              
620 660
                if(msg == 1){
621 661
                   this.$message.error(str)
@@ -646,11 +686,11 @@ export default {
646 686
       if (keyword != undefined) {
647 687
         key = keyword
648 688
       }
649
-      console.log("keyrowrd",key)
689
+
650 690
       postSearchGoodList(key).then(response => {
651 691
         if (response.data.state == 1) {
652 692
             var list = response.data.data.list
653
-            console.log("33334445555",list)
693
+          
654 694
             this.goodList = list
655 695
             var manufacturerList = response.data.data.manufacturerList
656 696
             this.manufacturerList = manufacturerList
@@ -681,14 +721,14 @@ export default {
681 721
       this.currentIndex = val
682 722
     },
683 723
     handleSelect(val){
684
-       
724
+       console.log("val232323",val)
685 725
         var arr = []
686 726
         for(let i=0;i<this.recordInfo.recordData.length;i++){
687 727
            arr.push(this.recordInfo.recordData[i].good_id)
688 728
         }
689 729
        
690 730
         var str = arr.join(",")
691
-        console.log("str",str,"good_id",val.id)
731
+       
692 732
         if(str.indexOf(val.id)!=-1){
693 733
           this.$message.error("该耗材已存在列表中")
694 734
           return
@@ -703,6 +743,7 @@ export default {
703 743
             this.recordInfo.recordData[i].name = val.specification_name +"/"+val.packing_unit
704 744
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
705 745
             this.recordInfo.recordData[i].remark = val.remark
746
+          
706 747
             if(val.packing_price == 0){
707 748
               this.recordInfo.recordData[i].price =""
708 749
             }else{
@@ -729,7 +770,7 @@ export default {
729 770
       getStockBatchNumber(params).then(response=>{
730 771
         if(response.data.state == 1){
731 772
           var list = response.data.data.list
732
-          console.log("list2243444",list)
773
+ 
733 774
           this.numberList = list
734 775
         }
735 776
      })
@@ -738,19 +779,17 @@ export default {
738 779
       return getDataConfig(module, filed_name)
739 780
     },
740 781
     changeNumberList(val,index){
741
-
742 782
        for(let i=0;i<this.recordInfo.recordData.length;i++){
743
-        //  if(val.good_id == this.recordInfo.recordData[i].good_id){
744
-        //     this.recordInfo.recordData[i].warehouse_info_id = val.number
745
-        //  }
746 783
          if(index == i){
747 784
           this.recordInfo.recordData[i].warehouse_info_id = val.number
748 785
          }
749 786
        }  
750
-      console.log("表格",this.recordInfo.recordData)
751
-    }
787
+    
788
+    },
789
+    
752 790
   },
753 791
   created() {
792
+   
754 793
     var nowDate = new Date();
755 794
     var nowYear = nowDate.getFullYear();
756 795
     var nowMonth = nowDate.getMonth() + 1;
@@ -773,12 +812,13 @@ export default {
773 812
     tempObj["dealer"] = ""
774 813
     tempObj["license_number"] = ""
775 814
     tempObj["warehouse_info_id"] = 0
776
-    
815
+    tempObj["admin_user_id"] = this.$store.getters.xt_user.user.user_name
777 816
     this.recordInfo.recordData.push(tempObj);
778 817
     this.GetConfigInfo();
818
+  
779 819
     this.propForm.goodUnit = this.$store.getters.good_unit;
780 820
     this.unitList =  getDataConfig('hemodialysis','units')
781
-    console.log("单位",this.unitList)
821
+ 
782 822
   }
783 823
 };
784 824
 </script>

+ 105 - 53
src/xt_pages/stock/stockOutOrderEdit.vue 查看文件

@@ -13,7 +13,7 @@
13 13
 
14 14
     <div class="app-container">
15 15
 
16
-  
16
+
17 17
       <stock-in-dialog
18 18
         ref="dialog"
19 19
         :propForm="propForm"
@@ -24,6 +24,15 @@
24 24
       </stock-in-dialog>
25 25
 
26 26
       <div class="cell clearfix">
27
+         <label class="title"><span class="name"><span style="color:red">*</span>仓库</span> :</label>
28
+         <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" :disabled="true">
29
+              <el-option
30
+                v-for="(option, index) in storelist"
31
+                :key="index"
32
+                :label="option.storehouse_name"
33
+                :value="option.id">
34
+              </el-option>
35
+         </el-select>
27 36
         <label class="title"><span class="name">出库时间</span> : </label>
28 37
         <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :disabled="stockShow"
29 38
                         style="width: 200px;"
@@ -32,7 +41,7 @@
32 41
       </div>
33 42
 
34 43
 
35
-    
44
+
36 45
 
37 46
 
38 47
 
@@ -41,7 +50,7 @@
41 50
                   max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
42 51
         >
43 52
 
44
-       
53
+
45 54
           <el-table-column width="200" align="center">
46 55
               <template slot="header" slot-scope="scope">
47 56
                 <span>耗材名称</span>
@@ -60,7 +69,7 @@
60 69
                       @input="changeGoodName(scope.$index)"
61 70
                       style="width:150px;"
62 71
                       :disabled="stockShow"
63
-                      
72
+
64 73
                     >
65 74
                       <i class="el-icon-search el-input__icon" slot="suffix"></i>
66 75
                     <template slot-scope="{ item }">
@@ -86,8 +95,8 @@
86 95
               </el-form-item>
87 96
             </template>
88 97
           </el-table-column>
89
-          
90
-             
98
+
99
+
91 100
           <el-table-column width="140" align="center">
92 101
             <template slot="header" slot-scope="scope">
93 102
               <span>规格&单位<span style="color: red">*</span></span>
@@ -116,13 +125,13 @@
116 125
               </el-form-item>
117 126
             </template>
118 127
           </el-table-column> -->
119
-         
128
+
120 129
           <el-table-column width="150" align="center">
121 130
             <template slot="header" slot-scope="scope">
122 131
               <span>单价<span style="color: red">*</span></span>
123 132
             </template>
124 133
             <template slot-scope="scope">
125
-         
134
+
126 135
               <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price'
127 136
                             style="padding-top: 17px">
128 137
                 <el-input type="number" v-model="scope.row.price"  :disabled="stockShow"></el-input>
@@ -144,6 +153,19 @@
144 153
             </template>
145 154
           </el-table-column>
146 155
 
156
+          <el-table-column label="出库对象"  width="150" align="center">
157
+            <template slot-scope="scope">
158
+               <el-select size="small" v-model="scope.row.admin_user_id" filterable placeholder="请选择厂商"  :disabled="stockShow">
159
+                <el-option
160
+                  v-for="(option, index) in doctorList"
161
+                  :key="index"
162
+                  :label="option.user_name"
163
+                  :value="option.admin_user_id">
164
+                </el-option>
165
+               </el-select>
166
+            </template>
167
+          </el-table-column>
168
+
147 169
           <el-table-column label="总价" width="150" align="center">
148 170
             <template slot-scope="scope">
149 171
               {{calculate(scope.row.price*scope.row.count)}}
@@ -159,7 +181,7 @@
159 181
                   :value="option.id">
160 182
                 </el-option>
161 183
                </el-select>
162
-            </template>   
184
+            </template>
163 185
           </el-table-column>
164 186
          <el-table-column label="生产日期"  width="150" align="center">
165 187
            <template slot-scope="scope">
@@ -190,7 +212,7 @@
190 212
               ></el-date-picker>
191 213
             </template>
192 214
           </el-table-column>
193
-          
215
+
194 216
         <el-table-column  width="150" align="center">
195 217
             <template slot="header" slot-scope="scope">
196 218
             <span>批准文号<span style="color: red"></span></span>
@@ -210,7 +232,7 @@
210 232
                   :value="option.id">
211 233
                 </el-option>
212 234
                </el-select>
213
-            </template>   
235
+            </template>
214 236
           </el-table-column>
215 237
 
216 238
           <el-table-column label="备注" width="150" align="center">
@@ -322,7 +344,9 @@
322 344
         numberList:[],
323 345
         stockShow:false,
324 346
         stockTrue:true,
325
-       
347
+        storelist:[],
348
+        storehouse_id:"",
349
+        doctorList:[],
326 350
       }
327 351
     },
328 352
     methods: {
@@ -364,7 +388,7 @@
364 388
         this.propForm.goods = [];
365 389
 
366 390
         this.propForm.goodType = [];
367
-      }, 
391
+      },
368 392
       GetConfigInfo: function() {
369 393
         const loading = this.$loading({
370 394
           lock: true,
@@ -400,11 +424,15 @@
400 424
           }
401 425
         }
402 426
         return name;
403
-      }, 
427
+      },
404 428
       handleEdit: function(index, row) {
429
+       if(parseInt(this.$route.query.is_sys) == 12){
430
+         this.$message.error("调拨出库数据不能新增!")
431
+          return
432
+       }
405 433
        if(row.supply_cancel_out_id >0){
406 434
           this.$message.error("采购出库数据不能新增!")
407
-          return 
435
+          return
408 436
         }
409 437
         this.stockTrue = false
410 438
         if(this.stockShow == true){
@@ -422,15 +450,19 @@
422 450
         tempObj['license_number'] = ""
423 451
         tempObj['dealer'] = ""
424 452
         tempObj['manufacturer'] = ""
453
+        tempObj["admin_user_id"] = this.$store.getters.xt_user.user.user_name
425 454
         this.recordInfo.recordData.push(tempObj)
426
-      }, 
455
+      },
427 456
       handleDelete: function(index, row) {
428
-      
457
+       if(parseInt(this.$route.query.is_sys) == 12){
458
+         this.$message.error("调拨出库数据不能删除!")
459
+          return
460
+       }
429 461
         if(row.supply_cancel_out_id >0){
430 462
           this.$message.error("采购出库数据不能删除!")
431
-          return 
463
+          return
432 464
         }
433
- 
465
+
434 466
         if(this.stockShow == true){
435 467
          this.$message.error("自动出库数据无法删除")
436 468
          return
@@ -534,7 +566,7 @@
534 566
         this.$router.go(-1)
535 567
       },
536 568
        submit() {
537
-       
569
+
538 570
         this.$refs['tableForm'].validate((valid) => {
539 571
           if (valid) {
540 572
             const array = this.recordInfo.recordData
@@ -554,12 +586,12 @@
554 586
              }
555 587
               if(this.recordInfo.recordData[i].expiry_date == "" || this.recordInfo.recordData[i].expiry_date == undefined){
556 588
                 this.recordInfo.recordData[i].expiry_date = ""
557
-              } 
589
+              }
558 590
               if(this.recordInfo.recordData[i].product_date == "" || this.recordInfo.recordData[i].product_date == undefined){
559 591
                 this.recordInfo.recordData[i].product_date = ""
560 592
               }
561 593
                this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
562
-            
594
+
563 595
               for(let j=0;j<this.manufacturerList.length;j++){
564 596
                 if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
565 597
                   this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].id
@@ -571,11 +603,20 @@
571 603
                 }
572 604
               }
573 605
 
574
-            for(let y=0;y<this.numberList.length;y++){
606
+             for(let y=0;y<this.numberList.length;y++){
575 607
                if(this.recordInfo.recordData[i].number == this.numberList[y].id){
576 608
                    this.recordInfo.recordData[i].number = this.numberList[y].number
577 609
                }
578 610
              }
611
+
612
+
613
+              for(let s=0;s<this.doctorList.length;s++){
614
+
615
+                if(this.recordInfo.recordData[i].admin_user_id == this.doctorList[s].user_name){
616
+                  this.recordInfo.recordData[i].admin_user_id = this.doctorList[s].admin_user_id
617
+                }
618
+
619
+              }
579 620
             }
580 621
               const loading = this.$loading({
581 622
                 lock: true,
@@ -587,11 +628,12 @@
587 628
               'warehouse_out_time':this.warehouse_out_time,
588 629
               'stockOut': this.recordInfo.recordData,
589 630
               "warehout_id":parseInt(this.$route.query.id),
631
+              "storehouse_id":parseInt(this.storehouse_id),
590 632
             }
591
-           
592
-            console.log("stockout",params,this.$route.query.id)
633
+
634
+
593 635
             var warehout_id = parseInt(this.$route.query.id)
594
-            editWarehouseoutInfo(params, this.warehouse_out_time, warehout_id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
636
+            editWarehouseoutInfo(params, this.warehouse_out_time, warehout_id, this.$route.query.type, this.form.manufacturer, this.form.dealer,this.storehouse_id).then(response => {
595 637
               if (response.data.state == 0) {
596 638
                 this.$message.error(response.data.msg)
597 639
                 loading.close()
@@ -611,7 +653,7 @@
611 653
                   var good_name = response.data.data.good_name
612 654
                   var specification_name = response.data.data.specification_name
613 655
                   var str = good_name +"*" + specification_name +"无库存,请入库"
614
-                
656
+
615 657
                   if(msg == 7){
616 658
                     this.$message.error(str)
617 659
                   }
@@ -626,7 +668,7 @@
626 668
             return false
627 669
           }
628 670
         })
629
-      }, 
671
+      },
630 672
      calculate: function(val) {
631 673
         if (val == 0) {
632 674
           return ''
@@ -642,10 +684,10 @@
642 684
       if (keyword != undefined) {
643 685
         key = keyword
644 686
       }
645
-      console.log("keyrowrd",key)
687
+
646 688
       postSearchGoodList(key).then(response => {
647 689
         if (response.data.state == 1) {
648
-          
690
+
649 691
             var list = response.data.data.list
650 692
             this.goodList = list
651 693
             var manufacturerList = response.data.data.manufacturerList
@@ -662,7 +704,7 @@
662 704
                 }
663 705
               }
664 706
             }
665
-          
707
+
666 708
             cb(this.goodList)
667 709
         } else {
668 710
           cb([])
@@ -678,7 +720,7 @@
678 720
            arr.push(this.recordInfo.recordData[i].good_id)
679 721
         }
680 722
         var str = arr.join(",")
681
-        console.log("str",str,"good_id",val.id)
723
+
682 724
         if(str.indexOf(val.id)!=-1){
683 725
           this.$message.error("该耗材已存在列表中")
684 726
           return
@@ -699,7 +741,7 @@
699 741
             }else{
700 742
                this.recordInfo.recordData[i].price = val.packing_price
701 743
             }
702
-           
744
+
703 745
             this.recordInfo.recordData[i].specification_name = val.specification_name
704 746
             this.recordInfo.recordData[i].good_id = val.id
705 747
              if(val.dealer == 0){
@@ -707,7 +749,7 @@
707 749
              }else{
708 750
                this.recordInfo.recordData[i].dealer = val.dealer
709 751
              }
710
-           
752
+
711 753
          }
712 754
       }
713 755
     },
@@ -724,15 +766,16 @@
724 766
         }
725 767
       getSingleOutOrderDetail(params).then(response=>{
726 768
         if(response.data.state == 1){
727
-         
769
+
728 770
           var dealerList = response.data.data.dealerList
729 771
           this.dealerList = dealerList
730 772
           var manufacturerList = response.data.data.manufacturerList
731
-         
773
+
732 774
           this.manufacturerList = manufacturerList
733 775
           this.goodType = response.data.data.goodType
776
+          this.doctorList = response.data.data.doctorlist
734 777
           for (let i = 0; i < response.data.data.list.length; i++) {
735
-           
778
+
736 779
             response.data.data.list[i].price = response.data.data.list[i].price.toString()
737 780
             response.data.data.list[i].count = response.data.data.list[i].count.toString()
738 781
             response.data.data.list[i].good_name = response.data.data.list[i].good_name
@@ -741,6 +784,7 @@
741 784
             response.data.data.list[i].expiry_date = this.getTime(response.data.data.list[i].expiry_date,"{y}-{m}-{d}")
742 785
             response.data.data.list[i].product_date = this.getTime(response.data.data.list[i].product_date,"{y}-{m}-{d}")
743 786
             response.data.data.list[i].remark = response.data.data.list[i].remark
787
+
744 788
             if(response.data.data.list[i].dealer == 0){
745 789
                response.data.data.list[i].dealer = ""
746 790
             }
@@ -749,6 +793,9 @@
749 793
             }
750 794
             this.recordInfo.recordData.push(response.data.data.list[i])
751 795
           }
796
+          this.storelist = response.data.data.storelist
797
+          this.warehouse_out_time = this.getTime(response.data.data.out.warehouse_out_time,"{y}-{m}-{d}")
798
+          this.storehouse_id = response.data.data.out.storehouse_id
752 799
           loading.close();
753 800
         }
754 801
       })
@@ -760,34 +807,36 @@
760 807
         getStockBatchNumber(params).then(response=>{
761 808
           if(response.data.state == 1){
762 809
             var list = response.data.data.list
763
-           
810
+
811
+
764 812
             this.numberList = list
765 813
           }
766 814
        })
767 815
       },
768 816
      changeNumberList(val,index){
769
-       
817
+
818
+
770 819
        for(let i=0;i<this.recordInfo.recordData.length;i++){
771 820
          if(index == i){
772 821
             this.recordInfo.recordData[i].warehouse_info_id = val.number
773 822
          }
774
-       }  
775
-      console.log("表格",this.recordInfo.recordData)
823
+       }
824
+
776 825
      }
777 826
     },
778 827
     created() {
779
-      var nowDate = new Date();
780
-      var nowYear = nowDate.getFullYear();
781
-      var nowMonth = nowDate.getMonth() + 1;
782
-      var nowDay = nowDate.getDate();
783
-      this.warehouse_out_time =
784
-        nowYear +
785
-        "-" +
786
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
787
-        "-" +
788
-        (nowDay < 10 ? "0" + nowDay : nowDay);
828
+      // var nowDate = new Date();
829
+      // var nowYear = nowDate.getFullYear();
830
+      // var nowMonth = nowDate.getMonth() + 1;
831
+      // var nowDay = nowDate.getDate();
832
+      // this.warehouse_out_time =
833
+      //   nowYear +
834
+      //   "-" +
835
+      //   (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
836
+      //   "-" +
837
+      //   (nowDay < 10 ? "0" + nowDay : nowDay);
789 838
       this.propForm.goodUnit = this.$store.getters.good_unit
790
-      const order_id = this.$route.query.id  
839
+      const order_id = this.$route.query.id
791 840
       this.getSingleOutOrderDetail(order_id)
792 841
       var is_sys = this.$route.query.is_sys
793 842
       if(is_sys == 0){
@@ -796,10 +845,13 @@
796 845
       if(is_sys == 1){
797 846
         this.stockShow = true
798 847
       }
848
+      if(is_sys == 12){
849
+        this.stockShow = true
850
+      }
799 851
       if(parseInt(this.$route.query.supply_cancel_out_id) >0){
800 852
         this.stockShow = true
801 853
       }
802
-      
854
+
803 855
     }
804 856
 
805 857
   }

文件差异内容过多而无法显示
+ 535 - 640
src/xt_pages/stock/stockQuery.vue


+ 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>

+ 0 - 2
src/xt_pages/supply/components/addGoodOrder.vue 查看文件

@@ -1213,8 +1213,6 @@ export default {
1213 1213
     checkGoodOrder() {
1214 1214
       var id = this.warese_out_id;
1215 1215
       var warehousing_id = this.id;
1216
-      console.log("采购单ID",id)
1217
-      console.log("采购订单ID",warehousing_id)
1218 1216
       this.loading = true
1219 1217
       getGoodOrderCountList(id, warehousing_id).then((response) => {
1220 1218
         if (response.data.state == 1) {

+ 2 - 2
src/xt_pages/supply/components/editGoodReturn.vue 查看文件

@@ -1004,7 +1004,7 @@ export default {
1004 1004
       this.payment = this.total_price - this.arrearage;
1005 1005
     },
1006 1006
     getSupplyCount(supply_count,sum_count,supply_unit,type,min_number,max_unit,min_unit,index){
1007
-     console.log("val23322323",supply_count,sum_count,supply_unit,type,min_number,max_unit,min_unit)
1007
+      console.log("sum_count2323232",sum_count)
1008 1008
       var total_count = 0
1009 1009
       
1010 1010
       if(type == 1){
@@ -1159,7 +1159,7 @@ export default {
1159 1159
                 // orderInfo[i].count = this.getTotalStockCountTwo(goodList[j].good_warehouse_info);
1160 1160
                // orderInfo[i].supply_total = this.getTotalStockCountTwo(goodList[j].good_warehouse_info);
1161 1161
               }
1162
-              orderInfo[i].sum_count = orderInfo[i].count
1162
+              orderInfo[i].sum_count = orderInfo[i].sum_count
1163 1163
               orderInfo[i].min_number = 0
1164 1164
               orderInfo[i].count = orderInfo[i].count;
1165 1165
               orderInfo[i].supply_total = orderInfo[i].supply_total

+ 2 - 1
src/xt_pages/supply/purchaseOrderQuery.vue 查看文件

@@ -103,9 +103,10 @@
103 103
         </el-table-column>
104 104
         <el-table-column label="关联采购单号" align="center" width="150">
105 105
           <template slot-scope="scope">
106
+            
106 107
             <tr style="background: none;" v-for="(item,index) in scope.row.orderOut" :key="index">
107 108
                  <td style="border-right: none;">{{item.good_number}}</td>
108
-              </tr>
109
+             </tr>
109 110
           </template>
110 111
         </el-table-column>
111 112
         <el-table-column label="采购金额" align="center">

+ 1 - 0
src/xt_pages/supply/supplyQuery.vue 查看文件

@@ -201,6 +201,7 @@ export default {
201 201
       tableList: [],
202 202
       tyep_name: "",
203 203
       sType: [],
204
+     
204 205
     };
205 206
   },
206 207
 

+ 16 - 3
src/xt_pages/user/components/PatientDetail.vue 查看文件

@@ -264,6 +264,14 @@
264 264
                   </el-checkbox>
265 265
                 </el-checkbox-group>
266 266
               </el-form-item>
267
+
268
+              <el-form-item label="疑难内瘘:">
269
+
270
+                <el-radio-group v-model="form.troble_shoot" disabled>
271
+                  <el-radio :label="1">是</el-radio>
272
+                  <el-radio :label="2">否</el-radio>
273
+                </el-radio-group>
274
+              </el-form-item>
267 275
             </el-col>
268 276
 
269 277
             <!--<el-col :span="16" >-->
@@ -1080,7 +1088,8 @@ const defaultForm = {
1080 1088
   expense_kind: "",
1081 1089
   contact_name: "",
1082 1090
   sch_remark:"",
1083
-  org_id:0
1091
+  org_id:0,
1092
+  troble_shoot:"",
1084 1093
 };
1085 1094
 
1086 1095
 export default {
@@ -1169,7 +1178,11 @@ export default {
1169 1178
           { required: true, message: "请填写身份证号", trigger: "blur" }
1170 1179
         ],
1171 1180
         birth: [{ required: true, message: "请填写生日", trigger: "blur" }]
1172
-      }
1181
+      },
1182
+      shootList:[
1183
+       {id:1,name:"是"},
1184
+       {id:2,name:"否"}
1185
+      ]
1173 1186
     };
1174 1187
   },
1175 1188
   computed: {
@@ -1263,7 +1276,7 @@ export default {
1263 1276
             this.form.dialysisNo = patietInfo.dialysis_no;
1264 1277
             this.form.gender = patietInfo.gender;
1265 1278
             this.form.is_infectious = patietInfo.is_infectious;
1266
-           
1279
+            this.form.troble_shoot = patietInfo.troble_shoot
1267 1280
             // this.form.record_date = patietInfo.is_infectious
1268 1281
             this.form.response_result = patietInfo.response_result;
1269 1282
             this.form.remind_cycle = patietInfo.remind_cycle;

+ 14 - 23
src/xt_pages/user/components/PatientForm.vue 查看文件

@@ -281,7 +281,7 @@
281 281
                 </el-form-item>
282 282
               </el-col>
283 283
 
284
-              <el-col :span="8">
284
+              <el-col :span="8" style="margin-bottom: 20px;">
285 285
                 <el-form-item
286 286
                   label="备注 : "
287 287
                   prop="sch_remark">
@@ -314,7 +314,7 @@
314 314
                 </el-form-item>
315 315
               </el-col>
316 316
 
317
-              <el-col :span="8">
317
+              <el-col :span="24">
318 318
                 <el-form-item label="传染病 : " prop="contagions">
319 319
                   <el-radio-group v-model="form.is_infectious" @change="changeInfectious">
320 320
                     <el-radio :label="1">阴性</el-radio>
@@ -335,30 +335,17 @@
335 335
                     >
336 336
                   </el-checkbox-group>
337 337
                 </el-form-item>
338
+
338 339
               </el-col>
339 340
               
340
-              <!-- <el-col :span="8">
341
+              <el-col :span="8">
341 342
                 <el-form-item label="疑难内瘘 : " prop="contagions">
342
-                  <el-radio-group v-model="form.is_infectious" @change="changeInfectious">
343
-                    <el-radio :label="1">是</el-radio>
344
-                    <el-radio :label="2">否</el-radio>
345
-                  </el-radio-group>
346
-                  <el-checkbox-group
347
-                    v-model="form.contagions"
348
-                    v-if="form.is_infectious == '2'"
349
-                  >
350
-                    <el-checkbox
351
-                      v-for="item in contagionList"
352
-                      v-if="item.type == 2"
353
-                      :label="item.id"
354
-                      :key="item.id"
355
-                      name="contagions"
356
-                      :value="item.id"
357
-                      >{{ item.name }}</el-checkbox
358
-                    >
359
-                  </el-checkbox-group>
343
+                 <el-radio-group v-model="form.troble_shoot">
344
+                      <el-radio :label="1">是</el-radio>
345
+                      <el-radio :label="2">否</el-radio>
346
+                    </el-radio-group>
360 347
                 </el-form-item>
361
-              </el-col> -->
348
+              </el-col>
362 349
 
363 350
               <el-col :span="16" v-if="!isEdit">
364 351
                 <el-form-item label="检查结果日期 : ">
@@ -1005,7 +992,7 @@ const defaultForm = {
1005 992
   expense_kind: "",
1006 993
   contact_name: "",
1007 994
   user_sys_before_count: "",
1008
-
995
+  troble_shoot:2,
1009 996
   formItem: [
1010 997
     {
1011 998
       id: 0,
@@ -1438,6 +1425,7 @@ export default {
1438 1425
           if (this.isEdit) {
1439 1426
             this.form.age = parseInt(this.form.age);
1440 1427
             this.form.user_sys_before_count = this.form.user_sys_before_count.toString();
1428
+            this.form.troble_shoot = parseInt(this.form.troble_shoot)
1441 1429
             if(this.form.avatar.indexOf('?imageView2/2/w/500/h/500/q/90')!=-1){
1442 1430
                this.form.avatar = this.form.avatar
1443 1431
             }else{
@@ -1475,6 +1463,7 @@ export default {
1475 1463
               });
1476 1464
           } else {
1477 1465
             this.form.age = parseInt(this.form.age);
1466
+            this.form.troble_shoot = parseInt(this.form.troble_shoot)
1478 1467
             createPatient(this.form)
1479 1468
               .then(response => {
1480 1469
                 if (response.data.state == 0) {
@@ -1735,6 +1724,8 @@ export default {
1735 1724
               this.form.expense_kind = patietInfo.expense_kind;
1736 1725
             }
1737 1726
 
1727
+            this.form.troble_shoot = patietInfo.troble_shoot
1728
+
1738 1729
             this.form.first_treatment_date = uParseTime(
1739 1730
               patietInfo.first_treatment_date,
1740 1731
               "{y}-{m}-{d}"

+ 1 - 3
src/xt_pages/user/doctorAdvice.vue 查看文件

@@ -182,8 +182,7 @@
182 182
           <template slot-scope="scope">
183 183
             <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
184 184
               <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
185
-                {{ scope.row.advice_name
186
-                }}<i class="el-icon-arrow-down el-icon--right"></i>
185
+                {{ scope.row.advice_name}}<i class="el-icon-arrow-down el-icon--right"></i>
187 186
               </span>
188 187
 
189 188
               <el-dropdown-menu slot="dropdown">
@@ -3390,7 +3389,6 @@ export default {
3390 3389
             }
3391 3390
           });
3392 3391
           let list = Object.values(dataInfo);
3393
-          // console.log("list", list);
3394 3392
           list.map(item => {
3395 3393
             for (let i = 0; i < advice.length; i++) {
3396 3394
               if (

+ 6 - 6
src/xt_pages/workforce/remind_print_setting.vue 查看文件

@@ -36,8 +36,8 @@
36 36
                    <span>{{getAnticoagulant(main_collection.dialysissolution.mode_id)}}</span>
37 37
                   </span>
38 38
                 </div>
39
-               <div v-if="org_id == 10188">首剂:{{main_collection.dialysissolution.anticoagulant_shouji}}</div>
40
-                <div v-if="org_id == 10188">维持:{{main_collection.dialysissolution.anticoagulant_weichi}}</div>
39
+               <div v-if="org_id == 10188 || org_id == 10217">首剂:{{main_collection.dialysissolution.anticoagulant_shouji}}</div>
40
+                <div v-if="org_id == 10188 || org_id == 10217">维持:{{main_collection.dialysissolution.anticoagulant_weichi}}</div>
41 41
                 <div v-if="printObj.anticoagulant_zongliang == 1">
42 42
                   用量:
43 43
                   <span v-if="main_collection.dialysissolution.anticoagulant == 1">
@@ -74,9 +74,9 @@
74 74
                     {{main_collection.dialysissolution.anticoagulant_zongliang}}iu
75 75
                    </span>
76 76
                 </div>
77
-                <div v-if="org_id == 10188">干体重:{{main_collection.assessmentbefor.dry_weight}}</div>
78
-                <div v-if="org_id == 10188">透前体重:{{main_collection.assessmentbefor.weight_before}}</div>
79
-                <div v-if="org_id == 10188">体重增加:{{(main_collection.assessmentbefor.weight_before - main_collection.assessmentbefor.dry_weight).toFixed(2)}}</div>
77
+                <div v-if="org_id == 10188 || org_id == 10217">干体重:{{main_collection.assessmentbefor.dry_weight}}</div>
78
+                <div v-if="org_id == 10188 || org_id == 10217">透前体重:{{main_collection.assessmentbefor.weight_before}}</div>
79
+                <div v-if="org_id == 10188 || org_id == 10217">体重增加:{{(main_collection.assessmentbefor.weight_before - main_collection.assessmentbefor.dry_weight).toFixed(2)}}</div>
80 80
                 <div>用法:静脉注射</div>
81 81
                 <div>打印时间:{{currentDate}}</div>
82 82
               </div>
@@ -294,7 +294,7 @@
294 294
       printAction: function() {
295 295
         const style = '@media print {.signPrint{margin-left:30px;} .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } .printCell span{display: inline-block;width: 180px;} @page {margin-top:10px;}}'
296 296
         const style1 = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } .printCell span{display: inline-block;width: 170px;} @page {margin-top:10px;}}'
297
-        if(this.org_id == 10188){
297
+        if(this.org_id == 10188 || this.org_id == 10217){
298 298
           printJS({
299 299
             printable: 'print_content',
300 300
             type: 'html',