Browse Source

bug更新

XMLWAN 4 years ago
parent
commit
2afc6cc0ad

+ 21 - 18
index.html View File

1
 <!DOCTYPE html>
1
 <!DOCTYPE html>
2
 <html>
2
 <html>
3
-  <head>
4
-    <meta charset="utf-8">
5
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6
-    <meta name="renderer" content="webkit">
7
-    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
8
-    <title>血透管理-酷医云</title>
9
-  </head>
10
-  <body>
11
-      <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
12
-    <script src="<%= htmlWebpackPlugin.options.path %>/tinymce4.7.5/tinymce.min.js"></script>
13
-    <script src="<%= htmlWebpackPlugin.options.path %>/neditor/neditor.config.js"></script>
14
-    <script src="<%= htmlWebpackPlugin.options.path %>/neditor/neditor.all.min.js"></script>
15
-    <script src="<%= htmlWebpackPlugin.options.path %>/neditor/neditor.service.js"></script>
16
-    <script src="<%= htmlWebpackPlugin.options.path %>/neditor/i18n/zh-cn/zh-cn.js"></script>
17
-    <script src="<%= htmlWebpackPlugin.options.path %>/neditor/neditor.parse.min.js"></script>
18
 
3
 
19
-    <div id="app"></div>
20
-    <!-- built files will be auto injected -->
21
-  </body>
4
+<head>
5
+  <meta charset="utf-8">
6
+  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7
+  <meta name="renderer" content="webkit">
8
+  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
9
+  <title>血透管理-酷医云</title>
10
+</head>
11
+
12
+<body>
13
+  <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
14
+  <script src="<%= htmlWebpackPlugin.options.path %>/tinymce4.7.5/tinymce.min.js"></script>
15
+  <script src="<%= htmlWebpackPlugin.options.path %>/neditor/neditor.config.js"></script>
16
+  <script src="<%= htmlWebpackPlugin.options.path %>/neditor/neditor.all.min.js"></script>
17
+  <script src="<%= htmlWebpackPlugin.options.path %>/neditor/neditor.service.js"></script>
18
+  <script src="<%= htmlWebpackPlugin.options.path %>/neditor/i18n/zh-cn/zh-cn.js"></script>
19
+  <script src="<%= htmlWebpackPlugin.options.path %>/neditor/neditor.parse.min.js"></script>
20
+
21
+  <div id="app"></div>
22
+  <!-- built files will be auto injected -->
23
+</body>
24
+
22
 </html>
25
 </html>

+ 221 - 232
src/api/manage.js View File

1
-import request from '@/utils/request'
1
+import request from "@/utils/request";
2
 
2
 
3
 export function getAllSubregion(params) {
3
 export function getAllSubregion(params) {
4
   return request({
4
   return request({
5
-    url: '/api/management/getallsubregion',
6
-    method: 'Get',
5
+    url: "/api/management/getallsubregion",
6
+    method: "Get",
7
     params: params
7
     params: params
8
-  })
8
+  });
9
 }
9
 }
10
 
10
 
11
 export function SaveManageInfo(data) {
11
 export function SaveManageInfo(data) {
12
   return request({
12
   return request({
13
-    url: '/api/management/savemanageinfo',
14
-    method: 'Post',
13
+    url: "/api/management/savemanageinfo",
14
+    method: "Post",
15
     data: data
15
     data: data
16
-  })
16
+  });
17
 }
17
 }
18
 
18
 
19
 export function getAllMachineInfo(
19
 export function getAllMachineInfo(
24
   equipmentid,
24
   equipmentid,
25
   statusid
25
   statusid
26
 ) {
26
 ) {
27
-  console.log('page', page)
28
-  console.log('limit', limit)
29
-  console.log('zoneid', zoneid)
30
-  console.log('equipmentid', equipmentid)
31
-  console.log('statusid', statusid)
32
-  console.log('seacherkey', searchKey)
33
   const params = {
27
   const params = {
34
     page: page,
28
     page: page,
35
     limit: limit,
29
     limit: limit,
37
     zoneid: zoneid,
31
     zoneid: zoneid,
38
     equipmentid: equipmentid,
32
     equipmentid: equipmentid,
39
     statusid: statusid
33
     statusid: statusid
40
-  }
34
+  };
41
   return request({
35
   return request({
42
-    url: '/api/management/getallmachineinfo',
43
-    method: 'Get',
36
+    url: "/api/management/getallmachineinfo",
37
+    method: "Get",
44
     params: params
38
     params: params
45
-  })
39
+  });
46
 }
40
 }
47
 
41
 
48
 export function getAllMachine(zoneid, classid, deviceid) {
42
 export function getAllMachine(zoneid, classid, deviceid) {
49
-  console.log('zoneid', zoneid)
50
-  console.log('classid', classid)
51
-  console.log('deviceid', deviceid)
52
   const params = {
43
   const params = {
53
     zoneid: zoneid,
44
     zoneid: zoneid,
54
     classid: classid,
45
     classid: classid,
55
     deviceid: deviceid
46
     deviceid: deviceid
56
-  }
47
+  };
57
   return request({
48
   return request({
58
-    url: '/api/management/getallmachine',
59
-    method: 'Get',
49
+    url: "/api/management/getallmachine",
50
+    method: "Get",
60
     params: params
51
     params: params
61
-  })
52
+  });
62
 }
53
 }
63
 
54
 
64
 export function getMachineDetailById(id, params) {
55
 export function getMachineDetailById(id, params) {
65
   return request({
56
   return request({
66
-    url: '/api/management/getmachinedetail?id=' + id,
67
-    method: 'Get',
57
+    url: "/api/management/getmachinedetail?id=" + id,
58
+    method: "Get",
68
     params: params
59
     params: params
69
-  })
60
+  });
70
 }
61
 }
71
 
62
 
72
 export function UpdateMachineInfo(data) {
63
 export function UpdateMachineInfo(data) {
73
-  console.log('data', data)
74
   return request({
64
   return request({
75
-    url: '/api/management/updatemachineinfo',
76
-    method: 'Post',
65
+    url: "/api/management/updatemachineinfo",
66
+    method: "Post",
77
     data: data
67
     data: data
78
-  })
68
+  });
79
 }
69
 }
80
 
70
 
81
 export function UpdateMachineInfoTwo(data) {
71
 export function UpdateMachineInfoTwo(data) {
72
+  console.log("data", data);
82
   return request({
73
   return request({
83
-    url: '/api/management/updatemachineinfotwo',
84
-    method: 'post',
74
+    url: "/api/management/updatemachineinfotwo",
75
+    method: "post",
85
     data: data
76
     data: data
86
-  })
77
+  });
87
 }
78
 }
88
 
79
 
89
 export function getAllEquimentName(params) {
80
 export function getAllEquimentName(params) {
90
   return request({
81
   return request({
91
-    url: '/api/management/getallequimentname',
92
-    method: 'Get',
82
+    url: "/api/management/getallequimentname",
83
+    method: "Get",
93
     params: params
84
     params: params
94
-  })
85
+  });
95
 }
86
 }
96
 
87
 
97
 export function savePlan(data, id) {
88
 export function savePlan(data, id) {
98
   return request({
89
   return request({
99
-    url: '/api/management/saveplan?id=' + id,
100
-    method: 'Post',
90
+    url: "/api/management/saveplan?id=" + id,
91
+    method: "Post",
101
     data: data
92
     data: data
102
-  })
93
+  });
103
 }
94
 }
104
 
95
 
105
 export function getAllPlan(params) {
96
 export function getAllPlan(params) {
106
   return request({
97
   return request({
107
-    url: '/api/management/getallplan',
108
-    method: 'Get',
98
+    url: "/api/management/getallplan",
99
+    method: "Get",
109
     params: params
100
     params: params
110
-  })
101
+  });
111
 }
102
 }
112
 
103
 
113
 export function getAllPlanDetail(unitype) {
104
 export function getAllPlanDetail(unitype) {
114
   // eslint-disable-next-line no-redeclare
105
   // eslint-disable-next-line no-redeclare
115
   const params = {
106
   const params = {
116
     unitype: unitype
107
     unitype: unitype
117
-  }
108
+  };
118
   return request({
109
   return request({
119
-    url: '/api/management/getallplandetail',
120
-    method: 'Get',
110
+    url: "/api/management/getallplandetail",
111
+    method: "Get",
121
     params: params
112
     params: params
122
-  })
113
+  });
123
 }
114
 }
124
 
115
 
125
 export function getEditMachine(id, params) {
116
 export function getEditMachine(id, params) {
126
   return request({
117
   return request({
127
-    url: '/api/management/geteditmachine?id=' + id,
128
-    method: 'Get',
118
+    url: "/api/management/geteditmachine?id=" + id,
119
+    method: "Get",
129
     params: params
120
     params: params
130
-  })
121
+  });
131
 }
122
 }
132
 
123
 
133
 export function DeletePlans(data) {
124
 export function DeletePlans(data) {
134
   return request({
125
   return request({
135
-    url: '/api/staff/deleteplans',
136
-    method: 'delete',
126
+    url: "/api/staff/deleteplans",
127
+    method: "delete",
137
     data: data
128
     data: data
138
-  })
129
+  });
139
 }
130
 }
140
 
131
 
141
 export function EditPlanDetail(id, params) {
132
 export function EditPlanDetail(id, params) {
142
   return request({
133
   return request({
143
-    url: '/api/manage/editplandetail?id=' + id,
144
-    method: 'get',
134
+    url: "/api/manage/editplandetail?id=" + id,
135
+    method: "get",
145
     params: params
136
     params: params
146
-  })
137
+  });
147
 }
138
 }
148
 
139
 
149
 export function UpdatePlanInfo(data) {
140
 export function UpdatePlanInfo(data) {
150
   return request({
141
   return request({
151
-    url: '/api/manage/updateplaninfo',
152
-    method: 'Post',
142
+    url: "/api/manage/updateplaninfo",
143
+    method: "Post",
153
     data: data
144
     data: data
154
-  })
145
+  });
155
 }
146
 }
156
 
147
 
157
 export function getComprehensive(params) {
148
 export function getComprehensive(params) {
158
   return request({
149
   return request({
159
-    url: '/api/manage/getcomprehensive',
160
-    method: 'Get',
150
+    url: "/api/manage/getcomprehensive",
151
+    method: "Get",
161
     params: params
152
     params: params
162
-  })
153
+  });
163
 }
154
 }
164
 
155
 
165
 export function SaveInformation(eid, data) {
156
 export function SaveInformation(eid, data) {
166
-  console.log('data', data)
167
   return request({
157
   return request({
168
-    url: '/api/manage/saveinformation?eid=' + eid,
169
-    method: 'Post',
158
+    url: "/api/manage/saveinformation?eid=" + eid,
159
+    method: "Post",
170
     data: data
160
     data: data
171
-  })
161
+  });
172
 }
162
 }
173
 
163
 
174
 export function getPatientInfo(id, params) {
164
 export function getPatientInfo(id, params) {
175
   return request({
165
   return request({
176
-    url: '/api/manage/getpatientinfo?id=' + id,
177
-    method: 'Get',
166
+    url: "/api/manage/getpatientinfo?id=" + id,
167
+    method: "Get",
178
     params: params
168
     params: params
179
-  })
169
+  });
180
 }
170
 }
181
 
171
 
182
 export function ChangeClass(equitid, id) {
172
 export function ChangeClass(equitid, id) {
183
   const params = {
173
   const params = {
184
     equitid: equitid,
174
     equitid: equitid,
185
     id: id
175
     id: id
186
-  }
176
+  };
187
   return request({
177
   return request({
188
-    url: '/api/manage/changeclass',
189
-    method: 'Get',
178
+    url: "/api/manage/changeclass",
179
+    method: "Get",
190
     params: params
180
     params: params
191
-  })
181
+  });
192
 }
182
 }
193
 
183
 
194
 export function changePatient(equitid, id) {
184
 export function changePatient(equitid, id) {
195
   const params = {
185
   const params = {
196
     equitid: equitid,
186
     equitid: equitid,
197
     id: id
187
     id: id
198
-  }
188
+  };
199
   return request({
189
   return request({
200
-    url: '/api/manage/changepatient',
201
-    method: 'Get',
190
+    url: "/api/manage/changepatient",
191
+    method: "Get",
202
     params: params
192
     params: params
203
-  })
193
+  });
204
 }
194
 }
205
 
195
 
206
 export function getAllOrganization(params) {
196
 export function getAllOrganization(params) {
207
   return request({
197
   return request({
208
-    url: '/api/manage/getallorganization',
209
-    method: 'Get',
198
+    url: "/api/manage/getallorganization",
199
+    method: "Get",
210
     params: params
200
     params: params
211
-  })
201
+  });
212
 }
202
 }
213
 
203
 
214
 export function getUserRegister(id, params) {
204
 export function getUserRegister(id, params) {
215
   return request({
205
   return request({
216
-    url: '/api/manage/getregisterinfo?id=' + id,
217
-    method: 'Get',
206
+    url: "/api/manage/getregisterinfo?id=" + id,
207
+    method: "Get",
218
     params: params
208
     params: params
219
-  })
209
+  });
220
 }
210
 }
221
 
211
 
222
 export function getInformationData(limit, page) {
212
 export function getInformationData(limit, page) {
223
   const params = {
213
   const params = {
224
     limit: limit,
214
     limit: limit,
225
     page: page
215
     page: page
226
-  }
216
+  };
227
   return request({
217
   return request({
228
-    url: '/api/manage/getinformationdata',
229
-    method: 'Get',
218
+    url: "/api/manage/getinformationdata",
219
+    method: "Get",
230
     params: params
220
     params: params
231
-  })
221
+  });
232
 }
222
 }
233
 
223
 
234
 export function SaveBacteria(id, data) {
224
 export function SaveBacteria(id, data) {
235
   return request({
225
   return request({
236
-    url: '/api/manage/savebacteria?id=' + id,
237
-    method: 'Post',
226
+    url: "/api/manage/savebacteria?id=" + id,
227
+    method: "Post",
238
     data: data
228
     data: data
239
-  })
229
+  });
240
 }
230
 }
241
 
231
 
