Kaynağa Gözat

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

csx 2 yıl önce
ebeveyn
işleme
090278a743
87 değiştirilmiş dosya ile 14531 ekleme ve 2239 silme
  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 Dosyayı Görüntüle

35
   return request({
35
   return request({
36
     url: '/api/dataupload/config/get',
36
     url: '/api/dataupload/config/get',
37
     method: 'get',
37
     method: 'get',
38
-    params:params
38
+    params: params
39
   })
39
   })
40
 }
40
 }
41
 
41
 
43
   return request({
43
   return request({
44
     url: '/api/dataupload/is_docking/get',
44
     url: '/api/dataupload/is_docking/get',
45
     method: 'get',
45
     method: 'get',
46
-    params:params
46
+    params: params
47
 
47
 
48
   })
48
   })
49
 }
49
 }
50
 
50
 
51
-
52
-
53
-
54
-
55
 export function getAllSystemPrescription() {
51
 export function getAllSystemPrescription() {
56
   return request({
52
   return request({
57
     url: '/api/systemprescription/all',
53
     url: '/api/systemprescription/all',
58
-    method: 'get',
54
+    method: 'get'
59
   })
55
   })
60
 }
56
 }
61
 
57
 
62
-
63
 export function getSystemPrescription(params) {
58
 export function getSystemPrescription(params) {
64
   return request({
59
   return request({
65
     url: '/api/systemprescription/get',
60
     url: '/api/systemprescription/get',
66
     method: 'get',
61
     method: 'get',
67
-    params:params
62
+    params: params
68
 
63
 
69
   })
64
   })
70
 }
65
 }
71
 
66
 
72
-
73
 export function postSystemPrescription(params) {
67
 export function postSystemPrescription(params) {
74
-  console.log("params2222222",params)
68
+  console.log('params2222222', params)
75
   return request({
69
   return request({
76
     url: '/api/systemprescription/commit',
70
     url: '/api/systemprescription/commit',
77
     method: 'post',
71
     method: 'post',
80
   })
74
   })
81
 }
75
 }
82
 
76
 
83
-
84
-export function updateSystemPrescription(id,params) {
77
+export function updateSystemPrescription(id, params) {
85
   return request({
78
   return request({
86
-    url: '/api/systemprescription/update?id='+id,
79
+    url: '/api/systemprescription/update?id=' + id,
87
     method: 'post',
80
     method: 'post',
88
     data: params
81
     data: params
89
 
82
 
90
   })
83
   })
91
 }
84
 }
92
 
85
 
93
-
94
 export function getOrgs() {
86
 export function getOrgs() {
95
   return request({
87
   return request({
96
     url: '/api/public/orgs',
88
     url: '/api/public/orgs',
97
-    method: 'get',
89
+    method: 'get'
98
   })
90
   })
99
 }
91
 }
100
 
92
 
101
-
102
-
103
 export function changeOrg(params) {
93
 export function changeOrg(params) {
104
   return request({
94
   return request({
105
     url: '/api/org/change',
95
     url: '/api/org/change',
106
     method: 'post',
96
     method: 'post',
107
-    params:params,
97
+    params: params
108
   })
98
   })
109
 }
99
 }
110
 
100
 
111
-
112
-
113
 export function generateLog(params) {
101
 export function generateLog(params) {
114
   return request({
102
   return request({
115
     url: '/api/log/generate',
103
     url: '/api/log/generate',
116
     method: 'get',
104
     method: 'get',
117
-    params:params,
105
+    params: params
118
   })
106
   })
119
 }
107
 }
120
 
108
 
121
-
122
-
123
 export function getAllIsOpenInit() {
109
 export function getAllIsOpenInit() {
124
   return request({
110
   return request({
125
     url: '/api/isopen/init',
111
     url: '/api/isopen/init',
126
-    method: 'get',
112
+    method: 'get'
127
   })
113
   })
128
 }
114
 }
129
 
115
 
130
-
131
 export function postXtHisIsOpen(params) {
116
 export function postXtHisIsOpen(params) {
132
   return request({
117
   return request({
133
     url: '/api/xtconfig/isopen',
118
     url: '/api/xtconfig/isopen',
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
   return request({
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
   return request({
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
   return request({
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
   return request({
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
   return request({
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
   return request({
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
   return request({
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 Dosyayı Görüntüle

1
 import request from '@/utils/request'
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
   return request({
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
     method: 'post',
6
     method: 'post',
7
     data: params
7
     data: params
8
   })
8
   })
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
   return request({
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
     method: 'post',
78
     method: 'post',
79
     data: params
79
     data: params
80
   })
80
   })
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
   return request({
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
     method: 'post',
191
     method: 'post',
192
     data: params
192
     data: params
193
   })
193
   })
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
   return request({
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
     method: 'post',
279
     method: 'post',
280
     data: params
280
     data: params
281
   })
281
   })
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
   return request({
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
     method: 'post',
295
     method: 'post',
296
     data: params
296
     data: params
297
   })
297
   })
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
   return request({
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
     method: 'post',
327
     method: 'post',
328
     data: params
328
     data: params
329
   })
329
   })

+ 97 - 0
src/api/seconde.js Dosyayı Görüntüle

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 Dosyayı Görüntüle

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
   return request({
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
     method: 'post',
207
     method: 'post',
208
     data: params
208
     data: params
209
   })
209
   })
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
   return request({
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
     method: 'post',
279
     method: 'post',
280
     data: params
280
     data: params
281
   })
281
   })
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
   return request({
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
     method: 'post',
392
     method: 'post',
393
     data: params
393
     data: params
394
   })
394
   })
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
   return request({
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
     method: 'post',
480
     method: 'post',
481
     data: params
481
     data: params
482
   })
482
   })
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
   return request({
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
     method: 'post',
528
     method: 'post',
529
     data: params
529
     data: params
530
   })
530
   })
779
 }
779
 }
780
 
780
 
781
 export function getReportStockList(params) {
781
 export function getReportStockList(params) {
782
-  console.log('params', params)
783
   return request({
782
   return request({
784
     url: '/api/stock/getreportstocklist',
783
     url: '/api/stock/getreportstocklist',
785
     method: 'get',
784
     method: 'get',
978
     params: params
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 Dosyayı Görüntüle

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

+ 6 - 2
src/lang/zh.js Dosyayı Görüntüle

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

+ 7 - 2
src/router/modules/hisTool.js Dosyayı Görüntüle

34
       component: () => import('@/xt_pages/outpatientRecord/outpatientRecord'),
34
       component: () => import('@/xt_pages/outpatientRecord/outpatientRecord'),
35
       name: 'outpatientSickRecord',
35
       name: 'outpatientSickRecord',
36
       meta: { title: 'outpatientSickRecord', noCache: true }
36
       meta: { title: 'outpatientSickRecord', noCache: true }
37
-    },{
37
+    }, {
38
       path: '/hisTool/summary',
38
       path: '/hisTool/summary',
39
       component: () => import('@/xt_pages/outpatientTool/summary'),
39
       component: () => import('@/xt_pages/outpatientTool/summary'),
40
       name: 'outpatientSickRecord',
40
       name: 'outpatientSickRecord',
63
       name: 'statistics',
63
       name: 'statistics',
64
       meta: { title: 'statistics', noCache: true }
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 Dosyayı Görüntüle

372
         title: '调拨详情',
372
         title: '调拨详情',
373
         noCache: true
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 Dosyayı Görüntüle

32
             <p style="margin-top:20px;">门诊处方项目同步到透析医嘱:
32
             <p style="margin-top:20px;">门诊处方项目同步到透析医嘱:
33
                 <el-switch v-model="is_open_xt_his_project" @change="changeFuncProject"></el-switch>
33
                 <el-switch v-model="is_open_xt_his_project" @change="changeFuncProject"></el-switch>
34
             </p>
34
             </p>
35
+            <p style="margin-top:20px;">耗材先出库再执行:
36
+                <el-switch v-model="is_open_is_type" @change="changeFuncType"></el-switch>
37
+            </p>
35
         </div>
38
         </div>
36
 
39
 
37
 
40
 
87
 
90
 
88
 <script>
91
 <script>
89
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
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
 export default {
95
 export default {
93
   name: "printTemplate",
96
   name: "printTemplate",
105
       is_open_order:false,
108
       is_open_order:false,
106
       is_open_print:false,
109
       is_open_print:false,
107
       is_open_xt_his_project: false,
110
       is_open_xt_his_project: false,
111
+      is_open_is_type:false,
108
     };
112
     };
109
   },
113
   },
110
   methods: {
114
   methods: {
126
               this.is_open_xt_his_project = false
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
           } else {
139
           } else {
130
             this.$message.error(response.data.msg)
140
             this.$message.error(response.data.msg)
131
           }
141
           }
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 Dosyayı Görüntüle

94
             filterable
94
             filterable
95
             placeholder="请选择"
95
             placeholder="请选择"
96
             @change="changeProject"
96
             @change="changeProject"
97
+            
97
           >
98
           >
98
             <el-option
99
             <el-option
99
               v-for="item in projectList"
100
               v-for="item in projectList"
249
         }
250
         }
250
       }
251
       }
251
     },
252
     },
252
-    changeProject() {
253
+    changeProject(val) {
254
+      console.log("i23232323323",val.id)
253
       this.form.number = 1;
255
       this.form.number = 1;
254
     },
256
     },
255
     querySearch(queryString, cb) {
257
     querySearch(queryString, cb) {
270
       };
272
       };
271
     },
273
     },
272
     handleSelect(val) {
274
     handleSelect(val) {
275
+      console.log("val3223322323232323",val)
273
       this.project_name = val.project_name;
276
       this.project_name = val.project_name;
274
       this.form.project_detail = val.id;
277
       this.form.project_detail = val.id;
275
     },
278
     },
405
       });
408
       });
406
     },
409
     },
