Blame view

src/views/sqcx/jtfc/components/addjtfc.vue 5.99 KB
任超 committed
1
<template>
田浩浩 committed
2
  <dialogBox title="家庭房产查询" @closeDialog="closeDialog" width="70%" :isButton="false" v-model="myValue">
任超 committed
3 4 5
    <div class="jtfccx-edit">
      <div class="jtfccx-edit-con">
        <b class="title">申请信息</b>
田浩浩 committed
6
        <el-form :model="form" label-width="120px">
任超 committed
7
          <el-row>
任超 committed
8 9
            <el-col :span="8">
              <el-form-item label="查询用途" label-width="90px">
田浩浩 committed
10
                <el-input v-model="form.djSqcxDO.cxyt" class="width200px"></el-input>
任超 committed
11 12
              </el-form-item>
            </el-col>
任超 committed
13 14
            <el-col :span="16">
              <el-form-item label="与产权人的关系">
田浩浩 committed
15 16 17 18
                <el-radio-group v-model="form.djSqcxDO.ycyrgx">
                  <el-radio label="1">房屋权利人</el-radio>
                  <el-radio label="2">产权利害关系人</el-radio>
                  <el-radio label="3">委托人</el-radio>
任超 committed
19 20 21 22 23
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
任超 committed
24
        <lb-table :column="sqrColumns" key="sqr1" :data="form.sqrList" :maxHeight="200" heightNumSetting
田浩浩 committed
25 26
          :pagination="false">
        </lb-table>
jiaozeping@pashanhoo.com committed
27

任超 committed
28
        <b class="title">权利人</b>
任超 committed
29
        <lb-table :column="qlrColumns" key="ql2r" :data="form.qlrList" :maxHeight="200" heightNumSetting
田浩浩 committed
30 31
          :pagination="false">
        </lb-table>
田浩浩 committed
32 33
        <div v-show="isSearch">
          <b class="title">查询结果</b>
田浩浩 committed
34
          <p>查询编号:{{ form.djSqcxDO.cxbh }}</p>
田浩浩 committed
35 36
          <lb-table :column="cxjgColumns" :data="form.cxjgList" :maxHeight="200" heightNumSetting :pagination="false">
          </lb-table>
任超 committed
37 38
        </div>
      </div>
田浩浩 committed
39 40 41
      <el-divider></el-divider>
      <div class="submit-button" style="padding-bottom:50px">
        <el-button @click="resetClick">重置</el-button>
任超 committed
42 43
        <el-button type="primary" v-show="isSearch == false" @click="queryChick">查询</el-button>
        <el-button type="primary" v-show="isSearch && form.dyjlList.length > 0">房产结果打印({{ form.dyjlList.length }}
田浩浩 committed
44
        </el-button>
任超 committed
45
        <el-button type="primary" v-show="isSearch && form.dyjlList.length == 0">无房证明打印({{ form.dyjlList.length }}
田浩浩 committed
46
        </el-button>
任超 committed
47 48
        <el-button @click="closeDialog">关闭</el-button>
      </div>
任超 committed
49 50 51 52 53
    </div>
  </dialogBox>
</template>

<script>
田浩浩 committed
54
import { addJtfcCxjgXx, getJtfcInfo } from "@/api/sqcx";
55
import { datas, sendThis } from "./addjtfcdata";
田浩浩 committed
56
import { mapGetters } from "vuex";
任超 committed
57
export default {
田浩浩 committed
58 59 60
  computed: {
    ...mapGetters(["dictData"]),
  },
任超 committed
61 62
  props: {
    value: { type: Boolean, default: false },
任超 committed
63
    sqcxBsm: { type: String, default: "" },
任超 committed
64
  },
任超 committed
65
  mounted () {
66 67
    sendThis(this);
  },
任超 committed
68
  data () {
任超 committed
69
    return {
任超 committed
70
      myValue: this.value,
田浩浩 committed
71
      //是否查询
任超 committed
72
      isSearch: false,
田浩浩 committed
73
      //查询结果列表字段
田浩浩 committed
74
      cxjgColumns: datas.columns(),
田浩浩 committed
75 76 77 78 79 80 81 82 83 84 85
      //申请人列表字段
      sqrColumns: datas.sqrCol(),
      //权利人列表字段
      qlrColumns: datas.qlrCol(),
      newData: {
        sqrxm: "",
        sqrzjlxbm: "",
        sqrzjhm: "",
        lxdh: "",
        inputErr: false,
      },
田浩浩 committed
86 87
      form: {
        djSqcxDO: { ycyrgx: "1", cxyt: "" },
田浩浩 committed
88 89
        sqrList: [],
        qlrList: [],
田浩浩 committed
90 91
        cxjgList: [],
        dyjlList: [],
任超 committed
92
      },
田浩浩 committed
93
    };
任超 committed
94
  },
任超 committed
95
  watch: {
任超 committed
96
    value (val) {
田浩浩 committed
97
      this.myValue = val;
任超 committed
98
      let that = this
田浩浩 committed
99
      if (val) {
任超 committed
100 101 102
        this.form.sqrList = []
        this.form.qlrList = []
        this.isSearch = false
任超 committed
103 104 105
        if (this.sqcxBsm == "") {
          that.add("sqr");
          that.add("qlr");
田浩浩 committed
106
        } else {
任超 committed
107
          that.loadData();
田浩浩 committed
108
        }
任超 committed
109
      }
任超 committed
110
    },
任超 committed
111
    "form.djSqcxDO.ycyrgx" (val) {
田浩浩 committed
112
      if (val == "1") {
任超 committed
113
        this.form.qlrList = _.cloneDeep(this.form.sqrList);
任超 committed
114
      } else {
田浩浩 committed
115
        this.form.qlrList = [];
田浩浩 committed
116
        this.add("qlr");
任超 committed
117
      }
田浩浩 committed
118
    },
任超 committed
119 120
    "form.sqrList" (val) {
      if (this.form.djSqcxDO.ycyrgx == '1') {
任超 committed
121
        this.form.qlrList = _.cloneDeep(this.form.sqrList)
任超 committed
122 123
      }
    }
任超 committed
124
  },
任超 committed
125
  methods: {
任超 committed
126
    closeDialog () {
田浩浩 committed
127
      this.$emit("input", false);
任超 committed
128
    },
任超 committed
129
    loadData () {
田浩浩 committed
130
      this.$startLoading();
任超 committed
131
      getJtfcInfo({ sqcxBsm: this.sqcxBsm }).then((res) => {
田浩浩 committed
132 133
        this.$endLoading();
        if (res.code == 200) {
任超 committed
134
          this.form = res.result;
田浩浩 committed
135 136 137
          this.isSearch = true;
        }
      });
任超 committed
138
    },
任超 committed
139
    queryChick () {
田浩浩 committed
140
      this.$startLoading();
田浩浩 committed
141
      addJtfcCxjgXx(this.form).then((res) => {
田浩浩 committed
142
        this.$endLoading();
田浩浩 committed
143
        if (res.code == 200) {
田浩浩 committed
144 145 146
          this.form = res.result;
          this.isSearch = true;
          this.$parent.queryClick();
田浩浩 committed
147 148
        }
      });
任超 committed
149
    },
任超 committed
150
    resetClick () {
田浩浩 committed
151
      this.form.djSqcxDO = { ycyrgx: "1", cxyt: "" };
田浩浩 committed
152
      this.form.sqrList = _.cloneDeep([this.newData]);
任超 committed
153
      this.form.qlrList = _.cloneDeep([this.newData]);
田浩浩 committed
154 155 156 157
      this.form.cxjgList = [];
      this.form.dyjlList = [];
      this.isSearch = false;
    },
任超 committed
158 159
    handleRead (scope) { },
    add (type) {
田浩浩 committed
160
      if (type == "sqr") {
任超 committed
161
        this.form.sqrList.push(_.cloneDeep(this.newData));
田浩浩 committed
162
      } else {
任超 committed
163
        this.form.qlrList.push(_.cloneDeep(this.newData));
田浩浩 committed
164 165
      }
    },
任超 committed
166
    remove (index, row, type) {
田浩浩 committed
167 168 169 170 171 172
      if (type == "sqr") {
        this.form.sqrList.splice(index, 1);
      } else {
        this.form.qlrList.splice(index, 1);
      }
    },
任超 committed
173
    teltest (row) {
田浩浩 committed
174 175 176 177 178 179 180 181
      const reg = /^1([38]\d|5[0-35-9]|7[3678])\d{8}$/;
      if (row.lxdh == "" || row.lxdh.length <= 10 || !reg.test(row.lxdh)) {
        row.inputErr = true;
        return false;
      } else {
        row.inputErr = false;
        return true;
      }
任超 committed
182
    },
田浩浩 committed
183 184
  },
};
任超 committed
185 186 187
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
jiaozeping@pashanhoo.com committed
188
@import "~@/styles/public.scss";
任超 committed
189

任超 committed
190 191 192 193 194 195 196
.title {
  padding-bottom: 10px;
  margin-bottom: 10px;
  display: block;
  border-bottom: 1px solid $borderColor;
}

任超 committed
197 198 199 200 201
.jtfccx-edit {
  @include flex;
  flex-direction: column;
  overflow-y: hidden;
  max-height: 87vh;
任超 committed
202
  padding: 0 2px;
任超 committed
203 204 205 206 207 208 209 210 211 212 213 214 215

  .jtfccx-edit-con {
    flex: 1;
    height: 100%;
    overflow-y: scroll;
  }

  .submit-button {
    text-align: center;
    height: 52px;
    padding-top: 10px;
    background-color: #fff;
  }
任超 committed
216 217
}
</style>