Blame view

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