huangyw před 2 roky
rodič
revize
d4434089bf

+ 1 - 1
src/store/getters.js Zobrazit soubor

@@ -19,7 +19,7 @@ const getters = {
19 19
   configlist: state => state.data.configlist,
20 20
 
21 21
   dictionary_configlist: state => state.data.dictionary_configlist,
22
-
22
+  pagedata:state => state.pagedata,
23 23
 
24 24
   xt_permission: state => state.xt_permission,
25 25
   xt_user: state => state.xt_user,

+ 8 - 1
src/store/index.js Zobrazit soubor

@@ -14,9 +14,14 @@ import getters from './getters'
14 14
 import data from './modules/data'
15 15
 import temp_params from './modules/temp_params'
16 16
 
17
+import pagedata from './modules/pagedata'
18
+
17 19
 Vue.use(Vuex)
18 20
 
19 21
 const store = new Vuex.Store({
22
+
23
+  mutations:{
24
+  },
20 25
   modules: {
21 26
     app,
22 27
     errorLog,
@@ -28,9 +33,11 @@ const store = new Vuex.Store({
28 33
     xt_permission,
29 34
     xt_role_temps,
30 35
     global_config,
31
-    temp_params
36
+    temp_params,
37
+    pagedata
32 38
   },
33 39
   getters
40
+
34 41
 })
35 42
 
36 43
 // store.dispatch("InitAdminUserInfo")

+ 39 - 0
src/store/modules/pagedata.js Zobrazit soubor

@@ -0,0 +1,39 @@
1
+
2
+const pagedata = {
3
+    state: {
4
+        list:{
5
+        limit: 10,
6
+        page: 1,
7
+        keywords: '',
8
+        start_time: '',
9
+        end_time: '',
10
+        type: '',
11
+        p_type: 2,
12
+        sort_type: '' ,
13
+        patient_id:0
14
+        },
15
+        pagestate:""
16
+        
17
+        
18
+    },
19
+
20
+    mutations: {
21
+        SET_PAGEDATA: (state, pagedata) => {
22
+            state.list = pagedata
23
+            console.log(pagedata,'store里面的pagedata')
24
+        },
25
+        SET_PAGENAME: (state, pagedata) => {
26
+            state.pagestate = pagedata
27
+            console.log(state,'store里面的pagestate')
28
+        },
29
+    },
30
+
31
+    actions: {
32
+        UPDATE_PAGEDATA({commit},param ){
33
+            commit('SET_PAGEDATA',param)
34
+        }
35
+
36
+    }
37
+}
38
+
39
+export default pagedata

+ 4 - 1
src/xt_pages/DepositManagement/DeductionDetailsSummary.vue Zobrazit soubor

@@ -105,5 +105,8 @@ export default {
105 105
   },
106 106
 };
107 107
 </script>
108
-<style>
108
+<style lang="scss" scoped>
109
+/deep/ .el-tabs__header{
110
+margin: 0 0 -15px;
111
+}
109 112
 </style>

+ 11 - 1
src/xt_pages/DepositManagement/DepositRefund.vue Zobrazit soubor

@@ -13,7 +13,7 @@
13 13
               新增
14 14
             </el-button>
15 15
             <el-button size="small" type="primary" @click="pass_exam">
16
-              审核通过
16
+              批量审核
17 17
             </el-button>
18 18
             <el-button size="small" type="warning" @click="reject_exam">
19 19
               审核拒绝
@@ -144,6 +144,12 @@
144 144
           </el-table-column>
145 145
           <el-table-column label="操作" align="center" width="350px">
146 146
             <template slot-scope="scope">
147
+              <el-button
148
+                size="small"
149
+                type="primary"
150
+                @click="examine(scope.row, scope.row.$index)"
151
+              >审核
152
+              </el-button>
147 153
               <el-button
148 154
                 size="small"
149 155
                 type="primary"
@@ -270,6 +276,10 @@ export default {
270 276
         this.search()
271 277
       })
272 278
     },
279
+
280
+    examine(){
281
+
282
+    },
273 283
     updaterefundtype(){
274 284
       console.log("refundtype",this.refundtype)
275 285
     },

+ 4 - 1
src/xt_pages/DepositManagement/RechargeDetailsSummary.vue Zobrazit soubor

@@ -138,5 +138,8 @@ export default {
138 138
   },
139 139
 };
140 140
 </script>
141
-<style>
141
+<style lang="scss" scoped>
142
+/deep/ .el-tabs__header{
143
+margin: 0 0 -15px;
144
+}
142 145
 </style>

+ 2 - 1
src/xt_pages/DepositManagement/Template/RechargeDetails.vue Zobrazit soubor

@@ -256,5 +256,6 @@ export default {
256 256
   },
257 257
 };
258 258
 </script>
259
-<style>
259
+<style lang="scss" scoped>
260
+
260 261
 </style>

+ 3 - 3
src/xt_pages/hospitalStation/invoiceTemplate/printThree.vue Zobrazit soubor

@@ -29,7 +29,7 @@
29 29
           <div  style="position: absolute;left:650px;top:70px;" v-if="insutype == '310'">
30 30
             类别:职工基本医疗保险
31 31
           </div>
32
-          <div  style="position: absolute;left:650px;top:70px;" v-else>
32
+          <div  style="position: absolute;left:400px;top:70px;" v-else>
33 33
             类别:
34 34
           </div>
35 35
         </div>
@@ -156,9 +156,9 @@
156 156
                 </span>
157 157
                 <span v-else>零分</span>
158 158
             </span> -->
