Bladeren bron

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

yq1 7 maanden geleden
bovenliggende
commit
eba91cd406

+ 443 - 0
src/xt_pages/outpatientCharges/components/otherPrescriptionTable.vue Bestand weergeven

1
+<template>
2
+  <div class="prescriptionTable">
3
+    <el-table
4
+      v-if="prescription.type == 1"
5
+      :data="prescription.advices"
6
+      border
7
+      ref="multipleTable"
8
+      height="370"
9
+      style="width: 99%"
10
+      :row-style="changColor"
11
+      :header-cell-style="{
12
+        color: '#606266',
13
+      }"
14
+      highlight-current-row
15
+
16
+    >
17
+      <el-table-column
18
+        fixed
19
+        align="center"
20
+        type="index"
21
+        width="50"
22
+        label="序号"
23
+      ></el-table-column>
24
+      <el-table-column
25
+        fixed
26
+        align="center"
27
+        prop="name"
28
+        width="300"
29
+        label="名称"
30
+      >
31
+        <template slot-scope="scope"
32
+        ><span :title="scope.row.drug_name">{{
33
+            scope.row.drug_name
34
+          }}</span></template
35
+        >
36
+      </el-table-column>
37
+      <el-table-column align="center" prop="name" width="80" label="规格/型号">
38
+        <template slot-scope="scope">
39
+          <div>{{ scope.row.spec }}</div>
40
+        </template>
41
+      </el-table-column>
42
+
43
+      <el-table-column align="center" prop="name" width="80" label="单次用量">
44
+        <template slot-scope="scope">
45
+          <!--<el-input v-model="scope.row.delivery_way" readonly></el-input>-->
46
+          <div>{{ scope.row.single_dose }}{{ scope.row.single_dose_unit }}</div>
47
+        </template>
48
+      </el-table-column>
49
+      <el-table-column align="center" prop="name" width="80" label="用法">
50
+        <template slot-scope="scope">
51
+          <!--<el-input v-model="scope.row.delivery_way" readonly></el-input>-->
52
+          <div>{{ scope.row.delivery_way }}</div>
53
+        </template>
54
+      </el-table-column>
55
+      <el-table-column align="center" prop="name" width="80" label="频率">
56
+        <template slot-scope="scope">
57
+          <div>{{ scope.row.execution_frequency }}</div>
58
+
59
+          <!--<el-input v-model="scope.row.execution_frequency" readonly></el-input>-->
60
+        </template>
61
+      </el-table-column>
62
+
63
+      <el-table-column align="center" prop="day" width="80" label="天数">
64
+        <template slot-scope="scope">{{ scope.row.day }}天</template>
65
+      </el-table-column>
66
+      <el-table-column align="center" prop="name" width="80" label="总量">
67
+        <template slot-scope="scope">{{ scope.row.prescribing_number }}{{scope.row.prescribing_number_unit}}</template>
68
+      </el-table-column>
69
+      <el-table-column align="center" prop="name" width="80" label="单价">
70
+        <template slot-scope="scope">
71
+          <div>{{ scope.row.retail_price }}元</div>
72
+
73
+          <!--<el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>-->
74
+        </template>
75
+      </el-table-column>
76
+
77
+
78
+
79
+      <el-table-column align="center" prop="name" width="220" label="医保编码">
80
+        <template slot-scope="scope">
81
+          <div>{{ scope.row.code }}</div>
82
+        </template>
83
+      </el-table-column>
84
+
85
+      <el-table-column align="center" prop="name" width="60" label="金额">
86
+        <template slot-scope="scope">
87
+          <div>{{ scope.row.det_item_fee_sumamt }}</div>
88
+        </template>
89
+      </el-table-column>
90
+
91
+      <el-table-column align="center" prop="name" width="120" label="生产厂家">
92
+        <template slot-scope="scope">
93
+          <div>{{ getName(scope.row.name_id) }}</div>
94
+        </template>
95
+      </el-table-column>
96
+
97
+      <el-table-column align="center" prop="name" width="90" label="全自费金额">
98
+        <template slot-scope="scope">
99
+          <div>{{ scope.row.fulamt_ownpay_amt }}元</div>
100
+        </template>
101
+      </el-table-column>
102
+
103
+      <el-table-column align="center" prop="name" width="90" label="超限价金额">
104
+        <template slot-scope="scope">
105
+          <div>{{ scope.row.overlmt_amt }}元</div>
106
+        </template>
107
+      </el-table-column>
108
+
109
+      <el-table-column
110
+        align="center"
111
+        prop="name"
112
+        width="90"
113
+        label="先行自付金额"
114
+      >
115
+        <template slot-scope="scope">
116
+          <div>{{ scope.row.preselfpay_amt }}元</div>
117
+        </template>
118
+      </el-table-column>
119
+
120
+      <el-table-column
121
+        align="center"
122
+        prop="name"
123
+        width="130"
124
+        label="符合正常范围金额"
125
+      >
126
+        <template slot-scope="scope">
127
+          <div>{{ scope.row.inscp_scp_amt }}元</div>
128
+        </template>
129
+      </el-table-column>
130
+
131
+      <el-table-column align="center" prop="name" width="50" label="备注">
132
+        <template slot-scope="scope">
133
+          <!--<el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder="" readonly></el-input>-->
134
+          <div>{{ scope.row.remark }}</div>
135
+        </template>
136
+      </el-table-column>
137
+    </el-table>
138
+
139
+    <el-table
140
+      v-if="prescription.type == 2"
141
+      :data="prescription.project"
142
+      border
143
+      height="370"
144
+      ref="multipleTable"
145
+      style="width: 99%"
146
+      :row-style="changColor"
147
+      :header-cell-style="{
148
+        backgroundColor: 'rgb(245, 247, 250)',
149
+        color: '#606266',
150
+      }"
151
+      highlight-current-row
152
+    >
153
+      <el-table-column
154
+        fixed
155
+        align="center"
156
+        type="index"
157
+        width="50"
158
+        label="序号"
159
+      ></el-table-column>
160
+      <el-table-column
161
+        fixed
162
+        align="center"
163
+        prop="project_name"
164
+        width="280"
165
+        label="名称"
166
+      >
167
+        <template slot-scope="scope">{{ scope.row.project_name }}</template>
168
+      </el-table-column>
169
+
170
+      <el-table-column
171
+        align="center"
172
+        prop="statistical_classification"
173
+        width="80"
174
+        label="组"
175
+      >
176
+        <template slot-scope="scope">{{
177
+            scope.row.type == 2
178
+              ? getGroup(scope.row.statistical_classification)
179
+              : "耗材"
180
+          }}</template>
181
+      </el-table-column>
182
+
183
+      <el-table-column align="center" prop="name" width="80" label="规格/型号">
184
+        <template slot-scope="scope">
185
+          <div>{{ scope.row.spec }}</div>
186
+        </template>
187
+      </el-table-column>
188
+
189
+      <el-table-column
190
+        align="center"
191
+        prop="single_dose"
192
+        width="80"
193
+        label="单次用量"
194
+      >
195
+        <template slot-scope="scope"
196
+        >{{ scope.row.single_dose }}{{ scope.row.unit }}</template
197
+        >
198
+      </el-table-column>
199
+
200
+      <el-table-column
201
+        align="center"
202
+        prop="delivery_way"
203
+        width="80"
204
+        label="用法"
205
+      >
206
+        <template slot-scope="scope">{{ scope.row.delivery_way }}</template>
207
+      </el-table-column>
208
+
209
+      <el-table-column
210
+        align="center"
211
+        prop="execution_frequency"
212
+        width="80"
213
+        label="频率"
214
+      >
215
+        <template slot-scope="scope">{{
216
+            scope.row.execution_frequency
217
+          }}</template>
218
+      </el-table-column>
219
+
220
+      <el-table-column
221
+        align="center"
222
+        prop="number_days"
223
+        width="50"
224
+        label="天数"
225
+      >
226
+        <template slot-scope="scope">{{ scope.row.number_days }}天</template>
227
+      </el-table-column>
228
+
229
+      <el-table-column align="center" prop="total" width="50" label="总量">
230
+        <template slot-scope="scope">
231
+          <div>{{ scope.row.total }} {{ scope.row.unit }}</div>
232
+        </template>
233
+      </el-table-column>
234
+
235
+      <el-table-column align="center" prop="name" width="50" label="单价">
236
+        <template slot-scope="scope">{{ scope.row.price }}元</template>
237
+      </el-table-column>
238
+
239
+
240
+      <el-table-column align="center" prop="name" width="220" label="医保编码">
241
+        <template slot-scope="scope">
242
+          <div>{{ scope.row.medical_code }}</div>
243
+        </template>
244
+      </el-table-column>
245
+
246
+
247
+
248
+      <el-table-column align="center" prop="name" width="60" label="金额">
249
+        <template slot-scope="scope">
250
+          <div>{{ scope.row.det_item_fee_sumamt }}元</div>
251
+        </template>
252
+      </el-table-column>
253
+
254
+      <el-table-column align="center" prop="name" width="120" label="生产厂家">
255
+        <template slot-scope="scope">
256
+          <div>{{ getName(scope.row.name_id) }}</div>
257
+        </template>
258
+      </el-table-column>
259
+
260
+      <el-table-column align="center" prop="name" width="90" label="全自费金额">
261
+        <template slot-scope="scope">
262
+          <div>{{ scope.row.fulamt_ownpay_amt }}元</div>
263
+        </template>
264
+      </el-table-column>
265
+
266
+      <el-table-column align="center" prop="name" width="90" label="超限价金额">
267
+        <template slot-scope="scope">
268
+          <div>{{ scope.row.overlmt_amt }}元</div>
269
+        </template>
270
+      </el-table-column>
271
+
272
+      <el-table-column
273
+        align="center"
274
+        prop="name"
275
+        width="90"
276
+        label="先行自付金额"
277
+      >
278
+        <template slot-scope="scope">
279
+          <div>{{ scope.row.preselfpay_amt }}元</div>
280
+        </template>
281
+      </el-table-column>
282
+
283
+      <el-table-column
284
+        align="center"
285
+        prop="name"
286
+        width="130"
287
+        label="符合正常范围金额"
288
+      >
289
+        <template slot-scope="scope">
290
+          <div>{{ scope.row.inscp_scp_amt }}元</div>
291
+        </template>
292
+      </el-table-column>
293
+
294
+      <el-table-column align="center" prop="name" width="50" label="备注">
295
+        <template slot-scope="scope">{{ scope.row.remark }}</template>
296
+      </el-table-column>
297
+    </el-table>
298
+
299
+    <div class="additionalBox">
300
+      <div
301
+        class="additionalOne"
302
+        v-for="(item, index) in prescription.addition"
303
+        :key="index"
304
+      >
305
+        <span :title="item.item_name">{{ item.item_name }}</span>
306
+        <el-input
307
+          v-model="item.price"
308
+          placeholder=""
309
+          style="width: 50px"
310
+          readonly
311
+        ></el-input>
312
+        共
313
+        <el-input
314
+          v-model="item.count"
315
+          placeholder=""
316
+          style="width: 50px"
317
+          readonly
318
+        ></el-input>
319
+        次
320
+        <!--<i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>-->
321
+      </div>
322
+    </div>
323
+  </div>
324
+</template>
325
+
326
+<script>
327
+import { getInitData } from "@/api/his/his";
328
+import { getDictionaryDataConfig } from "@/utils/data";
329
+
330
+export default {
331
+  props: {
332
+    prescription: Object,
333
+    his_patient: Object,
334
+    schedule: Object,
335
+    manufacturers: Array,
336
+  },
337
+  data() {
338
+    return {
339
+      drugways: [],
340
+      efs: [],
341
+    };
342
+  },
343
+  mounted() {
344
+    // getInitData().then(response => {
345
+    //   if (response.data.state == 0) {
346
+    //     this.$message.error(response.data.msg)
347
+    //     return false
348
+    //   } else {
349
+    //     this.drugways = response.data.data.drugways
350
+    //     this.efs = response.data.data.efs
351
+    //   }
352
+    // })
353
+  },
354
+  methods: {
355
+    changColor({ row, rowIndex }) {
356
+      if (rowIndex % 2 == 1) {
357
+        // 变颜色的条件
358
+        return {
359
+          backgroundColor: "#C4E1FF",
360
+          color: "#303133", // 这个return的就是样式 可以是color 也可以是backgroundColor
361
+        };
362
+      } else {
363
+        return {
364
+          backgroundColor: "#ACD6FF",
365
+          color: "#303133",
366
+        };
367
+      }
368
+    },
369
+
370
+    getName(id) {
371
+      let name = "";
372
+      for (let i = 0; i < this.manufacturers.length; i++) {
373
+        if (id == this.manufacturers[i].id) {
374
+          name = this.manufacturers[i].manufacturer_name;
375
+        }
376
+      }
377
+      return name;
378
+    },
379
+    getGroup(id) {
380
+      var name = "";
381
+      var statistics_category = getDictionaryDataConfig(
382
+        "system",
383
+        "statistics_category"
384
+      );
385
+      // console.log("2235", statistics_category);
386
+      for (let i = 0; i < statistics_category.length; i++) {
387
+        if (id == statistics_category[i].id) {
388
+          name = statistics_category[i].name;
389
+        }
390
+      }
391
+      return name;
392
+    },
393
+  },
394
+  watch:{
395
+    prescription:function(){
396
+      this.$nextTick(() => {
397
+        this.$refs.multipleTable.doLayout();
398
+        // table加ref="multipleTable"
399
+      })
400
+    }
401
+  },
402
+  created(){
403
+    console.log('prescription',this.prescription);
404
+  }
405
+};
406
+</script>
407
+
408
+
409
+<style lang="scss">
410
+.prescriptionTable {
411
+.additionalBox {
412
+  margin-top: 20px;
413
+  display: flex;
414
+  flex-wrap: wrap;
415
+.additionalOne {
416
+  margin-right: 20px;
417
+  margin-bottom: 10px;
418
+  display: flex;
419
+  align-items: center;
420
+> span {
421
+  white-space: nowrap;
422
+  overflow: hidden;
423
+  text-overflow: ellipsis;
424
+  width: 80px;
425
+  display: inline-block;
426
+  font-size: 14px;
427
+}
428
+}
429
+.deleteIcon {
430
+  color: red;
431
+  margin-left: 5px;
432
+}
433
+}
434
+.el-table th .cell,
435
+.el-table td .cell {
436
+  padding: 0 2px;
437
+  white-space: pre-line;
438
+}
439
+.el-icon-delete {
440
+  color: red;
441
+}
442
+}
443
+</style>

