Explorar el Código

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

See999 hace 4 años
padre
commit
77933d98e4

+ 19 - 1
src/api/drug/drug.js Ver fichero

265
       methods:"get",
265
       methods:"get",
266
       params:params
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 Ver fichero

40
                     <div class="name">{{ item.name }}</div>
40
                     <div class="name">{{ item.name }}</div>
41
                   </template>
41
                   </template>
42
                 </el-autocomplete>
42
                 </el-autocomplete>
43
-
43
+                <el-button type="primary" @click="toSeachPatient">搜索</el-button>
44
             </div>
44
             </div>
45
             <el-container>
45
             <el-container>
46
                 <div style="width:160px;">
46
                 <div style="width:160px;">
137
 import warehouseOut from "./components/warehouseOut"
137
 import warehouseOut from "./components/warehouseOut"
138
 const moment = require('moment')
138
 const moment = require('moment')
139
 import { PostSearch } from '@/api/patient'
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
 export default {
141
 export default {
142
     components:{
142
     components:{
143
         BreadCrumb,
143
         BreadCrumb,
359
           })
359
           })
360
           return searchArray
360
           return searchArray
361
         },
361
         },
362
-        handleSelect(val){
363
-          console.log("val",val)
362
+        handleSelect(val){   
364
           this.search_input = val.name
363
           this.search_input = val.name
365
           for(let i=0;i<this.tablePatient.length;i++){
364
           for(let i=0;i<this.tablePatient.length;i++){
366
              if(this.tablePatient[i].id == val.id){
365
              if(this.tablePatient[i].id == val.id){
368
              }
367
              }
369
           }
368
           }
370
           this.getlist()
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
     created(){
388
     created(){
378
     watch: {
393
     watch: {
379
      tablePatient: function() {
394
      tablePatient: function() {
380
       this.$nextTick(function() {
395
       this.$nextTick(function() {
381
-         console.log("222222",this.tablePatient[0])
382
         this.$refs.monthlyPlanTable.setCurrentRow(this.tablePatient[0])
396
         this.$refs.monthlyPlanTable.setCurrentRow(this.tablePatient[0])
383
       })
397
       })
384
     }
398
     }

+ 1 - 1
src/xt_pages/stock/selfPreparedMedicine/query.vue Ver fichero

93
                     <template slot-scope="scope">{{ scope.row.Count }}</template>
93
                     <template slot-scope="scope">{{ scope.row.Count }}</template>
94
                 </el-table-column>
94
                 </el-table-column>
95
                 <el-table-column align="center" prop="name" label="剩余" width="80">
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
                 </el-table-column>
97
                 </el-table-column>
98
             </el-table>
98
             </el-table>
99
         </div>
99
         </div>

+ 1 - 1
src/xt_pages/stock/selfPreparedMedicine/queryPrint.vue Ver fichero

42
                                     <!-- <td>{{item.min_unit}}</td> -->
42
                                     <!-- <td>{{item.min_unit}}</td> -->
43
                                     <td>{{item.Total?item.Total:0}}</td>
43
                                     <td>{{item.Total?item.Total:0}}</td>
44
                                     <td>{{item.Count}}</td>
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
                                 </tr>
46
                                 </tr>
47
                             </tbody>
47
                             </tbody>
48
                         </table>
48
                         </table>