111
Showing
1 changed file
with
83 additions
and
52 deletions
... | @@ -6,8 +6,9 @@ | ... | @@ -6,8 +6,9 @@ |
6 | <template> | 6 | <template> |
7 | <div> | 7 | <div> |
8 | <div> | 8 | <div> |
9 | <div> | ||
9 | <el-form-item label="共有方式:"> | 10 | <el-form-item label="共有方式:"> |
10 | <el-radio-group :disabled="!viewEdit" v-model="ruleForm.sldy.gyfs"> | 11 | <el-radio-group :disabled="!disabled" v-model="sldyData.gyfs" change="gyfsChange"> |
11 | <el-radio label="0">单独所有</el-radio> | 12 | <el-radio label="0">单独所有</el-radio> |
12 | <el-radio label="1">共同共有</el-radio> | 13 | <el-radio label="1">共同共有</el-radio> |
13 | <el-radio label="2">按份所有</el-radio> | 14 | <el-radio label="2">按份所有</el-radio> |
... | @@ -15,8 +16,29 @@ | ... | @@ -15,8 +16,29 @@ |
15 | </el-radio-group> | 16 | </el-radio-group> |
16 | </el-form-item> | 17 | </el-form-item> |
17 | </div> | 18 | </div> |
19 | <div v-show="sldyData.gyfs != '0'"> | ||
20 | <el-form-item label="是否分别持证:"> | ||
21 | <el-radio-group v-model="sldyData.sqfbcz" :disabled="!disabled"> | ||
22 | <el-radio :label="1">是</el-radio> | ||
23 | <el-radio :label="0">否</el-radio> | ||
24 | </el-radio-group> | ||
25 | </el-form-item> | ||
26 | <el-form-item label="持证人:" v-show="sldyData.sqfbcz == '0'"> | ||
27 | <el-select v-model="czr" placeholder="持证人" :disabled="!disabled"> | ||
28 | <el-option | ||
29 | v-for="(item, index) in tableDataList" | ||
30 | :key="index" | ||
31 | :label="item.sqrmc" | ||
32 | :value="item.id" | ||
33 | > | ||
34 | </el-option> | ||
35 | </el-select> | ||
36 | </el-form-item> | ||
37 | </div> | ||
38 | </div> | ||
18 | <lb-table | 39 | <lb-table |
19 | :column="column" :pagination="false" | 40 | :column="column" |
41 | :pagination="false" | ||
20 | :key="key" | 42 | :key="key" |
21 | :heightNumSetting="true" | 43 | :heightNumSetting="true" |
22 | :minHeight="0" | 44 | :minHeight="0" |
... | @@ -24,7 +46,7 @@ | ... | @@ -24,7 +46,7 @@ |
24 | :data="tableDataList" | 46 | :data="tableDataList" |
25 | > | 47 | > |
26 | </lb-table> | 48 | </lb-table> |
27 | <addQlr | 49 | <addSqr |
28 | v-model="dialog" | 50 | v-model="dialog" |
29 | :details="details" | 51 | :details="details" |
30 | :showButton="disabled" | 52 | :showButton="disabled" |
... | @@ -35,24 +57,24 @@ | ... | @@ -35,24 +57,24 @@ |
35 | <script> | 57 | <script> |
36 | import { mapGetters } from "vuex"; | 58 | import { mapGetters } from "vuex"; |
37 | import { getIdCardInfo } from "@/utils/operation.js"; | 59 | import { getIdCardInfo } from "@/utils/operation.js"; |
38 | import addQlr from "./addSqr.vue"; | 60 | import addSqr from "./addSqr.vue"; |
39 | export default { | 61 | export default { |
40 | components: { | 62 | components: { addSqr }, |
41 | addQlr, | ||
42 | }, | ||
43 | computed: { | 63 | computed: { |
44 | ...mapGetters(["dictData"]), | 64 | ...mapGetters(["dictData"]), |
45 | }, | 65 | }, |
46 | props: { | 66 | props: { |
47 | tableData: { | 67 | qlrData: { |
48 | type: Array, | 68 | type: Array, |
49 | default: function () { | 69 | default: function () { |
50 | return []; | 70 | return []; |
51 | }, | 71 | }, |
52 | }, | 72 | }, |
53 | gyfs: { | 73 | sldyData: { |
54 | type: String, | 74 | type: Object, |
55 | default: "1", | 75 | default: function () { |
76 | return {}; | ||
77 | }, | ||
56 | }, | 78 | }, |
57 | disabled: { | 79 | disabled: { |
58 | type: Boolean, | 80 | type: Boolean, |
... | @@ -105,24 +127,6 @@ export default { | ... | @@ -105,24 +127,6 @@ export default { |
105 | }, | 127 | }, |
106 | }, | 128 | }, |
107 | { | 129 | { |
108 | label: "身份证读卡器", | ||
109 | align: "center", | ||
110 | render: (h, scope) => { | ||
111 | return ( | ||
112 | <el-button | ||
113 | type="text" | ||
114 | icon="el-icon-tickets" | ||
115 | disabled={!this.disabled} | ||
116 | onClick={() => { | ||
117 | this.readClick(scope.row); | ||
118 | }} | ||
119 | > | ||
120 | 读取 | ||
121 | </el-button> | ||
122 | ); | ||
123 | }, | ||
124 | }, | ||
125 | { | ||
126 | prop: "sqrmc", | 130 | prop: "sqrmc", |
127 | label: "姓名/名称", | 131 | label: "姓名/名称", |
128 | }, | 132 | }, |
... | @@ -181,10 +185,11 @@ export default { | ... | @@ -181,10 +185,11 @@ export default { |
181 | }, | 185 | }, |
182 | ], | 186 | ], |
183 | column: [], | 187 | column: [], |
188 | czr: "", | ||
184 | }; | 189 | }; |
185 | }, | 190 | }, |
186 | watch: { | 191 | watch: { |
187 | tableData: { | 192 | qlrData: { |
188 | handler: function (val, oldVal) { | 193 | handler: function (val, oldVal) { |
189 | let that = this; | 194 | let that = this; |
190 | this.$nextTick(() => { | 195 | this.$nextTick(() => { |
... | @@ -198,12 +203,24 @@ export default { | ... | @@ -198,12 +203,24 @@ export default { |
198 | immediate: true, | 203 | immediate: true, |
199 | deep: true, | 204 | deep: true, |
200 | }, | 205 | }, |
201 | gyfs: { | 206 | //监听共有方式 |
207 | "sldyData.gyfs": { | ||
202 | handler(newVal, oldValue) { | 208 | handler(newVal, oldValue) { |
203 | let dataList = _.cloneDeep(this.InformationTable); | 209 | let dataList = _.cloneDeep(this.InformationTable); |
204 | if (newVal == 0) { | 210 | if (newVal == "0") { |
211 | if (this.tableDataList.length > 1) { | ||
212 | this.$message({ | ||
213 | showClose: true, | ||
214 | message: "单独所有,只能添加一条权利人记录", | ||
215 | type: "error", | ||
216 | }); | ||
217 | sldyData.gyfs = oldValue; | ||
218 | |||
219 | return false; | ||
220 | } | ||
221 | this.ruleForm.qlrList[0].sfczr = "1"; | ||
205 | this.column = _.cloneDeep(dataList); | 222 | this.column = _.cloneDeep(dataList); |
206 | this.tableDataList = _.cloneDeep(this.tableData); | 223 | this.tableDataList = _.cloneDeep(this.qlrData); |
207 | this.key++; | 224 | this.key++; |
208 | } else if (newVal == "1" || newVal == "3") { | 225 | } else if (newVal == "1" || newVal == "3") { |
209 | this.column = dataList; | 226 | this.column = dataList; |
... | @@ -217,6 +234,39 @@ export default { | ... | @@ -217,6 +234,39 @@ export default { |
217 | }, | 234 | }, |
218 | immediate: true, | 235 | immediate: true, |
219 | }, | 236 | }, |
237 | //监听申请分别持证 | ||
238 | "sldyData.sqfbcz": { | ||
239 | handler(newVal, oldValue) { | ||
240 | if (newVal == 0) { | ||
241 | let that = this; | ||
242 | if (sldyData.gyfs != "0") { | ||
243 | this.tableDataList.forEach((item) => { | ||
244 | if (item.bsmSqr == that.czr) { | ||
245 | item.sfczr = "1"; | ||
246 | } else { | ||
247 | item.sfczr = "0"; | ||
248 | } | ||
249 | }); | ||
250 | } | ||
251 | } else { | ||
252 | this.tableDataList.forEach((item, index) => { | ||
253 | item.sfczr = "1"; | ||
254 | }); | ||
255 | this.czr = ""; | ||
256 | } | ||
257 | }, | ||
258 | immediate: true, | ||
259 | }, | ||
260 | }, | ||
261 | mounted() { | ||
262 | let that = this; | ||
263 | if (this.sldyData.gyfs != "0" && this.sldyData.sqfbcz == 0) { | ||
264 | this.qlrData.forEach((item) => { | ||
265 | if (item.sfczr == "1") { | ||
266 | that.czr = item.bsmSqr; | ||
267 | } | ||
268 | }); | ||
269 | } | ||
220 | }, | 270 | }, |
221 | methods: { | 271 | methods: { |
222 | /** | 272 | /** |
... | @@ -227,25 +277,6 @@ export default { | ... | @@ -227,25 +277,6 @@ export default { |
227 | handleupdateDetail(value) { | 277 | handleupdateDetail(value) { |
228 | let that = this; | 278 | let that = this; |
229 | let arr = this.tableData.map((item) => item.zjh); | 279 | let arr = this.tableData.map((item) => item.zjh); |
230 | // if (this.isaddupdate) { | ||
231 | // if (!arr.includes(value.zjh)) { | ||
232 | // this.tableDataList[this.tableDataList.length] = _.cloneDeep(value); | ||
233 | // this.$emit('upDateQlrxxList', this.tableDataList) | ||
234 | // } else { | ||
235 | // setTimeout(() => { | ||
236 | // that.$message.error('证件号不能重复') | ||
237 | // }, 1500) | ||
238 | // } | ||
239 | // } else { | ||
240 | // if (!arr.includes(value.zjh) || this.tableData[this.dataIndex].zjh == value.zjh) { | ||
241 | // this.tableDataList[this.dataIndex] = _.cloneDeep(value); | ||
242 | // this.$emit('upDateQlrxxList', this.tableDataList) | ||
243 | // } else { | ||
244 | // setTimeout(() => { | ||
245 | // that.$message.error('证件号不能重复') | ||
246 | // }, 1500) | ||
247 | // } | ||
248 | // } | ||
249 | 280 | ||
250 | if (this.isaddupdate) { | 281 | if (this.isaddupdate) { |
251 | if (!_.isEqual(value, this.tableData)) { | 282 | if (!_.isEqual(value, this.tableData)) { | ... | ... |
-
Please register or sign in to post a comment