+ 5 - 5
src/xt_pages/outpatientCharges/listPrint.vue Bestand weergeven

14
     </template>
14
     </template>
15
 
15
 
16
     <div class='dialysisPage' style="padding-top:40px;">
16
     <div class='dialysisPage' style="padding-top:40px;">
17
-      
18
-      <listPrintforu v-if=" org_id != 10106&&org_id != 10215&&org_id != 10265 && org_id!=9675 && org_id!=10485 && org_id != 10191 "
17
+
18
+      <listPrintforu v-if=" org_id != 10106&&org_id != 10215&&org_id != 10265 && org_id!=9675 && org_id!=10485 && org_id != 10191 && org_id != 0"
19
         :list="list" :patient="patient" :order="order" :admin="admin">
19
         :list="list" :patient="patient" :order="order" :admin="admin">
20
       </listPrintforu>
20
       </listPrintforu>
21
       <printOne v-if="org_id == 10191" :list="list" :patient="patient" :order="order" :admin="admin"></printOne>
21
       <printOne v-if="org_id == 10191" :list="list" :patient="patient" :order="order" :admin="admin"></printOne>
23
       <print-three v-if="org_id == 10106 && this.paramsObj.balance_accounts_type == 2" :info="info" :order_infos="order_infos" :p_admin="p_admin" :charge_admin="charge_admin"></print-three>
23
       <print-three v-if="org_id == 10106 && this.paramsObj.balance_accounts_type == 2" :info="info" :order_infos="order_infos" :p_admin="p_admin" :charge_admin="charge_admin"></print-three>
24
 <!--      <list-print-two v-if="org_id == 10215 || org_id==9675" :list="list" :patient="patient" :order="order" :admin="admin"></list-print-two>-->
24
 <!--      <list-print-two v-if="org_id == 10215 || org_id==9675" :list="list" :patient="patient" :order="order" :admin="admin"></list-print-two>-->
25
      <list-print-three v-if="org_id == 10215 || org_id==9675  || org_id ==10485" :list="list" :patient="patient" :order="order" :admin="admin"></list-print-three>
25
      <list-print-three v-if="org_id == 10215 || org_id==9675  || org_id ==10485" :list="list" :patient="patient" :order="order" :admin="admin"></list-print-three>
26
-      <print-two10265  v-if="org_id == 10265 " :list="list" :patient="patient" :order="order" :admin="admin" :hospital_record="hospital_record"></print-two10265>
26
+      <print-two10265  v-if="org_id == 10265 || org_id == 0 " :list="list" :patient="patient" :order="order" :admin="admin" :hospital_record="hospital_record"></print-two10265>
27
     </div>