159
-            <span style="position: absolute;top:280px;left:190px;letter-spacing: 20px;">{{zhongwen}}</span>
159
+            <span style="position: absolute;top:280px;left:170px;letter-spacing: 15px;">{{zhongwen}}</span>
160 160
             </span>
161
-            <span style="position: absolute;top:280px;left:510px">合计:{{ list.order.medfee_sumamt }}</span>
161
+            <span style="position: absolute;top:280px;left:615px">合计:{{ list.order.medfee_sumamt }}</span>
162 162
         </div>
163 163
 
164 164
 

+ 9 - 1
src/xt_pages/outpatientCharges/components/chargeDialog.vue Zobrazit soubor

@@ -38,7 +38,7 @@
38 38
         <el-form-item class="specialFormItem" >
39 39
           <div style="display:flex;">
40 40
 <!--            这里不要改成el-input,因为使用el-input会导致一个奇怪的bug,千万不要改!!!!!!!!!!!!!!!!!!!!-->
41
-            <input style="" v-model="form.tmp_decimal"  onkeyup="this.value = this.value.replace(/[^\d.]/g,'');" @input="lilili"></input>元
41
+            <input  class="input_style" v-model="form.tmp_decimal"  onkeyup="this.value = this.value.replace(/[^\d.]/g,'');" @input="lilili"></input>元
42 42
           </div>
43 43
         </el-form-item>
44 44
         </span>
@@ -379,4 +379,12 @@
379 379
     width:50%;
380 380
   }
381 381
 }
382
+.input_style {
383
+  border-radius: 5px;
384
+  border: 1px solid #dddddd;
385
+}
386
+.input_style:focus {
387
+outline:none;
388
+border: 1px solid #66b1ff;
389
+}
382 390
 </style>

+ 383 - 242
src/xt_pages/outpatientTool/components/detailStatistics.vue Zobrazit soubor

@@ -1,18 +1,23 @@
1 1
 <template>
2 2
   <div>
3
-    <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
3
+    <div
4
+      style="display: flex; justify-content: space-between; margin-bottom: 10px"
5
+    >
4 6
       <div>
5
-        <el-select size="small" v-model="item_type" placeholder="请选择"
6
-                   style="width:150px;margin-left:10px;" @change="changeItem">
7
-          <el-option
8
-              label="全部"
9
-              value="0">
10
-          </el-option>
7
+        <el-select
8
+          size="small"
9
+          v-model="item_type"
10
+          placeholder="请选择"
11
+          style="width: 150px; margin-left: 10px"
12
+          @change="changeItem"
13
+        >
14
+          <el-option label="全部" value=0> </el-option>
11 15
           <el-option
12
-              v-for="(item,index) in items"
13
-              :key="index"
14
-              :label="item.name"
15
-              :value="item.id">
16
+            v-for="(item, index) in items"
17
+            :key="index"
18
+            :label="item.name"
19
+            :value="item.id"
20
+          >
16 21
           </el-option>
17 22
         </el-select>
18 23
 
@@ -29,109 +34,148 @@
29 34
           class="filter-item"
30 35
           type="primary"
31 36
           @click="searchAction"
32
-        >搜索
37
+          >搜索
33 38
         </el-button>
34 39
         <el-date-picker
35
-            v-model="chargeDate"
36
-            type="daterange"
37
-            value-format="yyyy-MM-dd"
38
-            range-separator="至"
39
-            start-placeholder="开始日期"
40
-            @change="changeDate"
41
-            end-placeholder="结束日期">
40
+          v-model="chargeDate"
41
+          type="daterange"
42
+          value-format="yyyy-MM-dd"
43
+          range-separator="至"
44
+          start-placeholder="开始日期"
45
+          @change="changeDate"
46
+          end-placeholder="结束日期"
47
+        >
42 48
         </el-date-picker>
43
-        <el-button  type="primary" size="small" @click="toPrint">打印</el-button>
44
-      </div>
45
-      <div>
49
+        <el-button type="primary" size="small" @click="toPrint">打印</el-button>
46 50
       </div>
51
+      <div></div>
47 52
     </div>
48
-    <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
49
-              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
50
-              max-height="600"
51
-              show-summary
52
-              v-loading="detail_loading"
53
-              highlight-current-row>
53
+    <el-table
54
+      :data="tableData"
55
+      border
56
+      :row-style="{ color: '#303133' }"
57
+      ref="table"
58
+      :header-cell-style="{
59
+        backgroundColor: 'rgb(245, 247, 250)',
60
+        color: '#606266',
61
+      }"
62
+      max-height="600"
63
+      show-summary
64
+      v-loading="detail_loading"
65
+      highlight-current-row
66
+    >
54 67
       <el-table-column type="index" label="序号" width="60px" align="center">
55 68
         <template slot-scope="scope">
56
-          {{scope.row.index}}
69
+          {{ scope.row.index }}
57 70
         </template>
58 71
       </el-table-column>
59 72
       <el-table-column align="center" label="处方日期">
60
-        <template slot-scope="scope">{{getTime(scope.row.record_date)}}</template>
73
+        <template slot-scope="scope">{{
74
+          getTime(scope.row.record_date)
75
+        }}</template>
61 76
       </el-table-column>
62 77
       <el-table-column align="center" label="费用编码">
63 78
         <template slot-scope="scope">
64
-          {{scope.row.number}}
79
+          {{ scope.row.number }}
65 80
         </template>
66 81
       </el-table-column>
67 82
       <el-table-column align="center" label="项目名称">
68 83
         <template slot-scope="scope">
