see999 3 years ago
parent
commit
f299f423f2

+ 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="备注">

+ 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
       },

+ 4 - 2
src/xt_pages/outpatientDoctorStation/prescriptionTemplate.vue View File

@@ -95,7 +95,8 @@
95 95
         page: 1,
96 96
         limit: 10,
97 97
         patient_id: 0,
98
-        total:0
98
+        total:0,
99
+        patient_name:''
99 100
       }
100 101
     },
101 102
     methods: {
@@ -133,7 +134,7 @@
133 134
         })
134 135
       },
135 136
       jumpDetail(row) {
136
-        this.$router.push('/outpatientDoctorStation/prescriptionTemplatedetail?id=' + row.id + '&patient_id=' + this.patient_id)
137
+        this.$router.push('/outpatientDoctorStation/prescriptionTemplatedetail?id=' + row.id + '&patient_id=' + this.patient_id + '&patient_name=' + this.patient_name)
137 138
       },
138 139
       getMode(id) {
139 140
         let name = ''
@@ -171,6 +172,7 @@
171 172
         this.page = 1
172 173
         this.limit = 10
173 174
         this.patient_id = val.id
175
+        this.patient_name = val.name
174 176
         let params = {
175 177
           patient_id: val.id,
176 178
           page: this.page,

+ 9 - 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
+        
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>
3 9
 
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>
7
-
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;">
@@ -1313,8 +1315,8 @@
1313 1315
                   prescribing_number: temp[b].prescribing_number,
1314 1316
                   single_dose_unit: temp[b].min_unit,
1315 1317
                   prescribing_number_unit: temp[b].max_unit,
1316
-                  medical_insurance_number: temp[b].medical_insurance_number
1317
-
1318
+                  medical_insurance_number: temp[b].medical_insurance_number,
1319
+                  drug: temp[b]
1318 1320
                 }
1319 1321
 
1320 1322
                 if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {