Blame view

src/views/ywbl/ywsq/components/jsydsyq200.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
//首次登记
田浩浩 committed
57
import { datas, sendThis } from "../javascript/jsydsyq200.js";
58
import { defaultParameters } from "../javascript/publicDefaultPar.js";
任超 committed
59
import table from "@/utils/mixin/table";
任超 committed
60
import jump from "../components/mixin/jump";
田浩浩 committed
61 62
import { startBusinessFlow } from "@/api/ywbl.js";
import { selectJsydQlxx } from "@/api/selectQlxx.js";
任超 committed
63
export default {
任超 committed
64
  mixins: [table, jump],
任超 committed
65 66
  props: {
    isJump: { type: Boolean, default: false },
任超 committed
67 68 69 70 71 72
    djywbm: { type: String, default: '' },
    djqxObj: {
      type: Object,
      default: {}
    },
    bsmSqyw: { type: String, default: '' },
任超 committed
73
  },
任超 committed
74
  data () {
任超 committed
75
    return {
76
      queryForm: defaultParameters.defaultParameters(),
任超 committed
77 78 79 80 81 82
      qllxs: [],
      tableData: {
        total: 0,
        columns: datas.columns(),
        data: [],
      },
任超 committed
83
      bdcdysz: []
任超 committed
84 85
    };
  },
任超 committed
86
  mounted () {
任超 committed
87 88 89
    sendThis(this);
  },
  methods: {
任超 committed
90 91 92 93 94
    //点击行选中或取消复选框
    handleRowClick (row, column, event) {
      //通过ref绑定后这里使用$refs.table来操作bom元素
      this.$refs.table.toggleRowSelection(row);
    },
任超 committed
95
    closeDialog () {
jiaozeping@pashanhoo.com committed
96
      this.$emit("closeDialog");
任超 committed
97
    },
任超 committed
98
    fetchData () {
任超 committed
99
      this.queryForm.sqywbm = this.djywbm;
田浩浩 committed
100
      selectJsydQlxx({ ...this.queryForm, ...this.pageData }).then((res) => {
任超 committed
101 102 103 104 105
        if (res.code === 200) {
          let { total, records } = res.result;
          this.tableData.total = total;
          this.tableData.data = records;
        }
任超 committed
106
      })
任超 committed
107
    },
任超 committed
108
    submitForm () {
任超 committed
109
      if (this.bdcdysz.length == 0) {
jiaozeping@pashanhoo.com committed
110 111
        this.$message.error("请至少选择一条数据");
        return;
任超 committed
112 113
      }
      startBusinessFlow({
任超 committed
114
        bsmSqyw: this.bsmSqyw,
liangyifan committed
115
        bdcdysz: this.bdcdysz,
任超 committed
116 117
        djqxbm: this.djqxObj?.djqxbm,
        djqxmc: this.djqxObj?.djqxmc
jiaozeping@pashanhoo.com committed
118 119
      }).then((res) => {
        if (res.code == 200) {
任超 committed
120 121 122 123 124 125 126 127 128 129
          this.$message({
            showClose: true,
            message: '发起申请成功',
            type: 'success'
          })
          if (!this.isJump) {
            this.jump(res.result, this.djywbm)
          } else {
            this.$emit('updateDialog', true)
          }
jiaozeping@pashanhoo.com committed
130 131
        } else {
          this.$message.error(res.message);
132
        }
任超 committed
133
      })
任超 committed
134
    },
任超 committed
135 136
    handleSelectionChange (val) {
      val.forEach((item, index) => {
137 138 139
        item.bsmSsql = item.bsmQlxx
        item.ybdcqzsh = item.bdcqzh
      })
jiaozeping@pashanhoo.com committed
140
      this.bdcdysz = val;
田浩浩 committed
141
    },
任超 committed
142 143
    openBook (row) {
      var param = { bdcdyid: row.bdcdyid, qllx: row.qllx, bdcdyh: row.bdcdyh, bsmQlxx: row.bsmQlxx };
任超 committed
144 145 146
      this.$popup('登记簿详情', 'registerBook/djbFrame', {
        formData: param
      })
任超 committed
147
    }
任超 committed
148 149
  }
}
任超 committed
150 151 152 153 154
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";
</style>