Blame view

src/views/sqcx/sqcxjl/sqcxjl.vue 2.76 KB
jiaozeping@pashanhoo.com committed
1 2 3 4
<template>
  <div class="from-clues">
    <!-- 表单部分 -->
    <div class="from-clues-header">
任超 committed
5
      <el-form :model="queryForm" ref="queryForm" @submit.native.prevent label-width="70px">
jiaozeping@pashanhoo.com committed
6 7
        <el-row>
          <el-col :span="5">
liangyifan committed
8
            <el-form-item label="查询编号">
任超 committed
9
              <el-input placeholder="请输入编号" @clear="queryClick" v-model="queryForm.cxbh" class="width100" clearable>
任超 committed
10
              </el-input>
liangyifan committed
11 12 13 14
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="申请人">
任超 committed
15
              <el-input placeholder="请输入申请人" @clear="queryClick" v-model="queryForm.sqr" class="width100" clearable>
任超 committed
16
              </el-input>
liangyifan committed
17 18
            </el-form-item>
          </el-col>
19
          <el-col :span="14" class="btnColRight">
jiaozeping@pashanhoo.com committed
20
            <el-form-item>
任超 committed
21
              <el-button type="primary" native-type="submit" @click="queryClick">查询</el-button>
jiaozeping@pashanhoo.com committed
22 23 24 25 26 27 28
              <el-button @click="moreQueryClick()">高级查询</el-button>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <!-- 表格 -->
任超 committed
29
    <div class="from-clues-content">
任超 committed
30
      <lb-table :page-size="pageData.size" class="loadingtext" @sort-change="handleSort"
任超 committed
31 32
        :current-page.sync="pageData.current" :total="tableData.total" @size-change="handleSizeChange"
        @p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data">
jiaozeping@pashanhoo.com committed
33 34 35 36 37
      </lb-table>
    </div>
  </div>
</template>
<script>
38 39 40
import table from "@/utils/mixin/table";
import { datas, sendThis } from "./sqcxjldata";
import { getJtfcPage } from "@/api/jtfc";
jiaozeping@pashanhoo.com committed
41 42 43
export default {
  name: "sqcxjl",
  mixins: [table],
任超 committed
44
  mounted () {
jiaozeping@pashanhoo.com committed
45
    sendThis(this);
任超 committed
46
    this.queryClick()
jiaozeping@pashanhoo.com committed
47
  },
任超 committed
48
  data () {
jiaozeping@pashanhoo.com committed
49 50
    return {
      queryForm: {
任超 committed
51 52 53
        cxbh: "",
        sqr: "",
        ywh: "",
jiaozeping@pashanhoo.com committed
54 55 56
      },
      tableData: {
        columns: datas.columns(),
57 58
        data: [],
      },
59
    };
jiaozeping@pashanhoo.com committed
60 61 62
  },
  methods: {
    // 初始化数据
任超 committed
63 64
    queryClick () {
      this.$startLoading();
jiaozeping@pashanhoo.com committed
65 66 67 68 69 70 71
      getJtfcPage({ ...this.queryForm, ...this.pageData }).then((res) => {
        this.$endLoading();
        if (res.code === 200) {
          let { records, total } = res.result;
          this.tableData.data = records;
          this.tableData.total = total;
        }
72
      });
任超 committed
73
    },
任超 committed
74
    handleSort (name, sort) {
jiaozeping@pashanhoo.com committed
75 76
      console.log(name, sort);
    },
任超 committed
77
    // 查看
任超 committed
78
    handleViewClick (scope) {
任超 committed
79
      var sqcxBsm = scope.row.bsmSqcx;
jiaozeping@pashanhoo.com committed
80
      this.$popup("申请查询记录", "sqcx/sqcxjl/components/sqcxjlInfo", {
81
        formData: {
82
          sqcxBsm: sqcxBsm,
83
        },
任超 committed
84 85
        cancel: function () { }, //取消事件的回调
        confirm: function () { },
1  
jiaozeping@pashanhoo.com committed
86 87 88 89
      });
    },
  },
};
jiaozeping@pashanhoo.com committed
90 91 92 93
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
</style>