Procházet zdrojové kódy

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

XMLWAN před 4 roky
rodič
revize
db95189e93

+ 51 - 45
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue Zobrazit soubor

11
 
11
 
12
       <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
12
       <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
13
         <template slot-scope="scope">
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
         </template>
16
         </template>
17
       </el-table-column>
17
       </el-table-column>
18
       <el-table-column align="center" prop="name" width="50" label="用法">
18
       <el-table-column align="center" prop="name" width="50" label="用法">
19
         <template slot-scope="scope">
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
         </template>
28
         </template>
30
       </el-table-column>
29
       </el-table-column>
31
       <el-table-column align="center" prop="name" width="50" label="频率">
30
       <el-table-column align="center" prop="name" width="50" label="频率">
32
         <template slot-scope="scope">
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
         </template>
40
         </template>
43
       </el-table-column>
41
       </el-table-column>
44
 
42
 
45
       <el-table-column align="center" prop="name" width="100" label="总量">
43
       <el-table-column align="center" prop="name" width="100" label="总量">
46
         <template slot-scope="scope">
44
         <template slot-scope="scope">
47
           <div style="display:flex;">
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
           </div>
48
           </div>
59
         </template>
49
         </template>
60
       </el-table-column>
50
       </el-table-column>
61
       <el-table-column align="center" prop="name" width="50" label="单价">
51
       <el-table-column align="center" prop="name" width="50" label="单价">
62
         <template slot-scope="scope">
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
         </template>
54
         </template>
65
       </el-table-column>
55
       </el-table-column>
66
       <el-table-column align="center" prop="name" width="50" label="备注">
56
       <el-table-column align="center" prop="name" width="50" label="备注">
67
         <template slot-scope="scope">
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
         </template>
59
         </template>
76
       </el-table-column>
60
       </el-table-column>
77
       <el-table-column align="center" width="40" prop="name" label="操作">
61
       <el-table-column align="center" width="40" prop="name" label="操作">
78
         <template slot-scope="scope">
62
         <template slot-scope="scope">
79
-          <i class="el-icon-delete"></i>
63
+          <i class="el-icon-delete" @click="deleteDrug(scope.row)"></i>
80
         </template>
64
         </template>
81
       </el-table-column>
65
       </el-table-column>
82
     </el-table>
66
     </el-table>
142
     </el-table>
126
     </el-table>
143
 
127
 
144
 
128
 
145
-    
129
+
146
 
130
 
147
   </div>
131
   </div>
148
 </template>
132
 </template>
149
 
133
 
150
 <script>
134
 <script>
151
   import { getDictionaryDataConfig} from "@/utils/data";
135
   import { getDictionaryDataConfig} from "@/utils/data";
136
+  import { getInitData } from '@/api/his/his'
137
+
152
   export default {
138
   export default {
153
     props: {
139
     props: {
154
       preDrugs: Array,
140
       preDrugs: Array,
160
             name:"",
146
             name:"",
161
             advices:[],
147
             advices:[],
162
             project:[],
148
             project:[],
149
+            projects:[],
150
+            drugways:[],
151
+            efs:[],
163
           };
152
           };
164
         }
153
         }
165
       },
154
       },
188
         input: 1,
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
       setNewData:function(data){
199
       setNewData:function(data){
193
 
200
 
194
         // this.prescription.advices = data.advices
201
         // this.prescription.advices = data.advices
198
       },
205
       },
199
       getGroup(id){
206
       getGroup(id){
200
          var name = ""
207
          var name = ""
201
-          var statistics_category =  getDictionaryDataConfig('system','statistics_category') 
208
+          var statistics_category =  getDictionaryDataConfig('system','statistics_category')
202
           console.log("2235",statistics_category)
209
           console.log("2235",statistics_category)
203
           for(let i=0;i<statistics_category.length;i++){
210
           for(let i=0;i<statistics_category.length;i++){
204
              if(id == statistics_category[i].id){
211
              if(id == statistics_category[i].id){
207
           }
214
           }
208
          return name
215
          return name
209
       }
216
       }
210
-    },
211
-    created(){
212
-      
217
+    },mounted(){
218
+      this.getInitData()
213
     },
219
     },
214
   }
220
   }
215
 </script>
221
 </script>