Bläddra i källkod

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

陈少旭 2 månader sedan
förälder
incheckning
914a830648

+ 18 - 4
src/xt_pages/hospitalStation/summary.vue Visa fil

@@ -477,6 +477,7 @@ export default {
477 477
         { value: 2, label: "自费" },
478 478
       ],
479 479
       shouJuVisible: false,
480
+      org_id:0,
480 481
     };
481 482
   },
482 483
 
@@ -1320,15 +1321,27 @@ export default {
1320 1321
       return uParseTime(time, "{y}-{m}-{d}");
1321 1322
     },
1322 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 1327
           row.patient.id +
1327 1328
           "&number=" +
1328 1329
           row.number +
1329 1330
           "&id=" +
1330 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 1346
     getTime(value, temp) {
1334 1347
       if (value != undefined) {
@@ -1412,6 +1425,7 @@ export default {
1412 1425
     },
1413 1426
   },
1414 1427
   created() {
1428
+    this.org_id = this.$store.getters.xt_user.org.id,
1415 1429
     this.fetchAllAdminUsers();
1416 1430
     this.getDoctorList();
1417 1431
     this.getHisOrderList();

+ 2 - 2
src/xt_pages/outpatientCharges/allListPrint.vue Visa fil

@@ -16,8 +16,8 @@
16 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 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 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 21
       <!--      <list-print-two :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></list-print-two>-->
22 22
     </div>
23 23
   </div>

+ 84 - 6
src/xt_pages/outpatientCharges/batchStatementPrint.vue Visa fil

@@ -134,13 +134,91 @@ export default {
134 134
           const style12 =
135 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 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 223
         }, 500);
146 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 Visa fil

@@ -15,7 +15,7 @@
15 15
 
16 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 19
         :list="list" :patient="patient" :order="order" :admin="admin">
20 20
       </listPrintforu>
21 21
       <printOne v-if="org_id == 10191" :list="list" :patient="patient" :order="order" :admin="admin"></printOne>
@@ -23,7 +23,7 @@
23 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 24
 <!--      <list-print-two v-if="org_id == 10215 || org_id==9675" :list="list" :patient="patient" :order="order" :admin="admin"></list-print-two>-->
25 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 27
     </div>
28 28
   </div>
29 29
 </template>
@@ -379,13 +379,15 @@
379 379
       set10265NewData(details) {
380 380
         let drug_ids = []
381 381
         let project_ids = []
382
-
382
+        console.log('details12121212',details);
383
+        
383 384
         for (let i = 0; i < details.length; i++) {
384 385
           if (details[i].advice && details[i].advice.id > 0 && details[i].advice.prescription && details[i].advice.prescription.type == 1) { //药品
385 386
             let obj = {
386 387
               id: details[i].advice.drug_id,
387 388
               price: details[i].advice.price,
388 389
               lv: details[i].chrgitm_lv,
390
+              selfpay_prop:details[i].selfpay_prop
389 391
             }
390 392
             drug_ids.push(obj)
391 393
           } else if (details[i].project && details[i].project.id > 0 && details[i].project.prescription && details[i].project.prescription.type == 2) { //项目
@@ -393,7 +395,7 @@
393 395
               id: details[i].project.project_id,
394 396
               price: details[i].project.price,
395 397
               lv: details[i].chrgitm_lv,
396
-
398
+              selfpay_prop:details[i].selfpay_prop
397 399
             }
398 400
             project_ids.push(obj)
399 401
 
@@ -402,18 +404,17 @@
402 404
         }
403 405
         //
404 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 409
         // console.log('old ids')
408
-
409 410
         let new_drug_ids = this.unique10265(drug_ids)
410 411
         let new_project_ids = this.unique10265(project_ids)
411 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 419
         if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
419 420
           for (let i = 0; i < new_drug_ids.length; i++) {
@@ -429,6 +430,7 @@
429 430
                 obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
430 431
                 obj['price'] = parseFloat(details[a].pric)
431 432
                 obj['is_total'] = 2
433
+                obj['selfpay_prop'] = details[a].selfpay_prop
432 434
                 count = count + details[a].cnt
433 435
               }
434 436
             }
@@ -459,7 +461,7 @@
459 461
                 obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
460 462
                 obj['price'] = parseFloat(details[a].pric)
461 463
                 obj['is_total'] = 2
462
-
464
+                obj['selfpay_prop'] = details[a].selfpay_prop
463 465
                 count = count + details[a].cnt
464 466
               }
