Ver código fonte

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

28169 1 ano atrás
pai
commit
ec45a45915

+ 2 - 2
src/xt_pages/outpatientCharges/invoicePrint.vue Ver arquivo

14
         <div class='dialysisPage'>
14
         <div class='dialysisPage'>
15
           <div v-if="org_id != 10106 && org_id != 10215 && org_id != 4 && org_id != 10188 && org_id != 10217 && org_id != 10387&& org_id != 10210 && org_id != 10387 && org_id != 10480 " >
15
           <div v-if="org_id != 10106 && org_id != 10215 && org_id != 4 && org_id != 10188 && org_id != 10217 && org_id != 10387&& org_id != 10210 && org_id != 10387 && org_id != 10480 " >
16
             <printOne v-if="org_id != 10088 && org_id != 10510 && org_id != 0" :paramsObj="invoiceParams"></printOne>
16
             <printOne v-if="org_id != 10088 && org_id != 10510 && org_id != 0" :paramsObj="invoiceParams"></printOne>
17
-            <printThree v-if="org_id == 10088 || org_id == 10510" :paramsObj="invoiceParams"></printThree>
18
-            <!-- <printfifteen v-if="org_id == 10510 || org_id == 0" :paramsObj="invoiceParams"></printfifteen> -->
17
+            <printThree v-if="org_id == 10088 " :paramsObj="invoiceParams"></printThree>
18
+            <printfifteen v-if="org_id == 10510 || org_id == 0" :paramsObj="invoiceParams"></printfifteen>
19
           </div>
19
           </div>
20
           <printTwo v-if="org_id == 10106" :paramsObj="invoiceParams"></printTwo>
20
           <printTwo v-if="org_id == 10106" :paramsObj="invoiceParams"></printTwo>
21
           <printFour v-if="org_id == 10215 || org_id == 4 " :paramsObj="invoiceParams"></printFour>
21
           <printFour v-if="org_id == 10215 || org_id == 4 " :paramsObj="invoiceParams"></printFour>

+ 3 - 3
src/xt_pages/outpatientCharges/statementPrint.vue Ver arquivo

59
       <!-- 阜阳经沃   org_id != 0 && -->
59
       <!-- 阜阳经沃   org_id != 0 && -->
60
       <printtwelve :info="info" v-if="org_id == 10480 "></printtwelve>
60
       <printtwelve :info="info" v-if="org_id == 10480 "></printtwelve>
61
       <!-- 大冶 -->
61
       <!-- 大冶 -->
62
-      <!-- <printthirteen :info="info" v-if="org_id == 10510 || org_id == 0"></printthirteen> -->
62
+      <printthirteen :info="info" v-if="org_id == 10510 || org_id == 0"></printthirteen>
63
       <printOne :info="info" v-if=" org_id != 9990 &&
63
       <printOne :info="info" v-if=" org_id != 9990 &&
64
             org_id != 10138 &&
64
             org_id != 10138 &&
65
             org_id != 9504 &&
65
             org_id != 9504 &&
66
             org_id != 10028 &&
66
             org_id != 10028 &&
67
             org_id != 0 &&
67
             org_id != 0 &&
68
-            org_id != 10278 && org_id != 10387 && org_id != 10191 &&org_id != 10210 &&org_id != 10485 &&org_id != 10480   && this.paramsObj.balance_accounts_type == 1">
68
+            org_id != 10278 && org_id != 10387 && org_id != 10191 &&org_id != 10210 &&org_id != 10485 &&org_id != 10480 &&org_id != 10510   && this.paramsObj.balance_accounts_type == 1">
69
       </printOne>
69
       </printOne>
70
 
70
 
71
       <privateChargePrint :info="info" v-if="org_id != 9990 &&
71
       <privateChargePrint :info="info" v-if="org_id != 9990 &&
72
             org_id != 10138 &&
72
             org_id != 10138 &&
73
             org_id != 9504 &&
73
             org_id != 9504 &&
74
             org_id != 10028 &&
74
             org_id != 10028 &&
75
-            org_id != 10278 && org_id != 10387 && org_id != 10191 &&org_id != 10210 &&org_id != 10485  &&org_id != 10480  && org_id != 0 && this.paramsObj.balance_accounts_type == 2">
75
+            org_id != 10278 && org_id != 10387 && org_id != 10191 &&org_id != 10210 &&org_id != 10485  &&org_id != 10480 &&org_id != 10510  && org_id != 0 && this.paramsObj.balance_accounts_type == 2">
76
       </privateChargePrint>
76
       </privateChargePrint>
77
 
77
 
78
     </div>
78
     </div>

+ 3 - 3
src/xt_pages/outpatientCharges/statementTemplate/printthirteen.vue Ver arquivo

136
       </tr>
136
       </tr>
137
       <tr>
137
       <tr>
