Blame view

src/views/ywbl/ywsq/components/bdcql.vue 4.48 KB
任超 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
<template>
  <div class="from-clues">
    <!-- 表单部分 -->
    <div class="from-clues-header">
      <el-form :model="queryForm" ref="queryForm" label-width="100px">
        <el-row>
          <el-col :span="5">
            <el-form-item label="权利类型">
              <el-select v-model="queryForm.qllx" filterable clearable placeholder="请选择权利类型">
                <el-option v-for="item in qllxs" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="不动产单元号">
              <el-input placeholder="请输入不动产单元号" v-model="queryForm.bdcdyh" clearable class="width200px">
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="业务号">
              <el-input placeholder="请输入业务号" v-model="queryForm.ywh" clearable class="width200px">
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="不动产权证号">
              <el-input placeholder="请输入不动产权证号" v-model="queryForm.bdcqzh" clearable class="width200px">
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="2" class="btnCol">
            <el-form-item>
任超 committed
35
              <el-button type="primary" @click="fetchData">查询</el-button>
任超 committed
36 37 38 39 40 41 42 43 44 45 46 47
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <!-- 表格 -->
    <div class="from-clues-content">
      <lb-table :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">
      </lb-table>
    </div>
任超 committed
48 49 50 51
    <div class="submit_button">
      <el-button @click="closeDialog">取消</el-button>
      <el-button type="primary" plain @click="submitForm" :loading="saveloding">发起申请</el-button>
    </div>
任超 committed
52 53 54
  </div>
</template>
<script>
55
//查封登记
任超 committed
56
import Cookies from 'js-cookie'
田浩浩 committed
57
import { datas, sendThis } from "../javascript/bdcql.js";
58
import { defaultParameters } from "../javascript/publicDefaultPar.js";
任超 committed
59
import table from "@/utils/mixin/table";
任超 committed
60
import jump from "../components/mixin/jump";
61
import { selectQlxx, startBusinessFlow } from "@/api/ywbl.js";
任超 committed
62
export default {
任超 committed
63
  mixins: [table, jump],
任超 committed
64 65 66 67
  props: {
    isJump: { type: Boolean, default: false },
    djywbm: { type: String, default: '' }
  },
任超 committed
68 69
  data () {
    return {
70
      queryForm: defaultParameters.defaultParameters(),
任超 committed
71 72 73 74 75 76
      qllxs: [],
      tableData: {
        total: 0,
        columns: datas.columns(),
        data: [],
      },
任超 committed
77 78
      bdcdysz: [],
      saveloding: false
任超 committed
79 80
    };
  },
任超 committed
81
  mounted () {
任超 committed
82 83
    sendThis(this)
  },
任超 committed
84
  methods: {
任超 committed
85 86 87
    closeDialog () {
      this.$emit("closeDialog")
    },
任超 committed
88
    fetchData () {
任超 committed
89 90 91
      this.queryForm.sqywbm = this.djywbm;
      selectQlxx({ ...this.queryForm, ...this.pageData })
        .then((res) => {
任超 committed
92
          console.log(res);
任超 committed
93 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
    submitForm () {
任超 committed
101
      if (this.bdcdysz.length == 0) {
102 103
        this.$message.error("请至少选择一条数据");
        return;
任超 committed
104
      }
105
      this.saveloding = true;
任超 committed
106
      startBusinessFlow({
任超 committed
107
        bsmSqyw: Cookies.get("bsmSqyw"),
108
        bdcdysz: this.bdcdysz,
任超 committed
109 110
        djqxbm: Cookies.get("djqxObj") ? JSON.parse(Cookies.get("djqxObj"))?.djqxbm : '',
        djqxmc: Cookies.get("djqxObj") ? JSON.parse(Cookies.get("djqxObj"))?.djqxmc : '',
111 112 113
      }).then((res) => {
        this.saveloding = false;
        if (res.code == 200) {
任超 committed
114 115 116 117 118 119 120 121 122 123
          this.$message({
            showClose: true,
            message: '发起申请成功',
            type: 'success'
          })
          if (!this.isJump) {
            this.jump(res.result, this.djywbm)
          } else {
            this.$emit('updateDialog', true)
          }
124 125 126 127
        } else {
          this.$message.error(res.message);
        }
      });
任超 committed
128 129 130 131 132 133 134 135 136 137 138
    },
    handleSelectionChange (val) {
      this.bdcdysz = val
    }
  },
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";
</style>