Browse Source

Merge branch '20230223_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20230223_pc_vue_new_branch

陈少旭 1 week ago
parent
commit
914a830648

+ 18 - 4
src/xt_pages/hospitalStation/summary.vue View File

477
         { value: 2, label: "自费" },
477
         { value: 2, label: "自费" },
478
       ],
478
       ],
479
       shouJuVisible: false,
479
       shouJuVisible: false,
480
+      org_id:0,
480
     };
481
     };
481
   },
482
   },
482
 
483
 
1320
       return uParseTime(time, "{y}-{m}-{d}");
1321
       return uParseTime(time, "{y}-{m}-{d}");
1321
     },
1322
     },
1322
     toDetail(row) {
1323
     toDetail(row) {
1323
-      this.$router.push(
1324
-        // "/outpatientCharges/summaryDetail?patient_id=" +
1325
-          "/hospitalCharges/summaryDetail?patient_id=" +
1324
+      // if(this.org_id ==10265 || this.org_id ==0){
1325
+        this.$router.push(
1326
+          "/outpatientCharges/summaryDetail?patient_id=" +
1326
           row.patient.id +
1327
           row.patient.id +
1327
           "&number=" +
1328
           "&number=" +
1328
           row.number +
1329
           row.number +
1329
           "&id=" +
1330
           "&id=" +
1330
           row.id
1331
           row.id
1331
-      );
1332
+        );
1333
+      // }else{
1334
+      //   this.$router.push(
1335
+      //   // "/outpatientCharges/summaryDetail?patient_id=" +
1336
+      //     "/hospitalCharges/summaryDetail?patient_id=" +
1337
+      //     row.patient.id +
1338
+      //     "&number=" +
1339
+      //     row.number +
1340
+      //     "&id=" +
1341
+      //     row.id
1342
+      //   );
1343
+      // }
1344
+      
1332
     },
1345
     },
1333
     getTime(value, temp) {
1346
     getTime(value, temp) {
1334
       if (value != undefined) {
1347
       if (value != undefined) {
1412
     },
1425
     },
1413
   },
1426
   },
