Selaa lähdekoodia

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

zhengchengwu 6 vuotta sitten
vanhempi
commit
1241592bbe
47 muutettua tiedostoa jossa 5081 lisäystä ja 2963 poistoa
  1. 6 0
      config/dev.env.js
  2. 7 1
      config/prod.env.js
  3. 7 1
      config/sit.env.js
  4. 8 8
      src/api/stock.js
  5. 882 930
      src/router/index.js
  6. 962 0
      src/router/index_路由未分离前.js
  7. 38 0
      src/router/modules/data_dict.js
  8. 46 0
      src/router/modules/device.js
  9. 84 0
      src/router/modules/dialysis.js
  10. 153 0
      src/router/modules/patient.js
  11. 174 0
      src/router/modules/qcd.js
  12. 71 0
      src/router/modules/role.js
  13. 117 0
      src/router/modules/service.js
  14. 175 0
      src/router/modules/stock.js
  15. 17 0
      src/router/modules/weight_sign.js
  16. 64 0
      src/router/modules/workforce.js
  17. 0 331
      src/router/origin_index.js
  18. 0 215
      src/router/xt_index.js
  19. 64 19
      src/store/modules/xt_user.js
  20. 26 22
      src/views/layout/components/Navbar.vue
  21. 9 0
      src/views/layout/components/TagsView.vue
  22. 1 1
      src/xt_pages/data/components/tableson.vue
  23. 6 4
      src/xt_pages/data/index.vue
  24. 41 9
      src/xt_pages/stock/Dialog/salesReturnDialog.vue
  25. 17 9
      src/xt_pages/stock/Dialog/stockInDialog.vue
  26. 120 39
      src/xt_pages/stock/cancelStockOrderAdd.vue
  27. 10 2
      src/xt_pages/stock/cancelStockOrderDetail.vue
  28. 93 11
      src/xt_pages/stock/cancelStockOrderEdit.vue
  29. 18 15
      src/xt_pages/stock/config/goodInfo.vue
  30. 4 2
      src/xt_pages/stock/config/goodType.vue
  31. 19 2
      src/xt_pages/stock/detail/cancelStockDetail.vue
  32. 18 2
      src/xt_pages/stock/detail/salesReturnDetail.vue
  33. 18 2
      src/xt_pages/stock/detail/stockInDetail.vue
  34. 19 2
      src/xt_pages/stock/detail/stockOutDetail.vue
  35. 150 30
      src/xt_pages/stock/salesReturnEdit.vue
  36. 110 58
      src/xt_pages/stock/salesReturnOrderAdd.vue
  37. 8 2
      src/xt_pages/stock/salesReturnOrderDetail.vue
  38. 114 65
      src/xt_pages/stock/stockInOrderAdd.vue
  39. 9 2
      src/xt_pages/stock/stockInOrderDetail.vue
  40. 87 29
      src/xt_pages/stock/stockInOrderEdit.vue
  41. 233 179
      src/xt_pages/stock/stockOutOrderAdd.vue
  42. 9 2
      src/xt_pages/stock/stockOutOrderDetail.vue
  43. 243 137
      src/xt_pages/stock/stockOutOrderEdit.vue
  44. 5 2
      src/xt_pages/stock/stockQuery.vue
  45. 4 5
      src/xt_pages/user/components/PatientForm.vue
  46. 66 67
      src/xt_pages/workforce/components/setup_template_dialog.vue
  47. 749 758
      src/xt_pages/workforce/components/tableData.vue

+ 6 - 0
config/dev.env.js Näytä tiedosto

@@ -7,4 +7,10 @@ module.exports = {
7 7
   NODE_ENV: '"development"',
8 8
   ENV_CONFIG: '"dev"',
9 9
   BASE_API: '"http://api.xt.test.sgjyun.com"',//'"http://localhost:9529"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527
10
+
11
+  SSO_HOST: '"http://testsso.sgjyun.com"',
12
+  SRCM_HOST: '"http://test1.sgjyun.com"',
13
+  XT_HOST: '"http://xt.test.sgjyun.com"',
14
+  MIRCO_MALL_HOST: '"http://mall.sgjyun.com"',
15
+  CDM_HOST: '"http://cdm.sgjyun.com"',
10 16
 }

+ 7 - 1
config/prod.env.js Näytä tiedosto

@@ -1,5 +1,11 @@
1 1
 module.exports = {
2 2
   NODE_ENV: '"production"',
3 3
   ENV_CONFIG: '"prod"',
4
-  BASE_API: '"http://api.xt.kuyicloud.com"'
4
+  BASE_API: '"http://api.xt.kuyicloud.com"',
5
+
6
+  SSO_HOST: '"http://sso.kuyicloud.com"',
7
+  SRCM_HOST: '"http://jk.kuyicloud.com"',
8
+  XT_HOST: '"http://xt.kuyicloud.com"',
9
+  MIRCO_MALL_HOST: '"http://mall.kuyicloud.com"',
10
+  CDM_HOST: '"http://cdm.kuyicloud.com"',
5 11
 }

+ 7 - 1
config/sit.env.js Näytä tiedosto

@@ -1,5 +1,11 @@
1 1
 module.exports = {
2 2
   NODE_ENV: '"production"',
3 3
   ENV_CONFIG: '"sit"',
4
-  BASE_API: '"http://api.xt.test.sgjyun.com"'
4
+  BASE_API: '"http://api.xt.test.sgjyun.com"',
5
+
6
+  SSO_HOST: '"http://testsso.sgjyun.com"',
7
+  SRCM_HOST: '"http://test1.sgjyun.com"',
8
+  XT_HOST: '"http://xt.test.sgjyun.com"',
9
+  MIRCO_MALL_HOST: '"http://mall.sgjyun.com"',
10
+  CDM_HOST: '"http://cdm.sgjyun.com"',
5 11
 }

+ 8 - 8
src/api/stock.js Näytä tiedosto

@@ -385,9 +385,9 @@ export function DeleteWarehouseInfoItem(params) {
385 385
   })
386 386
 }
387 387
 
388
-export function EditWarehouse(params, warehousing_time, id,type,manufacturer_id) {
388
+export function EditWarehouse(params, warehousing_time, id,type,manufacturer_id,dealer_id) {
389 389
   return request({
390
-    url: '/api/warehouse/edit?warehousing_time=' + warehousing_time + '&id=' + id+"&type="+type+"&manufacturer_id="+manufacturer_id,
390
+    url: '/api/warehouse/edit?warehousing_time=' + warehousing_time + '&id=' + id+"&type="+type+"&manufacturer_id="+manufacturer_id+"&dealer_id="+dealer_id,
391 391
     method: 'post',
392 392
     data: params
393 393
   })
@@ -433,9 +433,9 @@ export function deleteSalesReturnInfo(params) {
433 433
   })
434 434
 }
435 435
 
436
-export function editSalesReturnInfo(params, return_time, id,type,manufacturer_id) {
436
+export function editSalesReturnInfo(params, return_time, id,type,manufacturer_id,dealer_id) {
437 437
   return request({
438
-    url: '/api/salesreturn/edit?return_time=' + return_time + '&id=' + id+"&type="+type+"&manufacturer_id="+manufacturer_id,
438
+    url: '/api/salesreturn/edit?return_time=' + return_time + '&id=' + id+"&type="+type+"&manufacturer_id="+manufacturer_id+"&dealer_id="+dealer_id,
439 439
     method: 'post',
440 440
     data: params
441 441
   })
@@ -473,9 +473,9 @@ export function getWarehouseOutInfo(params) {
473 473
   })
474 474
 }
475 475
 
476
-export function editWarehouseoutInfo(params, warehouse_out_time, id,type,manufacturer_id) {
476
+export function editWarehouseoutInfo(params, warehouse_out_time, id,type,manufacturer_id,dealer_id) {
477 477
   return request({
478
-    url: '/api/warehouseout/edit?warehouse_out_time=' + warehouse_out_time + '&id=' + id+"&type="+type+"&manufacturer_id="+manufacturer_id,
478
+    url: '/api/warehouseout/edit?warehouse_out_time=' + warehouse_out_time + '&id=' + id+"&type="+type+"&manufacturer_id="+manufacturer_id+"&dealer_id="+dealer_id,
479 479
     method: 'post',
480 480
     data: params
481 481
   })
@@ -489,9 +489,9 @@ export function getCancelStockList(params) {
489 489
   })
490 490
 }
491 491
 