69
-          <span v-if="scope.row.advice_id > 0">{{scope.row.advice.advice_name}}</span>
84
+          <span v-if="scope.row.advice_id > 0">{{
85
+            scope.row.advice.advice_name
86
+          }}</span>
70 87
           <span v-if="scope.row.project_id > 0">
71
-            <span v-if="scope.row.project.type == 2">{{scope.row.project.project.project_name}}</span>
72
-            <span v-if="scope.row.project.type == 3">{{scope.row.project.good_info.good_name}}</span>
88
+            <span v-if="scope.row.project.type == 2">{{
89
+              scope.row.project.project.project_name
90
+            }}</span>
91
+            <span v-if="scope.row.project.type == 3">{{
92
+              scope.row.project.good_info.good_name
93
+            }}</span>
73 94
           </span>
74 95
         </template>
75 96
       </el-table-column>
76 97
       <el-table-column align="center" label="规格">
77 98
         <template slot-scope="scope">
78
-          <span v-if="scope.row.advice_id > 0">{{scope.row.advice.drug.dose}}{{scope.row.advice.drug.dose_unit}}*{{scope.row.advice.drug.min_number}}{{scope.row.advice.drug.min_unit}}/{{scope.row.advice.drug.max_unit}}</span>
99
+          <span v-if="scope.row.advice_id > 0"
100
+            >{{ scope.row.advice.drug.dose
101
+            }}{{ scope.row.advice.drug.dose_unit }}*{{
102
+              scope.row.advice.drug.min_number
103
+            }}{{ scope.row.advice.drug.min_unit }}/{{
104
+              scope.row.advice.drug.max_unit
105
+            }}</span
106
+          >
79 107
           <span v-if="scope.row.project_id > 0">
80
-            <span v-if="scope.row.project.type == 2">{{scope.row.project.project.project_name}}</span>
81
-            <span v-if="scope.row.project.type == 3">{{scope.row.project.good_info.specification_name}}</span>
108
+            <span v-if="scope.row.project.type == 2">{{
109
+              scope.row.project.project.project_name
110
+            }}</span>
111
+            <span v-if="scope.row.project.type == 3">{{
112
+              scope.row.project.good_info.specification_name
113
+            }}</span>
82 114
           </span>
83 115
         </template>
84 116
       </el-table-column>
85
-      <el-table-column align="center"  label="数量">
117
+      <el-table-column align="center" label="数量">
86 118
         <template slot-scope="scope">
87
-          {{scope.row.cnt}}
119
+          {{ scope.row.cnt }}
88 120
         </template>
89 121
       </el-table-column>
90 122
       <el-table-column align="center" label="单位">
91 123
         <template slot-scope="scope">
92
-          <span v-if="scope.row.advice_id > 0">{{scope.row.advice.prescribing_number_unit}}</span>
124
+          <span v-if="scope.row.advice_id > 0">{{
125
+            scope.row.advice.prescribing_number_unit
126
+          }}</span>
93 127
           <span v-if="scope.row.project_id > 0">
94
-            <span v-if="scope.row.project.type == 2">{{scope.row.project.project.unit}}</span>
95
-            <span v-if="scope.row.project.type == 3">{{scope.row.project.good_info.packing_unit}}</span>
128
+            <span v-if="scope.row.project.type == 2">{{
129
+              scope.row.project.project.unit
130
+            }}</span>
131
+            <span v-if="scope.row.project.type == 3">{{
132
+              scope.row.project.good_info.packing_unit
133
+            }}</span>
96 134
           </span>
97 135
         </template>
98 136
       </el-table-column>
99 137
       <el-table-column align="center" label="单价">
100 138
         <template slot-scope="scope">
101
-          {{scope.row.pric}}
139
+          {{ scope.row.pric }}
102 140
         </template>
103 141
       </el-table-column>
104 142
       <el-table-column align="center" label="金额" prop="total_price">
105 143
         <template slot-scope="scope">
106 144
           <div>
107
-            {{scope.row.total_price}}
145
+            {{ scope.row.total_price }}
108 146
           </div>
109 147
         </template>
110 148
       </el-table-column>
111 149
       <el-table-column align="center" prop="name" label="备注">
112 150
         <template slot-scope="scope">
113 151
           <div>
114
-            <span v-if="scope.row.advice_id > 0">{{scope.row.advice.remark}}</span>
152
+            <span v-if="scope.row.advice_id > 0">{{
153
+              scope.row.advice.remark
154
+            }}</span>
115 155
             <span v-if="scope.row.project_id > 0">
116
-              <span v-if="scope.row.project.type == 2">{{scope.row.project.remark}}</span>
117
-              <span v-if="scope.row.project.type == 3">{{scope.row.project.remark}}</span>
156
+              <span v-if="scope.row.project.type == 2">{{
157
+                scope.row.project.remark
158
+              }}</span>
159
+              <span v-if="scope.row.project.type == 3">{{
160
+                scope.row.project.remark
161
+              }}</span>
118 162
             </span>
119 163
           </div>
120 164
         </template>
121 165
       </el-table-column>
122
-     
123 166
     </el-table>
