123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- <template>
- <!-- 押金查询-->
- <div class="main-contain">
- <div class="position">
- <bread-crumb :crumbs="crumbs"></bread-crumb>
- </div>
- <div class="app-container">
- <div
- style="
- justify-content: flex-start;
- margin: 0px 0 12px 0;
- display: flex;
- align-items: center;
- "
- >
- <div>
- <!-- <el-input-->
- <!-- size="small"-->
- <!-- style="width: 200px; margin-left: 10px"-->
- <!-- class="filter-item"-->
- <!-- placeholder="请输入患者名称"-->
- <!-- v-model.trim="keyword"-->
- <!-- />-->
- <el-select v-model.trim="keyword" clearable filterable placeholder="请输入患者名称" @select="handleSelect" ><!--@change="updateconfig1(h1)"-->
- <el-option
- v-for="item in users"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- >
- </el-option>
- </el-select>
- <el-button
- size="small"
- class="filter-item"
- type="primary"
- icon="el-icon-search"
- @click="search"
- >查询</el-button
- >
- </div>
- </div>
-
- <el-table
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266',
- }"
- :data="tableData"
- border
- >
- <el-table-column type="index" label="序号" align="center" width="200">
- </el-table-column>
- <el-table-column label="患者名称" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.his_patient_name ? scope.row.his_patient_name : "" }}</span>
- </template>
- </el-table-column>
- <el-table-column label="可用金额" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.deposit ? scope.row.deposit : "" }}</span>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" width="450px">
- <template slot-scope="scope">
- <el-button
- size="small"
- type="primary"
- @click="toDetails(scope.row, scope.row.$index)"
- >
- 流水详情
- </el-button>
- </template>
- </el-table-column>
- </el-table>
-
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :page-sizes="[10, 50, 100, 200, 500, 1000]"
- :page-size="10"
- background
- align="right"
- style="margin-top: 20px"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- >
- </el-pagination>
- </div>
- </div>
- </template>
- <script>
- import BreadCrumb from "@/xt_pages/components/bread-crumb";
- import {
- gethisuser,
- getuserlist
- }from "@/api/deposit";
- export default {
- components: {
- BreadCrumb,
- },
- data() {
- return {
- crumbs: [
- { path: false, name: "押金管理" },
- { path: "/DepositManagement/DepositSearch", name: "押金查询" },
- ],
- tableData: [],
- total: 0,
- page: 1,
- limit: 10,
- keyword:'',
- users:[],//可用患者列表
- };
- },
- created(){
- this.init()
- this.getuser()
- },
-
- methods: {
- // 初始化数据
- init() {
- //分页
- var params = {
- keyword: this.keyword,
- page: this.page,
- limit: this.limit,
- };
- getuserlist(params).then((res) =>{
- if (res.data.state == 1){
- this.total = res.data.data.total;
- this.tableData = res.data.data.list;
- }
- })
- },
-
- //获取患者列表
- getuser(){
- var params = {};
- gethisuser(params).then((res) =>{
- if (res.data.state == 1){
- this.users = res.data.data.list;
- }
- console.log("this.users",this.users)
- })
- },
-
- // 查询操作
- search() {
- var params = {
- keyword: this.keyword,
- page: this.page,
- limit: this.limit,
- };
- getuserlist(params).then((res) =>{
- if (res.data.state == 1){
- this.total = res.data.data.total;
- this.tableData = res.data.data.list;
- }
- })
- },
-
- // 页表操作
- handleSizeChange(val) {
- this.limit = val;
- this.init();
- },
- handleCurrentChange(val) {
- this.page = val;
- this.init();
- },
- handleSelect(item){
- this.keyword = item.id
- },
- updateconfig(){
- console.log("keyword",this.keyword)
- },
-
- // 流水详情
- toDetails(data,val) {
- console.log("data",data)
- console.log("data",val)
- this.$router.push({ path: "/DepositManagement/DepositDetails",query:{key:data}});
- },
- },
- };
- </script>
- <style>
- </style>
|