492
-export function editCancelStockInfo(params, cancel_stock_time, id,type,manufacturer_id) {
492
+export function editCancelStockInfo(params, cancel_stock_time, id,type,manufacturer_id,dealer_id) {
493 493
   return request({
494
-    url: '/api/cancelstockinfo/edit?cancel_time=' + cancel_stock_time + '&id=' + id+"&type="+type+"&manufacturer_id="+manufacturer_id,
494
+    url: '/api/cancelstockinfo/edit?cancel_time=' + cancel_stock_time + '&id=' + id+"&type="+type+"&manufacturer_id="+manufacturer_id+"&dealer_id=" + dealer_id,
495 495
     method: 'post',
496 496
     data: params
497 497
   })

File diff suppressed because it is too large
+ 882 - 930
src/router/index.js


+ 962 - 0
src/router/index_路由未分离前.js Näytä tiedosto

@@ -0,0 +1,962 @@
1
+import Vue from 'vue'
2
+import Router from 'vue-router'
3
+
4
+Vue.use(Router)
5
+
6
+/* Layout */
7
+import Layout from '@/views/layout/Layout'
8
+
9
+/** note: submenu only apppear when children.length>=1
10
+*   detail see  https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
11
+**/
12
+
13
+/**
14
+* hidden: true                   if `hidden:true` will not show in the sidebar(default is false)
15
+* alwaysShow: true               if set true, will always show the root menu, whatever its child routes length
16
+*                                if not set alwaysShow, only more than one route under the children
17
+*                                it will becomes nested mode, otherwise not show the root menu
18
+* redirect: noredirect           if `redirect:noredirect` will no redirct in the breadcrumb
19
+* name:'router-name'             the name is used by <keep-alive> (must set!!!)
20
+* meta : {
21
+    roles: ['admin','editor']     will control the page roles (you can set multiple roles)
22
+    title: 'title'               the name show in submenu and breadcrumb (recommend set)
23
+    icon: 'svg-name'             the icon show in the sidebar,
24
+    noCache: true                if true ,the page will no be cached(default is false)
25
+  }
26
+**/
27
+export const xt_constantRouterMap = [
28
+  // { path: '/login', component: () => import('@/views/login/index'), hidden: true },
29
+  { path: '/token/verify', component: () => import('@/xt_pages/index/verify_token'), hidden: true },
30
+  { path: '/404', component: () => import('@/views/errorPage/404'), hidden: true },
31
+  { path: '/401', component: () => import('@/views/errorPage/401'), hidden: true },
32
+  {
33
+    path: '',
34
+    component: Layout,
35
+    redirect: '/home',
36
+    children: [{
37
+      path: '/home',
38
+      component: () => import('@/xt_pages/home/index'),
39
+      name: 'home',
40
+      meta: { title: 'home', icon: 'dashboard', noCache: true }
41
+    }]
42
+  },
43
+  {
44
+    path: '/service',
45
+    component: Layout,
46
+    // redirect: '/service',
47
+    hidden: true,
48
+    is_menu: false,
49
+
50
+    meta: { title: 'service', icon: 'shebei' },
51
+    children: [{
52
+      path: '/service',
53
+      component: () => import('@/xt_pages/service/index'),
54
+      hidden: true,
55
+      is_menu: false,
56
+      name: 'service',
57
+      meta: { title: 'service', icon: 'shebei', noCache: true }
58
+    }, {
59
+      path: '/service/invoice',
60
+      component: () => import('@/xt_pages/service/invoice'),
61
+      hidden: true,
62
+      is_menu: false,
63
+      name: 'invoice',
64
+      meta: { title: 'invoice', icon: 'shebei', noCache: true }
65
+    }, {
66
+      path: '/service/invoice/apply',
67
+      component: () => import('@/xt_pages/service/invoiceApply'),
68
+      hidden: true,
69
+      is_menu: false,
70
+      name: 'invoiceApply',
71
+      meta: { title: 'invoiceApply', icon: 'shebei', noCache: true }
72
+    },
73
+    {
74
+      path: '/servicePay',
75
+      component: () => import('@/xt_pages/service/servicePay'),
76
+      hidden: true,
77
+      name: 'servicePay',
78
+      meta: { title: 'servicePay' }
79
+    },
80
+    {
81
+      path: '/payType',
82
+      component: () => import('@/xt_pages/service/payType'),
83
+      hidden: true,
84
+      name: 'payType',
85
+      meta: { title: 'payType' }
86
+    },
87
+    {
88
+      path: '/weChatPay',
89
+      component: () => import('@/xt_pages/service/weChatPay'),
90
+      hidden: true,
91
+      name: 'weChatPay',
92
+      meta: { title: 'weChatPay' }
93
+    },
94
+    {
95
+      path: '/service/completeOrder',
96
+      component: () => import('@/xt_pages/service/completeOrder'),
97
+      hidden: true,
98
+      name: 'completeOrder',
99
+      meta: { title: 'completeOrder' }
100
+    }, {
101
+      path: '/service/buy',
102
+      component: () => import('@/xt_pages/service/serviceOrder'),
103
+      hidden: true,
104
+      is_menu: false,
105
+      name: 'serviceOrder',
106
+      meta: { title: 'serviceOrder', icon: 'shebei', noCache: true }
107
+    }, {
108
+      path: '/order',
109
+      component: () => import('@/xt_pages/service/orderRecord'),
110
+      hidden: true,
111
+      is_menu: false,
112
+      name: 'orderRecord',
113
+      meta: { title: 'orderRecord', icon: 'shebei', noCache: true }
114
+    }, {
115
+      path: '/service/recordList',
116
+      component: () => import('@/xt_pages/service/serviceRecord'),
117
+      hidden: true,
118
+      is_menu: false,
119
+      name: 'recordList',
120
+      meta: { title: 'recordList', icon: 'shebei', noCache: true }
121
+    }
122
+    ]
123
+  },
124
+
125
+  // ////////////////////////////
126
+  // 本地开始
127
+  // ///////////////////////////
128
+  {
129
+    path: '/patients',
130
+    component: Layout,
131
+    redirect: 'noredirect',
132
+    name: 'User',
133
+    meta: {
134
+      title: 'user',
135
+      icon: 'bingren'
136
+    },
137
+    children: [
138
+      {
139
+        path: '/patients/patients',
140
+        component: () => import('@/xt_pages/user/patients'),
141
+        name: 'Patient',
142
+        meta: { title: 'patient', noCache: true }
143
+      },
144
+      {
145
+        path: '/patients/create',
146
+        component: () => import('@/xt_pages/user/createPatient'),
147
+        name: 'createPatient',
148
+        meta: { title: 'createPatient', noCache: true }
149
+      },
150
+      {
151
+        path: '/patients/patient/:id',
152
+        component: () => import('@/xt_pages/user/patientInfo'),
153
+        hidden: true,
154
+        is_menu: false,
155
+        name: 'patient Page',
156
+        meta: { title: 'patientPage', noCache: true }
157
+      },
158
+      {
159
+        path: '/patients/patient/:id/edit',
160
+        component: () => import('@/xt_pages/user/editPatient'),
161
+        hidden: true,
162
+        is_menu: false,
163
+        name: 'Edit Patient',
164
+        meta: { title: 'editPatient', noCache: true }
165
+      },
166
+      {
167
+        path: '/patients/patient/:id/dialysisSolution',
168
+        component: () => import('@/xt_pages/user/dialysisSolution'),
169
+        hidden: true,
170
+        is_menu: false,
171
+        name: 'dialysisSolution',
172
+        meta: { title: 'dialysisSolution', noCache: true }
173
+      },
174
+      {
175
+        path: '/patients/patient/:id/weight',
176
+        component: () => import('@/xt_pages/user/weight'),
177
+        hidden: true,
178
+        is_menu: false,
179
+        name: 'weight',
180
+        meta: { title: 'weight', noCache: true }
181
+      },
182
+      {
183
+        path: '/patients/patient/:id/dialysisRecord',
184
+        component: () => import('@/xt_pages/user/dialysisRecord'),
185
+        hidden: true,
186
+        is_menu: false,
187
+        name: 'dialysisRecord',
188
+        meta: { title: 'dialysisRecord', noCache: true }
189
+      },
190
+      {
191
+        path: '/patients/patient/:id/scheduling',
192
+        component: () => import('@/xt_pages/user/scheduling'),
193
+        hidden: true,
194
+        is_menu: false,
195
+        name: 'scheduling',
196
+        meta: { title: 'scheduling', noCache: true }
197
+      },
198
+      {
199
+        path: '/patients/patient/:id/doctorAdvice',
200
+        component: () => import('@/xt_pages/user/doctorAdvice'),
201
+        hidden: true,
202
+        is_menu: false,
203
+        name: 'doctorAdvice',
204
+        meta: { title: 'doctorAdvice', noCache: true }
205
+      },
206
+      {
207
+        path: '/patients/inspection',
208
+        component: () => import('@/xt_pages/user/inspection'),
209
+        hidden: true,
210
+        is_menu: false,
211
+        name: 'Inspection',
212
+        meta: { title: 'inspection', noCache: true }
213
+      },
214
+      {
215
+        path: '/patients/course',
216
+        component: () => import('@/xt_pages/user/courseOfDisease'),
217
+        hidden: true,
218
+        is_menu: false,
219
+        name: 'CourseOfDiseaseManage',
220
+        meta: { title: 'CourseOfDiseaseManage', noCache: true }
221
+      },
222
+      {
223
+        path: '/patients/rescue',
224
+        component: () => import('@/xt_pages/user/rescueRecord'),
225
+        hidden: true,
226
+        is_menu: false,
227
+        name: 'RescueRecord',
228
+        meta: { title: 'RescueRecord', noCache: true }
229
+      },
230
+      {
231
+        path: '/patients/patient/:id/proeducation',
232
+        component: () => import('@/xt_pages/user/proeducation'),
233
+        hidden: true,
234
+        is_menu: false,
235
+        name: 'proeducation',
236
+        meta: { title: 'proeducation', noCache: true }
237
+      }
238
+    ]
239
+  },
240
+  {
241
+    path: '/workforce',
242
+    component: Layout,
243
+    redirect: 'noredirect',
244
+    name: 'workforce',
245
+    meta: {
246
+      title: 'workforce',
247
+      icon: 'paiban'
248
+    },
249
+    children: [
250
+      {
251
+        path: '/workforce/appointment',
252
+        component: () => import('@/xt_pages/workforce/appointment'),
253
+        name: 'appointment',
254
+        meta: { title: 'appointment', noCache: true }
255
+      },
256
+      {
257
+        path: '/workforce/sign',
258
+        component: () => import('@/xt_pages/workforce/sign'),
259
+        hidden: true,
260
+        is_menu: false,
261
+        name: 'workforcesign',
262
+        meta: { title: 'sign', noCache: true }
263
+      },
264
+      {
265
+        path: '/workforce/remind',
266
+        component: () => import('@/xt_pages/workforce/remind'),
267
+        name: 'remind',
268
+        meta: { title: 'remind', noCache: true }
269
+      },
270
+      {
271
+        path: '/workforce/template',
272
+        component: () => import('@/xt_pages/workforce/template'),
273
+        name: 'workforce_template',
274
+        hidden: true,
275
+        is_menu: false,
276
+        meta: { title: 'workforce_template', noCache: true }
277
+      },
278
+      {
279
+        path: '/workforce/schedule/print',
280
+        component: () => import('@/xt_pages/workforce/schedule_print'),
281
+        name: 'schedule_print',
282
+        hidden: true,
283
+        is_menu: false,
284
+        meta: { title: 'schedule_print', noCache: true }
285
+      }
286
+    ]
287
+  },
288
+  {
289
+    path: '/sign',
290
+    component: Layout,
291
+    redirct: '/sign/index',
292
+    children: [{
293
+      path: '/sign',
294
+      component: () => import('@/xt_pages/sign/index'),
295
+      name: 'sign',
296
+      meta: { title: 'signWeight', icon: 'sign', noCache: true }
297
+    }]
298
+  },
299
+  {
300
+    path: '/dialysis/',
301
+    component: Layout,
302
+    redirect: 'noredirect',
303
+    name: 'dialysis',
304
+    meta: {
305
+      title: 'dialysis',
306
+      icon: 'touxi'
307
+    },
308
+    children: [
309
+      { path: '/dialysis/dialysisrecord', component: () => import('@/xt_pages/dialysis/schedualPatient'), name: '透析记录', meta: { title: '透析记录' }},
310
+      {
311
+        path: '/dialysis/record/:id',
312
+        component: () => import('@/xt_pages/dialysis/dialysisPage'),
313
+        hidden: true,
314
+        is_menu: false,
315
+        name: 'paper',
316
+        meta: { title: 'paper', noCache: true }
317
+      },
318
+      {
319
+        path: '/dialysis/print',
320
+        component: () => import('@/xt_pages/dialysis/dialysisPrintOrder'),
321
+        hidden: true,
322
+        is_menu: false,
323
+        name: 'dialysisPrintOrder',
324
+        meta: { title: 'dialysisPrintOrder', noCache: true }
325
+      },
326
+
327
+      // { path: 'advice', component: () => import('@/xt_pages/dialysis/doctorAdvice'), name: 'advice', meta: { title: 'advice' }},
328
+      // { path: 'prepare', component: () => import('@/xt_pages/dialysis/dialysisPrepare'), name: 'prepare', meta: { title: 'prepare' }},
329
+      { path: '/dialysis/watch', component: () => import('@/xt_pages/dialysis/bloodPresssWatch'), name: 'watch', meta: { title: 'watch' }},
330
+      { path: '/dialysis/details', component: () => import('@/xt_pages/dialysis/details'), name: 'details', meta: { title: 'details' }, hidden: true, is_menu: false },
331
+      {
332
+        path: '/dialysis/print/batch',
333
+        component: () => import('@/xt_pages/dialysis/batch_print/batch_print_order'),
334
+        hidden: true,
335
+        is_menu: false,
336
+        name: 'dialysis_batch_print',
337
+        meta: { title: '批量打印', noCache: true }
338
+      },
339
+      { path: '/dialysis/board', component: () => import('@/xt_pages/dialysis/bulletinBoard'), name: '数据看板', meta: { title: '数据看板' }}
340
+    ]
341
+  },
342
+  {
343
+    path: '/stock/',
344
+    component: Layout,
345
+    redirect: 'noredirect',
346
+    name: 'stockManage',
347
+    meta: { title: 'stockManage', icon: 'stock' },
348
+    children: [
349
+      {
350
+        path: '/stock/config',
351
+        component: () => import('@/xt_pages/stock/index'),
352
+        name: 'config',
353
+        meta: { title: 'config' }
354
+      },
355
+      {
356
+        path: '/stock/in',
357
+        component: () => import('@/xt_pages/stock/stockInOrder'),
358
+        name: 'stockInOrder',
359
+        meta: { title: 'stockInOrder', noCache: true }
360
+      }, {
361
+        path: '/stock/in/other',
362
+        component: () => import('@/xt_pages/stock/otherStockInOrder'),
363
+        name: 'otherStockInOrder',
364
+        meta: { title: 'otherStockInOrder', noCache: true }
365
+      }, {
366
+        path: '/stock/return',
367
+        component: () => import('@/xt_pages/stock/salesReturnOrder'),
368
+        name: 'salesReturnOrder',
369
+        meta: { title: 'salesReturnOrder', noCache: true }
370
+      }, {
371
+        path: '/stock/return/other',
372
+        component: () => import('@/xt_pages/stock/otherSalesReturnOrder'),
373
+        name: 'otherSalesReturnOrder',
374
+        meta: { title: 'otherSalesReturnOrder', noCache: true }
375
+      },
376
+      {
377
+        path: '/stock/out',
378
+        component: () => import('@/xt_pages/stock/stockOutOrder'),
379
+        name: 'stockOutOrder',
380
+        meta: { title: 'stockOutOrder', noCache: true }
381
+      }, {
382
+        path: '/stock/out/other',
383
+        component: () => import('@/xt_pages/stock/otherStockOutOrder'),
384
+        name: 'otherStockOutOrder',
385
+        meta: { title: 'otherStockOutOrder', noCache: true }
386
+      }, {
387
+        path: '/stock/cancel',
388
+        component: () => import('@/xt_pages/stock/cancelStockOrder'),
389
+        name: 'cancelStockOrder',
390
+        meta: { title: 'cancelStockOrder', noCache: true }
391
+      }, {
392
+        path: '/stock/cancel/other',
393
+        component: () => import('@/xt_pages/stock/otherCancelStockOrder'),
394
+        name: 'otherCancelStockOrder',
395
+        meta: { title: 'otherCancelStockOrder', noCache: true }
396
+      }, {
397
+        path: '/stock/query',
398
+        component: () => import('@/xt_pages/stock/stockQuery'),
399
+        name: 'stockQuery',
400
+        meta: { title: 'stockQuery' }
401
+      }, {
402
+        path: '/stock/detail',
403
+        component: () => import('@/xt_pages/stock/stockDetailIndex'),
404
+        name: 'stockDetail',
405
+        meta: { title: 'stockDetail' }
406
+      },
407
+      {
408
+        path: '/stock/in/add',
409
+        component: () => import('@/xt_pages/stock/stockInOrderAdd'),
410
+        name: 'stockInOrderAdd',
411
+        hidden: true,
412
+        is_menu: false,
413
+        meta: { title: 'stockInOrderAdd' }
414
+      }, {
415
+        path: '/stock/in/detail',
416
+        component: () => import('@/xt_pages/stock/stockInDetail'),
417
+        name: 'stockInDetail',
418
+        hidden: true,
419
+        is_menu: false,
420
+        meta: { title: 'stockInDetail' }
421
+      }, {
422
+        path: '/stock/return/detail',
423
+        component: () => import('@/xt_pages/stock/salesReturnDetail'),
424
+        name: 'salesReturnDetail',
425
+        hidden: true,
426
+        is_menu: false,
427
+        meta: { title: 'salesReturnDetail' }
428
+      }, {
429
+        path: '/stock/return/add',
430
+        component: () => import('@/xt_pages/stock/salesReturnOrderAdd'),
431
+        name: 'salesReturnOrderAdd',
432
+        hidden: true,
433
+        is_menu: false,
434
+        meta: { title: 'salesReturnOrderAdd' }
435
+      }, {
436
+        path: '/stock/out/add',
437
+        component: () => import('@/xt_pages/stock/stockOutOrderAdd'),
438
+        name: 'stockOutOrderAdd',
439
+        hidden: true,
440
+        is_menu: false,
441
+        meta: { title: 'stockOutOrderAdd' }
442
+      }, {
443
+        path: '/stock/out/detail',
444
+        component: () => import('@/xt_pages/stock/stockOutDetail'),
445
+        name: 'stockOutDetail',
446
+        hidden: true,
447
+        is_menu: false,
448
+        meta: { title: 'stockOutDetail' }
449
+      }, {
450
+        path: '/stock/cancel/add',
451
+        component: () => import('@/xt_pages/stock/cancelStockOrderAdd'),
452
+        name: 'cancelStockOrderAdd',
453
+        hidden: true,
454
+        is_menu: false,
455
+        meta: { title: 'cancelStockOrderAdd' }
456
+      }, {
457
+        path: '/stock/cancel/detail',
458
+        component: () => import('@/xt_pages/stock/cancelStockDetail'),
459
+        name: 'cancelStockDetail',
460
+        hidden: true,
461
+        is_menu: false,
462
+        meta: { title: 'cancelStockDetail' }
463
+      }
464
+    ]
465
+  },
466
+
467
+  {
468
+    path: '/qcd',
469
+    component: Layout,
470
+    redirect: '/qcd/dialysistotal',
471
+    name: 'qcd',
472
+    alwaysShow: true,
473
+    meta: { title: '科室质控', icon: 'statistics' },
474
+    children: [
475
+      { path: '/statistics/index', component: () => import('@/xt_pages/statistics/index'), name: 'statistics', meta: { title: 'statistics' }},
476
+      { path: '/qcd/dialysistotal', component: () => import('@/xt_pages/qcd/dialysisTotal'), name: 'dialysistotal', meta: { title: '透析总量' }},
477
+      { path: '/qcd/processindicators', component: () => import('@/xt_pages/qcd/processIndicators'), name: 'processIndicators', meta: { title: '过程指标' }},
478
+      { path: '/qcd/outcomeIndicators/control', component: () => import('@/xt_pages/qcd/outcomeIndicators/control'), name: 'outcomeIndicatorsControl', meta: { title: '结果指标' }},
479
+      { path: '/qcd/outcomeIndicators/query', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/outcomeIndicators/query'), name: 'outcomeIndicatorsQuery', meta: { title: '指标查询' }},
480
+      { path: '/qcd/patientanalysis/total', component: () => import('@/xt_pages/qcd/patientAnalysis/total'), name: 'patientAnalysisTotal', meta: { title: '患者分析' }},
481
+      { path: '/qcd/patientanalysis/weight', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/weight'), name: 'patientAnalysisWeight', meta: { title: '体重分析' }},
482
+      { path: '/qcd/patientanalysis/bloodpressure', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/bloodPressure'), name: 'patientAnalysisBloodPressure', meta: { title: '血压分析' }},
483
+      { path: '/qcd/patientanalysis/dialysisage', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/dialysisAge'), name: 'patientAnalysisDialysisAge', meta: { title: '透析龄分析' }},
484
+      { path: '/qcd/patientanalysis/lapseto', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/lapseto'), name: 'patientAnalysisLapseto', meta: { title: '转归分析' }},
485
+      { path: '/qcd/patientanalysis/complication', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/complication'), name: 'patientAnalysisComplication', meta: { title: '并发症分析' }},
486
+      { path: '/qcd/patientanalysis/infectiousdiseases', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/infectiousDiseases'), name: 'patientAnalysisInfectiousDiseases', meta: { title: '传染病分析' }},
487
+      { path: '/qcd/pa/person/lapseto', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/person/lapseto'), name: 'paPersonLapseto', meta: { title: '转归' }},
488
+      { path: '/qcd/pa/person/weight', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/person/weight'), name: 'paPersonWeight', meta: { title: '体重' }},
489
+      { path: '/qcd/pa/person/bloodpressure', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/person/bloodPressure'), name: 'paPersonBloodPressure', meta: { title: '血压' }},
490
+      { path: '/qcd/pa/person/indicators', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/person/indicators'), name: 'paPersonIndicators', meta: { title: '指标控制' }},
491
+      { path: '/qcd/pa/person/oralmedicine', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/person/oralMedicine'), name: 'paPersonOralMedicine', meta: { title: '口服药' }}
492
+    ]
493
+  },
494
+  {
495
+    path: '/data/',
496
+    component: Layout,
497
+    redirect: 'noredirect',
498
+    name: 'data',
499
+    meta: { title: 'data_dictionary', icon: 'excel' },
500
+    children: [
501
+      { path: '/data/dictionary', component: () => import('@/xt_pages/data/index'), name: 'dictionary', meta: { title: 'field_config' }},
502
+      { path: '/data/template', component: () => import('@/xt_pages/data/template'), name: 'template', meta: { title: 'template' }},
503
+      { path: '/data/druguse', component: () => import('@/xt_pages/data/druguseTemplate'), name: 'druguse', meta: { title: 'druguse' }}
504
+    ]
505
+  },
506
+  {
507
+    path: '/device',
508
+    component: Layout,
509
+    redirect: '/device/main',
510
+    name: 'device',
511
+    alwaysShow: true,
512
+    meta: { title: 'deviceManage', icon: 'shebei' },
513
+    children: [
514
+      { path: '/device/zones', component: () => import('@/xt_pages/device/zone_main'), name: 'deviceZoneManage', meta: { title: 'deviceZoneManage' }},
515
+      { path: '/device/groups', component: () => import('@/xt_pages/device/group_main'), name: 'deviceGroupManage', meta: { title: 'deviceGroupManage' }},
516
+      { path: '/device/numbers', component: () => import('@/xt_pages/device/number_main'), name: 'deviceNumberManage', meta: { title: 'deviceNumberManage' }},
517
+      { path: '/device/main', component: () => import('@/xt_pages/device/main'), name: 'dialysisMachineManage', meta: { title: 'dialysisMachineManage' }}
518
+    ]
519
+  },
520
+  {
521
+    path: '/role',
522
+    component: Layout,
523
+    redirect: '/role/admin/manage',
524
+    name: 'role',
525
+    alwaysShow: true,
526
+    meta: { title: 'permissionManage', icon: 'role' },
527
+    children: [
528
+      { path: '/role/admin/manage', component: () => import('@/xt_pages/role/admin'), name: 'adminManage', meta: { title: 'adminManage' }},
529
+      { path: '/role/manage', component: () => import('@/xt_pages/role/role'), name: 'roleManage', meta: { title: 'roleManage' }},
530
+      { path: '/role/admin/create', component: () => import('@/xt_pages/role/CreateAdmin'), name: 'addAdmin', meta: { title: 'addAdmin', noCache: true }, hidden: true, is_menu: false },
531
+      { path: '/role/admin/edit', component: () => import('@/xt_pages/role/EditAdmin'), name: 'editAdmin', meta: { title: 'editAdmin', noCache: true }, hidden: true, is_menu: false },
532
+      { path: '/role/perview', component: () => import('@/xt_pages/role/EditPerview'), name: 'setupPerview', meta: { title: 'setupPerview', noCache: true }, hidden: true, is_menu: false },
533
+      { path: '/role/admin/specialpermission', component: () => import('@/xt_pages/role/special_permission'), name: 'special_permission_manage', meta: { title: 'special_permission_manage' }}
534
+    ]
535
+  },
536
+  {
537
+    path: '/fullscreenboard',
538
+    component: () => import('@/xt_pages/fullscreenboard/index'),
539
+    hidden: true
540
+  }
541
+  // /////////////本地要end/
542
+]
543
+
544
+export default new Router({
545
+  // mode: 'history', // require service support
546
+  scrollBehavior: () => ({ y: 0 }),
547
+  routes: xt_constantRouterMap
548
+})
549
+
550
+export const xt_asyncRouterMap = [
551
+// //////////////////////////////////线在开始
552
+  // {
553
+  //   path: '/patients',
554
+  //   component: Layout,
555
+  //   redirect: 'noredirect',
556
+  //   name: 'User',
557
+  //   alwaysShow: true,
558
+  //   meta: {
559
+  //     title: 'user',
560
+  //     icon: 'bingren'
561
+  //   },
562
+  //   children: [
563
+  //     {
564
+  //       path: '/patients/patients',
565
+  //       component: () => import('@/xt_pages/user/patients'),
566
+  //       name: 'Patient',
567
+  //       meta: { title: 'patient', noCache: true }
568
+  //     },
569
+  //     {
570
+  //       path: '/patients/create',
571
+  //       component: () => import('@/xt_pages/user/createPatient'),
572
+  //       name: 'createPatient',
573
+  //       meta: { title: 'createPatient', noCache: true }
574
+  //     },
575
+  //     {
576
+  //       path: '/patients/patient/:id',
577
+  //       component: () => import('@/xt_pages/user/patientInfo'),
578
+  //       hidden: true,
579
+  //       is_menu: false,
580
+  //       name: 'patient Page',
581
+  //       meta: { title: 'patientPage', noCache: true }
582
+  //     },
583
+  //     {
584
+  //       path: '/patients/patient/:id/edit',
585
+  //       component: () => import('@/xt_pages/user/editPatient'),
586
+  //       hidden: true,
587
+  //       is_menu: false,
588
+  //       name: 'Edit Patient',
589
+  //       meta: { title: 'editPatient', noCache: true }
590
+  //     },
591
+  //     {
592
+  //       path: '/patients/patient/:id/dialysisSolution',
593
+  //       component: () => import('@/xt_pages/user/dialysisSolution'),
594
+  //       hidden: true,
595
+  //       is_menu: false,
596
+  //       name: 'dialysisSolution',
597
+  //       meta: { title: 'dialysisSolution', noCache: true }
598
+  //     },
599
+  //     {
600
+  //       path: '/patients/patient/:id/weight',
601
+  //       component: () => import('@/xt_pages/user/weight'),
602
+  //       hidden: true,
603
+  //       is_menu: false,
604
+  //       name: 'weight',
605
+  //       meta: { title: 'weight', noCache: true }
606
+  //     },
607
+  //     {
608
+  //       path: '/patients/patient/:id/dialysisRecord',
609
+  //       component: () => import('@/xt_pages/user/dialysisRecord'),
610
+  //       hidden: true,
611
+  //       is_menu: false,
612
+  //       name: 'dialysisRecord',
613
+  //       meta: { title: 'dialysisRecord', noCache: true }
614
+  //     },
615
+  //     {
616
+  //       path: '/patients/patient/:id/scheduling',
617
+  //       component: () => import('@/xt_pages/user/scheduling'),
618
+  //       hidden: true,
619
+  //       is_menu: false,
620
+  //       name: 'scheduling',
621
+  //       meta: { title: 'scheduling', noCache: true }
622
+  //     },
623
+  //     {
624
+  //       path: '/patients/patient/:id/doctorAdvice',
625
+  //       component: () => import('@/xt_pages/user/doctorAdvice'),
626
+  //       hidden: true,
627
+  //       is_menu: false,
628
+  //       name: 'doctorAdvice',
629
+  //       meta: { title: 'doctorAdvice', noCache: true }
630
+  //     },
631
+  //     {
632
+  //       path: '/patients/inspection',
633
+  //       component: () => import('@/xt_pages/user/inspection'),
634
+  //       hidden: true,
635
+  //       is_menu: false,
636
+  //       name: 'Inspection',
637
+  //       meta: { title: 'inspection', noCache: true }
638
+  //     },
639
+  //     {
640
+  //       path: '/patients/course',
641
+  //       component: () => import('@/xt_pages/user/courseOfDisease'),
642
+  //       hidden: true,
643
+  //       is_menu: false,
644
+  //       name: 'CourseOfDiseaseManage',
645
+  //       meta: { title: 'CourseOfDiseaseManage', noCache: true }
646
+  //     },
647
+  //     {
648
+  //       path: '/patients/rescue',
649
+  //       component: () => import('@/xt_pages/user/rescueRecord'),
650
+  //       hidden: true,
651
+  //       is_menu: false,
652
+  //       name: 'RescueRecord',
653
+  //       meta: { title: 'RescueRecord', noCache: true }
654
+  //     },
655
+  //     {
656
+  //       path: '/patients/patient/:id/proeducation',
657
+  //       component: () => import('@/xt_pages/user/proeducation'),
658
+  //       hidden: true,
659
+  //       is_menu: false,
660
+  //       name: 'proeducation',
661
+  //       meta: { title: 'proeducation', noCache: true }
662
+  //     }
663
+  //   ]
664
+  // },
665
+  // {
666
+  //   path: '/workforce',
667
+  //   component: Layout,
668
+  //   redirect: 'noredirect',
669
+  //   name: 'workforce',
670
+  //   alwaysShow: true,
671
+  //   meta: {
672
+  //     title: 'workforce',
673
+  //     icon: 'paiban'
674
+  //   },
675
+  //   children: [
676
+  //     {
677
+  //       path: '/workforce/appointment',
678
+  //       component: () => import('@/xt_pages/workforce/appointment'),
679
+  //       name: 'appointment',
680
+  //       meta: { title: 'appointment', noCache: true }
681
+  //     },
682
+  //     {
683
+  //       path: '/workforce/sign',
684
+  //       component: () => import('@/xt_pages/workforce/sign'),
685
+  //       hidden: true,
686
+  //       is_menu: false,
687
+  //       name: 'workforcesign',
688
+  //       meta: { title: 'sign', noCache: true }
689
+  //     },
690
+  //     {
691
+  //       path: '/workforce/remind',
692
+  //       component: () => import('@/xt_pages/workforce/remind'),
693
+  //       name: 'remind',
694
+  //       meta: { title: 'remind', noCache: true }
695
+  //     },
696
+  //     {
697
+  //       path: "/workforce/template",
698
+  //       component: () => import("@/xt_pages/workforce/template"),
699
+  //       name: "workforce_template",
700
+  //       hidden: true,
701
+  //       is_menu: false,
702
+  //       meta: { title: 'workforce_template', noCache: true }
703
+  //     },
704
+  //     {
705
+  //       path: "/workforce/schedule/print",
706
+  //       component: () => import("@/xt_pages/workforce/schedule_print"),
707
+  //       name: "schedule_print",
708
+  //       hidden: true,
709
+  //       is_menu: false,
710
+  //       meta: { title: 'schedule_print', noCache: true }
711
+  //     },
712
+  //   ]
713
+  // },
714
+  // {
715
+  //   path: '/sign',
716
+  //   component: Layout,
717
+  //   redirct: '/sign/index',
718
+  //   children: [{
719
+  //     path: '/sign',
720
+  //     component: () => import('@/xt_pages/sign/index'),
721
+  //     name: 'sign',
722
+  //     meta: { title: 'signWeight', icon: 'sign', noCache: true }
723
+  //   }]
724
+  // },
725
+  // {
726
+  //   path: '/dialysis/',
727
+  //   component: Layout,
728
+  //   redirect: 'noredirect',
729
+  //   name: 'dialysis',
730
+  //   alwaysShow: true,
731
+  //   meta: {
732
+  //     title: 'dialysis',
733
+  //     icon: 'touxi'
734
+  //   },
735
+  //   children: [
736
+  //     { path: '/dialysis/dialysisrecord', component: () => import('@/xt_pages/dialysis/schedualPatient'), name: '透析记录', meta: { title: '透析记录' }},
737
+  //     {
738
+  //       path: '/dialysis/record/:id',
739
+  //       component: () => import('@/xt_pages/dialysis/dialysisPage'),
740
+  //       hidden: true,
741
+  //       is_menu: false,
742
+  //       name: 'paper',
743
+  //       meta: { title: 'paper', noCache: true }
744
+  //     },
745
+  //     {
746
+  //       path: '/dialysis/print',
747
+  //       component: () => import('@/xt_pages/dialysis/dialysisPrintOrder'),
748
+  //       hidden: true,
749
+  //       is_menu: false,
750
+  //       name: 'dialysisPrintOrder',
751
+  //       meta: { title: 'dialysisPrintOrder', noCache: true }
752
+  //     },
753
+
754
+  //     // { path: 'advice', component: () => import('@/xt_pages/dialysis/doctorAdvice'), name: 'advice', meta: { title: 'advice' }},
755
+  //     // { path: 'prepare', component: () => import('@/xt_pages/dialysis/dialysisPrepare'), name: 'prepare', meta: { title: 'prepare' }},
756
+  //     { path: '/dialysis/watch', component: () => import('@/xt_pages/dialysis/bloodPresssWatch'), name: 'watch', meta: { title: 'watch' }},
757
+  //     { path: '/dialysis/details', component: () => import('@/xt_pages/dialysis/details'), name: 'details', meta: { title: 'details' }, is_menu: false,},
758
+  //     {
759
+  //       path: '/dialysis/print/batch',
760
+  //       component: () => import('@/xt_pages/dialysis/batch_print/batch_print_order'),
761
+  //       hidden: true,
762
+  //       is_menu: false,
763
+  //       name: 'dialysis_batch_print',
764
+  //       meta: { title: '批量打印', noCache: true }
765
+  //     },
766
+  //     { path: '/dialysis/board', component: () => import('@/xt_pages/dialysis/bulletinBoard'), name: '数据看板', meta: { title: '数据看板' }},
767
+  //   ]
768
+  // },
769
+  // {
770
+  //   path: '/stock/',
771
+  //   component: Layout,
772
+  //   redirect: 'noredirect',
773
+  //   name: 'stockManage',
774
+  //   meta: { title: 'stockManage', icon: 'stock' },
775
+  //   children: [
776
+  //     {
777
+  //       path: '/stock/in',
778
+  //       component: () => import('@/xt_pages/stock/stockInOrder'),
779
+  //       name: 'stockInOrder',
780
+  //       meta: { title: 'stockInOrder', noCache: true }
781
+  //     }, {
782
+  //       path: '/stock/in/other',
783
+  //       component: () => import('@/xt_pages/stock/otherStockInOrder'),
784
+  //       name: 'otherStockInOrder',
785
+  //       meta: { title: 'otherStockInOrder', noCache: true }
786
+  //     }, {
787
+  //       path: '/stock/return',
788
+  //       component: () => import('@/xt_pages/stock/salesReturnOrder'),
789
+  //       name: 'salesReturnOrder',
790
+  //       meta: { title: 'salesReturnOrder', noCache: true }
791
+  //     }, {
792
+  //       path: '/stock/return/other',
793
+  //       component: () => import('@/xt_pages/stock/otherSalesReturnOrder'),
794
+  //       name: 'otherSalesReturnOrder',
795
+  //       meta: { title: 'otherSalesReturnOrder', noCache: true }
796
+  //     },
797
+  //     {
798
+  //       path: '/stock/out',
799
+  //       component: () => import('@/xt_pages/stock/stockOutOrder'),
800
+  //       name: 'stockOutOrder',
801
+  //       meta: { title: 'stockOutOrder', noCache: true }
802
+  //     }, {
803
+  //       path: '/stock/out/other',
804
+  //       component: () => import('@/xt_pages/stock/otherStockOutOrder'),
805
+  //       name: 'otherStockOutOrder',
806
+  //       meta: { title: 'otherStockOutOrder', noCache: true }
807
+  //     }, {
808
+  //       path: '/stock/cancel',
809
+  //       component: () => import('@/xt_pages/stock/cancelStockOrder'),
810
+  //       name: 'cancelStockOrder',
811
+  //       meta: { title: 'cancelStockOrder', noCache: true }
812
+  //     }, {
813
+  //       path: '/stock/cancel/other',
814
+  //       component: () => import('@/xt_pages/stock/otherCancelStockOrder'),
815
+  //       name: 'otherCancelStockOrder',
816
+  //       meta: { title: 'otherCancelStockOrder', noCache: true }
817
+  //     }, {
818
+  //       path: '/stock/query',
819
+  //       component: () => import('@/xt_pages/stock/stockQuery'),
820
+  //       name: 'stockQuery',
821
+  //       meta: { title: 'stockQuery' }
822
+  //     }, {
823
+  //       path: '/stock/detail',
824
+  //       component: () => import('@/xt_pages/stock/stockDetailIndex'),
825
+  //       name: 'stockDetail',
826
+  //       meta: { title: 'stockDetail' }
827
+  //     },{
828
+  //       path: '/stock/in/add',
829
+  //       component: () => import('@/xt_pages/stock/stockInOrderAdd'),
830
+  //       name: 'stockInOrderAdd',
831
+  //       hidden: true,
832
+  //       is_menu: false,
833
+  //       meta: { title: 'stockInOrderAdd' }
834
+  //     }, {
835
+  //       path: '/stock/in/detail',
836
+  //       component: () => import('@/xt_pages/stock/stockInDetail'),
837
+  //       name: 'stockInDetail',
838
+  //       hidden: true,
839
+  //       is_menu: false,
840
+  //       meta: { title: 'stockInDetail' }
841
+  //     }, {
842
+  //       path: '/stock/return/detail',
843
+  //       component: () => import('@/xt_pages/stock/salesReturnDetail'),
844
+  //       name: 'salesReturnDetail',
845
+  //       hidden: true,
846
+  //       is_menu: false,
847
+  //       meta: { title: 'salesReturnDetail' }
848
+  //     }, {
849
+  //       path: '/stock/return/add',
850
+  //       component: () => import('@/xt_pages/stock/salesReturnOrderAdd'),
851
+  //       name: 'salesReturnOrderAdd',
852
+  //       hidden: true,
853
+  //       is_menu: false,
854
+  //       meta: { title: 'salesReturnOrderAdd' }
855
+  //     }, {
856
+  //       path: '/stock/out/add',
857
+  //       component: () => import('@/xt_pages/stock/stockOutOrderAdd'),
858
+  //       name: 'stockOutOrderAdd',
859
+  //       hidden: true,
860
+  //       is_menu: false,
861
+  //       meta: { title: 'stockOutOrderAdd', noCache: true }
862
+  //     }, {
863
+  //       path: '/stock/out/detail',
864
+  //       component: () => import('@/xt_pages/stock/stockOutDetail'),
865
+  //       name: 'stockOutDetail',
866
+  //       hidden: true,
867
+  //       is_menu: false,
868
+  //       meta: { title: 'stockOutDetail', noCache: true }
869
+  //     }, {
870
+  //       path: '/stock/cancel/add',
871
+  //       component: () => import('@/xt_pages/stock/cancelStockOrderAdd'),
872
+  //       name: 'cancelStockOrderAdd',
873
+  //       hidden: true,
874
+  //       is_menu: false,
875
+  //       meta: { title: 'cancelStockOrderAdd', noCache: true }
876
+  //     }, {
877
+  //       path: '/stock/cancel/detail',
878
+  //       component: () => import('@/xt_pages/stock/cancelStockDetail'),
879
+  //       name: 'cancelStockDetail',
880
+  //       hidden: true,
881
+  //       is_menu: false,
882
+  //       meta: { title: 'cancelStockDetail', noCache: true }
883
+  //     },
884
+  //     {
885
+  //       path: '/stock/config',
886
+  //       component: () => import('@/xt_pages/stock/index'),
887
+  //       name: 'config',
888
+  //       meta: { title: 'config' }
889
+  //     }
890
+  //   ]
891
+  //  },
892
+  //  {
893
+  //    path: '/qcd',
894
+  //    component: Layout,
895
+  //    redirect: '/qcd/dialysistotal',
896
+  //    name: 'qcd',
897
+  //    alwaysShow: true,
898
+  //    meta: { title: '科室质控', icon: 'table' },
899
+  //    children: [
900
+  //      { path: '/statistics/index', component: () => import('@/xt_pages/statistics/index'), name: 'statistics', meta: { title: 'statistics' }},
901
+  //      { path: '/qcd/dialysistotal', component: () => import('@/xt_pages/qcd/dialysisTotal'), name: 'dialysistotal', meta: { title: '透析总量' }},
902
+  //      { path: '/qcd/processindicators', component: () => import('@/xt_pages/qcd/processIndicators'), name: 'processIndicators', meta: { title: '过程指标' }},
903
+  //      { path: '/qcd/outcomeIndicators/control', component: () => import('@/xt_pages/qcd/outcomeIndicators/control'), name: 'outcomeIndicatorsControl', meta: { title: '结果指标' }},
904
+  //      { path: '/qcd/outcomeIndicators/query', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/outcomeIndicators/query'), name: 'outcomeIndicatorsQuery', meta: { title: '指标查询' }},
905
+  //      { path: '/qcd/patientanalysis/total', component: () => import('@/xt_pages/qcd/patientAnalysis/total'), name: 'patientAnalysisTotal', meta: { title: '患者分析' }},
906
+  //      { path: '/qcd/patientanalysis/weight',hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/weight'), name: 'patientAnalysisWeight', meta: { title: '体重分析' }},
907
+  //      { path: '/qcd/patientanalysis/bloodpressure', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/bloodPressure'), name: 'patientAnalysisBloodPressure', meta: { title: '血压分析' }},
908
+  //      { path: '/qcd/patientanalysis/dialysisage', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/dialysisAge'), name: 'patientAnalysisDialysisAge', meta: { title: '透析龄分析' }},
909
+  //      { path: '/qcd/patientanalysis/lapseto', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/lapseto'), name: 'patientAnalysisLapseto', meta: { title: '转归分析' }},
910
+  //      { path: '/qcd/patientanalysis/complication', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/complication'), name: 'patientAnalysisComplication', meta: { title: '并发症分析' }},
911
+  //      { path: '/qcd/patientanalysis/infectiousdiseases', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/infectiousDiseases'), name: 'patientAnalysisInfectiousDiseases', meta: { title: '传染病分析' }},
912
+  //      { path: '/qcd/pa/person/lapseto', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/person/lapseto'), name: 'paPersonLapseto', meta: { title: '转归' }},
913
+  //      { path: '/qcd/pa/person/weight', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/person/weight'), name: 'paPersonWeight', meta: { title: '体重' }},
914
+  //      { path: '/qcd/pa/person/bloodpressure', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/person/bloodPressure'), name: 'paPersonBloodPressure', meta: { title: '血压' }},
915
+  //      { path: '/qcd/pa/person/indicators', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/person/indicators'), name: 'paPersonIndicators', meta: { title: '指标控制' }},
916
+  //      { path: '/qcd/pa/person/oralmedicine', hidden: true, is_menu: false, component: () => import('@/xt_pages/qcd/patientAnalysis/person/oralMedicine'), name: 'paPersonOralMedicine', meta: { title: '口服药' }},
917
+  //    ]
918
+  //  },
919
+  //  {
920
+  //   path: '/data/',
921
+  //   component: Layout,
922
+  //   redirect: 'noredirect',
923
+  //   name: 'data',
924
+  //   meta: { title: 'data_dictionary', icon: 'excel' },
925
+  //   children: [
926
+  //     { path: '/data/dictionary', component: () => import('@/xt_pages/data/index'), name: 'dictionary', meta: { title: 'field_config' }},
927
+  //     { path: '/data/template', component: () => import('@/xt_pages/data/template'), name: 'template', meta: { title: 'template' }},
928
+  //     { path: '/data/druguse', component: () => import('@/xt_pages/data/druguseTemplate'), name: 'druguse', meta: { title: 'druguse' }}
929
+  //   ]
930
+  // },
931
+  // {
932
+  //   path: '/device',
933
+  //   component: Layout,
934
+  //   redirect: '/device/main',
935
+  //   name: 'device',
936
+  //   alwaysShow: true,
937
+  //   meta: { title: 'deviceManage', icon: 'shebei' },
938
+  //   children: [
939
+  //     { path: '/device/zones', component: () => import('@/xt_pages/device/zone_main'), name: 'deviceZoneManage', meta: { title: 'deviceZoneManage' }},
940
+  //     { path: '/device/groups', component: () => import('@/xt_pages/device/group_main'), name: 'deviceGroupManage', meta: { title: 'deviceGroupManage' }},
941
+  //     { path: '/device/numbers', component: () => import('@/xt_pages/device/number_main'), name: 'deviceNumberManage', meta: { title: 'deviceNumberManage' }},
942
+  //     { path: '/device/main', component: () => import('@/xt_pages/device/main'), name: 'dialysisMachineManage', meta: { title: 'dialysisMachineManage' }}
943
+  //   ]
944
+  // },
945
+  // /////////////////////////////////////线在end
946
+  {
947
+    path: '/role',
948
+    component: Layout,
949
+    redirect: '/role/admin/manage',
950
+    name: 'role',
951
+    alwaysShow: true,
952
+    meta: { title: 'permissionManage', icon: 'role' },
953
+    children: [
954
+      { path: '/role/admin/manage', component: () => import('@/xt_pages/role/admin'), name: 'adminManage', meta: { title: 'adminManage' }},
955
+      { path: '/role/manage', component: () => import('@/xt_pages/role/role'), name: 'roleManage', meta: { title: 'roleManage' }},
956
+      { path: '/role/admin/create', component: () => import('@/xt_pages/role/CreateAdmin'), name: 'addAdmin', meta: { title: 'addAdmin', noCache: true }, hidden: true, is_menu: false },
957
+      { path: '/role/admin/edit', component: () => import('@/xt_pages/role/EditAdmin'), name: 'editAdmin', meta: { title: 'editAdmin', noCache: true }, hidden: true, is_menu: false },
958
+      { path: '/role/perview', component: () => import('@/xt_pages/role/EditPerview'), name: 'setupPerview', meta: { title: 'setupPerview', noCache: true }, hidden: true, is_menu: false },
959
+      { path: '/role/admin/specialpermission', component: () => import('@/xt_pages/role/special_permission'), name: 'special_permission_manage', meta: { title: 'special_permission_manage' }}
960
+    ]
961
+  }
962
+]

+ 38 - 0
src/router/modules/data_dict.js Näytä tiedosto

@@ -0,0 +1,38 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+  path: '/data/',
5
+  component: Layout,
6
+  redirect: 'noredirect',
7
+  name: 'data',
8
+  alwaysShow: true,
9
+  meta: {
10
+    title: 'data_dictionary',
11
+    icon: 'excel'
12
+  },
13
+  children: [{
14
+    path: '/data/dictionary',
15
+    component: () => import('@/xt_pages/data/index'),
16
+    name: 'dictionary',
17
+    meta: {
18
+      title: 'field_config'
19
+    }
20
+  },
21
+  {
22
+    path: '/data/template',
23
+    component: () => import('@/xt_pages/data/template'),
24
+    name: 'template',
25
+    meta: {
26
+      title: 'template'
27
+    }
28
+  },
29
+  {
30
+    path: '/data/druguse',
31
+    component: () => import('@/xt_pages/data/druguseTemplate'),
32
+    name: 'druguse',
33
+    meta: {
34
+      title: 'druguse'
35
+    }
36
+  }
37
+  ]
38
+}

+ 46 - 0
src/router/modules/device.js Näytä tiedosto

@@ -0,0 +1,46 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+  path: '/device',
5
+  component: Layout,
6
+  redirect: '/device/main',
7
+  name: 'device',
8
+  alwaysShow: true,
9
+  meta: {
10
+    title: 'deviceManage',
11
+    icon: 'shebei'
12
+  },
13
+  children: [{
14
+    path: '/device/zones',
15
+    component: () => import('@/xt_pages/device/zone_main'),
16
+    name: 'deviceZoneManage',
17
+    meta: {
18
+      title: 'deviceZoneManage'
19
+    }
20
+  },
21
+  {
22
+    path: '/device/groups',
23
+    component: () => import('@/xt_pages/device/group_main'),
24
+    name: 'deviceGroupManage',
25
+    meta: {
26
+      title: 'deviceGroupManage'
27
+    }
28
+  },
29
+  {
30
+    path: '/device/numbers',
31
+    component: () => import('@/xt_pages/device/number_main'),
32
+    name: 'deviceNumberManage',
33
+    meta: {
34
+      title: 'deviceNumberManage'
35
+    }
36
+  },
37
+  {
38
+    path: '/device/main',
39
+    component: () => import('@/xt_pages/device/main'),
40
+    name: 'dialysisMachineManage',
41
+    meta: {
42
+      title: 'dialysisMachineManage'
43
+    }
44
+  }
45
+  ]
46
+}

+ 84 - 0
src/router/modules/dialysis.js Näytä tiedosto

@@ -0,0 +1,84 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+  path: '/dialysis/',
5
+  component: Layout,
6
+  redirect: 'noredirect',
7
+  name: 'dialysis',
8
+  alwaysShow: true,
9
+  meta: {
10
+    title: 'dialysis',
11
+    icon: 'touxi'
12
+  },
13
+  children: [{
14
+    path: '/dialysis/dialysisrecord',
15
+    component: () => import('@/xt_pages/dialysis/schedualPatient'),
16
+    name: '透析记录',
17
+    meta: {
18
+      title: '透析记录'
19
+    }
20
+  },
21
+  {
22
+    path: '/dialysis/record/:id',
23
+    component: () => import('@/xt_pages/dialysis/dialysisPage'),
24
+    hidden: true,
25
+    is_menu: false,
26
+    name: 'paper',
27
+    meta: {
28
+      title: 'paper',
29
+      noCache: true
30
+    }
31
+  },
32
+  {
33
+    path: '/dialysis/print',
34
+    component: () => import('@/xt_pages/dialysis/dialysisPrintOrder'),
35
+    hidden: true,
36
+    is_menu: false,
37
+    name: 'dialysisPrintOrder',
38
+    meta: {
39
+      title: 'dialysisPrintOrder',
40
+      noCache: true
41
+    }
42
+  },
43
+
44
+    // { path: 'advice', component: () => import('@/xt_pages/dialysis/doctorAdvice'), name: 'advice', meta: { title: 'advice' }},
45
+    // { path: 'prepare', component: () => import('@/xt_pages/dialysis/dialysisPrepare'), name: 'prepare', meta: { title: 'prepare' }},
46
+  {
47
+    path: '/dialysis/watch',
48
+    component: () => import('@/xt_pages/dialysis/bloodPresssWatch'),
49
+    name: 'watch',
50
+    meta: {
51
+      title: 'watch'
52
+    }
53
+  },
54
+  {
55
+    path: '/dialysis/details',
56
+    component: () => import('@/xt_pages/dialysis/details'),
57
+    name: 'details',
58
+    meta: {
59
+      title: 'details'
60
+    },
61
+    hidden: true,
62
+    is_menu: false
63
+  },
64
+  {
65
+    path: '/dialysis/print/batch',
66
+    component: () => import('@/xt_pages/dialysis/batch_print/batch_print_order'),
67
+    hidden: true,
68
+    is_menu: false,
69
+    name: 'dialysis_batch_print',
70
+    meta: {
71
+      title: '批量打印',
72
+      noCache: true
73
+    }
74
+  },
75
+  {
76
+    path: '/dialysis/board',
77
+    component: () => import('@/xt_pages/dialysis/bulletinBoard'),
78
+    name: '数据看板',
79
+    meta: {
80
+      title: '数据看板'
81
+    }
82
+  }
83
+  ]
84
+}

+ 153 - 0
src/router/modules/patient.js Näytä tiedosto

@@ -0,0 +1,153 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+  path: '/patients',
5
+  component: Layout,
6
+  redirect: 'noredirect',
7
+  name: 'User',
8
+  alwaysShow: true,
9
+  meta: {
10
+    title: 'user',
11
+    icon: 'bingren'
12
+  },
13
+  children: [{
14
+    path: '/patients/patients',
15
+    component: () => import('@/xt_pages/user/patients'),
16
+    name: 'Patient',
17
+    meta: {
18
+      title: 'patient',
19
+      noCache: true
20
+    }
21
+  },
22
+  {
23
+    path: '/patients/create',
24
+    component: () => import('@/xt_pages/user/createPatient'),
25
+    name: 'createPatient',
26
+    meta: {
27
+      title: 'createPatient',
28
+      noCache: true
29
+    }
30
+  },
31
+  {
32
+    path: '/patients/patient/:id',
33
+    component: () => import('@/xt_pages/user/patientInfo'),
34
+    hidden: true,
35
+    is_menu: false,
36
+    name: 'patient Page',
37
+    meta: {
38
+      title: 'patientPage',
39
+      noCache: true
40
+    }
41
+  },
42
+  {
43
+    path: '/patients/patient/:id/edit',
44
+    component: () => import('@/xt_pages/user/editPatient'),
45
+    hidden: true,
46
+    is_menu: false,
47
+    name: 'Edit Patient',
48
+    meta: {
49
+      title: 'editPatient',
50
+      noCache: true
51
+    }
52
+  },
53
+  {
54
+    path: '/patients/patient/:id/dialysisSolution',
55
+    component: () => import('@/xt_pages/user/dialysisSolution'),
56
+    hidden: true,
57
+    is_menu: false,
58
+    name: 'dialysisSolution',
59
+    meta: {
60
+      title: 'dialysisSolution',
61
+      noCache: true
62
+    }
63
+  },
64
+  {
65
+    path: '/patients/patient/:id/weight',
66
+    component: () => import('@/xt_pages/user/weight'),
67
+    hidden: true,
68
+    is_menu: false,
69
+    name: 'weight',
70
+    meta: {
71
+      title: 'weight',
72
+      noCache: true
73
+    }
74
+  },
75
+  {
76
+    path: '/patients/patient/:id/dialysisRecord',
77
+    component: () => import('@/xt_pages/user/dialysisRecord'),
78
+    hidden: true,
79
+    is_menu: false,
80
+    name: 'dialysisRecord',
81
+    meta: {
82
+      title: 'dialysisRecord',
83
+      noCache: true
84
+    }
85
+  },
86
+  {
87
+    path: '/patients/patient/:id/scheduling',
88
+    component: () => import('@/xt_pages/user/scheduling'),
89
+    hidden: true,
90
+    is_menu: false,
91
+    name: 'scheduling',
92
+    meta: {
93
+      title: 'scheduling',
94
+      noCache: true
95
+    }
96
+  },
97
+  {
98
+    path: '/patients/patient/:id/doctorAdvice',
99
+    component: () => import('@/xt_pages/user/doctorAdvice'),
100
+    hidden: true,
101
+    is_menu: false,
102
+    name: 'doctorAdvice',
103
+    meta: {
104
+      title: 'doctorAdvice',
105
+      noCache: true
106
+    }
107
+  },
108
+  {
109
+    path: '/patients/inspection',
110
+    component: () => import('@/xt_pages/user/inspection'),
111
+    hidden: true,
112
+    is_menu: false,
113
+    name: 'Inspection',
114
+    meta: {
115
+      title: 'inspection',
116
+      noCache: true
117
+    }
118
+  },
119
+  {
120
+    path: '/patients/course',
121
+    component: () => import('@/xt_pages/user/courseOfDisease'),
122
+    hidden: true,
123
+    is_menu: false,
124
+    name: 'CourseOfDiseaseManage',
125
+    meta: {
126
+      title: 'CourseOfDiseaseManage',
127
+      noCache: true
128
+    }
129
+  },
130
+  {
131
+    path: '/patients/rescue',
132
+    component: () => import('@/xt_pages/user/rescueRecord'),
133
+    hidden: true,
134
+    is_menu: false,
135
+    name: 'RescueRecord',
136
+    meta: {
137
+      title: 'RescueRecord',
138
+      noCache: true
139
+    }
140
+  },
141
+  {
142
+    path: '/patients/patient/:id/proeducation',
143
+    component: () => import('@/xt_pages/user/proeducation'),
144
+    hidden: true,
145
+    is_menu: false,
146
+    name: 'proeducation',
147
+    meta: {
148
+      title: 'proeducation',
149
+      noCache: true
150
+    }
151
+  }
152
+  ]
153
+}

+ 174 - 0
src/router/modules/qcd.js Näytä tiedosto

@@ -0,0 +1,174 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+  path: '/qcd',
5
+  component: Layout,
6
+  redirect: '/qcd/dialysistotal',
7
+  name: 'qcd',
8
+  alwaysShow: true,
9
+  meta: {
10
+    title: '科室质控',
11
+    icon: 'statistics'
12
+  },
13
+  children: [{
14
+    path: '/statistics/index',
15
+    component: () => import('@/xt_pages/statistics/index'),
16
+    name: 'statistics',
17
+    meta: {
18
+      title: 'statistics'
19
+    }
20
+  },
21
+  {
22
+    path: '/qcd/dialysistotal',
23
+    component: () => import('@/xt_pages/qcd/dialysisTotal'),
24
+    name: 'dialysistotal',
25
+    meta: {
26
+      title: '透析总量'
27
+    }
28
+  },
29
+  {
30
+    path: '/qcd/processindicators',
31
+    component: () => import('@/xt_pages/qcd/processIndicators'),
32
+    name: 'processIndicators',
33
+    meta: {
34
+      title: '过程指标'
35
+    }
36
+  },
37
+  {
38
+    path: '/qcd/outcomeIndicators/control',
39
+    component: () => import('@/xt_pages/qcd/outcomeIndicators/control'),
40
+    name: 'outcomeIndicatorsControl',
41
+    meta: {
42
+      title: '结果指标'
43
+    }
44
+  },
45
+  {
46
+    path: '/qcd/outcomeIndicators/query',
47
+    hidden: true,
48
+    is_menu: false,
49
+    component: () => import('@/xt_pages/qcd/outcomeIndicators/query'),
50
+    name: 'outcomeIndicatorsQuery',
51
+    meta: {
52
+      title: '指标查询'
53
+    }
54
+  },
55
+  {
56
+    path: '/qcd/patientanalysis/total',
57
+    component: () => import('@/xt_pages/qcd/patientAnalysis/total'),
58
+    name: 'patientAnalysisTotal',
59
+    meta: {
60
+      title: '患者分析'
61
+    }
62
+  },
63
+  {
64
+    path: '/qcd/patientanalysis/weight',
65
+    hidden: true,
66
+    is_menu: false,
67
+    component: () => import('@/xt_pages/qcd/patientAnalysis/weight'),
68
+    name: 'patientAnalysisWeight',
69
+    meta: {
70
+      title: '体重分析'
71
+    }
72
+  },
73
+  {
74
+    path: '/qcd/patientanalysis/bloodpressure',
75
+    hidden: true,
76
+    is_menu: false,
77
+    component: () => import('@/xt_pages/qcd/patientAnalysis/bloodPressure'),
78
+    name: 'patientAnalysisBloodPressure',
79
+    meta: {
80
+      title: '血压分析'
81
+    }
82
+  },
83
+  {
84
+    path: '/qcd/patientanalysis/dialysisage',
85
+    hidden: true,
86
+    is_menu: false,
87
+    component: () => import('@/xt_pages/qcd/patientAnalysis/dialysisAge'),
88
+    name: 'patientAnalysisDialysisAge',
89
+    meta: {
90
+      title: '透析龄分析'
91
+    }
92
+  },
93
+  {
94
+    path: '/qcd/patientanalysis/lapseto',
95
+    hidden: true,
96
+    is_menu: false,
97
+    component: () => import('@/xt_pages/qcd/patientAnalysis/lapseto'),
98
+    name: 'patientAnalysisLapseto',
99
+    meta: {
100
+      title: '转归分析'
101
+    }
102
+  },
103
+  {
104
+    path: '/qcd/patientanalysis/complication',
105
+    hidden: true,
106
+    is_menu: false,
107
+    component: () => import('@/xt_pages/qcd/patientAnalysis/complication'),
108
+    name: 'patientAnalysisComplication',
109
+    meta: {
110
+      title: '并发症分析'
111
+    }
112
+  },
113
+  {
114
+    path: '/qcd/patientanalysis/infectiousdiseases',
115
+    hidden: true,
116
+    is_menu: false,
117
+    component: () => import('@/xt_pages/qcd/patientAnalysis/infectiousDiseases'),
118
+    name: 'patientAnalysisInfectiousDiseases',
119
+    meta: {
120
+      title: '传染病分析'
121
+    }
122
+  },
123
+  {
124
+    path: '/qcd/pa/person/lapseto',
125
+    hidden: true,
126
+    is_menu: false,
127
+    component: () => import('@/xt_pages/qcd/patientAnalysis/person/lapseto'),
128
+    name: 'paPersonLapseto',
129
+    meta: {
130
+      title: '转归'
131
+    }
132
+  },
133
+  {
134
+    path: '/qcd/pa/person/weight',
135
+    hidden: true,
136
+    is_menu: false,
137
+    component: () => import('@/xt_pages/qcd/patientAnalysis/person/weight'),
138
+    name: 'paPersonWeight',
139
+    meta: {
140
+      title: '体重'
141
+    }
142
+  },
143
+  {
144
+    path: '/qcd/pa/person/bloodpressure',
145
+    hidden: true,
146
+    is_menu: false,
147
+    component: () => import('@/xt_pages/qcd/patientAnalysis/person/bloodPressure'),
148
+    name: 'paPersonBloodPressure',
149
+    meta: {
150
+      title: '血压'
151
+    }
152
+  },
153
+  {
154
+    path: '/qcd/pa/person/indicators',
155
+    hidden: true,
156
+    is_menu: false,
157
+    component: () => import('@/xt_pages/qcd/patientAnalysis/person/indicators'),
158
+    name: 'paPersonIndicators',
159
+    meta: {
160
+      title: '指标控制'
161
+    }
162
+  },
163
+  {
164
+    path: '/qcd/pa/person/oralmedicine',
165
+    hidden: true,
166
+    is_menu: false,
167
+    component: () => import('@/xt_pages/qcd/patientAnalysis/person/oralMedicine'),
168
+    name: 'paPersonOralMedicine',
169
+    meta: {
170
+      title: '口服药'
171
+    }
172
+  }
173
+  ]
174
+}

+ 71 - 0
src/router/modules/role.js Näytä tiedosto

@@ -0,0 +1,71 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+  path: '/role',
5
+  component: Layout,
6
+  redirect: '/role/admin/manage',
7
+  name: 'role',
8
+  alwaysShow: true,
9
+  meta: {
10
+    title: 'permissionManage',
11
+    icon: 'role'
12
+  },
13
+  children: [{
14
+    path: '/role/admin/manage',
15
+    component: () => import('@/xt_pages/role/admin'),
16
+    name: 'adminManage',
17
+    meta: {
18
+      title: 'adminManage'
19
+    }
20
+  },
21
+  {
22
+    path: '/role/manage',
23
+    component: () => import('@/xt_pages/role/role'),
24
+    name: 'roleManage',
25
+    meta: {
26
+      title: 'roleManage'
27
+    }
28
+  },
29
+  {
30
+    path: '/role/admin/create',
31
+    component: () => import('@/xt_pages/role/CreateAdmin'),
32
+    name: 'addAdmin',
33
+    meta: {
34
+      title: 'addAdmin',
35
+      noCache: true
36
+    },
37
+    hidden: true,
38
+    is_menu: false
39
+  },
40
+  {
41
+    path: '/role/admin/edit',
42
+    component: () => import('@/xt_pages/role/EditAdmin'),
43
+    name: 'editAdmin',
44
+    meta: {
45
+      title: 'editAdmin',
46
+      noCache: true
47
+    },
48
+    hidden: true,
49
+    is_menu: false
50
+  },
51
+  {
52
+    path: '/role/perview',
53
+    component: () => import('@/xt_pages/role/EditPerview'),
54
+    name: 'setupPerview',
55
+    meta: {
56
+      title: 'setupPerview',
57
+      noCache: true
58
+    },
59
+    hidden: true,
60
+    is_menu: false
61
+  },
62
+  {
63
+    path: '/role/admin/specialpermission',
64
+    component: () => import('@/xt_pages/role/special_permission'),
65
+    name: 'special_permission_manage',
66
+    meta: {
67
+      title: 'special_permission_manage'
68
+    }
69
+  }
70
+  ]
71
+}

+ 117 - 0
src/router/modules/service.js Näytä tiedosto

@@ -0,0 +1,117 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+  path: '/service',
5
+  component: Layout,
6
+  hidden: true,
7
+  is_menu: false,
8
+
9
+  meta: {
10
+    title: 'service',
11
+    icon: 'shebei'
12
+  },
13
+  children: [{
14
+    path: '/service',
15
+    component: () => import('@/xt_pages/service/index'),
16
+    hidden: true,
17
+    is_menu: false,
18
+    name: 'service',
19
+    meta: {
20
+      title: 'service',
21
+      icon: 'shebei',
22
+      noCache: true
23
+    }
24
+  }, {
25
+    path: '/service/invoice',
26
+    component: () => import('@/xt_pages/service/invoice'),
27
+    hidden: true,
28
+    is_menu: false,
29
+    name: 'invoice',
30
+    meta: {
31
+      title: 'invoice',
32
+      icon: 'shebei',
33
+      noCache: true
34
+    }
35
+  }, {
36
+    path: '/service/invoice/apply',
37
+    component: () => import('@/xt_pages/service/invoiceApply'),
38
+    hidden: true,
39
+    is_menu: false,
40
+    name: 'invoiceApply',
41
+    meta: {
42
+      title: 'invoiceApply',
43
+      icon: 'shebei',
44
+      noCache: true
45
+    }
46
+  },
47
+  {
48
+    path: '/servicePay',
49
+    component: () => import('@/xt_pages/service/servicePay'),
50
+    hidden: true,
51
+    name: 'servicePay',
52
+    meta: {
53
+      title: 'servicePay'
54
+    }
55
+  },
56
+  {
57
+    path: '/payType',
58
+    component: () => import('@/xt_pages/service/payType'),
59
+    hidden: true,
60
+    name: 'payType',
61
+    meta: {
62
+      title: 'payType'
63
+    }
64
+  },
65
+  {
66
+    path: '/weChatPay',
67
+    component: () => import('@/xt_pages/service/weChatPay'),
68
+    hidden: true,
69
+    name: 'weChatPay',
70
+    meta: {
71
+      title: 'weChatPay'
72
+    }
73
+  },
74
+  {
75
+    path: '/service/completeOrder',
76
+    component: () => import('@/xt_pages/service/completeOrder'),
77
+    hidden: true,
78
+    name: 'completeOrder',
79
+    meta: {
80
+      title: 'completeOrder'
81
+    }
82
+  }, {
83
+    path: '/service/buy',
84
+    component: () => import('@/xt_pages/service/serviceOrder'),
85
+    hidden: true,
86
+    is_menu: false,
87
+    name: 'serviceOrder',
88
+    meta: {
89
+      title: 'serviceOrder',
90
+      icon: 'shebei',
91
+      noCache: true
92
+    }
93
+  }, {
94
+    path: '/order',
95
+    component: () => import('@/xt_pages/service/orderRecord'),
96
+    hidden: true,
97
+    is_menu: false,
98
+    name: 'orderRecord',
99
+    meta: {
100
+      title: 'orderRecord',
101
+      icon: 'shebei',
102
+      noCache: true
103
+    }
104
+  }, {
105
+    path: '/service/recordList',
106
+    component: () => import('@/xt_pages/service/serviceRecord'),
107
+    hidden: true,
108
+    is_menu: false,
109
+    name: 'recordList',
110
+    meta: {
111
+      title: 'recordList',
112
+      icon: 'shebei',
113
+      noCache: true
114
+    }
115
+  }
116
+  ]
117
+}

+ 175 - 0
src/router/modules/stock.js Näytä tiedosto

@@ -0,0 +1,175 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+  path: '/stock/',
5
+  component: Layout,
6
+  redirect: 'noredirect',
7
+  name: 'stockManage',
8
+  alwaysShow: true,
9
+  meta: {
10
+    title: 'stockManage',
11
+    icon: 'stock'
12
+  },
13
+  children: [{
14
+    path: '/stock/config',
15
+    component: () => import('@/xt_pages/stock/index'),
16
+    name: 'config',
17
+    meta: {
18
+      title: 'config'
19
+    }
20
+  },
21
+  {
22
+    path: '/stock/in',
23
+    component: () => import('@/xt_pages/stock/stockInOrder'),
24
+    name: 'stockInOrder',
25
+    meta: {
26
+      title: 'stockInOrder',
27
+      noCache: true
28
+    }
29
+  }, {
30
+    path: '/stock/in/other',
31
+    component: () => import('@/xt_pages/stock/otherStockInOrder'),
32
+    name: 'otherStockInOrder',
33
+    meta: {
34
+      title: 'otherStockInOrder',
35
+      noCache: true
36
+    }
37
+  }, {
38
+    path: '/stock/return',
39
+    component: () => import('@/xt_pages/stock/salesReturnOrder'),
40
+    name: 'salesReturnOrder',
41
+    meta: {
42
+      title: 'salesReturnOrder',
43
+      noCache: true
44
+    }
45
+  }, {
46
+    path: '/stock/return/other',
47
+    component: () => import('@/xt_pages/stock/otherSalesReturnOrder'),
48
+    name: 'otherSalesReturnOrder',
49
+    meta: {
50
+      title: 'otherSalesReturnOrder',
51
+      noCache: true
52
+    }
53
+  },
54
+  {
55
+    path: '/stock/out',
56
+    component: () => import('@/xt_pages/stock/stockOutOrder'),
57
+    name: 'stockOutOrder',
58
+    meta: {
59
+      title: 'stockOutOrder',
60
+      noCache: true
61
+    }
62
+  }, {
63
+    path: '/stock/out/other',
64
+    component: () => import('@/xt_pages/stock/otherStockOutOrder'),
65
+    name: 'otherStockOutOrder',
66
+    meta: {
67
+      title: 'otherStockOutOrder',
68
+      noCache: true
69
+    }
70
+  }, {
71
+    path: '/stock/cancel',
72
+    component: () => import('@/xt_pages/stock/cancelStockOrder'),
73
+    name: 'cancelStockOrder',
74
+    meta: {
75
+      title: 'cancelStockOrder',
76
+      noCache: true
77
+    }
78
+  }, {
79
+    path: '/stock/cancel/other',
80
+    component: () => import('@/xt_pages/stock/otherCancelStockOrder'),
81
+    name: 'otherCancelStockOrder',
82
+    meta: {
83
+      title: 'otherCancelStockOrder',
84
+      noCache: true
85
+    }
86
+  }, {
87
+    path: '/stock/query',
88
+    component: () => import('@/xt_pages/stock/stockQuery'),
89
+    name: 'stockQuery',
90
+    meta: {
91
+      title: 'stockQuery'
92
+    }
93
+  }, {
94
+    path: '/stock/detail',
95
+    component: () => import('@/xt_pages/stock/stockDetailIndex'),
96
+    name: 'stockDetail',
97
+    meta: {
98
+      title: 'stockDetail'
99
+    }
100
+  },
101
+  {
102
+    path: '/stock/in/add',
103
+    component: () => import('@/xt_pages/stock/stockInOrderAdd'),
104
+    name: 'stockInOrderAdd',
105
+    hidden: true,
106
+    is_menu: false,
107
+    meta: {
108
+      title: 'stockInOrderAdd'
109
+    }
110
+  }, {
111
+    path: '/stock/in/detail',
112
+    component: () => import('@/xt_pages/stock/stockInDetail'),
113
+    name: 'stockInDetail',
114
+    hidden: true,
115
+    is_menu: false,
116
+    meta: {
117
+      title: 'stockInDetail'
118
+    }
119
+  }, {
120
+    path: '/stock/return/detail',
121
+    component: () => import('@/xt_pages/stock/salesReturnDetail'),
122
+    name: 'salesReturnDetail',
123
+    hidden: true,
124
+    is_menu: false,
125
+    meta: {
126
+      title: 'salesReturnDetail'
127
+    }
128
+  }, {
129
+    path: '/stock/return/add',
130
+    component: () => import('@/xt_pages/stock/salesReturnOrderAdd'),
131
+    name: 'salesReturnOrderAdd',
132
+    hidden: true,
133
+    is_menu: false,
134
+    meta: {
135
+      title: 'salesReturnOrderAdd'
136
+    }
137
+  }, {
138
+    path: '/stock/out/add',
139
+    component: () => import('@/xt_pages/stock/stockOutOrderAdd'),
140
+    name: 'stockOutOrderAdd',
141
+    hidden: true,
142
+    is_menu: false,
143
+    meta: {
144
+      title: 'stockOutOrderAdd'
145
+    }
146
+  }, {
147
+    path: '/stock/out/detail',
148
+    component: () => import('@/xt_pages/stock/stockOutDetail'),
149
+    name: 'stockOutDetail',
150
+    hidden: true,
151
+    is_menu: false,
152
+    meta: {
153
+      title: 'stockOutDetail'
154
+    }
155
+  }, {
156
+    path: '/stock/cancel/add',
157
+    component: () => import('@/xt_pages/stock/cancelStockOrderAdd'),
158
+    name: 'cancelStockOrderAdd',
159
+    hidden: true,
160
+    is_menu: false,
161
+    meta: {
162
+      title: 'cancelStockOrderAdd'
163
+    }
164
+  }, {
165
+    path: '/stock/cancel/detail',
166
+    component: () => import('@/xt_pages/stock/cancelStockDetail'),
167
+    name: 'cancelStockDetail',
168
+    hidden: true,
169
+    is_menu: false,
170
+    meta: {
171
+      title: 'cancelStockDetail'
172
+    }
173
+  }
174
+  ]
175
+}

+ 17 - 0
src/router/modules/weight_sign.js Näytä tiedosto

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

+ 64 - 0
src/router/modules/workforce.js Näytä tiedosto

@@ -0,0 +1,64 @@
1
+import Layout from '@/views/layout/Layout'
2
+export default {
3
+  path: '/workforce',
4
+  component: Layout,
5
+  redirect: 'noredirect',
6
+  name: 'workforce',
7
+  alwaysShow: true,
8
+  meta: {
9
+    title: 'workforce',
10
+    icon: 'paiban'
11
+  },
12
+  children: [{
13
+    path: '/workforce/appointment',
14
+    component: () => import('@/xt_pages/workforce/appointment'),
15
+    name: 'appointment',
16
+    meta: {
17
+      title: 'appointment',
18
+      noCache: true
19
+    }
20
+  },
21
+  {
22
+    path: '/workforce/sign',
23
+    component: () => import('@/xt_pages/workforce/sign'),
24
+    hidden: true,
25
+    is_menu: false,
26
+    name: 'workforcesign',
27
+    meta: {
28
+      title: 'sign',
29
+      noCache: true
30
+    }
31
+  },
32
+  {
33
+    path: '/workforce/remind',
34
+    component: () => import('@/xt_pages/workforce/remind'),
35
+    name: 'remind',
36
+    meta: {
37
+      title: 'remind',
38
+      noCache: true
39
+    }
40
+  },
41
+  {
42
+    path: '/workforce/template',
43
+    component: () => import('@/xt_pages/workforce/template'),
44
+    name: 'workforce_template',
45
+    hidden: true,
46
+    is_menu: false,
47
+    meta: {
48
+      title: 'workforce_template',
49
+      noCache: true
50
+    }
51
+  },
52
+  {
53
+    path: '/workforce/schedule/print',
54
+    component: () => import('@/xt_pages/workforce/schedule_print'),
55
+    name: 'schedule_print',
56
+    hidden: true,
57
+    is_menu: false,
58
+    meta: {
59
+      title: 'schedule_print',
60
+      noCache: true
61
+    }
62
+  }
63
+  ]
64
+}

+ 0 - 331
src/router/origin_index.js Näytä tiedosto

@@ -1,331 +0,0 @@
1
-import Vue from 'vue'
2
-import Router from 'vue-router'
3
-
4
-Vue.use(Router)
5
-
6
-/* Layout */
7
-import Layout from '@/views/layout/Layout'
8
-
9
-/** note: submenu only apppear when children.length>=1
10
-*   detail see  https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
11
-**/
12
-
13
-/**
14
-* hidden: true                   if `hidden:true` will not show in the sidebar(default is false)
15
-* alwaysShow: true               if set true, will always show the root menu, whatever its child routes length
16
-*                                if not set alwaysShow, only more than one route under the children
17
-*                                it will becomes nested mode, otherwise not show the root menu
18
-* redirect: noredirect           if `redirect:noredirect` will no redirct in the breadcrumb
19
-* name:'router-name'             the name is used by <keep-alive> (must set!!!)
20
-* meta : {
21
-    roles: ['admin','editor']     will control the page roles (you can set multiple roles)
22
-    title: 'title'               the name show in submenu and breadcrumb (recommend set)
23
-    icon: 'svg-name'             the icon show in the sidebar,
24
-    noCache: true                if true ,the page will no be cached(default is false)
25
-  }
26
-**/
27
-export const constantRouterMap = [
28
-  { path: '/login', component: () => import('@/views/login/index'), hidden: true },
29
-  { path: '/authredirect', component: () => import('@/views/login/authredirect'), hidden: true },
30
-  { path: '/404', component: () => import('@/views/errorPage/404'), hidden: true },
31
-  { path: '/401', component: () => import('@/views/errorPage/401'), hidden: true },
32
-  {
33
-    path: '',
34
-    component: Layout,
35
-    redirect: 'dashboard',
36
-    children: [{
37
-      path: 'dashboard',
38
-      component: () => import('@/views/dashboard/index'),
39
-      name: 'dashboard',
40
-      meta: { title: 'dashboard', icon: 'dashboard', noCache: true }
41
-    }]
42
-  },
43
-  {
44
-    path: '/documentation',
45
-    component: Layout,
46
-    redirect: '/documentation/index',
47
-    children: [{
48
-      path: 'index',
49
-      component: () => import('@/views/documentation/index'),
50
-      name: 'documentation',
51
-      meta: { title: 'documentation', icon: 'documentation', noCache: true }
52
-    }]
53
-  },
54
-  {
55
-    path: '/guide',
56
-    component: Layout,
57
-    redirect: '/guide/index',
58
-    children: [{
59
-      path: 'index',
60
-      component: () => import('@/views/guide/index'),
61
-      name: 'guide',
62
-      meta: { title: 'guide', icon: 'guide', noCache: true }
63
-    }]
64
-  }
65
-]
66
-
67
-export default new Router({
68
-  // mode: 'history', // require service support
69
-  scrollBehavior: () => ({ y: 0 }),
70
-  routes: constantRouterMap
71
-})
72
-
73
-export const asyncRouterMap = [
74
-  {
75
-    path: '/permission',
76
-    component: Layout,
77
-    redirect: '/permission/index',
78
-    alwaysShow: true, // will always show the root menu
79
-    meta: {
80
-      title: 'permission',
81
-      icon: 'lock',
82
-      roles: ['admin', 'editor'] // you can set roles in root nav
83
-    },
84
-    children: [{
85
-      path: 'page',
86
-      component: () => import('@/views/permission/page'),
87
-      name: 'pagePermission',
88
-      meta: {
89
-        title: 'pagePermission',
90
-        roles: ['admin'] // or you can only set roles in sub nav
91
-      }
92
-    }, {
93
-      path: 'directive',
94
-      component: () => import('@/views/permission/directive'),
95
-      name: 'directivePermission',
96
-      meta: {
97
-        title: 'directivePermission'
98
-        // if do not set roles, means: this page does not require permission
99
-      }
100
-    }]
101
-  },
102
-
103
-  {
104
-    path: '/icon',
105
-    component: Layout,
106
-    children: [{
107
-      path: 'index',
108
-      component: () => import('@/views/svg-icons/index'),
109
-      name: 'icons',
110
-      meta: { title: 'icons', icon: 'icon', noCache: true }
111
-    }]
112
-  },
113
-
114
-  {
115
-    path: '/components',
116
-    component: Layout,
117
-    redirect: 'noredirect',
118
-    name: 'component-demo',
119
-    meta: {
120
-      title: 'components',
121
-      icon: 'component'
122
-    },
123
-    children: [
124
-      { path: 'tinymce', component: () => import('@/views/components-demo/tinymce'), name: 'tinymce-demo', meta: { title: 'tinymce' }},
125
-      { path: 'markdown', component: () => import('@/views/components-demo/markdown'), name: 'markdown-demo', meta: { title: 'markdown' }},
126
-      { path: 'json-editor', component: () => import('@/views/components-demo/jsonEditor'), name: 'jsonEditor-demo', meta: { title: 'jsonEditor' }},
127
-      { path: 'splitpane', component: () => import('@/views/components-demo/splitpane'), name: 'splitpane-demo', meta: { title: 'splitPane' }},
128
-      { path: 'avatar-upload', component: () => import('@/views/components-demo/avatarUpload'), name: 'avatarUpload-demo', meta: { title: 'avatarUpload' }},
129
-      { path: 'dropzone', component: () => import('@/views/components-demo/dropzone'), name: 'dropzone-demo', meta: { title: 'dropzone' }},
130
-      { path: 'sticky', component: () => import('@/views/components-demo/sticky'), name: 'sticky-demo', meta: { title: 'sticky' }},
131
-      { path: 'count-to', component: () => import('@/views/components-demo/countTo'), name: 'countTo-demo', meta: { title: 'countTo' }},
132
-      { path: 'mixin', component: () => import('@/views/components-demo/mixin'), name: 'componentMixin-demo', meta: { title: 'componentMixin' }},
133
-      { path: 'back-to-top', component: () => import('@/views/components-demo/backToTop'), name: 'backToTop-demo', meta: { title: 'backToTop' }},
134
-      { path: 'drag-dialog', component: () => import('@/views/components-demo/dragDialog'), name: 'dragDialog-demo', meta: { title: 'dragDialog' }},
135
-      { path: 'dnd-list', component: () => import('@/views/components-demo/dndList'), name: 'dndList-demo', meta: { title: 'dndList' }},
136
-      { path: 'drag-kanban', component: () => import('@/views/components-demo/dragKanban'), name: 'dragKanban-demo', meta: { title: 'dragKanban' }}
137
-    ]
138
-  },
139
-
140
-  {
141
-    path: '/charts',
142
-    component: Layout,
143
-    redirect: 'noredirect',
144
-    name: 'charts',
145
-    meta: {
146
-      title: 'charts',
147
-      icon: 'chart'
148
-    },
149
-    children: [
150
-      { path: 'keyboard', component: () => import('@/views/charts/keyboard'), name: 'keyboardChart', meta: { title: 'keyboardChart', noCache: true }},
151
-      { path: 'line', component: () => import('@/views/charts/line'), name: 'lineChart', meta: { title: 'lineChart', noCache: true }},
152
-      { path: 'mixchart', component: () => import('@/views/charts/mixChart'), name: 'mixChart', meta: { title: 'mixChart', noCache: true }}
153
-    ]
154
-  },
155
-
156
-  {
157
-    path: '/tab',
158
-    component: Layout,
159
-    children: [{
160
-      path: 'index',
161
-      component: () => import('@/views/tab/index'),
162
-      name: 'tab',
163
-      meta: { title: 'tab', icon: 'tab' }
164
-    }]
165
-  },
166
-
167
-  {
168
-    path: '/table',
169
-    component: Layout,
170
-    redirect: '/table/complex-table',
171
-    name: 'table',
172
-    meta: {
173
-      title: 'Table',
174
-      icon: 'table'
175
-    },
176
-    children: [
177
-      { path: 'dynamic-table', component: () => import('@/views/table/dynamicTable/index'), name: 'dynamicTable', meta: { title: 'dynamicTable' }},
178
-      { path: 'drag-table', component: () => import('@/views/table/dragTable'), name: 'dragTable', meta: { title: 'dragTable' }},
179
-      { path: 'inline-edit-table', component: () => import('@/views/table/inlineEditTable'), name: 'inlineEditTable', meta: { title: 'inlineEditTable' }},
180
-      { path: 'tree-table', component: () => import('@/views/table/treeTable/treeTable'), name: 'treeTableDemo', meta: { title: 'treeTable' }},
181
-      { path: 'custom-tree-table', component: () => import('@/views/table/treeTable/customTreeTable'), name: 'customTreeTableDemo', meta: { title: 'customTreeTable' }},
182
-      { path: 'complex-table', component: () => import('@/views/table/complexTable'), name: 'complexTable', meta: { title: 'complexTable' }}
183
-    ]
184
-  },
185
-
186
-  {
187
-    path: '/example',
188
-    component: Layout,
189
-    redirect: '/example/list',
190
-    name: 'example',
191
-    meta: {
192
-      title: 'example',
193
-      icon: 'example'
194
-    },
195
-    children: [
196
-      { path: 'create', component: () => import('@/views/example/create'), name: 'createArticle', meta: { title: 'createArticle', icon: 'edit' }},
197
-      { path: 'edit/:id(\\d+)', component: () => import('@/views/example/edit'), name: 'editArticle', meta: { title: 'editArticle', noCache: true }, hidden: true },
198
-      { path: 'list', component: () => import('@/views/example/list'), name: 'articleList', meta: { title: 'articleList', icon: 'list' }}
199
-    ]
200
-  },
201
-
202
-  {
203
-    path: '/nested',
204
-    component: Layout,
205
-    redirect: '/nested/menu1/menu1-1',
206
-    name: 'nested',
207
-    meta: {
208
-      title: 'nested',
209
-      icon: 'nested'
210
-    },
211
-    children: [
212
-      {
213
-        path: 'menu1',
214
-        component: () => import('@/views/nested/menu1/index'), // Parent router-view
215
-        name: 'menu1',
216
-        meta: { title: 'menu1' },
217
-        redirect: '/nested/menu1/menu1-1',
218
-        children: [
219
-          {
220
-            path: 'menu1-1',
221
-            component: () => import('@/views/nested/menu1/menu1-1'),
222
-            name: 'menu1-1',
223
-            meta: { title: 'menu1-1' }
224
-          },
225
-          {
226
-            path: 'menu1-2',
227
-            component: () => import('@/views/nested/menu1/menu1-2'),
228
-            name: 'menu1-2',
229
-            redirect: '/nested/menu1/menu1-2/menu1-2-1',
230
-            meta: { title: 'menu1-2' },
231
-            children: [
232
-              {
233
-                path: 'menu1-2-1',
234
-                component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'),
235
-                name: 'menu1-2-1',
236
-                meta: { title: 'menu1-2-1' }
237
-              },
238
-              {
239
-                path: 'menu1-2-2',
240
-                component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'),
241
-                name: 'menu1-2-2',
242
-                meta: { title: 'menu1-2-2' }
243
-              }
244
-            ]
245
-          },
246
-          {
247
-            path: 'menu1-3',
248
-            component: () => import('@/views/nested/menu1/menu1-3'),
249
-            name: 'menu1-3',
250
-            meta: { title: 'menu1-3' }
251
-          }
252
-        ]
253
-      },
254
-      {
255
-        path: 'menu2',
256
-        name: 'menu2',
257
-        component: () => import('@/views/nested/menu2/index'),
258
-        meta: { title: 'menu2' }
259
-      }
260
-    ]
261
-  },
262
-
263
-  {
264
-    path: '/error',
265
-    component: Layout,
266
-    redirect: 'noredirect',
267
-    name: 'errorPages',
268
-    meta: {
269
-      title: 'errorPages',
270
-      icon: '404'
271
-    },
272
-    children: [
273
-      { path: '401', component: () => import('@/views/errorPage/401'), name: 'page401', meta: { title: 'page401', noCache: true }},
274
-      { path: '404', component: () => import('@/views/errorPage/404'), name: 'page404', meta: { title: 'page404', noCache: true }}
275
-    ]
276
-  },
277
-
278
-  {
279
-    path: '/error-log',
280
-    component: Layout,
281
-    redirect: 'noredirect',
282
-    children: [{ path: 'log', component: () => import('@/views/errorLog/index'), name: 'errorLog', meta: { title: 'errorLog', icon: 'bug' }}]
283
-  },
284
-
285
-  {
286
-    path: '/excel',
287
-    component: Layout,
288
-    redirect: '/excel/export-excel',
289
-    name: 'excel',
290
-    meta: {
291
-      title: 'excel',
292
-      icon: 'excel'
293
-    },
294
-    children: [
295
-      { path: 'export-excel', component: () => import('@/views/excel/exportExcel'), name: 'exportExcel', meta: { title: 'exportExcel' }},
296
-      { path: 'export-selected-excel', component: () => import('@/views/excel/selectExcel'), name: 'selectExcel', meta: { title: 'selectExcel' }},
297
-      { path: 'upload-excel', component: () => import('@/views/excel/uploadExcel'), name: 'uploadExcel', meta: { title: 'uploadExcel' }}
298
-    ]
299
-  },
300
-
301
-  {
302
-    path: '/zip',
303
-    component: Layout,
304
-    redirect: '/zip/download',
305
-    alwaysShow: true,
306
-    meta: { title: 'zip', icon: 'zip' },
307
-    children: [{ path: 'download', component: () => import('@/views/zip/index'), name: 'exportZip', meta: { title: 'exportZip' }}]
308
-  },
309
-
310
-  {
311
-    path: '/theme',
312
-    component: Layout,
313
-    redirect: 'noredirect',
314
-    children: [{ path: 'index', component: () => import('@/views/theme/index'), name: 'theme', meta: { title: 'theme', icon: 'theme' }}]
315
-  },
316
-
317
-  {
318
-    path: '/clipboard',
319
-    component: Layout,
320
-    redirect: 'noredirect',
321
-    children: [{ path: 'index', component: () => import('@/views/clipboard/index'), name: 'clipboardDemo', meta: { title: 'clipboardDemo', icon: 'clipboard' }}]
322
-  },
323
-
324
-  {
325
-    path: '/i18n',
326
-    component: Layout,
327
-    children: [{ path: 'index', component: () => import('@/views/i18n-demo/index'), name: 'i18n', meta: { title: 'i18n', icon: 'international' }}]
328
-  },
329
-
330
-  { path: '*', redirect: '/404', hidden: true }
331
-]

+ 0 - 215
src/router/xt_index.js Näytä tiedosto

@@ -1,215 +0,0 @@
1
-// import Vue from 'vue'
2
-// import Router from 'vue-router'
3
-
4
-// Vue.use(Router)
5
-
6
-// /* Layout */
7
-// import Layout from '@/views/layout/Layout'
8
-
9
-// /** note: submenu only apppear when children.length>=1
10
-// *   detail see  https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
11
-// **/
12
-
13
-// /**
14
-// * hidden: true                   if `hidden:true` will not show in the sidebar(default is false)
15
-// * alwaysShow: true               if set true, will always show the root menu, whatever its child routes length
16
-// *                                if not set alwaysShow, only more than one route under the children
17
-// *                                it will becomes nested mode, otherwise not show the root menu
18
-// * redirect: noredirect           if `redirect:noredirect` will no redirct in the breadcrumb
19
-// * name:'router-name'             the name is used by <keep-alive> (must set!!!)
20
-// * meta : {
21
-//     roles: ['admin','editor']     will control the page roles (you can set multiple roles)
22
-//     title: 'title'               the name show in submenu and breadcrumb (recommend set)
23
-//     icon: 'svg-name'             the icon show in the sidebar,
24
-//     noCache: true                if true ,the page will no be cached(default is false)
25
-//   }
26
-// **/
27
-// export const xt_constantRouterMap = [
28
-//   // { path: '/login', component: () => import('@/views/login/index'), hidden: true },
29
-//   { path: '/token/verify', component: () => import('@/xt_pages/index/verify_token'), hidden: true },
30
-//   { path: '/404', component: () => import('@/views/errorPage/404'), hidden: true },
31
-//   { path: '/401', component: () => import('@/views/errorPage/401'), hidden: true },
32
-//   {
33
-//     path: '',
34
-//     component: Layout,
35
-//     redirect: '/home',
36
-//     children: [{
37
-//       path: '/home',
38
-//       component: () => import('@/xt_pages/home/index'),
39
-//       name: 'home',
40
-//       meta: { title: 'home', icon: 'dashboard', noCache: true }
41
-//     }]
42
-//   },
43
-//   // //////////////////////////////////////////////////////////
44
-//   {
45
-//     path: '/sign',
46
-//     component: Layout,
47
-//     redirect: '/sign/index',
48
-//     name: 'sign',
49
-//     alwaysShow: true,
50
-//     meta: { title: 'signWeight', icon: 'table' },
51
-//     children: [
52
-//       { path: '/sign/index', component: () => import('@/xt_pages/sign/index'), name: 'signWeight', meta: { title: 'signWeight' }}
53
-//     ]
54
-//   },
55
-//   {
56
-//     path: '/patients',
57
-//     component: Layout,
58
-//     redirect: 'noredirect',
59
-//     name: 'User',
60
-//     meta: {
61
-//       title: 'user',
62
-//       icon: 'chart'
63
-//     },
64
-//     children: [
65
-//       {
66
-//         path: '/patients/patients',
67
-//         component: () => import('@/xt_pages/user/patients'),
68
-//         name: 'Patient',
69
-//         meta: { title: 'patient', noCache: true }
70
-//       },
71
-//       {
72
-//         path: '/patients/create',
73
-//         component: () => import('@/xt_pages/user/createPatient'),
74
-//         name: 'createPatient',
75
-//         meta: { title: 'createPatient', noCache: true }
76
-//       },
77
-//       {
78
-//         path: '/patients/patient/:id',
79
-//         component: () => import('@/xt_pages/user/patientInfo'),
80
-//         hidden: true,
81
-//         name: 'patient Page',
82
-//         meta: { title: 'patientPage', noCache: true }
83
-//       },
84
-//       {
85
-//         path: '/patients/patient/:id/edit',
86
-//         component: () => import('@/xt_pages/user/editPatient'),
87
-//         hidden: true,
88
-//         name: 'Edit Patient',
89
-//         meta: { title: 'editPatient', noCache: true }
90
-//       },
91
-//       {
92
-//         path: '/patients/patient/:id/dialysisSolution',
93
-//         component: () => import('@/xt_pages/user/dialysisSolution'),
94
-//         hidden: true,
95
-//         name: 'dialysisSolution',
96
-//         meta: { title: 'dialysisSolution', noCache: true }
97
-//       },
98
-//       {
99
-//         path: '/patients/patient/:id/weight',
100
-//         component: () => import('@/xt_pages/user/weight'),
101
-//         hidden: true,
102
-//         name: 'weight',
103
-//         meta: { title: 'weight', noCache: true }
104
-//       },
105
-//       {
106
-//         path: '/patients/dialysisRecord',
107
-//         component: () => import('@/xt_pages/user/dialysisRecord'),
108
-//         name: 'dialysisRecord',
109
-//         meta: { title: 'dialysisRecord', noCache: true }
110
-//       },
111
-//       {
112
-//         path: '/patients/patient/:id/scheduling',
113
-//         component: () => import('@/xt_pages/user/scheduling'),
114
-//         hidden: true,
115
-//         name: 'scheduling',
116
-//         meta: { title: 'scheduling', noCache: true }
117
-//       },
118
-//       {
119
-//         path: '/patients/patient/:id/doctorAdvice',
120
-//         component: () => import('@/xt_pages/user/doctorAdvice'),
121
-//         hidden: true,
122
-//         name: 'doctorAdvice',
123
-//         meta: { title: 'doctorAdvice', noCache: true }
124
-//       },
125
-//       {
126
-//         path: '/patients/inspection',
127
-//         component: () => import('@/xt_pages/user/inspection'),
128
-//         hidden: true,
129
-//         name: 'Inspection',
130
-//         meta: { title: 'inspection', noCache: true }
131
-//       }
132
-//     ]
133
-//   },
134
-//   {
135
-//     path: '/workforce',
136
-//     component: Layout,
137
-//     redirect: 'noredirect',
138
-//     name: 'workforce',
139
-//     meta: {
140
-//       title: 'workforce',
141
-//       icon: 'chart'
142
-//     },
143
-//     children: [
144
-//       {
145
-//         path: 'appointment',
146
-//         component: () => import('@/xt_pages/workforce/appointment'),
147
-//         name: 'appointment',
148
-//         meta: { title: 'appointment', noCache: true }
149
-//       },
150
-//       {
151
-//         path: 'sign',
152
-//         component: () => import('@/xt_pages/workforce/sign'),
153
-//         name: 'sign',
154
-//         meta: { title: 'sign', noCache: true }
155
-//       },
156
-//       {
157
-//         path: 'remind',
158
-//         component: () => import('@/xt_pages/workforce/remind'),
159
-//         name: 'remind',
160
-//         meta: { title: 'remind', noCache: true }
161
-//       }
162
-//     ]
163
-//   },
164
-//   {
165
-//     path: '/dialysis/',
166
-//     component: Layout,
167
-//     redirect: 'noredirect',
168
-//     name: 'dialysis',
169
-//     meta: {
170
-//       title: 'dialysis',
171
-//       icon: 'component'
172
-//     },
173
-//     children: [
174
-//       { path: 'paper', component: () => import('@/xt_pages/dialysis/dialysisPage'), name: 'paper', meta: { title: 'paper' }},
175
-//       { path: 'advice', component: () => import('@/xt_pages/dialysis/doctorAdvice'), name: 'advice', meta: { title: 'advice' }},
176
-//       { path: 'prepare', component: () => import('@/xt_pages/dialysis/dialysisPrepare'), name: 'prepare', meta: { title: 'prepare' }},
177
-//       { path: 'watch', component: () => import('@/xt_pages/dialysis/bloodPresssWatch'), name: 'watch', meta: { title: 'watch' }}
178
-//     ]
179
-//   },
180
-//   {
181
-//     path: '/device',
182
-//     component: Layout,
183
-//     redirect: '/device/main',
184
-//     name: 'device',
185
-//     alwaysShow: true,
186
-//     meta: { title: 'deviceManage', icon: 'table' },
187
-//     children: [
188
-//       { path: '/device/main', component: () => import('@/xt_pages/device/main'), name: 'deviceManage', meta: { title: 'deviceManage' }}
189
-//     ]
190
-//   }
191
-// ]
192
-
193
-// export default new Router({
194
-//   // mode: 'history', // require service support
195
-//   scrollBehavior: () => ({ y: 0 }),
196
-//   routes: xt_constantRouterMap
197
-// })
198
-
199
-// export const xt_asyncRouterMap = [
200
-//   {
201
-//     path: '/role',
202
-//     component: Layout,
203
-//     redirect: '/role/admin/manage',
204
-//     name: 'role',
205
-//     alwaysShow: true,
206
-//     meta: { title: 'permissionManage', icon: 'table' },
207
-//     children: [
208
-//       { path: '/role/admin/manage', component: () => import('@/xt_pages/role/admin'), name: 'adminManage', meta: { title: 'adminManage' }},
209
-//       { path: '/role/manage', component: () => import('@/xt_pages/role/role'), name: 'roleManage', meta: { title: 'roleManage' }},
210
-//       { path: '/role/admin/create', component: () => import('@/xt_pages/role/CreateAdmin'), name: 'addAdmin', meta: { title: 'addAdmin', noCache: true }, hidden: true, is_menu: false },
211
-//       { path: '/role/admin/edit', component: () => import('@/xt_pages/role/EditAdmin'), name: 'editAdmin', meta: { title: 'editAdmin', noCache: true }, hidden: true, is_menu: false },
212
-//       { path: '/role/perview', component: () => import('@/xt_pages/role/EditPerview'), name: 'setupPerview', meta: { title: 'setupPerview', noCache: true }, hidden: true, is_menu: false }
213
-//     ]
214
-//   }
215
-// ]

+ 64 - 19
src/store/modules/xt_user.js Näytä tiedosto

@@ -1,7 +1,14 @@
1
-import { verifyToken, modifyAdminInfo } from '@/api/login/login'
1
+import {
2
+  verifyToken,
3
+  modifyAdminInfo
4
+} from '@/api/login/login'
2 5
 // import { mapGetters } from 'vuex'
3 6
 // import { getToken, setToken, removeToken } from '@/utils/auth'
4
-import { getAdminUserInfoCache, cacheAdminUserInfo, removeAdminUserInfoCache } from '@/utils/admin_info_cache'
7
+import {
8
+  getAdminUserInfoCache,
9
+  cacheAdminUserInfo,
10
+  removeAdminUserInfoCache
11
+} from '@/utils/admin_info_cache'
5 12
 
6 13
 const xt_user = {
7 14
   state: {
@@ -33,9 +40,13 @@ const xt_user = {
33 40
       period_start: 0,
34 41
       period_end: 0,
35 42
       state: 2, // 1正版(标准) 2试用(免费) 3过期(或其他无效状态) 8 专业 9 永久,
36
-      patients:20, //患者数
43
+      patients: 20 // 患者数
37 44
     },
38 45
 
46
+    scrm_role_exist: false,
47
+    cdm_role_exist: false,
48
+    mall_role_exist: false,
49
+
39 50
     // 示例: ['', '',]
40 51
     urlfors: []
41 52
   },
@@ -68,6 +79,10 @@ const xt_user = {
68 79
       state.subscibe.period_start = cur_info.subscibe.period_start
69 80
       state.subscibe.period_end = cur_info.subscibe.period_end
70 81
       state.subscibe.state = cur_info.subscibe.state
82
+
83
+      state.scrm_role_exist = cur_info.scrm_role_exist
84
+      state.cdm_role_exist = cur_info.cdm_role_exist
85
+      state.mall_role_exist = cur_info.mall_role_exist
71 86
     },
72 87
 
73 88
     SET_URLFORS: (state, payload) => {
@@ -79,8 +94,8 @@ const xt_user = {
79 94
       state.user.avatar = payload.avatar
80 95
     },
81 96
 
82
-    SET_SUBSCIBE_PATIENT:(state)=>{
83
-      state.subscibe.patients += 1;
97
+    SET_SUBSCIBE_PATIENT: (state) => {
98
+      state.subscibe.patients += 1
84 99
     },
85 100
     CLEAR_USER_INFO: (state) => {
86 101
       state.org_id = 0
@@ -110,6 +125,10 @@ const xt_user = {
110 125
       state.subscibe.state = 3
111 126
       state.subscibe.patients = 0
112 127
 
128
+      state.scrm_role_exist = false
129
+      state.cdm_role_exist = false
130
+      state.mall_role_exist = false
131
+
113 132
       state.urlfors = []
114 133
     }
115 134
   },
@@ -121,11 +140,17 @@ const xt_user = {
121 140
   },
122 141
 
123 142
   actions: {
124
-    SetSubscibePatients({ commit, state }) {
125
-      commit('SET_SUBSCIBE_PATIENT');
143
+    SetSubscibePatients({
144
+      commit,
145
+      state
146
+    }) {
147
+      commit('SET_SUBSCIBE_PATIENT')
126 148
     },
127 149
 
128
-    VerifyToken({ commit, state }, token) {
150
+    VerifyToken({
151
+      commit,
152
+      state
153
+    }, token) {
129 154
       // console.log('验证 token 之前:token = ' + token)
130 155
       return new Promise((resolve, reject) => {
131 156
         var cacheInfo = getAdminUserInfoCache()
@@ -139,6 +164,9 @@ const xt_user = {
139 164
             cur_app_id: infoJSON.current_app_id,
140 165
             org: infoJSON.org,
141 166
             subscibe: infoJSON.subscibe,
167
+            scrm_role_exist: infoJSON.scrm_role_exist,
168
+            cdm_role_exist: infoJSON.cdm_role_exist,
169
+            mall_role_exist: infoJSON.mall_role_exist
142 170
           })
143 171
 
144 172
           commit('SET_URLFORS', {
@@ -149,14 +177,17 @@ const xt_user = {
149 177
           verifyToken(token).then(response => {
150 178
             if (response.data.state === 1) {
151 179
               // alert('验证通过')
152
-              console.log('验证通过')
180
+              // console.log('验证通过')
153 181
               var data = response.data.data
154 182
               this.commit('SET_CURRENT_INFO', {
155 183
                 user: data.user,
156 184
                 cur_org_id: data.current_org_id,
157 185
                 cur_app_id: data.current_app_id,
158 186
                 org: data.org,
159
-                subscibe: data.subscibe
187
+                subscibe: data.subscibe,
188
+                scrm_role_exist: data.scrm_role_exist,
189
+                cdm_role_exist: data.cdm_role_exist,
190
+                mall_role_exist: data.mall_role_exist
160 191
               })
161 192
 
162 193
               this.commit('SET_URLFORS', {
@@ -168,22 +199,34 @@ const xt_user = {
168 199
               resolve(data.user.id)
169 200
             } else {
170 201
               alert('请求失败:' + response.data.msg)
171
-              reject({ msg: response.data.msg, code: response.data.code })
202
+              reject({
203
+                msg: response.data.msg,
204
+                code: response.data.code
205
+              })
172 206
             }
173 207
           })
174 208
         }
175 209
       })
176 210
     },
177
-    ModifyAdminUserInfo({ commit, state }, params) {
178
-      commit('MODIFY_USER_INFO', { user_name: params.user_name, avatar: params.avatar })
211
+    ModifyAdminUserInfo({
212
+      commit,
213
+      state
214
+    }, params) {
215
+      commit('MODIFY_USER_INFO', {
216
+        user_name: params.user_name,
217
+        avatar: params.avatar
218
+      })
179 219
       cacheAdminUserInfo(
180
-        JSON.stringify({ 
181
-          user: state.user, 
182
-          org: state.org, 
183
-          current_org_id: state.org_id, 
184
-          current_app_id: state.app_id, 
220
+        JSON.stringify({
221
+          user: state.user,
222
+          org: state.org,
223
+          current_org_id: state.org_id,
224
+          current_app_id: state.app_id,
185 225
           urlfors: state.urlfors,
186 226
           subscibe: state.subscibe,
227
+          scrm_role_exist: state.scrm_role_exist,
228
+          cdm_role_exist: state.cdm_role_exist,
229
+          mall_role_exist: state.mall_role_exist
187 230
         })
188 231
       )
189 232
     },
@@ -207,7 +250,9 @@ const xt_user = {
207 250
     //   }
208 251
     // }
209 252
     // 登出
210
-    FrontendLogout({ commit }) {
253
+    FrontendLogout({
254
+      commit
255
+    }) {
211 256
       commit('CLEAR_USER_INFO')
212 257
       removeAdminUserInfoCache()
213 258
     }

+ 26 - 22
src/views/layout/components/Navbar.vue Näytä tiedosto

@@ -9,33 +9,29 @@
9 9
         </span>
10 10
       </div>
11 11
       <div class="system-nav">
12
-        <div class="system-nav-menu">
13
-          <a  href="http://jk.kuyicloud.com/">
14
-          <!-- <a href="http://test1.sgjyun.com/"> -->
15
-            <span><i class="iconfont icon-pengyou"></i> SCRM</span>
16
-          </a>
17
-        </div>
18
-        <div class="system-nav-menu">
19
-          <a href="http://mall.kuyicloud.com/">
20
-          <!-- <a href="http://mall.test.sgjyun.com/"> -->
21
-            <span><i class="icon iconfont icon-service_fill"></i> 微商城</span>
22
-          </a>
23
-        </div>
24 12
         <div class="system-nav-menu active">
25 13
           <a>
26 14
             <span><i class="icon iconfont icon-jiankangshuidi"></i> 血透管理</span>
27 15
           </a>
28 16
         </div>
29
-        <div class="system-nav-menu">
30
-          <a href="http://cdm.kuyicloud.com/">
31
-          <!-- <a href=" http://cdm.test.sgjyun.com/"> -->
17
+        <div class="system-nav-menu" v-if="this.$store.getters.xt_user.cdm_role_exist">
18
+          <a :href="CDMWebsit()">
32 19
             <span><i class="icon iconfont icon-manbing-xuanzhong"></i> 慢病管理</span>
33 20
           </a>
34 21
         </div>
22
+        <div class="system-nav-menu" v-if="this.$store.getters.xt_user.scrm_role_exist">
23
+          <a :href="SCRMWebsit()">
24
+            <span><i class="iconfont icon-pengyou"></i> SCRM</span>
25
+          </a>
26
+        </div>
27
+        <div class="system-nav-menu" v-if="this.$store.getters.xt_user.mall_role_exist">
28
+          <a :href="MircoMallWebsit()">
29
+            <span><i class="icon iconfont icon-service_fill"></i> 微商城</span>
30
+          </a>
31
+        </div>
35 32
 
36 33
         <div class="system-nav-menu">
37
-          <a href="http://sso.kuyicloud.com/org/app/create">
38
-          <!-- <a href="http://testsso.sgjyun.com/org/app/create"> -->
34
+          <a :href="APPManageWebsit()">
39 35
             <span><i class="icon iconfont icon-suoyou"></i> 应用</span>
40 36
           </a>
41 37
         </div>
@@ -86,7 +82,7 @@
86 82
   export default {
87 83
     data() {
88 84
       return {
89
-        orgname: ''
85
+        // scrm_role_exist: $store.getters.xt_user.scrm_role_exist
90 86
       }
91 87
     },
92 88
     components: {
@@ -135,13 +131,21 @@
135 131
       myServe() {
136 132
         this.$router.push('/service')
137 133
         return false
134
+      },
135
+      SCRMWebsit() {
136
+        return process.env.SCRM_HOST
137
+      },
138
+      MircoMallWebsit() {
139
+        return process.env.MIRCO_MALL_HOST
140
+      },
141
+      CDMWebsit() {
142
+        return process.env.CDM_HOST
143
+      },
144
+      APPManageWebsit() {
145
+        return process.env.SSO_HOST + '/org/admin/apps?org=' + this.$store.getters.xt_user.org_id
138 146
       }
139 147
     },
140 148
     created() {
141
-      var xtuser = this.$store.getters.xt_user
142
-      this.orgname = xtuser.org.org_name
143
-      console.log(this.orgname)
144
-
145 149
     }
146 150
   }
147 151
 </script>

+ 9 - 0
src/views/layout/components/TagsView.vue Näytä tiedosto

@@ -133,6 +133,10 @@ export default {
133 133
     z-index: 1000;
134 134
     top: 60px;
135 135
     overflow-x: scroll;
136
+    white-space: normal;
137
+    right: 0;
138
+    left: 150px;
139
+    
136 140
     /* 针对缺省样式 (必须的) */
137 141
       &::-webkit-scrollbar {
138 142
         width: 6px;
@@ -223,6 +227,11 @@ export default {
223 227
     }
224 228
   }
225 229
 }
230
+.scroll-wrapper{
231
+      right: 0;
232
+      position: fixed!important;
233
+      
234
+}
226 235
 </style>
227 236
 
228 237
 <style rel="stylesheet/scss" lang="scss">

+ 1 - 1
src/xt_pages/data/components/tableson.vue Näytä tiedosto

@@ -4,7 +4,7 @@
4 4
       <el-button style="float: right;" class="filter-item" size="small" :disabled="addState"  @click="handleCreate" type="primary" icon="el-icon-circle-plus-outline">{{$t('table.add')}}</el-button>
5 5
     </div>
6 6
     <el-table :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}" :key='tableKey' :data="list" v-loading="listLoading" border fit highlight-current-row
7
-      style="width: 100%;">
7
+      >
8 8
       <el-table-column  align="center" label="名称">
9 9
         <template slot-scope="scope">
10 10
           <span @click="handleUpdate(scope.row)">{{scope.row.name}}</span>

+ 6 - 4
src/xt_pages/data/index.vue Näytä tiedosto

@@ -5,11 +5,13 @@
5 5
   </div>
6 6
   <div class="app-container">
7 7
     <el-tabs  v-model="activeName" >
8
-      <el-tab-pane v-for="item in tabMapOptions" :label="item.label" :key='item.key' :name="item.key" style="display:flex;">
8
+      <el-tab-pane v-for="item in tabMapOptions" :label="item.label" :key='item.key' :name="item.key" >
9 9
         <keep-alive>
10
-          <div style="display:flex;width:100%;">
11
-          <tab-pane v-if='activeName==item.key' :type='item.key' style="flex:1;"></tab-pane>
12
-          <tableson v-if='activeName==item.key' :type='item.key' style="flex:1;"></tableson>
10
+          <div >
11
+         <el-row :gutter="24">
12
+           <el-col :span="12"><tab-pane v-if='activeName==item.key' :type='item.key' ></tab-pane></el-col>
13
+           <el-col :span="12"><tableson v-if='activeName==item.key' :type='item.key' ></tableson></el-col>
14
+         </el-row>
13 15
           </div>
14 16
         </keep-alive>
15 17
       </el-tab-pane>

+ 41 - 9
src/xt_pages/stock/Dialog/salesReturnDialog.vue Näytä tiedosto

@@ -16,7 +16,6 @@
16 16
           highlight-current-row
17 17
           max-height="250"
18 18
           :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
19
-
20 19
           @current-change="goodTypeTableChange"
21 20
           style="width: 100%">
22 21
           <el-table-column
@@ -93,29 +92,63 @@
93 92
     methods: {
94 93
       hide:function(){
95 94
         this.visibility = false
95
+        this.goodInfoTableData = []
96
+
96 97
       },
97 98
       show:function(){
98 99
         this.visibility = true
99 100
       },
100 101
       goodTypeTableChange: function(currentRow, oldCurrentRow) {
101 102
         this.currentGoodTypeId = currentRow.id
102
-
103 103
         this.goodInfoTableData = []
104 104
         this.goodInfo = []
105
+        console.log(this.propForm.manufacturer)
106
+        console.log(this.propForm.dealer)
107
+        console.log(this.propForm.goodInfo)
108
+
109
+
105 110
         for (let i = 0; i < this.propForm.goodInfo.length; i++) {
106 111
           if (this.currentGoodTypeId == this.propForm.goodInfo[i].good_type_id) {
107
-            this.goodInfo.push(this.propForm.goodInfo[i])
108
-            this.goodInfoTableData.push(this.propForm.goodInfo[i])
112
+            if(this.propForm.dealer == 0 && this.propForm.manufacturer == 0){
113
+              this.goodInfo.push(this.propForm.goodInfo[i])
114
+              this.goodInfoTableData.push(this.propForm.goodInfo[i])
115
+
116
+            }else{
117
+              if(this.propForm.manufacturer == 0 && this.propForm.dealer != 0){
118
+                if(this.propForm.goodInfo[i].dealers.id == this.propForm.dealer){
119
+                  this.goodInfo.push(this.propForm.goodInfo[i])
120
+                  this.goodInfoTableData.push(this.propForm.goodInfo[i])
121
+                }
122
+              }
123
+              if(this.propForm.manufacturer != 0 && this.propForm.dealer == 0){
124
+                if(this.propForm.goodInfo[i].manufacturers.id == this.propForm.manufacturer){
125
+                  this.goodInfo.push(this.propForm.goodInfo[i])
126
+                  this.goodInfoTableData.push(this.propForm.goodInfo[i])
127
+                }
128
+              }
129
+              if(this.propForm.manufacturer != 0 && this.propForm.dealer != 0){
130
+                if(this.propForm.goodInfo[i].manufacturers.id == this.propForm.manufacturer && this.propForm.goodInfo[i].dealers.id == this.propForm.dealer){
131
+                  this.goodInfo.push(this.propForm.goodInfo[i])
132
+                  this.goodInfoTableData.push(this.propForm.goodInfo[i])
133
+                }
134
+              }
135
+            }
109 136
           }
110 137
         }
111 138
       },
112 139
       cancle: function() {
113 140
         this.$emit('dialog-cancle', this.getValue())
114 141
         this.$refs.multipleTable.clearSelection()
142
+        this.$refs.templatetable.setCurrentRow(null);
143
+        this.goodInfoTableData = []
144
+
115 145
       },
116 146
       comfirm: function() {
117 147
         this.$emit('dialog-comfirm', this.getValue())
118 148
         this.$refs.multipleTable.clearSelection()
149
+        this.$refs.templatetable.setCurrentRow(null);
150
+        this.goodInfoTableData = []
151
+
119 152
       },
120 153
       getValue: function() {
121 154
         const obj = {
@@ -126,11 +159,10 @@
126 159
       }, goodTypeSelect: function(id) {
127 160
         this.tempGoodInfo = []
128 161
         this.goodInfo = []
129
-        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
130
-          if (this.propForm.goodInfo[i].good_type_id == id) {
131
-            this.tempGoodInfo.push(this.propForm.goodInfo[i])
132
-          }
133
-        }
162
+        console.log(this.propForm.manufacturer )
163
+        console.log(this.propForm.dealers )
164
+
165
+
134 166
       }, goodInfoSelect: function(id) {
135 167
         let index = 0
136 168
         for (let i = 0; i < this.propForm.goodInfo.length; i++) {

+ 17 - 9
src/xt_pages/stock/Dialog/stockInDialog.vue Näytä tiedosto

@@ -59,6 +59,16 @@
59 59
             </template>
60 60
           </el-table-column>
61 61
 
62
+          <el-table-column
63
+            align="center"
64
+            label="单价"
65
+            property="buy_price"
66
+          >
67
+            <template slot-scope="scope">
68
+              <span>{{scope.row.buy_price}}</span>
69
+            </template>
70
+          </el-table-column>
71
+
62 72
         </el-table>
63 73
       </el-col>
64 74
     </el-row>
@@ -85,19 +95,19 @@
85 95
         multipleSelection: [],
86 96
         currentGoodTypeId: 0,
87 97
         isClose: false,
88
-        visibility: false,
98
+        visibility: false
89 99
       }
90 100
     },
91 101
     props: {
92 102
       propForm: {
93 103
         type: Object
94
-      },
104
+      }
95 105
     },
96 106
     methods: {
97
-      hide:function(){
107
+      hide: function() {
98 108
         this.visibility = false
99 109
       },
100
-      show:function(){
110
+      show: function() {
101 111
         this.visibility = true
102 112
       },
103 113
       goodTypeTableChange: function(currentRow, oldCurrentRow) {
@@ -124,16 +134,14 @@
124 134
         this.goodInfoTableData = []
125 135
         this.$emit('dialog-cancle', this.getValue())
126 136
         this.$refs.multipleTable.clearSelection()
127
-        this.$refs.templatetable.setCurrentRow(null);
128
-
137
+        this.$refs.templatetable.setCurrentRow(null)
129 138
       },
130 139
       comfirm: function(formName) {
131 140
         this.goodInfo = []
132 141
         this.goodInfoTableData = []
133 142
         this.$emit('dialog-comfirm', this.getValue())
134 143
         this.$refs.multipleTable.clearSelection()
135
-        this.$refs.templatetable.setCurrentRow(null);
136
-
144
+        this.$refs.templatetable.setCurrentRow(null)
137 145
       },
138 146
       getValue: function() {
139 147
         const obj = {
@@ -186,7 +194,7 @@
186 194
         this.multipleSelection = val
187 195
       }, changeAllGoodInfoTableData: function(val) {
188 196
         this.multipleSelection = val
189
-      },clickRow:function(row) {
197
+      }, clickRow: function(row) {
190 198
         this.$refs.multipleTable.toggleRowSelection(row)
191 199
       }
192 200
     }

+ 120 - 39
src/xt_pages/stock/cancelStockOrderAdd.vue Näytä tiedosto

@@ -1,7 +1,9 @@
1 1
 <template>
2 2
   <div class="main-contain">
3 3
     <div class="position">
4
-      <bread-crumb :crumbs='crumbs'></bread-crumb>
4
+      <bread-crumb v-if="this.$route.query.type == 1" :crumbs='crumbs'></bread-crumb>
5
+      <bread-crumb v-if="this.$route.query.type == 2" :crumbs='crumbs2'></bread-crumb>
6
+
5 7
       <div style="float:right;">
6 8
         <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
7 9
         <el-button size="small"  type="primary" @click="submit()" class="filter-item" >保 存</el-button>
@@ -25,9 +27,22 @@
25 27
                           type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
26 28
                           value-format="yyyy-MM-dd"></el-date-picker>
27 29
         </div>
28
-        <div class="cell clearfix">
29
-          <label class="title"><span class="name">厂商<span style="color: red;margin-left: -15px">*</span></span> : </label>
30
-          <el-select  size="small"   v-model="form.manufacturer" clearable  placeholder="请选择厂商" @change="changeManufacturer()">
30
+
31
+      <div class="cell clearfix">
32
+        <label class="title"><span class="name">经销商</span> : </label>
33
+        <el-select   size="small"  v-model="form.dealer" clearable  placeholder="请选择经销商"  @change="changeDealer">
34
+          <el-option
35
+            v-for="(option, index) in dealer"
36
+            :key="index"
37
+            :label="option.dealer_name"
38
+            :value="option.id">
39
+          </el-option>
40
+        </el-select>
41
+      </div>
42
+
43
+      <div class="cell clearfix">
44
+          <label class="title"><span class="name">厂商</span> : </label>
45
+          <el-select  size="small"   v-model="form.manufacturer" clearable  placeholder="请选择厂商" @change="changeManufacturer">
31 46
             <el-option
32 47
               v-for="(option, index) in manufacturer"
33 48
               :key="index"
@@ -37,17 +52,6 @@
37 52
           </el-select>
38 53
         </div>
39 54
 
40
-        <div class="cell clearfix">
41
-          <label class="title"><span class="name">经销商</span> : </label>
42
-          <el-select   size="small"  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 55
 
52 56
 
53 57
     </div>
@@ -142,7 +146,12 @@
142 146
       return {
143 147
         crumbs: [
144 148
           { path: false, name: '库存管理' },
145
-          { path: false, name: '退库单' },
149
+          { path: false, name: '耗材退库单' },
150
+          { path: false, name: '新增退库单' }
151
+        ],
152
+        crumbs2: [
153
+          { path: false, name: '库存管理' },
154
+          { path: false, name: '其他退库单' },
146 155
           { path: false, name: '新增退库单' }
147 156
         ],
148 157
 
@@ -169,11 +178,13 @@
169 178
         propForm: {
170 179
           goodType: [],
171 180
           goodInfo: [],
172
-          goodUnit: []
181
+          goodUnit: [],
182
+          manufacturer: 0,
183
+          dealer: 0
173 184
         },
174 185
         form: {
175
-          manufacturer: '',
176
-          dealer: ''
186
+          manufacturer: 0,
187
+          dealer: 0
177 188
         },
178 189
         warehouseOutInfoList:[],
179 190
         manufacturer: [],
@@ -199,37 +210,53 @@
199 210
           }
200 211
         }
201 212
 
213
+        this.propForm.goodType = []
214
+
202 215
         this.currentIndex = -1
203 216
       }, cancle: function() {
204 217
         this.$refs.dialog.hide()
218
+        this.propForm.goodType = []
219
+
205 220
       }, GetConfigInfo: function() {
221
+        const loading = this.$loading({
222
+          lock: true,
223
+          text: 'Loading',
224
+          spinner: 'el-icon-loading',
225
+          background: 'rgba(0, 0, 0, 0.7)'
226
+        })
227
+
206 228
         const params = {
207 229
           type: this.$route.query.type
208 230
         }
209 231
         getCancelStockConfig(params).then(response => {
210 232
           if (response.data.state == 0) {
233
+            loading.close()
211 234
             this.$message.error(response.data.msg)
212 235
             return false
213 236
           } else {
214
-            var warehouseOutList = response.data.data.warehouseOutList
237
+            loading.close()
215 238
             var warehouseOutInfoList = response.data.data.warehouseOutInfoList
216 239
             this.warehouseOutInfoList = response.data.data.warehouseOutInfoList
217
-
218
-            for (let i = 0; i < warehouseOutList.length; i++) {
219
-              if (warehouseOutList[i].Manufacturer.id > 0) {
220
-                this.manufacturer.push(warehouseOutList[i].Manufacturer)
240
+            for (let i = 0; i < warehouseOutInfoList.length; i++) {
241
+              if (warehouseOutInfoList[i].info.manufacturers.id > 0) {
242
+                this.manufacturer.push(warehouseOutInfoList[i].info.manufacturers)
221 243
               }
222
-              if (warehouseOutList[i].Dealer.id > 0) {
223
-                this.dealer.push(warehouseOutList[i].Dealer)
244
+              if (warehouseOutInfoList[i].info.dealers.id > 0) {
245
+                this.dealer.push(warehouseOutInfoList[i].info.dealers)
224 246
               }
225 247
             }
248
+            for (let i = 0; i < warehouseOutInfoList.length; i++) {
249
+              this.goodType.push(warehouseOutInfoList[i].info.type)
250
+            }
251
+
226 252
 
227 253
             for (let i = 0; i < warehouseOutInfoList.length; i++) {
228
-              this.propForm.goodInfo.push(warehouseOutInfoList[i].GoodInfo)
254
+              this.propForm.goodInfo.push(warehouseOutInfoList[i].info)
229 255
             }
230 256
 
231 257
             const obj = {}
232 258
             const obj2 = {}
259
+            const obj3 = {}
233 260
             const obj4 = {}
234 261
             // 去重复
235 262
             this.manufacturer = this.manufacturer.reduce((cur, next) => {
@@ -241,17 +268,27 @@
241 268
               obj2[next.id] ? '' : obj2[next.id] = true && cur.push(next)
242 269
               return cur
243 270
             }, [])
271
+            this.goodType = this.goodType.reduce((cur, next) => {
272
+              obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
273
+              return cur
274
+            }, [])
244 275
             this.propForm.goodInfo = this.propForm.goodInfo.reduce((cur, next) => {
245 276
               obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
246 277
               return cur
247 278
             }, [])
279
+
280
+            this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: '全部' })
281
+            this.dealer.splice(0, 0, { id: 0, dealer_name: '全部' })
282
+            this.form.manufacturer =0
283
+            this.form.dealer = 0
284
+
248 285
           }
249 286
         })
250 287
       }, typeName: function(good_type_id) {
251 288
         let name = ''
252
-        for (let i = 0; i < this.propForm.goodType.length; i++) {
253
-          if (this.propForm.goodType[i].id == good_type_id) {
254
-            name = this.propForm.goodType[i].type_name
289
+        for (let i = 0; i < this.goodType.length; i++) {
290
+          if (this.goodType[i].id == good_type_id) {
291
+            name = this.goodType[i].type_name
255 292
           }
256 293
         }
257 294
         return name
@@ -289,10 +326,57 @@
289 326
           return ''
290 327
         }
291 328
       }, showDialog(index, row) {
329
+        this.currentIndex = index
330
+        this.propForm.goodType = []
331
+
332
+
333
+        if (this.form.manufacturer == 0 && this.form.dealer == 0) {
334
+          for (let i = 0; i < this.warehouseOutInfoList.length; i++) {
335
+            this.propForm.goodType.push(this.warehouseOutInfoList[i].info.type)
336
+          }
337
+          const obj3 = {}
338
+          this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
339
+            obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
340
+            return cur
341
+          }, [])
342
+
343
+        } else {
344
+          if(this.form.manufacturer == 0 && this.form.dealer != 0){
345
+            for (let i = 0; i < this.warehouseOutInfoList.length; i++) {
346
+              if(this.warehouseOutInfoList[i].info.dealers.id == this.form.dealer){
347
+                this.propForm.goodType.push(this.warehouseOutInfoList[i].info.type)
348
+              }
349
+            }
350
+          }
351
+          if(this.form.manufacturer != 0 && this.form.dealer == 0){
352
+            for (let i = 0; i < this.warehouseOutInfoList.length; i++) {
353
+              if(this.warehouseOutInfoList[i].info.manufacturers.id == this.form.manufacturer){
354
+                this.propForm.goodType.push(this.warehouseOutInfoList[i].info.type)
355
+              }
356
+            }
357
+          }
358
+          if(this.form.manufacturer != 0 && this.form.dealer != 0){
359
+            for (let i = 0; i < this.warehouseOutInfoList.length; i++) {
360
+              if(this.warehouseOutInfoList[i].info.dealers.id == this.form.dealer && this.warehouseOutInfoList[i].info.manufacturers.id == this.form.manufacturer){
361
+                this.propForm.goodType.push(this.warehouseOutInfoList[i].info.type)
362
+              }
363
+            }
364
+          }
365
+          const obj3 = {}
366
+          this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
367
+            obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
368
+            return cur
369
+          }, [])
370
+        }
371
+
372
+
373
+
374
+        this.$refs.dialog.show()
375
+
376
+
292 377
         this.currentIndex = index
293 378
         if (this.form.manufacturer == '' || this.form.manufacturer == 0) {
294
-          this.$message.error('请先选择厂商')
295
-          return
379
+
296 380
         } else {
297 381
           this.$refs.dialog.show()
298 382
 
@@ -351,13 +435,10 @@
351 435
             return false
352 436
           }
353 437
         })
354
-      }, changeManufacturer() {
355
-        this.recordInfo.recordData = []
356
-        const tempObj = {}
357
-        tempObj['good_type_id'] = 0
358
-        tempObj['good_id'] = 0
359
-        tempObj['return_count'] = ''
360
-        this.recordInfo.recordData.push(tempObj)
438
+      }, changeManufacturer(val) {
439
+        this.propForm.manufacturer = val
440
+      },changeDealer(val){
441
+        this.propForm.dealer = val
361 442
       }
362 443
     },
363 444
     created() {

+ 10 - 2
src/xt_pages/stock/cancelStockOrderDetail.vue Näytä tiedosto

@@ -1,7 +1,10 @@
1 1
 <template>
2 2
   <div class="main-contain">
3 3
     <div class="position">
4
-      <bread-crumb :crumbs='crumbs'></bread-crumb>
4
+
5
+      <bread-crumb v-if="this.$route.query.type == 1" :crumbs='crumbs'></bread-crumb>
6
+      <bread-crumb v-if="this.$route.query.type == 2" :crumbs='crumbs2'></bread-crumb>
7
+
5 8
     </div>
6 9
   <div class="app-container">
7 10
 
@@ -82,7 +85,12 @@
82 85
       return {
83 86
         crumbs: [
84 87
           { path: false, name: '库存管理' },
85
-          { path: false, name: '退库单' },
88
+          { path: false, name: '耗材退库单' },
89
+          { path: false, name: '退库单详情' }
90
+        ],
91
+        crumbs2: [
92
+          { path: false, name: '库存管理' },
93
+          { path: false, name: '其他退库单' },
86 94
           { path: false, name: '退库单详情' }
87 95
         ],
88 96
         isEdit: 0,

+ 93 - 11
src/xt_pages/stock/cancelStockOrderEdit.vue Näytä tiedosto

@@ -1,7 +1,8 @@
1 1
 <template>
2 2
   <div class="main-contain">
3 3
     <div class="position">
4
-      <bread-crumb :crumbs='crumbs'></bread-crumb>
4
+      <bread-crumb v-if="this.$route.query.type == 1" :crumbs='crumbs'></bread-crumb>
5
+      <bread-crumb v-if="this.$route.query.type == 2" :crumbs='crumbs2'></bread-crumb>
5 6
       <div style="float:right;">
6 7
         <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
7 8
         <el-button size="small"  type="primary" @click="submit()" class="filter-item" >保 存</el-button>
@@ -21,6 +22,35 @@
21 22
                         value-format="yyyy-MM-dd"></el-date-picker>
22 23
       </div>
23 24
 
25
+      <div class="cell clearfix">
26
+        <label class="title"><span class="name">经销商</span> : </label>
27
+        <el-select   size="small"  v-model="form.dealer" clearable  placeholder="请选择经销商"  @change="changeDealer">
28
+          <el-option
29
+            v-for="(option, index) in dealer"
30
+            :key="index"
31
+            :label="option.dealer_name"
32
+            :value="option.id">
33
+          </el-option>
34
+        </el-select>
35
+      </div>
36
+
37
+      <div class="cell clearfix">
38
+        <label class="title"><span class="name">厂商</span> : </label>
39
+        <el-select  size="small"   v-model="form.manufacturer" clearable  placeholder="请选择厂商" @change="changeManufacturer">
40
+          <el-option
41
+            v-for="(option, index) in manufacturer"
42
+            :key="index"
43
+            :label="option.manufacturer_name"
44
+            :value="option.id">
45
+          </el-option>
46
+        </el-select>
47
+      </div>
48
+
49
+
50
+
51
+
52
+
53
+
24 54
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
25 55
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
26 56
                   max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
@@ -117,9 +147,17 @@
117 147
       return {
118 148
         crumbs: [
119 149
           { path: false, name: '库存管理' },
120
-          { path: false, name: '退库单' },
150
+          { path: false, name: '耗材退库单' },
151
+          { path: false, name: '编辑退库单' }
152
+        ],
153
+
154
+        crumbs2: [
155
+          { path: false, name: '库存管理' },
156
+          { path: false, name: '其他退库单' },
121 157
           { path: false, name: '编辑退库单' }
122 158
         ],
159
+
160
+
123 161
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
124 162
         warehousing_time: '',
125 163
         adminUserOptions: null,
@@ -191,35 +229,75 @@
191 229
         const params = {
192 230
           type: this.$route.query.type
193 231
         }
232
+        const loading = this.$loading({
233
+          lock: true,
234
+          text: 'Loading',
235
+          spinner: 'el-icon-loading',
236
+          background: 'rgba(0, 0, 0, 0.7)'
237
+        })
194 238
         getCancelStockConfig(params).then(response => {
239
+
195 240
           if (response.data.state == 0) {
241
+            loading.close()
196 242
             this.$message.error(response.data.msg)
197 243
             return false
198 244
           } else {
245
+            loading.close()
199 246
             var warehouseOutInfoList = response.data.data.warehouseOutInfoList
200 247
             this.warehouseOutInfoList = response.data.data.warehouseOutInfoList
248
+            for (let i = 0; i < warehouseOutInfoList.length; i++) {
249
+              if (warehouseOutInfoList[i].info.manufacturers.id > 0) {
250
+                this.manufacturer.push(warehouseOutInfoList[i].info.manufacturers)
251
+              }
252
+              if (warehouseOutInfoList[i].info.dealers.id > 0) {
253
+                this.dealer.push(warehouseOutInfoList[i].info.dealers)
254
+              }
255
+            }
256
+            for (let i = 0; i < warehouseOutInfoList.length; i++) {
257
+              this.goodType.push(warehouseOutInfoList[i].info.type)
258
+            }
259
+
201 260
 
202 261
             for (let i = 0; i < warehouseOutInfoList.length; i++) {
203
-              this.propForm.goodInfo.push(warehouseOutInfoList[i].GoodInfo)
204
-              this.propForm.goodType.push(warehouseOutInfoList[i].GoodInfo.GoodsType)
262
+              this.propForm.goodInfo.push(warehouseOutInfoList[i].info)
205 263
             }
264
+
265
+            const obj = {}
266
+            const obj2 = {}
206 267
             const obj3 = {}
207 268
             const obj4 = {}
208
-            this.propForm.goodInfo = this.propForm.goodInfo.reduce((cur, next) => {
209
-              obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
269
+            // 去重复
270
+            this.manufacturer = this.manufacturer.reduce((cur, next) => {
271
+              obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
210 272
               return cur
211 273
             }, [])
212
-            this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
274
+            // 去重复
275
+            this.dealer = this.dealer.reduce((cur, next) => {
276
+              obj2[next.id] ? '' : obj2[next.id] = true && cur.push(next)
277
+              return cur
278
+            }, [])
279
+            this.goodType = this.goodType.reduce((cur, next) => {
213 280
               obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
214 281
               return cur
215 282
             }, [])
283
+            this.propForm.goodInfo = this.propForm.goodInfo.reduce((cur, next) => {
284
+              obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
285
+              return cur
286
+            }, [])
287
+
288
+            this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: '全部' })
289
+            this.dealer.splice(0, 0, { id: 0, dealer_name: '全部' })
290
+
291
+
292
+            console.log(this.goodType)
293
+
216 294
           }
217 295
         })
218 296
       }, typeName: function(good_type_id) {
219 297
         let name = ''
220
-        for (let i = 0; i < this.propForm.goodType.length; i++) {
221
-          if (this.propForm.goodType[i].id == good_type_id) {
222
-            name = this.propForm.goodType[i].type_name
298
+        for (let i = 0; i < this.goodType.length; i++) {
299
+          if (this.goodType[i].id == good_type_id) {
300
+            name = this.goodType[i].type_name
223 301
           }
224 302
         }
225 303
         return name
@@ -301,7 +379,7 @@
301 379
             const params = {
302 380
               'cancelStock': this.recordInfo.recordData
303 381
             }
304
-            editCancelStockInfo(params, this.return_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer).then(response => {
382
+            editCancelStockInfo(params, this.return_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer,this.form.dealer).then(response => {
305 383
               if (response.data.state == 0) {
306 384
                 this.$message.error(response.data.msg)
307 385
                 return false
@@ -342,6 +420,10 @@
342 420
             this.recordInfo.recordData.push(tempObj)
343 421
           }
344 422
         })
423
+      },changeManufacturer(val) {
424
+        this.propForm.manufacturer = val
425
+      },changeDealer(val){
426
+        this.propForm.dealer = val
345 427
       }
346 428
     },
347 429
     created() {

+ 18 - 15
src/xt_pages/stock/config/goodInfo.vue Näytä tiedosto

@@ -33,28 +33,28 @@
33 33
           </el-table-column>
34 34
 
35 35
 
36
+          <el-table-column label="进价"  align="center" >
37
+            <template slot-scope="scope" v-if="scope.row.buy_price">
36 38
 
37
-          <el-table-column label="进价"  align="center">
38
-            <template slot-scope="scope">
39 39
               {{scope.row.buy_price}}
40 40
 
41 41
             </template>
42 42
           </el-table-column>
43
-          <el-table-column label="出货价"  align="center">
44
-            <template slot-scope="scope">
43
+          <el-table-column label="出货价"  align="center" >
44
+            <template slot-scope="scope" v-if="scope.row.sell_price">
45 45
               {{scope.row.sell_price}}
46 46
             </template>
47 47
           </el-table-column>
48
-          <el-table-column label="有效期预警"  align="center">
49
-            <template slot-scope="scope">
50
-              {{scope.row.expiry_date_warn_day_count}}
51
-            </template>
52
-          </el-table-column>
53
-          <el-table-column label="库存预警" align="center">
54
-            <template slot-scope="scope">
55
-              {{scope.row.stock_warn_count}}
56
-            </template>
57
-          </el-table-column>
48
+          <!--<el-table-column label="有效期预警"  align="center">-->
49
+            <!--<template slot-scope="scope" v-if="scope.row.expiry_date_warn_day_count">-->
50
+              <!--{{scope.row.expiry_date_warn_day_count}}-->
51
+            <!--</template>-->
52
+          <!--</el-table-column>-->
53
+          <!--<el-table-column label="库存预警" align="center">-->
54
+            <!--<template slot-scope="scope" v-if="scope.row.stock_warn_count">-->
55
+              <!--{{scope.row.stock_warn_count}}-->
56
+            <!--</template>-->
57
+          <!--</el-table-column>-->
58 58
           <el-table-column label="操作" align="center" >
59 59
             <template slot-scope="scope">
60 60
               <el-tooltip class="item" effect="dark" content="编辑" placement="top">
@@ -320,7 +320,6 @@
320 320
         });
321 321
 
322 322
       }, goodInfoDialogComfirm: function (val) {
323
-        this.$refs.dialog.hide()
324 323
 
325 324
         if (val.isCreated == 2) { //修改
326 325
           val['id'] = this.goodInfo.editGoodId
@@ -331,6 +330,8 @@
331 330
               this.$message.error(response.data.msg);
332 331
               return false;
333 332
             } else {
333
+              this.$refs.dialog.hide()
334
+
334 335
               this.goodInfo.goodInfoData[this.goodInfo.editGoodIndex].specification_name = response.data.data.goodInfo.specification_name
335 336
               this.goodInfo.goodInfoData[this.goodInfo.editGoodIndex].good_unit = response.data.data.goodInfo.good_unit
336 337
               this.goodInfo.goodInfoData[this.goodInfo.editGoodIndex].buy_price = response.data.data.goodInfo.buy_price.toString()
@@ -350,6 +351,8 @@
350 351
               this.$message.error(response.data.msg);
351 352
               return false;
352 353
             } else {
354
+              this.$refs.dialog.hide()
355
+
353 356
               this.goodInfo.goodInfoData.unshift(response.data.data.goodInfo)
354 357
 
355 358
               this.$message.success("新增成功")

+ 4 - 2
src/xt_pages/stock/config/goodType.vue Näytä tiedosto

@@ -259,7 +259,6 @@ export default {
259 259
     },
260 260
 
261 261
     goodTypeDialogComfirm: function(val) {
262
-      this.$refs.dialog.hide();
263 262
 
264 263
       if (val.isCreated == 2) {
265 264
         //修改
@@ -275,6 +274,8 @@ export default {
275 274
             this.$message.error(response.data.msg);
276 275
             return false;
277 276
           } else {
277
+            this.$refs.dialog.hide();
278
+
278 279
             this.goodType.goodTypeData[this.goodType.editTypeIndex].type_name =
279 280
               response.data.data.goodTypes.type_name;
280 281
             this.goodType.goodTypeData[this.goodType.editTypeIndex].remark =
@@ -290,8 +291,8 @@ export default {
290 291
             this.$message.error(response.data.msg);
291 292
             return false;
292 293
           } else {
294
+            this.$refs.dialog.hide();
293 295
             this.goodType.goodTypeData.unshift(response.data.data.goodTypes);
294
-
295 296
             this.$message.success("新增成功");
296 297
           }
297 298
         });
@@ -301,6 +302,7 @@ export default {
301 302
       this.$refs.dialog.hide();
302 303
     },
303 304
     showDialog: function() {
305
+      this.goodType.goodTypeDialog.isCreated = 1;
304 306
       this.$refs.dialog.show();
305 307
     },
306 308
     getList() {

+ 19 - 2
src/xt_pages/stock/detail/cancelStockDetail.vue Näytä tiedosto

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
     <div>
3 3
       <div class="cell clearfix" >
4
-        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
4
+        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/规格名称"/>
5 5
         <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
6 6
       </div>
7 7
 
@@ -58,13 +58,20 @@
58 58
             </template>
59 59
           </el-table-column>
60 60
 
61
-          <el-table-column label="商品" align="center">
61
+          <el-table-column label="商品类型" align="center">
62
+            <template slot-scope="scope">
63
+              {{typeName(scope.row.good_type_id)}}
64
+            </template>
65
+          </el-table-column>
66
+
67
+          <el-table-column label="规格名称" align="center">
62 68
             <template slot-scope="scope">
63 69
               {{specificationName(scope.row.good_id)}}
64 70
             </template>
65 71
           </el-table-column>
66 72
 
67 73
 
74
+
68 75
           <el-table-column label="单据类型" align="center">
69 76
             <template slot-scope="scope">
70 77
               {{getTypeName(scope.row)}}
@@ -187,6 +194,14 @@
187 194
           name = '其他退库单'
188 195
         }
189 196
 
197
+        return name
198
+      },   typeName: function(good_type_id) {
199
+        let name = ''
200
+        for (let i = 0; i < this.goodType.length; i++) {
201
+          if (this.goodType[i].id == good_type_id) {
202
+            name = this.goodType[i].type_name
203
+          }
204
+        }
190 205
         return name
191 206
       },
192 207
       specificationName: function(good_info_id) {
@@ -301,6 +316,8 @@
301 316
             this.manufacturer = response.data.data.manufacturer
302 317
             this.dealer = response.data.data.dealer
303 318
             this.goodInfo = response.data.data.goodInfo
319
+            this.goodType = response.data.data.goodType
320
+
304 321
           }
305 322
         })
306 323
       }, getManufactuerName: function(manufacturer_id) {

+ 18 - 2
src/xt_pages/stock/detail/salesReturnDetail.vue Näytä tiedosto

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
     <div>
3 3
       <div class="cell clearfix" >
4
-        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
4
+        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/规格名称"/>
5 5
         <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
6 6
       </div>
7 7
 
@@ -61,7 +61,13 @@
61 61
             </template>
62 62
           </el-table-column>
63 63
 
64
-          <el-table-column label="商品" align="center">
64
+          <el-table-column label="商品类型" align="center">
65
+            <template slot-scope="scope">
66
+              {{typeName(scope.row.good_type_id)}}
67
+            </template>
68
+          </el-table-column>
69
+
70
+          <el-table-column label="规格名称" align="center">
65 71
             <template slot-scope="scope">
66 72
               {{specificationName(scope.row.good_id)}}
67 73
             </template>
@@ -189,6 +195,14 @@
189 195
           name = '其他退货单'
190 196
         }
191 197
 
198
+        return name
199
+      },   typeName: function(good_type_id) {
200
+        let name = ''
201
+        for (let i = 0; i < this.goodType.length; i++) {
202
+          if (this.goodType[i].id == good_type_id) {
203
+            name = this.goodType[i].type_name
204
+          }
205
+        }
192 206
         return name
193 207
       },
194 208
       specificationName: function(good_info_id) {
@@ -303,6 +317,8 @@
303 317
             this.manufacturer = response.data.data.manufacturer
304 318
             this.dealer = response.data.data.dealer
305 319
             this.goodInfo = response.data.data.goodInfo
320
+            this.goodType = response.data.data.goodType
321
+
306 322
           }
307 323
         })
308 324
       }, getManufactuerName: function(manufacturer_id) {

+ 18 - 2
src/xt_pages/stock/detail/stockInDetail.vue Näytä tiedosto

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
     <div>
3 3
       <div class="cell clearfix">
4
-        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
4
+        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/规格名称"/>
5 5
         <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
6 6
       </div>
7 7
 
@@ -58,7 +58,13 @@
58 58
             </template>
59 59
           </el-table-column>
60 60
 
61
-          <el-table-column label="商品" align="center">
61
+          <el-table-column label="商品类型" align="center">
62
+            <template slot-scope="scope">
63
+              {{typeName(scope.row.good_type_id)}}
64
+            </template>
65
+          </el-table-column>
66
+
67
+          <el-table-column label="规格名称" align="center">
62 68
             <template slot-scope="scope">
63 69
               {{specificationName(scope.row.good_id)}}
64 70
             </template>
@@ -198,6 +204,14 @@
198 204
           name = '其他入库单'
199 205
         }
200 206
 
207
+        return name
208
+      },   typeName: function(good_type_id) {
209
+        let name = ''
210
+        for (let i = 0; i < this.goodType.length; i++) {
211
+          if (this.goodType[i].id == good_type_id) {
212
+            name = this.goodType[i].type_name
213
+          }
214
+        }
201 215
         return name
202 216
       },
203 217
       specificationName: function(good_info_id) {
@@ -312,6 +326,8 @@
312 326
             this.manufacturer = response.data.data.manufacturer
313 327
             this.dealer = response.data.data.dealer
314 328
             this.goodInfo = response.data.data.goodInfo
329
+            this.goodType = response.data.data.goodType
330
+
315 331
           }
316 332
         })
317 333
       }, getManufactuerName: function(manufacturer_id) {

+ 19 - 2
src/xt_pages/stock/detail/stockOutDetail.vue Näytä tiedosto

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
     <div>
3 3
       <div class="cell clearfix" >
4
-        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
4
+        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/规格名称"/>
5 5
         <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
6 6
       </div>
7 7
 
@@ -62,7 +62,13 @@
62 62
             </template>
63 63
           </el-table-column>
64 64
 
65
-          <el-table-column label="商品" align="center">
65
+          <el-table-column label="商品类型" align="center">
66
+            <template slot-scope="scope">
67
+              {{typeName(scope.row.good_type_id)}}
68
+            </template>
69
+          </el-table-column>
70
+
71
+          <el-table-column label="规格名称" align="center">
66 72
             <template slot-scope="scope">
67 73
               {{specificationName(scope.row.good_id)}}
68 74
             </template>
@@ -212,6 +218,15 @@
212 218
         }
213 219
         return name
214 220
       },
221
+      typeName: function(good_type_id) {
222
+        let name = ''
223
+        for (let i = 0; i < this.goodType.length; i++) {
224
+          if (this.goodType[i].id == good_type_id) {
225
+            name = this.goodType[i].type_name
226
+          }
227
+        }
228
+        return name
229
+      },
215 230
       search: function() {
216 231
         const Params = {
217 232
           page: this.page,
@@ -315,6 +330,8 @@
315 330
             this.manufacturer = response.data.data.manufacturer
316 331
             this.dealer = response.data.data.dealer
317 332
             this.goodInfo = response.data.data.goodInfo
333
+            this.goodType = response.data.data.goodType
334
+
318 335
           }
319 336
         })
320 337
       }, getManufactuerName: function(manufacturer_id) {

+ 150 - 30
src/xt_pages/stock/salesReturnEdit.vue Näytä tiedosto

@@ -22,7 +22,37 @@
22 22
                             value-format="yyyy-MM-dd"></el-date-picker>
23 23
     </div>
24 24
 
25
-        <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
25
+
26
+    <div class="cell clearfix">
27
+      <label class="title"><span class="name">经销商</span> : </label>
28
+      <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer">
29
+        <el-option
30
+          v-for="(option, index) in dealer"
31
+          :key="index"
32
+          :label="option.dealer_name"
33
+          :value="option.id">
34
+        </el-option>
35
+      </el-select>
36
+    </div>
37
+
38
+
39
+    <div class="cell clearfix">
40
+      <label class="title"><span class="name">厂商</span> : </label>
41
+
42
+      <el-select size="small" v-model="form.manufacturer" clearable placeholder="请选择厂商" @change="changeManufacturer">
43
+        <el-option
44
+          v-for="(option, index) in manufacturer"
45
+          :key="index"
46
+          :label="option.manufacturer_name"
47
+          :value="option.id">
48
+        </el-option>
49
+      </el-select>
50
+    </div>
51
+
52
+
53
+
54
+
55
+    <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
26 56
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
27 57
                     max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
28 58
           >
@@ -143,12 +173,7 @@
143 173
           ]
144 174
 
145 175
         },
146
-        ruleForm: {
147
-          manufacturer: [
148
-            { required: true, message: '请选择厂商', trigger: 'change' }
149
-          ]
150 176
 
151
-        },
152 177
 
153 178
         // prop
154 179
         isVisibility: false,
@@ -156,12 +181,14 @@
156 181
           goodType: [],
157 182
           goodInfo: [],
158 183
           goodUnit: [],
159
-          title: '入库'
184
+          title: '入库',
185
+          manufacturer:0,
186
+          dealer:0,
160 187
         },
161 188
 
162 189
         form: {
163
-          manufacturer: '',
164
-          dealer: ''
190
+          manufacturer: 0,
191
+          dealer: 0,
165 192
         },
166 193
         warehouseInfoList:[],
167 194
         salesReturn: {},
@@ -189,45 +216,91 @@
189 216
             }
190 217
           }
191 218
         }
192
-
219
+        this.propForm.goodType = []
193 220
         this.currentIndex = -1
194 221
       }, cancle: function() {
195 222
         this.$refs.dialog.hide()
223
+        this.propForm.goodType = []
224
+
196 225
       }, GetConfigInfo: function() {
197 226
         const params = {
198 227
           type: this.$route.query.type
199 228
 
200 229
         }
230
+        const loading = this.$loading({
231
+          lock: true,
232
+          text: 'Loading',
233
+          spinner: 'el-icon-loading',
234
+          background: 'rgba(0, 0, 0, 0.7)'
235
+        })
201 236
         getSalesReturnConfig(params).then(response => {
202 237
           if (response.data.state == 0) {
238
+            loading.close()
239
+
203 240
             this.$message.error(response.data.msg)
204 241
             return false
205 242
           } else {
243
+            loading.close()
244
+
206 245
             var warehouseInfoList = response.data.data.warehouseInfoList
207 246
             this.warehouseInfoList = response.data.data.warehouseInfoList
208 247
             for (let i = 0; i < warehouseInfoList.length; i++) {
209
-              this.propForm.goodInfo.push(warehouseInfoList[i].GoodInfo)
210
-              this.propForm.goodType.push(warehouseInfoList[i].GoodInfo.GoodsType)
248
+              if (warehouseInfoList[i].info.manufacturers.id > 0) {
249
+                this.manufacturer.push(warehouseInfoList[i].info.manufacturers)
250
+              }
251
+              if (warehouseInfoList[i].info.dealers.id > 0) {
252
+                this.dealer.push(warehouseInfoList[i].info.dealers)
253
+              }
254
+            }
255
+
256
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
257
+              this.propForm.goodInfo.push(this.warehouseInfoList[i].info)
258
+            }
259
+
260
+
261
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
262
+              this.goodType.push(this.warehouseInfoList[i].info.type)
211 263
             }
264
+
265
+
266
+            const obj = {}
267
+            const obj2 = {}
212 268
             const obj3 = {}
269
+
213 270
             const obj4 = {}
214
-            this.propForm.goodInfo = this.propForm.goodInfo.reduce((cur, next) => {
215
-              obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
271
+
272
+            // 去重复
273
+            this.manufacturer = this.manufacturer.reduce((cur, next) => {
274
+              obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
275
+              return cur
276
+            }, [])
277
+            // 去重复
278
+            this.dealer = this.dealer.reduce((cur, next) => {
279
+              obj2[next.id] ? '' : obj2[next.id] = true && cur.push(next)
216 280
               return cur
217 281
             }, [])
218
-            this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
282
+
283
+            this.goodType = this.goodType.reduce((cur, next) => {
219 284
               obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
220 285
               return cur
221 286
             }, [])
222
-            console.log(this.propForm.goodInfo)
223
-            console.log(this.propForm.goodType)
287
+
288
+
289
+            this.propForm.goodInfo = this.propForm.goodInfo.reduce((cur, next) => {
290
+              obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
291
+              return cur
292
+            }, [])
293
+            this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: '全部' })
294
+            this.dealer.splice(0, 0, { id: 0, dealer_name: '全部' })
295
+
296
+
224 297
           }
225 298
         })