242
 export function SaveLincomycin(id, data) {
232
 export function SaveLincomycin(id, data) {
243
   return request({
233
   return request({
244
-    url: '/api/manage/savelincomycin?id=' + id,
245
-    method: 'Post',
234
+    url: "/api/manage/savelincomycin?id=" + id,
235
+    method: "Post",
246
     data: data
236
     data: data
247
-  })
237
+  });
248
 }
238
 }
249
 
239
 
250
 export function SaveQualityControl(id, data) {
240
 export function SaveQualityControl(id, data) {
251
   return request({
241
   return request({
252
-    url: '/api/manage/savequalitycontrol?id=' + id,
253
-    method: 'Post',
242
+    url: "/api/manage/savequalitycontrol?id=" + id,
243
+    method: "Post",
254
     data: data
244
     data: data
255
-  })
245
+  });
256
 }
246
 }
257
 
247
 
258
 export function getOrgName(params) {
248
 export function getOrgName(params) {
259
   return request({
249
   return request({
260
-    url: '/api/manage/getorgname',
261
-    method: 'Get',
250
+    url: "/api/manage/getorgname",
251
+    method: "Get",
262
     params: params
252
     params: params
263
-  })
253
+  });
264
 }
254
 }
265
 
255
 
266
 export function getAllQulityInfo(params) {
256
 export function getAllQulityInfo(params) {
267
   return request({
257
   return request({
268
-    url: '/api/manage/getallqulityinfo',
269
-    method: 'Get',
258
+    url: "/api/manage/getallqulityinfo",
259
+    method: "Get",
270
     params: params
260
     params: params
271
-  })
261
+  });
272
 }
262
 }
273
 
263
 
274
 export function EditCulture(id, userid) {
264
 export function EditCulture(id, userid) {
275
   const params = {
265
   const params = {
276
     id: id,
266
     id: id,
277
     userid: userid
267
     userid: userid
278
-  }
268
+  };
279
   return request({
269
   return request({
280
-    url: '/api/manage/editculture',
281
-    method: 'Get',
270
+    url: "/api/manage/editculture",
271
+    method: "Get",
282
     params: params
272
     params: params
283
-  })
273
+  });
284
 }
274
 }
285
 
275
 
286
 export function UpdateCulture(data) {
276
 export function UpdateCulture(data) {
287
   return request({
277
   return request({
288
-    url: '/api/manage/updateculture',
289
-    method: 'Post',
278
+    url: "/api/manage/updateculture",
279
+    method: "Post",
290
     data: data
280
     data: data
291
-  })
281
+  });
292
 }
282
 }
293
 
283
 
294
 export function DeleteCultrue(data) {
284
 export function DeleteCultrue(data) {
295
   return request({
285
   return request({
296
-    url: '/api/manage/deletecultrue',
297
-    method: 'delete',
286
+    url: "/api/manage/deletecultrue",
287
+    method: "delete",
298
     data: data
288
     data: data
299
-  })
289
+  });
300
 }
290
 }
301
 
291
 
302
 export function EditDialyState(id, params) {
292
 export function EditDialyState(id, params) {
303
   return request({
293
   return request({
304
-    url: '/api/manage/editdialystate?id=' + id,
305
-    method: 'Get',
294
+    url: "/api/manage/editdialystate?id=" + id,
295
+    method: "Get",
306
     params: params
296
     params: params
307
-  })
297
+  });
308
 }
298
 }
309
 
299
 
310
 export function UpdateDialyState(data) {
300
 export function UpdateDialyState(data) {
311
   return request({
301
   return request({
312
-    url: '/api/manage/updatedialystate',
313
-    method: 'post',
302
+    url: "/api/manage/updatedialystate",
303
+    method: "post",
314
     data: data
304
     data: data
315
-  })
305
+  });
316
 }
306
 }
317
 
307
 
318
 export function DeleteDialystate(data) {
308
 export function DeleteDialystate(data) {
319
   return request({
309
   return request({
320
-    url: '/api/manage/deletedialystate',
321
-    method: 'delete',
310
+    url: "/api/manage/deletedialystate",
311
+    method: "delete",
322
     data: data
312
     data: data
323
-  })
313
+  });
324
 }
314
 }
325
 
315
 
326
 export function EditIon(id, params) {
316
 export function EditIon(id, params) {
327
   return request({
317
   return request({
328
-    url: '/api/manage/edition?id=' + id,
329
-    method: 'Get',
318
+    url: "/api/manage/edition?id=" + id,
319
+    method: "Get",
330
     params: params
320
     params: params
331
-  })
321
+  });
332
 }
322
 }
333
 
323
 
334
 export function UpdateIon(data) {
324
 export function UpdateIon(data) {
335
   return request({
325
   return request({
336
-    url: '/api/manage/updateion',
337
-    method: 'Post',
326
+    url: "/api/manage/updateion",
327
+    method: "Post",
338
     data: data
328
     data: data
339
-  })
329
+  });
340
 }
330
 }
341
 
331
 
342
 export function DeleteIon(data) {
332
 export function DeleteIon(data) {
343
   return request({
333
   return request({
344
-    url: '/api/manage/deleteion',
345
-    method: 'delete',
334
+    url: "/api/manage/deleteion",
335
+    method: "delete",
346
     data: data
336
     data: data
347
-  })
337
+  });
348
 }
338
 }
349
 
339
 
350
 export function queryTable(bedid, startime, endtime) {
340
 export function queryTable(bedid, startime, endtime) {
352
     bedid: bedid,
342
     bedid: bedid,
353
     startime: startime,
343
     startime: startime,
354
     endtime: endtime
344
     endtime: endtime
355
-  }
345
+  };
356
   return request({
346
   return request({
357
-    url: '/api/manage/query',
358
-    method: 'Get',
347
+    url: "/api/manage/query",
348
+    method: "Get",
359
     params: params
349
     params: params
360
-  })
350
+  });
361
 }
351
 }
362
 
352
 
363
 export function SaveRepair(id, data) {
353
 export function SaveRepair(id, data) {
364
   return request({
354
   return request({
365
-    url: '/api/manage/saverepair?id=' + id,
366
-    method: 'post',
355
+    url: "/api/manage/saverepair?id=" + id,
356
+    method: "post",
367
     data: data
357
     data: data
368
-  })
358
+  });
369
 }
359
 }
370
 
360
 
371
 export function getAllRepair(limit, page) {
361
 export function getAllRepair(limit, page) {
372
   const params = {
362
   const params = {
373
     limit: limit,
363
     limit: limit,
374
     page: page
364
     page: page
375
-  }
365
+  };
376
   return request({
366
   return request({
377
-    url: '/api/manage/getallrepair',
378
-    method: 'Get',
367
+    url: "/api/manage/getallrepair",
368
+    method: "Get",
379
     params: params
369
     params: params
380
-  })
370
+  });
381
 }
371
 }
382
 
372
 
383
 export function EditRepair(id, params) {
373
 export function EditRepair(id, params) {
384
   return request({
374
   return request({
385
-    url: '/api/manage/editrepair?id=' + id,
386
-    method: 'Get',
375
+    url: "/api/manage/editrepair?id=" + id,
376
+    method: "Get",
387
     params: params
377
     params: params
388
-  })
378
+  });
389
 }
379
 }
390
 
380
 
391
 export function UpdateRepair(data) {
381
 export function UpdateRepair(data) {
392
   return request({
382
   return request({
393
-    url: '/api/manage/updaterepair',
394
-    method: 'Post',
383
+    url: "/api/manage/updaterepair",
384
+    method: "Post",
395
     data: data
385
     data: data
396
-  })
386
+  });
397
 }
387
 }
398
 
388
 
399
 export function DeleteRepair(data) {
389
 export function DeleteRepair(data) {
400
   return request({
390
   return request({
401
-    url: '/api/manage/deleterepair',
402
-    method: 'delete',
391
+    url: "/api/manage/deleterepair",
392
+    method: "delete",
403
     data: data
393
     data: data
404
-  })
394
+  });
405
 }
395
 }
406
 
396
 
407
 export function queryRepair(bedid, startime, endtime) {
397
 export function queryRepair(bedid, startime, endtime) {
409
     bedid: bedid,
399
     bedid: bedid,
410
     startime: startime,
400
     startime: startime,
411
     endtime: endtime
401
     endtime: endtime
412
-  }
402
+  };
413
 
403
 
414
   return request({
404
   return request({
415
-    url: '/api/manage/queryrepair',
416
-    method: 'Get',
405
+    url: "/api/manage/queryrepair",
406
+    method: "Get",
417
     params: params
407
     params: params
418
-  })
408
+  });
419
 }
409
 }
420
 
410
 
421
 export function EditUser(id, patientid) {
411
 export function EditUser(id, patientid) {
422
   const params = {
412
   const params = {
423
     id: id,
413
     id: id,
424
     patientid: patientid
414
     patientid: patientid
425
-  }
415
+  };
426
   return request({
416
   return request({
427
-    url: '/api/manage/edituser',
428
-    method: 'Get',
417
+    url: "/api/manage/edituser",
418
+    method: "Get",
429
     params: params
419
     params: params
430
-  })
420
+  });
431
 }
421
 }
432
 
422
 
433
 export function DeleteUserform(data) {
423
 export function DeleteUserform(data) {
434
   return request({
424
   return request({
435
-    url: '/api/manage/deleteform',
436
-    method: 'delete',
425
+    url: "/api/manage/deleteform",
426
+    method: "delete",
437
     data: data
427
     data: data
438
-  })
428
+  });
439
 }
429
 }
440
 
430
 
441
 export function UpdateForm(data) {
431
 export function UpdateForm(data) {
442
   return request({
432
   return request({
443
-    url: '/api/manage/updateform',
444
-    method: 'post',
433
+    url: "/api/manage/updateform",
434
+    method: "post",
445
     data: data
435
     data: data
446
-  })
436
+  });
447
 }
437
 }
448
 
438
 
449
 export function queryInfo(zone, bed, startime, endtime, limit, page) {
439
 export function queryInfo(zone, bed, startime, endtime, limit, page) {
454
     endtime: endtime,
444
     endtime: endtime,
455
     limit: limit,
445
     limit: limit,
456
     page: page
446
     page: page
457
-  }
458
-  console.log('params', params)
447
+  };
459
   return request({
448
   return request({
460
-    url: '/api/manage/queryinfo',
461
-    method: 'Get',
449
+    url: "/api/manage/queryinfo",
450
+    method: "Get",
462
     params: params
451
     params: params
463
-  })
452
+  });
464
 }
453
 }
465
 
454
 
466
 export function getAutoData(id, params) {
455
 export function getAutoData(id, params) {
467
   return request({
456
   return request({
468
-    url: '/api/manage/insertautodata?id=' + id,
469
-    method: 'Get',
457
+    url: "/api/manage/insertautodata?id=" + id,
458
+    method: "Get",
470
     params: params
459
     params: params
471
-  })
460
+  });
472
 }
461
 }
473
 
462
 
474
 export function getAllEquitType(params) {
463
 export function getAllEquitType(params) {
475
   return request({
464
   return request({
476
-    url: '/api/manage/getallequittype',
477
-    method: 'Get',
465
+    url: "/api/manage/getallequittype",
466
+    method: "Get",
478
     params: params
467
     params: params
479
-  })
468
+  });
480
 }
469
 }
481
 
470
 
482
 export function getUserForm(id, limit, page) {
471
 export function getUserForm(id, limit, page) {
484
     id: id,
473
     id: id,
485
     limit: limit,
474
     limit: limit,
486
     page: page
475
     page: page
487
-  }
476
+  };
488
   return request({
477
   return request({
489
-    url: '/api/manage/getuserform',
490
-    method: 'Get',
478
+    url: "/api/manage/getuserform",
479
+    method: "Get",
491
     params: params
480
     params: params
492
-  })
481
+  });
493
 }
482
 }
494
 
483
 
495
 export function UpdateMacheineTwo(data) {
484
 export function UpdateMacheineTwo(data) {
496
-  console.log('data', data)
497
   return request({
485
   return request({
498
-    url: '/api/manage/updatemacheinettwo',
499
-    method: 'post',
486
+    url: "/api/manage/updatemacheinettwo",
487
+    method: "post",
500
     data: data
488
     data: data
501
-  })
489
+  });
502
 }
490
 }
503
 
491
 
504
 export function getBedForm(id, params) {
492
 export function getBedForm(id, params) {
505
   return request({
493
   return request({
506
-    url: '/api/manage/getbedform?id=' + id,
507
-    method: 'get',
494
+    url: "/api/manage/getbedform?id=" + id,
495
+    method: "get",
508
     params: params
496
     params: params
509
-  })
497
+  });
510
 }
498
 }
511
 
499
 
512
 export function getTotalCount(params) {
500
 export function getTotalCount(params) {
513
   return request({
501
   return request({
514
-    url: '/api/manage/gettotalcount',
515
-    method: 'Get',
502
+    url: "/api/manage/gettotalcount",
503
+    method: "Get",
516
     params: params
504
     params: params
517
-  })
505
+  });
518
 }
506
 }
519
 
507
 
520
 export function getTotalNumber(id, params) {
508
 export function getTotalNumber(id, params) {
521
   return request({
509
   return request({
522
-    url: '/api/manage/getotalnumber?id=' + id,
523
-    method: 'Get',
510
+    url: "/api/manage/getotalnumber?id=" + id,
511
+    method: "Get",
524
     params: params
512
     params: params
525
-  })
513
+  });
526
 }
514
 }
527
 
515
 
528
 export function getTimeWarning(id, params) {
516
 export function getTimeWarning(id, params) {
529
   return request({
517
   return request({
530
-    url: '/api/manage/gettimewarning?id=' + id,
531
-    method: 'Get',
518
+    url: "/api/manage/gettimewarning?id=" + id,
519
+    method: "Get",
532
     params: params
520
     params: params
533
-  })
521
+  });
534
 }
522
 }
535
 
523
 
536
-export function SaveManageInfoTwo(data) {
524
+export function SaveManageInfoTwo(data, beds) {
525
+  console.log("data", beds);
537
   return request({
526
   return request({
538
-    url: '/api/manage/savemanageinfotwo',
539
-    method: 'post',
527
+    url: "/api/manage/savemanageinfotwo?beds=" + beds,
528
+    method: "post",
540
     data: data
529
     data: data
541
-  })
530
+  });
542
 }
531
 }
