Browse Source

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

XMLWAN 3 years ago
parent
commit
2749a2c70b

+ 2 - 2
config/index.js View File

@@ -27,10 +27,10 @@ module.exports = {
27 27
     // can be overwritten by process.env.HOST
28 28
     // if you want dev by ip, please set host: '0.0.0.0'
29 29
 
30
-    host: 'xt.test.sgjyun.com',
30
+     // host: 'xt.test.sgjyun.com',
31 31
     //  host: 'xt.kuyicloud.com',
32 32
     // host: 'xt.test.sgjyun.com',
33
-    // host: 'localhost',
33
+    host: 'localhost',
34 34
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
35 35
     autoOpenBrowser: true,
36 36
     errorOverlay: true,

+ 1 - 1
src/xt_pages/data/components/project.vue View File

@@ -214,7 +214,7 @@ export default {
214 214
             total:0,
215 215
             tableData: [],
216 216
             is_start:0,
217
-            is_charge:0,
217
+            is_charge:'',
218 218
             selectDrug:[],
219 219
             optionOne: [
220 220
             {

+ 11 - 8
src/xt_pages/dialysis/template/DialysisPrintOrderForty.vue View File

@@ -881,7 +881,7 @@
881 881
         <td>&nbsp;{{monitor.replacement_rate}}</td> -->
882 882
           <td>
883 883
             <template v-if="(dialysisOrder && monitor.operate_time == dialysisOrder.start_time)">【开始透析】</template>
884
-            &nbsp;{{ monitor.symptom }} &nbsp;{{ monitor.dispose }} &nbsp;{{ monitor.result }}
884
+            {{ monitor.end }}&nbsp;{{ monitor.symptom }} &nbsp;{{ monitor.dispose }} &nbsp;{{ monitor.result }}
885 885
           </td>
886 886
           <td>
887 887
             <span v-if="setAdminUserES(monitor.monitoring_nurse) == ''">
@@ -2097,13 +2097,7 @@ export default {
2097 2097
             if (this.org_template_info.org_id == 9535) {
2098 2098
               this.isShowZero = true
2099 2099
             }
2100
-            if (this.monitors.length < 6) {
2101
-              var nl = 6 - this.monitors.length
2102
-              for (let index = 0; index < nl; index++) {
2103
-                this.monitors.push([])
2104
-              }
2105
-            }
2106
-
2100
+            var tempmonitorflag = true;
2107 2101
             for (let index = 0; index < this.monitors.length; index++) {
2108 2102
               const monitor = this.monitors[index]
2109 2103
               this.monitors[index].end = ''
@@ -2117,6 +2111,15 @@ export default {
2117 2111
                 }
2118 2112
               }
2119 2113
             }
2114
+            if (this.monitors.length < 6) {
2115
+              var nl = 6 - this.monitors.length
2116
+              for (let index = 0; index < nl; index++) {
2117
+                this.monitors.push([])
2118
+              }
2119
+            }
2120
+
2121
+            
2122
+            console.log('this.monitors',this.monitors)
2120 2123
             this.jilurow = this.monitors.length + 1
2121 2124
 
2122 2125
             this.advice_jilurow = this.advices.length + 1

+ 18 - 12
src/xt_pages/outpatientCharges/components/monthPrescriptionTable.vue View File

@@ -44,23 +44,25 @@
44 44
 
45 45
       <el-table-column align="center" prop="day" width="50" label="天数">
46 46
         <template slot-scope="scope">
47
-          <el-input v-model="scope.row.day" placeholder="" readonly></el-input>
48
-          <div>{{'天'}}</div>
47
+          <div style="display:flex;align-items:center;">
48
+            <el-input v-model="scope.row.day" placeholder="" readonly></el-input>
49
+            <span>{{'天'}}</span>
50
+          </div>
49 51
         </template>
50 52
       </el-table-column>
51 53
 
52 54
       <el-table-column align="center" prop="prescribing_number" width="80" label="总量">
53 55
         <template slot-scope="scope">
54 56
           <div style="display:flex;align-items:center;">
55
-            <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder="" readonly></el-input>
56
-            <div> {{scope.row.prescribing_number_unit}}</div>
57
+            <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder="" readonly></el-input>{{scope.row.prescribing_number_unit}}
57 58
           </div>
58 59
         </template>
59 60
       </el-table-column>
60
-      <el-table-column align="center" prop="retail_price" width="60" label="单价">
61
+      <el-table-column align="center" prop="retail_price" width="70" label="单价">
61 62
         <template slot-scope="scope">
62
-          <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
63
-          <div>{{'元'}}</div>
63
+          <div style="display:flex;align-items:center;">
64
+          <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>{{'元'}}
65
+          </div>
64 66
         </template>
65 67
       </el-table-column>
66 68
       <el-table-column align="center" prop="remark" width="50" label="备注">
@@ -105,8 +107,10 @@
105 107
       </el-table-column>
106 108
       <el-table-column align="center" prop="number_days" width="50" label="天数">
107 109
         <template slot-scope="scope">
108
-          <el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>
109
-          <div>{{'天'}}</div>
110
+          <div style="display:flex;align-items:center;">
111
+            <el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>
112
+            <div>{{'天'}}</div>
113
+          </div>
110 114
         </template>
111 115
       </el-table-column>
112 116
       <el-table-column align="center" prop="total" width="70" label="总量">
@@ -117,10 +121,12 @@
117 121
           </div>
118 122
         </template>
119 123
       </el-table-column>
120
-      <el-table-column align="center" prop="name" width="50" label="单价">
124
+      <el-table-column align="center" prop="name" width="70" label="单价">
121 125
         <template slot-scope="scope">
122
-          <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
123
-          <div>{{'元'}}</div>
126
+          <div style="display:flex;align-items:center;">
127
+            <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
128
+            <div>{{'元'}}</div>
129
+          </div>
124 130
         </template>
125 131
       </el-table-column>
126 132
       <el-table-column align="center" prop="name" width="50" label="备注">

+ 21 - 2
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

@@ -335,6 +335,7 @@
335 335
                                               @keyup.enter.native='searchProjectAction'
336 336
                                               v-model.trim="search_project_keyword"
337 337
                                               placeholder="请输入项目名称"></el-input>
338
+
338 339
                                     <el-select style="float: right;width: 49%;" v-model="value" placeholder=""
339 340
                                                @change="changeClass">
340 341
                                         <el-option
@@ -364,6 +365,14 @@
364 365
                                         <el-table-column label="规格" width="60">
365 366
                                             <template slot-scope="scope">{{ scope.row.single_dose }}</template>
366 367
                                         </el-table-column>
368
+                                        <el-table-column label="库存" width="60">
369
+                                            <template slot-scope="scope">
370
+                                                {{scope.row.total}}{{scope.row.total?scope.row.min_unit:''}} / {{
371
+                                                scope.row.total * (scope.row.dose / scope.row.min_number)}}
372
+                                                {{(scope.row.total * (scope.row.dose /
373
+                                                scope.row.min_number))?scope.row.max_unit:''}}
374
+                                            </template>
375
+                                        </el-table-column>
367 376
                                         <el-table-column label="单价" width="40">
368 377
                                             <template slot-scope="scope">{{ scope.row.price }}</template>
369 378
                                         </el-table-column>
@@ -571,7 +580,7 @@
571 580
         department: [],
572 581
         sick: [],
573 582
         diagnoses: [],
574
-        diagnose: 1,
583
+        diagnose: "",
575 584
         state1: '',
576 585
         curTotal: 0,
577 586
         prescription_id: 0,
@@ -702,6 +711,9 @@
702 711
               obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
703 712
               obj['medical_insurance_number'] = drug_month_prescriptions.advices[a].drug.medical_insurance_number
704 713
               obj['id'] = drug_month_prescriptions.advices[a].drug_id
714
+              obj['single_dose_unit'] = drug_month_prescriptions.advices[a].single_dose_unit
715
+
716
+
705 717
               // obj['retail_price'] = obj['retail_price'] +  drug_month_prescriptions.advices[a].drug.retail_price
706 718
               obj['retail_price'] = parseFloat(drug_month_prescriptions.advices[a].price)
707 719
               obj['drug'] = drug_month_prescriptions.advices[a].drug
@@ -1467,6 +1479,8 @@
1467 1479
         this.$refs.additionalCharges.hide()
1468 1480
 
1469 1481
       }, searchProjectAction() {
1482
+        console.log("~~~~")
1483
+        console.log(this.allProject)
1470 1484
 
1471 1485
         if (this.search_project_keyword.length == 0) {
1472 1486
           this.tabProject = this.allProject
@@ -1474,7 +1488,7 @@
1474 1488
         } else {
1475 1489
           let arr = []
1476 1490
           for (let i = 0; i < this.allProject.length; i++) {
1477
-            if (this.allProject[i].project_name.indexOf(this.search_project_keyword) != -1 || this.allProject[i].wubi.indexOf(this.search_project_keyword) != -1 || this.allProject[i].pinyin.indexOf(this.search_project_keyword) != -1) {
1491
+            if (this.allProject[i].project_name.indexOf(this.search_project_keyword) != -1) {
1478 1492
               arr = arr.concat(this.allProject[i])
1479 1493
             }
1480 1494
           }
@@ -1821,6 +1835,7 @@
1821 1835
 
1822 1836
         this.diagnose = info.diagnosis
1823 1837
         if (this.diagnose == 0) {
1838
+          this.diagnose = ""
1824 1839
           for (let i = 0; i < this.diagnoses.length; i++) {
1825 1840
             this.diagnose = this.diagnoses[0].id
1826 1841
           }
@@ -1912,6 +1927,10 @@
1912 1927
         } else {
1913 1928
           this.register_type = info.register_type
1914 1929
         }
1930
+
1931
+        if (this.diagnose == 0) {
1932
+          this.diagnose = ""
1933
+        }
1915 1934
       },
1916 1935
       moreState(tab, event) {
1917 1936
         if (tab == 'more') {

+ 68 - 11
src/xt_pages/outpatientDoctorStation/components/prescriptionTemplateTable.vue View File

@@ -7,11 +7,15 @@
7 7
                 <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span></template>
8 8
             </el-table-column>
9 9
 
10
-            <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
10
+            <el-table-column align="center" prop="single_dose" width="120" label="单次用量">
11 11
                 <template slot-scope="scope">
12 12
                     <div style="display:flex;align-items:center;">
13
-                        <el-input v-model="scope.row.single_dose" @input="getSingleDose(scope)" style="width:65%;"></el-input>
14
-                        <div>{{scope.row.single_dose_unit}}</div>
13
+                        <el-input v-model="scope.row.single_dose" @input="getSingleDose(scope)" style="width:50%;"></el-input>
14
+                        <!-- <div>{{scope.row.single_dose_unit}}</div> -->
15
+                        <el-select v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;" @change="getAllChange(scope)">
16
+                          <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
17
+                          <el-option :label="scope.row.drug.dose_unit" :value="scope.row.drug.dose_unit"></el-option>
18
+                        </el-select>
15 19
                     </div>
16 20
                 </template>
17 21
             </el-table-column>
@@ -29,7 +33,7 @@
29 33
             </el-table-column>
30 34
             <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
31 35
                 <template slot-scope="scope">
32
-                    <el-select v-model="scope.row.execution_frequency" placehold er="请选择">
36
+                    <el-select v-model="scope.row.execution_frequency" placehold er="请选择" @change="getAllChange(scope)">
33 37
                         <el-option
34 38
                                 v-for="item,index in efs"
35 39
                                 :key="index"
@@ -44,16 +48,20 @@
44 48
             <el-table-column align="center" prop="day" width="70" label="天数">
45 49
                 <template slot-scope="scope">
46 50
                     <div style="display:flex;align-items:center;">
47
-                        <el-input v-model="scope.row.day" @input="getDay(scope)" placeholder=""></el-input>{{'天'}}
51
+                        <el-input v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>{{'天'}}
48 52
                     </div>
49 53
                 </template>
50 54
             </el-table-column>
51 55
 
52
-            <el-table-column align="center" prop="prescribing_number" width="80" label="总量">
56
+            <el-table-column align="center" prop="prescribing_number" width="120" label="总量">
53 57
                 <template slot-scope="scope">
54 58
                     <div style="display:flex;align-items:center;">
55
-                        <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder=""></el-input>
56
-                        <div> {{scope.row.prescribing_number_unit}}</div>
59
+                        <el-input v-model="scope.row.prescribing_number" style="width:50%" @input="changePrescribingNumber(scope)" placeholder=""></el-input>
60
+                        <!-- <div> {{scope.row.prescribing_number_unit}}</div> -->
61
+                        <el-select v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;" @change="getAllChange(scope)">
62
+                          <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
63
+                          <el-option :label="scope.row.drug.max_unit" :value="scope.row.drug.max_unit"></el-option>
64
+                        </el-select>
57 65
                     </div>
58 66
                 </template>
59 67
             </el-table-column>
@@ -89,8 +97,10 @@
89 97
             </el-table-column>
90 98
             <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
91 99
                 <template slot-scope="scope">
100
+                  <div style="display:flex;align-items:center;">
92 101
                     <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)" placeholder=""></el-input>
93 102
                     <div>{{scope.row.unit}}</div>
103
+                  </div>
94 104
 
95 105
                 </template>
96 106
             </el-table-column>
@@ -127,10 +137,12 @@
127 137
                     </div>
128 138
                 </template>
129 139
             </el-table-column>
130
-            <el-table-column align="center" prop="name" width="50" label="单价">
140
+            <el-table-column align="center" prop="name" width="70" label="单价">
131 141
                 <template slot-scope="scope">
132
-                    <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
133
-                    <div>{{'元'}}</div>
142
+                    <div style="display:flex;align-items:center;">
143
+                      <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
144
+                      <div>{{'元'}}</div>
145
+                    </div>
134 146
 
135 147
                 </template>
136 148
             </el-table-column>
@@ -375,6 +387,51 @@
375 387
           .catch(() => {});
376 388
 
377 389
       },
390
+      getAllChange(scope){
391
+        if(scope.row.drug.min_unit == scope.row.single_dose_unit){
392
+          if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
393
+            console.log(1)
394
+            scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
395
+          }else{
396
+            console.log(12)
397
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency)) * scope.row.day / scope.row.drug.min_number) 
398
+          }
399
+        }else{
400
+          if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
401
+            console.log(123)
402
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose) 
403
+          }else{
404
+            console.log(1234)
405
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose / scope.row.drug.min_number)
406
+          }
407
+        }
408
+        if(scope.row.prescribing_number == 0){
409
+          scope.row.prescribing_number = 1
410
+        }
411
+        if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
412
+          // scope.row.retail_price = scope.row.drug.min_price * scope.row.prescribing_number
413
+          if(scope.row.prescribing_number > scope.row.drug.total){
414
+            this.$message.error(scope.row.drug_name + '库存不足')
415
+          }
416
+        }else{
417
+          if((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total){
418
+            this.$message.error(scope.row.drug_name + '库存不足')
419
+          }
420
+          // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
421
+        }
422
+        
423
+      },
424
+      changePrescribingNumber(scope){
425
+        if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
426
+          if(parseInt(scope.row.prescribing_number) > scope.row.drug.total){
427
+            this.$message.error(scope.row.drug_name + '库存不足')
428
+          }
429
+        }else{
430
+          if((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total){
431
+            this.$message.error(scope.row.drug_name + '库存不足')
432
+          }
433
+        }
434
+      },
378 435
       getSingleDose(scope){
379 436
         this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
380 437
       },

