Blame view

src/views/ywbl/ywsq/components/jsydsyq200.vue 4.62 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">
8
            <el-form-item label="权利类型200">
任超 committed
9 10
              <el-select v-model="queryForm.qllx" filterable clearable placeholder="请选择权利类型" class="width300px">
                <el-option v-for="item in qllxs" :key="item.value" :label="item.label" :value="item.value">
任超 committed
11 12 13 14
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
jiaozeping@pashanhoo.com committed
15
          <el-col :span="10">
任超 committed
16
            <el-form-item label="不动产单元号">
任超 committed
17
              <el-input placeholder="请输入不动产单元号" v-model="queryForm.bdcdyh" clearable class="width300px">
任超 committed
18 19 20
              </el-input>
            </el-form-item>
          </el-col>
jiaozeping@pashanhoo.com committed
21 22 23
        </el-row>
        <el-row>
          <el-col :span="10">
任超 committed
24
            <el-form-item label="业务号">
任超 committed
25
              <el-input placeholder="请输入业务号" v-model="queryForm.ywh" clearable class="width300px">
任超 committed
26 27 28
              </el-input>
            </el-form-item>
          </el-col>
jiaozeping@pashanhoo.com committed
29
          <el-col :span="10">
任超 committed
30
            <el-form-item label="不动产权证号">
任超 committed
31
              <el-input placeholder="请输入不动产权证号" v-model="queryForm.bdcqzh" clearable class="width300px">
任超 committed
32 33 34 35 36
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="2" class="btnCol">
            <el-form-item>
任超 committed
37
              <el-button type="primary" @click="fetchData">查询</el-button>
任超 committed
38 39 40 41 42 43 44
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <!-- 表格 -->
    <div class="from-clues-content">
任超 committed
45 46 47
      <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">
任超 committed
48 49
      </lb-table>
    </div>
任超 committed
50 51
    <div class="submit_button">
      <el-button @click="closeDialog">取消</el-button>
任超 committed
52
      <el-button type="primary" plain @click="submitForm" :loading="saveloding">发起申请</el-button>
任超 committed
53
    </div>
任超 committed
54 55 56
  </div>
</template>
<script>
任超 committed
57
//首次登记
任超 committed
58
import Cookies from 'js-cookie'
田浩浩 committed
59
import { datas, sendThis } from "../javascript/jsydsyq200.js";
60
import { defaultParameters } from "../javascript/publicDefaultPar.js";
任超 committed
61
import table from "@/utils/mixin/table";
任超 committed
62
import jump from "../components/mixin/jump";
蔡俊立 committed
63
import { selectQlxx, startBusinessFlow } from "@/api/ywbl.js";
任超 committed
64
export default {
任超 committed
65
  mixins: [table, jump],
任超 committed
66 67 68 69
  props: {
    isJump: { type: Boolean, default: false },
    djywbm: { type: String, default: '' }
  },
任超 committed
70
  data () {
任超 committed
71
    return {
72
      queryForm: defaultParameters.defaultParameters(),
任超 committed
73 74 75 76 77 78
      qllxs: [],
      tableData: {
        total: 0,
        columns: datas.columns(),
        data: [],
      },
任超 committed
79
      bdcdysz: [],
jiaozeping@pashanhoo.com committed
80
      saveloding: false,
任超 committed
81 82
    };
  },
任超 committed
83
  mounted () {
任超 committed
84 85 86
    sendThis(this);
  },
  methods: {
任超 committed
87
    closeDialog () {
jiaozeping@pashanhoo.com committed
88
      this.$emit("closeDialog");
任超 committed
89
    },
任超 committed
90
    fetchData () {
任超 committed
91
      this.queryForm.sqywbm = this.djywbm;
92

任超 committed
93 94 95 96 97 98 99
      selectQlxx({ ...this.queryForm, ...this.pageData }).then((res) => {
        if (res.code === 200) {
          let { total, records } = res.result;
          this.tableData.total = total;
          this.tableData.data = records;
        }
      });
任超 committed
100
    },
任超 committed
101
    submitForm () {
任超 committed
102
      if (this.bdcdysz.length == 0) {
jiaozeping@pashanhoo.com committed
103 104
        this.$message.error("请至少选择一条数据");
        return;
任超 committed
105
      }
jiaozeping@pashanhoo.com committed
106
      this.saveloding = true;
任超 committed
107
      startBusinessFlow({
任超 committed
108
        bsmSqyw: Cookies.get("bsmSqyw"),
liangyifan committed
109
        bdcdysz: this.bdcdysz,
任超 committed
110 111
        djqxbm: Cookies.get("djqxObj") ? JSON.parse(Cookies.get("djqxObj"))?.djqxbm : '',
        djqxmc: Cookies.get("djqxObj") ? JSON.parse(Cookies.get("djqxObj"))?.djqxmc : '',
jiaozeping@pashanhoo.com committed
112 113 114
      }).then((res) => {
        this.saveloding = false;
        if (res.code == 200) {
任超 committed
115 116 117 118 119 120 121 122 123 124
          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
125 126
        } else {
          this.$message.error(res.message);
127
        }
jiaozeping@pashanhoo.com committed
128
      });
任超 committed
129
    },
任超 committed
130 131
    handleSelectionChange (val) {
      val.forEach((item, index) => {
132 133 134
        item.bsmSsql = item.bsmQlxx
        item.ybdcqzsh = item.bdcqzh
      })
jiaozeping@pashanhoo.com committed
135
      this.bdcdysz = val;
任超 committed
136 137 138
    }
  }
}
任超 committed
139 140 141 142 143
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";
</style>