Explorar el Código

518合并代码

XMLWAN hace 2 años
padre
commit
28d6e33403
Se han modificado 3 ficheros con 437 adiciones y 0 borrados
  1. 9 0
      src/api/his/advice.js
  2. 6 0
      src/router/modules/stock.js
  3. 422 0
      src/xt_pages/stock/test.vue

+ 9 - 0
src/api/his/advice.js Ver fichero

@@ -0,0 +1,9 @@
1
+import request from '@/utils/request'
2
+
3
+export function getTodayAdviceList(params) {
4
+  return request({
5
+    url: '/api/advice/gettodayadvicelist',
6
+    method: 'get',
7
+    params: params
8
+  })
9
+}

+ 6 - 0
src/router/modules/stock.js Ver fichero

@@ -227,6 +227,12 @@ export default {
227 227
       name: 'config',
228 228
       meta: { title: 'config', noCache: true }
229 229
     },
230
+    {
231
+      path: '/stock/test',
232
+      component: () => import('@/xt_pages/stock/test'),
233
+      name: 'test',
234
+      meta: { title: 'test', noCache: true }
235
+    },
230 236
     {
231 237
       path: '/stock/print',
232 238
       component: () => import('@/xt_pages/stock/detail/print'),

+ 422 - 0
src/xt_pages/stock/test.vue Ver fichero

@@ -0,0 +1,422 @@
1
+<template>
2
+  <div class="main-contain new-main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+    </div>
6
+    <div
7
+      class="app-container"
8
+      style="display: flex; flex: 1; padding: 10px 20px 0px 20px"
9
+    >
10
+      <div class="mainLeft">
11
+        <div>
12
+          <div
13
+            style="
14
+              margin: 10px 0;
15
+              display: flex;
16
+              justify-content: space-between;
17
+            "
18
+          >
19
+          <el-date-picker
20
+            size="small"
21
+            v-model="start_time"
22
+            prefix-icon="el-icon-date"
23
+            :editable="false"
24
+            style="width: 196px;"
25
+            type="date"
26
+            placeholder="选择日期时间"
27
+            align="right"
28
+            format="yyyy-MM-dd"
29
+            value-format="yyyy-MM-dd"
30
+            @change="startTimeChange"
31
+          ></el-date-picker>
32
+
33
+        <el-input @keyup.enter.native='searchAction' v-model="keywords"
34
+                  class="filter-item"/>
35
+        <el-button  class="filter-item" type="primary" icon="el-icon-search"
36
+                   @click="searchAction">搜索</el-button>
37
+          </div>
38
+
39
+          <el-table
40
+            :row-class-name="tableRowClassName"
41
+            @row-click="onRowClick"
42
+            :data="patientTableData"
43
+            :height="tableHeight"
44
+            border
45
+            style="width: 100%"
46
+            :row-style="{ color: '#303133' }"
47
+            :header-cell-style="{
48
+              backgroundColor: 'rgb(245, 247, 250)',
49
+              color: '#606266',
50
+            }"
51
+            highlight-current-row
52
+            ref="singleTable"
53
+            @current-change="handleCurrentChange"
54
+          >
55
+            <el-table-column align="center" prop="name" label="姓名" wdith="89">
56
+              <template slot-scope="scope"></template>
57
+            </el-table-column>
58
+          </el-table>
59
+        </div>
60
+      </div>
61
+      <div class="mainRight">
62
+        <el-tabs v-model="titleType">
63
+          <el-tab-pane label="明细" name="明细"></el-tab-pane>
64
+          <el-tab-pane label="汇总" name="汇总"></el-tab-pane>
65
+        </el-tabs>
66
+      </div>
67
+    </div>
68
+  </div>
69
+</template>
70
+
71
+<script>
72
+import { getTodayAdviceList } from "@/api/his/advice";
73
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
74
+
75
+export default {
76
+  components: {
77
+    BreadCrumb,
78
+  },
79
+  data() {
80
+    return {
81
+      currentRowIndex: 0,
82
+      patientTableData: [],
83
+      tableHeight: 400,
84
+      crumbs: [
85
+        { path: false, name: "His工具" },
86
+        { path: false, name: "明细汇总统计" },
87
+      ],
88
+      titleType: "明细",
89
+      patient_id: 0,
90
+      keywords: "",
91
+      start_time:new Date(),
92
+    };
93
+  },
94
+
95
+
96
+  //判断列表页是否刷新
97
+  beforeRouteLeave(to, from, next) {
98
+    console.log(to, "beforeRouteEnter");
99
+    if (to.path != "/hisTool/detailPrint"&&to.path != "/hisTool/gatherPrint") {
100
+      this.$store.getters.pagedata.list.table_id = 0
101
+      next()
102
+    } else {
103
+     next()
104
+    }
105
+  },
106
+
107
+  watch:{
108
+    'titleType':{
109
+      handler(val){
110
+        this.$store.commit('SET_PAGENAME',val)
111
+      }
112
+    }
113
+  },
114
+
115
+  methods: {
116
+   
117
+
118
+    tableRowClassName({ row, rowIndex }) {
119
+      row.row_index = rowIndex;
120
+    },
121
+
122
+    onRowClick(row, event, column) {
123
+      this.currentRowIndex = row.row_index;
124
+      console.log(this.currentRowIndex, "this.currentRowIndex");
125
+      this.$store.commit("SET_PAGEDATA", {
126
+        table_id: this.currentRowIndex,
127
+      });
128
+      console.log(this.$store.getters.pagedata.list.table_id, "kk");
129
+    },
130
+    searchAction() {
131
+      this.getPatientList();
132
+    },
133
+    handleCurrentChange(row) {
134
+      this.patient_id = row.id;
135
+     
136
+    },
137
+    getlist(){
138
+      var params = {
139
+        start_time:this.start_time,
140
+        keywords:this.keywords,
141
+      }  
142
+      getTodayAdviceList(params).then(response=>{
143
+
144
+      }) 
145
+    }
146
+  },
147
+  created() {
148
+
149
+    let type = this.$store.getters.pagedata.pagestate
150
+    if(type == ""){
151
+      this.titleType = "明细"
152
+    }else{
153
+      this.titleType = type
154
+    }
155
+    const tableHeight = document.body.clientHeight - 290;
156
+    this.tableHeight = tableHeight;
157
+    
158
+    this.getlist()
159
+    
160
+  },
161
+
162
+  mounted() {}
163
+};
164
+</script>
165
+
166
+<style lang="scss" scoped>
167
+.new-main-contain {
168
+  height: 100%;
169
+  display: flex;
170
+  flex-direction: column;
171
+}
172
+
173
+.app-container {
174
+  height: 100%;
175
+}
176
+
177
+.mainCell {
178
+  height: 36px;
179
+  display: flex;
180
+  align-items: center;
181
+}
182
+
183
+.mainLeft {
184
+  width: 200px;
185
+  height: 100%;
186
+  display: flex;
187
+  flex-direction: column;
188
+
189
+  .el-radio {
190
+    margin-right: 5px;
191
+  }
192
+}
193
+.mainRight {
194
+  margin-left: 10px;
195
+  flex: 1;
196
+  height: 100%;
197
+  display: flex;
198
+  flex-direction: column;
199
+  overflow-y: auto;
200
+
201
+  .cellSpan {
202
+    min-width: 80px;
203
+    display: inline-block;
204
+    margin-right: 10px;
205
+  }
206
+}
207
+.mainCenter {
208
+  display: flex;
209
+  flex: 1;
210
+}
211
+
212
+.centerLeft {
213
+  flex: 1;
214
+  display: flex;
215
+  flex-direction: column;
216
+  position: relative;
217
+
218
+  .el-form-item {
219
+    width: 32%;
220
+    margin-right: 1%;
221
+    float: left;
222
+  }
223
+
224
+  .el-form-item__label {
225
+    text-align: left;
226
+  }
227
+}
228
+.backColor {
229
+  background: #f6f8f9;
230
+  height: 5px;
231
+  margin-bottom: 5px;
232
+}
233
+
234
+.tabsBox {
235
+  position: relative;
236
+  height: 76%;
237
+  overflow-y: auto;
238
+  margin-bottom: 60px;
239
+
240
+  .el-tabs__item {
241
+    padding: 0 10px;
242
+  }
243
+}
244
+.preTabs {
245
+  height: 100%;
246
+  display: flex;
247
+  flex-direction: column;
248
+
249
+  .el-tabs__content {
250
+    flex: 1;
251
+    overflow-y: auto;
252
+  }
253
+}
254
+
255
+.costBox {
256
+  width: 100%;
257
+  height: 60px;
258
+  background: #fff;
259
+  position: absolute;
260
+  bottom: 0;
261
+  display: flex;
262
+  align-items: center;
263
+}
264
+
265
+.addTab {
266
+  position: absolute;
267
+  right: 0;
268
+  top: 14px;
269
+  z-index: 20;
270
+}
271
+
272
+.centerRight {
273
+  width: 300px;
274
+  margin-left: 10px;
275
+  display: flex;
276
+  flex-direction: column;
277
+  position: relative;
278
+}
279
+
280
+.rightTab {
281
+  height: 40px;
282
+  width: 100%;
283
+  border: 1px solid #d2d2d2;
284
+  box-sizing: border-box;
285
+
286
+  p {
287
+    width: 50%;
288
+    height: 40px;
289
+    line-height: 40px;
290
+    text-align: center;
291
+    background: #eee;
292
+    float: left;
293
+  }
294
+
295
+  > p:last-child {
296
+    border-left: 1px solid #d2d2d2;
297
+    float: right;
298
+  }
299
+
300
+  .activeP {
301
+    background: #409eff;
302
+    color: #fff;
303
+  }
304
+}
305
+.comfirmBox {
306
+  width: 100%;
307
+  height: 60px;
308
+  background: #fff;
309
+  position: absolute;
310
+  bottom: 0;
311
+  display: flex;
312
+  align-items: center;
313
+  justify-content: space-between;
314
+}
315
+
316
+.mainHeader {
317
+  width: 100%;
318
+  background: #fff;
319
+  position: fixed;
320
+  z-index: 100;
321
+  height: 36px;
322
+}
323
+
324
+.titleBox {
325
+  position: fixed;
326
+  z-index: 99;
327
+  background: #fff;
328
+}
329
+
330
+.fixedCell {
331
+  position: fixed;
332
+  z-index: 99;
333
+  right: 30px;
334
+  background: #fff;
335
+  width: 300px;
336
+  display: flex;
337
+  justify-content: space-between;
338
+}
339
+</style>
340
+
341
+<style lang="scss">
342
+.centerLeft {
343
+  .el-form-item__label {
344
+    text-align: left;
345
+  }
346
+}
347
+.tabsBox {
348
+  .el-tabs__item {
349
+    padding: 0 10px;
350
+  }
351
+
352
+  .el-tabs--bottom
353
+    .el-tabs--left
354
+    > .el-tabs__header
355
+    .el-tabs__item:nth-child(2),
356
+  .el-tabs--bottom
357
+    .el-tabs--right
358
+    > .el-tabs__header
359
+    .el-tabs__item:nth-child(2),
360
+  .el-tabs--bottom.el-tabs--border-card
361
+    > .el-tabs__header
362
+    .el-tabs__item:nth-child(2),
363
+  .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2),
364
+  .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2),
365
+  .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2),
366
+  .el-tabs--top.el-tabs--border-card
367
+    > .el-tabs__header
368
+    .el-tabs__item:nth-child(2),
369
+  .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2) {
370
+    padding: 0 10px;
371
+  }
372
+
373
+  .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:last-child,
374
+  .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:last-child,
375
+  .el-tabs--bottom.el-tabs--border-card
376
+    > .el-tabs__header
377
+    .el-tabs__item:last-child,
378
+  .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:last-child,
379
+  .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:last-child,
380
+  .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:last-child,
381
+  .el-tabs--top.el-tabs--border-card
382
+    > .el-tabs__header
383
+    .el-tabs__item:last-child,
384
+  .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:last-child {
385
+    padding: 0 10px;
386
+  }
387
+
388
+  .el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable {
389
+    padding: 0 10px;
390
+  }
391
+}
392
+.centerRight {
393
+  .el-tabs__nav-scroll {
394
+    display: flex;
395
+  }
396
+
397
+  .el-tabs__nav {
398
+    margin: 0 auto;
399
+  }
400
+
401
+  .el-table th .cell,
402
+  .el-table td .cell {
403
+    padding: 0 2px;
404
+  }
405
+}
406
+.preTabs {
407
+  .el-tabs__content {
408
+  }
409
+}
410
+.rightTabs {
411
+  height: 100%;
412
+
413
+  .el-tabs__content {
414
+  }
415
+}
416
+.centerDialog {
417
+  .el-dialog__body {
418
+    max-height: calc(100vh - 100px) !important;
419
+    padding: 0 20px;
420
+  }
421
+}
422
+</style>