124
-    <div style="display:flex;justify-content: space-around;margin-top: 25px;">
125
-      <div>总费用:{{getAllPice()}}</div>
126
-     <div>个人支付:
127
-        <span v-if="his_record_patient.balance_accounts_type == 2">{{getAllPice()}}</span>
128
-        <span v-if="his_record_patient.balance_accounts_type != 2">{{getActPay()}}</span>
129
-    </div>
130
-     <div>基金支付记账:{{getFundPaySumamt()}}</div>
131
-     <div>补充医疗支付记账:{{getHifesPay()}}</div>
132
-    <div>救助支付金额:{{getMafPay()}}</div>
167
+    <div style="display: flex; justify-content: space-around; margin-top: 25px">
168
+      <div>总费用:{{ getAllPice() }}</div>
169
+      <div>
170
+        个人支付: <span v-if="his_patient.balance_accounts_type == 2"></span>
171
+        {{ getAllPice() }}
172
+        <span v-if="his_patient.balance_accounts_type != 2"></span>
173
+        {{ getActPay() }}
174
+      </div>
175
+      <div>基金支付记账:{{ getFundPaySumamt() }}</div>
176
+      <div>补充医疗支付记账:{{ getHifesPay() }}</div>
177
+      <div>救助支付金额:{{ getMafPay() }}</div>
133 178
     </div>
134
-    
135 179
   </div>
136 180
 
137 181
   <!-- </div> -->
@@ -139,262 +183,359 @@
139 183
 
140 184
 
141 185
 <script>
142
-import BreadCrumb from '@/xt_pages/components/bread-crumb'
143
-import { getHisSummaryDetailList } from '@/api/his/his_tools'
144
-const moment = require('moment')
145
-import { uParseTime } from '@/utils/tools'
186
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
187
+import { getHisSummaryDetailList } from "@/api/his/his_tools";
188
+const moment = require("moment");
189
+import { uParseTime } from "@/utils/tools";
146 190
 export default {
147 191
   components: {
148
-    BreadCrumb
149
-
192
+    BreadCrumb,
150 193
   },
151 194
   props: {
152 195
     patient_id: {
153 196
       type: Number,
154
-      default: 0
155
-    }
197
+      default: 0,
198
+    },
156 199
   },
157 200
 
158 201
   data() {
159
-
160 202
     return {
161 203
       detail_loading: false,
162 204
       tempArr: [],
163 205
       pos: 0,
164
-      search_input: '',
206
+      search_input: "",
165 207
 
166 208
       sameRowArr: [],
167
-      keywords: '',
209
+      keywords: "",
168 210
       tableData: [],
169
-      chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
170
-      item_type: '0',
211
+      chargeDate: [
212
+        moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
213
+        moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
214
+      ],
215
+      item_type: "0",
171 216
       items: [
172
-        { id: 1, name: '药品' },
173
-        { id: 2, name: '项目' },
174
-        { id: 3, name: '耗材' },
175
-
217
+        { id: 1, name: "药品" },
218
+        { id: 2, name: "项目" },
219
+        { id: 3, name: "耗材" },
176 220
       ],
177
-      list:[],
178
-      his_patient:{},
179
-      id:0,
180
-      start_time:"",
181
-      end_time:"",
182
-      his_record_patient:{},
183
-      orderList:[],
184
-    }
221
+      list: [],
222
+      his_patient: {},
223
+      id: 0,
224
+      start_time: "",
225
+      end_time: "",
226
+    };
185 227
   },
