Quellcode durchsuchen

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

XMLWAN vor 4 Jahren
Ursprung
Commit
db95189e93
1 geänderte Dateien mit 51 neuen und 45 gelöschten Zeilen
  1. 51 45
      src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue

+ 51 - 45
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>
@@ -142,13 +126,15 @@
142 126
     </el-table>
143 127
 
144 128
 
145
-    
129
+
146 130
 
147 131
   </div>
148 132
 </template>
149 133
 
150 134
 <script>
151 135
   import { getDictionaryDataConfig} from "@/utils/data";
136
+  import { getInitData } from '@/api/his/his'
137
+
152 138
   export default {
153 139
     props: {
154 140
       preDrugs: Array,
@@ -160,6 +146,9 @@
160 146
             name:"",
161 147
             advices:[],
162 148
             project:[],
149
+            projects:[],
150
+            drugways:[],
151
+            efs:[],
163 152
           };
164 153
         }
165 154
       },
@@ -188,7 +177,25 @@
188 177
         input: 1,
189 178
       }
190 179
     },
191
-    methods:{
180
+   methods:{
181
+      getInitData(){
182
+        getInitData().then(response => {
183
+          if (response.data.state == 0) {
184
+            this.$message.error(response.data.msg)
185
+            return false
186
+          } else {
187
+            this.drugways = response.data.data.drugways
188
+            this.efs = response.data.data.efs
189
+          }
190
+        })
191
+
192
+      },deleteDrug:function(row){
193
+        for (let i = 0; i < this.prescription.advices.length; i++){
194
+          if(this.prescription.advices[i].id == row.id){
195
+              this.prescription.advices.splice(i, 1)
196
+          }
197
+        }
198
+      },
192 199
       setNewData:function(data){
193 200
 
194 201
         // this.prescription.advices = data.advices
@@ -198,7 +205,7 @@
198 205
       },
199 206
       getGroup(id){
200 207
          var name = ""
201
-          var statistics_category =  getDictionaryDataConfig('system','statistics_category') 
208
+          var statistics_category =  getDictionaryDataConfig('system','statistics_category')
202 209
           console.log("2235",statistics_category)
203 210
           for(let i=0;i<statistics_category.length;i++){
204 211
              if(id == statistics_category[i].id){
@@ -207,9 +214,8 @@
207 214
           }
208 215
          return name
209 216
       }
210
-    },
211
-    created(){
212
-      
217
+    },mounted(){
218
+      this.getInitData()
213 219
     },
214 220
   }
215 221
 </script>