ソースを参照

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

See999 4 年 前
コミット
77933d98e4

+ 19 - 1
src/api/drug/drug.js ファイルの表示

@@ -265,4 +265,22 @@ export function DeleteDrugNameById(params){
265 265
       methods:"get",
266 266
       params:params
267 267
    })
268
-}
268
+}
269
+
270
+export function getPatientDetail(id,params){
271
+
272
+   return request({
273
+      url:"/api/drug/getpatientdetail?id="+id,
274
+      methods:"Get",
275
+      params:params
276
+   })
277
+}
278
+
279
+// export function toSeachPatient(params){
280
+   
281
+//    return request({
282
+//       url:"/api/drug/toseachpatient",
283
+//       methods:"Get",
284
+//       params:params
285
+//    })
286
+// }

+ 19 - 5
src/xt_pages/stock/selfPreparedMedicine/index.vue ファイルの表示

@@ -40,7 +40,7 @@
40 40
                     <div class="name">{{ item.name }}</div>
41 41
                   </template>
42 42
                 </el-autocomplete>
43
-
43
+                <el-button type="primary" @click="toSeachPatient">搜索</el-button>
44 44
             </div>
45 45
             <el-container>
46 46
                 <div style="width:160px;">
@@ -137,7 +137,7 @@ import warehousing from "./components/warehousing"
137 137
 import warehouseOut from "./components/warehouseOut"
138 138
 const moment = require('moment')
139 139
 import { PostSearch } from '@/api/patient'
140
-import { getCurrentPatient,saveRadio,getStockList,DeleteDrugNameById,getDrugSet } from "@/api/drug/drug"
140
+import { getCurrentPatient,saveRadio,getStockList,DeleteDrugNameById,getDrugSet,getPatientDetail} from "@/api/drug/drug"
141 141
 export default {
142 142
     components:{
143 143
         BreadCrumb,
@@ -359,8 +359,7 @@ export default {
359 359
           })
360 360
           return searchArray
361 361
         },
362
-        handleSelect(val){
363
-          console.log("val",val)
362
+        handleSelect(val){   
364 363
           this.search_input = val.name
365 364
           for(let i=0;i<this.tablePatient.length;i++){
366 365
              if(this.tablePatient[i].id == val.id){
@@ -368,6 +367,22 @@ export default {
368 367
              }
369 368
           }
370 369
           this.getlist()
370
+          this.getPatientDetail(val.id)
371
+        },
372
+
373
+        getPatientDetail(id){
374
+          getPatientDetail(id).then(response=>{
375
+             if(response.data.state == 1){
376
+               var patientDetail =  response.data.data.patientDetail
377
+               console.log("patientDetail",patientDetail)
378
+               var arr = []
379
+               arr.push(patientDetail)
380
+               this.tablePatient = arr
381
+             }
382
+          })
383
+        },
384
+        toSeachPatient(){
385
+          this.getCurrentPatient()
371 386
         }
372 387
     },
373 388
     created(){
@@ -378,7 +393,6 @@ export default {
378 393
     watch: {
379 394
      tablePatient: function() {
380 395
       this.$nextTick(function() {
381
-         console.log("222222",this.tablePatient[0])
382 396
         this.$refs.monthlyPlanTable.setCurrentRow(this.tablePatient[0])
383 397
       })
384 398
     }

+ 1 - 1
src/xt_pages/stock/selfPreparedMedicine/query.vue ファイルの表示

@@ -93,7 +93,7 @@
93 93
                     <template slot-scope="scope">{{ scope.row.Count }}</template>
94 94
                 </el-table-column>
95 95
                 <el-table-column align="center" prop="name" label="剩余" width="80">
96
-                    <template slot-scope="scope">{{ scope.row.Total?scope.row.Total:0 - scope.row.Count }}</template>
96
+                    <template slot-scope="scope">{{ (scope.row.Total?scope.row.Total:0) - scope.row.Count }}</template>
97 97
                 </el-table-column>
98 98
             </el-table>
99 99
         </div>

+ 1 - 1
src/xt_pages/stock/selfPreparedMedicine/queryPrint.vue ファイルの表示

@@ -42,7 +42,7 @@
42 42
                                     <!-- <td>{{item.min_unit}}</td> -->
43 43
                                     <td>{{item.Total?item.Total:0}}</td>
44 44
                                     <td>{{item.Count}}</td>
45
-                                    <td>{{item.Total?item.Total:0 - item.Count}}</td>
45
+                                    <td>{{(item.Total?item.Total:0) - item.Count}}</td>
46 46
                                 </tr>
47 47
                             </tbody>
48 48
                         </table>