+ 8 - 0
src/xt_pages/outpatientDoctorStation/components/saveTemplate.vue View File

@@ -200,6 +200,14 @@
200 200
             let checkGroup = []
201 201
             let allPrescriptions = []
202 202
             let targetPrescriptions = []
203
+
204
+            let prescriptions = []
205
+            for (let i = 0; i < this.allPrescription.length; i++) {
206
+              for (let a = 0; a < this.allPrescription[i].prescriptions.length; a++) {
207
+                allPrescriptions.push(this.allPrescription[i].prescriptions[a])
208
+              }
209
+            }
210
+
203 211
             for (let i = 0; i < allPrescriptions.length; i++) {
204 212
                   targetPrescriptions.push(allPrescriptions[i])
205 213
             }

+ 1 - 0
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -771,6 +771,7 @@
771 771
               // obj['retail_price'] = obj['retail_price'] +  drug_month_prescriptions.advices[a].drug.retail_price
772 772
               obj['retail_price'] = parseFloat(drug_month_prescriptions.advices[a].price)
773 773
               obj['drug'] = drug_month_prescriptions.advices[a].drug
774
+              obj['single_dose_unit'] = drug_month_prescriptions.advices[a].single_dose_unit
774 775
 
775 776
               count = count + drug_month_prescriptions.advices[a].prescribing_number