186 228
   methods: {
187 229
     getTime(val) {
188
-      if(val <= 0){
189
-        return ""
230
+      if (val <= 0) {
231
+        return "";
232
+      }
233
+      if (val == "") {
234
+        return "";
235
+      } else {
236
+        return uParseTime(val, "{y}-{m}-{d}");
190 237
       }
191
-      if(val == ""){
192
-      return ""
193
-      }else {
194
-      return uParseTime(val, '{y}-{m}-{d}')
238
+    },
239
+    searchAction() {
240
+      let table_id = this.$store.getters.pagedata.list.table_id;
241
+      if (table_id == undefined) {
242
+        this.$store.commit("SET_PAGEDATA", {
243
+          table_id: 0,
244
+          type_id: this.id,
245
+          keywords: this.keywords,
246
+          start_time: this.chargeDate[0],
247
+          end_time: this.chargeDate[1],
248
+          patient_id: this.patient_id,
249
+        });
250
+      } else {
251
+        this.$store.commit("SET_PAGEDATA", {
252
+          table_id: table_id,
253
+          type_id: this.id,
254
+          keywords: this.keywords,
255
+          start_time: this.chargeDate[0],
256
+          end_time: this.chargeDate[1],
257
+          patient_id: this.patient_id,
258
+        });
195 259
       }
196
-     },
197
-    searchAction(){
198
-     this.getHisSummaryDetailList()
260
+      this.getHisSummaryDetailList();
199 261
     },
200 262
     changeDate() {
201
-      this.start_time = this.chargeDate[0]
202
-      this.end_time = this.chargeDate[1]
203
-      this.getHisSummaryDetailList()
263
+      this.start_time = this.chargeDate[0];
264
+      this.end_time = this.chargeDate[1];
265
+      this.getHisSummaryDetailList();
204 266
     },
205 267
     changeItem(id) {
206
-      this.id = id
207
-      this.getHisSummaryDetailList()
208
- 
268
+      this.id = id;
269
+      let table_id = this.$store.getters.pagedata.list.table_id;
270
+      if (table_id == undefined) {
271
+        this.$store.commit("SET_PAGEDATA", {
272
+          table_id: 0,
273
+          type_id: this.id,
274
+          keywords: this.keywords,
275
+          start_time: this.chargeDate[0],
276
+          end_time: this.chargeDate[1],
277
+          patient_id: this.patient_id,
278
+        });
279
+      } else {
280
+        this.$store.commit("SET_PAGEDATA", {
281
+          table_id: table_id,
282
+          type_id: this.id,
283
+          keywords: this.keywords,
284
+          start_time: this.chargeDate[0],
285
+          end_time: this.chargeDate[1],
286
+          patient_id: this.patient_id,
287
+        });
288
+      }
289
+      this.getHisSummaryDetailList();
209 290
     },
210 291
     getHisSummaryDetailList() {
211
-      let start_time = this.chargeDate[0]
212
-      let end_time = this.chargeDate[1]
213
-      
292
+      let start_time = this.chargeDate[0];
293
+      let end_time = this.chargeDate[1];
214 294
       let params = {
215
-        patient_id:this.patient_id,
295
+        patient_id: this.patient_id,
216 296
         start_time: start_time,
217 297
         end_time: end_time,
218 298
         type: this.item_type,
219
-        keyword: this.keywords
220
-      }
221
-     getHisSummaryDetailList(params).then(response=>{
222
-       if(response.data.state == 1){
223
-          var list =  response.data.data.list
224
-          this.his_patient = response.data.data.his_patient
225
-          this.his_record_patient = response.data.data.his_record_patient
226
-          console.log("his_record_patient",this.his_record_patient)
227
-
228
-          this.orderList = response.data.data.orderList
229
-          console.log("orderlist2332322333232323232",this.orderList)
230
-          this.list = list
231
-          this.tableData = []
232
-          for(let i=0;i<list.length;i++){
233
-            for(let j=0;j<list[i].orders.length;j++){
234
-              for(let z=0;z<list[i].orders[j].order_info.length;z++){
235
-                  list[i].orders[j].order_info[z].record_date = list[i].orders[j].settle_accounts_date
236
-                  list[i].orders[j].order_info[z].number = list[i].orders[j].number
237
-                  this.tableData.push(list[i].orders[j].order_info[z])
238
-               }
299
+        keyword: this.keywords,
300
+      };
301
+      getHisSummaryDetailList(params).then((response) => {
302
+        if (response.data.state == 1) {
303
+          var list = response.data.data.list;
304
+          this.his_patient = response.data.data.his_patient;
305
+          this.list = list;
306
+          this.tableData = [];
307
+          for (let i = 0; i < list.length; i++) {
308
+            for (let j = 0; j < list[i].orders.length; j++) {
309
+              for (let z = 0; z < list[i].orders[j].order_info.length; z++) {
310
+                list[i].orders[j].order_info[z].record_date =
311
+                  list[i].orders[j].settle_accounts_date;
312
+                list[i].orders[j].order_info[z].number =
313
+                  list[i].orders[j].number;
314
+                this.tableData.push(list[i].orders[j].order_info[z]);
315
+              }
239 316
             }
240 317
           }
241
-          var obj = {index:"合计",total_price:0,record_date:"0"}
242
-          for(let i=0;i<this.tableData.length;i++){
243
-            this.tableData[i].index = i+1
244
-            this.tableData[i].total_price = 0
245
-            this.tableData[i].total_price = (this.tableData[i].cnt * this.tableData[i].pric).toFixed(2)
246
-            obj.total_price += (this.tableData[i].cnt * this.tableData[i].pric)  
318
+
319
+          var obj = { index: "合计", total_price: 0, record_date: "0" };
320
+          for (let i = 0; i < this.tableData.length; i++) {
321
+            this.tableData[i].index = i + 1;
322
+            this.tableData[i].total_price = 0;
323
+            this.tableData[i].total_price = (
324
+              this.tableData[i].cnt * this.tableData[i].pric
325
+            ).toFixed(2);
326
+            obj.total_price += this.tableData[i].cnt * this.tableData[i].pric;
247 327
           }
248
-          obj.total_price = (obj.total_price).toFixed(2)
249
-          
250
-          var new_arr = []
251
-           
252
-        
253
-          if(this.keywords!=""){
254
-            for(let i=0;i<this.tableData.length;i++){
255
-              if(this.tableData[i].index!="合计"){
256
-                if(this.tableData[i].advice_id > 0){
257
-                  if(this.tableData[i].advice.advice_name.indexOf(this.keywords) > -1){
258
-                  new_arr.push(this.tableData[i])
259
-                }
328
+          obj.total_price = obj.total_price.toFixed(2);
329
+
330
+          var new_arr = [];
331
+
332
+          let list_1 = this.$store.getters.pagedata.list;
333
+          if (list_1.keywords == undefined) {
334
+            this.keywords = "";
335
+          } else {
336
+            this.keywords = list_1.keywords;
337
+          }
338
+          this.id = list_1.type_id;
339
+          this.item_type = this.id
340
+
341
+          if (this.keywords != "") {
342
+            for (let i = 0; i < this.tableData.length; i++) {
343
+              if (this.tableData[i].index != "合计") {
344
+                if (this.tableData[i].advice_id > 0) {
345
+                  if (
346
+                    this.tableData[i].advice.advice_name.indexOf(
347
+                      this.keywords
348
+                    ) > -1
349
+                  ) {
350
+                    new_arr.push(this.tableData[i]);
351
+                  }
260 352
                 }
261
-                if(this.tableData[i].project_id >0){
262
-                  if(this.tableData[i].project.type == 2){
263
-                    if(this.tableData[i].project.project.project_name.indexOf(this.keywords) > -1){
264
-                        new_arr.push(this.tableData[i])
353
+                if (this.tableData[i].project_id > 0) {
354
+                  if (this.tableData[i].project.type == 2) {
355
+                    if (
356
+                      this.tableData[i].project.project.project_name.indexOf(
357
+                        this.keywords
358
+                      ) > -1
359
+                    ) {
360
+                      new_arr.push(this.tableData[i]);
265 361
                     }
266 362
                   }
267
-                  if(this.tableData[i].project.type == 3){
268
-                    if(this.tableData[i].project.good_info.good_name.indexOf(this.keywords)> - 1){
269
-                      new_arr.push(this.tableData[i])   
363
+                  if (this.tableData[i].project.type == 3) {
364
+                    if (
365
+                      this.tableData[i].project.good_info.good_name.indexOf(
366
+                        this.keywords
367
+                      ) > -1
368
+                    ) {
369
+                      new_arr.push(this.tableData[i]);
270 370
                     }
271 371
                   }
272 372
                 }
273 373
               }
274 374
             }
275
-            var objs = {index:"合计",total_price:0,record_date:"0"}
276
-            objs.total_price = this.getPrice(new_arr)
277
-            this.tableData = new_arr
375
+            var objs = { index: "合计", total_price: 0, record_date: "0" };
376
+            objs.total_price = this.getPrice(new_arr);
377
+            this.tableData = new_arr;
278 378
           }
279 379
 
280
-           if(this.id == 1){
281
-              var obj = {index:"合计",total_price:0,record_date:"0"}
282
-              var new_arr = []
283
-              for(let i=0;i<this.tableData.length;i++){
284
-                if(this.tableData[i].index!="合计"){
285
-                  if(this.tableData[i].advice_id > 0){
286
-                    new_arr.push(this.tableData[i])
287
-                  }
288
-                } 
380
+          if (this.id == 1) {
381
+            var obj = { index: "合计", total_price: 0, record_date: "0" };
382
+            var new_arr = [];
383
+            for (let i = 0; i < this.tableData.length; i++) {
384
+              if (this.tableData[i].index != "合计") {
385
+                if (this.tableData[i].advice_id > 0) {
386
+                  new_arr.push(this.tableData[i]);
387
+                }
289 388
               }
290
-              this.tableData = []
291
-              obj.total_price = this.getPrice(new_arr)
292
-              // new_arr.push(obj)
293
-              this.tableData = new_arr
294
-           }
295
-          if(this.id == 2){
296
-            var obj = {index:"合计",total_price:0,record_date:"0"}
297
-            var new_arr = []
298
-            for(let i=0;i<this.tableData.length;i++){
299
-              if(this.tableData[i].index!="合计"){
300
-                if(this.tableData[i].project_id > 0){
301
-                  if(this.tableData[i].project.type ==2){
302
-                    new_arr.push(this.tableData[i])
389
+            }
390
+            this.tableData = [];
391
+            obj.total_price = this.getPrice(new_arr);
392
+            this.tableData = new_arr;
393
+          }
394
+          if (this.id == 2) {
395
+            var obj = { index: "合计", total_price: 0, record_date: "0" };
396
+            var new_arr = [];
397
+            for (let i = 0; i < this.tableData.length; i++) {
398
+              if (this.tableData[i].index != "合计") {
399
+                if (this.tableData[i].project_id > 0) {
400
+                  if (this.tableData[i].project.type == 2) {
401
+                    new_arr.push(this.tableData[i]);
303 402
                   }
304 403
                 }
305
-              } 
306
-            }
307
-           
308
-            this.tableData = []
309
-            obj.total_price = this.getPrice(new_arr)
310
-           
311
-            this.tableData = new_arr
404
+              }
312 405
             }
406
+            this.tableData = [];
407
+            obj.total_price = this.getPrice(new_arr);
408
+            this.tableData = new_arr;
409
+          }
313 410
 
314
-          if(this.id == 3){
315
-            var new_arr = []
316
-            var obj = {index:"合计",total_price:0,record_date:"0"}
317
-            for(let i=0;i<this.tableData.length;i++){
318
-              if(this.tableData[i].index!="合计"){
319
-                if(this.tableData[i].project_id > 0){
320
-                  if(this.tableData[i].project.type == 3){
321
-                    new_arr.push(this.tableData[i])
411
+          if (this.id == 3) {
412
+            var new_arr = [];
413
+            var obj = { index: "合计", total_price: 0, record_date: "0" };
414
+            for (let i = 0; i < this.tableData.length; i++) {
415
+              if (this.tableData[i].index != "合计") {
416
+                if (this.tableData[i].project_id > 0) {
417
+                  if (this.tableData[i].project.type == 3) {
418
+                    new_arr.push(this.tableData[i]);
322 419
                   }
323 420
                 }
324
-              } 
421
+              }
325 422
             }
326
-            this.tableData = []
327
-            obj.total_price = this.getPrice(new_arr)
328
-            this.tableData = new_arr
329
-          }      
330
-          
331
-         
332
-       }
333
-     })
423
+            this.tableData = [];
424
+            obj.total_price = this.getPrice(new_arr);
425
+            this.tableData = new_arr;
426
+          }
427
+        }
428
+      });
334 429
     },
335
-    getAllPice(){
336
-      var total_price = 0
337
-      for(let i=0;i<this.tableData.length;i++){
338
-        total_price += this.tableData[i].pric * this.tableData[i].cnt
430
+
431
+    getAllPice() {
432
+      var total_price = 0;
433
+      for (let i = 0; i < this.tableData.length; i++) {
434
+        total_price += this.tableData[i].pric * this.tableData[i].cnt;
339 435
       }
340
-      return total_price.toFixed(2)
436
+      return total_price.toFixed(2);
341 437
     },
342
-    getActPay(){
343
-      var act_pay = 0
344
-      for(let i=0;i<this.orderList.length;i++){
345
-         act_pay += this.orderList[i].psn_part_amt
438
+    getActPay() {
439
+      var act_pay = 0;
440
+      for (let i = 0; i < this.list.length; i++) {
441
+        for (let j = 0; j < this.list[i].orders.length; j++) {
442
+          act_pay += this.list[i].orders[j].acct_pay;
443
+        }
346 444
       }
347 445
       return act_pay.toFixed(2)
348 446
     },
349
-    getFundPaySumamt(){
350
-      var fund_pay_sumamt = 0
351
-      for(let i=0;i<this.list.length;i++){
352
-        for(let j=0;j<this.list[i].orders.length;j++){
353
-           fund_pay_sumamt +=this.list[i].orders[j].fund_pay_sumamt
447
+    getFundPaySumamt() {
448
+      var fund_pay_sumamt = 0;
449
+      for (let i = 0; i < this.list.length; i++) {
450
+        for (let j = 0; j < this.list[i].orders.length; j++) {
451
+          fund_pay_sumamt += this.list[i].orders[j].fund_pay_sumamt;
354 452
         }
355 453
       }
356
-      return fund_pay_sumamt
454
+      return fund_pay_sumamt;
357 455
     },
358
-    getHifesPay(){
359
-      var hifes_pay = 0
360
-      for(let i=0;i<this.list.length;i++){
361
-        for(let j=0;j<this.list[i].orders.length;j++){
362
-          hifes_pay +=this.list[i].orders[j].hifes_pay
456
+    getHifesPay() {
457
+      var hifes_pay = 0;
458
+      for (let i = 0; i < this.list.length; i++) {
459
+        for (let j = 0; j < this.list[i].orders.length; j++) {
460
+          hifes_pay += this.list[i].orders[j].hifes_pay;
363 461
         }
364 462
       }
365
-      return hifes_pay
463
+      return hifes_pay;
366 464
     },
367
-    getMafPay(){
368
-      var maf_pay = 0
369
-      for(let i=0;i<this.list.length;i++){
370
-        for(let j=0;j<this.list[i].orders.length;j++){
371
-          maf_pay +=this.list[i].orders[j].maf_pay
465
+    getMafPay() {
466
+      var maf_pay = 0;
467
+      for (let i = 0; i < this.list.length; i++) {
468
+        for (let j = 0; j < this.list[i].orders.length; j++) {
469
+          maf_pay += this.list[i].orders[j].maf_pay;
372 470
         }
373 471
       }
374
-      return maf_pay
472
+      return maf_pay;
375 473
     },
376
-    toPrint(){
377
-      this.$router.push({path:"/hisTool/detailPrint?patient_id="+this.patient_id+"&start_time="+this.start_time+"&end_time="+this.end_time+"&type="+this.item_type +"&keyword="+this.keywords+"&id="+this.id+"&balance_accounts_type="+this.his_patient.balance_accounts_type})
474
+    toPrint() {
475
+      this.$router.push({
476
+        path:
477
+          "/hisTool/detailPrint?patient_id=" +
478
+          this.patient_id +
479
+          "&start_time=" +
480
+          this.start_time +
481
+          "&end_time=" +
482
+          this.end_time +
483
+          "&type=" +
484
+          this.item_type +
485
+          "&keyword=" +
486
+          this.keywords +
487
+          "&id=" +
488
+          this.id +
489
+          "&balance_accounts_type=" +
490
+          this.his_patient.balance_accounts_type,
491
+      });
492
+
493
+      // ======打印时将查询参数保存至store中======
494
+      // table_id: 左栏表格下标
495
+      // type_id: 下拉框id
496
+      // keywords: 输入框
497
+      // start_time: this.chargeDate[0],
498
+      // end_time: this.chargeDate[1],
499
+      // patient_id:this.patient_id
500
+      let table_id = this.$store.getters.pagedata.list.table_id;
501
+      if (table_id == undefined) {
502
+        this.$store.commit("SET_PAGEDATA", {
503
+          table_id: 0,
504
+          type_id: this.id,
505
+          keywords: this.keywords,
506
+          start_time: this.chargeDate[0],
507
+          end_time: this.chargeDate[1],
508
+          patient_id: this.patient_id,
509
+        });
510
+      } else {
511
+        this.$store.commit("SET_PAGEDATA", {
512
+          table_id: table_id,
513
+          type_id: this.id,
514
+          keywords: this.keywords,
515
+          start_time: this.chargeDate[0],
516
+          end_time: this.chargeDate[1],
517
+          patient_id: this.patient_id,
518
+        });
519
+      }
378 520
     },
379
-    getPrice(val){
380
-      var total_price = 0
381
-      for(let i=0;i<val.length;i++){
382
-         total_price += val[i].cnt * val[i].pric
521
+    getPrice(val) {
522
+      var total_price = 0;
523
+      for (let i = 0; i < val.length; i++) {
524
+        total_price += val[i].cnt * val[i].pric;
383 525
       }
384
-      return total_price.toFixed(2)
385
-    }
386
-
526
+      return total_price.toFixed(2);
527
+    },
387 528
   },
388 529
   created() {
389
-    this.start_time = this.chargeDate[0]
390
-    this.end_time = this.chargeDate[1]
391
-    this.getHisSummaryDetailList()
530
+    this.start_time = this.chargeDate[0];
531
+    this.end_time = this.chargeDate[1];
532
+    this.getHisSummaryDetailList();
533
+  },
534
+  watch: {
535
+    patient_id: function () {
536
+      this.patient_id = this.patient_id;
537
+      this.getHisSummaryDetailList();
538
+    },
392 539
   },
393
-  watch:{
394
-    "patient_id":function(){
395
-      this.patient_id = this.patient_id
396
-      this.getHisSummaryDetailList()
397
-    }
398
-  }
399
-}
540
+};
400 541
 </script>

Diff nebyl zobrazen, protože je příliš veliký
+ 1019 - 1095
src/xt_pages/outpatientTool/components/gatherStatistics.vue


+ 74 - 27
src/xt_pages/outpatientTool/statistics.vue Zobrazit soubor

@@ -10,7 +10,13 @@
10 10
     >
11 11
       <div class="mainLeft">
12 12
         <div>
13
-          <div style="margin:10px 0;display: flex;justify-content: space-between;">
13
+          <div
14
+            style="
15
+              margin: 10px 0;
16
+              display: flex;
17
+              justify-content: space-between;
18
+            "
19
+          >
14 20
             <el-input
15 21
               size="small"
16 22
               style="width: 130px"
@@ -28,6 +34,8 @@
28 34
           </div>
29 35
 
30 36
           <el-table
37
+            :row-class-name="tableRowClassName"
38
+            @row-click="onRowClick"
31 39
             :data="patientTableData"
32 40
             :height="tableHeight"
33 41
             border
@@ -81,6 +89,7 @@ export default {
81 89
   },
82 90
   data() {
83 91
     return {
92
+      currentRowIndex: 0,
84 93
       patientTableData: [],
85 94
       tableHeight: 400,
86 95
       crumbs: [
@@ -92,25 +101,38 @@ export default {
92 101
       keywords: "",
93 102
     };
94 103
   },
104
+
105
+  // beforeRouteEnter(to, from, next){
106
+  //     if(from.path == '/hisTool/detailPrint'){
107
+  //       next((vm) => {
108
+  //         vm.titleType = "明细"
109
+  //       })
110
+  //     }else if(from.path == '/hisTool/gatherPrint'){
111
+  //       vm.titleType = "汇总"
112
+  //       next((vm) => {
113
+  //         vm.titleType = "汇总"
114
+  //       })
115
+  //     }else{
116
+  //       next()
117
+  //     }
118
+  // },
119
+
95 120
   //判断列表页是否刷新
96
-  beforeRouteEnter(to, from, next) {
97
-    console.log(from, "beforeRouteEnter");
98
-    if (from.path == "/hisTool/detailPrint") {
99
-      next((vm) => {
100
-        vm.patient_id = vm.$store.getters.pagedata.list.patient_id;
101
-        // setTimeout(() => {
102
-        //   vm.getHisOrderList();
103
-        // },300)
104
-        
105
-      });
121
+  beforeRouteLeave(to, from, next) {
122
+    console.log(to, "beforeRouteEnter");
123
+    if (to.path != "/hisTool/detailPrint"&&to.path != "/hisTool/gatherPrint") {
124
+      this.$store.getters.pagedata.list.table_id = 0
125
+      next()
106 126
     } else {
107
-      next((vm) => {
108
-        vm.getPatientList()
109
-        // setTimeout(() => {
110
-        //   vm.getHisOrderList();
111
-        // },300)
112
-        
113
-      });
127
+     next()
128
+    }
129
+  },
130
+
131
+  watch:{
132
+    'titleType':{
133
+      handler(val){
134
+        this.$store.commit('SET_PAGENAME',val)
135
+      }
114 136
     }
115 137
   },
116 138
 
@@ -126,32 +148,57 @@ export default {
126 148
         } else {
127 149
           this.patientTableData = response.data.data.patient;
128 150
           this.patient_id = this.patientTableData[0].id;
129
-
130
-          this.$refs.singleTable.setCurrentRow(this.patientTableData[0]);
151
+          if (this.$store.getters.pagedata.list.table_id == 0) {
152
+            this.$refs.singleTable.setCurrentRow(this.patientTableData[0]);
153
+          } else {
154
+            this.$refs.singleTable.setCurrentRow(
155
+              this.patientTableData[
156
+                this.$store.getters.pagedata.list.table_id
157
+              ]
158
+            );
159
+          }
131 160
         }
132 161
       });
133 162
     },
163
+
164
+    tableRowClassName({ row, rowIndex }) {
165
+      row.row_index = rowIndex;
166
+    },
167
+
168
+    onRowClick(row, event, column) {
169
+      this.currentRowIndex = row.row_index;
170
+      console.log(this.currentRowIndex, "this.currentRowIndex");
171
+      this.$store.commit("SET_PAGEDATA", {
172
+        table_id: this.currentRowIndex,
173
+      });
174
+      console.log(this.$store.getters.pagedata.list.table_id, "kk");
175
+    },
134 176
     searchAction() {
135 177
       this.getPatientList();
136 178
     },
137
-    handleCurrentChange(row,index) {
179
+    handleCurrentChange(row) {
138 180
       this.patient_id = row.id;
181
+      // console.log(this.patientTableData[this.currentRowIndex],'this.tableData[this.currentRowIndex]')
182
+      //  this.$refs.singleTable.setCurrentRow(this.tableData[this.currentRowIndex])
139 183
       // this.$refs.child.getHisSummaryDetailList()
140 184
       // this.$refs.childOne.getGatherDetailList()
141
-      // this.$store.commit("SET_PAGEDATA",{
142
-      //   patient_id: row.id,
143
-      // })
144
-      console.log(index,'po')
145 185
     },
146 186
   },
147 187
   created() {
188
+
189
+    let type = this.$store.getters.pagedata.pagestate
190
+    if(type == ""){
191
+      this.titleType = "明细"
192
+    }else{
193
+      this.titleType = type
194
+    }
148 195
     const tableHeight = document.body.clientHeight - 290;
149 196
     this.tableHeight = tableHeight;
150 197
     this.getPatientList();
198
+    
151 199
   },
152 200
 
153
-  mounted() {},
154
-  watch: {},
201
+  mounted() {}
155 202
 };
156 203
 </script>
157 204