543
 
532
 
544
 export function getAllpatient(params) {
533
 export function getAllpatient(params) {
545
   return request({
534
   return request({
546
-    url: '/api/manage/getallpatient',
547
-    method: 'get',
535
+    url: "/api/manage/getallpatient",
536
+    method: "get",
548
     params: params
537
     params: params
549
-  })
538
+  });
550
 }
539
 }
551
 
540
 
552
 export function changeBed(id, params) {
541
 export function changeBed(id, params) {
553
   return request({
542
   return request({
554
-    url: '/api/manage/changebed?id=' + id,
555
-    method: 'get',
543
+    url: "/api/manage/changebed?id=" + id,
544
+    method: "get",
556
     params: params
545
     params: params
557
-  })
546
+  });
558
 }
547
 }
559
 
548
 
560
 export function getPatientDetail(id, params) {
549
 export function getPatientDetail(id, params) {
561
   return request({
550
   return request({
562
-    url: '/api/manage/getpatientdetail?id=' + id,
563
-    method: 'get',
551
+    url: "/api/manage/getpatientdetail?id=" + id,
552
+    method: "get",
564
     params: params
553
     params: params
565
-  })
554
+  });
566
 }
555
 }
567
 
556
 
568
 export function changeRun(id, data) {
557
 export function changeRun(id, data) {
569
   return request({
558
   return request({
570
-    url: '/api/manage/changrun?id=' + id,
571
-    method: 'post',
559
+    url: "/api/manage/changrun?id=" + id,
560
+    method: "post",
572
     data: data
561
     data: data
573
-  })
562
+  });
574
 }
563
 }
575
 
564
 
576
 export function getRemanderData(params) {
565
 export function getRemanderData(params) {
577
   return request({
566
   return request({
578
-    url: '/api/manage/getremanderdata',
579
-    method: 'get',
567
+    url: "/api/manage/getremanderdata",
568
+    method: "get",
580
     params: params
569
     params: params
581
-  })
570
+  });
582
 }
571
 }
583
 
572
 
584
 export function openDelete(id, params) {
573
 export function openDelete(id, params) {
585
   return request({
574
   return request({
586
-    url: '/api/manage/opendelete?id=' + id,
587
-    method: 'delete',
575
+    url: "/api/manage/opendelete?id=" + id,
576
+    method: "delete",
588
     params: params
577
     params: params
589
-  })
578
+  });
590
 }
579
 }
591
 
580
 
592
 export function DeleteUserLogin(id, params) {
581
 export function DeleteUserLogin(id, params) {
593
   return request({
582
   return request({
594
-    url: '/api/manage/deleteuserlogin?id=' + id,
595
-    method: 'delete',
583
+    url: "/api/manage/deleteuserlogin?id=" + id,
584
+    method: "delete",
596
     params: params
585
     params: params
597
-  })
586
+  });
598
 }
587
 }
599
 
588
 
600
 export function DeleteCultrues(id, params) {
589
 export function DeleteCultrues(id, params) {
601
   return request({
590
   return request({
602
-    url: '/api/manage/deletecultrues?id=' + id,
603
-    method: 'delete',
591
+    url: "/api/manage/deletecultrues?id=" + id,
592
+    method: "delete",
604
     params: params
593
     params: params
605
-  })
594
+  });
606
 }
595
 }
607
 
596
 
608
 export function DeleteDialystates(id, params) {
597
 export function DeleteDialystates(id, params) {
609
   return request({
598
   return request({
610
-    url: '/api/manage/deletedialystates?id=' + id,
611
-    method: 'delete',
599
+    url: "/api/manage/deletedialystates?id=" + id,
600
+    method: "delete",
612
     params: params
601
     params: params
613
-  })
602
+  });
614
 }
603
 }
615
 
604
 
616
 export function DeleteIons(id, params) {
605
 export function DeleteIons(id, params) {
617
   return request({
606
   return request({
618
-    url: '/api/manage/deleteions?id=' + id,
619
-    method: 'delete',
607
+    url: "/api/manage/deleteions?id=" + id,
608
+    method: "delete",
620
     params: params
609
     params: params
621
-  })
610
+  });
622
 }
611
 }
623
 
612
 
624
 export function DeleteRepairs(id, params) {
613
 export function DeleteRepairs(id, params) {
625
   return request({
614
   return request({
626
-    url: '/api/manage/deleterepairs?id=' + id,
627
-    method: 'delete',
615
+    url: "/api/manage/deleterepairs?id=" + id,
616
+    method: "delete",
628
     params: params
617
     params: params
629
-  })
618
+  });
630
 }
619
 }

+ 11 - 6
src/main.js View File

1
 import Vue from 'vue'
1
 import Vue from 'vue'
2
 
2
 
3
-import 'normalize.css/normalize.css'// A modern alternative to CSS resets
3
+import 'normalize.css/normalize.css' // A modern alternative to CSS resets
4
 
4
 
5
 import Element from 'element-ui'
5
 import Element from 'element-ui'
6
 import 'element-ui/lib/theme-chalk/index.css'
6
 import 'element-ui/lib/theme-chalk/index.css'
9
 import '@/styles/variables.scss' // global css
9
 import '@/styles/variables.scss' // global css
10
 import '@/assets/iconfont/iconfont.css'
10
 import '@/assets/iconfont/iconfont.css'
11
 import '@/assets/icon/iconfont.css'
11
 import '@/assets/icon/iconfont.css'
12
-import { Message } from 'element-ui'
12
+import {
13
+  Message
14
+} from 'element-ui'
13
 import App from './App'
15
 import App from './App'
14
 import router from './router'
16
 import router from './router'
15
 import store from './store'
17
 import store from './store'
16
-import { Base64 } from 'js-base64'
18
+import {
19
+  Base64
20
+} from 'js-base64'
17
 import i18n from './lang' // Internationalization
21
 import i18n from './lang' // Internationalization
18
 import './icons' // icon
22
 import './icons' // icon
19
-import './errorLog'// error log
23
+import './errorLog' // error log
20
 // import './permission' // permission control
24
 // import './permission' // permission control
21
 import './xt_permission'
25
 import './xt_permission'
22
 // import './mock' // simulation data
26
 // import './mock' // simulation data
23
 import VueClipboard from 'vue-clipboard2'
27
 import VueClipboard from 'vue-clipboard2'
24
 
28
 
25
-
26
 import * as filters from './filters' // global filters
29
 import * as filters from './filters' // global filters
27
 
30
 
28
 Vue.use(Element, {
31
 Vue.use(Element, {
29
   size: 'medium', // set element-ui default size
32
   size: 'medium', // set element-ui default size
30
-  i18n: (key, value) => i18n.t(key, value),
33
+  i18n: (key, value) => i18n.t(key, value)
31
 
34
 
32
 })
35
 })
33
 Vue.use(VueClipboard)
36
 Vue.use(VueClipboard)
48
 })
51
 })
49
 
52
 
50
 Vue.prototype.Base64 = require('js-base64').Base64
53
 Vue.prototype.Base64 = require('js-base64').Base64
54
+
55
+

+ 1 - 1
src/xt_pages/management/components/EditMachineForm.vue View File

238
   },
238
   },
239
   created() {
239
   created() {
240
     this.getAllEquimentName();
240
     this.getAllEquimentName();
241
-   // console.log("planid是什么东西===========================", this.newPlanid);
241
+   // console.log("planid是什么", this.newPlanid);
242
     this.getEditMachine(this.planid);
242
     this.getEditMachine(this.planid);
243
   },
243
   },
244
   mounted() {
244
   mounted() {

+ 154 - 19
src/xt_pages/management/components/ManageForm.vue View File

37
           <el-col :span="8">
37
           <el-col :span="8">
38
             <el-form-item
38
             <el-form-item
39
               label="机位号:"
39
               label="机位号:"
40
-              required
41
-              prop="bed_number"
42
               v-show="bedShow"
40
               v-show="bedShow"
41
+              required 
42
+              prop="bed_number"
43
             >
43
             >
44
               <el-select style="width:135px" v-model="form.bed_number">
44
               <el-select style="width:135px" v-model="form.bed_number">
45
                 <el-option
45
                 <el-option
50
                 ></el-option>
50
                 ></el-option>
51
               </el-select>
51
               </el-select>
52
             </el-form-item>
52
             </el-form-item>
53
+
53
             <el-form-item label="机位号:" v-show="bedShowTwo">
54
             <el-form-item label="机位号:" v-show="bedShowTwo">
54
               <el-input
55
               <el-input
55
-                v-model="form.bed_number"
56
+                v-model="forms.beds"
56
                 style="width:135px"
57
                 style="width:135px"
57
               ></el-input>
58
               ></el-input>
58
             </el-form-item>
59
             </el-form-item>
313
          <el-button type="primary" @click="SaveManageInfoTwo('form')" v-show="buttonShowTwo"
314
          <el-button type="primary" @click="SaveManageInfoTwo('form')" v-show="buttonShowTwo"
314
           >保存</el-button
315
           >保存</el-button
315
         >
316
         >
317
+        <el-button @click="SaveManageInfoThree('form')" v-show="buttonShowThree">保存</el-button>
316
       </span>
318
       </span>
317
     </el-dialog>
319
     </el-dialog>
318
   </div>
320
   </div>
368
         work_time: '', // 工作时长
370
         work_time: '', // 工作时长
369
         revers_mode: '', // 反渗模式
371
         revers_mode: '', // 反渗模式
370
         treat_mode: [],
372
         treat_mode: [],
371
-        treat_type: [] // 治疗模式
373
+        treat_type: [], // 治疗模式
374
+        beds: ''
375
+      },
376
+      forms: {
377
+        beds: ''
372
       },
378
       },
373
       deviceType: [],
379
       deviceType: [],
374
       bedNumber: [],
380
       bedNumber: [],
425
       bedShowTwo: false,
431
       bedShowTwo: false,
426
       disa: true,
432
       disa: true,
427
       buttonShow: true,
433
       buttonShow: true,
428
-      buttonShowTwo: false
434
+      buttonShowTwo: false,
435
+      buttonShowThree: false
429
     }
436
     }
430
   },
437
   },
431
   methods: {
438
   methods: {
450
           var numbers = response.data.data.numbers
457
           var numbers = response.data.data.numbers
451
           var devicenumber = response.data.data.devicenumber
458
           var devicenumber = response.data.data.devicenumber
452
           // console.log('devicenumber$', devicenumber)
459
           // console.log('devicenumber$', devicenumber)
453
-          var device = [{ bed_id: 0, bed_number: '请选择' }]
454
-          for (let index = 0; index < devicenumber.length; index++) {
455
-            const item = devicenumber[index]
456
-            device.push({ bed_id: item.bed_id, bed_number: item.bed_number })
457
-          }
458
-          this.bedNumber = device
460
+          // var device = [{ bed_id: 0, bed_number: '请选择' }]
461
+          // for (let index = 0; index < devicenumber.length; index++) {
462
+          // const item = devicenumber[index]
463
+          // device.push({ bed_id: item.bed_id, bed_number: item.bed_number })
464
+          // }
465
+          this.bedNumber = devicenumber
459
         }
466
         }
460
       })
467
       })
461
     },
468
     },
469
         this.bedShowTwo = false
476
         this.bedShowTwo = false
470
         this.buttonShow = true
477
         this.buttonShow = true
471
         this.buttonShowTwo = false
478
         this.buttonShowTwo = false
479
+        this.buttonShowThree = false
472
       }
480
       }
473
 
481
 
474
       if (val === 2) {
482
       if (val === 2) {
481
         this.bedShowTwo = true
489
         this.bedShowTwo = true
482
         this.buttonShow = false
490
         this.buttonShow = false
483
         this.buttonShowTwo = true
491
         this.buttonShowTwo = true
492
+        this.buttonShowThree = false
484
       }
493
       }
485
 
494
 
486
       if (val === 3) {
495
       if (val === 3) {
491
         this.treatShow = false
500
         this.treatShow = false
492
         this.DisinfectionShow = false
501
         this.DisinfectionShow = false
493
         this.bedShowTwo = false
502
         this.bedShowTwo = false
494
-        this.buttonShow = true
503
+        this.buttonShow = false
495
         this.buttonShowTwo = false
504
         this.buttonShowTwo = false
505
+        this.buttonShowThree = true
496
       }
506
       }
497
     },
507
     },
498
     changeMachineStatus(val) {
508
     changeMachineStatus(val) {
504
         this.form.rubbish_reason = ''
514
         this.form.rubbish_reason = ''
505
       }
515
       }
506
     },
516
     },