1414
   created() {
1427
   created() {
1428
+    this.org_id = this.$store.getters.xt_user.org.id,
1415
     this.fetchAllAdminUsers();
1429
     this.fetchAllAdminUsers();
1416
     this.getDoctorList();
1430
     this.getDoctorList();
1417
     this.getHisOrderList();
1431
     this.getHisOrderList();

+ 2 - 2
src/xt_pages/outpatientCharges/allListPrint.vue View File

16
       <printOne  v-if="org_id != 10215  && org_id !=9671&&org_id !=9675&& org_id !=10515 && org_id !=10489 && org_id !=10644 && org_id !=0" :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></printOne>
16
       <printOne  v-if="org_id != 10215  && org_id !=9671&&org_id !=9675&& org_id !=10515 && org_id !=10489 && org_id !=10644 && org_id !=0" :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></printOne>
17
       <summary-print v-if="org_id == 10215|| org_id ==9671 ||org_id ==9675" :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></summary-print>
17
       <summary-print v-if="org_id == 10215|| org_id ==9671 ||org_id ==9675" :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></summary-print>
18
       <printTwo v-if="org_id==10515 " :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></printTwo>
18
       <printTwo v-if="org_id==10515 " :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></printTwo>
19
-      <printthree  v-if="org_id == 10489" :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></printthree>
20
-      <printFour v-if="org_id == 10644 || org_id == 0" :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></printFour>
19
+      <printthree  v-if="org_id == 10489 || org_id == 0" :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></printthree>
20
+      <printFour v-if="org_id == 10644 " :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></printFour>
21
       <!--      <list-print-two :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></list-print-two>-->
21
       <!--      <list-print-two :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></list-print-two>-->
22
     </div>
22
     </div>
23
   </div>
23
   </div>

+ 84 - 6
src/xt_pages/outpatientCharges/batchStatementPrint.vue View File

134
           const style12 =
134
           const style12 =
135
             "@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 89%;}}}";
135
             "@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 89%;}}}";
136
 
136
 
137
+          // if (this.num >= 13) {
137
             printJS({
138
             printJS({
138
-              printable: "prescription-print",
139
-              type: "html",
140
-              style: style,
141
-              scanStyles: false,
142
-            });
143
-
139
+              printable: 'prescription-print',
140
+              type: 'html',
141
+              style: style9,
142
+              scanStyles: false
143
+            })
144
+          // } else if (this.num == 12) {
145
+          //   printJS({
146
+          //     printable: 'prescription-print',
147
+          //     type: 'html',
148
+          //     style: style2,
149
+          //     scanStyles: false
150
+          //   })
151
+          // } else if (this.num == 11) {
152
+          //   printJS({
153
+          //     printable: 'prescription-print',
154
+          //     type: 'html',
155
+          //     style: style3,
156
+          //     scanStyles: false
157
+          //   })
158
+          // } else if (this.num == 10) {
159
+          //   printJS({
160
+          //     printable: 'prescription-print',
161
+          //     type: 'html',
162
+          //     style: style4,
163
+          //     scanStyles: false
164
+          //   })
165
+          // } else if (this.num == 9) {
166
+          //   printJS({
167
+          //     printable: 'prescription-print',
168
+          //     type: 'html',
169
+          //     style: style5,
170
+          //     scanStyles: false
171
+          //   })
172
+          // } else if (this.num == 8) {
173
+          //   printJS({
174
+          //     printable: 'prescription-print',
175
+          //     type: 'html',
176
+          //     style: style6,
177
+          //     scanStyles: false
178
+          //   })
179
+          // } else if (this.num == 7) {
180
+          //   printJS({
181
+          //     printable: 'prescription-print',
182
+          //     type: 'html',
183
+          //     style: style7,
184
+          //     scanStyles: false
185
+          //   })
186
+          // } else if (this.num == 6) {
187
+          //   printJS({
188
+          //     printable: 'prescription-print',
189
+          //     type: 'html',
190
+          //     style: style8,
191
+          //     scanStyles: false
192
+          //   })
193
+          // } else if (this.num == 5) {
194
+          //   printJS({
195
+          //     printable: 'prescription-print',
196
+          //     type: 'html',
197
+          //     style: style9,
198
+          //     scanStyles: false
199
+          //   })
200
+          // } else if (this.num == 4) {
201
+          //   printJS({
202
+          //     printable: 'prescription-print',
203
+          //     type: 'html',
204
+          //     style: style10,
205
+          //     scanStyles: false
206
+          //   })
207
+          // } else if (this.num == 3) {
208
+          //   printJS({
209
+          //     printable: 'prescription-print',
210
+          //     type: 'html',
211
+          //     style: style11,
212
+          //     scanStyles: false
213
+          //   })
214
+          // } else if (this.num <= 2) {
215
+          //   printJS({
216
+          //     printable: 'prescription-print',
217
+          //     type: 'html',
218
+          //     style: style12,
219
+          //     scanStyles: false
220
+          //   })
221
+          // }
144
 
222
 
145
         }, 500);
223
         }, 500);
146
       } else if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
