Bladeren bron

Merge branch 'superman' of http://git.shengws.com/zhangbj/xt_vue into superman

xiaoming_global 6 jaren geleden
bovenliggende
commit
7459d25610
100 gewijzigde bestanden met toevoegingen van 3223 en 11952 verwijderingen
  1. 14 0
      src/api/qcd.js
  2. 268 362
      src/api/stock.js
  3. 58 49
      src/lang/zh.js
  4. 118 111
      src/router/index.js
  5. 1 1
      src/styles/index.scss
  6. 1 1
      src/styles/sidebar.scss
  7. 1 1
      src/views/layout/components/Navbar.vue
  8. 2 0
      src/views/layout/components/Sidebar/index.vue
  9. 1 1
      src/views/layout/components/TagsView.vue
  10. 1 1
      src/views/login/index.vue
  11. 2 3
      src/xt_pages/data/components/tableson.vue
  12. 4 4
      src/xt_pages/data/components/templateTable.vue
  13. 26 20
      src/xt_pages/data/druguse.vue
  14. 34 32
      src/xt_pages/data/druguseTemplate.vue
  15. 2 2
      src/xt_pages/device/components/maintain/maintain_record_list_dialog.vue
  16. 3 3
      src/xt_pages/device/components/partition_dialog.vue
  17. 12 4
      src/xt_pages/device/components/quality_control/quality_record_list_dialog.vue
  18. 3 1
      src/xt_pages/device/components/sterilize_plan/sterilize_plan_pane.vue
  19. 6 5
      src/xt_pages/device/components/use_registration_pane.vue
  20. 2 2
      src/xt_pages/device/components/water_pane.vue
  21. 2 2
      src/xt_pages/device/group_main.vue
  22. 2 2
      src/xt_pages/device/number_main.vue
  23. 2 2
      src/xt_pages/device/zone_main.vue
  24. 1 1
      src/xt_pages/dialysis/PatientBox.vue
  25. 1 64
      src/xt_pages/dialysis/bloodPresssWatch.vue
  26. 1 1
      src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue
  27. 1 31
      src/xt_pages/dialysis/dialysisPrepare.vue
  28. 0 48
      src/xt_pages/dialysis/doctorAdvice.vue
  29. 0 64
      src/xt_pages/dialysis/schedualPatient2.vue
  30. 1 1
      src/xt_pages/qcd/components/BarChart.vue
  31. 1 1
      src/xt_pages/qcd/components/PieChart.vue
  32. 0 60
      src/xt_pages/qcd/dialysisTotal.vue
  33. 0 60
      src/xt_pages/qcd/outcomeIndicators/control.vue
  34. 0 60
      src/xt_pages/qcd/outcomeIndicators/query.vue
  35. 146 102
      src/xt_pages/qcd/patientAnalysis/bloodPressure.vue
  36. 1 61
      src/xt_pages/qcd/patientAnalysis/dialysisAge.vue
  37. 0 60
      src/xt_pages/qcd/patientAnalysis/lapseto.vue
  38. 0 60
      src/xt_pages/qcd/patientAnalysis/total.vue
  39. 170 84
      src/xt_pages/qcd/patientAnalysis/weight.vue
  40. 0 60
      src/xt_pages/qcd/processIndicators.1.vue
  41. 0 60
      src/xt_pages/qcd/processIndicators.vue
  42. 9 3
      src/xt_pages/role/admin.vue
  43. 15 4
      src/xt_pages/role/role.vue
  44. 23 28
      src/xt_pages/stock/Dialog/goodInfoDailog.vue
  45. 160 2
      src/xt_pages/stock/Dialog/salesReturnDialog.vue
  46. 121 186
      src/xt_pages/stock/Dialog/stockInDialog.vue
  47. 0 445
      src/xt_pages/stock/addStockIn.vue
  48. 0 414
      src/xt_pages/stock/addStockOut.vue
  49. 0 298
      src/xt_pages/stock/cancelStock.vue
  50. 126 127
      src/xt_pages/stock/cancelStockOrder.vue
  51. 102 109
      src/xt_pages/stock/cancelStockOrderAdd.vue
  52. 21 16
      src/xt_pages/stock/cancelStockOrderDetail.vue
  53. 105 108
      src/xt_pages/stock/cancelStockOrderEdit.vue
  54. 0 388
      src/xt_pages/stock/cancelStockRecord.vue
  55. 2 2
      src/xt_pages/stock/config/dealer.vue
  56. 2 2
      src/xt_pages/stock/config/goodInfo.vue
  57. 2 2
      src/xt_pages/stock/config/goodType.vue
  58. 2 2
      src/xt_pages/stock/config/manufacturer.vue
  59. 17 26
      src/xt_pages/stock/index.vue
  60. 0 25
      src/xt_pages/stock/otherCancelStockDetail.vue
  61. 125 127
      src/xt_pages/stock/otherCancelStockOrder.vue
  62. 0 408
      src/xt_pages/stock/otherCancelStockOrderAdd.vue
  63. 0 232
      src/xt_pages/stock/otherCancelStockOrderDetail.vue
  64. 0 391
      src/xt_pages/stock/otherCancelStockOrderEdit.vue
  65. 0 24
      src/xt_pages/stock/otherSalesReturnDetail.vue
  66. 131 124
      src/xt_pages/stock/otherSalesReturnOrder.vue
  67. 0 414
      src/xt_pages/stock/otherSalesReturnOrderAdd.vue
  68. 0 232
      src/xt_pages/stock/otherSalesReturnOrderDetail.vue
  69. 0 391
      src/xt_pages/stock/otherSalesReturnOrderEdit.vue
  70. 0 24
      src/xt_pages/stock/otherStockInDetail.vue
  71. 56 57
      src/xt_pages/stock/otherStockInOrder.vue
  72. 0 613
      src/xt_pages/stock/otherStockInOrderAdd.vue
  73. 0 281
      src/xt_pages/stock/otherStockInOrderDetail.vue
  74. 0 502
      src/xt_pages/stock/otherStockInOrderEdit.vue
  75. 0 26
      src/xt_pages/stock/otherStockOutDetail.vue
  76. 167 91
      src/xt_pages/stock/otherStockOutOrder.vue
  77. 0 443
      src/xt_pages/stock/otherStockOutOrderAdd.vue
  78. 0 258
      src/xt_pages/stock/otherStockOutOrderDetail.vue
  79. 0 425
      src/xt_pages/stock/otherStockOutOrderEdit.vue
  80. 0 312
      src/xt_pages/stock/salesReturn.vue
  81. 55 51
      src/xt_pages/stock/salesReturnEdit.vue
  82. 124 122
      src/xt_pages/stock/salesReturnOrder.vue
  83. 150 151
      src/xt_pages/stock/salesReturnOrderAdd.vue
  84. 68 63
      src/xt_pages/stock/salesReturnOrderDetail.vue
  85. 0 402
      src/xt_pages/stock/salesReutrnRecord.vue
  86. 0 437
      src/xt_pages/stock/stockIn.vue
  87. 54 57
      src/xt_pages/stock/stockInOrder.vue
  88. 194 199
      src/xt_pages/stock/stockInOrderAdd.vue
  89. 23 20
      src/xt_pages/stock/stockInOrderDetail.vue
  90. 56 54
      src/xt_pages/stock/stockInOrderEdit.vue
  91. 0 421
      src/xt_pages/stock/stockOut.vue
  92. 144 78
      src/xt_pages/stock/stockOutOrder.vue
  93. 105 107
      src/xt_pages/stock/stockOutOrderAdd.vue
  94. 94 89
      src/xt_pages/stock/stockOutOrderDetail.vue
  95. 50 53
      src/xt_pages/stock/stockOutOrderEdit.vue
  96. 0 270
      src/xt_pages/stock/stockOutRecord.vue
  97. 8 8
      src/xt_pages/stock/stockQuery.vue
  98. 0 304
      src/xt_pages/stock/warehouseRecord.vue
  99. 24 17
      src/xt_pages/user/dialysisSolution.1.vue
  100. 0 0
      src/xt_pages/user/dialysisSolution.vue

+ 14 - 0
src/api/qcd.js Bestand weergeven

@@ -41,4 +41,18 @@ export function GetPADialysisAgeData(params) {
41 41
     method: 'get',
42 42
     params: params
43 43
   })
44
+}
45
+export function GetPAWeightData(params) {
46
+  return request({
47
+    url: '/api/qcd/paweightdata',
48
+    method: 'get',
49
+    params: params
50
+  })
51
+}
52
+export function GetPABloodPressureData(params) {
53
+  return request({
54
+    url: '/api/qcd/pabloodpressuredata',
55
+    method: 'get',
56
+    params: params
57
+  })
44 58
 }

+ 268 - 362
src/api/stock.js Bestand weergeven

@@ -1,632 +1,538 @@
1 1
 import request from '@/utils/request'
2 2
 
3
-
4
-export function createDealer(params){
3
+export function createDealer(params) {
5 4
   return request({
6
-    url:'/api/stock/dealer/create',
7
-    method:'post',
8
-    params:params
5
+    url: '/api/stock/dealer/create',
6
+    method: 'post',
7
+    params: params
9 8
   })
10 9
 }
11 10
 
12
-
13
-export function modifyDealer(params){
11
+export function modifyDealer(params) {
14 12
   return request({
15
-    url:'/api/stock/dealer/modify',
16
-    method:'post',
17
-    params:params
13
+    url: '/api/stock/dealer/modify',
14
+    method: 'post',
15
+    params: params
18 16
   })
19 17
 }
20 18
 
21
-
22
-
23
-export function getDealersList(params){
19
+export function getDealersList(params) {
24 20
   return request({
25
-    url:'/api/stock/dealer/list',
26
-    method:'get',
27
-    params:params
21
+    url: '/api/stock/dealer/list',
22
+    method: 'get',
23
+    params: params
28 24
   })
29 25
 }
30 26
 
31
-
32
-export function deleteDealer(params){
27
+export function deleteDealer(params) {
33 28
   return request({
34
-    url:'/api/stock/dealer/delete',
35
-    method:'post',
36
-    params:params
29
+    url: '/api/stock/dealer/delete',
30
+    method: 'post',
31
+    params: params
37 32
   })
38 33
 }
39 34
 
40
-
41
-
42
-export function GetDealer(params){
35
+export function GetDealer(params) {
43 36
   return request({
44
-    url:'/api/stock/dealer/get',
45
-    method:'get',
46
-    params:params
37
+    url: '/api/stock/dealer/get',
38
+    method: 'get',
39
+    params: params
47 40
   })
48 41
 }
49 42
 
50
-
51
-
52
-
53
-
54
-export function createManufacturer(params){
43
+export function createManufacturer(params) {
55 44
   return request({
56
-    url:'/api/stock/manufacturer/create',
57
-    method:'post',
58
-    params:params
45
+    url: '/api/stock/manufacturer/create',
46
+    method: 'post',
47
+    params: params
59 48
   })
60 49
 }
61 50
 
62
-
63
-export function modifyManufacturer(params){
51
+export function modifyManufacturer(params) {
64 52
   return request({
65
-    url:'/api/stock/manufacturer/modify',
66
-    method:'post',
67
-    params:params
53
+    url: '/api/stock/manufacturer/modify',
54
+    method: 'post',
55
+    params: params
68 56
   })
69 57
 }
70 58
 
71
-
72
-
73
-export function getManufacturerList(params){
59
+export function getManufacturerList(params) {
74 60
   return request({
75
-    url:'/api/stock/manufacturer/list',
76
-    method:'get',
77
-    params:params
61
+    url: '/api/stock/manufacturer/list',
62
+    method: 'get',
63
+    params: params
78 64
   })
79 65
 }
80 66
 
81
-
82
-export function deleteManufacturer(params){
67
+export function deleteManufacturer(params) {
83 68
   return request({
84
-    url:'/api/stock/manufacturer/delete',
85
-    method:'post',
86
-    params:params
69
+    url: '/api/stock/manufacturer/delete',
70
+    method: 'post',
71
+    params: params
87 72
   })
88 73
 }
89 74
 
90
-
91
-
92
-export function GetManufacturer(params){
75
+export function GetManufacturer(params) {
93 76
   return request({
94
-    url:'/api/stock/manufacturer/get',
95
-    method:'get',
96
-    params:params
77
+    url: '/api/stock/manufacturer/get',
78
+    method: 'get',
79
+    params: params
97 80
   })
98 81
 }
99 82
 
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-export function createGoodType(params){
83
+export function createGoodType(params) {
110 84
   return request({
111
-    url:'/api/stock/good/type/create',
112
-    method:'post',
113
-    params:params
85
+    url: '/api/stock/good/type/create',
86
+    method: 'post',
87
+    params: params
114 88
   })
115 89
 }
116 90
 
117
-
118
-export function modifyGoodType(params){
91
+export function modifyGoodType(params) {
119 92
   return request({
120
-    url:'/api/stock/good/type/modify',
121
-    method:'post',
122
-    params:params
93
+    url: '/api/stock/good/type/modify',
94
+    method: 'post',
95
+    params: params
123 96
   })
124 97
 }
125 98
 
126
-
127
-
128
-export function getGoodTypeList(params){
99
+export function getGoodTypeList(params) {
129 100
   return request({
130
-    url:'/api/stock/good/type/list',
131
-    method:'get',
132
-    params:params
101
+    url: '/api/stock/good/type/list',
102
+    method: 'get',
103
+    params: params
133 104
   })
134 105
 }
135 106
 
136
-
137
-export function deleteGoodType(params){
107
+export function deleteGoodType(params) {
138 108
   return request({
139
-    url:'/api/type/delete',
140
-    method:'post',
141
-    params:params
109
+    url: '/api/type/delete',
110
+    method: 'post',
111
+    params: params
142 112
   })
143 113
 }
144 114
 
145
-
146
-
147
-export function GetGoodType(params){
115
+export function GetGoodType(params) {
148 116
   return request({
149
-    url:'/api/stock/good/type/get',
150
-    method:'get',
151
-    params:params
117
+    url: '/api/stock/good/type/get',
118
+    method: 'get',
119
+    params: params
152 120
   })
153 121
 }
154 122
 
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-export function createGoodInfo(params){
123
+export function createGoodInfo(params) {
164 124
   return request({
165
-    url:'/api/stock/good/info/create',
166
-    method:'post',
167
-    params:params
125
+    url: '/api/stock/good/info/create',
126
+    method: 'post',
127
+    params: params
168 128
   })
169 129
 }
170 130
 
171
-
172
-export function modifyGoodInfo(params){
131
+export function modifyGoodInfo(params) {
173 132
   return request({
174
-    url:'/api/stock/good/info/modify',
175
-    method:'post',
176
-    params:params
133
+    url: '/api/stock/good/info/modify',
134
+    method: 'post',
135
+    params: params
177 136
   })
178 137
 }
179 138
 
180
-
181
-
182
-export function getGoodInfoList(params){
139
+export function getGoodInfoList(params) {
183 140
   return request({
184
-    url:'/api/stock/good/info/list',
185
-    method:'get',
186
-    params:params
141
+    url: '/api/stock/good/info/list',
142
+    method: 'get',
143
+    params: params
187 144
   })
188 145
 }
189 146
 
190
-
191
-export function deleteGoodInfo(params){
147
+export function deleteGoodInfo(params) {
192 148
   return request({
193
-    url:'/api/info/delete',
194
-    method:'post',
195
-    params:params
149
+    url: '/api/info/delete',
150
+    method: 'post',
151
+    params: params
196 152
   })
197 153
 }
198 154
 
199
-
200
-
201
-export function GetGoodInfoByGoodId(params){
155
+export function GetGoodInfoByGoodId(params) {
202 156
   return request({
203
-    url:'/api/stock/good/info/get',
204
-    method:'get',
205
-    params:params
157
+    url: '/api/stock/good/info/get',
158
+    method: 'get',
159
+    params: params
206 160
   })
207 161
 }
208 162
 
209
-export function GetGoodInfo(params){
163
+export function GetGoodInfo(params) {
210 164
   return request({
211
-    url:'/api/stock/good/info',
212
-    method:'get',
213
-    params:params
165
+    url: '/api/stock/good/info',
166
+    method: 'get',
167
+    params: params
214 168
   })
215 169
 }
216 170
 
217
-
218
-
219
-export function GetAllDeals(params){
171
+export function GetAllDeals(params) {
220 172
   return request({
221
-    url:'/api/stock/dealer/all',
222
-    method:'get',
223
-    params:params
173
+    url: '/api/stock/dealer/all',
174
+    method: 'get',
175
+    params: params
224 176
   })
225 177
 }
226 178
 
227
-
228
-export function GetAllManufacturer(params){
179
+export function GetAllManufacturer(params) {
229 180
   return request({
230
-    url:'/api/stock/manufacturer/all',
231
-    method:'get',
232
-    params:params
181
+    url: '/api/stock/manufacturer/all',
182
+    method: 'get',
183
+    params: params
233 184
   })
234 185
 }
235 186
 
236
-
237
-export function GetAllGoodType(params){
187
+export function GetAllGoodType(params) {
238 188
   return request({
239
-    url:'/api/stock/good/type/all',
240
-    method:'get',
241
-    params:params
189
+    url: '/api/stock/good/type/all',
190
+    method: 'get',
191
+    params: params
242 192
   })
243 193
 }
244 194
 
245
-
246
-export function GetAllGoodInfo(params){
195
+export function GetAllGoodInfo(params) {
247 196
   return request({
248
-    url:'/api/stock/good/info/all',
249
-    method:'get',
250
-    params:params
197
+    url: '/api/stock/good/info/all',
198
+    method: 'get',
199
+    params: params
251 200
   })
252 201
 }
253 202
 
254
-export function postWarehouse(params,warehousing_time,manufacturer_id,dealer_id,type){
203
+export function postWarehouse(params, warehousing_time, manufacturer_id, dealer_id, type) {
255 204
   return request({
256
-    url:'/api/warehouse/create?warehousing_time='+warehousing_time+"&manufacturer_id="+manufacturer_id+"&dealer_id="+dealer_id+"&type="+type,
257
-    method:'post',
258
-    data:params
205
+    url: '/api/warehouse/create?warehousing_time=' + warehousing_time + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&type=' + type,
206
+    method: 'post',
207
+    data: params
259 208
   })
260 209
 }
261 210
 
262
-
263
-export function getWarehouseList(params){
211
+export function getWarehouseList(params) {
264 212
   return request({
265
-    url:'/api/warehouse/list',
266
-    method:'get',
267
-    params:params
213
+    url: '/api/warehouse/list',
214
+    method: 'get',
215
+    params: params
268 216
   })
269 217
 }
270 218
 
271
-export function getWarehouseInfoList(params){
219
+export function getWarehouseInfoList(params) {
272 220
   return request({
273
-    url:'/api/warehouseinfo/list',
274
-    method:'get',
275
-    params:params
221
+    url: '/api/warehouseinfo/list',
222
+    method: 'get',
223
+    params: params
276 224
   })
277 225
 }
278 226
 
279
-
280
-export function postSalesReturn(params,salesReturnTime,salesReturnTotal,dealer_id,manufacturer_id,type){
227
+export function postSalesReturn(params, salesReturnTime, salesReturnTotal, dealer_id, manufacturer_id, type) {
281 228
   return request({
282
-    url:'/api/salesreturn/create?time='+salesReturnTime+"&total="+salesReturnTotal+"&dealer_id="+dealer_id+"&manufacturer_id="+manufacturer_id+"&type="+type,
283
-    method:'post',
284
-    data:params
229
+    url: '/api/salesreturn/create?time=' + salesReturnTime + '&total=' + salesReturnTotal + '&dealer_id=' + dealer_id + '&manufacturer_id=' + manufacturer_id + '&type=' + type,
230
+    method: 'post',
231
+    data: params
285 232
   })
286 233
 }
287 234
 
288
-export function getWarehouseInfo(params){
235
+export function getWarehouseInfo(params) {
289 236
   return request({
290
-    url:'/api/info/get',
291
-    method:'get',
292
-    params:params
237
+    url: '/api/info/get',
238
+    method: 'get',
239
+    params: params
293 240
   })
294 241
 }
295 242
 
296
-
297
-
298
-export function getSalesReturnList(params){
243
+export function getSalesReturnList(params) {
299 244
   return request({
300
-    url:'/api/salesreturn/list',
301
-    method:'get',
302
-    params:params
245
+    url: '/api/salesreturn/list',
246
+    method: 'get',
247
+    params: params
303 248
   })
304 249
 }
305 250
 
306
-
307
-export function getSalesReturnInfoList(params){
251
+export function getSalesReturnInfoList(params) {
308 252
   return request({
309
-    url:'/api/return/info',
310
-    method:'get',
311
-    params:params
253
+    url: '/api/return/info',
254
+    method: 'get',
255
+    params: params
312 256
   })
313 257
 }
314 258
 
315
-export function getAllWarehouseInfo(params){
259
+export function getAllWarehouseInfo(params) {
316 260
   return request({
317
-    url:'/api/warehouseinfo',
318
-    method:'get',
319
-    params:params
261
+    url: '/api/warehouseinfo',
262
+    method: 'get',
263
+    params: params
320 264
   })
321 265
 }
322 266
 
323
-
324
-
325
-
326
-
327
-export function getWarehouseOutInfoList(params){
267
+export function getWarehouseOutInfoList(params) {
328 268
   return request({
329
-    url:'/api/stock/out/info',
330
-    method:'get',
331
-    params:params
269
+    url: '/api/stock/out/info',
270
+    method: 'get',
271
+    params: params
332 272
   })
333 273
 }
334 274
 
335
-
336
-export function postWarehouseOut(params,warehousing_time,dealer_id,manufacturer_id,type){
275
+export function postWarehouseOut(params, warehousing_time, dealer_id, manufacturer_id, type) {
337 276
   return request({
338
-    url:'/api/warehouseout/create?warehousing_out_time='+warehousing_time+"&dealer_id="+dealer_id+"&manufacturer_id="+manufacturer_id+"&type="+type,
339
-    method:'post',
340
-    data:params
277
+    url: '/api/warehouseout/create?warehousing_out_time=' + warehousing_time + '&dealer_id=' + dealer_id + '&manufacturer_id=' + manufacturer_id + '&type=' + type,
278
+    method: 'post',
279
+    data: params
341 280
   })
342 281
 }
343 282
 
344
-
345
-export function getWarehouseInfoCountByGoodId(params){
283
+export function getWarehouseInfoCountByGoodId(params) {
346 284
   return request({
347
-    url:'/api/info/count',
348
-    method:'get',
349
-    params:params
285
+    url: '/api/info/count',
286
+    method: 'get',
287
+    params: params
350 288
   })
351 289
 }
352 290
 
353
-export function getWarehouseInfoByGoodTypeId(params){
291
+export function getWarehouseInfoByGoodTypeId(params) {
354 292
   return request({
355
-    url:'/api/warehouse/type',
356
-    method:'get',
357
-    params:params
293
+    url: '/api/warehouse/type',
294
+    method: 'get',
295
+    params: params
358 296
   })
359 297
 }
360 298
 
361
-
362
-
363
-
364
-export function getCancelStockInfoList(params){
299
+export function getCancelStockInfoList(params) {
365 300
   return request({
366
-    url:'/api/cancel/info',
367
-    method:'get',
368
-    params:params
301
+    url: '/api/cancel/info',
302
+    method: 'get',
303
+    params: params
369 304
   })
370 305
 }
371 306
 
372
-
373
-export function getAllStockOutList(params){
307
+export function getAllStockOutList(params) {
374 308
   return request({
375
-    url:'/api/out/list',
376
-    method:'get',
377
-    params:params
309
+    url: '/api/out/list',
310
+    method: 'get',
311
+    params: params
378 312
   })
379 313
 }
380 314
 
381
-
382
-
383
-
384
-export function getAllStockQueryList(params){
315
+export function getAllStockQueryList(params) {
385 316
   return request({
386
-    url:'/api/stock/query',
387
-    method:'get',
388
-    params:params
317
+    url: '/api/stock/query',
318
+    method: 'get',
319
+    params: params
389 320
   })
390 321
 }
391 322
 
392
-
393
-export function getWarehouseInfoByOrdeNumber(params){
323
+export function getWarehouseInfoByOrdeNumber(params) {
394 324
   return request({
395
-    url:'/api/stock/warehouse/get',
396
-    method:'get',
397
-    params:params
325
+    url: '/api/stock/warehouse/get',
326
+    method: 'get',
327
+    params: params
398 328
   })
399 329
 }
400 330
 
401
-
402
-export function modifyWarehouseInfo(params){
331
+export function modifyWarehouseInfo(params) {
403 332
   return request({
404
-    url:'/api/warehouse/edit',
405
-    method:'post',
406
-    params:params
333
+    url: '/api/warehouse/edit',
334
+    method: 'post',
335
+    params: params
407 336
   })
408 337
 }
409 338
 
410
-
411
-export function deleteWarehouseInfo(params){
339
+export function deleteWarehouseInfo(params) {
412 340
   return request({
413
-    url:'/api/warehouse/delete',
414
-    method:'post',
415
-    params:params
341
+    url: '/api/warehouse/delete',
342
+    method: 'post',
343
+    params: params
416 344
   })
417 345
 }
418 346
 
419
-
420
-export function getWarehouseOutInfoByOrdeNumber(params){
347
+export function getWarehouseOutInfoByOrdeNumber(params) {
421 348
   return request({
422
-    url:'/api/stock/out/get',
423
-    method:'get',
424
-    params:params
349
+    url: '/api/stock/out/get',
350
+    method: 'get',
351
+    params: params
425 352
   })
426 353
 }
427 354
 
428
-export function modifyWarehouseOutInfo(params){
355
+export function modifyWarehouseOutInfo(params) {
429 356
   return request({
430
-    url:'/api/stock/out/edit',
431
-    method:'post',
432
-    params:params
357
+    url: '/api/stock/out/edit',
358
+    method: 'post',
359
+    params: params
433 360
   })
434 361
 }
435 362
 
436
-
437
-
438
-
439
-
440
-export function GetAllConfig(){
363
+export function GetAllConfig() {
441 364
   return request({
442
-    url:'/api/stock/config',
443
-    method:'get',
365
+    url: '/api/stock/config',
366
+    method: 'get'
444 367
   })
445 368
 }
446 369
 
447
-export function GetAllGoodInfoByID(params){
370
+export function GetAllGoodInfoByID(params) {
448 371
   return request({
449
-    url:'/api/good/get',
450
-    method:'get',
451
-    params:params
372
+    url: '/api/good/get',
373
+    method: 'get',
374
+    params: params
452 375
 
453 376
   })
454 377
 }
455 378
 
456
-
457
-export function DeleteWarehouseInfoItem(params){
379
+export function DeleteWarehouseInfoItem(params) {
458 380
   return request({
459
-    url:'/api/warehouseinfo/delete',
460
-    method:'post',
461
-    params:params
381
+    url: '/api/warehouseinfo/delete',
382
+    method: 'post',
383
+    params: params
462 384
 
463 385
   })
464 386
 }
465 387
 
466
-
467
-
468
-export function EditWarehouse(params,warehousing_time,id){
388
+export function EditWarehouse(params, warehousing_time, id) {
469 389
   return request({
470
-    url:'/api/warehouse/edit?warehousing_time='+warehousing_time+'&id='+id,
471
-    method:'post',
472
-    data:params
390
+    url: '/api/warehouse/edit?warehousing_time=' + warehousing_time + '&id=' + id,
391
+    method: 'post',
392
+    data: params
473 393
   })
474 394
 }
475 395
 
476
-
477
-export function getSalesReturnConfig(){
396
+export function getSalesReturnConfig(params) {
478 397
   return request({
479
-    url:'/api/return/config',
480
-    method:'get',
398
+    url: '/api/return/config',
399
+    method: 'get',
400
+    params: params
401
+
481 402
   })
482 403
 }
483 404
 
484
-export function deleteSalesReturn(params){
405
+export function deleteSalesReturn(params) {
485 406
   return request({
486
-    url:'/api/salesreturn/delete',
487
-    method:'post',
488
-    params:params
407
+    url: '/api/salesreturn/delete',
408
+    method: 'post',
409
+    params: params
489 410
   })
490 411
 }
491 412
 
492
-
493
-export function getSaleReturnInfoList(params){
413
+export function getSaleReturnInfoList(params) {
494 414
   return request({
495
-    url:'/api/stock/salesReturn/list',
496
-    method:'get',
497
-    params:params
415
+    url: '/api/stock/salesReturn/list',
416
+    method: 'get',
417
+    params: params
498 418
   })
499 419
 }
500 420
 
501
-
502
-export function getReturnList(params){
421
+export function getReturnList(params) {
503 422
   return request({
504
-    url:'/api/salesreturninfo/list',
505
-    method:'get',
506
-    params:params
423
+    url: '/api/salesreturninfo/list',
424
+    method: 'get',
425
+    params: params
507 426
   })
508 427
 }
509
-export function deleteSalesReturnInfo(params){
428
+export function deleteSalesReturnInfo(params) {
510 429
   return request({
511
-    url:'/api/salesreturninfo/delete',
512
-    method:'post',
513
-    params:params
430
+    url: '/api/salesreturninfo/delete',
431
+    method: 'post',
432
+    params: params
514 433
   })
515 434
 }
516 435
 
517
-
518
-
519
-export function editSalesReturnInfo(params,return_time,id){
436
+export function editSalesReturnInfo(params, return_time, id) {
520 437
   return request({
521
-    url:'/api/salesreturn/edit?return_time='+return_time+"&id="+id,
522
-    method:'post',
523
-    data:params
438
+    url: '/api/salesreturn/edit?return_time=' + return_time + '&id=' + id,
439
+    method: 'post',
440
+    data: params
524 441
   })
525 442
 }
526 443
 
527
-
528
-export function deleteWarehouseOut(params){
444
+export function deleteWarehouseOut(params) {
529 445
   return request({
530
-    url:'/api/warehouseout/delete',
531
-    method:'post',
532
-    params:params
446
+    url: '/api/warehouseout/delete',
447
+    method: 'post',
448
+    params: params
533 449
   })
534 450
 }
535 451
 
536
-export function deleteWarehouseOutInfo(params){
452
+export function deleteWarehouseOutInfo(params) {
537 453
   return request({
538
-    url:'/api/warehouseoutinfo/delete',
539
-    method:'post',
540
-    params:params
454
+    url: '/api/warehouseoutinfo/delete',
455
+    method: 'post',
456
+    params: params
541 457
   })
542 458
 }
543 459
 
544
-
545
-export function getWarehouseOutList(params){
460
+export function getWarehouseOutList(params) {
546 461
   return request({
547
-    url:'/api/warehouseout/list',
548
-    method:'get',
549
-    params:params
462
+    url: '/api/warehouseout/list',
463
+    method: 'get',
464
+    params: params
550 465
   })
551 466
 }
552 467
 
553
-export function getWarehouseOutInfo(params){
468
+export function getWarehouseOutInfo(params) {
554 469
   return request({
555
-    url:'/api/warehouseout/info',
556
-    method:'get',
557
-    params:params
470
+    url: '/api/warehouseout/info',
471
+    method: 'get',
472
+    params: params
558 473
   })
559 474
 }
560 475
 
561
-
562
-export function editWarehouseoutInfo(params,warehouse_out_time,id){
476
+export function editWarehouseoutInfo(params, warehouse_out_time, id) {
563 477
   return request({
564
-    url:'/api/warehouseout/edit?warehouse_out_time='+warehouse_out_time+"&id="+id,
565
-    method:'post',
566
-    data:params
478
+    url: '/api/warehouseout/edit?warehouse_out_time=' + warehouse_out_time + '&id=' + id,
479
+    method: 'post',
480
+    data: params
567 481
   })
568 482
 }
569 483
 
570
-
571
-
572
-
573
-export function getCancelStockList(params){
484
+export function getCancelStockList(params) {
574 485
   return request({
575
-    url:'/api/cancelstock/list',
576
-    method:'get',
577
-    params:params
486
+    url: '/api/cancelstock/list',
487
+    method: 'get',
488
+    params: params
578 489
   })
579 490
 }
580 491
 
581
-
582
-
583
-export function editCancelStockInfo(params,cancel_stock_time,id){
492
+export function editCancelStockInfo(params, cancel_stock_time, id) {
584 493
   return request({
585
-    url:'/api/cancelstockinfo/edit?cancel_time='+cancel_stock_time+"&id="+id,
586
-    method:'post',
587
-    data:params
494
+    url: '/api/cancelstockinfo/edit?cancel_time=' + cancel_stock_time + '&id=' + id,
495
+    method: 'post',
496
+    data: params
588 497
   })
589 498
 }
590 499
 
591
-
592
-export function getCancelStockInfo(params){
500
+export function getCancelStockInfo(params) {
593 501
   return request({
594
-    url:'/api/cancelstock/info',
595
-    method:'get',
596
-    params:params
502
+    url: '/api/cancelstock/info',
503
+    method: 'get',
504
+    params: params
597 505
   })
598 506
 }
599 507
 
600
-
601
-
602
-export function deleteCancelStock(params){
508
+export function deleteCancelStock(params) {
603 509
   return request({
604
-    url:'/api/cancelstock/delete',
605
-    method:'post',
606
-    params:params
510
+    url: '/api/cancelstock/delete',
511
+    method: 'post',
512
+    params: params
607 513
   })
608 514
 }
609 515
 
610
-export function deleteCancelStockInfo(params){
516
+export function deleteCancelStockInfo(params) {
611 517
   return request({
612
-    url:'/api/cancelstockinfo/delete',
613
-    method:'post',
614
-    params:params
518
+    url: '/api/cancelstockinfo/delete',
519
+    method: 'post',
520
+    params: params
615 521
   })
616 522
 }
617 523
 
618
-export function postCancelStock(params,cancelStockTime,manufacturer_id,dealer_id,type){
524
+export function postCancelStock(params, cancelStockTime, manufacturer_id, dealer_id, type) {
619 525
   return request({
620
-    url:'/api/cancelstock/create?time='+cancelStockTime+"&manufacturer_id="+manufacturer_id+"&dealer_id="+dealer_id+"&type="+type,
621
-    method:'post',
622
-    data:params
526
+    url: '/api/cancelstock/create?time=' + cancelStockTime + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&type=' + type,
527
+    method: 'post',
528
+    data: params
623 529
   })
624 530
 }
625
-export function getCancelStockConfig(){
531
+export function getCancelStockConfig(params) {
626 532
   return request({
627
-    url:'/api/cancelstockinfo/config',
628
-    method:'get',
533
+    url: '/api/cancelstockinfo/config',
534
+    method: 'get',
535
+    params: params
629 536
   })
630 537
 }
631 538
 
632
-

+ 58 - 49
src/lang/zh.js Bestand weergeven

@@ -68,8 +68,8 @@ export default {
68 68
     paper: '透析管理',
69 69
     advice: '今日医嘱',
70 70
     prepare: '透析准备',
71
-    dialysisPrintOrder:'打印透析单',
72
-    details:'透析',
71
+    dialysisPrintOrder: '打印透析单',
72
+    details: '透析',
73 73
     data_dictionary: '数据字典',
74 74
     field_config: '字段配置',
75 75
     template: '模版配置',
@@ -89,8 +89,8 @@ export default {
89 89
     weight: '干体重',
90 90
     dialysisRecord: '透析记录',
91 91
     scheduling: '排班信息',
92
-    proeducation:'宣教信息',
93
-    doctorAdvice:'医嘱信息',
92
+    proeducation: '宣教信息',
93
+    doctorAdvice: '医嘱信息',
94 94
     device: '设备',
95 95
     deviceManage: '设备管理',
96 96
     dialysisMachineManage: '透析机管理',
@@ -99,51 +99,60 @@ export default {
99 99
     sign: '治疗签到',
100 100
     remind: '排班提醒',
101 101
     signWeight: '签到称重',
102
-    deviceZoneManage: "分区管理",
103
-    deviceGroupManage: "分组管理",
104
-    deviceNumberManage: "床位管理",
105
-    service:'我的服务',
106
-    invoice:'发票管理',
107
-    invoiceApply:'申请发票',
108
-    servicePay:'立即支付',
109
-    serviceOrder:'购买服务',
110
-    payType:'选择支付方式',
111
-    weChatPay:'确认支付',
112
-    completeOrder:'购买结果',
113
-    orderRecord:'订单详情',
114
-    recordList:'订单记录',
115
-    stockManage:'库存管理',
116
-    goodType:'物品类型',
117
-    stockIn:'入库管理',
118
-    stockOut:'出库管理',
119
-    manufacturer:'厂家',
120
-    dealer:'经销商',
121
-    salesReturn:'退货',
122
-    salesReutrnRecord:'退货记录',
123
-    warehouseRecord:'入库记录',
124
-    addStockOut:'出库',
125
-    cancelStock:'出库退库',
126
-    cancelStockRecord:'退库记录',
127
-    stockOutRecord:'出库记录',
128
-    addStockIn:'入库',
129
-    stockQuery:'库存查询',
130
-    workforce_template: "排班模板设置",
131
-    statistics:"统计分析",
132
-    config:'库存配置',
133
-    goodInfo:'物品信息',
134
-    CourseOfDiseaseManage: "病程管理",
135
-    RescueRecord: "抢救记录",
136
-    special_permission_manage: "特殊权限管理",
137
-    schedule_print: "排班打印",
102
+    deviceZoneManage: '分区管理',
103
+    deviceGroupManage: '分组管理',
104
+    deviceNumberManage: '床位管理',
105
+    service: '我的服务',
106
+    invoice: '发票管理',
107
+    invoiceApply: '申请发票',
108
+    servicePay: '立即支付',
109
+    serviceOrder: '购买服务',
110
+    payType: '选择支付方式',
111
+    weChatPay: '确认支付',
112
+    completeOrder: '购买结果',
113
+    orderRecord: '订单详情',
114
+    recordList: '订单记录',
115
+    stockManage: '库存管理',
116
+    goodType: '物品类型',
117
+    stockIn: '入库管理',
118
+    stockOut: '出库管理',
119
+    manufacturer: '厂家',
120
+    dealer: '经销商',
121
+    salesReturn: '退货',
122
+    salesReutrnRecord: '退货记录',
123
+    warehouseRecord: '入库记录',
124
+    addStockOut: '出库',
125
+    cancelStock: '出库退库',
126
+    cancelStockRecord: '退库记录',
127
+    stockOutRecord: '出库记录',
128
+    addStockIn: '入库',
129
+    stockQuery: '库存查询',
130
+    workforce_template: '排班模板设置',
131
+    statistics: '统计分析',
132
+    config: '库存配置',
133
+    goodInfo: '物品信息',
134
+    CourseOfDiseaseManage: '病程管理',
135
+    RescueRecord: '抢救记录',
136
+    special_permission_manage: '特殊权限管理',
137
+    schedule_print: '排班打印',
138
+
139
+    stockInOrder: '入库单',
140
+    salesReturnOrder: '退货单',
141
+    stockOutOrder: '出库单',
142
+    cancelStockOrder: '出库退库单',
143
+    otherStockInOrder: '其他入库单',
144
+    otherSalesReturnOrder: '其他退货单',
145
+    otherStockOutOrder: '其他出库单',
146
+    otherCancelStockOrder: '其他出库退库单',
147
+    stockInOrderAdd: '新增入库单',
148
+    salesReturnOrderAdd: '新增退货单',
149
+    stockOutOrderAdd: '新增出库单',
150
+    cancelStockOrderAdd: '新增出库退库单',
151
+    stockInDetail: '入库单详情',
152
+    salesReturnDetail: '退货单详情',
153
+    stockOutDetail: '出库单详情',
154
+    cancelStockDetail: '出库退库单详情'
138 155
 
139
-    stockInOrder:"入库单",
140
-    salesReturnOrder:"退货单",
141
-    stockOutOrder:"出库单",
142
-    cancelStockOrder:"出库退库单",
143
-    otherStockInOrder:"其他入库单",
144
-    otherSalesReturnOrder:"其他退货单",
145
-    otherStockOutOrder:"其他出库单",
146
-    otherCancelStockOrder:"其他出库退库单",
147 156
   },
148 157
   navbar: {
149 158
     logOut: '退出登录',
@@ -245,6 +254,6 @@ export default {
245 254
     config_value: '字段值',
246 255
     remark: '备注',
247 256
     course_disease: '病程',
248
-    rescue_record: '抢救记录',
257
+    rescue_record: '抢救记录'
249 258
   }
250 259
 }

+ 118 - 111
src/router/index.js Bestand weergeven

@@ -122,7 +122,9 @@ export const xt_constantRouterMap = [
122 122
     ]
123 123
   },
124 124
 
125
-  // ////////////////////////////本地开始
125
+  // ////////////////////////////
126
+  //本地开始
127
+  ///////////////////////////////
126 128
   {
127 129
     path: 'statistics',
128 130
     component: Layout,
@@ -155,31 +157,14 @@ export const xt_constantRouterMap = [
155 157
     children: [
156 158
       { path: '/qcd/dialysistotal', component: () => import('@/xt_pages/qcd/dialysisTotal'), name: 'dialysistotal', meta: { title: '透析总量' }},
157 159
       { path: '/qcd/processindicators', component: () => import('@/xt_pages/qcd/processIndicators'), name: 'processIndicators', meta: { title: '过程指标' }},
158
-      {
159
-        path: '/qcd/outcomeIndicators',
160
-        name: 'outcomeIndicators',
161
-        meta: { title: '结果指标' },
162
-        redirect: '/qcd/outcomeIndicators/control',
163
-        component: () => import('@/xt_pages/qcd/outcomeIndicators/parent'), // Parent router-view
164
-        children: [
165
-          { path: '/qcd/outcomeIndicators/control', component: () => import('@/xt_pages/qcd/outcomeIndicators/control'), name: 'outcomeIndicatorsControl', meta: { title: '指标控制' }},
166
-          { path: '/qcd/outcomeIndicators/query', component: () => import('@/xt_pages/qcd/outcomeIndicators/query'), name: 'outcomeIndicatorsQuery', meta: { title: '指标查询' }}
167
-        ]
168
-      },
169
-      {
170
-        path: '/qcd/patientanalysis',
171
-        name: 'patientanalysis',
172
-        meta: { title: '患者分析' },
173
-        redirect: '/qcd/patientanalysis/total',
174
-        component: () => import('@/xt_pages/qcd/patientAnalysis/parent'), // Parent router-view
175
-        children: [
176
-          { path: '/qcd/patientanalysis/total', component: () => import('@/xt_pages/qcd/patientAnalysis/total'), name: 'patientAnalysisTotal', meta: { title: '总量分析' }},
177
-          { path: '/qcd/patientanalysis/weight', component: () => import('@/xt_pages/qcd/patientAnalysis/weight'), name: 'patientAnalysisWeight', meta: { title: '体重分析' }},
178
-          { path: '/qcd/patientanalysis/bloodpressure', component: () => import('@/xt_pages/qcd/patientAnalysis/bloodPressure'), name: 'patientAnalysisBloodPressure', meta: { title: '血压分析' }},
179
-          { path: '/qcd/patientanalysis/dialysisage', component: () => import('@/xt_pages/qcd/patientAnalysis/dialysisAge'), name: 'patientAnalysisDialysisAge', meta: { title: '透析龄分析' }},
180
-          { path: '/qcd/patientanalysis/lapseto', component: () => import('@/xt_pages/qcd/patientAnalysis/lapseto'), name: 'patientAnalysisLapseto', meta: { title: '转归分析' }}
181
-        ]
182
-      }
160
+      { path: '/qcd/outcomeIndicators/control', component: () => import('@/xt_pages/qcd/outcomeIndicators/control'), name: 'outcomeIndicatorsControl', meta: { title: '结果指标' }},
161
+      { path: '/qcd/outcomeIndicators/query', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/outcomeIndicators/query'), name: 'outcomeIndicatorsQuery', meta: { title: '指标查询' }},
162
+      { path: '/qcd/patientanalysis/total', component: () => import('@/xt_pages/qcd/patientAnalysis/total'), name: 'patientAnalysisTotal', meta: { title: '患者分析' }},
163
+      { path: '/qcd/patientanalysis/weight',hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/weight'), name: 'patientAnalysisWeight', meta: { title: '体重分析' }},
164
+      { path: '/qcd/patientanalysis/bloodpressure', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/bloodPressure'), name: 'patientAnalysisBloodPressure', meta: { title: '血压分析' }},
165
+      { path: '/qcd/patientanalysis/dialysisage', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/dialysisAge'), name: 'patientAnalysisDialysisAge', meta: { title: '透析龄分析' }},
166
+      { path: '/qcd/patientanalysis/lapseto', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/lapseto'), name: 'patientAnalysisLapseto', meta: { title: '转归分析' }},
167
+      { path: '/qcd/patientanalysis/complication', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/complication'), name: 'patientAnalysisComplication', meta: { title: '并发症分析' }},
183 168
     ]
184 169
   },
185 170
   {
@@ -496,28 +481,28 @@ export const xt_constantRouterMap = [
496 481
         name: 'stockOutOrderAdd',
497 482
         hidden: true,
498 483
         is_menu: false,
499
-        meta: { title: 'stockOutOrderAdd', noCache: true }
484
+        meta: { title: 'stockOutOrderAdd' }
500 485
       }, {
501 486
         path: '/stock/out/detail',
502 487
         component: () => import('@/xt_pages/stock/stockOutDetail'),
503 488
         name: 'stockOutDetail',
504 489
         hidden: true,
505 490
         is_menu: false,
506
-        meta: { title: 'stockOutDetail', noCache: true }
491
+        meta: { title: 'stockOutDetail' }
507 492
       }, {
508 493
         path: '/stock/cancel/add',
509 494
         component: () => import('@/xt_pages/stock/cancelStockOrderAdd'),
510 495
         name: 'cancelStockOrderAdd',
511 496
         hidden: true,
512 497
         is_menu: false,
513
-        meta: { title: 'cancelStockOrderAdd', noCache: true }
498
+        meta: { title: 'cancelStockOrderAdd' }
514 499
       }, {
515 500
         path: '/stock/cancel/detail',
516 501
         component: () => import('@/xt_pages/stock/cancelStockDetail'),
517 502
         name: 'cancelStockDetail',
518 503
         hidden: true,
519 504
         is_menu: false,
520
-        meta: { title: 'cancelStockDetail', noCache: true }
505
+        meta: { title: 'cancelStockDetail' }
521 506
       }
522 507
 
523 508
     ]
@@ -708,6 +693,17 @@ export const xt_asyncRouterMap = [
708 693
   //   ]
709 694
   // },
710 695
   // {
696
+  //   path: '/sign',
697
+  //   component: Layout,
698
+  //   redirect: '/sign/index',
699
+  //   name: 'sign',
700
+  //   alwaysShow: true,
701
+  //   meta: { title: 'signWeight', icon: 'table' },
702
+  //   children: [
703
+  //     { path: '/sign/index', component: () => import('@/xt_pages/sign/index'), name: 'signWeight', meta: { title: 'signWeight' }}
704
+  //   ]
705
+  // },
706
+  // {
711 707
   //   path: '/dialysis/',
712 708
   //   component: Layout,
713 709
   //   redirect: 'noredirect',
@@ -769,94 +765,123 @@ export const xt_asyncRouterMap = [
769 765
   //     { path: '/device/numbers', component: () => import('@/xt_pages/device/number_main'), name: 'deviceNumberManage', meta: { title: 'deviceNumberManage' }},
770 766
   //     { path: '/device/main', component: () => import('@/xt_pages/device/main'), name: 'dialysisMachineManage', meta: { title: 'dialysisMachineManage' }}
771 767
   //   ]
772
-  // },{
768
+  // }, {
773 769
   //   path: '/stock/',
774 770
   //   component: Layout,
775 771
   //   redirect: 'noredirect',
776 772
   //   name: 'stockManage',
777
-  //   meta: {title: 'stockManage', icon: 'nested'},
773
+  //   meta: { title: 'stockManage', icon: 'excel' },
778 774
   //   children: [
779 775
   //     {
776
+  //       path: '/stock/config',
777
+  //       component: () => import('@/xt_pages/stock/index'),
778
+  //       name: 'config',
779
+  //       meta: { title: 'config' }
780
+  //     },
781
+  //     {
780 782
   //       path: '/stock/in',
781
-  //       component: () => import('@/xt_pages/stock/stockIn'),
782
-  //       name: 'stockIn',
783
-  //       meta: {title: 'stockIn',noCache: true }
784
-
783
+  //       component: () => import('@/xt_pages/stock/stockInOrder'),
784
+  //       name: 'stockInOrder',
785
+  //       meta: { title: 'stockInOrder', noCache: true }
786
+  //     }, {
787
+  //       path: '/stock/in/other',
788
+  //       component: () => import('@/xt_pages/stock/otherStockInOrder'),
789
+  //       name: 'otherStockInOrder',
790
+  //       meta: { title: 'otherStockInOrder', noCache: true }
791
+  //     }, {
792
+  //       path: '/stock/return',
793
+  //       component: () => import('@/xt_pages/stock/salesReturnOrder'),
794
+  //       name: 'salesReturnOrder',
795
+  //       meta: { title: 'salesReturnOrder', noCache: true }
796
+  //     }, {
797
+  //       path: '/stock/return/other',
798
+  //       component: () => import('@/xt_pages/stock/otherSalesReturnOrder'),
799
+  //       name: 'otherSalesReturnOrder',
800
+  //       meta: { title: 'otherSalesReturnOrder', noCache: true }
785 801
   //     },
786
-
787
-  //      {
802
+  //     {
788 803
   //       path: '/stock/out',
789
-  //       component: () => import('@/xt_pages/stock/stockOut'),
790
-  //       name: 'stockOut',
791
-  //       meta: {title: 'stockOut',noCache: true}
792
-  //     },{
804
+  //       component: () => import('@/xt_pages/stock/stockOutOrder'),
805
+  //       name: 'stockOutOrder',
806
+  //       meta: { title: 'stockOutOrder', noCache: true }
807
+  //     }, {
808
+  //       path: '/stock/out/other',
809
+  //       component: () => import('@/xt_pages/stock/otherStockOutOrder'),
810
+  //       name: 'otherStockOutOrder',
811
+  //       meta: { title: 'otherStockOutOrder', noCache: true }
812
+  //     }, {
813
+  //       path: '/stock/cancel',
814
+  //       component: () => import('@/xt_pages/stock/cancelStockOrder'),
815
+  //       name: 'cancelStockOrder',
816
+  //       meta: { title: 'cancelStockOrder', noCache: true }
817
+  //     }, {
818
+  //       path: '/stock/cancel/other',
819
+  //       component: () => import('@/xt_pages/stock/otherCancelStockOrder'),
820
+  //       name: 'otherCancelStockOrder',
821
+  //       meta: { title: 'otherCancelStockOrder', noCache: true }
822
+  //     }, {
793 823
   //       path: '/stock/query',
794 824
   //       component: () => import('@/xt_pages/stock/stockQuery'),
795 825
   //       name: 'stockQuery',
796
-  //       meta: {title: 'stockQuery',noCache: true}
797
-  //     },
798
-  //     {
799
-  //       path: '/stock/config',
800
-  //       component: () => import('@/xt_pages/stock/index'),
801
-  //       name: 'config',
802
-  //       meta: {title: 'config'},
803
-  //     },{
826
+  //       meta: { title: 'stockQuery' }
827
+  //     }, {
804 828
   //       path: '/stock/in/add',
805
-  //       component: () => import('@/xt_pages/stock/addStockIn'),
806
-  //       name: 'addStockIn',
829
+  //       component: () => import('@/xt_pages/stock/stockInOrderAdd'),
830
+  //       name: 'stockInOrderAdd',
807 831
   //       hidden: true,
808 832
   //       is_menu: false,
809
-  //       meta: {title: 'addStockIn',noCache: true}
833
+  //       meta: { title: 'stockInOrderAdd' }
810 834
   //     }, {
811
-  //       path: '/stock/out/add',
812
-  //       component: () => import('@/xt_pages/stock/addStockOut'),
813
-  //       name: 'addStockOut',
835
+  //       path: '/stock/in/detail',
836
+  //       component: () => import('@/xt_pages/stock/stockInDetail'),
837
+  //       name: 'stockInDetail',
814 838
   //       hidden: true,
815 839
   //       is_menu: false,
816
-  //       meta: {title: 'addStockOut',noCache: true }
817
-  //     },{
818
-  //       path: '/stock/return',
819
-  //       component: () => import('@/xt_pages/stock/salesReturn'),
820
-  //       name: 'salesReturn',
840
+  //       meta: { title: 'stockInDetail' }
841
+  //     }, {
842
+  //       path: '/stock/return/detail',
843
+  //       component: () => import('@/xt_pages/stock/salesReturnDetail'),
844
+  //       name: 'salesReturnDetail',
821 845
   //       hidden: true,
822 846
   //       is_menu: false,
823
-  //       meta: {title: 'salesReturn'}
824
-  //     },{
825
-  //       path: '/stock/return/record',
826
-  //       component: () => import('@/xt_pages/stock/salesReutrnRecord'),
827
-  //       name: 'salesReutrnRecord',
847
+  //       meta: { title: 'salesReturnDetail' }
848
+  //     }, {
849
+  //       path: '/stock/return/add',
850
+  //       component: () => import('@/xt_pages/stock/salesReturnOrderAdd'),
851
+  //       name: 'salesReturnOrderAdd',
828 852
   //       hidden: true,
829 853
   //       is_menu: false,
830
-  //       meta: {title: 'salesReutrnRecord'}
831
-  //     },{
832
-  //       path: '/stock/warehouse/record',
833
-  //       component: () => import('@/xt_pages/stock/warehouseRecord'),
834
-  //       name: 'warehouseRecord',
854
+  //       meta: { title: 'salesReturnOrderAdd' }
855
+  //     }, {
856
+  //       path: '/stock/out/add',
857
+  //       component: () => import('@/xt_pages/stock/stockOutOrderAdd'),
858
+  //       name: 'stockOutOrderAdd',
835 859
   //       hidden: true,
836 860
   //       is_menu: false,
837
-  //       meta: {title: 'warehouseRecord'}
838
-  //     },{
839
-  //       path: '/stock/cancel/',
840
-  //       component: () => import('@/xt_pages/stock/cancelStock'),
841
-  //       name: 'cancelStock',
861
+  //       meta: { title: 'stockOutOrderAdd', noCache: true }
862
+  //     }, {
863
+  //       path: '/stock/out/detail',
864
+  //       component: () => import('@/xt_pages/stock/stockOutDetail'),
865
+  //       name: 'stockOutDetail',
842 866
   //       hidden: true,
843 867
   //       is_menu: false,
844
-  //       meta: {title: 'cancelStock'}
868
+  //       meta: { title: 'stockOutDetail', noCache: true }
845 869
   //     }, {
846
-  //       path: '/stock/cancel/record',
847
-  //       component: () => import('@/xt_pages/stock/cancelStockRecord'),
848
-  //       name: 'cancelStockRecord',
870
+  //       path: '/stock/cancel/add',
871
+  //       component: () => import('@/xt_pages/stock/cancelStockOrderAdd'),
872
+  //       name: 'cancelStockOrderAdd',
849 873
   //       hidden: true,
850 874
   //       is_menu: false,
851
-  //       meta: {title: 'cancelStockRecord'}
875
+  //       meta: { title: 'cancelStockOrderAdd', noCache: true }
852 876
   //     }, {
853
-  //       path: '/stock/out/record',
854
-  //       component: () => import('@/xt_pages/stock/stockOutRecord'),
855
-  //       name: 'stockOutRecord',
877
+  //       path: '/stock/cancel/detail',
878
+  //       component: () => import('@/xt_pages/stock/cancelStockDetail'),
879
+  //       name: 'cancelStockDetail',
856 880
   //       hidden: true,
857 881
   //       is_menu: false,
858
-  //       meta: {title: 'stockOutRecord'}
859
-  //     },
882
+  //       meta: { title: 'cancelStockDetail', noCache: true }
883
+  //     }
884
+
860 885
   //   ]
861 886
   // },
862 887
   // {
@@ -892,31 +917,13 @@ export const xt_asyncRouterMap = [
892 917
   //   children: [
893 918
   //     { path: '/qcd/dialysistotal', component: () => import('@/xt_pages/qcd/dialysisTotal'), name: 'dialysistotal', meta: { title: '透析总量' }},
894 919
   //     { path: '/qcd/processindicators', component: () => import('@/xt_pages/qcd/processIndicators'), name: 'processIndicators', meta: { title: '过程指标' }},
895
-  //     {
896
-  //       path: '/qcd/outcomeIndicators',
897
-  //       name: 'outcomeIndicators',
898
-  //       meta: { title: '结果指标' },
899
-  //       redirect: '/qcd/outcomeIndicators/control',
900
-  //       component: () => import('@/xt_pages/qcd/outcomeIndicators/parent'), // Parent router-view
901
-  //       children:[
902
-  //         { path: '/qcd/outcomeIndicators/control', component: () => import('@/xt_pages/qcd/outcomeIndicators/control'), name: 'outcomeIndicatorsControl', meta: { title: '指标控制' }},
903
-  //         { path: '/qcd/outcomeIndicators/query', component: () => import('@/xt_pages/qcd/outcomeIndicators/query'), name: 'outcomeIndicatorsQuery', meta: { title: '指标查询' }},
904
-  //       ]
905
-  //     },
906
-  //     {
907
-  //       path: '/qcd/patientanalysis',
908
-  //       name: 'patientanalysis',
909
-  //       meta: { title: '患者分析' },
910
-  //       redirect: '/qcd/patientanalysis/total',
911
-  //       component: () => import('@/xt_pages/qcd/patientAnalysis/parent'), // Parent router-view
912
-  //       children:[
913
-  //         { path: '/qcd/patientanalysis/total', component: () => import('@/xt_pages/qcd/patientAnalysis/total'), name: 'patientAnalysisTotal', meta: { title: '总量分析' }},
914
-  //         { path: '/qcd/patientanalysis/weight', component: () => import('@/xt_pages/qcd/patientAnalysis/weight'), name: 'patientAnalysisWeight', meta: { title: '体重分析' }},
915
-  //         { path: '/qcd/patientanalysis/bloodpressure', component: () => import('@/xt_pages/qcd/patientAnalysis/bloodPressure'), name: 'patientAnalysisBloodPressure', meta: { title: '血压分析' }},
916
-  //         { path: '/qcd/patientanalysis/dialysisage', component: () => import('@/xt_pages/qcd/patientAnalysis/dialysisAge'), name: 'patientAnalysisDialysisAge', meta: { title: '透析龄分析' }},
917
-  //         { path: '/qcd/patientanalysis/lapseto', component: () => import('@/xt_pages/qcd/patientAnalysis/lapseto'), name: 'patientAnalysisLapseto', meta: { title: '转归分析' }},
918
-  //       ]
919
-  //     },
920
+  //     { path: '/qcd/outcomeIndicators/control', component: () => import('@/xt_pages/qcd/outcomeIndicators/control'), name: 'outcomeIndicatorsControl', meta: { title: '结果指标' }},
921
+  //     { path: '/qcd/outcomeIndicators/query', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/outcomeIndicators/query'), name: 'outcomeIndicatorsQuery', meta: { title: '指标查询' }},
922
+  //     { path: '/qcd/patientanalysis/total', component: () => import('@/xt_pages/qcd/patientAnalysis/total'), name: 'patientAnalysisTotal', meta: { title: '患者分析' }},
923
+  //     { path: '/qcd/patientanalysis/weight',hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/weight'), name: 'patientAnalysisWeight', meta: { title: '体重分析' }},
924
+  //     { path: '/qcd/patientanalysis/bloodpressure', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/bloodPressure'), name: 'patientAnalysisBloodPressure', meta: { title: '血压分析' }},
925
+  //     { path: '/qcd/patientanalysis/dialysisage', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/dialysisAge'), name: 'patientAnalysisDialysisAge', meta: { title: '透析龄分析' }},
926
+  //     { path: '/qcd/patientanalysis/lapseto', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/lapseto'), name: 'patientAnalysisLapseto', meta: { title: '转归分析' }},
920 927
   //   ]
921 928
   // },
922 929
   // /////////////////////////////////////线在end

+ 1 - 1
src/styles/index.scss Bestand weergeven

@@ -443,7 +443,7 @@ code {
443 443
 
444 444
 
445 445
 .el-dialog__wrapper{
446
-  z-index: 9999 !important;
446
+  // z-index: 2012 !important;
447 447
 }
448 448
 
449 449
 .el-dialog{

+ 1 - 1
src/styles/sidebar.scss Bestand weergeven

@@ -47,7 +47,7 @@
47 47
     }
48 48
     .el-menu {
49 49
       border: none;
50
-      height: 100%;
50
+      min-height: 100%;
51 51
       width: 100% !important;
52 52
     }
53 53
   }

+ 1 - 1
src/views/layout/components/Navbar.vue Bestand weergeven

@@ -127,7 +127,7 @@ export default {
127 127
   top: 0;
128 128
   left: 0;
129 129
   right: 0;
130
-  z-index: 999;
130
+  // z-index: 2052;
131 131
   .nav-logo {
132 132
     width: 162px;
133 133
     display: flex;

+ 2 - 0
src/views/layout/components/Sidebar/index.vue Bestand weergeven

@@ -5,12 +5,14 @@
5 5
     </div>
6 6
     <el-menu
7 7
       mode="vertical"
8
+      unique-opened="ture"
8 9
       :show-timeout="200"
9 10
       :default-active="$route.path"
10 11
       :collapse="isCollapse"
11 12
       background-color="#304156"
12 13
       text-color="#bfcbd9"
13 14
       active-text-color="#409EFF"
15
+
14 16
     >
15 17
       <sidebar-item v-for="route in permission_routers" :key="route.name" :item="route" :base-path="route.path"></sidebar-item>
16 18
     </el-menu>

+ 1 - 1
src/views/layout/components/TagsView.vue Bestand weergeven

@@ -124,7 +124,7 @@ export default {
124 124
     border-bottom: 1px solid #d8dce5;
125 125
     box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
126 126
     position: fixed;
127
-    z-index: 999;
127
+    // z-index: 2052;
128 128
     top: 60px;
129 129
     .tags-view-item {
130 130
       display: inline-block;

+ 1 - 1
src/views/login/index.vue Bestand weergeven

@@ -179,7 +179,7 @@ export default {
179 179
         }
180 180
       }
181 181
     }
182
-    .el-form-item {
182
+     {
183 183
       border: 1px solid rgba(255, 255, 255, 0.1);
184 184
       background: rgba(0, 0, 0, 0.1);
185 185
       border-radius: 5px;

+ 2 - 3
src/xt_pages/data/components/tableson.vue Bestand weergeven

@@ -15,15 +15,14 @@
15 15
         <template slot-scope="scope">
16 16
 
17 17
          <el-tooltip class="item" effect="dark" content="编辑" placement="top">
18
-           <el-button icon="el-icon-edit-outline" type="primary" size="mini" @click="handleUpdate(scope.row)"></el-button>
18
+           <el-button icon="el-icon-edit-outline" type="primary" size="small" @click="handleUpdate(scope.row)"></el-button>
19 19
          </el-tooltip>
20 20
 
21 21
          <el-tooltip class="item" effect="dark" content="删除" placement="top">
22
-          <el-button icon="el-icon-delete" v-if="scope.row.status!='deleted'" size="mini" type="danger" @click="handleModifyStatus(scope.row,'deleted')">
22
+          <el-button icon="el-icon-delete" v-if="scope.row.status!='deleted'" size="small" type="danger" @click="handleModifyStatus(scope.row,'deleted')">
23 23
           </el-button>
24 24
          </el-tooltip>
25 25
          
26
-       
27 26
         </template>
28 27
       </el-table-column>
29 28
     </el-table>

+ 4 - 4
src/xt_pages/data/components/templateTable.vue Bestand weergeven

@@ -23,10 +23,10 @@
23 23
       <el-table-column align="center" :label="$t('table.actions')" width="230" class-name="small-padding fixed-width">
24 24
         <template slot-scope="scope">
25 25
           <el-tooltip class="item" effect="dark" content="编辑" placement="top">
26
-           <el-button icon="el-icon-edit-outline" type="primary" size="mini" @click="handleUpdate(scope.row)"></el-button>
26
+           <el-button icon="el-icon-edit-outline" type="primary" size="small" @click="handleUpdate(scope.row)"></el-button>
27 27
           </el-tooltip>
28 28
           <el-tooltip class="item" effect="dark" content="删除" placement="top">
29
-            <el-button icon="el-icon-delete" v-if="scope.row.status!='deleted'" size="mini" type="danger" @click="handleModifyStatus(scope.row,'deleted')">
29
+            <el-button icon="el-icon-delete" v-if="scope.row.status!='deleted'" size="small" type="danger" @click="handleModifyStatus(scope.row,'deleted')">
30 30
             </el-button>
31 31
           </el-tooltip>
32 32
           
@@ -194,8 +194,8 @@ export default {
194 194
     handleModifyStatus(row, status) {
195 195
       this.temp = Object.assign({}, row); // copy obj
196 196
       this.$confirm("此操作将永久删除该配置项, 是否继续?", "提示", {
197
-        confirmButtonText: "确定",
198
-        cancelButtonText: "取消",
197
+        confirmButtonText: "确 定",
198
+        cancelButtonText: "取 消",
199 199
         type: "warning"
200 200
       }).then(() => {
201 201
           const tempData = Object.assign({}, this.temp);

+ 26 - 20
src/xt_pages/data/druguse.vue Bestand weergeven

@@ -66,15 +66,17 @@
66 66
               <template slot-scope="scope">
67 67
                 <el-button
68 68
                   type="primary"
69
-                  size="mini"
69
+                  size="small"
70
+                  icon="el-icon-edit-outline"
70 71
                   @click="handleUpdateAdviceTemplate(scope.row, scope.$index)"
71
-                >{{$t('table.edit')}}</el-button>
72
+                ></el-button>
72 73
                 <el-button
73 74
                   v-if="scope.row.status!='deleted'"
74
-                  size="mini"
75
+                  size="small"
75 76
                   type="danger"
77
+                  icon="el-icon-delete"
76 78
                   @click="handleDeleteAdviceTemplate(scope.row, scope.$index)"
77
-                >{{$t('table.delete')}}</el-button>
79
+                ></el-button>
78 80
               </template>
79 81
             </el-table-column>
80 82
           </el-table>
@@ -301,15 +303,17 @@
301 303
                 <el-button
302 304
                   v-show="scope.row.org_id!=0"
303 305
                   type="primary"
304
-                  size="mini"
306
+                  size="small"
307
+                  icon="el-icon-edit-outline"
305 308
                   @click="handleUpdateDrugWay(scope.row, scope.$index)"
306
-                >{{$t('table.edit')}}</el-button>
309
+                ></el-button>
307 310
                 <el-button
308 311
                   v-show="scope.row.org_id!=0"
309
-                  size="mini"
312
+                  size="small"
310 313
                   type="danger"
314
+                  icon="el-icon-delete"
311 315
                   @click="handleDeleteDrugWay(scope.row, scope.$index)"
312
-                >{{$t('table.delete')}}</el-button>
316
+                ></el-button>
313 317
               </template>
314 318
             </el-table-column>
315 319
           </el-table>
@@ -369,15 +373,17 @@
369 373
                 <el-button
370 374
                   v-show="scope.row.org_id!=0"
371 375
                   type="primary"
372
-                  size="mini"
376
+                  size="small"
377
+                  icon="el-icon-edit-outline"
373 378
                   @click="handleUpdateEF(scope.row, scope.$index)"
374
-                >{{$t('table.edit')}}</el-button>
379
+                ></el-button>
375 380
                 <el-button
376 381
                   v-show="scope.row.org_id!=0"
377
-                  size="mini"
382
+                  size="small"
378 383
                   type="danger"
384
+                  icon="el-icon-delete"
379 385
                   @click="handleDeleteEF(scope.row, scope.$index)"
380
-                >{{$t('table.delete')}}</el-button>
386
+                ></el-button>
381 387
               </template>
382 388
             </el-table-column>
383 389
           </el-table>
@@ -584,8 +590,8 @@ export default {
584 590
     },
585 591
     handleDeleteDrugDic(row, index) {
586 592
       this.$confirm("确认删除此医嘱模板?", "删除", {
587
-        confirmButtonText: "确定",
588
-        cancelButtonText: "取消",
593
+        confirmButtonText: "确 定",
594
+        cancelButtonText: "取 消",
589 595
         type: "warning"
590 596
       })
591 597
         .then(() => {
@@ -608,8 +614,8 @@ export default {
608 614
     },
609 615
     handleDeleteAdviceTemplate(row, index) {
610 616
       this.$confirm("确认删除此医嘱模板?", "删除", {
611
-        confirmButtonText: "确定",
612
-        cancelButtonText: "取消",
617
+        confirmButtonText: "确 定",
618
+        cancelButtonText: "取 消",
613 619
         type: "warning"
614 620
       })
615 621
         .then(() => {
@@ -819,8 +825,8 @@ export default {
819 825
     },
820 826
     handleDeleteDrugWay(row, index) {
821 827
       this.$confirm("确认删除此给药途径?", "删除", {
822
-        confirmButtonText: "确定",
823
-        cancelButtonText: "取消",
828
+        confirmButtonText: "确 定",
829
+        cancelButtonText: "取 消",
824 830
         type: "warning"
825 831
       })
826 832
         .then(() => {
@@ -914,8 +920,8 @@ export default {
914 920
     },
915 921
     handleDeleteEF(row, index) {
916 922
       this.$confirm("确认删除此执行频率?", "删除", {
917
-        confirmButtonText: "确定",
918
-        cancelButtonText: "取消",
923
+        confirmButtonText: "确 定",
924
+        cancelButtonText: "取 消",
919 925
         type: "warning"
920 926
       })
921 927
         .then(() => {

+ 34 - 32
src/xt_pages/data/druguseTemplate.vue Bestand weergeven

@@ -138,7 +138,7 @@
138 138
                 <el-tooltip class="item" effect="dark" content="编辑" placement="top">
139 139
                   <el-button
140 140
                     type="primary"
141
-                    size="mini"
141
+                    size="small"
142 142
                     icon="el-icon-edit-outline"
143 143
                     v-if="isShow(scope.$index, scope.row)"
144 144
                     @click="handleUpdateAdviceTemplate(scope.row, scope.$index)"
@@ -147,7 +147,7 @@
147 147
                 </el-tooltip>
148 148
                 <el-tooltip class="item" effect="dark" content="删除" placement="top">
149 149
                   <el-button
150
-                    size="mini"
150
+                    size="small"
151 151
                     type="danger"
152 152
                     icon="el-icon-delete"
153 153
                     @click="handleDeleteAdviceTemplate(scope.row, scope.$index)"
@@ -547,8 +547,6 @@
547 547
                 <el-table-column prop="breathing_rate" align="center" label="给药途径">
548 548
                   <template slot-scope="scope">
549 549
                     <span v-if="scope.row.parent_id == 0">{{scope.row.delivery_way}}</span>
550
-
551
-
552 550
                   </template>
553 551
 
554 552
                 </el-table-column>
@@ -873,16 +871,18 @@
873 871
                 <el-button
874 872
                   v-show="scope.row.org_id!=0"
875 873
                   type="primary"
876
-                  size="mini"
874
+                  size="small"
875
+                  icon="el-icon-edit-outline"
877 876
                   @click="handleUpdateDrugWay(scope.row, scope.$index)"
878
-                >{{$t('table.edit')}}
877
+                >
879 878
                 </el-button>
880 879
                 <el-button
881 880
                   v-show="scope.row.org_id!=0"
882
-                  size="mini"
881
+                  size="small"
883 882
                   type="danger"
883
+                  icon="el-icon-delete"
884 884
                   @click="handleDeleteDrugWay(scope.row, scope.$index)"
885
-                >{{$t('table.delete')}}
885
+                >
886 886
                 </el-button>
887 887
               </template>
888 888
             </el-table-column>
@@ -943,16 +943,18 @@
943 943
                 <el-button
944 944
                   v-show="scope.row.org_id!=0"
945 945
                   type="primary"
946
-                  size="mini"
946
+                  size="small"
947
+                  icon="el-icon-edit-outline"
947 948
                   @click="handleUpdateEF(scope.row, scope.$index)"
948
-                >{{$t('table.edit')}}
949
+                >
949 950
                 </el-button>
950 951
                 <el-button
951 952
                   v-show="scope.row.org_id!=0"
952
-                  size="mini"
953
+                  size="small"
953 954
                   type="danger"
955
+                  icon="el-icon-delete"
954 956
                   @click="handleDeleteEF(scope.row, scope.$index)"
955
-                >{{$t('table.delete')}}
957
+                >
956 958
                 </el-button>
957 959
               </template>
958 960
             </el-table-column>
@@ -1211,8 +1213,8 @@
1211 1213
           return
1212 1214
         }
1213 1215
         this.$confirm('删除记录', '是否删除该医嘱记录', {
1214
-          confirmButtonText: '确定',
1215
-          cancelButtonText: '取消',
1216
+          confirmButtonText: '确 定',
1217
+          cancelButtonText: '取 消',
1216 1218
           type: 'warning'
1217 1219
         }).then(() => {
1218 1220
           this.adviceTableData.splice(this.table_current_index, 1)
@@ -1245,8 +1247,8 @@
1245 1247
         this.advice_content_name = "医嘱内容"
1246 1248
       }, cancelTableHandle: function () {
1247 1249
         this.$confirm('放弃编辑', '是否放弃编辑,已编辑的数据将无法恢复', {
1248
-          confirmButtonText: '确定',
1249
-          cancelButtonText: '取消',
1250
+          confirmButtonText: '确 定',
1251
+          cancelButtonText: '取 消',
1250 1252
           type: 'warning'
1251 1253
         }).then(() => {
1252 1254
           this.adviceTableData = []
@@ -1308,8 +1310,8 @@
1308 1310
       },
1309 1311
       handleDeleteDrugDic(row, index) {
1310 1312
         this.$confirm("确认删除此医嘱模板?", "删除", {
1311
-          confirmButtonText: "确定",
1312
-          cancelButtonText: "取消",
1313
+          confirmButtonText: "确 定",
1314
+          cancelButtonText: "取 消",
1313 1315
           type: "warning"
1314 1316
         })
1315 1317
           .then(() => {
@@ -1333,8 +1335,8 @@
1333 1335
       },
1334 1336
       handleDeleteAdviceTemplate(row, index) {
1335 1337
         this.$confirm("确认删除此医嘱模板?", "删除", {
1336
-          confirmButtonText: "确定",
1337
-          cancelButtonText: "取消",
1338
+          confirmButtonText: "确 定",
1339
+          cancelButtonText: "取 消",
1338 1340
           type: "warning"
1339 1341
         })
1340 1342
           .then(() => {
@@ -1605,8 +1607,8 @@
1605 1607
       },
1606 1608
       handleDeleteDrugWay(row, index) {
1607 1609
         this.$confirm("确认删除此给药途径?", "删除", {
1608
-          confirmButtonText: "确定",
1609
-          cancelButtonText: "取消",
1610
+          confirmButtonText: "确 定",
1611
+          cancelButtonText: "取 消",
1610 1612
           type: "warning"
1611 1613
         })
1612 1614
           .then(() => {
@@ -1701,8 +1703,8 @@
1701 1703
       },
1702 1704
       handleDeleteEF(row, index) {
1703 1705
         this.$confirm("确认删除此执行频率?", "删除", {
1704
-          confirmButtonText: "确定",
1705
-          cancelButtonText: "取消",
1706
+          confirmButtonText: "确 定",
1707
+          cancelButtonText: "取 消",
1706 1708
           type: "warning"
1707 1709
         })
1708 1710
           .then(() => {
@@ -1848,8 +1850,8 @@
1848 1850
           return
1849 1851
         }
1850 1852
         this.$confirm('删除记录', '是否删除该医嘱记录', {
1851
-          confirmButtonText: '确定',
1852
-          cancelButtonText: '取消',
1853
+          confirmButtonText: '确 定',
1854
+          cancelButtonText: '取 消',
1853 1855
           type: 'warning'
1854 1856
         }).then(() => {
1855 1857
           let id = this.adviceTableDataTwo[this.table_current_index_two].id
@@ -2090,8 +2092,8 @@
2090 2092
         this.hoverOrderArr = []
2091 2093
 
2092 2094
         this.$confirm('删除记录', '是否删除该医嘱', {
2093
-          confirmButtonText: '确定',
2094
-          cancelButtonText: '取消',
2095
+          confirmButtonText: '确 定',
2096
+          cancelButtonText: '取 消',
2095 2097
           type: 'warning'
2096 2098
         }).then(() => {
2097 2099
           let id = row.id
@@ -2150,8 +2152,8 @@
2150 2152
         this.hoverOrderArr = []
2151 2153
 
2152 2154
         this.$confirm('删除子药', '是否删除该子药', {
2153
-          confirmButtonText: '确定',
2154
-          cancelButtonText: '取消',
2155
+          confirmButtonText: '确 定',
2156
+          cancelButtonText: '取 消',
2155 2157
           type: 'warning'
2156 2158
         }).then(() => {
2157 2159
           let id = row.id
@@ -2226,8 +2228,8 @@
2226 2228
           return
2227 2229
         }
2228 2230
         this.$confirm('删除记录', '是否删除该医嘱记录', {
2229
-          confirmButtonText: '确定',
2230
-          cancelButtonText: '取消',
2231
+          confirmButtonText: '确 定',
2232
+          cancelButtonText: '取 消',
2231 2233
           type: 'warning'
2232 2234
         }).then(() => {
2233 2235
           this.adviceTableData.splice(this.table_current_index, 1)

+ 2 - 2
src/xt_pages/device/components/maintain/maintain_record_list_dialog.vue Bestand weergeven

@@ -37,10 +37,10 @@
37 37
                     <el-table-column label="操作" align="center" width="100" :resizable="false">
38 38
                         <template slot-scope="scope">
39 39
                             <div>
40
-                                <el-button icon="el-icon-edit" size="small">编辑</el-button>
40
+                                <el-button icon="el-icon-edit" size="small"></el-button>
41 41
                             </div>
42 42
                             <div style="margin-top: 5px;">
43
-                                <el-button type="danger" icon="el-icon-delete" size="small">移除</el-button>
43
+                                <el-button type="danger" icon="el-icon-delete" size="small"></el-button>
44 44
                             </div>
45 45
                         </template>
46 46
                     </el-table-column>

+ 3 - 3
src/xt_pages/device/components/partition_dialog.vue Bestand weergeven

@@ -12,7 +12,7 @@
12 12
                         <!-- <el-table-column prop="amount" label="机号数量" align="center"></el-table-column> -->
13 13
                         <el-table-column label="操作" align="center"> 
14 14
                             <template slot-scope="scope">
15
-                                <el-button type="primary" icon="el-icon-edit" size="mini" @click="modifyZoneAt(scope.row)">编辑</el-button>
15
+                                <el-button type="primary" icon="el-icon-edit" size="small" @click="modifyZoneAt(scope.row)"></el-button>
16 16
 
17 17
                                 <!-- <el-popover placement="top" width="160" v-model="scope.row.willDelete">
18 18
                                     <el-button type="danger" slot="reference" icon="el-icon-delete" size="mini">删除</el-button>
@@ -36,7 +36,7 @@
36 36
                         <!-- <el-table-column prop="amount" label="机号数量" align="center"></el-table-column> -->
37 37
                         <el-table-column label="操作" align="center"> 
38 38
                             <template slot-scope="scope">
39
-                                <el-button type="primary" icon="el-icon-edit" size="mini" @click="modifyDeviceNumberAt(scope.row)">编辑</el-button>
39
+                                <el-button type="primary" icon="el-icon-edit" size="small" @click="modifyDeviceNumberAt(scope.row)"></el-button>
40 40
 
41 41
                                 <!-- <el-popover placement="top" width="160" v-model="scope.row.visible">
42 42
                                     <p>确定要删除吗?</p>
@@ -58,7 +58,7 @@
58 58
                         <!-- <el-table-column prop="amount" label="机号数量" align="center"></el-table-column> -->
59 59
                         <el-table-column label="操作" align="center">
60 60
                             <template slot-scope="scope">
61
-                                <el-button type="primary" icon="el-icon-edit" size="mini" @click="modifyGroupAt(scope.row)">编辑</el-button>
61
+                                <el-button type="primary" icon="el-icon-edit" size="small" @click="modifyGroupAt(scope.row)"></el-button>
62 62
 
63 63
                                 <!-- <el-popover placement="top" width="160" v-model="scope.row.visible">
64 64
                                     <p>确定要删除吗?</p>

+ 12 - 4
src/xt_pages/device/components/quality_control/quality_record_list_dialog.vue Bestand weergeven

@@ -40,8 +40,12 @@
40 40
                     <el-table-column label="检测结果(cfu/ml)" prop="detection_result" align="center" width="100" :resizable="false"></el-table-column>
41 41
                     <el-table-column label="操作" align="center" width="215" :resizable="false">
42 42
                         <template slot-scope="scope">
43
-                            <el-button icon="el-icon-edit" size="small">编辑</el-button>
44
-                            <el-button type="danger" icon="el-icon-delete" size="small">移除</el-button>
43
+                          <el-tooltip class="item" effect="dark" content="编辑" placement="top">
44
+                            <el-button type="primary" icon="el-icon-edit" size="small"></el-button>
45
+                          </el-tooltip>
46
+                          <el-tooltip  class="item" effect="dark" content="移除" placement="top">
47
+                            <el-button  type="danger" icon="el-icon-delete" size="small"></el-button>
48
+                          </el-tooltip>                          
45 49
                         </template>
46 50
                     </el-table-column>
47 51
                 </el-table>
@@ -69,8 +73,12 @@
69 73
                     </el-table-column>
70 74
                     <el-table-column label="操作" align="center" width="185" :resizable="false">
71 75
                         <template slot-scope="scope">
72
-                            <el-button icon="el-icon-edit" size="small">编辑</el-button>
73
-                            <el-button type="danger" icon="el-icon-delete" size="small">移除</el-button>
76
+                          <el-tooltip class="item" effect="dark" content="编辑" placement="top">  
77
+                            <el-button type="primary" icon="el-icon-edit" size="small"></el-button>
78
+                          </el-tooltip>
79
+                          <el-tooltip class="item" effect="dark" content="移除" placement="top">                            
80
+                            <el-button type="danger" icon="el-icon-delete" size="small"></el-button>
81
+                          </el-tooltip>
74 82
                         </template>
75 83
                     </el-table-column>
76 84
                 </el-table>

+ 3 - 1
src/xt_pages/device/components/sterilize_plan/sterilize_plan_pane.vue Bestand weergeven

@@ -23,7 +23,9 @@
23 23
                     </el-table-column>
24 24
                     <el-table-column label="操作" min-width="15%" align="center">
25 25
                         <template slot-scope="scope">
26
-                            <el-button type="danger" size="small">移除</el-button>
26
+                          <el-tooltip class="item" effect="dark" content="删除" placement="top">
27
+                            <el-button type="danger" size="small" icon="el-icon-delete"></el-button>
28
+                           </el-tooltip>
27 29
                         </template>
28 30
                     </el-table-column>
29 31
                 </el-table>

+ 6 - 5
src/xt_pages/device/components/use_registration_pane.vue Bestand weergeven

@@ -241,18 +241,19 @@
241 241
                 <el-table-column  prop="sign" label="签名" min-width="30px;" align="center" > </el-table-column>
242 242
                 <el-table-column  prop="operation" label="操作" min-width="60px;" align="center" > 
243 243
                   <template  slot-scope="scope">
244
-                    <el-button type="primary"   icon="el-icon-edit" size="mini"></el-button>
245
-                    <!-- <el-button type="danger" slot="reference"  icon="el-icon-delete" size="mini" ></el-button> -->
244
+
245
+                    <el-button type="primary"   icon="el-icon-edit" size="small"></el-button>
246
+                    <!-- <el-button type="danger" slot="reference"  icon="el-icon-delete" size="small" ></el-button> -->
246 247
                      <el-popover
247 248
                                 placement="top"
248 249
                                 width="160"
249 250
                                 v-model="scope.row.visible">
250 251
                                 <p>确定要删除吗?</p>
251 252
                                 <div style="text-align: right; margin: 0">
252
-                                    <el-button type="primary" size="mini" @click="scope.row.visible = false;">确定</el-button>                            
253
-                                    <el-button size="mini" type="text" @click="scope.row.visible = false;">取消</el-button>
253
+                                    <el-button size="mini" type="text" @click="scope.row.visible = false;">取 消</el-button>                                    
254
+                                    <el-button type="primary" size="mini" @click="scope.row.visible = false;">确 定</el-button>                            
254 255
                                 </div>
255
-                           <el-button type="danger" slot="reference"  icon="el-icon-delete" size="mini" ></el-button>
256
+                           <el-button type="danger" slot="reference"  icon="el-icon-delete" size="small" ></el-button>
256 257
                      </el-popover>
257 258
                   </template> 
258 259
                 </el-table-column>

+ 2 - 2
src/xt_pages/device/components/water_pane.vue Bestand weergeven

@@ -190,8 +190,8 @@
190 190
                 <el-table-column  prop="sign" label="签名" min-width="30px;" align="center" > </el-table-column>
191 191
                 <el-table-column  prop="operation" label="操作" min-width="70px;" align="center" > 
192 192
                   <template  slot-scope="scope">
193
-                    <el-button type="primary"   icon="el-icon-edit" size="mini"  ></el-button>
194
-                    <!-- <el-button type="danger" slot="reference"  icon="el-icon-delete" size="mini" ></el-button> -->
193
+                    <el-button type="primary"   icon="el-icon-edit" size="small"  ></el-button>
194
+                    <!-- <el-button type="danger" slot="reference"  icon="el-icon-delete" size="small" ></el-button> -->
195 195
                     <el-popover
196 196
                                 placement="top"
197 197
                                 width="160"

+ 2 - 2
src/xt_pages/device/group_main.vue Bestand weergeven

@@ -12,10 +12,10 @@
12 12
                     <el-table-column label="操作" align="center">
13 13
                         <template slot-scope="scope">
14 14
                            <el-tooltip class="item" effect="dark" content="编辑" placement="top">
15
-                            <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary" icon="el-icon-edit-outline" size="mini" @click="modifyGroupAt(scope.row)"></el-button>
15
+                            <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary" icon="el-icon-edit-outline" size="small" @click="modifyGroupAt(scope.row)"></el-button>
16 16
                            </el-tooltip>
17 17
                            <el-tooltip class="item" effect="dark" content="删除" placement="top">
18
-                            <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="danger" icon="el-icon-delete" size="mini" @click="deleteGroupAt(scope.row)"></el-button>
18
+                            <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="danger" icon="el-icon-delete" size="small" @click="deleteGroupAt(scope.row)"></el-button>
19 19
                            </el-tooltip>
20 20
                         </template>  
21 21
                     </el-table-column>

+ 2 - 2
src/xt_pages/device/number_main.vue Bestand weergeven

@@ -14,10 +14,10 @@
14 14
                     <el-table-column label="操作" align="center"> 
15 15
                         <template slot-scope="scope">
16 16
                            <el-tooltip class="item" effect="dark" content="编辑" placement="top">
17
-                            <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary" icon="el-icon-edit-outline" size="mini" @click="modifyDeviceNumberAt(scope.row)"></el-button>
17
+                            <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary" icon="el-icon-edit-outline" size="small" @click="modifyDeviceNumberAt(scope.row)"></el-button>
18 18
                            </el-tooltip>
19 19
                            <el-tooltip class="item" effect="dark" content="删除" placement="top">                           
20
-                            <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="danger" icon="el-icon-delete" size="mini" @click="deleteDeviceNumberAt(scope.row)"></el-button>
20
+                            <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="danger" icon="el-icon-delete" size="small" @click="deleteDeviceNumberAt(scope.row)"></el-button>
21 21
                            </el-tooltip>                           
22 22
                         </template>  
23 23
                     </el-table-column>

+ 2 - 2
src/xt_pages/device/zone_main.vue Bestand weergeven

@@ -17,10 +17,10 @@
17 17
                     <el-table-column label="操作" align="center"> 
18 18
                         <template slot-scope="scope">
19 19
                           <el-tooltip class="item" effect="dark" content="编辑" placement="top">
20
-                            <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary" icon="el-icon-edit-outline" size="mini" @click="modifyZoneAt(scope.row)"></el-button>
20
+                            <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary" icon="el-icon-edit-outline" size="small" @click="modifyZoneAt(scope.row)"></el-button>
21 21
                           </el-tooltip>  
22 22
                           <el-tooltip class="item" effect="dark" content="删除" placement="top">                          
23
-                            <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="danger" icon="el-icon-delete" size="mini" @click="deleteZoneAt(scope.row)"></el-button>
23
+                            <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="danger" icon="el-icon-delete" size="small" @click="deleteZoneAt(scope.row)"></el-button>
24 24
                           </el-tooltip>  
25 25
                         </template>  
26 26
                     </el-table-column>

+ 1 - 1
src/xt_pages/dialysis/PatientBox.vue Bestand weergeven

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
 <div>
3 3
   <!-- <router-link to="/dialysis/details"> -->
4
-    <div class="patient" v-for="schedule in schedules" :class="borderColor(schedule)"  @click="detailAction(schedule)" :key="schedule.id"> 
4
+    <div class="patient" v-for="schedule in schedules" v-if="schedule.patient" :class="borderColor(schedule)"  @click="detailAction(schedule)" :key="schedule.id"> 
5 5
         <div class="kehu" >
6 6
           <div class="tx">
7 7
             <img :src="schedule.patient.avatar.length > 0 ? schedule.patient.avatar : '../../assets/home/analyze.png'" alt="">

+ 1 - 64
src/xt_pages/dialysis/bloodPresssWatch.vue Bestand weergeven

@@ -418,70 +418,7 @@
418 418
         cursor: pointer;
419 419
       }
420 420
     }
421
-    // .cell {
422
-    //   margin: 0px 0 15px 0;
423
-    //   -moz-box-sizing: border-box;
424
-    //   -webkit-box-sizing: border-box;
425
-    //   -o-box-sizing: border-box;
426
-    //   -ms-box-sizing: border-box;
427
-    //   box-sizing: border-box;
428
-    //   display: -webkit-box;
429
-    //   display: -ms-flexbox;
430
-    //   // display: flex;
431
-    //   -webkit-box-align: flex-start;
432
-    //   -ms-flex-align: flex-start;
433
-    //   align-items: flex-start;
434
-    //   text-align: left;
435
-    //   justify-content: flex-start;
436
-    //   color: #333;
437
-    //   .title {
438
-    //     width: 80px;
439
-    //     display: inline-block;
440
-    //     font-weight: normal;
441
-    //     color: #909399;
442
-    //     padding: 6px 0;
443
-    //     font-weight: 700;
444
-    //     .name {
445
-    //       width: 60px;
446
-    //       text-align: justify;
447
-    //       text-justify: distribute-all-lines;
448
-    //       text-align-last: justify;
449
-    //       -moz-text-align-last: justify;
450
-    //       -webkit-text-align-last: justify;
451
-    //       display: inline-block;
452
-    //     }
453
-    //   }
454
-    //   .time {
455
-    //     -webkit-box-flex: 1;
456
-    //     -ms-flex: 1;
457
-    //     flex: 1;
458
-    //     ul {
459
-    //       padding: 0;
460
-    //       margin: 0;
461
-    //       li {
462
-    //         float: left;
463
-    //         list-style: none;
464
-    //         cursor: pointer;
465
-    //         padding: 3px 0;
466
-    //         width: 70px;
467
-    //         color: #606266;
468
-    //         border-radius: 4px;
469
-    //         margin: 0 10px 0 0;
470
-    //         color: #409eff;
471
-    //         border: 1px #409eff solid;
472
-    //         text-align: center;
473
-    //         &:hover {
474
-    //           background: #409eff;
475
-    //           color: #fff;
476
-    //         }
477
-    //       }
478
-    //       .active {
479
-    //         background: #409eff;
480
-    //         color: #fff;
481
-    //       }
482
-    //     }
483
-    //   }
484
-    // }
421
+    
485 422
     .amount {
486 423
       font-weight: normal;
487 424
       padding: 10px 0 0 0;

+ 1 - 1
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue Bestand weergeven

@@ -98,7 +98,7 @@
98 98
         </el-table-column>
99 99
         <!--<el-table-column label="操作" min-width="20" align="center">-->
100 100
           <!--<template slot-scope="scope">-->
101
-            <!--<el-button type="primary" size="mini"-->
101
+            <!--<el-button type="primary" size="small"-->
102 102
                        <!--@click="scope.row.groupno>0?openEditGroupAdvice(scope.row.groupno):openEdit(scope.$index, scope.row)"-->
103 103
                        <!--v-if="isShowStartTime(scope.$index, scope.row)">编辑-->
104 104
             <!--</el-button>-->

+ 1 - 31
src/xt_pages/dialysis/dialysisPrepare.vue Bestand weergeven

@@ -159,35 +159,5 @@
159 159
 
160 160
 
161 161
 <style rel="stylesheet/scss" lang="scss" scoped>
162
-  .cell {
163
-  .name {
164
-    float: left;
165
-    width: 88px;
166
-    text-align: right;
167
-    color: #606266;
168
-    height: 36px;
169
-    line-height: 36px;
170
-  }
171
-  .type {
172
-    float: left;
173
-    ul {
174
-      padding: 0;
175
-      margin: 0;
176
-      li {
177
-        float: left;
178
-        list-style-type: none;
179
-        padding: 0 10px;
180
-        border-radius: 6px;
181
-        margin: 0 10px;
182
-        height: 36px;
183
-        line-height: 36px;
184
-        color:#606266;
185
-        &:hover{
186
-          background: #409eff;
187
-          color: #fff;
188
-        }
189
-      }
190
-    }
191
-  }
192
-}
162
+
193 163
 </style>

+ 0 - 48
src/xt_pages/dialysis/doctorAdvice.vue Bestand weergeven

@@ -217,52 +217,4 @@ export default {
217 217
 
218 218
 
219 219
 <style rel="stylesheet/scss"  lang="scss" scoped >
220
-// .title{
221
-//   float: left;
222
-//   width: 80px;
223
-//   height: 36px;
224
-//   line-height: 36px;
225
-//   text-align: right;
226
-// }
227
-.cell {
228
-  .name {
229
-    float: left;
230
-    width: 88px;
231
-    text-align: right;
232
-    color: #606266;
233
-    height: 36px;
234
-    line-height: 36px;
235
-  }
236
-  .type {
237
-    float: left;
238
-    ul {
239
-      padding: 0;
240
-      margin: 0;
241
-      li {
242
-        float: left;
243
-        list-style-type: none;
244
-        padding: 0 10px;
245
-        border-radius: 6px;
246
-        margin: 0 10px;
247
-        height: 36px;
248
-        line-height: 36px;
249
-        color:#606266;
250
-        &:hover{
251
-          background: #409eff;
252
-          color: #fff;
253
-        }
254
-      }
255
-    }
256
-  }
257
-  .collate{
258
-    float: left;
259
-    margin: 0 0 0 20px;
260
-    .tit{
261
-      color: #606266;
262
-      margin: 0 6px 0 0;
263
-      font-weight: normal;
264
-    }
265
-
266
-  }
267
-}
268 220
 </style>

+ 0 - 64
src/xt_pages/dialysis/schedualPatient2.vue Bestand weergeven

@@ -318,70 +318,6 @@
318 318
         cursor: pointer;
319 319
       }
320 320
     }
321
-    .cell {
322
-      margin: 0px 0 15px 0;
323
-      -moz-box-sizing: border-box;
324
-      -webkit-box-sizing: border-box;
325
-      -o-box-sizing: border-box;
326
-      -ms-box-sizing: border-box;
327
-      box-sizing: border-box;
328
-      display: -webkit-box;
329
-      display: -ms-flexbox;
330
-      // display: flex;
331
-      -webkit-box-align: flex-start;
332
-      -ms-flex-align: flex-start;
333
-      align-items: flex-start;
334
-      text-align: left;
335
-      justify-content: flex-start;
336
-      color: #333;
337
-      .title {
338
-        width: 80px;
339
-        display: inline-block;
340
-        font-weight: normal;
341
-        color: #909399;
342
-        padding: 6px 0;
343
-        font-weight: 700;
344
-        .name {
345
-          width: 60px;
346
-          text-align: justify;
347
-          text-justify: distribute-all-lines;
348
-          text-align-last: justify;
349
-          -moz-text-align-last: justify;
350
-          -webkit-text-align-last: justify;
351
-          display: inline-block;
352
-        }
353
-      }
354
-      .time {
355
-        -webkit-box-flex: 1;
356
-        -ms-flex: 1;
357
-        flex: 1;
358
-        ul {
359
-          padding: 0;
360
-          margin: 0;
361
-          li {
362
-            float: left;
363
-            list-style: none;
364
-            cursor: pointer;
365
-            padding: 3px 0;
366
-            width: 70px;
367
-            color: #606266;
368
-            border-radius: 4px;
369
-            margin: 0 10px 0 0;
370
-            color: #409eff;
371
-            border: 1px #409eff solid;
372
-            text-align: center;
373
-            &:hover {
374
-              background: #409eff;
375
-              color: #fff;
376
-            }
377
-          }
378
-          .active {
379
-            background: #409eff;
380
-            color: #fff;
381
-          }
382
-        }
383
-      }
384
-    }
385 321
     .amount {
386 322
       font-weight: normal;
387 323
       padding: 10px 0 0 0;

+ 1 - 1
src/xt_pages/qcd/components/BarChart.vue Bestand weergeven

@@ -21,7 +21,7 @@ export default {
21 21
     },
22 22
     height: {
23 23
       type: String,
24
-      default: '300px'
24
+      default: '350px'
25 25
     },
26 26
     title:{
27 27
       type: String,

+ 1 - 1
src/xt_pages/qcd/components/PieChart.vue Bestand weergeven

@@ -19,7 +19,7 @@ export default {
19 19
     },
20 20
     height: {
21 21
       type: String,
22
-      default: '320px'
22
+      default: '350px'
23 23
     },
24 24
     title:{
25 25
       type: String,

+ 0 - 60
src/xt_pages/qcd/dialysisTotal.vue Bestand weergeven

@@ -448,66 +448,6 @@ export default {
448 448
       cursor: pointer;
449 449
     }
450 450
   }
451
-  .cell {
452
-    margin: 0px 0 15px 0;
453
-    -moz-box-sizing: border-box;
454
-    -webkit-box-sizing: border-box;
455
-    -o-box-sizing: border-box;
456
-    -ms-box-sizing: border-box;
457
-    box-sizing: border-box;
458
-    display: -webkit-box;
459
-    display: -ms-flexbox;
460
-    // display: flex;
461
-    -webkit-box-align: flex-start;
462
-    -ms-flex-align: flex-start;
463
-    align-items: flex-start;
464
-    text-align: left;
465
-    justify-content: flex-start;
466
-    color: #333;
467
-    .title {
468
-      width: 80px;
469
-      display: inline-block;
470
-      font-weight: normal;
471
-      color: #909399;
472
-      padding: 6px 0;
473
-      font-weight: 700;
474
-      .name {
475
-        width: 60px;
476
-        text-align: justify;
477
-        text-justify: distribute-all-lines;
478
-        text-align-last: justify;
479
-        -moz-text-align-last: justify;
480
-        -webkit-text-align-last: justify;
481
-        display: inline-block;
482
-      }
483
-    }
484
-    .time {
485
-      -webkit-box-flex: 1;
486
-      -ms-flex: 1;
487
-      flex: 1;
488
-      ul {
489
-        padding: 0;
490
-        margin: 0;
491
-        li {
492
-          float: left;
493
-          list-style: none;
494
-          cursor: pointer;
495
-          padding: 6px 10px;
496
-          color: #606266;
497
-          border-radius: 4px;
498
-          margin: 0 4px 0 0;
499
-          &:hover {
500
-            background: #409eff;
501
-            color: #fff;
502
-          }
503
-        }
504
-        .active {
505
-          background: #409eff;
506
-          color: #fff;
507
-        }
508
-      }
509
-    }
510
-  }
511 451
   .amount {
512 452
     font-weight: normal;
513 453
     padding: 10px 0 0 0;

+ 0 - 60
src/xt_pages/qcd/outcomeIndicators/control.vue Bestand weergeven

@@ -428,66 +428,6 @@ export default {
428 428
       cursor: pointer;
429 429
     }
430 430
   }
431
-  .cell {
432
-    margin: 0px 0 15px 0;
433
-    -moz-box-sizing: border-box;
434
-    -webkit-box-sizing: border-box;
435
-    -o-box-sizing: border-box;
436
-    -ms-box-sizing: border-box;
437
-    box-sizing: border-box;
438
-    display: -webkit-box;
439
-    display: -ms-flexbox;
440
-    // display: flex;
441
-    -webkit-box-align: flex-start;
442
-    -ms-flex-align: flex-start;
443
-    align-items: flex-start;
444
-    text-align: left;
445
-    justify-content: flex-start;
446
-    color: #333;
447
-    .title {
448
-      width: 80px;
449
-      display: inline-block;
450
-      font-weight: normal;
451
-      color: #909399;
452
-      padding: 6px 0;
453
-      font-weight: 700;
454
-      .name {
455
-        width: 60px;
456
-        text-align: justify;
457
-        text-justify: distribute-all-lines;
458
-        text-align-last: justify;
459
-        -moz-text-align-last: justify;
460
-        -webkit-text-align-last: justify;
461
-        display: inline-block;
462
-      }
463
-    }
464
-    .time {
465
-      -webkit-box-flex: 1;
466
-      -ms-flex: 1;
467
-      flex: 1;
468
-      ul {
469
-        padding: 0;
470
-        margin: 0;
471
-        li {
472
-          float: left;
473
-          list-style: none;
474
-          cursor: pointer;
475
-          padding: 6px 10px;
476
-          color: #606266;
477
-          border-radius: 4px;
478
-          margin: 0 4px 0 0;
479
-          &:hover {
480
-            background: #409eff;
481
-            color: #fff;
482
-          }
483
-        }
484
-        .active {
485
-          background: #409eff;
486
-          color: #fff;
487
-        }
488
-      }
489
-    }
490
-  }
491 431
   .amount {
492 432
     font-weight: normal;
493 433
     padding: 10px 0 0 0;

+ 0 - 60
src/xt_pages/qcd/outcomeIndicators/query.vue Bestand weergeven

@@ -355,66 +355,6 @@ export default {
355 355
       cursor: pointer;
356 356
     }
357 357
   }
358
-  .cell {
359
-    margin: 0px 0 15px 0;
360
-    -moz-box-sizing: border-box;
361
-    -webkit-box-sizing: border-box;
362
-    -o-box-sizing: border-box;
363
-    -ms-box-sizing: border-box;
364
-    box-sizing: border-box;
365
-    display: -webkit-box;
366
-    display: -ms-flexbox;
367
-    // display: flex;
368
-    -webkit-box-align: flex-start;
369
-    -ms-flex-align: flex-start;
370
-    align-items: flex-start;
371
-    text-align: left;
372
-    justify-content: flex-start;
373
-    color: #333;
374
-    .title {
375
-      width: 80px;
376
-      display: inline-block;
377
-      font-weight: normal;
378
-      color: #909399;
379
-      padding: 6px 0;
380
-      font-weight: 700;
381
-      .name {
382
-        width: 60px;
383
-        text-align: justify;
384
-        text-justify: distribute-all-lines;
385
-        text-align-last: justify;
386
-        -moz-text-align-last: justify;
387
-        -webkit-text-align-last: justify;
388
-        display: inline-block;
389
-      }
390
-    }
391
-    .time {
392
-      -webkit-box-flex: 1;
393
-      -ms-flex: 1;
394
-      flex: 1;
395
-      ul {
396
-        padding: 0;
397
-        margin: 0;
398
-        li {
399
-          float: left;
400
-          list-style: none;
401
-          cursor: pointer;
402
-          padding: 6px 10px;
403
-          color: #606266;
404
-          border-radius: 4px;
405
-          margin: 0 4px 0 0;
406
-          &:hover {
407
-            background: #409eff;
408
-            color: #fff;
409
-          }
410
-        }
411
-        .active {
412
-          background: #409eff;
413
-          color: #fff;
414
-        }
415
-      }
416
-    }
417
-  }
418 358
   .amount {
419 359
     font-weight: normal;
420 360
     padding: 10px 0 0 0;

+ 146 - 102
src/xt_pages/qcd/patientAnalysis/bloodPressure.vue Bestand weergeven

@@ -36,16 +36,17 @@
36 36
           value-format="yyyy-MM-dd"
37 37
         ></el-date-picker>
38 38
       </div>
39
+      
39 40
       <div class="cell clearfix">
40 41
         <label class="title">
41
-          <span class="name">转归状态</span> :
42
+          <span class="name">透析阶段</span> :
42 43
         </label>
43 44
         <div class="time">
44 45
           <ul class>
45 46
             <li
46
-              :class="item.lapseto==lapsetoType?'active':''"
47
-              @click="selectLapseTo( item.lapseto)"
48
-              v-for="item in lapsetoState"
47
+              :class="item.value==dialysisStageType?'active':''"
48
+              @click="selectDialysisStage( item.value)"
49
+              v-for="item in dialysisStage"
49 50
               :key="item.value"
50 51
             >{{item.label}}</li>
51 52
           </ul>
@@ -53,14 +54,14 @@
53 54
       </div>
54 55
       <div class="cell clearfix">
55 56
         <label class="title">
56
-          <span class="name">年龄</span> :
57
+          <span class="name">转归状态</span> :
57 58
         </label>
58 59
         <div class="time">
59 60
           <ul class>
60 61
             <li
61
-              :class="item.age==ageType?'active':''"
62
-              @click="selectAge( item.age)"
63
-              v-for="item in ageOptions"
62
+              :class="item.lapseto==lapsetoType?'active':''"
63
+              @click="selectLapseTo( item.lapseto)"
64
+              v-for="item in lapsetoState"
64 65
               :key="item.value"
65 66
             >{{item.label}}</li>
66 67
           </ul>
@@ -73,7 +74,7 @@
73 74
       <el-row :gutter="32">
74 75
         <el-col :xs="24" :sm="24" :lg="24">
75 76
           <div class="chart-wrapper">
76
-              <pie-chart title="留治情况" :options="CompletionOptions"/>
77
+              <pie-chart title="血压(从次)" :options="CompletionOptions"/>
77 78
           </div>
78 79
         </el-col>
79 80
       </el-row>
@@ -90,17 +91,37 @@
90 91
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
91 92
       >
92 93
         
93
-        <el-table-column  label="透析号" min-width="100" property="dialysis_no" align="center">
94
+        
95
+        <el-table-column  label="透析日期" min-width="80" property="schedule_date" align="center">
96
+          <template slot-scope="scope"><span>{{getTime(scope.row.schedule_date, '{y}{m}{d}')}}</span></template>
94 97
         </el-table-column>
95
-        <el-table-column  label="患者姓名" min-width="100" property="name" align="center">
98
+        <el-table-column  label="透析号" min-width="100" property="patient" align="center">
99
+          <template slot-scope="scope"><span>{{scope.row.patient.dialysis_no}}</span></template>
96 100
         </el-table-column>
97
-        <el-table-column  label="性别" min-width="80" property="gender" align="center">
98
-          <template slot-scope="scope"><span>{{getPatientGender(scope.row.gender)}}</span></template>
101
+        <el-table-column  label="患者姓名" min-width="100" property="patient" align="center">
102
+          <template slot-scope="scope"><span>{{scope.row.patient.name}}</span></template>
99 103
         </el-table-column>
100
-        <el-table-column  label="年龄" min-width="80" property="birthday" align="center">
101
-          <template slot-scope="scope"><span>{{tranAge(scope.row.birthday)}}</span></template>
104
+        <el-table-column  label="性别" min-width="80" property="patient" align="center">
105
+          <template slot-scope="scope"><span>{{getPatientGender(scope.row.patient.gender)}}</span></template>
106
+        </el-table-column>
107
+        <el-table-column  label="年龄" min-width="80" property="patient" align="center">
108
+          <template slot-scope="scope"><span>{{tranAge(scope.row.patient.birthday)}}</span></template>
109
+        </el-table-column>
110
+        <el-table-column  label="转归状态" min-width="80" property="patient" align="center">
111
+          <template slot-scope="scope"><span>{{tranLapseto(scope.row.patient.lapseto)}}</span></template>
112
+        </el-table-column>
113
+        <el-table-column  label="透前血压//mmHg" min-width="80" property="assessment_before_dislysis" align="center" :render-header="renderheader">
114
+          <template slot-scope="scope"><span>{{scope.row.assessment_before_dislysis&&scope.row.assessment_before_dislysis.systolic_blood_pressure&&scope.row.assessment_before_dislysis.diastolic_blood_pressure? scope.row.assessment_before_dislysis.systolic_blood_pressure +'/'+scope.row.assessment_before_dislysis.diastolic_blood_pressure:'--'}}</span></template>
115
+        </el-table-column>
116
+        <el-table-column  label="透析中最低血压//mmHg" min-width="80" property="monitor_records" align="center" :render-header="renderheader">
117
+          <template slot-scope="scope"><span>{{minBloodPressure(scope.row.monitor_records)}}</span></template>
118
+        </el-table-column>
119
+        <el-table-column  label="透析中最高血压//mmHg" min-width="80" property="monitor_records" align="center" :render-header="renderheader">
120
+          <template slot-scope="scope"><span>{{maxBloodPressure(scope.row.monitor_records)}}</span></template>
121
+        </el-table-column>
122
+        <el-table-column  label="透后血压//mmHg" min-width="80" property="assessment_after_dislysis" align="center" :render-header="renderheader">
123
+          <template slot-scope="scope"><span>{{scope.row.assessment_after_dislysis&&scope.row.assessment_after_dislysis.systolic_blood_pressure&&scope.row.assessment_after_dislysis.diastolic_blood_pressure? scope.row.assessment_after_dislysis.systolic_blood_pressure +'/'+scope.row.assessment_after_dislysis.diastolic_blood_pressure:'--'}}</span></template>
102 124
         </el-table-column>
103
-        
104 125
       </el-table>
105 126
 
106 127
       <!-- <pagi-nation title="分页"></pagi-nation> -->
@@ -123,7 +144,7 @@
123 144
 
124 145
 
125 146
 <script>
126
-import { GetPATotalData  } from "@/api/qcd";
147
+import { GetPABloodPressureData  } from "@/api/qcd";
127 148
 import PieChart from '../components/PieChart'
128 149
 import {jsGetAge, uParseTime} from "@/utils/tools";
129 150
 import analysisNav from './components/analysisNav'
@@ -156,13 +177,11 @@ export default {
156 177
         { value: 1, label: "转出", source: 0, lapseto: 2 },
157 178
         { value: 2, label: "留治", source: 0, lapseto: 1 }
158 179
       ],
159
-      ageType: 0,
160
-      ageOptions: [
161
-        { value: 0, label: "全部", age: 0 },
162
-        { value: 1, label: "20~30", age: 1 },
163
-        { value: 2, label: "30~40", age: 2 },
164
-        { value: 3, label: "40~50", age: 3 },
165
-        { value: 4, label: "其他", age: 4 },
180
+      dialysisStageType:0,
181
+      dialysisStage: [
182
+        { value: 0, label: "全部", },
183
+        { value: 1, label: "透前",  },
184
+        { value: 2, label: "透后", }
166 185
       ],
167 186
     };
168 187
   },
@@ -192,31 +211,52 @@ export default {
192 211
   },
193 212
   methods: {
194 213
     getList() {
195
-      GetPATotalData(this.listQuery).then(response => {
214
+      GetPABloodPressureData(this.listQuery).then(response => {
196 215
         if (response.data.state == 0) {
197 216
           this.$message.error(response.data.msg);
198 217
           return false;
199 218
         } else {
200 219
             this.tableData = [];
201 220
             this.total = response.data.data.total;
202
-            var patients = response.data.data.patients;
203
-            for (const index in patients) {
204
-                this.tableData.push(patients[index]);
221
+            var blood_pressures = response.data.data.blood_pressures;
222
+            for (const index in blood_pressures) {
223
+                this.tableData.push(blood_pressures[index]);
205 224
             }
206
-            var lapsetoIn = response.data.data.lapsetoIn;
207
-            var lapsetoOut = response.data.data.lapsetoOut;
208 225
             this.CompletionOptions = {
209 226
                 legend:[],
210 227
                 series:[],
211 228
             };
212
-            this.CompletionOptions.legend.push('留治病人');
213
-            this.CompletionOptions.series.push({
214
-                value:lapsetoIn,name:'留治病人'
215
-            });
216
-            this.CompletionOptions.legend.push('转出病人');
217
-            this.CompletionOptions.series.push({
218
-                value:lapsetoOut,name:'转出病人'
219
-            });
229
+            
230
+            var bpOptions = [
231
+              { blood:1, name:'< 140 /90mmHg' },
232
+              { blood:2, name:'>160 /100mmHg' },
233
+              { blood:3, name:'140~160mmHg/90~100mmHg' },
234
+            ];
235
+            var other = response.data.data.total;
236
+            var bps = response.data.data.bps;
237
+            var bpsMap = {};
238
+            for (const index in bps) {
239
+              bpsMap[bps[index].blood] = bps[index].count;
240
+              other -= bps[index].count;
241
+            }
242
+            for (const index in bpOptions) {
243
+              this.CompletionOptions.legend.push(bpOptions[index].name);
244
+              if(bpOptions[index].blood in bpsMap) {
245
+                this.CompletionOptions.series.push({
246
+                    value:bpsMap[bpOptions[index].blood],name:bpOptions[index].name
247
+                });
248
+              }else {
249
+                this.CompletionOptions.series.push({
250
+                    value:0,name:bpOptions[index].name
251
+                });
252
+              }
253
+            }
254
+            if (other > 0) {
255
+              this.CompletionOptions.legend.push('其他');
256
+              this.CompletionOptions.series.push({
257
+                  value:other,name:'其他'
258
+              });
259
+            }
220 260
         }
221 261
       });
222 262
     },
@@ -239,12 +279,11 @@ export default {
239 279
       this.listQuery.lapseto = lapseto;
240 280
       this.getList();
241 281
     },
242
-    selectAge(age) {
243
-      this.ageType = age;
244
-      this.listQuery.age = age;
282
+    selectDialysisStage(dialysis_stage) {
283
+      this.dialysisStageType = dialysis_stage;
284
+      this.listQuery.dialysis_stage = dialysis_stage;
245 285
       this.getList();
246 286
     },
247
-    
248 287
     getTime(value, temp) {
249 288
         if (value != undefined) {
250 289
           return uParseTime(value, temp)
@@ -257,6 +296,14 @@ export default {
257 296
     getPatientName(id) {
258 297
       return (id in this.patientMap) ? this.patientMap[id].name:'';
259 298
     },
299
+    tranLapseto(lapseto) {
300
+      if (lapseto == 1) {
301
+        return '留治';
302
+      } else if(lapseto == 2) {
303
+        return '转出';
304
+      }
305
+      return '';
306
+    },
260 307
     getPatientGender(gender) {
261 308
       if (gender == 1) {
262 309
         return '男';
@@ -283,6 +330,63 @@ export default {
283 330
             h('span', {}, column.label.split('//')[1])
284 331
         ])
285 332
     },
333
+    maxBloodPressure(records){
334
+      if (typeof(records) == "undefined" || !records || records.length == 0) {
335
+        return '--';
336
+      }
337
+      var arr = [];
338
+      for (const key in records) {
339
+        arr.push(records[key]);
340
+      }
341
+      if(arr.length == 0) {
342
+        return '--';
343
+      }
344
+
345
+      var sortData = this.selectionSort(arr);
346
+      arr = [];
347
+      for (const key in sortData) {
348
+        arr.push(sortData[key]);
349
+      }
350
+      var index = arr.length - 1;
351
+      return arr[index].systolic_blood_pressure + '/' + arr[index].diastolic_blood_pressure
352
+    },
353
+    minBloodPressure(records){
354
+      
355
+      if (typeof(records) == "undefined" || !records || records.length == 0) {
356
+        return '--';
357
+      }
358
+      var arr = [];
359
+      for (const key in records) {
360
+        arr.push(records[key]);
361
+      }
362
+      if(arr.length == 0) {
363
+        return '--';
364
+      }
365
+
366
+      var sortData = this.selectionSort(arr);
367
+      arr = [];
368
+      for (const key in sortData) {
369
+        arr.push(sortData[key]);
370
+      }
371
+      var index = 0;
372
+      return arr[index].systolic_blood_pressure + '/' + arr[index].diastolic_blood_pressure
373
+    },
374
+    selectionSort(arr) {
375
+      var len = arr.length;
376
+      var minIndex, temp;
377
+      for (var i = 0; i < len - 1; i++) {
378
+          minIndex = i;
379
+          for (var j = i + 1; j < len; j++) {
380
+              if (arr[j].systolic_blood_pressure < arr[minIndex].systolic_blood_pressure || (arr[j].systolic_blood_pressure == arr[minIndex].systolic_blood_pressure && arr[j].diastolic_blood_pressure < arr[minIndex].diastolic_blood_pressure)) {     //寻找最小的数
381
+                  minIndex = j;                 //将最小数的索引保存
382
+              }
383
+          }
384
+          temp = arr[i];
385
+          arr[i] = arr[minIndex];
386
+          arr[minIndex] = temp;
387
+      }
388
+      return arr;
389
+    },
286 390
   },
287 391
   components: {
288 392
       analysisNav,
@@ -348,66 +452,6 @@ export default {
348 452
       cursor: pointer;
349 453
     }
350 454
   }
351
-  .cell {
352
-    margin: 0px 0 15px 0;
353
-    -moz-box-sizing: border-box;
354
-    -webkit-box-sizing: border-box;
355
-    -o-box-sizing: border-box;
356
-    -ms-box-sizing: border-box;
357
-    box-sizing: border-box;
358
-    display: -webkit-box;
359
-    display: -ms-flexbox;
360
-    // display: flex;
361
-    -webkit-box-align: flex-start;
362
-    -ms-flex-align: flex-start;
363
-    align-items: flex-start;
364
-    text-align: left;
365
-    justify-content: flex-start;
366
-    color: #333;
367
-    .title {
368
-      width: 80px;
369
-      display: inline-block;
370
-      font-weight: normal;
371
-      color: #909399;
372
-      padding: 6px 0;
373
-      font-weight: 700;
374
-      .name {
375
-        width: 60px;
376
-        text-align: justify;
377
-        text-justify: distribute-all-lines;
378
-        text-align-last: justify;
379
-        -moz-text-align-last: justify;
380
-        -webkit-text-align-last: justify;
381
-        display: inline-block;
382
-      }
383
-    }
384
-    .time {
385
-      -webkit-box-flex: 1;
386
-      -ms-flex: 1;
387
-      flex: 1;
388
-      ul {
389
-        padding: 0;
390
-        margin: 0;
391
-        li {
392
-          float: left;
393
-          list-style: none;
394
-          cursor: pointer;
395
-          padding: 6px 10px;
396
-          color: #606266;
397
-          border-radius: 4px;
398
-          margin: 0 4px 0 0;
399
-          &:hover {
400
-            background: #409eff;
401
-            color: #fff;
402
-          }
403
-        }
404
-        .active {
405
-          background: #409eff;
406
-          color: #fff;
407
-        }
408
-      }
409
-    }
410
-  }
411 455
   .amount {
412 456
     font-weight: normal;
413 457
     padding: 10px 0 0 0;

+ 1 - 61
src/xt_pages/qcd/patientAnalysis/dialysisAge.vue Bestand weergeven

@@ -115,7 +115,7 @@
115 115
         <el-table-column  label="年龄" min-width="80" property="birthday" align="center">
116 116
           <template slot-scope="scope"><span>{{tranAge(scope.row.birthday)}}</span></template>
117 117
         </el-table-column>
118
-        <el-table-column  label="转状态" min-width="80" property="lapseto" align="center">
118
+        <el-table-column  label="转状态" min-width="80" property="lapseto" align="center">
119 119
           <template slot-scope="scope"><span>{{tranLapseto(scope.row.lapseto)}}</span></template>
120 120
         </el-table-column>
121 121
         <el-table-column  label="首次透析日期" min-width="80" property="first_dialysis_date" align="center">
@@ -416,66 +416,6 @@ export default {
416 416
       cursor: pointer;
417 417
     }
418 418
   }
419
-  .cell {
420
-    margin: 0px 0 15px 0;
421
-    -moz-box-sizing: border-box;
422
-    -webkit-box-sizing: border-box;
423
-    -o-box-sizing: border-box;
424
-    -ms-box-sizing: border-box;
425
-    box-sizing: border-box;
426
-    display: -webkit-box;
427
-    display: -ms-flexbox;
428
-    // display: flex;
429
-    -webkit-box-align: flex-start;
430
-    -ms-flex-align: flex-start;
431
-    align-items: flex-start;
432
-    text-align: left;
433
-    justify-content: flex-start;
434
-    color: #333;
435
-    .title {
436
-      width: 80px;
437
-      display: inline-block;
438
-      font-weight: normal;
439
-      color: #909399;
440
-      padding: 6px 0;
441
-      font-weight: 700;
442
-      .name {
443
-        width: 60px;
444
-        text-align: justify;
445
-        text-justify: distribute-all-lines;
446
-        text-align-last: justify;
447
-        -moz-text-align-last: justify;
448
-        -webkit-text-align-last: justify;
449
-        display: inline-block;
450
-      }
451
-    }
452
-    .time {
453
-      -webkit-box-flex: 1;
454
-      -ms-flex: 1;
455
-      flex: 1;
456
-      ul {
457
-        padding: 0;
458
-        margin: 0;
459
-        li {
460
-          float: left;
461
-          list-style: none;
462
-          cursor: pointer;
463
-          padding: 6px 10px;
464
-          color: #606266;
465
-          border-radius: 4px;
466
-          margin: 0 4px 0 0;
467
-          &:hover {
468
-            background: #409eff;
469
-            color: #fff;
470
-          }
471
-        }
472
-        .active {
473
-          background: #409eff;
474
-          color: #fff;
475
-        }
476
-      }
477
-    }
478
-  }
479 419
   .amount {
480 420
     font-weight: normal;
481 421
     padding: 10px 0 0 0;

+ 0 - 60
src/xt_pages/qcd/patientAnalysis/lapseto.vue Bestand weergeven

@@ -398,66 +398,6 @@ export default {
398 398
       cursor: pointer;
399 399
     }
400 400
   }
401
-  .cell {
402
-    margin: 0px 0 15px 0;
403
-    -moz-box-sizing: border-box;
404
-    -webkit-box-sizing: border-box;
405
-    -o-box-sizing: border-box;
406
-    -ms-box-sizing: border-box;
407
-    box-sizing: border-box;
408
-    display: -webkit-box;
409
-    display: -ms-flexbox;
410
-    // display: flex;
411
-    -webkit-box-align: flex-start;
412
-    -ms-flex-align: flex-start;
413
-    align-items: flex-start;
414
-    text-align: left;
415
-    justify-content: flex-start;
416
-    color: #333;
417
-    .title {
418
-      width: 80px;
419
-      display: inline-block;
420
-      font-weight: normal;
421
-      color: #909399;
422
-      padding: 6px 0;
423
-      font-weight: 700;
424
-      .name {
425
-        width: 60px;
426
-        text-align: justify;
427
-        text-justify: distribute-all-lines;
428
-        text-align-last: justify;
429
-        -moz-text-align-last: justify;
430
-        -webkit-text-align-last: justify;
431
-        display: inline-block;
432
-      }
433
-    }
434
-    .time {
435
-      -webkit-box-flex: 1;
436
-      -ms-flex: 1;
437
-      flex: 1;
438
-      ul {
439
-        padding: 0;
440
-        margin: 0;
441
-        li {
442
-          float: left;
443
-          list-style: none;
444
-          cursor: pointer;
445
-          padding: 6px 10px;
446
-          color: #606266;
447
-          border-radius: 4px;
448
-          margin: 0 4px 0 0;
449
-          &:hover {
450
-            background: #409eff;
451
-            color: #fff;
452
-          }
453
-        }
454
-        .active {
455
-          background: #409eff;
456
-          color: #fff;
457
-        }
458
-      }
459
-    }
460
-  }
461 401
   .amount {
462 402
     font-weight: normal;
463 403
     padding: 10px 0 0 0;

+ 0 - 60
src/xt_pages/qcd/patientAnalysis/total.vue Bestand weergeven

@@ -361,66 +361,6 @@ export default {
361 361
       cursor: pointer;
362 362
     }
363 363
   }
364
-  .cell {
365
-    margin: 0px 0 15px 0;
366
-    -moz-box-sizing: border-box;
367
-    -webkit-box-sizing: border-box;
368
-    -o-box-sizing: border-box;
369
-    -ms-box-sizing: border-box;
370
-    box-sizing: border-box;
371
-    display: -webkit-box;
372
-    display: -ms-flexbox;
373
-    // display: flex;
374
-    -webkit-box-align: flex-start;
375
-    -ms-flex-align: flex-start;
376
-    align-items: flex-start;
377
-    text-align: left;
378
-    justify-content: flex-start;
379
-    color: #333;
380
-    .title {
381
-      width: 80px;
382
-      display: inline-block;
383
-      font-weight: normal;
384
-      color: #909399;
385
-      padding: 6px 0;
386
-      font-weight: 700;
387
-      .name {
388
-        width: 60px;
389
-        text-align: justify;
390
-        text-justify: distribute-all-lines;
391
-        text-align-last: justify;
392
-        -moz-text-align-last: justify;
393
-        -webkit-text-align-last: justify;
394
-        display: inline-block;
395
-      }
396
-    }
397
-    .time {
398
-      -webkit-box-flex: 1;
399
-      -ms-flex: 1;
400
-      flex: 1;
401
-      ul {
402
-        padding: 0;
403
-        margin: 0;
404
-        li {
405
-          float: left;
406
-          list-style: none;
407
-          cursor: pointer;
408
-          padding: 6px 10px;
409
-          color: #606266;
410
-          border-radius: 4px;
411
-          margin: 0 4px 0 0;
412
-          &:hover {
413
-            background: #409eff;
414
-            color: #fff;
415
-          }
416
-        }
417
-        .active {
418
-          background: #409eff;
419
-          color: #fff;
420
-        }
421
-      }
422
-    }
423
-  }
424 364
   .amount {
425 365
     font-weight: normal;
426 366
     padding: 10px 0 0 0;

+ 170 - 84
src/xt_pages/qcd/patientAnalysis/weight.vue Bestand weergeven

@@ -71,9 +71,19 @@
71 71
       <h4 class="hui">统计图</h4>
72 72
       <hr class="huixiao">
73 73
       <el-row :gutter="32">
74
-        <el-col :xs="24" :sm="24" :lg="24">
74
+        <el-col :xs="24" :sm="24" :lg="8">
75 75
           <div class="chart-wrapper">
76
-              <pie-chart title="留治情况" :options="CompletionOptions"/>
76
+              <pie-chart title="干体重(人次)" :options="CompletionOptions"/>
77
+          </div>
78
+        </el-col>
79
+        <el-col :xs="24" :sm="24" :lg="8">
80
+          <div class="chart-wrapper">
81
+              <pie-chart title="体重增加(人次)" :options="WeightIncrOptions"/>
82
+          </div>
83
+        </el-col>
84
+        <el-col :xs="24" :sm="24" :lg="8">
85
+          <div class="chart-wrapper">
86
+              <pie-chart title="透后体重(人次)" :options="WeightAfterOptions"/>
77 87
           </div>
78 88
         </el-col>
79 89
       </el-row>
@@ -89,16 +99,36 @@
89 99
         style="width: 100%;margin-top: 10px;"
90 100
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
91 101
       >
92
-        
93
-        <el-table-column  label="透析号" min-width="100" property="dialysis_no" align="center">
102
+      
103
+        <el-table-column  label="透析日期" min-width="80" property="schedule_date" align="center">
104
+          <template slot-scope="scope"><span>{{getTime(scope.row.schedule_date, '{y}{m}{d}')}}</span></template>
105
+        </el-table-column>
106
+        <el-table-column  label="透析号" min-width="100" property="patient" align="center">
107
+          <template slot-scope="scope"><span>{{scope.row.patient.dialysis_no}}</span></template>
108
+        </el-table-column>
109
+        <el-table-column  label="患者姓名" min-width="100" property="patient" align="center">
110
+          <template slot-scope="scope"><span>{{scope.row.patient.name}}</span></template>
111
+        </el-table-column>
112
+        <el-table-column  label="性别" min-width="80" property="patient" align="center">
113
+          <template slot-scope="scope"><span>{{getPatientGender(scope.row.patient.gender)}}</span></template>
114
+        </el-table-column>
115
+        <el-table-column  label="年龄" min-width="80" property="patient" align="center">
116
+          <template slot-scope="scope"><span>{{tranAge(scope.row.patient.birthday)}}</span></template>
117
+        </el-table-column>
118
+        <el-table-column  label="转归状态" min-width="80" property="patient" align="center">
119
+          <template slot-scope="scope"><span>{{tranLapseto(scope.row.patient.lapseto)}}</span></template>
120
+        </el-table-column>
121
+        <el-table-column  label="干体重" min-width="80" property="assessment_before_dislysis" align="center">
122
+          <template slot-scope="scope"><span>{{scope.row.assessment_before_dislysis?scope.row.assessment_before_dislysis.dry_weight + 'Kg':'--'}}</span></template>
94 123
         </el-table-column>
95
-        <el-table-column  label="患者姓名" min-width="100" property="name" align="center">
124
+        <el-table-column  label="透前体重" min-width="80" property="assessment_before_dislysis" align="center">
125
+          <template slot-scope="scope"><span>{{scope.row.assessment_before_dislysis?scope.row.assessment_before_dislysis.weight_before + 'Kg':'--'}}</span></template>
96 126
         </el-table-column>
97
-        <el-table-column  label="性别" min-width="80" property="gender" align="center">
98
-          <template slot-scope="scope"><span>{{getPatientGender(scope.row.gender)}}</span></template>
127
+        <el-table-column  label="体重增加" min-width="80" property="assessment_before_dislysis" align="center">
128
+          <template slot-scope="scope"><span>{{scope.row.assessment_before_dislysis?scope.row.assessment_before_dislysis.weight_before - scope.row.assessment_before_dislysis.dry_weight + 'Kg':'--'}}</span></template>
99 129
         </el-table-column>
100
-        <el-table-column  label="年龄" min-width="80" property="birthday" align="center">
101
-          <template slot-scope="scope"><span>{{tranAge(scope.row.birthday)}}</span></template>
130
+        <el-table-column  label="透后体重" min-width="80" property="assessment_after_dislysis" align="center">
131
+          <template slot-scope="scope"><span>{{scope.row.assessment_after_dislysis?scope.row.assessment_after_dislysis.weight_after+ 'Kg':'--'}}</span></template>
102 132
         </el-table-column>
103 133
         
104 134
       </el-table>
@@ -123,7 +153,7 @@
123 153
 
124 154
 
125 155
 <script>
126
-import { GetPATotalData  } from "@/api/qcd";
156
+import { GetPAWeightData  } from "@/api/qcd";
127 157
 import PieChart from '../components/PieChart'
128 158
 import {jsGetAge, uParseTime} from "@/utils/tools";
129 159
 import analysisNav from './components/analysisNav'
@@ -149,6 +179,14 @@ export default {
149 179
         legend:[],
150 180
         series:[],
151 181
       },
182
+      WeightIncrOptions:{
183
+        legend:[],
184
+        series:[],
185
+      },
186
+      WeightAfterOptions:{
187
+        legend:[],
188
+        series:[],
189
+      },
152 190
       tableData: [],
153 191
       lapsetoType: 0,
154 192
       lapsetoState: [
@@ -192,31 +230,130 @@ export default {
192 230
   },
193 231
   methods: {
194 232
     getList() {
195
-      GetPATotalData(this.listQuery).then(response => {
233
+      GetPAWeightData(this.listQuery).then(response => {
196 234
         if (response.data.state == 0) {
197 235
           this.$message.error(response.data.msg);
198 236
           return false;
199 237
         } else {
200 238
             this.tableData = [];
201 239
             this.total = response.data.data.total;
202
-            var patients = response.data.data.patients;
203
-            for (const index in patients) {
204
-                this.tableData.push(patients[index]);
240
+            var weights = response.data.data.weights;
241
+            for (const index in weights) {
242
+                this.tableData.push(weights[index]);
205 243
             }
206
-            var lapsetoIn = response.data.data.lapsetoIn;
207
-            var lapsetoOut = response.data.data.lapsetoOut;
244
+
208 245
             this.CompletionOptions = {
209 246
                 legend:[],
210 247
                 series:[],
211 248
             };
212
-            this.CompletionOptions.legend.push('留治病人');
213
-            this.CompletionOptions.series.push({
214
-                value:lapsetoIn,name:'留治病人'
215
-            });
216
-            this.CompletionOptions.legend.push('转出病人');
217
-            this.CompletionOptions.series.push({
218
-                value:lapsetoOut,name:'转出病人'
219
-            });
249
+            var dryweightOptions = [
250
+              { weight:1, name:'<40Kg' },
251
+              { weight:2, name:'40~50Kg' },
252
+              { weight:3, name:'50~60Kg' },
253
+              { weight:4, name:'60~70Kg' },
254
+              { weight:5, name:'>=70Kg' },
255
+            ];
256
+            var other = response.data.data.total;
257
+            var dryweight = response.data.data.dryweight;
258
+            var dryweightMap = {};
259
+            for (const index in dryweight) {
260
+              dryweightMap[dryweight[index].weight] = dryweight[index].count;
261
+              other -= dryweight[index].count;
262
+            }
263
+            for (const index in dryweightOptions) {
264
+              this.CompletionOptions.legend.push(dryweightOptions[index].name);
265
+              if(dryweightOptions[index].weight in dryweightMap) {
266
+                this.CompletionOptions.series.push({
267
+                    value:dryweightMap[dryweightOptions[index].weight],name:dryweightOptions[index].name
268
+                });
269
+              }else {
270
+                this.CompletionOptions.series.push({
271
+                    value:0,name:dryweightOptions[index].name
272
+                });
273
+              }
274
+            }
275
+            if (other > 0) {
276
+              this.CompletionOptions.legend.push('其他');
277
+              this.CompletionOptions.series.push({
278
+                  value:other,name:'其他'
279
+              });
280
+            }
281
+
282
+            this.WeightIncrOptions = {
283
+                legend:[],
284
+                series:[],
285
+            };
286
+            var weightOptions = [
287
+              { weight:1, name:'<1Kg' },
288
+              { weight:2, name:'1~2Kg' },
289
+              { weight:3, name:'2~3Kg' },
290
+              { weight:4, name:'3~4Kg' },
291
+              { weight:5, name:'>=4Kg' },
292
+            ];
293
+            var other = response.data.data.total;
294
+            var weightincrease = response.data.data.weightincrease;
295
+            var weightincreaseMap = {};
296
+            for (const index in weightincrease) {
297
+              weightincreaseMap[weightincrease[index].weight] = weightincrease[index].count;
298
+              other -= weightincrease[index].count;
299
+            }
300
+            for (const index in weightOptions) {
301
+              this.WeightIncrOptions.legend.push(weightOptions[index].name);
302
+              if(weightOptions[index].weight in weightincreaseMap) {
303
+                this.WeightIncrOptions.series.push({
304
+                    value:weightincreaseMap[weightOptions[index].weight],name:weightOptions[index].name
305
+                });
306
+              }else {
307
+                this.WeightIncrOptions.series.push({
308
+                    value:0,name:weightOptions[index].name
309
+                });
310
+              }
311
+            }
312
+            if (other > 0) {
313
+              this.WeightIncrOptions.legend.push('其他');
314
+              this.WeightIncrOptions.series.push({
315
+                  value:other,name:'其他'
316
+              });
317
+            }
318
+
319
+            this.WeightAfterOptions = {
320
+                legend:[],
321
+                series:[],
322
+            };
323
+            var afterWeightOptions = [
324
+              { weight:1, name:'<40Kg' },
325
+              { weight:2, name:'40~50Kg' },
326
+              { weight:3, name:'50~60Kg' },
327
+              { weight:4, name:'60~70Kg' },
328
+              { weight:5, name:'>=70Kg' },
329
+            ];
330
+            var other = response.data.data.total;
331
+            var afterweight = response.data.data.afterweight;
332
+            var afterweightMap = {};
333
+            for (const index in afterweight) {
334
+              afterweightMap[afterweight[index].weight] = afterweight[index].count;
335
+              other -= afterweight[index].count;
336
+            }
337
+            for (const index in weightOptions) {
338
+              this.WeightAfterOptions.legend.push(weightOptions[index].name);
339
+              if(weightOptions[index].weight in afterweightMap) {
340
+                this.WeightAfterOptions.series.push({
341
+                    value:afterweightMap[weightOptions[index].weight],name:weightOptions[index].name
342
+                });
343
+              }else {
344
+                this.WeightAfterOptions.series.push({
345
+                    value:0,name:weightOptions[index].name
346
+                });
347
+              }
348
+            }
349
+            if (other > 0) {
350
+              this.WeightAfterOptions.legend.push('其他');
351
+              this.WeightAfterOptions.series.push({
352
+                  value:other,name:'其他'
353
+              });
354
+            }
355
+
356
+            
220 357
         }
221 358
       });
222 359
     },
@@ -257,6 +394,14 @@ export default {
257 394
     getPatientName(id) {
258 395
       return (id in this.patientMap) ? this.patientMap[id].name:'';
259 396
     },
397
+    tranLapseto(lapseto) {
398
+      if (lapseto == 1) {
399
+        return '留治';
400
+      } else if(lapseto == 2) {
401
+        return '转出';
402
+      }
403
+      return '';
404
+    },
260 405
     getPatientGender(gender) {
261 406
       if (gender == 1) {
262 407
         return '男';
@@ -348,66 +493,7 @@ export default {
348 493
       cursor: pointer;
349 494
     }
350 495
   }
351
-  .cell {
352
-    margin: 0px 0 15px 0;
353
-    -moz-box-sizing: border-box;
354
-    -webkit-box-sizing: border-box;
355
-    -o-box-sizing: border-box;
356
-    -ms-box-sizing: border-box;
357
-    box-sizing: border-box;
358
-    display: -webkit-box;
359
-    display: -ms-flexbox;
360
-    // display: flex;
361
-    -webkit-box-align: flex-start;
362
-    -ms-flex-align: flex-start;
363
-    align-items: flex-start;
364
-    text-align: left;
365
-    justify-content: flex-start;
366
-    color: #333;
367
-    .title {
368
-      width: 80px;
369
-      display: inline-block;
370
-      font-weight: normal;
371
-      color: #909399;
372
-      padding: 6px 0;
373
-      font-weight: 700;
374
-      .name {
375
-        width: 60px;
376
-        text-align: justify;
377
-        text-justify: distribute-all-lines;
378
-        text-align-last: justify;
379
-        -moz-text-align-last: justify;
380
-        -webkit-text-align-last: justify;
381
-        display: inline-block;
382
-      }
383
-    }
384
-    .time {
385
-      -webkit-box-flex: 1;
386
-      -ms-flex: 1;
387
-      flex: 1;
388
-      ul {
389
-        padding: 0;
390
-        margin: 0;
391
-        li {
392
-          float: left;
393
-          list-style: none;
394
-          cursor: pointer;
395
-          padding: 6px 10px;
396
-          color: #606266;
397
-          border-radius: 4px;
398
-          margin: 0 4px 0 0;
399
-          &:hover {
400
-            background: #409eff;
401
-            color: #fff;
402
-          }
403
-        }
404
-        .active {
405
-          background: #409eff;
406
-          color: #fff;
407
-        }
408
-      }
409
-    }
410
-  }
496
+
411 497
   .amount {
412 498
     font-weight: normal;
413 499
     padding: 10px 0 0 0;

+ 0 - 60
src/xt_pages/qcd/processIndicators.1.vue Bestand weergeven

@@ -362,66 +362,6 @@ export default {
362 362
       cursor: pointer;
363 363
     }
364 364
   }
365
-  .cell {
366
-    margin: 0px 0 15px 0;
367
-    -moz-box-sizing: border-box;
368
-    -webkit-box-sizing: border-box;
369
-    -o-box-sizing: border-box;
370
-    -ms-box-sizing: border-box;
371
-    box-sizing: border-box;
372
-    display: -webkit-box;
373
-    display: -ms-flexbox;
374
-    // display: flex;
375
-    -webkit-box-align: flex-start;
376
-    -ms-flex-align: flex-start;
377
-    align-items: flex-start;
378
-    text-align: left;
379
-    justify-content: flex-start;
380
-    color: #333;
381
-    .title {
382
-      width: 80px;
383
-      display: inline-block;
384
-      font-weight: normal;
385
-      color: #909399;
386
-      padding: 6px 0;
387
-      font-weight: 700;
388
-      .name {
389
-        width: 60px;
390
-        text-align: justify;
391
-        text-justify: distribute-all-lines;
392
-        text-align-last: justify;
393
-        -moz-text-align-last: justify;
394
-        -webkit-text-align-last: justify;
395
-        display: inline-block;
396
-      }
397
-    }
398
-    .time {
399
-      -webkit-box-flex: 1;
400
-      -ms-flex: 1;
401
-      flex: 1;
402
-      ul {
403
-        padding: 0;
404
-        margin: 0;
405
-        li {
406
-          float: left;
407
-          list-style: none;
408
-          cursor: pointer;
409
-          padding: 6px 10px;
410
-          color: #606266;
411
-          border-radius: 4px;
412
-          margin: 0 4px 0 0;
413
-          &:hover {
414
-            background: #409eff;
415
-            color: #fff;
416
-          }
417
-        }
418
-        .active {
419
-          background: #409eff;
420
-          color: #fff;
421
-        }
422
-      }
423
-    }
424
-  }
425 365
   .amount {
426 366
     font-weight: normal;
427 367
     padding: 10px 0 0 0;

+ 0 - 60
src/xt_pages/qcd/processIndicators.vue Bestand weergeven

@@ -378,66 +378,6 @@ export default {
378 378
       cursor: pointer;
379 379
     }
380 380
   }
381
-  .cell {
382
-    margin: 0px 0 15px 0;
383
-    -moz-box-sizing: border-box;
384
-    -webkit-box-sizing: border-box;
385
-    -o-box-sizing: border-box;
386
-    -ms-box-sizing: border-box;
387
-    box-sizing: border-box;
388
-    display: -webkit-box;
389
-    display: -ms-flexbox;
390
-    // display: flex;
391
-    -webkit-box-align: flex-start;
392
-    -ms-flex-align: flex-start;
393
-    align-items: flex-start;
394
-    text-align: left;
395
-    justify-content: flex-start;
396
-    color: #333;
397
-    .title {
398
-      width: 80px;
399
-      display: inline-block;
400
-      font-weight: normal;
401
-      color: #909399;
402
-      padding: 6px 0;
403
-      font-weight: 700;
404
-      .name {
405
-        width: 60px;
406
-        text-align: justify;
407
-        text-justify: distribute-all-lines;
408
-        text-align-last: justify;
409
-        -moz-text-align-last: justify;
410
-        -webkit-text-align-last: justify;
411
-        display: inline-block;
412
-      }
413
-    }
414
-    .time {
415
-      -webkit-box-flex: 1;
416
-      -ms-flex: 1;
417
-      flex: 1;
418
-      ul {
419
-        padding: 0;
420
-        margin: 0;
421
-        li {
422
-          float: left;
423
-          list-style: none;
424
-          cursor: pointer;
425
-          padding: 6px 10px;
426
-          color: #606266;
427
-          border-radius: 4px;
428
-          margin: 0 4px 0 0;
429
-          &:hover {
430
-            background: #409eff;
431
-            color: #fff;
432
-          }
433
-        }
434
-        .active {
435
-          background: #409eff;
436
-          color: #fff;
437
-        }
438
-      }
439
-    }
440
-  }
441 381
   .amount {
442 382
     font-weight: normal;
443 383
     padding: 10px 0 0 0;

+ 9 - 3
src/xt_pages/role/admin.vue Bestand weergeven

@@ -31,10 +31,16 @@
31 31
       <el-table-column label="操作" width="210px">
32 32
         <template slot-scope="scope">
33 33
           <router-link :to="{ path:'/role/admin/edit', query:{ id:scope.row.user_id }}">
34
-            <el-button type="primary" icon="el-icon-edit-outline">编辑</el-button>
34
+            <el-tooltip class="item" effect="dark" content="编辑" placement="top">
35
+              <el-button type="primary" icon="el-icon-edit-outline" size="small"></el-button>
36
+            </el-tooltip> 
35 37
           </router-link>
36
-          <el-button type="danger" icon="el-icon-delete" v-if="scope.row.status == 1" @click="disableAdminAction(scope.row)">移除</el-button>
37
-          <el-button size="medium" type="info" icon="el-icon-refresh" v-if="scope.row.status == 0" @click="recoverAdminAction(scope.row)">恢复</el-button>
38
+          <el-tooltip class="item" effect="dark" content="移除" placement="top">
39
+            <el-button type="danger" size="small" icon="el-icon-delete" v-if="scope.row.status == 1" @click="disableAdminAction(scope.row)"></el-button>
40
+          </el-tooltip>
41
+          <el-tooltip class="item" effect="dark" content="恢复" placement="top">
42
+            <el-button size="small" type="info" icon="el-icon-refresh" v-if="scope.row.status == 0" @click="recoverAdminAction(scope.row)"></el-button>
43
+          </el-tooltip>
38 44
         </template>
39 45
       </el-table-column>
40 46
     </el-table>

+ 15 - 4
src/xt_pages/role/role.vue Bestand weergeven

@@ -22,11 +22,22 @@
22 22
       <el-table-column label="操作" min-width="40%">
23 23
         <template slot-scope="scope">
24 24
           <router-link :to='{ path:"/role/perview", query:{ id:scope.row.id }}'>
25
-            <el-button type="warning" icon="el-icon-setting">权限设置</el-button>
25
+            <el-tooltip class="item" effect="dark" content="权限设置" placement="top">
26
+              <el-button type="warning" icon="el-icon-setting" size="small"></el-button>
27
+            </el-tooltip>
26 28
           </router-link>
27
-          <el-button type="primary" icon="el-icon-edit-outline" @click="modifyRoleAction(scope.row)">编辑</el-button>
28
-          <el-button type="danger" icon="el-icon-delete" v-if="scope.row.status === 1" @click="disableRoleAction(scope.row)">移除</el-button>
29
-          <el-button type="info" icon="el-icon-refresh" v-if="scope.row.status !== 1" @click="recoverRoleAction(scope.row)">恢复</el-button>
29
+          <el-tooltip class="item" effect="dark" content="编辑" placement="top">
30
+           <el-button type="primary" size="small" icon="el-icon-edit-outline" @click="modifyRoleAction(scope.row)"></el-button>
31
+          </el-tooltip>
32
+          
33
+          <el-tooltip class="item" effect="dark" content="移除" placement="top">
34
+           <el-button type="danger" size="small" icon="el-icon-delete" v-if="scope.row.status === 1" @click="disableRoleAction(scope.row)"></el-button>
35
+          </el-tooltip>
36
+          
37
+          <el-tooltip class="item" effect="dark" content="恢复" placement="top">
38
+           <el-button type="info" size="small" icon="el-icon-refresh" v-if="scope.row.status !== 1" @click="recoverRoleAction(scope.row)"></el-button>
39
+          </el-tooltip>
40
+          
30 41
         </template>
31 42
       </el-table-column>
32 43
     </el-table>

+ 23 - 28
src/xt_pages/stock/Dialog/goodInfoDailog.vue Bestand weergeven

@@ -2,7 +2,7 @@
2 2
   <el-dialog width="854px" :title="titles" :visible.sync="visibility" :show-close="isClose" :close-on-click-modal="isClose"
3 3
              :close-on-press-escape="isClose">
4 4
 
5
-    <el-form class="demo-form-inline" 
5
+    <el-form class="demo-form-inline"
6 6
              :rules="rules" :model="form" ref="form"
7 7
              label-width="116px">
8 8
       <el-row>
@@ -40,7 +40,7 @@
40 40
         </el-col>
41 41
       </el-row>
42 42
 
43
-      <el-row>     
43
+      <el-row>
44 44
         <el-col :span="8">
45 45
           <el-form-item label="生产厂家" prop="dealer">
46 46
             <el-select  v-model="form.manufacturer" placeholder="请选择">
@@ -73,8 +73,8 @@
73 73
           </el-form-item>
74 74
         </el-col>
75 75
       </el-row>
76
-      
77
-      <el-row>           
76
+
77
+      <el-row>
78 78
         <el-col :span="8">
79 79
           <el-form-item label="出货价" prop="sell_price">
80 80
             <el-input  type="number" v-model="form.sell_price"></el-input>
@@ -93,8 +93,8 @@
93 93
           </el-form-item>
94 94
         </el-col>
95 95
       </el-row>
96
-    
97
-      <el-row>           
96
+
97
+      <el-row>
98 98
        <el-col :span="16">
99 99
         <el-form-item label="是否可复用" prop="is_reuse">
100 100
             <el-radio v-model="form.is_reuse" label="1">可以</el-radio>
@@ -102,7 +102,7 @@
102 102
           </el-form-item>
103 103
         </el-col>
104 104
       </el-row>
105
-      
105
+
106 106
       <el-col>
107 107
         <el-form-item label="备注" prop="remark">
108 108
           <el-input type="textarea" :row="5" v-model="form.remark"
@@ -123,10 +123,8 @@
123 123
 </template>
124 124
 
125 125
 <script>
126
-
127
-
128 126
   export default {
129
-    name: "goodInfoDailog",
127
+    name: 'goodInfoDailog',
130 128
     data() {
131 129
       return {
132 130
         good_unit: '',
@@ -142,15 +140,15 @@
142 140
           dealer: '',
143 141
           expiry_date_warn_day_count: '',
144 142
           stock_warn_count: '',
145
-          is_reuse: '2',
143
+          is_reuse: '2'
146 144
         },
147 145
 
148 146
         rules: {
149 147
           specification_name: [
150
-            {required: true, message: '请输入规格名称', trigger: 'blur'},
148
+            { required: true, message: '请输入规格名称', trigger: 'blur' }
151 149
           ],
152 150
           good_id: [
153
-            {required: true, message: '请选择物品类型', trigger: 'change'}
151
+            { required: true, message: '请选择物品类型', trigger: 'change' }
154 152
           ]
155 153
 
156 154
         }
@@ -163,33 +161,31 @@
163 161
       },
164 162
       titles: {
165 163
         type: String,
166
-        default: "",
164
+        default: ''
167 165
       },
168 166
       formValue: {
169 167
         type: Object
170 168
       },
171 169
       isCreated: {
172 170
         type: Number,
173
-        default: 1,
171
+        default: 1
174 172
 
175 173
       }
176 174
 
177 175
     },
178 176
     methods: {
179
-      cancle: function (formName) {
180
-
181
-        this.$emit('dialog-cancle', this.getValue());
182
-
177
+      cancle: function(formName) {
178
+        this.$emit('dialog-cancle', this.getValue())
183 179
       },
184
-      comfirm: function (formName) {
180
+      comfirm: function(formName) {
185 181
         this.$refs[formName].validate((valid) => {
186 182
           if (valid) {
187
-            this.$emit('dialog-comfirm', this.getValue());
183
+            this.$emit('dialog-comfirm', this.getValue())
188 184
           }
189
-        });
185
+        })
190 186
       },
191
-      getValue: function () {
192
-        let form = {}
187
+      getValue: function() {
188
+        const form = {}
193 189
         form['specification_name'] = this.form.specification_name
194 190
         form['good_unit'] = this.good_unit
195 191
         form['buy_price'] = this.form.buy_price
@@ -203,17 +199,16 @@
203 199
         form['isCreated'] = this.isCreated
204 200
         form['good_id'] = this.form.good_id
205 201
         return form
206
-      }, changeSelected: function (val) {
207
-
202
+      }, changeSelected: function(val) {
208 203
         console.log(val)
209 204
       }
210 205
     },
211 206
     watch: {
212 207
       visibility(val) {
213
-
214 208
         this.form = this.formValue
209
+        console.log(this.form)
215 210
         this.good_unit = this.formValue.good_unit
216
-        if(this.isCreated == 1){
211
+        if (this.isCreated == 1) {
217 212
           this.good_unit = ''
218 213
         }
219 214
       }

+ 160 - 2
src/xt_pages/stock/Dialog/salesReturnDialog.vue Bestand weergeven

@@ -1,11 +1,169 @@
1 1
 <template>
2
+  <el-dialog :title="propForm.title" :visible.sync="visibility" :show-close="isClose" :close-on-click-modal="isClose"
3
+             :close-on-press-escape="isClose">
4
+
5
+    <div class="filter-container">
6
+      <el-input style="width: 150px;" class="filter-item" placeholder="规格名称" v-model="keywords"/>
7
+      <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
8
+    </div>
9
+
10
+    <el-row :gutter="20">
11
+      <el-col :span="8">
12
+        <el-table
13
+          :data="propForm.goodType"
14
+          ref="templatetable"
15
+          border
16
+          highlight-current-row
17
+          max-height="250"
18
+          @current-change="goodTypeTableChange"
19
+          style="width: 100%">
20
+          <el-table-column
21
+            prop="type_name"
22
+            label="商品类型">
23
+          </el-table-column>
24
+        </el-table>
25
+      </el-col>
26
+      <el-col :span="16">
27
+        <el-table
28
+          :data="goodInfoTableData"
29
+          border
30
+          ref="multipleTable"
31
+          max-height="250"
32
+          @selection-change="changeGoodInfoTableData"
33
+          @select-all="changeAllGoodInfoTableData"
34
+          row-key="row_key"
35
+          style="width: 100%"
36
+        >
37
+          <el-table-column
38
+            type="selection"
39
+            width="55">
40
+          </el-table-column>
41
+          <el-table-column
42
+            label="规格名称"
43
+            property="specification_name"
44
+            style="word-break: keep-all;white-space:nowrap;"
45
+          ></el-table-column>
46
+          <el-table-column
47
+            label="单位"
48
+            property="good_unit"
49
+          >
50
+            <template slot-scope="scope">
51
+              <span>{{getName(scope.row.good_unit)}}</span>
52
+            </template>
53
+          </el-table-column>
54
+
55
+        </el-table>
56
+      </el-col>
57
+    </el-row>
58
+
59
+
60
+    <span slot="footer" class="dialog-footer">
61
+    <el-button @click="cancle()">取 消</el-button>
62
+    <el-button type="primary" @click="comfirm()">确 定</el-button>
63
+  </span>
64
+  </el-dialog>
2 65
 
3 66
 </template>
4 67
 
5 68
 <script>
6
-    export default {
7
-        name: "sales-return-dialog"
69
+  export default {
70
+    name: 'salesReturnDialog',
71
+    data() {
72
+      return {
73
+        goodInfo: [],
74
+        goodInfoTableData: [],
75
+        keywords: '',
76
+        multipleSelection: [],
77
+        currentGoodTypeId: 0,
78
+        isClose: false
79
+      }
80
+    },
81
+    props: {
82
+      propForm: {
83
+        type: Object
84
+      },
85
+      visibility: {
86
+        type: Boolean,
87
+        default: false
88
+      }
89
+
90
+    },
91
+    methods: {
92
+      goodTypeTableChange: function(currentRow, oldCurrentRow) {
93
+        this.currentGoodTypeId = currentRow.id
94
+
95
+        this.goodInfoTableData = []
96
+        this.goodInfo = []
97
+        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
98
+          if (this.currentGoodTypeId == this.propForm.goodInfo[i].good_type_id) {
99
+            this.goodInfo.push(this.propForm.goodInfo[i])
100
+            this.goodInfoTableData.push(this.propForm.goodInfo[i])
101
+          }
102
+        }
103
+      },
104
+      cancle: function() {
105
+        this.$emit('dialog-cancle', this.getValue())
106
+        this.$refs.multipleTable.clearSelection()
107
+      },
108
+      comfirm: function() {
109
+        this.$emit('dialog-comfirm', this.getValue())
110
+        this.$refs.multipleTable.clearSelection()
111
+      },
112
+      getValue: function() {
113
+        const obj = {
114
+          selectedGoodInfo: this.multipleSelection,
115
+          goodTypeId: this.currentGoodTypeId
116
+        }
117
+        return obj
118
+      }, goodTypeSelect: function(id) {
119
+        this.tempGoodInfo = []
120
+        this.goodInfo = []
121
+        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
122
+          if (this.propForm.goodInfo[i].good_type_id == id) {
123
+            this.tempGoodInfo.push(this.propForm.goodInfo[i])
124
+          }
125
+        }
126
+      }, goodInfoSelect: function(id) {
127
+        let index = 0
128
+        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
129
+          if (this.propForm.goodInfo[i].id == id) {
130
+            index = i
131
+          }
132
+        }
133
+        this.form.good_type_id = this.propForm.goodInfo[index].good_type_id
134
+      }, getName: function(id) {
135
+        if (id == 0) {
136
+          return ''
137
+        }
138
+
139
+        for (let i = 0; i < this.propForm.goodUnit.length; i++) {
140
+          if (this.propForm.goodUnit[i].id == id) {
141
+            return this.propForm.goodUnit[i].name
142
+          }
143
+        }
144
+      }, search: function() {
145
+        if (this.keywords.length <= 0) {
146
+          this.$message.error('搜索关键字不能为空')
147
+          return
148
+        }
149
+        const searchArr = []
150
+        for (let i = 0; i < this.goodInfoTableData.length; i++) {
151
+          if (this.goodInfoTableData[i].specification_name.indexOf(this.keywords) != -1) {
152
+            searchArr.push(this.goodInfoTableData[i])
153
+          }
154
+        }
155
+        this.goodInfoTableData = []
156
+        for (let i = 0; i < searchArr.length; i++) {
157
+          this.goodInfoTableData.push(searchArr[i])
158
+        }
159
+      }, changeGoodInfoTableData: function(val) {
160
+        this.multipleSelection = val
161
+      }, changeAllGoodInfoTableData: function(val) {
162
+        this.multipleSelection = val
163
+      }
8 164
     }
165
+  }
166
+
9 167
 </script>
10 168
 
11 169
 <style scoped>

+ 121 - 186
src/xt_pages/stock/Dialog/stockInDialog.vue Bestand weergeven

@@ -1,146 +1,83 @@
1 1
 <template>
2 2
   <el-dialog :title="propForm.title" :visible.sync="visibility" :show-close="isClose" :close-on-click-modal="isClose"
3
-             :close-on-press-escape="isClose" width="854px">
3
+             :close-on-press-escape="isClose">
4 4
 
5
-    <el-form  class="demo-form-inline" 
6
-              :rules="rules" :model="form" ref="form"
7
-             label-width="100px">
8
-    <el-row>
9
-      <el-col :span="8">
10
-        <el-form-item label="物品类型" prop="good_type_id">
11
-          <el-select v-model="form.good_type_id" placeholder="请选择"     @change="goodTypeSelect"
12
-          >
13
-            <el-option
14
-              v-for="item in tempGoodType"
15
-              :key="item.id"
16
-              :label="item.type_name"
17
-              :value="item.id">
18
-            </el-option>
19
-          </el-select>
20
-        </el-form-item>
21
-      </el-col>
22
-
23
-      <el-col :span="8">
24
-        <el-form-item label="规格名称" prop="good_id">
25
-          <el-select v-model="form.good_id" placeholder="请选择"  @change="goodInfoSelect">
26
-            <el-option
27
-              v-for="item in tempGoodInfo"
28
-
29
-              :key="item.id"
30
-              :label="item.specification_name"
31
-              :value="item.id">
32
-            </el-option>
33
-          </el-select>
34
-        </el-form-item>
35
-      </el-col>
36
-
37
-      <el-col :span="8">
38
-        <el-form-item label="批号" prop="number">
39
-          <el-input v-model="form.number"></el-input>
40
-        </el-form-item>
41
-      </el-col>
42
-    </el-row>
43
-    
44
-    <el-row>    
45
-      <el-col :span="8">
46
-        <el-form-item label="生产日期" prop="product_date">
47
-          <el-date-picker v-model="form.product_date" prefix-icon="el-icon-date" :editable="false"
48
-                          style="width: 173px;"
49
-                          type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
50
-                          value-format="yyyy-MM-dd"></el-date-picker>
51
-        </el-form-item>
52
-      </el-col>
5
+    <div class="filter-container">
6
+      <el-input style="width: 150px;" class="filter-item" placeholder="规格名称" v-model="keywords"/>
7
+      <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
8
+    </div>
53 9
 
10
+    <el-row :gutter="20">
54 11
       <el-col :span="8">
55
-
56
-        <el-form-item label="有效日期" prop="expiry_date">
57
-          <el-date-picker v-model="form.expiry_date" prefix-icon="el-icon-date" :editable="false"
58
-                          style="width: 173px;"
59
-                          type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
60
-                          value-format="yyyy-MM-dd"></el-date-picker>
61
-        </el-form-item>
62
-
63
-
64
-      </el-col>
65
-
66
-      <el-col :span="8">
67
-        <el-form-item label="入库数量" prop="warehousing_count">
68
-          <el-input type="number" v-model="form.warehousing_count"></el-input>
69
-        </el-form-item>
70
-      </el-col>
71
-    </el-row>
72
-    <el-row>        
73
-      <el-col :span="8">
74
-        <el-form-item label="物品单价" prop="price">
75
-          <el-input type="number"  v-model="form.price"></el-input>
76
-        </el-form-item>
12
+        <el-table
13
+          :data="propForm.goodType"
14
+          ref="templatetable"
15
+          border
16
+          highlight-current-row
17
+          max-height="250"
18
+          @current-change="goodTypeTableChange"
19
+          style="width: 100%">
20
+          <el-table-column
21
+            prop="type_name"
22
+            label="商品类型">
23
+          </el-table-column>
24
+        </el-table>
77 25
       </el-col>
26
+      <el-col :span="16">
27
+        <el-table
28
+          :data="goodInfoTableData"
29
+          border
30
+          ref="multipleTable"
31
+          max-height="250"
32
+          @selection-change="changeGoodInfoTableData"
33
+          @select-all="changeAllGoodInfoTableData"
34
+          row-key="row_key"
35
+          style="width: 100%"
36
+        >
37
+          <el-table-column
38
+            type="selection"
39
+            width="55">
40
+          </el-table-column>
41
+          <el-table-column
42
+            label="规格名称"
43
+            property="specification_name"
44
+            style="word-break: keep-all;white-space:nowrap;"
45
+          ></el-table-column>
46
+          <el-table-column
47
+            label="单位"
48
+            property="good_unit"
49
+          >
50
+            <template slot-scope="scope">
51
+              <span>{{getName(scope.row.good_unit)}}</span>
52
+            </template>
53
+          </el-table-column>
78 54
 
79
-      <el-col>
80
-        <el-form-item label="备注" prop="remark">
81
-          <el-input type="textarea" :row="5" v-model="form.remark"
82
-                    placeholder="请输入内容">
83
-          </el-input>
84
-        </el-form-item>
55
+        </el-table>
85 56
       </el-col>
86 57
     </el-row>
87
-    
88
-    </el-form>
89 58
 
90 59
 
91 60
     <span slot="footer" class="dialog-footer">
92
-    <el-button v-if="propForm.isCreated == 3" @click="cancle('form')">取 消</el-button>
93
-    <el-button v-if="propForm.isCreated != 3 " @click="cancle('form')">取 消</el-button>
94
-    <el-button v-if="propForm.isCreated != 3" type="primary" @click="comfirm('form')">保 存</el-button>
61
+    <el-button @click="cancle('form')">取 消</el-button>
62
+    <el-button type="primary" @click="comfirm('form')">确 定</el-button>
95 63
   </span>
96 64
   </el-dialog>
97 65
 
98 66
 </template>
99 67
 
100 68
 <script>
69
+  import { GetGoodInfoByGoodId } from '@/api/stock'
70
+
101 71
   export default {
102
-    name: "stockInDialog",
72
+    name: 'stockInDialog',
103 73
     data() {
104 74
       return {
105
-        form:{
106
-          good_type_id: '',
107
-          good_id: '',
108
-          number: '',
109
-          product_date: '',
110
-          expiry_date: '',
111
-          warehousing_count: '',
112
-          price: '',
113
-          remark: '',
114
-          dealer: '',
115
-          manufacturer: '',
116
-        },
117
-        tempGoodType: [],
118
-        tempGoodInfo: [],
119
-        isClose: false,
120
-        size: 11,
121
-        isShow: true,
122
-        rules: {
123
-          good_id: [
124
-            {required: true, message: '请选择物品类型', trigger: 'change'}
125
-          ],
126
-          good_type_id: [
127
-            {required: true, message: '请选择规格名称', trigger: 'change'}
128
-          ],
129
-          number: [
130
-            {required: true, message: '请输入批号', trigger: 'blur'}
131
-          ],
132
-          expiry_date: [
133
-            {required: true, message: '请选择日期', trigger: 'change'}
134
-          ],
135
-          warehousing_count: [
136
-            {required: true, message: '请选择入库数量', trigger: 'blur'}
137
-          ],
138
-          price: [
139
-            {required: true, message: '请选择物品单价', trigger: 'blur'}
140
-          ],
141
-
142
-
143
-        }
75
+        goodInfo: [],
76
+        goodInfoTableData: [],
77
+        keywords: '',
78
+        multipleSelection: [],
79
+        currentGoodTypeId: 0,
80
+        isClose: false
144 81
       }
145 82
     },
146 83
     props: {
@@ -150,90 +87,88 @@
150 87
       visibility: {
151 88
         type: Boolean,
152 89
         default: false
153
-      },
90
+      }
154 91
 
155 92
     },
156 93
     methods: {
157
-      cancle: function (formName) {
158
-        this.$emit('dialog-cancle', this.getValue());
159
-        this.$refs[formName].resetFields();
160
-      },
161
-      comfirm: function (formName) {
162
-        this.$refs[formName].validate((valid) => {
163
-          if (valid) {
164
-            this.$emit('dialog-comfirm', this.getValue());
165
-
166
-          }
167
-        });
168
-      },
169
-      getValue: function () {
170
-        let form = {}
171
-        form['good_type_id'] = this.form.good_type_id
172
-        form['good_id'] = this.form.good_id
173
-        form['number'] = this.form.number
174
-        form['product_date'] = this.form.product_date
175
-        form['expiry_date'] = this.form.expiry_date
176
-        form['warehousing_count'] = this.form.warehousing_count
177
-        form['price'] = this.form.price
178
-        if(this.form.remark == undefined){
179
-          form['remark'] = ""
180
-        }else{
181
-          form['remark'] = this.form.remark
94
+      goodTypeTableChange: function(currentRow, oldCurrentRow) {
95
+        this.currentGoodTypeId = currentRow.id
96
+        const params = {
97
+          id: currentRow.id
182 98
         }
183
-
184
-        console.log(form['remark'])
185
-        form['isCreated'] = this.propForm.isCreated
186
-        for(let i = 0; i <this.propForm.goodInfo.length; i++){
187
-
188
-          if(this.propForm.goodInfo[i].id == this.propForm.formValue.good_id){
189
-
190
-            form['dealer'] = this.propForm.goodInfo[i].dealer
191
-            form['manufacturer'] = this.propForm.goodInfo[i].manufacturer
99
+        this.goodInfoTableData = []
100
+        this.goodInfo = []
101
+        GetGoodInfoByGoodId(params).then(response => {
102
+          if (response.data.state == 0) {
103
+            this.$message.error(response.data.msg)
104
+            return false
105
+          } else {
106
+            for (let i = 0; i < response.data.data.list.length; i++) {
107
+              this.goodInfo.push(response.data.data.list[i])
108
+              this.goodInfoTableData.push(response.data.data.list[i])
109
+            }
192 110
           }
111
+        })
112
+      },
113
+      cancle: function(formName) {
114
+        this.$emit('dialog-cancle', this.getValue())
115
+        this.$refs.multipleTable.clearSelection()
116
+      },
117
+      comfirm: function(formName) {
118
+        this.$emit('dialog-comfirm', this.getValue())
119
+        this.$refs.multipleTable.clearSelection()
120
+      },
121
+      getValue: function() {
122
+        const obj = {
123
+          selectedGoodInfo: this.multipleSelection,
124
+          goodTypeId: this.currentGoodTypeId
193 125
         }
194
-
195
-
196
-        return form
197
-      }, goodTypeSelect: function (id) {
198
-
126
+        return obj
127
+      }, goodTypeSelect: function(id) {
199 128
         this.tempGoodInfo = []
129
+        this.goodInfo = []
200 130
         for (let i = 0; i < this.propForm.goodInfo.length; i++) {
201 131
           if (this.propForm.goodInfo[i].good_type_id == id) {
202 132
             this.tempGoodInfo.push(this.propForm.goodInfo[i])
203 133
           }
204 134
         }
205
-      }, goodInfoSelect: function (id) {
206
-        let index = 0;
135
+      }, goodInfoSelect: function(id) {
136
+        let index = 0
207 137
         for (let i = 0; i < this.propForm.goodInfo.length; i++) {
208 138
           if (this.propForm.goodInfo[i].id == id) {
209 139
             index = i
210 140
           }
211 141
         }
212 142
         this.form.good_type_id = this.propForm.goodInfo[index].good_type_id
213
-      }
214
-    },
215
-    watch: {
216
-      visibility(val) {
217
-        this.form = this.propForm.formValue
218
-        this.tempGoodInfo = this.propForm.goodInfo
219
-        this.tempGoodType = this.propForm.goodType
220
-        if(!val) {
221
-          this.form.good_type_id = ''
222
-          this.form.good_id = ''
223
-          this.form.number = ''
224
-          this.form.product_date = ''
225
-          this.form.expiry_date = ''
226
-          this.form.warehousing_count = ''
227
-          this.form.product_date = ''
228
-          this.form.price = ''
229
-          this.form.remark = ''
230
-
143
+      }, getName: function(id) {
144
+        if (id == 0) {
145
+          return ''
231 146
         }
232
-        !val && setTimeout(() => {
233
-          this.$refs['form'].resetFields();
234
-
235 147
 
236
-        }, 0);
148
+        for (let i = 0; i < this.propForm.goodUnit.length; i++) {
149
+          if (this.propForm.goodUnit[i].id == id) {
150
+            return this.propForm.goodUnit[i].name
151
+          }
152
+        }
153
+      }, search: function() {
154
+        if (this.keywords.length <= 0) {
155
+          this.$message.error('搜索关键字不能为空')
156
+          return
157
+        }
158
+        const searchArr = []
159
+        for (let i = 0; i < this.goodInfoTableData.length; i++) {
160
+          if (this.goodInfoTableData[i].specification_name.indexOf(this.keywords) != -1) {
161
+            searchArr.push(this.goodInfoTableData[i])
162
+          }
163
+        }
164
+        this.goodInfoTableData = []
165
+        for (let i = 0; i < searchArr.length; i++) {
166
+          this.goodInfoTableData.push(searchArr[i])
167
+        }
168
+      }, changeGoodInfoTableData: function(val) {
169
+        this.multipleSelection = val
170
+      }, changeAllGoodInfoTableData: function(val) {
171
+        this.multipleSelection = val
237 172
       }
238 173
     }
239 174
   }

+ 0 - 445
src/xt_pages/stock/addStockIn.vue Bestand weergeven

@@ -1,445 +0,0 @@
1
-<template>
2
-<div class="main-contain">
3
-    <div class="position">
4
-      <bread-crumb></bread-crumb>
5
-      <el-row style="float:right;">
6
-        <el-button size="small" icon="el-icon-refresh" @click="handleCancle" >返回</el-button>
7
-        <el-button size="small" icon="el-icon-circle-plus-outline"    @click="handleCreate" type="primary">添加</el-button>
8
-      </el-row>
9
-    </div>
10
-  <div class="app-container sign-and-weigh-box">
11
-    <stock-in-dialog :propForm="propForm"
12
-                     :visibility="isVisibility"
13
-                     v-on:dialog-comfirm="comfirm"
14
-                     v-on:dialog-cancle="cancle"></stock-in-dialog>
15
-
16
-    <div class="">
17
-      <div class="cell" style="float:left;">
18
-        <label class="title"><span class="name">入库时间:</span></label>
19
-        <el-date-picker v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
-                      value-format="yyyy-MM-dd"></el-date-picker>
22
-      </div>
23
-    </div>
24
-    <el-row>
25
-      <el-col>
26
-        <div class="titleTop">入库列表 </div>
27
-        <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
28
-        >
29
-          <el-table-column label="物品类型" min-width="30" align="center">
30
-            <template slot-scope="scope">
31
-              {{typeName(scope.row.good_type_id)}}
32
-            </template>
33
-          </el-table-column>
34
-          <el-table-column label="规格名称" min-width="30" align="center">
35
-            <template slot-scope="scope">
36
-              {{specificationName(scope.row.good_id)}}
37
-            </template>
38
-          </el-table-column>
39
-          <el-table-column label="批号" align="center" min-width="30">
40
-            <template slot-scope="scope">
41
-              {{scope.row.number}}
42
-
43
-            </template>
44
-          </el-table-column>
45
-          <el-table-column label="生产日期" min-width="30" align="center">
46
-            <template slot-scope="scope" v-if="scope.row.product_date != 0">
47
-              {{scope.row.product_date | parseTime("{y}-{m}-{d}")}}
48
-            </template>
49
-          </el-table-column>
50
-          <el-table-column label="有效日期" min-width="30" align="center">
51
-            <template slot-scope="scope">
52
-              {{ scope.row.expiry_date | parseTime("{y}-{m}-{d}")}}
53
-
54
-            </template>
55
-          </el-table-column>
56
-
57
-          <el-table-column label="入库数量" min-width="30" align="center">
58
-            <template slot-scope="scope">
59
-              {{scope.row.warehousing_count}}
60
-
61
-            </template>
62
-          </el-table-column>
63
-          <el-table-column label="入库单价" min-width="30" align="center">
64
-            <template slot-scope="scope">
65
-              {{scope.row.price}}
66
-            </template>
67
-          </el-table-column>
68
-          <el-table-column label="物品总价" min-width="30" align="center">
69
-            <template slot-scope="scope">
70
-              {{calculate(scope.row.price*scope.row.warehousing_count)}}
71
-            </template>
72
-          </el-table-column>
73
-          <el-table-column label="操作" align="center" min-width="70">
74
-            <template slot-scope="scope">
75
-              <el-button
76
-                size="mini"
77
-                @click="handleEdit(scope.$index, scope.row)">编辑
78
-              </el-button>
79
-              <el-button
80
-                size="mini"
81
-                type="danger"
82
-                @click="handleDelete(scope.$index, scope.row)">删除
83
-              </el-button>
84
-              <el-button
85
-                size="mini"
86
-                type="primary"
87
-                @click="showDetails(scope.$index, scope.row)">查看详情
88
-              </el-button>
89
-            </template>
90
-          </el-table-column>
91
-        </el-table>
92
-      </el-col>
93
-
94
-
95
-    </el-row>
96
-    </div>
97
-  </div>
98
-</template>
99
-
100
-<script>
101
-  import stockInDialog from './Dialog/stockInDialog'
102
-  import {uParseTime} from "@/utils/tools";
103
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
104
-
105
-  import {
106
-    GetAllGoodInfo,
107
-    GetAllGoodType,
108
-    postWarehouse,
109
-    getWarehouseInfoByOrdeNumber,
110
-    modifyWarehouseInfo,
111
-    deleteWarehouseInfo
112
-  } from "@/api/stock";
113
-
114
-  export default {
115
-    components: {stockInDialog,BreadCrumb},
116
-    name: "stockIn",
117
-
118
-    data() {
119
-      return {
120
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
121
-        warehousing_time: '',
122
-        adminUserOptions: null,
123
-
124
-        recordInfo: {
125
-          recordData: [],
126
-          stock_in_code: '',
127
-          current_index: '',
128
-          warehousing_order: '',
129
-
130
-        },
131
-        total: '',
132
-
133
-        //prop
134
-        isVisibility: false,
135
-        propForm: {
136
-          goodType: [],
137
-          goodInfo: [],
138
-          title: '入库',
139
-          formValue: {
140
-            good_type_id: '',
141
-            good_id: '',
142
-            number: '',
143
-            product_date: '',
144
-            expiry_date: '',
145
-            warehousing_count: '',
146
-            price: '',
147
-            remark: '',
148
-            dealer: '',
149
-            manufacturer: ''
150
-
151
-          },
152
-          isCreated: 1,
153
-
154
-        },
155
-
156
-        goodInfo: {
157
-          loading: false,
158
-          goodTypeData: [],
159
-          type_code: '',
160
-        }
161
-
162
-
163
-      };
164
-    },
165
-    methods: {
166
-      handleSave: function () {
167
-        if (this.recordInfo.recordData.length <= 0) {
168
-          this.$message.error('请添加入库信息');
169
-          return
170
-        }
171
-        sessionStorage.removeItem("warehousing_orders")
172
-        this.$router.back(-1)
173
-
174
-      }, handleCancle: function () {
175
-        this.$confirm('是否放弃编辑返回上一页?', '放弃编辑', {
176
-          confirmButtonText: '确定',
177
-          cancelButtonText: '取消',
178
-          type: 'warning'
179
-        }).then(() => {
180
-          sessionStorage.removeItem("warehousing_orders")
181
-          this.$router.back(-1)
182
-        }).catch(() => {
183
-
184
-        });
185
-
186
-      }, handleCreate: function () {
187
-        this.propForm.formValue = {}
188
-        this.propForm.isCreated = 1
189
-        this.isVisibility = true
190
-
191
-
192
-      }, comfirm: function (val) {
193
-        this.isVisibility = false
194
-        if (val.isCreated == 2) { //修改
195
-          val['warehousing_order'] = sessionStorage.getItem("warehousing_orders")
196
-          modifyWarehouseInfo(val).then(response => {
197
-            if (response.data.state == 0) {
198
-              this.$message.error(response.data.msg);
199
-              return false;
200
-            } else {
201
-              this.recordInfo.recordData[this.recordInfo.current_index].good_type_id = response.data.data.info.good_type_id
202
-              this.recordInfo.recordData[this.recordInfo.current_index].good_id = response.data.data.info.good_id
203
-              this.recordInfo.recordData[this.recordInfo.current_index].number = response.data.data.info.number
204
-              this.recordInfo.recordData[this.recordInfo.current_index].product_date = response.data.data.info.product_date
205
-              this.recordInfo.recordData[this.recordInfo.current_index].expiry_date = response.data.data.info.expiry_date
206
-              this.recordInfo.recordData[this.recordInfo.current_index].warehousing_count = response.data.data.info.warehousing_count
207
-              this.recordInfo.recordData[this.recordInfo.current_index].price = response.data.data.info.price
208
-              this.recordInfo.recordData[this.recordInfo.current_index].remark = response.data.data.info.remark
209
-              this.$notify({
210
-                title: "成功",
211
-                message: "修改成功",
212
-                type: "success",
213
-                duration: 2000
214
-              });
215
-            }
216
-          });
217
-
218
-
219
-        } else if (val.isCreated == 1) { //添加
220
-
221
-
222
-          if (sessionStorage.getItem("warehousing_orders") == null) {
223
-
224
-            this.warehousing_order = ''
225
-          } else {
226
-            this.warehousing_order = sessionStorage.getItem("warehousing_orders")
227
-          }
228
-          console.log(this.warehousing_order)
229
-          let tempArr = []
230
-          tempArr.push(val)
231
-          let params = {
232
-            'stockIn': tempArr
233
-          }
234
-          postWarehouse(params, this.warehousing_time, this.warehousing_order).then(response => {
235
-            if (response.data.state == 0) {
236
-              this.$message.error(response.data.msg);
237
-              return false;
238
-            } else {
239
-
240
-              this.$notify({
241
-                title: "成功",
242
-                message: "入库成功",
243
-                type: "success",
244
-                duration: 2000
245
-              });
246
-              this.recordInfo.recordData.push(response.data.data.info)
247
-
248
-
249
-              if (sessionStorage.getItem("warehousing_orders") == null) {
250
-                sessionStorage.setItem("warehousing_orders", response.data.data.warehousing_order)
251
-              }
252
-
253
-
254
-            }
255
-          });
256
-
257
-
258
-        }
259
-      }, cancle: function () {
260
-        this.isVisibility = false
261
-
262
-      }, GetAllGoodType: function () {
263
-        GetAllGoodType().then(response => {
264
-          if (response.data.state == 0) {
265
-            this.$message.error(response.data.msg);
266
-            return false;
267
-          } else {
268
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
269
-              this.propForm.goodType.push(response.data.data.goodType[i])
270
-            }
271
-          }
272
-        });
273
-
274
-
275
-      }, GetAllGoodInfo: function () {
276
-        GetAllGoodInfo().then(response => {
277
-          if (response.data.state == 0) {
278
-            this.$message.error(response.data.msg);
279
-            return false;
280
-          } else {
281
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
282
-              this.propForm.goodInfo.push(response.data.data.goodInfo[i])
283
-
284
-            }
285
-          }
286
-        });
287
-
288
-
289
-      }, typeName: function (good_type_id) {
290
-        let name = ''
291
-        for (let i = 0; i < this.propForm.goodType.length; i++) {
292
-          if (this.propForm.goodType[i].id == good_type_id) {
293
-            name = this.propForm.goodType[i].type_name
294
-          }
295
-        }
296
-        return name
297
-
298
-
299
-      }, specificationName: function (good_info_id) {
300
-        let name = ''
301
-        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
302
-          if (this.propForm.goodInfo[i].id == good_info_id) {
303
-            name = this.propForm.goodInfo[i].specification_name
304
-          }
305
-        }
306
-        return name
307
-      }, handleEdit: function (index, row) {
308
-        this.recordInfo.current_index = index
309
-        for (let key in this.propForm.formValue) {
310
-          this.propForm.formValue[key] = row[key]
311
-
312
-        }
313
-
314
-        this.propForm.formValue.expiry_date = uParseTime(row['expiry_date'], "{y}-{m}-{d}")
315
-        this.propForm.formValue.product_date = uParseTime(row['product_date'], "{y}-{m}-{d}")
316
-
317
-
318
-        this.propForm.isCreated = 2
319
-        this.isVisibility = true
320
-
321
-      }, handleDelete: function (index, row) {
322
-        let params = {
323
-          "id": row.id
324
-
325
-
326
-        }
327
-
328
-        this.$confirm('确认删除这条信息?', '删除物品信息', {
329
-          confirmButtonText: '确定',
330
-          cancelButtonText: '取消',
331
-          type: 'warning'
332
-        }).then(() => {
333
-          deleteWarehouseInfo(params).then(response => {
334
-            if (response.data.state == 0) {
335
-              this.$message.error(response.data.msg);
336
-              return false;
337
-            } else {
338
-              this.$notify({
339
-                title: "成功",
340
-                message: "删除成功",
341
-                type: "success",
342
-                duration: 2000
343
-              });
344
-              this.recordInfo.recordData.splice(index, 1)
345
-            }
346
-          });
347
-
348
-        }).catch(() => {
349
-        });
350
-
351
-      }, showDetails: function (index, row) {
352
-        for (let key in this.propForm.formValue) {
353
-          this.propForm.formValue[key] = row[key]
354
-        }
355
-        this.propForm.formValue.expiry_date = uParseTime(row['expiry_date'], "{y}-{m}-{d}")
356
-        this.propForm.formValue.product_date = uParseTime(row['product_date'], "{y}-{m}-{d}")
357
-
358
-        this.propForm.isCreated = 3
359
-        this.isVisibility = true
360
-
361
-      }, calculate: function (val) {
362
-        return Math.round(parseFloat(val) * 100) / 100
363
-      }, GetWarehouseInfoByOrdeNumber: function () {
364
-        let params = {
365
-          "warehousing_order": sessionStorage.getItem("warehousing_orders")
366
-        }
367
-        this.recordInfo.recordData = []
368
-        getWarehouseInfoByOrdeNumber(params).then(response => {
369
-          if (response.data.state != 0) {
370
-            for (let i = 0; i < response.data.data.info.length; i++) {
371
-              this.recordInfo.recordData.push(response.data.data.info[i])
372
-            }
373
-          }
374
-        });
375
-
376
-      },getTime(val,temp){
377
-        if(val != 0){
378
-          return uParseTime(val, temp);
379
-        }else{
380
-          return "";
381
-        }
382
-
383
-
384
-      }
385
-    },
386
-    created() {
387
-      var year = new Date().getFullYear();
388
-      var month = new Date().getMonth() + 1;
389
-      var day = new Date().getDate();
390
-      if (parseInt(month) < 10) {
391
-        month = "0" + month;
392
-      }
393
-      if (parseInt(day) < 10) {
394
-        day = "0" + day;
395
-      }
396
-      let endTime = year + '-' + month + '-' + day;
397
-      this.warehousing_time = endTime
398
-
399
-      this.GetAllGoodType()
400
-      this.GetAllGoodInfo()
401
-      this.GetWarehouseInfoByOrdeNumber()
402
-
403
-    },
404
-
405
-  };
406
-</script>
407
-
408
-<style rel="stylesheet/css" lang="scss" scoped>
409
-  .information {
410
-    border: 1px #dcdfe6 solid;
411
-    padding: 30px 20px 30px 20px;
412
-
413
-    .border {
414
-      border-bottom: 1px #dcdfe6 solid;
415
-      margin: 0px 0 20px 0;
416
-    }
417
-  }
418
-
419
-  .titleTop {
420
-    background: #409eff;
421
-    height: 44px;
422
-    line-height: 44px;
423
-    padding: 0 0 0 10px;
424
-    color: #fff;
425
-    margin: 0 0 10px 0;
426
-        font-size: 14px;
427
-  }
428
-  .edit_separater {
429
-    border-top: 1px solid rgb(233, 233, 233);
430
-    margin-top: 15px;
431
-    margin-bottom: 15px;
432
-  }
433
-
434
-</style>
435
-
436
-<style>
437
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
438
-    font-size: 12px;
439
-  }
440
-
441
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
442
-    background: #6fb5fa;
443
-  }
444
-
445
-</style>

+ 0 - 414
src/xt_pages/stock/addStockOut.vue Bestand weergeven

@@ -1,414 +0,0 @@
1
-<template>
2
-<div class="main-contain">
3
-  <div class="position">
4
-    <bread-crumb></bread-crumb>
5
-     <el-row style="float:right;">
6
-        <!--<el-button @click="handleSave" type="primary">保存</el-button>-->
7
-        <el-button size="small"  icon="el-icon-refresh" @click="handleCancle" >返回</el-button>
8
-        <el-button size="small"  icon="el-icon-circle-plus-outline" @click="handleCreate" type="primary">添加</el-button>
9
-      </el-row>
10
-  </div>
11
-  <div class="app-container sign-and-weigh-box">
12
-    <stock-out-dialog  :propForm="propForm"
13
-                      :visibility="isVisibility"
14
-                      v-on:dialog-comfirm="comfirm"
15
-                      v-on:dialog-cancle="cancle"></stock-out-dialog>
16
-
17
-    <div class="cell">
18
-      <label for="" class="title"> <span class="name">出库时间:</span></label>
19
-      <el-date-picker v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
-                      value-format="yyyy-MM-dd"></el-date-picker>
22
-    </div>
23
-
24
-    <el-row >
25
-      <el-col >
26
-        <div class="titleTop">出库列表
27
-        </div>
28
-        <div style="margin-bottom: 10px;">
29
-        </div>
30
-        <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
31
-        >
32
-          <el-table-column label="物品类型" min-width="30" align="center">
33
-            <template slot-scope="scope">
34
-              {{typeName(scope.row.good_type_id)}}
35
-            </template>
36
-          </el-table-column>
37
-          <el-table-column label="规格名称" min-width="30" align="center">
38
-            <template slot-scope="scope">
39
-              {{specificationName(scope.row.good_id)}}
40
-            </template>
41
-          </el-table-column>
42
-
43
-
44
-          <el-table-column label="出库数量" min-width="30" align="center">
45
-            <template slot-scope="scope">
46
-              {{scope.row.count}}
47
-
48
-            </template>
49
-          </el-table-column>
50
-
51
-          <el-table-column label="物品单价" min-width="30" align="center">
52
-            <template slot-scope="scope">
53
-              {{scope.row.price}}
54
-
55
-            </template>
56
-          </el-table-column>
57
-          <el-table-column label="物品总价" min-width="30" align="center">
58
-            <template slot-scope="scope">
59
-              {{calculate(scope.row.price*scope.row.count)}}
60
-            </template>
61
-          </el-table-column>
62
-          <el-table-column label="操作" align="center" min-width="70">
63
-            <template slot-scope="scope">
64
-              <el-button
65
-                size="mini"
66
-                @click="handleEdit(scope.$index, scope.row)">编辑
67
-              </el-button>
68
-              <el-button
69
-                size="mini"
70
-                type="danger"
71
-                @click="handleDelete(scope.$index, scope.row)">删除
72
-              </el-button>
73
-              <el-button
74
-                size="mini"
75
-                type="primary"
76
-                @click="showDetails(scope.$index, scope.row)">查看详情
77
-              </el-button>
78
-            </template>
79
-          </el-table-column>
80
-        </el-table>
81
-      </el-col>
82
-
83
-    </el-row>
84
-  </div>
85
-   </div>
86
-</template>
87
-
88
-<script>
89
-  import stockOutDialog from './Dialog/stockOutDialog'
90
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
91
-
92
-  import {
93
-    GetAllGoodInfo,
94
-    GetAllGoodType,
95
-    postWarehouseOut,
96
-    getWarehouseOutInfoByOrdeNumber,
97
-    modifyWarehouseOutInfo,
98
-    deleteWarehouseOutInfo
99
-  } from "@/api/stock";
100
-
101
-  export default {
102
-    components: {stockOutDialog,BreadCrumb},
103
-    name: "stockOut",
104
-    data() {
105
-      return {
106
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
107
-        warehousing_time: '',
108
-        adminUserOptions:null,
109
-        warehousing_out_order:'',
110
-        recordInfo: {
111
-          recordData: [],
112
-          stock_in_code: '',
113
-          current_index:'',
114
-
115
-        },
116
-        total:'',
117
-
118
-        //prop
119
-        isVisibility:false,
120
-        propForm:{
121
-          goodType:[],
122
-          goodInfo:[],
123
-          title:'出库',
124
-          formValue:{
125
-            good_type_id:'',
126
-            good_id:'',
127
-            product_date:'',
128
-            expiry_date:'',
129
-            count:'',
130
-            price:'',
131
-            remark:'',
132
-          },
133
-          isCreated:1,
134
-
135
-        },
136
-
137
-        goodInfo: {
138
-          loading: false,
139
-          goodTypeData: [],
140
-          type_code: '',
141
-        }
142
-
143
-
144
-
145
-      };
146
-    },
147
-    methods: {
148
-      handleSave:function () {
149
-
150
-
151
-      },handleCancle:function () {
152
-        this.$confirm('是否放弃编辑返回上一页?', '放弃编辑', {
153
-          confirmButtonText: '确定',
154
-          cancelButtonText: '取消',
155
-          type: 'warning'
156
-        }).then(() => {
157
-          this.recordInfo.recordData = []
158
-          sessionStorage.removeItem("warehousing_out_orders")
159
-
160
-
161
-          this.$router.back(-1)
162
-        }).catch(() => {
163
-
164
-        });
165
-
166
-      },handleCreate:function () {
167
-        this.propForm.formValue = {}
168
-        this.propForm.isCreated = 1
169
-        this.isVisibility = true
170
-
171
-
172
-      },comfirm:function (val) {
173
-        console.log(val)
174
-        this.isVisibility = false
175
-        if (val.isCreated == 2) { //修改
176
-
177
-          val['warehousing_out_orders'] = sessionStorage.getItem("warehousing_out_orders")
178
-          modifyWarehouseOutInfo(val).then(response => {
179
-            if (response.data.state == 0) {
180
-              this.$message.error(response.data.msg);
181
-              return false;
182
-            } else {
183
-              this.recordInfo.recordData[this.recordInfo.current_index].good_type_id = response.data.data.info.good_type_id
184
-              this.recordInfo.recordData[this.recordInfo.current_index].good_id = response.data.data.info.good_id
185
-              this.recordInfo.recordData[this.recordInfo.current_index].count = response.data.data.info.count
186
-              this.recordInfo.recordData[this.recordInfo.current_index].price = response.data.data.info.price
187
-              this.recordInfo.recordData[this.recordInfo.current_index].remark = response.data.data.info.remark
188
-
189
-              this.$notify({
190
-                title: "成功",
191
-                message: "修改成功",
192
-                type: "success",
193
-                duration: 2000
194
-              });
195
-            }
196
-          });
197
-
198
-
199
-
200
-        } else if (val.isCreated == 1) { //添加
201
-
202
-          console.log(sessionStorage.getItem("warehousing_out_orders"))
203
-
204
-          if ( sessionStorage.getItem("warehousing_out_orders") === "undefined" || sessionStorage.getItem("warehousing_out_orders") == null) {
205
-
206
-            this.warehousing_out_order = ''
207
-
208
-          } else {
209
-
210
-            this.warehousing_out_order = sessionStorage.getItem("warehousing_out_orders")
211
-          }
212
-
213
-          let tempArr = []
214
-          tempArr.push(val)
215
-          let params = {
216
-            'stockOut': tempArr
217
-          }
218
-          postWarehouseOut(params, this.warehousing_time, this.warehousing_out_order).then(response => {
219
-            if (response.data.state == 0) {
220
-              this.$message.error(response.data.msg);
221
-              return false;
222
-            } else {
223
-
224
-              this.$notify({
225
-                title: "成功",
226
-                message: "出库成功",
227
-                type: "success",
228
-                duration: 2000
229
-              });
230
-              this.recordInfo.recordData.push(response.data.data.info)
231
-
232
-              if ( sessionStorage.getItem("warehousing_out_orders") === "undefined" || sessionStorage.getItem("warehousing_out_orders") == null) {
233
-                sessionStorage.setItem("warehousing_out_orders", response.data.data.warehousing_out_order)
234
-              }
235
-
236
-
237
-            }
238
-          });
239
-
240
-
241
-          // this.recordInfo.recordData.push(val)
242
-        }
243
-      },cancle:function () {
244
-        this.isVisibility = false
245
-
246
-      },GetAllGoodType:function () {
247
-        GetAllGoodType().then(response => {
248
-          if (response.data.state == 0) {
249
-            this.$message.error(response.data.msg);
250
-            return false;
251
-          } else {
252
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
253
-              this.propForm.goodType.push(response.data.data.goodType[i])
254
-            }
255
-          }
256
-        });
257
-
258
-
259
-      },GetAllGoodInfo:function () {
260
-        GetAllGoodInfo().then(response => {
261
-          if (response.data.state == 0) {
262
-            this.$message.error(response.data.msg);
263
-            return false;
264
-          } else {
265
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
266
-              this.propForm.goodInfo.push(response.data.data.goodInfo[i])
267
-
268
-            }
269
-          }
270
-        });
271
-
272
-
273
-      },typeName:function (good_type_id) {
274
-        let name = ''
275
-        for(let i = 0; i < this.propForm.goodType.length; i++){
276
-          if(this.propForm.goodType[i].id == good_type_id){
277
-            name = this.propForm.goodType[i].type_name
278
-          }
279
-        }
280
-        return name
281
-
282
-
283
-      },specificationName:function (good_info_id) {
284
-        let name = ''
285
-        for(let i = 0; i < this.propForm.goodInfo.length; i++){
286
-          if(this.propForm.goodInfo[i].id == good_info_id){
287
-            name = this.propForm.goodInfo[i].specification_name
288
-          }
289
-        }
290
-        return name
291
-      },handleEdit:function (index, row) {
292
-        this.recordInfo.current_index = index
293
-        for(let key in this.propForm.formValue){
294
-          this.propForm.formValue[key] = row[key]
295
-        }
296
-        this.propForm.isCreated = 2
297
-        this.isVisibility = true
298
-
299
-      },handleDelete:function (index, row) {
300
-        console.log(row)
301
-        let params = {
302
-          "id":row.id
303
-        }
304
-
305
-        this.$confirm('确认删除这条信息?', '删除物品信息', {
306
-          confirmButtonText: '确定',
307
-          cancelButtonText: '取消',
308
-          type: 'warning'
309
-        }).then(() => {
310
-          deleteWarehouseOutInfo(params).then(response => {
311
-            if (response.data.state == 0) {
312
-              this.$message.error(response.data.msg);
313
-              return false;
314
-            } else {
315
-              this.$notify({
316
-                title: "成功",
317
-                message: "删除成功",
318
-                type: "success",
319
-                duration: 2000
320
-              });
321
-              this.recordInfo.recordData.splice(index, 1)
322
-            }
323
-          });
324
-        }).catch(() => {
325
-        });
326
-
327
-      },showDetails:function (index, row) {
328
-        for(let key in this.propForm.formValue){
329
-          this.propForm.formValue[key] = row[key]
330
-        }
331
-        this.propForm.isCreated = 3
332
-        this.isVisibility = true
333
-
334
-      },calculate:function (val) {
335
-        return Math.round(parseFloat(val)*100)/100
336
-      }, GetWarehouseOutInfoByOrdeNumber: function () {
337
-        let params = {
338
-          "warehousing_out_order": sessionStorage.getItem("warehousing_out_orders")
339
-        }
340
-        this.recordInfo.recordData = []
341
-        getWarehouseOutInfoByOrdeNumber(params).then(response => {
342
-          if (response.data.state != 0) {
343
-            for (let i = 0; i < response.data.data.info.length; i++) {
344
-              this.recordInfo.recordData.push(response.data.data.info[i])
345
-            }
346
-          }
347
-        });
348
-
349
-      }
350
-    },
351
-
352
-
353
-    created() {
354
-      var year = new Date().getFullYear();
355
-      var month = new Date().getMonth() + 1;
356
-      var day = new Date().getDate();
357
-      if (parseInt(month) < 10) {
358
-        month = "0" + month;
359
-      }
360
-      if (parseInt(day) < 10) {
361
-        day = "0" + day;
362
-      }
363
-      let endTime = year + '-' + month + '-' + day;
364
-      this.warehousing_time = endTime
365
-      this.GetAllGoodType()
366
-      this.GetAllGoodInfo()
367
-      this.GetWarehouseOutInfoByOrdeNumber()
368
-
369
-    }
370
-  };
371
-</script>
372
-
373
-<style rel="stylesheet/css" lang="scss" scoped>
374
-  .information {
375
-    border: 1px #dcdfe6 solid;
376
-    padding: 30px 20px 30px 20px;
377
-
378
-    .border {
379
-      border-bottom: 1px #dcdfe6 solid;
380
-      margin: 0px 0 20px 0;
381
-    }
382
-  }
383
-
384
-  .titleTop {
385
-    background: #409eff;
386
-    height: 44px;
387
-    line-height: 44px;
388
-    padding: 0 0 0 10px;
389
-    color: #fff;
390
-    margin: 0 0 10px 0;
391
-    // border-radius: 4px 4px 0 0;
392
-        font-size: 14px;
393
-  }
394
-
395
-  .edit_separater {
396
-    border-top: 1px solid rgb(233, 233, 233);
397
-    margin-top: 15px;
398
-    margin-bottom: 15px;
399
-  }
400
-
401
-</style>
402
-
403
-<style>
404
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
405
-    font-size: 12px;
406
-  }
407
-
408
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
409
-    background: #6fb5fa;
410
-  }
411
-
412
-
413
-
414
-</style>

+ 0 - 298
src/xt_pages/stock/cancelStock.vue Bestand weergeven

@@ -1,298 +0,0 @@
1
-<template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <div class="filter-container">
6
-      <span>出库退库时间:</span>
7
-      <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
8
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
9
-                      value-format="yyyy-MM-dd"></el-date-picker>
10
-
11
-      <el-row style="float:right;">
12
-        <el-button @click="handleSave" type="primary">确定</el-button>
13
-      </el-row>
14
-    </div>
15
-
16
-
17
-    <el-row>
18
-      <el-col>
19
-        <div class="title">出库退库列表</div>
20
-        <div style="margin-bottom: 10px;"></div>
21
-        <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="cancelStockTableData" :class="signAndWeighBoxPatients" style="width: 100%" border
22
-                  @row-click="onRowClick"
23
-                  :row-class-name="tableRowClassName"
24
-        >
25
-          <el-table-column label="出库单号" min-width="30" align="center">
26
-            <template slot-scope="scope">
27
-              {{scope.row.warehouse_out_order_number}}
28
-            </template>
29
-          </el-table-column>
30
-
31
-          <el-table-column label="规格名称" align="center" min-width="30">
32
-            <template slot-scope="scope">
33
-              {{getSpecificationName(scope.row.good_id)}}
34
-
35
-            </template>
36
-          </el-table-column>
37
-          <el-table-column label="物品类型" min-width="30" align="center">
38
-            <template slot-scope="scope">
39
-              {{getTypeName(scope.row.good_type_id)}}
40
-
41
-            </template>
42
-          </el-table-column>
43
-          <el-table-column label="出库数量" min-width="30" align="center">
44
-            <template slot-scope="scope">
45
-              {{scope.row.warehouse_out_count}}
46
-
47
-            </template>
48
-          </el-table-column>
49
-
50
-          <el-table-column label="出库单价" min-width="30" align="center">
51
-            <template slot-scope="scope">
52
-              {{scope.row.price}}
53
-
54
-            </template>
55
-          </el-table-column>
56
-
57
-          <el-table-column label="退库数量" min-width="30" align="center">
58
-            <template slot-scope="scope">
59
-              <el-input type="number" v-model="scope.row.return_count" @blur="handleBlur(scope.$index, scope.row)"></el-input>
60
-            </template>
61
-          </el-table-column>
62
-
63
-          <el-table-column label="操作" align="center" min-width="30">
64
-            <template slot-scope="scope">
65
-              <el-button
66
-                size="mini"
67
-                type="danger"
68
-                @click="handleDelete(scope.$index, scope.row)">删除
69
-              </el-button>
70
-
71
-            </template>
72
-          </el-table-column>
73
-        </el-table>
74
-      </el-col>
75
-
76
-    </el-row>
77
-
78
-  </div>
79
-</template>
80
-
81
-<script>
82
-  import {uParseTime} from "@/utils/tools";
83
-
84
-  import {
85
-    GetAllGoodInfo,
86
-    GetAllGoodType,
87
-    postCancelStock,
88
-    getWarehouseOutInfo
89
-
90
-  } from "@/api/stock";
91
-
92
-  export default {
93
-    name: "cancelStock",
94
-    data() {
95
-      return {
96
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
97
-        return_time: '',
98
-        adminUserOptions: null,
99
-        cancelStockTableData: [],
100
-        total: '',
101
-        isVisibility: false,
102
-        goodInfo: [],
103
-        goodType: [],
104
-        isClick: false,
105
-        orderNumber:'',
106
-      };
107
-    },
108
-    methods: {
109
-      GetWarehouse:function () {
110
-        let params ={
111
-          ids:this.$route.query.id
112
-        }
113
-        getWarehouseOutInfo(params).then(response =>{
114
-          if(response.data.state == 0){
115
-            this.$message.error(response.data.msg)
116
-            return false
117
-          }else{
118
-            this.cancelStockTableData = []
119
-            for (let i = 0; i < response.data.data.info.length; i++) {
120
-              let salesReturnInfo = {}
121
-              this.orderNumber = response.data.data.info[i].WarehouseOut.warehouse_out_order_number
122
-              salesReturnInfo['id'] = response.data.data.info[i].id
123
-              salesReturnInfo['warehouse_out_order_number'] = response.data.data.info[i].WarehouseOut.warehouse_out_order_number
124
-              salesReturnInfo['good_id'] = response.data.data.info[i].good_id
125
-              salesReturnInfo['good_type_id'] = response.data.data.info[i].good_type_id
126
-              salesReturnInfo['warehouse_out_count'] = response.data.data.info[i].count
127
-              salesReturnInfo['price'] = response.data.data.info[i].price
128
-              salesReturnInfo['return_count'] = ''
129
-              salesReturnInfo['return_total'] = ''
130
-              this.cancelStockTableData.push(salesReturnInfo)
131
-            }
132
-
133
-          }
134
-        })
135
-      },
136
-      GetAllGoodType: function () {
137
-        GetAllGoodType().then(response => {
138
-          if (response.data.state == 0) {
139
-            this.$message.error(response.data.msg);
140
-            return false;
141
-          } else {
142
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
143
-              this.goodType.push(response.data.data.goodType[i])
144
-            }
145
-          }
146
-        });
147
-
148
-
149
-      }, GetAllGoodInfo: function () {
150
-        GetAllGoodInfo().then(response => {
151
-          if (response.data.state == 0) {
152
-            this.$message.error(response.data.msg);
153
-            return false;
154
-          } else {
155
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
156
-              this.goodInfo.push(response.data.data.goodInfo[i])
157
-            }
158
-          }
159
-        });
160
-
161
-      }, getSpecificationName: function (id) {
162
-        let name = ''
163
-        for (let i = 0; i < this.goodInfo.length; i++) {
164
-          if (this.goodInfo[i].id == id) {
165
-            name = this.goodInfo[i].specification_name
166
-          }
167
-
168
-        }
169
-
170
-        return name
171
-
172
-      }, getTypeName: function (id) {
173
-        let name = ''
174
-        for (let i = 0; i < this.goodType.length; i++) {
175
-          if (this.goodType[i].id == id) {
176
-            name = this.goodType[i].type_name
177
-          }
178
-        }
179
-        return name
180
-      }, handleDelete: function (index, row) {
181
-        this.$confirm('确认删除这条退货信息?', '删除退货信息', {
182
-          confirmButtonText: '确定',
183
-          cancelButtonText: '取消',
184
-          type: 'warning'
185
-        }).then(() => {
186
-          this.cancelStockTableData.splice(index, 1)
187
-        }).catch(() => {
188
-        });
189
-
190
-      }, handleBlur: function (index, row) {
191
-        if (this.cancelStockTableData[index].return_count == '') {
192
-          this.$message.error('退货数量不能为空');
193
-          return
194
-        }
195
-        // if (this.salesReturnTableData[index].return_count > this.salesReturnTableData[index].warehousing_count) {
196
-        //   this.salesReturnTableData[index].return_count = ''
197
-        //   this.$message.error('退货数量不能大于入库数量');
198
-        //   return
199
-        // }
200
-      }, handleSave: function () {
201
-        let total = 0
202
-        let ids = []
203
-        for (let i = 0; i < this.cancelStockTableData.length; i++) {
204
-          // if (this.salesReturnTableData[i].return_count > this.salesReturnTableData[i].warehousing_count) {
205
-          //   this.$message.error('退货数量不能大于入库数量');
206
-          //   return
207
-          // }
208
-          if (this.cancelStockTableData[i].return_count == '') {
209
-            this.$message.error('退货数量不能为空');
210
-            return
211
-          }
212
-          ids.push(this.cancelStockTableData[i].id)
213
-          total = total + parseInt(this.cancelStockTableData[i].return_count)
214
-        }
215
-
216
-        let params = {
217
-          'cancelStock':this.cancelStockTableData
218
-        }
219
-        postCancelStock(params,this.return_time,total,ids.join("-"),this.orderNumber).then(response=>{
220
-          if (response.data.state==0) {
221
-            this.$message.error(response.data.msg);
222
-            return false;
223
-          }else {
224
-            this.$notify({
225
-              title: "成功",
226
-              message: "退库成功",
227
-              type: "success",
228
-              duration: 2000
229
-            });
230
-            this.$router.back(-1)
231
-          }
232
-        });
233
-
234
-      }
235
-
236
-    },
237
-    mounted() {
238
-      var year = new Date().getFullYear();
239
-      var month = new Date().getMonth() + 1;
240
-      var day = new Date().getDate();
241
-      if (parseInt(month) < 10) {
242
-        month = "0" + month;
243
-      }
244
-      if (parseInt(day) < 10) {
245
-        day = "0" + day;
246
-      }
247
-      let endTime = year + '-' + month + '-' + day;
248
-      this.return_time = endTime
249
-
250
-      this.GetAllGoodType()
251
-      this.GetAllGoodInfo()
252
-      this.GetWarehouse()
253
-
254
-    },
255
-
256
-
257
-  };
258
-</script>
259
-
260
-<style rel="stylesheet/css" lang="scss" scoped>
261
-  .information {
262
-    border: 1px #dcdfe6 solid;
263
-    padding: 30px 20px 30px 20px;
264
-
265
-    .border {
266
-      border-bottom: 1px #dcdfe6 solid;
267
-      margin: 0px 0 20px 0;
268
-    }
269
-  }
270
-
271
-  .title {
272
-    background: #409eff;
273
-    height: 44px;
274
-    line-height: 44px;
275
-    padding: 0 0 0 10px;
276
-    color: #fff;
277
-    margin: 0 0 10px 0;
278
-    // border-radius: 4px 4px 0 0;
279
-  }
280
-
281
-  .edit_separater {
282
-    border-top: 1px solid rgb(233, 233, 233);
283
-    margin-top: 15px;
284
-    margin-bottom: 15px;
285
-  }
286
-
287
-</style>
288
-
289
-<style>
290
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
291
-    font-size: 12px;
292
-  }
293
-
294
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
295
-    background: #6fb5fa;
296
-  }
297
-
298
-</style>

+ 126 - 127
src/xt_pages/stock/cancelStockOrder.vue Bestand weergeven

@@ -1,131 +1,135 @@
1 1
 <template>
2 2
 
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-
6
-    <div class="filter-container">
7
-
8
-
9
-      <el-row style="float:right;">
10
-        <el-button @click="AddNewOrder" type="primary">新增</el-button>
11
-      </el-row>
3
+  <div class="main-contain">
4
+    <div class="position">
5
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
6
+      <el-button size="small" @click="AddNewOrder" class="filter-item" style="float:right;" type="primary"
7
+                 icon="el-icon-circle-plus-outline">新增
8
+      </el-button>
12 9
     </div>
13 10
 
14
-    <div class="filter-container" style="margin-top:20px">
15
-      <el-input style="width: 300px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
16
-      <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
17
-    </div>
18
-
19
-    <div class="filter-container">
20
-      <span>入库时间:</span>
21
-      <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
-                      value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
24
-      <span class="">-</span>
25
-      <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
26
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
-                      value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
28
-    </div>
29
-
30
-    <div class="filter-container" style="margin-top: 10px">
31
-      <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
32
-      <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
11
+    <div class="app-container">
12
+
13
+
14
+      <div class="cell" style="margin-top:20px">
15
+        <el-input style="width: 300px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
16
+        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
17
+      </div>
18
+
19
+      <div class="cell">
20
+        <label class="title"><span class="name">退库时间</span> : </label>
21
+        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
+                        value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
24
+        <span class="">-</span>
25
+        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
26
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
+                        value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
28
+      </div>
29
+
30
+      <div class="filter-container" style="margin-top: 10px">
31
+        <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
32
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
33
+
34
+      </div>
35
+
36
+      <el-row :gutter="12" style="margin-top: 10px">
37
+        <el-table
38
+          :data="cancelStockDate"
39
+          :class="signAndWeighBoxPatients"
40
+          style="width: 100%" border
41
+          highlight-current-row
42
+          ref="multipleTable"
43
+          @selection-change="select"
44
+          :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
45
+
46
+        >
47
+          <el-table-column
48
+            type="selection"
49
+            width="55">
50
+          </el-table-column>
51
+
52
+          <el-table-column label="单据日期" align="center">
53
+            <template slot-scope="scope">
54
+              {{ scope.row.return_time | parseTime('{y}-{m}-{d}')}}
55
+            </template>
56
+          </el-table-column>
57
+
58
+          <el-table-column label="单据编号" align="center">
59
+            <template slot-scope="scope">
60
+              {{scope.row.order_number}}
61
+            </template>
62
+          </el-table-column>
63
+
64
+          <el-table-column label="制单人" align="center">
65
+            <template slot-scope="scope">
66
+              {{getXuserName(scope.row.creater)}}
67
+            </template>
68
+          </el-table-column>
69
+
70
+
71
+          <el-table-column label="厂家" align="center">
72
+            <template slot-scope="scope">
73
+              {{getManufactuerName(scope.row.manufacturer)}}
74
+            </template>
75
+          </el-table-column>
76
+
77
+          <el-table-column label="经销商" align="center">
78
+            <template slot-scope="scope">
79
+              {{getDealerName(scope.row.dealer)}}
80
+            </template>
81
+          </el-table-column>
82
+
83
+          <el-table-column label="操作" align="center">
84
+
85
+            <template slot-scope="scope">
86
+              <el-tooltip class="item" effect="dark" content="编辑" placement="top">
87
+                <el-button
88
+                  size="mini"
89
+                  type="primary"
90
+                  icon="el-icon-edit"
91
+                  @click="handleEdit(scope.$index, scope.row)">
92
+                </el-button>
93
+              </el-tooltip>
94
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
95
+                <el-button
96
+                  size="mini"
97
+                  type="danger"
98
+                  icon="el-icon-delete"
99
+                  @click="handleDelete(scope.$index, scope.row)">
100
+                </el-button>
101
+              </el-tooltip>
102
+
103
+            </template>
104
+          </el-table-column>
105
+
106
+        </el-table>
107
+
108
+        <el-pagination
109
+          @size-change="handleSizeChange"
110
+          @current-change="handleCurrentChange"
111
+          :page-sizes="[7]"
112
+          :page-size="7"
113
+          background
114
+          style="margin-top:20px;float: right"
115
+          layout="total, sizes, prev, pager, next, jumper"
116
+          :total="total">
117
+        </el-pagination>
33 118
 
119
+      </el-row>
34 120
     </div>
35
-
36
-    <el-row :gutter="12" style="margin-top: 10px">
37
-      <el-table
38
-        :data="cancelStockDate"
39
-        :class="signAndWeighBoxPatients"
40
-        style="width: 100%" border
41
-        highlight-current-row
42
-        ref="multipleTable"
43
-        @selection-change="select"
44
-
45
-      >
46
-        <el-table-column
47
-          type="selection"
48
-          width="55">
49
-        </el-table-column>
50
-
51
-        <el-table-column label="单据日期" align="center">
52
-          <template slot-scope="scope">
53
-            {{ scope.row.return_time | parseTime('{y}-{m}-{d}')}}
54
-          </template>
55
-        </el-table-column>
56
-
57
-        <el-table-column label="单据编号" align="center">
58
-          <template slot-scope="scope">
59
-            {{scope.row.order_number}}
60
-          </template>
61
-        </el-table-column>
62
-
63
-        <el-table-column label="制单人" align="center">
64
-          <template slot-scope="scope">
65
-            {{getXuserName(scope.row.creater)}}
66
-          </template>
67
-        </el-table-column>
68
-
69
-
70
-        <el-table-column label="厂家" align="center">
71
-          <template slot-scope="scope">
72
-            {{getManufactuerName(scope.row.manufacturer)}}
73
-          </template>
74
-        </el-table-column>
75
-
76
-        <el-table-column label="经销商" align="center">
77
-          <template slot-scope="scope">
78
-            {{getDealerName(scope.row.dealer)}}
79
-          </template>
80
-        </el-table-column>
81
-
82
-        <el-table-column label="操作" align="center">
83
-          <template slot-scope="scope">
84
-            <el-button
85
-              size="mini"
86
-              type="primary"
87
-              icon="el-icon-edit"
88
-              @click="handleEdit(scope.$index, scope.row)">
89
-            </el-button>
90
-
91
-            <el-button
92
-              size="mini"
93
-              type="danger"
94
-              icon="el-icon-delete"
95
-              @click="handleDelete(scope.$index, scope.row)">
96
-            </el-button>
97
-
98
-          </template>
99
-        </el-table-column>
100
-
101
-      </el-table>
102
-
103
-      <el-pagination
104
-        @size-change="handleSizeChange"
105
-        @current-change="handleCurrentChange"
106
-        :page-sizes="[7]"
107
-        :page-size="7"
108
-        background
109
-        style="margin-top:20px;float: right"
110
-        layout="total, sizes, prev, pager, next, jumper"
111
-        :total="total">
112
-      </el-pagination>
113
-
114
-    </el-row>
115 121
   </div>
116 122
 </template>
117 123
 
118 124
 <script>
119 125
   import { uParseTime } from '@/utils/tools'
120 126
   import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
121
-  import {
122
-    deleteCancelStock,
123
-    GetAllConfig,
124
-    getCancelStockList,
125
-  } from '@/api/stock'
127
+  import { deleteCancelStock, GetAllConfig, getCancelStockList } from '@/api/stock'
128
+  import BreadCrumb from '../components/bread-crumb'
126 129
 
127 130
   export default {
128 131
     name: 'salesReturnOrder',
132
+    components: { BreadCrumb },
129 133
     created() {
130 134
       var year = new Date().getFullYear()
131 135
       var month = new Date().getMonth() + 1
@@ -156,7 +160,11 @@
156 160
     },
157 161
     data() {
158 162
       return {
159
-        type:1,
163
+        crumbs: [
164
+          { path: false, name: '库存管理' },
165
+          { path: '/stock/cancel', name: '出库退库单' }
166
+        ],
167
+        type: 1,
160 168
         page: 1,
161 169
         limit: 7,
162 170
         checked: false,
@@ -173,13 +181,13 @@
173 181
         goodInfo: [],
174 182
         manufacturer: [],
175 183
         selectedTableData: [],
176
-        dealer: [],
184
+        dealer: []
177 185
 
178 186
       }
179 187
     },
180 188
     methods: {
181
-      AddNewOrder:function(){
182
-        this.$router.push({ name: 'cancelStockOrderAdd'})
189
+      AddNewOrder: function() {
190
+        this.$router.push({ name: 'cancelStockOrderAdd', query: { type: this.type }})
183 191
       },
184 192
       GetCancelStock: function() {
185 193
         const Params = {
@@ -187,7 +195,7 @@
187 195
           limit: this.limit,
188 196
           start_time: this.start_time,
189 197
           end_time: this.end_time,
190
-          type: this.type,
198
+          type: this.type
191 199
         }
192 200
         this.cancelStockDate = []
193 201
         getCancelStockList(Params).then(response => {
@@ -373,15 +381,6 @@
373 381
 
374 382
   }
375 383
 
376
-  .title {
377
-    background: #409eff;
378
-    height: 44px;
379
-    line-height: 44px;
380
-    padding: 0 0 0 10px;
381
-    color: #fff;
382
-    margin: 0 0 10px 0;
383
-
384
-  }
385 384
 
386 385
   .edit_separater {
387 386
     border-top: 1px solid rgb(233, 233, 233);

+ 102 - 109
src/xt_pages/stock/cancelStockOrderAdd.vue Bestand weergeven

@@ -1,6 +1,14 @@
1 1
 <template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <div style="float:right;">
6
+        <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
7
+        <el-button size="small"  type="primary" @click="submit()" class="filter-item" >确 定</el-button>
8
+      </div>
9
+    </div>
2 10
 
3
-  <div class="app-container sign-and-weigh-box">
11
+  <div class="app-container">
4 12
 
5 13
     <sales-return-dialog :propForm="propForm"
6 14
                          :visibility="isVisibility"
@@ -9,61 +17,46 @@
9 17
 
10 18
     <div class="filter-container">
11 19
 
12
-      <el-row>
13
-        <el-col :span="8"><div>
14
-          <span>退货时间:</span>
20
+
21
+        <div class="cell">
22
+          <label class="title"><span class="name">退库时间</span> : </label>
23
+
15 24
           <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16 25
                           type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17 26
                           value-format="yyyy-MM-dd"></el-date-picker>
18
-        </div></el-col>
19
-
20
-
21
-        <el-col :span="8">
22
-          <div>
23
-            <el-form ref="form" :model="form" :rules="ruleForm" label-width="80px">
24
-              <el-form-item label="厂商:" prop="manufacturer">
25
-                <el-select v-model="form.manufacturer" placeholder="请选择厂商">
26
-                  <el-option v-for="(option, index) in manufacturer" :key="index" :label="option.manufacturer_name" :value="option.id"></el-option>
27
-                </el-select>
28
-              </el-form-item>
29
-            </el-form>
30
-          </div>
31
-        </el-col>
32
-        <el-col :span="8">
33
-          <div>
34
-            <el-form ref="form" :model="form" label-width="80px">
35
-              <el-form-item label="经销商:">
36
-                <el-select v-model="form.dealer" placeholder="请选择经销商">
37
-                  <el-option v-for="(option, index) in dealer" :key="index" :label="option.dealer_name" :value="option.id"></el-option>
38
-                </el-select>
39
-              </el-form-item>
40
-            </el-form>
41
-          </div>
42
-        </el-col>
43
-      </el-row>
27
+        </div>
28
+        <div class="cell clearfix">
29
+          <label class="title"><span class="name">厂商</span> : </label>
30
+          <el-select  v-model="form.manufacturer" clearable  placeholder="请选择厂商" >
31
+            <el-option
32
+              v-for="(option, index) in manufacturer"
33
+              :key="index"
34
+              :label="option.manufacturer_name"
35
+              :value="option.id">
36
+            </el-option>
37
+          </el-select>
38
+        </div>
39
+
40
+        <div class="cell clearfix">
41
+          <label class="title"><span class="name">经销商</span> : </label>
42
+          <el-select  v-model="form.dealer" clearable  placeholder="请选择经销商" >
43
+            <el-option
44
+              v-for="(option, index) in dealer"
45
+              :key="index"
46
+              :label="option.dealer_name"
47
+              :value="option.id">
48
+            </el-option>
49
+          </el-select>
50
+        </div>
51
+
44 52
 
45 53
     </div>
46 54
 
47
-    <el-row>
48
-      <el-col>
49 55
         <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
50 56
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
51
-                    max-height="450"
52
-          >
57
+                    max-height="450"         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
53 58
 
54
-            <el-table-column label="操作" align="center" min-width="30">
55
-              <template slot-scope="scope">
56
-                <el-button
57
-                  size="mini"
58
-                  @click="handleEdit(scope.$index, scope.row)">+
59
-                </el-button>
60
-                <el-button
61
-                  size="mini"
62
-                  type="danger"
63
-                  @click="handleDelete(scope.$index, scope.row)">-
64
-                </el-button>
65
-              </template>
66
-            </el-table-column>
59
+          >
67 60
 
68 61
             <el-table-column min-width="35" align="center">
69 62
 
@@ -86,40 +79,49 @@
86 79
                 <span>规格名称<span style="color: red">*</span></span>
87 80
               </template>
88 81
               <template slot-scope="scope">
89
-
90 82
                 <el-form-item  style="padding-top: 15px">
91 83
                   <el-input placeholder="请输入规格名称"  v-model="scope.row.good_id" :value="specificationName(scope.row.good_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
92 84
                 </el-form-item>
93
-
94 85
               </template>
95 86
             </el-table-column>
96 87
 
97
-
98 88
             <el-table-column  min-width="23" align="center">
99 89
               <template slot="header" slot-scope="scope">
100 90
                 <span>退库数量<span style="color: red">*</span></span>
101 91
               </template>
102 92
               <template slot-scope="scope">
103
-                <!--{{scope.row.warehousing_count}}-->
104
-                <!--<el-input type="number" v-model="scope.row.warehousing_count"   @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
105
-
106 93
                 <el-form-item :prop="'recordData.' + scope.$index + '.return_count'" :rules='tableRules.return_count' style="padding-top: 17px">
107
-                  <el-input type="number"  v-model="scope.row.return_count" ></el-input>
94
+                  <el-input placeholder="请输入退库数量" type="number"  v-model="scope.row.return_count" ></el-input>
108 95
                 </el-form-item>
109 96
               </template>
110 97
             </el-table-column>
98
+            <el-table-column label="操作" align="center" min-width="20">
99
+              <template slot-scope="scope">
100
+                <el-tooltip class="item" effect="dark" content="新增" placement="top">
101
+
102
+                  <el-button
103
+                    size="mini"
104
+                    type="primary"
105
+                    icon="el-icon-circle-plus-outline"
106
+                    @click="handleEdit(scope.$index, scope.row)">
107
+                  </el-button>
108
+                </el-tooltip>
109
+                <el-tooltip class="item" effect="dark" content="删除" placement="top">
110
+
111
+                  <el-button
112
+                    size="mini"
113
+                    type="danger"
114
+                    icon="el-icon-remove-outline"
115
+                    @click="handleDelete(scope.$index, scope.row)">
116
+                  </el-button>
117
+                </el-tooltip>
111 118
 
119
+              </template>
120
+            </el-table-column>
112 121
           </el-table>
113 122
         </el-form>
114
-      </el-col>
115
-
116 123
 
117
-      <span  class="dialog-footer" style="margin-top: 20px;float:right">
118
-        <el-button @click="back()">取 消</el-button>
119
-        <el-button type="primary" @click="submit()">确 定</el-button>
120
-      </span>
121
-
122
-    </el-row>
124
+  </div>
123 125
   </div>
124 126
 </template>
125 127
 
@@ -127,27 +129,34 @@
127 129
   import { uParseTime } from '@/utils/tools'
128 130
   import {
129 131
     getCancelStockConfig,
130
-    postCancelStock,
132
+    postCancelStock
131 133
   } from '@/api/stock'
132 134
   import SalesReturnDialog from './Dialog/salesReturnDialog'
135
+  import BreadCrumb from '../components/bread-crumb'
133 136
 
134 137
   export default {
135
-    components: { SalesReturnDialog},
138
+    components: { BreadCrumb, SalesReturnDialog },
136 139
     name: 'salesReturnOrderAdd',
137 140
 
138 141
     data() {
139 142
       return {
140
-        type:2,
143
+        crumbs: [
144
+          { path: false, name: '库存管理' },
145
+          { path: '/stock/return', name: '退库单' },
146
+          { path: '/stock/return/add', name: '新增退库单' }
147
+        ],
148
+
149
+        type: this.$route.query.type,
141 150
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
142 151
         return_time: '',
143 152
         currentIndex: 0,
144 153
         recordInfo: {
145
-          recordData: [],
154
+          recordData: []
146 155
         },
147 156
         tableRules: {
148 157
           return_count: [
149 158
             { required: true, message: '数量不能为空', trigge: 'blur' }
150
-          ],
159
+          ]
151 160
         },
152 161
         ruleForm: {
153 162
           manufacturer: [
@@ -160,7 +169,7 @@
160 169
         propForm: {
161 170
           goodType: [],
162 171
           goodInfo: [],
163
-          goodUnit: [],
172
+          goodUnit: []
164 173
         },
165 174
         form: {
166 175
           manufacturer: '',
@@ -194,38 +203,39 @@
194 203
       }, cancle: function() {
195 204
         this.isVisibility = false
196 205
       }, GetConfigInfo: function() {
197
-        getCancelStockConfig().then(response => {
206
+        const params = {
207
+          type: this.$route.query.type
208
+        }
209
+        getCancelStockConfig(params).then(response => {
198 210
           if (response.data.state == 0) {
199 211
             this.$message.error(response.data.msg)
200 212
             return false
201 213
           } else {
202
-            var warehouseOutList =  response.data.data.warehouseOutList
203
-            var warehouseOutInfoList =  response.data.data.warehouseOutInfoList
204
-            for (let i = 0; i <warehouseOutList.length; i++ ){
205
-              if(warehouseOutList[i].Manufacturer.id > 0){
214
+            var warehouseOutList = response.data.data.warehouseOutList
215
+            var warehouseOutInfoList = response.data.data.warehouseOutInfoList
216
+            for (let i = 0; i < warehouseOutList.length; i++) {
217
+              if (warehouseOutList[i].Manufacturer.id > 0) {
206 218
                 this.manufacturer.push(warehouseOutList[i].Manufacturer)
207 219
               }
208
-              if(warehouseOutList[i].Dealer.id > 0){
220
+              if (warehouseOutList[i].Dealer.id > 0) {
209 221
                 this.dealer.push(warehouseOutList[i].Dealer)
210 222
               }
211 223
             }
212 224
 
213 225
             for (let i = 0; i < warehouseOutInfoList.length; i++) {
214 226
               this.propForm.goodInfo.push(warehouseOutInfoList[i].GoodInfo)
215
-
216 227
             }
217 228
 
218
-
219 229
             const obj = {}
220 230
             const obj2 = {}
221 231
             const obj4 = {}
222
-            //去重复
223
-            this.manufacturer =  this.manufacturer.reduce((cur, next) => {
232
+            // 去重复
233
+            this.manufacturer = this.manufacturer.reduce((cur, next) => {
224 234
               obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
225 235
               return cur
226 236
             }, [])
227
-            //去重复
228
-            this.dealer =  this.dealer.reduce((cur, next) => {
237
+            // 去重复
238
+            this.dealer = this.dealer.reduce((cur, next) => {
229 239
               obj2[next.id] ? '' : obj2[next.id] = true && cur.push(next)
230 240
               return cur
231 241
             }, [])
@@ -233,8 +243,6 @@
233 243
               obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
234 244
               return cur
235 245
             }, [])
236
-
237
-
238 246
           }
239 247
         })
240 248
       }, typeName: function(good_type_id) {
@@ -262,7 +270,6 @@
262 270
       }, handleDelete: function(index, row) {
263 271
         this.recordInfo.recordData.splice(index, 1)
264 272
       }, calculate: function(val) {
265
-
266 273
         if (val == 0) {
267 274
           return ''
268 275
         }
@@ -282,20 +289,16 @@
282 289
         } else {
283 290
           this.isVisibility = true
284 291
           console.log(this.form.manufacturer)
285
-          for (let i = 0; i < this.propForm.goodInfo.length; i++){
286
-            if(this.propForm.goodInfo[i].manufacturer == this.form.manufacturer){
292
+          for (let i = 0; i < this.propForm.goodInfo.length; i++) {
293
+            if (this.propForm.goodInfo[i].manufacturer == this.form.manufacturer) {
287 294
               this.propForm.goodType.push(this.propForm.goodInfo[i].GoodsType)
288 295
             }
289
-
290 296
           }
291 297
           const obj3 = {}
292 298
           this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
293 299
             obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
294 300
             return cur
295 301
           }, [])
296
-
297
-
298
-
299 302
         }
300 303
       }, back() {
301 304
         this.$router.go(-1)
@@ -322,21 +325,21 @@
322 325
             const params = {
323 326
               'cancelStock': this.recordInfo.recordData
324 327
             }
325
-            postCancelStock(params,this.return_time,this.form.manufacturer,this.form.dealer,this.type).then(response=>{
326
-              if (response.data.state==0) {
327
-                this.$message.error(response.data.msg);
328
-                return false;
329
-              }else {
328
+            postCancelStock(params, this.return_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
329
+              if (response.data.state == 0) {
330
+                this.$message.error(response.data.msg)
331
+                return false
332
+              } else {
330 333
                 this.$notify({
331
-                  title: "成功",
332
-                  message: "退货成功",
333
-                  type: "success",
334
+                  title: '成功',
335
+                  message: '退货成功',
336
+                  type: 'success',
334 337
                   duration: 2000
335
-                });
338
+                })
336 339
                 this.recordInfo.recordData = []
337 340
                 this.$router.back(-1)
338 341
               }
339
-            });
342
+            })
340 343
           } else {
341 344
             return false
342 345
           }
@@ -378,16 +381,6 @@
378 381
   }
379 382
   }
380 383
 
381
-  .title {
382
-    background: #409eff;
383
-    height: 44px;
384
-    line-height: 44px;
385
-    padding: 0 0 0 10px;
386
-    color: #fff;
387
-    margin: 0 0 10px 0;
388
-  // border-radius: 4px 4px 0 0;
389
-  }
390
-
391 384
   .edit_separater {
392 385
     border-top: 1px solid rgb(233, 233, 233);
393 386
     margin-top: 15px;

+ 21 - 16
src/xt_pages/stock/cancelStockOrderDetail.vue Bestand weergeven

@@ -1,9 +1,12 @@
1 1
 <template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+    </div>
6
+  <div class="app-container">
4 7
 
5 8
     <div class="filter-container">
6
-      <span style="font-size: 20px">退货单详情</span>
9
+      <span style="font-size: 20px">退单详情</span>
7 10
       <el-row style="float:right;">
8 11
         <span>{{CancelStockInfo.cancelStock.order_number}}</span>
9 12
       </el-row>
@@ -11,10 +14,10 @@
11 14
 
12 15
 
13 16
 
14
-    <div class="filter-container">
15
-      <span>单据日期:  {{CancelStockInfo.cancelStock.return_time | parseTime('{y}-{m}-{d}')}} </span>
16
-      <span>厂商 {{getManufactuerName(CancelStockInfo.cancelStock.manufacturer)}}</span>
17
-      <span>经销商 {{getDealerName(CancelStockInfo.cancelStock.dealer)}}</span>
17
+    <div class="cell">
18
+      <span style="width: 300px">单据日期:  {{CancelStockInfo.cancelStock.return_time | parseTime('{y}-{m}-{d}')}} </span>
19
+      <span style="width: 300px">厂商 {{getManufactuerName(CancelStockInfo.cancelStock.manufacturer)}}</span>
20
+      <span style="width: 300px">经销商 {{getDealerName(CancelStockInfo.cancelStock.dealer)}}</span>
18 21
     </div>
19 22
 
20 23
     <div class="filter-container" style="margin-top: 10px">
@@ -24,6 +27,7 @@
24 27
 
25 28
     <el-row :gutter="12" style="margin-top: 10px">
26 29
       <el-table :data="CancelStockInfo.cancelStockInfoData" :class="signAndWeighBoxPatients" style="width: 100%" border
30
+                :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
27 31
       >
28 32
         <el-table-column min-width="35" align="center">
29 33
           <template slot="header" slot-scope="scope">
@@ -57,14 +61,18 @@
57 61
       </el-table>
58 62
     </el-row>
59 63
   </div>
64
+  </div>
65
+
60 66
 </template>
61 67
 
62 68
 <script>
63 69
   import { uParseTime } from '@/utils/tools'
64
-  import { GetAllConfig,getCancelStockInfo,deleteCancelStock } from '@/api/stock'
70
+  import { GetAllConfig, getCancelStockInfo, deleteCancelStock } from '@/api/stock'
71
+  import BreadCrumb from '../components/bread-crumb'
65 72
 
66 73
   export default {
67 74
     name: 'cancelStockOrderDetail',
75
+    components: { BreadCrumb },
68 76
     created() {
69 77
       const order_id = this.$route.query.id
70 78
       this.GetConfigInfo()
@@ -72,6 +80,11 @@
72 80
     },
73 81
     data() {
74 82
       return {
83
+        crumbs: [
84
+          { path: false, name: '库存管理' },
85
+          { path: '/stock/cancel', name: '退库单' },
86
+          { path: '/stock/cancel/add', name: '退库单详情' }
87
+        ],
75 88
         isEdit: 0,
76 89
         checked: false,
77 90
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
@@ -198,14 +211,6 @@
198 211
 
199 212
   }
200 213
 
201
-  .title {
202
-    background: #409eff;
203
-    height: 44px;
204
-    line-height: 44px;
205
-    padding: 0 0 0 10px;
206
-    color: #fff;
207
-    margin: 0 0 10px 0;
208
-  }
209 214
 
210 215
   .edit_separater {
211 216
     border-top: 1px solid rgb(233, 233, 233);

+ 105 - 108
src/xt_pages/stock/cancelStockOrderEdit.vue Bestand weergeven

@@ -1,121 +1,125 @@
1 1
 <template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <sales-return-dialog :propForm="propForm"
6
-                         :visibility="isVisibility"
7
-                         v-on:dialog-comfirm="comfirm"
8
-                         v-on:dialog-cancle="cancle"></sales-return-dialog>
9
-
10
-    <div class="filter-container">
11
-
12
-      <el-row>
13
-        <el-col :span="8">
14
-          <div>
15
-            <span>入库时间:</span>
16
-            <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
17
-                            type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
18
-                            value-format="yyyy-MM-dd"></el-date-picker>
19
-          </div>
20
-        </el-col>
21
-      </el-row>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <div style="float:right;">
6
+        <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
7
+        <el-button size="small"  type="primary" @click="submit()" class="filter-item" >确 定</el-button>
8
+      </div>
22 9
     </div>
10
+    <div class="app-container">
11
+      <sales-return-dialog :propForm="propForm"
12
+                           :visibility="isVisibility"
13
+                           v-on:dialog-comfirm="comfirm"
14
+                           v-on:dialog-cancle="cancle"></sales-return-dialog>
15
+
16
+      <div class="cell">
17
+
18
+        <label class="title"><span class="name">退库时间</span> : </label>
19
+        <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
+                        value-format="yyyy-MM-dd"></el-date-picker>
22
+      </div>
23
+
24
+      <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
25
+        <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
26
+                  max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
27
+        >
28
+
29
+
30
+          <el-table-column min-width="35" align="center">
31
+
32
+            <template slot="header" slot-scope="scope">
33
+              <span>物品类型<span style="color: red">*</span></span>
34
+            </template>
35
+
36
+            <template slot-scope="scope">
37
+              <el-form-item style="padding-top: 15px">
38
+                <el-input placeholder="请输入物品类型" v-model="scope.row.good_type_id"
39
+                          :value="typeName(scope.row.good_type_id)"
40
+                          @focus="showDialog(scope.$index, scope.row)"></el-input>
41
+              </el-form-item>
42
+            </template>
43
+          </el-table-column>
44
+          <el-table-column min-width="35" align="center">
45
+            <template slot="header" slot-scope="scope">
46
+              <span>规格名称<span style="color: red">*</span></span>
47
+            </template>
48
+            <template slot-scope="scope">
49
+
50
+              <el-form-item style="padding-top: 15px">
51
+                <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
52
+                          :value="specificationName(scope.row.good_id)"
53
+                          @focus="showDialog(scope.$index, scope.row)"></el-input>
54
+              </el-form-item>
55
+
56
+            </template>
57
+          </el-table-column>
58
+
59
+
60
+          <el-table-column min-width="23" align="center">
61
+            <template slot="header" slot-scope="scope">
62
+              <span>退货数量<span style="color: red">*</span></span>
63
+            </template>
64
+            <template slot-scope="scope">
65
+              <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
66
+                            style="padding-top: 17px">
67
+                <el-input type="number" v-model="scope.row.count"></el-input>
68
+              </el-form-item>
69
+            </template>
70
+          </el-table-column>
71
+
72
+          <el-table-column label="操作" align="center" min-width="20">
73
+            <template slot-scope="scope">
74
+              <el-tooltip class="item" effect="dark" content="新增" placement="top">
23 75
 
24
-    <el-row>
25
-      <el-col>
26
-        <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
27
-          <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
28
-                    max-height="450"
29
-          >
30
-
31
-            <el-table-column label="操作" align="center" min-width="30">
32
-              <template slot-scope="scope">
33 76
                 <el-button
34 77
                   size="mini"
35
-                  @click="handleEdit(scope.$index, scope.row)">+
78
+                  type="primary"
79
+                  icon="el-icon-circle-plus-outline"
80
+                  @click="handleEdit(scope.$index, scope.row)">
36 81
                 </el-button>
82
+              </el-tooltip>
83
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
84
+
37 85
                 <el-button
38 86
                   size="mini"
39 87
                   type="danger"
40
-                  @click="handleDelete(scope.$index, scope.row)">-
88
+                  icon="el-icon-remove-outline"
89
+                  @click="handleDelete(scope.$index, scope.row)">
41 90
                 </el-button>
42
-              </template>
43
-            </el-table-column>
44
-
45
-            <el-table-column min-width="35" align="center">
46
-
47
-              <template slot="header" slot-scope="scope">
48
-                <span>物品类型<span style="color: red">*</span></span>
49
-              </template>
50
-
51
-              <template slot-scope="scope">
52
-                <el-form-item style="padding-top: 15px">
53
-                  <el-input placeholder="请输入物品类型" v-model="scope.row.good_type_id"
54
-                            :value="typeName(scope.row.good_type_id)"
55
-                            @focus="showDialog(scope.$index, scope.row)"></el-input>
56
-                </el-form-item>
57
-              </template>
58
-            </el-table-column>
59
-            <el-table-column min-width="35" align="center">
60
-              <template slot="header" slot-scope="scope">
61
-                <span>规格名称<span style="color: red">*</span></span>
62
-              </template>
63
-              <template slot-scope="scope">
64
-
65
-                <el-form-item style="padding-top: 15px">
66
-                  <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
67
-                            :value="specificationName(scope.row.good_id)"
68
-                            @focus="showDialog(scope.$index, scope.row)"></el-input>
69
-                </el-form-item>
70
-
71
-              </template>
72
-            </el-table-column>
73
-
74
-
75
-            <el-table-column min-width="23" align="center">
76
-              <template slot="header" slot-scope="scope">
77
-                <span>退货数量<span style="color: red">*</span></span>
78
-              </template>
79
-              <template slot-scope="scope">
80
-                <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
81
-                              style="padding-top: 17px">
82
-                  <el-input type="number" v-model="scope.row.count"></el-input>
83
-                </el-form-item>
84
-              </template>
85
-            </el-table-column>
86
-
87
-
88
-          </el-table>
89
-        </el-form>
90
-      </el-col>
91
-
92
-
93
-      <span class="dialog-footer" style="margin-top: 20px;float:right">
94
-        <el-button @click="back()">取 消</el-button>
95
-        <el-button type="primary" @click="submit()">确 定</el-button>
96
-      </span>
97
-
98
-    </el-row>
91
+              </el-tooltip>
92
+
93
+            </template>
94
+          </el-table-column>
95
+
96
+
97
+        </el-table>
98
+      </el-form>
99
+
100
+    </div>
99 101
   </div>
102
+
100 103
 </template>
101 104
 
102 105
 <script>
103 106
   import { uParseTime } from '@/utils/tools'
104 107
 
105
-  import {
106
-    deleteCancelStockInfo,
107
-    getCancelStockInfo,
108
-    getCancelStockConfig,
109
-    editCancelStockInfo
110
-  } from '@/api/stock'
108
+  import { deleteCancelStockInfo, editCancelStockInfo, getCancelStockConfig, getCancelStockInfo } from '@/api/stock'
111 109
   import SalesReturnDialog from './Dialog/salesReturnDialog'
110
+  import BreadCrumb from '../components/bread-crumb'
112 111
 
113 112
   export default {
114
-    components: { SalesReturnDialog },
113
+    components: { BreadCrumb, SalesReturnDialog },
115 114
     name: 'cancelStockOrderEdit',
116 115
 
117 116
     data() {
118 117
       return {
118
+        crumbs: [
119
+          { path: false, name: '库存管理' },
120
+          { path: '/stock/cancel', name: '退库单' },
121
+          { path: '/stock/cancel/detail', name: '编辑退库单' }
122
+        ],
119 123
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
120 124
         warehousing_time: '',
121 125
         adminUserOptions: null,
@@ -183,7 +187,10 @@
183 187
       }, cancle: function() {
184 188
         this.isVisibility = false
185 189
       }, GetConfigInfo: function() {
186
-        getCancelStockConfig().then(response => {
190
+        const params = {
191
+          type: this.$route.query.type
192
+        }
193
+        getCancelStockConfig(params).then(response => {
187 194
           if (response.data.state == 0) {
188 195
             this.$message.error(response.data.msg)
189 196
             return false
@@ -192,7 +199,6 @@
192 199
             for (let i = 0; i < warehouseOutInfoList.length; i++) {
193 200
               this.propForm.goodInfo.push(warehouseOutInfoList[i].GoodInfo)
194 201
               this.propForm.goodType.push(warehouseOutInfoList[i].GoodInfo.GoodsType)
195
-
196 202
             }
197 203
             const obj3 = {}
198 204
             const obj4 = {}
@@ -279,7 +285,6 @@
279 285
           obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
280 286
           return cur
281 287
         }, [])
282
-
283 288
       }, back() {
284 289
         this.$router.go(-1)
285 290
       }, submit() {
@@ -328,7 +333,7 @@
328 333
             return false
329 334
           } else {
330 335
             for (let i = 0; i < response.data.data.list.length; i++) {
331
-              response.data.data.list[i].count =  response.data.data.list[i].count.toString();
336
+              response.data.data.list[i].count = response.data.data.list[i].count.toString()
332 337
               this.recordInfo.recordData.push(response.data.data.list[i])
333 338
             }
334 339
             this.cancelStock = response.data.data.info
@@ -361,15 +366,7 @@
361 366
 
362 367
   }
363 368
 
364
-  .title {
365
-    background: #409eff;
366
-    height: 44px;
367
-    line-height: 44px;
368
-    padding: 0 0 0 10px;
369
-    color: #fff;
370
-    margin: 0 0 10px 0;
371
-    border-radius: 4px 4px 0 0;
372
-  }
369
+
373 370
 
374 371
   .edit_separater {
375 372
     border-top: 1px solid rgb(233, 233, 233);

+ 0 - 388
src/xt_pages/stock/cancelStockRecord.vue Bestand weergeven

@@ -1,388 +0,0 @@
1
-<template>
2
-<div class="main-contain">
3
-  <div class="position">
4
-    <bread-crumb></bread-crumb>
5
-    <el-row style="float:right;">
6
-        <el-button size="small" icon="el-icon-refresh" @click="handleBack">返回</el-button>
7
-      </el-row>
8
-  </div>
9
-  <div class="app-container sign-and-weigh-box">
10
-    <div class="filter-container">
11
-      <span>出库退库:</span>
12
-      <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
13
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
14
-                      value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
15
-      <span class="">-</span>
16
-      <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
17
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
18
-                      value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
19
-    </div>
20
-
21
-
22
-    <el-row :gutter="12">
23
-      <el-col :span="8">
24
-        <div class="title">出库退库记录
25
-        </div>
26
-        <div style="margin-bottom: 10px;">
27
-        </div>
28
-        <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="cancelStock.cancelStockDate" :class="signAndWeighBoxPatients" style="width: 100%" border
29
-                  @row-click="onRowClick"
30
-                  :row-class-name="tableRowClassName"
31
-                  highlight-current-row
32
-                  v-loading="cancelStock.loading"
33
-        >
34
-          <el-table-column label="退库单号" min-width="40" align="center">
35
-            <template slot-scope="scope">
36
-              {{scope.row.order_number}}
37
-
38
-            </template>
39
-          </el-table-column>
40
-          <el-table-column label="操作时间" min-width="40" align="center">
41
-            <template slot-scope="scope">
42
-              {{ scope.row.opera_time | parseTime("{y}-{m}-{d}")}}
43
-            </template>
44
-          </el-table-column>
45
-          <el-table-column label="退库总量" align="center" min-width="30">
46
-            <template slot-scope="scope">
47
-              {{scope.row.total}}
48
-            </template>
49
-          </el-table-column>
50
-
51
-          <el-table-column label="操作人" align="center" min-width="30">
52
-            <template slot-scope="scope">
53
-              {{getXuserName(scope.row.creater)}}
54
-            </template>
55
-          </el-table-column>
56
-
57
-
58
-        </el-table>
59
-      </el-col>
60
-
61
-      <el-col :span="16">
62
-        <div class="titleTop">物品详细信息
63
-        </div>
64
-        <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="cancelStockInfo.cancelStockInfoDate" :class="signAndWeighBoxPatients" style="width: 100%" border
65
-                  v-loading="cancelStockInfo.loading"
66
-                  @selection-change="handleSelectionChange"
67
-        >
68
-          <el-table-column
69
-            type="selection"
70
-            width="55">
71
-          </el-table-column>
72
-          <el-table-column label="规格名称" min-width="30" align="center">
73
-            <template slot-scope="scope">
74
-              {{getSpecificationName(scope.row.good_id)}}
75
-            </template>
76
-          </el-table-column>
77
-          <el-table-column label="物品类型" min-width="30" align="center">
78
-            <template slot-scope="scope">
79
-              {{getTypeName(scope.row.good_type_id)}}
80
-
81
-            </template>
82
-          </el-table-column>
83
-
84
-          <el-table-column label="退库数量" min-width="30" align="center">
85
-            <template slot-scope="scope">
86
-              {{scope.row.count}}
87
-            </template>
88
-          </el-table-column>
89
-          <el-table-column label="退库单价" min-width="30" align="center">
90
-            <template slot-scope="scope">
91
-              {{scope.row.price}}
92
-
93
-            </template>
94
-          </el-table-column>
95
-          <el-table-column label="退库总价" min-width="30" align="center">
96
-            <template slot-scope="scope">
97
-              {{scope.row.price * scope.row.count }}
98
-            </template>
99
-          </el-table-column>
100
-        </el-table>
101
-
102
-      </el-col>
103
-    </el-row>
104
-    <el-pagination
105
-          @size-change="handleSizeChange"
106
-          @current-change="handleCurrentChange"
107
-          :page-sizes="[7]"
108
-          :page-size="7"
109
-          background
110
-          align="right"
111
-          style="margin-top:20px;"
112
-          layout="total, sizes, prev, pager, next, jumper"
113
-          :total="total">
114
-        </el-pagination>
115
-  </div>
116
-</div>
117
-
118
-</template>
119
-
120
-<script>
121
-  import {uParseTime} from "@/utils/tools";
122
-  import { fetchAllDoctorAndNurse,fetchAllAdminUsers } from "@/api/doctor";
123
-  import {
124
-    getCancelStockList,
125
-    getCancelStockInfoList,
126
-    GetAllGoodInfo,
127
-    GetAllGoodType,
128
-  } from "@/api/stock";
129
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
130
-
131
-  export default {
132
-    name: "stockIn",
133
-    created(){
134
-      var year = new Date().getFullYear();
135
-      var month = new Date().getMonth() + 1;
136
-      var day = new Date().getDate();
137
-      if (parseInt(month) < 10) {
138
-        month = "0" + month;
139
-      }
140
-      if (parseInt(day) < 10) {
141
-        day = "0" + day;
142
-      }
143
-      let endTime = year + '-' + month + '-' + day;
144
-      this.end_time = endTime
145
-
146
-
147
-      var year = new Date().getFullYear();
148
-      var month = new Date().getMonth();
149
-      var day = new Date().getDate();
150
-      if (parseInt(month) < 10) {
151
-        month = "0" + month;
152
-      }
153
-      if (parseInt(day) < 10) {
154
-        day = "0" + day;
155
-      }
156
-      let startTime = year + '-' + month + '-' + day;
157
-      this.start_time = startTime
158
-
159
-      this.GetAllGoodInfo()
160
-      this.GetAllGoodType()
161
-      this.GetCancelStockList()
162
-      this.fetchAllAdminUsers()
163
-
164
-    },
165
-    components:{
166
-      BreadCrumb
167
-    },
168
-    data() {
169
-      return {
170
-        adminUserOptions:[],
171
-        multipleSelection: [],
172
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
173
-        start_time: '',
174
-        end_time: '',
175
-        goodType:[],
176
-        goodInfo:[],
177
-
178
-        cancelStock: {
179
-          loading: false,
180
-          cancelStockDate: [],
181
-          tableCurrentIndex:''
182
-        },
183
-
184
-        cancelStockInfo: {
185
-          loading: false,
186
-          cancelStockInfoDate: [],
187
-        },
188
-
189
-      };
190
-    },
191
-    methods: {
192
-      GetCancelStockList:function () {
193
-        let Params = {
194
-          page: this.page,
195
-          limit: this.limit,
196
-          start_time: this.start_time,
197
-          end_time: this.end_time
198
-        }
199
-        this.cancelStock.cancelStockDate = []
200
-        getCancelStockList(Params).then(response =>{
201
-          if (response.data.state == 0) {
202
-            this.cancelStock.loading = false
203
-            this.$message.error(response.data.msg);
204
-            return false;
205
-          } else {
206
-            this.cancelStock.loading = false
207
-            this.total = response.data.data.total
208
-
209
-            for (let i = 0; i < response.data.data.list.length; i++) {
210
-              this.cancelStock.cancelStockDate.push(response.data.data.list[i])
211
-            }
212
-          }
213
-        })
214
-      },  tableRowClassName({row, rowIndex}) {
215
-        //把每一行的索引放进row
216
-        row.index = rowIndex;
217
-
218
-      }, onRowClick(row, event, column) {
219
-        this.cancelStockInfo.cancelStockInfoDate = []
220
-        this.cancelStock.tableCurrentIndex = row.index;
221
-        let params = {
222
-          'id': row.id
223
-        }
224
-        this.cancelStockInfo.loading = true
225
-        getCancelStockInfoList(params).then(response => {
226
-          if (response.data.state == 0) {
227
-            this.cancelStockInfo.loading = false
228
-            this.$message.error(response.data.msg);
229
-            return false;
230
-          } else {
231
-            this.cancelStockInfo.loading = false
232
-            for (let i = 0; i < response.data.data.info.length; i++) {
233
-              this.cancelStockInfo.cancelStockInfoDate.push(response.data.data.info[i])
234
-            }
235
-          }
236
-        });
237
-
238
-      },getXuserName(id){
239
-        if (id<=0) {
240
-          return "";
241
-        }
242
-        var name = "";
243
-        if (this.adminUserOptions==null || typeof(this.adminUserOptions.length) == "undefined") {
244
-          return name;
245
-        }
246
-        var leng = this.adminUserOptions.length;
247
-        if (leng==0) {
248
-          return name;
249
-        }
250
-        for (let index = 0; index < leng; index++) {
251
-          if (this.adminUserOptions[index].id == id) {
252
-            name = this.adminUserOptions[index].name;
253
-            break;
254
-          }
255
-        }
256
-        return name;
257
-      },fetchAllDoctorAndNurse() {
258
-        fetchAllDoctorAndNurse().then(response => {
259
-          if (response.data.state == 1) {
260
-            this.doctorOptions = response.data.data.doctors;
261
-          }
262
-        });
263
-      },
264
-      fetchAllAdminUsers() {
265
-        fetchAllAdminUsers().then(response => {
266
-          if (response.data.state == 1) {
267
-            this.adminUserOptions = response.data.data.users;
268
-            var alen = this.adminUserOptions.length;
269
-            for (let index = 0; index < alen; index++) {
270
-              if (this.adminUserOptions[index].user_type==2) {
271
-                this.doctorOptions.push(this.adminUserOptions[index]);
272
-              }
273
-            }
274
-          }
275
-        });
276
-      },getSpecificationName:function (id) {
277
-        let name = ''
278
-        for (let i = 0; i< this.goodInfo.length; i++){
279
-          if( this.goodInfo[i].id == id){
280
-            name = this.goodInfo[i].specification_name
281
-          }
282
-
283
-        }
284
-
285
-        return name
286
-
287
-      },getTypeName:function (id) {
288
-        let name = ''
289
-        for (let i = 0; i< this.goodType.length; i++){
290
-          if( this.goodType[i].id == id){
291
-            name = this.goodType[i].type_name
292
-          }
293
-        }
294
-        return name
295
-      },GetAllGoodType:function () {
296
-        GetAllGoodType().then(response => {
297
-          if (response.data.state == 0) {
298
-            this.$message.error(response.data.msg);
299
-            return false;
300
-          } else {
301
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
302
-              this.goodType.push(response.data.data.goodType[i])
303
-            }
304
-          }
305
-        });
306
-
307
-
308
-      },GetAllGoodInfo:function () {
309
-        GetAllGoodInfo().then(response => {
310
-          if (response.data.state == 0) {
311
-            this.$message.error(response.data.msg);
312
-            return false;
313
-          } else {
314
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
315
-              this.goodInfo.push(response.data.data.goodInfo[i])
316
-            }
317
-          }
318
-        });
319
-
320
-
321
-      },handleSelectionChange:function (val) {
322
-        this.multipleSelection = val
323
-      },handleBack: function () {
324
-        this.$router.go(-1)
325
-      },startTimeChange(val) {
326
-      this.GetWarehouse();
327
-    }, endTimeChange(val) {
328
-      this.GetWarehouse();
329
-    }
330
-
331
-
332
-    },
333
-    watch: {
334
-      $route() {
335
-        if (this.$route.path == '/stock/in') {
336
-
337
-
338
-        }
339
-
340
-      }
341
-    }
342
-  };
343
-</script>
344
-
345
-<style rel="stylesheet/css" lang="scss" scoped>
346
-  .information {
347
-    border: 1px #dcdfe6 solid;
348
-    padding: 30px 20px 30px 20px;
349
-
350
-    .border {
351
-      border-bottom: 1px #dcdfe6 solid;
352
-      margin: 0px 0 20px 0;
353
-    }
354
-  }
355
-
356
-  .title {
357
-    background: #409eff;
358
-    height: 44px;
359
-    line-height: 44px;
360
-    padding: 0 0 0 10px;
361
-    color: #fff;
362
-    margin: 0 0 10px 0;
363
-    // border-radius: 4px 4px 0 0;
364
-  }
365
-
366
-  .edit_separater {
367
-    border-top: 1px solid rgb(233, 233, 233);
368
-    margin-top: 15px;
369
-    margin-bottom: 15px;
370
-  }
371
-
372
-</style>
373
-
374
-<style>
375
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
376
-    font-size: 12px;
377
-  }
378
-
379
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
380
-    background: #6fb5fa;
381
-  }
382
-
383
-  .count{
384
-    color: #bd2c00;
385
-
386
-  }
387
-
388
-</style>

+ 2 - 2
src/xt_pages/stock/config/dealer.vue Bestand weergeven

@@ -57,7 +57,7 @@
57 57
             <template slot-scope="scope">
58 58
               <el-tooltip class="item" effect="dark" content="编辑" placement="top">
59 59
                 <el-button
60
-                  size="mini"
60
+                  size="small"
61 61
                   type="primary"
62 62
                   icon="el-icon-edit-outline"
63 63
                   @click="handleEdit(scope.$index, scope.row)">
@@ -65,7 +65,7 @@
65 65
               </el-tooltip>
66 66
               <el-tooltip class="item" effect="dark" content="删除" placement="top">
67 67
                 <el-button
68
-                  size="mini"
68
+                  size="small"
69 69
                   type="danger"
70 70
                   icon="el-icon-delete"
71 71
                   @click="handleDelete(scope.$index, scope.row)">

+ 2 - 2
src/xt_pages/stock/config/goodInfo.vue Bestand weergeven

@@ -57,7 +57,7 @@
57 57
             <template slot-scope="scope">
58 58
               <el-tooltip class="item" effect="dark" content="编辑" placement="top">
59 59
                 <el-button
60
-                  size="mini"
60
+                  size="small"
61 61
                   type="primary"
62 62
                   icon="el-icon-edit-outline"
63 63
                   @click="handleGoodInfoEdit(scope.$index, scope.row)">
@@ -65,7 +65,7 @@
65 65
               </el-tooltip>
66 66
               <el-tooltip class="item" effect="dark" content="删除" placement="top">              
67 67
                 <el-button
68
-                  size="mini"
68
+                  size="small"
69 69
                   type="danger"
70 70
                   icon="el-icon-delete"
71 71
                   @click="handleGoodInfoDelete(scope.$index, scope.row)">

+ 2 - 2
src/xt_pages/stock/config/goodType.vue Bestand weergeven

@@ -38,7 +38,7 @@
38 38
             <template slot-scope="scope">
39 39
               <el-tooltip class="item" effect="dark" content="编辑" placement="top">
40 40
                 <el-button
41
-                  size="mini"
41
+                  size="small"
42 42
                   type="primary"
43 43
                   icon="el-icon-edit-outline"
44 44
                   @click="handleEdit(scope.$index, scope.row)">
@@ -46,7 +46,7 @@
46 46
               </el-tooltip>
47 47
               <el-tooltip class="item" effect="dark" content="删除" placement="top">
48 48
                 <el-button
49
-                  size="mini"
49
+                  size="small"
50 50
                   type="danger"
51 51
                   icon="el-icon-delete"
52 52
                   @click="handleDelete(scope.$index, scope.row)">

+ 2 - 2
src/xt_pages/stock/config/manufacturer.vue Bestand weergeven

@@ -53,7 +53,7 @@
53 53
             <template slot-scope="scope">
54 54
               <el-tooltip class="item" effect="dark" content="编辑" placement="top">
55 55
                 <el-button
56
-                  size="mini"
56
+                  size="small"
57 57
                   type="primary"
58 58
                   icon="el-icon-edit-outline"
59 59
                   @click="handleEdit(scope.$index, scope.row)">
@@ -61,7 +61,7 @@
61 61
               </el-tooltip>
62 62
               <el-tooltip class="item" effect="dark" content="删除" placement="top">              
63 63
                 <el-button
64
-                  size="mini"
64
+                  size="small"
65 65
                   type="danger"
66 66
                   icon="el-icon-delete"
67 67
                   @click="handleDelete(scope.$index, scope.row)">

+ 17 - 26
src/xt_pages/stock/index.vue Bestand weergeven

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
 <div class="main-contain">
3 3
   <div class="position">
4
-    <bread-crumb></bread-crumb>
4
+    <bread-crumb :crumbs='crumbs'></bread-crumb>
5 5
   </div>
6 6
   <div class="app-container">
7 7
     <div class="service-box">
@@ -26,13 +26,13 @@
26 26
 </template>
27 27
 
28 28
 <script>
29
-  import Dealer from "./config/dealer";
30
-  import Manufacturer from "./config/manufacturer";
31
-  import GoodInfo from "./config/goodInfo";
32
-  import GoodType from "./config/goodType";
33
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
34
-  export default {
35
-    name: "service",
29
+  import Dealer from './config/dealer'
30
+import Manufacturer from './config/manufacturer'
31
+import GoodInfo from './config/goodInfo'
32
+import GoodType from './config/goodType'
33
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
34
+export default {
35
+    name: 'service',
36 36
     components: {
37 37
       GoodType,
38 38
       GoodInfo,
@@ -42,28 +42,19 @@
42 42
     },
43 43
     data() {
44 44
       return {
45
-        activeName: "first"
46
-      };
47
-    },
45
+        crumbs: [
46
+          { path: false, name: '库存管理' },
47
+          { path: '/stock/config', name: '库存配置' }
48
+        ],
49
+        activeName: 'first'
50
+      }
51
+  },
48 52
     methods: {
49 53
       handleClick(tab, event) {
50
-        console.log(tab, event, this.activeName);
51
-
52
-        // switch (this.activeName) {
53
-        //   case "invoice":
54
-        //     this.$router.push("/service/invoice");
55
-        //
56
-        //     break;
57
-        //   case "third":
58
-        //     this.$router.push("/service/recordList");
59
-        //     break;
60
-        //
61
-        //   default:
62
-        //     break;
63
-        // }
54
+        console.log(tab, event, this.activeName)
64 55
       }
65 56
     }
66
-  };
57
+  }
67 58
 </script>
68 59
 
69 60
 

+ 0 - 25
src/xt_pages/stock/otherCancelStockDetail.vue Bestand weergeven

@@ -1,25 +0,0 @@
1
-<template>
2
-  <other-cancel-stock-order-detail v-if="isEdit == 0"   v-on:edit-record="isEdit = 1"></other-cancel-stock-order-detail>
3
-  <other-cancel-stock-order-edit v-else></other-cancel-stock-order-edit>
4
-</template>
5
-
6
-<script>
7
-  import CancelStockOrderDetail from './cancelStockOrderDetail'
8
-  import CancelStockOrderEdit from './cancelStockOrderEdit'
9
-  import OtherCancelStockOrderDetail from './otherCancelStockOrderDetail'
10
-  import OtherCancelStockOrderEdit from './otherCancelStockOrderEdit'
11
-  export default {
12
-    name: 'cancelStockDetail',
13
-    components: { OtherCancelStockOrderEdit, OtherCancelStockOrderDetail },
14
-    data() {
15
-      return {
16
-        isEdit: 0
17
-      }
18
-    },
19
-  }
20
-
21
-</script>
22
-
23
-<style scoped>
24
-
25
-</style>

+ 125 - 127
src/xt_pages/stock/otherCancelStockOrder.vue Bestand weergeven

@@ -1,131 +1,134 @@
1 1
 <template>
2 2
 
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-
6
-    <div class="filter-container">
7
-
8
-
9
-      <el-row style="float:right;">
10
-        <el-button @click="AddNewOrder" type="primary">新增</el-button>
11
-      </el-row>
3
+  <div class="main-contain">
4
+    <div class="position">
5
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
6
+      <el-button size="small" @click="AddNewOrder" class="filter-item" style="float:right;" type="primary"
7
+                 icon="el-icon-circle-plus-outline">新增
8
+      </el-button>
12 9
     </div>
13 10
 
14
-    <div class="filter-container" style="margin-top:20px">
15
-      <el-input style="width: 300px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
16
-      <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
17
-    </div>
18
-
19
-    <div class="filter-container">
20
-      <span>入库时间:</span>
21
-      <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
-                      value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
24
-      <span class="">-</span>
25
-      <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
26
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
-                      value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
28
-    </div>
29
-
30
-    <div class="filter-container" style="margin-top: 10px">
31
-      <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
32
-      <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
11
+    <div class="app-container">
12
+
13
+      <div class="cell" style="margin-top:20px">
14
+        <el-input style="width: 300px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
15
+        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
16
+      </div>
17
+
18
+      <div class="cell">
19
+        <label class="title"><span class="name">退库时间</span> : </label>
20
+
21
+        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
+                        value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
24
+        <span class="">-</span>
25
+        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
26
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
+                        value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
28
+      </div>
29
+
30
+      <div class="filter-container" style="margin-top: 10px">
31
+        <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
32
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
33
+
34
+      </div>
35
+
36
+      <el-row :gutter="12" style="margin-top: 10px">
37
+        <el-table
38
+          :data="cancelStockDate"
39
+          :class="signAndWeighBoxPatients"
40
+          style="width: 100%" border
41
+          highlight-current-row
42
+          ref="multipleTable"
43
+          @selection-change="select"
44
+          :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
45
+
46
+        >
47
+          <el-table-column
48
+            type="selection"
49
+            width="55">
50
+          </el-table-column>
51
+
52
+          <el-table-column label="单据日期" align="center">
53
+            <template slot-scope="scope">
54
+              {{ scope.row.return_time | parseTime('{y}-{m}-{d}')}}
55
+            </template>
56
+          </el-table-column>
57
+
58
+          <el-table-column label="单据编号" align="center">
59
+            <template slot-scope="scope">
60
+              {{scope.row.order_number}}
61
+            </template>
62
+          </el-table-column>
63
+
64
+          <el-table-column label="制单人" align="center">
65
+            <template slot-scope="scope">
66
+              {{getXuserName(scope.row.creater)}}
67
+            </template>
68
+          </el-table-column>
69
+
70
+
71
+          <el-table-column label="厂家" align="center">
72
+            <template slot-scope="scope">
73
+              {{getManufactuerName(scope.row.manufacturer)}}
74
+            </template>
75
+          </el-table-column>
76
+
77
+          <el-table-column label="经销商" align="center">
78
+            <template slot-scope="scope">
79
+              {{getDealerName(scope.row.dealer)}}
80
+            </template>
81
+          </el-table-column>
82
+          <el-table-column label="操作" align="center">
83
+
84
+            <template slot-scope="scope">
85
+              <el-tooltip class="item" effect="dark" content="编辑" placement="top">
86
+                <el-button
87
+                  size="mini"
88
+                  type="primary"
89
+                  icon="el-icon-edit"
90
+                  @click="handleEdit(scope.$index, scope.row)">
91
+                </el-button>
92
+              </el-tooltip>
93
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
94
+                <el-button
95
+                  size="mini"
96
+                  type="danger"
97
+                  icon="el-icon-delete"
98
+                  @click="handleDelete(scope.$index, scope.row)">
99
+                </el-button>
100
+              </el-tooltip>
101
+
102
+            </template>
103
+          </el-table-column>
104
+
105
+        </el-table>
106
+
107
+        <el-pagination
108
+          @size-change="handleSizeChange"
109
+          @current-change="handleCurrentChange"
110
+          :page-sizes="[7]"
111
+          :page-size="7"
112
+          background
113
+          style="margin-top:20px;float: right"
114
+          layout="total, sizes, prev, pager, next, jumper"
115
+          :total="total">
116
+        </el-pagination>
33 117
 
118
+      </el-row>
34 119
     </div>
35
-
36
-    <el-row :gutter="12" style="margin-top: 10px">
37
-      <el-table
38
-        :data="cancelStockDate"
39
-        :class="signAndWeighBoxPatients"
40
-        style="width: 100%" border
41
-        highlight-current-row
42
-        ref="multipleTable"
43
-        @selection-change="select"
44
-
45
-      >
46
-        <el-table-column
47
-          type="selection"
48
-          width="55">
49
-        </el-table-column>
50
-
51
-        <el-table-column label="单据日期" align="center">
52
-          <template slot-scope="scope">
53
-            {{ scope.row.return_time | parseTime('{y}-{m}-{d}')}}
54
-          </template>
55
-        </el-table-column>
56
-
57
-        <el-table-column label="单据编号" align="center">
58
-          <template slot-scope="scope">
59
-            {{scope.row.order_number}}
60
-          </template>
61
-        </el-table-column>
62
-
63
-        <el-table-column label="制单人" align="center">
64
-          <template slot-scope="scope">
65
-            {{getXuserName(scope.row.creater)}}
66
-          </template>
67
-        </el-table-column>
68
-
69
-
70
-        <el-table-column label="厂家" align="center">
71
-          <template slot-scope="scope">
72
-            {{getManufactuerName(scope.row.manufacturer)}}
73
-          </template>
74
-        </el-table-column>
75
-
76
-        <el-table-column label="经销商" align="center">
77
-          <template slot-scope="scope">
78
-            {{getDealerName(scope.row.dealer)}}
79
-          </template>
80
-        </el-table-column>
81
-
82
-        <el-table-column label="操作" align="center">
83
-          <template slot-scope="scope">
84
-            <el-button
85
-              size="mini"
86
-              type="primary"
87
-              icon="el-icon-edit"
88
-              @click="handleEdit(scope.$index, scope.row)">
89
-            </el-button>
90
-
91
-            <el-button
92
-              size="mini"
93
-              type="danger"
94
-              icon="el-icon-delete"
95
-              @click="handleDelete(scope.$index, scope.row)">
96
-            </el-button>
97
-
98
-          </template>
99
-        </el-table-column>
100
-
101
-      </el-table>
102
-
103
-      <el-pagination
104
-        @size-change="handleSizeChange"
105
-        @current-change="handleCurrentChange"
106
-        :page-sizes="[7]"
107
-        :page-size="7"
108
-        background
109
-        style="margin-top:20px;float: right"
110
-        layout="total, sizes, prev, pager, next, jumper"
111
-        :total="total">
112
-      </el-pagination>
113
-
114
-    </el-row>
115 120
   </div>
116 121
 </template>
117 122
 
118 123
 <script>
119 124
   import { uParseTime } from '@/utils/tools'
120 125
   import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
121
-  import {
122
-    deleteCancelStock,
123
-    GetAllConfig,
124
-    getCancelStockList,
125
-  } from '@/api/stock'
126
+  import { deleteCancelStock, GetAllConfig, getCancelStockList } from '@/api/stock'
127
+  import BreadCrumb from '../components/bread-crumb'
126 128
 
127 129
   export default {
128 130
     name: 'salesReturnOrder',
131
+    components: { BreadCrumb },
129 132
     created() {
130 133
       var year = new Date().getFullYear()
131 134
       var month = new Date().getMonth() + 1
@@ -156,6 +159,10 @@
156 159
     },
157 160
     data() {
158 161
       return {
162
+        crumbs: [
163
+          { path: false, name: '库存管理' },
164
+          { path: '/stock/cancel', name: '其他出库退库单' }
165
+        ],
159 166
         type: 2,
160 167
         page: 1,
161 168
         limit: 7,
@@ -173,13 +180,13 @@
173 180
         goodInfo: [],
174 181
         manufacturer: [],
175 182
         selectedTableData: [],
176
-        dealer: [],
183
+        dealer: []
177 184
 
178 185
       }
179 186
     },
180 187
     methods: {
181
-      AddNewOrder:function(){
182
-        this.$router.push({ name: 'cancelStockOrderAdd'})
188
+      AddNewOrder: function() {
189
+        this.$router.push({ name: 'cancelStockOrderAdd', query: { type: this.type }})
183 190
       },
184 191
       GetCancelStock: function() {
185 192
         const Params = {
@@ -187,7 +194,7 @@
187 194
           limit: this.limit,
188 195
           start_time: this.start_time,
189 196
           end_time: this.end_time,
190
-          type: this.type,
197
+          type: this.type
191 198
         }
192 199
         this.cancelStockDate = []
193 200
         getCancelStockList(Params).then(response => {
@@ -270,7 +277,7 @@
270 277
           }
271 278
         }
272 279
       }, handleEdit: function(index, row) {
273
-        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id }})
280
+        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id,type: this.type }})
274 281
       }, handleDelete: function(index, row) {
275 282
         const ids = []
276 283
         ids.push(row.id)
@@ -373,15 +380,6 @@
373 380
 
374 381
   }
375 382
 
376
-  .title {
377
-    background: #409eff;
378
-    height: 44px;
379
-    line-height: 44px;
380
-    padding: 0 0 0 10px;
381
-    color: #fff;
382
-    margin: 0 0 10px 0;
383
-
384
-  }
385 383
 
386 384
   .edit_separater {
387 385
     border-top: 1px solid rgb(233, 233, 233);

+ 0 - 408
src/xt_pages/stock/otherCancelStockOrderAdd.vue Bestand weergeven

@@ -1,408 +0,0 @@
1
-<template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <sales-return-dialog :propForm="propForm"
6
-                         :visibility="isVisibility"
7
-                         v-on:dialog-comfirm="comfirm"
8
-                         v-on:dialog-cancle="cancle"></sales-return-dialog>
9
-
10
-    <div class="filter-container">
11
-
12
-      <el-row>
13
-        <el-col :span="8"><div>
14
-          <span>退货时间:</span>
15
-          <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16
-                          type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17
-                          value-format="yyyy-MM-dd"></el-date-picker>
18
-        </div></el-col>
19
-
20
-
21
-        <el-col :span="8">
22
-          <div>
23
-            <el-form ref="form" :model="form" :rules="ruleForm" label-width="80px">
24
-              <el-form-item label="厂商:" prop="manufacturer">
25
-                <el-select v-model="form.manufacturer" placeholder="请选择厂商">
26
-                  <el-option v-for="(option, index) in manufacturer" :key="index" :label="option.manufacturer_name" :value="option.id"></el-option>
27
-                </el-select>
28
-              </el-form-item>
29
-            </el-form>
30
-          </div>
31
-        </el-col>
32
-        <el-col :span="8">
33
-          <div>
34
-            <el-form ref="form" :model="form" label-width="80px">
35
-              <el-form-item label="经销商:">
36
-                <el-select v-model="form.dealer" placeholder="请选择经销商">
37
-                  <el-option v-for="(option, index) in dealer" :key="index" :label="option.dealer_name" :value="option.id"></el-option>
38
-                </el-select>
39
-              </el-form-item>
40
-            </el-form>
41
-          </div>
42
-        </el-col>
43
-      </el-row>
44
-
45
-    </div>
46
-
47
-    <el-row>
48
-      <el-col>
49
-        <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
50
-          <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
51
-                    max-height="450"
52
-          >
53
-
54
-            <el-table-column label="操作" align="center" min-width="30">
55
-              <template slot-scope="scope">
56
-                <el-button
57
-                  size="mini"
58
-                  @click="handleEdit(scope.$index, scope.row)">+
59
-                </el-button>
60
-                <el-button
61
-                  size="mini"
62
-                  type="danger"
63
-                  @click="handleDelete(scope.$index, scope.row)">-
64
-                </el-button>
65
-              </template>
66
-            </el-table-column>
67
-
68
-            <el-table-column min-width="35" align="center">
69
-
70
-              <template slot="header" slot-scope="scope">
71
-                <span>物品类型<span style="color: red">*</span></span>
72
-              </template>
73
-
74
-              <template slot-scope="scope" >
75
-                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id == 0" style="color:#c5c8cf">请输入类型</span>-->
76
-                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
77
-
78
-                <el-form-item  style="padding-top: 15px">
79
-                  <el-input placeholder="请输入物品类型"  v-model="scope.row.good_type_id" :value="typeName(scope.row.good_type_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
80
-                </el-form-item>
81
-
82
-              </template>
83
-            </el-table-column>
84
-            <el-table-column min-width="35" align="center">
85
-              <template slot="header" slot-scope="scope">
86
-                <span>规格名称<span style="color: red">*</span></span>
87
-              </template>
88
-              <template slot-scope="scope">
89
-
90
-                <el-form-item  style="padding-top: 15px">
91
-                  <el-input placeholder="请输入规格名称"  v-model="scope.row.good_id" :value="specificationName(scope.row.good_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
92
-                </el-form-item>
93
-
94
-              </template>
95
-            </el-table-column>
96
-
97
-
98
-            <el-table-column  min-width="23" align="center">
99
-              <template slot="header" slot-scope="scope">
100
-                <span>退库数量<span style="color: red">*</span></span>
101
-              </template>
102
-              <template slot-scope="scope">
103
-                <!--{{scope.row.warehousing_count}}-->
104
-                <!--<el-input type="number" v-model="scope.row.warehousing_count"   @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
105
-
106
-                <el-form-item :prop="'recordData.' + scope.$index + '.return_count'" :rules='tableRules.return_count' style="padding-top: 17px">
107
-                  <el-input type="number"  v-model="scope.row.return_count" ></el-input>
108
-                </el-form-item>
109
-              </template>
110
-            </el-table-column>
111
-
112
-          </el-table>
113
-        </el-form>
114
-      </el-col>
115
-
116
-
117
-      <span  class="dialog-footer" style="margin-top: 20px;float:right">
118
-        <el-button @click="back()">取 消</el-button>
119
-        <el-button type="primary" @click="submit()">确 定</el-button>
120
-      </span>
121
-
122
-    </el-row>
123
-  </div>
124
-</template>
125
-
126
-<script>
127
-  import { uParseTime } from '@/utils/tools'
128
-  import {
129
-    getCancelStockConfig,
130
-    postCancelStock,
131
-  } from '@/api/stock'
132
-  import SalesReturnDialog from './Dialog/salesReturnDialog'
133
-
134
-  export default {
135
-    components: { SalesReturnDialog},
136
-    name: 'salesReturnOrderAdd',
137
-
138
-    data() {
139
-      return {
140
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
141
-        return_time: '',
142
-        currentIndex: 0,
143
-        type:2,
144
-        recordInfo: {
145
-          recordData: [],
146
-        },
147
-        tableRules: {
148
-          return_count: [
149
-            { required: true, message: '数量不能为空', trigge: 'blur' }
150
-          ],
151
-        },
152
-        ruleForm: {
153
-          manufacturer: [
154
-            { required: true, message: '请选择厂商', trigger: 'change' }
155
-          ]
156
-
157
-        },
158
-        // prop
159
-        isVisibility: false,
160
-        propForm: {
161
-          goodType: [],
162
-          goodInfo: [],
163
-          goodUnit: [],
164
-        },
165
-        form: {
166
-          manufacturer: '',
167
-          dealer: ''
168
-        },
169
-
170
-        manufacturer: [],
171
-        dealer: [],
172
-        goodType: []
173
-      }
174
-    },
175
-    methods: {
176
-      comfirm: function(val) {
177
-        this.isVisibility = false
178
-        if (val.selectedGoodInfo.length > 0) {
179
-          for (let i = val.selectedGoodInfo.length - 1; ;i--) {
180
-            if (i == 0) {
181
-              this.recordInfo.recordData[this.currentIndex].good_type_id = val.goodTypeId
182
-              this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
183
-            } else {
184
-              const tempForm = {}
185
-              tempForm['good_type_id'] = val.goodTypeId
186
-              tempForm['good_id'] = val.selectedGoodInfo[i].id
187
-              tempForm['return_count'] = ''
188
-              this.recordInfo.recordData.push(tempForm)
189
-            }
190
-          }
191
-        }
192
-
193
-        this.currentIndex = -1
194
-      }, cancle: function() {
195
-        this.isVisibility = false
196
-      }, GetConfigInfo: function() {
197
-        getCancelStockConfig().then(response => {
198
-          if (response.data.state == 0) {
199
-            this.$message.error(response.data.msg)
200
-            return false
201
-          } else {
202
-            var warehouseOutList =  response.data.data.warehouseOutList
203
-            var warehouseOutInfoList =  response.data.data.warehouseOutInfoList
204
-            for (let i = 0; i <warehouseOutList.length; i++ ){
205
-              if(warehouseOutList[i].Manufacturer.id > 0){
206
-                this.manufacturer.push(warehouseOutList[i].Manufacturer)
207
-              }
208
-              if(warehouseOutList[i].Dealer.id > 0){
209
-                this.dealer.push(warehouseOutList[i].Dealer)
210
-              }
211
-            }
212
-
213
-            for (let i = 0; i < warehouseOutInfoList.length; i++) {
214
-              this.propForm.goodInfo.push(warehouseOutInfoList[i].GoodInfo)
215
-
216
-            }
217
-
218
-
219
-            const obj = {}
220
-            const obj2 = {}
221
-            const obj4 = {}
222
-            //去重复
223
-            this.manufacturer =  this.manufacturer.reduce((cur, next) => {
224
-              obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
225
-              return cur
226
-            }, [])
227
-            //去重复
228
-            this.dealer =  this.dealer.reduce((cur, next) => {
229
-              obj2[next.id] ? '' : obj2[next.id] = true && cur.push(next)
230
-              return cur
231
-            }, [])
232
-            this.propForm.goodInfo = this.propForm.goodInfo.reduce((cur, next) => {
233
-              obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
234
-              return cur
235
-            }, [])
236
-
237
-
238
-          }
239
-        })
240
-      }, typeName: function(good_type_id) {
241
-        let name = ''
242
-        for (let i = 0; i < this.propForm.goodType.length; i++) {
243
-          if (this.propForm.goodType[i].id == good_type_id) {
244
-            name = this.propForm.goodType[i].type_name
245
-          }
246
-        }
247
-        return name
248
-      }, specificationName: function(good_info_id) {
249
-        let name = ''
250
-        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
251
-          if (this.propForm.goodInfo[i].id == good_info_id) {
252
-            name = this.propForm.goodInfo[i].specification_name
253
-          }
254
-        }
255
-        return name
256
-      }, handleEdit: function(index, row) {
257
-        const tempObj = {}
258
-        tempObj['good_type_id'] = 0
259
-        tempObj['good_id'] = 0
260
-        tempObj['return_count'] = ''
261
-        this.recordInfo.recordData.push(tempObj)
262
-      }, handleDelete: function(index, row) {
263
-        this.recordInfo.recordData.splice(index, 1)
264
-      }, calculate: function(val) {
265
-
266
-        if (val == 0) {
267
-          return ''
268
-        }
269
-
270
-        return Math.round(parseFloat(val) * 100) / 100
271
-      }, getTime(val, temp) {
272
-        if (val != 0) {
273
-          return uParseTime(val, temp)
274
-        } else {
275
-          return ''
276
-        }
277
-      }, showDialog(index, row) {
278
-        this.currentIndex = index
279
-        if (this.form.manufacturer == '' || this.form.manufacturer == 0) {
280
-          this.$message.error('请先选择厂商')
281
-          return
282
-        } else {
283
-          this.isVisibility = true
284
-          console.log(this.form.manufacturer)
285
-          for (let i = 0; i < this.propForm.goodInfo.length; i++){
286
-            if(this.propForm.goodInfo[i].manufacturer == this.form.manufacturer){
287
-              this.propForm.goodType.push(this.propForm.goodInfo[i].GoodsType)
288
-            }
289
-
290
-          }
291
-          const obj3 = {}
292
-          this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
293
-            obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
294
-            return cur
295
-          }, [])
296
-
297
-
298
-
299
-        }
300
-      }, back() {
301
-        this.$router.go(-1)
302
-      }, submit() {
303
-        this.$refs['tableForm'].validate((valid) => {
304
-          if (valid) {
305
-            if (this.form.manufacturer == 0) {
306
-              this.$message.error('厂商不能为空')
307
-              return
308
-            }
309
-            const array = this.recordInfo.recordData
310
-            let total = 0
311
-            for (let i = 0; i < array.length; i++) {
312
-              if (array[i].good_type_id == 0) {
313
-                this.$message.error('物品类型不能为空')
314
-                return
315
-              }
316
-              if (array[i].good_id == 0) {
317
-                this.$message.error('规格名称不能为空')
318
-                return
319
-              }
320
-              total = total + array[i].price * array[i].return_count
321
-            }
322
-            const params = {
323
-              'cancelStock': this.recordInfo.recordData
324
-            }
325
-            postCancelStock(params,this.return_time,this.form.manufacturer,this.form.dealer,this.type).then(response=>{
326
-              if (response.data.state==0) {
327
-                this.$message.error(response.data.msg);
328
-                return false;
329
-              }else {
330
-                this.$notify({
331
-                  title: "成功",
332
-                  message: "退货成功",
333
-                  type: "success",
334
-                  duration: 2000
335
-                });
336
-                this.recordInfo.recordData = []
337
-                this.$router.back(-1)
338
-              }
339
-            });
340
-          } else {
341
-            return false
342
-          }
343
-        })
344
-      }
345
-    },
346
-    created() {
347
-      var year = new Date().getFullYear()
348
-      var month = new Date().getMonth() + 1
349
-      var day = new Date().getDate()
350
-      if (parseInt(month) < 10) {
351
-        month = '0' + month
352
-      }
353
-      if (parseInt(day) < 10) {
354
-        day = '0' + day
355
-      }
356
-      const endTime = year + '-' + month + '-' + day
357
-      this.return_time = endTime
358
-      const tempObj = {}
359
-      tempObj['good_type_id'] = 0
360
-      tempObj['good_id'] = 0
361
-      tempObj['return_count'] = ''
362
-      this.recordInfo.recordData.push(tempObj)
363
-      this.GetConfigInfo()
364
-      this.propForm.goodUnit = this.$store.getters.good_unit
365
-    }
366
-
367
-  }
368
-</script>
369
-
370
-<style rel="stylesheet/css" lang="scss" scoped>
371
-  .information {
372
-    border: 1px #dcdfe6 solid;
373
-    padding: 30px 20px 30px 20px;
374
-
375
-  .border {
376
-    border-bottom: 1px #dcdfe6 solid;
377
-    margin: 0px 0 20px 0;
378
-  }
379
-  }
380
-
381
-  .title {
382
-    background: #409eff;
383
-    height: 44px;
384
-    line-height: 44px;
385
-    padding: 0 0 0 10px;
386
-    color: #fff;
387
-    margin: 0 0 10px 0;
388
-  // border-radius: 4px 4px 0 0;
389
-  }
390
-
391
-  .edit_separater {
392
-    border-top: 1px solid rgb(233, 233, 233);
393
-    margin-top: 15px;
394
-    margin-bottom: 15px;
395
-  }
396
-
397
-</style>
398
-
399
-<style>
400
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
401
-    font-size: 12px;
402
-  }
403
-
404
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
405
-    background: #6fb5fa;
406
-  }
407
-
408
-</style>

+ 0 - 232
src/xt_pages/stock/otherCancelStockOrderDetail.vue Bestand weergeven

@@ -1,232 +0,0 @@
1
-<template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <div class="filter-container">
6
-      <span style="font-size: 20px">退货单详情</span>
7
-      <el-row style="float:right;">
8
-        <span>{{CancelStockInfo.cancelStock.order_number}}</span>
9
-      </el-row>
10
-    </div>
11
-
12
-
13
-
14
-    <div class="filter-container">
15
-      <span>单据日期:  {{CancelStockInfo.cancelStock.return_time | parseTime('{y}-{m}-{d}')}} </span>
16
-      <span>厂商 {{getManufactuerName(CancelStockInfo.cancelStock.manufacturer)}}</span>
17
-      <span>经销商 {{getDealerName(CancelStockInfo.cancelStock.dealer)}}</span>
18
-    </div>
19
-
20
-    <div class="filter-container" style="margin-top: 10px">
21
-      <el-button size="small" icon="el-icon-edit" @click="editRecord">编辑</el-button>
22
-      <el-button size="small" icon="el-icon-delete" @click="deleteRecord">删除</el-button>
23
-    </div>
24
-
25
-    <el-row :gutter="12" style="margin-top: 10px">
26
-      <el-table :data="CancelStockInfo.cancelStockInfoData" :class="signAndWeighBoxPatients" style="width: 100%" border
27
-      >
28
-        <el-table-column min-width="35" align="center">
29
-          <template slot="header" slot-scope="scope">
30
-            <span>物品类型</span>
31
-          </template>
32
-
33
-          <template slot-scope="scope">
34
-            <span v-if="scope.row.good_type_id != 0">{{getTypeName(scope.row.good_type_id)}}</span>
35
-          </template>
36
-        </el-table-column>
37
-        <el-table-column min-width="35" align="center">
38
-          <template slot="header" slot-scope="scope">
39
-            <span>规格名称</span>
40
-          </template>
41
-          <template slot-scope="scope">
42
-            <span v-if="scope.row.good_id != 0">{{getSpecificationName(scope.row.good_id)}}</span>
43
-          </template>
44
-        </el-table-column>
45
-
46
-        <el-table-column min-width="23" align="center">
47
-          <template slot="header" slot-scope="scope">
48
-            <span>退货数量</span>
49
-          </template>
50
-          <template slot-scope="scope">
51
-            <span>{{scope.row.count}}</span>
52
-
53
-          </template>
54
-        </el-table-column>
55
-
56
-
57
-      </el-table>
58
-    </el-row>
59
-  </div>
60
-</template>
61
-
62
-<script>
63
-  import { uParseTime } from '@/utils/tools'
64
-  import { GetAllConfig,getCancelStockInfo,deleteCancelStock } from '@/api/stock'
65
-
66
-  export default {
67
-    name: 'cancelStockOrderDetail',
68
-    created() {
69
-      const order_id = this.$route.query.id
70
-      this.GetConfigInfo()
71
-      this.GetOrderDetail(order_id)
72
-    },
73
-    data() {
74
-      return {
75
-        isEdit: 0,
76
-        checked: false,
77
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
78
-        goodType: [],
79
-        goodInfo: [],
80
-        manufacturer: [],
81
-        dealer: [],
82
-
83
-        CancelStockInfo: {
84
-          loading: false,
85
-          cancelStockInfoData: [],
86
-          cancelStock: {}
87
-        }
88
-      }
89
-    },
90
-    methods: {
91
-      getSpecificationName: function(id) {
92
-        let name = ''
93
-        for (let i = 0; i < this.goodInfo.length; i++) {
94
-          if (this.goodInfo[i].id == id) {
95
-            name = this.goodInfo[i].specification_name
96
-          }
97
-        }
98
-        return name
99
-      }, getTypeName: function(id) {
100
-        let name = ''
101
-        for (let i = 0; i < this.goodType.length; i++) {
102
-          if (this.goodType[i].id == id) {
103
-            name = this.goodType[i].type_name
104
-          }
105
-        }
106
-        return name
107
-      }, GetConfigInfo: function() {
108
-        GetAllConfig().then(response => {
109
-          if (response.data.state == 0) {
110
-            this.$message.error(response.data.msg)
111
-            return false
112
-          } else {
113
-            this.manufacturer = response.data.data.manufacturer
114
-            this.dealer = response.data.data.dealer
115
-            this.goodInfo = response.data.data.goodInfo
116
-            this.goodType = response.data.data.goodType
117
-          }
118
-        })
119
-      }, getManufactuerName: function(manufacturer_id) {
120
-        for (let i = 0; i < this.manufacturer.length; i++) {
121
-          if (this.manufacturer[i].id == manufacturer_id) {
122
-            return this.manufacturer[i].manufacturer_name
123
-          }
124
-        }
125
-      }, getDealerName: function(dealer_id) {
126
-        for (let i = 0; i < this.dealer.length; i++) {
127
-          if (this.dealer[i].id == dealer_id) {
128
-            return this.dealer[i].dealer_name
129
-          }
130
-        }
131
-      }, calculate: function(val) {
132
-        if (val == 0) {
133
-          return ''
134
-        }
135
-        return Math.round(parseFloat(val) * 100) / 100
136
-      }, GetOrderDetail: function(order_id) {
137
-        const params = {
138
-          'id': order_id
139
-        }
140
-        getCancelStockInfo(params).then(response => {
141
-          if (response.data.state == 0) {
142
-            this.$message.error(response.data.msg)
143
-            return false
144
-          } else {
145
-            for (let i = 0; i < response.data.data.list.length; i++) {
146
-              this.CancelStockInfo.cancelStockInfoData.push(response.data.data.list[i])
147
-            }
148
-            this.CancelStockInfo.cancelStock = response.data.data.info
149
-          }
150
-        })
151
-      }, deleteRecord: function() {
152
-        const ids = []
153
-        ids.push(this.CancelStockInfo.cancelStock.id)
154
-        const idStr = ids.join(',')
155
-
156
-        const params = {
157
-          ids: idStr
158
-        }
159
-
160
-        this.$confirm('确认删除退货单?', '删除退货单记录', {
161
-          confirmButtonText: '确定',
162
-          cancelButtonText: '取消',
163
-          type: 'warning'
164
-        }).then(() => {
165
-          deleteCancelStock(params).then(response => {
166
-            if (response.data.state == 0) {
167
-              this.$message.error(response.data.msg)
168
-              return false
169
-            } else {
170
-              this.$notify({
171
-                title: '成功',
172
-                message: '删除成功',
173
-                type: 'success',
174
-                duration: 2000
175
-              })
176
-
177
-              this.$router.back(-1)
178
-            }
179
-          })
180
-        }).catch(() => {
181
-        })
182
-      }, editRecord: function() {
183
-        this.$emit('edit-record')
184
-      }
185
-    }
186
-  }
187
-</script>
188
-
189
-<style rel="stylesheet/css" lang="scss" scoped>
190
-  .information {
191
-    border: 1px #dcdfe6 solid;
192
-    padding: 30px 20px 30px 20px;
193
-
194
-  .border {
195
-    border-bottom: 1px #dcdfe6 solid;
196
-    margin: 0px 0 20px 0;
197
-  }
198
-
199
-  }
200
-
201
-  .title {
202
-    background: #409eff;
203
-    height: 44px;
204
-    line-height: 44px;
205
-    padding: 0 0 0 10px;
206
-    color: #fff;
207
-    margin: 0 0 10px 0;
208
-  }
209
-
210
-  .edit_separater {
211
-    border-top: 1px solid rgb(233, 233, 233);
212
-    margin-top: 15px;
213
-    margin-bottom: 15px;
214
-  }
215
-
216
-</style>
217
-
218
-<style>
219
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
220
-    font-size: 12px;
221
-  }
222
-
223
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
224
-    background: #6fb5fa;
225
-  }
226
-
227
-  .count {
228
-    color: #bd2c00;
229
-
230
-  }
231
-
232
-</style>

+ 0 - 391
src/xt_pages/stock/otherCancelStockOrderEdit.vue Bestand weergeven

@@ -1,391 +0,0 @@
1
-<template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <sales-return-dialog :propForm="propForm"
6
-                         :visibility="isVisibility"
7
-                         v-on:dialog-comfirm="comfirm"
8
-                         v-on:dialog-cancle="cancle"></sales-return-dialog>
9
-
10
-    <div class="filter-container">
11
-
12
-      <el-row>
13
-        <el-col :span="8">
14
-          <div>
15
-            <span>入库时间:</span>
16
-            <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
17
-                            type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
18
-                            value-format="yyyy-MM-dd"></el-date-picker>
19
-          </div>
20
-        </el-col>
21
-      </el-row>
22
-    </div>
23
-
24
-    <el-row>
25
-      <el-col>
26
-        <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
27
-          <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
28
-                    max-height="450"
29
-          >
30
-
31
-            <el-table-column label="操作" align="center" min-width="30">
32
-              <template slot-scope="scope">
33
-                <el-button
34
-                  size="mini"
35
-                  @click="handleEdit(scope.$index, scope.row)">+
36
-                </el-button>
37
-                <el-button
38
-                  size="mini"
39
-                  type="danger"
40
-                  @click="handleDelete(scope.$index, scope.row)">-
41
-                </el-button>
42
-              </template>
43
-            </el-table-column>
44
-
45
-            <el-table-column min-width="35" align="center">
46
-
47
-              <template slot="header" slot-scope="scope">
48
-                <span>物品类型<span style="color: red">*</span></span>
49
-              </template>
50
-
51
-              <template slot-scope="scope">
52
-                <el-form-item style="padding-top: 15px">
53
-                  <el-input placeholder="请输入物品类型" v-model="scope.row.good_type_id"
54
-                            :value="typeName(scope.row.good_type_id)"
55
-                            @focus="showDialog(scope.$index, scope.row)"></el-input>
56
-                </el-form-item>
57
-              </template>
58
-            </el-table-column>
59
-            <el-table-column min-width="35" align="center">
60
-              <template slot="header" slot-scope="scope">
61
-                <span>规格名称<span style="color: red">*</span></span>
62
-              </template>
63
-              <template slot-scope="scope">
64
-
65
-                <el-form-item style="padding-top: 15px">
66
-                  <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
67
-                            :value="specificationName(scope.row.good_id)"
68
-                            @focus="showDialog(scope.$index, scope.row)"></el-input>
69
-                </el-form-item>
70
-
71
-              </template>
72
-            </el-table-column>
73
-
74
-
75
-            <el-table-column min-width="23" align="center">
76
-              <template slot="header" slot-scope="scope">
77
-                <span>退货数量<span style="color: red">*</span></span>
78
-              </template>
79
-              <template slot-scope="scope">
80
-                <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
81
-                              style="padding-top: 17px">
82
-                  <el-input type="number" v-model="scope.row.count"></el-input>
83
-                </el-form-item>
84
-              </template>
85
-            </el-table-column>
86
-
87
-
88
-          </el-table>
89
-        </el-form>
90
-      </el-col>
91
-
92
-
93
-      <span class="dialog-footer" style="margin-top: 20px;float:right">
94
-        <el-button @click="back()">取 消</el-button>
95
-        <el-button type="primary" @click="submit()">确 定</el-button>
96
-      </span>
97
-
98
-    </el-row>
99
-  </div>
100
-</template>
101
-
102
-<script>
103
-  import { uParseTime } from '@/utils/tools'
104
-
105
-  import {
106
-    deleteCancelStockInfo,
107
-    getCancelStockInfo,
108
-    getCancelStockConfig,
109
-    editCancelStockInfo
110
-  } from '@/api/stock'
111
-  import SalesReturnDialog from './Dialog/salesReturnDialog'
112
-
113
-  export default {
114
-    components: { SalesReturnDialog },
115
-    name: 'cancelStockOrderEdit',
116
-
117
-    data() {
118
-      return {
119
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
120
-        warehousing_time: '',
121
-        adminUserOptions: null,
122
-        currentIndex: 0,
123
-        return_time: '',
124
-        recordInfo: {
125
-          recordData: [],
126
-          stock_in_code: '',
127
-          current_index: ''
128
-
129
-        },
130
-        tableRules: {
131
-          count: [
132
-            { required: true, message: '数量不能为空', trigge: 'blur' }
133
-          ]
134
-
135
-        },
136
-        ruleForm: {
137
-          manufacturer: [
138
-            { required: true, message: '请选择厂商', trigger: 'change' }
139
-          ]
140
-
141
-        },
142
-
143
-        // prop
144
-        isVisibility: false,
145
-        propForm: {
146
-          goodType: [],
147
-          goodInfo: [],
148
-          goodUnit: [],
149
-          title: '入库'
150
-        },
151
-
152
-        form: {
153
-          manufacturer: '',
154
-          dealer: ''
155
-        },
156
-
157
-        cancelStock: {},
158
-        manufacturer: [],
159
-        dealer: [],
160
-        goodType: []
161
-      }
162
-    },
163
-    methods: {
164
-      comfirm: function(val) {
165
-        this.isVisibility = false
166
-        if (val.selectedGoodInfo.length > 0) {
167
-          for (let i = val.selectedGoodInfo.length - 1; ; i--) {
168
-            if (i == 0) {
169
-              this.recordInfo.recordData[this.currentIndex].good_type_id = val.goodTypeId
170
-              this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
171
-            } else {
172
-              const tempForm = {}
173
-              tempForm['id'] = 0
174
-              tempForm['good_type_id'] = val.goodTypeId
175
-              tempForm['good_id'] = val.selectedGoodInfo[i].id
176
-              tempForm['count'] = ''
177
-              this.recordInfo.recordData.push(tempForm)
178
-            }
179
-          }
180
-        }
181
-
182
-        this.currentIndex = -1
183
-      }, cancle: function() {
184
-        this.isVisibility = false
185
-      }, GetConfigInfo: function() {
186
-        getCancelStockConfig().then(response => {
187
-          if (response.data.state == 0) {
188
-            this.$message.error(response.data.msg)
189
-            return false
190
-          } else {
191
-            var warehouseOutInfoList = response.data.data.warehouseOutInfoList
192
-            for (let i = 0; i < warehouseOutInfoList.length; i++) {
193
-              this.propForm.goodInfo.push(warehouseOutInfoList[i].GoodInfo)
194
-              this.propForm.goodType.push(warehouseOutInfoList[i].GoodInfo.GoodsType)
195
-
196
-            }
197
-            const obj3 = {}
198
-            const obj4 = {}
199
-            this.propForm.goodInfo = this.propForm.goodInfo.reduce((cur, next) => {
200
-              obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
201
-              return cur
202
-            }, [])
203
-            this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
204
-              obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
205
-              return cur
206
-            }, [])
207
-          }
208
-        })
209
-      }, typeName: function(good_type_id) {
210
-        let name = ''
211
-        for (let i = 0; i < this.propForm.goodType.length; i++) {
212
-          if (this.propForm.goodType[i].id == good_type_id) {
213
-            name = this.propForm.goodType[i].type_name
214
-          }
215
-        }
216
-        return name
217
-      }, specificationName: function(good_info_id) {
218
-        let name = ''
219
-        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
220
-          if (this.propForm.goodInfo[i].id == good_info_id) {
221
-            name = this.propForm.goodInfo[i].specification_name
222
-          }
223
-        }
224
-        return name
225
-      }, handleEdit: function(index, row) {
226
-        const tempObj = {}
227
-        tempObj['id'] = 0
228
-        tempObj['good_type_id'] = 0
229
-        tempObj['good_id'] = 0
230
-        tempObj['count'] = ''
231
-        this.recordInfo.recordData.push(tempObj)
232
-      }, handleDelete: function(index, row) {
233
-        if (row.id == 0) {
234
-          this.recordInfo.recordData.splice(index, 1)
235
-        } else {
236
-          const params = {
237
-            id: row.id
238
-          }
239
-          this.$confirm('确认删除该退库物品信息记录?', '删除退库物品信息记录', {
240
-            confirmButtonText: '确定',
241
-            cancelButtonText: '取消',
242
-            type: 'warning'
243
-          }).then(() => {
244
-            deleteCancelStockInfo(params).then(response => {
245
-              if (response.data.state == 0) {
246
-                this.$message.error(response.data.msg)
247
-                return false
248
-              } else {
249
-                this.$notify({
250
-                  title: '成功',
251
-                  message: '删除成功',
252
-                  type: 'success',
253
-                  duration: 2000
254
-                })
255
-                this.recordInfo.recordData.splice(index, 1)
256
-              }
257
-            })
258
-          }).catch(() => {
259
-          })
260
-        }
261
-      }, getTime(val, temp) {
262
-        if (val != 0) {
263
-          return uParseTime(val, temp)
264
-        } else {
265
-          return ''
266
-        }
267
-      }, showDialog(index, row) {
268
-        this.currentIndex = index
269
-
270
-        this.isVisibility = true
271
-        console.log(this.form.manufacturer)
272
-        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
273
-          if (this.propForm.goodInfo[i].manufacturer == this.form.manufacturer) {
274
-            this.propForm.goodType.push(this.propForm.goodInfo[i].GoodsType)
275
-          }
276
-        }
277
-        const obj3 = {}
278
-        this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
279
-          obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
280
-          return cur
281
-        }, [])
282
-
283
-      }, back() {
284
-        this.$router.go(-1)
285
-      }, submit() {
286
-        this.$refs['tableForm'].validate((valid) => {
287
-          if (valid) {
288
-            const array = this.recordInfo.recordData
289
-            for (let i = 0; i < array.length; i++) {
290
-              if (array[i].good_type_id == 0) {
291
-                this.$message.error('物品类型不能为空')
292
-                return
293
-              }
294
-              if (array[i].good_id == 0) {
295
-                this.$message.error('规格名称不能为空')
296
-                return
297
-              }
298
-            }
299
-
300
-            const params = {
301
-              'cancelStock': this.recordInfo.recordData
302
-            }
303
-            editCancelStockInfo(params, this.return_time, this.$route.query.id).then(response => {
304
-              if (response.data.state == 0) {
305
-                this.$message.error(response.data.msg)
306
-                return false
307
-              } else {
308
-                this.$notify({
309
-                  title: '成功',
310
-                  message: '退库成功',
311
-                  type: 'success',
312
-                  duration: 2000
313
-                })
314
-                this.$router.back(-1)
315
-              }
316
-            })
317
-          } else {
318
-            return false
319
-          }
320
-        })
321
-      }, GetOrderDetail: function(order_id) {
322
-        const params = {
323
-          'id': order_id
324
-        }
325
-        getCancelStockInfo(params).then(response => {
326
-          if (response.data.state == 0) {
327
-            this.$message.error(response.data.msg)
328
-            return false
329
-          } else {
330
-            for (let i = 0; i < response.data.data.list.length; i++) {
331
-              response.data.data.list[i].count =  response.data.data.list[i].count.toString();
332
-              this.recordInfo.recordData.push(response.data.data.list[i])
333
-            }
334
-            this.cancelStock = response.data.data.info
335
-            this.return_time = this.getTime(this.cancelStock.return_time, '{y}-{m}-{d}')
336
-            this.form.manufacturer = this.cancelStock.manufacturer
337
-            this.form.dealer = this.cancelStock.dealer
338
-          }
339
-        })
340
-      }
341
-    },
342
-    created() {
343
-      this.GetConfigInfo()
344
-      this.propForm.goodUnit = this.$store.getters.good_unit
345
-      const order_id = this.$route.query.id
346
-      this.GetOrderDetail(order_id)
347
-    }
348
-
349
-  }
350
-</script>
351
-
352
-<style rel="stylesheet/css" lang="scss" scoped>
353
-  .information {
354
-    border: 1px #dcdfe6 solid;
355
-    padding: 30px 20px 30px 20px;
356
-
357
-  .border {
358
-    border-bottom: 1px #dcdfe6 solid;
359
-    margin: 0px 0 20px 0;
360
-  }
361
-
362
-  }
363
-
364
-  .title {
365
-    background: #409eff;
366
-    height: 44px;
367
-    line-height: 44px;
368
-    padding: 0 0 0 10px;
369
-    color: #fff;
370
-    margin: 0 0 10px 0;
371
-    border-radius: 4px 4px 0 0;
372
-  }
373
-
374
-  .edit_separater {
375
-    border-top: 1px solid rgb(233, 233, 233);
376
-    margin-top: 15px;
377
-    margin-bottom: 15px;
378
-  }
379
-
380
-</style>
381
-
382
-<style>
383
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
384
-    font-size: 12px;
385
-  }
386
-
387
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
388
-    background: #6fb5fa;
389
-  }
390
-
391
-</style>

+ 0 - 24
src/xt_pages/stock/otherSalesReturnDetail.vue Bestand weergeven

@@ -1,24 +0,0 @@
1
-<template>
2
-  <other-sales-return-order-detaill v-if="isEdit == 0"   v-on:edit-record="isEdit = 1"></other-sales-return-order-detaill>
3
-  <other-sales-reuturn-order-edit v-else></other-sales-reuturn-order-edit>
4
-</template>
5
-
6
-<script>
7
-  import OtherSalesReturnOrderDetail from './otherSalesReturnOrderDetail'
8
-  import OtherSalesReturnOrderEdit from './otherSalesReturnOrderEdit'
9
-  export default {
10
-    name: 'otherSalesReturnDetail',
11
-    components: { OtherSalesReturnOrderEdit, OtherSalesReturnOrderDetail},
12
-    data() {
13
-      return {
14
-        isEdit: 0
15
-      }
16
-    }
17
-
18
-  }
19
-
20
-</script>
21
-
22
-<style scoped>
23
-
24
-</style>

+ 131 - 124
src/xt_pages/stock/otherSalesReturnOrder.vue Bestand weergeven

@@ -1,118 +1,127 @@
1 1
 <template>
2 2
 
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-
6
-    <div class="filter-container">
7
-
8
-
9
-      <el-row style="float:right;">
10
-        <el-button @click="AddNewOrder" type="primary">新增</el-button>
11
-      </el-row>
12
-    </div>
13
-
14
-    <div class="filter-container" style="margin-top:20px">
15
-      <el-input style="width: 300px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
16
-      <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
3
+  <div class="main-contain">
4
+    <div class="position">
5
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
6
+      <el-button size="small" @click="AddNewOrder" class="filter-item" style="float:right;" type="primary"
7
+                 icon="el-icon-circle-plus-outline">新增
8
+      </el-button>
17 9
     </div>
18 10
 
19
-    <div class="filter-container">
20
-      <span>入库时间:</span>
21
-      <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
-                      value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
24
-      <span class="">-</span>
25
-      <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
26
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
-                      value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
28
-    </div>
29
-
30
-    <div class="filter-container" style="margin-top: 10px">
31
-      <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
32
-      <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
11
+    <div class="app-container">
12
+
13
+      <div class="filter-container" style="margin-top:20px">
14
+        <el-input style="width: 300px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
15
+        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
16
+      </div>
17
+
18
+      <div class="cell">
19
+        <label class="title"><span class="name">退货时间</span> : </label>
20
+
21
+        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
+                        value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
24
+        <span class="">-</span>
25
+        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
26
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
+                        value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
28
+      </div>
29
+
30
+      <div class="filter-container" style="margin-top: 10px">
31
+        <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
32
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
33
+
34
+      </div>
35
+
36
+      <el-row :gutter="12" style="margin-top: 10px">
37
+        <el-table
38
+          :data="saleReturnDate"
39
+          :class="signAndWeighBoxPatients"
40
+          style="width: 100%" border
41
+          highlight-current-row
42
+          ref="multipleTable"
43
+          @selection-change="select"
44
+          :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
45
+
46
+        >
47
+          <el-table-column
48
+            type="selection"
49
+            width="55">
50
+          </el-table-column>
51
+
52
+          <el-table-column label="单据日期" align="center">
53
+            <template slot-scope="scope">
54
+              {{ scope.row.opera_time | parseTime('{y}-{m}-{d}')}}
55
+            </template>
56
+          </el-table-column>
57
+
58
+          <el-table-column label="单据编号" align="center">
59
+            <template slot-scope="scope">
60
+              {{scope.row.order_number}}
61
+            </template>
62
+          </el-table-column>
63
+
64
+          <el-table-column label="制单人" align="center">
65
+            <template slot-scope="scope">
66
+              {{getXuserName(scope.row.creater)}}
67
+            </template>
68
+          </el-table-column>
69
+
70
+
71
+          <el-table-column label="厂家" align="center">
72
+            <template slot-scope="scope">
73
+              {{getManufactuerName(scope.row.manufacturer)}}
74
+            </template>
75
+          </el-table-column>
76
+
77
+          <el-table-column label="经销商" align="center">
78
+            <template slot-scope="scope">
79
+              {{getDealerName(scope.row.dealer)}}
80
+            </template>
81
+          </el-table-column>
82
+
83
+          <el-table-column label="操作" align="center">
84
+            <template slot-scope="scope">
85
+              <el-tooltip class="item" effect="dark" content="编辑" placement="top">
86
+
87
+              <el-button
88
+                size="mini"
89
+                type="primary"
90
+                icon="el-icon-edit"
91
+                @click="handleEdit(scope.$index, scope.row)">
92
+              </el-button>
93
+              </el-tooltip>
94
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
95
+
96
+              <el-button
97
+                size="mini"
98
+                type="danger"
99
+                icon="el-icon-delete"
100
+                @click="handleDelete(scope.$index, scope.row)">
101
+              </el-button>
102
+              </el-tooltip>
103
+
104
+
105
+            </template>
106
+          </el-table-column>
107
+
108
+        </el-table>
109
+
110
+        <el-pagination
111
+          @size-change="handleSizeChange"
112
+          @current-change="handleCurrentChange"
113
+          :page-sizes="[7]"
114
+          :page-size="7"
115
+          background
116
+          style="margin-top:20px;float: right"
117
+          layout="total, sizes, prev, pager, next, jumper"
118
+          :total="total">
119
+        </el-pagination>
33 120
 
121
+      </el-row>
34 122
     </div>
35
-
36
-    <el-row :gutter="12" style="margin-top: 10px">
37
-      <el-table
38
-        :data="saleReturnDate"
39
-        :class="signAndWeighBoxPatients"
40
-        style="width: 100%" border
41
-        highlight-current-row
42
-        ref="multipleTable"
43
-        @selection-change="select"
44
-
45
-      >
46
-        <el-table-column
47
-          type="selection"
48
-          width="55">
49
-        </el-table-column>
50
-
51
-        <el-table-column label="单据日期" align="center">
52
-          <template slot-scope="scope">
53
-            {{ scope.row.opera_time | parseTime('{y}-{m}-{d}')}}
54
-          </template>
55
-        </el-table-column>
56
-
57
-        <el-table-column label="单据编号" align="center">
58
-          <template slot-scope="scope">
59
-            {{scope.row.order_number}}
60
-          </template>
61
-        </el-table-column>
62
-
63
-        <el-table-column label="制单人" align="center">
64
-          <template slot-scope="scope">
65
-            {{getXuserName(scope.row.creater)}}
66
-          </template>
67
-        </el-table-column>
68
-
69
-
70
-        <el-table-column label="厂家" align="center">
71
-          <template slot-scope="scope">
72
-            {{getManufactuerName(scope.row.manufacturer)}}
73
-          </template>
74
-        </el-table-column>
75
-
76
-        <el-table-column label="经销商" align="center">
77
-          <template slot-scope="scope">
78
-            {{getDealerName(scope.row.dealer)}}
79
-          </template>
80
-        </el-table-column>
81
-
82
-        <el-table-column label="操作" align="center">
83
-          <template slot-scope="scope">
84
-            <el-button
85
-              size="mini"
86
-              type="primary"
87
-              icon="el-icon-edit"
88
-              @click="handleEdit(scope.$index, scope.row)">
89
-            </el-button>
90
-
91
-            <el-button
92
-              size="mini"
93
-              type="danger"
94
-              icon="el-icon-delete"
95
-              @click="handleDelete(scope.$index, scope.row)">
96
-            </el-button>
97
-
98
-          </template>
99
-        </el-table-column>
100
-
101
-      </el-table>
102
-
103
-      <el-pagination
104
-        @size-change="handleSizeChange"
105
-        @current-change="handleCurrentChange"
106
-        :page-sizes="[7]"
107
-        :page-size="7"
108
-        background
109
-        style="margin-top:20px;float: right"
110
-        layout="total, sizes, prev, pager, next, jumper"
111
-        :total="total">
112
-      </el-pagination>
113
-
114
-    </el-row>
115 123
   </div>
124
+
116 125
 </template>
117 126
 
118 127
 <script>
@@ -121,13 +130,15 @@
121 130
   import {
122 131
     deleteSalesReturn,
123 132
     GetAllConfig,
124
-    getWarehouseInfoList,
125 133
     getSalesReturnList,
134
+    getWarehouseInfoList,
126 135
     getWarehouseList
127 136
   } from '@/api/stock'
137
+  import BreadCrumb from '../components/bread-crumb'
128 138
 
129 139
   export default {
130
-    name: 'otherSalesReturnOrder',
140
+    name: 'salesReturnOrder',
141
+    components: { BreadCrumb },
131 142
     created() {
132 143
       var year = new Date().getFullYear()
133 144
       var month = new Date().getMonth() + 1
@@ -158,7 +169,11 @@
158 169
     },
159 170
     data() {
160 171
       return {
161
-        type:2,
172
+        crumbs: [
173
+          { path: false, name: '库存管理' },
174
+          { path: '/stock/return', name: '其他退货单' }
175
+        ],
176
+        type: 2,
162 177
         page: 1,
163 178
         limit: 7,
164 179
         checked: false,
@@ -175,13 +190,13 @@
175 190
         goodInfo: [],
176 191
         manufacturer: [],
177 192
         selectedTableData: [],
178
-        dealer: [],
193
+        dealer: []
179 194
 
180 195
       }
181 196
     },
182 197
     methods: {
183
-      AddNewOrder:function(){
184
-        this.$router.push({ name: 'salesReturnOrderAdd'})
198
+      AddNewOrder: function() {
199
+        this.$router.push({ name: 'salesReturnOrderAdd', query: { type: this.type }})
185 200
       },
186 201
       GetSalesReturn: function() {
187 202
         const Params = {
@@ -189,7 +204,7 @@
189 204
           limit: this.limit,
190 205
           start_time: this.start_time,
191 206
           end_time: this.end_time,
192
-          type: this.type,
207
+          type: this.type
193 208
         }
194 209
         this.saleReturnDate = []
195 210
         getSalesReturnList(Params).then(response => {
@@ -272,7 +287,7 @@
272 287
           }
273 288
         }
274 289
       }, handleEdit: function(index, row) {
275
-        this.$router.push({ name: 'salesReturnDetail', query: { id: row.id }})
290
+        this.$router.push({ name: 'salesReturnDetail', query: { id: row.id, type: this.type }})
276 291
       }, handleDelete: function(index, row) {
277 292
         const ids = []
278 293
         ids.push(row.id)
@@ -375,15 +390,7 @@
375 390
 
376 391
   }
377 392
 
378
-  .title {
379
-    background: #409eff;
380
-    height: 44px;
381
-    line-height: 44px;
382
-    padding: 0 0 0 10px;
383
-    color: #fff;
384
-    margin: 0 0 10px 0;
385 393
 
386
-  }
387 394
 
388 395
   .edit_separater {
389 396
     border-top: 1px solid rgb(233, 233, 233);

+ 0 - 414
src/xt_pages/stock/otherSalesReturnOrderAdd.vue Bestand weergeven

@@ -1,414 +0,0 @@
1
-<template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <sales-return-dialog :propForm="propForm"
6
-                         :visibility="isVisibility"
7
-                         v-on:dialog-comfirm="comfirm"
8
-                         v-on:dialog-cancle="cancle"></sales-return-dialog>
9
-
10
-    <div class="filter-container">
11
-
12
-      <el-row>
13
-        <el-col :span="8"><div>
14
-          <span>退货时间:</span>
15
-          <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16
-                          type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17
-                          value-format="yyyy-MM-dd"></el-date-picker>
18
-        </div></el-col>
19
-
20
-
21
-        <el-col :span="8">
22
-          <div>
23
-            <el-form ref="form" :model="form" :rules="ruleForm" label-width="80px">
24
-              <el-form-item label="厂商:" prop="manufacturer">
25
-                <el-select v-model="form.manufacturer" placeholder="请选择厂商">
26
-                  <el-option v-for="(option, index) in manufacturer" :key="index" :label="option.manufacturer_name" :value="option.id"></el-option>
27
-                </el-select>
28
-              </el-form-item>
29
-            </el-form>
30
-          </div>
31
-        </el-col>
32
-        <el-col :span="8">
33
-          <div>
34
-            <el-form ref="form" :model="form" label-width="80px">
35
-              <el-form-item label="经销商:">
36
-                <el-select v-model="form.dealer" placeholder="请选择经销商">
37
-                  <el-option v-for="(option, index) in dealer" :key="index" :label="option.dealer_name" :value="option.id"></el-option>
38
-                </el-select>
39
-              </el-form-item>
40
-            </el-form>
41
-          </div>
42
-        </el-col>
43
-      </el-row>
44
-
45
-    </div>
46
-
47
-    <el-row>
48
-      <el-col>
49
-        <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
50
-          <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
51
-                    max-height="450"
52
-          >
53
-
54
-            <el-table-column label="操作" align="center" min-width="30">
55
-              <template slot-scope="scope">
56
-                <el-button
57
-                  size="mini"
58
-                  @click="handleEdit(scope.$index, scope.row)">+
59
-                </el-button>
60
-                <el-button
61
-                  size="mini"
62
-                  type="danger"
63
-                  @click="handleDelete(scope.$index, scope.row)">-
64
-                </el-button>
65
-              </template>
66
-            </el-table-column>
67
-
68
-            <el-table-column min-width="35" align="center">
69
-
70
-              <template slot="header" slot-scope="scope">
71
-                <span>物品类型<span style="color: red">*</span></span>
72
-              </template>
73
-
74
-              <template slot-scope="scope" >
75
-                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id == 0" style="color:#c5c8cf">请输入类型</span>-->
76
-                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
77
-
78
-                <el-form-item  style="padding-top: 15px">
79
-                  <el-input placeholder="请输入物品类型"  v-model="scope.row.good_type_id" :value="typeName(scope.row.good_type_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
80
-                </el-form-item>
81
-
82
-              </template>
83
-            </el-table-column>
84
-            <el-table-column min-width="35" align="center">
85
-              <template slot="header" slot-scope="scope">
86
-                <span>规格名称<span style="color: red">*</span></span>
87
-              </template>
88
-              <template slot-scope="scope">
89
-
90
-                <el-form-item  style="padding-top: 15px">
91
-                  <el-input placeholder="请输入规格名称"  v-model="scope.row.good_id" :value="specificationName(scope.row.good_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
92
-                </el-form-item>
93
-
94
-              </template>
95
-            </el-table-column>
96
-
97
-
98
-            <el-table-column  min-width="23" align="center">
99
-              <template slot="header" slot-scope="scope">
100
-                <span>退货数量<span style="color: red">*</span></span>
101
-              </template>
102
-              <template slot-scope="scope">
103
-                <!--{{scope.row.warehousing_count}}-->
104
-                <!--<el-input type="number" v-model="scope.row.warehousing_count"   @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
105
-
106
-                <el-form-item :prop="'recordData.' + scope.$index + '.return_count'" :rules='tableRules.return_count' style="padding-top: 17px">
107
-                  <el-input type="number"  v-model="scope.row.return_count" ></el-input>
108
-                </el-form-item>
109
-              </template>
110
-            </el-table-column>
111
-
112
-          </el-table>
113
-        </el-form>
114
-      </el-col>
115
-
116
-
117
-      <span  class="dialog-footer" style="margin-top: 20px;float:right">
118
-        <el-button @click="back()">取 消</el-button>
119
-        <el-button type="primary" @click="submit()">确 定</el-button>
120
-      </span>
121
-
122
-    </el-row>
123
-  </div>
124
-</template>
125
-
126
-<script>
127
-  import { uParseTime } from '@/utils/tools'
128
-  import {
129
-    getSalesReturnConfig,
130
-    postSalesReturn,
131
-  } from '@/api/stock'
132
-  import SalesReturnDialog from './Dialog/salesReturnDialog'
133
-
134
-  export default {
135
-    components: { SalesReturnDialog},
136
-    name: 'otherSalesReturnOrderAdd',
137
-
138
-    data() {
139
-      return {
140
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
141
-        return_time: '',
142
-        currentIndex: 0,
143
-        type:2,
144
-        recordInfo: {
145
-          recordData: [],
146
-        },
147
-        tableRules: {
148
-          price: [
149
-            { required: true, message: '单价不能为空', trigger: 'blur' }
150
-          ],
151
-          return_count: [
152
-            { required: true, message: '数量不能为空', trigge: 'blur' }
153
-          ],
154
-        },
155
-        ruleForm: {
156
-          manufacturer: [
157
-            { required: true, message: '请选择厂商', trigger: 'change' }
158
-          ]
159
-
160
-        },
161
-        // prop
162
-        isVisibility: false,
163
-        propForm: {
164
-          goodType: [],
165
-          goodInfo: [],
166
-          goodUnit: [],
167
-        },
168
-        form: {
169
-          manufacturer: '',
170
-          dealer: ''
171
-        },
172
-
173
-        manufacturer: [],
174
-        dealer: [],
175
-        goodType: []
176
-      }
177
-    },
178
-    methods: {
179
-      comfirm: function(val) {
180
-        this.isVisibility = false
181
-        if (val.selectedGoodInfo.length > 0) {
182
-          for (let i = val.selectedGoodInfo.length - 1; ;i--) {
183
-            if (i == 0) {
184
-              this.recordInfo.recordData[this.currentIndex].good_type_id = val.goodTypeId
185
-              this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
186
-            } else {
187
-              const tempForm = {}
188
-              tempForm['good_type_id'] = val.goodTypeId
189
-              tempForm['good_id'] = val.selectedGoodInfo[i].id
190
-              tempForm['return_count'] = ''
191
-              tempForm['price'] = ''
192
-              this.recordInfo.recordData.push(tempForm)
193
-            }
194
-          }
195
-        }
196
-
197
-        this.currentIndex = -1
198
-      }, cancle: function() {
199
-        this.isVisibility = false
200
-      }, GetConfigInfo: function() {
201
-        getSalesReturnConfig().then(response => {
202
-          if (response.data.state == 0) {
203
-            this.$message.error(response.data.msg)
204
-            return false
205
-          } else {
206
-            var warehouseList =  response.data.data.warehouseList
207
-            var warehouseInfoList =  response.data.data.warehouseInfoList
208
-            for (let i = 0; i <warehouseList.length; i++ ){
209
-              if(warehouseList[i].Manufacturer.id > 0){
210
-                this.manufacturer.push(warehouseList[i].Manufacturer)
211
-              }
212
-              if(warehouseList[i].Dealer.id > 0){
213
-                this.dealer.push(warehouseList[i].Dealer)
214
-              }
215
-            }
216
-
217
-            for (let i = 0; i < warehouseInfoList.length; i++) {
218
-              this.propForm.goodInfo.push(warehouseInfoList[i].GoodInfo)
219
-
220
-            }
221
-
222
-
223
-            const obj = {}
224
-            const obj2 = {}
225
-            const obj4 = {}
226
-            //去重复
227
-            this.manufacturer =  this.manufacturer.reduce((cur, next) => {
228
-              obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
229
-              return cur
230
-            }, [])
231
-            //去重复
232
-            this.dealer =  this.dealer.reduce((cur, next) => {
233
-              obj2[next.id] ? '' : obj2[next.id] = true && cur.push(next)
234
-              return cur
235
-            }, [])
236
-            this.propForm.goodInfo = this.propForm.goodInfo.reduce((cur, next) => {
237
-              obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
238
-              return cur
239
-            }, [])
240
-
241
-
242
-          }
243
-        })
244
-      }, typeName: function(good_type_id) {
245
-        let name = ''
246
-        for (let i = 0; i < this.propForm.goodType.length; i++) {
247
-          if (this.propForm.goodType[i].id == good_type_id) {
248
-            name = this.propForm.goodType[i].type_name
249
-          }
250
-        }
251
-        return name
252
-      }, specificationName: function(good_info_id) {
253
-        let name = ''
254
-        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
255
-          if (this.propForm.goodInfo[i].id == good_info_id) {
256
-            name = this.propForm.goodInfo[i].specification_name
257
-          }
258
-        }
259
-        return name
260
-      }, handleEdit: function(index, row) {
261
-        const tempObj = {}
262
-        tempObj['good_type_id'] = 0
263
-        tempObj['good_id'] = 0
264
-        tempObj['return_count'] = ''
265
-        tempObj['price'] = ''
266
-        this.recordInfo.recordData.push(tempObj)
267
-      }, handleDelete: function(index, row) {
268
-        this.recordInfo.recordData.splice(index, 1)
269
-      }, calculate: function(val) {
270
-
271
-        if (val == 0) {
272
-          return ''
273
-        }
274
-
275
-        return Math.round(parseFloat(val) * 100) / 100
276
-      }, getTime(val, temp) {
277
-        if (val != 0) {
278
-          return uParseTime(val, temp)
279
-        } else {
280
-          return ''
281
-        }
282
-      }, showDialog(index, row) {
283
-        this.currentIndex = index
284
-        if (this.form.manufacturer == '' || this.form.manufacturer == 0) {
285
-          this.$message.error('请先选择厂商')
286
-          return
287
-        } else {
288
-          this.isVisibility = true
289
-          console.log(this.form.manufacturer)
290
-          for (let i = 0; i < this.propForm.goodInfo.length; i++){
291
-            if(this.propForm.goodInfo[i].manufacturer == this.form.manufacturer){
292
-              this.propForm.goodType.push(this.propForm.goodInfo[i].GoodsType)
293
-            }
294
-
295
-          }
296
-          const obj3 = {}
297
-          this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
298
-            obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
299
-            return cur
300
-          }, [])
301
-
302
-
303
-
304
-        }
305
-      }, back() {
306
-        this.$router.go(-1)
307
-      }, submit() {
308
-        this.$refs['tableForm'].validate((valid) => {
309
-          if (valid) {
310
-            if (this.form.manufacturer == 0) {
311
-              this.$message.error('厂商不能为空')
312
-              return
313
-            }
314
-            const array = this.recordInfo.recordData
315
-            let total = 0
316
-            for (let i = 0; i < array.length; i++) {
317
-              if (array[i].good_type_id == 0) {
318
-                this.$message.error('物品类型不能为空')
319
-                return
320
-              }
321
-              if (array[i].good_id == 0) {
322
-                this.$message.error('规格名称不能为空')
323
-                return
324
-              }
325
-              total = total + array[i].price * array[i].return_count
326
-            }
327
-            const params = {
328
-              'salesReturn': this.recordInfo.recordData
329
-            }
330
-            postSalesReturn(params,this.return_time,total,this.form.dealer,this.form.manufacturer,this.type).then(response=>{
331
-              if (response.data.state==0) {
332
-                this.$message.error(response.data.msg);
333
-                return false;
334
-              }else {
335
-                this.$notify({
336
-                  title: "成功",
337
-                  message: "退货成功",
338
-                  type: "success",
339
-                  duration: 2000
340
-                });
341
-                this.recordInfo.recordData = []
342
-                this.$router.back(-1)
343
-              }
344
-            });
345
-          } else {
346
-            return false
347
-          }
348
-        })
349
-      }
350
-    },
351
-    created() {
352
-      var year = new Date().getFullYear()
353
-      var month = new Date().getMonth() + 1
354
-      var day = new Date().getDate()
355
-      if (parseInt(month) < 10) {
356
-        month = '0' + month
357
-      }
358
-      if (parseInt(day) < 10) {
359
-        day = '0' + day
360
-      }
361
-      const endTime = year + '-' + month + '-' + day
362
-      this.return_time = endTime
363
-      const tempObj = {}
364
-      tempObj['good_type_id'] = 0
365
-      tempObj['good_id'] = 0
366
-      tempObj['return_count'] = ''
367
-      tempObj['price'] = ''
368
-      this.recordInfo.recordData.push(tempObj)
369
-      this.GetConfigInfo()
370
-      this.propForm.goodUnit = this.$store.getters.good_unit
371
-    }
372
-
373
-  }
374
-</script>
375
-
376
-<style rel="stylesheet/css" lang="scss" scoped>
377
-  .information {
378
-    border: 1px #dcdfe6 solid;
379
-    padding: 30px 20px 30px 20px;
380
-
381
-  .border {
382
-    border-bottom: 1px #dcdfe6 solid;
383
-    margin: 0px 0 20px 0;
384
-  }
385
-  }
386
-
387
-  .title {
388
-    background: #409eff;
389
-    height: 44px;
390
-    line-height: 44px;
391
-    padding: 0 0 0 10px;
392
-    color: #fff;
393
-    margin: 0 0 10px 0;
394
-  // border-radius: 4px 4px 0 0;
395
-  }
396
-
397
-  .edit_separater {
398
-    border-top: 1px solid rgb(233, 233, 233);
399
-    margin-top: 15px;
400
-    margin-bottom: 15px;
401
-  }
402
-
403
-</style>
404
-
405
-<style>
406
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
407
-    font-size: 12px;
408
-  }
409
-
410
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
411
-    background: #6fb5fa;
412
-  }
413
-
414
-</style>

+ 0 - 232
src/xt_pages/stock/otherSalesReturnOrderDetail.vue Bestand weergeven

@@ -1,232 +0,0 @@
1
-<template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <div class="filter-container">
6
-      <span style="font-size: 20px">退货单详情</span>
7
-      <el-row style="float:right;">
8
-        <span>{{ReturnInfo.salesReturn.order_number}}</span>
9
-      </el-row>
10
-    </div>
11
-
12
-
13
-
14
-    <div class="filter-container">
15
-      <span>单据日期:  {{ReturnInfo.salesReturn.return_time | parseTime('{y}-{m}-{d}')}} </span>
16
-      <span>厂商 {{getManufactuerName(ReturnInfo.salesReturn.manufacturer)}}</span>
17
-      <span>经销商 {{getDealerName(ReturnInfo.salesReturn.dealer)}}</span>
18
-    </div>
19
-
20
-    <div class="filter-container" style="margin-top: 10px">
21
-      <el-button size="small" icon="el-icon-edit" @click="editRecord">编辑</el-button>
22
-      <el-button size="small" icon="el-icon-delete" @click="deleteRecord">删除</el-button>
23
-    </div>
24
-
25
-    <el-row :gutter="12" style="margin-top: 10px">
26
-      <el-table :data="ReturnInfo.returnInfoData" :class="signAndWeighBoxPatients" style="width: 100%" border
27
-      >
28
-        <el-table-column min-width="35" align="center">
29
-          <template slot="header" slot-scope="scope">
30
-            <span>物品类型</span>
31
-          </template>
32
-
33
-          <template slot-scope="scope">
34
-            <span v-if="scope.row.good_type_id != 0">{{getTypeName(scope.row.good_type_id)}}</span>
35
-          </template>
36
-        </el-table-column>
37
-        <el-table-column min-width="35" align="center">
38
-          <template slot="header" slot-scope="scope">
39
-            <span>规格名称</span>
40
-          </template>
41
-          <template slot-scope="scope">
42
-            <span v-if="scope.row.good_id != 0">{{getSpecificationName(scope.row.good_id)}}</span>
43
-          </template>
44
-        </el-table-column>
45
-
46
-        <el-table-column min-width="23" align="center">
47
-          <template slot="header" slot-scope="scope">
48
-            <span>退货数量</span>
49
-          </template>
50
-          <template slot-scope="scope">
51
-            <span>{{scope.row.count}}</span>
52
-
53
-          </template>
54
-        </el-table-column>
55
-
56
-
57
-      </el-table>
58
-    </el-row>
59
-  </div>
60
-</template>
61
-
62
-<script>
63
-  import { uParseTime } from '@/utils/tools'
64
-  import { GetAllConfig,getReturnList,deleteSalesReturn } from '@/api/stock'
65
-
66
-  export default {
67
-    name: 'otherSalesReturnOrderDetail',
68
-    created() {
69
-      const order_id = this.$route.query.id
70
-      this.GetConfigInfo()
71
-      this.GetOrderDetail(order_id)
72
-    },
73
-    data() {
74
-      return {
75
-        isEdit: 0,
76
-        checked: false,
77
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
78
-        goodType: [],
79
-        goodInfo: [],
80
-        manufacturer: [],
81
-        dealer: [],
82
-
83
-        ReturnInfo: {
84
-          loading: false,
85
-          returnInfoData: [],
86
-          salesReturn: {}
87
-        }
88
-      }
89
-    },
90
-    methods: {
91
-      getSpecificationName: function(id) {
92
-        let name = ''
93
-        for (let i = 0; i < this.goodInfo.length; i++) {
94
-          if (this.goodInfo[i].id == id) {
95
-            name = this.goodInfo[i].specification_name
96
-          }
97
-        }
98
-        return name
99
-      }, getTypeName: function(id) {
100
-        let name = ''
101
-        for (let i = 0; i < this.goodType.length; i++) {
102
-          if (this.goodType[i].id == id) {
103
-            name = this.goodType[i].type_name
104
-          }
105
-        }
106
-        return name
107
-      }, GetConfigInfo: function() {
108
-        GetAllConfig().then(response => {
109
-          if (response.data.state == 0) {
110
-            this.$message.error(response.data.msg)
111
-            return false
112
-          } else {
113
-            this.manufacturer = response.data.data.manufacturer
114
-            this.dealer = response.data.data.dealer
115
-            this.goodInfo = response.data.data.goodInfo
116
-            this.goodType = response.data.data.goodType
117
-          }
118
-        })
119
-      }, getManufactuerName: function(manufacturer_id) {
120
-        for (let i = 0; i < this.manufacturer.length; i++) {
121
-          if (this.manufacturer[i].id == manufacturer_id) {
122
-            return this.manufacturer[i].manufacturer_name
123
-          }
124
-        }
125
-      }, getDealerName: function(dealer_id) {
126
-        for (let i = 0; i < this.dealer.length; i++) {
127
-          if (this.dealer[i].id == dealer_id) {
128
-            return this.dealer[i].dealer_name
129
-          }
130
-        }
131
-      }, calculate: function(val) {
132
-        if (val == 0) {
133
-          return ''
134
-        }
135
-        return Math.round(parseFloat(val) * 100) / 100
136
-      }, GetOrderDetail: function(order_id) {
137
-        const params = {
138
-          'id': order_id
139
-        }
140
-        getReturnList(params).then(response => {
141
-          if (response.data.state == 0) {
142
-            this.$message.error(response.data.msg)
143
-            return false
144
-          } else {
145
-            for (let i = 0; i < response.data.data.list.length; i++) {
146
-              this.ReturnInfo.returnInfoData.push(response.data.data.list[i])
147
-            }
148
-            this.ReturnInfo.salesReturn = response.data.data.salesReturn
149
-          }
150
-        })
151
-      }, deleteRecord: function() {
152
-        const ids = []
153
-        ids.push(this.ReturnInfo.salesReturn.id)
154
-        const idStr = ids.join(',')
155
-
156
-        const params = {
157
-          ids: idStr
158
-        }
159
-
160
-        this.$confirm('确认删除退货单?', '删除退货单记录', {
161
-          confirmButtonText: '确定',
162
-          cancelButtonText: '取消',
163
-          type: 'warning'
164
-        }).then(() => {
165
-          deleteSalesReturn(params).then(response => {
166
-            if (response.data.state == 0) {
167
-              this.$message.error(response.data.msg)
168
-              return false
169
-            } else {
170
-              this.$notify({
171
-                title: '成功',
172
-                message: '删除成功',
173
-                type: 'success',
174
-                duration: 2000
175
-              })
176
-
177
-              this.$router.back(-1)
178
-            }
179
-          })
180
-        }).catch(() => {
181
-        })
182
-      }, editRecord: function() {
183
-        this.$emit('edit-record')
184
-      }
185
-    }
186
-  }
187
-</script>
188
-
189
-<style rel="stylesheet/css" lang="scss" scoped>
190
-  .information {
191
-    border: 1px #dcdfe6 solid;
192
-    padding: 30px 20px 30px 20px;
193
-
194
-  .border {
195
-    border-bottom: 1px #dcdfe6 solid;
196
-    margin: 0px 0 20px 0;
197
-  }
198
-
199
-  }
200
-
201
-  .title {
202
-    background: #409eff;
203
-    height: 44px;
204
-    line-height: 44px;
205
-    padding: 0 0 0 10px;
206
-    color: #fff;
207
-    margin: 0 0 10px 0;
208
-  }
209
-
210
-  .edit_separater {
211
-    border-top: 1px solid rgb(233, 233, 233);
212
-    margin-top: 15px;
213
-    margin-bottom: 15px;
214
-  }
215
-
216
-</style>
217
-
218
-<style>
219
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
220
-    font-size: 12px;
221
-  }
222
-
223
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
224
-    background: #6fb5fa;
225
-  }
226
-
227
-  .count {
228
-    color: #bd2c00;
229
-
230
-  }
231
-
232
-</style>

+ 0 - 391
src/xt_pages/stock/otherSalesReturnOrderEdit.vue Bestand weergeven

@@ -1,391 +0,0 @@
1
-<template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <sales-return-dialog :propForm="propForm"
6
-                         :visibility="isVisibility"
7
-                         v-on:dialog-comfirm="comfirm"
8
-                         v-on:dialog-cancle="cancle"></sales-return-dialog>
9
-
10
-    <div class="filter-container">
11
-
12
-      <el-row>
13
-        <el-col :span="8">
14
-          <div>
15
-            <span>入库时间:</span>
16
-            <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
17
-                            type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
18
-                            value-format="yyyy-MM-dd"></el-date-picker>
19
-          </div>
20
-        </el-col>
21
-      </el-row>
22
-    </div>
23
-
24
-    <el-row>
25
-      <el-col>
26
-        <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
27
-          <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
28
-                    max-height="450"
29
-          >
30
-
31
-            <el-table-column label="操作" align="center" min-width="30">
32
-              <template slot-scope="scope">
33
-                <el-button
34
-                  size="mini"
35
-                  @click="handleEdit(scope.$index, scope.row)">+
36
-                </el-button>
37
-                <el-button
38
-                  size="mini"
39
-                  type="danger"
40
-                  @click="handleDelete(scope.$index, scope.row)">-
41
-                </el-button>
42
-              </template>
43
-            </el-table-column>
44
-
45
-            <el-table-column min-width="35" align="center">
46
-
47
-              <template slot="header" slot-scope="scope">
48
-                <span>物品类型<span style="color: red">*</span></span>
49
-              </template>
50
-
51
-              <template slot-scope="scope">
52
-                <el-form-item style="padding-top: 15px">
53
-                  <el-input placeholder="请输入物品类型" v-model="scope.row.good_type_id"
54
-                            :value="typeName(scope.row.good_type_id)"
55
-                            @focus="showDialog(scope.$index, scope.row)"></el-input>
56
-                </el-form-item>
57
-              </template>
58
-            </el-table-column>
59
-            <el-table-column min-width="35" align="center">
60
-              <template slot="header" slot-scope="scope">
61
-                <span>规格名称<span style="color: red">*</span></span>
62
-              </template>
63
-              <template slot-scope="scope">
64
-
65
-                <el-form-item style="padding-top: 15px">
66
-                  <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
67
-                            :value="specificationName(scope.row.good_id)"
68
-                            @focus="showDialog(scope.$index, scope.row)"></el-input>
69
-                </el-form-item>
70
-
71
-              </template>
72
-            </el-table-column>
73
-
74
-
75
-            <el-table-column min-width="23" align="center">
76
-              <template slot="header" slot-scope="scope">
77
-                <span>退货数量<span style="color: red">*</span></span>
78
-              </template>
79
-              <template slot-scope="scope">
80
-                <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
81
-                              style="padding-top: 17px">
82
-                  <el-input type="number" v-model="scope.row.count"></el-input>
83
-                </el-form-item>
84
-              </template>
85
-            </el-table-column>
86
-
87
-
88
-          </el-table>
89
-        </el-form>
90
-      </el-col>
91
-
92
-
93
-      <span class="dialog-footer" style="margin-top: 20px;float:right">
94
-        <el-button @click="back()">取 消</el-button>
95
-        <el-button type="primary" @click="submit()">确 定</el-button>
96
-      </span>
97
-
98
-    </el-row>
99
-  </div>
100
-</template>
101
-
102
-<script>
103
-  import { uParseTime } from '@/utils/tools'
104
-
105
-  import {
106
-    deleteSalesReturnInfo,
107
-    getReturnList,
108
-    getSalesReturnConfig,
109
-    editSalesReturnInfo
110
-  } from '@/api/stock'
111
-  import SalesReturnDialog from './Dialog/salesReturnDialog'
112
-
113
-  export default {
114
-    components: { SalesReturnDialog },
115
-    name: 'otherSalesReutrnOrderEdit',
116
-
117
-    data() {
118
-      return {
119
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
120
-        warehousing_time: '',
121
-        adminUserOptions: null,
122
-        currentIndex: 0,
123
-        return_time: '',
124
-        recordInfo: {
125
-          recordData: [],
126
-          stock_in_code: '',
127
-          current_index: ''
128
-
129
-        },
130
-        tableRules: {
131
-          count: [
132
-            { required: true, message: '数量不能为空', trigge: 'blur' }
133
-          ]
134
-
135
-        },
136
-        ruleForm: {
137
-          manufacturer: [
138
-            { required: true, message: '请选择厂商', trigger: 'change' }
139
-          ]
140
-
141
-        },
142
-
143
-        // prop
144
-        isVisibility: false,
145
-        propForm: {
146
-          goodType: [],
147
-          goodInfo: [],
148
-          goodUnit: [],
149
-          title: '入库'
150
-        },
151
-
152
-        form: {
153
-          manufacturer: '',
154
-          dealer: ''
155
-        },
156
-
157
-        salesReturn: {},
158
-        manufacturer: [],
159
-        dealer: [],
160
-        goodType: []
161
-      }
162
-    },
163
-    methods: {
164
-      comfirm: function(val) {
165
-        this.isVisibility = false
166
-        if (val.selectedGoodInfo.length > 0) {
167
-          for (let i = val.selectedGoodInfo.length - 1; ; i--) {
168
-            if (i == 0) {
169
-              this.recordInfo.recordData[this.currentIndex].good_type_id = val.goodTypeId
170
-              this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
171
-            } else {
172
-              const tempForm = {}
173
-              tempForm['id'] = 0
174
-              tempForm['good_type_id'] = val.goodTypeId
175
-              tempForm['good_id'] = val.selectedGoodInfo[i].id
176
-              tempForm['count'] = ''
177
-              this.recordInfo.recordData.push(tempForm)
178
-            }
179
-          }
180
-        }
181
-
182
-        this.currentIndex = -1
183
-      }, cancle: function() {
184
-        this.isVisibility = false
185
-      }, GetConfigInfo: function() {
186
-        getSalesReturnConfig().then(response => {
187
-          if (response.data.state == 0) {
188
-            this.$message.error(response.data.msg)
189
-            return false
190
-          } else {
191
-            var warehouseInfoList = response.data.data.warehouseInfoList
192
-            for (let i = 0; i < warehouseInfoList.length; i++) {
193
-              this.propForm.goodInfo.push(warehouseInfoList[i].GoodInfo)
194
-              this.propForm.goodType.push(warehouseInfoList[i].GoodInfo.GoodsType)
195
-
196
-            }
197
-            const obj3 = {}
198
-            const obj4 = {}
199
-            this.propForm.goodInfo = this.propForm.goodInfo.reduce((cur, next) => {
200
-              obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
201
-              return cur
202
-            }, [])
203
-            this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
204
-              obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
205
-              return cur
206
-            }, [])
207
-          }
208
-        })
209
-      }, typeName: function(good_type_id) {
210
-        let name = ''
211
-        for (let i = 0; i < this.propForm.goodType.length; i++) {
212
-          if (this.propForm.goodType[i].id == good_type_id) {
213
-            name = this.propForm.goodType[i].type_name
214
-          }
215
-        }
216
-        return name
217
-      }, specificationName: function(good_info_id) {
218
-        let name = ''
219
-        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
220
-          if (this.propForm.goodInfo[i].id == good_info_id) {
221
-            name = this.propForm.goodInfo[i].specification_name
222
-          }
223
-        }
224
-        return name
225
-      }, handleEdit: function(index, row) {
226
-        const tempObj = {}
227
-        tempObj['id'] = 0
228
-        tempObj['good_type_id'] = 0
229
-        tempObj['good_id'] = 0
230
-        tempObj['count'] = ''
231
-        this.recordInfo.recordData.push(tempObj)
232
-      }, handleDelete: function(index, row) {
233
-        if (row.id == 0) {
234
-          this.recordInfo.recordData.splice(index, 1)
235
-        } else {
236
-          const params = {
237
-            id: row.id
238
-          }
239
-          this.$confirm('确认删除该退货物品信息记录?', '删除退货物品信息记录', {
240
-            confirmButtonText: '确定',
241
-            cancelButtonText: '取消',
242
-            type: 'warning'
243
-          }).then(() => {
244
-            deleteSalesReturnInfo(params).then(response => {
245
-              if (response.data.state == 0) {
246
-                this.$message.error(response.data.msg)
247
-                return false
248
-              } else {
249
-                this.$notify({
250
-                  title: '成功',
251
-                  message: '删除成功',
252
-                  type: 'success',
253
-                  duration: 2000
254
-                })
255
-                this.recordInfo.recordData.splice(index, 1)
256
-              }
257
-            })
258
-          }).catch(() => {
259
-          })
260
-        }
261
-      }, getTime(val, temp) {
262
-        if (val != 0) {
263
-          return uParseTime(val, temp)
264
-        } else {
265
-          return ''
266
-        }
267
-      }, showDialog(index, row) {
268
-        this.currentIndex = index
269
-
270
-        this.isVisibility = true
271
-        console.log(this.form.manufacturer)
272
-        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
273
-          if (this.propForm.goodInfo[i].manufacturer == this.form.manufacturer) {
274
-            this.propForm.goodType.push(this.propForm.goodInfo[i].GoodsType)
275
-          }
276
-        }
277
-        const obj3 = {}
278
-        this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
279
-          obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
280
-          return cur
281
-        }, [])
282
-
283
-      }, back() {
284
-        this.$router.go(-1)
285
-      }, submit() {
286
-        this.$refs['tableForm'].validate((valid) => {
287
-          if (valid) {
288
-            const array = this.recordInfo.recordData
289
-            for (let i = 0; i < array.length; i++) {
290
-              if (array[i].good_type_id == 0) {
291
-                this.$message.error('物品类型不能为空')
292
-                return
293
-              }
294
-              if (array[i].good_id == 0) {
295
-                this.$message.error('规格名称不能为空')
296
-                return
297
-              }
298
-            }
299
-
300
-            const params = {
301
-              'salesReturn': this.recordInfo.recordData
302
-            }
303
-            editSalesReturnInfo(params, this.return_time, this.$route.query.id).then(response => {
304
-              if (response.data.state == 0) {
305
-                this.$message.error(response.data.msg)
306
-                return false
307
-              } else {
308
-                this.$notify({
309
-                  title: '成功',
310
-                  message: '退货成功',
311
-                  type: 'success',
312
-                  duration: 2000
313
-                })
314
-                this.$router.back(-1)
315
-              }
316
-            })
317
-          } else {
318
-            return false
319
-          }
320
-        })
321
-      }, GetOrderDetail: function(order_id) {
322
-        const params = {
323
-          'id': order_id
324
-        }
325
-        getReturnList(params).then(response => {
326
-          if (response.data.state == 0) {
327
-            this.$message.error(response.data.msg)
328
-            return false
329
-          } else {
330
-            for (let i = 0; i < response.data.data.list.length; i++) {
331
-              this.recordInfo.list[i].count =  this.recordInfo.list[i].count.toString();
332
-              this.recordInfo.recordData.push(response.data.data.list[i])
333
-            }
334
-            this.salesReturn = response.data.data.salesReturn
335
-            this.return_time = this.getTime(this.salesReturn.return_time, '{y}-{m}-{d}')
336
-            this.form.manufacturer = this.salesReturn.manufacturer
337
-            this.form.dealer = this.salesReturn.dealer
338
-          }
339
-        })
340
-      }
341
-    },
342
-    created() {
343
-      this.GetConfigInfo()
344
-      this.propForm.goodUnit = this.$store.getters.good_unit
345
-      const order_id = this.$route.query.id
346
-      this.GetOrderDetail(order_id)
347
-    }
348
-
349
-  }
350
-</script>
351
-
352
-<style rel="stylesheet/css" lang="scss" scoped>
353
-  .information {
354
-    border: 1px #dcdfe6 solid;
355
-    padding: 30px 20px 30px 20px;
356
-
357
-  .border {
358
-    border-bottom: 1px #dcdfe6 solid;
359
-    margin: 0px 0 20px 0;
360
-  }
361
-
362
-  }
363
-
364
-  .title {
365
-    background: #409eff;
366
-    height: 44px;
367
-    line-height: 44px;
368
-    padding: 0 0 0 10px;
369
-    color: #fff;
370
-    margin: 0 0 10px 0;
371
-    border-radius: 4px 4px 0 0;
372
-  }
373
-
374
-  .edit_separater {
375
-    border-top: 1px solid rgb(233, 233, 233);
376
-    margin-top: 15px;
377
-    margin-bottom: 15px;
378
-  }
379
-
380
-</style>
381
-
382
-<style>
383
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
384
-    font-size: 12px;
385
-  }
386
-
387
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
388
-    background: #6fb5fa;
389
-  }
390
-
391
-</style>

+ 0 - 24
src/xt_pages/stock/otherStockInDetail.vue Bestand weergeven

@@ -1,24 +0,0 @@
1
-<template>
2
-  <other-stock-in-order-detail v-if="isEdit == 0"   v-on:edit-record="isEdit = 1"></other-stock-in-order-detail>
3
-  <other-stock-in-order-edit v-else></other-stock-in-order-edit>
4
-</template>
5
-
6
-<script>
7
-  import OtherStockInOrderEdit from './otherStockInOrderEdit'
8
-  import OtherStockInOrderDetail from './otherStockInOrderDetail'
9
-  export default {
10
-    name: 'otherStockInDetail',
11
-    components: { OtherStockInOrderDetail, OtherStockInOrderEdit },
12
-    data() {
13
-      return {
14
-        isEdit: 0
15
-      }
16
-    }
17
-
18
-  }
19
-
20
-</script>
21
-
22
-<style scoped>
23
-
24
-</style>

+ 56 - 57
src/xt_pages/stock/otherStockInOrder.vue Bestand weergeven

@@ -1,39 +1,36 @@
1 1
 <template>
2 2
 
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-
6
-    <div class="filter-container">
7
-
8
-
9
-      <el-row style="float:right;">
10
-        <el-button @click="handleWarehouse" type="primary">新增</el-button>
11
-      </el-row>
3
+  <div class="main-contain">
4
+    <div class="position">
5
+      <!--<bread-crumb :crumbs='crumbs'></bread-crumb>-->
6
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
7
+      <el-button size="small"  @click="handleWarehouse" class="filter-item" style="float:right;" type="primary" icon="el-icon-circle-plus-outline" >新增</el-button>
12 8
     </div>
13 9
 
14
-    <div class="filter-container" style="margin-top:20px">
15
-      <el-input style="width: 300px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
16
-      <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
17
-    </div>
10
+    <div class="app-container">
18 11
 
19
-    <div class="filter-container">
20
-      <span>入库时间:</span>
21
-      <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
-                      value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
24
-      <span class="">-</span>
25
-      <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
26
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
-                      value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
28
-    </div>
12
+      <div class="cell">
13
+        <el-input style="width: 400px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
14
+        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
15
+      </div>
29 16
 
30
-    <div class="filter-container" style="margin-top: 10px">
31
-      <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
32
-      <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
17
+      <div class="cell">
18
+        <label class="title"><span class="name">入库时间</span> : </label>
33 19
 
34
-    </div>
20
+        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
+                        value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
23
+        <span class="">-</span>
24
+        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
25
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
26
+                        value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
27
+      </div>
28
+
29
+      <div class="cell clearfix">
30
+        <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
31
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
32
+      </div>
35 33
 
36
-    <el-row :gutter="12" style="margin-top: 10px">
37 34
       <el-table
38 35
         :data="Warehouse.warehouseDate"
39 36
         :class="signAndWeighBoxPatients"
@@ -42,14 +39,17 @@
42 39
         v-loading="Warehouse.loading"
43 40
         ref="multipleTable"
44 41
         @selection-change="select"
42
+        :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
43
+
45 44
 
46 45
       >
47 46
         <el-table-column
47
+          align="center"
48 48
           type="selection"
49 49
           width="55">
50 50
         </el-table-column>
51 51
 
52
-        <el-table-column label="单据日期" align="center">
52
+        <el-table-column label="单据日期"  align="center">
53 53
           <template slot-scope="scope">
54 54
             {{ scope.row.warehousing_time | parseTime('{y}-{m}-{d}')}}
55 55
           </template>
@@ -82,20 +82,22 @@
82 82
 
83 83
         <el-table-column label="操作" align="center">
84 84
           <template slot-scope="scope">
85
-            <el-button
86
-              size="mini"
87
-              type="primary"
88
-              icon="el-icon-edit"
89
-              @click="handleEdit(scope.$index, scope.row)">
90
-            </el-button>
91
-
92
-            <el-button
93
-              size="mini"
94
-              type="danger"
95
-              icon="el-icon-delete"
96
-              @click="handleDelete(scope.$index, scope.row)">
97
-            </el-button>
98
-
85
+            <el-tooltip class="item" effect="dark" content="编辑" placement="top">
86
+              <el-button
87
+                size="small"
88
+                type="primary"
89
+                icon="el-icon-edit"
90
+                @click="handleEdit(scope.$index, scope.row)">
91
+              </el-button>
92
+            </el-tooltip>
93
+            <el-tooltip class="item" effect="dark" content="删除" placement="top">
94
+              <el-button
95
+                size="small"
96
+                type="danger"
97
+                icon="el-icon-delete"
98
+                @click="handleDelete(scope.$index, scope.row)">
99
+              </el-button>
100
+            </el-tooltip>
99 101
           </template>
100 102
         </el-table-column>
101 103
 
@@ -111,8 +113,7 @@
111 113
         layout="total, sizes, prev, pager, next, jumper"
112 114
         :total="total">
113 115
       </el-pagination>
114
-
115
-    </el-row>
116
+    </div>
116 117
   </div>
117 118
 </template>
118 119
 
@@ -127,9 +128,11 @@
127 128
     getWarehouseInfoList,
128 129
     getWarehouseList
129 130
   } from '@/api/stock'
131
+  import BreadCrumb from '../components/bread-crumb'
130 132
 
131 133
   export default {
132
-    name: 'otherStockInOrder',
134
+    name: 'stockIn',
135
+    components: { BreadCrumb },
133 136
     created() {
134 137
       var year = new Date().getFullYear()
135 138
       var month = new Date().getMonth() + 1
@@ -160,6 +163,10 @@
160 163
     },
161 164
     data() {
162 165
       return {
166
+        crumbs: [
167
+          { path: false, name: '库存管理' },
168
+          { path: '/stock/in/other', name: '其他入库单' }
169
+        ],
163 170
         page: 1,
164 171
         limit: 7,
165 172
         checked: false,
@@ -196,7 +203,7 @@
196 203
           limit: this.limit,
197 204
           start_time: this.start_time,
198 205
           end_time: this.end_time,
199
-          type : this.type,
206
+          type: this.type
200 207
         }
201 208
         this.Warehouse.warehouseDate = []
202 209
         getWarehouseList(Params).then(response => {
@@ -316,7 +323,7 @@
316 323
       }, clicks: function() {
317 324
         console.log(this.WarehouseInfo.warehouseInfoDate)
318 325
       }, handleWarehouse: function() {
319
-        this.$router.push({ path: '/stock/in/add' })
326
+        this.$router.push({ path: '/stock/in/add', query: { type: this.type }})
320 327
       }, handleReturnSales: function() {
321 328
         // this.$router.push({path:'/patients/create'}
322 329
         if (this.multipleSelection.length <= 0) {
@@ -370,7 +377,7 @@
370 377
           }
371 378
         }
372 379
       }, handleEdit: function(index, row) {
373
-        this.$router.push({ name: 'stockInDetail', query: { id: row.id }})
380
+        this.$router.push({ name: 'stockInDetail', query: { id: row.id ,type:this.type}})
374 381
       }, handleDelete: function(index, row) {
375 382
         const ids = []
376 383
         ids.push(row.id)
@@ -473,15 +480,7 @@
473 480
 
474 481
   }
475 482
 
476
-  .title {
477
-    background: #409eff;
478
-    height: 44px;
479
-    line-height: 44px;
480
-    padding: 0 0 0 10px;
481
-    color: #fff;
482
-    margin: 0 0 10px 0;
483 483
 
484
-  }
485 484
 
486 485
   .edit_separater {
487 486
     border-top: 1px solid rgb(233, 233, 233);

+ 0 - 613
src/xt_pages/stock/otherStockInOrderAdd.vue Bestand weergeven

@@ -1,613 +0,0 @@
1
-<template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <stock-in-dialog :propForm="propForm"
6
-                     :visibility="isVisibility"
7
-                     v-on:dialog-comfirm="comfirm"
8
-                     v-on:dialog-cancle="cancle"></stock-in-dialog>
9
-
10
-    <div class="filter-container">
11
-
12
-      <el-row>
13
-        <el-col :span="8"><div>
14
-          <span>入库时间:</span>
15
-          <el-date-picker v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16
-                          type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17
-                          value-format="yyyy-MM-dd"></el-date-picker>
18
-        </div></el-col>
19
-
20
-
21
-        <el-col :span="8">
22
-          <div>
23
-            <el-form ref="form" :model="form" :rules="ruleForm" label-width="80px">
24
-              <el-form-item label="厂商:" prop="manufacturer">
25
-                <el-select v-model="form.manufacturer" placeholder="请选择厂商">
26
-                  <el-option v-for="(option, index) in manufacturer" :key="index" :label="option.manufacturer_name" :value="option.id"></el-option>
27
-                </el-select>
28
-              </el-form-item>
29
-            </el-form>
30
-          </div>
31
-        </el-col>
32
-        <el-col :span="8">
33
-          <div>
34
-            <el-form ref="form" :model="form" label-width="80px">
35
-              <el-form-item label="经销商:">
36
-                <el-select v-model="form.dealer" placeholder="请选择经销商">
37
-                  <el-option v-for="(option, index) in dealer" :key="index" :label="option.dealer_name" :value="option.id"></el-option>
38
-                </el-select>
39
-              </el-form-item>
40
-            </el-form>
41
-          </div>
42
-        </el-col>
43
-      </el-row>
44
-
45
-    </div>
46
-
47
-    <el-row>
48
-      <el-col>
49
-        <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
50
-          <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
51
-                    max-height="450"
52
-          >
53
-
54
-            <el-table-column label="操作" align="center" min-width="30">
55
-              <template slot-scope="scope">
56
-                <el-button
57
-                  size="mini"
58
-                  @click="handleEdit(scope.$index, scope.row)">+
59
-                </el-button>
60
-                <el-button
61
-                  size="mini"
62
-                  type="danger"
63
-                  @click="handleDelete(scope.$index, scope.row)">-
64
-                </el-button>
65
-              </template>
66
-            </el-table-column>
67
-
68
-            <el-table-column min-width="35" align="center">
69
-
70
-              <template slot="header" slot-scope="scope">
71
-                <span>物品类型<span style="color: red">*</span></span>
72
-              </template>
73
-
74
-              <template slot-scope="scope" >
75
-                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id == 0" style="color:#c5c8cf">请输入类型</span>-->
76
-                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
77
-
78
-                <el-form-item  style="padding-top: 15px">
79
-                  <el-input placeholder="请输入物品类型"  v-model="scope.row.good_type_id" :value="typeName(scope.row.good_type_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
80
-                </el-form-item>
81
-
82
-              </template>
83
-            </el-table-column>
84
-            <el-table-column min-width="35" align="center">
85
-              <template slot="header" slot-scope="scope">
86
-                <span>规格名称<span style="color: red">*</span></span>
87
-              </template>
88
-              <template slot-scope="scope">
89
-
90
-                <el-form-item  style="padding-top: 15px">
91
-                  <el-input placeholder="请输入规格名称"  v-model="scope.row.good_id" :value="specificationName(scope.row.good_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
92
-                </el-form-item>
93
-
94
-              </template>
95
-            </el-table-column>
96
-
97
-
98
-            <el-table-column  min-width="23" align="center">
99
-              <template slot="header" slot-scope="scope">
100
-                <span>单价<span style="color: red">*</span></span>
101
-              </template>
102
-              <template slot-scope="scope">
103
-                <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
104
-                <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price' style="padding-top: 17px">
105
-                  <el-input type="number"  v-model="scope.row.price" ></el-input>
106
-                </el-form-item>
107
-
108
-
109
-              </template>
110
-            </el-table-column>
111
-
112
-            <el-table-column  min-width="23" align="center">
113
-              <template slot="header" slot-scope="scope">
114
-                <span>入库数量<span style="color: red">*</span></span>
115
-              </template>
116
-              <template slot-scope="scope">
117
-                <!--{{scope.row.warehousing_count}}-->
118
-                <!--<el-input type="number" v-model="scope.row.warehousing_count"   @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
119
-
120
-                <el-form-item :prop="'recordData.' + scope.$index + '.warehousing_count'" :rules='tableRules.warehousing_count' style="padding-top: 17px">
121
-                  <el-input type="number"  v-model="scope.row.warehousing_count" ></el-input>
122
-                </el-form-item>
123
-              </template>
124
-            </el-table-column>
125
-
126
-            <el-table-column label="总价" min-width="20" align="center">
127
-              <template slot-scope="scope">
128
-                {{calculate(scope.row.price*scope.row.warehousing_count)}}
129
-              </template>
130
-            </el-table-column>
131
-
132
-            <el-table-column  align="center" min-width="25">
133
-              <template slot="header" slot-scope="scope">
134
-                <span>批号<span style="color: red">*</span></span>
135
-              </template>
136
-              <template slot-scope="scope">
137
-                <!--<el-input  v-model="scope.row.numbers"></el-input>-->
138
-
139
-                <el-form-item :prop="'recordData.' + scope.$index + '.number'" :rules='tableRules.number' style="padding-top: 17px">
140
-                  <el-input  v-model="scope.row.number" ></el-input>
141
-                </el-form-item>
142
-
143
-              </template>
144
-            </el-table-column>
145
-            <el-table-column label="生产日期" min-width="40" align="center">
146
-              <template slot-scope="scope" >
147
-                <!--{{scope.row.product_date | parseTime("{y}-{m}-{d}")}}-->
148
-                <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.product_date"
149
-                                type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
150
-                                value-format="yyyy-MM-dd"></el-date-picker>
151
-
152
-              </template>
153
-            </el-table-column>
154
-            <el-table-column label="有效日期" min-width="40" align="center">
155
-              <template slot-scope="scope">
156
-                <!--{{ scope.row.expiry_date | parseTime("{y}-{m}-{d}")}}-->
157
-                <el-date-picker  prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.expiry_date"
158
-                                 type="date" placeholder="选择日期时间"  format="yyyy-MM-dd"
159
-                                 value-format="yyyy-MM-dd"></el-date-picker>
160
-
161
-              </template>
162
-            </el-table-column>
163
-            <el-table-column label="备注" min-width="20" align="center">
164
-              <template slot-scope="scope">
165
-                <el-input  v-model="scope.row.remark"></el-input>
166
-              </template>
167
-            </el-table-column>
168
-          </el-table>
169
-        </el-form>
170
-      </el-col>
171
-
172
-
173
-      <span  class="dialog-footer" style="margin-top: 20px;float:right">
174
-        <el-button @click="back()">取 消</el-button>
175
-        <el-button type="primary" @click="submit()">确 定</el-button>
176
-      </span>
177
-
178
-    </el-row>
179
-  </div>
180
-</template>
181
-
182
-<script>
183
-  import stockInDialog from './Dialog/stockInDialog'
184
-  import { uParseTime } from '@/utils/tools'
185
-
186
-  import {
187
-    GetAllGoodInfo,
188
-    GetAllGoodType,
189
-    postWarehouse,
190
-    GetAllConfig,
191
-    GetAllGoodInfoByID,
192
-    getWarehouseInfoByOrdeNumber,
193
-    modifyWarehouseInfo,
194
-    deleteWarehouseInfo
195
-  } from '@/api/stock'
196
-
197
-  export default {
198
-    components: { stockInDialog },
199
-    name: 'stockIn',
200
-
201
-    data() {
202
-      var checkGoodId = (rule, value, callback) => {
203
-        setTimeout(() => {
204
-          if (value == '' || value == 0) {
205
-            return callback(new Error('规格名称不能为空'))
206
-          }
207
-        }, 2000)
208
-      }
209
-
210
-      return {
211
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
212
-        warehousing_time: '',
213
-        adminUserOptions: null,
214
-        currentIndex: 0,
215
-
216
-        recordInfo: {
217
-          recordData: [],
218
-          stock_in_code: '',
219
-          current_index: ''
220
-
221
-        },
222
-        tableRules: {
223
-          price: [
224
-            { required: true, message: '单价不能为空', trigger: 'blur' }
225
-          ],
226
-          warehousing_count: [
227
-            { required: true, message: '数量不能为空', trigge: 'blur' }
228
-          ],
229
-          number: [
230
-            { required: true, message: '批号不能为空', trigge: 'blur' }
231
-          ],
232
-          good_id: [
233
-            { validator: checkGoodId, trigger: 'blur' }
234
-          ]
235
-
236
-        },
237
-        ruleForm: {
238
-          manufacturer: [
239
-            { required: true, message: '请选择厂商', trigger: 'change' }
240
-          ]
241
-
242
-        },
243
-
244
-        total: '',
245
-        product_date: '',
246
-        expiry_date: '',
247
-        numbers: '',
248
-
249
-        type: 2,
250
-
251
-        // prop
252
-        isVisibility: false,
253
-        propForm: {
254
-          goodType: [],
255
-          goodInfo: [],
256
-          goodUnit: [],
257
-          title: '入库',
258
-          formValue: {
259
-            good_type_id: '',
260
-            good_id: '',
261
-            number: '',
262
-            product_date: '',
263
-            expiry_date: '',
264
-            warehousing_count: '',
265
-            price: '',
266
-            remark: '',
267
-            dealer: '',
268
-            manufacturer: ''
269
-
270
-          },
271
-          isCreated: 1
272
-
273
-        },
274
-
275
-        goodInfo: {
276
-          loading: false,
277
-          goodTypeData: [],
278
-          type_code: ''
279
-        },
280
-        form: {
281
-          manufacturer: '',
282
-          dealer: ''
283
-        },
284
-
285
-        formValue: {
286
-          good_type_id: '',
287
-          good_id: '',
288
-          number: '',
289
-          product_date: '',
290
-          expiry_date: '',
291
-          warehousing_count: '',
292
-          price: '',
293
-          remark: '',
294
-          dealer: '',
295
-          manufacturer: ''
296
-
297
-        },
298
-
299
-        manufacturer: [],
300
-        dealer: [],
301
-        goodType: []
302
-      }
303
-    },
304
-    methods: {
305
-      handleSave: function() {
306
-        if (this.recordInfo.recordData.length <= 0) {
307
-          this.$message.error('请添加入库信息')
308
-          return
309
-        }
310
-        sessionStorage.removeItem('warehousing_orders')
311
-        this.$router.back(-1)
312
-      }, handleCancle: function() {
313
-        this.$confirm('是否放弃编辑返回上一页?', '放弃编辑', {
314
-          confirmButtonText: '确定',
315
-          cancelButtonText: '取消',
316
-          type: 'warning'
317
-        }).then(() => {
318
-          sessionStorage.removeItem('warehousing_orders')
319
-          this.$router.back(-1)
320
-        }).catch(() => {
321
-
322
-        })
323
-      }, handleCreate: function() {
324
-        this.propForm.formValue = {}
325
-        this.propForm.isCreated = 1
326
-        this.isVisibility = true
327
-      }, comfirm: function(val) {
328
-        this.isVisibility = false
329
-        if (val.selectedGoodInfo.length > 0) {
330
-          for (let i = val.selectedGoodInfo.length - 1; ;i--) {
331
-            if (i == 0) {
332
-              this.recordInfo.recordData[this.currentIndex].good_type_id = val.goodTypeId
333
-              this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
334
-            } else {
335
-              const tempForm = {}
336
-              tempForm['good_type_id'] = val.goodTypeId
337
-              tempForm['good_id'] = val.selectedGoodInfo[i].id
338
-              tempForm['number'] = ''
339
-              tempForm['product_date'] = 0
340
-              tempForm['expiry_date'] = 0
341
-              tempForm['warehousing_count'] = ''
342
-              tempForm['price'] = ''
343
-              tempForm['remark'] = ''
344
-              tempForm['dealer'] = ''
345
-              tempForm['manufacturer'] = ''
346
-              this.recordInfo.recordData.push(tempForm)
347
-            }
348
-          }
349
-        }
350
-
351
-        this.currentIndex = -1
352
-      }, cancle: function() {
353
-        this.isVisibility = false
354
-      }, GetAllGoodType: function() {
355
-        GetAllGoodType().then(response => {
356
-          if (response.data.state == 0) {
357
-            this.$message.error(response.data.msg)
358
-            return false
359
-          } else {
360
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
361
-              this.propForm.goodType.push(response.data.data.goodType[i])
362
-            }
363
-          }
364
-        })
365
-      }, GetAllGoodInfo: function() {
366
-        GetAllGoodInfo().then(response => {
367
-          if (response.data.state == 0) {
368
-            this.$message.error(response.data.msg)
369
-            return false
370
-          } else {
371
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
372
-              this.propForm.goodInfo.push(response.data.data.goodInfo[i])
373
-            }
374
-          }
375
-        })
376
-      }, GetConfigInfo: function() {
377
-        GetAllConfig().then(response => {
378
-          if (response.data.state == 0) {
379
-            this.$message.error(response.data.msg)
380
-            return false
381
-          } else {
382
-            this.manufacturer = response.data.data.manufacturer
383
-            this.dealer = response.data.data.dealer
384
-            this.goodType = response.data.data.goodType
385
-            this.goodInfo = response.data.data.goodInfo
386
-          }
387
-        })
388
-      }, typeName: function(good_type_id) {
389
-        let name = '请输入物品类型'
390
-        for (let i = 0; i < this.goodType.length; i++) {
391
-          if (this.goodType[i].id == good_type_id) {
392
-            name = this.goodType[i].type_name
393
-          }
394
-        }
395
-        return name
396
-      }, specificationName: function(good_info_id) {
397
-        let name = ''
398
-        for (let i = 0; i < this.goodInfo.length; i++) {
399
-          if (this.goodInfo[i].id == good_info_id) {
400
-            name = this.goodInfo[i].specification_name
401
-          }
402
-        }
403
-        return name
404
-      }, handleEdit: function(index, row) {
405
-        const tempObj = {}
406
-        tempObj['good_type_id'] = 0
407
-        tempObj['good_id'] = 0
408
-        tempObj['number'] = ''
409
-        tempObj['product_date'] = ''
410
-        tempObj['expiry_date'] = ''
411
-        tempObj['warehousing_count'] = ''
412
-        tempObj['price'] = ''
413
-        tempObj['remark'] = ''
414
-        tempObj['dealer'] = ''
415
-        tempObj['manufacturer'] = ''
416
-        this.recordInfo.recordData.push(tempObj)
417
-      }, handleDelete: function(index, row) {
418
-        this.recordInfo.recordData.splice(index, 1)
419
-      }, calculate: function(val) {
420
-        if (val == 0) {
421
-          return ''
422
-        }
423
-        return Math.round(parseFloat(val) * 100) / 100
424
-      }, GetWarehouseInfoByOrdeNumber: function() {
425
-        const params = {
426
-          'warehousing_order': sessionStorage.getItem('warehousing_orders')
427
-        }
428
-        this.recordInfo.recordData = []
429
-        getWarehouseInfoByOrdeNumber(params).then(response => {
430
-          if (response.data.state != 0) {
431
-            for (let i = 0; i < response.data.data.info.length; i++) {
432
-              this.recordInfo.recordData.push(response.data.data.info[i])
433
-            }
434
-          }
435
-        })
436
-      }, getTime(val, temp) {
437
-        if (val != 0) {
438
-          return uParseTime(val, temp)
439
-        } else {
440
-          return ''
441
-        }
442
-      }, showDialog(index, row) {
443
-        this.currentIndex = index
444
-        if (this.form.manufacturer == '' || this.form.manufacturer == 0) {
445
-          this.$message.error('请先选择厂商')
446
-          return
447
-        } else {
448
-          this.isVisibility = true
449
-          const params = {
450
-            id: this.form.manufacturer
451
-          }
452
-          GetAllGoodInfoByID(params).then(response => {
453
-            if (response.data.state == 0) {
454
-              this.$message.error(response.data.msg)
455
-              return false
456
-            } else {
457
-              if (response.data.data.goodInfo.length == 0) {
458
-                this.$message.error('该厂商没商品,请添加商品')
459
-              } else {
460
-                for (let i = 0; i < response.data.data.goodInfo.length; i++) {
461
-                  this.propForm.goodType.push(response.data.data.goodInfo[i].GoodsType)
462
-                }
463
-
464
-                const obj = {}
465
-                this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
466
-                  obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
467
-                  return cur
468
-                }, []) // 设置cur默认类型为数组,并且初始值为空的数组
469
-              }
470
-            }
471
-          })
472
-        }
473
-      }, getSummaries(param) {
474
-        const { columns, data } = param
475
-        const sums = []
476
-        columns.forEach((column, index) => {
477
-          if (index === 0) {
478
-            sums[index] = '总价'
479
-            return
480
-          }
481
-          const values = data.map(item => Number(item[column.property]))
482
-          if (!values.every(value => isNaN(value))) {
483
-            sums[index] = values.reduce((prev, curr) => {
484
-              const value = Number(curr)
485
-              if (!isNaN(value)) {
486
-                return prev + curr
487
-              } else {
488
-                return prev
489
-              }
490
-            }, 0)
491
-            sums[index] += ' 元'
492
-          } else {
493
-            sums[index] = 'N/A'
494
-          }
495
-        })
496
-
497
-        return sums
498
-      }, back() {
499
-        this.$router.go(-1)
500
-      }, submit() {
501
-        this.$refs['tableForm'].validate((valid) => {
502
-          if (valid) {
503
-            if (this.form.manufacturer == 0) {
504
-              this.$message.error('厂商不能为空')
505
-              return
506
-            }
507
-            const array = this.recordInfo.recordData
508
-            for (let i = 0; i < array.length; i++) {
509
-              if (array[i].good_type_id == 0) {
510
-                this.$message.error('物品类型不能为空')
511
-                return
512
-              }
513
-              if (array[i].good_id == 0) {
514
-                this.$message.error('规格名称不能为空')
515
-                return
516
-              }
517
-            }
518
-
519
-            const params = {
520
-              'stockIn': this.recordInfo.recordData
521
-            }
522
-            postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer,this.type).then(response => {
523
-              if (response.data.state == 0) {
524
-                this.$message.error(response.data.msg)
525
-                return false
526
-              } else {
527
-                this.$notify({
528
-                  title: '成功',
529
-                  message: '入库成功',
530
-                  type: 'success',
531
-                  duration: 2000
532
-                })
533
-                this.$router.back(-1)
534
-              }
535
-            })
536
-          } else {
537
-            return false
538
-          }
539
-        })
540
-      }
541
-    },
542
-    created() {
543
-      var year = new Date().getFullYear()
544
-      var month = new Date().getMonth() + 1
545
-      var day = new Date().getDate()
546
-      if (parseInt(month) < 10) {
547
-        month = '0' + month
548
-      }
549
-      if (parseInt(day) < 10) {
550
-        day = '0' + day
551
-      }
552
-      const endTime = year + '-' + month + '-' + day
553
-      this.warehousing_time = endTime
554
-
555
-      const tempObj = {}
556
-      tempObj['good_type_id'] = 0
557
-      tempObj['good_id'] = 0
558
-      tempObj['number'] = ''
559
-      tempObj['product_date'] = ''
560
-      tempObj['expiry_date'] = ''
561
-      tempObj['warehousing_count'] = ''
562
-      tempObj['price'] = ''
563
-      tempObj['remark'] = ''
564
-      tempObj['dealer'] = ''
565
-      tempObj['manufacturer'] = ''
566
-
567
-      this.recordInfo.recordData.push(tempObj)
568
-      this.GetConfigInfo()
569
-      this.propForm.goodUnit = this.$store.getters.good_unit
570
-    }
571
-
572
-  }
573
-</script>
574
-
575
-<style rel="stylesheet/css" lang="scss" scoped>
576
-  .information {
577
-    border: 1px #dcdfe6 solid;
578
-    padding: 30px 20px 30px 20px;
579
-
580
-  .border {
581
-    border-bottom: 1px #dcdfe6 solid;
582
-    margin: 0px 0 20px 0;
583
-  }
584
-  }
585
-
586
-  .title {
587
-    background: #409eff;
588
-    height: 44px;
589
-    line-height: 44px;
590
-    padding: 0 0 0 10px;
591
-    color: #fff;
592
-    margin: 0 0 10px 0;
593
-  // border-radius: 4px 4px 0 0;
594
-  }
595
-
596
-  .edit_separater {
597
-    border-top: 1px solid rgb(233, 233, 233);
598
-    margin-top: 15px;
599
-    margin-bottom: 15px;
600
-  }
601
-
602
-</style>
603
-
604
-<style>
605
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
606
-    font-size: 12px;
607
-  }
608
-
609
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
610
-    background: #6fb5fa;
611
-  }
612
-
613
-</style>

+ 0 - 281
src/xt_pages/stock/otherStockInOrderDetail.vue Bestand weergeven

@@ -1,281 +0,0 @@
1
-<template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <div class="filter-container">
6
-      <span style="font-size: 20px">耗材入库单详情</span>
7
-      <el-row style="float:right;">
8
-        <span>{{WarehouseInfo.warehouse.warehousing_order}}</span>
9
-      </el-row>
10
-    </div>
11
-
12
-
13
-
14
-    <div class="filter-container">
15
-      <span>单据日期:  {{WarehouseInfo.warehouse.warehousing_time | parseTime('{y}-{m}-{d}')}} </span>
16
-      <span>厂商 {{getManufactuerName(WarehouseInfo.warehouse.manufacturer)}}</span>
17
-      <span>经销商 {{getDealerName(WarehouseInfo.warehouse.dealer)}}</span>
18
-    </div>
19
-
20
-    <div class="filter-container" style="margin-top: 10px">
21
-      <el-button size="small" icon="el-icon-edit" @click="editRecord">编辑</el-button>
22
-      <el-button size="small" icon="el-icon-delete" @click="deleteRecord">删除</el-button>
23
-    </div>
24
-
25
-    <el-row :gutter="12" style="margin-top: 10px">
26
-      <el-table :data="WarehouseInfo.warehouseInfoDate" :class="signAndWeighBoxPatients" style="width: 100%" border
27
-      >
28
-        <el-table-column min-width="35" align="center">
29
-          <template slot="header" slot-scope="scope">
30
-            <span>物品类型</span>
31
-          </template>
32
-
33
-          <template slot-scope="scope">
34
-            <span v-if="scope.row.good_type_id != 0">{{getTypeName(scope.row.good_type_id)}}</span>
35
-          </template>
36
-        </el-table-column>
37
-        <el-table-column min-width="35" align="center">
38
-          <template slot="header" slot-scope="scope">
39
-            <span>规格名称</span>
40
-          </template>
41
-          <template slot-scope="scope">
42
-            <span v-if="scope.row.good_id != 0">{{getSpecificationName(scope.row.good_id)}}</span>
43
-          </template>
44
-        </el-table-column>
45
-
46
-
47
-        <el-table-column min-width="23" align="center">
48
-          <template slot="header" slot-scope="scope">
49
-            <span>单价</span>
50
-          </template>
51
-          <template slot-scope="scope">
52
-            <span>{{scope.row.price}}</span>
53
-          </template>
54
-        </el-table-column>
55
-
56
-        <el-table-column min-width="23" align="center">
57
-          <template slot="header" slot-scope="scope">
58
-            <span>入库数量</span>
59
-          </template>
60
-          <template slot-scope="scope">
61
-            <span>{{scope.row.warehousing_count}}</span>
62
-
63
-          </template>
64
-        </el-table-column>
65
-
66
-        <el-table-column label="总价" min-width="20" align="center">
67
-          <template slot-scope="scope">
68
-            {{calculate(scope.row.price*scope.row.warehousing_count)}}
69
-          </template>
70
-        </el-table-column>
71
-
72
-        <el-table-column align="center" min-width="25">
73
-          <template slot="header" slot-scope="scope">
74
-            <span>批号</span>
75
-          </template>
76
-          <template slot-scope="scope">
77
-            <span>{{scope.row.number}}</span>
78
-          </template>
79
-        </el-table-column>
80
-        <el-table-column label="生产日期" min-width="40" align="center">
81
-          <template slot-scope="scope">
82
-            {{scope.row.product_date | parseTime('{y}-{m}-{d}')}}
83
-
84
-          </template>
85
-        </el-table-column>
86
-        <el-table-column label="有效日期" min-width="40" align="center">
87
-          <template slot-scope="scope">
88
-            {{ scope.row.expiry_date | parseTime('{y}-{m}-{d}')}}
89
-          </template>
90
-        </el-table-column>
91
-        <el-table-column label="备注" min-width="20"  align="center">
92
-          <template slot-scope="scope">
93
-            <el-popover placement="top-start"  width="250" trigger="hover" >
94
-              <div>{{scope.row.remark}}</div>
95
-              <span slot="reference" v-if="scope.row.remark.length > 20">{{ scope.row.remark.substr(0,20)+'...' }}</span>
96
-              <span slot="reference" v-else>{{ scope.row.remark}}</span>
97
-            </el-popover>
98
-
99
-          </template>
100
-        </el-table-column>
101
-      </el-table>
102
-    </el-row>
103
-  </div>
104
-</template>
105
-
106
-<script>
107
-  import { uParseTime } from '@/utils/tools'
108
-  import { GetAllConfig, getWarehouseInfoList, deleteWarehouseInfo } from '@/api/stock'
109
-
110
-  export default {
111
-    name: 'otherStockInOrderDetail',
112
-    created() {
113
-      const order_id = this.$route.query.id
114
-      this.GetConfigInfo()
115
-      this.GetOrderDetail(order_id)
116
-    },
117
-    data() {
118
-      return {
119
-        isEdit: 0,
120
-        checked: false,
121
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
122
-        goodType: [],
123
-        goodInfo: [],
124
-        manufacturer: [],
125
-        dealer: [],
126
-        Warehouse: {
127
-          loading: false,
128
-          warehouseDate: [],
129
-          tableCurrentIndex: ''
130
-        },
131
-
132
-        WarehouseInfo: {
133
-          loading: false,
134
-          warehouseInfoDate: [],
135
-          warehouse: {}
136
-        }
137
-      }
138
-    },
139
-    methods: {
140
-      getSpecificationName: function(id) {
141
-        let name = ''
142
-        for (let i = 0; i < this.goodInfo.length; i++) {
143
-          if (this.goodInfo[i].id == id) {
144
-            name = this.goodInfo[i].specification_name
145
-          }
146
-        }
147
-        return name
148
-      }, getTypeName: function(id) {
149
-        let name = ''
150
-        for (let i = 0; i < this.goodType.length; i++) {
151
-          if (this.goodType[i].id == id) {
152
-            name = this.goodType[i].type_name
153
-          }
154
-        }
155
-        return name
156
-      }, GetConfigInfo: function() {
157
-        GetAllConfig().then(response => {
158
-          if (response.data.state == 0) {
159
-            this.$message.error(response.data.msg)
160
-            return false
161
-          } else {
162
-            this.manufacturer = response.data.data.manufacturer
163
-            this.dealer = response.data.data.dealer
164
-            this.goodInfo = response.data.data.goodInfo
165
-            this.goodType = response.data.data.goodType
166
-          }
167
-        })
168
-      }, getManufactuerName: function(manufacturer_id) {
169
-        for (let i = 0; i < this.manufacturer.length; i++) {
170
-          if (this.manufacturer[i].id == manufacturer_id) {
171
-            return this.manufacturer[i].manufacturer_name
172
-          }
173
-        }
174
-      }, getDealerName: function(dealer_id) {
175
-        for (let i = 0; i < this.dealer.length; i++) {
176
-          if (this.dealer[i].id == dealer_id) {
177
-            return this.dealer[i].dealer_name
178
-          }
179
-        }
180
-      }, calculate: function(val) {
181
-        if (val == 0) {
182
-          return ''
183
-        }
184
-        return Math.round(parseFloat(val) * 100) / 100
185
-      }, GetOrderDetail: function(order_id) {
186
-        const params = {
187
-          'id': order_id
188
-        }
189
-        getWarehouseInfoList(params).then(response => {
190
-          if (response.data.state == 0) {
191
-            this.$message.error(response.data.msg)
192
-            return false
193
-          } else {
194
-            for (let i = 0; i < response.data.data.info.length; i++) {
195
-              this.WarehouseInfo.warehouseInfoDate.push(response.data.data.info[i])
196
-            }
197
-            this.WarehouseInfo.warehouse = response.data.data.warehousing
198
-          }
199
-        })
200
-      }, deleteRecord: function() {
201
-        const ids = []
202
-        ids.push(this.WarehouseInfo.warehouse.id)
203
-        const idStr = ids.join(',')
204
-
205
-        const params = {
206
-          ids: idStr
207
-        }
208
-
209
-        this.$confirm('确认删除入库单记录?', '删除入库单记录', {
210
-          confirmButtonText: '确定',
211
-          cancelButtonText: '取消',
212
-          type: 'warning'
213
-        }).then(() => {
214
-          deleteWarehouseInfo(params).then(response => {
215
-            if (response.data.state == 0) {
216
-              this.$message.error(response.data.msg)
217
-              return false
218
-            } else {
219
-              this.$notify({
220
-                title: '成功',
221
-                message: '删除成功',
222
-                type: 'success',
223
-                duration: 2000
224
-              })
225
-
226
-              this.$router.back(-1)
227
-            }
228
-          })
229
-        }).catch(() => {
230
-        })
231
-      }, editRecord: function() {
232
-        this.$emit('edit-record')
233
-      }
234
-    }
235
-  }
236
-</script>
237
-
238
-<style rel="stylesheet/css" lang="scss" scoped>
239
-  .information {
240
-    border: 1px #dcdfe6 solid;
241
-    padding: 30px 20px 30px 20px;
242
-
243
-  .border {
244
-    border-bottom: 1px #dcdfe6 solid;
245
-    margin: 0px 0 20px 0;
246
-  }
247
-
248
-  }
249
-
250
-  .title {
251
-    background: #409eff;
252
-    height: 44px;
253
-    line-height: 44px;
254
-    padding: 0 0 0 10px;
255
-    color: #fff;
256
-    margin: 0 0 10px 0;
257
-  }
258
-
259
-  .edit_separater {
260
-    border-top: 1px solid rgb(233, 233, 233);
261
-    margin-top: 15px;
262
-    margin-bottom: 15px;
263
-  }
264
-
265
-</style>
266
-
267
-<style>
268
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
269
-    font-size: 12px;
270
-  }
271
-
272
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
273
-    background: #6fb5fa;
274
-  }
275
-
276
-  .count {
277
-    color: #bd2c00;
278
-
279
-  }
280
-
281
-</style>

+ 0 - 502
src/xt_pages/stock/otherStockInOrderEdit.vue Bestand weergeven

@@ -1,502 +0,0 @@
1
-<template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <sales-return-dialog :propForm="propForm"
6
-                         :visibility="isVisibility"
7
-                         v-on:dialog-comfirm="comfirm"
8
-                         v-on:dialog-cancle="cancle"></sales-return-dialog>
9
-
10
-    <div class="filter-container">
11
-
12
-      <el-row>
13
-        <el-col :span="8"><div>
14
-          <span>入库时间:</span>
15
-          <el-date-picker v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16
-                          type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17
-                          value-format="yyyy-MM-dd"></el-date-picker>
18
-        </div></el-col>
19
-      </el-row>
20
-    </div>
21
-
22
-    <el-row>
23
-      <el-col>
24
-        <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
25
-          <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
26
-                    max-height="450"
27
-          >
28
-
29
-            <el-table-column label="操作" align="center" min-width="30">
30
-              <template slot-scope="scope">
31
-                <el-button
32
-                  size="mini"
33
-                  @click="handleEdit(scope.$index, scope.row)">+
34
-                </el-button>
35
-                <el-button
36
-                  size="mini"
37
-                  type="danger"
38
-                  @click="handleDelete(scope.$index, scope.row)">-
39
-                </el-button>
40
-              </template>
41
-            </el-table-column>
42
-
43
-            <el-table-column min-width="35" align="center">
44
-
45
-              <template slot="header" slot-scope="scope">
46
-                <span>物品类型<span style="color: red">*</span></span>
47
-              </template>
48
-
49
-              <template slot-scope="scope" >
50
-                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id == 0" style="color:#c5c8cf">请输入类型</span>-->
51
-                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
52
-
53
-                <el-form-item  style="padding-top: 15px">
54
-                  <el-input placeholder="请输入物品类型"  v-model="scope.row.good_type_id" :value="typeName(scope.row.good_type_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
55
-                </el-form-item>
56
-
57
-              </template>
58
-            </el-table-column>
59
-            <el-table-column min-width="35" align="center">
60
-              <template slot="header" slot-scope="scope">
61
-                <span>规格名称<span style="color: red">*</span></span>
62
-              </template>
63
-              <template slot-scope="scope">
64
-
65
-                <el-form-item  style="padding-top: 15px">
66
-                  <el-input placeholder="请输入规格名称"  v-model="scope.row.good_id" :value="specificationName(scope.row.good_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
67
-                </el-form-item>
68
-
69
-              </template>
70
-            </el-table-column>
71
-
72
-
73
-            <el-table-column  min-width="23" align="center">
74
-              <template slot="header" slot-scope="scope">
75
-                <span>单价<span style="color: red">*</span></span>
76
-              </template>
77
-              <template slot-scope="scope">
78
-                <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
79
-                <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price' style="padding-top: 17px">
80
-                  <el-input type="number"  v-model="scope.row.price" ></el-input>
81
-                </el-form-item>
82
-
83
-
84
-
85
-
86
-              </template>
87
-            </el-table-column>
88
-
89
-            <el-table-column  min-width="23" align="center">
90
-              <template slot="header" slot-scope="scope">
91
-                <span>入库数量<span style="color: red">*</span></span>
92
-              </template>
93
-              <template slot-scope="scope">
94
-                <!--{{scope.row.warehousing_count}}-->
95
-                <!--<el-input type="number" v-model="scope.row.warehousing_count"   @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
96
-
97
-                <el-form-item :prop="'recordData.' + scope.$index + '.warehousing_count'" :rules='tableRules.warehousing_count' style="padding-top: 17px">
98
-                  <el-input type="number"  v-model="scope.row.warehousing_count" ></el-input>
99
-                </el-form-item>
100
-              </template>
101
-            </el-table-column>
102
-
103
-            <el-table-column label="总价" min-width="20" align="center">
104
-              <template slot-scope="scope">
105
-                {{calculate(scope.row.price*scope.row.warehousing_count)}}
106
-              </template>
107
-            </el-table-column>
108
-
109
-            <el-table-column  align="center" min-width="25">
110
-              <template slot="header" slot-scope="scope">
111
-                <span>批号<span style="color: red">*</span></span>
112
-              </template>
113
-              <template slot-scope="scope">
114
-                <!--<el-input  v-model="scope.row.numbers"></el-input>-->
115
-
116
-                <el-form-item :prop="'recordData.' + scope.$index + '.number'" :rules='tableRules.number' style="padding-top: 17px">
117
-                  <el-input  v-model="scope.row.number" ></el-input>
118
-                </el-form-item>
119
-
120
-              </template>
121
-            </el-table-column>
122
-            <el-table-column label="生产日期" min-width="40" align="center">
123
-              <template slot-scope="scope" >
124
-                <!--{{scope.row.product_date | parseTime("{y}-{m}-{d}")}}-->
125
-                <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.product_date"
126
-                                type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
127
-                                value-format="yyyy-MM-dd"></el-date-picker>
128
-
129
-              </template>
130
-            </el-table-column>
131
-            <el-table-column label="有效日期" min-width="40" align="center">
132
-              <template slot-scope="scope">
133
-                <!--{{ scope.row.expiry_date | parseTime("{y}-{m}-{d}")}}-->
134
-                <el-date-picker  prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.expiry_date"
135
-                                 type="date" placeholder="选择日期时间"  format="yyyy-MM-dd"
136
-                                 value-format="yyyy-MM-dd"></el-date-picker>
137
-
138
-              </template>
139
-            </el-table-column>
140
-            <el-table-column label="备注" min-width="20" align="center">
141
-              <template slot-scope="scope">
142
-                <el-input  v-model="scope.row.remark"></el-input>
143
-              </template>
144
-            </el-table-column>
145
-          </el-table>
146
-        </el-form>
147
-      </el-col>
148
-
149
-
150
-      <span  class="dialog-footer" style="margin-top: 20px;float:right">
151
-        <el-button @click="back()">取 消</el-button>
152
-        <el-button type="primary" @click="submit()">确 定</el-button>
153
-      </span>
154
-
155
-    </el-row>
156
-  </div>
157
-</template>
158
-
159
-<script>
160
-  import stockInDialog from './Dialog/stockInDialog'
161
-  import { uParseTime } from '@/utils/tools'
162
-
163
-  import {
164
-    GetAllConfig,
165
-    getWarehouseInfoList,
166
-    GetAllGoodInfoByID,
167
-    getWarehouseInfoByOrdeNumber,
168
-    modifyWarehouseInfo,
169
-    deleteWarehouseInfo,
170
-    DeleteWarehouseInfoItem,
171
-    EditWarehouse
172
-  } from '@/api/stock'
173
-  import SalesReturnDialog from './Dialog/salesReturnDialog'
174
-
175
-  export default {
176
-    components: { SalesReturnDialog, stockInDialog },
177
-    name: 'stockInOrderEdit',
178
-
179
-    data() {
180
-      var checkGoodId = (rule, value, callback) => {
181
-        setTimeout(() => {
182
-          if (value == '' || value == 0) {
183
-            return callback(new Error('规格名称不能为空'))
184
-          }
185
-        }, 2000)
186
-      }
187
-
188
-      return {
189
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
190
-        warehousing_time: '',
191
-        adminUserOptions: null,
192
-        currentIndex: 0,
193
-
194
-        recordInfo: {
195
-          recordData: [],
196
-          stock_in_code: '',
197
-          current_index: ''
198
-
199
-        },
200
-        tableRules: {
201
-          price: [
202
-            { required: true, message: '单价不能为空', trigger: 'blur' }
203
-          ],
204
-          warehousing_count: [
205
-            { required: true, message: '数量不能为空', trigge: 'blur' }
206
-          ],
207
-          number: [
208
-            { required: true, message: '批号不能为空', trigge: 'blur' }
209
-          ],
210
-          good_id: [
211
-            { validator: checkGoodId, trigger: 'blur' }
212
-          ]
213
-
214
-        },
215
-        ruleForm: {
216
-          manufacturer: [
217
-            { required: true, message: '请选择厂商', trigger: 'change' }
218
-          ]
219
-
220
-        },
221
-
222
-        total: '',
223
-        product_date: '',
224
-        expiry_date: '',
225
-        numbers: '',
226
-        // prop
227
-        isVisibility: false,
228
-        propForm: {
229
-          goodType: [],
230
-          goodInfo: [],
231
-          goodUnit: [],
232
-          title: '入库',
233
-          isCreated: 1
234
-
235
-        },
236
-
237
-        form: {
238
-          manufacturer: '',
239
-          dealer: ''
240
-        },
241
-        warehouse: {},
242
-        manufacturer: [],
243
-        dealer: [],
244
-        goodType: []
245
-      }
246
-    },
247
-    methods: {
248
-      comfirm: function(val) {
249
-        this.isVisibility = false
250
-        if (val.selectedGoodInfo.length > 0) {
251
-          for (let i = val.selectedGoodInfo.length - 1; ;i--) {
252
-            if (i == 0) {
253
-              this.recordInfo.recordData[this.currentIndex].good_type_id = val.goodTypeId
254
-              this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
255
-            } else {
256
-              const tempForm = {}
257
-              tempForm['id'] = 0
258
-              tempForm['good_type_id'] = val.goodTypeId
259
-              tempForm['good_id'] = val.selectedGoodInfo[i].id
260
-              tempForm['number'] = ''
261
-              tempForm['product_date'] = ''
262
-              tempForm['expiry_date'] = ''
263
-              tempForm['warehousing_count'] = ''
264
-              tempForm['price'] = ''
265
-              tempForm['remark'] = ''
266
-              tempForm['dealer'] = ''
267
-              tempForm['manufacturer'] = ''
268
-              this.recordInfo.recordData.push(tempForm)
269
-            }
270
-          }
271
-        }
272
-
273
-        this.currentIndex = -1
274
-      }, cancle: function() {
275
-        this.isVisibility = false
276
-      },  GetConfigInfo: function() {
277
-        GetAllConfig().then(response => {
278
-          if (response.data.state == 0) {
279
-            this.$message.error(response.data.msg)
280
-            return false
281
-          } else {
282
-            this.manufacturer = response.data.data.manufacturer
283
-            this.dealer = response.data.data.dealer
284
-            this.goodType = response.data.data.goodType
285
-            this.goodInfo = response.data.data.goodInfo
286
-          }
287
-        })
288
-
289
-      }, typeName: function(good_type_id) {
290
-        let name = '请输入物品类型'
291
-        for (let i = 0; i < this.goodType.length; i++) {
292
-          if (this.goodType[i].id == good_type_id) {
293
-            name = this.goodType[i].type_name
294
-          }
295
-        }
296
-        return name
297
-      }, specificationName: function(good_info_id) {
298
-        let name = ''
299
-        for (let i = 0; i < this.goodInfo.length; i++) {
300
-          if (this.goodInfo[i].id == good_info_id) {
301
-            name = this.goodInfo[i].specification_name
302
-          }
303
-        }
304
-        return name
305
-      }, handleEdit: function(index, row) {
306
-        const tempObj = {}
307
-        tempObj['id'] = 0
308
-        tempObj['good_type_id'] = 0
309
-        tempObj['good_id'] = 0
310
-        tempObj['number'] = ''
311
-        tempObj['product_date'] = ''
312
-        tempObj['expiry_date'] = ''
313
-        tempObj['warehousing_count'] = ''
314
-        tempObj['price'] = ''
315
-        tempObj['remark'] = ''
316
-        tempObj['dealer'] = ''
317
-        tempObj['manufacturer'] = ''
318
-        this.recordInfo.recordData.push(tempObj)
319
-      }, handleDelete: function(index, row) {
320
-        if (row.id == 0) {
321
-          this.recordInfo.recordData.splice(index, 1)
322
-        } else {
323
-          const params = {
324
-            id: row.id
325
-          }
326
-          this.$confirm('确认删除该入库物品信息记录?', '删除入库物品信息记录', {
327
-            confirmButtonText: '确定',
328
-            cancelButtonText: '取消',
329
-            type: 'warning'
330
-          }).then(() => {
331
-            DeleteWarehouseInfoItem(params).then(response => {
332
-              if (response.data.state == 0) {
333
-                this.$message.error(response.data.msg)
334
-                return false
335
-              } else {
336
-                this.$notify({
337
-                  title: '成功',
338
-                  message: '删除成功',
339
-                  type: 'success',
340
-                  duration: 2000
341
-                })
342
-                this.recordInfo.recordData.splice(index, 1)
343
-              }
344
-            })
345
-          }).catch(() => {
346
-          })
347
-        }
348
-      }, calculate: function(val) {
349
-        if (val == 0) {
350
-          return ''
351
-        }
352
-        return Math.round(parseFloat(val) * 100) / 100
353
-      },  getTime(val, temp) {
354
-        if (val != 0) {
355
-          return uParseTime(val, temp)
356
-        } else {
357
-          return ''
358
-        }
359
-      }, showDialog(index, row) {
360
-        this.currentIndex = index
361
-        if (this.form.manufacturer == '' || this.form.manufacturer == 0) {
362
-          this.$message.error('请先选择厂商')
363
-          return
364
-        } else {
365
-          this.isVisibility = true
366
-          const params = {
367
-            id: this.form.manufacturer
368
-          }
369
-          GetAllGoodInfoByID(params).then(response => {
370
-            if (response.data.state == 0) {
371
-              this.$message.error(response.data.msg)
372
-              return false
373
-            } else {
374
-              if (response.data.data.goodInfo.length == 0) {
375
-                this.$message.error('该厂商没商品,请添加商品')
376
-              } else {
377
-                for (let i = 0; i < response.data.data.goodInfo.length; i++) {
378
-                  this.propForm.goodType.push(response.data.data.goodInfo[i].GoodsType)
379
-                }
380
-
381
-                const obj = {}
382
-                this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
383
-                  obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
384
-                  return cur
385
-                }, []) // 设置cur默认类型为数组,并且初始值为空的数组
386
-              }
387
-            }
388
-          })
389
-        }
390
-      }, back() {
391
-        this.$router.go(-1)
392
-      }, submit() {
393
-        this.$refs['tableForm'].validate((valid) => {
394
-          if (valid) {
395
-            const array = this.recordInfo.recordData
396
-            for (let i = 0; i < array.length; i++) {
397
-              if (array[i].good_type_id == 0) {
398
-                this.$message.error('物品类型不能为空')
399
-                return
400
-              }
401
-              if (array[i].good_id == 0) {
402
-                this.$message.error('规格名称不能为空')
403
-                return
404
-              }
405
-            }
406
-
407
-            const params = {
408
-              'stockIn': this.recordInfo.recordData
409
-            }
410
-            EditWarehouse(params, this.warehousing_time, this.$route.query.id).then(response => {
411
-              if (response.data.state == 0) {
412
-                this.$message.error(response.data.msg)
413
-                return false
414
-              } else {
415
-                this.$notify({
416
-                  title: '成功',
417
-                  message: '入库成功',
418
-                  type: 'success',
419
-                  duration: 2000
420
-                })
421
-                this.$router.back(-1)
422
-              }
423
-            })
424
-          } else {
425
-            return false
426
-          }
427
-        })
428
-      }, GetOrderDetail: function(order_id) {
429
-        const params = {
430
-          'id': order_id
431
-        }
432
-        getWarehouseInfoList(params).then(response => {
433
-          if (response.data.state == 0) {
434
-            this.$message.error(response.data.msg)
435
-            return false
436
-          } else {
437
-            for (let i = 0; i < response.data.data.info.length; i++) {
438
-              response.data.data.info[i].product_date = this.getTime(response.data.data.info[i].product_date, '{y}-{m}-{d}')
439
-              response.data.data.info[i].expiry_date = this.getTime(response.data.data.info[i].expiry_date, '{y}-{m}-{d}')
440
-              response.data.data.info[i].price = response.data.data.info[i].price.toString()
441
-              response.data.data.info[i].warehousing_count = response.data.data.info[i].warehousing_count.toString()
442
-
443
-              this.recordInfo.recordData.push(response.data.data.info[i])
444
-            }
445
-
446
-            this.warehouse = response.data.data.warehousing
447
-            this.form.manufacturer = this.warehouse.manufacturer
448
-            this.form.dealer = this.warehouse.dealer
449
-            this.warehousing_time = this.getTime(this.warehouse.warehousing_time, '{y}-{m}-{d}')
450
-          }
451
-        })
452
-      }
453
-    },
454
-    created() {
455
-      this.GetConfigInfo()
456
-      this.propForm.goodUnit = this.$store.getters.good_unit
457
-      const order_id = this.$route.query.id
458
-      this.GetOrderDetail(order_id)
459
-    }
460
-
461
-  }
462
-</script>
463
-
464
-<style rel="stylesheet/css" lang="scss" scoped>
465
-  .information {
466
-    border: 1px #dcdfe6 solid;
467
-    padding: 30px 20px 30px 20px;
468
-
469
-  .border {
470
-    border-bottom: 1px #dcdfe6 solid;
471
-    margin: 0px 0 20px 0;
472
-  }
473
-  }
474
-
475
-  .title {
476
-    background: #409eff;
477
-    height: 44px;
478
-    line-height: 44px;
479
-    padding: 0 0 0 10px;
480
-    color: #fff;
481
-    margin: 0 0 10px 0;
482
-    border-radius: 4px 4px 0 0;
483
-  }
484
-
485
-  .edit_separater {
486
-    border-top: 1px solid rgb(233, 233, 233);
487
-    margin-top: 15px;
488
-    margin-bottom: 15px;
489
-  }
490
-
491
-</style>
492
-
493
-<style>
494
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
495
-    font-size: 12px;
496
-  }
497
-
498
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
499
-    background: #6fb5fa;
500
-  }
501
-
502
-</style>

+ 0 - 26
src/xt_pages/stock/otherStockOutDetail.vue Bestand weergeven

@@ -1,26 +0,0 @@
1
-<template>
2
-  <other-stock-out-order-detail v-if="isEdit == 0"   v-on:edit-record="isEdit = 1"></other-stock-out-order-detail>
3
-  <other-stock-out-order-edit v-else></other-stock-out-order-edit>
4
-</template>
5
-
6
-<script>
7
-  import StockOutOrderDetail from './stockOutOrderDetail'
8
-  import StockOutEdit from './stockOutOrderEdit'
9
-  import OtherStockOutOrderEdit from './otherStockOutOrderEdit'
10
-  import OtherStockOutOrderDetail from './otherStockOutOrderDetail'
11
-  export default {
12
-    name: 'otherStockOutDetail',
13
-    components: { OtherStockOutOrderDetail, OtherStockOutOrderEdit, StockOutEdit, StockOutOrderDetail},
14
-    data() {
15
-      return {
16
-        isEdit: 0
17
-      }
18
-    }
19
-
20
-  }
21
-
22
-</script>
23
-
24
-<style scoped>
25
-
26
-</style>

+ 167 - 91
src/xt_pages/stock/otherStockOutOrder.vue Bestand weergeven

@@ -1,47 +1,45 @@
1 1
 <template>
2 2
 
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-
6
-    <div class="filter-container">
7
-
8
-
9
-      <el-row style="float:right;">
10
-        <el-button @click="AddNewOrder" type="primary">新增</el-button>
11
-      </el-row>
12
-    </div>
13
-
14
-    <div class="filter-container" style="margin-top:20px">
15
-      <el-input style="width: 300px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
16
-      <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
17
-    </div>
18
-
19
-    <div class="filter-container">
20
-      <span>入库时间:</span>
21
-      <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
-                      value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
24
-      <span class="">-</span>
25
-      <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
26
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
-                      value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
28
-    </div>
29
-
30
-    <div class="filter-container" style="margin-top: 10px">
31
-      <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
32
-      <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
33
-
3
+  <div class="main-contain">
4
+    <div class="position">
5
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
6
+      <el-button size="small" @click="AddNewOrder" class="filter-item" style="float:right;" type="primary"
7
+                 icon="el-icon-circle-plus-outline">新增
8
+      </el-button>
34 9
     </div>
10
+    <div class="app-container">
11
+      <div class="cell">
12
+        <el-input style="width: 300px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
13
+        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
14
+      </div>
15
+
16
+
17
+      <div class="cell">
18
+        <label class="title"><span class="name">出库时间</span> : </label>
19
+
20
+        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
+                        value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
23
+        <span class="">-</span>
24
+        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
25
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
26
+                        value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
27
+      </div>
28
+
29
+      <div class="cell clearfix">
30
+        <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
31
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
32
+      </div>
35 33
 
36
-    <el-row :gutter="12" style="margin-top: 10px">
37 34
       <el-table
38 35
         :data="warehouseOutDate"
39 36
         :class="signAndWeighBoxPatients"
40 37
         style="width: 100%" border
41 38
         highlight-current-row
42 39
         ref="multipleTable"
43
-        @selection-change="select"
44 40
 
41
+        @selection-change="select"
42
+        :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
45 43
       >
46 44
         <el-table-column
47 45
           type="selection"
@@ -65,8 +63,6 @@
65 63
             {{getXuserName(scope.row.creater)}}
66 64
           </template>
67 65
         </el-table-column>
68
-
69
-
70 66
         <el-table-column label="厂家" align="center">
71 67
           <template slot-scope="scope">
72 68
             {{getManufactuerName(scope.row.manufacturer)}}
@@ -80,26 +76,30 @@
80 76
         </el-table-column>
81 77
 
82 78
         <el-table-column label="操作" align="center">
79
+
83 80
           <template slot-scope="scope">
84
-            <el-button
85
-              size="mini"
86
-              type="primary"
87
-              icon="el-icon-edit"
88
-              @click="handleEdit(scope.$index, scope.row)">
89
-            </el-button>
90
-
91
-            <el-button
92
-              size="mini"
93
-              type="danger"
94
-              icon="el-icon-delete"
95
-              @click="handleDelete(scope.$index, scope.row)">
96
-            </el-button>
81
+            <el-tooltip class="item" effect="dark" content="编辑" placement="top">
82
+
83
+              <el-button
84
+                size="mini"
85
+                type="primary"
86
+                icon="el-icon-edit"
87
+                @click="handleEdit(scope.$index, scope.row)">
88
+              </el-button>
89
+            </el-tooltip>
90
+            <el-tooltip class="item" effect="dark" content="编辑" placement="top">
91
+
92
+              <el-button
93
+                size="mini"
94
+                type="danger"
95
+                icon="el-icon-delete"
96
+                @click="handleDelete(scope.$index, scope.row)">
97
+              </el-button>
98
+            </el-tooltip>
97 99
 
98 100
           </template>
99 101
         </el-table-column>
100
-
101 102
       </el-table>
102
-
103 103
       <el-pagination
104 104
         @size-change="handleSizeChange"
105 105
         @current-change="handleCurrentChange"
@@ -111,21 +111,23 @@
111 111
         :total="total">
112 112
       </el-pagination>
113 113
 
114
-    </el-row>
114
+
115
+    </div>
115 116
   </div>
117
+
118
+
116 119
 </template>
117 120
 
118 121
 <script>
119 122
   import { uParseTime } from '@/utils/tools'
120 123
   import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
121
-  import {
122
-    deleteWarehouseOut,
123
-    GetAllConfig,
124
-    getWarehouseOutList,
125
-  } from '@/api/stock'
124
+
125
+  import { deleteWarehouseOut, GetAllConfig, getWarehouseOutList } from '@/api/stock'
126
+  import BreadCrumb from '../components/bread-crumb'
126 127
 
127 128
   export default {
128
-    name: 'otherStockOutOrder',
129
+    name: 'salesReturnOrder',
130
+    components: { BreadCrumb },
129 131
     created() {
130 132
       var year = new Date().getFullYear()
131 133
       var month = new Date().getMonth() + 1
@@ -156,6 +158,10 @@
156 158
     },
157 159
     data() {
158 160
       return {
161
+        crumbs: [
162
+          { path: false, name: '库存管理' },
163
+          { path: '/stock/out', name: '其他出库单' }
164
+        ],
159 165
         page: 1,
160 166
         limit: 7,
161 167
         checked: false,
@@ -173,13 +179,13 @@
173 179
         manufacturer: [],
174 180
         selectedTableData: [],
175 181
         dealer: [],
176
-        type:2,
182
+        type: 2
177 183
 
178 184
       }
179 185
     },
180 186
     methods: {
181
-      AddNewOrder:function(){
182
-        this.$router.push({ name: 'stockOutOrderAdd'})
187
+      AddNewOrder: function() {
188
+        this.$router.push({ name: 'stockOutOrderAdd', query: { type: this.type } })
183 189
       },
184 190
       GetWarehouseOut: function() {
185 191
         const Params = {
@@ -187,7 +193,7 @@
187 193
           limit: this.limit,
188 194
           start_time: this.start_time,
189 195
           end_time: this.end_time,
190
-          type: this.type,
196
+          type: this.type
191 197
         }
192 198
         this.warehouseOutDate = []
193 199
         getWarehouseOutList(Params).then(response => {
@@ -270,7 +276,7 @@
270 276
           }
271 277
         }
272 278
       }, handleEdit: function(index, row) {
273
-        this.$router.push({ name: 'stockOutDetail', query: { id: row.id }})
279
+        this.$router.push({ name: 'stockOutDetail', query: { id: row.id, type: this.type } })
274 280
       }, handleDelete: function(index, row) {
275 281
         const ids = []
276 282
         ids.push(row.id)
@@ -361,48 +367,118 @@
361 367
   }
362 368
 </script>
363 369
 
364
-<style rel="stylesheet/css" lang="scss" scoped>
365
-  .information {
366
-    border: 1px #dcdfe6 solid;
367
-    padding: 30px 20px 30px 20px;
370
+<style rel="stylesheet/scss" lang="scss" scoped>
371
+  .app-container {
368 372
 
369
-  .border {
370
-    border-bottom: 1px #dcdfe6 solid;
371
-    margin: 0px 0 20px 0;
372
-  }
373
+    font-size: 15px;
373 374
 
375
+  .filter-container {
376
+    padding-bottom: 5px;
374 377
   }
375 378
 
376
-  .title {
377
-    background: #409eff;
378
-    height: 44px;
379
-    line-height: 44px;
380
-    padding: 0 0 0 10px;
381
-    color: #fff;
382
-    margin: 0 0 10px 0;
379
+  .search-component {
380
+    width: 500px;
383 381
 
382
+  .searchBox {
383
+    width: 300px;
384
+    height: 36px;
385
+    line-height: 36px;
386
+    padding-left: 15px;
387
+    border: 1px #dcdfe6 solid;
388
+    border-right: none;
389
+    outline: none;
390
+    float: left;
391
+    border-radius: 6px 0 0 6px;
392
+    font-size: 14px;
393
+    color: #333;
394
+    background: #fff;
395
+    box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
384 396
   }
385 397
 
386
-  .edit_separater {
387
-    border-top: 1px solid rgb(233, 233, 233);
388
-    margin-top: 15px;
389
-    margin-bottom: 15px;
398
+  .searchBtn {
399
+    background-color: #409eff;
400
+    color: #fff;
401
+    font-size: 15px;
402
+    text-align: center;
403
+    height: 36px;
404
+    line-height: 36px;
405
+    float: left;
406
+    outline: none;
407
+    width: 70px;
408
+    border: none;
409
+    border-radius: 0 6px 6px 0;
410
+    font-family: "Microsoft Yahei";
411
+    cursor: pointer;
390 412
   }
391 413
 
392
-</style>
393
-
394
-<style>
395
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
396
-    font-size: 12px;
397 414
   }
398
-
399
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
400
-    background: #6fb5fa;
415
+  .cell {
416
+    margin: 0px 0 15px 0;
417
+    -moz-box-sizing: border-box;
418
+    -webkit-box-sizing: border-box;
419
+    -o-box-sizing: border-box;
420
+    -ms-box-sizing: border-box;
421
+    box-sizing: border-box;
422
+    display: -webkit-box;
423
+    display: -ms-flexbox;
424
+    -webkit-box-align: flex-start;
425
+    -ms-flex-align: flex-start;
426
+    align-items: flex-start;
427
+    text-align: left;
428
+    justify-content: flex-start;
429
+    color: #333;
430
+
431
+
432
+  .time {
433
+    -webkit-box-flex: 1;
434
+    -ms-flex: 1;
435
+    flex: 1;
436
+
437
+  ul {
438
+    padding: 0;
439
+    margin: 0;
440
+
441
+  li {
442
+    float: left;
443
+    list-style: none;
444
+    cursor: pointer;
445
+    padding: 3px 0;
446
+    width: 70px;
447
+    color: #606266;
448
+    border-radius: 4px;
449
+    margin: 0 10px 0 0;
450
+    color: #409eff;
451
+    border: 1px #409eff solid;
452
+    text-align: center;
453
+
454
+  &
455
+  :hover {
456
+    background: #409eff;
457
+    color: #fff;
401 458
   }
402 459
 
403
-  .count {
404
-    color: #bd2c00;
460
+  }
461
+  .active {
462
+    background: #409eff;
463
+    color: #fff;
464
+  }
405 465
 
406 466
   }
467
+  }
468
+  }
469
+  .amount {
470
+    font-weight: normal;
471
+    padding: 10px 0 0 0;
472
+    color: #606266;
473
+    font-size: 14px;
474
+
475
+  span {
476
+    color: #ef2525;
477
+    font-family: "Arial";
478
+    padding: 0 2px;
479
+  }
407 480
 
481
+  }
482
+  }
408 483
 </style>
484
+

+ 0 - 443
src/xt_pages/stock/otherStockOutOrderAdd.vue Bestand weergeven

@@ -1,443 +0,0 @@
1
-<template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <sales-return-dialog :propForm="propForm"
6
-                         :visibility="isVisibility"
7
-                         v-on:dialog-comfirm="comfirm"
8
-                         v-on:dialog-cancle="cancle"></sales-return-dialog>
9
-
10
-    <div class="filter-container">
11
-
12
-      <el-row>
13
-        <el-col :span="8"><div>
14
-          <span>退货时间:</span>
15
-          <el-date-picker v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16
-                          type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17
-                          value-format="yyyy-MM-dd"></el-date-picker>
18
-        </div></el-col>
19
-
20
-
21
-        <el-col :span="8">
22
-          <div>
23
-            <el-form ref="form" :model="form" :rules="ruleForm" label-width="80px">
24
-              <el-form-item label="厂商:" prop="manufacturer">
25
-                <el-select v-model="form.manufacturer" placeholder="请选择厂商">
26
-                  <el-option v-for="(option, index) in manufacturer" :key="index" :label="option.manufacturer_name" :value="option.id"></el-option>
27
-                </el-select>
28
-              </el-form-item>
29
-            </el-form>
30
-          </div>
31
-        </el-col>
32
-        <el-col :span="8">
33
-          <div>
34
-            <el-form ref="form" :model="form" label-width="80px">
35
-              <el-form-item label="经销商:">
36
-                <el-select v-model="form.dealer" placeholder="请选择经销商">
37
-                  <el-option v-for="(option, index) in dealer" :key="index" :label="option.dealer_name" :value="option.id"></el-option>
38
-                </el-select>
39
-              </el-form-item>
40
-            </el-form>
41
-          </div>
42
-        </el-col>
43
-      </el-row>
44
-
45
-    </div>
46
-
47
-    <el-row>
48
-      <el-col>
49
-        <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
50
-          <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
51
-                    max-height="450"
52
-          >
53
-
54
-            <el-table-column label="操作" align="center" min-width="30">
55
-              <template slot-scope="scope">
56
-                <el-button
57
-                  size="mini"
58
-                  @click="handleEdit(scope.$index, scope.row)">+
59
-                </el-button>
60
-                <el-button
61
-                  size="mini"
62
-                  type="danger"
63
-                  @click="handleDelete(scope.$index, scope.row)">-
64
-                </el-button>
65
-              </template>
66
-            </el-table-column>
67
-
68
-            <el-table-column min-width="35" align="center">
69
-
70
-              <template slot="header" slot-scope="scope">
71
-                <span>物品类型<span style="color: red">*</span></span>
72
-              </template>
73
-
74
-              <template slot-scope="scope" >
75
-                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id == 0" style="color:#c5c8cf">请输入类型</span>-->
76
-                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
77
-
78
-                <el-form-item  style="padding-top: 15px">
79
-                  <el-input placeholder="请输入物品类型"  v-model="scope.row.good_type_id" :value="typeName(scope.row.good_type_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
80
-                </el-form-item>
81
-
82
-              </template>
83
-            </el-table-column>
84
-            <el-table-column min-width="35" align="center">
85
-              <template slot="header" slot-scope="scope">
86
-                <span>规格名称<span style="color: red">*</span></span>
87
-              </template>
88
-              <template slot-scope="scope">
89
-
90
-                <el-form-item  style="padding-top: 15px">
91
-                  <el-input placeholder="请输入规格名称"  v-model="scope.row.good_id" :value="specificationName(scope.row.good_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
92
-                </el-form-item>
93
-
94
-              </template>
95
-            </el-table-column>
96
-
97
-
98
-            <el-table-column  min-width="23" align="center">
99
-              <template slot="header" slot-scope="scope">
100
-                <span>单价<span style="color: red">*</span></span>
101
-              </template>
102
-              <template slot-scope="scope">
103
-                <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
104
-                <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price' style="padding-top: 17px">
105
-                  <el-input type="number"  v-model="scope.row.price" ></el-input>
106
-                </el-form-item>
107
-
108
-
109
-              </template>
110
-            </el-table-column>
111
-
112
-            <el-table-column  min-width="23" align="center">
113
-              <template slot="header" slot-scope="scope">
114
-                <span>出库数量<span style="color: red">*</span></span>
115
-              </template>
116
-              <template slot-scope="scope">
117
-                <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count' style="padding-top: 17px">
118
-                  <el-input type="number"  v-model="scope.row.count" ></el-input>
119
-                </el-form-item>
120
-              </template>
121
-            </el-table-column>
122
-
123
-            <el-table-column label="总价" min-width="20" align="center">
124
-              <template slot-scope="scope">
125
-                {{calculate(scope.row.price*scope.row.count)}}
126
-              </template>
127
-            </el-table-column>
128
-            <el-table-column label="备注" min-width="20" align="center">
129
-              <template slot-scope="scope">
130
-                <el-input  v-model="scope.row.remark"></el-input>
131
-              </template>
132
-            </el-table-column>
133
-          </el-table>
134
-        </el-form>
135
-      </el-col>
136
-
137
-
138
-      <span  class="dialog-footer" style="margin-top: 20px;float:right">
139
-        <el-button @click="back()">取 消</el-button>
140
-        <el-button type="primary" @click="submit()">确 定</el-button>
141
-      </span>
142
-
143
-    </el-row>
144
-  </div>
145
-</template>
146
-
147
-<script>
148
-  import { uParseTime } from '@/utils/tools'
149
-  import {
150
-    getSalesReturnConfig,
151
-    postWarehouseOut,
152
-  } from '@/api/stock'
153
-  import SalesReturnDialog from './Dialog/salesReturnDialog'
154
-
155
-  export default {
156
-    components: { SalesReturnDialog},
157
-    name: 'otherStockOutOrderAdd',
158
-
159
-    data() {
160
-      return {
161
-        type:2,
162
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
163
-        warehouse_out_time: '',
164
-        currentIndex: 0,
165
-        recordInfo: {
166
-          recordData: [],
167
-        },
168
-        tableRules: {
169
-          price: [
170
-            { required: true, message: '单价不能为空', trigger: 'blur' }
171
-          ],
172
-          count: [
173
-            { required: true, message: '数量不能为空', trigge: 'blur' }
174
-          ],
175
-        },
176
-        ruleForm: {
177
-          manufacturer: [
178
-            { required: true, message: '请选择厂商', trigger: 'change' }
179
-          ]
180
-
181
-        },
182
-        // prop
183
-        isVisibility: false,
184
-        propForm: {
185
-          goodType: [],
186
-          goodInfo: [],
187
-          goodUnit: [],
188
-        },
189
-        form: {
190
-          manufacturer: '',
191
-          dealer: ''
192
-        },
193
-
194
-        manufacturer: [],
195
-        dealer: [],
196
-        goodType: []
197
-      }
198
-    },
199
-    methods: {
200
-      comfirm: function(val) {
201
-        this.isVisibility = false
202
-        if (val.selectedGoodInfo.length > 0) {
203
-          for (let i = val.selectedGoodInfo.length - 1; ;i--) {
204
-            if (i == 0) {
205
-              this.recordInfo.recordData[this.currentIndex].good_type_id = val.goodTypeId
206
-              this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
207
-            } else {
208
-              const tempForm = {}
209
-              tempForm['good_type_id'] = val.goodTypeId
210
-              tempForm['good_id'] = val.selectedGoodInfo[i].id
211
-              tempForm['count'] = ''
212
-              tempForm['price'] = ''
213
-              tempForm['remark'] = ''
214
-
215
-              this.recordInfo.recordData.push(tempForm)
216
-            }
217
-          }
218
-        }
219
-
220
-        this.currentIndex = -1
221
-      }, cancle: function() {
222
-        this.isVisibility = false
223
-      }, GetConfigInfo: function() {
224
-        getSalesReturnConfig().then(response => {
225
-          if (response.data.state == 0) {
226
-            this.$message.error(response.data.msg)
227
-            return false
228
-          } else {
229
-            var warehouseList =  response.data.data.warehouseList
230
-            var warehouseInfoList =  response.data.data.warehouseInfoList
231
-            for (let i = 0; i <warehouseList.length; i++ ){
232
-              if(warehouseList[i].Manufacturer.id > 0){
233
-                this.manufacturer.push(warehouseList[i].Manufacturer)
234
-              }
235
-              if(warehouseList[i].Dealer.id > 0){
236
-                this.dealer.push(warehouseList[i].Dealer)
237
-              }
238
-            }
239
-            for (let i = 0; i < warehouseInfoList.length; i++) {
240
-              this.propForm.goodInfo.push(warehouseInfoList[i].GoodInfo)
241
-
242
-            }
243
-            const obj = {}
244
-            const obj2 = {}
245
-            const obj4 = {}
246
-            //去重复
247
-            this.manufacturer =  this.manufacturer.reduce((cur, next) => {
248
-              obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
249
-              return cur
250
-            }, [])
251
-            //去重复
252
-            this.dealer =  this.dealer.reduce((cur, next) => {
253
-              obj2[next.id] ? '' : obj2[next.id] = true && cur.push(next)
254
-              return cur
255
-            }, [])
256
-            this.propForm.goodInfo = this.propForm.goodInfo.reduce((cur, next) => {
257
-              obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
258
-              return cur
259
-            }, [])
260
-
261
-
262
-          }
263
-        })
264
-      }, typeName: function(good_type_id) {
265
-        let name = ''
266
-        for (let i = 0; i < this.propForm.goodType.length; i++) {
267
-          if (this.propForm.goodType[i].id == good_type_id) {
268
-            name = this.propForm.goodType[i].type_name
269
-          }
270
-        }
271
-        return name
272
-      }, specificationName: function(good_info_id) {
273
-        let name = ''
274
-        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
275
-          if (this.propForm.goodInfo[i].id == good_info_id) {
276
-            name = this.propForm.goodInfo[i].specification_name
277
-          }
278
-        }
279
-        return name
280
-      }, handleEdit: function(index, row) {
281
-        const tempObj = {}
282
-        tempObj['good_type_id'] = 0
283
-        tempObj['good_id'] = 0
284
-        tempObj['count'] = ''
285
-        tempObj['price'] = ''
286
-        tempObj['remark'] = ''
287
-
288
-
289
-        this.recordInfo.recordData.push(tempObj)
290
-      }, handleDelete: function(index, row) {
291
-        this.recordInfo.recordData.splice(index, 1)
292
-      }, calculate: function(val) {
293
-        if(isNaN(val)){
294
-          return ''
295
-        }
296
-        if (val == 0) {
297
-          return ''
298
-        }
299
-        return Math.round(parseFloat(val) * 100) / 100
300
-      }, getTime(val, temp) {
301
-        if (val != 0) {
302
-          return uParseTime(val, temp)
303
-        } else {
304
-          return ''
305
-        }
306
-      }, showDialog(index, row) {
307
-        this.currentIndex = index
308
-        if (this.form.manufacturer == '' || this.form.manufacturer == 0) {
309
-          this.$message.error('请先选择厂商')
310
-          return
311
-        } else {
312
-          this.isVisibility = true
313
-          console.log(this.form.manufacturer)
314
-          for (let i = 0; i < this.propForm.goodInfo.length; i++){
315
-            if(this.propForm.goodInfo[i].manufacturer == this.form.manufacturer){
316
-              this.propForm.goodType.push(this.propForm.goodInfo[i].GoodsType)
317
-            }
318
-
319
-          }
320
-          const obj3 = {}
321
-          this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
322
-            obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
323
-            return cur
324
-          }, [])
325
-
326
-
327
-
328
-        }
329
-      }, back() {
330
-        this.$router.go(-1)
331
-      }, submit() {
332
-        this.$refs['tableForm'].validate((valid) => {
333
-          if (valid) {
334
-            if (this.form.manufacturer == 0) {
335
-              this.$message.error('厂商不能为空')
336
-              return
337
-            }
338
-            const array = this.recordInfo.recordData
339
-            let total = 0
340
-            for (let i = 0; i < array.length; i++) {
341
-              if (array[i].good_type_id == 0) {
342
-                this.$message.error('物品类型不能为空')
343
-                return
344
-              }
345
-              if (array[i].good_id == 0) {
346
-                this.$message.error('规格名称不能为空')
347
-                return
348
-              }
349
-              total = total + array[i].price * array[i].return_count
350
-            }
351
-            const params = {
352
-              'stockOut': this.recordInfo.recordData
353
-            }
354
-            console.log(this.form.dealer)
355
-
356
-
357
-            postWarehouseOut(params,this.warehouse_out_time,this.form.dealer,this.form.manufacturer,this.type).then(response=>{
358
-              if (response.data.state==0) {
359
-                this.$message.error(response.data.msg);
360
-                return false;
361
-              }else {
362
-                this.$notify({
363
-                  title: "成功",
364
-                  message: "退货成功",
365
-                  type: "success",
366
-                  duration: 2000
367
-                });
368
-                this.recordInfo.recordData = []
369
-                this.$router.back(-1)
370
-              }
371
-            });
372
-          } else {
373
-            return false
374
-          }
375
-        })
376
-      }
377
-    },
378
-    created() {
379
-      var year = new Date().getFullYear()
380
-      var month = new Date().getMonth() + 1
381
-      var day = new Date().getDate()
382
-      if (parseInt(month) < 10) {
383
-        month = '0' + month
384
-      }
385
-      if (parseInt(day) < 10) {
386
-        day = '0' + day
387
-      }
388
-      const endTime = year + '-' + month + '-' + day
389
-      this.warehouse_out_time = endTime
390
-      const tempObj = {}
391
-      tempObj['good_type_id'] = 0
392
-      tempObj['good_id'] = 0
393
-      tempObj['return_count'] = 0
394
-      tempObj['price'] = ''
395
-      tempObj['remark'] = ''
396
-
397
-      this.recordInfo.recordData.push(tempObj)
398
-      this.GetConfigInfo()
399
-      this.propForm.goodUnit = this.$store.getters.good_unit
400
-    }
401
-
402
-  }
403
-</script>
404
-
405
-<style rel="stylesheet/css" lang="scss" scoped>
406
-  .information {
407
-    border: 1px #dcdfe6 solid;
408
-    padding: 30px 20px 30px 20px;
409
-
410
-  .border {
411
-    border-bottom: 1px #dcdfe6 solid;
412
-    margin: 0px 0 20px 0;
413
-  }
414
-  }
415
-
416
-  .title {
417
-    background: #409eff;
418
-    height: 44px;
419
-    line-height: 44px;
420
-    padding: 0 0 0 10px;
421
-    color: #fff;
422
-    margin: 0 0 10px 0;
423
-  // border-radius: 4px 4px 0 0;
424
-  }
425
-
426
-  .edit_separater {
427
-    border-top: 1px solid rgb(233, 233, 233);
428
-    margin-top: 15px;
429
-    margin-bottom: 15px;
430
-  }
431
-
432
-</style>
433
-
434
-<style>
435
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
436
-    font-size: 12px;
437
-  }
438
-
439
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
440
-    background: #6fb5fa;
441
-  }
442
-
443
-</style>

+ 0 - 258
src/xt_pages/stock/otherStockOutOrderDetail.vue Bestand weergeven

@@ -1,258 +0,0 @@
1
-<template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <div class="filter-container">
6
-      <span style="font-size: 20px">退货单详情</span>
7
-      <el-row style="float:right;">
8
-        <span>{{warehousingOutInfo.info.warehouse_out_order_number}}</span>
9
-      </el-row>
10
-    </div>
11
-
12
-
13
-
14
-    <div class="filter-container">
15
-      <span>单据日期:  {{warehousingOutInfo.info.warehouse_out_time | parseTime('{y}-{m}-{d}')}} </span>
16
-      <span>厂商 {{getManufactuerName(warehousingOutInfo.info.manufacturer)}}</span>
17
-      <span>经销商 {{getDealerName(warehousingOutInfo.info.dealer)}}</span>
18
-    </div>
19
-
20
-    <div class="filter-container" style="margin-top: 10px">
21
-      <el-button size="small" icon="el-icon-edit" @click="editRecord">编辑</el-button>
22
-      <el-button size="small" icon="el-icon-delete" @click="deleteRecord">删除</el-button>
23
-    </div>
24
-
25
-    <el-row :gutter="12" style="margin-top: 10px">
26
-      <el-table :data="warehousingOutInfo.warehousingOutData" :class="signAndWeighBoxPatients" style="width: 100%" border
27
-      >
28
-        <el-table-column min-width="35" align="center">
29
-          <template slot="header" slot-scope="scope">
30
-            <span>物品类型</span>
31
-          </template>
32
-
33
-          <template slot-scope="scope">
34
-            <span v-if="scope.row.good_type_id != 0">{{getTypeName(scope.row.good_type_id)}}</span>
35
-          </template>
36
-        </el-table-column>
37
-        <el-table-column min-width="35" align="center">
38
-          <template slot="header" slot-scope="scope">
39
-            <span>规格名称</span>
40
-          </template>
41
-          <template slot-scope="scope">
42
-            <span v-if="scope.row.good_id != 0">{{getSpecificationName(scope.row.good_id)}}</span>
43
-          </template>
44
-        </el-table-column>
45
-
46
-
47
-        <el-table-column min-width="23" align="center">
48
-          <template slot="header" slot-scope="scope">
49
-            <span>单价</span>
50
-          </template>
51
-          <template slot-scope="scope">
52
-            <span>{{scope.row.price}}</span>
53
-          </template>
54
-        </el-table-column>
55
-
56
-        <el-table-column min-width="23" align="center">
57
-          <template slot="header" slot-scope="scope">
58
-            <span>出库数量</span>
59
-          </template>
60
-          <template slot-scope="scope">
61
-            <span>{{scope.row.count}}</span>
62
-
63
-          </template>
64
-        </el-table-column>
65
-        <el-table-column label="总价" min-width="20" align="center">
66
-          <template slot-scope="scope">
67
-            {{calculate(scope.row.price*scope.row.count)}}
68
-          </template>
69
-        </el-table-column>
70
-
71
-        <el-table-column label="备注" min-width="20"  align="center">
72
-          <template slot-scope="scope">
73
-            <el-popover placement="top-start"  width="250" trigger="hover" >
74
-              <div>{{scope.row.remark}}</div>
75
-              <span slot="reference" v-if="scope.row.remark.length > 20">{{ scope.row.remark.substr(0,20)+'...' }}</span>
76
-              <span slot="reference" v-else>{{ scope.row.remark}}</span>
77
-            </el-popover>
78
-
79
-          </template>
80
-        </el-table-column>
81
-
82
-
83
-      </el-table>
84
-    </el-row>
85
-  </div>
86
-</template>
87
-
88
-<script>
89
-  import { uParseTime } from '@/utils/tools'
90
-  import { GetAllConfig,getWarehouseOutInfo,deleteWarehouseOut } from '@/api/stock'
91
-
92
-  export default {
93
-    name: 'otherStockOutOrderDetail',
94
-    created() {
95
-      const order_id = this.$route.query.id
96
-      this.GetConfigInfo()
97
-      this.GetOrderDetail(order_id)
98
-    },
99
-    data() {
100
-      return {
101
-        isEdit: 0,
102
-        checked: false,
103
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
104
-        goodType: [],
105
-        goodInfo: [],
106
-        manufacturer: [],
107
-        dealer: [],
108
-
109
-        warehousingOutInfo: {
110
-          loading: false,
111
-          warehousingOutData: [],
112
-          info: {}
113
-        }
114
-      }
115
-    },
116
-    methods: {
117
-      getSpecificationName: function(id) {
118
-        let name = ''
119
-        for (let i = 0; i < this.goodInfo.length; i++) {
120
-          if (this.goodInfo[i].id == id) {
121
-            name = this.goodInfo[i].specification_name
122
-          }
123
-        }
124
-        return name
125
-      }, getTypeName: function(id) {
126
-        let name = ''
127
-        for (let i = 0; i < this.goodType.length; i++) {
128
-          if (this.goodType[i].id == id) {
129
-            name = this.goodType[i].type_name
130
-          }
131
-        }
132
-        return name
133
-      }, GetConfigInfo: function() {
134
-        GetAllConfig().then(response => {
135
-          if (response.data.state == 0) {
136
-            this.$message.error(response.data.msg)
137
-            return false
138
-          } else {
139
-            this.manufacturer = response.data.data.manufacturer
140
-            this.dealer = response.data.data.dealer
141
-            this.goodInfo = response.data.data.goodInfo
142
-            this.goodType = response.data.data.goodType
143
-          }
144
-        })
145
-      }, getManufactuerName: function(manufacturer_id) {
146
-        for (let i = 0; i < this.manufacturer.length; i++) {
147
-          if (this.manufacturer[i].id == manufacturer_id) {
148
-            return this.manufacturer[i].manufacturer_name
149
-          }
150
-        }
151
-      }, getDealerName: function(dealer_id) {
152
-        for (let i = 0; i < this.dealer.length; i++) {
153
-          if (this.dealer[i].id == dealer_id) {
154
-            return this.dealer[i].dealer_name
155
-          }
156
-        }
157
-      }, calculate: function(val) {
158
-        if (val == 0) {
159
-          return ''
160
-        }
161
-        return Math.round(parseFloat(val) * 100) / 100
162
-      }, GetOrderDetail: function(order_id) {
163
-        const params = {
164
-          'id': order_id
165
-        }
166
-        getWarehouseOutInfo(params).then(response => {
167
-          if (response.data.state == 0) {
168
-            this.$message.error(response.data.msg)
169
-            return false
170
-          } else {
171
-            for (let i = 0; i < response.data.data.list.length; i++) {
172
-              this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
173
-            }
174
-            this.warehousingOutInfo.info = response.data.data.info
175
-          }
176
-        })
177
-      }, deleteRecord: function() {
178
-        const ids = []
179
-        ids.push(this.warehousingOutInfo.info.id)
180
-        const idStr = ids.join(',')
181
-
182
-        const params = {
183
-          ids: idStr
184
-        }
185
-
186
-        this.$confirm('确认删除退货单?', '删除退货单记录', {
187
-          confirmButtonText: '确定',
188
-          cancelButtonText: '取消',
189
-          type: 'warning'
190
-        }).then(() => {
191
-          deleteWarehouseOut(params).then(response => {
192
-            if (response.data.state == 0) {
193
-              this.$message.error(response.data.msg)
194
-              return false
195
-            } else {
196
-              this.$notify({
197
-                title: '成功',
198
-                message: '删除成功',
199
-                type: 'success',
200
-                duration: 2000
201
-              })
202
-
203
-              this.$router.back(-1)
204
-            }
205
-          })
206
-        }).catch(() => {
207
-        })
208
-      }, editRecord: function() {
209
-        this.$emit('edit-record')
210
-      }
211
-    }
212
-  }
213
-</script>
214
-
215
-<style rel="stylesheet/css" lang="scss" scoped>
216
-  .information {
217
-    border: 1px #dcdfe6 solid;
218
-    padding: 30px 20px 30px 20px;
219
-
220
-  .border {
221
-    border-bottom: 1px #dcdfe6 solid;
222
-    margin: 0px 0 20px 0;
223
-  }
224
-
225
-  }
226
-
227
-  .title {
228
-    background: #409eff;
229
-    height: 44px;
230
-    line-height: 44px;
231
-    padding: 0 0 0 10px;
232
-    color: #fff;
233
-    margin: 0 0 10px 0;
234
-  }
235
-
236
-  .edit_separater {
237
-    border-top: 1px solid rgb(233, 233, 233);
238
-    margin-top: 15px;
239
-    margin-bottom: 15px;
240
-  }
241
-
242
-</style>
243
-
244
-<style>
245
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
246
-    font-size: 12px;
247
-  }
248
-
249
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
250
-    background: #6fb5fa;
251
-  }
252
-
253
-  .count {
254
-    color: #bd2c00;
255
-
256
-  }
257
-
258
-</style>

+ 0 - 425
src/xt_pages/stock/otherStockOutOrderEdit.vue Bestand weergeven

@@ -1,425 +0,0 @@
1
-<template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <sales-return-dialog :propForm="propForm"
6
-                         :visibility="isVisibility"
7
-                         v-on:dialog-comfirm="comfirm"
8
-                         v-on:dialog-cancle="cancle"></sales-return-dialog>
9
-
10
-    <div class="filter-container">
11
-
12
-      <el-row>
13
-        <el-col :span="8">
14
-          <div>
15
-            <span>入库时间:</span>
16
-            <el-date-picker v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
17
-                            type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
18
-                            value-format="yyyy-MM-dd"></el-date-picker>
19
-          </div>
20
-        </el-col>
21
-      </el-row>
22
-    </div>
23
-
24
-    <el-row>
25
-      <el-col>
26
-        <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
27
-          <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
28
-                    max-height="450"
29
-          >
30
-
31
-            <el-table-column label="操作" align="center" min-width="30">
32
-              <template slot-scope="scope">
33
-                <el-button
34
-                  size="mini"
35
-                  @click="handleEdit(scope.$index, scope.row)">+
36
-                </el-button>
37
-                <el-button
38
-                  size="mini"
39
-                  type="danger"
40
-                  @click="handleDelete(scope.$index, scope.row)">-
41
-                </el-button>
42
-              </template>
43
-            </el-table-column>
44
-
45
-            <el-table-column min-width="35" align="center">
46
-
47
-              <template slot="header" slot-scope="scope">
48
-                <span>物品类型<span style="color: red">*</span></span>
49
-              </template>
50
-
51
-              <template slot-scope="scope">
52
-                <el-form-item style="padding-top: 15px">
53
-                  <el-input placeholder="请输入物品类型" v-model="scope.row.good_type_id"
54
-                            :value="typeName(scope.row.good_type_id)"
55
-                            @focus="showDialog(scope.$index, scope.row)"></el-input>
56
-                </el-form-item>
57
-              </template>
58
-            </el-table-column>
59
-            <el-table-column min-width="35" align="center">
60
-              <template slot="header" slot-scope="scope">
61
-                <span>规格名称<span style="color: red">*</span></span>
62
-              </template>
63
-              <template slot-scope="scope">
64
-
65
-                <el-form-item style="padding-top: 15px">
66
-                  <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
67
-                            :value="specificationName(scope.row.good_id)"
68
-                            @focus="showDialog(scope.$index, scope.row)"></el-input>
69
-                </el-form-item>
70
-
71
-              </template>
72
-            </el-table-column>
73
-
74
-
75
-            <el-table-column  min-width="23" align="center">
76
-              <template slot="header" slot-scope="scope">
77
-                <span>单价<span style="color: red">*</span></span>
78
-              </template>
79
-              <template slot-scope="scope">
80
-                <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
81
-                <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price' style="padding-top: 17px">
82
-                  <el-input type="number"  v-model="scope.row.price" ></el-input>
83
-                </el-form-item>
84
-
85
-
86
-              </template>
87
-            </el-table-column>
88
-
89
-            <el-table-column  min-width="23" align="center">
90
-              <template slot="header" slot-scope="scope">
91
-                <span>出库数量<span style="color: red">*</span></span>
92
-              </template>
93
-              <template slot-scope="scope">
94
-                <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count' style="padding-top: 17px">
95
-                  <el-input type="number"  v-model="scope.row.count" ></el-input>
96
-                </el-form-item>
97
-              </template>
98
-            </el-table-column>
99
-
100
-            <el-table-column label="总价" min-width="20" align="center">
101
-              <template slot-scope="scope">
102
-                {{calculate(scope.row.price*scope.row.count)}}
103
-              </template>
104
-            </el-table-column>
105
-            <el-table-column label="备注" min-width="20" align="center">
106
-              <template slot-scope="scope">
107
-                <el-input  v-model="scope.row.remark"></el-input>
108
-              </template>
109
-            </el-table-column>
110
-          </el-table>
111
-        </el-form>
112
-      </el-col>
113
-
114
-
115
-      <span class="dialog-footer" style="margin-top: 20px;float:right">
116
-        <el-button @click="back()">取 消</el-button>
117
-        <el-button type="primary" @click="submit()">确 定</el-button>
118
-      </span>
119
-
120
-    </el-row>
121
-  </div>
122
-</template>
123
-
124
-<script>
125
-  import { uParseTime } from '@/utils/tools'
126
-
127
-  import {
128
-    deleteWarehouseOutInfo,
129
-    getWarehouseOutInfo,
130
-    getSalesReturnConfig,
131
-    editWarehouseoutInfo
132
-  } from '@/api/stock'
133
-  import SalesReturnDialog from './Dialog/salesReturnDialog'
134
-
135
-  export default {
136
-    components: { SalesReturnDialog},
137
-    name: 'otherStockOutOrderEdit',
138
-
139
-    data() {
140
-      return {
141
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
142
-
143
-        adminUserOptions: null,
144
-        currentIndex: 0,
145
-        warehouse_out_time: '',
146
-        recordInfo: {
147
-          recordData: [],
148
-          stock_in_code: '',
149
-          current_index: ''
150
-
151
-        },
152
-        tableRules: {
153
-          count: [
154
-            { required: true, message: '数量不能为空', trigge: 'blur' }
155
-          ],
156
-          price: [
157
-            { required: true, message: '单价不能为空', trigger: 'blur' }
158
-          ],
159
-
160
-        },
161
-        ruleForm: {
162
-          manufacturer: [
163
-            { required: true, message: '请选择厂商', trigger: 'change' }
164
-          ]
165
-        },
166
-        // prop
167
-        isVisibility: false,
168
-        propForm: {
169
-          goodType: [],
170
-          goodInfo: [],
171
-          goodUnit: [],
172
-          title: '入库'
173
-        },
174
-
175
-        form: {
176
-          manufacturer: '',
177
-          dealer: ''
178
-        },
179
-
180
-        warehouseOut: {},
181
-        manufacturer: [],
182
-        dealer: [],
183
-        goodType: []
184
-      }
185
-    },
186
-    methods: {
187
-      comfirm: function(val) {
188
-        this.isVisibility = false
189
-        if (val.selectedGoodInfo.length > 0) {
190
-          for (let i = val.selectedGoodInfo.length - 1; ; i--) {
191
-            if (i == 0) {
192
-              this.recordInfo.recordData[this.currentIndex].good_type_id = val.goodTypeId
193
-              this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
194
-            } else {
195
-              const tempForm = {}
196
-              tempForm['id'] = 0
197
-              tempForm['good_type_id'] = val.goodTypeId
198
-              tempForm['good_id'] = val.selectedGoodInfo[i].id
199
-              tempForm['count'] = ''
200
-              tempForm['price'] = ''
201
-              tempForm['remark'] = ''
202
-
203
-              this.recordInfo.recordData.push(tempForm)
204
-            }
205
-          }
206
-        }
207
-
208
-        this.currentIndex = -1
209
-      }, cancle: function() {
210
-        this.isVisibility = false
211
-      }, GetConfigInfo: function() {
212
-        getSalesReturnConfig().then(response => {
213
-          if (response.data.state == 0) {
214
-            this.$message.error(response.data.msg)
215
-            return false
216
-          } else {
217
-            var warehouseInfoList = response.data.data.warehouseInfoList
218
-            for (let i = 0; i < warehouseInfoList.length; i++) {
219
-              this.propForm.goodInfo.push(warehouseInfoList[i].GoodInfo)
220
-              this.propForm.goodType.push(warehouseInfoList[i].GoodInfo.GoodsType)
221
-
222
-            }
223
-            const obj3 = {}
224
-            const obj4 = {}
225
-            this.propForm.goodInfo = this.propForm.goodInfo.reduce((cur, next) => {
226
-              obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
227
-              return cur
228
-            }, [])
229
-            this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
230
-              obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
231
-              return cur
232
-            }, [])
233
-          }
234
-        })
235
-      }, typeName: function(good_type_id) {
236
-        let name = ''
237
-        for (let i = 0; i < this.propForm.goodType.length; i++) {
238
-          if (this.propForm.goodType[i].id == good_type_id) {
239
-            name = this.propForm.goodType[i].type_name
240
-          }
241
-        }
242
-        return name
243
-      }, specificationName: function(good_info_id) {
244
-        let name = ''
245
-        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
246
-          if (this.propForm.goodInfo[i].id == good_info_id) {
247
-            name = this.propForm.goodInfo[i].specification_name
248
-          }
249
-        }
250
-        return name
251
-      }, handleEdit: function(index, row) {
252
-        const tempObj = {}
253
-        tempObj['id'] = 0
254
-        tempObj['good_type_id'] = 0
255
-        tempObj['good_id'] = 0
256
-        tempObj['count'] = ''
257
-        tempObj['price'] = ''
258
-        tempObj['remark'] = ''
259
-        this.recordInfo.recordData.push(tempObj)
260
-      }, handleDelete: function(index, row) {
261
-        if (row.id == 0) {
262
-          this.recordInfo.recordData.splice(index, 1)
263
-        } else {
264
-          const params = {
265
-            id: row.id
266
-          }
267
-          this.$confirm('确认删除该退货物品信息记录?', '删除退货物品信息记录', {
268
-            confirmButtonText: '确定',
269
-            cancelButtonText: '取消',
270
-            type: 'warning'
271
-          }).then(() => {
272
-            deleteWarehouseOutInfo(params).then(response => {
273
-              if (response.data.state == 0) {
274
-                this.$message.error(response.data.msg)
275
-                return false
276
-              } else {
277
-                this.$notify({
278
-                  title: '成功',
279
-                  message: '删除成功',
280
-                  type: 'success',
281
-                  duration: 2000
282
-                })
283
-                this.recordInfo.recordData.splice(index, 1)
284
-              }
285
-            })
286
-          }).catch(() => {
287
-          })
288
-        }
289
-      }, getTime(val, temp) {
290
-        if (val != 0) {
291
-          return uParseTime(val, temp)
292
-        } else {
293
-          return ''
294
-        }
295
-      }, showDialog(index, row) {
296
-        this.currentIndex = index
297
-
298
-        this.isVisibility = true
299
-        console.log(this.form.manufacturer)
300
-        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
301
-          if (this.propForm.goodInfo[i].manufacturer == this.form.manufacturer) {
302
-            this.propForm.goodType.push(this.propForm.goodInfo[i].GoodsType)
303
-          }
304
-        }
305
-        const obj3 = {}
306
-        this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
307
-          obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
308
-          return cur
309
-        }, [])
310
-
311
-      }, back() {
312
-        this.$router.go(-1)
313
-      }, submit() {
314
-        this.$refs['tableForm'].validate((valid) => {
315
-          if (valid) {
316
-            const array = this.recordInfo.recordData
317
-            for (let i = 0; i < array.length; i++) {
318
-              if (array[i].good_type_id == 0) {
319
-                this.$message.error('物品类型不能为空')
320
-                return
321
-              }
322
-              if (array[i].good_id == 0) {
323
-                this.$message.error('规格名称不能为空')
324
-                return
325
-              }
326
-            }
327
-
328
-            const params = {
329
-              'stockOut': this.recordInfo.recordData
330
-            }
331
-            editWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id).then(response => {
332
-              if (response.data.state == 0) {
333
-                this.$message.error(response.data.msg)
334
-                return false
335
-              } else {
336
-                this.$notify({
337
-                  title: '成功',
338
-                  message: '退货成功',
339
-                  type: 'success',
340
-                  duration: 2000
341
-                })
342
-                this.$router.back(-1)
343
-              }
344
-            })
345
-          } else {
346
-            return false
347
-          }
348
-        })
349
-      }, GetOrderDetail: function(order_id) {
350
-        const params = {
351
-          'id': order_id
352
-        }
353
-        getWarehouseOutInfo(params).then(response => {
354
-          if (response.data.state == 0) {
355
-            this.$message.error(response.data.msg)
356
-            return false
357
-          } else {
358
-            for (let i = 0; i < response.data.data.list.length; i++) {
359
-              response.data.data.list[i].price = response.data.data.list[i].price.toString()
360
-              response.data.data.list[i].count = response.data.data.list[i].count.toString()
361
-              this.recordInfo.recordData.push(response.data.data.list[i])
362
-            }
363
-            this.warehouseOut = response.data.data.info
364
-            this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
365
-
366
-          }
367
-
368
-        })
369
-      }, calculate: function(val) {
370
-        if (val == 0) {
371
-          return ''
372
-        }
373
-        return Math.round(parseFloat(val) * 100) / 100
374
-      }
375
-    },
376
-    created() {
377
-      this.GetConfigInfo()
378
-      this.propForm.goodUnit = this.$store.getters.good_unit
379
-      const order_id = this.$route.query.id
380
-      this.GetOrderDetail(order_id)
381
-    }
382
-
383
-  }
384
-</script>
385
-
386
-<style rel="stylesheet/css" lang="scss" scoped>
387
-  .information {
388
-    border: 1px #dcdfe6 solid;
389
-    padding: 30px 20px 30px 20px;
390
-
391
-  .border {
392
-    border-bottom: 1px #dcdfe6 solid;
393
-    margin: 0px 0 20px 0;
394
-  }
395
-
396
-  }
397
-
398
-  .title {
399
-    background: #409eff;
400
-    height: 44px;
401
-    line-height: 44px;
402
-    padding: 0 0 0 10px;
403
-    color: #fff;
404
-    margin: 0 0 10px 0;
405
-    border-radius: 4px 4px 0 0;
406
-  }
407
-
408
-  .edit_separater {
409
-    border-top: 1px solid rgb(233, 233, 233);
410
-    margin-top: 15px;
411
-    margin-bottom: 15px;
412
-  }
413
-
414
-</style>
415
-
416
-<style>
417
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
418
-    font-size: 12px;
419
-  }
420
-
421
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
422
-    background: #6fb5fa;
423
-  }
424
-
425
-</style>

+ 0 - 312
src/xt_pages/stock/salesReturn.vue Bestand weergeven

@@ -1,312 +0,0 @@
1
-<template>
2
-<div class="main-contain">
3
-  <div class="position">
4
-    <bread-crumb></bread-crumb>
5
-    <el-row style="float:right;">
6
-        <el-button size="small" icon="el-icon-circle-check" @click="handleSave" type="primary">保 存</el-button>
7
-    </el-row>
8
-  </div>
9
-  <div class="app-container sign-and-weigh-box">
10
-    <div class="cell">
11
-     <label class="title"><span class="name">入库退货时间:</span></label>
12
-      <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
13
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
14
-                      value-format="yyyy-MM-dd"></el-date-picker>
15
-
16
-      
17
-    </div>
18
-
19
-
20
-    <el-row>
21
-      <el-col>
22
-        <div class="titleTop">入库退货列表</div>
23
-        <div style="margin-bottom: 10px;"></div>
24
-        <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="salesReturnTableData" :class="signAndWeighBoxPatients" style="width: 100%" border
25
-        >
26
-          <el-table-column label="入库单号" min-width="30" align="center">
27
-            <template slot-scope="scope">
28
-              {{scope.row.warehousing_order}}
29
-            </template>
30
-          </el-table-column>
31
-
32
-          <el-table-column label="规格名称" align="center" min-width="30">
33
-            <template slot-scope="scope">
34
-              {{getSpecificationName(scope.row.good_id)}}
35
-
36
-            </template>
37
-          </el-table-column>
38
-          <el-table-column label="物品类型" min-width="30" align="center">
39
-            <template slot-scope="scope">
40
-              {{getTypeName(scope.row.good_type_id)}}
41
-
42
-            </template>
43
-          </el-table-column>
44
-          <el-table-column label="入库数量" min-width="30" align="center">
45
-            <template slot-scope="scope">
46
-              {{scope.row.warehousing_count}}
47
-
48
-            </template>
49
-          </el-table-column>
50
-
51
-          <el-table-column label="入库单价" min-width="30" align="center">
52
-            <template slot-scope="scope">
53
-              {{scope.row.price}}
54
-
55
-            </template>
56
-          </el-table-column>
57
-
58
-          <el-table-column label="退货数量" min-width="30" align="center">
59
-            <template slot-scope="scope">
60
-              <el-input type="number" v-model="scope.row.return_count" @blur="handleBlur(scope.$index, scope.row)"></el-input>
61
-            </template>
62
-          </el-table-column>
63
-          <el-table-column label="操作" align="center" min-width="30">
64
-            <template slot-scope="scope">
65
-              <el-button
66
-                size="mini"
67
-                type="danger"
68
-                @click="handleDelete(scope.$index, scope.row)">删除
69
-              </el-button>
70
-
71
-            </template>
72
-          </el-table-column>
73
-        </el-table>
74
-      </el-col>
75
-
76
-    </el-row>
77
-  </div>
78
-   
79
-  </div>
80
-</template>
81
-
82
-<script>
83
-  import {uParseTime} from "@/utils/tools";
84
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
85
-  import {
86
-    GetAllGoodInfo,
87
-    GetAllGoodType,
88
-    postSalesReturn,
89
-    getWarehouseInfo
90
-  } from "@/api/stock";
91
-
92
-  export default {
93
-    name: "stockIn",
94
-    components:{
95
-      BreadCrumb
96
-    },
97
-    data() {
98
-      return {
99
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
100
-        return_time: '',
101
-        adminUserOptions: null,
102
-        salesReturnTableData: [],
103
-        total: '',
104
-        isVisibility: false,
105
-        goodInfo: [],
106
-        goodType: [],
107
-        isClick: false,
108
-        OrderNumber:'',
109
-      };
110
-    },
111
-    methods: {
112
-      GetWarehouse:function () {
113
-        let params ={
114
-          ids:this.$route.query.id
115
-        }
116
-        getWarehouseInfo(params).then(response =>{
117
-          if(response.data.state == 0){
118
-              this.$message.error(response.data.msg)
119
-              return false
120
-          }else{
121
-            this.salesReturnTableData = []
122
-            for (let i = 0; i < response.data.data.info.length; i++) {
123
-              let salesReturnInfo = {}
124
-              this.OrderNumber = response.data.data.info[i].Warehousing.warehousing_order
125
-              salesReturnInfo['id'] = response.data.data.info[i].id
126
-              salesReturnInfo['warehousing_order'] = response.data.data.info[i].Warehousing.warehousing_order
127
-              salesReturnInfo['good_id'] = response.data.data.info[i].good_id
128
-              salesReturnInfo['good_type_id'] = response.data.data.info[i].good_type_id
129
-              salesReturnInfo['warehousing_count'] = response.data.data.info[i].warehousing_count
130
-              salesReturnInfo['price'] = response.data.data.info[i].price
131
-              salesReturnInfo['return_count'] = ''
132
-              salesReturnInfo['return_total'] = ''
133
-              this.salesReturnTableData.push(salesReturnInfo)
134
-            }
135
-
136
-          }
137
-        })
138
-      },
139
-      GetAllGoodType: function () {
140
-        GetAllGoodType().then(response => {
141
-          if (response.data.state == 0) {
142
-            this.$message.error(response.data.msg);
143
-            return false;
144
-          } else {
145
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
146
-              this.goodType.push(response.data.data.goodType[i])
147
-            }
148
-          }
149
-        });
150
-
151
-
152
-      }, GetAllGoodInfo: function () {
153
-        GetAllGoodInfo().then(response => {
154
-          if (response.data.state == 0) {
155
-            this.$message.error(response.data.msg);
156
-            return false;
157
-          } else {
158
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
159
-              this.goodInfo.push(response.data.data.goodInfo[i])
160
-            }
161
-          }
162
-        });
163
-
164
-      }, getSpecificationName: function (id) {
165
-        let name = ''
166
-        for (let i = 0; i < this.goodInfo.length; i++) {
167
-          if (this.goodInfo[i].id == id) {
168
-            name = this.goodInfo[i].specification_name
169
-          }
170
-
171
-        }
172
-
173
-        return name
174
-
175
-      }, getTypeName: function (id) {
176
-        let name = ''
177
-        for (let i = 0; i < this.goodType.length; i++) {
178
-          if (this.goodType[i].id == id) {
179
-            name = this.goodType[i].type_name
180
-          }
181
-        }
182
-        return name
183
-      }, handleDelete: function (index, row) {
184
-        this.$confirm('确认删除这条退货信息?', '删除退货信息', {
185
-          confirmButtonText: '确定',
186
-          cancelButtonText: '取消',
187
-          type: 'warning'
188
-        }).then(() => {
189
-          this.salesReturnTableData.splice(index, 1)
190
-        }).catch(() => {
191
-        });
192
-
193
-      }, handleBlur: function (index, row) {
194
-        if (this.salesReturnTableData[index].return_count == '') {
195
-          this.$message.error('退货数量不能为空');
196
-          return
197
-        }
198
-        // if (this.salesReturnTableData[index].return_count > this.salesReturnTableData[index].warehousing_count) {
199
-        //   this.salesReturnTableData[index].return_count = ''
200
-        //   this.$message.error('退货数量不能大于入库数量');
201
-        //   return
202
-        // }
203
-      }, handleSave: function () {
204
-
205
-        let total = 0
206
-        let ids = []
207
-        if(this.salesReturnTableData.length <= 0){
208
-          this.$message.error('请新增退货的物品');
209
-          return
210
-        }
211
-
212
-        for (let i = 0; i < this.salesReturnTableData.length; i++) {
213
-          // if (this.salesReturnTableData[i].return_count > this.salesReturnTableData[i].warehousing_count) {
214
-          //   this.$message.error('退货数量不能大于入库数量');
215
-          //   return
216
-          // }
217
-          if (this.salesReturnTableData[i].return_count == '') {
218
-            this.$message.error('退货数量不能为空');
219
-            return
220
-          }
221
-          ids.push(this.salesReturnTableData[i].id)
222
-          total = total + parseInt(this.salesReturnTableData[i].return_count)
223
-        }
224
-
225
-
226
-
227
-
228
-        let params = {
229
-          'salesReturn':this.salesReturnTableData
230
-        }
231
-        postSalesReturn(params,this.return_time,total,ids.join("-"),this.OrderNumber).then(response=>{
232
-          if (response.data.state==0) {
233
-            this.$message.error(response.data.msg);
234
-            return false;
235
-          }else {
236
-            this.$notify({
237
-              title: "成功",
238
-              message: "退货成功",
239
-              type: "success",
240
-              duration: 2000
241
-            });
242
-            this.$router.back(-1)
243
-          }
244
-        });
245
-
246
-      }
247
-
248
-    },
249
-    mounted() {
250
-      var year = new Date().getFullYear();
251
-      var month = new Date().getMonth() + 1;
252
-      var day = new Date().getDate();
253
-      if (parseInt(month) < 10) {
254
-        month = "0" + month;
255
-      }
256
-      if (parseInt(day) < 10) {
257
-        day = "0" + day;
258
-      }
259
-      let endTime = year + '-' + month + '-' + day;
260
-      this.return_time = endTime
261
-
262
-      this.GetAllGoodType()
263
-      this.GetAllGoodInfo()
264
-      this.GetWarehouse()
265
-
266
-
267
-    },
268
-
269
-
270
-  };
271
-</script>
272
-
273
-<style rel="stylesheet/css" lang="scss" scoped>
274
-  .information {
275
-    border: 1px #dcdfe6 solid;
276
-    padding: 30px 20px 30px 20px;
277
-
278
-    .border {
279
-      border-bottom: 1px #dcdfe6 solid;
280
-      margin: 0px 0 20px 0;
281
-    }
282
-  }
283
-
284
-  .titleTop {
285
-    background: #409eff;
286
-    height: 44px;
287
-    line-height: 44px;
288
-    padding: 0 0 0 10px;
289
-    color: #fff;
290
-    margin: 0 0 10px 0;
291
-    // border-radius: 4px 4px 0 0;
292
-        font-size: 14px;
293
-  }
294
-
295
-  .edit_separater {
296
-    border-top: 1px solid rgb(233, 233, 233);
297
-    margin-top: 15px;
298
-    margin-bottom: 15px;
299
-  }
300
-
301
-</style>
302
-
303
-<style>
304
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
305
-    font-size: 12px;
306
-  }
307
-
308
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
309
-    background: #6fb5fa;
310
-  }
311
-
312
-</style>

+ 55 - 51
src/xt_pages/stock/salesReturnEdit.vue Bestand weergeven

@@ -1,46 +1,33 @@
1 1
 <template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <div style="float:right;">
6
+        <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
7
+        <el-button size="small"  type="primary" @click="submit()" class="filter-item" >确 定</el-button>
8
+      </div>
9
+    </div>
2 10
 
3
-  <div class="app-container sign-and-weigh-box">
11
+  <div class="app-container">
4 12
 
5 13
     <sales-return-dialog :propForm="propForm"
6 14
                      :visibility="isVisibility"
7 15
                      v-on:dialog-comfirm="comfirm"
8 16
                      v-on:dialog-cancle="cancle"></sales-return-dialog>
9 17
 
10
-    <div class="filter-container">
11
-
12
-      <el-row>
13
-        <el-col :span="8">
14
-          <div>
15
-            <span>入库时间:</span>
18
+    <div class="cell">
19
+            <label class="title"><span class="name">退货时间</span> : </label>
16 20
             <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
17 21
                             type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
18 22
                             value-format="yyyy-MM-dd"></el-date-picker>
19
-          </div>
20
-        </el-col>
21
-      </el-row>
22 23
     </div>
23 24
 
24
-    <el-row>
25
-      <el-col>
26 25
         <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
27 26
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
28
-                    max-height="450"
27
+                    max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
29 28
           >
30 29
 
31
-            <el-table-column label="操作" align="center" min-width="30">
32
-              <template slot-scope="scope">
33
-                <el-button
34
-                  size="mini"
35
-                  @click="handleEdit(scope.$index, scope.row)">+
36
-                </el-button>
37
-                <el-button
38
-                  size="mini"
39
-                  type="danger"
40
-                  @click="handleDelete(scope.$index, scope.row)">-
41
-                </el-button>
42
-              </template>
43
-            </el-table-column>
30
+
44 31
 
45 32
             <el-table-column min-width="35" align="center">
46 33
 
@@ -79,24 +66,41 @@
79 66
               <template slot-scope="scope">
80 67
                 <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
81 68
                               style="padding-top: 17px">
82
-                  <el-input type="number" v-model="scope.row.count"></el-input>
69
+                  <el-input  placeholder="请输入退货数量" type="number" v-model="scope.row.count"></el-input>
83 70
                 </el-form-item>
84 71
               </template>
85 72
             </el-table-column>
86 73
 
74
+            <el-table-column label="操作" align="center" min-width="20">
75
+              <template slot-scope="scope">
76
+                <el-tooltip class="item" effect="dark" content="新增" placement="top">
77
+
78
+                  <el-button
79
+                    size="mini"
80
+                    type="primary"
81
+                    icon="el-icon-circle-plus-outline"
82
+                    @click="handleEdit(scope.$index, scope.row)">
83
+                  </el-button>
84
+                </el-tooltip>
85
+                <el-tooltip class="item" effect="dark" content="删除" placement="top">
86
+
87
+                  <el-button
88
+                    size="mini"
89
+                    type="danger"
90
+                    icon="el-icon-remove-outline"
91
+                    @click="handleDelete(scope.$index, scope.row)">
92
+                  </el-button>
93
+                </el-tooltip>
87 94
 
88
-          </el-table>
89
-        </el-form>
90
-      </el-col>
91
-
95
+              </template>
96
+            </el-table-column>
92 97
 
93
-      <span class="dialog-footer" style="margin-top: 20px;float:right">
94
-        <el-button @click="back()">取 消</el-button>
95
-        <el-button type="primary" @click="submit()">确 定</el-button>
96
-      </span>
97 98
 
98
-    </el-row>
99
+          </el-table>
100
+        </el-form>
101
+  </div>
99 102
   </div>
103
+
100 104
 </template>
101 105
 
102 106
 <script>
@@ -109,13 +113,19 @@
109 113
     editSalesReturnInfo
110 114
   } from '@/api/stock'
111 115
   import SalesReturnDialog from './Dialog/salesReturnDialog'
116
+  import BreadCrumb from '../components/bread-crumb'
112 117
 
113 118
   export default {
114
-    components: { SalesReturnDialog },
119
+    components: { BreadCrumb, SalesReturnDialog },
115 120
     name: 'salesReturnEdit',
116 121
 
117 122
     data() {
118 123
       return {
124
+        crumbs: [
125
+          { path: false, name: '库存管理' },
126
+          { path: '/stock/return', name: '退货单' },
127
+          { path: '/stock/in/detail', name: '编辑退货单' }
128
+        ],
119 129
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
120 130
         warehousing_time: '',
121 131
         adminUserOptions: null,
@@ -161,7 +171,7 @@
161 171
       }
162 172
     },
163 173
     methods: {
164
-       comfirm: function(val) {
174
+      comfirm: function(val) {
165 175
         this.isVisibility = false
166 176
         if (val.selectedGoodInfo.length > 0) {
167 177
           for (let i = val.selectedGoodInfo.length - 1; ; i--) {
@@ -183,7 +193,11 @@
183 193
       }, cancle: function() {
184 194
         this.isVisibility = false
185 195
       }, GetConfigInfo: function() {
186
-        getSalesReturnConfig().then(response => {
196
+        const params = {
197
+          type: this.$route.query.type
198
+
199
+        }
200
+        getSalesReturnConfig(params).then(response => {
187 201
           if (response.data.state == 0) {
188 202
             this.$message.error(response.data.msg)
189 203
             return false
@@ -192,7 +206,6 @@
192 206
             for (let i = 0; i < warehouseInfoList.length; i++) {
193 207
               this.propForm.goodInfo.push(warehouseInfoList[i].GoodInfo)
194 208
               this.propForm.goodType.push(warehouseInfoList[i].GoodInfo.GoodsType)
195
-
196 209
             }
197 210
             const obj3 = {}
198 211
             const obj4 = {}
@@ -279,7 +292,6 @@
279 292
           obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
280 293
           return cur
281 294
         }, [])
282
-
283 295
       }, back() {
284 296
         this.$router.go(-1)
285 297
       }, submit() {
@@ -328,7 +340,7 @@
328 340
             return false
329 341
           } else {
330 342
             for (let i = 0; i < response.data.data.list.length; i++) {
331
-              this.recordInfo.list[i].count =  this.recordInfo.list[i].count.toString();
343
+              response.data.data.list[i].count = response.data.data.list[i].count.toString()
332 344
               this.recordInfo.recordData.push(response.data.data.list[i])
333 345
             }
334 346
             this.salesReturn = response.data.data.salesReturn
@@ -361,15 +373,7 @@
361 373
 
362 374
   }
363 375
 
364
-  .title {
365
-    background: #409eff;
366
-    height: 44px;
367
-    line-height: 44px;
368
-    padding: 0 0 0 10px;
369
-    color: #fff;
370
-    margin: 0 0 10px 0;
371
-    border-radius: 4px 4px 0 0;
372
-  }
376
+
373 377
 
374 378
   .edit_separater {
375 379
     border-top: 1px solid rgb(233, 233, 233);

+ 124 - 122
src/xt_pages/stock/salesReturnOrder.vue Bestand weergeven

@@ -1,118 +1,122 @@
1 1
 <template>
2 2
 
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-
6
-    <div class="filter-container">
7
-
8
-
9
-      <el-row style="float:right;">
10
-        <el-button @click="AddNewOrder" type="primary">新增</el-button>
11
-      </el-row>
3
+  <div class="main-contain">
4
+    <div class="position">
5
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
6
+      <el-button size="small" @click="AddNewOrder" class="filter-item" style="float:right;" type="primary"
7
+                 icon="el-icon-circle-plus-outline">新增
8
+      </el-button>
12 9
     </div>
13 10
 
14
-    <div class="filter-container" style="margin-top:20px">
15
-      <el-input style="width: 300px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
16
-      <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
17
-    </div>
11
+    <div class="app-container">
12
+
13
+      <div class="filter-container" >
14
+        <el-input style="width: 400px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
15
+        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
16
+      </div>
17
+
18
+      <div class="cell">
19
+        <label class="title"><span class="name">退货时间</span> : </label>
20
+        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
+                        value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
23
+        <span class="">-</span>
24
+        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
25
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
26
+                        value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
27
+      </div>
28
+
29
+      <div class="cell clearfix" style="margin-top: 10px">
30
+        <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
31
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
32
+
33
+      </div>
34
+
35
+        <el-table
36
+          :data="saleReturnDate"
37
+          :class="signAndWeighBoxPatients"
38
+          style="width: 100%" border
39
+          highlight-current-row
40
+          ref="multipleTable"
41
+          @selection-change="select"
42
+          :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
43
+
44
+        >
45
+          <el-table-column
46
+            type="selection"
47
+            width="55">
48
+          </el-table-column>
49
+
50
+          <el-table-column label="单据日期" align="center">
51
+            <template slot-scope="scope">
52
+              {{ scope.row.opera_time | parseTime('{y}-{m}-{d}')}}
53
+            </template>
54
+          </el-table-column>
55
+
56
+          <el-table-column label="单据编号" align="center">
57
+            <template slot-scope="scope">
58
+              {{scope.row.order_number}}
59
+            </template>
60
+          </el-table-column>
61
+
62
+          <el-table-column label="制单人" align="center">
63
+            <template slot-scope="scope">
64
+              {{getXuserName(scope.row.creater)}}
65
+            </template>
66
+          </el-table-column>
67
+
68
+
69
+          <el-table-column label="厂家" align="center">
70
+            <template slot-scope="scope">
71
+              {{getManufactuerName(scope.row.manufacturer)}}
72
+            </template>
73
+          </el-table-column>
74
+
75
+          <el-table-column label="经销商" align="center">
76
+            <template slot-scope="scope">
77
+              {{getDealerName(scope.row.dealer)}}
78
+            </template>
79
+          </el-table-column>
80
+
81
+          <el-table-column label="操作" align="center">
82
+
83
+            <template slot-scope="scope">
84
+              <el-tooltip class="item" effect="dark" content="编辑" placement="top">
85
+              <el-button
86
+                size="mini"
87
+                type="primary"
88
+                icon="el-icon-edit"
89
+                @click="handleEdit(scope.$index, scope.row)">
90
+              </el-button>
91
+              </el-tooltip>
92
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
93
+              <el-button
94
+                size="mini"
95
+                type="danger"
96
+                icon="el-icon-delete"
97
+                @click="handleDelete(scope.$index, scope.row)">
98
+              </el-button>
99
+              </el-tooltip>
100
+
101
+            </template>
102
+          </el-table-column>
103
+
104
+        </el-table>
105
+
106
+        <el-pagination
107
+          @size-change="handleSizeChange"
108
+          @current-change="handleCurrentChange"
109
+          :page-sizes="[7]"
110
+          :page-size="7"
111
+          background
112
+          style="margin-top:20px;float: right"
113
+          layout="total, sizes, prev, pager, next, jumper"
114
+          :total="total">
115
+        </el-pagination>
18 116
 
19
-    <div class="filter-container">
20
-      <span>入库时间:</span>
21
-      <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
-                      value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
24
-      <span class="">-</span>
25
-      <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
26
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
-                      value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
28 117
     </div>
29
-
30
-    <div class="filter-container" style="margin-top: 10px">
31
-      <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
32
-      <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
33
-
34
-    </div>
35
-
36
-    <el-row :gutter="12" style="margin-top: 10px">
37
-      <el-table
38
-        :data="saleReturnDate"
39
-        :class="signAndWeighBoxPatients"
40
-        style="width: 100%" border
41
-        highlight-current-row
42
-        ref="multipleTable"
43
-        @selection-change="select"
44
-
45
-      >
46
-        <el-table-column
47
-          type="selection"
48
-          width="55">
49
-        </el-table-column>
50
-
51
-        <el-table-column label="单据日期" align="center">
52
-          <template slot-scope="scope">
53
-            {{ scope.row.opera_time | parseTime('{y}-{m}-{d}')}}
54
-          </template>
55
-        </el-table-column>
56
-
57
-        <el-table-column label="单据编号" align="center">
58
-          <template slot-scope="scope">
59
-            {{scope.row.order_number}}
60
-          </template>
61
-        </el-table-column>
62
-
63
-        <el-table-column label="制单人" align="center">
64
-          <template slot-scope="scope">
65
-            {{getXuserName(scope.row.creater)}}
66
-          </template>
67
-        </el-table-column>
68
-
69
-
70
-        <el-table-column label="厂家" align="center">
71
-          <template slot-scope="scope">
72
-            {{getManufactuerName(scope.row.manufacturer)}}
73
-          </template>
74
-        </el-table-column>
75
-
76
-        <el-table-column label="经销商" align="center">
77
-          <template slot-scope="scope">
78
-            {{getDealerName(scope.row.dealer)}}
79
-          </template>
80
-        </el-table-column>
81
-
82
-        <el-table-column label="操作" align="center">
83
-          <template slot-scope="scope">
84
-            <el-button
85
-              size="mini"
86
-              type="primary"
87
-              icon="el-icon-edit"
88
-              @click="handleEdit(scope.$index, scope.row)">
89
-            </el-button>
90
-
91
-            <el-button
92
-              size="mini"
93
-              type="danger"
94
-              icon="el-icon-delete"
95
-              @click="handleDelete(scope.$index, scope.row)">
96
-            </el-button>
97
-
98
-          </template>
99
-        </el-table-column>
100
-
101
-      </el-table>
102
-
103
-      <el-pagination
104
-        @size-change="handleSizeChange"
105
-        @current-change="handleCurrentChange"
106
-        :page-sizes="[7]"
107
-        :page-size="7"
108
-        background
109
-        style="margin-top:20px;float: right"
110
-        layout="total, sizes, prev, pager, next, jumper"
111
-        :total="total">
112
-      </el-pagination>
113
-
114
-    </el-row>
115 118
   </div>
119
+
116 120
 </template>
117 121
 
118 122
 <script>
@@ -121,13 +125,15 @@
121 125
   import {
122 126
     deleteSalesReturn,
123 127
     GetAllConfig,
124
-    getWarehouseInfoList,
125 128
     getSalesReturnList,
129
+    getWarehouseInfoList,
126 130
     getWarehouseList
127 131
   } from '@/api/stock'
132
+  import BreadCrumb from '../components/bread-crumb'
128 133
 
129 134
   export default {
130 135
     name: 'salesReturnOrder',
136
+    components: { BreadCrumb },
131 137
     created() {
132 138
       var year = new Date().getFullYear()
133 139
       var month = new Date().getMonth() + 1
@@ -158,6 +164,10 @@
158 164
     },
159 165
     data() {
160 166
       return {
167
+        crumbs: [
168
+          { path: false, name: '库存管理' },
169
+          { path: '/stock/return', name: '退货单' }
170
+        ],
161 171
         type: 1,
162 172
         page: 1,
163 173
         limit: 7,
@@ -175,13 +185,13 @@
175 185
         goodInfo: [],
176 186
         manufacturer: [],
177 187
         selectedTableData: [],
178
-        dealer: [],
188
+        dealer: []
179 189
 
180 190
       }
181 191
     },
182 192
     methods: {
183
-      AddNewOrder:function(){
184
-        this.$router.push({ name: 'salesReturnOrderAdd'})
193
+      AddNewOrder: function() {
194
+        this.$router.push({ name: 'salesReturnOrderAdd', query: { type: this.type }})
185 195
       },
186 196
       GetSalesReturn: function() {
187 197
         const Params = {
@@ -189,7 +199,7 @@
189 199
           limit: this.limit,
190 200
           start_time: this.start_time,
191 201
           end_time: this.end_time,
192
-          type:this.type,
202
+          type: this.type
193 203
         }
194 204
         this.saleReturnDate = []
195 205
         getSalesReturnList(Params).then(response => {
@@ -272,7 +282,7 @@
272 282
           }
273 283
         }
274 284
       }, handleEdit: function(index, row) {
275
-        this.$router.push({ name: 'salesReturnDetail', query: { id: row.id }})
285
+        this.$router.push({ name: 'salesReturnDetail', query: { id: row.id, type: this.type }})
276 286
       }, handleDelete: function(index, row) {
277 287
         const ids = []
278 288
         ids.push(row.id)
@@ -375,15 +385,7 @@
375 385
 
376 386
   }
377 387
 
378
-  .title {
379
-    background: #409eff;
380
-    height: 44px;
381
-    line-height: 44px;
382
-    padding: 0 0 0 10px;
383
-    color: #fff;
384
-    margin: 0 0 10px 0;
385 388
 
386
-  }
387 389
 
388 390
   .edit_separater {
389 391
     border-top: 1px solid rgb(233, 233, 233);

+ 150 - 151
src/xt_pages/stock/salesReturnOrderAdd.vue Bestand weergeven

@@ -1,148 +1,162 @@
1 1
 <template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <div style="float:right;">
6
+        <el-button size="small" @click="back()" class="filter-item">取 消</el-button>
7
+        <el-button size="small" type="primary" @click="submit()" class="filter-item">确 定</el-button>
8
+      </div>
9
+    </div>
2 10
 
3
-  <div class="app-container sign-and-weigh-box">
11
+    <div class="app-container">
12
+      <sales-return-dialog :propForm="propForm"
13
+                           :visibility="isVisibility"
14
+                           v-on:dialog-comfirm="comfirm"
15
+                           v-on:dialog-cancle="cancle"></sales-return-dialog>
16
+      <div class="cell">
17
+        <label class="title"><span class="name">退货时间</span> : </label>
18
+        <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
19
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
20
+                        value-format="yyyy-MM-dd"></el-date-picker>
21
+      </div>
22
+
23
+
24
+      <div class="cell clearfix">
25
+        <label class="title"><span class="name">厂商</span> : </label>
26
+        <el-select v-model="form.manufacturer" clearable placeholder="请选择厂商">
27
+          <el-option
28
+            v-for="(option, index) in manufacturer"
29
+            :key="index"
30
+            :label="option.manufacturer_name"
31
+            :value="option.id">
32
+          </el-option>
33
+        </el-select>
34
+      </div>
35
+
36
+      <div class="cell clearfix">
37
+        <label class="title"><span class="name">经销商</span> : </label>
38
+        <el-select v-model="form.dealer" clearable placeholder="请选择经销商">
39
+          <el-option
40
+            v-for="(option, index) in dealer"
41
+            :key="index"
42
+            :label="option.dealer_name"
43
+            :value="option.id">
44
+          </el-option>
45
+        </el-select>
46
+      </div>
47
+
48
+      <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
49
+        <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
50
+                  max-height="450"  :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
51
+        >
52
+
53
+
54
+          <el-table-column min-width="35" align="center">
55
+
56
+            <template slot="header" slot-scope="scope">
57
+              <span>物品类型<span style="color: red">*</span></span>
58
+            </template>
59
+
60
+            <template slot-scope="scope">
61
+              <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id == 0" style="color:#c5c8cf">请输入类型</span>-->
62
+              <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
63
+
64
+              <el-form-item style="padding-top: 15px">
65
+                <el-input placeholder="请输入物品类型" v-model="scope.row.good_type_id"
66
+                          :value="typeName(scope.row.good_type_id)"
67
+                          @focus="showDialog(scope.$index, scope.row)"></el-input>
68
+              </el-form-item>
4 69
 
5
-    <sales-return-dialog :propForm="propForm"
6
-                     :visibility="isVisibility"
7
-                     v-on:dialog-comfirm="comfirm"
8
-                     v-on:dialog-cancle="cancle"></sales-return-dialog>
70
+            </template>
71
+          </el-table-column>
72
+          <el-table-column min-width="35" align="center">
73
+            <template slot="header" slot-scope="scope">
74
+              <span>规格名称<span style="color: red">*</span></span>
75
+            </template>
76
+            <template slot-scope="scope">
77
+
78
+              <el-form-item style="padding-top: 15px">
79
+                <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
80
+                          :value="specificationName(scope.row.good_id)"
81
+                          @focus="showDialog(scope.$index, scope.row)"></el-input>
82
+              </el-form-item>
9 83
 
10
-    <div class="filter-container">
84
+            </template>
85
+          </el-table-column>
11 86
 
12
-      <el-row>
13
-        <el-col :span="8"><div>
14
-          <span>退货时间:</span>
15
-          <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16
-                          type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17
-                          value-format="yyyy-MM-dd"></el-date-picker>
18
-        </div></el-col>
19 87
 
88
+          <el-table-column min-width="23" align="center">
89
+            <template slot="header" slot-scope="scope">
90
+              <span>退货数量<span style="color: red">*</span></span>
91
+            </template>
92
+            <template slot-scope="scope">
93
+              <!--{{scope.row.warehousing_count}}-->
94
+              <!--<el-input type="number" v-model="scope.row.warehousing_count"   @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
20 95
 
21
-        <el-col :span="8">
22
-          <div>
23
-            <el-form ref="form" :model="form" :rules="ruleForm" label-width="80px">
24
-              <el-form-item label="厂商:" prop="manufacturer">
25
-                <el-select v-model="form.manufacturer" placeholder="请选择厂商">
26
-                  <el-option v-for="(option, index) in manufacturer" :key="index" :label="option.manufacturer_name" :value="option.id"></el-option>
27
-                </el-select>
96
+              <el-form-item :prop="'recordData.' + scope.$index + '.return_count'" :rules='tableRules.return_count'
97
+                            style="padding-top: 17px">
98
+                <el-input  placeholder="请输入退货数量" type="number" v-model="scope.row.return_count"></el-input>
28 99
               </el-form-item>
29
-            </el-form>
30
-          </div>
31
-        </el-col>
32
-        <el-col :span="8">
33
-          <div>
34
-            <el-form ref="form" :model="form" label-width="80px">
35
-              <el-form-item label="经销商:">
36
-                <el-select v-model="form.dealer" placeholder="请选择经销商">
37
-                  <el-option v-for="(option, index) in dealer" :key="index" :label="option.dealer_name" :value="option.id"></el-option>
38
-                </el-select>
39
-              </el-form-item>
40
-            </el-form>
41
-          </div>
42
-        </el-col>
43
-      </el-row>
100
+            </template>
101
+          </el-table-column>
44 102
 
45
-    </div>
103
+          <el-table-column label="操作" align="center" min-width="20">
104
+            <template slot-scope="scope">
105
+              <el-tooltip class="item" effect="dark" content="新增" placement="top">
46 106
 
47
-    <el-row>
48
-      <el-col>
49
-        <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
50
-          <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
51
-                    max-height="450"
52
-          >
53
-
54
-            <el-table-column label="操作" align="center" min-width="30">
55
-              <template slot-scope="scope">
56 107
                 <el-button
57 108
                   size="mini"
58
-                  @click="handleEdit(scope.$index, scope.row)">+
109
+                  type="primary"
110
+                  icon="el-icon-circle-plus-outline"
111
+                  @click="handleEdit(scope.$index, scope.row)">
59 112
                 </el-button>
113
+              </el-tooltip>
114
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
115
+
60 116
                 <el-button
61 117
                   size="mini"
62 118
                   type="danger"
63
-                  @click="handleDelete(scope.$index, scope.row)">-
119
+                  icon="el-icon-remove-outline"
120
+                  @click="handleDelete(scope.$index, scope.row)">
64 121
                 </el-button>
65
-              </template>
66
-            </el-table-column>
67
-
68
-            <el-table-column min-width="35" align="center">
69
-
70
-              <template slot="header" slot-scope="scope">
71
-                <span>物品类型<span style="color: red">*</span></span>
72
-              </template>
73
-
74
-              <template slot-scope="scope" >
75
-                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id == 0" style="color:#c5c8cf">请输入类型</span>-->
76
-                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
77
-
78
-                <el-form-item  style="padding-top: 15px">
79
-                  <el-input placeholder="请输入物品类型"  v-model="scope.row.good_type_id" :value="typeName(scope.row.good_type_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
80
-                </el-form-item>
81
-
82
-              </template>
83
-            </el-table-column>
84
-            <el-table-column min-width="35" align="center">
85
-              <template slot="header" slot-scope="scope">
86
-                <span>规格名称<span style="color: red">*</span></span>
87
-              </template>
88
-              <template slot-scope="scope">
89
-
90
-                <el-form-item  style="padding-top: 15px">
91
-                  <el-input placeholder="请输入规格名称"  v-model="scope.row.good_id" :value="specificationName(scope.row.good_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
92
-                </el-form-item>
93
-
94
-              </template>
95
-            </el-table-column>
96
-
97
-
98
-            <el-table-column  min-width="23" align="center">
99
-              <template slot="header" slot-scope="scope">
100
-                <span>退货数量<span style="color: red">*</span></span>
101
-              </template>
102
-              <template slot-scope="scope">
103
-                <!--{{scope.row.warehousing_count}}-->
104
-                <!--<el-input type="number" v-model="scope.row.warehousing_count"   @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
105
-
106
-                <el-form-item :prop="'recordData.' + scope.$index + '.return_count'" :rules='tableRules.return_count' style="padding-top: 17px">
107
-                  <el-input type="number"  v-model="scope.row.return_count" ></el-input>
108
-                </el-form-item>
109
-              </template>
110
-            </el-table-column>
122
+              </el-tooltip>
111 123
 
112
-          </el-table>
113
-        </el-form>
114
-      </el-col>
124
+            </template>
125
+          </el-table-column>
115 126
 
116 127
 
117
-      <span  class="dialog-footer" style="margin-top: 20px;float:right">
118
-        <el-button @click="back()">取 消</el-button>
119
-        <el-button type="primary" @click="submit()">确 定</el-button>
120
-      </span>
128
+        </el-table>
129
+      </el-form>
121 130
 
122
-    </el-row>
123 131
   </div>
132
+  </div>
133
+
124 134
 </template>
125 135
 
126 136
 <script>
127 137
   import { uParseTime } from '@/utils/tools'
128
-  import {
129
-    getSalesReturnConfig,
130
-    postSalesReturn,
131
-  } from '@/api/stock'
138
+  import { getSalesReturnConfig, postSalesReturn } from '@/api/stock'
132 139
   import SalesReturnDialog from './Dialog/salesReturnDialog'
140
+  import BreadCrumb from '../components/bread-crumb'
133 141
 
134 142
   export default {
135
-    components: { SalesReturnDialog},
143
+    components: { BreadCrumb, SalesReturnDialog },
136 144
     name: 'salesReturnOrderAdd',
137 145
 
138 146
     data() {
139 147
       return {
140
-        type:1,
148
+        crumbs: [
149
+          { path: false, name: '库存管理' },
150
+          { path: '/stock/return', name: '退回单' },
151
+          { path: '/stock/return/add', name: '新增退货单' }
152
+        ],
153
+
154
+        type: this.$route.query.type,
141 155
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
142 156
         return_time: '',
143 157
         currentIndex: 0,
144 158
         recordInfo: {
145
-          recordData: [],
159
+          recordData: []
146 160
         },
147 161
         tableRules: {
148 162
           price: [
@@ -150,7 +164,7 @@
150 164
           ],
151 165
           return_count: [
152 166
             { required: true, message: '数量不能为空', trigge: 'blur' }
153
-          ],
167
+          ]
154 168
         },
155 169
         ruleForm: {
156 170
           manufacturer: [
@@ -163,7 +177,7 @@
163 177
         propForm: {
164 178
           goodType: [],
165 179
           goodInfo: [],
166
-          goodUnit: [],
180
+          goodUnit: []
167 181
         },
168 182
         form: {
169 183
           manufacturer: '',
@@ -179,7 +193,7 @@
179 193
       comfirm: function(val) {
180 194
         this.isVisibility = false
181 195
         if (val.selectedGoodInfo.length > 0) {
182
-          for (let i = val.selectedGoodInfo.length - 1; ;i--) {
196
+          for (let i = val.selectedGoodInfo.length - 1; ; i--) {
183 197
             if (i == 0) {
184 198
               this.recordInfo.recordData[this.currentIndex].good_type_id = val.goodTypeId
185 199
               this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
@@ -198,38 +212,39 @@
198 212
       }, cancle: function() {
199 213
         this.isVisibility = false
200 214
       }, GetConfigInfo: function() {
201
-        getSalesReturnConfig().then(response => {
215
+        const params = {
216
+          type: this.type
217
+        }
218
+        getSalesReturnConfig(params).then(response => {
202 219
           if (response.data.state == 0) {
203 220
             this.$message.error(response.data.msg)
204 221
             return false
205 222
           } else {
206
-            var warehouseList =  response.data.data.warehouseList
207
-            var warehouseInfoList =  response.data.data.warehouseInfoList
208
-            for (let i = 0; i <warehouseList.length; i++ ){
209
-              if(warehouseList[i].Manufacturer.id > 0){
223
+            var warehouseList = response.data.data.warehouseList
224
+            var warehouseInfoList = response.data.data.warehouseInfoList
225
+            for (let i = 0; i < warehouseList.length; i++) {
226
+              if (warehouseList[i].Manufacturer.id > 0) {
210 227
                 this.manufacturer.push(warehouseList[i].Manufacturer)
211 228
               }
212
-              if(warehouseList[i].Dealer.id > 0){
229
+              if (warehouseList[i].Dealer.id > 0) {
213 230
                 this.dealer.push(warehouseList[i].Dealer)
214 231
               }
215 232
             }
216 233
 
217 234
             for (let i = 0; i < warehouseInfoList.length; i++) {
218 235
               this.propForm.goodInfo.push(warehouseInfoList[i].GoodInfo)
219
-
220 236
             }
221 237
 
222
-
223 238
             const obj = {}
224 239
             const obj2 = {}
225 240
             const obj4 = {}
226
-            //去重复
227
-            this.manufacturer =  this.manufacturer.reduce((cur, next) => {
241
+            // 去重复
242
+            this.manufacturer = this.manufacturer.reduce((cur, next) => {
228 243
               obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
229 244
               return cur
230 245
             }, [])
231
-            //去重复
232
-            this.dealer =  this.dealer.reduce((cur, next) => {
246
+            // 去重复
247
+            this.dealer = this.dealer.reduce((cur, next) => {
233 248
               obj2[next.id] ? '' : obj2[next.id] = true && cur.push(next)
234 249
               return cur
235 250
             }, [])
@@ -237,8 +252,6 @@
237 252
               obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
238 253
               return cur
239 254
             }, [])
240
-
241
-
242 255
           }
243 256
         })
244 257
       }, typeName: function(good_type_id) {
@@ -267,7 +280,6 @@
267 280
       }, handleDelete: function(index, row) {
268 281
         this.recordInfo.recordData.splice(index, 1)
269 282
       }, calculate: function(val) {
270
-
271 283
         if (val == 0) {
272 284
           return ''
273 285
         }
@@ -287,20 +299,16 @@
287 299
         } else {
288 300
           this.isVisibility = true
289 301
           console.log(this.form.manufacturer)
290
-          for (let i = 0; i < this.propForm.goodInfo.length; i++){
291
-            if(this.propForm.goodInfo[i].manufacturer == this.form.manufacturer){
302
+          for (let i = 0; i < this.propForm.goodInfo.length; i++) {
303
+            if (this.propForm.goodInfo[i].manufacturer == this.form.manufacturer) {
292 304
               this.propForm.goodType.push(this.propForm.goodInfo[i].GoodsType)
293 305
             }
294
-
295 306
           }
296 307
           const obj3 = {}
297 308
           this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
298 309
             obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
299 310
             return cur
300 311
           }, [])
301
-
302
-
303
-
304 312
         }
305 313
       }, back() {
306 314
         this.$router.go(-1)
@@ -327,21 +335,21 @@
327 335
             const params = {
328 336
               'salesReturn': this.recordInfo.recordData
329 337
             }
330
-            postSalesReturn(params,this.return_time,total,this.form.dealer,this.form.manufacturer,this.type).then(response=>{
331
-              if (response.data.state==0) {
332
-                this.$message.error(response.data.msg);
333
-                return false;
334
-              }else {
338
+            postSalesReturn(params, this.return_time, total, this.form.dealer, this.form.manufacturer, this.type).then(response => {
339
+              if (response.data.state == 0) {
340
+                this.$message.error(response.data.msg)
341
+                return false
342
+              } else {
335 343
                 this.$notify({
336
-                  title: "成功",
337
-                  message: "退货成功",
338
-                  type: "success",
344
+                  title: '成功',
345
+                  message: '退货成功',
346
+                  type: 'success',
339 347
                   duration: 2000
340
-                });
348
+                })
341 349
                 this.recordInfo.recordData = []
342 350
                 this.$router.back(-1)
343 351
               }
344
-            });
352
+            })
345 353
           } else {
346 354
             return false
347 355
           }
@@ -382,16 +390,7 @@
382 390
     border-bottom: 1px #dcdfe6 solid;
383 391
     margin: 0px 0 20px 0;
384 392
   }
385
-  }
386 393
 
387
-  .title {
388
-    background: #409eff;
389
-    height: 44px;
390
-    line-height: 44px;
391
-    padding: 0 0 0 10px;
392
-    color: #fff;
393
-    margin: 0 0 10px 0;
394
-  // border-radius: 4px 4px 0 0;
395 394
   }
396 395
 
397 396
   .edit_separater {

+ 68 - 63
src/xt_pages/stock/salesReturnOrderDetail.vue Bestand weergeven

@@ -1,70 +1,78 @@
1 1
 <template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <div class="filter-container">
6
-      <span style="font-size: 20px">退货单详情</span>
7
-      <el-row style="float:right;">
8
-        <span>{{ReturnInfo.salesReturn.order_number}}</span>
9
-      </el-row>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
10 5
     </div>
11 6
 
12
-
13
-
14
-    <div class="filter-container">
15
-      <span>单据日期:  {{ReturnInfo.salesReturn.return_time | parseTime('{y}-{m}-{d}')}} </span>
16
-      <span>厂商 {{getManufactuerName(ReturnInfo.salesReturn.manufacturer)}}</span>
17
-      <span>经销商 {{getDealerName(ReturnInfo.salesReturn.dealer)}}</span>
18
-    </div>
19
-
20
-    <div class="filter-container" style="margin-top: 10px">
21
-      <el-button size="small" icon="el-icon-edit" @click="editRecord">编辑</el-button>
22
-      <el-button size="small" icon="el-icon-delete" @click="deleteRecord">删除</el-button>
7
+    <div class="app-container">
8
+
9
+      <div class="filter-container">
10
+        <span style="font-size: 18px">退货单详情</span>
11
+        <el-row style="float:right;">
12
+          <span>{{ReturnInfo.salesReturn.order_number}}</span>
13
+        </el-row>
14
+      </div>
15
+
16
+
17
+      <div class="cell">
18
+        <span style="width: 300px">单据日期:  {{ReturnInfo.salesReturn.return_time | parseTime('{y}-{m}-{d}')}} </span>
19
+        <span style="width: 300px">厂商: {{getManufactuerName(ReturnInfo.salesReturn.manufacturer)}}</span>
20
+        <span style="width: 300px">经销商: {{getDealerName(ReturnInfo.salesReturn.dealer)}}</span>
21
+      </div>
22
+
23
+      <div class="filter-container" style="margin-top: 10px">
24
+        <el-button size="small" icon="el-icon-edit" @click="editRecord">编辑</el-button>
25
+        <el-button size="small" icon="el-icon-delete" @click="deleteRecord">删除</el-button>
26
+      </div>
27
+
28
+      <el-row :gutter="12" style="margin-top: 10px">
29
+        <el-table :data="ReturnInfo.returnInfoData" :class="signAndWeighBoxPatients" style="width: 100%" border
30
+                  :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
31
+        >
32
+          <el-table-column min-width="35" align="center">
33
+            <template slot="header" slot-scope="scope">
34
+              <span>物品类型</span>
35
+            </template>
36
+
37
+            <template slot-scope="scope">
38
+              <span v-if="scope.row.good_type_id != 0">{{getTypeName(scope.row.good_type_id)}}</span>
39
+            </template>
40
+          </el-table-column>
41
+          <el-table-column min-width="35" align="center">
42
+            <template slot="header" slot-scope="scope">
43
+              <span>规格名称</span>
44
+            </template>
45
+            <template slot-scope="scope">
46
+              <span v-if="scope.row.good_id != 0">{{getSpecificationName(scope.row.good_id)}}</span>
47
+            </template>
48
+          </el-table-column>
49
+
50
+          <el-table-column min-width="23" align="center">
51
+            <template slot="header" slot-scope="scope">
52
+              <span>退货数量</span>
53
+            </template>
54
+            <template slot-scope="scope">
55
+              <span>{{scope.row.count}}</span>
56
+
57
+            </template>
58
+          </el-table-column>
59
+
60
+
61
+        </el-table>
62
+      </el-row>
23 63
     </div>
24
-
25
-    <el-row :gutter="12" style="margin-top: 10px">
26
-      <el-table :data="ReturnInfo.returnInfoData" :class="signAndWeighBoxPatients" style="width: 100%" border
27
-      >
28
-        <el-table-column min-width="35" align="center">
29
-          <template slot="header" slot-scope="scope">
30
-            <span>物品类型</span>
31
-          </template>
32
-
33
-          <template slot-scope="scope">
34
-            <span v-if="scope.row.good_type_id != 0">{{getTypeName(scope.row.good_type_id)}}</span>
35
-          </template>
36
-        </el-table-column>
37
-        <el-table-column min-width="35" align="center">
38
-          <template slot="header" slot-scope="scope">
39
-            <span>规格名称</span>
40
-          </template>
41
-          <template slot-scope="scope">
42
-            <span v-if="scope.row.good_id != 0">{{getSpecificationName(scope.row.good_id)}}</span>
43
-          </template>
44
-        </el-table-column>
45
-
46
-        <el-table-column min-width="23" align="center">
47
-          <template slot="header" slot-scope="scope">
48
-            <span>退货数量</span>
49
-          </template>
50
-          <template slot-scope="scope">
51
-            <span>{{scope.row.count}}</span>
52
-
53
-          </template>
54
-        </el-table-column>
55
-
56
-
57
-      </el-table>
58
-    </el-row>
59 64
   </div>
65
+
60 66
 </template>
61 67
 
62 68
 <script>
63 69
   import { uParseTime } from '@/utils/tools'
64
-  import { GetAllConfig,getReturnList,deleteSalesReturn } from '@/api/stock'
70
+  import { deleteSalesReturn, GetAllConfig, getReturnList } from '@/api/stock'
71
+  import BreadCrumb from '../components/bread-crumb'
65 72
 
66 73
   export default {
67 74
     name: 'stockInOrderDetail',
75
+    components: { BreadCrumb },
68 76
     created() {
69 77
       const order_id = this.$route.query.id
70 78
       this.GetConfigInfo()
@@ -72,6 +80,11 @@
72 80
     },
73 81
     data() {
74 82
       return {
83
+        crumbs: [
84
+          { path: false, name: '库存管理' },
85
+          { path: '/stock/return', name: '退货单' },
86
+          { path: '/stock/return/detail', name: '退货单详情' }
87
+        ],
75 88
         isEdit: 0,
76 89
         checked: false,
77 90
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
@@ -198,14 +211,6 @@
198 211
 
199 212
   }
200 213
 
201
-  .title {
202
-    background: #409eff;
203
-    height: 44px;
204
-    line-height: 44px;
205
-    padding: 0 0 0 10px;
206
-    color: #fff;
207
-    margin: 0 0 10px 0;
208
-  }
209 214
 
210 215
   .edit_separater {
211 216
     border-top: 1px solid rgb(233, 233, 233);

+ 0 - 402
src/xt_pages/stock/salesReutrnRecord.vue Bestand weergeven

@@ -1,402 +0,0 @@
1
-<template>
2
-<div class="main-contain">
3
-  <div class="position">
4
-    <bread-crumb></bread-crumb>
5
-
6
-  </div>
7
-  <div class="app-container sign-and-weigh-box">
8
-    <div class="filter-container">
9
-      <span>入库退货:</span>
10
-      <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
11
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
12
-                      value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
13
-      <span class="">-</span>
14
-      <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
15
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
16
-                      value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
17
-    </div>
18
-
19
-    <el-row :gutter="12">
20
-      <el-col :span="8">
21
-        <div class="title">入库退货记录
22
-        </div>
23
-        <div style="margin-bottom: 10px;">
24
-        </div>
25
-        <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="salesReturn.salesReturnDate" :class="signAndWeighBoxPatients" style="width: 100%" border
26
-                  highlight-current-row
27
-                  @row-click="onRowClick"
28
-                  :row-class-name="tableRowClassName"
29
-                  highlight-current-row
30
-                  v-loading="salesReturn.loading"
31
-        >
32
-          <el-table-column label="退货单号" min-width="40" align="center">
33
-            <template slot-scope="scope">
34
-              {{scope.row.order_number}}
35
-
36
-            </template>
37
-          </el-table-column>
38
-          <el-table-column label="操作时间" min-width="40" align="center">
39
-            <template slot-scope="scope">
40
-              {{ scope.row.opera_time | parseTime("{y}-{m}-{d}")}}
41
-            </template>
42
-          </el-table-column>
43
-          <el-table-column label="退货总量" align="center" min-width="30">
44
-            <template slot-scope="scope">
45
-              {{scope.row.total}}
46
-            </template>
47
-          </el-table-column>
48
-
49
-          <el-table-column label="操作人" align="center" min-width="30">
50
-            <template slot-scope="scope">
51
-              {{getXuserName(scope.row.creater)}}
52
-            </template>
53
-          </el-table-column>
54
-        </el-table>
55
-        <el-pagination
56
-          :page-sizes="[7]"
57
-          :page-size="7"
58
-          background
59
-          align="right"
60
-          style="margin-top:20px;"
61
-          layout="total, sizes, prev, pager, next, jumper"
62
-          :total="total">
63
-        </el-pagination>
64
-      </el-col>
65
-
66
-      <el-col :span="16">
67
-        <div class="titleTop">物品详细信息
68
-        </div>
69
-        <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="salesReturnInfo.salesReturnInfoDate" :class="signAndWeighBoxPatients" style="width: 100%" border
70
-                  v-loading="salesReturnInfo.loading"
71
-                  @selection-change="handleSelectionChange"
72
-        >
73
-          <el-table-column
74
-            type="selection"
75
-            width="55">
76
-          </el-table-column>
77
-          <el-table-column label="规格名称" min-width="30" align="center">
78
-            <template slot-scope="scope">
79
-              {{getSpecificationName(scope.row.good_id)}}
80
-            </template>
81
-          </el-table-column>
82
-          <el-table-column label="物品类型" min-width="30" align="center">
83
-            <template slot-scope="scope">
84
-              {{getTypeName(scope.row.good_type_id)}}
85
-
86
-            </template>
87
-          </el-table-column>
88
-
89
-          <el-table-column label="退货数量" min-width="30" align="center">
90
-            <template slot-scope="scope">
91
-              {{scope.row.count}}
92
-            </template>
93
-          </el-table-column>
94
-          <el-table-column label="退货单价" min-width="30" align="center">
95
-            <template slot-scope="scope">
96
-              {{scope.row.price}}
97
-
98
-            </template>
99
-          </el-table-column>
100
-          <el-table-column label="退货总价" min-width="30" align="center">
101
-            <template slot-scope="scope">
102
-              {{scope.row.price * scope.row.count }}
103
-            </template>
104
-          </el-table-column>
105
-        </el-table>
106
-
107
-      </el-col>
108
-    </el-row>
109
-  </div>
110
-  </div>
111
-</template>
112
-
113
-<script>
114
-  import {uParseTime} from "@/utils/tools";
115
-  import { fetchAllDoctorAndNurse,fetchAllAdminUsers } from "@/api/doctor";
116
-  import {
117
-    getSalesReturnList,
118
-    getSalesReturnInfoList,
119
-    GetAllGoodInfo,
120
-    GetAllGoodType,
121
-  } from "@/api/stock";
122
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
123
-
124
-  export default {
125
-    name: "stockIn",
126
-    created(){
127
-      var year = new Date().getFullYear();
128
-      var month = new Date().getMonth() + 1;
129
-      var day = new Date().getDate();
130
-      if (parseInt(month) < 10) {
131
-        month = "0" + month;
132
-      }
133
-      if (parseInt(day) < 10) {
134
-        day = "0" + day;
135
-      }
136
-      let endTime = year + '-' + month + '-' + day;
137
-      this.end_time = endTime
138
-
139
-
140
-      var year = new Date().getFullYear();
141
-      var month = new Date().getMonth();
142
-      var day = new Date().getDate();
143
-      if (parseInt(month) < 10) {
144
-        month = "0" + month;
145
-      }
146
-      if (parseInt(day) < 10) {
147
-        day = "0" + day;
148
-      }
149
-      let startTime = year + '-' + month + '-' + day;
150
-      this.start_time = startTime
151
-
152
-
153
-      this.GetAllGoodInfo()
154
-      this.GetAllGoodType()
155
-      this.GetSalesReturnList()
156
-      this.fetchAllAdminUsers()
157
-
158
-
159
-    },
160
-    components:{
161
-      BreadCrumb
162
-    },
163
-    data() {
164
-      return {
165
-        total:0,
166
-        adminUserOptions:[],
167
-        multipleSelection: [],
168
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
169
-        start_time: '',
170
-        end_time: '',
171
-        goodType:[],
172
-        goodInfo:[],
173
-
174
-        salesReturn: {
175
-          loading: false,
176
-          salesReturnDate: [],
177
-          tableCurrentIndex:''
178
-        },
179
-
180
-        salesReturnInfo: {
181
-          loading: false,
182
-          salesReturnInfoDate: [],
183
-        }
184
-      };
185
-    },
186
-    methods: {
187
-      GetSalesReturnList:function () {
188
-        let Params = {
189
-          page: this.page,
190
-          limit: this.limit,
191
-          start_time: this.start_time,
192
-          end_time: this.end_time
193
-        }
194
-        this.salesReturn.salesReturnDate = []
195
-        getSalesReturnList(Params).then(response =>{
196
-          if (response.data.state == 0) {
197
-            this.salesReturn.loading = false
198
-            this.$message.error(response.data.msg);
199
-            return false;
200
-          } else {
201
-            this.salesReturn.loading = false
202
-            this.total = response.data.data.total
203
-            for (let i = 0; i < response.data.data.list.length; i++) {
204
-              this.salesReturn.salesReturnDate.push(response.data.data.list[i])
205
-            }
206
-          }
207
-        })
208
-      }, tableRowClassName({row, rowIndex}) {
209
-        //把每一行的索引放进row
210
-        row.index = rowIndex;
211
-      },
212
-      onRowClick(row, event, column) {
213
-        this.salesReturnInfo.salesReturnInfoDate = []
214
-        this.salesReturn.tableCurrentIndex = row.index;
215
-        let params = {
216
-          'id': row.id
217
-        }
218
-        this.salesReturnInfo.loading = true
219
-        getSalesReturnInfoList(params).then(response => {
220
-          if (response.data.state == 0) {
221
-            this.salesReturnInfo.loading = false
222
-            this.$message.error(response.data.msg);
223
-            return false;
224
-          } else {
225
-            this.salesReturnInfo.loading = false
226
-            for (let i = 0; i < response.data.data.info.length; i++) {
227
-              this.salesReturnInfo.salesReturnInfoDate.push(response.data.data.info[i])
228
-            }
229
-          }
230
-        });
231
-
232
-      }, getXuserName(id){
233
-        if (id<=0) {
234
-          return "";
235
-        }
236
-        var name = "";
237
-        if (this.adminUserOptions==null || typeof(this.adminUserOptions.length) == "undefined") {
238
-          return name;
239
-        }
240
-        var leng = this.adminUserOptions.length;
241
-        if (leng==0) {
242
-          return name;
243
-        }
244
-        for (let index = 0; index < leng; index++) {
245
-          if (this.adminUserOptions[index].id == id) {
246
-            name = this.adminUserOptions[index].name;
247
-            break;
248
-          }
249
-        }
250
-        return name;
251
-      },fetchAllDoctorAndNurse() {
252
-        fetchAllDoctorAndNurse().then(response => {
253
-          if (response.data.state == 1) {
254
-            this.doctorOptions = response.data.data.doctors;
255
-          }
256
-        });
257
-      },
258
-      fetchAllAdminUsers() {
259
-        fetchAllAdminUsers().then(response => {
260
-          if (response.data.state == 1) {
261
-            this.adminUserOptions = response.data.data.users;
262
-            var alen = this.adminUserOptions.length;
263
-            for (let index = 0; index < alen; index++) {
264
-              if (this.adminUserOptions[index].user_type==2) {
265
-                // this.doctorOptions.push(this.adminUserOptions[index]);
266
-              }
267
-            }
268
-          }
269
-        });
270
-      },getSpecificationName:function (id) {
271
-        let name = ''
272
-        for (let i = 0; i< this.goodInfo.length; i++){
273
-          if( this.goodInfo[i].id == id){
274
-            name = this.goodInfo[i].specification_name
275
-          }
276
-
277
-        }
278
-
279
-        return name
280
-
281
-      },getTypeName:function (id) {
282
-        let name = ''
283
-        for (let i = 0; i< this.goodType.length; i++){
284
-          if( this.goodType[i].id == id){
285
-            name = this.goodType[i].type_name
286
-          }
287
-        }
288
-        return name
289
-      },GetAllGoodType:function () {
290
-        GetAllGoodType().then(response => {
291
-          if (response.data.state == 0) {
292
-            this.$message.error(response.data.msg);
293
-            return false;
294
-          } else {
295
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
296
-              this.goodType.push(response.data.data.goodType[i])
297
-            }
298
-          }
299
-        });
300
-
301
-
302
-      },GetAllGoodInfo:function () {
303
-        GetAllGoodInfo().then(response => {
304
-          if (response.data.state == 0) {
305
-            this.$message.error(response.data.msg);
306
-            return false;
307
-          } else {
308
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
309
-              this.goodInfo.push(response.data.data.goodInfo[i])
310
-            }
311
-          }
312
-        });
313
-
314
-
315
-      },clicks:function () {
316
-
317
-      },handleWarehouse:function () {
318
-        this.$router.push({path:'/stock/in/add'})
319
-      },handleReturnSales:function () {
320
-        // this.$router.push({path:'/patients/create'}
321
-        if(this.multipleSelection.length <= 0){
322
-          this.$message.error('请选择退货物品');
323
-          return
324
-        }
325
-
326
-        let ids = []
327
-        for (let i = 0; i < this.multipleSelection.length; i++){
328
-          ids.push(this.multipleSelection[i].id)
329
-
330
-        }
331
-        this.$router.push({name:'salesReturn',query:{id:ids.join("&")}});
332
-
333
-      },handleReturnSalesRecord:function () {
334
-
335
-      }, handleWarehouseRecord:function () {
336
-
337
-      },handleSelectionChange:function (val) {
338
-        this.multipleSelection = val
339
-      },startTimeChange:function () {
340
-        this.GetSalesReturnList()
341
-      },endTimeChange:function () {
342
-        this.GetSalesReturnList()
343
-      }
344
-
345
-
346
-    },
347
-    watch: {
348
-      $route() {
349
-        if (this.$route.path == '/stock/in') {
350
-
351
-
352
-        }
353
-
354
-      }
355
-    }
356
-  };
357
-</script>
358
-
359
-<style rel="stylesheet/css" lang="scss" scoped>
360
-  .information {
361
-    border: 1px #dcdfe6 solid;
362
-    padding: 30px 20px 30px 20px;
363
-
364
-    .border {
365
-      border-bottom: 1px #dcdfe6 solid;
366
-      margin: 0px 0 20px 0;
367
-    }
368
-  }
369
-
370
-  .title {
371
-    background: #409eff;
372
-    height: 44px;
373
-    line-height: 44px;
374
-    padding: 0 0 0 10px;
375
-    color: #fff;
376
-    margin: 0 0 10px 0;
377
-    // border-radius: 4px 4px 0 0;
378
-  }
379
-
380
-  .edit_separater {
381
-    border-top: 1px solid rgb(233, 233, 233);
382
-    margin-top: 15px;
383
-    margin-bottom: 15px;
384
-  }
385
-
386
-</style>
387
-
388
-<style>
389
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
390
-    font-size: 12px;
391
-  }
392
-
393
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
394
-    background: #6fb5fa;
395
-  }
396
-
397
-  .count{
398
-    color: #bd2c00;
399
-
400
-  }
401
-
402
-</style>

+ 0 - 437
src/xt_pages/stock/stockIn.vue Bestand weergeven

@@ -1,437 +0,0 @@
1
-<template>
2
-<div class="main-contain">
3
-  <div class="position">
4
-    <bread-crumb></bread-crumb>
5
-    <el-row style="float:right;">
6
-        <el-button size="small" icon="el-icon-sold-out" @click="handleReturnSales" >退货</el-button>        
7
-        <el-button size="small" icon="el-icon-setting" @click="handleWarehouse" type="primary">入库</el-button>
8
-        <el-button size="small" icon="el-icon-edit-outline" @click="handleWarehouseRecord" type="danger">入库记录</el-button>
9
-        <el-button size="small" icon="el-icon-document" @click="handleReturnSalesRecord" type="warning">退货记录</el-button>
10
-    </el-row>
11
-  </div>
12
-  <div class="app-container sign-and-weigh-box">
13
-    <div class="cell">
14
-      <label class="title" ><span class="name">入库时间:</span></label>
15
-      <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17
-                      value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
18
-      <span class="">-</span>
19
-      <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
-                      value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
22
-    </div>
23
-
24
-    <el-row :gutter="12">
25
-      <el-col :span="8">
26
-        <div class="titleTop">入库记录
27
-        </div>
28
-        <div style="margin-bottom: 10px;">
29
-        </div>
30
-        <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="Warehouse.warehouseDate" :class="signAndWeighBoxPatients" style="width: 100%" border
31
-                  highlight-current-row
32
-                  @row-click="onRowClick"
33
-                  :row-class-name="tableRowClassName"
34
-                  highlight-current-row
35
-                  v-loading="Warehouse.loading"
36
-        >
37
-          <el-table-column label="入库单号" min-width="40" align="center">
38
-            <template slot-scope="scope">
39
-              {{scope.row.warehousing_order}}
40
-
41
-            </template>
42
-          </el-table-column>
43
-          <el-table-column label="入库时间" min-width="40" align="center">
44
-            <template slot-scope="scope">
45
-              {{ scope.row.warehousing_time | parseTime("{y}-{m}-{d}")}}
46
-              <!--<input/>-->
47
-              <!--<span></span>-->
48
-            </template>
49
-          </el-table-column>
50
-
51
-
52
-          <el-table-column label="操作人" align="center" min-width="30">
53
-            <template slot-scope="scope">
54
-              {{getXuserName(scope.row.creater)}}
55
-            </template>
56
-          </el-table-column>
57
-        </el-table>
58
-      </el-col>
59
-
60
-      <el-col :span="16">
61
-        <div class="titleTop">物品详细信息
62
-        </div>
63
-        <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="WarehouseInfo.warehouseInfoDate" :class="signAndWeighBoxPatients" style="width: 100%" border
64
-                  v-loading="WarehouseInfo.loading"
65
-                  @selection-change="handleSelectionChange"
66
-        >
67
-          <el-table-column
68
-            type="selection"
69
-            width="55">
70
-          </el-table-column>
71
-          <el-table-column label="规格名称" min-width="30" align="center">
72
-            <template slot-scope="scope">
73
-              {{getSpecificationName(scope.row.good_id)}}
74
-            </template>
75
-          </el-table-column>
76
-          <el-table-column label="物品类型" min-width="30" align="center">
77
-            <template slot-scope="scope">
78
-              {{getTypeName(scope.row.good_type_id)}}
79
-
80
-            </template>
81
-          </el-table-column>
82
-
83
-          <el-table-column label="入库数量" min-width="30" align="center">
84
-            <template slot-scope="scope">
85
-              <span :class="scope.row.is_return == 1 ? 'count':''">{{scope.row.warehousing_count}}</span>
86
-            </template>
87
-          </el-table-column>
88
-          <el-table-column label="入库单价" min-width="30" align="center">
89
-            <template slot-scope="scope">
90
-              {{scope.row.price}}
91
-
92
-            </template>
93
-          </el-table-column>
94
-          <el-table-column label="入库总价" min-width="30" align="center">
95
-            <template slot-scope="scope">
96
-              {{calculate(scope.row.price*scope.row.warehousing_count)}}
97
-
98
-
99
-            </template>
100
-          </el-table-column>
101
-          <el-table-column label="物品批号" min-width="30" align="center">
102
-            <template slot-scope="scope">
103
-              {{scope.row.number}}
104
-            </template>
105
-          </el-table-column>
106
-          <el-table-column label="生产日期" min-width="30" align="center">
107
-            <template slot-scope="scope" v-if="scope.row.product_date != 0">
108
-              {{scope.row.product_date | parseTime("{y}-{m}-{d}")}}
109
-            </template>
110
-          </el-table-column>
111
-          <el-table-column label="有效日期" min-width="30" align="center">
112
-            <template slot-scope="scope">
113
-              {{ scope.row.expiry_date | parseTime("{y}-{m}-{d}")}}
114
-
115
-            </template>
116
-          </el-table-column>
117
-        </el-table>
118
-
119
-      </el-col>
120
-    </el-row>
121
-
122
-     <el-pagination
123
-          @size-change="handleSizeChange"
124
-          @current-change="handleCurrentChange"
125
-          :page-sizes="[7]"
126
-          :page-size="7"
127
-          background
128
-          align="right"
129
-          style="margin-top:10px;"
130
-          layout="total, sizes, prev, pager, next, jumper"
131
-          :total="total">
132
-        </el-pagination>
133
-
134
-  </div>
135
-</div>
136
-</template>
137
-
138
-<script>
139
-  import {uParseTime} from "@/utils/tools";
140
-  import {fetchAllDoctorAndNurse, fetchAllAdminUsers} from "@/api/doctor";
141
-  import {
142
-    getWarehouseList,
143
-    getWarehouseInfoList,
144
-    GetAllGoodInfo,
145
-    GetAllGoodType,
146
-  } from "@/api/stock";
147
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
148
-
149
-  export default {
150
-    name: "stockIn",
151
-    components:{
152
-      BreadCrumb
153
-    },
154
-    created() {
155
-      var year = new Date().getFullYear();
156
-      var month = new Date().getMonth() + 1;
157
-      var day = new Date().getDate();
158
-      if (parseInt(month) < 10) {
159
-        month = "0" + month;
160
-      }
161
-      if (parseInt(day) < 10) {
162
-        day = "0" + day;
163
-      }
164
-      let endTime = year + '-' + month + '-' + day;
165
-      this.end_time = endTime
166
-
167
-
168
-      var year = new Date().getFullYear();
169
-      var month = new Date().getMonth();
170
-      var day = new Date().getDate();
171
-      if (parseInt(month) < 10) {
172
-        month = "0" + month;
173
-      }
174
-      if (parseInt(day) < 10) {
175
-        day = "0" + day;
176
-      }
177
-      let startTime = year + '-' + month + '-' + day;
178
-      this.start_time = startTime
179
-      this.GetWarehouse()
180
-      this.GetAllGoodInfo()
181
-      this.GetAllGoodType()
182
-      this.fetchAllAdminUsers()
183
-
184
-      sessionStorage.setItem("111","2222")
185
-
186
-
187
-    },
188
-    data() {
189
-      return {
190
-        page: 1,
191
-        limit: 7,
192
-
193
-        total: 0,
194
-        pageTotal: 0,
195
-        pageSelect: 0,
196
-        adminUserOptions:[],
197
-        multipleSelection: [],
198
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
199
-        start_time: '',
200
-        end_time: '',
201
-        goodType: [],
202
-        goodInfo: [],
203
-        Warehouse: {
204
-          loading: false,
205
-          warehouseDate: [],
206
-          tableCurrentIndex: ''
207
-        },
208
-
209
-        WarehouseInfo: {
210
-          loading: false,
211
-          warehouseInfoDate: [],
212
-        }
213
-      };
214
-    },
215
-    methods: {
216
-      GetWarehouse: function () {
217
-        let Params = {
218
-          page: this.page,
219
-          limit: this.limit,
220
-          start_time: this.start_time,
221
-          end_time: this.end_time
222
-        }
223
-        this.Warehouse.warehouseDate = []
224
-        getWarehouseList(Params).then(response => {
225
-          if (response.data.state == 0) {
226
-
227
-            this.Warehouse.loading = false
228
-            this.$message.error(response.data.msg);
229
-            return false;
230
-          } else {
231
-            this.Warehouse.loading = false
232
-            this.total = response.data.data.total
233
-            for (let i = 0; i < response.data.data.list.length; i++) {
234
-              this.Warehouse.warehouseDate.push(response.data.data.list[i])
235
-            }
236
-          }
237
-        });
238
-
239
-      }, tableRowClassName({row, rowIndex}) {
240
-        //把每一行的索引放进row
241
-        row.index = rowIndex;
242
-      },
243
-      onRowClick(row, event, column) {
244
-        this.WarehouseInfo.warehouseInfoDate = []
245
-        this.Warehouse.tableCurrentIndex = row.index;
246
-        let params = {
247
-          'id': row.id
248
-        }
249
-        this.WarehouseInfo.loading = true
250
-        getWarehouseInfoList(params).then(response => {
251
-          if (response.data.state == 0) {
252
-            this.WarehouseInfo.loading = false
253
-            this.$message.error(response.data.msg);
254
-            return false;
255
-          } else {
256
-            this.WarehouseInfo.loading = false
257
-            for (let i = 0; i < response.data.data.info.length; i++) {
258
-              this.WarehouseInfo.warehouseInfoDate.push(response.data.data.info[i])
259
-            }
260
-          }
261
-        });
262
-
263
-      }, getXuserName(id) {
264
-        if (id <= 0) {
265
-          return "";
266
-        }
267
-        var name = "";
268
-        if (this.adminUserOptions == null || typeof(this.adminUserOptions.length) == "undefined") {
269
-          return name;
270
-        }
271
-        var leng = this.adminUserOptions.length;
272
-        if (leng == 0) {
273
-          return name;
274
-        }
275
-        for (let index = 0; index < leng; index++) {
276
-          if (this.adminUserOptions[index].id == id) {
277
-            name = this.adminUserOptions[index].name;
278
-            break;
279
-          }
280
-        }
281
-        return name;
282
-      }, fetchAllDoctorAndNurse() {
283
-        fetchAllDoctorAndNurse().then(response => {
284
-          if (response.data.state == 1) {
285
-            this.doctorOptions = response.data.data.doctors;
286
-          }
287
-        });
288
-      },
289
-      fetchAllAdminUsers() {
290
-        fetchAllAdminUsers().then(response => {
291
-          console.log(response)
292
-          if (response.data.state == 1) {
293
-            this.adminUserOptions = response.data.data.users;
294
-            var alen = this.adminUserOptions.length;
295
-            for (let index = 0; index < alen; index++) {
296
-              if (this.adminUserOptions[index].user_type == 2) {
297
-                // this.doctorOptions.push(this.adminUserOptions[index]);
298
-              }
299
-            }
300
-          }
301
-        });
302
-      }, getSpecificationName: function (id) {
303
-        let name = ''
304
-        for (let i = 0; i < this.goodInfo.length; i++) {
305
-          if (this.goodInfo[i].id == id) {
306
-            name = this.goodInfo[i].specification_name
307
-          }
308
-
309
-        }
310
-
311
-        return name
312
-
313
-      }, getTypeName: function (id) {
314
-        let name = ''
315
-        for (let i = 0; i < this.goodType.length; i++) {
316
-          if (this.goodType[i].id == id) {
317
-            name = this.goodType[i].type_name
318
-          }
319
-        }
320
-        return name
321
-      }, GetAllGoodType: function () {
322
-        GetAllGoodType().then(response => {
323
-          if (response.data.state == 0) {
324
-            this.$message.error(response.data.msg);
325
-            return false;
326
-          } else {
327
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
328
-              this.goodType.push(response.data.data.goodType[i])
329
-            }
330
-          }
331
-        });
332
-
333
-
334
-      }, GetAllGoodInfo: function () {
335
-        GetAllGoodInfo().then(response => {
336
-          if (response.data.state == 0) {
337
-            this.$message.error(response.data.msg);
338
-            return false;
339
-          } else {
340
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
341
-              this.goodInfo.push(response.data.data.goodInfo[i])
342
-            }
343
-          }
344
-        });
345
-
346
-
347
-      }, clicks: function () {
348
-        console.log(this.WarehouseInfo.warehouseInfoDate)
349
-
350
-      }, handleWarehouse: function () {
351
-        sessionStorage.removeItem("warehousing_orders")
352
-        this.$router.push({path: '/stock/in/add'})
353
-      }, handleReturnSales: function () {
354
-        // this.$router.push({path:'/patients/create'}
355
-        if (this.multipleSelection.length <= 0) {
356
-          this.$message.error('请选择退货物品');
357
-          return
358
-        }
359
-
360
-        let ids = []
361
-        for (let i = 0; i < this.multipleSelection.length; i++) {
362
-          ids.push(this.multipleSelection[i].id)
363
-
364
-        }
365
-        this.$router.push({name: 'salesReturn', query: {id: ids.join("&")}});
366
-
367
-      }, handleReturnSalesRecord: function () {
368
-        this.$router.push({name: 'salesReutrnRecord'});
369
-
370
-      }, handleWarehouseRecord: function () {
371
-        this.$router.push({name: 'warehouseRecord'});
372
-
373
-
374
-      }, handleSelectionChange: function (val) {
375
-        this.multipleSelection = val
376
-      }, handleSizeChange(val) {
377
-        this.limit = val;
378
-        this.GetWarehouse();
379
-      }, handleCurrentChange(val) {
380
-        this.page = val;
381
-        this.GetWarehouse();
382
-      }, startTimeChange(val) {
383
-        this.GetWarehouse();
384
-      }, endTimeChange(val) {
385
-        this.GetWarehouse();
386
-      }, calculate: function (val) {
387
-        return Math.round(parseFloat(val) * 100) / 100
388
-      }
389
-    },
390
-  };
391
-</script>
392
-
393
-<style rel="stylesheet/css" lang="scss" scoped>
394
-  .information {
395
-    border: 1px #dcdfe6 solid;
396
-    padding: 30px 20px 30px 20px;
397
-
398
-    .border {
399
-      border-bottom: 1px #dcdfe6 solid;
400
-      margin: 0px 0 20px 0;
401
-    }
402
-  }
403
-
404
-  .titleTop {
405
-    background: #409eff;
406
-    height: 44px;
407
-    line-height: 44px;
408
-    padding: 0 0 0 10px;
409
-    color: #fff;
410
-    margin: 0 0 10px 0;
411
-    // border-radius: 4px 4px 0 0;
412
-        font-size: 14px;
413
-  }
414
-
415
-  .edit_separater {
416
-    border-top: 1px solid rgb(233, 233, 233);
417
-    margin-top: 15px;
418
-    margin-bottom: 15px;
419
-  }
420
-
421
-</style>
422
-
423
-<style>
424
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
425
-    font-size: 12px;
426
-  }
427
-
428
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
429
-    background: #6fb5fa;
430
-  }
431
-
432
-  .count {
433
-    color: #bd2c00;
434
-
435
-  }
436
-
437
-</style>

+ 54 - 57
src/xt_pages/stock/stockInOrder.vue Bestand weergeven

@@ -1,39 +1,34 @@
1 1
 <template>
2 2
 
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-
6
-    <div class="filter-container">
7
-
8
-
9
-      <el-row style="float:right;">
10
-        <el-button @click="handleWarehouse" type="primary">新增</el-button>
11
-      </el-row>
12
-    </div>
13
-
14
-    <div class="filter-container" style="margin-top:20px">
15
-      <el-input style="width: 300px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
16
-      <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
3
+  <div class="main-contain">
4
+    <div class="position">
5
+      <!--<bread-crumb :crumbs='crumbs'></bread-crumb>-->
6
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
7
+      <el-button size="small"  @click="handleWarehouse" class="filter-item" style="float:right;" type="primary" icon="el-icon-circle-plus-outline" >新增</el-button>
17 8
     </div>
18 9
 
10
+    <div class="app-container">
19 11
     <div class="filter-container">
20
-      <span>入库时间:</span>
21
-      <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
-                      value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
24
-      <span class="">-</span>
25
-      <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
26
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
-                      value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
12
+      <el-input   style="width: 400px;" v-model="searchKey" class="filter-item"  placeholder="单据日期/单据编码/制单人/供应商" />
13
+      <el-button  class="filter-item" type="primary" icon="el-icon-search" @click="search" >搜索</el-button>
28 14
     </div>
29 15
 
30
-    <div class="filter-container" style="margin-top: 10px">
31
-      <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
32
-      <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
16
+      <div class="cell">
17
+        <label class="title"><span class="name">入库时间</span> : </label>
18
+        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
19
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
20
+                        value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
21
+        <span class="">-</span>
22
+        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
23
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
24
+                        value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
25
+      </div>
26
+
27
+      <div class="cell clearfix">
28
+        <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
29
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
30
+      </div>
33 31
 
34
-    </div>
35
-
36
-    <el-row :gutter="12" style="margin-top: 10px">
37 32
       <el-table
38 33
         :data="Warehouse.warehouseDate"
39 34
         :class="signAndWeighBoxPatients"
@@ -42,14 +37,17 @@
42 37
         v-loading="Warehouse.loading"
43 38
         ref="multipleTable"
44 39
         @selection-change="select"
40
+        :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
41
+
45 42
 
46 43
       >
47 44
         <el-table-column
45
+          align="center"
48 46
           type="selection"
49 47
           width="55">
50 48
         </el-table-column>
51 49
 
52
-        <el-table-column label="单据日期" align="center">
50
+        <el-table-column label="单据日期"  align="center">
53 51
           <template slot-scope="scope">
54 52
             {{ scope.row.warehousing_time | parseTime('{y}-{m}-{d}')}}
55 53
           </template>
@@ -82,19 +80,22 @@
82 80
 
83 81
         <el-table-column label="操作" align="center">
84 82
           <template slot-scope="scope">
85
-            <el-button
86
-              size="mini"
87
-              type="primary"
88
-              icon="el-icon-edit"
89
-              @click="handleEdit(scope.$index, scope.row)">
90
-            </el-button>
91
-
92
-            <el-button
93
-              size="mini"
94
-              type="danger"
95
-              icon="el-icon-delete"
96
-              @click="handleDelete(scope.$index, scope.row)">
97
-            </el-button>
83
+             <el-tooltip class="item" effect="dark" content="编辑" placement="top">
84
+                  <el-button
85
+                    size="small"
86
+                    type="primary"
87
+                    icon="el-icon-edit-outline"
88
+                    @click="handleEdit(scope.$index, scope.row)">
89
+                  </el-button>
90
+                  </el-tooltip>
91
+                  <el-tooltip class="item" effect="dark" content="删除" placement="top">
92
+                    <el-button
93
+                      size="small"
94
+                      type="danger"
95
+                      icon="el-icon-delete"
96
+                      @click="handleDelete(scope.$index, scope.row)">
97
+                    </el-button>
98
+            </el-tooltip>
98 99
 
99 100
           </template>
100 101
         </el-table-column>
@@ -111,8 +112,7 @@
111 112
         layout="total, sizes, prev, pager, next, jumper"
112 113
         :total="total">
113 114
       </el-pagination>
114
-
115
-    </el-row>
115
+    </div>
116 116
   </div>
117 117
 </template>
118 118
 
@@ -127,9 +127,11 @@
127 127
     getWarehouseInfoList,
128 128
     getWarehouseList
129 129
   } from '@/api/stock'
130
+  import BreadCrumb from '../components/bread-crumb'
130 131
 
131 132
   export default {
132 133
     name: 'stockIn',
134
+    components: { BreadCrumb },
133 135
     created() {
134 136
       var year = new Date().getFullYear()
135 137
       var month = new Date().getMonth() + 1
@@ -160,6 +162,11 @@
160 162
     },
161 163
     data() {
162 164
       return {
165
+        crumbs: [
166
+          { path: false, name: '库存管理' },
167
+          { path: '/stock/in', name: '入库单' }
168
+        ],
169
+        type: 1,
163 170
         page: 1,
164 171
         limit: 7,
165 172
         checked: false,
@@ -195,7 +202,7 @@
195 202
           limit: this.limit,
196 203
           start_time: this.start_time,
197 204
           end_time: this.end_time,
198
-          type : 1,
205
+          type: this.type
199 206
         }
200 207
         this.Warehouse.warehouseDate = []
201 208
         getWarehouseList(Params).then(response => {
@@ -315,7 +322,7 @@
315 322
       }, clicks: function() {
316 323
         console.log(this.WarehouseInfo.warehouseInfoDate)
317 324
       }, handleWarehouse: function() {
318
-        this.$router.push({ path: '/stock/in/add' })
325
+        this.$router.push({ path: '/stock/in/add', query: { type: this.type }})
319 326
       }, handleReturnSales: function() {
320 327
         // this.$router.push({path:'/patients/create'}
321 328
         if (this.multipleSelection.length <= 0) {
@@ -369,7 +376,7 @@
369 376
           }
370 377
         }
371 378
       }, handleEdit: function(index, row) {
372
-        this.$router.push({ name: 'stockInDetail', query: { id: row.id }})
379
+        this.$router.push({ name: 'stockInDetail', query: { id: row.id, type: this.type }})
373 380
       }, handleDelete: function(index, row) {
374 381
         const ids = []
375 382
         ids.push(row.id)
@@ -472,16 +479,6 @@
472 479
 
473 480
   }
474 481
 
475
-  .title {
476
-    background: #409eff;
477
-    height: 44px;
478
-    line-height: 44px;
479
-    padding: 0 0 0 10px;
480
-    color: #fff;
481
-    margin: 0 0 10px 0;
482
-
483
-  }
484
-
485 482
   .edit_separater {
486 483
     border-top: 1px solid rgb(233, 233, 233);
487 484
     margin-top: 15px;

+ 194 - 199
src/xt_pages/stock/stockInOrderAdd.vue Bestand weergeven

@@ -1,194 +1,191 @@
1 1
 <template>
2 2
 
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <stock-in-dialog :propForm="propForm"
6
-                     :visibility="isVisibility"
7
-                     v-on:dialog-comfirm="comfirm"
8
-                     v-on:dialog-cancle="cancle"></stock-in-dialog>
9
-
10
-    <div class="filter-container">
11
-
12
-      <el-row>
13
-        <el-col :span="8">
14
-          <div>
15
-            <span>入库时间:</span>
16
-            <el-date-picker v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false"
17
-                            style="width: 196px;"
18
-                            type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
19
-                            value-format="yyyy-MM-dd"></el-date-picker>
20
-          </div>
21
-        </el-col>
22
-
23
-
24
-        <el-col :span="8">
25
-          <div>
26
-            <el-form ref="form" :model="form" :rules="ruleForm" label-width="80px">
27
-              <el-form-item label="厂商:" prop="manufacturer">
28
-                <el-select v-model="form.manufacturer" placeholder="请选择厂商">
29
-                  <el-option v-for="(option, index) in manufacturer" :key="index" :label="option.manufacturer_name"
30
-                             :value="option.id"></el-option>
31
-                </el-select>
32
-              </el-form-item>
33
-            </el-form>
34
-          </div>
35
-        </el-col>
36
-        <el-col :span="8">
37
-          <div>
38
-            <el-form ref="form" :model="form" label-width="80px">
39
-              <el-form-item label="经销商:">
40
-                <el-select v-model="form.dealer" placeholder="请选择经销商">
41
-                  <el-option v-for="(option, index) in dealer" :key="index" :label="option.dealer_name"
42
-                             :value="option.id"></el-option>
43
-                </el-select>
44
-              </el-form-item>
3
+  <div class="main-contain">
4
+    <div class="position">
5
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
6
+      <div style="float:right;">
7
+      <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
8
+      <el-button size="small"  type="primary" @click="submit()" class="filter-item" >确 定</el-button>
9
+      </div>
10
+    </div>
11
+    <div class="app-container">
12
+
13
+      <stock-in-dialog :propForm="propForm"
14
+                       :visibility="isVisibility"
15
+                       v-on:dialog-comfirm="comfirm"
16
+                       v-on:dialog-cancle="cancle"></stock-in-dialog>
17
+
18
+
19
+      <div class="cell">
20
+        <label class="title"><span class="name">入库时间</span> : </label>
21
+        <el-date-picker v-model="warehousing_time"  prefix-icon="el-icon-date"  :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right"  format="yyyy-MM-dd" value-format="yyyy-MM-dd" > </el-date-picker>
22
+      </div>
23
+
24
+      <div class="cell clearfix">
25
+        <label class="title"><span class="name">厂商</span> : </label>
26
+        <el-select  v-model="form.manufacturer" clearable  placeholder="请选择厂商" >
27
+          <el-option
28
+            v-for="(option, index) in manufacturer"
29
+            :key="index"
30
+            :label="option.manufacturer_name"
31
+            :value="option.id">
32
+          </el-option>
33
+        </el-select>
34
+      </div>
35
+
36
+      <div class="cell clearfix">
37
+        <label class="title"><span class="name">经销商</span> : </label>
38
+        <el-select  v-model="form.dealer" clearable  placeholder="请选择经销商" >
39
+          <el-option
40
+            v-for="(option, index) in dealer"
41
+            :key="index"
42
+            :label="option.dealer_name"
43
+            :value="option.id">
44
+          </el-option>
45
+        </el-select>
46
+      </div>
47
+
48
+
49
+            <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
50
+              <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
51
+                        max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
52
+              >
53
+
54
+                <el-table-column min-width="35" align="center">
55
+
56
+                  <template slot="header" slot-scope="scope">
57
+                    <span>物品类型<span style="color: red">*</span></span>
58
+                  </template>
59
+
60
+                  <template slot-scope="scope">
61
+                    <el-form-item style="padding-top: 15px">
62
+                      <el-input placeholder="请输入物品类型" v-model="scope.row.good_type_id"
63
+                                :value="typeName(scope.row.good_type_id)"
64
+                                @focus="showDialog(scope.$index, scope.row)"></el-input>
65
+                    </el-form-item>
66
+                  </template>
67
+                </el-table-column>
68
+                <el-table-column min-width="35" align="center">
69
+                  <template slot="header" slot-scope="scope">
70
+                    <span>规格名称<span style="color: red">*</span></span>
71
+                  </template>
72
+                  <template slot-scope="scope">
73
+
74
+                    <el-form-item style="padding-top: 15px">
75
+                      <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
76
+                                :value="specificationName(scope.row.good_id)"
77
+                                @focus="showDialog(scope.$index, scope.row)"></el-input>
78
+                    </el-form-item>
79
+
80
+                  </template>
81
+                </el-table-column>
82
+
83
+
84
+                <el-table-column min-width="23" align="center">
85
+                  <template slot="header" slot-scope="scope">
86
+                    <span>单价<span style="color: red">*</span></span>
87
+                  </template>
88
+                  <template slot-scope="scope">
89
+                    <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
90
+                    <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price'
91
+                                  style="padding-top: 17px">
92
+                      <el-input type="number" v-model="scope.row.price"></el-input>
93
+                    </el-form-item>
94
+
95
+
96
+                  </template>
97
+                </el-table-column>
98
+
99
+                <el-table-column min-width="23" align="center">
100
+                  <template slot="header" slot-scope="scope">
101
+                    <span>入库数量<span style="color: red">*</span></span>
102
+                  </template>
103
+                  <template slot-scope="scope">
104
+                    <!--{{scope.row.warehousing_count}}-->
105
+                    <!--<el-input type="number" v-model="scope.row.warehousing_count"   @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
106
+
107
+                    <el-form-item :prop="'recordData.' + scope.$index + '.warehousing_count'"
108
+                                  :rules='tableRules.warehousing_count' style="padding-top: 17px">
109
+                      <el-input type="number" v-model="scope.row.warehousing_count"></el-input>
110
+                    </el-form-item>
111
+                  </template>
112
+                </el-table-column>
113
+
114
+                <el-table-column label="总价" min-width="20" align="center">
115
+                  <template slot-scope="scope">
116
+                    {{calculate(scope.row.price*scope.row.warehousing_count)}}
117
+                  </template>
118
+                </el-table-column>
119
+
120
+                <el-table-column align="center" min-width="25">
121
+                  <template slot="header" slot-scope="scope">
122
+                    <span>批号<span style="color: red">*</span></span>
123
+                  </template>
124
+                  <template slot-scope="scope">
125
+                    <!--<el-input  v-model="scope.row.numbers"></el-input>-->
126
+
127
+                    <el-form-item :prop="'recordData.' + scope.$index + '.number'" :rules='tableRules.number'
128
+                                  style="padding-top: 17px">
129
+                      <el-input v-model="scope.row.number"></el-input>
130
+                    </el-form-item>
131
+
132
+                  </template>
133
+                </el-table-column>
134
+                <el-table-column label="生产日期" min-width="43" align="center">
135
+                  <template slot-scope="scope">
136
+                    <!--{{scope.row.product_date | parseTime("{y}-{m}-{d}")}}-->
137
+                    <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.product_date"
138
+                                    type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
139
+                                    value-format="yyyy-MM-dd"></el-date-picker>
140
+
141
+                  </template>
142
+                </el-table-column>
143
+                <el-table-column label="有效日期" min-width="43" align="center">
144
+                  <template slot-scope="scope">
145
+                    <!--{{ scope.row.expiry_date | parseTime("{y}-{m}-{d}")}}-->
146
+                    <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.expiry_date"
147
+                                    type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
148
+                                    value-format="yyyy-MM-dd"></el-date-picker>
149
+
150
+                  </template>
151
+                </el-table-column>
152
+                <el-table-column label="备注" min-width="20" align="center">
153
+                  <template slot-scope="scope">
154
+                    <el-input v-model="scope.row.remark"></el-input>
155
+                  </template>
156
+                </el-table-column>
157
+
158
+                <el-table-column label="操作" align="center" min-width="40">
159
+                  <template slot-scope="scope">
160
+                    <el-tooltip class="item" effect="dark" content="新增" placement="top">
161
+
162
+                    <el-button
163
+                      size="mini"
164
+                      type="primary"
165
+                      icon="el-icon-circle-plus-outline"
166
+                      @click="handleEdit(scope.$index, scope.row)">
167
+                    </el-button>
168
+                    </el-tooltip>
169
+                    <el-tooltip class="item" effect="dark" content="删除" placement="top">
170
+
171
+                    <el-button
172
+                      size="mini"
173
+                      type="danger"
174
+                      icon="el-icon-remove-outline"
175
+                      @click="handleDelete(scope.$index, scope.row)">
176
+                    </el-button>
177
+                    </el-tooltip>
178
+
179
+                  </template>
180
+                </el-table-column>
181
+
182
+              </el-table>
45 183
             </el-form>
46
-          </div>
47
-        </el-col>
48
-      </el-row>
49 184
 
50
-    </div>
51 185
 
52
-    <el-row>
53
-      <el-col>
54
-        <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
55
-          <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
56
-                    max-height="450"
57
-          >
58
-
59
-            <el-table-column label="操作" align="center" min-width="30">
60
-              <template slot-scope="scope">
61
-                <el-button
62
-                  size="mini"
63
-                  @click="handleEdit(scope.$index, scope.row)">+
64
-                </el-button>
65
-                <el-button
66
-                  size="mini"
67
-                  type="danger"
68
-                  @click="handleDelete(scope.$index, scope.row)">-
69
-                </el-button>
70
-              </template>
71
-            </el-table-column>
72
-
73
-            <el-table-column min-width="35" align="center">
74
-
75
-              <template slot="header" slot-scope="scope">
76
-                <span>物品类型<span style="color: red">*</span></span>
77
-              </template>
78
-
79
-              <template slot-scope="scope">
80
-                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id == 0" style="color:#c5c8cf">请输入类型</span>-->
81
-                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
82
-
83
-                <el-form-item style="padding-top: 15px">
84
-                  <el-input placeholder="请输入物品类型" v-model="scope.row.good_type_id"
85
-                            :value="typeName(scope.row.good_type_id)"
86
-                            @focus="showDialog(scope.$index, scope.row)"></el-input>
87
-                </el-form-item>
88
-
89
-              </template>
90
-            </el-table-column>
91
-            <el-table-column min-width="35" align="center">
92
-              <template slot="header" slot-scope="scope">
93
-                <span>规格名称<span style="color: red">*</span></span>
94
-              </template>
95
-              <template slot-scope="scope">
96
-
97
-                <el-form-item style="padding-top: 15px">
98
-                  <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
99
-                            :value="specificationName(scope.row.good_id)"
100
-                            @focus="showDialog(scope.$index, scope.row)"></el-input>
101
-                </el-form-item>
102
-
103
-              </template>
104
-            </el-table-column>
105
-
106
-
107
-            <el-table-column min-width="23" align="center">
108
-              <template slot="header" slot-scope="scope">
109
-                <span>单价<span style="color: red">*</span></span>
110
-              </template>
111
-              <template slot-scope="scope">
112
-                <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
113
-                <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price'
114
-                              style="padding-top: 17px">
115
-                  <el-input type="number" v-model="scope.row.price"></el-input>
116
-                </el-form-item>
117
-
118
-
119
-              </template>
120
-            </el-table-column>
121
-
122
-            <el-table-column min-width="23" align="center">
123
-              <template slot="header" slot-scope="scope">
124
-                <span>入库数量<span style="color: red">*</span></span>
125
-              </template>
126
-              <template slot-scope="scope">
127
-                <!--{{scope.row.warehousing_count}}-->
128
-                <!--<el-input type="number" v-model="scope.row.warehousing_count"   @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
129
-
130
-                <el-form-item :prop="'recordData.' + scope.$index + '.warehousing_count'"
131
-                              :rules='tableRules.warehousing_count' style="padding-top: 17px">
132
-                  <el-input type="number" v-model="scope.row.warehousing_count"></el-input>
133
-                </el-form-item>
134
-              </template>
135
-            </el-table-column>
136
-
137
-            <el-table-column label="总价" min-width="20" align="center">
138
-              <template slot-scope="scope">
139
-                {{calculate(scope.row.price*scope.row.warehousing_count)}}
140
-              </template>
141
-            </el-table-column>
142
-
143
-            <el-table-column align="center" min-width="25">
144
-              <template slot="header" slot-scope="scope">
145
-                <span>批号<span style="color: red">*</span></span>
146
-              </template>
147
-              <template slot-scope="scope">
148
-                <!--<el-input  v-model="scope.row.numbers"></el-input>-->
149
-
150
-                <el-form-item :prop="'recordData.' + scope.$index + '.number'" :rules='tableRules.number'
151
-                              style="padding-top: 17px">
152
-                  <el-input v-model="scope.row.number"></el-input>
153
-                </el-form-item>
154
-
155
-              </template>
156
-            </el-table-column>
157
-            <el-table-column label="生产日期" min-width="40" align="center">
158
-              <template slot-scope="scope">
159
-                <!--{{scope.row.product_date | parseTime("{y}-{m}-{d}")}}-->
160
-                <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.product_date"
161
-                                type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
162
-                                value-format="yyyy-MM-dd"></el-date-picker>
163
-
164
-              </template>
165
-            </el-table-column>
166
-            <el-table-column label="有效日期" min-width="40" align="center">
167
-              <template slot-scope="scope">
168
-                <!--{{ scope.row.expiry_date | parseTime("{y}-{m}-{d}")}}-->
169
-                <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.expiry_date"
170
-                                type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
171
-                                value-format="yyyy-MM-dd"></el-date-picker>
172
-
173
-              </template>
174
-            </el-table-column>
175
-            <el-table-column label="备注" min-width="20" align="center">
176
-              <template slot-scope="scope">
177
-                <el-input v-model="scope.row.remark"></el-input>
178
-              </template>
179
-            </el-table-column>
180
-          </el-table>
181
-        </el-form>
182
-      </el-col>
183
-
184
-
185
-      <span class="dialog-footer" style="margin-top: 20px;float:right">
186
-        <el-button @click="back()">取 消</el-button>
187
-        <el-button type="primary" @click="submit()">确 定</el-button>
188
-      </span>
189
-
190
-    </el-row>
186
+    </div>
191 187
   </div>
188
+
192 189
 </template>
193 190
 
194 191
 <script>
@@ -205,9 +202,10 @@
205 202
     modifyWarehouseInfo,
206 203
     postWarehouse
207 204
   } from '@/api/stock'
205
+  import BreadCrumb from '../components/bread-crumb'
208 206
 
209 207
   export default {
210
-    components: { stockInDialog },
208
+    components: { BreadCrumb, stockInDialog },
211 209
     name: 'stockIn',
212 210
 
213 211
     data() {
@@ -220,6 +218,11 @@
220 218
       }
221 219
 
222 220
       return {
221
+        crumbs: [
222
+          { path: false, name: '库存管理' },
223
+          { path: '/stock/in', name: '入库单' },
224
+          { path: '/stock/in/add', name: '新增入库单' }
225
+        ],
223 226
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
224 227
         warehousing_time: '',
225 228
         adminUserOptions: null,
@@ -252,7 +255,7 @@
252 255
           ]
253 256
 
254 257
         },
255
-        type: 1,
258
+        type: this.$route.query.type,
256 259
         total: '',
257 260
         product_date: '',
258 261
         expiry_date: '',
@@ -346,8 +349,8 @@
346 349
               tempForm['good_type_id'] = val.goodTypeId
347 350
               tempForm['good_id'] = val.selectedGoodInfo[i].id
348 351
               tempForm['number'] = ''
349
-              tempForm['product_date'] = 0
350
-              tempForm['expiry_date'] = 0
352
+              tempForm['product_date'] = ''
353
+              tempForm['expiry_date'] = ''
351 354
               tempForm['warehousing_count'] = ''
352 355
               tempForm['price'] = ''
353 356
               tempForm['remark'] = ''
@@ -396,7 +399,7 @@
396 399
           }
397 400
         })
398 401
       }, typeName: function(good_type_id) {
399
-        let name = '请输入物品类型'
402
+        let name = ''
400 403
         for (let i = 0; i < this.goodType.length; i++) {
401 404
           if (this.goodType[i].id == good_type_id) {
402 405
             name = this.goodType[i].type_name
@@ -594,15 +597,6 @@
594 597
 
595 598
   }
596 599
 
597
-  .title {
598
-    background: #409eff;
599
-    height: 44px;
600
-    line-height: 44px;
601
-    padding: 0 0 0 10px;
602
-    color: #fff;
603
-    margin: 0 0 10px 0;
604
-  }
605
-
606 600
   .edit_separater {
607 601
     border-top: 1px solid rgb(233, 233, 233);
608 602
     margin-top: 15px;
@@ -621,3 +615,4 @@
621 615
   }
622 616
 
623 617
 </style>
618
+s

+ 23 - 20
src/xt_pages/stock/stockInOrderDetail.vue Bestand weergeven

@@ -1,29 +1,30 @@
1 1
 <template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+    </div>
6
+  <div class="app-container">
5 7
     <div class="filter-container">
6
-      <span style="font-size: 20px">耗材入库单详情</span>
8
+      <span style="font-size: 18px">耗材入库单详情</span>
7 9
       <el-row style="float:right;">
8
-        <span>{{WarehouseInfo.warehouse.warehousing_order}}</span>
10
+        <span>入库单号: {{WarehouseInfo.warehouse.warehousing_order}}</span>
9 11
       </el-row>
10 12
     </div>
11 13
 
12
-
13
-
14
-    <div class="filter-container">
15
-      <span>单据日期:  {{WarehouseInfo.warehouse.warehousing_time | parseTime('{y}-{m}-{d}')}} </span>
16
-      <span>厂商 {{getManufactuerName(WarehouseInfo.warehouse.manufacturer)}}</span>
17
-      <span>经销商 {{getDealerName(WarehouseInfo.warehouse.dealer)}}</span>
14
+    <div class="cell">
15
+      <span style="width: 300px">单据日期:  {{WarehouseInfo.warehouse.warehousing_time | parseTime('{y}-{m}-{d}')}}</span>
16
+      <span style="width: 300px">厂商: {{getManufactuerName(WarehouseInfo.warehouse.manufacturer)}}</span>
17
+      <span style="width: 300px">经销商: {{getDealerName(WarehouseInfo.warehouse.dealer)}}</span>
18 18
     </div>
19 19
 
20
-    <div class="filter-container" style="margin-top: 10px">
20
+    <div class="cell" style="margin-top: 10px">
21 21
       <el-button size="small" icon="el-icon-edit" @click="editRecord">编辑</el-button>
22 22
       <el-button size="small" icon="el-icon-delete" @click="deleteRecord">删除</el-button>
23 23
     </div>
24 24
 
25 25
     <el-row :gutter="12" style="margin-top: 10px">
26 26
       <el-table :data="WarehouseInfo.warehouseInfoDate" :class="signAndWeighBoxPatients" style="width: 100%" border
27
+                :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
27 28
       >
28 29
         <el-table-column min-width="35" align="center">
29 30
           <template slot="header" slot-scope="scope">
@@ -101,14 +102,18 @@
101 102
       </el-table>
102 103
     </el-row>
103 104
   </div>
105
+  </div>
106
+
104 107
 </template>
105 108
 
106 109
 <script>
107 110
   import { uParseTime } from '@/utils/tools'
108 111
   import { GetAllConfig, getWarehouseInfoList, deleteWarehouseInfo } from '@/api/stock'
112
+  import BreadCrumb from '../components/bread-crumb'
109 113
 
110 114
   export default {
111 115
     name: 'stockInOrderDetail',
116
+    components: { BreadCrumb },
112 117
     created() {
113 118
       const order_id = this.$route.query.id
114 119
       this.GetConfigInfo()
@@ -116,6 +121,11 @@
116 121
     },
117 122
     data() {
118 123
       return {
124
+        crumbs: [
125
+          { path: false, name: '库存管理' },
126
+          { path: '/stock/in', name: '入库单' },
127
+          { path: '/stock/in/detail', name: '入库单详情' }
128
+        ],
119 129
         isEdit: 0,
120 130
         checked: false,
121 131
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
@@ -247,14 +257,7 @@
247 257
 
248 258
   }
249 259
 
250
-  .title {
251
-    background: #409eff;
252
-    height: 44px;
253
-    line-height: 44px;
254
-    padding: 0 0 0 10px;
255
-    color: #fff;
256
-    margin: 0 0 10px 0;
257
-  }
260
+
258 261
 
259 262
   .edit_separater {
260 263
     border-top: 1px solid rgb(233, 233, 233);

+ 56 - 54
src/xt_pages/stock/stockInOrderEdit.vue Bestand weergeven

@@ -1,45 +1,33 @@
1 1
 <template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <div style="float:right;">
6
+        <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
7
+        <el-button size="small"  type="primary" @click="submit()" class="filter-item" >确 定</el-button>
8
+      </div>
9
+    </div>
2 10
 
3
-  <div class="app-container sign-and-weigh-box">
11
+  <div class="app-container">
4 12
 
5
-    <sales-return-dialog :propForm="propForm"
13
+    <stock-in-dialog :propForm="propForm"
6 14
                      :visibility="isVisibility"
7 15
                      v-on:dialog-comfirm="comfirm"
8
-                     v-on:dialog-cancle="cancle"></sales-return-dialog>
9
-
10
-    <div class="filter-container">
11
-
12
-      <el-row>
13
-        <el-col :span="8"><div>
14
-          <span>入库时间:</span>
15
-          <el-date-picker v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16
-                          type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17
-                          value-format="yyyy-MM-dd"></el-date-picker>
18
-        </div></el-col>
19
-      </el-row>
16
+                     v-on:dialog-cancle="cancle"></stock-in-dialog>
17
+
18
+
19
+
20
+    <div class="cell">
21
+      <label class="title"><span class="name">入库时间</span> : </label>
22
+      <el-date-picker v-model="warehousing_time"  prefix-icon="el-icon-date"  :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right"  format="yyyy-MM-dd" value-format="yyyy-MM-dd" > </el-date-picker>
20 23
     </div>
21 24
 
22
-    <el-row>
23
-      <el-col>
25
+
24 26
         <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
25 27
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
26
-                    max-height="450"
28
+                    max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
27 29
           >
28 30
 
29
-            <el-table-column label="操作" align="center" min-width="30">
30
-              <template slot-scope="scope">
31
-                <el-button
32
-                  size="mini"
33
-                  @click="handleEdit(scope.$index, scope.row)">+
34
-                </el-button>
35
-                <el-button
36
-                  size="mini"
37
-                  type="danger"
38
-                  @click="handleDelete(scope.$index, scope.row)">-
39
-                </el-button>
40
-              </template>
41
-            </el-table-column>
42
-
43 31
             <el-table-column min-width="35" align="center">
44 32
 
45 33
               <template slot="header" slot-scope="scope">
@@ -142,18 +130,37 @@
142 130
                 <el-input  v-model="scope.row.remark"></el-input>
143 131
               </template>
144 132
             </el-table-column>
145
-          </el-table>
146
-        </el-form>
147
-      </el-col>
148 133
 
134
+            <el-table-column label="操作" align="center" min-width="40">
135
+              <template slot-scope="scope">
136
+                <el-tooltip class="item" effect="dark" content="新增" placement="top">
137
+
138
+                  <el-button
139
+                    size="mini"
140
+                    type="primary"
141
+                    icon="el-icon-circle-plus-outline"
142
+                    @click="handleEdit(scope.$index, scope.row)">
143
+                  </el-button>
144
+                </el-tooltip>
145
+                <el-tooltip class="item" effect="dark" content="删除" placement="top">
146
+
147
+                  <el-button
148
+                    size="mini"
149
+                    type="danger"
150
+                    icon="el-icon-remove-outline"
151
+                    @click="handleDelete(scope.$index, scope.row)">
152
+                  </el-button>
153
+                </el-tooltip>
154
+
155
+              </template>
156
+            </el-table-column>
157
+          </el-table>
149 158
 
150
-      <span  class="dialog-footer" style="margin-top: 20px;float:right">
151
-        <el-button @click="back()">取 消</el-button>
152
-        <el-button type="primary" @click="submit()">确 定</el-button>
153
-      </span>
154 159
 
155
-    </el-row>
160
+        </el-form>
156 161
   </div>
162
+  </div>
163
+
157 164
 </template>
158 165
 
159 166
 <script>
@@ -170,10 +177,10 @@ import {
170 177
   DeleteWarehouseInfoItem,
171 178
   EditWarehouse
172 179
   } from '@/api/stock'
173
-  import SalesReturnDialog from './Dialog/salesReturnDialog'
180
+  import BreadCrumb from '../components/bread-crumb'
174 181
 
175 182
 export default {
176
-    components: { SalesReturnDialog, stockInDialog },
183
+    components: { BreadCrumb, stockInDialog },
177 184
     name: 'stockIn',
178 185
 
179 186
     data() {
@@ -186,6 +193,11 @@ export default {
186 193
       }
187 194
 
188 195
       return {
196
+        crumbs: [
197
+          { path: false, name: '库存管理' },
198
+          { path: '/stock/in', name: '入库单' },
199
+          { path: '/stock/in/detail', name: '编辑入库单' }
200
+        ],
189 201
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
190 202
         warehousing_time: '',
191 203
         adminUserOptions: null,
@@ -273,7 +285,7 @@ export default {
273 285
         this.currentIndex = -1
274 286
       }, cancle: function() {
275 287
         this.isVisibility = false
276
-      },  GetConfigInfo: function() {
288
+      }, GetConfigInfo: function() {
277 289
         GetAllConfig().then(response => {
278 290
           if (response.data.state == 0) {
279 291
             this.$message.error(response.data.msg)
@@ -285,9 +297,8 @@ export default {
285 297
             this.goodInfo = response.data.data.goodInfo
286 298
           }
287 299
         })
288
-
289 300
       }, typeName: function(good_type_id) {
290
-        let name = '请输入物品类型'
301
+        let name = ''
291 302
         for (let i = 0; i < this.goodType.length; i++) {
292 303
           if (this.goodType[i].id == good_type_id) {
293 304
             name = this.goodType[i].type_name
@@ -350,7 +361,7 @@ export default {
350 361
           return ''
351 362
         }
352 363
         return Math.round(parseFloat(val) * 100) / 100
353
-      },  getTime(val, temp) {
364
+      }, getTime(val, temp) {
354 365
         if (val != 0) {
355 366
           return uParseTime(val, temp)
356 367
         } else {
@@ -472,15 +483,6 @@ export default {
472 483
   }
473 484
   }
474 485
 
475
-  .title {
476
-    background: #409eff;
477
-    height: 44px;
478
-    line-height: 44px;
479
-    padding: 0 0 0 10px;
480
-    color: #fff;
481
-    margin: 0 0 10px 0;
482
-   border-radius: 4px 4px 0 0;
483
-  }
484 486
 
485 487
   .edit_separater {
486 488
     border-top: 1px solid rgb(233, 233, 233);

+ 0 - 421
src/xt_pages/stock/stockOut.vue Bestand weergeven

@@ -1,421 +0,0 @@
1
-<template>
2
-<div class="main-contain">
3
-  <div class="position">
4
-    <bread-crumb></bread-crumb>
5
-     <el-row style="float:right;">
6
-        <el-button size="small" icon="el-icon-sold-out"  @click="handleWarehouseOutReturn">出库退库</el-button>        
7
-        <el-button size="small" icon="el-icon-setting" type="primary"  @click="handleWarehouseOut">出库</el-button>
8
-        <el-button size="small" icon="el-icon-edit-outline" type="danger" @click="handleWarehouseOutRecord">出库记录</el-button>        
9
-        <el-button size="small" icon="el-icon-document" type="warning" @click="handleWarehouseOutReturnRecord">退库记录</el-button>
10
-      </el-row>
11
-  </div>
12
-  <div class="app-container sign-and-weigh-box">
13
-    <div class="cell">
14
-      <label for="" class="title"><span class="name">出库时间:</span></label>
15
-      <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17
-                      value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
18
-      <span class="">-</span>
19
-      <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
-                      value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
22
-    </div>
23
-
24
-
25
-    <el-row :gutter="12">
26
-      <el-col :span="8">
27
-        <div class="titleTop">出库记录
28
-        </div>
29
-        <div style="margin-bottom: 10px;">
30
-        </div>
31
-        <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="WarehouseOut.warehouseOutDate" :class="signAndWeighBoxPatients" style="width: 100%" border
32
-                  highlight-current-row
33
-                  @row-click="onRowClick"
34
-                  :row-class-name="tableRowClassName"
35
-                  highlight-current-row
36
-                  v-loading="WarehouseOut.loading"
37
-        >
38
-          <el-table-column label="出库单号" min-width="40" align="center">
39
-            <template slot-scope="scope">
40
-              {{scope.row.warehouse_out_order_number}}
41
-            </template>
42
-          </el-table-column>
43
-          <el-table-column label="出库时间" min-width="40" align="center">
44
-            <template slot-scope="scope">
45
-              {{ scope.row.warehouse_out_time | parseTime("{y}-{m}-{d}")}}
46
-
47
-            </template>
48
-          </el-table-column>
49
-          <el-table-column label="操作人" align="center" min-width="30">
50
-            <template slot-scope="scope">
51
-              {{getXuserName(scope.row.creater)}}
52
-            </template>
53
-          </el-table-column>
54
-
55
-        </el-table>
56
-      </el-col>
57
-
58
-      <el-col :span="16">
59
-        <div class="titleTop">物品详细信息
60
-        </div>
61
-        <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="WarehouseOutInfo.warehouseOutInfoDate" :class="signAndWeighBoxPatients" style="width: 100%" border
62
-                  v-loading="WarehouseOutInfo.loading"
63
-                  @selection-change="handleSelectionChange"
64
-
65
-        >
66
-          <el-table-column
67
-            type="selection"
68
-            width="55">
69
-          </el-table-column>
70
-          <el-table-column label="规格名称" min-width="30" align="center">
71
-            <template slot-scope="scope">
72
-              {{getSpecificationName(scope.row.good_id)}}
73
-            </template>
74
-          </el-table-column>
75
-          <el-table-column label="物品类型" min-width="30" align="center">
76
-            <template slot-scope="scope">
77
-              {{getTypeName(scope.row.good_type_id)}}
78
-
79
-            </template>
80
-          </el-table-column>
81
-
82
-
83
-
84
-          <el-table-column label="出库数量" min-width="30" align="center">
85
-            <template slot-scope="scope">
86
-
87
-              <span :class="scope.row.is_cancel == 1 ? 'count':''">{{scope.row.count}}</span>
88
-
89
-            </template>
90
-          </el-table-column>
91
-          <el-table-column label="出库单价" min-width="30" align="center">
92
-            <template slot-scope="scope">
93
-              {{scope.row.price}}
94
-
95
-            </template>
96
-          </el-table-column>
97
-          <el-table-column label="出库总价" min-width="30" align="center">
98
-            <template slot-scope="scope">
99
-
100
-              {{calculate(scope.row.price * scope.row.count) }}
101
-
102
-            </template>
103
-          </el-table-column>
104
-        </el-table>
105
-
106
-      </el-col>
107
-    </el-row>
108
-    
109
-    <el-pagination
110
-          @size-change="handleSizeChange"
111
-          @current-change="handleCurrentChange"
112
-          :page-sizes="[7]"
113
-          :page-size="7"
114
-          background
115
-          align="right"
116
-          style="margin-top:20px;"
117
-          layout="total, sizes, prev, pager, next, jumper"
118
-          :total="total">
119
-        </el-pagination>
120
-
121
-  </div>
122
-  </div>
123
-  
124
-</template>
125
-
126
-<script>
127
-  import {uParseTime} from "@/utils/tools";
128
-  import { fetchAllDoctorAndNurse,fetchAllAdminUsers } from "@/api/doctor";
129
-  import {
130
-    getWarehouseOutList,
131
-    getWarehouseOutInfoList,
132
-    GetAllGoodInfo,
133
-    GetAllGoodType,
134
-  } from "@/api/stock";
135
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
136
-
137
-  export default {
138
-    name: "stockIn",
139
-    created(){
140
-      var year = new Date().getFullYear();
141
-      var month = new Date().getMonth() + 1;
142
-      var day = new Date().getDate();
143
-      if (parseInt(month) < 10) {
144
-        month = "0" + month;
145
-      }
146
-      if (parseInt(day) < 10) {
147
-        day = "0" + day;
148
-      }
149
-      let endTime = year + '-' + month + '-' + day;
150
-      this.end_time = endTime
151
-
152
-
153
-      var year = new Date().getFullYear();
154
-      var month = new Date().getMonth();
155
-      var day = new Date().getDate();
156
-      if (parseInt(month) < 10) {
157
-        month = "0" + month;
158
-      }
159
-      if (parseInt(day) < 10) {
160
-        day = "0" + day;
161
-      }
162
-      let startTime = year + '-' + month + '-' + day;
163
-      this.start_time = startTime
164
-
165
-      this.GetWarehouseOut()
166
-      this.GetAllGoodInfo()
167
-      this.GetAllGoodType()
168
-      this.fetchAllAdminUsers()
169
-
170
-    },
171
-    components:{
172
-      BreadCrumb
173
-    },
174
-    data() {
175
-      return {
176
-        page: 1,
177
-        limit: 7,
178
-
179
-        total: 0,
180
-        pageTotal: 0,
181
-        pageSelect: 0,
182
-        adminUserOptions:[],
183
-        multipleSelection:[],
184
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
185
-        start_time: '',
186
-        end_time: '',
187
-        goodType:[],
188
-        goodInfo:[],
189
-        WarehouseOut: {
190
-          loading: false,
191
-          warehouseOutDate: [],
192
-          tableCurrentIndex:''
193
-        },
194
-
195
-        WarehouseOutInfo: {
196
-          loading: false,
197
-          warehouseOutInfoDate: [],
198
-        }
199
-      };
200
-    },
201
-    methods: {
202
-      GetWarehouseOut:function () {
203
-        // this.Warehouse.loading = true
204
-        let Params = {
205
-          page: this.page,
206
-          limit: this.limit,
207
-          start_time: this.start_time,
208
-          end_time: this.end_time
209
-        }
210
-        this.WarehouseOut.warehouseOutDate = []
211
-        this.WarehouseOutInfo.warehouseOutInfoDate = []
212
-
213
-        getWarehouseOutList(Params).then(response => {
214
-          if (response.data.state == 0) {
215
-
216
-            this.WarehouseOut.loading = false
217
-            this.$message.error(response.data.msg);
218
-            return false;
219
-          } else {
220
-            this.total = response.data.data.total
221
-            this.WarehouseOut.loading = false
222
-            for (let i = 0; i < response.data.data.list.length; i++) {
223
-              this.WarehouseOut.warehouseOutDate.push(response.data.data.list[i])
224
-            }
225
-          }
226
-        });
227
-
228
-      },tableRowClassName({row, rowIndex}) {
229
-        //把每一行的索引放进row
230
-        row.index = rowIndex;
231
-      },
232
-      onRowClick(row, event, column) {
233
-        this.WarehouseOutInfo.warehouseOutInfoDate = []
234
-        this.WarehouseOut.tableCurrentIndex = row.index;
235
-        let params = {
236
-          'id': row.id
237
-        }
238
-        this.WarehouseOutInfo.loading = true
239
-        getWarehouseOutInfoList(params).then(response => {
240
-          if (response.data.state == 0) {
241
-            this.WarehouseOutInfo.loading = false
242
-            this.$message.error(response.data.msg);
243
-            return false;
244
-          } else {
245
-            this.WarehouseOutInfo.loading = false
246
-            for (let i = 0; i < response.data.data.info.length; i++) {
247
-              this.WarehouseOutInfo.warehouseOutInfoDate.push(response.data.data.info[i])
248
-            }
249
-          }
250
-        });
251
-
252
-      }, getXuserName(id){
253
-        if (id<=0) {
254
-          return "";
255
-        }
256
-        var name = "";
257
-        console.log(this.adminUserOptions)
258
-        if (this.adminUserOptions==null || typeof(this.adminUserOptions.length) == "undefined") {
259
-          return name;
260
-        }
261
-        var leng = this.adminUserOptions.length;
262
-        if (leng==0) {
263
-          return name;
264
-        }
265
-        for (let index = 0; index < leng; index++) {
266
-          if (this.adminUserOptions[index].id == id) {
267
-            name = this.adminUserOptions[index].name;
268
-            break;
269
-          }
270
-        }
271
-        return name;
272
-      },fetchAllDoctorAndNurse() {
273
-        fetchAllDoctorAndNurse().then(response => {
274
-          if (response.data.state == 1) {
275
-            this.doctorOptions = response.data.data.doctors;
276
-          }
277
-        });
278
-      },
279
-      fetchAllAdminUsers() {
280
-        fetchAllAdminUsers().then(response => {
281
-          if (response.data.state == 1) {
282
-            this.adminUserOptions = response.data.data.users;
283
-
284
-          }
285
-        });
286
-      },getSpecificationName:function (id) {
287
-        let name = ''
288
-        for (let i = 0; i< this.goodInfo.length; i++){
289
-          if( this.goodInfo[i].id == id){
290
-            name = this.goodInfo[i].specification_name
291
-          }
292
-
293
-        }
294
-
295
-        return name
296
-
297
-      },getTypeName:function (id) {
298
-        let name = ''
299
-        for (let i = 0; i< this.goodType.length; i++){
300
-          if( this.goodType[i].id == id){
301
-            name = this.goodType[i].type_name
302
-          }
303
-        }
304
-        return name
305
-      },GetAllGoodType:function () {
306
-        GetAllGoodType().then(response => {
307
-          if (response.data.state == 0) {
308
-            this.$message.error(response.data.msg);
309
-            return false;
310
-          } else {
311
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
312
-              this.goodType.push(response.data.data.goodType[i])
313
-            }
314
-          }
315
-        });
316
-
317
-
318
-      },GetAllGoodInfo:function () {
319
-        GetAllGoodInfo().then(response => {
320
-          if (response.data.state == 0) {
321
-            this.$message.error(response.data.msg);
322
-            return false;
323
-          } else {
324
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
325
-              this.goodInfo.push(response.data.data.goodInfo[i])
326
-            }
327
-          }
328
-        });
329
-
330
-
331
-      },handleWarehouseOut:function () {
332
-        sessionStorage.removeItem("warehousing_out_orders")
333
-        this.$router.push({name:'addStockOut'});
334
-
335
-      },handleWarehouseOutReturn:function () {
336
-
337
-        if(this.multipleSelection.length <= 0){
338
-          this.$message.error('请选择退库物品');
339
-          return
340
-        }
341
-
342
-        let ids = []
343
-        for (let i = 0; i < this.multipleSelection.length; i++){
344
-          ids.push(this.multipleSelection[i].id)
345
-
346
-        }
347
-        this.$router.push({name:'cancelStock',query:{id:ids.join("&")}});
348
-
349
-
350
-      },handleWarehouseOutReturnRecord:function () {
351
-
352
-        this.$router.push({name:'cancelStockRecord'});
353
-
354
-      },handleWarehouseOutRecord:function () {
355
-        this.$router.push({name:'stockOutRecord'});
356
-
357
-      },handleSelectionChange:function (val) {
358
-        this.multipleSelection = val
359
-      },calculate:function (val) {
360
-        return Math.round(parseFloat(val)*100)/100
361
-      }, startTimeChange(val) {
362
-        this.GetWarehouseOut();
363
-      }, endTimeChange(val) {
364
-        this.GetWarehouseOut();
365
-      }, handleSizeChange(val) {
366
-        this.limit = val;
367
-        this.GetWarehouseOut();
368
-      }, handleCurrentChange(val) {
369
-        this.page = val;
370
-        this.GetWarehouseOut();
371
-      },
372
-    },
373
-  };
374
-</script>
375
-
376
-<style rel="stylesheet/css" lang="scss" scoped>
377
-  .information {
378
-    border: 1px #dcdfe6 solid;
379
-    padding: 30px 20px 30px 20px;
380
-
381
-    .border {
382
-      border-bottom: 1px #dcdfe6 solid;
383
-      margin: 0px 0 20px 0;
384
-    }
385
-  }
386
-
387
-  .titleTop {
388
-    background: #409eff;
389
-    height: 44px;
390
-    line-height: 44px;
391
-    padding: 0 0 0 10px;
392
-    color: #fff;
393
-    margin: 0 0 10px 0;
394
-    // border-radius: 4px 4px 0 0;
395
-        font-size: 14px;
396
-  }
397
-
398
-  .edit_separater {
399
-    border-top: 1px solid rgb(233, 233, 233);
400
-    margin-top: 15px;
401
-    margin-bottom: 15px;
402
-  }
403
-
404
-</style>
405
-
406
-<style>
407
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
408
-    font-size: 12px;
409
-  }
410
-
411
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
412
-    background: #6fb5fa;
413
-  }
414
-
415
-  .count{
416
-    color: #bd2c00;
417
-
418
-  }
419
-
420
-
421
-</style>

+ 144 - 78
src/xt_pages/stock/stockOutOrder.vue Bestand weergeven

@@ -1,47 +1,42 @@
1 1
 <template>
2 2
 
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-
6
-    <div class="filter-container">
7
-
8
-
9
-      <el-row style="float:right;">
10
-        <el-button @click="AddNewOrder" type="primary">新增</el-button>
11
-      </el-row>
12
-    </div>
13
-
14
-    <div class="filter-container" style="margin-top:20px">
15
-      <el-input style="width: 300px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
16
-      <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
3
+  <div class="main-contain">
4
+    <div class="position">
5
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
6
+      <el-button size="small"  @click="AddNewOrder" class="filter-item" style="float:right;" type="primary" icon="el-icon-circle-plus-outline" >新增</el-button>
17 7
     </div>
8
+    <div class="app-container">
9
+      <div class="cell">
10
+        <el-input style="width: 400px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
11
+        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
12
+      </div>
13
+
14
+
15
+      <div class="cell">
16
+        <label class="title"><span class="name">出库时间</span> : </label>
17
+        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
18
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
19
+                        value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
20
+        <span class="">-</span>
21
+        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
+                        value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
24
+      </div>
25
+
26
+      <div class="cell clearfix">
27
+        <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
28
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
29
+      </div>
18 30
 
19
-    <div class="filter-container">
20
-      <span>入库时间:</span>
21
-      <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
-                      value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
24
-      <span class="">-</span>
25
-      <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
26
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
-                      value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
28
-    </div>
29
-
30
-    <div class="filter-container" style="margin-top: 10px">
31
-      <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
32
-      <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
33
-
34
-    </div>
35
-
36
-    <el-row :gutter="12" style="margin-top: 10px">
37 31
       <el-table
38 32
         :data="warehouseOutDate"
39 33
         :class="signAndWeighBoxPatients"
40 34
         style="width: 100%" border
41 35
         highlight-current-row
42 36
         ref="multipleTable"
43
-        @selection-change="select"
44 37
 
38
+        @selection-change="select"
39
+        :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
45 40
       >
46 41
         <el-table-column
47 42
           type="selection"
@@ -65,8 +60,6 @@
65 60
             {{getXuserName(scope.row.creater)}}
66 61
           </template>
67 62
         </el-table-column>
68
-
69
-
70 63
         <el-table-column label="厂家" align="center">
71 64
           <template slot-scope="scope">
72 65
             {{getManufactuerName(scope.row.manufacturer)}}
@@ -81,12 +74,16 @@
81 74
 
82 75
         <el-table-column label="操作" align="center">
83 76
           <template slot-scope="scope">
77
+            <el-tooltip class="item" effect="dark" content="编辑" placement="top">
78
+
84 79
             <el-button
85 80
               size="mini"
86 81
               type="primary"
87 82
               icon="el-icon-edit"
88 83
               @click="handleEdit(scope.$index, scope.row)">
89 84
             </el-button>
85
+            </el-tooltip>
86
+            <el-tooltip class="item" effect="dark" content="删除" placement="top">
90 87
 
91 88
             <el-button
92 89
               size="mini"
@@ -94,12 +91,11 @@
94 91
               icon="el-icon-delete"
95 92
               @click="handleDelete(scope.$index, scope.row)">
96 93
             </el-button>
94
+            </el-tooltip>
97 95
 
98 96
           </template>
99 97
         </el-table-column>
100
-
101 98
       </el-table>
102
-
103 99
       <el-pagination
104 100
         @size-change="handleSizeChange"
105 101
         @current-change="handleCurrentChange"
@@ -111,21 +107,30 @@
111 107
         :total="total">
112 108
       </el-pagination>
113 109
 
114
-    </el-row>
110
+
111
+    </div>
115 112
   </div>
113
+
114
+
115
+
116
+
117
+
116 118
 </template>
117 119
 
118 120
 <script>
119 121
   import { uParseTime } from '@/utils/tools'
120 122
   import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
123
+
121 124
   import {
122 125
     deleteWarehouseOut,
123 126
     GetAllConfig,
124
-    getWarehouseOutList,
127
+    getWarehouseOutList
125 128
   } from '@/api/stock'
129
+  import BreadCrumb from '../components/bread-crumb'
126 130
 
127 131
   export default {
128 132
     name: 'salesReturnOrder',
133
+    components: { BreadCrumb },
129 134
     created() {
130 135
       var year = new Date().getFullYear()
131 136
       var month = new Date().getMonth() + 1
@@ -156,6 +161,10 @@
156 161
     },
157 162
     data() {
158 163
       return {
164
+        crumbs: [
165
+          { path: false, name: '库存管理' },
166
+          { path: '/stock/out', name: '出库单' }
167
+        ],
159 168
         page: 1,
160 169
         limit: 7,
161 170
         checked: false,
@@ -173,13 +182,13 @@
173 182
         manufacturer: [],
174 183
         selectedTableData: [],
175 184
         dealer: [],
176
-        type:1,
185
+        type: 1
177 186
 
178 187
       }
179 188
     },
180 189
     methods: {
181
-      AddNewOrder:function(){
182
-        this.$router.push({ name: 'stockOutOrderAdd'})
190
+      AddNewOrder: function() {
191
+        this.$router.push({ name: 'stockOutOrderAdd', query: { type: this.type }})
183 192
       },
184 193
       GetWarehouseOut: function() {
185 194
         const Params = {
@@ -187,7 +196,7 @@
187 196
           limit: this.limit,
188 197
           start_time: this.start_time,
189 198
           end_time: this.end_time,
190
-          type: this.type,
199
+          type: this.type
191 200
         }
192 201
         this.warehouseOutDate = []
193 202
         getWarehouseOutList(Params).then(response => {
@@ -270,7 +279,7 @@
270 279
           }
271 280
         }
272 281
       }, handleEdit: function(index, row) {
273
-        this.$router.push({ name: 'stockOutDetail', query: { id: row.id }})
282
+        this.$router.push({ name: 'stockOutDetail', query: { id: row.id, type: this.type }})
274 283
       }, handleDelete: function(index, row) {
275 284
         const ids = []
276 285
         ids.push(row.id)
@@ -361,48 +370,105 @@
361 370
   }
362 371
 </script>
363 372
 
364
-<style rel="stylesheet/css" lang="scss" scoped>
365
-  .information {
373
+<style rel="stylesheet/scss" lang="scss" scoped>
374
+  .app-container {
375
+  // margin: 20px;
376
+    font-size: 15px;
377
+  .filter-container {
378
+    padding-bottom: 5px;
379
+  }
380
+  .search-component {
381
+    width: 500px;
382
+  .searchBox {
383
+    width: 300px;
384
+    height: 36px;
385
+    line-height: 36px;
386
+    padding-left: 15px;
366 387
     border: 1px #dcdfe6 solid;
367
-    padding: 30px 20px 30px 20px;
368
-
369
-  .border {
370
-    border-bottom: 1px #dcdfe6 solid;
371
-    margin: 0px 0 20px 0;
388
+    border-right: none;
389
+    outline: none;
390
+    float: left;
391
+    border-radius: 6px 0 0 6px;
392
+    font-size: 14px;
393
+    color: #333;
394
+    background: #fff;
395
+    box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
372 396
   }
373
-
397
+  .searchBtn {
398
+    background-color: #409eff;
399
+    color: #fff;
400
+    font-size: 15px;
401
+    text-align: center;
402
+    height: 36px;
403
+    line-height: 36px;
404
+    float: left;
405
+    outline: none;
406
+    width: 70px;
407
+    border: none;
408
+    border-radius: 0 6px 6px 0;
409
+    font-family: "Microsoft Yahei";
410
+    cursor: pointer;
374 411
   }
375
-
376
-  .title {
412
+  }
413
+  .cell {
414
+    margin: 0px 0 15px 0;
415
+    -moz-box-sizing: border-box;
416
+    -webkit-box-sizing: border-box;
417
+    -o-box-sizing: border-box;
418
+    -ms-box-sizing: border-box;
419
+    box-sizing: border-box;
420
+    display: -webkit-box;
421
+    display: -ms-flexbox;
422
+  // display: flex;
423
+    -webkit-box-align: flex-start;
424
+    -ms-flex-align: flex-start;
425
+    align-items: flex-start;
426
+    text-align: left;
427
+    justify-content: flex-start;
428
+    color: #333;
429
+
430
+  .time {
431
+    -webkit-box-flex: 1;
432
+    -ms-flex: 1;
433
+    flex: 1;
434
+  ul {
435
+    padding: 0;
436
+    margin: 0;
437
+  li {
438
+    float: left;
439
+    list-style: none;
440
+    cursor: pointer;
441
+    padding: 3px 0;
442
+    width: 70px;
443
+    color: #606266;
444
+    border-radius: 4px;
445
+    margin: 0 10px 0 0;
446
+    color: #409eff;
447
+    border: 1px #409eff solid;
448
+    text-align:center;
449
+  &:hover {
450
+     background: #409eff;
451
+     color: #fff;
452
+   }
453
+  }
454
+  .active {
377 455
     background: #409eff;
378
-    height: 44px;
379
-    line-height: 44px;
380
-    padding: 0 0 0 10px;
381 456
     color: #fff;
382
-    margin: 0 0 10px 0;
383
-
384 457
   }
385
-
386
-  .edit_separater {
387
-    border-top: 1px solid rgb(233, 233, 233);
388
-    margin-top: 15px;
389
-    margin-bottom: 15px;
390 458
   }
391
-
392
-</style>
393
-
394
-<style>
395
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
396
-    font-size: 12px;
397 459
   }
398
-
399
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
400
-    background: #6fb5fa;
401 460
   }
402
-
403
-  .count {
404
-    color: #bd2c00;
405
-
461
+  .amount {
462
+    font-weight: normal;
463
+    padding: 10px 0 0 0;
464
+    color: #606266;
465
+    font-size: 14px;
466
+  span {
467
+    color: #ef2525;
468
+    font-family: "Arial";
469
+    padding: 0 2px;
470
+  }
471
+  }
406 472
   }
407
-
408 473
 </style>
474
+

+ 105 - 107
src/xt_pages/stock/stockOutOrderAdd.vue Bestand weergeven

@@ -1,70 +1,59 @@
1 1
 <template>
2 2
 
3
-  <div class="app-container sign-and-weigh-box">
3
+  <div class="main-contain">
4
+    <div class="position">
5
+    <bread-crumb :crumbs='crumbs'></bread-crumb>
6
+      <div style="float:right;">
7
+        <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
8
+        <el-button size="small"  type="primary" @click="submit()" class="filter-item" >确 定</el-button>
9
+      </div>
10
+  </div>
11
+
12
+  <div class="app-container">
4 13
 
5 14
     <sales-return-dialog :propForm="propForm"
6 15
                          :visibility="isVisibility"
7 16
                          v-on:dialog-comfirm="comfirm"
8 17
                          v-on:dialog-cancle="cancle"></sales-return-dialog>
9 18
 
10
-    <div class="filter-container">
11
-
12
-      <el-row>
13
-        <el-col :span="8"><div>
14
-          <span>退货时间:</span>
19
+    <div class="cell">
20
+        <label class="title"><span class="name">出库时间</span> : </label>
15 21
           <el-date-picker v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16 22
                           type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17 23
                           value-format="yyyy-MM-dd"></el-date-picker>
18
-        </div></el-col>
19
-
20
-
21
-        <el-col :span="8">
22
-          <div>
23
-            <el-form ref="form" :model="form" :rules="ruleForm" label-width="80px">
24
-              <el-form-item label="厂商:" prop="manufacturer">
25
-                <el-select v-model="form.manufacturer" placeholder="请选择厂商">
26
-                  <el-option v-for="(option, index) in manufacturer" :key="index" :label="option.manufacturer_name" :value="option.id"></el-option>
27
-                </el-select>
28
-              </el-form-item>
29
-            </el-form>
30
-          </div>
31
-        </el-col>
32
-        <el-col :span="8">
33
-          <div>
34
-            <el-form ref="form" :model="form" label-width="80px">
35
-              <el-form-item label="经销商:">
36
-                <el-select v-model="form.dealer" placeholder="请选择经销商">
37
-                  <el-option v-for="(option, index) in dealer" :key="index" :label="option.dealer_name" :value="option.id"></el-option>
38
-                </el-select>
39
-              </el-form-item>
40
-            </el-form>
41
-          </div>
42
-        </el-col>
43
-      </el-row>
24
+        </div>
25
+
26
+
27
+    <div class="cell clearfix">
28
+      <label class="title"><span class="name">厂商</span> : </label>
29
+      <el-select  v-model="form.manufacturer" clearable  placeholder="请选择厂商" >
30
+        <el-option
31
+          v-for="(option, index) in manufacturer"
32
+          :key="index"
33
+          :label="option.manufacturer_name"
34
+          :value="option.id">
35
+        </el-option>
36
+      </el-select>
37
+    </div>
44 38
 
39
+    <div class="cell clearfix">
40
+      <label class="title"><span class="name">经销商</span> : </label>
41
+      <el-select  v-model="form.dealer" clearable  placeholder="请选择经销商" >
42
+        <el-option
43
+          v-for="(option, index) in dealer"
44
+          :key="index"
45
+          :label="option.dealer_name"
46
+          :value="option.id">
47
+        </el-option>
48
+      </el-select>
45 49
     </div>
46 50
 
47
-    <el-row>
48
-      <el-col>
51
+
49 52
         <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
50 53
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
51
-                    max-height="450"
54
+                    max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
52 55
           >
53 56
 
54
-            <el-table-column label="操作" align="center" min-width="30">
55
-              <template slot-scope="scope">
56
-                <el-button
57
-                  size="mini"
58
-                  @click="handleEdit(scope.$index, scope.row)">+
59
-                </el-button>
60
-                <el-button
61
-                  size="mini"
62
-                  type="danger"
63
-                  @click="handleDelete(scope.$index, scope.row)">-
64
-                </el-button>
65
-              </template>
66
-            </el-table-column>
67
-
68 57
             <el-table-column min-width="35" align="center">
69 58
 
70 59
               <template slot="header" slot-scope="scope">
@@ -102,7 +91,7 @@
102 91
               <template slot-scope="scope">
103 92
                 <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
104 93
                 <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price' style="padding-top: 17px">
105
-                  <el-input type="number"  v-model="scope.row.price" ></el-input>
94
+                  <el-input placeholder="请输入单价" type="number"  v-model="scope.row.price" ></el-input>
106 95
                 </el-form-item>
107 96
 
108 97
 
@@ -115,7 +104,7 @@
115 104
               </template>
116 105
               <template slot-scope="scope">
117 106
                 <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count' style="padding-top: 17px">
118
-                  <el-input type="number"  v-model="scope.row.count" ></el-input>
107
+                  <el-input placeholder="请输入出库数量" type="number"  v-model="scope.row.count" ></el-input>
119 108
                 </el-form-item>
120 109
               </template>
121 110
             </el-table-column>
@@ -130,40 +119,63 @@
130 119
                 <el-input  v-model="scope.row.remark"></el-input>
131 120
               </template>
132 121
             </el-table-column>
133
-          </el-table>
134
-        </el-form>
135
-      </el-col>
136 122
 
123
+            <el-table-column label="操作" align="center" min-width="20">
124
+              <template slot-scope="scope">
125
+                <el-tooltip class="item" effect="dark" content="新增" placement="top">
126
+
127
+                  <el-button
128
+                    size="mini"
129
+                    type="primary"
130
+                    icon="el-icon-circle-plus-outline"
131
+                    @click="handleEdit(scope.$index, scope.row)">
132
+                  </el-button>
133
+                </el-tooltip>
134
+                <el-tooltip class="item" effect="dark" content="删除" placement="top">
135
+
136
+                  <el-button
137
+                    size="mini"
138
+                    type="danger"
139
+                    icon="el-icon-remove-outline"
140
+                    @click="handleDelete(scope.$index, scope.row)">
141
+                  </el-button>
142
+                </el-tooltip>
137 143
 
138
-      <span  class="dialog-footer" style="margin-top: 20px;float:right">
139
-        <el-button @click="back()">取 消</el-button>
140
-        <el-button type="primary" @click="submit()">确 定</el-button>
141
-      </span>
142
-
143
-    </el-row>
144
+              </template>
145
+            </el-table-column>
146
+          </el-table>
147
+        </el-form>
144 148
   </div>
149
+  </div>
150
+
145 151
 </template>
146 152
 
147 153
 <script>
148 154
   import { uParseTime } from '@/utils/tools'
149 155
   import {
150 156
     getSalesReturnConfig,
151
-    postWarehouseOut,
157
+    postWarehouseOut
152 158
   } from '@/api/stock'
153 159
   import SalesReturnDialog from './Dialog/salesReturnDialog'
160
+  import BreadCrumb from '../components/bread-crumb'
154 161
 
155 162
   export default {
156
-    components: { SalesReturnDialog},
163
+    components: { BreadCrumb, SalesReturnDialog },
157 164
     name: 'salesReturnOrderAdd',
158 165
 
159 166
     data() {
160 167
       return {
161
-        type:1,
168
+        crumbs: [
169
+          { path: false, name: '库存管理' },
170
+          { path: '/stock/out', name: '出库单' },
171
+          { path: '/stock/out/add', name: '新增出库单' }
172
+        ],
173
+        type: this.$route.query.type,
162 174
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
163 175
         warehouse_out_time: '',
164 176
         currentIndex: 0,
165 177
         recordInfo: {
166
-          recordData: [],
178
+          recordData: []
167 179
         },
168 180
         tableRules: {
169 181
           price: [
@@ -171,7 +183,7 @@
171 183
           ],
172 184
           count: [
173 185
             { required: true, message: '数量不能为空', trigge: 'blur' }
174
-          ],
186
+          ]
175 187
         },
176 188
         ruleForm: {
177 189
           manufacturer: [
@@ -184,7 +196,7 @@
184 196
         propForm: {
185 197
           goodType: [],
186 198
           goodInfo: [],
187
-          goodUnit: [],
199
+          goodUnit: []
188 200
         },
189 201
         form: {
190 202
           manufacturer: '',
@@ -221,35 +233,38 @@
221 233
       }, cancle: function() {
222 234
         this.isVisibility = false
223 235
       }, GetConfigInfo: function() {
224
-        getSalesReturnConfig().then(response => {
236
+        const params = {
237
+          type: this.$route.query.type
238
+
239
+        }
240
+        getSalesReturnConfig(params).then(response => {
225 241
           if (response.data.state == 0) {
226 242
             this.$message.error(response.data.msg)
227 243
             return false
228 244
           } else {
229
-            var warehouseList =  response.data.data.warehouseList
230
-            var warehouseInfoList =  response.data.data.warehouseInfoList
231
-            for (let i = 0; i <warehouseList.length; i++ ){
232
-              if(warehouseList[i].Manufacturer.id > 0){
245
+            var warehouseList = response.data.data.warehouseList
246
+            var warehouseInfoList = response.data.data.warehouseInfoList
247
+            for (let i = 0; i < warehouseList.length; i++) {
248
+              if (warehouseList[i].Manufacturer.id > 0) {
233 249
                 this.manufacturer.push(warehouseList[i].Manufacturer)
234 250
               }
235
-              if(warehouseList[i].Dealer.id > 0){
251
+              if (warehouseList[i].Dealer.id > 0) {
236 252
                 this.dealer.push(warehouseList[i].Dealer)
237 253
               }
238 254
             }
239 255
             for (let i = 0; i < warehouseInfoList.length; i++) {
240 256
               this.propForm.goodInfo.push(warehouseInfoList[i].GoodInfo)
241
-
242 257
             }
243 258
             const obj = {}
244 259
             const obj2 = {}
245 260
             const obj4 = {}
246
-            //去重复
247
-            this.manufacturer =  this.manufacturer.reduce((cur, next) => {
261
+            // 去重复
262
+            this.manufacturer = this.manufacturer.reduce((cur, next) => {
248 263
               obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
249 264
               return cur
250 265
             }, [])
251
-            //去重复
252
-            this.dealer =  this.dealer.reduce((cur, next) => {
266
+            // 去重复
267
+            this.dealer = this.dealer.reduce((cur, next) => {
253 268
               obj2[next.id] ? '' : obj2[next.id] = true && cur.push(next)
254 269
               return cur
255 270
             }, [])
@@ -257,8 +272,6 @@
257 272
               obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
258 273
               return cur
259 274
             }, [])
260
-
261
-
262 275
           }
263 276
         })
264 277
       }, typeName: function(good_type_id) {
@@ -285,12 +298,11 @@
285 298
         tempObj['price'] = ''
286 299
         tempObj['remark'] = ''
287 300
 
288
-
289 301
         this.recordInfo.recordData.push(tempObj)
290 302
       }, handleDelete: function(index, row) {
291 303
         this.recordInfo.recordData.splice(index, 1)
292 304
       }, calculate: function(val) {
293
-        if(isNaN(val)){
305
+        if (isNaN(val)) {
294 306
           return ''
295 307
         }
296 308
         if (val == 0) {
@@ -311,20 +323,16 @@
311 323
         } else {
312 324
           this.isVisibility = true
313 325
           console.log(this.form.manufacturer)
314
-          for (let i = 0; i < this.propForm.goodInfo.length; i++){
315
-            if(this.propForm.goodInfo[i].manufacturer == this.form.manufacturer){
326
+          for (let i = 0; i < this.propForm.goodInfo.length; i++) {
327
+            if (this.propForm.goodInfo[i].manufacturer == this.form.manufacturer) {
316 328
               this.propForm.goodType.push(this.propForm.goodInfo[i].GoodsType)
317 329
             }
318
-
319 330
           }
320 331
           const obj3 = {}
321 332
           this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
322 333
             obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
323 334
             return cur
324 335
           }, [])
325
-
326
-
327
-
328 336
         }
329 337
       }, back() {
330 338
         this.$router.go(-1)
@@ -353,22 +361,21 @@
353 361
             }
354 362
             console.log(this.form.dealer)
355 363
 
356
-
357
-            postWarehouseOut(params,this.warehouse_out_time,this.form.dealer,this.form.manufacturer,this.type).then(response=>{
358
-              if (response.data.state==0) {
359
-                this.$message.error(response.data.msg);
360
-                return false;
361
-              }else {
364
+            postWarehouseOut(params, this.warehouse_out_time, this.form.dealer, this.form.manufacturer, this.type).then(response => {
365
+              if (response.data.state == 0) {
366
+                this.$message.error(response.data.msg)
367
+                return false
368
+              } else {
362 369
                 this.$notify({
363
-                  title: "成功",
364
-                  message: "退货成功",
365
-                  type: "success",
370
+                  title: '成功',
371
+                  message: '退货成功',
372
+                  type: 'success',
366 373
                   duration: 2000
367
-                });
374
+                })
368 375
                 this.recordInfo.recordData = []
369 376
                 this.$router.back(-1)
370 377
               }
371
-            });
378
+            })
372 379
           } else {
373 380
             return false
374 381
           }
@@ -413,15 +420,6 @@
413 420
   }
414 421
   }
415 422
 
416
-  .title {
417
-    background: #409eff;
418
-    height: 44px;
419
-    line-height: 44px;
420
-    padding: 0 0 0 10px;
421
-    color: #fff;
422
-    margin: 0 0 10px 0;
423
-  // border-radius: 4px 4px 0 0;
424
-  }
425 423
 
426 424
   .edit_separater {
427 425
     border-top: 1px solid rgb(233, 233, 233);

+ 94 - 89
src/xt_pages/stock/stockOutOrderDetail.vue Bestand weergeven

@@ -1,96 +1,104 @@
1 1
 <template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <div class="filter-container">
6
-      <span style="font-size: 20px">退货单详情</span>
7
-      <el-row style="float:right;">
8
-        <span>{{warehousingOutInfo.info.warehouse_out_order_number}}</span>
9
-      </el-row>
10
-    </div>
11
-
12
-
13
-
14
-    <div class="filter-container">
15
-      <span>单据日期:  {{warehousingOutInfo.info.warehouse_out_time | parseTime('{y}-{m}-{d}')}} </span>
16
-      <span>厂商 {{getManufactuerName(warehousingOutInfo.info.manufacturer)}}</span>
17
-      <span>经销商 {{getDealerName(warehousingOutInfo.info.dealer)}}</span>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
18 5
     </div>
19 6
 
20
-    <div class="filter-container" style="margin-top: 10px">
21
-      <el-button size="small" icon="el-icon-edit" @click="editRecord">编辑</el-button>
22
-      <el-button size="small" icon="el-icon-delete" @click="deleteRecord">删除</el-button>
7
+    <div class="app-container">
8
+
9
+      <div class="filter-container">
10
+        <span style="font-size: 18px">出库单详情</span>
11
+        <el-row style="float:right;">
12
+          <span>{{warehousingOutInfo.info.warehouse_out_order_number}}</span>
13
+        </el-row>
14
+      </div>
15
+
16
+
17
+      <div class="cell">
18
+        <span style="width: 300px;">单据日期:  {{warehousingOutInfo.info.warehouse_out_time | parseTime('{y}-{m}-{d}')}} </span>
19
+        <span style="width: 300px;">厂商 {{getManufactuerName(warehousingOutInfo.info.manufacturer)}}</span>
20
+        <span style="width: 300px;">经销商 {{getDealerName(warehousingOutInfo.info.dealer)}}</span>
21
+      </div>
22
+
23
+      <div class="filter-container" style="margin-top: 10px">
24
+        <el-button size="small" icon="el-icon-edit" @click="editRecord">编辑</el-button>
25
+        <el-button size="small" icon="el-icon-delete" @click="deleteRecord">删除</el-button>
26
+      </div>
27
+
28
+      <el-row :gutter="12" style="margin-top: 10px">
29
+        <el-table :data="warehousingOutInfo.warehousingOutData" :class="signAndWeighBoxPatients" style="width: 100%"
30
+                  border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
31
+        >
32
+          <el-table-column min-width="35" align="center">
33
+            <template slot="header" slot-scope="scope">
34
+              <span>物品类型</span>
35
+            </template>
36
+
37
+            <template slot-scope="scope">
38
+              <span v-if="scope.row.good_type_id != 0">{{getTypeName(scope.row.good_type_id)}}</span>
39
+            </template>
40
+          </el-table-column>
41
+          <el-table-column min-width="35" align="center">
42
+            <template slot="header" slot-scope="scope">
43
+              <span>规格名称</span>
44
+            </template>
45
+            <template slot-scope="scope">
46
+              <span v-if="scope.row.good_id != 0">{{getSpecificationName(scope.row.good_id)}}</span>
47
+            </template>
48
+          </el-table-column>
49
+
50
+
51
+          <el-table-column min-width="23" align="center">
52
+            <template slot="header" slot-scope="scope">
53
+              <span>单价</span>
54
+            </template>
55
+            <template slot-scope="scope">
56
+              <span>{{scope.row.price}}</span>
57
+            </template>
58
+          </el-table-column>
59
+
60
+          <el-table-column min-width="23" align="center">
61
+            <template slot="header" slot-scope="scope">
62
+              <span>出库数量</span>
63
+            </template>
64
+            <template slot-scope="scope">
65
+              <span>{{scope.row.count}}</span>
66
+
67
+            </template>
68
+          </el-table-column>
69
+          <el-table-column label="总价" min-width="20" align="center">
70
+            <template slot-scope="scope">
71
+              {{calculate(scope.row.price*scope.row.count)}}
72
+            </template>
73
+          </el-table-column>
74
+
75
+          <el-table-column label="备注" min-width="20" align="center">
76
+            <template slot-scope="scope">
77
+              <el-popover placement="top-start" width="250" trigger="hover">
78
+                <div>{{scope.row.remark}}</div>
79
+                <span slot="reference"
80
+                      v-if="scope.row.remark.length > 20">{{ scope.row.remark.substr(0,20)+'...' }}</span>
81
+                <span slot="reference" v-else>{{ scope.row.remark}}</span>
82
+              </el-popover>
83
+
84
+            </template>
85
+          </el-table-column>
86
+
87
+
88
+        </el-table>
89
+      </el-row>
23 90
     </div>
24
-
25
-    <el-row :gutter="12" style="margin-top: 10px">
26
-      <el-table :data="warehousingOutInfo.warehousingOutData" :class="signAndWeighBoxPatients" style="width: 100%" border
27
-      >
28
-        <el-table-column min-width="35" align="center">
29
-          <template slot="header" slot-scope="scope">
30
-            <span>物品类型</span>
31
-          </template>
32
-
33
-          <template slot-scope="scope">
34
-            <span v-if="scope.row.good_type_id != 0">{{getTypeName(scope.row.good_type_id)}}</span>
35
-          </template>
36
-        </el-table-column>
37
-        <el-table-column min-width="35" align="center">
38
-          <template slot="header" slot-scope="scope">
39
-            <span>规格名称</span>
40
-          </template>
41
-          <template slot-scope="scope">
42
-            <span v-if="scope.row.good_id != 0">{{getSpecificationName(scope.row.good_id)}}</span>
43
-          </template>
44
-        </el-table-column>
45
-
46
-
47
-        <el-table-column min-width="23" align="center">
48
-          <template slot="header" slot-scope="scope">
49
-            <span>单价</span>
50
-          </template>
51
-          <template slot-scope="scope">
52
-            <span>{{scope.row.price}}</span>
53
-          </template>
54
-        </el-table-column>
55
-
56
-        <el-table-column min-width="23" align="center">
57
-          <template slot="header" slot-scope="scope">
58
-            <span>出库数量</span>
59
-          </template>
60
-          <template slot-scope="scope">
61
-            <span>{{scope.row.count}}</span>
62
-
63
-          </template>
64
-        </el-table-column>
65
-        <el-table-column label="总价" min-width="20" align="center">
66
-          <template slot-scope="scope">
67
-            {{calculate(scope.row.price*scope.row.count)}}
68
-          </template>
69
-        </el-table-column>
70
-
71
-        <el-table-column label="备注" min-width="20"  align="center">
72
-          <template slot-scope="scope">
73
-            <el-popover placement="top-start"  width="250" trigger="hover" >
74
-              <div>{{scope.row.remark}}</div>
75
-              <span slot="reference" v-if="scope.row.remark.length > 20">{{ scope.row.remark.substr(0,20)+'...' }}</span>
76
-              <span slot="reference" v-else>{{ scope.row.remark}}</span>
77
-            </el-popover>
78
-
79
-          </template>
80
-        </el-table-column>
81
-
82
-
83
-      </el-table>
84
-    </el-row>
85 91
   </div>
86 92
 </template>
87 93
 
88 94
 <script>
89 95
   import { uParseTime } from '@/utils/tools'
90
-  import { GetAllConfig,getWarehouseOutInfo,deleteWarehouseOut } from '@/api/stock'
96
+  import { deleteWarehouseOut, GetAllConfig, getWarehouseOutInfo } from '@/api/stock'
97
+  import BreadCrumb from '../components/bread-crumb'
91 98
 
92 99
   export default {
93 100
     name: 'stockInOrderDetail',
101
+    components: { BreadCrumb },
94 102
     created() {
95 103
       const order_id = this.$route.query.id
96 104
       this.GetConfigInfo()
@@ -98,6 +106,11 @@
98 106
     },
99 107
     data() {
100 108
       return {
109
+        crumbs: [
110
+          { path: false, name: '库存管理' },
111
+          { path: '/stock/out', name: '出库单' },
112
+          { path: '/stock/out/detail', name: '出库单详情' }
113
+        ],
101 114
         isEdit: 0,
102 115
         checked: false,
103 116
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
@@ -224,14 +237,6 @@
224 237
 
225 238
   }
226 239
 
227
-  .title {
228
-    background: #409eff;
229
-    height: 44px;
230
-    line-height: 44px;
231
-    padding: 0 0 0 10px;
232
-    color: #fff;
233
-    margin: 0 0 10px 0;
234
-  }
235 240
 
236 241
   .edit_separater {
237 242
     border-top: 1px solid rgb(233, 233, 233);

+ 50 - 53
src/xt_pages/stock/stockOutOrderEdit.vue Bestand weergeven

@@ -1,47 +1,32 @@
1 1
 <template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <div style="float:right;">
6
+        <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
7
+        <el-button size="small"  type="primary" @click="submit()" class="filter-item" >确 定</el-button>
8
+      </div>
9
+    </div>
2 10
 
3
-  <div class="app-container sign-and-weigh-box">
11
+  <div class="app-container">
4 12
 
5 13
     <sales-return-dialog :propForm="propForm"
6 14
                      :visibility="isVisibility"
7 15
                      v-on:dialog-comfirm="comfirm"
8 16
                      v-on:dialog-cancle="cancle"></sales-return-dialog>
9 17
 
10
-    <div class="filter-container">
11
-
12
-      <el-row>
13
-        <el-col :span="8">
14
-          <div>
15
-            <span>入库时间:</span>
16
-            <el-date-picker v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
18
+    <div class="cell">
19
+      <label class="title"><span class="name">出库时间</span> : </label>
20
+      <el-date-picker v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
17 21
                             type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
18 22
                             value-format="yyyy-MM-dd"></el-date-picker>
19
-          </div>
20
-        </el-col>
21
-      </el-row>
22 23
     </div>
23 24
 
24
-    <el-row>
25
-      <el-col>
26 25
         <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
27 26
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
28
-                    max-height="450"
27
+                    max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
29 28
           >
30 29
 
31
-            <el-table-column label="操作" align="center" min-width="30">
32
-              <template slot-scope="scope">
33
-                <el-button
34
-                  size="mini"
35
-                  @click="handleEdit(scope.$index, scope.row)">+
36
-                </el-button>
37
-                <el-button
38
-                  size="mini"
39
-                  type="danger"
40
-                  @click="handleDelete(scope.$index, scope.row)">-
41
-                </el-button>
42
-              </template>
43
-            </el-table-column>
44
-
45 30
             <el-table-column min-width="35" align="center">
46 31
 
47 32
               <template slot="header" slot-scope="scope">
@@ -107,18 +92,35 @@
107 92
                 <el-input  v-model="scope.row.remark"></el-input>
108 93
               </template>
109 94
             </el-table-column>
95
+            <el-table-column label="操作" align="center" min-width="20">
96
+              <template slot-scope="scope">
97
+                <el-tooltip class="item" effect="dark" content="新增" placement="top">
98
+
99
+                  <el-button
100
+                    size="mini"
101
+                    type="primary"
102
+                    icon="el-icon-circle-plus-outline"
103
+                    @click="handleEdit(scope.$index, scope.row)">
104
+                  </el-button>
105
+                </el-tooltip>
106
+                <el-tooltip class="item" effect="dark" content="删除" placement="top">
107
+
108
+                  <el-button
109
+                    size="mini"
110
+                    type="danger"
111
+                    icon="el-icon-remove-outline"
112
+                    @click="handleDelete(scope.$index, scope.row)">
113
+                  </el-button>
114
+                </el-tooltip>
115
+
116
+              </template>
117
+            </el-table-column>
110 118
           </el-table>
111 119
         </el-form>
112
-      </el-col>
113
-
114
-
115
-      <span class="dialog-footer" style="margin-top: 20px;float:right">
116
-        <el-button @click="back()">取 消</el-button>
117
-        <el-button type="primary" @click="submit()">确 定</el-button>
118
-      </span>
119 120
 
120
-    </el-row>
121 121
   </div>
122
+  </div>
123
+
122 124
 </template>
123 125
 
124 126
 <script>
@@ -131,13 +133,19 @@
131 133
     editWarehouseoutInfo
132 134
   } from '@/api/stock'
133 135
   import SalesReturnDialog from './Dialog/salesReturnDialog'
136
+  import BreadCrumb from '../components/bread-crumb'
134 137
 
135 138
   export default {
136
-    components: { SalesReturnDialog},
139
+    components: { BreadCrumb, SalesReturnDialog },
137 140
     name: 'salesReturnEdit',
138 141
 
139 142
     data() {
140 143
       return {
144
+        crumbs: [
145
+          { path: false, name: '库存管理' },
146
+          { path: '/stock/out', name: '出库单' },
147
+          { path: '/stock/out/detail', name: '编辑出库单' }
148
+        ],
141 149
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
142 150
 
143 151
         adminUserOptions: null,
@@ -155,7 +163,7 @@
155 163
           ],
156 164
           price: [
157 165
             { required: true, message: '单价不能为空', trigger: 'blur' }
158
-          ],
166
+          ]
159 167
 
160 168
         },
161 169
         ruleForm: {
@@ -209,7 +217,10 @@
209 217
       }, cancle: function() {
210 218
         this.isVisibility = false
211 219
       }, GetConfigInfo: function() {
212
-        getSalesReturnConfig().then(response => {
220
+        const params = {
221
+          type: this.$route.query.type
222
+        }
223
+        getSalesReturnConfig(params).then(response => {
213 224
           if (response.data.state == 0) {
214 225
             this.$message.error(response.data.msg)
215 226
             return false
@@ -218,7 +229,6 @@
218 229
             for (let i = 0; i < warehouseInfoList.length; i++) {
219 230
               this.propForm.goodInfo.push(warehouseInfoList[i].GoodInfo)
220 231
               this.propForm.goodType.push(warehouseInfoList[i].GoodInfo.GoodsType)
221
-
222 232
             }
223 233
             const obj3 = {}
224 234
             const obj4 = {}
@@ -307,7 +317,6 @@
307 317
           obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
308 318
           return cur
309 319
         }, [])
310
-
311 320
       }, back() {
312 321
         this.$router.go(-1)
313 322
       }, submit() {
@@ -362,9 +371,7 @@
362 371
             }
363 372
             this.warehouseOut = response.data.data.info
364 373
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
365
-
366 374
           }
367
-
368 375
         })
369 376
       }, calculate: function(val) {
370 377
         if (val == 0) {
@@ -395,16 +402,6 @@
395 402
 
396 403
   }
397 404
 
398
-  .title {
399
-    background: #409eff;
400
-    height: 44px;
401
-    line-height: 44px;
402
-    padding: 0 0 0 10px;
403
-    color: #fff;
404
-    margin: 0 0 10px 0;
405
-    border-radius: 4px 4px 0 0;
406
-  }
407
-
408 405
   .edit_separater {
409 406
     border-top: 1px solid rgb(233, 233, 233);
410 407
     margin-top: 15px;

+ 0 - 270
src/xt_pages/stock/stockOutRecord.vue Bestand weergeven

@@ -1,270 +0,0 @@
1
-<template>
2
-<div class="main-contain">
3
-  <div class="position">
4
-    <bread-crumb></bread-crumb>
5
-    <el-row style="float:right;">
6
-        <el-button size="small" icon="el-icon-refresh" @click="handleBack">返回</el-button>
7
-    </el-row>
8
-  </div>
9
-  <div class="app-container sign-and-weigh-box">
10
-    <div class="cell">
11
-      <label for="" class="title"><span class="name">出库时间:</span></label>
12
-      <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
13
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
14
-                      value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
15
-      <span class="">-</span>
16
-      <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
17
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
18
-                      value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
19
-
20
-    </div>
21
-    <el-row :gutter="12">
22
-      <div class="titleTop">出库记录
23
-      </div>
24
-      <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="WarehouseOutInfo.warehouseOutInfoDate" :class="signAndWeighBoxPatients" border
25
-                v-loading="WarehouseOutInfo.loading"
26
-      >
27
-        <el-table-column
28
-          type="selection"
29
-        >
30
-        </el-table-column>
31
-        <el-table-column label="规格名称" align="center">
32
-          <template slot-scope="scope">
33
-            {{getSpecificationName(scope.row.good_id)}}
34
-          </template>
35
-        </el-table-column>
36
-        <el-table-column label="物品类型" align="center">
37
-          <template slot-scope="scope">
38
-            {{getTypeName(scope.row.good_type_id)}}
39
-          </template>
40
-        </el-table-column>
41
-
42
-        <el-table-column label="出库数量" align="center">
43
-          <template slot-scope="scope">
44
-            <span>{{scope.row.count}}</span>
45
-          </template>
46
-        </el-table-column>
47
-        <el-table-column label="出库单价" align="center">
48
-          <template slot-scope="scope">
49
-            {{scope.row.price}}
50
-
51
-          </template>
52
-        </el-table-column>
53
-        <el-table-column label="出库总价" align="center">
54
-          <template slot-scope="scope">
55
-
56
-            {{calculate(scope.row.price * scope.row.count) }}
57
-
58
-
59
-          </template>
60
-        </el-table-column>
61
-        <el-table-column label="" align="center">
62
-          <template slot-scope="scope">
63
-            {{scope.row.WarehouseOut.warehouse_out_time | parseTime("{y}-{m}-{d}")}}
64
-
65
-          </template>
66
-        </el-table-column>
67
-        <el-table-column label="出库单号" align="center">
68
-          <template slot-scope="scope">
69
-            {{scope.row.WarehouseOut.warehouse_out_order_number}}
70
-          </template>
71
-        </el-table-column>
72
-
73
-      </el-table>
74
-
75
-      <el-pagination
76
-        @size-change="handleSizeChange"
77
-        @current-change="handleCurrentChange"
78
-        :page-sizes="[7]"
79
-        :page-size="7"
80
-        background
81
-        align="right"
82
-        style="margin-top:20px;"
83
-        layout="total, sizes, prev, pager, next, jumper"
84
-        :total="total">
85
-      </el-pagination>
86
-    </el-row>
87
-  </div>
88
-  </div>
89
-
90
-</template>
91
-
92
-<script>
93
-  import {uParseTime} from "@/utils/tools";
94
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
95
-  import {
96
-    getAllStockOutList,
97
-    GetAllGoodInfo,
98
-    GetAllGoodType,
99
-  } from "@/api/stock";
100
-
101
-  export default {
102
-    name: "stockIn",
103
-    created() {
104
-      var year = new Date().getFullYear();
105
-      var month = new Date().getMonth() + 1;
106
-      var day = new Date().getDate();
107
-      if (parseInt(month) < 10) {
108
-        month = "0" + month;
109
-      }
110
-      if (parseInt(day) < 10) {
111
-        day = "0" + day;
112
-      }
113
-      let endTime = year + '-' + month + '-' + day;
114
-      this.end_time = endTime
115
-
116
-
117
-      var year = new Date().getFullYear();
118
-      var month = new Date().getMonth();
119
-      var day = new Date().getDate();
120
-      if (parseInt(month) < 10) {
121
-        month = "0" + month;
122
-      }
123
-      if (parseInt(day) < 10) {
124
-        day = "0" + day;
125
-      }
126
-      let startTime = year + '-' + month + '-' + day;
127
-      this.start_time = startTime
128
-
129
-      this.GetWarehouse()
130
-      this.GetAllGoodInfo()
131
-      this.GetAllGoodType()
132
-
133
-
134
-    },
135
-    components:{
136
-      BreadCrumb
137
-    },
138
-    data() {
139
-      return {
140
-        total:0,
141
-        multipleSelection: [],
142
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
143
-        start_time: '',
144
-        end_time: '',
145
-        goodType: [],
146
-        goodInfo: [],
147
-        WarehouseOutInfo: {
148
-          loading: false,
149
-          warehouseOutInfoDate: [],
150
-        }
151
-      };
152
-    },
153
-    methods: {
154
-      GetWarehouse: function () {
155
-        let Params = {
156
-          page: this.page,
157
-          limit: this.limit,
158
-          start_time: this.start_time,
159
-          end_time: this.end_time
160
-        }
161
-        this.WarehouseOutInfo.warehouseOutInfoDate = []
162
-        getAllStockOutList(Params).then(response => {
163
-          if (response.data.state == 0) {
164
-            this.WarehouseOutInfo.loading = false
165
-            this.$message.error(response.data.msg);
166
-            return false;
167
-          } else {
168
-            this.WarehouseOutInfo.loading = false
169
-            this.total = response.data.data.total
170
-            for (let i = 0; i < response.data.data.list.length; i++) {
171
-              this.WarehouseOutInfo.warehouseOutInfoDate.push(response.data.data.list[i])
172
-            }
173
-          }
174
-        });
175
-      }, getSpecificationName: function (id) {
176
-        let name = ''
177
-        for (let i = 0; i < this.goodInfo.length; i++) {
178
-          if (this.goodInfo[i].id == id) {
179
-            name = this.goodInfo[i].specification_name
180
-          }
181
-        }
182
-        return name
183
-      }, getTypeName: function (id) {
184
-        let name = ''
185
-        for (let i = 0; i < this.goodType.length; i++) {
186
-          if (this.goodType[i].id == id) {
187
-            name = this.goodType[i].type_name
188
-          }
189
-        }
190
-        return name
191
-      }, GetAllGoodType: function () {
192
-        GetAllGoodType().then(response => {
193
-          if (response.data.state == 0) {
194
-            this.$message.error(response.data.msg);
195
-            return false;
196
-          } else {
197
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
198
-              this.goodType.push(response.data.data.goodType[i])
199
-            }
200
-          }
201
-        });
202
-      }, GetAllGoodInfo: function () {
203
-        GetAllGoodInfo().then(response => {
204
-          if (response.data.state == 0) {
205
-            this.$message.error(response.data.msg);
206
-            return false;
207
-          } else {
208
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
209
-              this.goodInfo.push(response.data.data.goodInfo[i])
210
-            }
211
-          }
212
-        });
213
-      }, handleBack: function () {
214
-        this.$router.go(-1)
215
-      } ,startTimeChange(val) {
216
-        this.GetWarehouse();
217
-      }, endTimeChange(val) {
218
-        this.GetWarehouse();
219
-      },calculate:function (val) {
220
-        return Math.round(parseFloat(val)*100)/100
221
-      },
222
-    }
223
-  };
224
-</script>
225
-
226
-<style rel="stylesheet/css" lang="scss" scoped>
227
-  .information {
228
-    border: 1px #dcdfe6 solid;
229
-    padding: 30px 20px 30px 20px;
230
-
231
-    .border {
232
-      border-bottom: 1px #dcdfe6 solid;
233
-      margin: 0px 0 20px 0;
234
-    }
235
-  }
236
-
237
-  .titleTop {
238
-    background: #409eff;
239
-    height: 44px;
240
-    line-height: 44px;
241
-    padding: 0 0 0 10px;
242
-    color: #fff;
243
-    margin: 0 0 10px 0;
244
-    // border-radius: 4px 4px 0 0;
245
-        font-size: 14px;
246
-  }
247
-
248
-  .edit_separater {
249
-    border-top: 1px solid rgb(233, 233, 233);
250
-    margin-top: 15px;
251
-    margin-bottom: 15px;
252
-  }
253
-
254
-</style>
255
-
256
-<style>
257
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
258
-    font-size: 12px;
259
-  }
260
-
261
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
262
-    background: #6fb5fa;
263
-  }
264
-
265
-  .count {
266
-    color: #bd2c00;
267
-
268
-  }
269
-
270
-</style>

+ 8 - 8
src/xt_pages/stock/stockQuery.vue Bestand weergeven

@@ -1,13 +1,10 @@
1 1
 <template>
2 2
 <div class="main-contain">
3 3
   <div class="position">
4
-    <bread-crumb></bread-crumb>
4
+    <bread-crumb :crumbs='crumbs'></bread-crumb>
5 5
 
6 6
   </div>
7
-  <div class="app-container sign-and-weigh-box">
8
-    <el-row :gutter="12">
9
-      <div class="title">库存列表
10
-      </div>
7
+  <div class="app-container ">
11 8
       <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}"  :data="WarehouseInfo.warehouseInfoDate" :class="signAndWeighBoxPatients" border
12 9
                 v-loading="WarehouseInfo.loading"
13 10
       >
@@ -75,11 +72,9 @@
75 72
         layout="total, sizes, prev, pager, next, jumper"
76 73
         :total="total">
77 74
       </el-pagination>
78
-
79
-    </el-row>
80 75
   </div>
81 76
   </div>
82
-  
77
+
83 78
 </template>
84 79
 
85 80
 <script>
@@ -103,6 +98,11 @@
103 98
     },
104 99
     data() {
105 100
       return {
101
+        crumbs: [
102
+          { path: false, name: '库存管理' },
103
+          { path: '/stock/query', name: '库存查询' },
104
+        ],
105
+
106 106
         total: 0,
107 107
         multipleSelection: [],
108 108
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',

+ 0 - 304
src/xt_pages/stock/warehouseRecord.vue Bestand weergeven

@@ -1,304 +0,0 @@
1
-<template>
2
-<div class="main-contain">
3
-  <div class="position">
4
-    <bread-crumb></bread-crumb>
5
-    <el-row style="float:right;">
6
-        <el-button size="small" icon="el-icon-refresh" @click="handleBack" type="primary">返回</el-button>
7
-      </el-row>
8
-  </div>
9
-  <div class="app-container sign-and-weigh-box">
10
-    <div class="cell">
11
-      <label  class="title"><span class="name">入库时间:</span></label>
12
-      <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
13
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
14
-                      value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
15
-      <span class="">-</span>
16
-      <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
17
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
18
-                      value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
19
-
20
-    </div>
21
-    <el-row :gutter="12">
22
-      <div class="titleTop">入库记录
23
-      </div>
24
-      <el-table  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="WarehouseInfo.warehouseInfoDate" :class="signAndWeighBoxPatients" border
25
-                v-loading="WarehouseInfo.loading"
26
-      >
27
-        <el-table-column
28
-          type="selection"
29
-        >
30
-        </el-table-column>
31
-        <el-table-column label="规格名称" align="center">
32
-          <template slot-scope="scope">
33
-            {{getSpecificationName(scope.row.good_id)}}
34
-          </template>
35
-        </el-table-column>
36
-        <el-table-column label="物品类型" align="center">
37
-          <template slot-scope="scope">
38
-            {{getTypeName(scope.row.good_type_id)}}
39
-          </template>
40
-        </el-table-column>
41
-
42
-        <el-table-column label="入库数量" align="center">
43
-          <template slot-scope="scope">
44
-            <span>{{scope.row.warehousing_count}}</span>
45
-          </template>
46
-        </el-table-column>
47
-        <el-table-column label="入库单价" align="center">
48
-          <template slot-scope="scope">
49
-            {{scope.row.price}}
50
-
51
-          </template>
52
-        </el-table-column>
53
-        <el-table-column label="入库总价" align="center">
54
-          <template slot-scope="scope">
55
-            {{calculate(scope.row.price * scope.row.warehousing_count)}}
56
-
57
-          </template>
58
-        </el-table-column>
59
-        <el-table-column label="入库时间" align="center">
60
-          <template slot-scope="scope">
61
-            {{scope.row.Warehousing.warehousing_time | parseTime("{y}-{m}-{d}")}}
62
-
63
-          </template>
64
-        </el-table-column>
65
-        <el-table-column label="入库单号" align="center">
66
-          <template slot-scope="scope">
67
-            {{scope.row.Warehousing.warehousing_order}}
68
-          </template>
69
-        </el-table-column>
70
-
71
-        <el-table-column label="操作" align="center">
72
-          <template slot-scope="scope">
73
-           <el-tooltip class="item" effect="dark" content="删除" placement="top">
74
-            <el-button type="danger" icon="el-icon-delete" size="mini" @click="deleteRows(scope.row)"></el-button>
75
-           </el-tooltip>
76
-          </template>
77
-        </el-table-column>
78
-
79
-      </el-table>
80
-
81
-
82
-      <el-pagination
83
-        :page-sizes="[7]"
84
-        :page-size="7"
85
-        background
86
-        align="right"
87
-        style="margin-top:20px;"
88
-        layout="total, sizes, prev, pager, next, jumper"
89
-        :total="total">
90
-      </el-pagination>
91
-
92
-    </el-row>
93
-  </div>
94
-</div>
95
-</template>
96
-
97
-<script>
98
-  import {uParseTime} from "@/utils/tools";
99
-  import {deleteStockInRecord, GetAllGoodInfo, GetAllGoodType, getAllWarehouseInfo} from "@/api/stock";
100
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
101
-  
102
-  export default {
103
-    name: "stockIn",
104
-    created() {
105
-      var year = new Date().getFullYear();
106
-      var month = new Date().getMonth() + 1;
107
-      var day = new Date().getDate();
108
-      if (parseInt(month) < 10) {
109
-        month = "0" + month;
110
-      }
111
-      if (parseInt(day) < 10) {
112
-        day = "0" + day;
113
-      }
114
-      let endTime = year + '-' + month + '-' + day;
115
-      this.end_time = endTime
116
-
117
-
118
-      var year = new Date().getFullYear();
119
-      var month = new Date().getMonth();
120
-      var day = new Date().getDate();
121
-      if (parseInt(month) < 10) {
122
-        month = "0" + month;
123
-      }
124
-      if (parseInt(day) < 10) {
125
-        day = "0" + day;
126
-      }
127
-      let startTime = year + '-' + month + '-' + day;
128
-      this.start_time = startTime
129
-
130
-      this.GetWarehouse()
131
-      this.GetAllGoodInfo()
132
-      this.GetAllGoodType()
133
-    },
134
-    components:{
135
-      BreadCrumb
136
-    },
137
-    data() {
138
-      return {
139
-        total: 0,
140
-        multipleSelection: [],
141
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
142
-        start_time: '',
143
-        end_time: '',
144
-        page: 1,
145
-        limit: 7,
146
-        goodType: [],
147
-        goodInfo: [],
148
-        WarehouseInfo: {
149
-          loading: false,
150
-          warehouseInfoDate: [],
151
-        }
152
-      };
153
-    },
154
-    methods: {
155
-      GetWarehouse: function () {
156
-        let Params = {
157
-          page: this.page,
158
-          limit: this.limit,
159
-          start_time: this.start_time,
160
-          end_time: this.end_time
161
-        }
162
-        this.WarehouseInfo.warehouseInfoDate = []
163
-        getAllWarehouseInfo(Params).then(response => {
164
-          if (response.data.state == 0) {
165
-            this.WarehouseInfo.loading = false
166
-            this.$message.error(response.data.msg);
167
-            return false;
168
-          } else {
169
-            this.WarehouseInfo.loading = false
170
-            this.total = response.data.data.total
171
-            for (let i = 0; i < response.data.data.list.length; i++) {
172
-              this.WarehouseInfo.warehouseInfoDate.push(response.data.data.list[i])
173
-            }
174
-          }
175
-        });
176
-      }, getSpecificationName: function (id) {
177
-        let name = ''
178
-        for (let i = 0; i < this.goodInfo.length; i++) {
179
-          if (this.goodInfo[i].id == id) {
180
-            name = this.goodInfo[i].specification_name
181
-          }
182
-        }
183
-        return name
184
-      }, getTypeName: function (id) {
185
-        let name = ''
186
-        for (let i = 0; i < this.goodType.length; i++) {
187
-          if (this.goodType[i].id == id) {
188
-            name = this.goodType[i].type_name
189
-          }
190
-        }
191
-        return name
192
-      }, GetAllGoodType: function () {
193
-        GetAllGoodType().then(response => {
194
-          if (response.data.state == 0) {
195
-            this.$message.error(response.data.msg);
196
-            return false;
197
-          } else {
198
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
199
-              this.goodType.push(response.data.data.goodType[i])
200
-            }
201
-          }
202
-        });
203
-      }, GetAllGoodInfo: function () {
204
-        GetAllGoodInfo().then(response => {
205
-          if (response.data.state == 0) {
206
-            this.$message.error(response.data.msg);
207
-            return false;
208
-          } else {
209
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
210
-              this.goodInfo.push(response.data.data.goodInfo[i])
211
-            }
212
-          }
213
-        });
214
-      }, handleBack: function () {
215
-        this.$router.go(-1)
216
-      }, handleSizeChange(val) {
217
-        this.limit = val;
218
-        this.GetWarehouse();
219
-      }, handleCurrentChange(val) {
220
-        this.page = val;
221
-        this.GetWarehouse();
222
-      }, calculate: function (val) {
223
-        return Math.round(parseFloat(val) * 100) / 100
224
-      }, startTimeChange: function () {
225
-        this.GetWarehouse()
226
-      }, endTimeChange: function () {
227
-        this.GetWarehouse()
228
-
229
-      },deleteRows:function (row) {
230
-        let params = {
231
-          record_id: row.id,
232
-          good_id: row.good_id,
233
-          order_number: row.Warehousing.warehousing_order,
234
-        }
235
-        deleteStockInRecord(params).then(response => {
236
-          if (response.data.state == 0) {
237
-            this.$message.error(response.data.msg);
238
-            return false;
239
-          } else {
240
-            this.$message.success(response.data.data.msg);
241
-
242
-            for (let i = 0; i < this.WarehouseInfo.warehouseInfoDate.length; i++){
243
-              console.log(this.WarehouseInfo.warehouseInfoDate[i].id)
244
-              console.log(row.id)
245
-
246
-              if (this.WarehouseInfo.warehouseInfoDate[i].id == row.id){
247
-                this.WarehouseInfo.warehouseInfoDate.splice(i,1)
248
-              }
249
-            }
250
-
251
-          }
252
-        });
253
-
254
-      }
255
-    }
256
-  };
257
-</script>
258
-
259
-<style rel="stylesheet/css" lang="scss" scoped>
260
-  .information {
261
-    border: 1px #dcdfe6 solid;
262
-    padding: 30px 20px 30px 20px;
263
-
264
-  .border {
265
-    border-bottom: 1px #dcdfe6 solid;
266
-    margin: 0px 0 20px 0;
267
-  }
268
-
269
-  }
270
-
271
-  .titleTop {
272
-    background: #409eff;
273
-    height: 44px;
274
-    line-height: 44px;
275
-    padding: 0 0 0 10px;
276
-    color: #fff;
277
-    margin: 0 0 10px 0;
278
-  //  border-radius: 4 px 4 px 0 0;
279
-      font-size: 14px;
280
-  }
281
-
282
-  .edit_separater {
283
-    border-top: 1px solid rgb(233, 233, 233);
284
-    margin-top: 15px;
285
-    margin-bottom: 15px;
286
-  }
287
-
288
-</style>
289
-
290
-<style>
291
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
292
-    font-size: 12px;
293
-  }
294
-
295
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
296
-    background: #6fb5fa;
297
-  }
298
-
299
-  .count {
300
-    color: #bd2c00;
301
-
302
-  }
303
-
304
-</style>

+ 24 - 17
src/xt_pages/user/dialysisSolution.1.vue Bestand weergeven

@@ -81,24 +81,31 @@
81 81
      </el-table-column>
82 82
      <el-table-column label="操作" align="center" min-width="140">
83 83
       <template slot-scope="scope">
84
-        <el-button
85
-          size="mini"
86
-          type="primary"
87
-          @click="openEdit(scope.$index, scope.row)" v-if="scope.row.parent_id===0">编辑</el-button>
84
+        <el-tooltip class="item" effect="dark" content="编辑" placement="top">
85
+          <el-button
86
+            size="small"
87
+            type="primary"
88
+            @click="openEdit(scope.$index, scope.row)" v-if="scope.row.parent_id===0"></el-button>
89
+          </el-tooltip>  
90
+          <el-tooltip class="item" effect="dark" content="编辑" placement="top">          
91
+          <el-button
92
+            size="small"
93
+            type="primary"
94
+            @click="openChildEdit(scope.$index, scope.row)" v-else></el-button>
95
+          </el-tooltip>  
96
+          <el-tooltip class="item" effect="dark" content="新增" placement="top">          
97
+          <el-button
98
+            size="small"
99
+            type="success"
100
+            @click="openNewChild(scope.$index, scope.row)" v-if="scope.row.parent_id===0"></el-button>
101
+          </el-tooltip>  
102
+          <el-tooltip class="item" effect="dark" content="删除" placement="top"> 
103
+          <el-button
104
+            size="small"
105
+            type="danger"
106
+            @click="handleDelete(scope.$index, scope.row)"></el-button>
107
+          </el-tooltip>  
88 108
           
89
-        <el-button
90
-          size="mini"
91
-          type="primary"
92
-          @click="openChildEdit(scope.$index, scope.row)" v-else>编辑</el-button>
93
-
94
-        <el-button
95
-          size="mini"
96
-          type="success"
97
-          @click="openNewChild(scope.$index, scope.row)" v-if="scope.row.parent_id===0">新增</el-button>
98
-        <el-button
99
-          size="mini"
100
-          type="danger"
101
-          @click="handleDelete(scope.$index, scope.row)">删除</el-button>
102 109
       </template>
103 110
     </el-table-column>
104 111
    </el-table>

+ 0 - 0
src/xt_pages/user/dialysisSolution.vue Bestand weergeven


Some files were not shown because too many files changed in this diff