507
-    SaveManageInfo(formName) {
517
+    SaveManageInfoThree(formName) {
518
+      if (this.form.bed_number === '') {
519
+        this.form.bed_number = 0
520
+      }
508
       const arr1 = []
521
       const arr1 = []
509
       this.form.treat_mode.map((item, index) => {
522
       this.form.treat_mode.map((item, index) => {
510
         const obj = {}
523
         const obj = {}
570
       var machine_statuss = parseInt(machine_status)
583
       var machine_statuss = parseInt(machine_status)
571
       this.form.machine_status = machine_statuss
584
       this.form.machine_status = machine_statuss
572
 
585
 
573
-      if (this.form.bed_number === '') {
574
-        this.form.bed_number = 0
586
+      // if (this.form.bed_number === '') {
587
+      //  this.form.bed_number = 0
588
+      // }
589
+      // var bed_numbers = this.form.bed_number
590
+      // var bed_numberss = parseInt(bed_numbers)
591
+      // this.form.bed_number = bed_numberss
592
+      console.log('购买日期', this.form.buy_date)
593
+
594
+      if (this.form.Disinfection_mode === '') {
595
+        this.form.Disinfection_mode = 0
575
       }
596
       }
576
-      var bed_numbers = this.form.bed_number
577
-      var bed_numberss = parseInt(bed_numbers)
578
-      this.form.bed_number = bed_numberss
597
+      var disinfecction_modes = this.form.Disinfection_mode
598
+      var disinfecction_modess = parseInt(disinfecction_modes)
599
+      this.form.Disinfection_mode = disinfecction_modess
600
+
601
+      if (this.form.revers_mode === '') {
602
+        this.form.revers_mode = 0
603
+      }
604
+
605
+      this.$refs[formName].validate(valid => {
606
+        if (valid) {
607
+          SaveManageInfo(this.form).then(response => {
608
+            if (response.data.state === 1) {
609
+              var addmacher = response.data.data.addmacher
610
+              this.dialogVisible = false
611
+              this.$message.success('保存成功')
612
+              this.form.bed_number = ''
613
+              this.form.serial_number = ''
614
+              this.form.device_name = ''
615
+              this.form.manufacture_factory = ''
616
+              this.form.service_manufacturer = ''
617
+              this.form.use_section = ''
618
+              this.form.section_number = ''
619
+              this.form.maintenance_engineer = ''
620
+              this.form.telephone = ''
621
+              this.form.user_total = ''
622
+              this.form.remarks = ''
623
+              this.form.user_year = ''
624
+              this.form.work_time = ''
625
+              this.form.unit_type = ''
626
+              this.getAllSubregion()
627
+              this.$emit('getAllMachineInfo')
628
+              this.$forceUpdate()
629
+            } else {
630
+              this.$message.error('添加失败')
631
+            }
632
+          })
633
+        }
634
+      })
635
+    },
636
+
637
+    SaveManageInfo(formName) {
638
+      const arr1 = []
639
+      this.form.treat_mode.map((item, index) => {
640
+        const obj = {}
641
+        if (item === 'HD') {
642
+          obj.id = 1
643
+        }
644
+        if (item === 'HDF') {
645
+          obj.id = 2
646
+        }
647
+        if (item === 'HD+HP') {
648
+          obj.id = 3
649
+        }
650
+        if (item === 'HP') {
651
+          obj.id = 4
652
+        }
653
+        if (item === 'HF') {
654
+          obj.id = 5
655
+        }
656
+        if (item === 'SCUF') {
657
+          obj.id = 6
658
+        }
659
+        if (item === 'IUF') {
660
+          obj.id = 7
661
+        }
662
+        if (item === 'HFHD') {
663
+          obj.id = 8
664
+        }
665
+        if (item === 'HFHD+HP') {
666
+          obj.id = 9
667
+        }
668
+        if (item === 'PHF') {
669
+          obj.id = 10
670
+        }
671
+        if (item === 'HFR') {
672
+          obj.id = 11
673
+        }
674
+        if (item === 'HDF+HP') {
675
+          obj.id = 12
676
+        }
677
+        if (item === 'CRRT') {
678
+          obj.id = 13
679
+        }
680
+        if (item === '腹水回输') {
681
+          obj.id = 14
682
+        }
683
+        arr1.push(obj.id)
684
+      })
685
+      // console.log('arrr1', arr1)
686
+      this.form.treat_type = arr1
687
+
688
+      var device_type = this.form.device_type
689
+      var device_types = parseInt(device_type)
690
+      this.form.device_type = device_types
691
+
692
+      if (this.form.rubbish_reason === '') {
693
+        this.form.rubbish_reason = 0
694
+      }
695
+      var rubbish_reason = this.form.rubbish_reason
696
+      var rubbish_reasons = parseInt(rubbish_reason)
697
+      this.form.rubbish_reason = rubbish_reasons
698
+
699
+      var machine_status = this.form.machine_status
700
+      var machine_statuss = parseInt(machine_status)
701
+      this.form.machine_status = machine_statuss
702
+
703
+      // if (this.form.bed_number === '') {
704
+      //  this.form.bed_number = 0
705
+      // }
706
+      // var bed_numbers = this.form.bed_number
707
+      // var bed_numberss = parseInt(bed_numbers)
708
+      // this.form.bed_number = bed_numberss
579
       console.log('购买日期', this.form.buy_date)
709
       console.log('购买日期', this.form.buy_date)
580
 
710
 
581
       if (this.form.Disinfection_mode === '') {
711
       if (this.form.Disinfection_mode === '') {
620
       })
750
       })
621
     },
751
     },
622
     SaveManageInfoTwo(formName) {
752
     SaveManageInfoTwo(formName) {
753
+      if (this.form.bed_number === '') {
754
+        this.form.bed_number = 0
755
+      }
756
+
623
       var device_type = this.form.device_type
757
       var device_type = this.form.device_type
624
       var device_types = parseInt(device_type)
758
       var device_types = parseInt(device_type)
625
       this.form.device_type = device_types
759
       this.form.device_type = device_types
638
       if (this.form.revers_mode === '') {
772
       if (this.form.revers_mode === '') {
639
         this.form.revers_mode = 0
773
         this.form.revers_mode = 0
640
       }
774
       }
775
+
641
       var revers_mode = this.form.revers_mode
776
       var revers_mode = this.form.revers_mode
642
       var revers_modes = parseInt(revers_mode)
777
       var revers_modes = parseInt(revers_mode)
643
       this.form.revers_mode = revers_modes
778
       this.form.revers_mode = revers_modes
651
 
786
 
652
       this.$refs[formName].validate(valid => {
787
       this.$refs[formName].validate(valid => {
653
         if (valid) {
788
         if (valid) {
654
-          SaveManageInfoTwo(this.form).then(response => {
789
+          SaveManageInfoTwo(this.form, this.forms.beds).then(response => {
655
             if (response.data.state === 1) {
790
             if (response.data.state === 1) {
656
               var add = response.data.data.addmacher
791
               var add = response.data.data.addmacher
657
               console.log('add', add)
792
               console.log('add', add)

+ 4 - 3
src/xt_pages/management/components/MultipleForm.vue View File

179
               align="center"
179
               align="center"
180
             >
180
             >
181
               <template slot-scope="scope">{{
181
               <template slot-scope="scope">{{
182
-                scope.row.device_type
182
+                scope.row.unit_type
183
               }}</template>
183
               }}</template>
184
             </el-table-column>
184
             </el-table-column>
185
             <el-table-column
185
             <el-table-column
351
             numbers.push({ id: item.id, number: item.number })
351
             numbers.push({ id: item.id, number: item.number })
352
           }
352
           }
353
           this.Numbers = numbers
353
           this.Numbers = numbers
354
-         // console.log('numbers', number)
354
+          // console.log('numbers', number)
355
         }
355
         }
356
       })
356
       })
357
     },
357
     },
380
       getComprehensive(params).then(response => {
380
       getComprehensive(params).then(response => {
381
         if (response.data.state === 1) {
381
         if (response.data.state === 1) {
382
           var macher = response.data.data.macher
382
           var macher = response.data.data.macher
383
+          console.log('设备型号5555', macher)
383
           for (let index = 0; index < macher.length; index++) {
384
           for (let index = 0; index < macher.length; index++) {
384
             if (macher[index].device_type === 1) {
385
             if (macher[index].device_type === 1) {
385
               macher[index].device_type = '透析机'
386
               macher[index].device_type = '透析机'
407
               macher[index].rubbish_reason = ''
408
               macher[index].rubbish_reason = ''
408
             }
409
             }
409
           }
410
           }
410
-         // console.log('macher', macher)
411
+          // console.log('macher', macher)
411
           this.tableData = macher
412
           this.tableData = macher
412
         }
413
         }
413
       })
414
       })

+ 3 - 1
src/xt_pages/management/components/PlanForm.vue View File

269
       getAllEquitType().then(response => {
269
       getAllEquitType().then(response => {
270
         if (response.data.state === 1) {
270
         if (response.data.state === 1) {
271
           var equitname = response.data.data.equitname
271
           var equitname = response.data.data.equitname
272
-          // console.log('equitname=============', equitname)
272
+          var name = response.data.data.name
273
+          console.log('name', name)
274
+          // console.log('equitname', equitname)
273
           this.DeviceType = equitname
275
           this.DeviceType = equitname
274
         }
276
         }
275
       })
277
       })

+ 1 - 1
src/xt_pages/management/components/RepairForm.vue View File

472
       filename: '',
472
       filename: '',
473
       limit: 10,
473
       limit: 10,
474
       page: 1,
474
       page: 1,
475
-      total: ''
475
+      total: 0
476
     }
476
     }
477
   },
477
   },
478
   methods: {
478
   methods: {

+ 81 - 16
src/xt_pages/management/components/UserForm.vue View File

230
             </el-form-item>
230
             </el-form-item>
231
           </el-col>
231
           </el-col>
232
           <el-col :span="8">
232
           <el-col :span="8">
233
-            <el-form-item label="分区:">
233
+            <el-form-item label="分区2:">
234
               <el-select v-model="userform.zone" placeholder="请选择" class="a">
234
               <el-select v-model="userform.zone" placeholder="请选择" class="a">
235
                 <el-option
235
                 <el-option
236
-                  v-for="item in bedNumber"
236
+                  v-for="item in zones"
237
                   :key="item.id"
237
                   :key="item.id"
238
-                  :label="item.zone_name"
238
+                  :label="item.name"
239
                   :value="item.id"
239
                   :value="item.id"
240
                 ></el-option>
240
                 ></el-option>
241
               </el-select>
241
               </el-select>
579
             <el-form-item label="规格:">
579
             <el-form-item label="规格:">
580
               <el-input style="width:100px" v-model="userform.norms"></el-input>桶
580
               <el-input style="width:100px" v-model="userform.norms"></el-input>桶
581
             </el-form-item>
581
             </el-form-item>
582
+            <span style="color:red" v-show="showone">您已一个月未更换,请注意检测</span>
582
           </el-col>
583
           </el-col>
583
         </el-row>
584
         </el-row>
584
         <el-row>
585
         <el-row>
592
                   :key="index"
593
                   :key="index"
593
                 >{{gender.name}}</el-radio>
594
                 >{{gender.name}}</el-radio>
594
               </el-radio-group>
595
               </el-radio-group>
595
-              <span style="color:red" v-show="showone">您已一个月未更换,请注意检测</span>
596
+              
596
             </el-form-item>
597
             </el-form-item>
597
           </el-col>
598
           </el-col>
598
         </el-row>
599
         </el-row>
769
         { id: 3, name: '晚上' }
770
         { id: 3, name: '晚上' }
770
       ],
771
       ],
771
       treatmode: [
772
       treatmode: [
773
+        { id: 0, name: '请选择' },
772
         { id: 1, name: 'HD' },
774
         { id: 1, name: 'HD' },
773
         { id: 2, name: 'HDF' },
775
         { id: 2, name: 'HDF' },
774
         { id: 3, name: 'HD + HP' },
776
         { id: 3, name: 'HD + HP' },
931
             zone.push({ id: item.id, name: item.name })
933
             zone.push({ id: item.id, name: item.name })
932
           }
934
           }
933
           this.zones = zone
935
           this.zones = zone
936
+          console.log('zones', zones)
934
           var numbers = response.data.data.numbers
937
           var numbers = response.data.data.numbers
935
           var number = [{ id: 0, number: '全部' }]
938
           var number = [{ id: 0, number: '全部' }]
936
           for (let index = 0; index < numbers.length; index++) {
939
           for (let index = 0; index < numbers.length; index++) {
937
             const item = numbers[index]
940
             const item = numbers[index]
938
             number.push({ id: item.id, number: item.number })
941
             number.push({ id: item.id, number: item.number })
939
           }
942
           }
940
-          // this.bedNumber = number
943
+          this.bedNumber = number
941
         }
944
         }
942
       })
945
       })
943
     },
946
     },
1149
             if (information[index].dialysis_checked === 0) {
1152
             if (information[index].dialysis_checked === 0) {
1150
               information[index].dialysis_checked = ''
1153
               information[index].dialysis_checked = ''
1151
             }
1154
             }
1155
+            if (information[index].dialysis_checked === 2) {
1156
+              information[index].dialysis_checked = ''
1157
+            }
1152
             if (information[index].germ_checked === 1) {
1158
             if (information[index].germ_checked === 1) {
1153
               information[index].germ_checked = '√'
1159
               information[index].germ_checked = '√'
1154
             }
1160
             }
1161
+
1162
+            if (information[index].germ_checked === 2) {
1163
+              information[index].germ_checked = ''
1164
+            }
1165
+
1155
             if (information[index].germ_checked === 0) {
1166
             if (information[index].germ_checked === 0) {
1156
               information[index].germ_checked = ''
1167
               information[index].germ_checked = ''
1157
             }
1168
             }
1161
             if (information[index].clean === 0) {
1172
             if (information[index].clean === 0) {
1162
               information[index].clean = ''
1173
               information[index].clean = ''
1163
             }
1174
             }
1175
+            if (information[index].clean === 2) {
1176
+              information[index].clean = ''
1177
+            }
1164
           }
1178
           }
1165
           // var total = response.data.data.total
1179
           // var total = response.data.data.total
1166
           // console.log('total', total)
1180
           // console.log('total', total)
