Browse Source

修改提示框

csx 6 years ago
parent
commit
45e0127f8f
29 changed files with 332 additions and 277 deletions
  1. 4 0
      src/xt_pages/stock/Dialog/salesReturnDialog.vue
  2. 3 0
      src/xt_pages/stock/Dialog/stockInDialog.vue
  3. 2 2
      src/xt_pages/stock/cancelStockOrder.vue
  4. 2 2
      src/xt_pages/stock/cancelStockOrderAdd.vue
  5. 2 2
      src/xt_pages/stock/cancelStockOrderDetail.vue
  6. 2 2
      src/xt_pages/stock/cancelStockOrderEdit.vue
  7. 2 4
      src/xt_pages/stock/detail/cancelStockDetail.vue
  8. 2 4
      src/xt_pages/stock/detail/salesReturnDetail.vue
  9. 2 4
      src/xt_pages/stock/detail/stockInDetail.vue
  10. 2 4
      src/xt_pages/stock/detail/stockOutDetail.vue
  11. 1 1
      src/xt_pages/stock/otherCancelStockOrder.vue
  12. 1 1
      src/xt_pages/stock/otherSalesReturnOrder.vue
  13. 1 1
      src/xt_pages/stock/otherStockInOrder.vue
  14. 1 1
      src/xt_pages/stock/otherStockOutOrder.vue
  15. 1 1
      src/xt_pages/stock/salesReturnOrder.vue
  16. 2 2
      src/xt_pages/stock/salesReturnOrderAdd.vue
  17. 2 2
      src/xt_pages/stock/salesReturnOrderDetail.vue
  18. 1 1
      src/xt_pages/stock/stockDetail.vue
  19. 1 1
      src/xt_pages/stock/stockInOrder.vue
  20. 2 2
      src/xt_pages/stock/stockInOrderAdd.vue
  21. 2 2
      src/xt_pages/stock/stockInOrderDetail.vue
  22. 2 2
      src/xt_pages/stock/stockInOrderEdit.vue
  23. 1 1
      src/xt_pages/stock/stockOutOrder.vue
  24. 2 2
      src/xt_pages/stock/stockOutOrderAdd.vue
  25. 2 2
      src/xt_pages/stock/stockOutOrderDetail.vue
  26. 2 2
      src/xt_pages/stock/stockOutOrderEdit.vue
  27. 2 2
      src/xt_pages/stock/stockQuery.vue
  28. 16 8
      src/xt_pages/user/components/PatientForm.vue
  29. 267 219
      src/xt_pages/user/rescueRecord.vue

+ 4 - 0
src/xt_pages/stock/Dialog/salesReturnDialog.vue View File

@@ -29,6 +29,7 @@
29 29
           border
30 30
           ref="multipleTable"
31 31
           max-height="250"
32
+          @row-click="clickRow"
32 33
           @selection-change="changeGoodInfoTableData"
33 34
           @select-all="changeAllGoodInfoTableData"
34 35
           row-key="row_key"
@@ -163,6 +164,9 @@
163 164
         this.multipleSelection = val
164 165
       }, changeAllGoodInfoTableData: function(val) {
165 166
         this.multipleSelection = val
167
+      },clickRow:function(row) {
168
+        this.$refs.multipleTable.toggleRowSelection(row)
169
+
166 170
       }
167 171
     }
168 172
   }

+ 3 - 0
src/xt_pages/stock/Dialog/stockInDialog.vue View File

@@ -29,6 +29,7 @@
29 29
           border
30 30
           ref="multipleTable"
31 31
           max-height="250"
32
+          @row-click="clickRow"
32 33
           @selection-change="changeGoodInfoTableData"
33 34
           @select-all="changeAllGoodInfoTableData"
34 35
           row-key="row_key"
@@ -175,6 +176,8 @@
175 176
         this.multipleSelection = val
176 177
       }, changeAllGoodInfoTableData: function(val) {
177 178
         this.multipleSelection = val
179
+      },clickRow:function(row) {
180
+        this.$refs.multipleTable.toggleRowSelection(row)
178 181
       }
179 182
     }
180 183
   }

+ 2 - 2
src/xt_pages/stock/cancelStockOrder.vue View File

@@ -12,7 +12,7 @@
12 12
 
13 13
 
14 14
       <div class="cell clearfix" >
15
-        <el-input style="width: 300px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
15
+        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
16 16
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
17 17
       </div>
18 18
 