465 467
             }

+ 9 - 10
src/xt_pages/outpatientCharges/listTemplate/listPrintforu.vue Visa fil

@@ -7,7 +7,7 @@
7 7
             <div>性别:{{patient.gender == 1 ? '男': '女'}}</div>
8 8
             <div>身份证号:{{patient.id_card_no}}</div>
9 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 11
         </div>
12 12
         <div class="listInfo">
13 13
             <div>结算类型:{{order.is_medicine_insurance == 1 ? "医保" : "自费"}}</div>
@@ -24,9 +24,10 @@
24 24
         
25 25
         <table class="listTable" style="text-align: center;">
26 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 31
               <td style="width:5%">数量</td>
31 32
               <td style="width:5%">单位</td>
32 33
               <td style="width:8%">单价(元)</td>
@@ -34,12 +35,10 @@
34 35
               <td style="width:8%">自付比例</td>
35 36
             </tr>
36 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 42
                 <td style="width:5%" >
44 43
                   <span v-if="item.code!=undefined">{{item.count}}</span>
45 44
                 </td>

+ 5 - 0
src/xt_pages/outpatientCharges/listTemplate/printTwo10265.vue Visa fil

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

+ 1 - 1
src/xt_pages/outpatientCharges/statementTemplate/batchPrint.vue Visa fil

@@ -2,7 +2,7 @@
2 2
   <div>
3 3
     <div id='prescription-print'>
4 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 6
             v-for="(infos,index) in info" :key="index">
7 7
           <img style="width:100%;height:80px"
8 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 Visa fil

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

+ 1 - 1
src/xt_pages/outpatientDoctorStation/batch_print_treatTemplate/treatBatchPrint.vue Visa fil

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

+ 44 - 5
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue Visa fil

@@ -155,14 +155,17 @@
155 155
                                             <template slot-scope="scope">{{ scope.row.zuobiao_stock_num }}</template>
156 156
                                           </el-table-column>
157 157
 
158
-
159 158
                                           <el-table-column label="规格" width="60" v-if="org_id == 10206 || org_id == 0">
160 159
                                             <template slot-scope="scope">
161 160
                                               <span>{{scope.row.drug_spec}}</span>
162 161
                                             </template>
163 162
                                           </el-table-column>
164
-                                            <el-table-column label="单价" width="40">
163
+                                          <el-table-column label="单价" width="40">
165 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 169
                                             </el-table-column>
167 170
                                         </el-table>
168 171
                                     </div>
@@ -216,6 +219,8 @@
216 219
                                                 <template slot-scope="scope">{{ scope.row.type == 3?scope.row.zuobiao_stock_num :""}}</template>
217 220
                                               </el-table-column>
218 221
 
222
+                                           
223
+
219 224
 
220 225
                                                 <el-table-column label="规格" width="60">
221 226
                                                     <template slot-scope="scope">{{ scope.row.single_dose }}</template>
@@ -223,6 +228,13 @@
223 228
                                                 <el-table-column label="单价" width="40">
224 229
                                                     <template slot-scope="scope">{{ scope.row.price }}</template>
225 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 238
                                             </el-table>
227 239
                                         </div>
228 240
                                     </el-tab-pane>
@@ -818,6 +830,7 @@
818 830
             return false