226 299
       }, typeName: function(good_type_id) {
227 300
         let name = ''
228
-        for (let i = 0; i < this.propForm.goodType.length; i++) {
229
-          if (this.propForm.goodType[i].id == good_type_id) {
230
-            name = this.propForm.goodType[i].type_name
301
+        for (let i = 0; i < this.goodType.length; i++) {
302
+          if (this.goodType[i].id == good_type_id) {
303
+            name = this.goodType[i].type_name
231 304
           }
232 305
         }
233 306
         return name
@@ -278,17 +351,58 @@
278 351
         }
279 352
       }, showDialog(index, row) {
280 353
         this.currentIndex = index
281
-        this.$refs.dialog.show()
282
-        for (let i = 0; i < this.warehouseInfoList.length; i++) {
283
-          if (this.warehouseInfoList[i].manufacturer == this.form.manufacturer) {
284
-            this.propForm.goodType.push(this.warehouseInfoList[i].GoodInfo.GoodsType)
354
+        this.propForm.goodType = []
355
+
356
+
357
+        if (this.form.manufacturer == 0 && this.form.dealer == 0) {
358
+          for (let i = 0; i < this.warehouseInfoList.length; i++) {
359
+            this.propForm.goodType.push(this.warehouseInfoList[i].info.type)
285 360
           }
361
+          const obj3 = {}
362
+          this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
363
+            obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
364
+            return cur
365
+          }, [])
366
+        } else {
367
+
368
+
369
+          if(this.form.manufacturer == 0 && this.form.dealer != 0){
370
+
371
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
372
+              if(this.warehouseInfoList[i].info.dealers.id == this.form.dealer){
373
+                this.propForm.goodType.push(this.warehouseInfoList[i].info.type)
374
+              }
375
+            }
376
+          }
377
+          if(this.form.manufacturer != 0 && this.form.dealer == 0){
378
+            console.log(this.warehouseInfoList)
379
+
380
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
381
+              if(this.warehouseInfoList[i].info.manufacturers.id == this.form.manufacturer){
382
+                this.propForm.goodType.push(this.warehouseInfoList[i].info.type)
383
+              }
384
+            }
385
+
386
+          }
387
+          if(this.form.manufacturer != 0 && this.form.dealer != 0){
388
+
389
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
390
+              if(this.warehouseInfoList[i].info.dealers.id == this.form.dealer && this.warehouseInfoList[i].info.manufacturers.id == this.form.manufacturer){
391
+                this.propForm.goodType.push(this.warehouseInfoList[i].info.type)
392
+              }
393
+            }
394
+
395
+          }
396
+          const obj3 = {}
397
+          this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
398
+            obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
399
+            return cur
400
+          }, [])
286 401
         }