776 777
 

+ 6 - 5
src/xt_pages/outpatientDoctorStation/prescriptionTemplate.vue View File

@@ -35,7 +35,6 @@
35 35
                           :row-style="{ color: '#303133' }"
36 36
                           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
37 37
                           highlight-current-row
38
-                          ref="tab"
39 38
                 >
40 39
                     <el-table-column prop="name" label="模版名称">
41 40
                         <template slot-scope="scope">{{scope.row.name}}</template>
@@ -95,7 +94,8 @@
95 94
         page: 1,
96 95
         limit: 10,
97 96
         patient_id: 0,
98
-        total:0
97
+        total:0,
98
+        patient_name:''
99 99
       }
100 100
     },
101 101
     methods: {
@@ -133,7 +133,7 @@
133 133
         })
134 134
       },
135 135
       jumpDetail(row) {
136
-        this.$router.push('/outpatientDoctorStation/prescriptionTemplatedetail?id=' + row.id + '&patient_id=' + this.patient_id)
136
+        this.$router.push('/outpatientDoctorStation/prescriptionTemplatedetail?id=' + row.id + '&patient_id=' + this.patient_id + '&patient_name=' + this.patient_name)
137 137
       },
138 138
       getMode(id) {
139 139
         let name = ''
@@ -171,6 +171,7 @@
171 171
         this.page = 1
172 172
         this.limit = 10
173 173
         this.patient_id = val.id
174
+        this.patient_name = val.name
174 175
         let params = {
175 176
           patient_id: val.id,
176 177
           page: this.page,
@@ -190,8 +191,8 @@
190 191
             this.all_data = response.data.data.list
191 192
 
192 193
             this.$refs.tab.setCurrentRow(this.data[0])
193
-            // this.patient_id = this.data[0].id
194
-            // this.GetPrescriptionTemplateList()
194
+            this.patient_id = this.data[0].id
195
+            this.GetPrescriptionTemplateList()
195 196
 
196 197
           }
197 198
         })