819 831
           } else {
820 832
             this.drugs = response.data.data.drugs
833
+            console.log("drugs------------------------",this.drugs)
821 834
             if (this.org_id == 10206) {
822 835
               for (let i = 0; i < this.zuobiao_drug.length; i++) {
823 836
                 for (let b = 0; b < this.drugs.length; b++) {
@@ -2185,6 +2198,7 @@
2185 2198
         getHisProject().then(response => {
2186 2199
           if (response.data.state == 1) {
2187 2200
             var project = response.data.data.project
2201
+            
2188 2202
             for (let i = 0; i < project.length; i++) {
2189 2203
               let obj = {
2190 2204
                 id: project[i].id,
@@ -2204,7 +2218,7 @@
2204 2218
                 number: "",
2205 2219
                 bbx01:project[i].bbx01,
2206 2220
                 bby01:project[i].bby01,
2207
-
2221
+                sum_count:""
2208 2222
 
2209 2223
               }
2210 2224
 
@@ -2212,7 +2226,7 @@
2212 2226
             }
2213 2227
 
2214 2228
             var good_info = response.data.data.good_info
2215
-
2229
+            console.log("good_info000000000000000000000",good_info)
2216 2230
             for (let i = 0; i < good_info.length; i++) {
2217 2231
               let obj = {
2218 2232
                 id: good_info[i].id,
@@ -2232,7 +2246,7 @@
2232 2246
                 number: good_info[i].good_number,
2233 2247
                 bbx01:good_info[i].bbx01,
2234 2248
                 bby01:good_info[i].bby01,
2235
-
2249
+                sum_count:good_info[i].sum_count
2236 2250
 
2237 2251
               }
2238 2252
               this.tabProject.push(obj)
@@ -2561,6 +2575,31 @@
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 2604
     }, created() {
2566 2605
       for(let key in this.$store.getters.treatment_mode){

+ 12 - 2
src/xt_pages/stock/detail/cancelStockDetail.vue Visa fil

@@ -60,7 +60,6 @@
60 60
           align="right"
61 61
           format="yyyy-MM-dd"
62 62
           value-format="yyyy-MM-dd"
63
-          @change="startTimeChange"
64 63
         ></el-date-picker>
65 64
         <span class="cellLine"> - </span>
66 65
         <el-date-picker
@@ -74,8 +73,16 @@
74 73
           align="right"
75 74
           format="yyyy-MM-dd"
76 75
           value-format="yyyy-MM-dd"
77
-          @change="endTimeChange"
78 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 87
     </div>
81 88
 
@@ -526,6 +533,9 @@ export default {
526 533
         this.GetCancelStock();
527 534
       }
528 535
     },
536
+    getAllQuery(){
537
+      this.GetCancelStock();
538
+    },
529 539
     getTimestamp(time) {
530 540
       // 把时间日期转成时间戳
531 541
       return new Date(time).getTime() / 1000;

+ 11 - 3
src/xt_pages/stock/detail/stockInDetail.vue Visa fil

@@ -63,7 +63,6 @@
63 63
           align="right"
64 64
           format="yyyy-MM-dd"
65 65
           value-format="yyyy-MM-dd"
66
-          @change="startTimeChange"
67 66
           
68 67
         ></el-date-picker>
69 68
         <span class="cellLine"> - </span>
@@ -78,9 +77,15 @@
78 77
           align="right"
79 78
           format="yyyy-MM-dd"
80 79
           value-format="yyyy-MM-dd"
81
-          @change="endTimeChange"
82 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 89
     </div>
85 90
 
86 91
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
@@ -496,6 +501,9 @@ export default {
496 501
         this.GetCancelStock();
497 502
       }
498 503
     },
504
+    getAllQuery(){
505
+      this.GetCancelStock();
506
+    },
499 507
     getTimestamp(time) {
500 508
       // 把时间日期转成时间戳
501 509
       return new Date(time).getTime() / 1000;

+ 12 - 2
src/xt_pages/stock/detail/stockOutDetail.vue Visa fil

@@ -71,7 +71,6 @@
71 71
           align="right"
72 72
           format="yyyy-MM-dd"
73 73
           value-format="yyyy-MM-dd"
74
-          @change="startTimeChange"
75 74
         ></el-date-picker>
76 75
         <span class="cellLine"> - </span>
77 76
         <el-date-picker
@@ -85,9 +84,17 @@
85 84
           align="right"
86 85
           format="yyyy-MM-dd"
87 86
           value-format="yyyy-MM-dd"
88
-          @change="endTimeChange"
89 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 98
     </div>
92 99
 
93 100
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
@@ -521,6 +528,9 @@ export default {
521 528
       this.GetCancelStock();
522 529
       // this.getPrintStockGood()
523 530
     },
531
+    getAllQuery(){
532
+      this.GetCancelStock();
533
+    },
524 534
     startTimeChange(val) {
525 535
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
526 536
       if (time > 0) {

+ 11 - 2
src/xt_pages/stock/drugs/components/drugCancelDetail.vue Visa fil

@@ -51,7 +51,6 @@
51 51
           align="right"
52 52
           format="yyyy-MM-dd"
53 53
           value-format="yyyy-MM-dd"
54
-          @change="startTimeChange"
55 54
         ></el-date-picker>
56 55
         <span class="cellLine"> - </span>
57 56
         <el-date-picker
@@ -65,8 +64,15 @@
65 64
           align="right"
66 65
           format="yyyy-MM-dd"
67 66
           value-format="yyyy-MM-dd"
68
-          @change="endTimeChange"
69 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 76
       </div>
71 77
     </div>
72 78
 
@@ -322,6 +328,9 @@ export default {
322 328
         this.getlist()
323 329
       }
324 330
     },
331
+    getAllQuery(){
332
+      this.getlist()
333
+    },
325 334
     getTimestamp(time) {
326 335
       // 把时间日期转成时间戳
327 336
       return new Date(time).getTime() / 1000;

+ 12 - 2
src/xt_pages/stock/drugs/components/drugInOrder.vue Visa fil

@@ -61,7 +61,6 @@
61 61
           align="right"
62 62
           format="yyyy-MM-dd"
63 63
           value-format="yyyy-MM-dd"
64
-          @change="startTimeChange"
65 64
          
66 65
         ></el-date-picker>
67 66
         <span class="cellLine"> - </span>
@@ -76,8 +75,15 @@
76 75
           align="right"
77 76
           format="yyyy-MM-dd"
78 77
           value-format="yyyy-MM-dd"
79
-          @change="endTimeChange"
80 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 87
     </div>
82 88
 
83 89
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
@@ -329,6 +335,10 @@ export default {
329 335
         this.getDrugWarehouseInfoPrint()
330 336
       }
331 337
     },
338
+    getAllQuery(){
339
+      this.getlist()
340
+      this.getDrugWarehouseInfoPrint()
341
+    },
332 342
     getTimestamp(time) {
333 343
       // 把时间日期转成时间戳
334 344
       return new Date(time).getTime() / 1000;

+ 12 - 2
src/xt_pages/stock/drugs/components/drugOutDetail.vue Visa fil

@@ -77,7 +77,6 @@
77 77
           align="right"
78 78
           format="yyyy-MM-dd"
79 79
           value-format="yyyy-MM-dd"
80
-          @change="startTimeChange"
81 80
         ></el-date-picker>
82 81
         <span class="cellLine"> - </span>
83 82
         <el-date-picker
@@ -91,8 +90,15 @@
91 90
           align="right"
92 91
           format="yyyy-MM-dd"
93 92
           value-format="yyyy-MM-dd"
94
-          @change="endTimeChange"
95 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 103
     </div>
98 104
 
@@ -395,6 +401,10 @@ export default {
395 401
         this.getDrugOutOrderPrint()
396 402
       }
397 403
     },
404
+    getAllQuery(){
405
+      this.getlist()
406
+      this.getDrugOutOrderPrint()
407
+    },
398 408
     getTimestamp(time) {
399 409
       // 把时间日期转成时间戳
400 410
       return new Date(time).getTime() / 1000;

+ 144 - 75
src/xt_pages/stock/drugs/drugInventoryModePrint.vue Visa fil

@@ -20,7 +20,6 @@
20 20
                     <tr>
21 21
                         <td align="center">药品名称</td>
22 22
                         <td align="center">规格</td>
23
-                     
24 23
                         <td align="center">本月入库数量</td>
25 24
                         <td align="center">本月出库数量</td>
26 25
                         <td align="center">本月剩余库存</td>
@@ -33,11 +32,11 @@
33 32
                     </tr>
34 33
 
35 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 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 40
                         <td align="center">
42 41
                             <table
43 42
                                 class="ware_table"
@@ -70,14 +69,14 @@
70 69
                                         },
71 70
                                     ]"
72 71
                                     >
73
-                                    {{ it.number }}
72
+                                    {{ it.batch_number }}
74 73
                                     </td>
75 74
                               </tr>
76 75
                             </table>
77 76
                         </td>
78 77
                        
79 78
                         <td align="center">
80
-                            <table
79
+                             <table
81 80
                                 class="ware_table"
82 81
                                 style="width: 100%; border-collapse: collapse"
83 82
                                 >
@@ -114,7 +113,7 @@
114 113
                             </table>
115 114
                         </td>
116 115
                         <td align="center">
117
-                            <table
116
+                          <table
118 117
                                 class="ware_table"
119 118
                                 style="width: 100%; border-collapse: collapse"
120 119
                                 >
@@ -148,7 +147,7 @@
148 147
                                     {{ getTime(it.expiry_date) }}
149 148
                                     </td>
150 149
                               </tr>
151
-                            </table>
150
+                            </table> 
152 151
                         </td>
153 152
                         <td align="center">
154 153
 
@@ -217,8 +216,8 @@ import { getDrugInventroyModePrintList } from  "@/api/stock"
217 216
        return{
218 217
         crumbs: [
219 218
             { path: false, name: '库存管理' },
220
-            { path: false, name: '耗材管理' },
221
-            { path: false, name: '耗材模版打印' },
219
+            { path: false, name: '药品管理' },
220
+            { path: false, name: '药品模版打印' },
222 221
           ],
223 222
           tableList:[],
224 223
           org_name: this.$store.getters.xt_user.org.org_name,
@@ -226,10 +225,8 @@ import { getDrugInventroyModePrintList } from  "@/api/stock"
226 225
           end_time:"",
227 226
           manufacturerList:[],
228 227
           infoList:[],
229
-          outinfo:[],
230
-          flowProList:[],
231
-          flowNoProList:[],
232
-          goodInfo:[]
228
+          drugList:[],
229
+          outList:[]
233 230
        }
234 231
      },
235 232
      methods:{
@@ -264,19 +261,23 @@ import { getDrugInventroyModePrintList } from  "@/api/stock"
264 261
               if(response.data.state == 1){
265 262
                  var list  =  response.data.data.list
266 263
 
267
-                 console.log("list===============",list)
264
+                 console.log("list===============998",list)
268 265
 
269 266
                 if(list!=null && list.length > 0){
270 267
                   let dataInfo = {}
271 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 273
                       child: [],
277 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,7 +285,7 @@ import { getDrugInventroyModePrintList } from  "@/api/stock"
284 285
                 
285 286
                 for(let i=0;i<arr.length;i++){
286 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 289
                           arr[i].child.push(list[j])
289 290
                        }
290 291
                    }
@@ -298,13 +299,10 @@ import { getDrugInventroyModePrintList } from  "@/api/stock"
298 299
 
299 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,78 +316,149 @@ import { getDrugInventroyModePrintList } from  "@/api/stock"
318 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 321
           var newArr =[]
324
-          var total_count =0
325
-          var newArrOne = []
326
-          var total_count_one  = 0
327 322
           var total =0
323
+          var min_str  =""
324
+          var max_str = ""
328 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 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 348
           if(newArr!=null){
334 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 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 407
           if(newArr!=null){
365 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 Visa fil

@@ -43,16 +43,18 @@
43 43
                         <td align="center">{{ getTime(item.expiry_date) }}</td>
44 44
                         <td align="center">{{ getHouseName(item.storehouse_id) }}</td>
45 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 50
                         </td> 
51 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 58
                         </td>
57 59
                         <td align="center">
58 60
                             <span v-if="item.reason == 10">盘盈</span>

+ 2 - 2
src/xt_pages/stock/drugs/inventory_record.vue Visa fil

@@ -57,7 +57,7 @@
57 57
             </div>
58 58
             <div>
59 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 61
             </div>
62 62
           
63 63
         </div>
@@ -212,7 +212,7 @@ export default {
212 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 217
         handleSizeChange(val){
218 218
          this.limit = val

+ 2 - 2
src/xt_pages/stock/stockInventory.vue Visa fil

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

+ 13 - 13
src/xt_permission.js Visa fil

@@ -12,19 +12,19 @@ const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名
12 12
 
13 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 29
   NProgress.start()
30 30
   // console.log(store.getters.current_role_urls.indexOf(to.path))