287
-        const obj3 = {}
288
-        this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
289
-          obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
290
-          return cur
291
-        }, [])
402
+        this.$refs.dialog.show()
403
+
404
+
405
+
292 406
       }, back() {
293 407
         this.$router.go(-1)
294 408
       }, submit() {
@@ -309,7 +423,7 @@
309 423
             const params = {
310 424
               'salesReturn': this.recordInfo.recordData
311 425
             }
312
-            editSalesReturnInfo(params, this.return_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer).then(response => {
426
+            editSalesReturnInfo(params, this.return_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer,this.form.dealer).then(response => {
313 427
               if (response.data.state == 0) {
314 428
                 this.$message.error(response.data.msg)
315 429
                 return false
@@ -351,6 +465,12 @@
351 465
             this.recordInfo.recordData.push(tempObj)
352 466
           }
353 467
         })
468
+      },changeManufacturer(val) {
469
+        this.propForm.manufacturer = val
470
+        console.log(val)
471
+      },changeDealer(val){
472
+        this.propForm.dealer = val
473
+        console.log(val)
354 474
       }
355 475
     },
356 476
     created() {

+ 110 - 58
src/xt_pages/stock/salesReturnOrderAdd.vue Näytä tiedosto

@@ -1,7 +1,10 @@
1 1
 <template>
2 2
   <div class="main-contain">
3 3
     <div class="position">
4
-      <bread-crumb :crumbs='crumbs'></bread-crumb>
4
+      <bread-crumb v-if="this.$route.query.type == 1" :crumbs='crumbs'></bread-crumb>
5
+      <bread-crumb v-if="this.$route.query.type == 2" :crumbs='crumbs2'></bread-crumb>
6
+
7
+
5 8
       <div style="float:right;">
6 9
         <el-button size="small" @click="back()" class="filter-item">取 消</el-button>
7 10
         <el-button size="small" type="primary" @click="submit()" class="filter-item">保 存</el-button>
@@ -20,32 +23,33 @@
20 23
                         value-format="yyyy-MM-dd"></el-date-picker>
21 24
       </div>
22 25
 
23
-
24 26
       <div class="cell clearfix">
25
-        <label class="title"><span class="name">厂商<span style="color: red;margin-left: -15px">*</span></span> : </label>
26
-
27
-        <el-select size="small" v-model="form.manufacturer" clearable placeholder="请选择厂商" @change="changeManufacturer()">
27
+        <label class="title"><span class="name">经销商</span> : </label>
28
+        <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer">
28 29
           <el-option
29
-            v-for="(option, index) in manufacturer"
30
+            v-for="(option, index) in dealer"
30 31
             :key="index"
31
-            :label="option.manufacturer_name"
32
+            :label="option.dealer_name"
32 33
             :value="option.id">
33 34
           </el-option>
34 35
         </el-select>
35 36
       </div>
36 37
 
37 38
       <div class="cell clearfix">
38
-        <label class="title"><span class="name">经销商</span> : </label>
39
-        <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商">
39
+        <label class="title"><span class="name">厂商</span> : </label>
40
+
41
+        <el-select size="small" v-model="form.manufacturer" clearable placeholder="请选择厂商" @change="changeManufacturer">
40 42
           <el-option
41
-            v-for="(option, index) in dealer"
43
+            v-for="(option, index) in manufacturer"
42 44
             :key="index"
43
-            :label="option.dealer_name"
45
+            :label="option.manufacturer_name"
44 46
             :value="option.id">
45 47
           </el-option>
46 48
         </el-select>
47 49
       </div>
48 50
 
51
+
52
+
49 53
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
50 54
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
51 55
                   max-height="450"  :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
@@ -91,9 +95,6 @@
91 95
               <span>退货数量<span style="color: red">*</span></span>
92 96
             </template>
93 97
             <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 98
               <el-form-item :prop="'recordData.' + scope.$index + '.return_count'" :rules='tableRules.return_count'
98 99
                             style="padding-top: 17px">
99 100
                 <el-input  placeholder="请输入退货数量" type="number" v-model="scope.row.return_count"></el-input>
@@ -148,10 +149,16 @@
148 149
       return {
149 150
         crumbs: [
150 151
           { path: false, name: '库存管理' },
151
-          { path: false, name: '退回单' },
152
+          { path: false, name: '耗材退货单' },
153
+          { path: false, name: '新增退货单' }
154
+        ],
155
+        crumbs2: [
156
+          { path: false, name: '库存管理' },
157
+          { path: false, name: '其他退货单' },
152 158
           { path: false, name: '新增退货单' }
153 159
         ],
154 160
 
161
+
155 162
         type: this.$route.query.type,
156 163
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
157 164
         return_time: '',
@@ -167,22 +174,21 @@
167 174
             { required: true, message: '数量不能为空', trigge: 'blur' }
168 175
           ]
169 176
         },
170
-        ruleForm: {
171
-          manufacturer: [
172
-            { required: true, message: '请选择厂商', trigger: 'change' }
173
-          ]
174 177
 
175
-        },
178
+
179
+
176 180
         // prop
177 181
         isVisibility: false,
178 182
         propForm: {
179 183
           goodType: [],
180 184
           goodInfo: [],
181
-          goodUnit: []
185
+          goodUnit: [],
186
+          manufacturer:0,
187
+          dealer:0,
182 188
         },
183 189
         form: {
184
-          manufacturer: '',
185
-          dealer: ''
190
+          manufacturer: 0,
191
+          dealer: 0,
186 192
         },
187 193
         warehouseInfoList:[],
188 194
         manufacturer: [],
@@ -193,7 +199,6 @@
193 199
     methods: {
194 200
       comfirm: function(val) {
195 201
         this.$refs.dialog.hide()
196
-
197 202
         if (val.selectedGoodInfo.length > 0) {
198 203
           for (let i = val.selectedGoodInfo.length - 1; ; i--) {
199 204
             if (i == 0) {
@@ -209,38 +214,51 @@
209 214
             }
210 215
           }
211 216
         }
212
-
217
+        this.propForm.goodType = []
213 218
         this.currentIndex = -1
214 219
       }, cancle: function() {
215 220
         this.$refs.dialog.hide()
221
+        this.propForm.goodType = []
222
+
216 223
       }, GetConfigInfo: function() {
217 224
         const params = {
218 225
           type: this.type
219 226
         }
227
+        const loading = this.$loading({
228
+          lock: true,
229
+          text: 'Loading',
230
+          spinner: 'el-icon-loading',
231
+          background: 'rgba(0, 0, 0, 0.7)'
232
+        })
233
+
220 234
         getSalesReturnConfig(params).then(response => {
221 235
           if (response.data.state == 0) {
236
+            loading.close()
237
+
222 238
             this.$message.error(response.data.msg)
223 239
             return false
224 240
           } else {
225
-            var warehouseList = response.data.data.warehouseList
241
+            loading.close()
226 242
             var warehouseInfoList = response.data.data.warehouseInfoList
227
-            this.warehouseInfoList =  response.data.data.warehouseInfoList
228
-
229
-            for (let i = 0; i < warehouseList.length; i++) {
230
-              if (warehouseList[i].Manufacturer.id > 0) {
231
-                this.manufacturer.push(warehouseList[i].Manufacturer)
243
+            this.warehouseInfoList = response.data.data.warehouseInfoList
244
+            for (let i = 0; i < warehouseInfoList.length; i++) {
245
+              if (warehouseInfoList[i].info.manufacturers.id > 0) {
246
+                this.manufacturer.push(warehouseInfoList[i].info.manufacturers)
232 247
               }
233
-              if (warehouseList[i].Dealer.id > 0) {
234
-                this.dealer.push(warehouseList[i].Dealer)
248
+              if (warehouseInfoList[i].info.dealers.id > 0) {
249
+                this.dealer.push(warehouseInfoList[i].info.dealers)
235 250
               }
236 251
             }
237 252
 
238
-            for (let i = 0; i < warehouseInfoList.length; i++) {
239
-              this.propForm.goodInfo.push(warehouseInfoList[i].GoodInfo)
253
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
254
+              this.propForm.goodInfo.push(this.warehouseInfoList[i].info)
255
+            }
256
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
257
+              this.goodType.push(this.warehouseInfoList[i].info.type)
240 258
             }
241
-
242 259
             const obj = {}
243 260
             const obj2 = {}
261
+            const obj3 = {}
244 262
             const obj4 = {}
245 263
             // 去重复
246 264
             this.manufacturer = this.manufacturer.reduce((cur, next) => {
@@ -252,18 +270,27 @@
252 270
               obj2[next.id] ? '' : obj2[next.id] = true && cur.push(next)
253 271
               return cur
254 272
             }, [])
273
+
274
+            this.goodType = this.goodType.reduce((cur, next) => {
275
+              obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
276
+              return cur
277
+            }, [])
278
+
255 279
             this.propForm.goodInfo = this.propForm.goodInfo.reduce((cur, next) => {
256 280
               obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
257 281
               return cur
258 282
             }, [])
283
+            this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: '全部' })
284
+            this.dealer.splice(0, 0, { id: 0, dealer_name: '全部' })
285
+
259 286
 
260 287
           }
261 288
         })
262 289
       }, typeName: function(good_type_id) {
263 290
         let name = ''
264
-        for (let i = 0; i < this.propForm.goodType.length; i++) {
265
-          if (this.propForm.goodType[i].id == good_type_id) {
266
-            name = this.propForm.goodType[i].type_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
267 294
           }
268 295
         }
269 296
         return name
@@ -303,16 +330,46 @@
303 330
         }
304 331
       }, showDialog(index, row) {
305 332
         this.currentIndex = index
306
-        if (this.form.manufacturer == '' || this.form.manufacturer == 0) {
307
-          this.$message.error('请先选择厂商')
308
-          return
309
-        } else {
310
-          this.$refs.dialog.show()
333
+        this.propForm.goodType = []
311 334
 
335
+        if (this.form.manufacturer == 0 && this.form.dealer == 0) {
312 336
           for (let i = 0; i < this.warehouseInfoList.length; i++) {
313
-            if (this.warehouseInfoList[i].manufacturer == this.form.manufacturer) {
314
-              this.propForm.goodType.push(this.warehouseInfoList[i].GoodInfo.GoodsType)
337
+              this.propForm.goodType.push(this.warehouseInfoList[i].info.type)
338
+          }
339
+          const obj3 = {}
340
+          this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
341
+            obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
342
+            return cur
343
+          }, [])
344
+        } else {
345
+
346
+
347
+          if(this.form.manufacturer == 0 && this.form.dealer != 0){
348
+
349
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
350
+              if(this.warehouseInfoList[i].info.dealers.id == this.form.dealer){
351
+                this.propForm.goodType.push(this.warehouseInfoList[i].info.type)
352
+              }
353
+            }
354
+          }
355
+          if(this.form.manufacturer != 0 && this.form.dealer == 0){
356
+            console.log(this.warehouseInfoList)
357
+
358
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
359
+              if(this.warehouseInfoList[i].info.manufacturers.id == this.form.manufacturer){
360
+                this.propForm.goodType.push(this.warehouseInfoList[i].info.type)
361
+              }
362
+            }
363
+
364
+          }
365
+          if(this.form.manufacturer != 0 && this.form.dealer != 0){
366
+
367
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
368
+              if(this.warehouseInfoList[i].info.dealers.id == this.form.dealer && this.warehouseInfoList[i].info.manufacturers.id == this.form.manufacturer){
369
+                this.propForm.goodType.push(this.warehouseInfoList[i].info.type)
370
+              }
315 371
             }
372
+
316 373
           }