+ 16 - 7
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue View File

@@ -1,11 +1,13 @@
1 1
 <template>
2 2
     <div class="main-contain new-main-contain">
3 3
 
4
-        <div style="height: calc(100% - 58px);display: flex;flex-direction: column;margin-top: 56px;">
5
-            <el-button size="small" @click="save" type="primary" style="margin-left:10px;width:60px;float: left">保存
6
-            </el-button>
4
+        <div style="height: calc(100% - 0px);display: flex;flex-direction: column;">
5
+            <div style="display:flex;justify-content: space-between;align-items:center;margin-bottom:10px;padding:0 10px;color:#606266;">
6
+              <div>姓名:{{ $route.query.patient_name }}</div>
7
+              <el-button size="small" @click="save" type="primary">保存</el-button>
8
+            </div>
7 9
 
8
-            <div class="mainCenter" v-loading="loading">
10
+            <div class="mainCenter" style="padding:0 10px;" v-loading="loading">
9 11
                 <div class="centerLeft">
10 12
                     <el-form :model="tempForm" ref="tempForm" label-width="80px"
11 13
                              style="display: flex;flex-wrap: wrap;justify-content: space-between;">
@@ -218,6 +220,7 @@
218 220
 
219 221
   import { uParseTime } from '@/utils/tools'
220 222
   import PrescriptionTemplateTable from './components/prescriptionTemplateTable'
223
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
221 224
 
222 225
   const moment = require('moment')
223 226
   export default {
@@ -239,10 +242,16 @@
239 242
     },
240 243
     components: {
241 244
       PrescriptionTemplateTable,
242
-      prescriptionTable
245
+      prescriptionTable,
246
+      BreadCrumb
243 247
     },
244 248
     data() {
245 249
       return {
250
+        crumbs: [
251
+          { path: false, name: '门诊医生站' },
252
+          { path: false, name: '处方模版' },
253
+          { path: false, name: '模版详情' },
254
+        ],
246 255
         tempForm: {
247 256
           name: '',
248 257
           mode_id: ''
@@ -1313,8 +1322,8 @@
1313 1322
                   prescribing_number: temp[b].prescribing_number,
1314 1323
                   single_dose_unit: temp[b].min_unit,
1315 1324
                   prescribing_number_unit: temp[b].max_unit,
1316
-                  medical_insurance_number: temp[b].medical_insurance_number
1317
-
1325
+                  medical_insurance_number: temp[b].medical_insurance_number,
1326
+                  drug: temp[b]
1318 1327
                 }
1319 1328
 
1320 1329
                 if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {