Quellcode durchsuchen

Merge branch '20200710_pc_vue_new_branch' into 20200916_pc_vue_new_branch

csx vor 4 Jahren
Ursprung
Commit
32116fcea8

+ 13 - 13
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Datei anzeigen

@@ -117,7 +117,7 @@
117 117
                     <template slot-scope="scope">{{ scope.row.drug_name }}</template>
118 118
                   </el-table-column>
119 119
                   <el-table-column align="center" label="规格" width="60">
120
-                    <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
120
+                    <template slot-scope="scope">{{ scope.row.drug_spec }}{{scope.row.min_unit}}</template>
121 121
                   </el-table-column>
122 122
                   <el-table-column align="center" label="单价" width="40">
123 123
                     <template slot-scope="scope">{{ scope.row.retail_price }}</template>
@@ -132,15 +132,6 @@
132 132
                   <el-table-column align="center" prop="name" label="名称">
133 133
                     <template slot-scope="scope">{{}}</template>
134 134
                   </el-table-column>
135
-                  <el-table-column align="center" label="规格" width="60">
136
-                    <template slot-scope="scope">33</template>
137
-                  </el-table-column>
138
-                  <el-table-column align="center" label="库存" width="60">
139
-                    <template slot-scope="scope">22</template>
140
-                  </el-table-column>
141
-                  <el-table-column align="center" label="单价" width="40">
142
-                    <template slot-scope="scope">12</template>
143
-                  </el-table-column>
144 135
                 </el-table>
145 136
               </el-tab-pane>
146 137
             </el-tabs>
@@ -187,7 +178,9 @@
187 178
     props: {
188 179
       patientInfo: Object,
189 180
       hisPatientInfo: Object,
190
-      prescriptions: Array
181
+      prescriptions: Array,
182
+      drugways:Array,
183
+      efs:Array,
191 184
     },
192 185
     components: {
193 186
       selectTemplate,
@@ -229,7 +222,8 @@
229 222
         customTabIndex:1,
230 223
         options:[],
231 224
         tabProject:[],
232
-        strids:""
225
+        strids:"",
226
+
233 227
       }
234 228
     },
235 229
     methods: {
@@ -300,7 +294,10 @@
300 294
       },
301 295
       open(index) {
302 296
         if (index == 1) {
303
-          localStorage.setItem('drugs', JSON.stringify(this.preDrugs))
297
+          console.log(this.prescriptions)
298
+
299
+
300
+          // localStorage.setItem('drugs', JSON.stringify(this.preDrugs))
304 301
           this.$message({ message: '保存成功', type: 'success' })
305 302
         } else if (index == 2) {
306 303
           this.$router.push('/outpatientDoctorStation/print')
@@ -390,7 +387,10 @@
390 387
           }
391 388
         }
392 389
 
390
+        for (let i = 0; i < this.curPrescriptions.advices.length; i++){
391
+          this.curPrescriptions.advices[i]['remark'] = ""
393 392
 
393
+        }
394 394
         // console.log(this.prescriptions)
395 395
       },
