85d54a9d by tianhaohao@pashanhoo.com

添加效验

1 parent 3b55fa09
......@@ -527,7 +527,7 @@
} else {
this.$message({
showClose: true,
message: "请输入登记原因",
message: "请输入红框内的相关信息!",
type: "error"
})
return false
......
......@@ -491,7 +491,7 @@
} else {
this.$message({
showClose: true,
message: "请输入登记原因",
message: "请输入红框内的相关信息!",
type: "error"
})
return false
......
......@@ -12,7 +12,8 @@
v-Loading="loading"
:label-position="flag ? 'top' : ''"
:inline="flag"
label-width="190px">
label-width="190px"
>
<div class="slxx_con" :class="flag ? 'formMarginBot0' : ''">
<div class="slxx_title title-block">
申请业务信息
......@@ -54,11 +55,9 @@
</el-row>
<div class="slxx_title title-block">
<el-row>
<el-col :span="20">
不动产单元情况
</el-col>
<el-col :span="4" v-if="ruleForm.sldy.djlx=='500'">
<el-form-item label="是否创建证书:" style="height:24px">
<el-col :span="20"> 不动产单元情况 </el-col>
<el-col :span="4" v-if="ruleForm.sldy.djlx == '500'">
<el-form-item label="是否创建证书:" style="height: 24px">
<el-radio-group v-model="ruleForm.sldy.sfxysczs">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
......@@ -83,17 +82,27 @@
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="发包方:">
<el-input v-model="ruleForm.lq.fbf" :disabled="!viewEdit"></el-input>
<el-input
v-model="ruleForm.lq.fbf"
:disabled="!viewEdit"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="发包方代码:">
<el-input v-model="ruleForm.lq.fbfdm" :disabled="!viewEdit"></el-input>
<el-input
v-model="ruleForm.lq.fbfdm"
:disabled="!viewEdit"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="使用权(承包)面积:" prop="lq.syqmj">
<el-input maxlength="12" v-model="ruleForm.lq.syqmj" :disabled="!viewEdit"></el-input>
<el-input
maxlength="12"
v-model="ruleForm.lq.syqmj"
:disabled="!viewEdit"
></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -105,26 +114,36 @@
v-for="item in dictData['A45']"
:key="item.dcode"
:label="item.dname"
:value="item.dcode">
:value="item.dcode"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="森林类别:">
<el-input v-model="ruleForm.lq.sllb" :disabled="!viewEdit"></el-input>
<el-input
v-model="ruleForm.lq.sllb"
:disabled="!viewEdit"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="主要树种:">
<el-input v-model="ruleForm.lq.zysz" :disabled="!viewEdit"></el-input>
<el-input
v-model="ruleForm.lq.zysz"
:disabled="!viewEdit"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="株数:">
<el-input v-model="ruleForm.lq.zs" :disabled="!viewEdit"></el-input>
<el-input
v-model="ruleForm.lq.zs"
:disabled="!viewEdit"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -134,7 +153,8 @@
v-for="item in dictData['A26']"
:key="item.dcode"
:label="item.dname"
:value="item.dcode">
:value="item.dcode"
>
</el-option>
</el-select>
</el-form-item>
......@@ -146,7 +166,8 @@
v-for="item in dictData['A52']"
:key="item.dcode"
:label="item.dname"
:value="item.dcode">
:value="item.dcode"
>
</el-option>
</el-select>
</el-form-item>
......@@ -161,25 +182,35 @@
value-format="yyyy"
v-model="ruleForm.lq.zlnd"
:disabled="!viewEdit"
type="year">
type="year"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="林班:">
<el-input v-model="ruleForm.lq.lb" :disabled="!viewEdit"></el-input>
<el-input
v-model="ruleForm.lq.lb"
:disabled="!viewEdit"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="小班:">
<el-input v-model="ruleForm.lq.xb" :disabled="!viewEdit"></el-input>
<el-input
v-model="ruleForm.lq.xb"
:disabled="!viewEdit"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="小地名:">
<el-input v-model="ruleForm.lq.xdm" :disabled="!viewEdit"></el-input>
<el-input
v-model="ruleForm.lq.xdm"
:disabled="!viewEdit"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -189,7 +220,8 @@
value-format="yyyy-MM-dd HH:mm:ss"
v-model="ruleForm.lq.ldsyqssj"
:disabled="!viewEdit"
type="date"></el-date-picker>
type="date"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -199,7 +231,8 @@
value-format="yyyy-MM-dd HH:mm:ss"
v-model="ruleForm.lq.ldsyjssj"
:disabled="!viewEdit"
type="date"></el-date-picker>
type="date"
></el-date-picker>
</el-form-item>
</el-col>
</el-row>
......@@ -211,7 +244,10 @@
</el-col> -->
<el-col :span="8">
<el-form-item label="林地使用 (承包)期限:">
<el-input v-model="ruleForm.lq.ldsyqx" :disabled="!viewEdit"></el-input>
<el-input
v-model="ruleForm.lq.ldsyqx"
:disabled="!viewEdit"
></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -223,7 +259,8 @@
:disabled="!viewEdit"
type="textarea"
maxlength="500"
show-word-limit></el-input>
show-word-limit
></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -244,7 +281,8 @@
<el-form-item label="共有方式:">
<el-radio-group
:disabled="!viewEdit"
v-model="ruleForm.sldy.gyfs">
v-model="ruleForm.sldy.gyfs"
>
<el-radio label="0">单独所有</el-radio>
<el-radio label="1">共同共有</el-radio>
<el-radio label="2">按份所有</el-radio>
......@@ -257,7 +295,8 @@
<el-radio-group
v-model="ruleForm.sldy.sqfbcz"
:disabled="!viewEdit"
@input="updaterow()">
@input="updaterow()"
>
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
......@@ -265,17 +304,20 @@
</el-col>
<el-col
:span="6"
v-show="ruleForm.sldy.sqfbcz == '0' && ruleForm.sldy.gyfs != '0'">
v-show="ruleForm.sldy.sqfbcz == '0' && ruleForm.sldy.gyfs != '0'"
>
<el-form-item label="持证人:">
<el-select
v-model="czr"
placeholder="持证人"
:disabled="!viewEdit">
:disabled="!viewEdit"
>
<el-option
v-for="(item, index) in czrOptions"
:key="index"
:label="item.sqrmc"
:value="item.id">
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
......@@ -285,7 +327,8 @@
@upDateQlrxxList="upDateQlrxxList"
:tableData="ruleForm.qlrList"
:disabled="viewEdit"
:gyfs="ruleForm.sldy.gyfs" />
:gyfs="ruleForm.sldy.gyfs"
/>
<div v-if="ruleForm.ywrList && ruleForm.sldy.djlx == '200'">
<div class="slxx_title title-block">
......@@ -297,7 +340,8 @@
:disabled="viewEdit"
@upDateQlrxxList="upDateYwrxxList"
:tableData="ruleForm.ywrList"
:gyfs="ruleForm.sldy.gyfs" />
:gyfs="ruleForm.sldy.gyfs"
/>
</div>
<div class="slxx_title title-block">
登记原因
......@@ -312,7 +356,8 @@
maxlength="500"
show-word-limit
:disabled="!viewEdit"
v-model="ruleForm.lq.djyy">
v-model="ruleForm.lq.djyy"
>
</el-input>
</el-form-item>
</el-col>
......@@ -327,283 +372,297 @@
</div>
</template>
<script>
import ywmix from "@/views/ywbl/mixin/index";
import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
import ywrCommonTable from "@/views/workflow/components/ywrCommonTable";
import tdytTable from "@/views/workflow/components/tdytTable";
import { Init, saveData } from "@/api/workflow/sllmFlow.js";
import { mapGetters } from "vuex";
import { formValidate } from "./slxxValidate";
export default {
mixins: [ywmix],
mounted () {
let that = this
this.viewEdit = this.$parent.currentSelectTab.ableOperation;
this.propsParam = this.$attrs;
var formdata = new FormData();
this.loading = true
formdata.append("bsmSldy", this.propsParam.bsmSldy);
formdata.append("djlx", this.propsParam.djlx);
formdata.append("isEdit", this.viewEdit);
Init(formdata).then((res) => {
import ywmix from "@/views/ywbl/mixin/index";
import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
import ywrCommonTable from "@/views/workflow/components/ywrCommonTable";
import tdytTable from "@/views/workflow/components/tdytTable";
import { Init, saveData } from "@/api/workflow/sllmFlow.js";
import { mapGetters } from "vuex";
import { formValidate } from "./slxxValidate";
export default {
mixins: [ywmix],
mounted() {
let that = this;
this.viewEdit = this.$parent.currentSelectTab.ableOperation;
this.propsParam = this.$attrs;
var formdata = new FormData();
this.loading = true;
formdata.append("bsmSldy", this.propsParam.bsmSldy);
formdata.append("djlx", this.propsParam.djlx);
formdata.append("isEdit", this.viewEdit);
Init(formdata)
.then((res) => {
setTimeout(() => {
this.loading = false
}, 200)
this.loading = false;
}, 200);
if (res.code === 200 && res.result) {
this.ruleForm = {
...res.result,
...res.result.qlxxdatas,
};
this.ruleForm.qlrList.forEach((item) => {
item.id = item.bsmSqr
if (item.sfczr == '1') {
that.czr = item.bsmSqr
item.id = item.bsmSqr;
if (item.sfczr == "1") {
that.czr = item.bsmSqr;
}
})
that.czrOptions = that.ruleForm.qlrList
});
that.czrOptions = that.ruleForm.qlrList;
that.isSave = that.viewEdit;
this.rules = formValidate(this.ruleForm.sldy.djlx);
} else {
that.isSave = false
that.$confirm(res.message, '提示', {
cancelButtonText: '取消',
that.isSave = false;
that.$confirm(res.message, "提示", {
cancelButtonText: "取消",
showConfirmButton: false,
type: 'warning'
})
type: "warning",
});
}
}).catch(() => {
this.loading = false
this.isSave = false
})
},
components: { qlrCommonTable, tdytTable, ywrCommonTable },
computed: {
...mapGetters(["dictData", "flag"]),
},
data () {
return {
isSave: true,
loading: false,
disabled: true,
tdytOption: [],
czrOptions: [],
czr: "",
ruleForm: {
lq: {
zlnd: "",
ldsyqssj: "",
ldsyjssj: ""
},
flow: {
ywh: "",
},
qlxx: {
mj: "",
},
sldy: {
gyfs: "",
},
slsq: {},
fdcq2: {
zyjzmj: "",
ftjzmj: "",
},
zdjbxx: {
ghytmc: "",
},
.catch(() => {
this.loading = false;
this.isSave = false;
});
},
components: { qlrCommonTable, tdytTable, ywrCommonTable },
computed: {
...mapGetters(["dictData", "flag"]),
},
data() {
return {
isSave: true,
loading: false,
disabled: true,
tdytOption: [],
czrOptions: [],
czr: "",
ruleForm: {
lq: {
zlnd: "",
ldsyqssj: "",
ldsyjssj: "",
},
flow: {
ywh: "",
},
qlxx: {
mj: "",
},
sldy: {
gyfs: "",
},
slsq: {},
fdcq2: {
zyjzmj: "",
ftjzmj: "",
},
zdjbxx: {
ghytmc: "",
},
//传递参数
propsParam: this.$attrs,
//表单是否可操作
viewEdit: true,
rules: {},
};
},
methods: {
/**
* @description: 更新土地用途信息
* @param {*} val
* @author: renchao
*/
upDateTdytxxList (val) {
this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val));
},
/**
* @description: 更新权利人信息
* @param {*} val
* @author: renchao
*/
upDateQlrxxList (val) {
if (!_.isEqual(val, this.ruleForm.qlrList)) {
this.ruleForm.qlrList = _.cloneDeep(val);
this.czrOptions = this.ruleForm.qlrList;
}
this.num = 0
this.ruleForm.qlrList.forEach(item => {
if (item.id == this.czr) {
this.num++
}
})
if (this.num == 0) {
this.czr = ''
//传递参数
propsParam: this.$attrs,
//表单是否可操作
viewEdit: true,
rules: {},
};
},
methods: {
/**
* @description: 更新土地用途信息
* @param {*} val
* @author: renchao
*/
upDateTdytxxList(val) {
this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val));
},
/**
* @description: 更新权利人信息
* @param {*} val
* @author: renchao
*/
upDateQlrxxList(val) {
if (!_.isEqual(val, this.ruleForm.qlrList)) {
this.ruleForm.qlrList = _.cloneDeep(val);
this.czrOptions = this.ruleForm.qlrList;
}
this.num = 0;
this.ruleForm.qlrList.forEach((item) => {
if (item.id == this.czr) {
this.num++;
}
},
/**
* @description: 是否持证人变化
* @param {*} val
* @author: renchao
*/
updaterow () {
});
if (this.num == 0) {
this.czr = "";
},
/**
* @description: 更新业务人信息
* @param {*} val
* @author: renchao
*/
upDateYwrxxList (val) {
this.ruleForm.ywrList = _.cloneDeep(val);
},
/**
* @description: onSubmit
* @author: renchao
*/
onSubmit () {
let that = this;
if (this.ruleForm.qlrList.length == 0) {
}
},
/**
* @description: 是否持证人变化
* @param {*} val
* @author: renchao
*/
updaterow() {
this.czr = "";
},
/**
* @description: 更新业务人信息
* @param {*} val
* @author: renchao
*/
upDateYwrxxList(val) {
this.ruleForm.ywrList = _.cloneDeep(val);
},
/**
* @description: onSubmit
* @author: renchao
*/
onSubmit() {
let that = this;
if (this.ruleForm.qlrList.length == 0) {
this.$message({
showClose: true,
message: "请确认权利人信息",
type: "error",
});
return false;
}
if (this.ruleForm.sldy.gyfs == "0") {
if (this.ruleForm.qlrList.length > 1) {
this.$message({
showClose: true,
message: "请确认权利人信息",
message: "共有方式:单独所有,权利人只能是一个人",
type: "error",
});
return false;
}
if (this.ruleForm.sldy.gyfs == "0") {
if (this.ruleForm.qlrList.length > 1) {
this.$message({
showClose: true,
message: "共有方式:单独所有,权利人只能是一个人",
type: "error",
});
return false;
}
this.ruleForm.qlrList[0].sfczr = "1";
this.ruleForm.qlrList[0].sfczr = "1";
} else {
if (this.ruleForm.qlrList.length <= 1) {
this.$message({
showClose: true,
message:
"共有方式:共同所有,按份所有,其他所有,权利人必须是两个以上",
type: "error",
});
return false;
}
//是否分别持证
if (this.ruleForm.sldy.sqfbcz == "1") {
//是
this.ruleForm.qlrList.forEach((item) => {
item.sfczr = "1";
});
} else {
if (this.ruleForm.qlrList.length <= 1) {
this.$message({
if (that.czr === "") {
that.$message({
showClose: true,
message:
"共有方式:共同所有,按份所有,其他所有,权利人必须是两个以上",
message: "请选择持证人",
type: "error",
});
return false;
}
//是否分别持证
if (this.ruleForm.sldy.sqfbcz == "1") {
//是
this.ruleForm.qlrList.forEach(item => {
this.ruleForm.qlrList.forEach((item) => {
if (item.id == that.czr) {
item.sfczr = "1";
});
} else {
if (that.czr === '') {
that.$message({
} else {
item.sfczr = "0";
}
});
}
}
this.$refs["ruleForm"].validate((valid) => {
if (valid) {
that.$store.dispatch("user/refreshPage", false);
saveData(this.ruleForm).then((res) => {
if (res.code === 200) {
this.$message({
showClose: true,
message: "保存成功!",
type: "success",
});
this.$store.dispatch("user/refreshPage", true);
} else {
this.$message({
showClose: true,
message: "请选择持证人",
message: res.message,
type: "error",
});
return false;
}
this.ruleForm.qlrList.forEach(item => {
if (item.id == that.czr) {
item.sfczr = "1";
} else {
item.sfczr = "0";
}
});
}
});
} else {
that.$message({
showClose: true,
message: "请输入红框内的相关信息!",
type: "error",
});
return false;
}
saveData(this.ruleForm).then((res) => {
if (res.code === 200) {
this.$message({
showClose: true,
message: "保存成功!",
type: "success",
});
this.$store.dispatch("user/refreshPage", true);
} else {
this.$message({
showClose: true,
message: res.message,
type: "error"
})
}
})
}
}
}
});
},
},
};
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
@import "~@/styles/public.scss";
/deep/.el-form {
display: flex;
flex-direction: column;
height: calc(100vh - 130px);
}
/deep/.el-form {
display: flex;
flex-direction: column;
height: calc(100vh - 130px);
}
/deep/.el-form-item__label {
padding: 0;
}
/deep/.el-form-item__label {
padding: 0;
}
/deep/.el-radio {
margin-right: 10px;
}
/deep/.el-radio {
margin-right: 10px;
}
/deep/.el-select {
width: 100%;
}
/deep/.el-select {
width: 100%;
}
/deep/.el-form-item {
margin-bottom: 3px;
}
/deep/.el-form-item {
margin-bottom: 3px;
}
.marginBot0 {
margin-bottom: 0 !important;
}
.marginBot0 {
margin-bottom: 0 !important;
}
.slxx {
box-sizing: border-box;
}
.slxx {
box-sizing: border-box;
}
.slxx_con {
flex: 1;
height: 100%;
background-color: #ffffff;
overflow-y: auto;
padding-right: 3px;
overflow-x: hidden;
}
.slxx_con {
flex: 1;
height: 100%;
background-color: #ffffff;
overflow-y: auto;
padding-right: 3px;
overflow-x: hidden;
}
.submit_btn {
height: 50px;
}
.submit_btn {
height: 50px;
}
.btn {
text-align: center;
padding-top: 10px;
height: 36px;
background-color: #ffffff;
padding: 5px 0;
}
.btn {
text-align: center;
padding-top: 10px;
height: 36px;
background-color: #ffffff;
padding: 5px 0;
}
.textArea {
/deep/.el-textarea__inner {
min-height: 90px !important;
}
.textArea {
/deep/.el-textarea__inner {
min-height: 90px !important;
}
}
/deep/.el-form-item__label {
padding-bottom: 0px;
}
/deep/.el-form-item__label {
padding-bottom: 0px;
}
</style>
......
......@@ -589,7 +589,7 @@
} else {
that.$message({
showClose: true,
message: "请输入登记原因",
message: "请输入红框内的相关信息!",
type: "error"
})
return false
......
......@@ -497,7 +497,7 @@
} else {
that.$message({
showClose: true,
message: "请输入登记原因",
message: "请输入红框内的相关信息!",
type: "error"
})
return false
......
......@@ -8,7 +8,8 @@
ref="ruleForm"
:label-position="flag ? 'top' : ''"
:inline="flag"
label-width="140px">
label-width="140px"
>
<div class="slxx_con" :class="flag ? 'formMarginBot0' : ''">
<div class="slxx_title title-block">
申请业务信息
......@@ -50,10 +51,11 @@
</el-row>
<div class="slxx_title title-block">
<el-row>
<el-col :span="16">
预告买卖登记情况
</el-col>
<el-col :span="4" v-if="ruleForm.sldy.djlx=='300'||ruleForm.sldy.djlx=='500'">
<el-col :span="16"> 预告买卖登记情况 </el-col>
<el-col
:span="4"
v-if="ruleForm.sldy.djlx == '300' || ruleForm.sldy.djlx == '500'"
>
<el-button @click="compare">变化情况对比+</el-button>
</el-col>
</el-row>
......@@ -128,28 +130,34 @@
</div>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="原不动产证号:"
<el-form-item
label="原不动产证号:"
prop="sldy.ybdcqzsh"
:rules="rules.ybdcqzshrules">
:rules="rules.ybdcqzshrules"
>
<el-input disabled v-model="ruleForm.sldy.ybdcqzsh"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="预告登记种类:"
<el-form-item
label="预告登记种类:"
prop="ygdj.ygdjzlmc"
:rules="rules.ygdjzlmcrules">
:rules="rules.ygdjzlmcrules"
>
<el-input disabled v-model="ruleForm.ygdj.ygdjzlmc"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="是否禁止或者限制转让约定:"
label="是否禁止或者限制转让约定:"
label-width="200px"
prop="ygdj.sfczjzhxz"
:rules="rules.sfczjzhxzrules">
:rules="rules.sfczjzhxzrules"
>
<el-radio-group
v-model="ruleForm.ygdj.sfczjzhxz"
:disabled="!viewEdit">
:disabled="!viewEdit"
>
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
......@@ -158,55 +166,69 @@
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="被担保主债权数额:"
<el-form-item
label="被担保主债权数额:"
prop="ygdj.qdjg"
:rules="rules.qdjgrules">
:rules="rules.qdjgrules"
>
<div class="flex">
<el-input
v-model="ruleForm.ygdj.qdjg"
:disabled="!viewEdit"></el-input>
:disabled="!viewEdit"
></el-input>
<el-select
v-model="ruleForm.ygdj.jedw"
:disabled="!viewEdit"
style="width: 68px">
style="width: 68px"
>
<el-option
v-for="item in dictData['A57']"
:key="item.dcode"
:label="item.dname"
:value="item.dcode"></el-option>
:value="item.dcode"
></el-option>
</el-select>
</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="债务履行起始时间:"
<el-form-item
label="债务履行起始时间:"
prop="ygdj.zwlxqssj"
:rules="rules.zwlxqssjrules">
:rules="rules.zwlxqssjrules"
>
<el-date-picker
v-model="ruleForm.ygdj.zwlxqssj"
:disabled="!viewEdit"
type="date"></el-date-picker>
type="date"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="债务履行结束时间:"
<el-form-item
label="债务履行结束时间:"
prop="ygdj.zwlxjssj"
:rules="rules.zwlxjssjrules">
:rules="rules.zwlxjssjrules"
>
<el-date-picker
v-model="ruleForm.ygdj.zwlxjssj"
:disabled="!viewEdit"
type="date"></el-date-picker>
type="date"
></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="24">
<el-form-item label="担保范围:"
<el-form-item
label="担保范围:"
prop="ygdj.dbfw"
:rules="rules.dbfwrules">
:rules="rules.dbfwrules"
>
<el-input
v-model="ruleForm.ygdj.dbfw"
:disabled="!viewEdit"></el-input>
:disabled="!viewEdit"
></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -218,7 +240,8 @@
maxlength="500"
show-word-limit
v-model="ruleForm.ygdj.fj"
:disabled="!viewEdit"></el-input>
:disabled="!viewEdit"
></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -231,7 +254,8 @@
<el-form-item label="共有方式:">
<el-radio-group
:disabled="!viewEdit"
v-model="ruleForm.sldy.gyfs">
v-model="ruleForm.sldy.gyfs"
>
<el-radio label="0">单独所有</el-radio>
<el-radio label="1">共同共有</el-radio>
<el-radio label="2">按份所有</el-radio>
......@@ -244,7 +268,8 @@
<el-radio-group
v-model="ruleForm.sldy.sqfbcz"
:disabled="!viewEdit"
@input="updaterow()">
@input="updaterow()"
>
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
......@@ -252,17 +277,20 @@
</el-col>
<el-col
:span="6"
v-show="ruleForm.sldy.sqfbcz == '0' && ruleForm.sldy.gyfs != '0'">
v-show="ruleForm.sldy.sqfbcz == '0' && ruleForm.sldy.gyfs != '0'"
>
<el-form-item label="持证人:">
<el-select
v-model="czr"
placeholder="持证人"
:disabled="!viewEdit">
:disabled="!viewEdit"
>
<el-option
v-for="(item,index) in czrOptions"
v-for="(item, index) in czrOptions"
:key="index"
:label="item.sqrmc"
:value="item.id"></el-option>
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
......@@ -271,7 +299,8 @@
@upDateQlrxxList="upDateQlrxxList"
:tableData="ruleForm.qlrList"
:disabled="viewEdit"
:gyfs="ruleForm.sldy.gyfs" />
:gyfs="ruleForm.sldy.gyfs"
/>
<div class="slxx_title title-block">
抵押人信息
<div class="triangle"></div>
......@@ -280,21 +309,27 @@
@upDateQlrxxList="upDateYwrxxList"
:tableData="ruleForm.ywrList"
:disabled="viewEdit"
:gyfs="ruleForm.sldy.gyfs" />
:gyfs="ruleForm.sldy.gyfs"
/>
<div class="slxx_title title-block">
登记原因
<div class="triangle"></div>
</div>
<el-row :gutter="10">
<el-col>
<el-form-item v-if="ruleForm.sldy.djlx=='400'" label="注销登记原因:" prop="djyy">
<el-form-item
v-if="ruleForm.sldy.djlx == '400'"
label="注销登记原因:"
prop="ygdj.zxyy"
>
<el-input
class="textArea"
type="textarea"
maxlength="500"
show-word-limit
:disabled="!viewEdit"
v-model="ruleForm.ygdj.zxyy">
v-model="ruleForm.ygdj.zxyy"
>
</el-input>
</el-form-item>
<el-form-item v-else label="登记原因:" prop="ygdj.djyy">
......@@ -304,7 +339,8 @@
maxlength="500"
show-word-limit
:disabled="!viewEdit"
v-model="ruleForm.ygdj.djyy">
v-model="ruleForm.ygdj.djyy"
>
</el-input>
</el-form-item>
</el-col>
......@@ -319,217 +355,216 @@
</div>
</template>
<script>
import ywmix from "@/views/ywbl/mixin/index";
import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
import ywrCommonTable from "@/views/workflow/components/ywrCommonTable";
import { Init, saveData } from "@/api/workflow/ygdyFlow.js";
import { mapGetters } from "vuex";
import { formValidate } from "./slxxValidate";
export default {
mixins: [ywmix],
mounted () {
let that = this;
this.viewEdit = this.$parent.currentSelectTab.ableOperation;
this.propsParam = this.$attrs;
var formdata = new FormData();
this.loading = true;
formdata.append("bsmSldy", this.propsParam.bsmSldy);
formdata.append("bsmSlsq", this.$route.query.bsmSlsq);
formdata.append("djlx", this.propsParam.djlx);
formdata.append("isEdit", this.viewEdit);
Init(formdata).then((res) => {
import ywmix from "@/views/ywbl/mixin/index";
import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
import ywrCommonTable from "@/views/workflow/components/ywrCommonTable";
import { Init, saveData } from "@/api/workflow/ygdyFlow.js";
import { mapGetters } from "vuex";
import { formValidate } from "./slxxValidate";
export default {
mixins: [ywmix],
mounted() {
let that = this;
this.viewEdit = this.$parent.currentSelectTab.ableOperation;
this.propsParam = this.$attrs;
var formdata = new FormData();
this.loading = true;
formdata.append("bsmSldy", this.propsParam.bsmSldy);
formdata.append("bsmSlsq", this.$route.query.bsmSlsq);
formdata.append("djlx", this.propsParam.djlx);
formdata.append("isEdit", this.viewEdit);
Init(formdata)
.then((res) => {
setTimeout(() => {
that.loading = false
}, 200)
that.loading = false;
}, 200);
if (res.code === 200 && res.result) {
that.ruleForm = res.result;
that.ruleForm.qlrList.forEach((item) => {
item.id = item.bsmSqr
if (item.sfczr == '1') {
that.czr = item.bsmSqr
item.id = item.bsmSqr;
if (item.sfczr == "1") {
that.czr = item.bsmSqr;
}
})
});
that.czrOptions = this.ruleForm.qlrList;
that.isSave = that.viewEdit
that.isSave = that.viewEdit;
this.rules = formValidate(this.ruleForm.sldy.djlx);
} else {
that.isSave = false
that.$confirm(res.message, '提示', {
cancelButtonText: '取消',
that.isSave = false;
that.$confirm(res.message, "提示", {
cancelButtonText: "取消",
showConfirmButton: false,
type: 'warning'
})
type: "warning",
});
}
}).catch(() => {
this.loading = false
this.isSave = false
})
},
components: { qlrCommonTable, ywrCommonTable },
computed: {
...mapGetters(["dictData", "flag"])
},
data () {
return {
isSave: true,
//表单是否可操作
viewEdit: true,
loading: false,
disabled: true,
tdytOption: [],
czrOptions: [],
czr: "",
ruleForm: {},
//传递参数
propsParam: this.$attrs,
rules: {
ybdcqzshrules: [
{ required: true, message: "原不动产证号", trigger: "blur" },
],
ygdjzlmcrules: [
{ required: true, message: "预告登记种类", trigger: "blur" },
],
sfczjzhxzrules: [
{ required: true, message: "是否禁止或者限制转让的约定:", trigger: "blur" },
],
qdjgrules: [{ required: true, message: "被担保主债权数额", trigger: "blur" }],
zwlxqssjrules: [{ required: true, message: "债务履行起始时间", trigger: "blur" }],
zwlxjssjrules: [{ required: true, message: "债务履行结束时间", trigger: "blur" }],
dbfwrules: [{ required: true, message: "担保范围", trigger: "blur" }],
'ygdj.djyy': [
{ required: true, message: '请输入登记原因', trigger: 'blur' }
]
.catch(() => {
this.loading = false;
this.isSave = false;
});
},
components: { qlrCommonTable, ywrCommonTable },
computed: {
...mapGetters(["dictData", "flag"]),
},
data() {
return {
isSave: true,
//表单是否可操作
viewEdit: true,
loading: false,
disabled: true,
tdytOption: [],
czrOptions: [],
czr: "",
ruleForm: {},
//传递参数
propsParam: this.$attrs,
rules: {},
};
},
methods: {
/**
* @description: 更新权利人信息
* @param {*} val
* @author: renchao
*/
upDateQlrxxList(val) {
this.ruleForm.qlrList = _.cloneDeep(val);
this.czrOptions = this.ruleForm.qlrList;
this.num = 0;
this.ruleForm.qlrList.forEach((item) => {
if (item.id == this.czr) {
this.num++;
}
});
if (this.num == 0) {
this.czr = "";
}
},
methods: {
/**
* @description: 更新权利人信息
* @param {*} val
* @author: renchao
*/
upDateQlrxxList (val) {
this.ruleForm.qlrList = _.cloneDeep(val);
this.czrOptions = this.ruleForm.qlrList;
this.num = 0
this.ruleForm.qlrList.forEach(item => {
if (item.id == this.czr) {
this.num++
}
})
if (this.num == 0) {
this.czr = ''
/**
* @description: 义务人信息
* @param {*} val
* @author: renchao
*/
upDateYwrxxList(val) {
this.ruleForm.ywrList = _.cloneDeep(val);
}
/**
* @description: compare
* @author: renchao
*/,
compare() {
this.$popupDialog(
this.ruleForm.qlxx.qllxmc,
"registerBook/comparison",
{
bsmQlxx: this.ruleForm.qlxx.bsmQlxx,
dqqllx: "FDCQ2",
},
"80%",
true
);
},
/**
* @description: 是否持证人变化
* @author: renchao
*/
updaterow() {
this.czr = "";
},
/**
* @description: onSubmit
* @author: renchao
*/
onSubmit() {
let that = this;
if (this.ruleForm.qlrList.length == 0) {
this.$message({
showClose: true,
message: "请确认权利人信息",
type: "error",
});
return false;
}
if (this.ruleForm.sldy.gyfs == "0") {
if (this.ruleForm.qlrList.length > 1) {
this.$message({
showClose: true,
message: "共有方式:单独所有,权利人只能是一个人",
type: "error",
});
return false;
}
},
/**
* @description: 义务人信息
* @param {*} val
* @author: renchao
*/
upDateYwrxxList (val) {
this.ruleForm.ywrList = _.cloneDeep(val);
}, /**
* @description: compare
* @author: renchao
*/
compare () {
this.$popupDialog(
this.ruleForm.qlxx.qllxmc,
"registerBook/comparison",
{
bsmQlxx: this.ruleForm.qlxx.bsmQlxx,
dqqllx: "FDCQ2",
},
"80%",
true
);
},
/**
* @description: 是否持证人变化
* @author: renchao
*/
updaterow () {
this.czr = "";
},
/**
* @description: onSubmit
* @author: renchao
*/
onSubmit () {
let that = this;
if (this.ruleForm.qlrList.length == 0) {
this.ruleForm.qlrList[0].sfczr = "1";
} else {
if (this.ruleForm.qlrList.length <= 1) {
this.$message({
showClose: true,
message: "请确认权利人信息",
message:
"共有方式:共同所有,按份所有,其他所有,权利人必须是两个以上",
type: "error",
});
return false;
}
if (this.ruleForm.sldy.gyfs == "0") {
if (this.ruleForm.qlrList.length > 1) {
this.$message({
showClose: true,
message: "共有方式:单独所有,权利人只能是一个人",
type: "error",
});
return false;
}
this.ruleForm.qlrList[0].sfczr = "1";
//是否分别持证
if (this.ruleForm.sldy.sqfbcz == "1") {
//是
this.ruleForm.qlrList.forEach((item, index) => {
item.sfczr = "1";
});
} else {
if (this.ruleForm.qlrList.length <= 1) {
this.$message({
if (that.czr === "") {
that.$message({
showClose: true,
message:
"共有方式:共同所有,按份所有,其他所有,权利人必须是两个以上",
message: "请选择持证人",
type: "error",
});
return false;
}
//是否分别持证
if (this.ruleForm.sldy.sqfbcz == "1") {
//是
this.ruleForm.qlrList.forEach((item, index) => {
this.ruleForm.qlrList.forEach((item, index) => {
if (item.id == that.czr) {
item.sfczr = "1";
});
} else {
if (that.czr === '') {
that.$message({
} else {
item.sfczr = "0";
}
});
}
}
this.$refs["ruleForm"].validate((valid) => {
if (valid) {
that.$store.dispatch("user/refreshPage", false);
saveData(this.ruleForm).then((res) => {
if (res.code === 200) {
this.$message({
showClose: true,
message: "保存成功!",
type: "success",
});
this.$store.dispatch("user/refreshPage", true);
} else {
this.$message({
showClose: true,
message: "请选择持证人",
message: res.message,
type: "error",
});
return false;
}
this.ruleForm.qlrList.forEach((item, index) => {
if (item.id == that.czr) {
item.sfczr = "1";
} else {
item.sfczr = "0";
}
});
}
});
} else {
that.$message({
showClose: true,
message: "请输入红框内的相关信息!",
type: "error",
});
return false;
}
saveData(this.ruleForm).then((res) => {
if (res.code === 200) {
this.$message({
showClose: true,
message: "保存成功!",
type: "success",
});
this.$store.dispatch("user/refreshPage", true);
} else {
this.$message({
showClose: true,
message: res.message,
type: "error"
})
}
})
}
}
}
});
},
},
};
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
@import "~@/styles/slxx/slxx.scss";
@import "~@/styles/public.scss";
@import "~@/styles/slxx/slxx.scss";
</style>
......
......@@ -4,89 +4,99 @@
* @author: renchao
*/
export function formValidate (djlx) {
switch (djlx) {
case "100":
return fristValidate();
case "200":
return transferValidate();
case "300":
return changeValidate();
case "400":
return logoutValidate();
case "500":
return riviseValidate();
case "901":
return renewalValidate();
case "902":
return replaceValidate();
}
}
/**
* @description: 首次登记效验
* @param {*} data
* @author: renchao
*/
export function fristValidate () {
var formRules={
'diyaq.djyy': [
{ required: true, message: '请输入登记原因', trigger: 'blur' }
]
var formRules={
'ygdj.sfczjzhxz': [
{ required: false, message: '是否禁止或者限制转让约定:', trigger: 'blur' }
],
'ygdj.qdjg': [
{ required: false, message: '被担保主债权数额:', trigger: 'blur' }
],
'ygdj.zwlxqssj': [
{ required: false, message: '债务履行起始时间:', trigger: 'blur' }
],
'ygdj.zwlxjssj': [
{ required: false, message: '债务履行结束时间:', trigger: 'blur' }
],
'ygdj.djyy': [
{ required: false, message: '请输入登记原因', trigger: 'blur' }
],
'ygdj.zxyy': [
{ required: false, message: '请输入注销登记原因', trigger: 'blur' }
]
}
if (djlx=="400") {
formRules["ygdj.zxyy"][0].required=true;
}else{
formRules["ygdj.sfczjzhxz"][0].required=true;
formRules["ygdj.qdjg"][0].required=true;
formRules["ygdj.zwlxqssj"][0].required=true;
formRules["ygdj.zwlxjssj"][0].required=true;
formRules["ygdj.djyy"][0].required=true;
}
return formRules;
}
return formRules;
}
/**
* @description: 转移登记效验
* @param {*} data
* @author: renchao
*/
export function transferValidate (data) {
}
/**
* @description: 变更登记效验
* @param {*} data
* @author: renchao
*/
export function changeValidate (data) {
}
/**
* @description: 注销登记效验
* @param {*} data
* @author: renchao
*/
export function logoutValidate (data) {
}
/**
* @description: 更正登记效验
* @param {*} data
* @author: renchao
*/
export function riviseValidate (data) {
}
/**
* @description: 补证登记效验
* @param {*} data
* @author: renchao
*/
export function renewalValidate (data) {
}
/**
* @description: 换证登记效验
* @param {*} data
* @author: renchao
*/
export function replaceValidate (data) {
}
\ No newline at end of file
/**
* @description: 首次登记效验
* @param {*} data
* @author: renchao
*/
export function fristValidate (formRules,dyfs) {
return formRules;
}
/**
* @description: 转移登记效验
* @param {*} data
* @author: renchao
*/
export function transferValidate (data) {
}
/**
* @description: 变更登记效验
* @param {*} data
* @author: renchao
*/
export function changeValidate (data) {
}
/**
* @description: 注销登记效验
* @param {*} data
* @author: renchao
*/
export function logoutValidate (data) {
}
/**
* @description: 更正登记效验
* @param {*} data
* @author: renchao
*/
export function riviseValidate (data) {
}
/**
* @description: 补证登记效验
* @param {*} data
* @author: renchao
*/
export function renewalValidate (data) {
}
/**
* @description: 换证登记效验
* @param {*} data
* @author: renchao
*/
export function replaceValidate (data) {
}
\ No newline at end of file
......
/**
* @description: 首次登记效验
* @param {*} data
* @author: renchao
*/
export function formValidate (djlx,dyfs) {
var formRules={
'diyaqList[0].djyy': [
{ required: false, message: '请输入登记原因', trigger: 'blur' }
],
'diyaqList[0].zxdyyy': [
{ required: false, message: '请输入注销登记原因', trigger: 'blur' }
],
'diyaqList[0].zwlxqssj': [
{ required: false, message: '请选择债务履行起始时间', trigger: 'blur' }
],
'diyaqList[0].zwlxjssj': [
{ required: false, message: '请选择债务履行起始时间', trigger: 'blur' }
],
'diyaqList[0].bdbzzqse': [
{ required: false, message: '请输入被担保主债权数额', trigger: 'blur' }
],
'diyaqList[0].zgzqse': [
{ required: false, message: '请输入最高债权额', trigger: 'blur' }
],
'diyaqList[0].sfczjzhxz': [
{ required: false, message: '请输入最高债权额', trigger: 'blur' }
]
}
if (djlx=="400") {
formRules["diyaqList[0].zxdyyy"][0].required=true;
}else{
if(dyfs=="1"){
formRules["diyaqList[0].bdbzzqse"][0].required=true;
}else{
formRules["diyaqList[0].zgzqse"][0].required=true;
}
formRules["diyaqList[0].zwlxqssj"][0].required=true;
formRules["diyaqList[0].zwlxjssj"][0].required=true;
formRules["diyaqList[0].sfczjzhxz"][0].required=true;
formRules["diyaqList[0].djyy"][0].required=true;
}
console.log(formRules);
return formRules;
}
/**
* @description: 首次登记效验
* @param {*} data
* @author: renchao
*/
export function fristValidate (formRules,dyfs) {
return formRules;
}
/**
* @description: 转移登记效验
* @param {*} data
* @author: renchao
*/
export function transferValidate (data) {
}
/**
* @description: 变更登记效验
* @param {*} data
* @author: renchao
*/
export function changeValidate (data) {
}
/**
* @description: 注销登记效验
* @param {*} data
* @author: renchao
*/
export function logoutValidate (data) {
}
/**
* @description: 更正登记效验
* @param {*} data
* @author: renchao
*/
export function riviseValidate (data) {
}
/**
* @description: 补证登记效验
* @param {*} data
* @author: renchao
*/
export function renewalValidate (data) {
}
/**
* @description: 换证登记效验
* @param {*} data
* @author: renchao
*/
export function replaceValidate (data) {
}
\ No newline at end of file
......@@ -7,7 +7,8 @@
:label-position="flag ? 'top' : ''"
:inline="flag"
ref="ruleForm"
label-width="140px">
label-width="140px"
>
<div class="slxx_con" :class="flag ? 'formMarginBot0' : ''">
<div class="slxx_title title-block">
申请业务信息
......@@ -35,14 +36,16 @@
<el-form-item label="权利类型:">
<el-input
disabled
v-model="ruleForm.sldyList[0].qllxmc"></el-input>
v-model="ruleForm.sldyList[0].qllxmc"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="登记类型:">
<el-input
disabled
v-model="ruleForm.sldyList[0].djlxmc"></el-input>
v-model="ruleForm.sldyList[0].djlxmc"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -54,17 +57,19 @@
<div
class="slxx_title title-block"
v-if="ruleForm.slsq.djywbm.includes('400')">
v-if="ruleForm.slsq.djywbm.includes('400')"
>
在建工程抵押信息列表({{ ruleForm.qlxxList.length }} 户)
<div class="triangle"></div>
</div>
<div
class="slxx_title title-block"
v-else>
<div class="slxx_title title-block" v-else>
抵押户信息列表信息({{ ruleForm.hlist.length }} 户)
<div class="triangle"></div>
</div>
<qlxxTable :tableData="ruleForm.qlxxList" v-if="ruleForm.slsq.djywbm.includes('400')" />
<qlxxTable
:tableData="ruleForm.qlxxList"
v-if="ruleForm.slsq.djywbm.includes('400')"
/>
<qjhTable v-else :tableData="ruleForm.hlist" />
<div class="slxx_title title-block">
抵押信息
......@@ -72,7 +77,8 @@
</div>
<el-row
:gutter="10"
v-if="ruleForm.diyaqList && ruleForm.diyaqList.length > 0">
v-if="ruleForm.diyaqList && ruleForm.diyaqList.length > 0"
>
<el-col :span="8">
<el-form-item label="抵押方式:">
<el-radio-group disabled v-model="ruleForm.diyaqList[0].dyfs">
......@@ -85,7 +91,8 @@
<el-form-item label="抵押金额类型:">
<el-radio-group
v-model="ruleForm.diyaqList[0].dyjelx"
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')">
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"
>
<el-radio label="0">独立抵押</el-radio>
<el-radio label="1">整体抵押</el-radio>
</el-radio-group>
......@@ -93,11 +100,14 @@
</el-col>
<el-col :span="8">
<el-form-item
label="是否存在禁止或者限制转让抵押不动产的约定:"
label-width="300px">
label="是否禁止或者限制转让约定:"
label-width="200px"
prop="diyaqList[0].sfczjzhxz"
>
<el-radio-group
v-model="ruleForm.diyaqList[0].sfczjzhxz"
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')">
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"
>
<el-radio label="1">启用</el-radio>
<el-radio label="0">禁用</el-radio>
</el-radio-group>
......@@ -106,22 +116,29 @@
</el-row>
<el-row
:gutter="10"
v-if="ruleForm.diyaqList && ruleForm.diyaqList.length > 0">
v-if="ruleForm.diyaqList && ruleForm.diyaqList.length > 0"
>
<el-col :span="8" v-show="ruleForm.diyaqList[0].dyfs == 1">
<el-form-item label="被担保主债权数额:">
<el-form-item
label="被担保主债权数额:"
prop="diyaqList[0].bdbzzqse"
>
<div style="display: flex">
<el-input
v-model="ruleForm.diyaqList[0].bdbzzqse"
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"></el-input>
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"
></el-input>
<el-select
style="width: 68px"
v-model="ruleForm.diyaqList[0].jedw"
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')">
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"
>
<el-option
v-for="item in dictData['A57']"
:key="item.dcode"
:label="item.dname"
:value="item.dcode">
:value="item.dcode"
>
</el-option>
</el-select>
</div>
......@@ -129,38 +146,49 @@
</el-col>
<el-col :span="8" v-show="ruleForm.diyaqList[0].dyfs == 2">
<el-form-item label="最高债权额:">
<el-form-item label="最高债权额:" prop="diyaqList[0].zgzqse">
<el-input
v-model="ruleForm.diyaqList[0].zgzqse"
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"></el-input>
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"
></el-input>
<el-select
v-model="ruleForm.diyaqList[0].jedw"
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')">
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"
>
<el-option
v-for="item in dictData['A57']"
:key="item.dcode"
:label="item.dname"
:value="item.dcode">
:value="item.dcode"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="债务履行起始时间:">
<el-form-item
label="债务履行起始时间:"
prop="diyaqList[0].zwlxqssj"
>
<el-date-picker
v-model="ruleForm.diyaqList[0].zwlxqssj"
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"
type="date">
type="date"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="债务履行结束时间:">
<el-form-item
label="债务履行结束时间:"
prop="diyaqList[0].zwlxjssj"
>
<el-date-picker
v-model="ruleForm.diyaqList[0].zwlxjssj"
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"
type="date">
type="date"
>
</el-date-picker>
</el-form-item>
</el-col>
......@@ -171,16 +199,21 @@
<el-form-item label="担保范围:">
<el-input
v-model="ruleForm.diyaqList[0].dbfw"
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"></el-input>
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="ruleForm.diyaqList && ruleForm.diyaqList.length > 0">
<el-col :span="24">
<el-form-item label="最高债权确定事实和数额:">
<el-form-item
label="最高债权确定事实和数额:"
prop="diyaqList[0].zgzqqdss"
>
<el-input
v-model="ruleForm.diyaqList[0].zgzqqdss"
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"></el-input>
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"
></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -192,7 +225,8 @@
maxlength="500"
show-word-limit
v-model="ruleForm.diyaqList[0].fj"
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"></el-input>
:disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"
></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -203,12 +237,14 @@
</div>
<el-row
:gutter="10"
v-if="ruleForm.sldyList && ruleForm.sldyList.length > 0">
v-if="ruleForm.sldyList && ruleForm.sldyList.length > 0"
>
<el-col :span="14">
<el-form-item label="共有方式:">
<el-radio-group
:disabled="!viewEdit"
v-model="ruleForm.sldyList[0].gyfs">
v-model="ruleForm.sldyList[0].gyfs"
>
<el-radio label="0">单独所有</el-radio>
<el-radio label="1">共同共有</el-radio>
<el-radio label="2">按份所有</el-radio>
......@@ -221,7 +257,8 @@
<el-radio-group
v-model="ruleForm.sldyList[0].sqfbcz"
:disabled="!viewEdit"
@input="updaterow()">
@input="updaterow()"
>
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
......@@ -232,17 +269,20 @@
v-show="
ruleForm.sldyList[0].gyfs != '0' &&
ruleForm.sldyList[0].sqfbcz == '0'
">
"
>
<el-form-item label="持证人:">
<el-select
v-model="czr"
placeholder="持证人"
:disabled="!viewEdit">
:disabled="!viewEdit"
>
<el-option
v-for="(item,index) in czrOptions"
v-for="(item, index) in czrOptions"
:key="index"
:label="item.sqrmc"
:value="item.id">
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
......@@ -253,7 +293,8 @@
:tableData="ruleForm.qlrList"
@upDateQlrxxList="upDateQlrxxList"
:disabled="viewEdit"
:gyfs="ruleForm.sldyList[0].gyfs" />
:gyfs="ruleForm.sldyList[0].gyfs"
/>
<div class="slxx_title title-block">
抵押人信息
<div class="triangle"></div>
......@@ -261,7 +302,8 @@
<qlrCommonTable
:tableData="ruleForm.ywrList"
@upDateQlrxxList="upDateYwrxxList"
:disabled="viewEdit" />
:disabled="viewEdit"
/>
<div class="slxx_title title-block">
登记原因
......@@ -269,17 +311,20 @@
</div>
<el-row
:gutter="10"
v-if="ruleForm.diyaqList && ruleForm.diyaqList.length > 0">
v-if="ruleForm.diyaqList && ruleForm.diyaqList.length > 0"
>
<el-col>
<el-form-item
v-if="ruleForm.sldyList[0].djlx == '400'"
label="注销抵押原因:"
prop="djyy">
prop="diyaqList[0].zxdyyy"
>
<el-input
class="textArea"
type="textarea"
:disabled="!viewEdit"
v-model="ruleForm.diyaqList[0].zxdyyy">
v-model="ruleForm.diyaqList[0].zxdyyy"
>
</el-input>
</el-form-item>
<el-form-item v-else label="登记原因:" prop="diyaqList[0].djyy">
......@@ -289,7 +334,8 @@
maxlength="500"
show-word-limit
:disabled="!viewEdit"
v-model="ruleForm.diyaqList[0].djyy">
v-model="ruleForm.diyaqList[0].djyy"
>
</el-input>
</el-form-item>
</el-col>
......@@ -304,202 +350,209 @@
</div>
</template>
<script>
import qjhTable from "../commonTable/qjhTable";
import qlxxTable from "../commonTable/qlxxTable.vue";
import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
import { bacthInit, saveBatchData } from "@/api/workflow/zjgcdyFlow.js";
import { mapGetters } from "vuex";
export default {
mounted () {
let that = this
this.viewEdit = this.$parent.currentSelectTab.ableOperation;
this.propsParam = this.$attrs;
var formdata = new FormData();
import qjhTable from "../commonTable/qjhTable";
import qlxxTable from "../commonTable/qlxxTable.vue";
import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
import { bacthInit, saveBatchData } from "@/api/workflow/zjgcdyFlow.js";
import { formValidate } from "./bacthSlxxValidate";
import { mapGetters } from "vuex";
export default {
mounted() {
let that = this;
this.viewEdit = this.$parent.currentSelectTab.ableOperation;
this.propsParam = this.$attrs;
var formdata = new FormData();
this.loading = true
formdata.append("bsmSlsq", this.$route.query.bsmSlsq);
formdata.append("djlx", this.propsParam.djlx);
formdata.append("isEdit", this.viewEdit);
bacthInit(formdata).then((res) => {
this.loading = true;
formdata.append("bsmSlsq", this.$route.query.bsmSlsq);
formdata.append("djlx", this.propsParam.djlx);
formdata.append("isEdit", this.viewEdit);
bacthInit(formdata)
.then((res) => {
setTimeout(() => {
that.loading = false
}, 200)
that.loading = false;
}, 200);
if (res.code === 200 && res.result) {
this.ruleForm = res.result;
this.ruleForm.qlrList.forEach((item) => {
item.id = item.bsmSqr
if (item.sfczr == '1') {
that.czr = item.bsmSqr
item.id = item.bsmSqr;
if (item.sfczr == "1") {
that.czr = item.bsmSqr;
}
})
});
that.czrOptions = that.ruleForm.qlrList;
that.isSave = that.viewEdit
that.isSave = that.viewEdit;
// that.rules = formValidate(
// that.ruleForm.sldyList[0].djlx,
// that.ruleForm.diyaqList[0].dyfs
// );
} else {
that.isSave = false
that.$confirm(res.message, '提示', {
cancelButtonText: '取消',
that.isSave = false;
that.$confirm(res.message, "提示", {
cancelButtonText: "取消",
showConfirmButton: false,
type: 'warning'
})
type: "warning",
});
}
}).catch(() => {
this.loading = false
})
},
components: { qlrCommonTable, qjhTable, qlxxTable },
computed: {
...mapGetters(["dictData", "flag"]),
},
data () {
return {
isSave: true,
loading: false,
//表单是否可操作
viewEdit: true,
disabled: true,
czrOptions: [],
czr: "",
ruleForm: {},
//传递参数
propsParam: {},
rules: {
.catch(() => {
this.loading = false;
});
},
components: { qlrCommonTable, qjhTable, qlxxTable },
computed: {
...mapGetters(["dictData", "flag"]),
},
data() {
return {
isSave: true,
loading: false,
//表单是否可操作
viewEdit: true,
disabled: true,
czrOptions: [],
czr: "",
ruleForm: {},
//传递参数
propsParam: {},
rules: {
'diyaqList[0].djyy': [
{ required: true, message: '请输入登记原因', trigger: 'blur' }
]
},
tableData: [],
};
},
methods: {
/**
* @description: onSubmitClick
* @author: renchao
*/
onSubmitClick () {
let that = this;
if (this.ruleForm.qlrList.length == 0) {
tableData: [],
};
},
methods: {
/**
* @description: onSubmitClick
* @author: renchao
*/
onSubmitClick() {
let that = this;
if (this.ruleForm.qlrList.length == 0) {
this.$message({
showClose: true,
message: "请确认抵押权人信息",
type: "error",
});
return false;
}
if (this.ruleForm.sldyList[0].gyfs == "0") {
if (this.ruleForm.qlrList.length > 1) {
this.$message({
showClose: true,
message: "请确认抵押权人信息",
message: "共有方式:单独所有,抵押权人只能是一个人",
type: "error",
});
return false;
}
if (this.ruleForm.sldyList[0].gyfs == "0") {
if (this.ruleForm.qlrList.length > 1) {
this.$message({
showClose: true,
message: "共有方式:单独所有,抵押权人只能是一个人",
type: "error",
});
return false;
}
this.ruleForm.qlrList[0].sfczr = "1";
this.ruleForm.qlrList[0].sfczr = "1";
} else {
if (this.ruleForm.qlrList.length <= 1) {
this.$message({
showClose: true,
message:
"共有方式:共同所有,按份所有,其他所有,抵押权人必须是两个以上",
type: "error",
});
return false;
}
//是否分别持证
if (this.ruleForm.sldyList[0].sqfbcz == "1") {
//是
this.ruleForm.qlrList.forEach((item, index) => {
item.sfczr = "1";
});
} else {
if (this.ruleForm.qlrList.length <= 1) {
this.$message({
if (that.czr === "") {
that.$message({
showClose: true,
message:
"共有方式:共同所有,按份所有,其他所有,抵押权人必须是两个以上",
message: "请选择持证人",
type: "error",
});
return false;
}
//是否分别持证
if (this.ruleForm.sldyList[0].sqfbcz == "1") {
//是
this.ruleForm.qlrList.forEach((item, index) => {
item.sfczr = "1"
})
} else {
if (that.czr === '') {
this.ruleForm.qlrList.forEach((item, index) => {
if (item.id == that.czr) {
item.sfczr = "1";
} else {
item.sfczr = "0";
}
});
}
}
this.$refs["ruleForm"].validate((valid) => {
if (valid) {
that.$store.dispatch("user/refreshPage", false);
saveBatchData(that.ruleForm, that.propsParam.djlx).then((res) => {
if (res.code === 200) {
that.$message({
showClose: true,
message: "保存成功!",
type: "success",
});
that.$store.dispatch("user/refreshPage", true);
} else {
that.$message({
showClose: true,
message: "请选择持证人",
message: res.message,
type: "error",
});
return false;
}
this.ruleForm.qlrList.forEach((item, index) => {
if (item.id == that.czr) {
item.sfczr = "1";
} else {
item.sfczr = "0";
}
});
}
}
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
that.$store.dispatch("user/refreshPage", false);
saveBatchData(that.ruleForm, that.propsParam.djlx).then((res) => {
if (res.code === 200) {
that.$message({
showClose: true,
message: "保存成功!",
type: "success",
});
that.$store.dispatch("user/refreshPage", true);
} else {
that.$message({
showClose: true,
message: res.message,
type: "error",
});
}
})
} else {
that.$message({
showClose: true,
message: "请输入登记原因",
type: "error"
})
return false
}
})
},
/**
* @description: 是否持证人变化
* @param {*} val
* @author: renchao
*/
updaterow () {
this.czr = "";
},
/**
* @description: 更新抵押权人信息
* @param {*} val
* @author: renchao
*/
upDateQlrxxList (val) {
if (!_.isEqual(val, this.ruleForm.qlrList)) {
this.ruleForm.qlrList = _.cloneDeep(val);
this.czrOptions = this.ruleForm.qlrList;
}
this.num = 0
this.ruleForm.qlrList.forEach(item => {
if (item.id == this.czr) {
this.num++
}
})
if (this.num == 0) {
this.czr = ''
});
} else {
that.$message({
showClose: true,
message: "请输入红框内的相关信息!",
type: "error",
});
return false;
}
},
/**
* @description: 更新义务人信息
* @param {*} val
* @author: renchao
*/
upDateYwrxxList (val) {
if (!_.isEqual(val, this.ruleForm.ywrList)) {
this.ruleForm.ywrList = _.cloneDeep(val);
});
},
/**
* @description: 是否持证人变化
* @param {*} val
* @author: renchao
*/
updaterow() {
this.czr = "";
},
/**
* @description: 更新抵押权人信息
* @param {*} val
* @author: renchao
*/
upDateQlrxxList(val) {
if (!_.isEqual(val, this.ruleForm.qlrList)) {
this.ruleForm.qlrList = _.cloneDeep(val);
this.czrOptions = this.ruleForm.qlrList;
}
this.num = 0;
this.ruleForm.qlrList.forEach((item) => {
if (item.id == this.czr) {
this.num++;
}
});
if (this.num == 0) {
this.czr = "";
}
},
/**
* @description: 更新义务人信息
* @param {*} val
* @author: renchao
*/
upDateYwrxxList(val) {
if (!_.isEqual(val, this.ruleForm.ywrList)) {
this.ruleForm.ywrList = _.cloneDeep(val);
}
}
}
},
},
};
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
@import "~@/styles/slxx/slxx.scss";
@import "~@/styles/public.scss";
@import "~@/styles/slxx/slxx.scss";
</style>
......
......@@ -8,7 +8,8 @@
ref="ruleForm"
:label-position="flag ? 'top' : ''"
:inline="flag"
label-width="170px">
label-width="170px"
>
<div class="slxx_con" :class="flag ? 'formMarginBot0' : ''">
<div class="slxx_title title-block">
申请业务信息
......@@ -48,12 +49,13 @@
</el-form-item>
</el-col>
</el-row>
<div class="slxx_title title-block">
<div class="slxx_title title-block">
<el-row>
<el-col :span="16">
抵押户信息情况
</el-col>
<el-col :span="4" v-if="ruleForm.sldy.djlx=='300'||ruleForm.sldy.djlx=='500'">
<el-col :span="16"> 抵押户信息情况 </el-col>
<el-col
:span="4"
v-if="ruleForm.sldy.djlx == '300' || ruleForm.sldy.djlx == '500'"
>
<el-button @click="compare">变化情况对比+</el-button>
</el-col>
</el-row>
......@@ -82,14 +84,17 @@
<div class="flex">
<el-input
maxlength="12"
v-model="ruleForm.qjh.jzmj" disabled
oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"></el-input>
v-model="ruleForm.qjh.jzmj"
disabled
oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"
></el-input>
<el-select disabled v-model="mjdw" style="width: 68px">
<el-option
v-for="item in dictData['A7']"
:key="item.dcode"
:label="item.dname"
:value="item.dcode">
:value="item.dcode"
>
</el-option>
</el-select>
</div>
......@@ -100,14 +105,17 @@
<div class="flex">
<el-input
maxlength="12"
v-model="ruleForm.qjh.tnjzmj" disabled
oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"></el-input>
v-model="ruleForm.qjh.tnjzmj"
disabled
oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"
></el-input>
<el-select disabled v-model="mjdw" style="width: 68px">
<el-option
v-for="item in dictData['A7']"
:key="item.dcode"
:label="item.dname"
:value="item.dcode">
:value="item.dcode"
>
</el-option>
</el-select>
</div>
......@@ -118,14 +126,17 @@
<div class="flex">
<el-input
maxlength="12"
v-model="ruleForm.qjh.ftjzmj" disabled
oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"></el-input>
v-model="ruleForm.qjh.ftjzmj"
disabled
oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"
></el-input>
<el-select disabled v-model="mjdw" style="width: 68px">
<el-option
v-for="item in dictData['A7']"
:key="item.dcode"
:label="item.dname"
:value="item.dcode">
:value="item.dcode"
>
</el-option>
</el-select>
</div>
......@@ -157,6 +168,15 @@
<el-row :gutter="10">
<el-col :span="8">
<el-form-item
label="原不动产证号:"
prop="sldy.ybdcqzsh"
:rules="rules.ybdcqzshrules"
>
<el-input disabled v-model="ruleForm.sldy.ybdcqzsh"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="抵押方式:">
<!-- <el-input disabled v-model="ruleForm.slywxx.djqxmc"></el-input> -->
<el-radio-group disabled v-model="ruleForm.diyaq.dyfs">
......@@ -165,13 +185,16 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="16">
<el-col :span="8">
<el-form-item
label="是否存在禁止或者限制转让抵押不动产的约定:"
label-width="350px">
label="是否禁止或者限制转让约定:"
label-width="200px"
prop="diyaq.sfczjzhxz"
>
<el-radio-group
v-model="ruleForm.diyaq.sfczjzhxz"
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'">
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'"
>
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
......@@ -181,18 +204,23 @@
<el-row :gutter="10">
<el-col :span="8" v-show="ruleForm.diyaq.dyfs == 1">
<el-form-item label="被担保主债权数额:">
<div style="display:flex">
<el-form-item label="被担保主债权数额:" prop="diyaq.bdbzzqse">
<div style="display: flex">
<el-input
v-model="ruleForm.diyaq.bdbzzqse"
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'"></el-input>
<el-select style="width: 68px" v-model="ruleForm.diyaq.jedw"
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'">
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'"
></el-input>
<el-select
style="width: 68px"
v-model="ruleForm.diyaq.jedw"
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'"
>
<el-option
v-for="item in dictData['A57']"
:key="item.dcode"
:label="item.dname"
:value="item.dcode">
:value="item.dcode"
>
</el-option>
</el-select>
</div>
......@@ -200,17 +228,23 @@
</el-col>
<el-col :span="8" v-show="ruleForm.diyaq.dyfs == 2">
<el-form-item label="最高债权额:">
<el-form-item label="最高债权额:" prop="diyaq.zgzqse">
<div style="display: flex">
<el-input
v-model="ruleForm.diyaq.zgzqse"
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'"></el-input>
<el-select v-model="ruleForm.diyaq.jedw" style="width: 68px" :disabled="!viewEdit || ruleForm.sldy.djlx == '400'">
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'"
></el-input>
<el-select
v-model="ruleForm.diyaq.jedw"
style="width: 68px"
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'"
>
<el-option
v-for="item in dictData['A57']"
:key="item.dcode"
:label="item.dname"
:value="item.dcode">
:value="item.dcode"
>
</el-option>
</el-select>
</div>
......@@ -218,20 +252,22 @@
</el-col>
<el-col :span="8">
<el-form-item label="债务履行起始时间:">
<el-form-item label="债务履行起始时间:" prop="diyaq.zwlxqssj">
<el-date-picker
v-model="ruleForm.diyaq.zwlxqssj"
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'"
type="date">
type="date"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="债务履行结束时间:">
<el-form-item label="债务履行结束时间:" prop="diyaq.zwlxjssj">
<el-date-picker
v-model="ruleForm.diyaq.zwlxjssj"
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'"
type="date">
type="date"
>
</el-date-picker>
</el-form-item>
</el-col>
......@@ -242,7 +278,8 @@
<el-form-item label="担保范围:">
<el-input
v-model="ruleForm.diyaq.dbfw"
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'"></el-input>
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'"
></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -251,7 +288,8 @@
<el-form-item label="最高债权确定事实和数额:">
<el-input
v-model="ruleForm.diyaq.zgzqqdss"
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'"></el-input>
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'"
></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -263,7 +301,8 @@
maxlength="500"
show-word-limit
v-model="ruleForm.diyaq.fj"
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'"></el-input>
:disabled="!viewEdit || ruleForm.sldy.djlx == '400'"
></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -277,7 +316,8 @@
<el-form-item label="共有方式:">
<el-radio-group
:disabled="!viewEdit"
v-model="ruleForm.sldy.gyfs">
v-model="ruleForm.sldy.gyfs"
>
<el-radio label="0">单独所有</el-radio>
<el-radio label="1">共同共有</el-radio>
<el-radio label="2">按份所有</el-radio>
......@@ -290,7 +330,8 @@
<el-radio-group
v-model="ruleForm.sldy.sqfbcz"
:disabled="!viewEdit"
@input="updaterow()">
@input="updaterow()"
>
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
......@@ -298,28 +339,32 @@
</el-col>
<el-col
:span="6"
v-show="ruleForm.sldy.sqfbcz == '0' && ruleForm.sldy.gyfs != '0'">
v-show="ruleForm.sldy.sqfbcz == '0' && ruleForm.sldy.gyfs != '0'"
>
<el-form-item label="持证人:">
<el-select
v-model="czr"
placeholder="持证人"
:disabled="!viewEdit">
:disabled="!viewEdit"
>
<el-option
v-for="(item,index) in czrOptions"
v-for="(item, index) in czrOptions"
:key="index"
:label="item.sqrmc"
:value="item.id">
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<qlrCommonTable
style="margin-bottom:3px"
style="margin-bottom: 3px"
:tableData="ruleForm.qlrList"
@upDateQlrxxList="upDateQlrxxList"
:disabled="viewEdit"
:gyfs="ruleForm.sldy.gyfs" />
:gyfs="ruleForm.sldy.gyfs"
/>
<div class="slxx_title title-block">
抵押人信息
<div class="triangle"></div>
......@@ -327,7 +372,8 @@
<qlrCommonTable
:tableData="ruleForm.ywrList"
@upDateQlrxxList="upDateYwrxxList"
:disabled="viewEdit" />
:disabled="viewEdit"
/>
<div class="slxx_title title-block">
登记原因
......@@ -338,12 +384,14 @@
<el-form-item
v-if="ruleForm.sldy.djlx == '400'"
label="注销抵押原因:"
prop="djyy">
prop="diyaq.zxdyyy"
>
<el-input
class="textArea"
type="textarea"
:disabled="!viewEdit"
v-model="ruleForm.diyaq.zxdyyy">
v-model="ruleForm.diyaq.zxdyyy"
>
</el-input>
</el-form-item>
<el-form-item v-else label="登记原因:" prop="diyaq.djyy">
......@@ -353,7 +401,8 @@
maxlength="500"
show-word-limit
:disabled="!viewEdit"
v-model="ruleForm.diyaq.djyy">
v-model="ruleForm.diyaq.djyy"
>
</el-input>
</el-form-item>
</el-col>
......@@ -368,230 +417,231 @@
</div>
</template>
<script>
import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
import { Init, saveData } from "@/api/workflow/zjgcdyFlow.js";
import { mapGetters } from "vuex";
import { formValidate } from "./slxxValidate";
export default {
mounted () {
let that = this
this.viewEdit = this.$parent.currentSelectTab.ableOperation;
this.propsParam = this.$attrs;
var formdata = new FormData();
this.loading = true
formdata.append("bsmSldy", this.propsParam.bsmSldy);
formdata.append("djlx", this.propsParam.djlx);
formdata.append("isEdit", this.viewEdit);
Init(formdata).then((res) => {
this.loading = false
import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
import { Init, saveData } from "@/api/workflow/zjgcdyFlow.js";
import { mapGetters } from "vuex";
import { formValidate } from "./slxxValidate";
export default {
mounted() {
let that = this;
this.viewEdit = this.$parent.currentSelectTab.ableOperation;
this.propsParam = this.$attrs;
var formdata = new FormData();
this.loading = true;
formdata.append("bsmSldy", this.propsParam.bsmSldy);
formdata.append("djlx", this.propsParam.djlx);
formdata.append("isEdit", this.viewEdit);
Init(formdata)
.then((res) => {
this.loading = false;
if (res.code === 200 && res.result) {
this.ruleForm = res.result;
window.djlx = res.result.sldy.djlx
window.djlx = res.result.sldy.djlx;
this.czrOptions = this.ruleForm.qlrList;
this.ruleForm.qlrList.forEach((item) => {
item.id = item.bsmSqr
if (item.sfczr == '1') {
that.czr = item.bsmSqr
item.id = item.bsmSqr;
if (item.sfczr == "1") {
that.czr = item.bsmSqr;
}
})
});
that.czrOptions = that.ruleForm.qlrList;
that.isSave = that.viewEdit
that.isSave = that.viewEdit;
that.rules = formValidate(
that.ruleForm.sldy.djlx,
that.ruleForm.diyaq.dyfs
);
} else {
that.isSave = false
that.$confirm(res.message, '提示', {
cancelButtonText: '取消',
that.isSave = false;
that.$confirm(res.message, "提示", {
cancelButtonText: "取消",
showConfirmButton: false,
type: 'warning'
})
type: "warning",
});
}
}).catch(() => {
this.loading = false
})
},
components: { qlrCommonTable },
computed: {
...mapGetters(["dictData", "flag"]),
},
data () {
return {
mjdw: '1',
isSave: true,
loading: false,
//表单是否可操作
viewEdit: true,
disabled: true,
czrOptions: [],
czr: "",
ruleForm: {},
//传递参数
propsParam: {},
rules: {
'diyaq.djyy': [
{ required: true, message: '请输入登记原因', trigger: 'blur' }
]
},
// 键名转换,方法默认是label和children进行树状渲染
normalizer (node) {
//方法
if (node.children == null || node.children == "null") {
delete node.children;
}
return {
id: node.dcode,
label: node.dname,
};
},
};
},
methods: {
/**
* @description: onSubmitClick
* @author: renchao
*/
onSubmitClick () {
let that = this;
if (this.ruleForm.qlrList.length == 0) {
.catch(() => {
this.loading = false;
});
},
components: { qlrCommonTable },
computed: {
...mapGetters(["dictData", "flag"]),
},
data() {
return {
mjdw: "1",
isSave: true,
loading: false,
//表单是否可操作
viewEdit: true,
disabled: true,
czrOptions: [],
czr: "",
ruleForm: {},
//传递参数
propsParam: {},
rules: {},
// 键名转换,方法默认是label和children进行树状渲染
normalizer(node) {
//方法
if (node.children == null || node.children == "null") {
delete node.children;
}
return {
id: node.dcode,
label: node.dname,
};
},
};
},
methods: {
/**
* @description: onSubmitClick
* @author: renchao
*/
onSubmitClick() {
let that = this;
if (this.ruleForm.qlrList.length == 0) {
this.$message({
showClose: true,
message: "请确认权利人信息",
type: "error",
});
return false;
}
if (this.ruleForm.sldy.gyfs == "0") {
if (this.ruleForm.qlrList.length > 1) {
this.$message({
showClose: true,
message: "请确认权利人信息",
message: "共有方式:单独所有,权利人只能是一个人",
type: "error",
});
return false;
}
if (this.ruleForm.sldy.gyfs == "0") {
if (this.ruleForm.qlrList.length > 1) {
this.$message({
showClose: true,
message: "共有方式:单独所有,权利人只能是一个人",
type: "error",
});
return false;
}
this.ruleForm.qlrList[0].sfczr = "1";
this.ruleForm.qlrList[0].sfczr = "1";
} else {
if (this.ruleForm.qlrList.length <= 1) {
this.$message({
showClose: true,
message:
"共有方式:共同所有,按份所有,其他所有,权利人必须是两个以上",
type: "error",
});
return false;
}
//是否分别持证
if (this.ruleForm.sldy.sqfbcz == "1") {
//是
this.ruleForm.qlrList.forEach((item, index) => {
item.sfczr = "1";
});
} else {
if (this.ruleForm.qlrList.length <= 1) {
this.$message({
if (that.czr === "") {
that.$message({
showClose: true,
message:
"共有方式:共同所有,按份所有,其他所有,权利人必须是两个以上",
message: "请选择持证人",
type: "error",
});
return false;
}
//是否分别持证
if (this.ruleForm.sldy.sqfbcz == "1") {
//是
this.ruleForm.qlrList.forEach((item, index) => {
this.ruleForm.qlrList.forEach((item, index) => {
if (item.id == that.czr) {
item.sfczr = "1";
});
} else {
if (that.czr === '') {
} else {
item.sfczr = "0";
}
});
}
}
this.$refs["ruleForm"].validate((valid) => {
if (valid) {
that.$store.dispatch("user/refreshPage", false);
saveData(that.ruleForm, that.propsParam.djlx).then((res) => {
if (res.code === 200) {
that.$message({
showClose: true,
message: "保存成功!",
type: "success",
});
that.$store.dispatch("user/refreshPage", true);
} else {
that.$message({
showClose: true,
message: "请选择持证人",
message: res.message,
type: "error",
});
return false;
}
this.ruleForm.qlrList.forEach((item, index) => {
if (item.id == that.czr) {
item.sfczr = "1";
} else {
item.sfczr = "0";
}
});
}
}
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
that.$store.dispatch("user/refreshPage", false);
saveData(that.ruleForm, that.propsParam.djlx).then((res) => {
if (res.code === 200) {
that.$message({
showClose: true,
message: "保存成功!",
type: "success",
});
that.$store.dispatch("user/refreshPage", true);
} else {
that.$message({
showClose: true,
message: res.message,
type: "error",
});
}
})
} else {
that.$message({
showClose: true,
message: "请输入登记原因",
type: "error"
})
return false
}
})
},
/**
* @description: 更新权利人信息
* @param {*} val
* @author: renchao
*/
upDateQlrxxList (val) {
if (!_.isEqual(val, this.ruleForm.qlrList)) {
this.ruleForm.qlrList = _.cloneDeep(val);
this.czrOptions = this.ruleForm.qlrList;
});
} else {
that.$message({
showClose: true,
message: "请输入红框内的相关信息!",
type: "error",
});
return false;
}
this.num = 0
this.ruleForm.qlrList.forEach(item => {
if (item.id == this.czr) {
this.num++
}
})
if (this.num == 0) {
this.czr = ''
});
},
/**
* @description: 更新权利人信息
* @param {*} val
* @author: renchao
*/
upDateQlrxxList(val) {
if (!_.isEqual(val, this.ruleForm.qlrList)) {
this.ruleForm.qlrList = _.cloneDeep(val);
this.czrOptions = this.ruleForm.qlrList;
}
this.num = 0;
this.ruleForm.qlrList.forEach((item) => {
if (item.id == this.czr) {
this.num++;
}
},
// 是否持证人变化
/**
* @description: 是否持证人变化
* @param {*} val
* @author: renchao
*/
updaterow () {
});
if (this.num == 0) {
this.czr = "";
},
/**
* @description: 更新义务人信息
* @param {*} val
* @author: renchao
*/
upDateYwrxxList (val) {
if (!_.isEqual(val, this.ruleForm.ywrList)) {
this.ruleForm.ywrList = _.cloneDeep(val);
}
},
/**
* @description: compare
* @author: renchao
*/
compare () {
this.$popupDialog(
this.ruleForm.qlxx.qllxmc,
"registerBook/comparison",
{
bsmQlxx: this.ruleForm.qlxx.bsmQlxx,
dqqllx: "FDCQ2",
},
"80%",
true
);
},
}
}
}
},
// 是否持证人变化
/**
* @description: 是否持证人变化
* @param {*} val
* @author: renchao
*/
updaterow() {
this.czr = "";
},
/**
* @description: 更新义务人信息
* @param {*} val
* @author: renchao
*/
upDateYwrxxList(val) {
if (!_.isEqual(val, this.ruleForm.ywrList)) {
this.ruleForm.ywrList = _.cloneDeep(val);
}
},
/**
* @description: compare
* @author: renchao
*/
compare() {
this.$popupDialog(
this.ruleForm.qlxx.qllxmc,
"registerBook/comparison",
{
bsmQlxx: this.ruleForm.qlxx.bsmQlxx,
dqqllx: "FDCQ2",
},
"80%",
true
);
},
},
};
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
@import "~@/styles/slxx/slxx.scss";
@import "~@/styles/public.scss";
@import "~@/styles/slxx/slxx.scss";
</style>
......
......@@ -3,90 +3,107 @@
* @param {*} data
* @author: renchao
*/
export function formValidate (djlx) {
switch (djlx) {
case "100":
return fristValidate();
case "200":
return transferValidate();
case "300":
return changeValidate();
case "400":
return logoutValidate();
case "500":
return riviseValidate();
case "901":
return renewalValidate();
case "902":
return replaceValidate();
}
}
/**
* @description: 首次登记效验
* @param {*} data
* @author: renchao
*/
export function fristValidate () {
var formRules={
'diyaq.djyy': [
{ required: true, message: '请输入登记原因', trigger: 'blur' }
]
export function formValidate (djlx,dyfs) {
var formRules={
'diyaq.djyy': [
{ required: false, message: '请输入登记原因', trigger: 'blur' }
],
'diyaq.zxdyyy': [
{ required: false, message: '请输入注销登记原因', trigger: 'blur' }
],
'diyaq.zwlxqssj': [
{ required: false, message: '请选择债务履行起始时间', trigger: 'blur' }
],
'diyaq.zwlxjssj': [
{ required: false, message: '请选择债务履行起始时间', trigger: 'blur' }
],
'diyaq.bdbzzqse': [
{ required: false, message: '请输入被担保主债权数额', trigger: 'blur' }
],
'diyaq.zgzqse': [
{ required: false, message: '请输入最高债权额', trigger: 'blur' }
],
'diyaq.sfczjzhxz': [
{ required: false, message: '请输入最高债权额', trigger: 'blur' }
]
}
if (djlx=="400") {
formRules["diyaq.zxdyyy"][0].required=true;
}else{
if(dyfs=="1"){
formRules["diyaq.bdbzzqse"][0].required=true;
}else{
formRules["diyaq.zgzqse"][0].required=true;
}
formRules["diyaq.zwlxqssj"][0].required=true;
formRules["diyaq.zwlxjssj"][0].required=true;
formRules["diyaq.sfczjzhxz"][0].required=true;
formRules["diyaq.djyy"][0].required=true;
}
return formRules;
}
return formRules;
}
/**
* @description: 转移登记效验
* @param {*} data
* @author: renchao
*/
export function transferValidate (data) {
}
/**
* @description: 变更登记效验
* @param {*} data
* @author: renchao
*/
export function changeValidate (data) {
}
/**
* @description: 注销登记效验
* @param {*} data
* @author: renchao
*/
export function logoutValidate (data) {
}
/**
* @description: 更正登记效验
* @param {*} data
* @author: renchao
*/
export function riviseValidate (data) {
}
/**
* @description: 补证登记效验
* @param {*} data
* @author: renchao
*/
export function renewalValidate (data) {
}
/**
* @description: 换证登记效验
* @param {*} data
* @author: renchao
*/
export function replaceValidate (data) {
}
\ No newline at end of file
/**
* @description: 首次登记效验
* @param {*} data
* @author: renchao
*/
export function fristValidate (formRules,dyfs) {
return formRules;
}
/**
* @description: 转移登记效验
* @param {*} data
* @author: renchao
*/
export function transferValidate (data) {
}
/**
* @description: 变更登记效验
* @param {*} data
* @author: renchao
*/
export function changeValidate (data) {
}
/**
* @description: 注销登记效验
* @param {*} data
* @author: renchao
*/
export function logoutValidate (data) {
}
/**
* @description: 更正登记效验
* @param {*} data
* @author: renchao
*/
export function riviseValidate (data) {
}
/**
* @description: 补证登记效验
* @param {*} data
* @author: renchao
*/
export function renewalValidate (data) {
}
/**
* @description: 换证登记效验
* @param {*} data
* @author: renchao
*/
export function replaceValidate (data) {
}
\ No newline at end of file
......