c46a3450 by tianhaohao@pashanhoo.com

111

1 parent 7d99eca1
......@@ -6,8 +6,9 @@
<template>
<div>
<div>
<div>
<el-form-item label="共有方式:">
<el-radio-group :disabled="!viewEdit" v-model="ruleForm.sldy.gyfs">
<el-radio-group :disabled="!disabled" v-model="sldyData.gyfs" change="gyfsChange">
<el-radio label="0">单独所有</el-radio>
<el-radio label="1">共同共有</el-radio>
<el-radio label="2">按份所有</el-radio>
......@@ -15,8 +16,29 @@
</el-radio-group>
</el-form-item>
</div>
<div v-show="sldyData.gyfs != '0'">
<el-form-item label="是否分别持证:">
<el-radio-group v-model="sldyData.sqfbcz" :disabled="!disabled">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="持证人:" v-show="sldyData.sqfbcz == '0'">
<el-select v-model="czr" placeholder="持证人" :disabled="!disabled">
<el-option
v-for="(item, index) in tableDataList"
:key="index"
:label="item.sqrmc"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</div>
</div>
<lb-table
:column="column" :pagination="false"
:column="column"
:pagination="false"
:key="key"
:heightNumSetting="true"
:minHeight="0"
......@@ -24,7 +46,7 @@
:data="tableDataList"
>
</lb-table>
<addQlr
<addSqr
v-model="dialog"
:details="details"
:showButton="disabled"
......@@ -35,24 +57,24 @@
<script>
import { mapGetters } from "vuex";
import { getIdCardInfo } from "@/utils/operation.js";
import addQlr from "./addSqr.vue";
import addSqr from "./addSqr.vue";
export default {
components: {
addQlr,
},
components: { addSqr },
computed: {
...mapGetters(["dictData"]),
},
props: {
tableData: {
qlrData: {
type: Array,
default: function () {
return [];
},
},
gyfs: {
type: String,
default: "1",
sldyData: {
type: Object,
default: function () {
return {};
},
},
disabled: {
type: Boolean,
......@@ -105,24 +127,6 @@ export default {
},
},
{
label: "身份证读卡器",
align: "center",
render: (h, scope) => {
return (
<el-button
type="text"
icon="el-icon-tickets"
disabled={!this.disabled}
onClick={() => {
this.readClick(scope.row);
}}
>
读取
</el-button>
);
},
},
{
prop: "sqrmc",
label: "姓名/名称",
},
......@@ -181,10 +185,11 @@ export default {
},
],
column: [],
czr: "",
};
},
watch: {
tableData: {
qlrData: {
handler: function (val, oldVal) {
let that = this;
this.$nextTick(() => {
......@@ -198,12 +203,24 @@ export default {
immediate: true,
deep: true,
},
gyfs: {
//监听共有方式
"sldyData.gyfs": {
handler(newVal, oldValue) {
let dataList = _.cloneDeep(this.InformationTable);
if (newVal == 0) {
if (newVal == "0") {
if (this.tableDataList.length > 1) {
this.$message({
showClose: true,
message: "单独所有,只能添加一条权利人记录",
type: "error",
});
sldyData.gyfs = oldValue;
return false;
}
this.ruleForm.qlrList[0].sfczr = "1";
this.column = _.cloneDeep(dataList);
this.tableDataList = _.cloneDeep(this.tableData);
this.tableDataList = _.cloneDeep(this.qlrData);
this.key++;
} else if (newVal == "1" || newVal == "3") {
this.column = dataList;
......@@ -217,6 +234,39 @@ export default {
},
immediate: true,
},
//监听申请分别持证
"sldyData.sqfbcz": {
handler(newVal, oldValue) {
if (newVal == 0) {
let that = this;
if (sldyData.gyfs != "0") {
this.tableDataList.forEach((item) => {
if (item.bsmSqr == that.czr) {
item.sfczr = "1";
} else {
item.sfczr = "0";
}
});
}
} else {
this.tableDataList.forEach((item, index) => {
item.sfczr = "1";
});
this.czr = "";
}
},
immediate: true,
},
},
mounted() {
let that = this;
if (this.sldyData.gyfs != "0" && this.sldyData.sqfbcz == 0) {
this.qlrData.forEach((item) => {
if (item.sfczr == "1") {
that.czr = item.bsmSqr;
}
});
}
},
methods: {
/**
......@@ -227,25 +277,6 @@ export default {
handleupdateDetail(value) {
let that = this;
let arr = this.tableData.map((item) => item.zjh);
// if (this.isaddupdate) {
// if (!arr.includes(value.zjh)) {
// this.tableDataList[this.tableDataList.length] = _.cloneDeep(value);
// this.$emit('upDateQlrxxList', this.tableDataList)
// } else {
// setTimeout(() => {
// that.$message.error('证件号不能重复')
// }, 1500)
// }
// } else {
// if (!arr.includes(value.zjh) || this.tableData[this.dataIndex].zjh == value.zjh) {
// this.tableDataList[this.dataIndex] = _.cloneDeep(value);
// this.$emit('upDateQlrxxList', this.tableDataList)
// } else {
// setTimeout(() => {
// that.$message.error('证件号不能重复')
// }, 1500)
// }
// }
if (this.isaddupdate) {
if (!_.isEqual(value, this.tableData)) {
......