224
       } else if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {

+ 14 - 12
src/xt_pages/outpatientCharges/listPrint.vue View File

15
 
15
 
16
     <div class='dialysisPage' style="padding-top:40px;">
16
     <div class='dialysisPage' style="padding-top:40px;">
17
       
17
       
18
-      <listPrintforu v-if=" org_id != 10106&&org_id != 10215&&org_id != 10265 && org_id!=9675 && org_id!=10485 && org_id != 10191"
18
+      <listPrintforu v-if=" org_id != 10106&&org_id != 10215&&org_id != 10265 && org_id!=9675 && org_id!=10485 && org_id != 10191 "
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 " :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>
379
       set10265NewData(details) {
379
       set10265NewData(details) {
380
         let drug_ids = []
380
         let drug_ids = []
381
         let project_ids = []
381
         let project_ids = []
382
-
382
+        console.log('details12121212',details);
383
+        
383
         for (let i = 0; i < details.length; i++) {
384
         for (let i = 0; i < details.length; i++) {
384
           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) { //药品
385
             let obj = {
386
             let obj = {
386
               id: details[i].advice.drug_id,
387
               id: details[i].advice.drug_id,
387
               price: details[i].advice.price,
388
               price: details[i].advice.price,
388
               lv: details[i].chrgitm_lv,
389
               lv: details[i].chrgitm_lv,
390
+              selfpay_prop:details[i].selfpay_prop
389
             }
391
             }
390
             drug_ids.push(obj)
392
             drug_ids.push(obj)
391
           } else if (details[i].project && details[i].project.id > 0 && details[i].project.prescription && details[i].project.prescription.type == 2) { //项目
393
           } else if (details[i].project && details[i].project.id > 0 && details[i].project.prescription && details[i].project.prescription.type == 2) { //项目
393
               id: details[i].project.project_id,
395
               id: details[i].project.project_id,
394
               price: details[i].project.price,
396
               price: details[i].project.price,
395
               lv: details[i].chrgitm_lv,
397
               lv: details[i].chrgitm_lv,
396
-
398
+              selfpay_prop:details[i].selfpay_prop
397
             }
399
             }
398
             project_ids.push(obj)
400
             project_ids.push(obj)
399
 
401
 
402
         }
404
         }
403
         //
405
         //
404
         // console.log('old ids')
406
         // console.log('old ids')
405
-        // console.log(drug_ids)
406
-        // console.log(project_ids)
407
+        console.log('drug_ids',drug_ids)
408
+        console.log('project_ids',project_ids)
407
         // console.log('old ids')
409
         // console.log('old ids')
408
-
409
         let new_drug_ids = this.unique10265(drug_ids)
410
         let new_drug_ids = this.unique10265(drug_ids)
410
         let new_project_ids = this.unique10265(project_ids)
411
         let new_project_ids = this.unique10265(project_ids)
411
         let list = []
412
         let list = []
412
 
413
 
413
-        console.log('ids')
414
-        console.log(new_drug_ids)
415
-        console.log(new_project_ids)
416
-        console.log('ids')
414
+        // console.log('ids')
415
+        console.log('new_drug_ids',new_drug_ids)
416
+        console.log('new_project_ids',new_project_ids)
417
+        // console.log('ids')
417
 
418
 
418
         if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
419
         if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
419
           for (let i = 0; i < new_drug_ids.length; i++) {
420
           for (let i = 0; i < new_drug_ids.length; i++) {
429
                 obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
430
                 obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
430
                 obj['price'] = parseFloat(details[a].pric)
431
                 obj['price'] = parseFloat(details[a].pric)
431
                 obj['is_total'] = 2
432
                 obj['is_total'] = 2
433
+                obj['selfpay_prop'] = details[a].selfpay_prop
432
                 count = count + details[a].cnt
434
                 count = count + details[a].cnt
433
               }
435
               }
434
             }
436
             }
459
                 obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
461
                 obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
460
                 obj['price'] = parseFloat(details[a].pric)
462
                 obj['price'] = parseFloat(details[a].pric)
461
                 obj['is_total'] = 2
463
                 obj['is_total'] = 2
462
-
464
+                obj['selfpay_prop'] = details[a].selfpay_prop
463
                 count = count + details[a].cnt
465
                 count = count + details[a].cnt
464
               }
466
               }
465
             }
467
             }

+ 9 - 10
src/xt_pages/outpatientCharges/listTemplate/listPrintforu.vue View File

7
             <div>性别:{{patient.gender == 1 ? '男': '女'}}</div>
7
             <div>性别:{{patient.gender == 1 ? '男': '女'}}</div>
8
             <div>身份证号:{{patient.id_card_no}}</div>
8
             <div>身份证号:{{patient.id_card_no}}</div>
9
             <div>年龄:{{patient.age}}  岁</div>
9
             <div>年龄:{{patient.age}}  岁</div>
10
-            <div>开方日期:{{getTimes(order.settle_accounts_date) }}</div>
10
+            <div v-if="org_id!=10489">开方日期:{{getTimes(order.settle_accounts_date) }}</div>
11
         </div>
11
         </div>
12
         <div class="listInfo">
12
         <div class="listInfo">
13
             <div>结算类型:{{order.is_medicine_insurance == 1 ? "医保" : "自费"}}</div>
13
             <div>结算类型:{{order.is_medicine_insurance == 1 ? "医保" : "自费"}}</div>
24
         
24
         
25
         <table class="listTable" style="text-align: center;">
25
         <table class="listTable" style="text-align: center;">
26
             <tr style="border-bottom: 1px solid black;">
26
             <tr style="border-bottom: 1px solid black;">
27
-              <td style="width:25%">医保编码</td>
28
-              <td style="width:25%">项目名称</td>
29
-              <td style="width:15%">规格</td>
27
+              <td style="width:12%" v-if="org_id==10489">开方日期</td>
28
+              <td style="width:20%">医保编码</td>
29
+              <td style="width:20%">项目名称</td>
30
+              <td style="width:13%">规格</td>
30
               <td style="width:5%">数量</td>
31
               <td style="width:5%">数量</td>
31
               <td style="width:5%">单位</td>
32
               <td style="width:5%">单位</td>
32
               <td style="width:8%">单价(元)</td>