317 374
           const obj3 = {}
318 375
           this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
@@ -320,15 +377,12 @@
320 377
             return cur
321 378
           }, [])
322 379
         }
380
+        this.$refs.dialog.show()
323 381
       }, back() {
324 382
         this.$router.go(-1)
325 383
       }, submit() {
326 384
         this.$refs['tableForm'].validate((valid) => {
327 385
           if (valid) {
328
-            if (this.form.manufacturer == 0) {
329
-              this.$message.error('厂商不能为空')
330
-              return
331
-            }
332 386
             const array = this.recordInfo.recordData
333 387
             let total = 0
334 388
             for (let i = 0; i < array.length; i++) {
@@ -360,14 +414,12 @@
360 414
             return false
361 415
           }
362 416
         })
363
-      }, changeManufacturer() {
364
-        this.recordInfo.recordData = []
365
-        const tempObj = {}
366
-        tempObj['good_type_id'] = 0
367
-        tempObj['good_id'] = 0
368
-        tempObj['return_count'] = ''
369
-        tempObj['price'] = ''
370
-        this.recordInfo.recordData.push(tempObj)
417
+      }, changeManufacturer(val) {
418
+        this.propForm.manufacturer = val
419
+        console.log(val)
420
+      },changeDealer(val){
421
+        this.propForm.dealer = val
422
+        console.log(val)
371 423
       }
372 424
     },