396 396
       selectChange(row){

+ 47 - 39
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue Datei anzeigen

@@ -11,72 +11,56 @@
11 11
 
12 12
       <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
13 13
         <template slot-scope="scope">
14
-          <!--<el-input v-model="input" placeholder=""></el-input>-->
15
-          <!--<el-input  v-model="scope.row.single_dose"></el-input>-->
14
+          <el-input  v-model="scope.row.single_dose"></el-input>
15
+          <div> {{scope.row.min_unit}}</div>
16 16
         </template>
17 17
       </el-table-column>
18 18
       <el-table-column align="center" prop="name" width="50" label="用法">
19 19
         <template slot-scope="scope">
20
-          <!-- <el-select v-model="value" placeholder="">
21
-              <el-option
22
-              v-for="item in newoptions"
23
-              :key="item.value"
24
-              :label="item.label"
25
-              :value="item.value">
26
-              </el-option>
27
-          </el-select> -->
28
-          <el-input v-model="input" placeholder=""></el-input>
20
+          <el-select v-model="scope.row.delivery_way" placeholder="请选择">
21
+            <el-option
22
+              v-for="item,index in drugways"
23
+              :key="index"
24
+              :label="item.name"
25
+              :value="item.name">
26
+            </el-option>
27
+          </el-select>
29 28
         </template>
30 29
       </el-table-column>
31 30
       <el-table-column align="center" prop="name" width="50" label="频率">
32 31
         <template slot-scope="scope">
33
-          <!-- <el-select v-model="value" placeholder="">
34
-              <el-option
35
-              v-for="item in newoptions"
36
-              :key="item.value"
37
-              :label="item.label"
38
-              :value="item.value">
39
-              </el-option>
40
-          </el-select> -->
41
-          <el-input v-model="input" placeholder=""></el-input>
32
+          <el-select v-model="scope.row.execution_frequency" placeholder="请选择">
33
+            <el-option
34
+              v-for="item in efs"
35
+              :key="index"
36
+              :label="item.name"
37
+              :value="item.name">
38
+            </el-option>
39
+          </el-select>
42 40
         </template>
43 41
       </el-table-column>
44 42
 
45 43
       <el-table-column align="center" prop="name" width="100" label="总量">
46 44
         <template slot-scope="scope">
47 45
           <div style="display:flex;">
48
-            <el-input v-model="input" style="width:50%" placeholder=""></el-input>
49
-            <!-- <el-select v-model="value" style="width:50%" placeholder="">
50
-                <el-option
51
-                v-for="item in newoptions"
52
-                :key="item.value"
53
-                :label="item.label"
54
-                :value="item.value">
55
-                </el-option>
56
-            </el-select> -->
57
-            <el-input v-model="input" style="width:50%" placeholder=""></el-input>
46
+            <el-input v-model="scope.row.prescribing_number" style="width:50%" placeholder=""></el-input>
47
+            <div> {{scope.row.min_unit}}</div>
58 48
           </div>
59 49
         </template>
60 50
       </el-table-column>
61 51
       <el-table-column align="center" prop="name" width="50" label="单价">
62 52
         <template slot-scope="scope">
63
-          <el-input v-model="scope.row.unitPrice" placeholder=""></el-input>
53
+          <el-input v-model="scope.row.retail_price" placeholder=""></el-input>
64 54
         </template>
65 55
       </el-table-column>
66 56
       <el-table-column align="center" prop="name" width="50" label="备注">
67 57
         <template slot-scope="scope">
68
-          <!-- <el-autocomplete
69
-          class="inline-input"
70
-          v-model="state1"
71
-          :fetch-suggestions="querySearch"
72
-          placeholder=""
73
-          @select="handleSelect"
74
-          ></el-autocomplete> -->
58
+          <el-input v-model="scope.row.remark" style="width:50%" placeholder=""></el-input>
75 59
         </template>
76 60
       </el-table-column>
77 61
       <el-table-column align="center" width="40" prop="name" label="操作">
78 62
         <template slot-scope="scope">
79
-          <i class="el-icon-delete"></i>
63
+          <i class="el-icon-delete" @click="deleteDrug(scope.row)"></i>
80 64
         </template>
81 65
       </el-table-column>
82 66
     </el-table>
@@ -187,6 +171,8 @@
187 171
 </template>
188 172
 
189 173
 <script>
174
+  import { getInitData } from '@/api/his/his'
175
+
190 176
   export default {
191 177
     props: {
192 178
       preDrugs: Array,
@@ -198,6 +184,8 @@
198 184
             name:"",
199 185
             advices:[],
200 186
             projects:[],
187
+            drugways:[],
188
+            efs:[],
201 189
           };
202 190
         }
203 191
 
@@ -227,10 +215,30 @@
227 215
         input: 1
228 216
       }
229 217
     },methods:{
218
+      getInitData(){
219
+        getInitData().then(response => {
220
+          if (response.data.state == 0) {
221
+            this.$message.error(response.data.msg)
222
+            return false
223
+          } else {
224
+            this.drugways = response.data.data.drugways
225
+            this.efs = response.data.data.efs
226
+          }
227
+        })
228
+
229
+      },deleteDrug:function(row){
230
+        for (let i = 0; i < this.prescription.advices.length; i++){
231
+          if(this.prescription.advices[i].id == row.id){
232
+              this.prescription.advices.splice(i, 1)
233
+          }
234
+        }
235
+      },
230 236
       setNewData:function(data){
231 237
 
232 238
         // this.prescription.advices = data.advices
233 239
       }
240
+    },mounted(){
241
+      this.getInitData()
234 242
     },
235 243
   }
236 244
 </script>