33
               <td style="width:8%">单价(元)</td>
34
               <td style="width:8%">自付比例</td>
35
               <td style="width:8%">自付比例</td>
35
             </tr>
36
             </tr>
36
             <tr v-for="(item,index) in list" style="line-height: 30px;">
37
             <tr v-for="(item,index) in list" style="line-height: 30px;">
37
-                <!-- <template v-if="index == (list.length)-1">
38
-                    <tr style="border-bottom: 1px solid black;"></tr>
39
-                </template> -->
40
-                <td style="width:25%">{{item.code}}</td>
41
-                <td style="width:25%">{{item.name}}</td>
42
-                <td style="width:15%">{{item.spec}}</td>
38
+                <td style="width:12%" v-if="org_id==10489">{{getTimes(order.settle_accounts_date) }}</td>
39
+                <td style="width:20%">{{item.code}}</td>
40
+                <td style="width:20%">{{item.name}}</td>
41
+                <td style="width:13%">{{item.spec}}</td>
43
                 <td style="width:5%" >
42
                 <td style="width:5%" >
44
                   <span v-if="item.code!=undefined">{{item.count}}</span>
43
                   <span v-if="item.code!=undefined">{{item.count}}</span>
45
                 </td>
44
                 </td>

+ 5 - 0
src/xt_pages/outpatientCharges/listTemplate/printTwo10265.vue View File

58
                   <TD width="80">单价(元)</TD>
58
                   <TD width="80">单价(元)</TD>
59
                   <TD width="80">数量</TD>
59
                   <TD width="80">数量</TD>
60
                   <TD width="80">金额(元)</TD>
60
                   <TD width="80">金额(元)</TD>
61
+                  <td width="80">自负比例</td>
61
                 </TR>
62
                 </TR>
62
                 <TR v-for="subItem in item.details" :key="subItem">
63
                 <TR v-for="subItem in item.details" :key="subItem">