1198
       EditUser(id, patientid).then(response => {
1212
       EditUser(id, patientid).then(response => {
1199
         if (response.data.state === 1) {
1213
         if (response.data.state === 1) {
1200
           var device = response.data.data.device
1214
           var device = response.data.data.device
1201
-         // console.log('device', device)
1215
+          console.log('device', device)
1202
           var patients = response.data.data.patients
1216
           var patients = response.data.data.patients
1203
-         // console.log('patients', patients)
1217
+          // console.log('patients', patients)
1204
           // eslint-disable-next-line no-sequences
1218
           // eslint-disable-next-line no-sequences
1205
           this.userform.id = device.id,
1219
           this.userform.id = device.id,
1206
           this.userform.spling_date = uParseTime(
1220
           this.userform.spling_date = uParseTime(
1231
           this.userform.warning_value = device.warning_value
1245
           this.userform.warning_value = device.warning_value
1232
           this.userform.user_total = device.user_total
1246
           this.userform.user_total = device.user_total
1233
           this.userform.run = device.move
1247
           this.userform.run = device.move
1248
+
1234
           this.userform.failure_stage = device.failure_stage
1249
           this.userform.failure_stage = device.failure_stage
1235
           this.userform.fault_description = device.fault_description
1250
           this.userform.fault_description = device.fault_description
1236
           this.userform.code_information = device.code_information
1251
           this.userform.code_information = device.code_information
1260
           if (device.dialysis_checked === 0) {
1275
           if (device.dialysis_checked === 0) {
1261
             this.userform.dialysis_checked = false
1276
             this.userform.dialysis_checked = false
1262
           }
1277
           }
1278
+          if (device.dialysis_checked === 2) {
1279
+            this.userform.dialysis_checked = false
1280
+          }
1263
           this.userform.dialysis_name = device.dialysis_name
1281
           this.userform.dialysis_name = device.dialysis_name
1264
           this.userform.norms = device.norms
1282
           this.userform.norms = device.norms
1265
           this.userform.dialysis_concentration = device.dialysis_concentration
1283
           this.userform.dialysis_concentration = device.dialysis_concentration
1269
           if (device.germ_checked === 0) {
1287
           if (device.germ_checked === 0) {
1270
             this.userform.germ_checked = false
1288
             this.userform.germ_checked = false
1271
           }
1289
           }
1290
+          if (device.germ_checked === 2) {
1291
+            this.userform.germ_checked = false
1292
+          }
1293
+
1272
           this.userform.germ_name = device.germ_name
1294
           this.userform.germ_name = device.germ_name
1273
           this.userform.germ_number = device.germ_number
1295
           this.userform.germ_number = device.germ_number
1274
           if (device.clean === 1) {
1296
           if (device.clean === 1) {
1277
           if (device.clean === 0) {
1299
           if (device.clean === 0) {
1278
             this.userform.clean = false
1300
             this.userform.clean = false
1279
           }
1301
           }
1302
+          if (device.clean === 2) {
1303
+            this.userform.clean = false
1304
+          }
1280
           this.userform.sign_name = device.sign_name
1305
           this.userform.sign_name = device.sign_name
1306
+          if (device.disinfection === 0) {
1307
+            this.userform.disinfection = ''
1308
+          }
1281
         }
1309
         }
1282
       })
1310
       })
1283
     },
1311
     },
1327
       }
1355
       }
1328
     },
1356
     },