138
         <td colspan="12" style="text-align:left;padding-left:10px;">
138
         <td colspan="12" style="text-align:left;padding-left:10px;">
139
-          <!-- 本次就医:总费用{{info.medfee_sumamt}}元,基金支付{{info.fund_pay_sumamt}}元,个人支付{{info.new_order.psn_cash_pay}}元。
140
-          (起付线 {{info.act_pay_dedc}}元, 先自付 {{info.preselfpay_amt}}元, 段内自付 {{(info.new_order.psn_cash_pay - info.preselfpay_amt).toFixed(2)}} ) -->
139
+          本次就医:总费用{{info.medfee_sumamt}}元,基金支付{{info.fund_pay_sumamt}}元,个人支付{{info.new_order.psn_cash_pay}}元。
140
+          (起付线 {{info.act_pay_dedc}}元, 先自付 {{info.preselfpay_amt}}元, 段内自付 {{(info.new_order.psn_cash_pay - info.preselfpay_amt).toFixed(2)}} )
141
         </td>
141
         </td>
142
       </tr>
142
       </tr>
143
       <tr>
143
       <tr>
268
         </td>
268
         </td>
269
 
269
 
270
         <td>报销比例</td>
270
         <td>报销比例</td>
271
-        <!-- <td colspan="2" style="text-align:right;padding-right:10px;">{{info.new_order.pool_prop_selfpay}}</td> -->
271
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.new_order.pool_prop_selfpay}}</td>
272
         <td colspan="2" style="text-align:right;padding-right:10px;"></td>
272
         <td colspan="2" style="text-align:right;padding-right:10px;"></td>
273
         <td colspan="2" style="text-align:right;padding-right:10px;"></td>
273
         <td colspan="2" style="text-align:right;padding-right:10px;"></td>
274
       </tr>
274
       </tr>

+ 63 - 7
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Ver arquivo

311
                                     <el-table-column label="名称"  v-if="org_id == 10206">
311
                                     <el-table-column label="名称"  v-if="org_id == 10206">
312
                                       <template slot-scope="scope">{{ scope.row.drug_name}} {{scope.row.number}}</template>
312
                                       <template slot-scope="scope">{{ scope.row.drug_name}} {{scope.row.number}}</template>
313
                                     </el-table-column>
313
                                     </el-table-column>
314
-                                      <el-table-column label="规格" width="60" v-if="org_id == 10206 || org_id == 0">
314
+                                      <el-table-column label="规格" width="60" v-if="org_id == 10206">
315
                                           <template slot-scope="scope">
315
                                           <template slot-scope="scope">
316
                                               <span>{{scope.row.drug_spec}}</span>
316
                                               <span>{{scope.row.drug_spec}}</span>
317
                                           </template>
317
                                           </template>
318
                                       </el-table-column>
318
                                       </el-table-column>
319
-                                    <el-table-column label="规格" width="60" v-if="org_id != 10206 && org_id != 0">
319
+                                    <el-table-column label="规格" width="60" v-if="org_id != 10206">
320
                                       <template slot-scope="scope">
320
                                       <template slot-scope="scope">