373 425
     created() {

+ 8 - 2
src/xt_pages/stock/salesReturnOrderDetail.vue Näytä tiedosto

@@ -1,7 +1,8 @@
1 1
 <template>
2 2
   <div class="main-contain">
3 3
     <div class="position">
4
-      <bread-crumb :crumbs='crumbs'></bread-crumb>
4
+      <bread-crumb v-if="this.$route.query.type == 1" :crumbs='crumbs'></bread-crumb>
5
+      <bread-crumb v-if="this.$route.query.type == 2" :crumbs='crumbs2'></bread-crumb>
5 6
     </div>
6 7
 
7 8
     <div class="app-container">
@@ -82,7 +83,12 @@
82 83
       return {
83 84
         crumbs: [
84 85
           { path: false, name: '库存管理' },
85
-          { path: false, name: '退货单' },
86
+          { path: false, name: '耗材退货单' },
87
+          { path: false, name: '退货单详情' }
88
+        ],
89
+        crumbs2: [
90
+          { path: false, name: '库存管理' },
91
+          { path: false, name: '其他退货单' },
86 92
           { path: false, name: '退货单详情' }
87 93
         ],
88 94
         isEdit: 0,

+ 114 - 65
src/xt_pages/stock/stockInOrderAdd.vue Näytä tiedosto

@@ -2,7 +2,9 @@
2 2
 
3 3
   <div class="main-contain">
4 4
     <div class="position">
5
-      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <bread-crumb v-if="type == 1" :crumbs='crumbs'></bread-crumb>
6
+      <bread-crumb v-if="type == 2" :crumbs='crumbs2'></bread-crumb>
7
+
6 8
       <div style="float:right;">
7 9
         <el-button size="small" @click="back()" class="filter-item">取 消</el-button>
8 10
         <el-button size="small" type="primary" @click="submit()" class="filter-item">保 存</el-button>
@@ -27,7 +29,7 @@
27 29
         <label class="title"><span class="name">厂商</span> : </label>
28 30
 
29 31
         <el-select size="small" v-model="form.manufacturer" clearable placeholder="请选择厂商"
30
-                   @change="changeManufacturer()">
32
+                   @change="changeManufacturer">
31 33
           <el-option
32 34
             v-for="(option, index) in manufacturer"
33 35
             :key="index"
@@ -39,7 +41,7 @@
39 41
 
40 42
       <div class="cell clearfix">
41 43
         <label class="title"><span class="name">经销商</span> : </label>
42
-        <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商">
44
+        <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer">
43 45
           <el-option
44 46
             v-for="(option, index) in dealer"
45 47
             :key="index"
@@ -124,13 +126,10 @@
124 126
 
125 127
           <el-table-column align="center" width="150">
126 128
             <template slot="header" slot-scope="scope">
127
-              <span>批号<span style="color: red">*</span></span>
129
+              <span>批号</span>
128 130
             </template>
129 131
             <template slot-scope="scope">
130
-              <!--<el-input  v-model="scope.row.numbers"></el-input>-->
131
-
132
-              <el-form-item :prop="'recordData.' + scope.$index + '.number'" :rules='tableRules.number'
133
-                            style="padding-top: 17px">
132
+              <el-form-item style="padding-top: 17px">
134 133
                 <el-input placeholder="请输入批号" v-model="scope.row.number"></el-input>
135 134
               </el-form-item>
136 135
 
@@ -160,10 +159,15 @@
160 159
             </template>
161 160
           </el-table-column>
162 161
 
162
+
163 163
           <el-table-column label="操作" align="center" fixed="right" width="150">
164 164
             <template slot-scope="scope">
165 165
               <el-tooltip class="item" effect="dark" content="新增" placement="top">
166 166
 
167
+
168
+
169
+
170
+
167 171
                 <el-button
168 172
                   size="mini"
169 173
                   type="primary"
@@ -181,13 +185,21 @@
181 185
                 </el-button>
182 186
               </el-tooltip>
183 187
 
188
+
184 189
             </template>
185 190
           </el-table-column>
186 191
 
192
+
193
+
194
+
195
+
196
+
187 197
         </el-table>
188 198
       </el-form>
189 199
 
190 200
 
201
+
202
+
191 203
     </div>
192 204
   </div>
193 205
 
@@ -225,7 +237,12 @@
225 237
       return {
226 238
         crumbs: [
227 239
           { path: false, name: '库存管理' },
228
-          { path: false, name: '入库单' },
240
+          { path: false, name: '耗材入库单' },
241
+          { path: false, name: '新增入库单' }
242
+        ],
243
+        crumbs2: [
244
+          { path: false, name: '库存管理' },
245
+          { path: false, name: '其他入库单' },
229 246
           { path: false, name: '新增入库单' }
230 247
         ],
231 248
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
@@ -246,9 +263,7 @@
246 263
           warehousing_count: [
247 264
             { required: true, message: '数量不能为空', trigge: 'blur' }
248 265
           ],
249
-          number: [
250
-            { required: true, message: '批号不能为空', trigge: 'blur' }
251
-          ],
266
+
252 267
           good_id: [
253 268
             { validator: checkGoodId, trigger: 'blur' }
254 269
           ]
@@ -340,11 +355,14 @@
340 355
       }, comfirm: function(val) {
341 356
         this.propForm.goodType = []
342 357
         this.$refs.dialog.hide()
358
+        console.log(val)
343 359
         if (val.selectedGoodInfo.length > 0) {
344 360
           for (let i = val.selectedGoodInfo.length - 1; i >= 0; i--) {
345 361
             if (i == 0) {
346 362
               this.recordInfo.recordData[this.currentIndex].good_type_id = val.goodTypeId
347 363
               this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
364
+              this.recordInfo.recordData[this.currentIndex].price = val.selectedGoodInfo[i].buy_price.toString()
365
+
348 366
             } else {
349 367
               const tempForm = {}
350 368
               tempForm['good_type_id'] = val.goodTypeId
@@ -353,7 +371,7 @@
353 371
               tempForm['product_date'] = ''
354 372
               tempForm['expiry_date'] = ''
355 373
               tempForm['warehousing_count'] = ''
356
-              tempForm['price'] = ''
374
+              tempForm['price'] = val.selectedGoodInfo[i].buy_price.toString()
357 375
               tempForm['remark'] = ''
358 376
               tempForm['dealer'] = ''
359 377
               tempForm['manufacturer'] = ''
@@ -409,10 +427,12 @@
409 427
             this.goodInfo = response.data.data.goodInfo
410 428
             this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: '全部' })
411 429
             this.dealer.splice(0, 0, { id: 0, dealer_name: '全部' })
412
-            loading.close()
413
-
430
+            this.form.manufacturer = 0
431
+            this.form.dealer = 0
414 432
 
415 433
           }
434
+          loading.close()
435
+
416 436
         })
417 437
       }, typeName: function(good_type_id) {
418 438
         let name = ''
@@ -490,11 +510,13 @@
490 510
             if (response.data.state == 0) {
491 511
               this.$message.error(response.data.msg)
492 512
               return false
513
+              loading.close()
514
+
493 515
             } else {
494 516
               loading.close()
495
-              console.log(response.data.data.goodInfo)
496
-              if(response.data.data.goodInfo.length <= 0){
497
-                this.$message.error("该厂商或经销商没有物品信息")
517
+
518
+              if (response.data.data.goodInfo.length <= 0) {
519
+                this.$message.error('该厂商或经销商没有物品信息')
498 520
                 return
499 521
               }
500 522
               this.$refs.dialog.show()
@@ -508,49 +530,50 @@
508 530
               }, []) // 设置cur默认类型为数组,并且初始值为空的数组
509 531
             }