1329
     UpdateForm(formName) {
1357
     UpdateForm(formName) {
1358
+      console.log('22222', this.userform.germ_checked)
1359
+      if (this.userform.dialysis_checked === '') {
1360
+        this.userform.dialysis_checked = 0
1361
+      }
1362
+      // eslint-disable-next-line no-empty
1330
       if (this.userform.dialysis_checked === true) {
1363
       if (this.userform.dialysis_checked === true) {
1331
         this.userform.dialysis_checked = 1
1364
         this.userform.dialysis_checked = 1
1332
       }
1365
       }
1333
       if (this.userform.dialysis_checked === false) {
1366
       if (this.userform.dialysis_checked === false) {
1334
-        this.userform.dialysis_checked = 0
1367
+        this.userform.dialysis_checked = 2
1335
       }
1368
       }
1336
 
1369
 
1370
+      if (this.userform.germ_checked === '') {
1371
+        this.userform.germ_checked = 0
1372
+      }
1337
       if (this.userform.germ_checked === true) {
1373
       if (this.userform.germ_checked === true) {
1338
         this.userform.germ_checked = 1
1374
         this.userform.germ_checked = 1
1339
       }
1375
       }
1340
       if (this.userform.germ_checked === false) {
1376
       if (this.userform.germ_checked === false) {
1341
-        this.userform.germ_checked = 0
1377
+        this.userform.germ_checked = 2
1342
       }
1378
       }
1343
 
1379
 
1380
+      if (this.userform.clean === '') {
1381
+        this.userform.clean = 0
1382
+      }
1344
       if (this.userform.clean === true) {
1383
       if (this.userform.clean === true) {
1345
         this.userform.clean = 1
1384
         this.userform.clean = 1
1346
       }
1385
       }
1347
       if (this.userform.clean === false) {
1386
       if (this.userform.clean === false) {
1348
-        this.userform.clean = 0
1387
+        this.userform.clean = 2
1349
       }
1388
       }
1350
       // this.userform.start_time = this.getTimes(this.userform.start_time)
1389
       // this.userform.start_time = this.getTimes(this.userform.start_time)
1351
       // this.userform.end_time = this.getTimes(this.userform.end_time)
1390
       // this.userform.end_time = this.getTimes(this.userform.end_time)
1368
       if (this.userform.endtime == '') {
1407
       if (this.userform.endtime == '') {
1369
         this.userform.endtime = '0'
1408
         this.userform.endtime = '0'
1370
       }
1409
       }
1410
+      if (this.userform.disinfection === '') {
1411
+        this.userform.disinfection = 0
1412
+      }
1413
+      var status = this.userform.disinfection
1414
+      var statu = parseInt(status)
1415
+      this.userform.disinfection = statu
1371
 
1416
 
1372
       this.$refs[formName].validate(valid => {
1417
       this.$refs[formName].validate(valid => {
1373
         if (valid) {
1418
         if (valid) {
1608
             if (information[index].dialysis_checked === 0) {
1653
             if (information[index].dialysis_checked === 0) {
1609
               information[index].dialysis_checked = ''
1654
               information[index].dialysis_checked = ''
1610
             }
1655
             }
1656
+
1657
+            if (information[index].dialysis_checked === 2) {
1658
+              information[index].dialysis_checked = ''
1659
+            }
1611
             if (information[index].germ_checked === 1) {
1660
             if (information[index].germ_checked === 1) {
1612
               information[index].germ_checked = '√'
1661
               information[index].germ_checked = '√'
1613
             }
1662
             }
1663
+
1614
             if (information[index].germ_checked === 0) {
1664
             if (information[index].germ_checked === 0) {
1615
               information[index].germ_checked = ''
1665
               information[index].germ_checked = ''
1616
             }
1666
             }
1667
+            if (information[index].germ_checked === 2) {
1668
+              information[index].germ_checked = ''
1669
+            }
1617
             if (information[index].clean === 1) {
1670
             if (information[index].clean === 1) {
1618
               information[index].clean = '√'
1671
               information[index].clean = '√'
1619
             }
1672
             }
1620
             if (information[index].clean === 0) {
1673
             if (information[index].clean === 0) {
1621
               information[index].clean = ''
1674
               information[index].clean = ''
1622
             }
1675
             }
1676
+            if (information[index].clean === 2) {
1677
+              information[index].clean = ''
1678
+            }
1623
           }
1679
           }
1624
-          //console.log('消毒时间', information)
1680
+          // console.log('消毒时间', information)
1625
           this.tableData = information
1681
           this.tableData = information
1626
           var total = response.data.data.total
1682
           var total = response.data.data.total
1627
           this.total = total
1683
           this.total = total
1666
       getUserForm(id, this.limit, this.page).then(response => {
1722
       getUserForm(id, this.limit, this.page).then(response => {
1667
         if (response.data.state === 1) {
1723
         if (response.data.state === 1) {
1668
           var information = response.data.data.information
1724
           var information = response.data.data.information
1669
-          //console.log('information====================', information)
1725
+          // console.log('information====================', information)
1670
           // eslint-disable-next-line no-unused-vars
1726
           // eslint-disable-next-line no-unused-vars
1671
           var addmacher = response.data.data.addmacher
1727
           var addmacher = response.data.data.addmacher
1672
           // console.log('addmacher', addmacher)
1728
           // console.log('addmacher', addmacher)
1883
             if (information[index].dialysis_checked === 0) {
1939
             if (information[index].dialysis_checked === 0) {
1884
               information[index].dialysis_checked = ''
1940
               information[index].dialysis_checked = ''
1885
             }
1941
             }
1942
+            if (information[index].dialysis_checked === 2) {
1943
+              information[index].dialysis_checked = ''
1944
+            }
1886
             if (information[index].germ_checked === 1) {
1945
             if (information[index].germ_checked === 1) {
1887
               information[index].germ_checked = '√'
1946
               information[index].germ_checked = '√'
1888
             }
1947
             }
1889
             if (information[index].germ_checked === 0) {
1948
             if (information[index].germ_checked === 0) {
1890
               information[index].germ_checked = ''
1949
               information[index].germ_checked = ''
1891
             }
1950
             }
1951
+            if (information[index].germ_checked === 2) {
1952
+              information[index].germ_checked = ''
1953
+            }
1892
             if (information[index].clean === 1) {
1954
             if (information[index].clean === 1) {
1893
               information[index].clean = '√'
1955
               information[index].clean = '√'
1894
             }
1956
             }
1895
             if (information[index].clean === 0) {
1957
             if (information[index].clean === 0) {
1896
               information[index].clean = ''
1958
               information[index].clean = ''
1897
             }
1959
             }
1960
+            if (information[index].clean === 2) {
1961
+              information[index].clean = ''
1962
+            }
1898
 
1963
 
1899
             // this.form.zone = information[index].zone
1964
             // this.form.zone = information[index].zone
1900
             // this.form.bed = information[index].bed_number
1965
             // this.form.bed = information[index].bed_number
1909
       getBedForm(id).then(response => {
1974
       getBedForm(id).then(response => {
1910
         if (response.data.state === 1) {
1975
         if (response.data.state === 1) {
1911
           var addmacher = response.data.data.addmacher
1976
           var addmacher = response.data.data.addmacher
1912
-         // console.log('addmacher=============', addmacher)
1977
+          // console.log('addmacher=============', addmacher)
1913
           var number = response.data.data.number
1978
           var number = response.data.data.number
1914
-          //console.log('number', number)
1979
+          // console.log('number', number)
1915
           this.form.zone = addmacher.zone_id
1980
           this.form.zone = addmacher.zone_id
1916
           this.form.bed = addmacher.bed_id
1981
           this.form.bed = addmacher.bed_id
1917
 
1982
 
1956
         // eslint-disable-next-line eqeqeq
2021
         // eslint-disable-next-line eqeqeq
1957
         if (response.data.state == 1) {
2022
         if (response.data.state == 1) {
1958
           var patient = response.data.data.patient
2023
           var patient = response.data.data.patient
1959
-         // console.log('patient', patient)
2024
+          // console.log('patient', patient)
1960
           // eslint-disable-next-line no-undef
2025
           // eslint-disable-next-line no-undef
1961
           if (patient.is_infectious === 0) {
2026
           if (patient.is_infectious === 0) {
1962
             this.userform.contagion = ''
2027
             this.userform.contagion = ''
1977
       changeBed(id).then(response => {
2042
       changeBed(id).then(response => {
1978
         if (response.data.state === 1) {
2043
         if (response.data.state === 1) {
1979
           var bed = response.data.data.bed
2044
           var bed = response.data.data.bed
1980
-         // console.log('bed', bed)
2045
+          // console.log('bed', bed)
1981
           // eslint-disable-next-line no-sequences
2046
           // eslint-disable-next-line no-sequences
1982
           this.form.bed = '',
2047
           this.form.bed = '',
1983
           this.bedNumberTwo = bed
2048
           this.bedNumberTwo = bed

+ 85 - 33
src/xt_pages/management/home.vue View File

328
                                  </el-form-item>
328
                                  </el-form-item>
329
                               </el-col>
329
                               </el-col>
330
                                <el-col :span="7">
330
                                <el-col :span="7">
331
-                                   <el-form-item label="机号">
332
-                                       <el-input style="width:150px" v-model="form.bed_number" :disabled="disableFour"></el-input>
331
+                                   <el-form-item label="机号">
332
+                                       <el-input style="width:150px" v-model="form.beds" :disabled="disableFour"></el-input>
333
                                    </el-form-item>
333
                                    </el-form-item>
334
                                </el-col>
334
                                </el-col>
335
                              </el-row>
335
                              </el-row>
539
                                        <!-- <el-select style="width:150px" v-model="form.bed_number" :disabled="true">
539
                                        <!-- <el-select style="width:150px" v-model="form.bed_number" :disabled="true">
540
                                           <el-option v-for="item in this.Number" :key="item.id" :label="item.number" :value="item.id"></el-option>
540
                                           <el-option v-for="item in this.Number" :key="item.id" :label="item.number" :value="item.id"></el-option>
541
                                        </el-select> -->
541
                                        </el-select> -->
542
-                                       <el-input v-model="form.bed_number" style="width:150px" :disabled="disableFive"></el-input>
542
+                                       <el-input v-model="form.bed_numbers" style="width:150px" :disabled="disableFive"></el-input>
543
                                   </el-form-item>
543
                                   </el-form-item>
544
                               </el-col>
544
                               </el-col>
545
                              </el-row>
545
                              </el-row>
906
                      <div v-show="UserShow">
906
                      <div v-show="UserShow">
907
                         <el-tabs v-model="activeNameThree" @tab-click="handleClick">
907
                         <el-tabs v-model="activeNameThree" @tab-click="handleClick">
908
                           <el-tab-pane label="新增使用登记" name="first">
908
                           <el-tab-pane label="新增使用登记" name="first">
909
+
909
                              <el-form :model="userform" ref="userform" :rules="userRules">
910
                              <el-form :model="userform" ref="userform" :rules="userRules">
910
                                 <el-row>
911
                                 <el-row>
911
                                   <el-col :span="8">
912
                                   <el-col :span="8">
1241
                                       <el-form-item label="规格:">
1242
                                       <el-form-item label="规格:">
1242
                                           <el-input style="width:100px" v-model="userform.norms"></el-input>桶
1243
                                           <el-input style="width:100px" v-model="userform.norms"></el-input>桶
1243
                                       </el-form-item>
1244
                                       </el-form-item>
1245
+                                       <span class="warn" v-show="warnShow">您已一个月未更换,请注意检测</span>
1244
                                    </el-col>
1246
                                    </el-col>
1245
                                 </el-row>
1247
                                 </el-row>
1246
                                 <el-row>
1248
                                 <el-row>
1249
                                          <el-radio-group v-model="userform.dialysis_concentration">
1251
                                          <el-radio-group v-model="userform.dialysis_concentration">
1250
                                                 <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in potency" :key="index">{{gender.name}}</el-radio>
1252
                                                 <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in potency" :key="index">{{gender.name}}</el-radio>
1251
                                          </el-radio-group>
1253
                                          </el-radio-group>
1252
-                                        <span class="warn" v-show="warnShow">您已一个月未更换,请注意检测</span>
1254
+                                      
1253
                                       </el-form-item>
1255
                                       </el-form-item>
1254
                                    </el-col>
1256
                                    </el-col>
1255
                                 </el-row>
1257
                                 </el-row>
1313
                                   </div>
1315
                                   </div>
1314
                                 </el-row>
1316
                                 </el-row>
1315
                              </el-form>
1317
                              </el-form>
1318
+                             
1316
                           </el-tab-pane>
1319
                           </el-tab-pane>
1317
                            <el-tab-pane label="使用登记列表" name="second">
1320
                            <el-tab-pane label="使用登记列表" name="second">
1318
                              <user-form ref="userForm" :userdata="userdata"></user-form>
1321
                              <user-form ref="userForm" :userdata="userdata"></user-form>
2097
           treat_type: [],
2100
           treat_type: [],
2098
           bed: '', // 治疗模式
2101
           bed: '', // 治疗模式
2099
           Disinfection_mode: '',
2102
           Disinfection_mode: '',
2100
-          revers_mode: ''
2103
+          revers_mode: '',
2104
+          beds: '',
2105
+          bed_numbers: ''
2101
         },
2106
         },
2102
         activeName: 'first',
2107
         activeName: 'first',
2103
         activeNameTwo: 'first',
2108
         activeNameTwo: 'first',
2189
           date: [{ required: true, message: '请填写日期' }],
2194
           date: [{ required: true, message: '请填写日期' }],
2190
           zone: [{ required: true, message: '请填写分区' }],
2195
           zone: [{ required: true, message: '请填写分区' }],
2191
           bed_number: [{ required: true, message: '请填写机位号' }],
2196
           bed_number: [{ required: true, message: '请填写机位号' }],
2192
-          patient_name: [{ required: true, message: '请填写患者' }],
2197
+          patient_name: [{ required: true, message: '请填写患者', trigger: ['blur', 'change'] }],
2193
           disinfect_type: [{ required: true, message: '请填写消毒方式' }],
2198
           disinfect_type: [{ required: true, message: '请填写消毒方式' }],
2194
           disinfectant_type: [{ required: true, message: '请填写消毒液' }],
2199
           disinfectant_type: [{ required: true, message: '请填写消毒液' }],
2195
           disinfection: [{ required: true, message: '请填写消毒状态' }],
2200
           disinfection: [{ required: true, message: '请填写消毒状态' }],
2379
           { id: 18, name: 'HDF后置换' }
2384
           { id: 18, name: 'HDF后置换' }
2380
         ],
2385
         ],
2381
         disinfection: [
2386
         disinfection: [
2387
+          { id: 0, name: '请选择' },
2382
           { id: 1, name: '已消毒' },
2388
           { id: 1, name: '已消毒' },
2383
           { id: 2, name: '未消毒' },
2389
           { id: 2, name: '未消毒' },
2384
           { id: 3, name: '消毒未完成' }
2390
           { id: 3, name: '消毒未完成' }
2486
         disableFour: true,
2492
         disableFour: true,
2487
         disableFive: true,
2493
         disableFive: true,
2488
         runDisable: true,
2494
         runDisable: true,
2489
-        warnShow: false,
2490
-        warnShowTwo: false,
2491
-        warnShowThree: false,
2495
+        warnShow: true,
2496
+        warnShowTwo: true,
2497
+        warnShowThree: true,
2492
         bedZoneThree: [],
2498
         bedZoneThree: [],
2493
         bedNumberTwo: [],
2499
         bedNumberTwo: [],
2494
         reverseMode: [
2500
         reverseMode: [
2629
         getMachineDetailById(id).then(response => {
2635
         getMachineDetailById(id).then(response => {
2630
           if (response.data.state === 1) {
2636
           if (response.data.state === 1) {
2631
             var addmacher = response.data.data.addmacher
2637
             var addmacher = response.data.data.addmacher
2638
+            console.log('addmacher', addmacher)
2639
+            var warning = response.data.data.warning
2640
+            console.log('warning', warning)
2641
+            var time = this.getTimestamp(this.userform.date) - warning.stime
2642
+            console.log('时间', time)
2643
+            if (time < 2678400 && warning.dialysis_checked === 1) {
2644
+              this.warnShow = false
2645
+            } else {
2646
+              this.warnShow = true
2647
+            }
2648
+            var germ = response.data.data.germ
2649
+            console.log('germ', germ)
2650
+            var timetwo = this.getTimestamp(this.userform.date) - germ.stime
2651
+            console.log('时间', timetwo)
2652
+            if (timetwo < 2678400 && germ.germ_checked === 1) {
2653
+              this.warnShowTwo = false
2654
+            } else {
2655
+              this.warnShowTwo = true
2656
+            }
2657
+            var clean = response.data.data.clean
2658
+            var timethree = this.getTimestamp(this.userform.date) - clean.stime
2659
+            console.log('时间', timethree)
2660
+            if (timethree < 2678400 && clean.clean === 1) {
2661
+              this.warnShowThree = false
2662
+            } else {
2663
+              this.warnShowThree = true
2664
+            }
2632
             var number = response.data.data.number
2665
             var number = response.data.data.number
2633
             // console.log('number', number)
2666
             // console.log('number', number)
2634
             this.Number = number
2667
             this.Number = number
2733
             this.form.serial_number = addmacher.serial_number
2766
             this.form.serial_number = addmacher.serial_number
2734
             this.form.devicetype = addmacher.device_type
2767
             this.form.devicetype = addmacher.device_type
2735
             this.form.bed_number = addmacher.bed_id
2768
             this.form.bed_number = addmacher.bed_id
2769
+            this.form.bed_numbers = addmacher.bed_number
2770
+            this.form.beds = addmacher.bed_number
2736
             this.form.device_name = addmacher.device_name
2771
             this.form.device_name = addmacher.device_name
2737
             this.form.manufacture_factory = addmacher.manufacture_factory
2772
             this.form.manufacture_factory = addmacher.manufacture_factory
2738
             this.form.service_manufacturer = addmacher.service_manufacturer
2773
             this.form.service_manufacturer = addmacher.service_manufacturer
2871
               this.getAllMachine()
2906
               this.getAllMachine()
2872
               this.getAllSubregion()
2907
               this.getAllSubregion()
2873
               // this.$refs.singleTable.setCurrentRow(addmacher)
2908
               // this.$refs.singleTable.setCurrentRow(addmacher)
2874
-              this.$forceUpdate()          
2909
+              this.$forceUpdate()
2875
             }
2910
             }
2876
           })
2911
           })
2877
         })
2912
         })
2917
           }
2952
           }
2918
         })
2953
         })
2919
       },
2954
       },
2955
+
2920
       UpdateMacheineTwo(formName) {
2956
       UpdateMacheineTwo(formName) {
2921
         var device_type = this.form.devicetype
2957
         var device_type = this.form.devicetype
2922
         var device_types = parseInt(device_type)
2958
         var device_types = parseInt(device_type)
3539
         // var patientName = this.userform.patient_name
3575
         // var patientName = this.userform.patient_name
3540
         // var patient_name = parseInt(patientName)
3576
         // var patient_name = parseInt(patientName)
3541
         // this.userform.patient_name = patient_name
3577
         // this.userform.patient_name = patient_name
3542
-
3543
         var dialysismode = this.userform.dialysis_mode
3578
         var dialysismode = this.userform.dialysis_mode
3544
         var dialysis_mode = parseInt(dialysismode)
3579
         var dialysis_mode = parseInt(dialysismode)
3545
         this.userform.dialysis_mode = dialysis_mode
3580
         this.userform.dialysis_mode = dialysis_mode
3557
         }
3592
         }
3558
 
3593
 
3559
         if (this.userform.dialysis_checked === false) {
3594
         if (this.userform.dialysis_checked === false) {
3560
-          this.userform.dialysis_checked = 0
3595
+          this.userform.dialysis_checked = 2
3561
         }
3596
         }
3562
 
3597
 
3563
         if (this.userform.germ_checked === '') {
3598
         if (this.userform.germ_checked === '') {
3568
           this.userform.germ_checked = 1
3603
           this.userform.germ_checked = 1
3569
         }
3604
         }
3570
         if (this.userform.germ_checked === false) {
3605
         if (this.userform.germ_checked === false) {
3571
-          this.userform.germ_checked = 0
3606
+          this.userform.germ_checked = 2
3572
         }
3607
         }
3573
 
3608
 
3574
         if (this.userform.dialysis_name === '') {
3609
         if (this.userform.dialysis_name === '') {
3594
         }
3629
         }
3595
 
3630
 
3596
         if (this.userform.clean === false) {
3631
         if (this.userform.clean === false) {
3597
-          this.userform.clean = 0
3632
+          this.userform.clean = 2
3598
         }
3633
         }
3599
 
3634
 
3600
         // eslint-disable-next-line eqeqeq
3635
         // eslint-disable-next-line eqeqeq
3686
         getUserRegister(id).then(response => {
3721
         getUserRegister(id).then(response => {
3687
           if (response.data.state === 1) {
3722
           if (response.data.state === 1) {
3688
             var information = response.data.data.information
3723
             var information = response.data.data.information
3724
+            console.log('使用登记', information)
3689
             // eslint-disable-next-line no-unused-vars
3725
             // eslint-disable-next-line no-unused-vars
3690
             var role = response.data.data.role
3726
             var role = response.data.data.role
3691
             // console.log('role', role)
3727
             // console.log('role', role)
3702
             this.userform.classtype = information.class
3738
             this.userform.classtype = information.class
3703
             this.userform.zone = information.zone
3739
             this.userform.zone = information.zone
3704
             this.userform.bed_number = information.bed_number
3740
             this.userform.bed_number = information.bed_number
3705
-
3706
             this.userform.patient_name = information.name
3741
             this.userform.patient_name = information.name
3707
             this.userform.patient_id = information.patient_id
3742
             this.userform.patient_id = information.patient_id
3708
             this.userform.contagion = information.contagion
3743
             this.userform.contagion = information.contagion
3719
             this.userform.weight_loss = dislysis.weight_loss
3754
             this.userform.weight_loss = dislysis.weight_loss
3720
             this.userform.warning_value = information.warning_value
3755
             this.userform.warning_value = information.warning_value
3721
             this.userform.user_total = information.user_total
3756
             this.userform.user_total = information.user_total
3722
-            if (information.move == 0) {
3757
+            if (information.move === 0) {
3723
               this.userform.run = 1
3758
               this.userform.run = 1
3724
             } else {
3759
             } else {
3725
               this.userform.run = information.move
3760
               this.userform.run = information.move
3744
               this.userform.dialysis_checked = true
3779
               this.userform.dialysis_checked = true
3745
             }
3780
             }
3746
 
3781
 
3782
+            if (information.dialysis_checked === 0) {
3783
+              this.userform.dialysis_checked = false
3784
+            }
3785
+
3747
             if (information.dialysis_checked === 2) {
3786
             if (information.dialysis_checked === 2) {
3748
               this.userform.dialysis_checked = false
3787
               this.userform.dialysis_checked = false
3749
             }
3788
             }
3751
             this.userform.dialysis_name = information.dialysis_name
3790
             this.userform.dialysis_name = information.dialysis_name
3752
             this.userform.norms = information.norms
3791
             this.userform.norms = information.norms
3753
             this.userform.dialysis_concentration = information.dialysis_concentration
3792
             this.userform.dialysis_concentration = information.dialysis_concentration
3754
-            if (information.germ_checked === 1) {
3755
-              this.userform.germ_checked = true
3793
+  
3794
+            if (information.germ_checked === 0) {
3795
+              this.userform.germ_checked = false
3756
             }
3796
             }
3757
-            if (information.germs_checked === 0) {
3797
+
3798
+            if (information.germs_checked === 2) {
3758
               this.userform.germ_checked = false
3799
               this.userform.germ_checked = false
3759
             }
3800
             }
3801
+
3802
+            if (information.germ_checked === 1) {
3803
+              this.userform.germ_checked = true
3804
+            }
3805
+  
3760
             this.userform.germ_name = information.germ_name
3806
             this.userform.germ_name = information.germ_name
3761
             this.userform.germ_number = information.germ_number
3807
             this.userform.germ_number = information.germ_number
3762
             if (information.clean === 1) {
3808
             if (information.clean === 1) {
3765
             if (information.clean === 0) {
3811
             if (information.clean === 0) {
3766
               this.userform.clean = false
3812
               this.userform.clean = false
3767
             }
3813
             }
3814
+
3815
+            if (information.clean === 2) {
3816
+              this.userform.clean = false
3817
+            }
3768
             // eslint-disable-next-line eqeqeq
3818
             // eslint-disable-next-line eqeqeq
3769
             if (information.admin_user_id == 0) {
3819
             if (information.admin_user_id == 0) {
3770
               this.userform.sign_name = ''
3820
               this.userform.sign_name = ''
4106
       getTimeWarning(id) {
4156
       getTimeWarning(id) {
4107
         getTimeWarning(id).then(response => {
4157
         getTimeWarning(id).then(response => {
4108
           if (response.data.state === 1) {
4158
           if (response.data.state === 1) {
4109
-            var information = response.data.data.information
4110
-            // console.log(this.getTimestamp(this.userform.date))
4111
-            // console.log(information.stime)
4159
+            var information = response.data.data.informations
4160
+            console.log('码字', information)
4161
+            console.log('当前时间', this.getTimestamp(this.userform.date))
4162
+            console.log('存入时间', information.stime)
4112
             var time = this.getTimestamp(this.userform.date) - information.stime
4163
             var time = this.getTimestamp(this.userform.date) - information.stime
4113
-            // console.log('时间', time)
4114
-            if (time >= 2678400) {
4115
-              this.warnShow = true
4116
-            }
4164
+            console.log('时间', time)
4165
+            // if (time < 2678400) {
4166
+            //   this.warnShow = false
4167
+            // }
4117
             var deviceInformation = response.data.data.deviceInformation
4168
             var deviceInformation = response.data.data.deviceInformation
4118
 
4169
 
4119
             var timetwo = this.getTimestamp(this.userform.date) - deviceInformation.stime
4170
             var timetwo = this.getTimestamp(this.userform.date) - deviceInformation.stime
4120
-            if (timetwo >= 2678400) {
4121
-              this.warnShowTwo = true
4122
-            }
4171
+            // if (timetwo < 2678400) {
4172
+            //  this.warnShowTwo = false
4173
+            // }
4174
+  
4123
             var clean = response.data.data.clean
4175
             var clean = response.data.data.clean
4124
-            var timethree = this.getTimestamp(this.userform.date) - clean.stime
4125
-            if (timethree >= 2678400) {
4126
-              this.warnShowThree = true
4127
-            }
4176
+            // var timethree = this.getTimestamp(this.userform.date) - clean.stime
4177
+            // if (timethree < 2678400) {
4178
+            //  this.warnShowThree = false
4179
+            // }
4128
           }
4180
           }
4129
         })
4181
         })
4130
       },
4182
       },

+ 2 - 2
src/xt_pages/management/index.vue View File

288
       this.getAllMachineInfo();
288
       this.getAllMachineInfo();
289
     },
289
     },
290
     handleClick(id, index) {
290
     handleClick(id, index) {
291
-      // this.$router.push({ path: "/device/home?id=" + id });
292
-      this.$router.push({ path: "/device/home?index=" + index });
291
+      this.$router.push({ path: '/device/home?index=' + index })
292
+      // this.$router.push({ path: '/device/home?index=' + index + '&' + 'id=' + id })
293
     }
293
     }
294
   },
294
   },
295
   created() {
295
   created() {

+ 165 - 162
src/xt_pages/stock/stockInOrder.vue View File

174
 </template>
174
 </template>
175
 
175
 
176
 <script>
176
 <script>
177
-import { uParseTime } from '@/utils/tools'
178
-import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
177
+import { uParseTime } from "@/utils/tools";
178
+import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
179
 import {
179
 import {
180
   deleteWarehouseInfo,
180
   deleteWarehouseInfo,
181
   GetAllConfig,
181
   GetAllConfig,
183
   GetAllGoodType,
183
   GetAllGoodType,
184
   getWarehouseInfoList,
184
   getWarehouseInfoList,
185
   getWarehouseList
185
   getWarehouseList
186
-} from '@/api/stock'
187
-import BreadCrumb from '../components/bread-crumb'
186
+} from "@/api/stock";
187
+import BreadCrumb from "../components/bread-crumb";
188
 
188
 
189
 export default {
189
 export default {
190
-  name: 'stockIn',
190
+  name: "stockIn",
191
   components: { BreadCrumb },
191
   components: { BreadCrumb },
192
   created() {
192
   created() {
193
     // var nowDate = new Date();
193
     // var nowDate = new Date();
220
     // const startTime = year + '-' + month + '-' + day
220
     // const startTime = year + '-' + month + '-' + day
221
     // this.start_time = startTime
221
     // this.start_time = startTime
222
 
222
 
223
-    var nowDate = new Date()
224
-    var nowYear = nowDate.getFullYear()
225
-    var nowMonth = nowDate.getMonth() + 1
226
-    var nowDay = nowDate.getDate()
223
+    var nowDate = new Date();
224
+    var nowYear = nowDate.getFullYear();
225
+    var nowMonth = nowDate.getMonth() + 1;
226
+    var nowDay = nowDate.getDate();
227
     this.end_time =
227
     this.end_time =
228
       nowYear +
228
       nowYear +
229
-      '-' +
230
-      (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
231
-      '-' +
232
-      (nowDay < 10 ? '0' + nowDay : nowDay)
233
-    nowDate.setMonth(nowDate.getMonth() - 1)
234
-    nowYear = nowDate.getFullYear()
235
-    nowMonth = nowDate.getMonth() + 1
236
-    nowDay = nowDate.getDate()
229
+      "-" +
230
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
231
+      "-" +
232
+      (nowDay < 10 ? "0" + nowDay : nowDay);
233
+    nowDate.setMonth(nowDate.getMonth() - 1);
234
+    nowYear = nowDate.getFullYear();
235
+    nowMonth = nowDate.getMonth() + 1;
236
+    nowDay = nowDate.getDate();
237
     this.start_time =
237
     this.start_time =
238
       nowYear +
238
       nowYear +
239
-      '-' +
240
-      (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
241
-      '-' +
242
-      (nowDay < 10 ? '0' + nowDay : nowDay)
239
+      "-" +
240
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
241
+      "-" +
242
+      (nowDay < 10 ? "0" + nowDay : nowDay);
243
 
243
 
244
-    this.GetWarehouse()
245
-    this.GetConfigInfo()
246
-    this.fetchAllAdminUsers()
244
+    this.GetWarehouse();
245
+    this.GetConfigInfo();
246
+    this.fetchAllAdminUsers();
247
   },
247
   },
248
   data() {
248
   data() {
249
     return {
249
     return {
250
       crumbs: [
250
       crumbs: [
251
-        { path: false, name: '库存管理' },
252
-        { path: false, name: '入库单' }
251
+        { path: false, name: "库存管理" },
252
+        { path: false, name: "入库单" }
253
       ],
253
       ],
254
-      searchKey: '',
254
+      searchKey: "",
255
       type: 1,
255
       type: 1,
256
       page: 1,
256
       page: 1,
257
       limit: 10,
257
       limit: 10,
261
       pageSelect: 0,
261
       pageSelect: 0,
262
       adminUserOptions: [],
262
       adminUserOptions: [],
263
       multipleSelection: [],
263
       multipleSelection: [],
264
-      signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
265
-      start_time: '',
266
-      end_time: '',
264
+      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
265
+      start_time: "",
266
+      end_time: "",
267
       goodType: [],
267
       goodType: [],
268
       goodInfo: [],
268
       goodInfo: [],
269
       manufacturer: [],
269
       manufacturer: [],
272
       Warehouse: {
272
       Warehouse: {
273
         loading: false,
273
         loading: false,
274
         warehouseDate: [],
274
         warehouseDate: [],
275
-        tableCurrentIndex: ''
275
+        tableCurrentIndex: ""
276
       },
276
       },
277
 
277
 
278
       WarehouseInfo: {
278
       WarehouseInfo: {
279
         loading: false,
279
         loading: false,
280
         warehouseInfoDate: []
280
         warehouseInfoDate: []
281
       },
281
       },
282
-      startTime: ''
283
-    }
282
+      startTime: ""
283
+    };
284
   },
284
   },
285
   methods: {
285
   methods: {
286
     search: function() {
286
     search: function() {
291
         end_time: this.end_time,
291
         end_time: this.end_time,
292
         type: this.type,
292
         type: this.type,
293
         keywords: this.searchKey
293
         keywords: this.searchKey
294
-      }
295
-      this.Warehouse.warehouseDate = []
294
+      };
295
+      this.Warehouse.warehouseDate = [];
296
       getWarehouseList(Params).then(response => {
296
       getWarehouseList(Params).then(response => {
297
         if (response.data.state == 0) {
297
         if (response.data.state == 0) {
298
-          this.Warehouse.loading = false
299
-          this.$message.error(response.data.msg)
300
-          return false
298
+          this.Warehouse.loading = false;
299
+          this.$message.error(response.data.msg);
300
+          return false;
301
         } else {
301
         } else {
302
-          this.Warehouse.loading = false
303
-          this.total = response.data.data.total
302
+          this.Warehouse.loading = false;
303
+          this.total = response.data.data.total;
304
           for (let i = 0; i < response.data.data.list.length; i++) {
304
           for (let i = 0; i < response.data.data.list.length; i++) {
305
-            this.Warehouse.warehouseDate.push(response.data.data.list[i])
305
+            this.Warehouse.warehouseDate.push(response.data.data.list[i]);
306
           }
306
           }
307
         }
307
         }
308
-      })
308
+      });
309
     },
309
     },
310
     GetWarehouse: function() {
310
     GetWarehouse: function() {
311
       const Params = {
311
       const Params = {
314
         start_time: this.start_time,
314
         start_time: this.start_time,
315
         end_time: this.end_time,
315
         end_time: this.end_time,
316
         type: this.type
316
         type: this.type
317
-      }
318
-      this.Warehouse.warehouseDate = []
317
+      };
318
+      this.Warehouse.warehouseDate = [];
319
       getWarehouseList(Params).then(response => {
319
       getWarehouseList(Params).then(response => {
320
         if (response.data.state == 0) {
320
         if (response.data.state == 0) {
321
-          this.Warehouse.loading = false
322
-          this.$message.error(response.data.msg)
323
-          return false
321
+          this.Warehouse.loading = false;
322
+          this.$message.error(response.data.msg);
323
+          return false;
324
         } else {
324
         } else {
325
-          this.Warehouse.loading = false
326
-          this.total = response.data.data.total
325
+          this.Warehouse.loading = false;
326
+          this.total = response.data.data.total;
327
           for (let i = 0; i < response.data.data.list.length; i++) {
327
           for (let i = 0; i < response.data.data.list.length; i++) {
328
-            this.Warehouse.warehouseDate.push(response.data.data.list[i])
328
+            this.Warehouse.warehouseDate.push(response.data.data.list[i]);
329
           }
329
           }
330
         }
330
         }
331
-      })
331
+      });
332
     },
332
     },
333
     tableRowClassName({ row, rowIndex }) {
333
     tableRowClassName({ row, rowIndex }) {
334
       // 把每一行的索引放进row
334
       // 把每一行的索引放进row
335
-      row.index = rowIndex
335
+      row.index = rowIndex;
336
     },
336
     },
337
     onRowClick(row, event, column) {
337
     onRowClick(row, event, column) {
338
-      this.WarehouseInfo.warehouseInfoDate = []
339
-      this.Warehouse.tableCurrentIndex = row.index
338
+      this.WarehouseInfo.warehouseInfoDate = [];
339
+      this.Warehouse.tableCurrentIndex = row.index;
340
       const params = {
340
       const params = {
341
         id: row.id
341
         id: row.id
342
-      }
343
-      this.WarehouseInfo.loading = true
342
+      };
343
+      this.WarehouseInfo.loading = true;
344
       getWarehouseInfoList(params).then(response => {
344
       getWarehouseInfoList(params).then(response => {
345
         if (response.data.state == 0) {
345
         if (response.data.state == 0) {
346
-          this.WarehouseInfo.loading = false
347
-          this.$message.error(response.data.msg)
348
-          return false
346
+          this.WarehouseInfo.loading = false;
347
+          this.$message.error(response.data.msg);
348
+          return false;
349
         } else {
349
         } else {
350
-          this.WarehouseInfo.loading = false
350
+          this.WarehouseInfo.loading = false;
351
           for (let i = 0; i < response.data.data.info.length; i++) {
351
           for (let i = 0; i < response.data.data.info.length; i++) {
352
             this.WarehouseInfo.warehouseInfoDate.push(
352
             this.WarehouseInfo.warehouseInfoDate.push(
353
               response.data.data.info[i]
353
               response.data.data.info[i]
354
-            )
354
+            );
355
           }
355
           }
356
         }
356
         }
357
-      })
357
+      });
358
     },
358
     },
359
     getXuserName(id) {
359
     getXuserName(id) {
360
       if (id <= 0) {
360
       if (id <= 0) {
361
-        return ''
361
+        return "";
362
       }
362
       }
363
-      var name = ''
363
+      var name = "";
364
       if (
364
       if (
365
         this.adminUserOptions == null ||
365
         this.adminUserOptions == null ||
366
-        typeof this.adminUserOptions.length === 'undefined'
366
+        typeof this.adminUserOptions.length === "undefined"
367
       ) {
367
       ) {
368
-        return name
368
+        return name;
369
       }
369
       }
370
-      var leng = this.adminUserOptions.length
370
+      var leng = this.adminUserOptions.length;
371
       if (leng == 0) {
371
       if (leng == 0) {
372
-        return name
372
+        return name;
373
       }
373
       }
374
       for (let index = 0; index < leng; index++) {
374
       for (let index = 0; index < leng; index++) {
375
         if (this.adminUserOptions[index].id == id) {
375
         if (this.adminUserOptions[index].id == id) {
376
-          name = this.adminUserOptions[index].name
377
-          break
376
+          name = this.adminUserOptions[index].name;
377
+          break;
378
         }
378
         }
379
       }
379
       }
380
-      return name
380
+      return name;
381
     },
381
     },
382
     fetchAllDoctorAndNurse() {
382
     fetchAllDoctorAndNurse() {
383
       fetchAllDoctorAndNurse().then(response => {
383
       fetchAllDoctorAndNurse().then(response => {
384
         if (response.data.state == 1) {
384
         if (response.data.state == 1) {
385
-          this.doctorOptions = response.data.data.doctors
385
+          this.doctorOptions = response.data.data.doctors;
386
         }
386
         }
387
-      })
387
+      });
388
     },
388
     },
389
     fetchAllAdminUsers() {
389
     fetchAllAdminUsers() {
390
       fetchAllAdminUsers().then(response => {
390
       fetchAllAdminUsers().then(response => {
391
-        console.log(response)
391
+        console.log(response);
392
         if (response.data.state == 1) {
392
         if (response.data.state == 1) {
393
-          this.adminUserOptions = response.data.data.users
394
-          var alen = this.adminUserOptions.length
393
+          this.adminUserOptions = response.data.data.users;
394
+          var alen = this.adminUserOptions.length;
395
           for (let index = 0; index < alen; index++) {
395
           for (let index = 0; index < alen; index++) {
396
             if (this.adminUserOptions[index].user_type == 2) {
396
             if (this.adminUserOptions[index].user_type == 2) {
397
               // this.doctorOptions.push(this.adminUserOptions[index]);
397
               // this.doctorOptions.push(this.adminUserOptions[index]);
398
             }
398
             }
399
           }
399
           }
400
         }
400
         }
401
-      })
401
+      });
402
     },
402
     },
403
     getSpecificationName: function(id) {
403
     getSpecificationName: function(id) {
404
-      let name = ''
404
+      let name = "";
405
       for (let i = 0; i < this.goodInfo.length; i++) {
405
       for (let i = 0; i < this.goodInfo.length; i++) {
406
         if (this.goodInfo[i].id == id) {
406
         if (this.goodInfo[i].id == id) {
407
-          name = this.goodInfo[i].specification_name
407
+          name = this.goodInfo[i].specification_name;
408
         }
408
         }
409
       }
409
       }
410
 
410
 
411
-      return name
411
+      return name;
412
     },
412
     },
413
     getTypeName: function(id) {
413
     getTypeName: function(id) {
414
-      let name = ''
414
+      let name = "";
415
       for (let i = 0; i < this.goodType.length; i++) {
415
       for (let i = 0; i < this.goodType.length; i++) {
416
         if (this.goodType[i].id == id) {
416
         if (this.goodType[i].id == id) {
417
-          name = this.goodType[i].type_name
417
+          name = this.goodType[i].type_name;
418
         }
418
         }
419
       }
419
       }
420
-      return name
420
+      return name;
421
     },
421
     },
422
     GetAllGoodType: function() {
422
     GetAllGoodType: function() {
423
       GetAllGoodType().then(response => {
423
       GetAllGoodType().then(response => {
424
         if (response.data.state == 0) {
424
         if (response.data.state == 0) {
425
-          this.$message.error(response.data.msg)
426
-          return false
425
+          this.$message.error(response.data.msg);
426
+          return false;
427
         } else {
427
         } else {
428
           for (let i = 0; i < response.data.data.goodType.length; i++) {
428
           for (let i = 0; i < response.data.data.goodType.length; i++) {
429
-            this.goodType.push(response.data.data.goodType[i])
429
+            this.goodType.push(response.data.data.goodType[i]);
430
           }
430
           }
431
         }
431
         }
432
-      })
432
+      });
433
     },
433
     },
434
     GetAllGoodInfo: function() {
434
     GetAllGoodInfo: function() {
435
       GetAllGoodInfo().then(response => {
435
       GetAllGoodInfo().then(response => {
436
         if (response.data.state == 0) {
436
         if (response.data.state == 0) {
437
-          this.$message.error(response.data.msg)
438
-          return false
437
+          this.$message.error(response.data.msg);
438
+          return false;
439
         } else {
439
         } else {
440
           for (let i = 0; i < response.data.data.goodInfo.length; i++) {
440
           for (let i = 0; i < response.data.data.goodInfo.length; i++) {
441
-            this.goodInfo.push(response.data.data.goodInfo[i])
441
+            this.goodInfo.push(response.data.data.goodInfo[i]);
442
           }
442
           }
443
         }
443
         }
444
-      })
444
+      });
445
     },
445
     },
446
     clicks: function() {
446
     clicks: function() {
447
-      console.log(this.WarehouseInfo.warehouseInfoDate)
447
+      console.log(this.WarehouseInfo.warehouseInfoDate);
448
     },
448
     },
449
     handleWarehouse: function() {
449
     handleWarehouse: function() {
450
-      this.$router.push({ path: '/stock/in/add', query: { type: this.type }})
450
+      this.$router.push({ path: "/stock/in/add", query: { type: this.type } });
451
     },
451
     },
452
     handleReturnSales: function() {
452
     handleReturnSales: function() {
453
       // this.$router.push({path:'/patients/create'}
453
       // this.$router.push({path:'/patients/create'}
454
       if (this.multipleSelection.length <= 0) {
454
       if (this.multipleSelection.length <= 0) {
455
-        this.$message.error('请选择退货商品')
456
-        return
455
+        this.$message.error("请选择退货商品");
456
+        return;
457
       }
457
       }
458
 
458
 
459
-      const ids = []
459
+      const ids = [];
460
       for (let i = 0; i < this.multipleSelection.length; i++) {
460
       for (let i = 0; i < this.multipleSelection.length; i++) {
461
-        ids.push(this.multipleSelection[i].id)
461
+        ids.push(this.multipleSelection[i].id);
462
       }
462
       }
463
-      this.$router.push({ name: 'salesReturn', query: { id: ids.join('&') }})
463
+      this.$router.push({ name: "salesReturn", query: { id: ids.join("&") } });
464
     },
464
     },
465
     handleReturnSalesRecord: function() {
465
     handleReturnSalesRecord: function() {
466
-      this.$router.push({ name: 'salesReutrnRecord' })
466
+      this.$router.push({ name: "salesReutrnRecord" });
467
     },
467
     },
468
     handleWarehouseRecord: function() {
468
     handleWarehouseRecord: function() {
469
-      this.$router.push({ name: 'warehouseRecord' })
469
+      this.$router.push({ name: "warehouseRecord" });
470
     },
470
     },
471
     handleSelectionChange: function(val) {
471
     handleSelectionChange: function(val) {
472
-      this.multipleSelection = val
472
+      this.multipleSelection = val;
473
     },
473
     },
474
     handleSizeChange(val) {
474
     handleSizeChange(val) {
475
-      this.limit = val
476
-      this.GetWarehouse()
475
+      this.limit = val;
476
+      this.GetWarehouse();
477
     },
477
     },
478
     handleCurrentChange(val) {
478
     handleCurrentChange(val) {
479
-      this.page = val
480
-      this.GetWarehouse()
479
+      this.page = val;
480
+      this.GetWarehouse();
481
     },
481
     },
482
     startTimeChange(val) {
482
     startTimeChange(val) {
483
-      this.startTime = this.getTimestamp(val)
483
+      this.startTime = this.getTimestamp(val);
484
     },
484
     },
485
     endTimeChange(val) {
485
     endTimeChange(val) {
486
-      var time = this.getTimestamp(val) - this.startTime
486
+      console.log("开始时间", this.start_time);
487
+      var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
488
+      console.log("time", time);
487
       if (time < 0) {
489
       if (time < 0) {
488
-        this.$message.error('结束时间不能小于开始时间')
489
-        this.end_time = ''
490
+        this.$message.error("结束时间不能小于开始时间");
491
+        this.end_time = "";
490
       } else {
492
       } else {
491
-        this.GetWarehouse()
493
+        this.GetWarehouse();
492
       }
494
       }
493
     },
495
     },
494
-    getTimestamp(time) { // 把时间日期转成时间戳
495
-      return (new Date(time)).getTime() / 1000
496
+    getTimestamp(time) {
497
+      // 把时间日期转成时间戳
498
+      return new Date(time).getTime() / 1000;
496
     },
499
     },
497
     calculate: function(val) {
500
     calculate: function(val) {
498
-      return Math.round(parseFloat(val) * 100) / 100
501
+      return Math.round(parseFloat(val) * 100) / 100;
499
     },
502
     },
500
     GetConfigInfo: function() {
503
     GetConfigInfo: function() {
501
       GetAllConfig().then(response => {
504
       GetAllConfig().then(response => {
502
         if (response.data.state == 0) {
505
         if (response.data.state == 0) {
503
-          this.$message.error(response.data.msg)
504
-          return false
506
+          this.$message.error(response.data.msg);
507
+          return false;
505
         } else {
508
         } else {
506
-          this.manufacturer = response.data.data.manufacturer
507
-          this.dealer = response.data.data.dealer
509
+          this.manufacturer = response.data.data.manufacturer;
510
+          this.dealer = response.data.data.dealer;
508
         }
511
         }
509
-      })
512
+      });
510
     },
513
     },
511
     getManufactuerName: function(manufacturer_id) {
514
     getManufactuerName: function(manufacturer_id) {
512
       for (let i = 0; i < this.manufacturer.length; i++) {
515
       for (let i = 0; i < this.manufacturer.length; i++) {
513
         if (this.manufacturer[i].id == manufacturer_id) {
516
         if (this.manufacturer[i].id == manufacturer_id) {
514
-          return this.manufacturer[i].manufacturer_name
517
+          return this.manufacturer[i].manufacturer_name;
515
         }
518
         }
516
       }
519
       }
517
     },
520
     },
518
     getDealerName: function(dealer_id) {
521
     getDealerName: function(dealer_id) {
519
       for (let i = 0; i < this.dealer.length; i++) {
522
       for (let i = 0; i < this.dealer.length; i++) {
520
         if (this.dealer[i].id == dealer_id) {
523
         if (this.dealer[i].id == dealer_id) {
521
-          return this.dealer[i].dealer_name
524
+          return this.dealer[i].dealer_name;
522
         }
525
         }
523
       }
526
       }
524
     },
527
     },
525
     handleEdit: function(index, row) {
528
     handleEdit: function(index, row) {
526
       this.$router.push({
529
       this.$router.push({
527
-        name: 'stockInDetail',
530
+        name: "stockInDetail",
528
         query: { id: row.id, type: this.type }
531
         query: { id: row.id, type: this.type }
529
-      })
532
+      });
530
     },
533
     },
531
     handleDelete: function(index, row) {
534
     handleDelete: function(index, row) {
532
-      const ids = []
533
-      ids.push(row.id)
534
-      const idStr = ids.join(',')
535
+      const ids = [];
536
+      ids.push(row.id);
537
+      const idStr = ids.join(",");
535
 
538
 
536
       const params = {
539
       const params = {
537
         ids: idStr
540
         ids: idStr
538
-      }
541
+      };
539
 
542
 
540
-      this.$confirm('确认删除入库单记录?', '删除入库单记录', {
541
-        confirmButtonText: '确定',
542
-        cancelButtonText: '取消',
543
-        type: 'warning'
543
+      this.$confirm("确认删除入库单记录?", "删除入库单记录", {
544
+        confirmButtonText: "确定",
545
+        cancelButtonText: "取消",
546
+        type: "warning"
544
       })
547
       })
545
         .then(() => {
548
         .then(() => {
546
           deleteWarehouseInfo(params).then(response => {
549
           deleteWarehouseInfo(params).then(response => {
547
             if (response.data.state == 0) {
550
             if (response.data.state == 0) {
548
-              this.$message.error(response.data.msg)
549
-              return false
551
+              this.$message.error(response.data.msg);
552
+              return false;
550
             } else {
553
             } else {
551
               this.$notify({
554
               this.$notify({
552
-                title: '成功',
553
-                message: '删除成功',
554
-                type: 'success',
555
+                title: "成功",
556
+                message: "删除成功",
557
+                type: "success",
555
                 duration: 2000
558
                 duration: 2000
556
-              })
559
+              });
557
               for (let i = 0; i < ids.length; i++) {
560
               for (let i = 0; i < ids.length; i++) {
558
                 for (let y = 0; y < this.Warehouse.warehouseDate.length; y++) {
561
                 for (let y = 0; y < this.Warehouse.warehouseDate.length; y++) {
559
                   if (ids[i] == this.Warehouse.warehouseDate[y].id) {
562
                   if (ids[i] == this.Warehouse.warehouseDate[y].id) {
560
-                    this.Warehouse.warehouseDate.splice(y, 1)
563
+                    this.Warehouse.warehouseDate.splice(y, 1);
561
                   }
564
                   }
562
                 }
565
                 }
563
               }
566
               }
564
             }
567
             }
565
-          })
568
+          });
566
         })
569
         })
567
-        .catch(() => {})
570
+        .catch(() => {});
568
     },
571
     },
569
     changeAllSelected: function(val) {
572
     changeAllSelected: function(val) {
570
       if (val) {
573
       if (val) {
571
-        this.$refs.multipleTable.toggleAllSelection()
574
+        this.$refs.multipleTable.toggleAllSelection();
572
       } else {
575
       } else {
573
-        this.$refs.multipleTable.clearSelection()
576
+        this.$refs.multipleTable.clearSelection();
574
       }
577
       }
575
     },
578
     },
576
     select(selection) {
579
     select(selection) {
577
-      this.selectedTableData = selection
580
+      this.selectedTableData = selection;
578
     },
581
     },
579
     batchDelete() {
582
     batchDelete() {
580
       if (this.selectedTableData.length <= 0) {
583
       if (this.selectedTableData.length <= 0) {
581
-        this.$message.error('请选择要删除的记录')
582
-        return
584
+        this.$message.error("请选择要删除的记录");
585
+        return;
583
       }
586
       }
584
-      const ids = []
587
+      const ids = [];
585
       for (let i = 0; i < this.selectedTableData.length; i++) {
588
       for (let i = 0; i < this.selectedTableData.length; i++) {
586
-        ids.push(this.selectedTableData[i].id)
589
+        ids.push(this.selectedTableData[i].id);
587
       }
590
       }
588
-      const idStr = ids.join(',')
591
+      const idStr = ids.join(",");
589
       const params = {
592
       const params = {
590
         ids: idStr
593
         ids: idStr
591
-      }
592
-      this.$confirm('确认删除入库单记录?', '删除入库单记录', {
593
-        confirmButtonText: '确定',
594
-        cancelButtonText: '取消',
595
-        type: 'warning'
594
+      };
595
+      this.$confirm("确认删除入库单记录?", "删除入库单记录", {
596
+        confirmButtonText: "确定",
597
+        cancelButtonText: "取消",
598
+        type: "warning"
596
       })
599
       })
597
         .then(() => {
600
         .then(() => {
598
           deleteWarehouseInfo(params).then(response => {
601
           deleteWarehouseInfo(params).then(response => {
599
             if (response.data.state == 0) {
602
             if (response.data.state == 0) {
600
-              this.$message.error(response.data.msg)
601
-              return false
603
+              this.$message.error(response.data.msg);
604
+              return false;
602
             } else {
605
             } else {
603
               this.$notify({
606
               this.$notify({
604
-                title: '成功',
605
-                message: '删除成功',
606
-                type: 'success',
607
+                title: "成功",
608
+                message: "删除成功",
609
+                type: "success",
607
                 duration: 2000
610
                 duration: 2000
608
-              })
611
+              });
609
 
612
 
610
               for (let i = 0; i < ids.length; i++) {
613
               for (let i = 0; i < ids.length; i++) {
611
                 for (let y = 0; y < this.Warehouse.warehouseDate.length; y++) {
614
                 for (let y = 0; y < this.Warehouse.warehouseDate.length; y++) {
612
                   if (ids[i] == this.Warehouse.warehouseDate[y].id) {
615
                   if (ids[i] == this.Warehouse.warehouseDate[y].id) {
613
-                    this.Warehouse.warehouseDate.splice(y, 1)
616
+                    this.Warehouse.warehouseDate.splice(y, 1);
614
                   }
617
                   }
615
                 }
618
                 }
616
               }
619
               }
617
             }
620
             }
618
-          })
621
+          });
619
         })
622
         })
620
-        .catch(() => {})
623
+        .catch(() => {});
621
     }
624
     }
622
   }
625
   }
623
-}
626
+};
624
 </script>
627
 </script>
625
 
628
 
626
 <style rel="stylesheet/css" lang="scss" scoped>
629
 <style rel="stylesheet/css" lang="scss" scoped>