63
                   <TD style="white-space: nowrap">{{
64
                   <TD style="white-space: nowrap">{{
75
                   <TD>{{
76
                   <TD>{{
76
                     (subItem.price * subItem.count).toFixed(2)
77
                     (subItem.price * subItem.count).toFixed(2)
77
                   }}</TD>
78
                   }}</TD>
79
+                  <td>
80
+                    {{(subItem.selfpay_prop)*100}}
81
+                    <span v-if="subItem.selfpay_prop !=''">%</span>
82
+                  </td>
78
                 </TR>
83
                 </TR>
79
                 <TR>
84
                 <TR>
80
                   <TD style="white-space: nowrap"
85
                   <TD style="white-space: nowrap"

+ 1 - 1
src/xt_pages/outpatientCharges/statementTemplate/batchPrint.vue View File

2
   <div>
2
   <div>
3
     <div id='prescription-print'>
3
     <div id='prescription-print'>
4
         <div  class="prescription-print"
4
         <div  class="prescription-print"
5
-            style="position: relative;  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset; page-break-after:always"
5
+            style="position: relative;   page-break-after:always"
6
             v-for="(infos,index) in info" :key="index">
6
             v-for="(infos,index) in info" :key="index">
7
           <img style="width:100%;height:80px"
7
           <img style="width:100%;height:80px"
8
             v-if="$store.getters.xt_user.org_id == 10138 || $store.getters.xt_user.org_id == 10342 || $store.getters.xt_user.org_id == 10341"
8
             v-if="$store.getters.xt_user.org_id == 10138 || $store.getters.xt_user.org_id == 10342 || $store.getters.xt_user.org_id == 10341"

+ 8 - 10
src/xt_pages/outpatientDoctorStation/batch_print_template/batchPrintThree.vue View File

91
 
91
 
92
           <div class="infoTitle">
92
           <div class="infoTitle">
93
             <div>
93
             <div>
94
-              姓名:{{
95
-                i.name
96
-                  ? i.name.indexOf("(") > -1
97
-                  ?i.name.substring(
98
-                    0,
99
-                    i.name.indexOf("(")
100
-                  )
94
+              姓名:
95
+              {{ i.name ? i.name.indexOf("(") > -1
96
+                 ?i.name.substring(0, i.name.indexOf("("))
101
                   : i.name
97
                   : i.name
102
                   : ""
98
                   : ""
103
               }}
99
               }}
197
           <div style="display: flex">
193
           <div style="display: flex">
198
             <div>
194
             <div>
199
               医&nbsp;&nbsp;&nbsp;&nbsp;师:
195
               医&nbsp;&nbsp;&nbsp;&nbsp;师:
196
+              
200
               <span
197
               <span
201
                 style="width: 100px; display: inline-block"
198
                 style="width: 100px; display: inline-block"
202
-                v-if="i.info.creator == 0"
199
+                v-if="setAdminUserES(i.info.creator)==''"
203
               >
200
               >
204
                {{ i.info.doctor ? i.info.doctor : "" }}
201
                {{ i.info.doctor ? i.info.doctor : "" }}
205
               </span>
202
               </span>
208
                 :src="setAdminUserES(i.info.creator)"
205
                 :src="setAdminUserES(i.info.creator)"
209
                 alt=""
206
                 alt=""
210
                 srcset=""
207
                 srcset=""
211
-                v-else
208
+                 v-if="setAdminUserES(i.info.creator)!=''"
212
               />
209
               />
213
             </div>
210
             </div>
214
             <!-- <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> -->
320
     // 电子签名
317
     // 电子签名
321
     setAdminUserES(id) {
318
     setAdminUserES(id) {
322
       console.log(id)
319
       console.log(id)
323
-      console.log(this.operatorMaps)
320
+      console.log('this.operatorMaps',this.operatorMaps)
324
 
321
 
325
       if (id == 0) {
322
       if (id == 0) {
326
         return "";
323
         return "";
327
       }
324
       }
328
       if (id in this.operatorMaps) {
325
       if (id in this.operatorMaps) {
326
+        console.log('this.operatorMaps[id].url',this.operatorMaps[id].url);
329
         return this.operatorMaps[id].url;
327
         return this.operatorMaps[id].url;
330
       } else {
328
       } else {
331
         return "";
329
         return "";

+ 1 - 1
src/xt_pages/outpatientDoctorStation/batch_print_treatTemplate/treatBatchPrint.vue View File

186
           医&nbsp;&nbsp;&nbsp;&nbsp;师:
186
           医&nbsp;&nbsp;&nbsp;&nbsp;师:
187
           <span
187
           <span
188
             style="width: 100px; display: inline-block"
188
             style="width: 100px; display: inline-block"
189
-            v-if="i.info.creator == 0"
189
+            v-if="setAdminUserES(item.creator) == ''"
190
           >
190
           >
191
             {{ i.info.doctor ? i.info.doctor : "" }}
191
             {{ i.info.doctor ? i.info.doctor : "" }}
192
 
192
 

+ 44 - 5
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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;

+ 144 - 75
src/xt_pages/stock/drugs/drugInventoryModePrint.vue View File

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 View File

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 View File

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

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

22
                 <stockDamaged ref="childOne"></stockDamaged>
22
                 <stockDamaged ref="childOne"></stockDamaged>
23
             </el-tab-pane>
23
             </el-tab-pane>
24
 
24
 
25
-            <el-tab-pane label="盘点日志表" name="seven">
25
+            <!-- <el-tab-pane label="盘点日志表" name="seven">
26
                 <inventory-record ref="childSeven"></inventory-record>
26
                 <inventory-record ref="childSeven"></inventory-record>
27
-            </el-tab-pane>
27
+            </el-tab-pane> -->
28
         </el-tabs>
28
         </el-tabs>
29
         
29
         
30
     </div>
30
     </div>

+ 13 - 13
src/xt_permission.js View File

12
 
12
 
13
 router.beforeEach((to, from, next) => {
13
 router.beforeEach((to, from, next) => {
14
   // 线上注释
14
   // 线上注释
15
-  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
-    store.dispatch('VerifyConfigList', []).then(() => {
17
-      next()
18
-    })
19
-  }
20
-  if (store.getters.permission_routers === undefined) {
21
-    store.dispatch('xt_GenerateRoutes', []).then(() => {
22
-      next()
23
-    })
24
-  } else {
25
-    next()
26
-  }
27
-  return
15
+  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
+  //   store.dispatch('VerifyConfigList', []).then(() => {
17
+  //     next()
18
+  //   })
19
+  // }
20
+  // if (store.getters.permission_routers === undefined) {
21
+  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
22
+  //     next()
23
+  //   })
24
+  // } else {
25
+  //   next()
26
+  // }
27
+  // return
28
   // 线上注释
28
   // 线上注释
29
   NProgress.start()
29
   NProgress.start()
30
   // console.log(store.getters.current_role_urls.indexOf(to.path))
30
   // console.log(store.getters.current_role_urls.indexOf(to.path))