@@ -162,7 +162,7 @@
162 162
       return {
163 163
         crumbs: [
164 164
           { path: false, name: '库存管理' },
165
-          { path: '/stock/cancel', name: '出库退库单' }
165
+          { path: false, name: '出库退库单' }
166 166
         ],
167 167
         searchKey:'',
168 168
         type: 1,

+ 2 - 2
src/xt_pages/stock/cancelStockOrderAdd.vue View File

@@ -142,8 +142,8 @@
142 142
       return {
143 143
         crumbs: [
144 144
           { path: false, name: '库存管理' },
145
-          { path: '/stock/return', name: '退库单' },
146
-          { path: '/stock/return/add', name: '新增退库单' }
145
+          { path: false, name: '退库单' },
146
+          { path: false, name: '新增退库单' }
147 147
         ],
148 148
 
149 149
         type: this.$route.query.type,

+ 2 - 2
src/xt_pages/stock/cancelStockOrderDetail.vue View File

@@ -82,8 +82,8 @@
82 82
       return {
83 83
         crumbs: [
84 84
           { path: false, name: '库存管理' },
85
-          { path: '/stock/cancel', name: '退库单' },
86
-          { path: '/stock/cancel/add', name: '退库单详情' }
85
+          { path: false, name: '退库单' },
86
+          { path: false, name: '退库单详情' }
87 87
         ],
88 88
         isEdit: 0,
89 89
         checked: false,

+ 2 - 2
src/xt_pages/stock/cancelStockOrderEdit.vue View File

@@ -117,8 +117,8 @@
117 117
       return {
118 118
         crumbs: [
119 119
           { path: false, name: '库存管理' },
120
-          { path: '/stock/cancel', name: '退库单' },
121
-          { path: '/stock/cancel/detail', name: '编辑退库单' }
120
+          { path: false, name: '退库单' },
121
+          { path: false, name: '编辑退库单' }
122 122
         ],
123 123
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
124 124
         warehousing_time: '',

+ 2 - 4
src/xt_pages/stock/detail/cancelStockDetail.vue View File

@@ -1,8 +1,7 @@
1 1
 <template>
2
-  <div class="main-contain">
3
-    <div class="app-container">
2
+    <div>
4 3
       <div class="cell clearfix" >
5
-        <el-input style="width: 300px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
4
+        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
6 5
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
7 6
       </div>
8 7
 
@@ -105,7 +104,6 @@
105 104
 
106 105
       </el-row>
107 106
     </div>
108
-  </div>
109 107
 </template>
110 108
 
111 109
 <script>

+ 2 - 4
src/xt_pages/stock/detail/salesReturnDetail.vue View File

@@ -1,8 +1,7 @@
1 1
 <template>
2
-  <div class="main-contain">
3
-    <div class="app-container">
2
+    <div>
4 3
       <div class="cell clearfix" >
5
-        <el-input style="width: 300px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
4
+        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
6 5
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
7 6
       </div>
8 7
 
@@ -108,7 +107,6 @@
108 107
 
109 108
       </el-row>
110 109
     </div>
111
-  </div>
112 110
 </template>
113 111
 
114 112
 <script>

+ 2 - 4
src/xt_pages/stock/detail/stockInDetail.vue View File

@@ -1,8 +1,7 @@
1 1
 <template>
2
-  <div class="main-contain">
3
-    <div class="app-container">
2
+    <div>
4 3
       <div class="cell clearfix">
5
-        <el-input style="width: 300px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
4
+        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
6 5
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
7 6
       </div>
8 7
 
@@ -114,7 +113,6 @@
114 113
 
115 114
       </el-row>
116 115
     </div>
117
-  </div>
118 116
 </template>
119 117
 
120 118
 <script>

+ 2 - 4
src/xt_pages/stock/detail/stockOutDetail.vue View File

@@ -1,8 +1,7 @@
1 1
 <template>
2
-  <div class="main-contain">
3
-    <div class="app-container">
2
+    <div>
4 3
       <div class="cell clearfix" >
5
-        <el-input style="width: 300px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
4
+        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
6 5
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
7 6
       </div>
8 7
 
@@ -118,7 +117,6 @@
118 117
 
119 118
       </el-row>
120 119
     </div>
121
-  </div>
122 120
 </template>
123 121
 
124 122
 <script>

+ 1 - 1
src/xt_pages/stock/otherCancelStockOrder.vue View File

@@ -11,7 +11,7 @@
11 11
     <div class="app-container">
12 12
 
13 13
       <div class="cell clearfix">
14
-        <el-input style="width: 300px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
14
+        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
15 15
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
16 16
       </div>
17 17
 

+ 1 - 1
src/xt_pages/stock/otherSalesReturnOrder.vue View File

@@ -172,7 +172,7 @@
172 172
         searchKey:'',
173 173
         crumbs: [
174 174
           { path: false, name: '库存管理' },
175
-          { path: '/stock/return', name: '其他退货单' }
175
+          { path: false, name: '其他退货单' }
176 176
         ],
177 177
         type: 2,
178 178
         page: 1,

+ 1 - 1
src/xt_pages/stock/otherStockInOrder.vue View File

@@ -166,7 +166,7 @@
166 166
         searchKey:'',
167 167
         crumbs: [
168 168
           { path: false, name: '库存管理' },
169
-          { path: '/stock/in/other', name: '其他入库单' }
169
+          { path: false, name: '其他入库单' }
170 170
         ],
171 171
         page: 1,
172 172
         limit: 7,

+ 1 - 1
src/xt_pages/stock/otherStockOutOrder.vue View File

@@ -163,7 +163,7 @@ export default {
163 163
     return {
164 164
       crumbs: [
165 165
         { path: false, name: "库存管理" },
166
-        { path: "/stock/out", name: "其他出库单" }
166
+        { path: false, name: "其他出库单" }
167 167
       ],
168 168
       searchKey:'',
169 169
       page: 1,

+ 1 - 1
src/xt_pages/stock/salesReturnOrder.vue View File

@@ -167,7 +167,7 @@
167 167
         searchKey:'',
168 168
         crumbs: [
169 169
           { path: false, name: '库存管理' },
170
-          { path: '/stock/return', name: '退货单' }
170
+          { path: false, name: '退货单' }
171 171
         ],
172 172
         type: 1,
173 173
         page: 1,

+ 2 - 2
src/xt_pages/stock/salesReturnOrderAdd.vue View File

@@ -148,8 +148,8 @@
148 148
       return {
149 149
         crumbs: [
150 150
           { path: false, name: '库存管理' },
151
-          { path: '/stock/return', name: '退回单' },
152
-          { path: '/stock/return/add', name: '新增退货单' }
151
+          { path: false, name: '退回单' },
152
+          { path: false, name: '新增退货单' }
153 153
         ],
154 154
 
155 155
         type: this.$route.query.type,

+ 2 - 2
src/xt_pages/stock/salesReturnOrderDetail.vue View File

@@ -82,8 +82,8 @@
82 82
       return {
83 83
         crumbs: [
84 84
           { path: false, name: '库存管理' },
85
-          { path: '/stock/return', name: '退货单' },
86
-          { path: '/stock/return/detail', name: '退货单详情' }
85
+          { path: false, name: '退货单' },
86
+          { path: false, name: '退货单详情' }
87 87
         ],
88 88
         isEdit: 0,
89 89
         checked: false,

+ 1 - 1
src/xt_pages/stock/stockDetail.vue View File

@@ -12,7 +12,7 @@
12 12
 
13 13
 
14 14
       <div class="cell clearfix" >
15
-        <el-input style="width: 300px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
15
+        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
16 16
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
17 17
       </div>
18 18
 

+ 1 - 1
src/xt_pages/stock/stockInOrder.vue View File

@@ -165,7 +165,7 @@
165 165
 
166 166
         crumbs: [
167 167
           { path: false, name: '库存管理' },
168
-          { path: '/stock/in', name: '入库单' }
168
+          { path: false, name: '入库单' }
169 169
         ],
170 170
         searchKey:'',
171 171
         type: 1,

+ 2 - 2
src/xt_pages/stock/stockInOrderAdd.vue View File

@@ -221,8 +221,8 @@
221 221
       return {
222 222
         crumbs: [
223 223
           { path: false, name: '库存管理' },
224
-          { path: '/stock/in', name: '入库单' },
225
-          { path: '/stock/in/add', name: '新增入库单' }
224
+          { path: false, name: '入库单' },
225
+          { path: false, name: '新增入库单' }
226 226
         ],
227 227
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
228 228
         warehousing_time: '',

+ 2 - 2
src/xt_pages/stock/stockInOrderDetail.vue View File

@@ -122,8 +122,8 @@
122 122
       return {
123 123
         crumbs: [
124 124
           { path: false, name: '库存管理' },
125
-          { path: '/stock/in', name: '入库单' },
126
-          { path: '/stock/in/detail', name: '入库单详情' }
125
+          { path: false, name: '入库单' },
126
+          { path: false, name: '入库单详情' }
127 127
         ],
128 128
         isEdit: 0,
129 129
         checked: false,

+ 2 - 2
src/xt_pages/stock/stockInOrderEdit.vue View File

@@ -195,8 +195,8 @@ export default {
195 195
       return {
196 196
         crumbs: [
197 197
           { path: false, name: '库存管理' },
198
-          { path: '/stock/in', name: '入库单' },
199
-          { path: '/stock/in/detail', name: '编辑入库单' }
198
+          { path: false, name: '入库单' },
199
+          { path: false, name: '编辑入库单' }
200 200
         ],
201 201
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
202 202
         warehousing_time: '',

+ 1 - 1
src/xt_pages/stock/stockOutOrder.vue View File

@@ -163,7 +163,7 @@ export default {
163 163
       searchKey:"",
164 164
       crumbs: [
165 165
         { path: false, name: "库存管理" },
166
-        { path: "/stock/out", name: "出库单" }
166
+        { path: false, name: "出库单" }
167 167
       ],
168 168
       page: 1,
169 169
       limit: 7,

+ 2 - 2
src/xt_pages/stock/stockOutOrderAdd.vue View File

@@ -168,8 +168,8 @@
168 168
       return {
169 169
         crumbs: [
170 170
           { path: false, name: '库存管理' },
171
-          { path: '/stock/out', name: '出库单' },
172
-          { path: '/stock/out/add', name: '新增出库单' }
171
+          { path: false, name: '出库单' },
172
+          { path: false, name: '新增出库单' }
173 173
         ],
174 174
         type: this.$route.query.type,
175 175
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',

+ 2 - 2
src/xt_pages/stock/stockOutOrderDetail.vue View File

@@ -108,8 +108,8 @@
108 108
       return {
109 109
         crumbs: [
110 110
           { path: false, name: '库存管理' },
111
-          { path: '/stock/out', name: '出库单' },
112
-          { path: '/stock/out/detail', name: '出库单详情' }
111
+          { path: false, name: '出库单' },
112
+          { path: false, name: '出库单详情' }
113 113
         ],
114 114
         isEdit: 0,
115 115
         checked: false,

+ 2 - 2
src/xt_pages/stock/stockOutOrderEdit.vue View File

@@ -143,8 +143,8 @@
143 143
       return {
144 144
         crumbs: [
145 145
           { path: false, name: '库存管理' },
146
-          { path: '/stock/out', name: '出库单' },
147
-          { path: '/stock/out/detail', name: '编辑出库单' }
146
+          { path: false, name: '出库单' },
147
+          { path: false, name: '编辑出库单' }
148 148
         ],
149 149
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
150 150
 

+ 2 - 2
src/xt_pages/stock/stockQuery.vue View File

@@ -23,7 +23,7 @@
23 23
         </el-table-column>
24 24
         <el-table-column label="入库数量" align="center" >
25 25
           <template slot-scope="scope">
26
-            <span @click="showStockInDetailDialog(scope.row.good_id)" style="color: blue">{{stockInCount(scope.row)}}</span>
26
+            <span @click="showStockInDetailDialog(scope.row.good_id)" style="color: #579ef8">{{stockInCount(scope.row)}}</span>
27 27
           </template>
28 28
         </el-table-column>
29 29
         <el-table-column label="入库退货" align="center">
@@ -39,7 +39,7 @@
39 39
         </el-table-column>
40 40
         <el-table-column label="出库数量" align="center">
41 41
           <template slot-scope="scope">
42
-            <span @click="showStockOutDetailDialog(scope.row.good_id)" style="color: blue">{{stockOutCount(scope.row)}}</span>
42
+            <span @click="showStockOutDetailDialog(scope.row.good_id)" style="color: #579ef8">{{stockOutCount(scope.row)}}</span>
43 43
 
44 44
           </template>
45 45
         </el-table-column>

+ 16 - 8
src/xt_pages/user/components/PatientForm.vue View File

@@ -1,6 +1,7 @@
1 1
 <template>
2 2
 <div class="main-contain">
3 3
   <div class="position">
4
+    <bread-crumb v-if="!isEdit" :crumbs='crumbs'></bread-crumb>
4 5
 
5 6
     <div class="" style="float:right;">
6 7
        <el-button @click="$router.back(-1)" icon="el-icon-refresh" size="small">取消</el-button>
@@ -20,13 +21,22 @@
20 21
                   <el-input v-model="form.name" ></el-input>
21 22
               </el-form-item>
22 23
             </el-col>
24
+            <el-col :span="8" :style="isEdit?'width:360px':''" style="height:59px;" >
25
+              <el-form-item label="性别 : " class="is-required" prop="gender" >
26
+                <el-radio-group v-model="form.gender" @change="changeGender">
27
+                  <el-radio v-for="item in sexOptions" :key="item.value" :label="item.value" :value="item.value" >{{item.label}}</el-radio>
28
+                </el-radio-group>
29
+              </el-form-item>
30
+            </el-col>
31
+
32
+
23 33
             <el-col :span="8" :style="isEdit?'width:360px':''">
24 34
               <el-form-item label="身份证号 : "  class="is-required" prop="idCardNo" >
25 35
                   <el-input v-model="form.idCardNo" @blur="checkIdCardNo" ></el-input>
26 36
               </el-form-item>
27 37
             </el-col>
28 38
 
29
-            <template v-if="this.isEdit">
39
+            <template v-if="isEdit">
30 40
               <!-- <el-col  :span="8" :style="isEdit?'width:360px':''">
31 41
                 <el-form-item label="患者类型 : " class="is-required" >
32 42
                   <el-select v-model="form.patientType"  placeholder="请选择患者类型" disabled >
@@ -49,13 +59,7 @@
49 59
                   </el-select>
50 60
                 </el-form-item>
51 61
               </el-col> -->
52
-              <el-col :span="8" :style="isEdit?'width:360px':''" style="height:59px;" >
53
-                <el-form-item label="性别 : " class="is-required" prop="gender" >
54
-                  <el-radio-group v-model="form.gender" @change="changeGender">
55
-                    <el-radio v-for="item in sexOptions" :key="item.value" :label="item.value" :value="item.value" >{{item.label}}</el-radio>
56
-                  </el-radio-group>
57
-                </el-form-item>
58
-              </el-col>
62
+
59 63
               <el-col :span="8" >
60 64
                 <el-form-item label="透析号 : " class="is-required" prop="dialysisNo" >
61 65
                     <el-input v-model="form.dialysisNo" placeholder="填写或自动生成" style="width:62%;float:left;margin-right: 2%;" ></el-input>
@@ -488,6 +492,10 @@ export default {
488 492
     }
489 493
 
490 494
     return {
495
+      crumbs:[
496
+        {path:false, name:'病人管理'},
497
+        {path:false, name:'新增病人'},
498
+      ],
491 499
       generic_info_fold: true,
492 500
       treat_info_fold: true,
493 501
 

+ 267 - 219
src/xt_pages/user/rescueRecord.vue View File

@@ -1,267 +1,315 @@
1 1
 <template>
2
-    <div class="patient-container">
3
-        <patient-sidebar :id="patient_id" defaultActive="1-5"></patient-sidebar>
4
-        <div class="container" v-loading="loading">
5
-            <div>
2
+  <div class="patient-container">
3
+    <patient-sidebar :id="patient_id" defaultActive="1-5"></patient-sidebar>
4
+    <div v-loading="loading">
5
+      <div class="patient-app-container advice-container app-container">
6
+
7
+        <div>
6 8
                 <span style="margin-left: 10px;float:right;">
7
-                    <el-button size="small" icon="el-icon-circle-plus-outline" type="primary" @click="show_dialog = true">新增</el-button>
8
-                    <el-button size="small" icon="el-icon-delete" v-show="selectingRows.length > 0" type="danger" @click="deleteAction">删除</el-button>
9
+                    <el-button size="small" icon="el-icon-circle-plus-outline" type="primary"
10
+                               @click="show_dialog = true">新增</el-button>
11
+                    <el-button size="small" icon="el-icon-delete" v-show="selectingRows.length > 0" type="danger"
12
+                               @click="deleteAction">删除</el-button>
9 13
                 </span>
10
-                <span class="filter_title">日期查询</span>
11
-                <el-date-picker size="small" v-model="date" type="daterange" range-separator="至" start-placeholde="开始日期" end-placeholde="结束日期" value-format="timestamp" :clearable="false" @change="requestRescueRecords()"></el-date-picker>
12
-            </div>
13
-            <div class="record">
14
-                <el-row :gutter="15">
15
-                    <el-col :span="10">
16
-                        <el-table :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}" ref="record_table" :data="records" border highlight-current-row @current-change="didChangeCurrentRecord" @selection-change="didSelectionChange">
17
-                            <el-table-column type="selection" width="40" align="center"></el-table-column>
18
-                            <el-table-column label="记录时间" align="center">
19
-                                <template slot-scope="scope">
20
-                                    {{ recordTime(scope.row.record_time) }}
21
-                                </template>
22
-                            </el-table-column>
23
-                            <el-table-column label="记录医生" align="center">
24
-                                <template slot-scope="scope">
25
-                                    {{ doctorName(scope.row.recorder) }}
26
-                                </template>
27
-                            </el-table-column>
28
-                        </el-table>
29
-                    </el-col>
30
-                    <el-col :span="14">
31
-                        <div class="record_content_panel">
32
-                            <div class="title">抢救内容</div>
33
-                            <div class="content">
34
-                                {{ current_select_record == null ? "" : current_select_record.content }}
35
-                            </div>
36
-                        </div>
37
-                    </el-col>
38
-                </el-row>
39
-            </div>
14
+          <!--<span class="filter_title">日期查询</span>-->
15
+          <!--<el-date-picker size="small" v-model="date" type="daterange" range-separator="至" start-placeholde="开始日期" end-placeholde="结束日期" value-format="timestamp" :clearable="false" @change="requestRescueRecords()"></el-date-picker>-->
16
+        </div>
17
+        <div class="cell clearfix">
18
+          <label class="title"><span class="name">日期查询</span> : </label>
19
+          <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
+                          type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
+                          value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
22
+          <span class="">-</span>
23
+          <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
24
+                          type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
25
+                          value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
26
+        </div>
27
+        <div class="record">
28
+          <el-row :gutter="15">
29
+            <el-col :span="10">
30
+              <el-table :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}" ref="record_table" :data="records"
31
+                        border highlight-current-row @current-change="didChangeCurrentRecord"
32
+                        @selection-change="didSelectionChange">
33
+                <el-table-column type="selection" width="40" align="center"></el-table-column>
34
+                <el-table-column label="记录时间" align="center">
35
+                  <template slot-scope="scope">
36
+                    {{ recordTime(scope.row.record_time) }}
37
+                  </template>
38
+                </el-table-column>
39
+                <el-table-column label="记录医生" align="center">
40
+                  <template slot-scope="scope">
41
+                    {{ doctorName(scope.row.recorder) }}
42
+                  </template>
43
+                </el-table-column>
44
+              </el-table>
45
+            </el-col>
46
+            <el-col :span="14">
47
+              <div class="record_content_panel">
48
+                <div class="title">抢救内容</div>
49
+                <div class="content">
50
+                  {{ current_select_record == null ? '' : current_select_record.content }}
51
+                </div>
52
+              </div>
53
+            </el-col>
54
+          </el-row>
40 55
         </div>
56
+      </div>
41 57
 
42
-        <el-dialog title="新增抢救记录" width="40%" top="5vh" :visible.sync="show_dialog">
43
-            <div>
44
-                <div class="new_record_form">
45
-                    <diV>
46
-                        <span class="filter_title">日常抢救:</span>
47
-                        <el-select v-model="select_template" placeholder="可选择抢救模板"  @change="didSelectTemplate">
48
-                            <el-option v-for="(option, index) in templates" :key="index" :label="option.title" :value="option.content"></el-option>
49
-                        </el-select>
50
-                    </diV>
51
-                    <div class="textarea_panel">
52
-                        <el-input v-model="new_content" type="textarea" rows="6" resize="none"></el-input>
53
-                    </div>
58
+      <el-dialog title="新增抢救记录" width="40%" top="5vh" :visible.sync="show_dialog">
59
+        <div>
60
+          <div class="new_record_form">
61
+            <diV>
62
+              <span class="filter_title">日常抢救:</span>
63
+              <el-select v-model="select_template" placeholder="可选择抢救模板" @change="didSelectTemplate">
64
+                <el-option v-for="(option, index) in templates" :key="index" :label="option.title"
65
+                           :value="option.content"></el-option>
66
+              </el-select>
67
+            </diV>
68
+            <div class="textarea_panel">
69
+              <el-input v-model="new_content" type="textarea" rows="6" resize="none"></el-input>
70
+            </div>
54 71
 
55
-                    <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
56
-                        <el-button @click="show_dialog = false">取消</el-button>
57
-                        <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary" @click="createAction" :loading="uploading_new_record">确定</el-button>
58
-                    </div>
59
-                </div>
72
+            <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
73
+              <el-button @click="show_dialog = false">取消</el-button>
74
+              <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary"
75
+                         @click="createAction" :loading="uploading_new_record">确定
76
+              </el-button>
60 77
             </div>
61
-        </el-dialog>
78
+          </div>
79
+        </div>
80
+      </el-dialog>
62 81
     </div>
82
+  </div>
63 83
 </template>
64 84
 
65 85
 <script>
66
-import PatientSidebar from "./components/PatientSidebar"
67
-import { getRescueRecords, createRescueRecord, deleteRescueRecords } from "@/api/patient"
68
-import { parseTime } from "@/utils"
86
+  import PatientSidebar from './components/PatientSidebar'
87
+  import { createRescueRecord, deleteRescueRecords, getRescueRecords } from '@/api/patient'
88
+  import { parseTime } from '@/utils'
69 89
 
70
-export default {
71
-    name: "RescueRecord",
72
-    components: { 
73
-        PatientSidebar 
90
+  export default {
91
+    name: 'RescueRecord',
92
+    components: {
93
+      PatientSidebar
74 94
     },
75 95
     data() {
76
-        return {
77
-            loading: false,
78
-
79
-            patient_id: 0,
80
-            date: [],
96
+      return {
97
+        loading: false,
81 98
 
82
-            records: [],
83
-            doctors: [],
84
-            current_select_record: null,
99
+        patient_id: 0,
100
+        date: [],
101
+        start_time: '',
102
+        end_time: '',
103
+        records: [],
104
+        doctors: [],
105
+        current_select_record: null,
85 106
 
86
-            show_dialog: false,
87
-            uploading_new_record: false,
88
-            templates: this.$store.getters.configlist.rescue_record,
89
-            select_template: [],
90
-            new_content: "",
107
+        show_dialog: false,
108
+        uploading_new_record: false,
109
+        templates: this.$store.getters.configlist.rescue_record,
110
+        select_template: [],
111
+        new_content: '',
91 112
 
92
-            selectingRows: [],
93
-        }
113
+        selectingRows: []
114
+      }
94 115
     },
95 116
     created() {
96
-        this.patient_id = parseInt(this.$route.query.id)
97
-        if (isNaN(this.patient_id) || this.patient_id <= 0) {
98
-            this.$notify.error({
99
-                title: "错误",
100
-                message: "无效的id"
101
-            })
102
-            this.$router.push("/patients/patients")
103
-            return
104
-        }
105
-        var now = new Date()
106
-        this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
117
+      this.patient_id = parseInt(this.$route.query.id)
118
+      if (isNaN(this.patient_id) || this.patient_id <= 0) {
119
+        this.$notify.error({
120
+          title: '错误',
121
+          message: '无效的id'
122
+        })
123
+        this.$router.push('/patients/patients')
124
+        return
125
+      }
126
+      var now = new Date()
127
+      this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
107 128
 
108
-        this.requestRescueRecords()
129
+      var year = new Date().getFullYear()
130
+      var month = new Date().getMonth() + 1
131
+      var day = new Date().getDate()
132
+      if (parseInt(month) < 10) {
133
+        month = '0' + month
134
+      }
135
+      if (parseInt(day) < 10) {
136
+        day = '0' + day
137
+      }
138
+      const endTime = year + '-' + month + '-' + day
139
+      this.end_time = endTime
140
+
141
+      var year = new Date().getFullYear()
142
+      var month = new Date().getMonth()
143
+      var day = new Date().getDate()
144
+      if (parseInt(month) < 10) {
145
+        month = '0' + month
146
+      }
147
+      if (parseInt(day) < 10) {
148
+        day = '0' + day
149
+      }
150
+      const startTime = year + '-' + month + '-' + day
151
+      this.start_time = startTime
152
+
153
+      this.requestRescueRecords()
109 154
     },
110 155
     methods: {
111
-        requestRescueRecords: function() {
112
-            var startTime = new Date(this.date[0])
113
-            var endTime = new Date(this.date[1])
114
-            this.loading = true
115
-            getRescueRecords(this.patient_id, parseTime(startTime, "{y}-{m}-{d}"), parseTime(endTime, "{y}-{m}-{d}")).then(rs => {
116
-                this.loading = false
117
-                var resp = rs.data
118
-                if (resp.state == 1) {
119
-                    this.current_select_record = null
120
-                    this.records = resp.data.records
121
-                    this.doctors = resp.data.doctors
122
-                    
123
-                } else {
124
-                    this.$message.error(resp.msg)
125
-                }
126
-            }).catch(error => {
127
-                this.loading = false
128
-                this.$message.error(error)
129
-            })
130
-        },
156
+      requestRescueRecords: function() {
157
+        var startTime = new Date(this.date[0])
158
+        var endTime = new Date(this.date[1])
159
+        this.loading = true
160
+        getRescueRecords(this.patient_id, this.start_time, this.end_time).then(rs => {
161
+          this.loading = false
162
+          var resp = rs.data
163
+          if (resp.state == 1) {
164
+            this.current_select_record = null
165
+            this.records = resp.data.records
166
+            this.doctors = resp.data.doctors
131 167
 
132
-        didChangeCurrentRecord: function(record) {
133
-            this.current_select_record = record
134
-        },
135
-        recordTime: function(timestamp) {
136
-            var time = new Date(timestamp * 1000)
137
-            return parseTime(time, "{y}-{m}-{d}")
138
-        },
139
-        doctorName: function(doctor_id) {
140
-            for (let index = 0; index < this.doctors.length; index++) {
141
-                const doctor = this.doctors[index];
142
-                if (doctor.id == doctor_id) {
143
-                    return doctor.name
144
-                }
145
-            }
146
-            return ""
147
-        },
168
+          } else {
169
+            this.$message.error(resp.msg)
170
+          }
171
+        }).catch(error => {
172
+          this.loading = false
173
+          this.$message.error(error)
174
+        })
175
+      },
148 176
 
149
-        createAction: function() {
150
-            if (this.new_content.length == 0) {
151
-                this.$message.error("请填写抢救内容")
152
-                return
153
-            }
154
-            this.uploading_new_record = true
155
-            createRescueRecord(this.patient_id, this.new_content).then(rs => {
156
-                this.uploading_new_record = false
157
-                var resp = rs.data
158
-                if (resp.state == 1) {
159
-                    this.records.unshift(resp.data.record)
160
-                    // this.$refs.record_table.setCurrentRow()
161
-                    this.$refs.record_table.setCurrentRow(this.records[0])
162
-                    // this.current_select_record = this.records[0]
163
-                    this.show_dialog = false
164
-                    this.new_content = ""
177
+      didChangeCurrentRecord: function(record) {
178
+        this.current_select_record = record
179
+      },
180
+      recordTime: function(timestamp) {
181
+        var time = new Date(timestamp * 1000)
182
+        return parseTime(time, '{y}-{m}-{d}')
183
+      },
184
+      doctorName: function(doctor_id) {
185
+        for (let index = 0; index < this.doctors.length; index++) {
186
+          const doctor = this.doctors[index]
187
+          if (doctor.id == doctor_id) {
188
+            return doctor.name
189
+          }
190
+        }
191
+        return ''
192
+      },
165 193
 
166
-                } else {
167
-                    this.$message.error(resp.msg)
168
-                }
194
+      createAction: function() {
195
+        if (this.new_content.length == 0) {
196
+          this.$message.error('请填写抢救内容')
197
+          return
198
+        }
199
+        this.uploading_new_record = true
200
+        createRescueRecord(this.patient_id, this.new_content).then(rs => {
201
+          this.uploading_new_record = false
202
+          var resp = rs.data
203
+          if (resp.state == 1) {
204
+            this.records.unshift(resp.data.record)
205
+            // this.$refs.record_table.setCurrentRow()
206
+            this.$refs.record_table.setCurrentRow(this.records[0])
207
+            // this.current_select_record = this.records[0]
208
+            this.show_dialog = false
209
+            this.new_content = ''
169 210
 
170
-            }).catch(error => {
171
-                this.uploading_new_record = false
172
-                this.$message.error(error)
173
-            })
174
-        },
175
-        didSelectTemplate: function(templateContent) {
176
-            this.new_content = this.new_content.length > 0 ? (this.new_content + templateContent) : templateContent
211
+          } else {
212
+            this.$message.error(resp.msg)
213
+          }
177 214
 
178
-            this.select_template = ""
179
-        },
215
+        }).catch(error => {
216
+          this.uploading_new_record = false
217
+          this.$message.error(error)
218
+        })
219
+      },
220
+      didSelectTemplate: function(templateContent) {
221
+        this.new_content = this.new_content.length > 0 ? (this.new_content + templateContent) : templateContent
222
+      },
180 223
 
181
-        didSelectionChange: function(selectRows) {
182
-            this.selectingRows = selectRows
183
-        },
184
-        deleteAction: function() {
185
-            if (this.selectingRows.length == 0) {
186
-                return
187
-            }
188
-            var ids = []
189
-            for (let index = 0; index < this.selectingRows.length; index++) {
190
-                const row = this.selectingRows[index];
191
-                ids.push(row.id)
224
+      didSelectionChange: function(selectRows) {
225
+        this.selectingRows = selectRows
226
+      },
227
+      deleteAction: function() {
228
+        if (this.selectingRows.length == 0) {
229
+          return
230
+        }
231
+        var ids = []
232
+        for (let index = 0; index < this.selectingRows.length; index++) {
233
+          const row = this.selectingRows[index]
234
+          ids.push(row.id)
235
+        }
236
+        var ids_str = ids.join(',')
237
+        this.loading = true
238
+        deleteRescueRecords(this.patient_id, ids_str).then(rs => {
239
+          var resp = rs.data
240
+          if (resp.state == 1) {
241
+            for (let id_index = 0; id_index < ids.length; id_index++) {
242
+              for (let record_index = 0; record_index < this.records.length; record_index++) {
243
+                if (ids[id_index] == this.records[record_index].id) {
244
+                  this.records.splice(record_index, 1)
245
+                  break
246
+                }
247
+              }
192 248
             }
193
-            var ids_str = ids.join(",")
194
-            this.loading = true
195
-            deleteRescueRecords(this.patient_id, ids_str).then(rs => {
196
-                var resp = rs.data
197
-                if (resp.state == 1) {
198
-                    for (let id_index = 0; id_index < ids.length; id_index++) {
199
-                        for (let record_index = 0; record_index < this.records.length; record_index++) {
200
-                            if (ids[id_index] == this.records[record_index].id) {
201
-                                this.records.splice(record_index, 1)
202
-                                break
203
-                            }
204
-                        }
205
-                    }
206
-                    this.selectingRows = []
207
-                    this.$message.success("已删除")
249
+            this.selectingRows = []
250
+            this.$message.success('已删除')
208 251
 
209
-                } else {
210
-                    this.$message.error(resp.msg)
211
-                }
212
-                this.loading = false
213
-            }).catch(err => {
214
-                this.loading = false
215
-                this.$message.error(err)
216
-            })
217
-        },
218
-    },
219
-}
252
+          } else {
253
+            this.$message.error(resp.msg)
254
+          }
255
+          this.loading = false
256
+        }).catch(err => {
257
+          this.loading = false
258
+          this.$message.error(err)
259
+        })
260
+      }, startTimeChange(val) {
261
+        this.requestRescueRecords()
262
+      }, endTimeChange(val) {
263
+        this.requestRescueRecords()
264
+      }
265
+    }
266
+  }
220 267
 </script>
221 268
 
222 269
 <style rel="stylesheet/css" lang="scss" scoped>
223
-.container {
270
+  .container {
224 271
     margin-left: 180px;
225 272
     padding: 20px;
226 273
     background: #fff;
227 274
     min-height: calc(100vh - 173px);
228 275
     margin-bottom: 15px;
229 276
 
230
-    .record {
231
-        padding-top: 20px;
232
-    }
233
-}
277
+  .record {
278
+    padding-top: 20px;
279
+  }
280
+
281
+  }
234 282
 
235
-.record_content_panel {
283
+  .record_content_panel {
236 284
     border-width: 1px;
237 285
     border-style: solid;
238 286
     border-color: #ebeef5;
239 287
     min-height: 200px;
240 288
 
241
-    .title {
242
-        font-size: 14px;
243
-        font-weight: 500;
244
-        color: #909399;
245
-        line-height: 44px;
246
-        height: 44px;
247
-        text-align: center;
248
-        border-bottom-width: 1px;
249
-        border-bottom-style: solid;
250
-        border-bottom-color: #ebeef5;
251
-    }
252
-    .content {
253
-        padding: 12px 15px;
254
-        font-size: 15px;
255
-        color: gray;
256
-        line-height: 22px;
257
-    }
258
-}
289
+  .title {
290
+    font-size: 14px;
291
+    font-weight: 500;
292
+    color: #909399;
293
+    line-height: 44px;
294
+    height: 44px;
295
+    text-align: center;
296
+    border-bottom-width: 1px;
297
+    border-bottom-style: solid;
298
+    border-bottom-color: #ebeef5;
299
+  }
259 300
 
260
-.new_record_form {
261
-    // padding: 10px, 25px;
301
+  .content {
302
+    padding: 12px 15px;
303
+    font-size: 15px;
304
+    color: gray;
305
+    line-height: 22px;
306
+  }
307
+  }
262 308
 
263
-    .textarea_panel {
264
-        margin-top: 10px;
265
-    }
266
-}
309
+  .new_record_form {
310
+  .textarea_panel {
311
+    margin-top: 10px;
312
+  }
313
+
314
+  }
267 315
 </style>