Blame view

src/views/ywbl/ywsq/components/selectJsydsyq.vue 4.84 KB
任超 committed
1 2 3 4
<template>
  <div class="from-clues">
    <!-- 表单部分 -->
    <div class="from-clues-header">
jiaozeping@pashanhoo.com committed
5
      <el-form :model="queryForm" ref="queryForm" label-width="120px">
任超 committed
6
        <el-row>
田浩浩 committed
7
          <el-col :span="8">
任超 committed
8
            <el-form-item label="不动产单元号">
任超 committed
9
              <el-input placeholder="请输入不动产单元号" v-model="queryForm.bdcdyh" clearable class="width300px">
任超 committed
10 11 12
              </el-input>
            </el-form-item>
          </el-col>
任超 committed
13
          <el-col :span="8">
田浩浩 committed
14 15
            <el-form-item label="不动产权证号">
              <el-input placeholder="请输入不动产权证号" v-model="queryForm.bdcqzh" clearable class="width300px">
任超 committed
16 17 18
              </el-input>
            </el-form-item>
          </el-col>
任超 committed
19
          <el-col :span="8">
田浩浩 committed
20 21 22 23 24 25 26 27 28 29
            <el-form-item label="权利人">
              <el-input placeholder="请输入不动产单元号" v-model="queryForm.zl" clearable class="width300px">
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="坐落">
              <el-input placeholder="请输入不动产单元号" v-model="queryForm.zl" clearable class="width300px">
任超 committed
30 31 32
              </el-input>
            </el-form-item>
          </el-col>
33
          <el-col :span="2" class="btnColRight">
任超 committed
34
            <el-form-item>
任超 committed
35
              <el-button type="primary" @click="fetchData">查询</el-button>
任超 committed
36 37 38 39 40 41 42
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <!-- 表格 -->
    <div class="from-clues-content">
任超 committed
43 44 45 46
      <lb-table ref="table" @row-click="handleRowClick" :page-size="pageData.pageSize" :heightNum="400"
        :current-page.sync="pageData.currentPage" :total="tableData.total" @size-change="handleSizeChange"
        @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="tableData.columns"
        :data="tableData.data">
任超 committed
47 48
      </lb-table>
    </div>
任超 committed
49 50
    <div class="submit_button">
      <el-button @click="closeDialog">取消</el-button>
任超 committed
51
      <el-button type="primary" plain @click="submitForm">发起申请</el-button>
任超 committed
52
    </div>
任超 committed
53 54 55
  </div>
</template>
<script>
任超 committed
56
//首次登记
57
import { datas, sendThis } from "../javascript/selectJsydsyq.js";
58
import { defaultParameters } from "../javascript/publicDefaultPar.js";
任超 committed
59
import table from "@/utils/mixin/table";
田浩浩 committed
60
import jump from "./mixin/jump";
任超 committed
61
import { startBusinessFlow, selectJsydQlxx } from "@/api/ywbl.js";
任超 committed
62
export default {
任超 committed
63
  mixins: [table, jump],
任超 committed
64 65
  props: {
    isJump: { type: Boolean, default: false },
田浩浩 committed
66
    sqywInfo: { type: Object, default: () => {} },
任超 committed
67
  },
田浩浩 committed
68
  data() {
任超 committed
69
    return {
70
      queryForm: defaultParameters.defaultParameters(),
任超 committed
71 72 73 74 75
      tableData: {
        total: 0,
        columns: datas.columns(),
        data: [],
      },
田浩浩 committed
76
      bdcdysz: [],
任超 committed
77 78
    };
  },
田浩浩 committed
79
  mounted() {
任超 committed
80 81 82
    sendThis(this);
  },
  methods: {
任超 committed
83
    //点击行选中或取消复选框
田浩浩 committed
84
    handleRowClick(row, column, event) {
任超 committed
85 86 87
      //通过ref绑定后这里使用$refs.table来操作bom元素
      this.$refs.table.toggleRowSelection(row);
    },
田浩浩 committed
88
    closeDialog() {
jiaozeping@pashanhoo.com committed
89
      this.$emit("closeDialog");
任超 committed
90
    },
田浩浩 committed
91
    fetchData() {
田浩浩 committed
92
      this.queryForm.sqywbm = this.sqywInfo.djywbm;
田浩浩 committed
93
      selectJsydQlxx({ ...this.queryForm, ...this.pageData }).then((res) => {
任超 committed
94 95 96 97 98
        if (res.code === 200) {
          let { total, records } = res.result;
          this.tableData.total = total;
          this.tableData.data = records;
        }
田浩浩 committed
99
      });
任超 committed
100
    },
田浩浩 committed
101
    submitForm() {
任超 committed
102
      if (this.bdcdysz.length == 0) {
jiaozeping@pashanhoo.com committed
103 104
        this.$message.error("请至少选择一条数据");
        return;
任超 committed
105 106
      }
      startBusinessFlow({
田浩浩 committed
107
        bsmSqyw: this.sqywInfo.parentid,
liangyifan committed
108
        bdcdysz: this.bdcdysz,
田浩浩 committed
109 110
        djqxbm: this.sqywInfo.nodetype == "djqx" ? this.sqywInfo.nodecode : "",
        djqxmc: this.sqywInfo.nodetype == "djqx" ? this.sqywInfo.nodename : "",
田浩浩 committed
111
      }).then((res) => {
jiaozeping@pashanhoo.com committed
112
        if (res.code == 200) {
任超 committed
113 114
          this.$message({
            showClose: true,
田浩浩 committed
115 116 117
            message: "发起申请成功",
            type: "success",
          });
任超 committed
118
          if (!this.isJump) {
田浩浩 committed
119
            this.jump(res.result, this.sqywInfo.djywbm);
任超 committed
120
          } else {
田浩浩 committed
121
            this.$emit("updateDialog", true);
任超 committed
122
          }
jiaozeping@pashanhoo.com committed
123 124
        } else {
          this.$message.error(res.message);
125
        }
田浩浩 committed
126
      });
任超 committed
127
    },
田浩浩 committed
128
    handleSelectionChange(val) {
任超 committed
129
      val.forEach((item, index) => {
田浩浩 committed
130 131 132
        item.bsmSsql = item.bsmQlxx;
        item.ybdcqzsh = item.bdcqzh;
      });
jiaozeping@pashanhoo.com committed
133
      this.bdcdysz = val;
田浩浩 committed
134
    },
田浩浩 committed
135 136 137 138 139 140 141 142 143 144 145 146 147
    openBook(row) {
      var param = {
        bdcdyid: row.bdcdyid,
        qllx: row.qllx,
        bdcdyh: row.bdcdyh,
        bsmQlxx: row.bsmQlxx,
      };
      this.$popup("登记簿详情", "registerBook/djbFrame", {
        formData: param,
      });
    },
  },
};
任超 committed
148 149 150 151 152
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";
</style>