27
     </div>
28
   </div>
28
   </div>
29
 </template>
29
 </template>
101
             this.$message.error(response.data.msg)
101
             this.$message.error(response.data.msg)
102
             return false
102
             return false
103
           } else {
103
           } else {
104
-            if(this.org_id == 10265){
104
+            if(this.org_id == 10265 || this.org_id == 0){
105
               this.order = response.data.data.order
105
               this.order = response.data.data.order
106
               this.patient = response.data.data.patient
106
               this.patient = response.data.data.patient
107
               this.admin = response.data.data.admin_info
107
               this.admin = response.data.data.admin_info
380
         let drug_ids = []
380
         let drug_ids = []
381
         let project_ids = []
381
         let project_ids = []
382
         console.log('details12121212',details);
382
         console.log('details12121212',details);
383
-        
383
+
384
         for (let i = 0; i < details.length; i++) {
384
         for (let i = 0; i < details.length; i++) {
385
           if (details[i].advice && details[i].advice.id > 0 && details[i].advice.prescription && details[i].advice.prescription.type == 1) { //药品
385
           if (details[i].advice && details[i].advice.id > 0 && details[i].advice.prescription && details[i].advice.prescription.type == 1) { //药品
386
             let obj = {
386
             let obj = {

+ 21 - 7
src/xt_pages/outpatientCharges/listTemplate/printTwo10265.vue Bestand weergeven

13
             ><TD colspan="4" align="center" style="font-size: 20px"
13
             ><TD colspan="4" align="center" style="font-size: 20px"
14
               >{{ $store.getters.xt_user.org.org_name }}费用清单</TD
14
               >{{ $store.getters.xt_user.org.org_name }}费用清单</TD
15
             ></TR>
15
             ></TR>
16
-          
16
+
17
           <TR>
17
           <TR>
18
             <TD colspan="2">个人编码:{{ order.psn_no }}</TD>
18
             <TD colspan="2">个人编码:{{ order.psn_no }}</TD>
19
             <TD colspan="2">住院号:{{ order.mdtrt_id }}</TD>
19
             <TD colspan="2">住院号:{{ order.mdtrt_id }}</TD>
33
             <TD v-if="order && order.insutype == '310'">
33
             <TD v-if="order && order.insutype == '310'">
34
               费别:职工基本医疗保险
34
               费别:职工基本医疗保险
35
             </TD>
35
             </TD>
36
-            <TD></TD>
36
+            <TD> 结算类型:{{order.is_medicine_insurance == 1 ? "医保" : "自费"}} </TD>
37
+          </TR>
38
+          <TR>
39
+            <TD> 就诊流水号:{{ order.mdtrt_id }} </TD>
40
+            <TD>
41
+              透析号:{{patient.dialysis_no}}
42
+            </TD>
43
+            <TD> 总金额:{{ order.medfee_sumamt }} </TD>
44
+            <TD> 个人支付金额:{{ order.psn_part_amt }}</TD>
45
+          </TR>
46
+          <TR>
47
+            <TD>
48
+              基金支付金额:{{ order.fund_pay_sumamt}}
49
+            </TD>
50
+            <TD>收费日期:{{getTimes(order.ctime)}}</TD>
37
           </TR>
51
           </TR>
38
         </THEAD>
52
         </THEAD>
39
         <TBODY style="text-align: center">
53
         <TBODY style="text-align: center">
58
                   <TD width="80">单价(元)</TD>
72
                   <TD width="80">单价(元)</TD>
59
                   <TD width="80">数量</TD>
73
                   <TD width="80">数量</TD>
60
                   <TD width="80">金额(元)</TD>
74
                   <TD width="80">金额(元)</TD>
61
-                  <td width="80">自负比例</td>
75
+<!--                  <td width="80">自负比例</td>-->
62
                 </TR>
76
                 </TR>
63
                 <TR v-for="subItem in item.details" :key="subItem">
77
                 <TR v-for="subItem in item.details" :key="subItem">
64
                   <TD style="white-space: nowrap">{{
78
                   <TD style="white-space: nowrap">{{
76
                   <TD>{{
90
                   <TD>{{
77
                     (subItem.price * subItem.count).toFixed(2)
91
                     (subItem.price * subItem.count).toFixed(2)
78
                   }}</TD>
92
                   }}</TD>
79
-                  <td>
80
-                    {{(subItem.selfpay_prop)*100}}
81
-                    <span v-if="subItem.selfpay_prop !=''">%</span>
82
-                  </td>
93
+<!--                  <td>-->
94
+<!--                    {{(subItem.selfpay_prop)*100}}-->
95
+<!--                    <span v-if="subItem.selfpay_prop !=''">%</span>-->
96
+<!--                  </td>-->
83
                 </TR>
97
                 </TR>
84
                 <TR>
98
                 <TR>
85
                   <TD style="white-space: nowrap"
99
                   <TD style="white-space: nowrap"

+ 21 - 5
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Bestand weergeven

28
           <el-radio-group v-model="radio" @change="changeRadio">
28
           <el-radio-group v-model="radio" @change="changeRadio">
29
             <el-radio :label=1>未收费<span
29
             <el-radio :label=1>未收费<span
30
               style="color: red;margin-bottom:10px;display: inline-block;">{{ cal_one }}</span>人
30
               style="color: red;margin-bottom:10px;display: inline-block;">{{ cal_one }}</span>人
31
-            </el-radio>
31
+            </el-radio>,
32
             <el-radio :label=2>已收费<span
32
             <el-radio :label=2>已收费<span
33
               style="color: red;margin-bottom:10px;display: inline-block;">{{ cal_two }}</span>人
33
               style="color: red;margin-bottom:10px;display: inline-block;">{{ cal_two }}</span>人
34
             </el-radio>
34
             </el-radio>
729
                           </el-tab-pane>
729
                           </el-tab-pane>
730
 
730
 
731
 
731
 
732
-                          <prescription-table ref="prescription_tables"
732
+                          <prescription-table v-if="activeName == 'first' || activeName == 'second'"  ref="prescription_tables"
733
                                               :prescription="items.curPrescriptions"
733
                                               :prescription="items.curPrescriptions"
734
                                               :manufacturers="manufacturers"></prescription-table>
734
                                               :manufacturers="manufacturers"></prescription-table>
735
+                          <other-prescription-table v-if="activeName == 'third'" ref="prescription_tables"
736
+                                                    :prescription="items.curPrescriptions"
737
+                                                    :manufacturers="manufacturers"></other-prescription-table>
735
                           <!--</el-radio-group>-->
738
                           <!--</el-radio-group>-->
736
                         </el-tabs>
739
                         </el-tabs>
737
                       </div>
740
                       </div>
1022
 import NewStatementPrintThree from './newStatementPrintThree.vue'
1025
 import NewStatementPrintThree from './newStatementPrintThree.vue'
1023
 import CallUnAssociationPrescription from './components/callUnAssociationPrescription.vue'
1026
 import CallUnAssociationPrescription from './components/callUnAssociationPrescription.vue'
1024
 import { associationprescription, checkHISPatient } from '../../api/his/his_tools'
1027
 import { associationprescription, checkHISPatient } from '../../api/his/his_tools'
1028
+import OtherPrescriptionTable from './components/otherPrescriptionTable.vue'
1025
 
1029
 
1026
 const moment = require('moment')
1030
 const moment = require('moment')
1027
 export default {
1031
 export default {
1028
   components: {
1032
   components: {
1033
+    OtherPrescriptionTable,
1029
     CallUnAssociationPrescription,
1034
     CallUnAssociationPrescription,
1030
     NewStatementPrintThree,
1035
     NewStatementPrintThree,
1031
     RegisterDialog9504,
1036
     RegisterDialog9504,
1725
           this.newLoading = false
1730
           this.newLoading = false
1726
         })
1731
         })
1727
       } else {
1732
       } else {
1728
-        if((this.org_id == 10644 && this.other_prescriptions[0].med_type == "1112") || (this.org_id == 10644 && this.other_prescriptions[0].med_type == "1111")) {
1733
+        if((this.org_id == 10644 && this.other_prescriptions[0].med_type == "1112") || (this.org_id == 10644 && this.other_prescriptions[0].med_type == "1111") || (this.org_id == 0 && this.other_prescriptions[0].med_type == "1111") || (this.org_id == 0 && this.other_prescriptions[0].med_type == "1112")) {
1729
           upload(form).then(response => {
1734
           upload(form).then(response => {
1730
             if (response.data.state == 0) {
1735
             if (response.data.state == 0) {
1731
               this.$message.error(response.data.msg)
1736
               this.$message.error(response.data.msg)
1748
             this.newLoading = false
1753
             this.newLoading = false
1749
           })
1754
           })
1750
         }else{
1755
         }else{
1751
-
1752
           var that = this
1756
           var that = this
1753
           axios.get('http://127.0.0.1:9532/api/upload/get', {
1757
           axios.get('http://127.0.0.1:9532/api/upload/get', {
1754
             params: form,
1758
             params: form,
3386
 
3390
 
3387
       } else if (index == 5) {
3391
       } else if (index == 5) {
3388
         var that = this
3392
         var that = this
3389
-        if (that.hisPatientInfo.balance_accounts_type == 2) {
3393
+        var balance_accounts_type = that.hisPatientInfo.balance_accounts_type
3394
+        if(that.order.is_medicine_insurance == 1){
3395
+          balance_accounts_type = 1
3396
+        }else{
3397
+          balance_accounts_type = 2
3398
+        }
3399
+
3400
+        if (balance_accounts_type == 2) {
3390
           let params = {
3401
           let params = {
3391
             'order_id': that.order.id,
3402
             'order_id': that.order.id,
3392
             'number': that.order.number,
3403
             'number': that.order.number,
3696
             end_time: this.order.settle_end_time,
3707
             end_time: this.order.settle_end_time,
3697
             balance_accounts_type: this.hisPatientInfo.balance_accounts_type
3708
             balance_accounts_type: this.hisPatientInfo.balance_accounts_type
3698
           }
3709
           }
3710
+          if (this.order.is_medicine_insurance == 1){
3711
+            obj.balance_accounts_type = 1
3712
+          }else{
3713
+            obj.balance_accounts_type = 2
3714
+          }
3699
           this.orderObj = obj
3715
           this.orderObj = obj
3700
 
3716
 
3701
         }
3717
         }

+ 23 - 9
src/xt_pages/outpatientCharges/summary.vue Bestand weergeven

119
 
119
 
120
                     </el-popover> -->
120
                     </el-popover> -->
121
           <el-button
121
           <el-button
122
-            v-if="$store.getters.xt_user.org_id == 10138 || $store.getters.xt_user.org_id == 10278 || $store.getters.xt_user.org_id == 10610"
122
+            size="small" type="primary" @click="query">查询
123
+          </el-button>
124
+          <el-button
125
+            v-if="$store.getters.xt_user.org_id == 10138 || $store.getters.xt_user.org_id == 10278 || $store.getters.xt_user.org_id == 10610 || $store.getters.xt_user.org_id == 0 "
123
             size="small" type="primary" @click="batch_print_settlte">批量打印结算单
126
             size="small" type="primary" @click="batch_print_settlte">批量打印结算单
124
           </el-button>
127
           </el-button>
125
           <el-button size="small" type="primary" @click="export_detail"
128
           <el-button size="small" type="primary" @click="export_detail"
281
 
284
 
282
         <el-table-column align="center" width="90" prop="name" label="收费类型">
285
         <el-table-column align="center" width="90" prop="name" label="收费类型">
283
           <template slot-scope="scope">
286
           <template slot-scope="scope">
284
-            <div v-if="scope.row.his_patient.balance_accounts_type != 2">
287
+            <div v-if="scope.row.is_medicine_insurance == 1">
285
               医保
288
               医保
286
             </div>
289
             </div>
287
-            <div v-if="scope.row.his_patient.balance_accounts_type == 2">
290
+            <div v-if="scope.row.is_medicine_insurance != 1">
288
               自费
291
               自费
289
             </div>
292
             </div>
290
           </template>
293
           </template>
817
   },
820
   },
818
 
821
 
819
   methods: {
822
   methods: {
823
+    query(){
824
+      this.getHisOrderList()
825
+    },
820
     getAge(UUserCard) {
826
     getAge(UUserCard) {
821
       if (UUserCard != null && UUserCard != '') {
827
       if (UUserCard != null && UUserCard != '') {
822
         //获取年龄
828
         //获取年龄
1436
       //   }
1442
       //   }
1437
       //
1443
       //
1438
       // } else {
1444
       // } else {
1445
+      var balance_accounts_type = row.his_patient.balance_accounts_type
1446
+      if (row.is_medicine_insurance == 1){
1447
+        balance_accounts_type = 1
1448
+      }else{
1449
+        balance_accounts_type = 2
1450
+
1451
+      }
1452
+
1439
       this.statementVisible = true
1453
       this.statementVisible = true
1440
       let obj = {
1454
       let obj = {
1441
         order_id: row.id,
1455
         order_id: row.id,
1442
         settle_type: row.settle_type,
1456
         settle_type: row.settle_type,
1443
         start_time: row.settle_start_time,
1457
         start_time: row.settle_start_time,
1444
         end_time: row.settle_end_time,
1458
         end_time: row.settle_end_time,
1445
-        balance_accounts_type: row.his_patient.balance_accounts_type
1459
+        balance_accounts_type:balance_accounts_type
1446
       }
1460
       }
1447
       this.orderObj = obj
1461
       this.orderObj = obj
1448
     },
1462
     },
3639
     changeSortType() {
3653
     changeSortType() {
3640
       this.page = 1
3654
       this.page = 1
3641
       this.keywords = ''
3655
       this.keywords = ''
3642
-      this.getHisOrderList()
3656
+      // this.getHisOrderList()
3643
     },
3657
     },
3644
     changeDoctor() {
3658
     changeDoctor() {
3645
       this.page = 1
3659
       this.page = 1
3646
       this.keywords = ''
3660
       this.keywords = ''
3647
-      this.getHisOrderList()
3661
+      // this.getHisOrderList()
3648
     },
3662
     },
3649
     handleSizeChange(limit) {
3663
     handleSizeChange(limit) {
3650
       this.limit = limit
3664
       this.limit = limit
3657
     handleStartTimeChange() {
3671
     handleStartTimeChange() {
3658
       this.page = 1
3672
       this.page = 1
3659
       this.keywords = ''
3673
       this.keywords = ''
3660
-      this.getHisOrderList()
3674
+      // this.getHisOrderList()
3661
     },
3675
     },
3662
     handleEndTimeChange() {
3676
     handleEndTimeChange() {
3663
       this.page = 1
3677
       this.page = 1
3664
       this.keywords = ''
3678
       this.keywords = ''
3665
-      this.getHisOrderList()
3679
+      // this.getHisOrderList()
3666
     },
3680
     },
3667
     setMonthPrescription(month_prescriptions) {
3681
     setMonthPrescription(month_prescriptions) {
3668
       console.log(month_prescriptions)
3682
       console.log(month_prescriptions)
3950
       //   }
3964
       //   }
3951
       //   this.tableData = arr
3965
       //   this.tableData = arr
3952
       // }
3966
       // }
3953
-      this.getHisOrderList()
3967
+      // this.getHisOrderList()
3954
     },
3968
     },
3955
     getTimes(time) {
3969
     getTimes(time) {
3956
       return uParseTime(time, '{y}-{m}-{d}')
3970
       return uParseTime(time, '{y}-{m}-{d}')

+ 1 - 1
src/xt_pages/outpatientDoctorStation/batch_print_template/batchPrintThree.vue Bestand weergeven

205
                 :src="setAdminUserES(i.info.creator)"
205
                 :src="setAdminUserES(i.info.creator)"
206
                 alt=""
206
                 alt=""
207
                 srcset=""
207
                 srcset=""
208
-                v-else
208
+                 v-if="setAdminUserES(i.info.creator)!=''"
209
               />
209
               />
210
             </div>
210
             </div>
211
             <!-- <div>药品金额:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):0}}</div> -->
211
             <!-- <div>药品金额:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):0}}</div> -->

+ 44 - 5
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue Bestand weergeven

155
                                             <template slot-scope="scope">{{ scope.row.zuobiao_stock_num }}</template>
155
                                             <template slot-scope="scope">{{ scope.row.zuobiao_stock_num }}</template>
156
                                           </el-table-column>
156
                                           </el-table-column>
157
 
157
 
158
-
159
                                           <el-table-column label="规格" width="60" v-if="org_id == 10206 || org_id == 0">
158
                                           <el-table-column label="规格" width="60" v-if="org_id == 10206 || org_id == 0">
160
                                             <template slot-scope="scope">
159
                                             <template slot-scope="scope">
161
                                               <span>{{scope.row.drug_spec}}</span>
160
                                               <span>{{scope.row.drug_spec}}</span>
162
                                             </template>
161
                                             </template>
163
                                           </el-table-column>
162
                                           </el-table-column>
164
-                                            <el-table-column label="单价" width="40">
163
+                                          <el-table-column label="单价" width="40">
165
                                                 <template slot-scope="scope">{{ scope.row.retail_price }}</template>
164
                                                 <template slot-scope="scope">{{ scope.row.retail_price }}</template>
165
+                                           </el-table-column>
166
+
167
+                                            <el-table-column label="库存" width="60" v-if="org_id != 10206" >
168
+                                              <template slot-scope="scope">{{ getSumCount(scope.row.sum_count,scope.row.min_number,scope.row.min_unit,scope.row.max_unit)}}</template>
166
                                             </el-table-column>
169
                                             </el-table-column>
167
                                         </el-table>
170
                                         </el-table>
168
                                     </div>
171
                                     </div>
216
                                                 <template slot-scope="scope">{{ scope.row.type == 3?scope.row.zuobiao_stock_num :""}}</template>
219
                                                 <template slot-scope="scope">{{ scope.row.type == 3?scope.row.zuobiao_stock_num :""}}</template>
217
                                               </el-table-column>
220
                                               </el-table-column>
218
 
221
 
222
+                                           
223
+
219
 
224
 
220
                                                 <el-table-column label="规格" width="60">
225
                                                 <el-table-column label="规格" width="60">
221
                                                     <template slot-scope="scope">{{ scope.row.single_dose }}</template>
226
                                                     <template slot-scope="scope">{{ scope.row.single_dose }}</template>
223
                                                 <el-table-column label="单价" width="40">
228
                                                 <el-table-column label="单价" width="40">
224
                                                     <template slot-scope="scope">{{ scope.row.price }}</template>
229
                                                     <template slot-scope="scope">{{ scope.row.price }}</template>
225
                                                 </el-table-column>
230
                                                 </el-table-column>
231
+                                               
232
+                                                <el-table-column label="库存" width="60" v-if="org_id != 10206" >
233
+                                                <template slot-scope="scope">
234
+                                                  <span v-if="scope.row.type == 3">{{scope.row.sum_count}}</span> 
235
+                                                </template>
236
+                                              </el-table-column>
237
+                                                
226
                                             </el-table>
238
                                             </el-table>
227
                                         </div>
239
                                         </div>
228
                                     </el-tab-pane>
240
                                     </el-tab-pane>
818
             return false
830
             return false
819
           } else {
831
           } else {
820
             this.drugs = response.data.data.drugs
832
             this.drugs = response.data.data.drugs
833
+            console.log("drugs------------------------",this.drugs)
821
             if (this.org_id == 10206) {
834
             if (this.org_id == 10206) {
822
               for (let i = 0; i < this.zuobiao_drug.length; i++) {
835
               for (let i = 0; i < this.zuobiao_drug.length; i++) {
823
                 for (let b = 0; b < this.drugs.length; b++) {
836
                 for (let b = 0; b < this.drugs.length; b++) {
2185
         getHisProject().then(response => {
2198
         getHisProject().then(response => {
2186
           if (response.data.state == 1) {
2199
           if (response.data.state == 1) {
2187
             var project = response.data.data.project
2200
             var project = response.data.data.project
2201
+            
2188
             for (let i = 0; i < project.length; i++) {
2202
             for (let i = 0; i < project.length; i++) {
2189
               let obj = {
2203
               let obj = {
2190
                 id: project[i].id,
2204
                 id: project[i].id,
2204
                 number: "",
2218
                 number: "",
2205
                 bbx01:project[i].bbx01,
2219
                 bbx01:project[i].bbx01,
2206
                 bby01:project[i].bby01,
2220
                 bby01:project[i].bby01,
2207
-
2221
+                sum_count:""
2208
 
2222
 
2209
               }
2223
               }
2210
 
2224
 
2212
             }
2226
             }
2213
 
2227
 
2214
             var good_info = response.data.data.good_info
2228
             var good_info = response.data.data.good_info
2215
-
2229
+            console.log("good_info000000000000000000000",good_info)
2216
             for (let i = 0; i < good_info.length; i++) {
2230
             for (let i = 0; i < good_info.length; i++) {
2217
               let obj = {
2231
               let obj = {
2218
                 id: good_info[i].id,
2232
                 id: good_info[i].id,
2232
                 number: good_info[i].good_number,
2246
                 number: good_info[i].good_number,
2233
                 bbx01:good_info[i].bbx01,
2247
                 bbx01:good_info[i].bbx01,
2234
                 bby01:good_info[i].bby01,
2248
                 bby01:good_info[i].bby01,
2235
-
2249
+                sum_count:good_info[i].sum_count
2236
 
2250
 
2237
               }
2251
               }
2238
               this.tabProject.push(obj)
2252
               this.tabProject.push(obj)
2561
 
2575
 
2562
           }
2576
           }
2563
         })
2577
         })
2578
+      },
2579
+      getSumCount(total,min_number,min_unit,max_unit){
2580
+          var min_str  =""
2581
+          var max_str = ""
2582
+          if (total < min_number) {
2583
+              min_str = total + min_unit;
2584
+          }
2585
+          if (total == 0) {
2586
+              min_str = "";
2587
+              max_str = "";
2588
+          }
2589
+          if (total >= min_number) {
2590
+              if (parseInt(total / min_number) != 0) {
2591
+              max_str = parseInt(total / min_number) + max_unit;
2592
+              }
2593
+              if (total % min_number != 0) {
2594
+              min_str = (total % min_number) + min_unit;
2595
+              }
2596
+          }
2597
+         
2598
+          if(max_str == "" && min_str == ""){
2599
+              return "0"
2600
+          }else{
2601
+          return max_str + min_str
2602
+          }
2564
       }
2603
       }
2565
     }, created() {
2604
     }, created() {
2566
       for(let key in this.$store.getters.treatment_mode){
2605
       for(let key in this.$store.getters.treatment_mode){

+ 12 - 2
src/xt_pages/stock/detail/cancelStockDetail.vue Bestand weergeven

60
           align="right"
60
           align="right"
61
           format="yyyy-MM-dd"
61
           format="yyyy-MM-dd"
62
           value-format="yyyy-MM-dd"
62
           value-format="yyyy-MM-dd"
63
-          @change="startTimeChange"
64
         ></el-date-picker>
63
         ></el-date-picker>
65
         <span class="cellLine"> - </span>
64
         <span class="cellLine"> - </span>
66
         <el-date-picker
65
         <el-date-picker
74
           align="right"
73
           align="right"
75
           format="yyyy-MM-dd"
74
           format="yyyy-MM-dd"
76
           value-format="yyyy-MM-dd"
75
           value-format="yyyy-MM-dd"
77
-          @change="endTimeChange"
78
         ></el-date-picker>
76
         ></el-date-picker>
77
+        <el-button
78
+        size="small"
79
+        class="filter-item"
80
+        type="primary"
81
+        icon="el-icon-search"
82
+        @click="getAllQuery"
83
+        >查询</el-button
84
+      >
85
+
79
 
86
 
80
     </div>
87
     </div>
81
 
88
 
526
         this.GetCancelStock();
533
         this.GetCancelStock();
527
       }
534
       }
528
     },
535
     },
536
+    getAllQuery(){
537
+      this.GetCancelStock();
538
+    },
529
     getTimestamp(time) {
539
     getTimestamp(time) {
530
       // 把时间日期转成时间戳
540
       // 把时间日期转成时间戳
531
       return new Date(time).getTime() / 1000;
541
       return new Date(time).getTime() / 1000;

+ 11 - 3
src/xt_pages/stock/detail/stockInDetail.vue Bestand weergeven

63
           align="right"
63
           align="right"
64
           format="yyyy-MM-dd"
64
           format="yyyy-MM-dd"
65
           value-format="yyyy-MM-dd"
65
           value-format="yyyy-MM-dd"
66
-          @change="startTimeChange"
67
           
66
           
68
         ></el-date-picker>
67
         ></el-date-picker>
69
         <span class="cellLine"> - </span>
68
         <span class="cellLine"> - </span>
78
           align="right"
77
           align="right"
79
           format="yyyy-MM-dd"
78
           format="yyyy-MM-dd"
80
           value-format="yyyy-MM-dd"
79
           value-format="yyyy-MM-dd"
81
-          @change="endTimeChange"
82
         ></el-date-picker>
80
         ></el-date-picker>
83
-
81
+        <el-button
82
+          size="small"
83
+          class="filter-item"
84
+          type="primary"
85
+          icon="el-icon-search"
86
+          @click="getAllQuery"
87
+          >查询</el-button
88
+        >
84
     </div>
89
     </div>
85
 
90
 
86
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
91
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
496
         this.GetCancelStock();
501
         this.GetCancelStock();
497
       }
502
       }
498
     },
503
     },
504
+    getAllQuery(){
505
+      this.GetCancelStock();
506
+    },
499
     getTimestamp(time) {
507
     getTimestamp(time) {
500
       // 把时间日期转成时间戳
508
       // 把时间日期转成时间戳
501
       return new Date(time).getTime() / 1000;
509
       return new Date(time).getTime() / 1000;

+ 12 - 2
src/xt_pages/stock/detail/stockOutDetail.vue Bestand weergeven

71
           align="right"
71
           align="right"
72
           format="yyyy-MM-dd"
72
           format="yyyy-MM-dd"
73
           value-format="yyyy-MM-dd"
73
           value-format="yyyy-MM-dd"
74
-          @change="startTimeChange"
75
         ></el-date-picker>
74
         ></el-date-picker>
76
         <span class="cellLine"> - </span>
75
         <span class="cellLine"> - </span>
77
         <el-date-picker
76
         <el-date-picker
85
           align="right"
84
           align="right"
86
           format="yyyy-MM-dd"
85
           format="yyyy-MM-dd"
87
           value-format="yyyy-MM-dd"
86
           value-format="yyyy-MM-dd"
88
-          @change="endTimeChange"
89
         ></el-date-picker>
87
         ></el-date-picker>
90
 
88
 
89
+        <el-button
90
+        size="small"
91
+        class="filter-item"
92
+        type="primary"
93
+        icon="el-icon-search"
94
+        @click="getAllQuery"
95
+        >查询</el-button
96
+      >
97
+
91
     </div>
98
     </div>
92
 
99
 
93
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
100
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
521
       this.GetCancelStock();
528
       this.GetCancelStock();
522
       // this.getPrintStockGood()
529
       // this.getPrintStockGood()
523
     },
530
     },
531
+    getAllQuery(){
532
+      this.GetCancelStock();
533
+    },
524
     startTimeChange(val) {
534
     startTimeChange(val) {
525
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
535
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
526
       if (time > 0) {
536
       if (time > 0) {

+ 11 - 2
src/xt_pages/stock/drugs/components/drugCancelDetail.vue Bestand weergeven

51
           align="right"
51
           align="right"
52
           format="yyyy-MM-dd"
52
           format="yyyy-MM-dd"
53
           value-format="yyyy-MM-dd"
53
           value-format="yyyy-MM-dd"
54
-          @change="startTimeChange"
55
         ></el-date-picker>
54
         ></el-date-picker>
56
         <span class="cellLine"> - </span>
55
         <span class="cellLine"> - </span>
57
         <el-date-picker
56
         <el-date-picker
65
           align="right"
64
           align="right"
66
           format="yyyy-MM-dd"
65
           format="yyyy-MM-dd"
67
           value-format="yyyy-MM-dd"
66
           value-format="yyyy-MM-dd"
68
-          @change="endTimeChange"
69
         ></el-date-picker>
67
         ></el-date-picker>
68
+        <el-button
69
+        size="small"
70
+        class="filter-item"
71
+        type="primary"
72
+        icon="el-icon-search"
73
+        @click="getAllQuery"
74
+        >查询</el-button
75
+      >
70
       </div>
76
       </div>
71
     </div>
77
     </div>
72
 
78
 
322
         this.getlist()
328
         this.getlist()
323
       }
329
       }
324
     },
330
     },
331
+    getAllQuery(){
332
+      this.getlist()
333
+    },
325
     getTimestamp(time) {
334
     getTimestamp(time) {
326
       // 把时间日期转成时间戳
335
       // 把时间日期转成时间戳
327
       return new Date(time).getTime() / 1000;
336
       return new Date(time).getTime() / 1000;

+ 12 - 2
src/xt_pages/stock/drugs/components/drugInOrder.vue Bestand weergeven

61
           align="right"
61
           align="right"
62
           format="yyyy-MM-dd"
62
           format="yyyy-MM-dd"
63
           value-format="yyyy-MM-dd"
63
           value-format="yyyy-MM-dd"
64
-          @change="startTimeChange"
65
          
64
          
66
         ></el-date-picker>
65
         ></el-date-picker>
67
         <span class="cellLine"> - </span>
66
         <span class="cellLine"> - </span>
76
           align="right"
75
           align="right"
77
           format="yyyy-MM-dd"
76
           format="yyyy-MM-dd"
78
           value-format="yyyy-MM-dd"
77
           value-format="yyyy-MM-dd"
79
-          @change="endTimeChange"
80
         ></el-date-picker>
78
         ></el-date-picker>
79
+        <el-button
80
+        size="small"
81
+        class="filter-item"
82
+        type="primary"
83
+        icon="el-icon-search"
84
+        @click="getAllQuery"
85
+        >查询</el-button
86
+      >
81
     </div>
87
     </div>
82
 
88
 
83
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
89
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
329
         this.getDrugWarehouseInfoPrint()
335
         this.getDrugWarehouseInfoPrint()
330
       }
336
       }
331
     },
337
     },
338
+    getAllQuery(){
339
+      this.getlist()
340
+      this.getDrugWarehouseInfoPrint()
341
+    },
332
     getTimestamp(time) {
342
     getTimestamp(time) {
333
       // 把时间日期转成时间戳
343
       // 把时间日期转成时间戳
334
       return new Date(time).getTime() / 1000;
344
       return new Date(time).getTime() / 1000;

+ 12 - 2
src/xt_pages/stock/drugs/components/drugOutDetail.vue Bestand weergeven

77
           align="right"
77
           align="right"
78
           format="yyyy-MM-dd"
78
           format="yyyy-MM-dd"
79
           value-format="yyyy-MM-dd"
79
           value-format="yyyy-MM-dd"
80
-          @change="startTimeChange"
81
         ></el-date-picker>
80
         ></el-date-picker>
82
         <span class="cellLine"> - </span>
81
         <span class="cellLine"> - </span>
83
         <el-date-picker
82
         <el-date-picker
91
           align="right"
90
           align="right"
92
           format="yyyy-MM-dd"
91
           format="yyyy-MM-dd"
93
           value-format="yyyy-MM-dd"
92
           value-format="yyyy-MM-dd"
94
-          @change="endTimeChange"
95
         ></el-date-picker>
93
         ></el-date-picker>
94
+        <el-button
95
+        size="small"
96
+        class="filter-item"
97
+        type="primary"
98
+        icon="el-icon-search"
99
+        @click="getAllQuery"
100
+        >查询</el-button
101
+      >
96
 
102
 
97
     </div>
103
     </div>
98
 
104
 
395
         this.getDrugOutOrderPrint()
401
         this.getDrugOutOrderPrint()
396
       }
402
       }
397
     },
403
     },
404
+    getAllQuery(){
405
+      this.getlist()
406
+      this.getDrugOutOrderPrint()
407
+    },
398
     getTimestamp(time) {
408
     getTimestamp(time) {
399
       // 把时间日期转成时间戳
409
       // 把时间日期转成时间戳
400
       return new Date(time).getTime() / 1000;
410
       return new Date(time).getTime() / 1000;

+ 2 - 2
src/xt_pages/stock/drugs/drugInventory.vue Bestand weergeven

26
           <drug-damaged ref="childOne"></drug-damaged>
26
           <drug-damaged ref="childOne"></drug-damaged>
27
         </el-tab-pane>
27
         </el-tab-pane>
28
 
28
 
29
-        <!-- <el-tab-pane label="盘点日志表" name="seven">
29
+        <el-tab-pane label="盘点日志表" name="seven">
30
             <inventory-record ref="childSeven"></inventory-record>
30
             <inventory-record ref="childSeven"></inventory-record>
31
-         </el-tab-pane> -->
31
+         </el-tab-pane>
32
       </el-tabs>
32
       </el-tabs>
33
     </div>
33
     </div>
34
   </div>
34
   </div>

+ 144 - 75
src/xt_pages/stock/drugs/drugInventoryModePrint.vue Bestand weergeven

20
                     <tr>
20
                     <tr>
21
                         <td align="center">药品名称</td>
21
                         <td align="center">药品名称</td>
22
                         <td align="center">规格</td>
22
                         <td align="center">规格</td>
23
-                     
24
                         <td align="center">本月入库数量</td>
23
                         <td align="center">本月入库数量</td>
25
                         <td align="center">本月出库数量</td>
24
                         <td align="center">本月出库数量</td>
26
                         <td align="center">本月剩余库存</td>
25
                         <td align="center">本月剩余库存</td>
33
                     </tr>
32
                     </tr>
34
 
33
 
35
                     <tr v-for="(item,index) in tableList" :key="index">
34
                     <tr v-for="(item,index) in tableList" :key="index">
36
-                        <td align="center">{{ item.good_name }}</td>
35
+                        <td align="center">{{ item.drug_name }}</td>
37
                         <td align="center">{{ item.specification_name }}</td>
36
                         <td align="center">{{ item.specification_name }}</td>
38
-                        <td align="center">{{ getInCount(item.good_id) }}</td>
39
-                        <td align="center">{{ getOutCount(item.good_id) }}</td> 
40
-                        <td align="center">{{ getSumCount(item.good_id) }}</td>
37
+                        <td align="center">{{ getInCount(item.drug_id,item.min_number,item.min_unit,item.max_unit) }}</td>
38
+                        <td align="center">{{ getOutCount(item.drug_id,item.min_number,item.min_unit,item.max_unit) }}</td> 
39
+                        <td align="center">{{ getSumCount(item.sum_count,item.min_number,item.min_unit,item.max_unit) }}</td>
41
                         <td align="center">
40
                         <td align="center">
42
                             <table
41
                             <table
43
                                 class="ware_table"
42
                                 class="ware_table"
70
                                         },
69
                                         },
71
                                     ]"
70
                                     ]"
72
                                     >
71
                                     >
73
-                                    {{ it.number }}
72
+                                    {{ it.batch_number }}
74
                                     </td>
73
                                     </td>
75
                               </tr>
74
                               </tr>
76
                             </table>
75
                             </table>
77
                         </td>
76
                         </td>
78
                        
77
                        
79
                         <td align="center">
78
                         <td align="center">
80
-                            <table
79
+                             <table
81
                                 class="ware_table"
80
                                 class="ware_table"
82
                                 style="width: 100%; border-collapse: collapse"
81
                                 style="width: 100%; border-collapse: collapse"
83
                                 >
82
                                 >
114
                             </table>
113
                             </table>
115
                         </td>
114
                         </td>
116
                         <td align="center">
115
                         <td align="center">
117
-                            <table
116
+                          <table
118
                                 class="ware_table"
117
                                 class="ware_table"
119
                                 style="width: 100%; border-collapse: collapse"
118
                                 style="width: 100%; border-collapse: collapse"
120
                                 >
119
                                 >
148
                                     {{ getTime(it.expiry_date) }}
147
                                     {{ getTime(it.expiry_date) }}
149
                                     </td>
148
                                     </td>
150
                               </tr>
149
                               </tr>
151
-                            </table>
150
+                            </table> 
152
                         </td>
151
                         </td>
153
                         <td align="center">
152
                         <td align="center">
154
 
153
 
217
        return{
216
        return{
218
         crumbs: [
217
         crumbs: [
219
             { path: false, name: '库存管理' },
218
             { path: false, name: '库存管理' },
220
-            { path: false, name: '耗材管理' },
221
-            { path: false, name: '耗材模版打印' },
219
+            { path: false, name: '药品管理' },
220
+            { path: false, name: '药品模版打印' },
222
           ],
221
           ],
223
           tableList:[],
222
           tableList:[],
224
           org_name: this.$store.getters.xt_user.org.org_name,
223
           org_name: this.$store.getters.xt_user.org.org_name,
226
           end_time:"",
225
           end_time:"",
227
           manufacturerList:[],
226
           manufacturerList:[],
228
           infoList:[],
227
           infoList:[],
229
-          outinfo:[],
230
-          flowProList:[],
231
-          flowNoProList:[],
232
-          goodInfo:[]
228
+          drugList:[],
229
+          outList:[]
233
        }
230
        }
234
      },
231
      },
235
      methods:{
232
      methods:{
264
               if(response.data.state == 1){
261
               if(response.data.state == 1){
265
                  var list  =  response.data.data.list
262
                  var list  =  response.data.data.list
266
 
263
 
267
-                 console.log("list===============",list)
264
+                 console.log("list===============998",list)
268
 
265
 
269
                 if(list!=null && list.length > 0){
266
                 if(list!=null && list.length > 0){
270
                   let dataInfo = {}
267
                   let dataInfo = {}
271
                   list.forEach((item, index) => {
268
                   list.forEach((item, index) => {
272
-                  let { good_id } = item
273
-                  if (!dataInfo[good_id]) {
274
-                    dataInfo[good_id] = {
275
-                      good_id:item.good_id,
269
+                  let { drug_id } = item
270
+                  if (!dataInfo[drug_id]) {
271
+                    dataInfo[drug_id] = {
272
+                      drug_id:item.drug_id,
276
                       child: [],
273
                       child: [],
277
                       count:0,
274
                       count:0,
278
-                      specification_name:item.specification_name,
279
-                      good_name:item.good_name,
275
+                      specification_name:item.dose +item.dose_unit+"*"+item.min_number+item.min_unit+"/"+item.max_unit,
276
+                      drug_name:item.drug_name,
277
+                      min_number:item.min_number,
278
+                      min_unit:item.min_unit,
279
+                      max_unit:item.max_unit,
280
+                      sum_count:item.sum_count,
280
                     }
281
                     }
281
                   }
282
                   }
282
                 })
283
                 })
284
                 
285
                 
285
                 for(let i=0;i<arr.length;i++){
286
                 for(let i=0;i<arr.length;i++){
286
                    for(let j=0;j<list.length;j++){
287
                    for(let j=0;j<list.length;j++){
287
-                       if(arr[i].good_id == list[j].good_id){
288
+                       if(arr[i].drug_id == list[j].drug_id){
288
                           arr[i].child.push(list[j])
289
                           arr[i].child.push(list[j])
289
                        }
290
                        }
290
                    }
291
                    }
298
 
299
 
299
                  this.infoList = response.data.data.infoList
300
                  this.infoList = response.data.data.infoList
300
 
301
 
301
-                 this.outinfo = response.data.data.outinfo
302
+                 this.outList = response.data.data.outList
302
 
303
 
303
-                 this.flowNoProList = response.data.data.flowNoProList
304
-
305
-                 this.flowProList = response.data.data.flowProList
306
-
307
-                 this.goodInfo = response.data.data.goodInfo
304
+              
305
+                 this.drugList = response.data.data.drugList
308
               }
306
               }
309
           })
307
           })
310
         },
308
         },
318
            return manufacturer_name
316
            return manufacturer_name
319
         },
317
         },
320
         
318
         
321
-        getInCount(good_id){
319
+        getInCount(drug_id,min_number,min_unit,max_unit){
322
           
320
           
323
           var newArr =[]
321
           var newArr =[]
324
-          var total_count =0
325
-          var newArrOne = []
326
-          var total_count_one  = 0
327
           var total =0
322
           var total =0
323
+          var min_str  =""
324
+          var max_str = ""
328
           for(let i=0;i<this.infoList.length;i++){
325
           for(let i=0;i<this.infoList.length;i++){
329
-            if(good_id == this.infoList[i].good_id){
326
+            if(drug_id == this.infoList[i].drug_id){
330
                newArr.push(this.infoList[i])
327
                newArr.push(this.infoList[i])
331
             }
328
             }
332
           }
329
           }
330
+        
331
+         if(newArr!=null){
332
+            for(let i=0;i<newArr.length;i++){
333
+               if(newArr[i].max_unit == max_unit && max_unit!=min_unit){
334
+                 newArr[i].last_stock_max_number = newArr[i].count * min_number
335
+               } 
336
+               if(newArr[i].max_unit == min_unit && max_unit!=min_unit){
337
+                 newArr[i].last_stock_max_number = newArr[i].count 
338
+               } 
339
+               if(newArr[i].max_unit == max_unit && max_unit==min_unit){
340
+                 newArr[i].last_stock_max_number = newArr[i].count 
341
+               } 
342
+            }
343
+         }
344
+
345
+
346
+
347
+        console.log("newARR========",newArr)
333
           if(newArr!=null){
348
           if(newArr!=null){
334
             for(let i=0;i<newArr.length;i++){
349
             for(let i=0;i<newArr.length;i++){
335
-                total_count += parseInt(newArr[i].warehousing_count)
350
+                total += parseInt(newArr[i].last_stock_max_number)
336
             }
351
             }
337
           }
352
           }
338
 
353
 
339
-          for(let i=0;i<this.flowProList.length;i++){
340
-            if(good_id == this.flowProList[i].good_id){
341
-               newArrOne.push(this.flowProList[i])
354
+        
355
+          if (total < min_number) {
356
+               min_str = total + min_unit;
357
+           }
358
+            if (total == 0) {
359
+                min_str = "";
360
+                max_str = "";
342
             }
361
             }
343
-          }
344
-          if(newArrOne!=null){
345
-            for(let i=0;i<newArrOne.length;i++){
346
-               total_count_one += newArrOne[i].count
362
+            if (total >= min_number) {
363
+                if (parseInt(total / min_number) != 0) {
364
+                max_str = parseInt(total / min_number) + max_unit;
365
+                }
366
+                if (total % min_number != 0) {
367
+                min_str = (total % min_number) + min_unit;
368
+                }
369
+            }
370
+            console.log("max_str",max_str)
371
+            console.log("min_str",min_str)
372
+            if(max_str == "" && min_str == ""){
373
+                return "0"
374
+            }else{
375
+            return max_str + min_str
347
             }
376
             }
348
-          }
349
-          total = total_count + total_count_one
350
-          return total
351
         },
377
         },
352
-        getOutCount(good_id){
353
-
378
+        getOutCount(drug_id,min_number,min_unit,max_unit){
379
+          
354
           var newArr =[]
380
           var newArr =[]
355
-          var newArrOne = []
356
-          var total_count =0
357
-          var total_count_one  = 0
358
-          var total = 0
359
-          for(let i=0;i<this.outinfo.length;i++){
360
-            if(good_id == this.outinfo[i].good_id){
361
-               newArr.push(this.outinfo[i])
381
+          var total =0
382
+          var min_str  =""
383
+          var max_str = ""
384
+          for(let i=0;i<this.outList.length;i++){
385
+            if(drug_id == this.outList[i].drug_id){
386
+               newArr.push(this.outList[i])
362
             }
387
             }
363
           }
388
           }
389
+        
390
+         if(newArr!=null){
391
+            for(let i=0;i<newArr.length;i++){
392
+               if(newArr[i].max_unit == max_unit && max_unit!=min_unit){
393
+                 newArr[i].last_stock_max_number = newArr[i].count * min_number
394
+               } 
395
+               if(newArr[i].max_unit == min_unit && max_unit!=min_unit){
396
+                 newArr[i].last_stock_max_number = newArr[i].count 
397
+               } 
398
+               if(newArr[i].max_unit == max_unit && max_unit==min_unit){
399
+                 newArr[i].last_stock_max_number = newArr[i].count 
400
+               } 
401
+            }
402
+         }
403
+
404
+
405
+
406
+        console.log("newARR========",newArr)
364
           if(newArr!=null){
407
           if(newArr!=null){
365
             for(let i=0;i<newArr.length;i++){
408
             for(let i=0;i<newArr.length;i++){
366
-              total_count += parseInt(newArr[i].count)
409
+                total += parseInt(newArr[i].last_stock_max_number)
367
             }
410
             }
368
           }
411
           }
369
 
412
 
370
-          for(let i=0;i<this.flowNoProList.length;i++){
371
-            if(good_id == this.flowNoProList[i].good_id){
372
-               newArrOne.push(this.flowNoProList[i])
413
+        
414
+          if (total < min_number) {
415
+               min_str = total + min_unit;
416
+           }
417
+            if (total == 0) {
418
+                min_str = "";
419
+                max_str = "";
373
             }
420
             }
374
-          }
375
-          if(newArrOne!=null){
376
-            for(let i=0;i<newArrOne.length;i++){
377
-               total_count_one += newArrOne[i].count
421
+            if (total >= min_number) {
422
+                if (parseInt(total / min_number) != 0) {
423
+                max_str = parseInt(total / min_number) + max_unit;
424
+                }
425
+                if (total % min_number != 0) {
426
+                min_str = (total % min_number) + min_unit;
427
+                }
428
+            }
429
+            console.log("max_str",max_str)
430
+            console.log("min_str",min_str)
431
+            if(max_str == "" && min_str == ""){
432
+                return "0"
433
+            }else{
434
+            return max_str + min_str
378
             }
435
             }
379
-          }
380
-
381
-
382
-          total = total_count + total_count_one
383
-          return total
384
         },
436
         },
385
-        getSumCount(good_id){
386
-          var sum_count = 0
387
-          for(let i=0;i<this.goodInfo.length;i++){
388
-             if(good_id == this.goodInfo[i].id){
389
-                sum_count = this.goodInfo[i].sum_count
390
-             }
391
-          }
392
-          return sum_count
437
+        getSumCount(total,min_number,min_unit,max_unit){
438
+           var min_str  =""
439
+           var max_str = ""
440
+           if (total < min_number) {
441
+               min_str = total + min_unit;
442
+           }
443
+            if (total == 0) {
444
+                min_str = "";
445
+                max_str = "";
446
+            }
447
+            if (total >= min_number) {
448
+                if (parseInt(total / min_number) != 0) {
449
+                max_str = parseInt(total / min_number) + max_unit;
450
+                }
451
+                if (total % min_number != 0) {
452
+                min_str = (total % min_number) + min_unit;
453
+                }
454
+            }
455
+            console.log("max_str",max_str)
456
+            console.log("min_str",min_str)
457
+            if(max_str == "" && min_str == ""){
458
+                return "0"
459
+            }else{
460
+            return max_str + min_str
461
+            }
393
         }
462
         }
394
 
463
 
395
         
464
         

+ 10 - 8
src/xt_pages/stock/drugs/inventoryRecordPrint.vue Bestand weergeven

43
                         <td align="center">{{ getTime(item.expiry_date) }}</td>
43
                         <td align="center">{{ getTime(item.expiry_date) }}</td>
44
                         <td align="center">{{ getHouseName(item.storehouse_id) }}</td>
44
                         <td align="center">{{ getHouseName(item.storehouse_id) }}</td>
45
                         <td align="center">
45
                         <td align="center">
46
-                             {{ item.stock_max_number }}
47
-                           <span v-if="item.stock_max_number>0">{{ item.max_unit }}</span> 
48
-                             {{ item.stock_min_number }}
49
-                           <span v-if="item.stock_min_number>0">{{ item.min_unit }}</span> 
46
+                            
47
+                           <span v-if="item.stock_max_number>0"> {{ item.stock_max_number}}{{ item.max_unit }}</span> 
48
+                          
49
+                           <span v-if="item.stock_min_number>0"> {{ item.stock_min_number}}{{ item.min_unit }}</span> 
50
                         </td> 
50
                         </td> 
51
                         <td align="center">
51
                         <td align="center">
52
-                            {{ item.last_stock_max_number }}
53
-                           <span v-if="item.last_stock_max_number>0">{{ item.max_unit }}</span> 
54
-                             {{ item.last_stock_min_number }}
55
-                           <span v-if="item.last_stock_min_number>0">{{ item.min_unit }}</span> 
52
+                           
53
+                           <span v-if="item.last_stock_max_number>0">
54
+                            {{ item.last_stock_max_number }} {{ item.max_unit }}
55
+                            </span> 
56
+                            
57
+                           <span v-if="item.last_stock_min_number>0"> {{ item.last_stock_min_number }}{{ item.min_unit }}</span> 
56
                         </td>
58
                         </td>
57
                         <td align="center">
59
                         <td align="center">
58
                             <span v-if="item.reason == 10">盘盈</span>
60
                             <span v-if="item.reason == 10">盘盈</span>

+ 2 - 2
src/xt_pages/stock/drugs/inventory_record.vue Bestand weergeven

57
             </div>
57
             </div>
58
             <div>
58
             <div>
59
                <el-button size="small" type="primary" @click="print_1">打印</el-button>
59
                <el-button size="small" type="primary" @click="print_1">打印</el-button>
60
-               <el-button size="small" type="primary" @click="print_2">盘点模版打印2</el-button>
60
+               <el-button size="small" type="primary" @click="print_2">盘点模版打印</el-button>
61
             </div>
61
             </div>
62
           
62
           
63
         </div>
63
         </div>
212
             end_time_one= moment().endOf('month').format("YYYY-MM-DD")
212
             end_time_one= moment().endOf('month').format("YYYY-MM-DD")
213
 
213
 
214
           }
214
           }
215
-          this.$router.push({path:'/stock/drugs/drugInventoryModePrint?start_time='+"&start_time="+start_time_one+"&end_time="+end_time_one}) 
215
+          this.$router.push({path:'/stock/drugs/drugInventoryModePrint?start_time='+start_time_one+"&end_time="+end_time_one}) 
216
         },
216
         },
217
         handleSizeChange(val){
217
         handleSizeChange(val){
218
          this.limit = val
218
          this.limit = val