510 532
 
533
+
511 534
           }
512 535
         )
513
-    },
514
-    getSummaries(param) {
515
-      const { columns, data } = param
516
-      const sums = []
517
-      columns.forEach((column, index) => {
518
-        if (index === 0) {
519
-          sums[index] = '总价'
520
-          return
521
-        }
522
-        const values = data.map(item => Number(item[column.property]))
523
-        if (!values.every(value => isNaN(value))) {
524
-          sums[index] = values.reduce((prev, curr) => {
525
-            const value = Number(curr)
526
-            if (!isNaN(value)) {
527
-              return prev + curr
528
-            } else {
529
-              return prev
530
-            }
531
-          }, 0)
532
-          sums[index] += ' 元'
533
-        } else {
534
-          sums[index] = 'N/A'
535
-        }
536
-      })
536
+      },
537
+      getSummaries(param) {
538
+        const { columns, data } = param
539
+        const sums = []
540
+        columns.forEach((column, index) => {
541
+          if (index === 0) {
542
+            sums[index] = '总价'
543
+            return
544
+          }
545
+          const values = data.map(item => Number(item[column.property]))
546
+          if (!values.every(value => isNaN(value))) {
547
+            sums[index] = values.reduce((prev, curr) => {
548
+              const value = Number(curr)
549
+              if (!isNaN(value)) {
550
+                return prev + curr
551
+              } else {
552
+                return prev
553
+              }
554
+            }, 0)
555
+            sums[index] += ' 元'
556
+          } else {
557
+            sums[index] = 'N/A'
558
+          }
559
+        })
560
+
561
+        return sums
562
+      }
563
+      ,
564
+      back() {
565
+        this.$router.go(-1)
566
+      }
567
+      ,
568
+      submit() {
569
+        this.$refs['tableForm'].validate((valid) => {
570
+          if (valid) {
571
+
572
+
573
+
574
+
575
+
537 576
 
538
-      return sums
539
-    }
540
-    ,
541
-    back() {
542
-      this.$router.go(-1)
543
-    }
544
-    ,
545
-    submit() {
546
-      this.$refs['tableForm'].validate((valid) => {
547
-        if (valid) {
548
-          const array = this.recordInfo.recordData
549
-          for (let i = 0; i < array.length; i++) {
550
-            if (array[i].good_type_id == 0) {
551
-              this.$message.error('商品类型不能为空')
552
-              return
553
-            }
554 577
             if (array[i].good_id == 0) {
555 578
               this.$message.error('规格名称不能为空')
556 579
               return
@@ -569,15 +592,41 @@
569 592
 
570 593
               this.$router.back(-1)
571 594
             }
572
-          })
573
-        } else {
574
-          return false
575
-        }
576
-      })
595
+            postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
596
+              if (response.data.state == 0) {
597
+                this.$message.error(response.data.msg)
598
+                return false
599
+              } else {
600
+                this.$message.success('入库成功')
601
+
602
+                this.$router.back(-1)
603
+              }
604
+            })
605
+          } else {
606
+            return false
607
+          }
608
+        })
609
+      }
610
+      ,
611
+      changeManufacturer(val) {
612
+
613
+
614
+      }, changeDealer(val) {
615
+
616
+      }
577 617
     }
578 618
     ,