407
     addProjectList() {
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
         for (let i = 0; i < this.projectList.length; i++) {
419
         for (let i = 0; i < this.projectList.length; i++) {
413
           if (this.form.project_detail == this.projectList[i].new_id) {
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
     DeleteProject(id, index) {
431
     DeleteProject(id, index) {
448
       this.$confirm("确认删除此项目吗?", "删除", {
432
       this.$confirm("确认删除此项目吗?", "删除", {
449
         confirmButtonText: "确 定",
433
         confirmButtonText: "确 定",

+ 15 - 0
src/xt_pages/data/components/editInspection.vue Dosyayı Görüntüle

347
         return name
347
         return name
348
       },
348
       },
349
       addProjectList() {
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
         for (let i = 0; i < this.projectList.length; i++) {
365
         for (let i = 0; i < this.projectList.length; i++) {
351
           if (this.form.project_detail == this.projectList[i].new_id) {
366
           if (this.form.project_detail == this.projectList[i].new_id) {
352
             this.projectList[i].number = this.form.number
367
             this.projectList[i].number = this.form.number

+ 248 - 155
src/xt_pages/dialysis/PatientBox.vue Dosyayı Görüntüle

20
             alt=""
20
             alt=""
21
           />
21
           />
22
           <div>
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
           </div>
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
           <!-- <div style="height:24px;margin-right: 10px;">
86
           <!-- <div style="height:24px;margin-right: 10px;">
52
             <div class="online" v-show="computeState(schedule) != 4">
87
             <div class="online" v-show="computeState(schedule) != 4">
53
               <p :class="stateColor(schedule)">{{ stateText(schedule) }}</p>
88
               <p :class="stateColor(schedule)">{{ stateText(schedule) }}</p>
57
         </div>
92
         </div>
58
       </div>
93
       </div>
59
       <div class="dislysisInfo">
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
         </p>
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
         </p>
157
         </p>
73
       </div>
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
         <ul>
164
         <ul>
76
           <li>
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
             {{ timeTypeText(schedule) }}
169
             {{ timeTypeText(schedule) }}
79
           </li>
170
           </li>
80
           <li>
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
             {{ schedule.device_number.number }}
175
             {{ schedule.device_number.number }}
83
           </li>
176
           </li>
84
           <li>
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
               schedule.mode_id &&
182
               schedule.mode_id &&
88
               $store.getters.treatment_mode[schedule.mode_id]
183
               $store.getters.treatment_mode[schedule.mode_id]
126
       :last_prescription="lastDialysisPrescribe"
221
       :last_prescription="lastDialysisPrescribe"
127
       :dry_weight="lastDryWeightDislysis"
222
       :dry_weight="lastDryWeightDislysis"
128
       :schedual="temp_schedual"
223
       :schedual="temp_schedual"
129
-      :date='date'
224
+      :date="date"
130
       :stockType="stockType"
225
       :stockType="stockType"
131
     ></dialysis-prescription-dialog>
226
     ></dialysis-prescription-dialog>
132
     <treatment-summary-dialog
227
     <treatment-summary-dialog
139
 </template>
234
 </template>
140
 
235
 
141
 <script>
236
 <script>
142
-
143
 import { parseTime } from "@/utils";
237
 import { parseTime } from "@/utils";
144
 import { jsGetAge } from "@/utils/tools";
238
 import { jsGetAge } from "@/utils/tools";
145
 import dialysisPrescriptionDialog from "../dialysis/details/dialog/dialysisPrescriptionDialog";
239
 import dialysisPrescriptionDialog from "../dialysis/details/dialog/dialysisPrescriptionDialog";
151
 
245
 
152
 export default {
246
 export default {
153
   name: "PatientBox",
247
   name: "PatientBox",
154
-  components:{
248
+  components: {
155
     dialysisPrescriptionDialog,
249
     dialysisPrescriptionDialog,
156
-    treatmentSummaryDialog
250
+    treatmentSummaryDialog,
157
   },
251
   },
158
   data() {
252
   data() {
159
     return {
253
     return {
163
           yc: false,
257
           yc: false,
164
           name: "张三",
258
           name: "张三",
165
           sex: "女",
259
           sex: "女",
166
-          age: 90
260
+          age: 90,
167
         },
261
         },
168
         {
262
         {
169
           state: 3,
263
           state: 3,
170
           yc: true,
264
           yc: true,
171
           name: "张三",
265
           name: "张三",
172
           sex: "女",
266
           sex: "女",
173
-          age: 90
267
+          age: 90,
174
         },
268
         },
175
         {
269
         {
176
           state: 4,
270
           state: 4,
177
           yc: true,
271
           yc: true,
178
           name: "张三",
272
           name: "张三",
179
           sex: "女",
273
           sex: "女",
180
-          age: 90
274
+          age: 90,
181
         },
275
         },
182
         {
276
         {
183
           state: 1,
277
           state: 1,
184
           yc: true,
278
           yc: true,
185
           name: "张三",
279
           name: "张三",
186
           sex: "女",
280
           sex: "女",
187
-          age: 90
188
-        }
281
+          age: 90,
282
+        },
189
       ],
283
       ],
190
       //
284
       //
191
       longAdvices: [],
285
       longAdvices: [],
236
       headNurses: [],
330
       headNurses: [],
237
       lastDialysisPrescribe: { id: 0 },
331
       lastDialysisPrescribe: { id: 0 },
238
       temp_schedual: null,
332
       temp_schedual: null,
239
-      date:'',
240
-      modedata:0,
241
-      stockType:[],
333
+      date: "",
334
+      modedata: 0,
335
+      stockType: [],
242
     };
336
     };
243
   },
337
   },
244
   props: {
338
   props: {
245
     schedules: {
339
     schedules: {
246
-      type: Array
340
+      type: Array,
247
     },
341
     },
248
-    patientStateVal:Number
342
+    patientStateVal: Number,
249
   },
343
   },
250
- 
344
+
251
   methods: {
345
   methods: {
252
-    stateColor: function(schedual) {
346
+    stateColor: function (schedual) {
253
       var state = this.computeState(schedual);
347
       var state = this.computeState(schedual);
254
       if (state == 1) {
348
       if (state == 1) {
255
         return "blue";
349
         return "blue";
261
         return "blue";
355
         return "blue";
262
       }
356
       }
263
     },
357
     },
264
-    functionColor: function(schedual) {
358
+    functionColor: function (schedual) {
265
       var state = this.computeState(schedual);
359
       var state = this.computeState(schedual);
266
       if (state == 1 || state == 3) {
360
       if (state == 1 || state == 3) {
267
         return "blue";
361
         return "blue";
271
         return "blue";
365
         return "blue";
272
       }
366
       }
273
     },
367
     },
274
-    borderColor: function(schedual) {
368
+    borderColor: function (schedual) {
275
       var yc = this.isAbnormal(schedual);
369
       var yc = this.isAbnormal(schedual);
276
       if (yc == true) {
370
       if (yc == true) {
277
         return "red";
371
         return "red";
279
         return "gray";
373
         return "gray";
280
       }
374
       }
281
     },
375
     },
282
-    stateText: function(schedual) {
376
+    stateText: function (schedual) {
283
       var state = this.computeState(schedual);
377
       var state = this.computeState(schedual);
284
       if (state == 1) {
378
       if (state == 1) {
285
         return "已上机";
379
         return "已上机";
292
         return "未上机";
386
         return "未上机";
293
       }
387
       }
294
     },
388
     },
295
-    computeState: function(schedual) {
389
+    computeState: function (schedual) {
296
       if (schedual.dialysis_order == null) {
390
       if (schedual.dialysis_order == null) {
297
         // 未上机
391
         // 未上机
298
         return 4;
392
         return 4;
311
       }
405
       }
312
     },
406
     },
313
 
407
 
314
-    orderState: function(schedual) {
408
+    orderState: function (schedual) {
315
       if (schedual.dialysis_order == null) {
409
       if (schedual.dialysis_order == null) {
316
         // 未上机
410
         // 未上机
317
         return 4;
411
         return 4;
329
         return 1;
423
         return 1;
330
       }
424
       }
331
     },
425
     },
332
-    isAbnormal: function(schedual) {
426
+    isAbnormal: function (schedual) {
333
       return false; // schedual.yc;
427
       return false; // schedual.yc;
334
     },
428
     },
335
-    timeTypeText: function(schedual) {
429
+    timeTypeText: function (schedual) {
336
       if (schedual.schedule_type == 1) {
430
       if (schedual.schedule_type == 1) {
337
         return "上午";
431
         return "上午";
338
       } else if (schedual.schedule_type == 2) {
432
       } else if (schedual.schedule_type == 2) {
341
         return "晚上";
435
         return "晚上";
342
       }
436
       }
343
     },
437
     },
344
-    genderText: function(schedual) {
438
+    genderText: function (schedual) {
345
       if (schedual.patient.gender == 0) {
439
       if (schedual.patient.gender == 0) {
346
         return "未知";
440
         return "未知";
347
       } else if (schedual.patient.gender == 1) {
441
       } else if (schedual.patient.gender == 1) {
350
         return "女";
444
         return "女";
351
       }
445
       }
352
     },
446
     },
353
-    age: function(schedual) {
447
+    age: function (schedual) {
354
       if (schedual.patient.birthday == 0) {
448
       if (schedual.patient.birthday == 0) {
355
         return "";
449
         return "";
356
       } else {
450
       } else {
367
       // // console.log(birthdayYear)
461
       // // console.log(birthdayYear)
368
       // return nowYear - birthdayYear
462
       // return nowYear - birthdayYear
369
     },
463
     },
370
-    getAge: function(val) {
464
+    getAge: function (val) {
371
       var thisLen = val.patient.id_card_no.length;
465
       var thisLen = val.patient.id_card_no.length;
372
       var birth = "";
466
       var birth = "";
373
       if (thisLen == 15) {
467
       if (thisLen == 15) {
385
       var age = jsGetAge(birthtwo, "-");
479
       var age = jsGetAge(birthtwo, "-");
386
       return age;
480
       return age;
387
     },
481
     },
388
-    detailAction: function(schedual) {
482
+    detailAction: function (schedual) {
389
       var patient_id = schedual.patient_id;
483
       var patient_id = schedual.patient_id;
390
       var date = schedual.schedule_date;
484
       var date = schedual.schedule_date;
391
       this.$router.push({
485
       this.$router.push({
394
           patient_id: patient_id,
488
           patient_id: patient_id,
395
           date: date,
489
           date: date,
396
           patient_name: schedual.patient.name,
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
       var dateStr = parseTime(this.date, "{y}-{m}-{d}");
497
       var dateStr = parseTime(this.date, "{y}-{m}-{d}");
404
       this.doctor_advices = [];
498
       this.doctor_advices = [];
405
-      getDialysisScheduleDetail(this.patient_id, dateStr).then(rs => {
499
+      getDialysisScheduleDetail(this.patient_id, dateStr).then((rs) => {
406
         var resp = rs.data;
500
         var resp = rs.data;
407
         if (resp.state == 1) {
501
         if (resp.state == 1) {
408
           var patient = resp.data.patient; // 患者信息
502
           var patient = resp.data.patient; // 患者信息
409
-         
503
+
410
           var schedual = resp.data.schedual; // 患者排班信息
504
           var schedual = resp.data.schedual; // 患者排班信息
411
           var prescription = resp.data.prescription; // 透析处方
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
           var solution = resp.data.solution; // 透析方案
512
           var solution = resp.data.solution; // 透析方案
419
           var receiver_treatment_access = resp.data.receiver_treatment_access; // 接诊评估
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
           var predialysis_evaluation = resp.data.predialysis_evaluation; // 透前评估
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
           var doctor_advices = resp.data.doctor_advices; // 临时医嘱
522
           var doctor_advices = resp.data.doctor_advices; // 临时医嘱
429
-          
523
+
430
           var double_check = resp.data.double_check; // 双人核对
524
           var double_check = resp.data.double_check; // 双人核对
431
           var assessment_after_dislysis = resp.data.assessment_after_dislysis; // 透后评估
525
           var assessment_after_dislysis = resp.data.assessment_after_dislysis; // 透后评估
432
-        
526
+
433
           var treatment_summary = resp.data.treatment_summary; // 治疗小结
527
           var treatment_summary = resp.data.treatment_summary; // 治疗小结
434
           var monitor_records = resp.data.monitor_records; // 透析监测
528
           var monitor_records = resp.data.monitor_records; // 透析监测
435
           var dialysis_order = resp.data.dialysis_order; // 透析记录
529
           var dialysis_order = resp.data.dialysis_order; // 透析记录
449
           var aliquid_info = resp.data.aliquid_info;
543
           var aliquid_info = resp.data.aliquid_info;
450
 
544
 
451
           var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation;
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
           var lastMonitorRecord = resp.data.lastMonitorRecord;
552
           var lastMonitorRecord = resp.data.lastMonitorRecord;
459
           var lastAssessmentAfterDislysis =
553
           var lastAssessmentAfterDislysis =
462
           var lastDryWeightDislysis = resp.data.lastDryWeightDislysis;
556
           var lastDryWeightDislysis = resp.data.lastDryWeightDislysis;
463
 
557
 
464
           var system_prescribe = resp.data.system_prescribe;
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
           this.$refs.prescription.setLastRecord(
564
           this.$refs.prescription.setLastRecord(
471
             schedual,
565
             schedual,
472
             lastAssessmentAfterDislysis,
566
             lastAssessmentAfterDislysis,
505
           this.patient = patient;
599
           this.patient = patient;
506
           this.schedual = schedual == null ? { id: 0 } : schedual;
600
           this.schedual = schedual == null ? { id: 0 } : schedual;
507
           this.prescription = prescription == null ? { id: 0 } : prescription;
601
           this.prescription = prescription == null ? { id: 0 } : prescription;
508
-          console.log('this.prescription',this.prescription)
602
+          console.log("this.prescription", this.prescription);
509
           this.solution = solution == null ? { id: 0 } : solution;
603
           this.solution = solution == null ? { id: 0 } : solution;
510
-          console.log('this.solution',this.solution)
604
+          console.log("this.solution", this.solution);
511
           this.receiver_treatment_access =
605
           this.receiver_treatment_access =
512
             receiver_treatment_access == null
606
             receiver_treatment_access == null
513
               ? { id: 0 }
607
               ? { id: 0 }
533
           this.devices = resp.data.devices;
627
           this.devices = resp.data.devices;
534
           this.device_numbers = resp.data.device_numbers;
628
           this.device_numbers = resp.data.device_numbers;
535
 
629
 
536
-          
537
-
538
           var device_map = {};
630
           var device_map = {};
539
           for (let index = 0; index < this.devices.length; index++) {
631
           for (let index = 0; index < this.devices.length; index++) {
540
             const device = this.devices[index];
632
             const device = this.devices[index];
555
             device_number_map[device_number.id] = device_number;
647
             device_number_map[device_number.id] = device_number;
556
           }
648
           }
557
           this.device_number_map = device_number_map;
649
           this.device_number_map = device_number_map;
558
-          this.getLongAdvice()
650
+          this.getLongAdvice();
559
         } else {
651
         } else {
560
           this.$message.error(resp.msg);
652
           this.$message.error(resp.msg);
561
-         
562
         }
653
         }
563
 
654
 
564
         if (this.lastDialysisPrescribe != null) {
655
         if (this.lastDialysisPrescribe != null) {
571
     },
662
     },
572
     getLongAdvice() {
663
     getLongAdvice() {
573
       let params = {
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
         var resp = rs.data;
668
         var resp = rs.data;
578
         if (resp.state == 1) {
669
         if (resp.state == 1) {
579
           var status = parseInt(resp.data.status);
670
           var status = parseInt(resp.data.status);
616
         }
707
         }
617
       });
708
       });
618
     },
709
     },
619
-    adviceFunc: function() {
710
+    adviceFunc: function () {
620
       this.$emit("advice");
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
       // this.getLongAdvice()
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
       return strDate;
743
       return strDate;
651
     },
744
     },
652
-    modeColor (id) {
745
+    modeColor(id) {
653
       if (id == 1) {
746
       if (id == 1) {
654
-
655
       } else if (id == 2) {
747
       } else if (id == 2) {
656
-        return 'modeRed'
748
+        return "modeRed";
657
       } else if (id == 3) {
749
       } else if (id == 3) {
658
-        return 'modePurple'
750
+        return "modePurple";
659
       }
751
       }
660
-    }
752
+    },
661
   },
753
   },
662
 };
754
 };
663
 </script>
755
 </script>
705
     .tx {
797
     .tx {
706
       @include display-flex;
798
       @include display-flex;
707
       // @include align-items-center;
799
       // @include align-items-center;
708
-      width: 90%;
800
+      width: 100%;
709
       img {
801
       img {
710
         width: 45px;
802
         width: 45px;
711
         height: 45px;
803
         height: 45px;
716
       .right {
808
       .right {
717
         // float: left;
809
         // float: left;
718
         // text-align: left;
810
         // text-align: left;
719
-        display:flex;
811
+        display: flex;
720
         align-items: center;
812
         align-items: center;
721
         margin-top: 6px;
813
         margin-top: 6px;
722
         .name {
814
         .name {
725
           font-weight: bold;
817
           font-weight: bold;
726
           height: 20px;
818
           height: 20px;
727
           line-height: 20px;
819
           line-height: 20px;
728
-          margin-right:10px;
820
+          margin-right: 10px;
729
           .yc {
821
           .yc {
730
             background: #ff7979;
822
             background: #ff7979;
731
             color: #fff;
823
             color: #fff;
744
           color: #7b8a97;
836
           color: #7b8a97;
745
         }
837
         }
746
       }
838
       }
747
-      .tip1{
839
+      .tip1 {
748
         background: #4fc7cb;
840
         background: #4fc7cb;
749
         border-radius: 5px;
841
         border-radius: 5px;
750
         text-align: center;
842
         text-align: center;
756
         height: 24px;
848
         height: 24px;
757
         line-height: 24px;
849
         line-height: 24px;
758
       }
850
       }
759
-      .tip2{
851
+      .tip2 {
760
         background: #7bce91;
852
         background: #7bce91;
761
         border-radius: 5px;
853
         border-radius: 5px;
762
         text-align: center;
854
         text-align: center;
783
         border-radius: 4px;
875
         border-radius: 4px;
784
         margin: 0 auto;
876
         margin: 0 auto;
785
         font-size: 12px;
877
         font-size: 12px;
786
-        margin-top:4px;
878
+        margin-top: 4px;
787
         display: inline-block;
879
         display: inline-block;
788
       }
880
       }
789
       .blue {
881
       .blue {
807
       }
899
       }
808
     }
900
     }
809
   }
901
   }
810
-  .dislysisInfo{
902
+  .dislysisInfo {
811
     color: rgb(123, 138, 151);
903
     color: rgb(123, 138, 151);
812
     border-bottom: 1px solid rgb(229, 229, 229);
904
     border-bottom: 1px solid rgb(229, 229, 229);
813
     padding-left: 80px;
905
     padding-left: 80px;
814
-    >p{
906
+    > p {
815
       margin-bottom: 5px;
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
 .red {
914
 .red {
823
   border: 1px #ff7979 solid;
915
   border: 1px #ff7979 solid;
824
 }
916
 }
825
-#modeRed{
826
-  color:#ed5555;
917
+#modeRed {
918
+  color: #ed5555;
827
 }
919
 }
828
-#modePurple{
920
+#modePurple {
829
   color: #53b86e;
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
   border-radius: 0 0 0 30px;
928
   border-radius: 0 0 0 30px;
836
   background: #78d660;
929
   background: #78d660;
837
   text-align: center;
930
   text-align: center;
838
-  line-height: 40px;
931
+  line-height: 25px;
839
   position: relative;
932
   position: relative;
840
-  bottom: 64px;
841
-  left: 179px;
933
+  bottom: 10px;
934
+  left: 3px;
842
   color: white;
935
   color: white;
843
 }
936
 }
844
 </style>
937
 </style>

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

90
           >
90
           >
91
         </div>
91
         </div>
92
       </template>
92
       </template>
93
-      <template v-if="this.template_id == 6">
93
+      <template v-if="this.template_id == 6 || this.template_id == 48">
94
         <el-button
94
         <el-button
95
           size="small"
95
           size="small"
96
           icon="el-icon-printer"
96
           icon="el-icon-printer"
319
           >批量打印</el-button
319
           >批量打印</el-button
320
         >
320
         >
321
       </template>
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
     </div>
332
     </div>
323
     <div class="app-container">
333
     <div class="app-container">
324
       <!-- <div class="filter-container">
334
       <!-- <div class="filter-container">
954
         this.$router.push({ path: "/dialysis/print/batch/fortyThree" });
964
         this.$router.push({ path: "/dialysis/print/batch/fortyThree" });
955
       } else if (this.template_id == 47) {
965
       } else if (this.template_id == 47) {
956
         this.$router.push({ path: "/dialysis/print/batch/fortyThree" });
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
     batchPrintActionOne: function() {
971
     batchPrintActionOne: function() {

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

644
           >打印</el-button
644
           >打印</el-button
645
         >
645
         >
646
       </template>
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
     </div>
667
     </div>
648
     <div class="app-container" style="min-height: 0">
668
     <div class="app-container" style="min-height: 0">
649
       <!--<div class="order-print-btn"-->
669
       <!--<div class="order-print-btn"-->
1011
             v-if="org_template_info.template_id == 48"
1031
             v-if="org_template_info.template_id == 48"
1012
           >
1032
           >
1013
           </DialysisPrintOrderFortyEight>
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
         </div>
1045
         </div>
1015
       </el-container>
1046
       </el-container>
1016
     </div>
1047
     </div>
1077
 import DialysisPrintOrderFortySix from "./template/DialysisPrintOrderFortySix";
1108
 import DialysisPrintOrderFortySix from "./template/DialysisPrintOrderFortySix";
1078
 import DialysisPrintOrderFortySeven from "./template/DialysisPrintOrderFortySeven";
1109
 import DialysisPrintOrderFortySeven from "./template/DialysisPrintOrderFortySeven";
1079
 import DialysisPrintOrderFortyEight from "./template/DialysisPrintOrderFortyEight";
1110
 import DialysisPrintOrderFortyEight from "./template/DialysisPrintOrderFortyEight";
1111
+import DialysisPrintOrderFortyNine from "./template/DialysisPrintOrderFortyNine";
1112
+import DialysisPrintOrderFifty from "./template/DialysisPrintOrderFifty";
1080
 export default {
1113
 export default {
1081
   name: "dialysisPrintOrder",
1114
   name: "dialysisPrintOrder",
1082
   components: {
1115
   components: {
1116
+    DialysisPrintOrderFifty,
1117
+    DialysisPrintOrderFortyNine,
1083
     DialysisPrintOrderFortyEight,
1118
     DialysisPrintOrderFortyEight,
1084
     DialysisPrintOrderFortySeven,
1119
     DialysisPrintOrderFortySeven,
1085
     DialysisPrintOrderFortySix,
1120
     DialysisPrintOrderFortySix,
1353
       } else if (
1388
       } else if (
1354
         this.org_template_info.template_id == 6 ||
1389
         this.org_template_info.template_id == 6 ||
1355
         this.org_template_info.template_id == 10 ||
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
         printJS({
1395
         printJS({
1359
           printable: "dialysis-print-box-1",
1396
           printable: "dialysis-print-box-1",

Dosya farkı çok büyük olduğundan ihmal edildi
+ 3709 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderFifty.vue


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

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

Dosya farkı çok büyük olduğundan ihmal edildi
+ 2238 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderFortyNine.vue


+ 10 - 5
src/xt_pages/dialysis/template/DialysisPrintOrderFortySeven.vue Dosyayı Görüntüle

1261
                         </td>
1261
                         </td>
1262
                         <!-- 超滤量 -->
1262
                         <!-- 超滤量 -->
1263
                         <td>
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
                         </td>
1272
                         </td>
1273
+                        <!-- 置换量 -->
1270
                         <td
1274
                         <td
1271
                           v-if="
1275
                           v-if="
1272
                             prescription.mode_id == 2 ||
1276
                             prescription.mode_id == 2 ||
1283
                                 : ""
1287
                                 : ""
1284
                             }}
1288
                             }}
1285
                           </span>
1289
                           </span>
1290
+                          
1286
                         </td>
1291
                         </td>
1287
                         <!-- <td
1292
                         <!-- <td
1288
                           v-if="
1293
                           v-if="

+ 5 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue Dosyayı Görüntüle

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

+ 1 - 1
src/xt_pages/hospitalStation/allListTemplate/printOne.vue Dosyayı Görüntüle

24
                         <td style="width:10%">{{item.med_chrgitm_type}}</td>
24
                         <td style="width:10%">{{item.med_chrgitm_type}}</td>
25
                         <td style="width:50%">{{item.name}}</td>
25
                         <td style="width:50%">{{item.name}}</td>
26
                         <td style="width:10%">{{item.spec}}</td>
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
                         <td style="width:10%">{{item.count}}{{item.unit}}</td>
28
                         <td style="width:10%">{{item.count}}{{item.unit}}</td>
29
                         <td style="width:10%">{{(item.price * item.count).toFixed(2)}}</td>
29
                         <td style="width:10%">{{(item.price * item.count).toFixed(2)}}</td>
30
                     </tr>
30
                     </tr>

+ 1 - 0
src/xt_pages/hospitalStation/doctorDesk.vue Dosyayı Görüntüle

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

+ 5 - 4
src/xt_pages/outpatientCharges/allListTemplate/summaryPrint.vue Dosyayı Görüntüle

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

+ 3 - 4
src/xt_pages/outpatientCharges/listTemplate/listPrintTwo.vue Dosyayı Görüntüle

39
             <td style="width:5%">{{index + 1}}</td>
39
             <td style="width:5%">{{index + 1}}</td>
40
             <td style="width:15%">{{item.p_time}}</td>
40
             <td style="width:15%">{{item.p_time}}</td>
41
             <td style="width:10%">{{item.feedetl_sn.split("-")[2]}}</td>
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
             <td style="width:5%">{{item.unit}}</td>
43
             <td style="width:5%">{{item.unit}}</td>
45
             <td style="width:5%">{{ item.count }}</td>
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
           </tr>
47
           </tr>
49
         </template>
48
         </template>
50
       </table>
49
       </table>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 583 - 441
src/xt_pages/outpatientDoctorStation/checkTemplate/printOne.vue


+ 3 - 0
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Dosyayı Görüntüle

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

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

18
 9675:测试
18
 9675:测试
19
  -->
19
  -->
20
     <div class="dialysisPage" style="padding-top: 40px">
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
         <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>
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 Dosyayı Görüntüle

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

+ 1 - 0
src/xt_pages/outpatientDoctorStation/template/printSix.vue Dosyayı Görüntüle

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

+ 314 - 0
src/xt_pages/outpatientTool/components/drugDetail.vue Dosyayı Görüntüle

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 Dosyayı Görüntüle

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 Dosyayı Görüntüle

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 Dosyayı Görüntüle

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

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

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

+ 26 - 12
src/xt_pages/stock/cancelStockOrderAdd.vue Dosyayı Görüntüle

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

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

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

+ 0 - 0
src/xt_pages/stock/config/stock_setting.vue Dosyayı Görüntüle


+ 48 - 47
src/xt_pages/stock/detail/cancelStockDetail.vue Dosyayı Görüntüle

23
       >汇总导出
23
       >汇总导出
24
     </el-button>
24
     </el-button>
25
     <div class="cell clearfix">
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
       <el-input
35
       <el-input
27
         size="small"
36
         size="small"
28
-        style="width: 400px;"
37
+        style="width:200px;"
29
         class="filter-item"
38
         class="filter-item"
30
         v-model.trim="searchKey"
39
         v-model.trim="searchKey"
31
         placeholder="单据编码/制单人/规格名称/耗材名称"
40
         placeholder="单据编码/制单人/规格名称/耗材名称"
38
         @click="search"
47
         @click="search"
39
         >搜索</el-button
48
         >搜索</el-button
40
       >
49
       >
41
-      <div style="margin-left:10px;">
50
+     
42
         <label class="title"><span class="name">日期查询</span> : </label>
51
         <label class="title"><span class="name">日期查询</span> : </label>
43
         <el-date-picker
52
         <el-date-picker
44
           size="small"
53
           size="small"
67
           value-format="yyyy-MM-dd"
76
           value-format="yyyy-MM-dd"
68
           @change="endTimeChange"
77
           @change="endTimeChange"
69
         ></el-date-picker>
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
     <el-row :gutter="12" style="margin-top: 10px">
83
     <el-row :gutter="12" style="margin-top: 10px">
114
       <el-table
84
       <el-table
115
         :data="cancelStockDate"
85
         :data="cancelStockDate"
166
           </template>
136
           </template>
167
         </el-table-column>
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
         <el-table-column label="数量" align="center">
145
         <el-table-column label="数量" align="center">
170
           <template slot-scope="scope">
146
           <template slot-scope="scope">
171
             {{ scope.row.count }}
147
             {{ scope.row.count }}
280
       goodUnit:[],
256
       goodUnit:[],
281
       tableDataList:[],
257
       tableDataList:[],
282
       table:[],
258
       table:[],
259
+      houseList:[],
260
+      storehouse_id:0
283
     };
261
     };
284
   },
262
   },
285
   methods: {
263
   methods: {
390
         manufacturer: this.manufacturer_id,
368
         manufacturer: this.manufacturer_id,
391
         order_type: this.order_type,
369
         order_type: this.order_type,
392
         dealer: this.dealer_id,
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
       this.cancelStockDate = [];
375
       this.cancelStockDate = [];
397
       getStockDetail(Params).then(response => {
376
       getStockDetail(Params).then(response => {
398
         if (response.data.state == 0) {
377
         if (response.data.state == 0) {
400
           return false;
379
           return false;
401
         } else {
380
         } else {
402
           this.total = response.data.data.total;
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
           var total = 0
388
           var total = 0
405
           for (let i = 0; i < response.data.data.list.length; i++) {
389
           for (let i = 0; i < response.data.data.list.length; i++) {
406
             
390
             
728
         }
712
         }
729
       }
713
       }
730
       return total
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
 </script>
735
 </script>

+ 50 - 8
src/xt_pages/stock/detail/stockInDetail.vue Dosyayı Görüntüle

26
     </el-button>
26
     </el-button>
27
 
27
 
28
     <div class="cell clearfix">
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
       <el-input
38
       <el-input
30
         size="small"
39
         size="small"
31
-        style="width: 400px;"
40
+        style="width: 180px;"
32
         class="filter-item"
41
         class="filter-item"
33
         v-model.trim="searchKey"
42
         v-model.trim="searchKey"
34
         placeholder="单据编码/制单人/规格名称/耗材名称"
43
         placeholder="单据编码/制单人/规格名称/耗材名称"
41
         @click="search"
50
         @click="search"
42
         >搜索</el-button
51
         >搜索</el-button
43
       >
52
       >
44
-      <div style="margin-left:10px;">
53
+    
45
         <label class="title"><span class="name">日期查询</span> : </label>
54
         <label class="title"><span class="name">日期查询</span> : </label>
46
         <el-date-picker
55
         <el-date-picker
47
           size="small"
56
           size="small"
70
           value-format="yyyy-MM-dd"
79
           value-format="yyyy-MM-dd"
71
           @change="endTimeChange"
80
           @change="endTimeChange"
72
         ></el-date-picker>
81
         ></el-date-picker>
73
-      </div>
82
+      
74
     </div>
83
     </div>
75
 
84
 
76
     <el-row :gutter="12" style="margin-top: 10px">
85
     <el-row :gutter="12" style="margin-top: 10px">
102
         <el-table-column label="耗材名称" align="center">
111
         <el-table-column label="耗材名称" align="center">
103
           <template slot-scope="scope">
112
           <template slot-scope="scope">
104
             {{ typeNameOne(scope.row.good_id) }}
113
             {{ typeNameOne(scope.row.good_id) }}
114
+          
105
           </template>
115
           </template>
106
         </el-table-column>
116
         </el-table-column>
107
 
117
 
108
         <el-table-column label="规格型号" align="center">
118
         <el-table-column label="规格型号" align="center">
109
           <template slot-scope="scope">
119
           <template slot-scope="scope">
110
             {{ specificationName(scope.row.good_id) }}
120
             {{ specificationName(scope.row.good_id) }}
121
+           
111
           </template>
122
           </template>
112
         </el-table-column>
123
         </el-table-column>
113
 
124
 
122
             {{ getXuserName(scope.row.Warehousing.creater) }}
133
             {{ getXuserName(scope.row.Warehousing.creater) }}
123
           </template>
134
           </template>
124
         </el-table-column>
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
         <el-table-column label="进货价" align="center">
141
         <el-table-column label="进货价" align="center">
126
           <template slot-scope="scope">
142
           <template slot-scope="scope">
127
             {{ scope.row.price }}
143
             {{ scope.row.price }}
247
       org_id:0,
263
       org_id:0,
248
       tableInfo:[],
264
       tableInfo:[],
249
       tableDataList:[],
265
       tableDataList:[],
266
+      houseList:[],
267
+      storehouse_id:0,
250
     };
268
     };
251
   },
269
   },
252
   methods: {
270
   methods: {
308
         start_time: this.start_time,
326
         start_time: this.start_time,
309
         end_time: this.end_time,
327
         end_time: this.end_time,
310
         type: this.type,
328
         type: this.type,
311
-        keywords: this.searchKey
329
+        keywords: this.searchKey,
330
+        storehouse_id:this.storehouse_id,
312
       };
331
       };
313
       this.cancelStockDate = [];
332
       this.cancelStockDate = [];
314
       this.tableList = []
333
       this.tableList = []
361
         manufacturer: this.manufacturer_id,
380
         manufacturer: this.manufacturer_id,
362
         order_type: this.order_type,
381
         order_type: this.order_type,
363
         dealer: this.dealer_id,
382
         dealer: this.dealer_id,
364
-        keywords: this.searchKey
383
+        keywords: this.searchKey,
384
+        storehouse_id:this.storehouse_id,
365
       };
385
       };
366
       this.cancelStockDate = [];
386
       this.cancelStockDate = [];
367
       getStockDetail(Params).then(response => {
387
       getStockDetail(Params).then(response => {
370
           return false;
390
           return false;
371
         } else {
391
         } else {
372
           this.total = response.data.data.total;
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
           var total_price = 0
399
           var total_price = 0
374
           for (let i = 0; i < response.data.data.list.length; i++) {
400
           for (let i = 0; i < response.data.data.list.length; i++) {
375
             total_price += parseInt(response.data.data.list[i].warehousing_count) * response.data.data.list[i].price
401
             total_price += parseInt(response.data.data.list[i].warehousing_count) * response.data.data.list[i].price
379
             this.cancelStockDate.push(obj);
405
             this.cancelStockDate.push(obj);
380
           }
406
           }
381
           this.tableDataList = response.data.data.list
407
           this.tableDataList = response.data.data.list
408
+          console.log("表格发3223332322332332323232332233",this.cancelStockDate)
409
+         
382
           this.cancelStockDate.push({
410
           this.cancelStockDate.push({
383
             warehousing_order: "合计",
411
             warehousing_order: "合计",
384
             is_total: 1,
412
             is_total: 1,
430
       this.multipleSelection = val;
458
       this.multipleSelection = val;
431
     },
459
     },
432
     handleSizeChange(val) {
460
     handleSizeChange(val) {
433
-      console.log("val2332323223",val)
434
       this.limit = val;
461
       this.limit = val;
435
       this.GetCancelStock();
462
       this.GetCancelStock();
436
     },
463
     },
437
     handleCurrentChange(val) {
464
     handleCurrentChange(val) {
438
-      console.log("888888",val)
439
       this.page = val;
465
       this.page = val;
440
       this.GetCancelStock();
466
       this.GetCancelStock();
441
     },
467
     },
795
       getGoodDetailPrintList(params).then(response=>{
821
       getGoodDetailPrintList(params).then(response=>{
796
         if(response.data.state == 1){
822
         if(response.data.state == 1){
797
           var list = response.data.data.list
823
           var list = response.data.data.list
798
-          // console.log("入库详情单",list)
799
           this.tableInfo = list
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 Dosyayı Görüntüle

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

+ 56 - 11
src/xt_pages/stock/drugs/cancelDrugStockOrder.vue Dosyayı Görüntüle

14
     </div>
14
     </div>
15
 
15
 
16
     <div class="app-container">
16
     <div class="app-container">
17
+      
17
       <div class="cell clearfix">
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
         <el-input
28
         <el-input
19
           size="small"
29
           size="small"
20
-          style="width: 400px;"
30
+          style="width: 200px;"
21
           class="filter-item"
31
           class="filter-item"
22
           v-model.trim="searchKey"
32
           v-model.trim="searchKey"
23
-          placeholder="单据编码/制单人/厂商"
33
+          placeholder="单据编码/制单人"
24
         />
34
         />
25
         <el-button
35
         <el-button
26
           size="small"
36
           size="small"
104
           </template>
114
           </template>
105
         </el-table-column>
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
         <el-table-column label="制单人" align="center">
124
         <el-table-column label="制单人" align="center">
108
           <template slot-scope="scope">
125
           <template slot-scope="scope">
109
             {{ getXuserName(scope.row.creater) }}
126
             {{ getXuserName(scope.row.creater) }}
187
                 {{ scope.row.BaseDrugLib.medical_insurance_number}}
204
                 {{ scope.row.BaseDrugLib.medical_insurance_number}}
188
               </template>
205
               </template>
189
             </el-table-column>
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
             <el-table-column label="退库数量" align="center">
215
             <el-table-column label="退库数量" align="center">
191
               <template slot-scope="scope">
216
               <template slot-scope="scope">
192
                 {{ scope.row.count}}
217
                 {{ scope.row.count}}
326
       tableList:[],
351
       tableList:[],
327
       showTable:false,
352
       showTable:false,
328
       order_id:"",
353
       order_id:"",
329
-      exportList:[]
354
+      exportList:[],
355
+      houseList:[],
356
+      storehouse_id:0,
330
     };
357
     };
331
   },
358
   },
332
   methods: {
359
   methods: {
337
         start_time: this.start_time,
364
         start_time: this.start_time,
338
         end_time: this.end_time,
365
         end_time: this.end_time,
339
         type: this.type,
366
         type: this.type,
340
-        keywords: this.searchKey
367
+        keywords: this.searchKey,
368
+        storehouse_id:this.storehouse_id,
341
       };
369
       };
342
       this.cancelStockDate = [];
370
       this.cancelStockDate = [];
343
       getDrugCancelStockList(Params).then(response => {
371
       getDrugCancelStockList(Params).then(response => {
364
         limit: this.limit,
392
         limit: this.limit,
365
         start_time: this.start_time,
393
         start_time: this.start_time,
366
         end_time: this.end_time,
394
         end_time: this.end_time,
367
-        type: this.type
395
+        type: this.type,
396
+        storehouse_id:this.storehouse_id,
368
       };
397
       };
369
       this.cancelStockDate = [];
398
       this.cancelStockDate = [];
370
       getDrugCancelStockList(Params).then(response => {
399
       getDrugCancelStockList(Params).then(response => {
372
           this.$message.error(response.data.msg);
401
           this.$message.error(response.data.msg);
373
           return false;
402
           return false;
374
         } else {
403
         } else {
375
-          console.log("列表23232323232323",response.data.data.list)
404
+         
376
           
405
           
377
           this.total = response.data.data.total;
406
           this.total = response.data.data.total;
378
           for (let i = 0; i < response.data.data.list.length; i++) {
407
           for (let i = 0; i < response.data.data.list.length; i++) {
379
             this.cancelStockDate.push(response.data.data.list[i]);
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
         confirmButtonText: "确定",
590
         confirmButtonText: "确定",
556
         cancelButtonText: "取消",
591
         cancelButtonText: "取消",
557
         type: "warning"
592
         type: "warning"
558
-      })
559
-        .then(() => {
593
+      }).then(() => {
560
           deleteDrugCancelStock(params).then(response => {
594
           deleteDrugCancelStock(params).then(response => {
561
             if (response.data.state == 0) {
595
             if (response.data.state == 0) {
562
               this.$message.error(response.data.msg);
596
               this.$message.error(response.data.msg);
582
         .catch(() => {});
616
         .catch(() => {});
583
     },
617
     },
584
     handleCurrentChangeOne(val) {
618
     handleCurrentChangeOne(val) {
619
+     if(val!=null){
585
       this.getCancelStockDetail(val.id)
620
       this.getCancelStockDetail(val.id)
621
+     }
586
     },
622
     },
587
     getCancelStockDetail(id){
623
     getCancelStockDetail(id){
588
-      console.log("id232233223",id)
589
         var params = {
624
         var params = {
590
           id:id
625
           id:id
591
         }
626
         }
592
       getCancelStockDetail(params).then(response=>{
627
       getCancelStockDetail(params).then(response=>{
593
        if(response.data.state == 1){
628
        if(response.data.state == 1){
594
          var list =  response.data.data.list
629
          var list =  response.data.data.list
595
-         console.log("hhhh23233323223",list)
596
          for(let i=0;i<list.length;i++){
630
          for(let i=0;i<list.length;i++){
597
            list[i].product_date = this.getTime(list[i].product_date,"{y}-{h}-{d}")
631
            list[i].product_date = this.getTime(list[i].product_date,"{y}-{h}-{d}")
598
            list[i].expiry_date = this.getTime(list[i].expiry_date,"{y}-{h}-{d}")
632
            list[i].expiry_date = this.getTime(list[i].expiry_date,"{y}-{h}-{d}")
599
          }
633
          }
600
          this.tableList = list
634
          this.tableList = list
601
-        //  console.log("list23232",list)
602
          this.showTable = true
635
          this.showTable = true
603
        }
636
        }
604
       })
637
       })
669
     formatJson(filterVal, jsonData) {
702
     formatJson(filterVal, jsonData) {
670
     return jsonData.map(v => filterVal.map(j => v[j]));
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
 </script>
719
 </script>

+ 20 - 3
src/xt_pages/stock/drugs/cancelDrugStockOrderAdd.vue Dosyayı Görüntüle

38
 
38
 
39
       <div class="filter-container">
39
       <div class="filter-container">
40
         <div class="cell clearfix">
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
           <label class="title"><span class="name">退库时间</span> : </label>
50
           <label class="title"><span class="name">退库时间</span> : </label>
42
-
43
           <el-date-picker
51
           <el-date-picker
44
             size="small"
52
             size="small"
45
             v-model="return_time"
53
             v-model="return_time"
365
       dealerList:[],
373
       dealerList:[],
366
       manufacturerList:[],
374
       manufacturerList:[],
367
       numberList:[],
375
       numberList:[],
368
-      unitList:[]
376
+      unitList:[],
377
+      list:[],
378
+      storehouse_id:"",
369
     };
379
     };
370
   },
380
   },
371
   methods: {
381
   methods: {
425
 
435
 
426
           this.form.manufacturer = 0
436
           this.form.manufacturer = 0
427
           this.form.dealer = 0
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
         loading.close()
441
         loading.close()
430
       })
442
       })
546
       this.$router.go(-1);
558
       this.$router.go(-1);
547
     },
559
     },
548
     submit() {
560
     submit() {
561
+      if(this.storehouse_id == ""){
562
+        this.$message.error("仓库不能为空!")
563
+        return
564
+      }
549
       this.$refs["tableForm"].validate(valid => {
565
       this.$refs["tableForm"].validate(valid => {
550
         if (valid) {
566
         if (valid) {
551
           const array = this.recordInfo.recordData;
567
           const array = this.recordInfo.recordData;
584
             this.return_time,
600
             this.return_time,
585
             this.form.manufacturer,
601
             this.form.manufacturer,
586
             this.form.dealer,
602
             this.form.dealer,
587
-            this.type
603
+            this.type,
604
+            this.storehouse_id,
588
           ).then(response => {
605
           ).then(response => {
589
             if (response.data.state == 0) {
606
             if (response.data.state == 0) {
590
               this.$message.error(response.data.msg);
607
               this.$message.error(response.data.msg);

+ 24 - 12
src/xt_pages/stock/drugs/cancelDrugStockOrderEdit.vue Dosyayı Görüntüle

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

+ 22 - 19
src/xt_pages/stock/drugs/components/drugCancelDetail.vue Dosyayı Görüntüle

369
             order_number: "合计",
369
             order_number: "合计",
370
             is_total: 1,
370
             is_total: 1,
371
             specification_name:"",
371
             specification_name:"",
372
+            unit:"",
372
             ctime:"",
373
             ctime:"",
373
             total_price:total_price.toFixed(2),
374
             total_price:total_price.toFixed(2),
374
           });
375
           });
408
         //  if(this.tableDataList[i].drug_type == 3){
409
         //  if(this.tableDataList[i].drug_type == 3){
409
         //     this.tableDataList[i].drug_type == "成药"
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
           this.tableDataList[i].index = i+1
413
           this.tableDataList[i].index = i+1
413
           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
           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
           this.tableDataList[i].user_name = this.getAdminUser(this.tableDataList[i].creater)
415
           this.tableDataList[i].user_name = this.getAdminUser(this.tableDataList[i].creater)
418
         }
419
         }
419
        import('@/vendor/Export2Excel').then(excel => {
420
        import('@/vendor/Export2Excel').then(excel => {
420
         const tHeader = ['序号','单据编号', '药品名称', '规格型号','单据类型','操作时间','制单人','数量','退库价','总价']
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
         const data = this.formatJson(filterVal, this.tableDataList)
424
         const data = this.formatJson(filterVal, this.tableDataList)
424
 
425
 
434
         return jsonData.map(v => filterVal.map(j => v[j]));
435
         return jsonData.map(v => filterVal.map(j => v[j]));
435
      },
436
      },
436
     exportListOne(){
437
     exportListOne(){
437
-      let obj = {'index':'合计','total_price':0}
438
+      // let obj = {'index':'合计','total_price':0}
439
+      console.log("@332322323232332",this.tableList)
440
+      
438
        for(let i=0;i<this.tableList.length;i++){
441
        for(let i=0;i<this.tableList.length;i++){
439
           this.tableList[i].index = i+1
442
           this.tableList[i].index = i+1
440
           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
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
        import('@/vendor/Export2Excel').then(excel => {
464
        import('@/vendor/Export2Excel').then(excel => {
462
        const tHeader = ['序号','单据编号', '药品类型','药品名称', '规格型号','操作时间','制单人','退货价','数量','总价']
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
        const data = this.formatJson(filterVal, this.tableList)
468
        const data = this.formatJson(filterVal, this.tableList)
466
        
469
        

+ 54 - 10
src/xt_pages/stock/drugs/components/drugInOrder.vue Dosyayı Görüntüle

23
       type="primary"
23
       type="primary"
24
       >汇总导出
24
       >汇总导出
25
     </el-button>
25
     </el-button>
26
-
26
+   
27
     <div class="cell clearfix">
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
       <el-input
37
       <el-input
29
         size="small"
38
         size="small"
30
-        style="width: 400px;"
39
+        style="width: 200px;"
31
         class="filter-item"
40
         class="filter-item"
32
         v-model.trim="searchKey"
41
         v-model.trim="searchKey"
33
         placeholder="单据编码/制单人/药品名称"
42
         placeholder="单据编码/制单人/药品名称"
40
         @click="search"
49
         @click="search"
41
         >搜索</el-button
50
         >搜索</el-button
42
       >
51
       >
43
-      <div style="margin-left:10px;">
44
         <label class="title"><span class="name">日期查询</span> : </label>
52
         <label class="title"><span class="name">日期查询</span> : </label>
45
         <el-date-picker
53
         <el-date-picker
46
           size="small"
54
           size="small"
70
           value-format="yyyy-MM-dd"
78
           value-format="yyyy-MM-dd"
71
           @change="endTimeChange"
79
           @change="endTimeChange"
72
         ></el-date-picker>
80
         ></el-date-picker>
73
-      </div>
74
     </div>
81
     </div>
75
 
82
 
76
     <el-row :gutter="12" style="margin-top: 10px">
83
     <el-row :gutter="12" style="margin-top: 10px">
124
            {{getAdminUser(scope.row.creater)}}
131
            {{getAdminUser(scope.row.creater)}}
125
           </template>
132
           </template>
126
         </el-table-column>
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
         <el-table-column label="进货价" align="center">
139
         <el-table-column label="进货价" align="center">
128
           <template slot-scope="scope">
140
           <template slot-scope="scope">
129
             {{scope.row.price}}
141
             {{scope.row.price}}
134
             {{scope.row.warehousing_count}}
146
             {{scope.row.warehousing_count}}
135
           </template>
147
           </template>
136
         </el-table-column>
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
         <el-table-column label="总价" align="center">
154
         <el-table-column label="总价" align="center">
138
           <template slot-scope="scope">
155
           <template slot-scope="scope">
139
             {{scope.row.total_price}}
156
             {{scope.row.total_price}}
190
     
207
     
191
     var end_time =  window.sessionStorage.getItem('drug_end_in_time')
208
     var end_time =  window.sessionStorage.getItem('drug_end_in_time')
192
     if(start_time !=null){
209
     if(start_time !=null){
193
-      console.log("hh232323232红红火火")
194
       this.start_time = start_time
210
       this.start_time = start_time
195
     }
211
     }
196
     if(end_time!=null){
212
     if(end_time!=null){
238
       tableList:[],
254
       tableList:[],
239
       tabelePrintList:[],
255
       tabelePrintList:[],
240
       drugTypeList:[],
256
       drugTypeList:[],
257
+      storehouse_id:0,
258
+      houseList:[],
241
     };
259
     };
242
   },
260
   },
243
   methods: {
261
   methods: {
342
         keyword:this.searchKey,
360
         keyword:this.searchKey,
343
         limit:this.limit,
361
         limit:this.limit,
344
         page:this.page,
362
         page:this.page,
363
+        storehouse_id:this.storehouse_id,
345
        }
364
        }
346
       getDrugIndetail(params).then(response=>{
365
       getDrugIndetail(params).then(response=>{
347
         if(response.data.state == 1){
366
         if(response.data.state == 1){
348
           var drugInOrder = response.data.data.detail
367
           var drugInOrder = response.data.data.detail
349
           var drugTypeParent = response.data.data.drugTypeParent
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
           var total_price = 0
375
           var total_price = 0
353
           for(let i=0;i<drugInOrder.length;i++){
376
           for(let i=0;i<drugInOrder.length;i++){
354
              drugInOrder[i].specification_name  = drugInOrder[i].dose + drugInOrder[i].dose_unit + "*" + drugInOrder[i].min_number +  drugInOrder[i].min_unit + "/" + drugInOrder[i].max_unit
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
              drugInOrder[i].is_total = 0
381
              drugInOrder[i].is_total = 0
356
              total_price += drugInOrder[i].warehousing_count * drugInOrder[i].price
382
              total_price += drugInOrder[i].warehousing_count * drugInOrder[i].price
357
           }
383
           }
362
             ctime:"",
388
             ctime:"",
363
             total_price:total_price.toFixed(2),
389
             total_price:total_price.toFixed(2),
364
           });
390
           });
391
+          console.log("drugInOrder232332322323233232322332322332",drugInOrder)
365
           this.cancelStockDate = drugInOrder
392
           this.cancelStockDate = drugInOrder
366
            let objInfo = {}
393
            let objInfo = {}
367
           drugInOrder.forEach((item,index)=>{
394
           drugInOrder.forEach((item,index)=>{
416
         end_time:this.end_time,
443
         end_time:this.end_time,
417
         order_type:this.order_type,
444
         order_type:this.order_type,
418
       }
445
       }
419
-     console.log("药品入库232323223",params)
446
+    
420
      getDrugWarehouseInfoPrint(params).then(response=>{
447
      getDrugWarehouseInfoPrint(params).then(response=>{
421
           if(response.data.state == 1){
448
           if(response.data.state == 1){
422
             var list = response.data.data.list
449
             var list = response.data.data.list
443
       return name
470
       return name
444
     },
471
     },
445
      exportList(){
472
      exportList(){
446
-        console.log("hhh233223232323",this.tabelePrintList)
473
+       
447
         for(let i=0;i<this.tabelePrintList.length;i++){
474
         for(let i=0;i<this.tabelePrintList.length;i++){
448
           this.tabelePrintList[i].index = i+1
475
           this.tabelePrintList[i].index = i+1
449
           this.tabelePrintList[i].drug_name = this.tabelePrintList[i].XtBaseDrug.drug_name
476
           this.tabelePrintList[i].drug_name = this.tabelePrintList[i].XtBaseDrug.drug_name
517
         }
544
         }
518
       }
545
       }
519
       return name
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
 </script>
567
 </script>

+ 56 - 18
src/xt_pages/stock/drugs/components/drugOutDetail.vue Dosyayı Görüntüle

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

+ 25 - 9
src/xt_pages/stock/drugs/drugBatchNumber.vue Dosyayı Görüntüle

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

+ 39 - 0
src/xt_pages/stock/drugs/drugDamaged.vue Dosyayı Görüntüle

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
     <div  style="margin-bottom:10px;">
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
       <el-input
12
       <el-input
5
       size="small"
13
       size="small"
6
       style="width: 200px;"
14
       style="width: 200px;"
60
               {{getTotalPrice(scope.row.drug_id,scope.row.min_price)}}
68
               {{getTotalPrice(scope.row.drug_id,scope.row.min_price)}}
61
             </template>
69
             </template>
62
         </el-table-column>
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
         <el-table-column prop="name" label="操作人" align="center">
76
         <el-table-column prop="name" label="操作人" align="center">
64
             <template slot-scope="scope">
77
             <template slot-scope="scope">
65
               {{getDoctorName(scope.row.creater)}}
78
               {{getDoctorName(scope.row.creater)}}
219
                 product_date:"",
232
                 product_date:"",
220
                 stock_max_number:"",
233
                 stock_max_number:"",
221
                 stock_min_number:"",
234
                 stock_min_number:"",
235
+                storehouse_id:"",
222
             },
236
             },
223
             drugList:[],
237
             drugList:[],
224
             manufacturerList:[],
238
             manufacturerList:[],
258
             min_unit:"",
272
             min_unit:"",
259
             min_price:0,
273
             min_price:0,
260
             drug_id:0,
274
             drug_id:0,
275
+            storehouse_id:0,
261
         }
276
         }
262
     },
277
     },
263
     methods:{
278
     methods:{
295
           start_time:this.start_time,
310
           start_time:this.start_time,
296
           end_time:this.end_time,
311
           end_time:this.end_time,
297
           keyword:this.searchKey,
312
           keyword:this.searchKey,
313
+          storehouse_id:this.storehouse_id,
298
         }
314
         }
299
 
315
 
300
         getDrugDamageList(params).then(response=>{
316
         getDrugDamageList(params).then(response=>{
304
              this.doctorList = response.data.data.doctorList
320
              this.doctorList = response.data.data.doctorList
305
              var datamagelist = response.data.data.damagelist
321
              var datamagelist = response.data.data.damagelist
306
              this.datamageList = datamagelist
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
        all_count =  total_count * this.min_number
454
        all_count =  total_count * this.min_number
433
 
455
 
434
        return (count / all_count).toFixed(2)*100
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
     created(){
476
     created(){

+ 39 - 25
src/xt_pages/stock/drugs/drugStockFlow.vue Dosyayı Görüntüle

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

+ 70 - 20
src/xt_pages/stock/drugs/drugStockInOrder.vue Dosyayı Görüntüle

15
 
15
 
16
     <div class="app-container">
16
     <div class="app-container">
17
       <div class="cell clearfix">
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
         <el-input
27
         <el-input
19
           size="small"
28
           size="small"
20
-          style="width: 400px;"
29
+          style="width: 200px;"
21
           v-model.trim="searchKey"
30
           v-model.trim="searchKey"
22
           class="filter-item"
31
           class="filter-item"
23
           placeholder="单据编码/制单人/药品名称"
32
           placeholder="单据编码/制单人/药品名称"
31
           >搜索</el-button
40
           >搜索</el-button
32
         >
41
         >
33
         <div style="margin-left:10px;">
42
         <div style="margin-left:10px;">
43
+
34
           <label class="title"><span class="name">入库时间</span> : </label>
44
           <label class="title"><span class="name">入库时间</span> : </label>
35
           <el-date-picker
45
           <el-date-picker
36
             size="small"
46
             size="small"
107
           </template>
117
           </template>
108
         </el-table-column>
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
         <el-table-column label="制单人" align="center">
126
         <el-table-column label="制单人" align="center">
111
           <template slot-scope="scope">
127
           <template slot-scope="scope">
112
             {{ getXuserName(scope.row.creater) }}
128
             {{ getXuserName(scope.row.creater) }}
113
           </template>
129
           </template>
114
         </el-table-column>
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
         <el-table-column label="操作" align="center" width="240">
139
         <el-table-column label="操作" align="center" width="240">
117
           <template slot-scope="scope">
140
           <template slot-scope="scope">
118
 
141
 
200
             {{scope.row.batch_number}}
223
             {{scope.row.batch_number}}
201
           </template>
224
           </template>
202
         </el-table-column>
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
         <el-table-column label="入库数量" align="center">
231
         <el-table-column label="入库数量" align="center">
204
           <template slot-scope="scope">
232
           <template slot-scope="scope">
205
             {{scope.row.warehousing_count}}{{scope.row.max_unit}}
233
             {{scope.row.warehousing_count}}{{scope.row.max_unit}}
437
       order_id:"",
465
       order_id:"",
438
       dealerList:[],
466
       dealerList:[],
439
       exportList:[],
467
       exportList:[],
468
+      houseList:[],
469
+      storehouse_id:0,
440
     };
470
     };
441
   },
471
   },
442
   methods: {
472
   methods: {
447
         start_time: this.start_time,
477
         start_time: this.start_time,
448
         end_time: this.end_time,
478
         end_time: this.end_time,
449
         type: this.type,
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
       this.Warehouse.warehouseDate = [];
483
       this.Warehouse.warehouseDate = [];
454
       getDrugWarehouseList(Params).then(response => {
484
       getDrugWarehouseList(Params).then(response => {
455
         if (response.data.state == 0) {
485
         if (response.data.state == 0) {
462
           for (let i = 0; i < response.data.data.list.length; i++) {
492
           for (let i = 0; i < response.data.data.list.length; i++) {
463
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
493
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
464
           }
494
           }
465
-          
466
         }
495
         }
467
       });
496
       });
468
     },
497
     },
474
         end_time: this.end_time,
503
         end_time: this.end_time,
475
         type: this.type,
504
         type: this.type,
476
         keywords:this.searchKey,
505
         keywords:this.searchKey,
506
+        storehouse_id:this.storehouse_id,
477
       };
507
       };
478
       this.Warehouse.warehouseDate = [];
508
       this.Warehouse.warehouseDate = [];
479
       getDrugWarehouseList(Params).then(response => {
509
       getDrugWarehouseList(Params).then(response => {
487
           for (let i = 0; i < response.data.data.list.length; i++) {
517
           for (let i = 0; i < response.data.data.list.length; i++) {
488
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
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
     },
584
     },
550
     fetchAllAdminUsers() {
585
     fetchAllAdminUsers() {
551
       fetchAllAdminUsers().then(response => {
586
       fetchAllAdminUsers().then(response => {
552
-        console.log(response);
587
+       
553
         if (response.data.state == 1) {
588
         if (response.data.state == 1) {
554
           this.adminUserOptions = response.data.data.users;
589
           this.adminUserOptions = response.data.data.users;
555
-          console.log("制单人2222222",this.adminUserOptions)
590
+         
556
           var alen = this.adminUserOptions.length;
591
           var alen = this.adminUserOptions.length;
557
           for (let index = 0; index < alen; index++) {
592
           for (let index = 0; index < alen; index++) {
558
             if (this.adminUserOptions[index].user_type == 2) {
593
             if (this.adminUserOptions[index].user_type == 2) {
563
       });
598
       });
564
     },
599
     },
565
     clicks: function() {
600
     clicks: function() {
566
-      console.log(this.WarehouseInfo.warehouseInfoDate);
567
     },
601
     },
568
     handleWarehouse: function() {
602
     handleWarehouse: function() {
569
       this.$router.push({ path: "/drugstock/in/add", query: { type: this.type } });
603
       this.$router.push({ path: "/drugstock/in/add", query: { type: this.type } });
619
     handleEdit:function(index,row){
653
     handleEdit:function(index,row){
620
        this.$router.push({
654
        this.$router.push({
621
          name:"drugStockInOrderEdit",
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
     handleSearch(id){
659
     handleSearch(id){
631
       const params = {
665
       const params = {
632
         id: order_id
666
         id: order_id
633
       };
667
       };
634
-      console.log("parasm222222222",params)
668
+
635
       this.WarehouseInfo.warehouseInfoDate = []
669
       this.WarehouseInfo.warehouseInfoDate = []
636
       getDrugWarehouseInfoList(params).then(response => {
670
       getDrugWarehouseInfoList(params).then(response => {
637
         if (response.data.state == 0) {
671
         if (response.data.state == 0) {
638
           this.$message.error(response.data.msg);
672
           this.$message.error(response.data.msg);
639
           return false;
673
           return false;
640
         } else {
674
         } else {
641
-          console.log("hhhhhhhhhh",response.data.data.info)
675
+         
642
           for (let i = 0; i < response.data.data.info.length; i++) {
676
           for (let i = 0; i < response.data.data.info.length; i++) {
643
             this.showOne = true
677
             this.showOne = true
644
             this.WarehouseInfo.warehouseInfoDate.push(response.data.data.info[i]);
678
             this.WarehouseInfo.warehouseInfoDate.push(response.data.data.info[i]);
645
-            console.log("列表详情",this.WarehouseInfo.warehouseInfoDate)
679
+           
646
           }
680
           }
647
           this.WarehouseInfo.warehouse = response.data.data.warehousing;
681
           this.WarehouseInfo.warehouse = response.data.data.warehousing;
648
           this.getAllDrugList()
682
           this.getAllDrugList()
650
       });
684
       });
651
     },
685
     },
652
     handleDelete: function(index, row) {
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
       if(row.supply_warehouse_id >0 ){
691
       if(row.supply_warehouse_id >0 ){
655
         this.$message.error("自动入库数据不能删除!")
692
         this.$message.error("自动入库数据不能删除!")
656
         return false
693
         return false
717
       const ids = [];
754
       const ids = [];
718
       const idOne = []
755
       const idOne = []
719
       for (let i = 0; i < this.selectedTableData.length; i++) {
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
         ids.push(this.selectedTableData[i].id);
761
         ids.push(this.selectedTableData[i].id);
721
         idOne.push(this.selectedTableData[i].supply_warehouse_id)
762
         idOne.push(this.selectedTableData[i].supply_warehouse_id)
722
       }
763
       }
723
-      console.log("idson233223233223",idOne)
764
+     
724
       for(let i=0;i<idOne.length;i++){
765
       for(let i=0;i<idOne.length;i++){
725
         if(idOne[i] >0 ){
766
         if(idOne[i] >0 ){
726
            this.$message.error("自动入库数据不能删除!")
767
            this.$message.error("自动入库数据不能删除!")
830
       exportDrugList(params).then(response=>{
871
       exportDrugList(params).then(response=>{
831
          if(response.data.state == 1){
872
          if(response.data.state == 1){
832
           var list =  response.data.data.list
873
           var list =  response.data.data.list
833
-          console.log("list23232323",list)
874
+          
834
           for(let i=0;i<list.length;i++){
875
           for(let i=0;i<list.length;i++){
835
             list[i].product_date = this.getTime(list[i].product_date)
876
             list[i].product_date = this.getTime(list[i].product_date)
836
             list[i].expiry_date = this.getTime(list[i].expiry_date)
877
             list[i].expiry_date = this.getTime(list[i].expiry_date)
839
           var manufacturerList = response.data.data.manufacturerList
880
           var manufacturerList = response.data.data.manufacturerList
840
           this.manufacturerList = manufacturerList
881
           this.manufacturerList = manufacturerList
841
           var dealerList = response.data.data.dealerList
882
           var dealerList = response.data.data.dealerList
842
-          console.log("经销是,",dealerList)
883
+        
843
           this.dealerList = dealerList
884
           this.dealerList = dealerList
844
          }
885
          }
845
       })
886
       })
849
       if(this.order_id == ""){
890
       if(this.order_id == ""){
850
         this.$message.error("请勾选入库单")
891
         this.$message.error("请勾选入库单")
851
       }
892
       }
852
-      console.log("hhhh2323",this.exportList)
853
       for(let i=0;i<this.exportList.length;i++){
893
       for(let i=0;i<this.exportList.length;i++){
854
         this.exportList[i].index = i+1
894
         this.exportList[i].index = i+1
855
         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
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
       }
915
       }
876
       
916
       
877
       import('@/vendor/Export2Excel').then(excel => {
917
       import('@/vendor/Export2Excel').then(excel => {
878
-        console.log("232323",this.drugTypeList)
879
-        console.log("hhh23",this.exportList)
880
          for(let i=0;i<this.exportList.length;i++){
918
          for(let i=0;i<this.exportList.length;i++){
881
            for(let j=0;j<this.drugTypeList.length;j++){
919
            for(let j=0;j<this.drugTypeList.length;j++){
882
              if(this.exportList[i].drug_type == this.drugTypeList[j].id){
920
              if(this.exportList[i].drug_type == this.drugTypeList[j].id){
889
         const filterVal = ['index','drug_name', 'drug_type','unit','batch_number','warehousing_count','price','total_price','manufacturer','product_date','expiry_date','dealer','number','remark']
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
         const data = this.formatJson(filterVal, this.exportList)
932
         const data = this.formatJson(filterVal, this.exportList)
895
         excel.export_json_to_excel({
933
         excel.export_json_to_excel({
903
    formatJson(filterVal, jsonData) {
941
    formatJson(filterVal, jsonData) {
904
     return jsonData.map(v => filterVal.map(j => v[j]));
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
 </script>
958
 </script>

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

23
 
23
 
24
 
24
 
25
       <div class="cell clearfix">
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
         <label class="title"><span class="name">入库时间</span> : </label>
35
         <label class="title"><span class="name">入库时间</span> : </label>
27
         <el-date-picker size="small" v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false"
36
         <el-date-picker size="small" v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false"
28
                         style="width: 196px;" type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
37
                         style="width: 196px;" type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
452
         totalPrice:0,
461
         totalPrice:0,
453
         unitList:[],
462
         unitList:[],
454
         loading:false,
463
         loading:false,
464
+        list:[],
465
+        storehouse_id:"",
455
       }
466
       }
456
     },
467
     },
457
     methods: {
468
     methods: {
527
           } else {
538
           } else {
528
             this.manufacturer = response.data.data.manufacturer;
539
             this.manufacturer = response.data.data.manufacturer;
529
             this.dealer = response.data.data.dealer;
540
             this.dealer = response.data.data.dealer;
530
-            console.log("2222333333",response.data.data.drugs)
541
+            
531
             for(let i = 0; i<  response.data.data.drugs.length;i++){
542
             for(let i = 0; i<  response.data.data.drugs.length;i++){
532
               this.goodType.push(response.data.data.drugs[i])
543
               this.goodType.push(response.data.data.drugs[i])
533
               if(response.data.data.drugs[i].drug_specs != null) {
544
               if(response.data.data.drugs[i].drug_specs != null) {
541
 
552
 
542
             this.form.manufacturer = 0
553
             this.form.manufacturer = 0
543
             this.form.dealer = 0
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
           loading.close()
558
           loading.close()
546
 
559
 
631
           manufacturer_id: this.form.manufacturer,
644
           manufacturer_id: this.form.manufacturer,
632
           dealer_id: this.form.dealer
645
           dealer_id: this.form.dealer
633
         }
646
         }
634
-        console.log("2222",this.form.dealer)
647
+      
635
         GetAllDrugInfoByID(params).then(response => {
648
         GetAllDrugInfoByID(params).then(response => {
636
           
649
           
637
             if (response.data.state == 0) {
650
             if (response.data.state == 0) {
708
           if (valid) {
721
           if (valid) {
709
             this.loading = true
722
             this.loading = true
710
             const array = this.recordInfo.recordData
723
             const array = this.recordInfo.recordData
711
-          
724
+            if(this.storehouse_id == 0){
725
+             this.$message.error("仓库不能为空!")
726
+             return false
727
+            }
712
             for (let i = 0; i < array.length; i++) {
728
             for (let i = 0; i < array.length; i++) {
713
 
729
 
714
               if (array[i].drug_id == 0) {
730
               if (array[i].drug_id == 0) {
745
             const params = {
761
             const params = {
746
               'stockIn': this.recordInfo.recordData
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
               if (response.data.state == 0) {
766
               if (response.data.state == 0) {
752
                 this.loading = false
767
                 this.loading = false
753
                 this.$message.error(response.data.msg)
768
                 this.$message.error(response.data.msg)
814
             searchArray = response.data.data.list;
829
             searchArray = response.data.data.list;
815
             
830
             
816
              var list = response.data.data.list
831
              var list = response.data.data.list
817
-             console.log("猎豹22222222222",list)
832
+            
818
 
833
 
819
              this.drugList = list
834
              this.drugList = list
820
              var manufacturerList = response.data.data.manufacturerList
835
              var manufacturerList = response.data.data.manufacturerList
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 Dosyayı Görüntüle

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

+ 72 - 28
src/xt_pages/stock/drugs/drugStockOutOrder.vue Dosyayı Görüntüle

13
     </div>
13
     </div>
14
     <div class="app-container">
14
     <div class="app-container">
15
       <div class="cell clearfix">
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
         <el-input
25
         <el-input
17
           size="small"
26
           size="small"
18
-          style="width: 400px;"
27
+          style="width: 200px;"
19
           class="filter-item"
28
           class="filter-item"
20
           v-model.trim="searchKey"
29
           v-model.trim="searchKey"
21
           placeholder="单据编码/制单人/厂商"
30
           placeholder="单据编码/制单人/厂商"
103
           </template>
112
           </template>
104
         </el-table-column>
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
         <el-table-column label="制单人" align="center">
121
         <el-table-column label="制单人" align="center">
107
           <template slot-scope="scope">
122
           <template slot-scope="scope">
108
             {{ getXuserName(scope.row.creater) }}
123
             {{ getXuserName(scope.row.creater) }}
115
           </template>
130
           </template>
116
           <template slot-scope="scope">
131
           <template slot-scope="scope">
117
             <span v-if="scope.row.is_sys == 1">{{"自动出库"}}</span>
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
           </template>
135
           </template>
127
         </el-table-column>
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
         <el-table-column label="操作" align="center" width="240">
139
         <el-table-column label="操作" align="center" width="240">
137
           <template slot-scope="scope">
140
           <template slot-scope="scope">
138
 
141
 
216
               {{scope.row.medical_insurance_number}}
219
               {{scope.row.medical_insurance_number}}
217
             </template>
220
             </template>
218
           </el-table-column>
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
           <el-table-column label="出库数量" align="center">
228
           <el-table-column label="出库数量" align="center">
220
             <template slot-scope="scope">
229
             <template slot-scope="scope">
221
               <!-- <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> -->
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
               <span> {{getTotalCountOne(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}</span>
231
               <span> {{getTotalCountOne(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}</span>
223
             </template>
232
             </template>
224
           </el-table-column>
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
             <template slot-scope="scope">
240
             <template slot-scope="scope">
227
               <span v-if="scope.row.price > 0"> {{scope.row.price}}</span>
241
               <span v-if="scope.row.price > 0"> {{scope.row.price}}</span>
228
               <span v-if="scope.row.price == 0"> {{scope.row.retail_price}}</span>
242
               <span v-if="scope.row.price == 0"> {{scope.row.retail_price}}</span>
235
           </el-table-column> -->
249
           </el-table-column> -->
236
           <el-table-column label="总价" align="center">
250
           <el-table-column label="总价" align="center">
237
             <template slot-scope="scope">
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
             </template>
254
             </template>
241
           </el-table-column>
255
           </el-table-column>
242
           <el-table-column label="生产厂家" align="center">
256
           <el-table-column label="生产厂家" align="center">
488
       exportList:[],
502
       exportList:[],
489
       batchNumberList:[],
503
       batchNumberList:[],
490
       drugFlowList:[],
504
       drugFlowList:[],
505
+      houseList:[],
506
+      storehouse_id:0,
507
+      is_sys:0,
491
     };
508
     };
492
   },
509
   },
493
   methods: {
510
   methods: {
498
         start_time: this.start_time,
515
         start_time: this.start_time,
499
         end_time: this.end_time,
516
         end_time: this.end_time,
500
         type: this.type,
517
         type: this.type,
501
-        keywords: this.searchKey
518
+        keywords: this.searchKey,
519
+        storehouse_id:this.storehouse_id,
502
       };
520
       };
503
       this.warehouseOutDate = [];
521
       this.warehouseOutDate = [];
504
       getDrugWarehouseOutList(Params).then(response => {
522
       getDrugWarehouseOutList(Params).then(response => {
510
           for (let i = 0; i < response.data.data.list.length; i++) {
528
           for (let i = 0; i < response.data.data.list.length; i++) {
511
             this.warehouseOutDate.push(response.data.data.list[i]);
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
         start_time: this.start_time,
545
         start_time: this.start_time,
527
         end_time: this.end_time,
546
         end_time: this.end_time,
528
         type: this.type,
547
         type: this.type,
529
-        keywords: this.searchKey
548
+        keywords: this.searchKey,
549
+        storehouse_id:this.storehouse_id,
530
       };
550
       };
531
       this.warehouseOutDate = [];
551
       this.warehouseOutDate = [];
532
       getDrugWarehouseOutList(Params).then(response => {
552
       getDrugWarehouseOutList(Params).then(response => {
538
           for (let i = 0; i < response.data.data.list.length; i++) {
558
           for (let i = 0; i < response.data.data.list.length; i++) {
539
             this.warehouseOutDate.push(response.data.data.list[i]);
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
       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})
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
     handleSearch(val){
658
     handleSearch(val){
634
-
659
+       this.is_sys = val.is_sys
635
        this.getInitializtion()
660
        this.getInitializtion()
636
        this.getSinleOrderDetail(val.id,val.warehouse_out_time,val.is_sys)
661
        this.getSinleOrderDetail(val.id,val.warehouse_out_time,val.is_sys)
637
        this.list = []
662
        this.list = []
639
     },
664
     },
640
 
665
 
641
     handleDelete: function(index, row) {
666
     handleDelete: function(index, row) {
667
+      if(row.is_sys == 12){
668
+       this.$message.error("调拨出库数据不能删除!")
669
+       return
670
+      }
642
       if(row.supply_cancel_out_id >0){
671
       if(row.supply_cancel_out_id >0){
643
         this.$message.error("采购出库数据不能删除!")
672
         this.$message.error("采购出库数据不能删除!")
644
         return
673
         return
711
           this.$message.error("自动出库数据不能删除!")
740
           this.$message.error("自动出库数据不能删除!")
712
           return false
741
           return false
713
         }
742
         }
743
+        if(this.selectedTableData[i].is_sys == 12){
744
+          this.$message.error("调拨出库数据不能删除!")
745
+          return false
746
+        }
714
         if(this.selectedTableData[i].is_sys == 0){
747
         if(this.selectedTableData[i].is_sys == 0){
715
           ids.push(this.selectedTableData[i].id);
748
           ids.push(this.selectedTableData[i].id);
716
           idsOne.push(this.selectedTableData[i].supply_cancel_out_id)
749
           idsOne.push(this.selectedTableData[i].supply_cancel_out_id)
924
          id:id,
957
          id:id,
925
          start_time:start_time,
958
          start_time:start_time,
926
        }
959
        }
927
-      console.log("is_sys22222",is_sys)
928
      getSinleOrderDetail(params).then(response=>{
960
      getSinleOrderDetail(params).then(response=>{
929
         if(response.data.state == 1){
961
         if(response.data.state == 1){
930
           this.tableShow = true
962
           this.tableShow = true
934
          this.manufacturerList = response.data.data.manufacturerList
966
          this.manufacturerList = response.data.data.manufacturerList
935
          this.dealerList = response.data.data.dealerList
967
          this.dealerList = response.data.data.dealerList
936
          var drugFlowList = response.data.data.drugFlowList
968
          var drugFlowList = response.data.data.drugFlowList
969
+        
937
          if (is_sys == 1){
970
          if (is_sys == 1){
938
            if(drugFlowList.length >0){
971
            if(drugFlowList.length >0){
939
             for(let i=0;i<drugFlowList.length;i++){
972
             for(let i=0;i<drugFlowList.length;i++){
949
         
982
         
950
             this.drugFlowList = drugFlowList
983
             this.drugFlowList = drugFlowList
951
          }
984
          }
952
-         if(is_sys == 0){
985
+         if(is_sys == 0 || is_sys == 12){
953
             var flowlist = response.data.data.flowlist
986
             var flowlist = response.data.data.flowlist
954
             this.drugFlowList = []
987
             this.drugFlowList = []
955
             for(let i=0;i<flowlist.length;i++){
988
             for(let i=0;i<flowlist.length;i++){
972
               list[i].number = ""
1005
               list[i].number = ""
973
            }
1006
            }
974
          }
1007
          }
975
-         console.log("list233223323233223",list)
1008
+        
976
          this.tableList = list
1009
          this.tableList = list
977
         }
1010
         }
978
      })
1011
      })
995
 
1028
 
996
           this.drugDialogVisible = true
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
           this.drugDialogVisibleTwo = true
1033
           this.drugDialogVisibleTwo = true
1001
         }
1034
         }
1094
          return str + min_str
1127
          return str + min_str
1095
       },
1128
       },
1096
       getTotalCountOne(id,min_number,max_unit,min_unit){
1129
       getTotalCountOne(id,min_number,max_unit,min_unit){
1097
-        console.log("hhhahdhhff",this.drugFlowList)
1098
         var arr = []
1130
         var arr = []
1099
         for(let i=0;i<this.drugFlowList.length;i++){
1131
         for(let i=0;i<this.drugFlowList.length;i++){
1100
           if(id == this.drugFlowList[i].drug_id){
1132
           if(id == this.drugFlowList[i].drug_id){
1237
 
1269
 
1238
         return  all_price
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
 </script>
1286
 </script>

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

27
     <div class="app-container">
27
     <div class="app-container">
28
   
28
   
29
       <div class="cell clearfix">
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
         <label class="title"><span class="name">出库时间</span> : </label>
39
         <label class="title"><span class="name">出库时间</span> : </label>
31
         <el-date-picker
40
         <el-date-picker
32
           size="small"
41
           size="small"
141
             </template>
150
             </template>
142
 
151
 
143
           </el-table-column>
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
           <el-table-column width="120" align="center">
167
           <el-table-column width="120" align="center">
145
             <template slot="header" slot-scope="scope">
168
             <template slot="header" slot-scope="scope">
146
               <span>出货价<span style="color: red">*</span></span>
169
               <span>出货价<span style="color: red">*</span></span>
346
       unitList:[],
369
       unitList:[],
347
       numberList:[],
370
       numberList:[],
348
       listLoading: false,
371
       listLoading: false,
372
+      storehouse_id:"",
373
+      list:[],
374
+      doctorList:[],
349
     };
375
     };
350
   },
376
   },
351
   methods: {
377
   methods: {
382
 
408
 
383
           this.form.manufacturer = 0
409
           this.form.manufacturer = 0
384
           this.form.dealer = 0
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
         loading.close()
415
         loading.close()
387
 
416
 
424
       tempObj["warehouse_info_id"] = 0
453
       tempObj["warehouse_info_id"] = 0
425
       tempObj["dealer"] = ""
454
       tempObj["dealer"] = ""
426
       tempObj['manufacturer'] = ''
455
       tempObj['manufacturer'] = ''
456
+      tempObj["admin_user_id"] =  this.$store.getters.xt_user.user.user_name
427
       this.recordInfo.recordData.push(tempObj);
457
       this.recordInfo.recordData.push(tempObj);
428
     },
458
     },
429
     handleDelete: function(index, row) {
459
     handleDelete: function(index, row) {
521
             }
551
             }
522
             total = total + array[i].price * array[i].return_count;
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
           if (this.recordInfo.recordData.length <= 0) {
558
           if (this.recordInfo.recordData.length <= 0) {
525
             this.$message.success("请添加出库商品");
559
             this.$message.success("请添加出库商品");
526
             return;
560
             return;
548
                 this.recordInfo.recordData[i].batch_number = this.numberList[y].batch_number
582
                 this.recordInfo.recordData[i].batch_number = this.numberList[y].batch_number
549
                 this.recordInfo.recordData[i].warehouse_info_id = this.numberList[y].id
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
           const params = {
594
           const params = {
555
             stockOut: this.recordInfo.recordData
595
             stockOut: this.recordInfo.recordData
556
           };
596
           };
557
-          console.log("param23323232",params)
597
+       
558
          
598
          
559
           const loading = this.$loading({
599
           const loading = this.$loading({
560
             lock: true,
600
             lock: true,
567
             this.warehouse_out_time,
607
             this.warehouse_out_time,
568
             this.form.dealer,
608
             this.form.dealer,
569
             this.form.manufacturer,
609
             this.form.manufacturer,
570
-            this.type
610
+            this.type,
611
+            this.storehouse_id
571
           ).then(response => {
612
           ).then(response => {
572
             if (response.data.state == 0) {
613
             if (response.data.state == 0) {
573
               this.$message.error("库存不足");
614
               this.$message.error("库存不足");
623
           if (response.data.state == 1) {
664
           if (response.data.state == 1) {
624
             searchArray = response.data.data.list;
665
             searchArray = response.data.data.list;
625
              var list = response.data.data.list
666
              var list = response.data.data.list
626
-             console.log("list99999999",list)
667
+     
627
              this.drugList = list
668
              this.drugList = list
628
              var manufacturerList = response.data.data.manufacturerList
669
              var manufacturerList = response.data.data.manufacturerList
629
              this.manufacturerList = manufacturerList
670
              this.manufacturerList = manufacturerList
630
              var dealerList = response.data.data.dealerList
671
              var dealerList = response.data.data.dealerList
631
              this.dealerList = dealerList
672
              this.dealerList = dealerList
632
-             console.log("经销商",this.dealerList)
673
+           
633
              for(let i=0;i<this.drugList.length;i++){
674
              for(let i=0;i<this.drugList.length;i++){
634
                 for(let j=0;j<this.manufacturerList.length;j++){
675
                 for(let j=0;j<this.manufacturerList.length;j++){
635
                   if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
676
                   if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
659
             arr.push(this.recordInfo.recordData[i].drug_id)
700
             arr.push(this.recordInfo.recordData[i].drug_id)
660
          }
701
          }
661
          var str = arr.join(",")
702
          var str = arr.join(",")
662
-         console.log("str",str)
703
+       
663
          if(str.indexOf(val.id)!=-1){
704
          if(str.indexOf(val.id)!=-1){
664
             this.$message.error("该药品已存在列表中")
705
             this.$message.error("该药品已存在列表中")
665
             return
706
             return
706
         getDrugBatchNumber(params).then(response=>{
747
         getDrugBatchNumber(params).then(response=>{
707
            if(response.data.state == 1){
748
            if(response.data.state == 1){
708
              var list = response.data.data.list
749
              var list = response.data.data.list
709
-             console.log("list2222",list)
750
+            
710
              this.numberList = []
751
              this.numberList = []
711
              this.numberList = list
752
              this.numberList = list
712
            }
753
            }
713
         })
754
         })
714
       },
755
       },
715
       changeUnit(val){
756
       changeUnit(val){
716
-        console.log("val2323232322323",val,this.recordInfo.recordData)
757
+       
717
         this.getDrugBatchNumber(val.drug_id)
758
         this.getDrugBatchNumber(val.drug_id)
718
         for(let i=0;i<this.recordInfo.recordData.length;i++){
759
         for(let i=0;i<this.recordInfo.recordData.length;i++){
719
           if(this.recordInfo.recordData[i].drug_id == val.drug_id){
760
           if(this.recordInfo.recordData[i].drug_id == val.drug_id){
732
         }
773
         }
733
       },
774
       },
734
       changeBatchNumber(val){
775
       changeBatchNumber(val){
735
-        console.log("val",val)
776
+       
736
         this.getDrugBatchNumber(val.drug_id)
777
         this.getDrugBatchNumber(val.drug_id)
737
         for(let i=0;i<this.recordInfo.recordData.length;i++){
778
         for(let i=0;i<this.recordInfo.recordData.length;i++){
738
             if(this.currentIndex == i){
779
             if(this.currentIndex == i){
775
     tempObj["number"] = ""
816
     tempObj["number"] = ""
776
     tempObj["warehouse_info_id"] = 0
817
     tempObj["warehouse_info_id"] = 0
777
     tempObj["count"] = ""
818
     tempObj["count"] = ""
819
+    tempObj["admin_user_id"] =  this.$store.getters.xt_user.user.user_name
778
     this.recordInfo.recordData.push(tempObj);
820
     this.recordInfo.recordData.push(tempObj);
779
     this.GetConfigInfo();
821
     this.GetConfigInfo();
780
     this.propForm.goodUnit = this.$store.getters.good_unit;
822
     this.propForm.goodUnit = this.$store.getters.good_unit;

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

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

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

21
         v-on:dialog-cancle="cancle"
21
         v-on:dialog-cancle="cancle"
22
       >
22
       >
23
       </drugs-stock-dialog>
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
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
51
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
27
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
52
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
133
 
158
 
134
             </template>
159
             </template>
135
           </el-table-column>
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
          <el-table-column width="120" align="center">
173
          <el-table-column width="120" align="center">
137
             <template slot="header" slot-scope="scope">
174
             <template slot="header" slot-scope="scope">
138
               <span>出货价<span style="color: red">*</span></span>
175
               <span>出货价<span style="color: red">*</span></span>
334
         drug_show:false,
371
         drug_show:false,
335
         unitList:[],
372
         unitList:[],
336
         unitShow:true,
373
         unitShow:true,
337
-        numberList:[]
374
+        numberList:[],
375
+        houstList:[],
376
+        storehouse_id:"",
338
       }
377
       }
339
     },
378
     },
340
     methods: {
379
     methods: {
429
         return name;
468
         return name;
430
       },
469
       },
431
        handleEdit: function(index, row) {
470
        handleEdit: function(index, row) {
471
+        if(parseInt(this.$route.query.is_sys) == 12){
472
+          this.$message.error("调拨出库数据不能新增!")
473
+          return
474
+        }
432
         if(row.supply_cancel_out_id >0){
475
         if(row.supply_cancel_out_id >0){
433
          this.$message.error("采购出库数据不能新增!")
476
          this.$message.error("采购出库数据不能新增!")
434
          return
477
          return
451
         tempObj['dealer'] = ""
494
         tempObj['dealer'] = ""
452
         tempObj['manufacturer'] = ""
495
         tempObj['manufacturer'] = ""
453
         tempObj['warehouse_info_id'] = 0
496
         tempObj['warehouse_info_id'] = 0
497
+        tempObj["admin_user_id"] =  this.$store.getters.xt_user.user.user_name
454
         this.recordInfo.recordData.push(tempObj)
498
         this.recordInfo.recordData.push(tempObj)
455
       }, handleDelete: function(index, row) {
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
         if(row.supply_cancel_out_id >0){
504
         if(row.supply_cancel_out_id >0){
458
          this.$message.error("采购出库数据不能删除!")
505
          this.$message.error("采购出库数据不能删除!")
459
          return
506
          return
591
                      this.recordInfo.recordData[i].warehouse_info_id =  this.numberList[y].id
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
             const loading = this.$loading({
649
             const loading = this.$loading({
597
               lock: true,
650
               lock: true,
602
             const params = {
655
             const params = {
603
               'stockOut': this.recordInfo.recordData
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
               if (response.data.state == 0) {
660
               if (response.data.state == 0) {
609
                 this.$message.error(response.data.msg)
661
                 this.$message.error(response.data.msg)
610
                 loading.close()
662
                 loading.close()
692
               }
744
               }
693
 
745
 
694
             this.warehouseOut = response.data.data.info
746
             this.warehouseOut = response.data.data.info
747
+            this.storehouse_id = response.data.data.info.storehouse_id
695
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
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
           if (this.recordInfo.recordData.length == 0) {
753
           if (this.recordInfo.recordData.length == 0) {
818
       if(sys == 1){
871
       if(sys == 1){
819
         this.drug_show = true
872
         this.drug_show = true
820
       }
873
       }
874
+      if(sys == 12){
875
+        this.drug_show = true
876
+      }
821
       if(parseInt(this.$route.query.supply_cancel_out_id)>0){
877
       if(parseInt(this.$route.query.supply_cancel_out_id)>0){
822
         this.drug_show = true
878
         this.drug_show = true
823
       }
879
       }

+ 41 - 3
src/xt_pages/stock/drugs/inventory.vue Dosyayı Görüntüle

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
     <div v-show="showSearch">
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
      <el-autocomplete
13
      <el-autocomplete
5
         class="checkSearch"
14
         class="checkSearch"
6
         popper-class="my-autocomplete"
15
         popper-class="my-autocomplete"
62
                     {{scope.row.manufacturer_name}}
71
                     {{scope.row.manufacturer_name}}
63
                   </template> 
72
                   </template> 
64
               </el-table-column>
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
               <el-table-column prop="name" label="盘点前数量" width="180"  align="center">
79
               <el-table-column prop="name" label="盘点前数量" width="180"  align="center">
66
                 <template slot-scope="scope">
80
                 <template slot-scope="scope">
67
                     <span><el-input style="width:50px" v-model="scope.row.stock_max_number" :disabled="true"></el-input>{{scope.row.max_unit}}</span> 
81
                     <span><el-input style="width:50px" v-model="scope.row.stock_max_number" :disabled="true"></el-input>{{scope.row.max_unit}}</span> 
96
               </el-table-column>
110
               </el-table-column>
97
           </el-table>
111
           </el-table>
98
       </el-collapse-item>
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
       <el-autocomplete
122
       <el-autocomplete
100
           class="checkSearch"
123
           class="checkSearch"
101
           popper-class="my-autocomplete"
124
           popper-class="my-autocomplete"
166
                 proof_count:"",
189
                 proof_count:"",
167
                 min_count:"",
190
                 min_count:"",
168
                 min_unit:"",
191
                 min_unit:"",
192
+                storehouse_id:"",
169
             },
193
             },
170
             total: 0,
194
             total: 0,
171
             editdialogVisible:false,
195
             editdialogVisible:false,
201
             showTableOne:false,
225
             showTableOne:false,
202
             panShow:true,
226
             panShow:true,
203
             panOneShow:true,
227
             panOneShow:true,
228
+            houseList:[],
229
+            storehouse_id:"",
204
         }
230
         }
205
     },
231
     },
206
     methods:{
232
     methods:{
234
             }
260
             }
235
              var params = {
261
              var params = {
236
                 keyword:key,
262
                 keyword:key,
263
+                storehouse_id:this.storehouse_id,
237
              }
264
              }
238
             
265
             
239
             postSearchDrugWarehouseList(params).then(response => {
266
             postSearchDrugWarehouseList(params).then(response => {
279
             return
306
             return
280
           }
307
           }
281
            var params = {
308
            var params = {
282
-              id:val.drug_id
309
+              id:val.drug_id,
310
+              storehouse_id:this.storehouse_id,
283
             }
311
             }
284
            getDrugWarehouseInfoList(params).then(response=>{
312
            getDrugWarehouseInfoList(params).then(response=>{
285
              if(response.data.state == 1){
313
              if(response.data.state == 1){
566
               
594
               
567
               this.doctorList =  response.data.data.doctorList
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
        var params = {
890
        var params = {
861
          tableData:arr
891
          tableData:arr
862
        }
892
        }
863
-      console.log("paramse32323232",params)
893
+     
864
       saveInentoryList(params).then(response=>{
894
       saveInentoryList(params).then(response=>{
865
         if(response.data.state == 1){
895
         if(response.data.state == 1){
866
            var inventory = response.data.data.inventory
896
            var inventory = response.data.data.inventory
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
     created(){
914
     created(){
876
       this.unitList =  this.getDataConfig('hemodialysis','units')
915
       this.unitList =  this.getDataConfig('hemodialysis','units')
877
-      console.log("单位",this.unitList)
878
       this.getlist()
916
       this.getlist()
879
     },
917
     },
880
     mounted() {
918
     mounted() {

+ 41 - 3
src/xt_pages/stock/drugs/inventoryDetails.vue Dosyayı Görüntüle

2
     <div>
2
     <div>
3
         <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom:10px;">
3
         <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom:10px;">
4
             <div>
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
                 <el-input
13
                 <el-input
6
                 size="small"
14
                 size="small"
7
                 style="width: 200px;margin-left:10px;"
15
                 style="width: 200px;margin-left:10px;"
61
                    {{getTime(scope.row.expiry_date)}}
69
                    {{getTime(scope.row.expiry_date)}}
62
                 </template>  
70
                 </template>  
63
             </el-table-column>
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
            <el-table-column prop="name" label="盘点前数量" width="100"  align="center">
79
            <el-table-column prop="name" label="盘点前数量" width="100"  align="center">
66
                 <template slot-scope="scope">
80
                 <template slot-scope="scope">
117
             total: 0,
131
             total: 0,
118
             limit:10,
132
             limit:10,
119
             page:1,
133
             page:1,
120
-            
134
+            storehouse_id:0,
121
         }
135
         }
122
     },
136
     },
123
     methods:{
137
     methods:{
140
               limit:this.limit,
154
               limit:this.limit,
141
               page:this.page,
155
               page:this.page,
142
               keyword:this.searchKey,
156
               keyword:this.searchKey,
157
+              storehouse_id:this.storehouse_id,
143
             }
158
             }
144
         
159
         
145
           getInventoryDetailList(params).then(response=>{
160
           getInventoryDetailList(params).then(response=>{
146
              if(response.data.state == 1){
161
              if(response.data.state == 1){
147
               this.total =  response.data.data.total
162
               this.total =  response.data.data.total
148
               this.tableData = response.data.data.list
163
               this.tableData = response.data.data.list
149
-              console.log("比阿哥",this.tableData)
164
+           
150
               this.doctorList = response.data.data.doctorList
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
             return uParseTime(val, '{y}-{m}-{d}')
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
     created(){
208
     created(){
171
       this.getlist()
209
       this.getlist()

+ 234 - 35
src/xt_pages/stock/drugs/query.vue Dosyayı Görüntüle

30
     </div>
30
     </div>
31
     <div class="app-container ">
31
     <div class="app-container ">
32
       <div class="cell clearfix">
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
             <el-option
58
             <el-option
35
               v-for="(item,index) in drugTypeList"
59
               v-for="(item,index) in drugTypeList"
36
               :key="index"
60
               :key="index"
37
               :label="item.name"
61
               :label="item.name"
38
               :value="item.id">
62
               :value="item.id">
39
             </el-option>
63
             </el-option>
40
-        </el-select>
41
-         <el-date-picker
64
+        </el-select> -->
65
+         <!-- <el-date-picker
42
             v-model="start_time"
66
             v-model="start_time"
43
             prefix-icon="el-icon-date"
67
             prefix-icon="el-icon-date"
44
             :editable="false"
68
             :editable="false"
61
               format="yyyy-MM-dd"
85
               format="yyyy-MM-dd"
62
               value-format="yyyy-MM-dd"
86
               value-format="yyyy-MM-dd"
63
               @change="endTimeChange"
87
               @change="endTimeChange"
64
-          ></el-date-picker>
65
-          <el-input
88
+          ></el-date-picker> -->
89
+          <!-- <el-input
66
             style="width: 200px;"
90
             style="width: 200px;"
67
             class="filter-item"
91
             class="filter-item"
68
             v-model.trim="keywords"
92
             v-model.trim="keywords"
75
             icon="el-icon-search"
99
             icon="el-icon-search"
76
             @click="search"
100
             @click="search"
77
           >搜索
101
           >搜索
78
-          </el-button>
102
+          </el-button> -->
79
       </div>
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
            <template slot-scope="scope">
108
            <template slot-scope="scope">
85
              {{getDrugType(scope.row.drug_type)}}
109
              {{getDrugType(scope.row.drug_type)}}
86
            </template>
110
            </template>
110
              {{getManufacturerList(scope.row.manufacturer)}}
134
              {{getManufacturerList(scope.row.manufacturer)}}
111
            </template>
135
            </template>
112
         </el-table-column>
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
         <el-table-column prop="drug_name" label="入库数量" align="center">
146
         <el-table-column prop="drug_name" label="入库数量" align="center">
114
            <template slot-scope="scope">
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
            </template>
153
            </template>
119
         </el-table-column>
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
            <template slot-scope="scope">
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
            </template>
162
            </template>
126
         </el-table-column>
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
            <template slot-scope="scope">
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
            </template>
172
            </template>
134
         </el-table-column>
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
            <template slot-scope="scope">
176
            <template slot-scope="scope">
138
             <div v-if="getWarehoseInfo(scope.row.drug_warehouse_info)>0">
177
             <div v-if="getWarehoseInfo(scope.row.drug_warehouse_info)>0">
139
                 {{ 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}}
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
             </div>
179
             </div>
141
            </template>
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
         <el-table-column prop="drug_name" label="操作" align="center" width="200px">
182
         <el-table-column prop="drug_name" label="操作" align="center" width="200px">
151
           <template slot-scope="scope">
183
           <template slot-scope="scope">
152
             <el-button
184
             <el-button
213
       var drugTypeList = getDictionaryDataConfig('system','drug_type')
245
       var drugTypeList = getDictionaryDataConfig('system','drug_type')
214
       this.drugTypeList.push(...drugTypeList)
246
       this.drugTypeList.push(...drugTypeList)
215
       this.org_id =  this.$store.getters.xt_user.org.id
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
     components: {
249
     components: {
222
       SettingDialog,
250
       SettingDialog,
269
         showTwo:false,
297
         showTwo:false,
270
         showThree:true,
298
         showThree:true,
271
         showFour:false,
299
         showFour:false,
300
+        houseList:[],
301
+        medicalList:[],
302
+        storehouse_id:0,
303
+        drug_id:0,
304
+        storeList:[],
272
       }
305
       }
273
     },
306
     },
274
     methods: {
307
     methods: {
281
           drug_type:this.drug_type,
314
           drug_type:this.drug_type,
282
           start_time:this.start_time,
315
           start_time:this.start_time,
283
           end_time:this.end_time,
316
           end_time:this.end_time,
317
+          drug_id:this.drug_id,
318
+          storehouse_id:this.storehouse_id,
284
         }
319
         }
285
         getDrugStockList(params).then(response=>{
320
         getDrugStockList(params).then(response=>{
286
           if(response.data.state == 1){
321
           if(response.data.state == 1){
305
                  }
340
                  }
306
                }
341
                }
307
              }
342
              }
308
-             console.log("列表list232323323232323223",list)
309
              this.tableList = list
343
              this.tableList = list
310
              var total = response.data.data.total
344
              var total = response.data.data.total
311
              this.total = total
345
              this.total = total
312
              this.manufacturerList = response.data.data.manufacturerList
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
            str_min =  over_count%min_number + min_unit
951
            str_min =  over_count%min_number + min_unit
893
          }
952
          }
894
        return str+str_min
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
 </script>
1076
 </script>
950
   .el-table::before {
1128
   .el-table::before {
951
     background-color: #d0d3da;
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
 </style>
1152
 </style>

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

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

+ 110 - 70
src/xt_pages/stock/inventory.vue Dosyayı Görüntüle

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
     <div v-show="showSearch">
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
      <el-autocomplete
13
      <el-autocomplete
5
         class="checkSearch"
14
         class="checkSearch"
6
         popper-class="my-autocomplete"
15
         popper-class="my-autocomplete"
62
                     {{scope.row.manufacturer_name}}
71
                     {{scope.row.manufacturer_name}}
63
                   </template> 
72
                   </template> 
64
               </el-table-column>
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
               <el-table-column prop="name" label="盘点前数量" width="120"  align="center">
80
               <el-table-column prop="name" label="盘点前数量" width="120"  align="center">
66
                 <template slot-scope="scope">
81
                 <template slot-scope="scope">
67
                     <span><el-input style="width:80px" v-model="scope.row.stock_count" :disabled="true"></el-input>{{scope.row.max_unit}}</span> 
82
                     <span><el-input style="width:80px" v-model="scope.row.stock_count" :disabled="true"></el-input>{{scope.row.max_unit}}</span> 
94
               </el-table-column>
109
               </el-table-column>
95
           </el-table>
110
           </el-table>
96
       </el-collapse-item>
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
       <el-autocomplete
121
       <el-autocomplete
98
           class="checkSearch"
122
           class="checkSearch"
99
           popper-class="my-autocomplete"
123
           popper-class="my-autocomplete"
160
                 product_date:"",
184
                 product_date:"",
161
                 number:"",
185
                 number:"",
162
                 proof_count:"",
186
                 proof_count:"",
187
+                storehouse_id:"",
163
             },
188
             },
164
          manufacturerList:[],
189
          manufacturerList:[],
165
          dealerList:[],
190
          dealerList:[],
194
          inventory_total:0,
219
          inventory_total:0,
195
          WarehouseList:[],
220
          WarehouseList:[],
196
          showTableOne:false,
221
          showTableOne:false,
222
+         houseList:[],
223
+         storehouse_id:"",
197
         }
224
         }
198
     },
225
     },
199
     methods:{
226
     methods:{
203
                 key = keyword
230
                 key = keyword
204
             }
231
             }
205
             var params = {
232
             var params = {
206
-              keyword:key
233
+              keyword:key,
234
+              storehouse_id:this.storehouse_id,
207
             }
235
             }
208
             postSearchGoodWarehouseList(params).then(response => {
236
             postSearchGoodWarehouseList(params).then(response => {
209
             if (response.data.state == 1) {
237
             if (response.data.state == 1) {
210
             
238
             
211
                 var list = response.data.data.list
239
                 var list = response.data.data.list
212
-                console.log("列表数据",list)
240
+              
213
                 this.goodList = list
241
                 this.goodList = list
214
                 var manufacturerList = response.data.data.manufacturerList
242
                 var manufacturerList = response.data.data.manufacturerList
215
                 this.manufacturerList = manufacturerList
243
                 this.manufacturerList = manufacturerList
272
           this.page = val
300
           this.page = val
273
           this.getlist()
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
       toDelete(index){
373
       toDelete(index){
342
        this.tableData.splice(index,1)
374
        this.tableData.splice(index,1)
343
      },
375
      },
345
        getInventoryDetail(id).then(response=>{
377
        getInventoryDetail(id).then(response=>{
346
           if(response.data.state == 1){
378
           if(response.data.state == 1){
347
             var detail =  response.data.data.detail
379
             var detail =  response.data.data.detail
348
-            console.log("detial",detail)
380
+         
349
             this.form.good_name = detail.good_name
381
             this.form.good_name = detail.good_name
350
             this.form.specification_name = detail.specification_name
382
             this.form.specification_name = detail.specification_name
351
             this.form.count = detail.count
383
             this.form.count = detail.count
415
     getGoodInventoryWarehouseList(id){
447
     getGoodInventoryWarehouseList(id){
416
        var params = {
448
        var params = {
417
          id:id,
449
          id:id,
450
+         storehouse_id:this.storehouse_id,
418
        }
451
        }
419
       getGoodInventoryWarehouseList(params).then(response=>{
452
       getGoodInventoryWarehouseList(params).then(response=>{
420
          if(response.data.state == 1){
453
          if(response.data.state == 1){
458
                 }
491
                 }
459
               }
492
               }
460
             }
493
             }
461
-          console.log("newList2333232323232",newList)
494
+        
462
           
495
           
463
           this.tableData = newList
496
           this.tableData = newList
464
           this.showSearch = false
497
           this.showSearch = false
497
       })
530
       })
498
     },
531
     },
499
     toMove(item,index){
532
     toMove(item,index){
500
-      console.log("index",item)
501
        this.$confirm('此操作将移除耗材整个批次, 是否继续?', '提示', {
533
        this.$confirm('此操作将移除耗材整个批次, 是否继续?', '提示', {
502
           confirmButtonText: '确定',
534
           confirmButtonText: '确定',
503
           cancelButtonText: '取消',
535
           cancelButtonText: '取消',
542
         
574
         
543
       }
575
       }
544
        var params = {
576
        var params = {
545
-         tableData:arr
577
+         tableData:arr,
578
+         storehouse_id:this.storehouse_id,
546
        }
579
        }
547
-      console.log("params2323323",params)
548
-     
549
       saveStockInentoryList(params).then(response=>{
580
       saveStockInentoryList(params).then(response=>{
550
         if(response.data.state == 1){
581
         if(response.data.state == 1){
551
            var inventory = response.data.data.inventory
582
            var inventory = response.data.data.inventory
554
            this.tableData = []
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
     created(){
599
     created(){

+ 42 - 0
src/xt_pages/stock/inventoryDetails.vue Dosyayı Görüntüle

2
     <div>
2
     <div>
3
         <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom:10px;">
3
         <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom:10px;">
4
             <div>
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
                 <el-input
14
                 <el-input
6
                 size="small"
15
                 size="small"
7
                 style="width: 200px;margin-left:10px;"
16
                 style="width: 200px;margin-left:10px;"
42
                  {{getTime(scope.row.product_date)}}
51
                  {{getTime(scope.row.product_date)}}
43
                </template>
52
                </template>
44
             </el-table-column>
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
             <el-table-column prop="name" label="盘点前数量" width="100" align="center">
61
             <el-table-column prop="name" label="盘点前数量" width="100" align="center">
47
               <template slot-scope="scope">
62
               <template slot-scope="scope">
108
             page:1,
123
             page:1,
109
             ids:"",
124
             ids:"",
110
             damageList:[],
125
             damageList:[],
126
+            storehouse_id:0,
127
+            houseList:[],
111
          }
128
          }
112
     },
129
     },
113
     methods:{
130
     methods:{
134
             keyword:this.searchKey,
151
             keyword:this.searchKey,
135
             limit:this.limit,
152
             limit:this.limit,
136
             page:this.page,
153
             page:this.page,
154
+            storehouse_id:this.storehouse_id,
137
           }
155
           }
138
           this.tableData = []
156
           this.tableData = []
139
           getInventoryDetailList(params).then(response=>{
157
           getInventoryDetailList(params).then(response=>{
143
              
161
              
144
                this.tableData = list
162
                this.tableData = list
145
                this.total = response.data.data.total
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
        },
213
        },
189
       inventoryExportList(){
214
       inventoryExportList(){
190
         this.$router.push({path:'/stock/inventoryPrint'})
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
     created(){
235
     created(){

+ 668 - 116
src/xt_pages/stock/inventoryTransfer/Addtrans.vue Dosyayı Görüntüle

3
     <div class="position">
3
     <div class="position">
4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5
       <div>
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
       </div>
12
       </div>
9
     </div>
13
     </div>
10
-    <div class="app-container">
14
+    <div class="app-container" v-loading="loading">
11
       <div
15
       <div
12
         style="
16
         style="
13
           justify-content: flex-start;
17
           justify-content: flex-start;
16
           align-items: center;
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
           <el-form-item label="单据日期:">
24
           <el-form-item label="单据日期:">
26
             <el-date-picker
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
               type="date"
29
               type="date"
29
               placeholder="选择日期"
30
               placeholder="选择日期"
30
             ></el-date-picker>
31
             ></el-date-picker>
31
           </el-form-item>
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
             </el-select>
51
             </el-select>
37
           </el-form-item>
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
             </el-select>
70
             </el-select>
43
           </el-form-item>
71
           </el-form-item>
44
         </el-form>
72
         </el-form>
45
       </div>
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
     </div>
239
     </div>
140
   </div>
240
   </div>
141
 </template>
241
 </template>
142
 
242
 
143
 <script>
243
 <script>
144
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
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
 export default {
253
 export default {
146
   components: {
254
   components: {
147
     BreadCrumb,
255
     BreadCrumb,
161
         user: "",
269
         user: "",
162
         region: "",
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
     approval() {},
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
     toDetails() {},
394
     toDetails() {},
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
 </script>
746
 </script>
224
 
747
 
225
 <style rel="stylesheet/css" lang="scss" scoped>
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
 </style>
778
 </style>

+ 301 - 38
src/xt_pages/stock/inventoryTransfer/index.vue Dosyayı Görüntüle

18
         "
18
         "
19
       >
19
       >
20
         <div>
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
             size="small"
22
             size="small"
29
             class="filter-item"
23
             class="filter-item"
30
             type="primary"
24
             type="primary"
31
             icon="el-icon-search"
25
             icon="el-icon-search"
32
             @click="search"
26
             @click="search"
33
             >查看</el-button
27
             >查看</el-button
34
-          >
28
+          > -->
35
         </div>
29
         </div>
36
         <div>
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
           <el-button
66
           <el-button
41
             size="small"
67
             size="small"
42
             class="filter-item"
68
             class="filter-item"
60
         <el-table-column type="selection" width="55"> </el-table-column>
86
         <el-table-column type="selection" width="55"> </el-table-column>
61
         <el-table-column label="单据编号" align="center">
87
         <el-table-column label="单据编号" align="center">
62
           <template slot-scope="scope">
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
           </template>
90
           </template>
65
         </el-table-column>
91
         </el-table-column>
66
         <el-table-column label="单据日期" align="center">
92
         <el-table-column label="单据日期" align="center">
67
           <template slot-scope="scope">
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
           </template>
95
           </template>
75
         </el-table-column>
96
         </el-table-column>
97
+      
76
         <el-table-column label="调出仓库" align="center">
98
         <el-table-column label="调出仓库" align="center">
77
           <template slot-scope="scope">
99
           <template slot-scope="scope">
78
-            <span>{{ scope.row.Count ? scope.row.Count : "" }}</span>
100
+             {{getHouseName(scope.row.storehouse_out_id)}}
79
           </template>
101
           </template>
80
         </el-table-column>
102
         </el-table-column>
81
         <el-table-column label="调入仓库" align="center">
103
         <el-table-column label="调入仓库" align="center">
82
           <template slot-scope="scope">
104
           <template slot-scope="scope">
83
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
105
+            {{getHouseName(scope.row.storehouse_in_id)}}
84
           </template>
106
           </template>
85
         </el-table-column>
107
         </el-table-column>
86
         <el-table-column label="制单人" align="center">
108
         <el-table-column label="制单人" align="center">
87
           <template slot-scope="scope">
109
           <template slot-scope="scope">
88
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
110
+            {{getDocName(scope.row.creater)}}
89
           </template>
111
           </template>
90
         </el-table-column>
112
         </el-table-column>
91
         <el-table-column label="审核人" align="center">
113
         <el-table-column label="审核人" align="center">
92
           <template slot-scope="scope">
114
           <template slot-scope="scope">
93
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
115
+           {{getDocName(scope.row.checker)}}
94
           </template>
116
           </template>
95
         </el-table-column>
117
         </el-table-column>
96
         <el-table-column label="审核时间" align="center">
118
         <el-table-column label="审核时间" align="center">
97
           <template slot-scope="scope">
119
           <template slot-scope="scope">
98
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
120
+            {{getTime(scope.row.check_time)}}
99
           </template>
121
           </template>
100
         </el-table-column>
122
         </el-table-column>
101
         <el-table-column label="操作" align="center" width="260px">
123
         <el-table-column label="操作" align="center" width="260px">
114
                 icon="el-icon-delete"
136
                 icon="el-icon-delete"
115
                 size="small"
137
                 size="small"
116
                 type="danger"
138
                 type="danger"
117
-                @click="toDelete(scope.row, scope.row.$index)"
139
+                @click="toDelete(scope.row, scope.$index)"
118
               >
140
               >
119
               </el-button>
141
               </el-button>
120
             </el-tooltip>
142
             </el-tooltip>
150
 
172
 
151
 <script>
173
 <script>
152
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
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
 export default {
177
 export default {
154
   components: {
178
   components: {
155
     BreadCrumb,
179
     BreadCrumb,
164
       total: 0,
188
       total: 0,
165
       page: 1,
189
       page: 1,
166
       limit: 10,
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
   methods: {
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
     Add() {
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
     handleSizeChange(val) {
372
     handleSizeChange(val) {
373
+      this.array= []
374
+      this.checkArray = []
375
+      this.returnArray = []
199
       this.limit = val;
376
       this.limit = val;
200
-      this.init();
377
+      this.getlist();
201
     },
378
     },
202
     handleCurrentChange(val) {
379
     handleCurrentChange(val) {
380
+      this.array= []
381
+      this.checkArray = []
382
+      this.returnArray = []
203
       this.page = val;
383
       this.page = val;
204
-      this.init();
384
+      this.getlist();
205
     },
385
     },
206
 
386
 
207
     // 表格样式
387
     // 表格样式
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
 </script>
486
 </script>
224
 
487
 

+ 86 - 26
src/xt_pages/stock/inventoryTransfer/transDetails.vue Dosyayı Görüntüle

10
           backgroundColor: 'rgb(245, 247, 250)',
10
           backgroundColor: 'rgb(245, 247, 250)',
11
           color: '#606266',
11
           color: '#606266',
12
         }"
12
         }"
13
-        :data="tableData"
14
-        :class="signAndWeighBoxPatients"
13
+        :data="tableList"
15
         border
14
         border
16
       >
15
       >
17
         >
16
         >
20
             商品名称<span style="color: red">*</span>
19
             商品名称<span style="color: red">*</span>
21
           </template>
20
           </template>
22
           <template slot-scope="scope">
21
           <template slot-scope="scope">
23
-            <span>{{ scope.row.Count ? scope.row.Count : "" }}</span>
22
+           {{scope.row.project_name}}
24
           </template>
23
           </template>
25
         </el-table-column>
24
         </el-table-column>
26
         <el-table-column label="商品类型" align="center">
25
         <el-table-column label="商品类型" align="center">
27
           <template slot-scope="scope">
26
           <template slot-scope="scope">
28
-            <span>{{ scope.row.Count ? scope.row.Count : "" }}</span>
27
+           {{scope.row.project_type}}
29
           </template>
28
           </template>
30
         </el-table-column>
29
         </el-table-column>
31
-        <el-table-column label="规格&&单位" align="center">
30
+        <el-table-column label="规格" align="center">
32
           <template slot-scope="scope">
31
           <template slot-scope="scope">
33
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
32
+             {{scope.row.second_specification_name}}
34
           </template>
33
           </template>
35
         </el-table-column>
34
         </el-table-column>
36
         <el-table-column label="调拨数量" align="center">
35
         <el-table-column label="调拨数量" align="center">
37
           <template slot-scope="scope">
36
           <template slot-scope="scope">
38
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
37
+            {{scope.row.count}}{{scope.row.sencond_unit}}
39
           </template>
38
           </template>
40
         </el-table-column>
39
         </el-table-column>
41
         <el-table-column label="调出仓库" align="center">
40
         <el-table-column label="调出仓库" align="center">
42
           <template slot-scope="scope">
41
           <template slot-scope="scope">
43
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
42
+           {{getHouseName(scope.row.storehouse_out_id)}}
44
           </template>
43
           </template>
45
         </el-table-column>
44
         </el-table-column>
46
         <el-table-column label="调入仓库" align="center">
45
         <el-table-column label="调入仓库" align="center">
47
           <template slot-scope="scope">
46
           <template slot-scope="scope">
48
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
47
+           {{getHouseName(scope.row.storehouse_in_id)}}
49
           </template>
48
           </template>
50
         </el-table-column>
49
         </el-table-column>
51
         <el-table-column label="库存总数" align="center">
50
         <el-table-column label="库存总数" align="center">
52
           <template slot-scope="scope">
51
           <template slot-scope="scope">
53
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
52
+            {{scope.row.second_total}}
54
           </template>
53
           </template>
55
         </el-table-column>
54
         </el-table-column>
56
         <el-table-column label="制单人" align="center">
55
         <el-table-column label="制单人" align="center">
57
           <template slot-scope="scope">
56
           <template slot-scope="scope">
58
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
57
+            {{getDocName(warehouse.creater)}}
59
           </template>
58
           </template>
60
         </el-table-column>
59
         </el-table-column>
61
         <el-table-column label="审核人" align="center">
60
         <el-table-column label="审核人" align="center">
62
           <template slot-scope="scope">
61
           <template slot-scope="scope">
63
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
62
+            {{getDocName(warehouse.checker)}}
64
           </template>
63
           </template>
65
         </el-table-column>
64
         </el-table-column>
66
         <el-table-column label="审核时间" align="center">
65
         <el-table-column label="审核时间" align="center">
67
           <template slot-scope="scope">
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
           </template>
68
           </template>
70
         </el-table-column>
69
         </el-table-column>
71
         <el-table-column label="备注" align="center">
70
         <el-table-column label="备注" align="center">
72
           <template slot-scope="scope">
71
           <template slot-scope="scope">
73
-            <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
72
+            <span>{{ scope.row.remake ? scope.row.remake : "" }}</span>
74
           </template>
73
           </template>
75
         </el-table-column>
74
         </el-table-column>
76
       </el-table>
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
     </div>
77
     </div>
90
   </div>
78
   </div>
91
 </template>
79
 </template>
92
 
80
 
93
 <script>
81
 <script>
94
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
82
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
83
+import {getSecondOrderDetailList} from "@/api/seconde";
84
+import { uParseTime } from "@/utils/tools";
95
 export default {
85
 export default {
96
   components: {
86
   components: {
97
     BreadCrumb,
87
     BreadCrumb,
116
           { required: true, message: "请选择活动区域", trigger: "change" },
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
         };
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
 </script>
233
 </script>
174
 
234
 

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1021 - 0
src/xt_pages/stock/inventoryTransfer/transEdit.vue


+ 24 - 12
src/xt_pages/stock/stockBatchNumber.vue Dosyayı Görüntüle

71
              <span>{{scope.row.number}} </span>
71
              <span>{{scope.row.number}} </span>
72
            </template>
72
            </template>
73
         </el-table-column>
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
         <el-table-column prop="drug_name" label="入库数量" align="center">
79
         <el-table-column prop="drug_name" label="入库数量" align="center">
75
            <template slot-scope="scope">
80
            <template slot-scope="scope">
76
              <span> {{scope.row.warehousing_count}}{{packing_unit}}</span>
81
              <span> {{scope.row.warehousing_count}}{{packing_unit}}</span>
183
         keywords:"",
188
         keywords:"",
184
         packing_unit:"",
189
         packing_unit:"",
185
         cancelCountList:[],
190
         cancelCountList:[],
191
+        houseList:[],
186
       }
192
       }
187
     },
193
     },
188
     methods:{
194
     methods:{
246
       getStockInList(params).then(response=>{
252
       getStockInList(params).then(response=>{
247
          if(response.data.state == 1){
253
          if(response.data.state == 1){
248
            var list = response.data.data.list
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
            this.tableList = list
256
            this.tableList = list
254
            var total = response.data.data.total
257
            var total = response.data.data.total
255
            this.total = total
258
            this.total = total
256
-           console.log("入库数据",this.tableList)
257
            var manufacturerList = response.data.data.manufacturerList
259
            var manufacturerList = response.data.data.manufacturerList
258
            this.manufacturerList = manufacturerList
260
            this.manufacturerList = manufacturerList
261
+           this.houseList = response.data.data.houseList
259
          }
262
          }
260
       })
263
       })
261
      },
264
      },
269
         return count
272
         return count
270
      },
273
      },
271
      getOutCount(id){
274
      getOutCount(id){
272
-        console.log("id222",id)
273
         var count = ""
275
         var count = ""
274
         for(let i=0;i<this.outCountList.length;i++){
276
         for(let i=0;i<this.outCountList.length;i++){
275
           if(id == this.outCountList[i].good_id){
277
           if(id == this.outCountList[i].good_id){
309
         getStockDrugCount(params).then(response=>{
311
         getStockDrugCount(params).then(response=>{
310
           if(response.data.state == 1){
312
           if(response.data.state == 1){
311
             var count = response.data.data.count
313
             var count = response.data.data.count
312
-            console.log("详情入库统计",count)
314
+           
313
             this.countList = count
315
             this.countList = count
314
             var outlist = response.data.data.outList
316
             var outlist = response.data.data.outList
315
-            console.log("详情出库数量",outlist)
316
-            
317
+           
317
             this.outCountList = outlist
318
             this.outCountList = outlist
318
             var autoCount = response.data.data.autoCount
319
             var autoCount = response.data.data.autoCount
319
-            console.log("详情自动出库",autoCount)
320
+           
320
             this.autoCountList = autoCount
321
             this.autoCountList = autoCount
321
             var totalCount = response.data.data.totalCount
322
             var totalCount = response.data.data.totalCount
322
-            console.log("totalcount",totalCount)
323
+  
323
             this.cancelCountList = totalCount
324
             this.cancelCountList = totalCount
325
+
326
+           
324
           }
327
           }
325
         })
328
         })
326
       },
329
       },
332
           }
335
           }
333
         }
336
         }
334
        return stock_count
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 Dosyayı Görüntüle

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
     <div  style="margin-bottom:10px;">
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
         <el-input
13
         <el-input
5
         size="small"
14
         size="small"
6
         style="width: 200px;"
15
         style="width: 200px;"
60
             {{getAllDamageCount(scope.row.good_id,scope.row.buy_price)}}
69
             {{getAllDamageCount(scope.row.good_id,scope.row.buy_price)}}
61
             </template>    
70
             </template>    
62
         </el-table-column>
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
         <el-table-column prop="name" label="操作"  align="center">
77
         <el-table-column prop="name" label="操作"  align="center">
64
           <template  slot-scope="scope">
78
           <template  slot-scope="scope">
65
             <el-button type="primary" @click="toDamagedDetail(scope.row.good_id)">查看详情</el-button>
79
             <el-button type="primary" @click="toDamagedDetail(scope.row.good_id)">查看详情</el-button>
444
             good_name:"",
458
             good_name:"",
445
             price:0,
459
             price:0,
446
             good_id:0,
460
             good_id:0,
461
+            storehouse_id:0,
462
+            houseList:[],
447
         }
463
         }
448
     },
464
     },
449
     methods:{
465
     methods:{
641
           keyword:this.searchKey,
657
           keyword:this.searchKey,
642
           limit:this.limit,
658
           limit:this.limit,
643
           page:this.page,
659
           page:this.page,
660
+          storehouse_id:this.storehouse_id,
644
          }
661
          }
645
        getReportStockList(params).then(response=>{
662
        getReportStockList(params).then(response=>{
646
           if(response.data.state == 1){
663
           if(response.data.state == 1){
647
             var list = response.data.data.list
664
             var list = response.data.data.list
648
-            console.log("报损金额22222",list)
649
             this.total = response.data.data.total
665
             this.total = response.data.data.total
650
             this.tableList = list
666
             this.tableList = list
651
            var doctorlist = response.data.data.doctorlist
667
            var doctorlist = response.data.data.doctorlist
652
            this.doctorList = doctorlist
668
            this.doctorList = doctorlist
653
            var damageList =  response.data.data.damageList
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
       },
814
       },
794
       toQuery(){
815
       toQuery(){
795
         this.toDamagedDetail(this.good_id)
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
     created(){
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
     mounted() {
841
     mounted() {

+ 31 - 20
src/xt_pages/stock/stockFlow.vue Dosyayı Görüntüle

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

+ 75 - 24
src/xt_pages/stock/stockInOrder.vue Dosyayı Görüntüle

15
     </div>
15
     </div>
16
 
16
 
17
     <div class="app-container">
17
     <div class="app-container">
18
+      
18
       <div class="cell clearfix">
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
         <el-input
29
         <el-input
20
           size="small"
30
           size="small"
21
-          style="width: 400px;"
31
+          style="width: 200px;"
22
           v-model.trim="searchKey"
32
           v-model.trim="searchKey"
23
           class="filter-item"
33
           class="filter-item"
24
           placeholder="单据编码/制单人/耗材名称"
34
           placeholder="单据编码/制单人/耗材名称"
110
           </template>
120
           </template>
111
         </el-table-column>
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
         <el-table-column label="制单人" align="center">
129
         <el-table-column label="制单人" align="center">
114
           <template slot-scope="scope">
130
           <template slot-scope="scope">
115
             {{ getXuserName(scope.row.creater) }}
131
             {{ getXuserName(scope.row.creater) }}
116
           </template>
132
           </template>
117
         </el-table-column>
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
         <el-table-column label="操作" align="center" width="260px">
142
         <el-table-column label="操作" align="center" width="260px">
120
           <template slot-scope="scope">
143
           <template slot-scope="scope">
121
             <el-tooltip
144
             <el-tooltip
203
             {{ scope.row.number}}
226
             {{ scope.row.number}}
204
           </template>
227
           </template>
205
         </el-table-column>
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
         <el-table-column label="入库数量" align="center">
235
         <el-table-column label="入库数量" align="center">
207
           <template slot-scope="scope">
236
           <template slot-scope="scope">
208
             {{ scope.row.warehousing_count}}{{scope.row.GoodInfo.packing_unit}}
237
             {{ scope.row.warehousing_count}}{{scope.row.GoodInfo.packing_unit}}
775
       order_id:0,
804
       order_id:0,
776
       exportList:[],
805
       exportList:[],
777
       checkAllStatus:false,
806
       checkAllStatus:false,
807
+      list:[],
808
+      storehouse_id:0,
778
     };
809
     };
779
     
810
     
780
   
811
   
793
         start_time: this.start_time,
824
         start_time: this.start_time,
794
         end_time: this.end_time,
825
         end_time: this.end_time,
795
         type: this.type,
826
         type: this.type,
796
-        keywords: this.searchKey
827
+        keywords: this.searchKey,
828
+        storehouse_id:this.storehouse_id,
797
       };
829
       };
798
       this.Warehouse.warehouseDate = [];
830
       this.Warehouse.warehouseDate = [];
799
       getWarehouseList(Params).then(response => {
831
       getWarehouseList(Params).then(response => {
807
           for (let i = 0; i < response.data.data.list.length; i++) {
839
           for (let i = 0; i < response.data.data.list.length; i++) {
808
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
840
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
809
           }
841
           }
842
+        
810
         }
843
         }
811
       });
844
       });
812
     },
845
     },
816
         limit: this.limit,
849
         limit: this.limit,
817
         start_time: this.start_time,
850
         start_time: this.start_time,
818
         end_time: this.end_time,
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
       this.Warehouse.warehouseDate = [];
856
       this.Warehouse.warehouseDate = [];
823
       getWarehouseList(Params).then(response => {
857
       getWarehouseList(Params).then(response => {
824
         if (response.data.state == 0) {
858
         if (response.data.state == 0) {
831
           for (let i = 0; i < response.data.data.list.length; i++) {
865
           for (let i = 0; i < response.data.data.list.length; i++) {
832
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
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
     },
931
     },
891
     fetchAllAdminUsers() {
932
     fetchAllAdminUsers() {
892
       fetchAllAdminUsers().then(response => {
933
       fetchAllAdminUsers().then(response => {
893
-        console.log(response);
894
         if (response.data.state == 1) {
934
         if (response.data.state == 1) {
895
           this.adminUserOptions = response.data.data.users;
935
           this.adminUserOptions = response.data.data.users;
896
           var alen = this.adminUserOptions.length;
936
           var alen = this.adminUserOptions.length;
922
       return name;
962
       return name;
923
     },
963
     },
924
     getTypeNameOne:function(id){
964
     getTypeNameOne:function(id){
925
-      console.log("999999",this.goodInfo)
926
-     
927
       let name = "";
965
       let name = "";
928
       for (let i = 0; i < this.goodInfo.length; i++) {
966
       for (let i = 0; i < this.goodInfo.length; i++) {
929
         if (this.goodInfo[i].id == id) {
967
         if (this.goodInfo[i].id == id) {
960
       });
998
       });
961
     },
999
     },
962
     clicks: function() {
1000
     clicks: function() {
963
-      console.log(this.WarehouseInfo.warehouseInfoDate);
1001
+
964
     },
1002
     },
965
     handleWarehouse: function() {
1003
     handleWarehouse: function() {
966
       this.$router.push({ path: "/stock/in/add", query: { type: this.type } });
1004
       this.$router.push({ path: "/stock/in/add", query: { type: this.type } });
1038
         } else {
1076
         } else {
1039
           this.manufacturer = response.data.data.manufacturer;
1077
           this.manufacturer = response.data.data.manufacturer;
1040
           this.dealer = response.data.data.dealer;
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
           this.getlist()
1080
           this.getlist()
1044
         }
1081
         }
1045
       });
1082
       });
1059
       }
1096
       }
1060
     },
1097
     },
1061
     handleEdit: function(index, row) {
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
     handleDelete: function(index, row) {
1101
     handleDelete: function(index, row) {
1066
-     
1102
+      if(row.is_sys== 12){
1103
+        this.$message.error("调拨入库数据不能删除!")
1104
+        return false
1105
+      }
1067
       if(row.supply_warehouse_id > 0){
1106
       if(row.supply_warehouse_id > 0){
1068
         this.$message.error("采购入库单不能删除!")
1107
         this.$message.error("采购入库单不能删除!")
1069
         return false
1108
         return false
1107
     },
1146
     },
1108
    
1147
    
1109
     select(selection) {
1148
     select(selection) {
1110
-      console.log("selection",selection)
1111
       var ids= []
1149
       var ids= []
1112
       for(let i=0;i<selection.length;i++){
1150
       for(let i=0;i<selection.length;i++){
1113
         ids.push(selection[i].id)
1151
         ids.push(selection[i].id)
1126
       const ids = [];
1164
       const ids = [];
1127
       const idOne = []
1165
       const idOne = []
1128
       for (let i = 0; i < this.selectedTableData.length; i++) {
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
         ids.push(this.selectedTableData[i].id);
1171
         ids.push(this.selectedTableData[i].id);
1130
         idOne.push(this.selectedTableData[i].supply_warehouse_id)
1172
         idOne.push(this.selectedTableData[i].supply_warehouse_id)
1131
       }
1173
       }
1132
-      console.log("idson23322323",idOne)
1133
       for(let i=0;i<idOne.length;i++){
1174
       for(let i=0;i<idOne.length;i++){
1134
         if(idOne[i] >0){
1175
         if(idOne[i] >0){
1135
           this.$message.error("采购入库数据不能删除!")
1176
           this.$message.error("采购入库数据不能删除!")
1203
 
1244
 
1204
             this.recordInfo.recordData.push(response.data.data.info[i]);
1245
             this.recordInfo.recordData.push(response.data.data.info[i]);
1205
             this.tableList.push(response.data.data.info[i])
1246
             this.tableList.push(response.data.data.info[i])
1206
-            console.log("详情",this.tableList)
1207
           }
1247
           }
1208
            this.warehouse = response.data.data.warehousing;
1248
            this.warehouse = response.data.data.warehousing;
1209
            this.warehousing_time = this.getTime(this.warehouse.warehousing_time,"{y}-{m}-{d}");
1249
            this.warehousing_time = this.getTime(this.warehouse.warehousing_time,"{y}-{m}-{d}");
1210
-           console.log("单据日期",this.warehousing_time)
1250
+
1211
           this.WarehouseInfo.warehouse = response.data.data.warehousing;
1251
           this.WarehouseInfo.warehouse = response.data.data.warehousing;
1212
          
1252
          
1213
         }
1253
         }
1336
       this.$refs["tableForm"].validate(valid => {
1376
       this.$refs["tableForm"].validate(valid => {
1337
         if (valid) {
1377
         if (valid) {
1338
           const array = this.recordInfo.recordData;
1378
           const array = this.recordInfo.recordData;
1339
-          console.log('array',array)
1379
+
1340
           for (let i = 0; i < array.length; i++) {
1380
           for (let i = 0; i < array.length; i++) {
1341
             if (array[i].good_type_id == 0) {
1381
             if (array[i].good_type_id == 0) {
1342
               this.$message.error("商品类型不能为空");
1382
               this.$message.error("商品类型不能为空");
1483
         id:this.order_id,
1523
         id:this.order_id,
1484
         start_time:this.start_time,
1524
         start_time:this.start_time,
1485
         end_time:this.end_time,
1525
         end_time:this.end_time,
1526
+        storehouse_id:this.storehouse_id,
1486
       }
1527
       }
1487
-      console.log("params",params)
1528
+     
1488
       getExportStockList(params).then(response=>{
1529
       getExportStockList(params).then(response=>{
1489
         if(response.data.state == 1){
1530
         if(response.data.state == 1){
1490
            var list = response.data.data.list
1531
            var list = response.data.data.list
1491
-           console.log("数据导出222222",list)
1532
+          
1492
            for(let i=0;i<this.goodType.length;i++){
1533
            for(let i=0;i<this.goodType.length;i++){
1493
              for(let j=0;j<list.length;j++){
1534
              for(let j=0;j<list.length;j++){
1494
                if(this.goodType[i].id == list[j].good_type_id){
1535
                if(this.goodType[i].id == list[j].good_type_id){
1506
                   list[i].manufacturer = this.manufacturer[j].manufacturer_name
1547
                   list[i].manufacturer = this.manufacturer[j].manufacturer_name
1507
                }
1548
                }
1508
             }
1549
             }
1509
-           console.log("经销⬆商",this.dealer)
1510
            for(let z=0;z<this.dealer.length;z++){
1550
            for(let z=0;z<this.dealer.length;z++){
1511
                if(list[i].dealer == this.dealer[z].id){
1551
                if(list[i].dealer == this.dealer[z].id){
1512
                  list[i].dealer = this.dealer[z].dealer_name
1552
                  list[i].dealer = this.dealer[z].dealer_name
1513
                }
1553
                }
1514
             }
1554
             }
1515
           }
1555
           }
1516
-          console.log("表格2222222",this.exportList)
1517
-          
1518
           this.exportList = list
1556
           this.exportList = list
1519
         }
1557
         }
1520
       })
1558
       })
1545
       const tHeader = ['耗材名称','耗材类型', '规格&单位','批号','入库数量','进货价','总价','生产厂家','生产日期','有效期','经销商','批准文号','备注']
1583
       const tHeader = ['耗材名称','耗材类型', '规格&单位','批号','入库数量','进货价','总价','生产厂家','生产日期','有效期','经销商','批准文号','备注']
1546
       const filterVal = ['good_name', 'good_type_id', 'unit','number','warehousing_count','price','total_price','manufacturer','product_date','expiry_date','dealer','license_number','remark']
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
       const data = this.formatJson(filterVal, this.exportList)
1588
       const data = this.formatJson(filterVal, this.exportList)
1551
       excel.export_json_to_excel({
1589
       excel.export_json_to_excel({
1559
     formatJson(filterVal, jsonData) {
1597
     formatJson(filterVal, jsonData) {
1560
     return jsonData.map(v => filterVal.map(j => v[j]));
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
 </script>
1615
 </script>

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

20
 
20
 
21
 
21
 
22
       <div class="cell clearfix">
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
         <label class="title"><span class="name">入库时间</span> : </label>
32
         <label class="title"><span class="name">入库时间</span> : </label>
24
         <el-date-picker size="small" v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false"
33
         <el-date-picker size="small" v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false"
25
                         style="width: 196px;" type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
34
                         style="width: 196px;" type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
378
         manufacturerList:[],
387
         manufacturerList:[],
379
         goodList:[],
388
         goodList:[],
380
         loading:false,
389
         loading:false,
390
+        list:[],
391
+        storehouse_id:"",
381
       }
392
       }
382
     },
393
     },
383
     methods: {
394
     methods: {
467
             }
478
             }
468
           }
479
           }
469
         })
480
         })
470
-      }, GetConfigInfo: function() {
481
+      },
482
+      GetConfigInfo: function() {
471
         const loading = this.$loading({
483
         const loading = this.$loading({
472
           lock: true,
484
           lock: true,
473
           text: 'Loading',
485
           text: 'Loading',
490
             this.dealer.splice(0, 0, { id: -1, dealer_name: '其他' })
502
             this.dealer.splice(0, 0, { id: -1, dealer_name: '其他' })
491
             this.form.manufacturer = 0
503
             this.form.manufacturer = 0
492
             this.form.dealer = 0
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
           loading.close()
508
           loading.close()
495
 
509
 
660
       }
674
       }
661
       ,
675
       ,
662
       submit() {
676
       submit() {
663
-        console.log("res23322332",this.$refs)
664
         this.$refs['tableForm'].validate((valid) => {
677
         this.$refs['tableForm'].validate((valid) => {
665
           if (valid) {
678
           if (valid) {
666
             this.loading = true
679
             this.loading = true
667
             const array = this.recordInfo.recordData
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
             for (let i = 0; i < array.length; i++) {
685
             for (let i = 0; i < array.length; i++) {
670
               if (array[i].good_type_id == 0) {
686
               if (array[i].good_type_id == 0) {
671
                 this.$message.error('商品类型不能为空')
687
                 this.$message.error('商品类型不能为空')
679
               this.$message.success('请添加入库商品')
695
               this.$message.success('请添加入库商品')
680
               return
696
               return
681
             }
697
             }
698
+
682
             for(let i=0;i<this.recordInfo.recordData.length;i++){
699
             for(let i=0;i<this.recordInfo.recordData.length;i++){
683
              if(this.recordInfo.recordData[i].dealer == ""){
700
              if(this.recordInfo.recordData[i].dealer == ""){
684
                 this.recordInfo.recordData[i].dealer = 0
701
                 this.recordInfo.recordData[i].dealer = 0
707
             const params = {
724
             const params = {
708
               'stockIn': this.recordInfo.recordData
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
               if (response.data.state == 0) {
729
               if (response.data.state == 0) {
714
                 this.loading = false
730
                 this.loading = false
715
                 this.$message.error(response.data.msg)
731
                 this.$message.error(response.data.msg)
778
         this.currentIndex = val
794
         this.currentIndex = val
779
       },
795
       },
780
       handleSelect(val){
796
       handleSelect(val){
781
-         console.log("val3232232323",val)
782
          for(let i=0;i<this.recordInfo.recordData.length;i++){
797
          for(let i=0;i<this.recordInfo.recordData.length;i++){
783
            if(this.currentIndex == i){
798
            if(this.currentIndex == i){
784
               this.recordInfo.recordData[i].good_type_id = val.id
799
               this.recordInfo.recordData[i].good_type_id = val.id
812
              
827
              
813
            }
828
            }
814
          }
829
          }
815
-      }
830
+      },
831
+   
816
     }
832
     }
817
     ,
833
     ,
818
     created() {
834
     created() {
846
       this.recordInfo.recordData.push(tempObj)
862
       this.recordInfo.recordData.push(tempObj)
847
       this.GetConfigInfo()
863
       this.GetConfigInfo()
848
       this.propForm.goodUnit = this.$store.getters.good_unit
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 Dosyayı Görüntüle

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

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

14
     </div>
14
     </div>
15
     <div class="app-container">
15
     <div class="app-container">
16
       <div class="cell clearfix">
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
         <el-input
26
         <el-input
18
           size="small"
27
           size="small"
19
-          style="width: 400px;"
28
+          style="width: 200px;"
20
           class="filter-item"
29
           class="filter-item"
21
           v-model.trim="searchKey"
30
           v-model.trim="searchKey"
22
           placeholder="单据编码/制单人/耗材名称"
31
           placeholder="单据编码/制单人/耗材名称"
103
             {{ scope.row.warehouse_out_order_number }}
112
             {{ scope.row.warehouse_out_order_number }}
104
           </template>
113
           </template>
105
         </el-table-column>
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
         <el-table-column label="制单人" align="center">
122
         <el-table-column label="制单人" align="center">
108
           <template slot-scope="scope">
123
           <template slot-scope="scope">
114
           <template slot-scope="scope">
129
           <template slot-scope="scope">
115
             <span v-if="scope.row.is_sys == 1">自动出库</span>
130
             <span v-if="scope.row.is_sys == 1">自动出库</span>
116
             <span v-if="scope.row.is_sys == 0">手动出库</span>
131
             <span v-if="scope.row.is_sys == 0">手动出库</span>
132
+            <span v-if="scope.row.is_sys == 12">调拨出库</span>
117
           </template>
133
           </template>
118
         </el-table-column>
134
         </el-table-column>
119
        
135
        
197
               {{ scope.row.social_security_directory_code}}
213
               {{ scope.row.social_security_directory_code}}
198
             </template>
214
             </template>
199
           </el-table-column>
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
           <el-table-column label="出库数量" align="center">
223
           <el-table-column label="出库数量" align="center">
202
             <template slot-scope="scope">
224
             <template slot-scope="scope">
204
               <span v-if="scope.row.is_sys == 1">{{getOutStockCount(scope.row.good_id)}}{{scope.row.packing_unit}}</span> 
226
               <span v-if="scope.row.is_sys == 1">{{getOutStockCount(scope.row.good_id)}}{{scope.row.packing_unit}}</span> 
205
             </template>
227
             </template>
206
           </el-table-column>
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
           <el-table-column label="出货价" align="center">
234
           <el-table-column label="出货价" align="center">
208
             <template slot-scope="scope">
235
             <template slot-scope="scope">
209
               <span v-if="scope.row.price >0">{{ scope.row.price}}</span> 
236
               <span v-if="scope.row.price >0">{{ scope.row.price}}</span> 
788
       exportList:[],
815
       exportList:[],
789
       is_sys:0,
816
       is_sys:0,
790
       infoList:[],
817
       infoList:[],
791
-      stockFlowList:[]
818
+      stockFlowList:[],
819
+      list:[],
820
+      houselist:[],
821
+      storehouse_id:0,
822
+      is_sys:0,
792
     };
823
     };
793
   },
824
   },
794
   methods: {
825
   methods: {
799
         start_time: this.start_time,
830
         start_time: this.start_time,
800
         end_time: this.end_time,
831
         end_time: this.end_time,
801
         type: this.type,
832
         type: this.type,
802
-        keywords: this.searchKey
833
+        keywords: this.searchKey,
834
+        storehouse_id:this.storehouse_id,
803
       };
835
       };
804
       this.warehouseOutDate = [];
836
       this.warehouseOutDate = [];
805
       getWarehouseOutList(Params).then(response => {
837
       getWarehouseOutList(Params).then(response => {
826
         limit: this.limit,
858
         limit: this.limit,
827
         start_time: this.start_time,
859
         start_time: this.start_time,
828
         end_time: this.end_time,
860
         end_time: this.end_time,
829
-        type: this.type
861
+        type: this.type,
862
+        storehouse_id:this.storehouse_id,
830
       };
863
       };
831
       this.warehouseOutDate = [];
864
       this.warehouseOutDate = [];
832
       getWarehouseOutList(Params).then(response => {
865
       getWarehouseOutList(Params).then(response => {
834
           this.$message.error(response.data.msg);
867
           this.$message.error(response.data.msg);
835
           return false;
868
           return false;
836
         } else {
869
         } else {
837
-          console.log("parsm",response.data.data)
838
-          
870
+         
839
           this.total = response.data.data.total;
871
           this.total = response.data.data.total;
840
           for (let i = 0; i < response.data.data.list.length; i++) {
872
           for (let i = 0; i < response.data.data.list.length; i++) {
841
             
873
             
842
             this.warehouseOutDate.push(response.data.data.list[i]);
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
           this.dealer = response.data.data.dealer;
970
           this.dealer = response.data.data.dealer;
934
           this.goodInfo = response.data.data.goodInfo
971
           this.goodInfo = response.data.data.goodInfo
935
           this.goodType = response.data.data.goodType
972
           this.goodType = response.data.data.goodType
973
+          this.list = response.data.data.list
936
           // this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: "全部" });
974
           // this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: "全部" });
937
           // this.dealer.splice(0, 0, { id: 0, dealer_name: "全部" });
975
           // this.dealer.splice(0, 0, { id: 0, dealer_name: "全部" });
938
           this.getlist()
976
           this.getlist()
958
        
996
        
959
     },
997
     },
960
     handleDelete: function(index, row) {
998
     handleDelete: function(index, row) {
961
-     
999
+      if(row.is_sys == 12){
1000
+        this.$message.error("调拨出库数据不能删除!")
1001
+        return false
1002
+      }
962
       if(row.supply_cancel_out_id >0){
1003
       if(row.supply_cancel_out_id >0){
963
         this.$message.error("采购出库数据不能删除!")
1004
         this.$message.error("采购出库数据不能删除!")
964
         return false
1005
         return false
1034
         if(this.selectedTableData[i].is_sys == 1){
1075
         if(this.selectedTableData[i].is_sys == 1){
1035
           this.$message.error("自动出库数据不能删除!")
1076
           this.$message.error("自动出库数据不能删除!")
1036
           return false
1077
           return false
1078
+        }
1079
+        if(this.selectedTableData[i].is_sys ==12){
1080
+          this.$message.error("调拨出库数据不能删除!")
1081
+          return false
1037
         }
1082
         }
1038
          if(this.selectedTableData[i].is_sys == 0){
1083
          if(this.selectedTableData[i].is_sys == 0){
1039
            ids.push(this.selectedTableData[i].id);
1084
            ids.push(this.selectedTableData[i].id);
1075
               }
1120
               }
1076
             }
1121
             }
1077
           });
1122
           });
1078
-        })
1079
-        .catch(() => {});
1123
+        }).catch(() => {});
1080
     },
1124
     },
1081
 
1125
 
1082
 
1126
 
1083
     handleSearch(val){
1127
     handleSearch(val){
1128
+      this.is_sys = val.is_sys
1084
       this.tableList = []
1129
       this.tableList = []
1085
       this.editdialogVisibleThree = false
1130
       this.editdialogVisibleThree = false
1086
       this.GetOrderDetailOne(val.id)
1131
       this.GetOrderDetailOne(val.id)
1132
+
1087
       this.GetTotalCount(val.warehouse_out_time)
1133
       this.GetTotalCount(val.warehouse_out_time)
1088
     },
1134
     },
1089
   
1135
   
1678
      }
1724
      }
1679
      arr = this.unique(arr)
1725
      arr = this.unique(arr)
1680
      return arr.join(',')
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 Dosyayı Görüntüle

37
 
37
 
38
 
38
 
39
       <div class="cell clearfix">
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
         <label class="title"><span class="name">出库时间</span> : </label>
49
         <label class="title"><span class="name">出库时间</span> : </label>
41
         <el-date-picker
50
         <el-date-picker
42
           size="small"
51
           size="small"
140
             </template>
149
             </template>
141
           </el-table-column>
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
           <el-table-column  width="150" align="center">
165
           <el-table-column  width="150" align="center">
144
             <template slot="header" slot-scope="scope">
166
             <template slot="header" slot-scope="scope">
145
               <span>出货单价<span style="color: red">*</span></span>
167
               <span>出货单价<span style="color: red">*</span></span>
339
       goodList:[],
361
       goodList:[],
340
       manufacturerList:[],
362
       manufacturerList:[],
341
       numberList:[],
363
       numberList:[],
364
+      storehouse_id:"",
365
+      list:[],
366
+      doctorList:[],
342
     };
367
     };
343
   },
368
   },
344
   methods: {
369
   methods: {
347
       this.propForm.goods = []
372
       this.propForm.goods = []
348
 
373
 
349
       this.$refs.dialog.hide()
374
       this.$refs.dialog.hide()
350
-      console.log(val)
375
+    
351
       if (val.selectedGoodInfo.length > 0) {
376
       if (val.selectedGoodInfo.length > 0) {
352
         for (let i = val.selectedGoodInfo.length - 1; i >= 0; i--) {
377
         for (let i = val.selectedGoodInfo.length - 1; i >= 0; i--) {
353
           if (i == 0) {
378
           if (i == 0) {
401
           this.dealer.splice(0, 0, { id: 0, dealer_name: '全部' })
426
           this.dealer.splice(0, 0, { id: 0, dealer_name: '全部' })
402
           this.manufacturer.splice(0, 0, { id: -1, manufacturer_name: '其他' })
427
           this.manufacturer.splice(0, 0, { id: -1, manufacturer_name: '其他' })
403
           this.dealer.splice(0, 0, { id: -1, dealer_name: '其他' })
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
       tempObj["product_date"] = ""
473
       tempObj["product_date"] = ""
447
       tempObj["license_number"] = ""
474
       tempObj["license_number"] = ""
448
       tempObj["warehouse_info_id"] = 0
475
       tempObj["warehouse_info_id"] = 0
476
+      tempObj["admin_user_id"] = this.$store.getters.xt_user.user.user_name
449
       this.recordInfo.recordData.push(tempObj);
477
       this.recordInfo.recordData.push(tempObj);
450
     },
478
     },
451
     handleDelete: function(index, row) {
479
     handleDelete: function(index, row) {
530
             this.propForm.goods.push(goodObj)
558
             this.propForm.goods.push(goodObj)
531
 
559
 
532
           }
560
           }
533
-          console.log( this.propForm.goods)
561
+       
534
         }
562
         }
535
       )
563
       )
536
 
564
 
573
            
601
            
574
              this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
602
              this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
575
           }
603
           }
604
+       
576
           for(let i=0;i<this.recordInfo.recordData.length;i++){
605
           for(let i=0;i<this.recordInfo.recordData.length;i++){
577
             for(let j=0;j<this.manufacturerList.length;j++){
606
             for(let j=0;j<this.manufacturerList.length;j++){
578
               if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
607
               if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
590
                    this.recordInfo.recordData[i].number = this.numberList[y].number
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
           const params = {
631
           const params = {
595
             stockOut: this.recordInfo.recordData
632
             stockOut: this.recordInfo.recordData
596
           };
633
           };
634
+        
597
           const loading = this.$loading({
635
           const loading = this.$loading({
598
             lock: true,
636
             lock: true,
599
             text: 'Loading',
637
             text: 'Loading',
605
             this.warehouse_out_time,
643
             this.warehouse_out_time,
606
             this.form.dealer,
644
             this.form.dealer,
607
             this.form.manufacturer,
645
             this.form.manufacturer,
608
-            this.type
646
+            this.type,
647
+            this.storehouse_id
609
           ).then(response => {
648
           ).then(response => {
610
             if (response.data.state == 0) {
649
             if (response.data.state == 0) {
611
               this.$message.error("库存不足")
650
               this.$message.error("库存不足")
615
                var msg = response.data.data.msg
654
                var msg = response.data.data.msg
616
                var good_name = response.data.data.good_name
655
                var good_name = response.data.data.good_name
617
                var specification_name = response.data.data.specification_name
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
                if(msg == 1){
660
                if(msg == 1){
621
                   this.$message.error(str)
661
                   this.$message.error(str)
646
       if (keyword != undefined) {
686
       if (keyword != undefined) {
647
         key = keyword
687
         key = keyword
648
       }
688
       }
649
-      console.log("keyrowrd",key)
689
+
650
       postSearchGoodList(key).then(response => {
690
       postSearchGoodList(key).then(response => {
651
         if (response.data.state == 1) {
691
         if (response.data.state == 1) {
652
             var list = response.data.data.list
692
             var list = response.data.data.list
653
-            console.log("33334445555",list)
693
+          
654
             this.goodList = list
694
             this.goodList = list
655
             var manufacturerList = response.data.data.manufacturerList
695
             var manufacturerList = response.data.data.manufacturerList
656
             this.manufacturerList = manufacturerList
696
             this.manufacturerList = manufacturerList
681
       this.currentIndex = val
721
       this.currentIndex = val
682
     },
722
     },
683
     handleSelect(val){
723
     handleSelect(val){
684
-       
724
+       console.log("val232323",val)
685
         var arr = []
725
         var arr = []
686
         for(let i=0;i<this.recordInfo.recordData.length;i++){
726
         for(let i=0;i<this.recordInfo.recordData.length;i++){
687
            arr.push(this.recordInfo.recordData[i].good_id)
727
            arr.push(this.recordInfo.recordData[i].good_id)
688
         }
728
         }
689
        
729
        
690
         var str = arr.join(",")
730
         var str = arr.join(",")
691
-        console.log("str",str,"good_id",val.id)
731
+       
692
         if(str.indexOf(val.id)!=-1){
732
         if(str.indexOf(val.id)!=-1){
693
           this.$message.error("该耗材已存在列表中")
733
           this.$message.error("该耗材已存在列表中")
694
           return
734
           return
703
             this.recordInfo.recordData[i].name = val.specification_name +"/"+val.packing_unit
743
             this.recordInfo.recordData[i].name = val.specification_name +"/"+val.packing_unit
704
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
744
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
705
             this.recordInfo.recordData[i].remark = val.remark
745
             this.recordInfo.recordData[i].remark = val.remark
746
+          
706
             if(val.packing_price == 0){
747
             if(val.packing_price == 0){
707
               this.recordInfo.recordData[i].price =""
748
               this.recordInfo.recordData[i].price =""
708
             }else{
749
             }else{
729
       getStockBatchNumber(params).then(response=>{
770
       getStockBatchNumber(params).then(response=>{
730
         if(response.data.state == 1){
771
         if(response.data.state == 1){
731
           var list = response.data.data.list
772
           var list = response.data.data.list
732
-          console.log("list2243444",list)
773
+ 
733
           this.numberList = list
774
           this.numberList = list
734
         }
775
         }
735
      })
776
      })
738
       return getDataConfig(module, filed_name)
779
       return getDataConfig(module, filed_name)
739
     },
780
     },
740
     changeNumberList(val,index){
781
     changeNumberList(val,index){
741
-
742
        for(let i=0;i<this.recordInfo.recordData.length;i++){
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
          if(index == i){
783
          if(index == i){
747
           this.recordInfo.recordData[i].warehouse_info_id = val.number
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
   created() {
791
   created() {
792
+   
754
     var nowDate = new Date();
793
     var nowDate = new Date();
755
     var nowYear = nowDate.getFullYear();
794
     var nowYear = nowDate.getFullYear();
756
     var nowMonth = nowDate.getMonth() + 1;
795
     var nowMonth = nowDate.getMonth() + 1;
773
     tempObj["dealer"] = ""
812
     tempObj["dealer"] = ""
774
     tempObj["license_number"] = ""
813
     tempObj["license_number"] = ""
775
     tempObj["warehouse_info_id"] = 0
814
     tempObj["warehouse_info_id"] = 0
776
-    
815
+    tempObj["admin_user_id"] = this.$store.getters.xt_user.user.user_name
777
     this.recordInfo.recordData.push(tempObj);
816
     this.recordInfo.recordData.push(tempObj);
778
     this.GetConfigInfo();
817
     this.GetConfigInfo();
818
+  
779
     this.propForm.goodUnit = this.$store.getters.good_unit;
819
     this.propForm.goodUnit = this.$store.getters.good_unit;
780
     this.unitList =  getDataConfig('hemodialysis','units')
820
     this.unitList =  getDataConfig('hemodialysis','units')
781
-    console.log("单位",this.unitList)
821
+ 
782
   }
822
   }
783
 };
823
 };
784
 </script>
824
 </script>

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

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

Dosya farkı çok büyük olduğundan ihmal edildi
+ 535 - 640
src/xt_pages/stock/stockQuery.vue


+ 536 - 0
src/xt_pages/stock/testOrder.vue Dosyayı Görüntüle

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 Dosyayı Görüntüle

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 Dosyayı Görüntüle

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 Dosyayı Görüntüle

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 Dosyayı Görüntüle

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

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

1004
       this.payment = this.total_price - this.arrearage;
1004
       this.payment = this.total_price - this.arrearage;
1005
     },
1005
     },
1006
     getSupplyCount(supply_count,sum_count,supply_unit,type,min_number,max_unit,min_unit,index){
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
       var total_count = 0
1008
       var total_count = 0
1009
       
1009
       
1010
       if(type == 1){
1010
       if(type == 1){
1159
                 // orderInfo[i].count = this.getTotalStockCountTwo(goodList[j].good_warehouse_info);
1159
                 // orderInfo[i].count = this.getTotalStockCountTwo(goodList[j].good_warehouse_info);
1160
                // orderInfo[i].supply_total = this.getTotalStockCountTwo(goodList[j].good_warehouse_info);
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
               orderInfo[i].min_number = 0
1163
               orderInfo[i].min_number = 0
1164
               orderInfo[i].count = orderInfo[i].count;
1164
               orderInfo[i].count = orderInfo[i].count;
1165
               orderInfo[i].supply_total = orderInfo[i].supply_total
1165
               orderInfo[i].supply_total = orderInfo[i].supply_total

+ 2 - 1
src/xt_pages/supply/purchaseOrderQuery.vue Dosyayı Görüntüle

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

+ 1 - 0
src/xt_pages/supply/supplyQuery.vue Dosyayı Görüntüle

201
       tableList: [],
201
       tableList: [],
202
       tyep_name: "",
202
       tyep_name: "",
203
       sType: [],
203
       sType: [],
204
+     
204
     };
205
     };
205
   },
206
   },
206
 
207
 

+ 16 - 3
src/xt_pages/user/components/PatientDetail.vue Dosyayı Görüntüle

264
                   </el-checkbox>
264
                   </el-checkbox>
265
                 </el-checkbox-group>
265
                 </el-checkbox-group>
266
               </el-form-item>
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
             </el-col>
275
             </el-col>
268
 
276
 
269
             <!--<el-col :span="16" >-->
277
             <!--<el-col :span="16" >-->
1080
   expense_kind: "",
1088
   expense_kind: "",
1081
   contact_name: "",
1089
   contact_name: "",
1082
   sch_remark:"",
1090
   sch_remark:"",
1083
-  org_id:0
1091
+  org_id:0,
1092
+  troble_shoot:"",
1084
 };
1093
 };
1085
 
1094
 
1086
 export default {
1095
 export default {
1169
           { required: true, message: "请填写身份证号", trigger: "blur" }
1178
           { required: true, message: "请填写身份证号", trigger: "blur" }
1170
         ],
1179
         ],
1171
         birth: [{ required: true, message: "请填写生日", trigger: "blur" }]
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
   computed: {
1188
   computed: {
1263
             this.form.dialysisNo = patietInfo.dialysis_no;
1276
             this.form.dialysisNo = patietInfo.dialysis_no;
1264
             this.form.gender = patietInfo.gender;
1277
             this.form.gender = patietInfo.gender;
1265
             this.form.is_infectious = patietInfo.is_infectious;
1278
             this.form.is_infectious = patietInfo.is_infectious;
1266
-           
1279
+            this.form.troble_shoot = patietInfo.troble_shoot
1267
             // this.form.record_date = patietInfo.is_infectious
1280
             // this.form.record_date = patietInfo.is_infectious
1268
             this.form.response_result = patietInfo.response_result;
1281
             this.form.response_result = patietInfo.response_result;
1269
             this.form.remind_cycle = patietInfo.remind_cycle;
1282
             this.form.remind_cycle = patietInfo.remind_cycle;

+ 14 - 23
src/xt_pages/user/components/PatientForm.vue Dosyayı Görüntüle

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

+ 1 - 3
src/xt_pages/user/doctorAdvice.vue Dosyayı Görüntüle

182
           <template slot-scope="scope">
182
           <template slot-scope="scope">
183
             <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
183
             <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
184
               <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
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
               </span>
186
               </span>
188
 
187
 
189
               <el-dropdown-menu slot="dropdown">
188
               <el-dropdown-menu slot="dropdown">
3390
             }
3389
             }
3391
           });
3390
           });
3392
           let list = Object.values(dataInfo);
3391
           let list = Object.values(dataInfo);
3393
-          // console.log("list", list);
3394
           list.map(item => {
3392
           list.map(item => {
3395
             for (let i = 0; i < advice.length; i++) {
3393
             for (let i = 0; i < advice.length; i++) {
3396
               if (
3394
               if (

+ 6 - 6
src/xt_pages/workforce/remind_print_setting.vue Dosyayı Görüntüle

36
                    <span>{{getAnticoagulant(main_collection.dialysissolution.mode_id)}}</span>
36
                    <span>{{getAnticoagulant(main_collection.dialysissolution.mode_id)}}</span>
37
                   </span>
37
                   </span>
38
                 </div>
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
                 <div v-if="printObj.anticoagulant_zongliang == 1">
41
                 <div v-if="printObj.anticoagulant_zongliang == 1">
42
                   用量:
42
                   用量:
43
                   <span v-if="main_collection.dialysissolution.anticoagulant == 1">
43
                   <span v-if="main_collection.dialysissolution.anticoagulant == 1">
74
                     {{main_collection.dialysissolution.anticoagulant_zongliang}}iu
74
                     {{main_collection.dialysissolution.anticoagulant_zongliang}}iu
75
                    </span>
75
                    </span>
76
                 </div>
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
                 <div>用法:静脉注射</div>
80
                 <div>用法:静脉注射</div>
81
                 <div>打印时间:{{currentDate}}</div>
81
                 <div>打印时间:{{currentDate}}</div>
82
               </div>
82
               </div>
294
       printAction: function() {
294
       printAction: function() {
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;}}'
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
         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;}}'
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
           printJS({
298
           printJS({
299
             printable: 'print_content',
299
             printable: 'print_content',
300
             type: 'html',
300
             type: 'html',