321
                                         <span v-if="scope.row.min_unit != scope.row.dose_unit">{{scope.row.dose}}{{scope.row.dose_unit}}&nbsp;* &nbsp;</span>{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
321
                                         <span v-if="scope.row.min_unit != scope.row.dose_unit">{{scope.row.dose}}{{scope.row.dose_unit}}&nbsp;* &nbsp;</span>{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
322
                                       </template>
322
                                       </template>
323
                                     </el-table-column>
323
                                     </el-table-column>
324
 
324
 
325
-                                      <el-table-column label="库存" width="60" v-if="org_id != 10206 && org_id != 0">
325
+                                      <el-table-column label="库存" width="60" v-if="org_id != 10206">
326
                                           <template slot-scope="scope">
326
                                           <template slot-scope="scope">
327
                                              <!-- <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id == 10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id ==9956 || org_id == 10188 || org_id == 10191 || org_id == 10278 || org_id == 10217 || org_id ==10210 || org_id ==record_date ||org_id ==10340">
327
                                              <!-- <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id == 10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id ==9956 || org_id == 10188 || org_id == 10191 || org_id == 10278 || org_id == 10217 || org_id ==10210 || org_id ==record_date ||org_id ==10340">
328
                                              <span v-if="scope.row.count/scope.row.min_number>0">{{Math.floor(scope.row.count/scope.row.min_number)}}{{scope.row.max_unit}}</span>
328
                                              <span v-if="scope.row.count/scope.row.min_number>0">{{Math.floor(scope.row.count/scope.row.min_number)}}{{scope.row.max_unit}}</span>
336
                                       </el-table-column>
336
                                       </el-table-column>
337
 
337
 
338
 <!--                                    //针对对接坐标系统的,使用坐标的库存数据-->
338
 <!--                                    //针对对接坐标系统的,使用坐标的库存数据-->
339
-                                    <el-table-column label="库存" width="60" v-if="org_id == 10206 || org_id == 0">
339
+                                    <el-table-column label="库存" width="60" v-if="org_id == 10206">
340
                                       <template slot-scope="scope">
340
                                       <template slot-scope="scope">
341
                                         <span>{{scope.row.zuobiao_stock_num}}</span>
341
                                         <span>{{scope.row.zuobiao_stock_num}}</span>
342
                                       </template>
342
                                       </template>
543
 
543
 
544
 export default {
544
 export default {
545
   props: {
545
   props: {
546
-    zuobiao_drug:Array,
547
     drugs:Array,
546
     drugs:Array,
548
     allDrugs:Array,
547
     allDrugs:Array,
549
     advices_template:Array,
548
     advices_template:Array,
582
   data() {
581
   data() {
583
     return {
582
     return {
584
       drugs:[],
583
       drugs:[],
584
+      zuobiao_drug:[],
585
       zuobiao_project:[],
585
       zuobiao_project:[],
586
       start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
586
       start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
587
       end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
587
       end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
2000
     },
2000
     },
2001
     setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data, last_info,sick,diagnoses,patient_diagnose) {
2001
     setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data, last_info,sick,diagnoses,patient_diagnose) {
2002
       console.log("诊断23333333333333",this.diagnose)
2002
       console.log("诊断23333333333333",this.diagnose)
2003
+
2004
+      //针对普爱医院获取药品和耗材相关库存数据
2005
+      if (this.org_id == 10206 && this.zuobiao_drug.length == 0) {
2006
+        var that = this
2007
+        axios.get('http://127.0.0.1:9532' + '/nmg/coordinate/querystockdrug', {})
2008
+          .then(function(response) {
2009
+            if (response.data.state == 0) {
2010
+              that.$message.error(response.data.msg)
2011
+              that.loadingtwo = false
2012
+              return false
2013
+            } else {
2014
+              if (response.data.data.failed_code == -10) {
2015
+                that.$confirm(response.data.data.msg, '医保错误信息', {
2016
+                  confirmButtonText: '确 定',
2017
+                  type: 'warning'
2018
+                }).then(() => {
2019
+
2020
+                }).catch(() => {
2021
+                })
2022
+
2023
+              } else {
2024
+                that.zuobiao_drug = response.data.data.drug
2025
+                console.log('坐标~~坐标')
2026
+                console.log(that.zuobiao_drug)
2027
+                console.log(response.data.data.drug)
2028
+                console.log('坐标~~坐标')
2029
+
2030
+                // that.zuobiao_project  = response.data.data.project
2031
+                //跟坐标数据进行匹配,如果bbx01相等的话则,替换库存数量
2032
+                for (let i = 0; i < that.zuobiao_drug.length; i++) {
2033
+                  for (let b = 0; b < that.drugs.length; b++) {
2034
+                    if (that.zuobiao_drug[i].bby01 == that.drugs[b].bby01) {
2035
+                      that.drugs[b]['zuobiao_stock_num'] = that.zuobiao_drug[i].sysl
2036
+                      that.drugs[b].min_price = that.zuobiao_drug[i].lsj
2037
+
2038
+                    }
2039
+
2040
+                  }
2041
+                }
2042
+                console.log('坐标~~坐标')
2043
+                console.log(that.drugs)
2044
+                console.log('坐标~~坐标')
2045
+
2046
+              }
2047
+            }
2048
+          })
2049
+          .catch(function(error) {
2050
+          })
2051
+      }
2052
+
2053
+
2054
+
2055
+
2056
+
2057
+
2058
+
2059
+
2003
       this.sick = sick
2060
       this.sick = sick
2004
       this.diagnoses = diagnoses
2061
       this.diagnoses = diagnoses
2005
       this.department = department
2062
       this.department = department
2233
 
2290
 
2234
       if(this.org_id == 10206 || this.org_id == 0){
2291
       if(this.org_id == 10206 || this.org_id == 0){
2235
         this.departmentValue = 263
2292
         this.departmentValue = 263
2236
-        this.state1 = 677
2237
         if (this.diagnose.length == 0){
2293
         if (this.diagnose.length == 0){
2238
           this.diagnose.push(716)
2294
           this.diagnose.push(716)
2239
         }
2295
         }
3634
         }
3690
         }
3635
        }
3691
        }
3636
 
3692
 
3637
-      if ( this.org_id == 10206) {
3693
+      if ( this.org_id == 10206 && row.zuobiao_stock_num <= 0) {
3638
         if (row.type == 3) {
3694
         if (row.type == 3) {
3639
           if (selection) {
3695
           if (selection) {
3640
             selection.forEach(row => {
3696
             selection.forEach(row => {

+ 12 - 2
src/xt_pages/outpatientDoctorStation/components/prescriptionTemplateTable.vue Ver arquivo

11
                     </div>
11
                     </div>
12
                 </template>
12
                 </template>
13
             </el-table-column>
13
             </el-table-column>
14
-            <el-table-column align="center" prop="drug_name" label="名称"  width="297" >
14
+            <el-table-column align="center" prop="drug_name" label="名称"  width="297" v-if="$store.getters.xt_user.org_id != 10206 && $store.getters.xt_user.org_id != 0 " >
15
                 <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span>
15
                 <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span>
16
                 </template>
16
                 </template>
17
             </el-table-column>
17
             </el-table-column>
18
 
18
 
19
+          <el-table-column align="center" prop="drug_name" label="名称"  width="297"  v-if="$store.getters.xt_user.org_id == 10206 || $store.getters.xt_user.org_id == 0">
20
+            <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}{{scope.row.drug.number}}</span>
21
+            </template>
22
+          </el-table-column>
23
+
19
           <el-table-column align="center" prop="single_dose" width="150" label="单次用量">
24
           <el-table-column align="center" prop="single_dose" width="150" label="单次用量">
20
             <template slot-scope="scope">
25
             <template slot-scope="scope">
21
               <div style="display:flex;align-items:center;">
26
               <div style="display:flex;align-items:center;">
125
                 {{scope.$index+1}}
130
                 {{scope.$index+1}}
126
               </template>
131
               </template>
127
             </el-table-column>
132
             </el-table-column>
128
-            <el-table-column align="center" prop="project_name" label="名称">
133
+            <el-table-column align="center" prop="project_name" label="名称" v-if="$store.getters.xt_user.org_id != 10206 && $store.getters.xt_user.org_id != 0">
129
                 <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span>
134
                 <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span>
130
                 </template>
135
                 </template>
131
             </el-table-column>
136
             </el-table-column>
137
+          <el-table-column align="center" prop="project_name" label="名称" v-if="$store.getters.xt_user.org_id == 10206 || $store.getters.xt_user.org_id == 0">
138
+            <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}{{scope.row.number}}</span>
139
+            </template>
140
+          </el-table-column>
141
+
132
             <el-table-column align="center" prop="statistical_classification" width="100" label="组">
142
             <el-table-column align="center" prop="statistical_classification" width="100" label="组">
133
                 <template slot-scope="scope">{{scope.row.type ==
143
                 <template slot-scope="scope">{{scope.row.type ==
134
                     2?getGroup(scope.row.statistical_classification):'耗材'}}
144
                     2?getGroup(scope.row.statistical_classification):'耗材'}}

+ 0 - 77
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Ver arquivo

161
                            v-on:change="changeOther"
161
                            v-on:change="changeOther"
162
                            v-on:month="changeMonth"
162
                            v-on:month="changeMonth"
163
                            v-on:day="changeDay"
163
                            v-on:day="changeDay"
164
-                           :zuobiao_drug="zuobiao_drug"
165
 
164
 
166
                            :month_prescriptions="month_prescriptions"
165
                            :month_prescriptions="month_prescriptions"
167
                            :org_id="org_id"
166
                            :org_id="org_id"
627
       printDate: '',
626
       printDate: '',
628
       anticoagulants_confit: null,
627
       anticoagulants_confit: null,
629
       patient_diagnoses: [],
628
       patient_diagnoses: [],
630
-      zuobiao_drug: []
631
       // zuobiao_project:[],
629
       // zuobiao_project:[],
632
     }
630
     }
633
   },
631
   },
1509
 
1507
 
1510
           this.additions = response.data.data.additions
1508
           this.additions = response.data.data.additions
1511
 
1509
 
1512
-          //针对普爱医院获取药品和耗材相关库存数据
1513
-          if (this.org_id == 10206) {
1514
-            var that = this
1515
-            axios.get('http://127.0.0.1:9532' + '/nmg/coordinate/querystockdrug', {})
1516
-              .then(function(response) {
1517
-                if (response.data.state == 0) {
1518
-                  that.$message.error(response.data.msg)
1519
-                  that.loadingtwo = false
1520
-                  return false
1521
-                } else {
1522
-                  if (response.data.data.failed_code == -10) {
1523
-                    that.$confirm(response.data.data.msg, '医保错误信息', {
1524
-                      confirmButtonText: '确 定',
1525
-                      type: 'warning'
1526
-                    }).then(() => {
1527
-
1528
-                    }).catch(() => {
1529
-                    })
1530
-
1531
-                  } else {
1532
-                    that.zuobiao_drug = response.data.data.drug
1533
-                    console.log('坐标~~坐标')
1534
-                    console.log(that.zuobiao_drug)
1535
-                    console.log(response.data.data.drug)
1536
-                    console.log('坐标~~坐标')
1537
-
1538
-                    // that.zuobiao_project  = response.data.data.project
1539
-                    //跟坐标数据进行匹配,如果bbx01相等的话则,替换库存数量
1540
-                    for (let i = 0; i < that.zuobiao_drug.length; i++) {
1541
-                      for (let b = 0; b < that.drugs.length; b++) {
1542
-                        if (that.zuobiao_drug[i].bby01 == that.drugs[b].bby01) {
1543
-                          that.drugs[b]['zuobiao_stock_num'] = that.zuobiao_drug[i].sysl
1544
-                          that.drugs[b].min_price = that.zuobiao_drug[i].lsj
1545
 
1510
 
1546
-                        }
1547
-
1548
-                      }
1549
-                    }
1550
-                    console.log('坐标~~坐标')
1551
-                    console.log(that.drugs)
1552
-                    console.log('坐标~~坐标')
1553
-
1554
-                  }
1555
-                }
1556
-              })
1557
-              .catch(function(error) {
1558
-              })
1559
-          }
1560
         }
1511
         }
1561
       })
1512
       })
1562
 
1513
 
5549
 
5500
 
5550
   },
5501
   },
5551
   created() {
5502
   created() {
5552
-    axios.post('https://api.xt.kuyicloud.com' + '/coordinate/settle', {
5553
-      params: { 'vaa01': '00000', 'vaa07': '111111' }
5554
-    })
5555
-      .then(function(response) {
5556
-        if (response.data.state == 0) {
5557
-          that.$message.error(response.data.msg)
5558
-          that.loadingtwo = false
5559
-          return false
5560
-        } else {
5561
-          if (response.data.data.failed_code == -10) {
5562
-            that.$confirm(response.data.data.msg, '医保错误信息', {
5563
-              confirmButtonText: '确 定',
5564
-              type: 'warning'
5565
-            }).then(() => {
5566
-
5567
-            }).catch(() => {
5568
-            })
5569
-
5570
-          } else {
5571
-            // that.zuobiao_drug  = response.data.data.drug
5572
-            // that.zuobiao_project  = response.data.data.project
5573
-
5574
-          }
5575
-        }
5576
-      })
5577
-      .catch(function(error) {
5578
-      })
5579
-
5580
     this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
5503
     this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
5581
     this.printDate = moment().format('YYYY-MM-DD HH:mm:ss')
5504
     this.printDate = moment().format('YYYY-MM-DD HH:mm:ss')
5582
     this.$nextTick(() => {
5505
     this.$nextTick(() => {

+ 185 - 9
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue Ver arquivo

150
                                               {{ scope.row.min_number }}{{ scope.row.min_unit }}/{{ scope.row.max_unit }}
150
                                               {{ scope.row.min_number }}{{ scope.row.min_unit }}/{{ scope.row.max_unit }}
151
                                             </template>
151
                                             </template>
152
                                           </el-table-column>
152
                                           </el-table-column>
153
+
154
+                                          <el-table-column label="库存" width="60" v-if="org_id == 10206" >
155
+                                            <template slot-scope="scope">{{ scope.row.zuobiao_stock_num }}</template>
156
+                                          </el-table-column>
157
+
158
+
153
                                           <el-table-column label="规格" width="60" v-if="org_id == 10206 || org_id == 0">
159
                                           <el-table-column label="规格" width="60" v-if="org_id == 10206 || org_id == 0">
154
                                             <template slot-scope="scope">
160
                                             <template slot-scope="scope">
155
                                               <span>{{scope.row.drug_spec}}</span>
161
                                               <span>{{scope.row.drug_spec}}</span>
205
                                               <el-table-column prop="name" label="名称" v-if="org_id == 10206 || org_id == 0">
211
                                               <el-table-column prop="name" label="名称" v-if="org_id == 10206 || org_id == 0">
206
                                                 <template slot-scope="scope">{{ scope.row.project_name }}{{scope.row.number?"("+scope.row.number+")":""}}</template>
212
                                                 <template slot-scope="scope">{{ scope.row.project_name }}{{scope.row.number?"("+scope.row.number+")":""}}</template>
207
                                               </el-table-column>
213
                                               </el-table-column>
214
+
215
+                                              <el-table-column label="库存" width="60" v-if="org_id == 10206" >
216
+                                                <template slot-scope="scope">{{ scope.row.type == 3?scope.row.zuobiao_stock_num :""}}</template>
217
+                                              </el-table-column>
218
+
219
+
208
                                                 <el-table-column label="规格" width="60">
220
                                                 <el-table-column label="规格" width="60">
209
                                                     <template slot-scope="scope">{{ scope.row.single_dose }}</template>
221
                                                     <template slot-scope="scope">{{ scope.row.single_dose }}</template>
210
                                                 </el-table-column>
222
                                                 </el-table-column>
277
   import { uParseTime } from '@/utils/tools'
289
   import { uParseTime } from '@/utils/tools'
278
   import PrescriptionTemplateTable from './components/prescriptionTemplateTable'
290
   import PrescriptionTemplateTable from './components/prescriptionTemplateTable'
279
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
291
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
292
+  import axios from 'axios'
280
 
293
 
281
   const moment = require('moment')
294
   const moment = require('moment')
282
   export default {
295
   export default {
427
 
440
 
428
         hisList: [],
441
         hisList: [],
429
         id:0,
442
         id:0,
443
+        zuobiao_drug:[],
444
+        zuobiao_project:[],
430
       }
445
       }
431
     },
446
     },
432
     methods: {
447
     methods: {
448
+      getZuobiaoDrugStock(){
449
+        if (this.org_id == 10206) {
450
+          var that = this
451
+          axios.get('http://127.0.0.1:9532' + '/nmg/coordinate/querystockdrug', {})
452
+            .then(function(response) {
453
+              if (response.data.state == 0) {
454
+                that.$message.error(response.data.msg)
455
+                that.loadingtwo = false
456
+                return false
457
+              } else {
458
+                if (response.data.data.failed_code == -10) {
459
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
460
+                    confirmButtonText: '确 定',
461
+                    type: 'warning'
462
+                  }).then(() => {
463
+
464
+                  }).catch(() => {
465
+                  })
466
+
467
+                } else {
468
+                  that.zuobiao_drug = response.data.data.drug
469
+                  // console.log('坐标~~坐标')
470
+                  // console.log(that.zuobiao_drug)
471
+                  // console.log(response.data.data.drug)
472
+                  // console.log('坐标~~坐标')
473
+                  //
474
+                  // // that.zuobiao_project  = response.data.data.project
475
+                  // //跟坐标数据进行匹配,如果bbx01相等的话则,替换库存数量
476
+                  // for (let i = 0; i < that.zuobiao_drug.length; i++) {
477
+                  //   for (let b = 0; b < that.drugs.length; b++) {
478
+                  //     if (that.zuobiao_drug[i].bby01 == that.drugs[b].bby01) {
479
+                  //       that.drugs[b]['zuobiao_stock_num'] = that.zuobiao_drug[i].sysl
480
+                  //       that.drugs[b].min_price = that.zuobiao_drug[i].lsj
481
+                  //
482
+                  //     }
483
+                  //
484
+                  //   }
485
+                  // }
486
+                  // console.log('坐标~~坐标')
487
+                  // console.log(that.drugs)
488
+                  // console.log('坐标~~坐标')
489
+
490
+                }
491
+              }
492
+            })
493
+            .catch(function(error) {
494
+            })
495
+        }
496
+
497
+
498
+      },
499
+      getZuobiaoGoodStock(){
500
+        if(this.org_id == 10206){
501
+          var that = this
502
+          axios.get("http://127.0.0.1:9532" + '/nmg/coordinate/querystockgood', {
503
+
504
+          })
505
+            .then(function(response) {
506
+              if (response.data.state == 0) {
507
+                that.$message.error(response.data.msg)
508
+                that.loadingtwo = false
509
+                return false
510
+              } else {
511
+                if (response.data.data.failed_code == -10) {
512
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
513
+                    confirmButtonText: '确 定',
514
+                    type: 'warning'
515
+                  }).then(() => {
516
+
517
+                  }).catch(() => {
518
+                  })
519
+
520
+                } else {
521
+                  // that.zuobiao_drug  = response.data.data.drug
522
+                  that.zuobiao_project  = response.data.data.project
523
+
524
+
525
+                }
526
+              }
527
+            })
528
+            .catch(function(error) {
529
+            })
530
+        }
531
+
532
+
533
+
534
+      },
433
       lili(){
535
       lili(){
434
         console.log("this.$store.getters.treatment_mode",this.$store.getters.treatment_mode)
536
         console.log("this.$store.getters.treatment_mode",this.$store.getters.treatment_mode)
435
       },
537
       },
711
             return false
813
             return false
712
           } else {
814
           } else {
713
             this.drugs = response.data.data.drugs
815
             this.drugs = response.data.data.drugs
816
+            if (this.org_id == 10206) {
817
+              for (let i = 0; i < this.zuobiao_drug.length; i++) {
818
+                for (let b = 0; b < this.drugs.length; b++) {
819
+                  if (this.zuobiao_drug[i].bby01 == this.drugs[b].bby01) {
820
+                    this.drugs[b]['zuobiao_stock_num'] = this.zuobiao_drug[i].sysl
821
+                    this.drugs[b].retail_price = this.zuobiao_drug[i].lsj
822
+                  }
823
+                }
824
+              }
825
+            }
826
+
714
             this.allDrugs = response.data.data.drugs
827
             this.allDrugs = response.data.data.drugs
715
             this.advices_template = response.data.data.advices_template
828
             this.advices_template = response.data.data.advices_template
716
             this.doctors = response.data.data.doctors
829
             this.doctors = response.data.data.doctors
1372
         this.$refs.additionalCharges.show()
1485
         this.$refs.additionalCharges.show()
1373
       },
1486
       },
1374
       selectDrugs(selection, row) {
1487
       selectDrugs(selection, row) {
1375
-        this.curDrugs = selection
1488
+        if(this.org_id == 10206){
1489
+          if (row.zuobiao_stock_num <= 0) {
1490
+            if (selection) {
1491
+              selection.forEach(row => {
1492
+                if (row.zuobiao_stock_num <= 0) {
1493
+                  this.$refs.multipleTable.toggleRowSelection(row)
1494
+                }
1495
+              })
1496
+            } else {
1497
+              this.$refs.multipleTable.clearSelection()
1498
+            }
1499
+            this.$message.error(row.drug_name + '库存不足')
1500
+            return
1501
+          }else{
1502
+            this.curDrugs = selection
1503
+          }
1504
+        }else{
1505
+          this.curDrugs = selection
1506
+        }
1376
       },
1507
       },
1377
 
1508
 
1378
       comfirm() {
1509
       comfirm() {
1379
-        console.log('222222222222', this.teamList)
1380
-
1381
         // if (this.curPrescriptions.order_status == 2) {
1510
         // if (this.curPrescriptions.order_status == 2) {
1382
         //   this.$message.error('该处方已经结算,无法继续添加药品或者项目')
1511
         //   this.$message.error('该处方已经结算,无法继续添加药品或者项目')
1383
         //   this.teamList = []
1512
         //   this.teamList = []
1414
         if (this.curDrugs.length > 0) {
1543
         if (this.curDrugs.length > 0) {
1415
           for (let i = 0; i < this.curDrugs.length; i++) {
1544
           for (let i = 0; i < this.curDrugs.length; i++) {
1416
             if(this.$store.getters.xt_user.org.id != 10206) {
1545
             if(this.$store.getters.xt_user.org.id != 10206) {
1417
-
1418
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
1546
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
1419
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
1547
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
1420
                 return
1548
                 return
1433
                 // return
1561
                 // return
1434
               }
1562
               }
1435
             }
1563
             }
1436
-
1437
           }
1564
           }
1438
-
1439
           let arr = this.teamList
1565
           let arr = this.teamList
1440
           let newArr = []
1566
           let newArr = []
1441
           arr.map(item => {
1567
           arr.map(item => {
1638
       }, changeAllGoodInfoTableDataTwo(row) {
1764
       }, changeAllGoodInfoTableDataTwo(row) {
1639
         this.teamList = row
1765
         this.teamList = row
1640
       },
1766
       },
1641
-      selectChange(row) {
1642
-        this.teamList = row
1767
+      selectChange(selection, row) {
1768
+        if ( this.org_id == 10206 && row.zuobiao_stock_num <= 0) {
1769
+          if (row.type == 3) {
1770
+            if (selection) {
1771
+              selection.forEach(row => {
1772
+                if (row.zuobiao_stock_num <= 0) {
1773
+                  this.$refs.tables.toggleRowSelection(row)
1774
+                }
1775
+              })
1776
+            } else {
1777
+              this.$refs.tables.clearSelection()
1778
+            }
1779
+
1780
+            this.$message.error(row.project_name + '库存不足')
1781
+            return
1782
+          }else{
1783
+            this.teamList = row
1784
+          }
1785
+        }else{
1786
+          this.teamList = row
1787
+        }
1643
       }, getPrescriptionTemplateInfo() {
1788
       }, getPrescriptionTemplateInfo() {
1644
         let params = {
1789
         let params = {
1645
           id: this.$route.query.id
1790
           id: this.$route.query.id
1680
                     groupno: prescription.advices[b].groupno,
1825
                     groupno: prescription.advices[b].groupno,
1681
                     frequency_type: prescription.advices[b].frequency_type,
1826
                     frequency_type: prescription.advices[b].frequency_type,
1682
                     day_count: prescription.advices[b].day_count,
1827
                     day_count: prescription.advices[b].day_count,
1683
-                    week_day: prescription.advices[b].week_day
1828
+                    week_day: prescription.advices[b].week_day,
1829
+                    number:  prescription.advices[b].drug.number
1684
 
1830
 
1685
                   }
1831
                   }
1686
                   tempAdvice.push(obj)
1832
                   tempAdvice.push(obj)
1709
                         day_count: prescription.project[b].day_count,
1855
                         day_count: prescription.project[b].day_count,
1710
                         week_day: prescription.project[b].week_day
1856
                         week_day: prescription.project[b].week_day
1711
 
1857
 
1858
+
1712
                       }
1859
                       }
1713
 
1860
 
1714
                       if (prescription.project[b].type == 2) {
1861
                       if (prescription.project[b].type == 2) {
1717
                         obj['project_name'] = prescription.project[b].project.project_name
1864
                         obj['project_name'] = prescription.project[b].project.project_name
1718
                         obj['project'] = prescription.project[b].project
1865
                         obj['project'] = prescription.project[b].project
1719
                         obj['unit'] = prescription.project[b].unit
1866
                         obj['unit'] = prescription.project[b].unit
1867
+                        obj['number'] = ""
1868
+
1869
+
1720
                       } else if (prescription.project[b].type == 3) {
1870
                       } else if (prescription.project[b].type == 3) {
1721
                         obj['statistical_classification'] = ''
1871
                         obj['statistical_classification'] = ''
1722
                         obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1872
                         obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1723
                         obj['project_name'] = prescription.project[b].good_info.good_name
1873
                         obj['project_name'] = prescription.project[b].good_info.good_name
1724
                         obj['good_info'] = prescription.project[b].good_info
1874
                         obj['good_info'] = prescription.project[b].good_info
1725
                         obj['unit'] = prescription.project[b].good_info.packing_unit
1875
                         obj['unit'] = prescription.project[b].good_info.packing_unit
1876
+                        obj['number'] = prescription.project[b].good_info.good_number
1877
+
1726
                       }
1878
                       }
1727
                       tempProject.push(obj)
1879
                       tempProject.push(obj)
1728
                     }else{
1880
                     }else{
1844
                 project: project[i],
1996
                 project: project[i],
1845
                 first_letter:project[i].first_letter,
1997
                 first_letter:project[i].first_letter,
1846
                 number: "",
1998
                 number: "",
1999
+                bbx01:project[i].bbx01,
2000
+
1847
               }
2001
               }
1848
 
2002
 
1849
               this.tabProject.push(obj)
2003
               this.tabProject.push(obj)
1868
                 good_info: good_info[i],
2022
                 good_info: good_info[i],
1869
                 first_letter:good_info[i].first_letter,
2023
                 first_letter:good_info[i].first_letter,
1870
                 number: good_info[i].good_number,
2024
                 number: good_info[i].good_number,
2025
+                bbx01:good_info[i].bbx01,
1871
 
2026
 
1872
               }
2027
               }
1873
               this.tabProject.push(obj)
2028
               this.tabProject.push(obj)
1875
 
2030
 
1876
             this.allProject = this.tabProject
2031
             this.allProject = this.tabProject
1877
 
2032
 
2033
+            if(this.org_id == 10206 ) {
2034
+              console.log("-=======")
2035
+              console.log(this.zuobiao_project)
2036
+              console.log(this.tabProject)
2037
+              console.log("-=======")
2038
+              for (let i = 0; i < this.zuobiao_project.length; i++) {
2039
+                for (let b = 0; b < this.tabProject.length; b++) {
2040
+                  if (this.zuobiao_project[i].bbx01 == this.tabProject[b].bbx01){
2041
+                    this.tabProject[b]["zuobiao_stock_num"] = this.zuobiao_project[i].lsqty
2042
+                    this.tabProject[b].price = this.zuobiao_project[i].price
2043
+
2044
+                  }
2045
+                }
2046
+              }
2047
+            }
2048
+
2049
+
2050
+
2051
+
1878
           }
2052
           }
1879
         })
2053
         })
1880
       }, deepClone(source) {
2054
       }, deepClone(source) {
2198
         }
2372
         }
2199
       }
2373
       }
2200
 
2374
 
2375
+      this.getZuobiaoDrugStock()
2376
+      this.getZuobiaoGoodStock()
2201
       this.getPrescriptionTemplateInfo()
2377
       this.getPrescriptionTemplateInfo()
2202
       this.getInitData()
2378
       this.getInitData()
2203
       //获取所有项目
2379
       //获取所有项目

+ 10 - 10
src/xt_pages/user/components/PatientSidebar.vue Ver arquivo

265
             },
265
             },
266
           ]
266
           ]
267
         },
267
         },
268
-        // {
269
-        //   name: '6',
270
-        //   label: '文书管理',
271
-        //   children: [
272
-        //     {
273
-        //       name: '6-1',
274
-        //       label: '知情同意书'
275
-        //     },
276
-        //   ]
277
-        // },
268
+        {
269
+          name: '6',
270
+          label: '文书管理',
271
+          children: [
272
+            {
273
+              name: '6-1',
274
+              label: '知情同意书'
275
+            },
276
+          ]
277
+        },
278
 
278
 
279
       ],
279
       ],
280
       name:""
280
       name:""