579
-    changeManufacturer() {
580
-      this.recordInfo.recordData = []
619
+    created() {
620
+      var nowDate = new Date()
621
+      var nowYear = nowDate.getFullYear()
622
+      var nowMonth = nowDate.getMonth() + 1
623
+      var nowDay = nowDate.getDate()
624
+      this.warehousing_time =
625
+        nowYear +
626
+        '-' +
627
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
628
+        '-' +
629
+        (nowDay < 10 ? '0' + nowDay : nowDay)
581 630
       const tempObj = {}
582 631
       tempObj['good_type_id'] = 0
583 632
       tempObj['good_id'] = 0

+ 9 - 2
src/xt_pages/stock/stockInOrderDetail.vue Näytä tiedosto

@@ -1,7 +1,9 @@
1 1
 <template>
2 2
   <div class="main-contain">
3 3
     <div class="position">
4
-      <bread-crumb :crumbs='crumbs'></bread-crumb>
4
+      <bread-crumb v-if="this.$route.query.type == 1" :crumbs='crumbs'></bread-crumb>
5
+      <bread-crumb v-if="this.$route.query.type == 2" :crumbs='crumbs2'></bread-crumb>
6
+
5 7
     </div>
6 8
   <div class="app-container">
7 9
     <div class="filter-container">
@@ -122,7 +124,12 @@
122 124
       return {
123 125
         crumbs: [
124 126
           { path: false, name: '库存管理' },
125
-          { path: false, name: '入库单' },
127
+          { path: false, name: '耗材入库单' },
128
+          { path: false, name: '入库单详情' }
129
+        ],
130
+        crumbs2: [
131
+          { path: false, name: '库存管理' },
132
+          { path: false, name: '其他入库单' },
126 133
           { path: false, name: '入库单详情' }
127 134
         ],
128 135
         isEdit: 0,

+ 87 - 29
src/xt_pages/stock/stockInOrderEdit.vue Näytä tiedosto

@@ -1,7 +1,9 @@
1 1
 <template>
2 2
   <div class="main-contain">
3 3
     <div class="position">
4
-      <bread-crumb :crumbs='crumbs'></bread-crumb>
4
+      <bread-crumb v-if="this.$route.query.type == 1" :crumbs='crumbs'></bread-crumb>
5
+      <bread-crumb v-if="this.$route.query.type == 2"  :crumbs='crumbs2'></bread-crumb>
6
+
5 7
       <div style="float:right;">
6 8
         <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
7 9
         <el-button size="small"  type="primary" @click="submit()" class="filter-item" >保 存</el-button>
@@ -22,6 +24,35 @@
22 24
       <el-date-picker size="small" 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>
23 25
     </div>
24 26
 
27
+    <div class="cell clearfix">
28
+      <label class="title"><span class="name">经销商</span> : </label>
29
+      <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商">
30
+        <el-option
31
+          v-for="(option, index) in dealer"
32
+          :key="index"
33
+          :label="option.dealer_name"
34
+          :value="option.id">
35
+        </el-option>
36
+      </el-select>
37
+    </div>
38
+
39
+
40
+
41
+    <div class="cell clearfix">
42
+      <label class="title"><span class="name">厂商</span> : </label>
43
+
44
+      <el-select size="small" v-model="form.manufacturer" clearable placeholder="请选择厂商"
45
+                >
46
+        <el-option
47
+          v-for="(option, index) in manufacturer"
48
+          :key="index"
49
+          :label="option.manufacturer_name"
50
+          :value="option.id">
51
+        </el-option>
52
+      </el-select>
53
+    </div>
54
+
55
+
25 56
 
26 57
         <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
27 58
           <el-table id="oictable" :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
@@ -96,12 +127,10 @@
96 127
 
97 128
             <el-table-column align="center"  width="150">
98 129
               <template slot="header" slot-scope="scope">
99
-                <span>批号<span style="color: red">*</span></span>
130
+                <span>批号</span>
100 131
               </template>
101 132
               <template slot-scope="scope">
102
-                <!--<el-input  v-model="scope.row.numbers"></el-input>-->
103
-                <el-form-item :prop="'recordData.' + scope.$index + '.number'" :rules='tableRules.number'
104
-                              style="padding-top: 17px">
133
+                <el-form-item>
105 134
                   <el-input placeholder="请输入批号" v-model="scope.row.number"></el-input>
106 135
                 </el-form-item>
107 136
               </template>
@@ -195,7 +224,12 @@ export default {
195 224
       return {
196 225
         crumbs: [
197 226
           { path: false, name: '库存管理' },
198
-          { path: false, name: '入库单' },
227
+          { path: false, name: '耗材入库单' },
228
+          { path: false, name: '编辑入库单' }
229
+        ],
230
+        crumbs2: [
231
+          { path: false, name: '库存管理' },
232
+          { path: false, name: '其他入库单' },
199 233
           { path: false, name: '编辑入库单' }
200 234
         ],
201 235
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
@@ -216,20 +250,13 @@ export default {
216 250
           warehousing_count: [
217 251
             { required: true, message: '数量不能为空', trigge: 'blur' }
218 252
           ],
219
-          number: [
220
-            { required: true, message: '批号不能为空', trigge: 'blur' }
221
-          ],
253
+
222 254
           good_id: [
223 255
             { validator: checkGoodId, trigger: 'blur' }
224 256
           ]
225 257
 
226 258
         },
227
-        ruleForm: {
228
-          manufacturer: [
229
-            { required: true, message: '请选择厂商', trigger: 'change' }
230
-          ]
231 259
 
232
-        },
233 260
 
234 261
         total: '',
235 262
         product_date: '',
@@ -260,12 +287,15 @@ export default {
260 287
 
261 288
       comfirm: function(val) {
262 289
         this.$refs.dialog.hide()
290
+        this.propForm.goodType = []
263 291
 
264 292
         if (val.selectedGoodInfo.length > 0) {
265 293
           for (let i = val.selectedGoodInfo.length - 1; ;i--) {
266 294
             if (i == 0) {
267 295
               this.recordInfo.recordData[this.currentIndex].good_type_id = val.goodTypeId
268 296
               this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
297
+              this.recordInfo.recordData[this.currentIndex].price = val.selectedGoodInfo[i].buy_price.toString()
298
+
269 299
             } else {
270 300
               const tempForm = {}
271 301
               tempForm['id'] = 0
@@ -275,7 +305,7 @@ export default {
275 305
               tempForm['product_date'] = ''
276 306
               tempForm['expiry_date'] = ''
277 307
               tempForm['warehousing_count'] = ''
278
-              tempForm['price'] = ''
308
+              tempForm['price'] = val.selectedGoodInfo[i].buy_price.toString()
279 309
               tempForm['remark'] = ''
280 310
               tempForm['dealer'] = ''
281 311
               tempForm['manufacturer'] = ''
@@ -287,7 +317,15 @@ export default {
287 317
         this.currentIndex = -1
288 318
       }, cancle: function() {
289 319
         this.$refs.dialog.hide()
320
+        this.propForm.goodType = []
321
+
290 322
       }, GetConfigInfo: function() {
323
+        const loading = this.$loading({
324
+          lock: true,
325
+          text: 'Loading',
326
+          spinner: 'el-icon-loading',
327
+          background: 'rgba(0, 0, 0, 0.7)'
328
+        })
291 329
         GetAllConfig().then(response => {
292 330
           if (response.data.state == 0) {
293 331
             this.$message.error(response.data.msg)
@@ -297,7 +335,11 @@ export default {
297 335
             this.dealer = response.data.data.dealer
298 336
             this.goodType = response.data.data.goodType
299 337
             this.goodInfo = response.data.data.goodInfo
338
+            this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: '全部' })
339
+            this.dealer.splice(0, 0, { id: 0, dealer_name: '全部' })
300 340
           }
341
+          loading.close()
342
+
301 343
         })
302 344
       }, typeName: function(good_type_id) {
303 345
         let name = ''
@@ -367,25 +409,40 @@ export default {
367 409
         }
368 410
       }, showDialog(index, row) {
369 411
         this.currentIndex = index
370
-        if (this.form.manufacturer == '' || this.form.manufacturer == 0) {
371
-          this.$message.error('请先选择厂商')
372
-          return
373
-        } else {
374
-          this.isVisibility = true
375
-          const params = {
376
-            id: this.form.manufacturer
377
-          }
378
-          this.propForm.goodType = []
379
-          GetAllGoodInfoByID(params).then(response => {
412
+        const loading = this.$loading({
413
+          lock: true,
414
+          text: 'Loading',
415
+          spinner: 'el-icon-loading',
416
+          background: 'rgba(0, 0, 0, 0.7)'
417
+        })
418
+
419
+        const params = {
420
+          manufacturer_id: this.form.manufacturer,
421
+          dealer_id: this.form.dealer
422
+        }
423
+        GetAllGoodInfoByID(params).then(response => {
380 424
             if (response.data.state == 0) {
381 425
               this.$message.error(response.data.msg)
382 426
               return false
383 427
             } else {
384
-              this.propForm.goodType = this.goodType
428
+              if(response.data.data.goodInfo.length <= 0){
429
+                this.$message.error("该厂商或经销商没有物品信息")
430
+                return
431
+              }
385 432
               this.$refs.dialog.show()
433
+              for (let i = 0; i < response.data.data.goodInfo.length; i++) {
434
+                this.propForm.goodType.push(response.data.data.goodInfo[i].GoodsType)
435
+              }
436
+              const obj = {}
437
+              this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
438
+                obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
439
+                return cur
440
+              }, []) // 设置cur默认类型为数组,并且初始值为空的数组
386 441
             }
387
-          })
388
-        }
442
+            loading.close()
443
+
444
+          }
445
+        )
389 446
       }, back() {
390 447
         this.$router.go(-1)
391 448
       }, submit() {
@@ -406,7 +463,7 @@ export default {
406 463
             const params = {
407 464
               'stockIn': this.recordInfo.recordData
408 465
             }
409
-            EditWarehouse(params, this.warehousing_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer).then(response => {
466
+            EditWarehouse(params, this.warehousing_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer,this.form.dealer).then(response => {
410 467
               if (response.data.state == 0) {
411 468
                 this.$message.error(response.data.msg)
412 469
                 return false
@@ -441,6 +498,7 @@ export default {
441 498
             this.warehouse = response.data.data.warehousing
442 499
             this.form.manufacturer = this.warehouse.manufacturer
443 500
             this.form.dealer = this.warehouse.dealer
501
+
444 502
             this.warehousing_time = this.getTime(this.warehouse.warehousing_time, '{y}-{m}-{d}')
445 503
 
446 504
             if (this.recordInfo.recordData.length == 0) {

+ 233 - 179
src/xt_pages/stock/stockOutOrderAdd.vue Näytä tiedosto

@@ -2,161 +2,168 @@
2 2
 
3 3
   <div class="main-contain">
4 4
     <div class="position">
5
-    <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <bread-crumb v-if="this.$route.query.type == 1" :crumbs='crumbs'></bread-crumb>
6
+      <bread-crumb v-if="this.$route.query.type == 2" :crumbs='crumbs2'></bread-crumb>
7
+
8
+
6 9
       <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>
10
+        <el-button size="small" @click="back()" class="filter-item">取 消</el-button>
11
+        <el-button size="small" type="primary" @click="submit()" class="filter-item">保 存</el-button>
9 12
       </div>
10
-  </div>
13
+    </div>
11 14
 
12
-  <div class="app-container">
15
+    <div class="app-container">
13 16
 
14
-    <sales-return-dialog ref="dialog" :propForm="propForm"
15
-                         :visibility="isVisibility"
16
-                         v-on:dialog-comfirm="comfirm"
17
-                         v-on:dialog-cancle="cancle"></sales-return-dialog>
17
+      <sales-return-dialog ref="dialog" :propForm="propForm"
18
+                           :visibility="isVisibility"
19
+                           v-on:dialog-comfirm="comfirm"
20
+                           v-on:dialog-cancle="cancle"></sales-return-dialog>
18 21
 
19
-    <div class="cell clearfix">
22
+      <div class="cell clearfix">
20 23
         <label class="title"><span class="name">出库时间</span> : </label>
21
-          <el-date-picker size="small" v-model="warehouse_out_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"></el-date-picker>
24
-        </div>
25
-
26
-
27
-    <div class="cell clearfix">
28
-      <label class="title"><span class="name">厂商<span style="color: red;margin-left: -15px">*</span></span> : </label>
29
-
30
-      <el-select size="small"  v-model="form.manufacturer" clearable  placeholder="请选择厂商"  @change="changeManufacturer()">
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>
24
+        <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false"
25
+                        style="width: 196px;"
26
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
+                        value-format="yyyy-MM-dd"></el-date-picker>
28
+      </div>
39 29
 
40
-    <div class="cell clearfix">
41
-      <label class="title"><span class="name">经销商</span> : </label>
42
-      <el-select size="small"  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 30
 
31
+      <div class="cell clearfix">
32
+        <label class="title"><span class="name">经销商</span> : </label>
33
+        <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer">
34
+          <el-option
35
+            v-for="(option, index) in dealer"
36
+            :key="index"
37
+            :label="option.dealer_name"
38
+            :value="option.id">
39
+          </el-option>
40
+        </el-select>
41
+      </div>
52 42
 
53
-        <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
54
-          <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
55
-                    max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
56
-          >
57
-
58
-            <el-table-column min-width="35" align="center">
59
-
60
-              <template slot="header" slot-scope="scope">
61
-                <span>商品类型<span style="color: red">*</span></span>
62
-              </template>
63
-
64
-              <template slot-scope="scope" >
65
-                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id == 0" style="color:#c5c8cf">请输入类型</span>-->
66
-                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
67
-
68
-                <el-form-item  style="padding-top: 15px">
69
-                  <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>
70
-                </el-form-item>
71
-
72
-              </template>
73
-            </el-table-column>
74
-            <el-table-column min-width="35" align="center">
75
-              <template slot="header" slot-scope="scope">
76
-                <span>规格名称<span style="color: red">*</span></span>
77
-              </template>
78
-              <template slot-scope="scope">
79
-
80
-                <el-form-item  style="padding-top: 15px">
81
-                  <el-input placeholder="请输入规格名称"  v-model="scope.row.good_id" :value="specificationName(scope.row.good_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
82
-                </el-form-item>
83
-
84
-              </template>
85
-            </el-table-column>
86
-
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
-                <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
94
-                <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price' style="padding-top: 17px">
95
-                  <el-input placeholder="请输入单价" type="number"  v-model="scope.row.price" ></el-input>
96
-                </el-form-item>
97
-
98
-
99
-              </template>
100
-            </el-table-column>
101
-
102
-            <el-table-column  min-width="23" align="center">
103
-              <template slot="header" slot-scope="scope">
104
-                <span>出库数量<span style="color: red">*</span></span>
105
-              </template>
106
-              <template slot-scope="scope">
107
-                <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count' style="padding-top: 17px">
108
-                  <el-input placeholder="请输入出库数量" type="number"  v-model="scope.row.count" ></el-input>
109
-                </el-form-item>
110
-              </template>
111
-            </el-table-column>
112
-
113
-            <el-table-column label="总价" min-width="20" align="center">
114
-              <template slot-scope="scope">
115
-                {{calculate(scope.row.price*scope.row.count)}}
116
-              </template>
117
-            </el-table-column>
118
-            <el-table-column label="备注" min-width="20" align="center">
119
-              <template slot-scope="scope">
120
-                <el-input  v-model="scope.row.remark"></el-input>
121
-              </template>
122
-            </el-table-column>
123
-
124
-            <el-table-column label="操作" align="center" min-width="20">
125
-              <template slot-scope="scope">
126
-                <el-tooltip class="item" effect="dark" content="新增" placement="top">
127
-
128
-                  <el-button
129
-                    size="mini"
130
-                    type="primary"
131
-                    icon="el-icon-circle-plus-outline"
132
-                    @click="handleEdit(scope.$index, scope.row)">
133
-                  </el-button>
134
-                </el-tooltip>
135
-                <el-tooltip class="item" effect="dark" content="删除" placement="top">
136
-
137
-                  <el-button
138
-                    size="mini"
139
-                    type="danger"
140
-                    icon="el-icon-delete"
141
-                    @click="handleDelete(scope.$index, scope.row)">
142
-                  </el-button>
143
-                </el-tooltip>
144
-
145
-              </template>
146
-            </el-table-column>
147
-          </el-table>
148
-        </el-form>
149
-  </div>
43
+
44
+      <div class="cell clearfix">
45
+        <label class="title"><span class="name">厂商</span> : </label>
46
+        <el-select size="small" v-model="form.manufacturer" clearable placeholder="请选择厂商" @change="changeManufacturer">
47
+          <el-option
48
+            v-for="(option, index) in manufacturer"
49
+            :key="index"
50
+            :label="option.manufacturer_name"
51
+            :value="option.id">
52
+          </el-option>
53
+        </el-select>
54
+      </div>
55
+
56
+
57
+      <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
58
+        <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
59
+                  max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
60
+        >
61
+
62
+          <el-table-column min-width="35" align="center">
63
+
64
+            <template slot="header" slot-scope="scope">
65
+              <span>商品类型</span>
66
+            </template>
67
+
68
+            <template slot-scope="scope">
69
+              <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id == 0" style="color:#c5c8cf">请输入类型</span>-->
70
+              <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
71
+
72
+              <el-form-item style="padding-top: 15px">
73
+                <el-input placeholder="请输入商品类型" v-model="scope.row.good_type_id"
74
+                          :value="typeName(scope.row.good_type_id)"
75
+                          @focus="showDialog(scope.$index, scope.row)"></el-input>
76
+              </el-form-item>
77
+
78
+            </template>
79
+          </el-table-column>
80
+          <el-table-column min-width="35" align="center">
81
+            <template slot="header" slot-scope="scope">
82
+              <span>规格名称<span style="color: red">*</span></span>
83
+            </template>
84
+            <template slot-scope="scope">
85
+
86
+              <el-form-item style="padding-top: 15px">
87
+                <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
88
+                          :value="specificationName(scope.row.good_id)"
89
+                          @focus="showDialog(scope.$index, scope.row)"></el-input>
90
+              </el-form-item>
91
+
92
+            </template>
93
+          </el-table-column>
94
+
95
+
96
+          <el-table-column min-width="23" align="center">
97
+            <template slot="header" slot-scope="scope">
98
+              <span>单价<span style="color: red">*</span></span>
99
+            </template>
100
+            <template slot-scope="scope">
101
+              <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
102
+              <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price'
103
+                            style="padding-top: 17px">
104
+                <el-input placeholder="请输入单价" type="number" v-model="scope.row.price"></el-input>
105
+              </el-form-item>
106
+
107
+
108
+            </template>
109
+          </el-table-column>
110
+
111
+          <el-table-column min-width="23" align="center">
112
+            <template slot="header" slot-scope="scope">
113
+              <span>出库数量<span style="color: red">*</span></span>
114
+            </template>
115
+            <template slot-scope="scope">
116
+              <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
117
+                            style="padding-top: 17px">
118
+                <el-input placeholder="请输入出库数量" 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
+
134
+          <el-table-column label="操作" align="center" min-width="20">
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-delete"
151
+                  @click="handleDelete(scope.$index, scope.row)">
152
+                </el-button>
153
+              </el-tooltip>
154
+
155
+            </template>
156
+          </el-table-column>
157
+        </el-table>
158
+      </el-form>
159
+    </div>
150 160
   </div>
151 161
 
152 162
 </template>
153 163
 
154 164
 <script>
155 165
   import { uParseTime } from '@/utils/tools'
156
-  import {
157
-    getSalesReturnConfig,
158
-    postWarehouseOut
159
-  } from '@/api/stock'
166
+  import { getSalesReturnConfig, postWarehouseOut } from '@/api/stock'
160 167
   import SalesReturnDialog from './Dialog/salesReturnDialog'
161 168
   import BreadCrumb from '../components/bread-crumb'
162 169
 
@@ -168,7 +175,12 @@
168 175
       return {
169 176
         crumbs: [
170 177
           { path: false, name: '库存管理' },
171
-          { path: false, name: '出库单' },
178
+          { path: false, name: '耗材出库单' },
179
+          { path: false, name: '新增出库单' }
180
+        ],
181
+        crumbs2: [
182
+          { path: false, name: '库存管理' },
183
+          { path: false, name: '其他出库单' },
172 184
           { path: false, name: '新增出库单' }
173 185
         ],
174 186
         type: this.$route.query.type,
@@ -197,13 +209,15 @@
197 209
         propForm: {
198 210
           goodType: [],
199 211
           goodInfo: [],
200
-          goodUnit: []
212
+          goodUnit: [],
213
+          manufacturer: 0,
214
+          dealer: 0
201 215
         },
202 216
         form: {
203
-          manufacturer: '',
204
-          dealer: ''
217
+          manufacturer: 0,
218
+          dealer: 0
205 219
         },
206
-        warehouseInfoList:[],
220
+        warehouseInfoList: [],
207 221
         manufacturer: [],
208 222
         dealer: [],
209 223
         goodType: []
@@ -212,9 +226,9 @@
212 226
     methods: {
213 227
       comfirm: function(val) {
214 228
         this.$refs.dialog.hide()
215
-
229
+        this.propForm.goodType = []
216 230
         if (val.selectedGoodInfo.length > 0) {
217
-          for (let i = val.selectedGoodInfo.length - 1; ;i--) {
231
+          for (let i = val.selectedGoodInfo.length - 1; ; i--) {
218 232
             if (i == 0) {
219 233
               this.recordInfo.recordData[this.currentIndex].good_type_id = val.goodTypeId
220 234
               this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
@@ -233,32 +247,48 @@
233 247
         this.currentIndex = -1
234 248
       }, cancle: function() {
235 249
         this.$refs.dialog.hide()
250
+        this.propForm.goodType = []
251
+
236 252
       }, GetConfigInfo: function() {
237 253
         const params = {
238 254
           type: this.$route.query.type
239 255
 
240 256
         }
241 257
         getSalesReturnConfig(params).then(response => {
258
+          const loading = this.$loading({
259
+            lock: true,
260
+            text: 'Loading',
261
+            spinner: 'el-icon-loading',
262
+            background: 'rgba(0, 0, 0, 0.7)'
263
+          })
264
+
242 265
           if (response.data.state == 0) {
243 266
             this.$message.error(response.data.msg)
244 267
             return false
245 268
           } else {
246
-            var warehouseList = response.data.data.warehouseList
269
+            loading.close()
247 270
             var warehouseInfoList = response.data.data.warehouseInfoList
248 271
             this.warehouseInfoList = response.data.data.warehouseInfoList
249
-            for (let i = 0; i < warehouseList.length; i++) {
250
-              if (warehouseList[i].Manufacturer.id > 0) {
251
-                this.manufacturer.push(warehouseList[i].Manufacturer)
272
+            for (let i = 0; i < warehouseInfoList.length; i++) {
273
+              if (warehouseInfoList[i].info.manufacturers.id > 0) {
274
+                this.manufacturer.push(warehouseInfoList[i].info.manufacturers)
252 275
               }
253
-              if (warehouseList[i].Dealer.id > 0) {
254
-                this.dealer.push(warehouseList[i].Dealer)
276
+              if (warehouseInfoList[i].info.dealers.id > 0) {
277
+                this.dealer.push(warehouseInfoList[i].info.dealers)
255 278
               }
256 279
             }
257
-            for (let i = 0; i < warehouseInfoList.length; i++) {
258
-              this.propForm.goodInfo.push(warehouseInfoList[i].GoodInfo)
280
+
281
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
282
+              this.goodType.push(this.warehouseInfoList[i].info.type)
283
+            }
284
+
285
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
286
+              this.propForm.goodInfo.push(this.warehouseInfoList[i].info)
259 287
             }
260 288
             const obj = {}
261 289
             const obj2 = {}
290
+            const obj3 = {}
291
+
262 292
             const obj4 = {}
263 293
             // 去重复
264 294
             this.manufacturer = this.manufacturer.reduce((cur, next) => {
@@ -274,13 +304,22 @@
274 304
               obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
275 305
               return cur
276 306
             }, [])
307
+
308
+            this.goodType = this.goodType.reduce((cur, next) => {
309
+              obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
310
+              return cur
311
+            }, [])
312
+
313
+            this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: '全部' })
314
+            this.dealer.splice(0, 0, { id: 0, dealer_name: '全部' })
315
+
277 316
           }
278 317
         })
279 318
       }, typeName: function(good_type_id) {
280 319
         let name = ''
281
-        for (let i = 0; i < this.propForm.goodType.length; i++) {
282
-          if (this.propForm.goodType[i].id == good_type_id) {
283
-            name = this.propForm.goodType[i].type_name
320
+        for (let i = 0; i < this.goodType.length; i++) {
321
+          if (this.goodType[i].id == good_type_id) {
322
+            name = this.goodType[i].type_name
284 323
           }
285 324
         }
286 325
         return name
@@ -324,15 +363,36 @@
324 363
         }
325 364
       }, showDialog(index, row) {
326 365
         this.currentIndex = index
327
-        if (this.form.manufacturer == '' || this.form.manufacturer == 0) {
328
-          this.$message.error('请先选择厂商')
329
-          return
330
-        } else {
331
-          this.$refs.dialog.show()
332
-
366
+        this.propForm.goodType = []
367
+        if (this.form.manufacturer == 0 && this.form.dealer == 0) {
333 368
           for (let i = 0; i < this.warehouseInfoList.length; i++) {
334
-            if (this.warehouseInfoList[i].manufacturer == this.form.manufacturer) {
335
-              this.propForm.goodType.push(this.warehouseInfoList[i].GoodInfo.GoodsType)
369
+            this.propForm.goodType.push(this.warehouseInfoList[i].info.type)
370
+          }
371
+          const obj3 = {}
372
+          this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
373
+            obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
374
+            return cur
375
+          }, [])
376
+        } else {
377
+          if (this.form.manufacturer == 0 && this.form.dealer != 0) {
378
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
379
+              if (this.warehouseInfoList[i].info.dealers.id == this.form.dealer) {
380
+                this.propForm.goodType.push(this.warehouseInfoList[i].info.type)
381
+              }
382
+            }
383
+          }
384
+          if (this.form.manufacturer != 0 && this.form.dealer == 0) {
385
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
386
+              if (this.warehouseInfoList[i].info.manufacturers.id == this.form.manufacturer) {
387
+                this.propForm.goodType.push(this.warehouseInfoList[i].info.type)
388
+              }
389
+            }
390
+          }
391
+          if (this.form.manufacturer != 0 && this.form.dealer != 0) {
392
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
393
+              if (this.warehouseInfoList[i].info.dealers.id == this.form.dealer && this.warehouseInfoList[i].info.manufacturers.id == this.form.manufacturer) {
394
+                this.propForm.goodType.push(this.warehouseInfoList[i].info.type)
395
+              }
336 396
             }
337 397
           }
338 398
           const obj3 = {}
@@ -341,15 +401,13 @@
341 401
             return cur
342 402
           }, [])
343 403
         }
404
+        this.$refs.dialog.show()
405
+
344 406
       }, back() {
345 407
         this.$router.go(-1)
346 408
       }, submit() {
347 409
         this.$refs['tableForm'].validate((valid) => {
348 410
           if (valid) {
349
-            if (this.form.manufacturer == 0) {
350
-              this.$message.error('厂商不能为空')
351
-              return
352
-            }
353 411
             const array = this.recordInfo.recordData
354 412
             let total = 0
355 413
             for (let i = 0; i < array.length; i++) {
@@ -382,15 +440,10 @@
382 440
             return false
383 441
           }
384 442
         })
385
-      }, changeManufacturer() {
386
-        this.recordInfo.recordData = []
387
-        const tempObj = {}
388
-        tempObj['good_type_id'] = 0
389
-        tempObj['good_id'] = 0
390
-        tempObj['return_count'] = 0
391
-        tempObj['price'] = ''
392
-        tempObj['remark'] = ''
393
-        this.recordInfo.recordData.push(tempObj)
443
+      }, changeManufacturer(val) {
444
+        this.propForm.manufacturer = val
445
+      }, changeDealer(val) {
446
+        this.propForm.dealer = val
394 447
       }
395 448
     },
396 449
     created() {
@@ -428,6 +481,7 @@
428 481
     border-bottom: 1px #dcdfe6 solid;
429 482
     margin: 0px 0 20px 0;
430 483
   }
484
+
431 485
   }
432 486
 
433 487
 

+ 9 - 2
src/xt_pages/stock/stockOutOrderDetail.vue Näytä tiedosto

@@ -1,7 +1,9 @@
1 1
 <template>
2 2
   <div class="main-contain">
3 3
     <div class="position">
4
-      <bread-crumb :crumbs='crumbs'></bread-crumb>
4
+      <bread-crumb v-if="this.$route.query.type == 1" :crumbs='crumbs'></bread-crumb>
5
+      <bread-crumb v-if="this.$route.query.type == 2" :crumbs='crumbs2'></bread-crumb>
6
+
5 7
     </div>
6 8
 
7 9
     <div class="app-container">
@@ -108,7 +110,12 @@
108 110
       return {
109 111
         crumbs: [
110 112
           { path: false, name: '库存管理' },
111
-          { path: false, name: '出库单' },
113
+          { path: false, name: '耗材出库单' },
114
+          { path: false, name: '出库单详情' }
115
+        ],
116
+        crumbs2: [
117
+          { path: false, name: '库存管理' },
118
+          { path: false, name: '其他出库单' },
112 119
           { path: false, name: '出库单详情' }
113 120
         ],
114 121
         isEdit: 0,

+ 243 - 137
src/xt_pages/stock/stockOutOrderEdit.vue Näytä tiedosto

@@ -1,124 +1,157 @@
1 1
 <template>
2 2
   <div class="main-contain">
3 3
     <div class="position">
4
-      <bread-crumb :crumbs='crumbs'></bread-crumb>
4
+      <bread-crumb v-if="this.$route.query.type == 1" :crumbs='crumbs'></bread-crumb>
5
+      <bread-crumb v-if="this.$route.query.type == 2" :crumbs='crumbs2'></bread-crumb>
6
+
7
+
5 8
       <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>
9
+        <el-button size="small" @click="back()" class="filter-item">取 消</el-button>
10
+        <el-button size="small" type="primary" @click="submit()" class="filter-item">保 存</el-button>
8 11
       </div>
9 12
     </div>
10 13
 
11
-  <div class="app-container">
14
+    <div class="app-container">
12 15
 
13
-    <sales-return-dialog  ref="dialog"  :propForm="propForm"
14
-                     :visibility="isVisibility"
15
-                     v-on:dialog-comfirm="comfirm"
16
-                     v-on:dialog-cancle="cancle"></sales-return-dialog>
16
+      <sales-return-dialog ref="dialog" :propForm="propForm"
17
+                           :visibility="isVisibility"
18
+                           v-on:dialog-comfirm="comfirm"
19
+                           v-on:dialog-cancle="cancle"></sales-return-dialog>
17 20
 
18
-    <div class="cell clearfix">
19
-      <label class="title"><span class="name">出库时间</span> : </label>
20
-      <el-date-picker size="small" v-model="warehouse_out_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"></el-date-picker>
23
-    </div>
21
+      <div class="cell clearfix">
22
+        <label class="title"><span class="name">出库时间</span> : </label>
23
+        <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false"
24
+                        style="width: 196px;"
25
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
26
+                        value-format="yyyy-MM-dd"></el-date-picker>
27
+      </div>
24 28
 
25
-        <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
26
-          <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
27
-                    max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
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-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
66
-                <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price' style="padding-top: 17px">
67
-                  <el-input type="number"  v-model="scope.row.price" ></el-input>
68
-                </el-form-item>
69
-
70
-
71
-              </template>
72
-            </el-table-column>
73
-
74
-            <el-table-column  min-width="23" align="center">
75
-              <template slot="header" slot-scope="scope">
76
-                <span>出库数量<span style="color: red">*</span></span>
77
-              </template>
78
-              <template slot-scope="scope">
79
-                <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count' style="padding-top: 17px">
80
-                  <el-input type="number"  v-model="scope.row.count" ></el-input>
81
-                </el-form-item>
82
-              </template>
83
-            </el-table-column>
84
-
85
-            <el-table-column label="总价" min-width="20" align="center">
86
-              <template slot-scope="scope">
87
-                {{calculate(scope.row.price*scope.row.count)}}
88
-              </template>
89
-            </el-table-column>
90
-            <el-table-column label="备注" min-width="20" align="center">
91
-              <template slot-scope="scope">
92
-                <el-input  v-model="scope.row.remark"></el-input>
93
-              </template>
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-delete"
112
-                    @click="handleDelete(scope.$index, scope.row)">
113
-                  </el-button>
114
-                </el-tooltip>
115
-
116
-              </template>
117
-            </el-table-column>
118
-          </el-table>
119
-        </el-form>
120 29
 
121
-  </div>
30
+      <div class="cell clearfix">
31
+        <label class="title"><span class="name">经销商</span> : </label>
32
+        <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer">
33
+          <el-option
34
+            v-for="(option, index) in dealer"
35
+            :key="index"
36
+            :label="option.dealer_name"
37
+            :value="option.id">
38
+          </el-option>
39
+        </el-select>
40
+      </div>
41
+
42
+
43
+      <div class="cell clearfix">
44
+        <label class="title"><span class="name">厂商</span> : </label>
45
+
46
+        <el-select size="small" v-model="form.manufacturer" clearable placeholder="请选择厂商" @change="changeManufacturer">
47
+          <el-option
48
+            v-for="(option, index) in manufacturer"
49
+            :key="index"
50
+            :label="option.manufacturer_name"
51
+            :value="option.id">
52
+          </el-option>
53
+        </el-select>
54
+      </div>
55
+
56
+      <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
57
+        <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
58
+                  max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
59
+        >
60
+
61
+          <el-table-column min-width="35" align="center">
62
+
63
+            <template slot="header" slot-scope="scope">
64
+              <span>商品类型<span style="color: red">*</span></span>
65
+            </template>
66
+
67
+            <template slot-scope="scope">
68
+              <el-form-item style="padding-top: 15px">
69
+                <el-input placeholder="请输入商品类型" v-model="scope.row.good_type_id"
70
+                          :value="typeName(scope.row.good_type_id)"
71
+                          @focus="showDialog(scope.$index, scope.row)"></el-input>
72
+              </el-form-item>
73
+            </template>
74
+          </el-table-column>
75
+          <el-table-column min-width="35" 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
+
81
+              <el-form-item style="padding-top: 15px">
82
+                <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
83
+                          :value="specificationName(scope.row.good_id)"
84
+                          @focus="showDialog(scope.$index, scope.row)"></el-input>
85
+              </el-form-item>
86
+
87
+            </template>
88
+          </el-table-column>
89
+
90
+
91
+          <el-table-column min-width="23" 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
+              <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
97
+              <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price'
98
+                            style="padding-top: 17px">
99
+                <el-input type="number" v-model="scope.row.price"></el-input>
100
+              </el-form-item>
101
+
102
+
103
+            </template>
104
+          </el-table-column>
105
+
106
+          <el-table-column min-width="23" align="center">
107
+            <template slot="header" slot-scope="scope">
108
+              <span>出库数量<span style="color: red">*</span></span>
109
+            </template>
110
+            <template slot-scope="scope">
111
+              <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
112
+                            style="padding-top: 17px">
113
+                <el-input type="number" v-model="scope.row.count"></el-input>
114
+              </el-form-item>
115
+            </template>
116
+          </el-table-column>
117
+
118
+          <el-table-column label="总价" min-width="20" align="center">
119
+            <template slot-scope="scope">
120
+              {{calculate(scope.row.price*scope.row.count)}}
121
+            </template>
122
+          </el-table-column>
123
+          <el-table-column label="备注" min-width="20" align="center">
124
+            <template slot-scope="scope">
125
+              <el-input v-model="scope.row.remark"></el-input>
126
+            </template>
127
+          </el-table-column>
128
+          <el-table-column label="操作" align="center" min-width="20">
129
+            <template slot-scope="scope">
130
+              <el-tooltip class="item" effect="dark" content="新增" placement="top">
131
+
132
+                <el-button
133
+                  size="mini"
134
+                  type="primary"
135
+                  icon="el-icon-circle-plus-outline"
136
+                  @click="handleEdit(scope.$index, scope.row)">
137
+                </el-button>
138
+              </el-tooltip>
139
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
140
+
141
+                <el-button
142
+                  size="mini"
143
+                  type="danger"
144
+                  icon="el-icon-delete"
145
+                  @click="handleDelete(scope.$index, scope.row)">
146
+                </el-button>
147
+              </el-tooltip>
148
+
149
+            </template>
150
+          </el-table-column>
151
+        </el-table>
152
+      </el-form>
153
+
154
+    </div>
122 155
   </div>
123 156
 
124 157
 </template>
@@ -126,12 +159,7 @@
126 159
 <script>
127 160
   import { uParseTime } from '@/utils/tools'
128 161
 
129
-  import {
130
-    deleteWarehouseOutInfo,
131
-    getWarehouseOutInfo,
132
-    getSalesReturnConfig,
133
-    editWarehouseoutInfo
134
-  } from '@/api/stock'
162
+  import { deleteWarehouseOutInfo, editWarehouseoutInfo, getSalesReturnConfig, getWarehouseOutInfo } from '@/api/stock'
135 163
   import SalesReturnDialog from './Dialog/salesReturnDialog'
136 164
   import BreadCrumb from '../components/bread-crumb'
137 165
 
@@ -143,7 +171,12 @@
143 171
       return {
144 172
         crumbs: [
145 173
           { path: false, name: '库存管理' },
146
-          { path: false, name: '出库单' },
174
+          { path: false, name: '耗材出库单' },
175
+          { path: false, name: '编辑出库单' }
176
+        ],
177
+        crumbs2: [
178
+          { path: false, name: '库存管理' },
179
+          { path: false, name: '其他出库单' },
147 180
           { path: false, name: '编辑出库单' }
148 181
         ],
149 182
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
@@ -177,14 +210,16 @@
177 210
           goodType: [],
178 211
           goodInfo: [],
179 212
           goodUnit: [],
180
-          title: '入库'
213
+          title: '入库',
214
+          manufacturer: 0,
215
+          dealer: 0
181 216
         },
182 217
 
183 218
         form: {
184
-          manufacturer: '',
185
-          dealer: ''
219
+          manufacturer: 0,
220
+          dealer: 0
186 221
         },
187
-        warehouseInfoList:[],
222
+        warehouseInfoList: [],
188 223
         warehouseOut: {},
189 224
         manufacturer: [],
190 225
         dealer: [],
@@ -221,34 +256,71 @@
221 256
           type: this.$route.query.type
222 257
         }
223 258
         getSalesReturnConfig(params).then(response => {
259
+          const loading = this.$loading({
260
+            lock: true,
261
+            text: 'Loading',
262
+            spinner: 'el-icon-loading',
263
+            background: 'rgba(0, 0, 0, 0.7)'
264
+          })
265
+
224 266
           if (response.data.state == 0) {
225 267
             this.$message.error(response.data.msg)
226 268
             return false
227 269
           } else {
270
+            loading.close()
228 271
             var warehouseInfoList = response.data.data.warehouseInfoList
229 272
             this.warehouseInfoList = response.data.data.warehouseInfoList
230
-
231 273
             for (let i = 0; i < warehouseInfoList.length; i++) {
232
-              this.propForm.goodInfo.push(warehouseInfoList[i].GoodInfo)
233
-              this.propForm.goodType.push(warehouseInfoList[i].GoodInfo.GoodsType)
274
+              if (warehouseInfoList[i].info.manufacturers.id > 0) {
275
+                this.manufacturer.push(warehouseInfoList[i].info.manufacturers)
276
+              }
277
+              if (warehouseInfoList[i].info.dealers.id > 0) {
278
+                this.dealer.push(warehouseInfoList[i].info.dealers)
279
+              }
280
+            }
281
+
282
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
283
+              this.goodType.push(this.warehouseInfoList[i].info.type)
284
+            }
285
+
286
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
287
+              this.propForm.goodInfo.push(this.warehouseInfoList[i].info)
234 288
             }
289
+            const obj = {}
290
+            const obj2 = {}
235 291
             const obj3 = {}
292
+
236 293
             const obj4 = {}
294
+            // 去重复
295
+            this.manufacturer = this.manufacturer.reduce((cur, next) => {
296
+              obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
297
+              return cur
298
+            }, [])
299
+            // 去重复
300
+            this.dealer = this.dealer.reduce((cur, next) => {
301
+              obj2[next.id] ? '' : obj2[next.id] = true && cur.push(next)
302
+              return cur
303
+            }, [])
237 304
             this.propForm.goodInfo = this.propForm.goodInfo.reduce((cur, next) => {
238 305
               obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
239 306
               return cur
240 307
             }, [])
241
-            this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
308
+
309
+            this.goodType = this.goodType.reduce((cur, next) => {
242 310
               obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
243 311
               return cur
244 312
             }, [])
313
+
314
+            this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: '全部' })
315
+            this.dealer.splice(0, 0, { id: 0, dealer_name: '全部' })
316
+
245 317
           }
246 318
         })
247 319
       }, typeName: function(good_type_id) {
248 320
         let name = ''
249
-        for (let i = 0; i < this.propForm.goodType.length; i++) {
250
-          if (this.propForm.goodType[i].id == good_type_id) {
251
-            name = this.propForm.goodType[i].type_name
321
+        for (let i = 0; i < this.goodType.length; i++) {
322
+          if (this.goodType[i].id == good_type_id) {
323
+            name = this.goodType[i].type_name
252 324
           }
253 325
         }
254 326
         return name
@@ -302,17 +374,46 @@
302 374
         }
303 375
       }, showDialog(index, row) {
304 376
         this.currentIndex = index
305
-        for (let i = 0; i < this.warehouseInfoList.length; i++) {
306
-          if (this.warehouseInfoList[i].manufacturer == this.form.manufacturer) {
307
-            this.propForm.goodType.push(this.warehouseInfoList[i].GoodInfo.GoodsType)
377
+        this.propForm.goodType = []
378
+        if (this.form.manufacturer == 0 && this.form.dealer == 0) {
379
+          for (let i = 0; i < this.warehouseInfoList.length; i++) {
380
+            this.propForm.goodType.push(this.warehouseInfoList[i].info.type)
308 381
           }
382
+          const obj3 = {}
383
+          this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
384
+            obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
385
+            return cur
386
+          }, [])
387
+        } else {
388
+          if (this.form.manufacturer == 0 && this.form.dealer != 0) {
389
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
390
+              if (this.warehouseInfoList[i].info.dealers.id == this.form.dealer) {
391
+                this.propForm.goodType.push(this.warehouseInfoList[i].info.type)
392
+              }
393
+            }
394
+          }
395
+          if (this.form.manufacturer != 0 && this.form.dealer == 0) {
396
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
397
+              if (this.warehouseInfoList[i].info.manufacturers.id == this.form.manufacturer) {
398
+                this.propForm.goodType.push(this.warehouseInfoList[i].info.type)
399
+              }
400
+            }
401
+          }
402
+          if (this.form.manufacturer != 0 && this.form.dealer != 0) {
403
+            for (let i = 0; i < this.warehouseInfoList.length; i++) {
404
+              if (this.warehouseInfoList[i].info.dealers.id == this.form.dealer && this.warehouseInfoList[i].info.manufacturers.id == this.form.manufacturer) {
405
+                this.propForm.goodType.push(this.warehouseInfoList[i].info.type)
406
+              }
407
+            }
408
+          }
409
+          const obj3 = {}
410
+          this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
411
+            obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
412
+            return cur
413
+          }, [])
309 414
         }
310
-        const obj3 = {}
311
-        this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
312
-          obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
313
-          return cur
314
-        }, [])
315 415
         this.$refs.dialog.show()
416
+
316 417
       }, back() {
317 418
         this.$router.go(-1)
318 419
       }, submit() {
@@ -333,7 +434,7 @@
333 434
             const params = {
334 435
               'stockOut': this.recordInfo.recordData
335 436
             }
336
-            editWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer).then(response => {
437
+            editWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
337 438
               if (response.data.state == 0) {
338 439
                 this.$message.error(response.data.msg)
339 440
                 return false
@@ -363,6 +464,7 @@
363 464
             this.warehouseOut = response.data.data.info
364 465
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
365 466
             this.form.manufacturer = this.warehouseOut.manufacturer
467
+            this.form.dealer = this.warehouseOut.dealer
366 468
 
367 469
           }
368 470
 
@@ -382,6 +484,10 @@
382 484
           return ''
383 485
         }
384 486
         return Math.round(parseFloat(val) * 100) / 100
487
+      }, changeManufacturer(val) {
488
+        this.propForm.manufacturer = val
489
+      }, changeDealer(val) {
490
+        this.propForm.dealer = val
385 491
       }
386 492
     },
387 493
     created() {

+ 5 - 2
src/xt_pages/stock/stockQuery.vue Näytä tiedosto

@@ -14,11 +14,14 @@
14 14
             {{scope.row.good_code}}
15 15
           </template>
16 16
         </el-table-column>
17
+        <el-table-column label="商品类型" align="center">
18
+          <template slot-scope="scope">
19
+            <span>{{scope.row.type.type_name}}</span>
20
+          </template>
21
+        </el-table-column>
17 22
         <el-table-column label="规格名称" align="center">
18 23
           <template slot-scope="scope">
19
-
20 24
             <span>{{scope.row.specification_name}}</span>
21
-
22 25
           </template>
23 26
         </el-table-column>
24 27
         <el-table-column label="入库数量" align="center" >

+ 4 - 5
src/xt_pages/user/components/PatientForm.vue Näytä tiedosto

@@ -232,7 +232,7 @@
232 232
               :before-upload="beforeAvatarUpload">
233 233
               <el-button :disabled="$store.getters.xt_user.subscibe.state==3||!subscibeFlag?true:false" class="uploadHeadBtn" type="primary" >上传头像</el-button>
234 234
             </el-upload>
235
-            <el-form-item prop="avatar">
235
+            <el-form-item >
236 236
               <el-input v-model="form.avatar"  type="hidden" placeholder=""></el-input>
237 237
             </el-form-item>
238 238
           </el-col>
@@ -498,9 +498,9 @@
498 498
       }
499 499
 
500 500
       return {
501
-        crumbs:[
502
-          {path:false, name:'病人管理'},
503
-          {path:false, name:'新增病人'},
501
+        crumbs: [
502
+          { path: false, name: '病人管理' },
503
+          { path: false, name: '新增病人' }
504 504
         ],
505 505
         generic_info_fold: true,
506 506
         treat_info_fold: true,
@@ -543,7 +543,6 @@
543 543
 
544 544
         subscibe: {},
545 545
         rules: {
546
-          // avatar: [{ required: true, message: '请上传头像', trigger: 'blur' }],
547 546
           patientType: [{ required: true, message: '请选择患者类型', trigger: 'blur' }],
548 547
           dialysisNo: [{ required: true, message: '请填写透析号', trigger: 'blur' }],
549 548
           phone: [{ validator: checkPhone, trigger: 'blur' }],

+ 66 - 67
src/xt_pages/workforce/components/setup_template_dialog.vue Näytä tiedosto

@@ -18,81 +18,80 @@
18 18
 </template>
19 19
 
20 20
 <script>
21
-import { setTemplateMode } from "@/api/schedule_template/patient"
21
+import { setTemplateMode } from '@/api/schedule_template/patient'
22 22
 
23 23
 export default {
24
-    name: "SetUpTemplateDialog",
25
-    data() {
26
-        return {
27
-            visible: false,
28
-            form: {
29
-                mode: 0,
30
-            },
31
-        }
32
-    },
33
-    props: {
34
-        template_mode: {
35
-            type: Object,
36
-        },
37
-        origin_mode: {
38
-            type: Number,
39
-        }
24
+  name: 'SetUpTemplateDialog',
25
+  data() {
26
+    return {
27
+      visible: false,
28
+      form: {
29
+        mode: 0
30
+      }
31
+    }
32
+  },
33
+  props: {
34
+    template_mode: {
35
+      type: Object
40 36
     },
41
-    watch: {
42
-        "template_mode.mode": function() {
43
-            this.form.mode = this.template_mode.mode
44
-        }
37
+    origin_mode: {
38
+      type: Number
39
+    }
40
+  },
41
+  watch: {
42
+    'template_mode.mode': function() {
43
+      this.form.mode = this.template_mode.mode
44
+    }
45
+  },
46
+  methods: {
47
+    _close: function(done) {
48
+      this.clear()
49
+      done()
45 50
     },
46
-    methods: {
47
-        _close: function(done) {
48
-            this.clear()
49
-            done()
50
-        },
51
-        clear: function() {
52
-
53
-        },
54
-        show() {
55
-            this.clear()
56
-            this.visible = true
57
-        },
58
-        hide() {
59
-            this.clear()
60
-            this.visible = false
61
-        },
62
-        saveAction: function() {
63
-            var msg = ""
64
-            if (this.origin_mode == 0) { // 0 -> 1 或 0 -> 2 直接清除下两周的排班
65
-                msg = "开启模板将清除下两周已设置的排班!是否继续开启?"
66
-            } else if (this.form.mode == 0) { // 1 -> 0 或 2 -> 0 则不处理排班,但清除所有模板item
51
+    clear: function() {
67 52
 
68
-            } else if (this.origin_mode == 1 && this.form.mode == 2) { // 1 -> 2 清除第二周排班
69
-                msg = "开启双周模板将清除下第二周已设置的排班!是否继续开启?"
70
-            } else if (this.origin_mode == 2 && this.form.mode == 1) { // 2 -> 1 清除第二周模板item,清除第二周排班,将第一周的排班重复到第二周
71
-                msg = "双周模板调整为单周模板时,下第二周排班将被清除,并用单周模板生成下第二周的排班!是否继续调整?"
72
-            }
73
-            if (msg.length == 0) {
74
-                this.submit()
75
-            } else {
76
-                this.$confirm(msg, '提示', {confirmButtonText: '确 定', cancelButtonText: '取 消', type: 'warning'})
77
-                .then(() => {
78
-                    this.submit()
79
-                })
80
-            }
81
-        },
82
-        submit: function() {
83
-            setTemplateMode(this.form.mode).then(rs => {
84
-                var resp = rs.data
85
-                if (resp.state == 1) {
86
-                    this.template_mode.mode = this.form.mode
87
-                    this.hide()
88
-                    this.$emit("chenge_mode", this.form.mode)
53
+    },
54
+    show() {
55
+      this.clear()
56
+      this.visible = true
57
+    },
58
+    hide() {
59
+      this.clear()
60
+      this.visible = false
61
+    },
62
+    saveAction: function() {
63
+      var msg = ''
64
+      if (this.origin_mode == 0) { // 0 -> 1 或 0 -> 2 直接清除下两周的排班
65
+        msg = '开启模板将清除下两周已设置的排班!是否继续开启?'
66
+      } else if (this.form.mode == 0) { // 1 -> 0 或 2 -> 0 则不处理排班,但清除所有模板item
89 67
 
90
-                } else {
91
-                    this.$message.error(resp.msg)
92
-                }
93
-            })
68
+      } else if (this.origin_mode == 1 && this.form.mode == 2) { // 1 -> 2 清除第二周排班
69
+        msg = '开启双周模板将清除下第二周已设置的排班!是否继续开启?'
70
+      } else if (this.origin_mode == 2 && this.form.mode == 1) { // 2 -> 1 清除第二周模板item,清除第二周排班,将第一周的排班重复到第二周
71
+        msg = '双周模板调整为单周模板时,下第二周排班将被清除,并用单周模板生成下第二周的排班!是否继续调整?'
72
+      }
73
+      if (msg.length == 0) {
74
+        this.submit()
75
+      } else {
76
+        this.$confirm(msg, '提示', { confirmButtonText: '确 定', cancelButtonText: '取 消', type: 'warning' })
77
+          .then(() => {
78
+            this.submit()
79
+          })
80
+      }
81
+    },
82
+    submit: function() {
83
+      setTemplateMode(this.form.mode).then(rs => {
84
+        var resp = rs.data
85
+        if (resp.state == 1) {
86
+          this.template_mode.mode = this.form.mode
87
+          this.hide()
88
+          this.$emit('chenge_mode', this.form.mode)
89
+        } else {
90
+          this.$message.error(resp.msg)
94 91
         }
92
+      })
95 93
     }
94
+  }
96 95
 }
97 96
 </script>
98 97
 

File diff suppressed because it is too large
+ 749 - 758
src/xt_pages/workforce/components/tableData.vue