d16d2e43 by tianhaohao@pashanhoo.com

添加抵押权及查封登记的字段内容效验

1 parent 0288e2d6
......@@ -1011,6 +1011,10 @@ class data extends filter {
label: "坐落",
},
{
prop: "yg",
label: "原告",
},
{
prop: "cfjg",
label: "查封机关",
},
......
......@@ -1098,6 +1098,10 @@ class data extends filter {
label: "坐落",
},
{
prop: "yg",
label: "原告",
},
{
prop: "cfjg",
label: "查封机关",
},
......
......@@ -155,7 +155,7 @@
</div>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item :class="flag ? 'marginBot0' : ''" label="原告:" prop="cfdj.cfwh">
<el-form-item :class="flag ? 'marginBot0' : ''" label="原告:">
<el-input
v-model="ruleForm.cfdj.yg"
:disabled="!viewEdit || ableEdit || isJfOperation"></el-input>
......@@ -178,12 +178,12 @@
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item :class="flag ? 'marginBot0' : ''" label="查封类型:" prop="cfdj.cflxmc">
<el-form-item :class="flag ? 'marginBot0' : ''" label="查封类型:">
<el-input v-model="ruleForm.cfdj.cflxmc" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item :class="flag ? 'marginBot0' : ''" label="查封文件:" prop="cfdj.cfwj">
<el-form-item :class="flag ? 'marginBot0' : ''" label="查封文件:">
<el-input
v-model="ruleForm.cfdj.cfwj"
:disabled="!viewEdit || ableEdit || isJfOperation"></el-input>
......@@ -192,7 +192,7 @@
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item :class="flag ? 'marginBot0' : ''" label="查封期限:" prop="cfdj.cfqx">
<el-form-item :class="flag ? 'marginBot0' : ''" label="查封期限:">
<el-input
v-model="ruleForm.cfdj.cfqx"
:disabled="!viewEdit || ableEdit || isJfOperation"></el-input>
......@@ -224,7 +224,7 @@
<el-row :gutter="10">
<el-col :span="24">
<el-form-item :class="flag ? 'marginBot0' : ''" label="查封范围:" prop="cfdj.cffw">
<el-form-item :class="flag ? 'marginBot0' : ''" label="查封范围:">
<el-input
v-model="ruleForm.cfdj.cffw"
:disabled="!viewEdit || ableEdit || isJfOperation"></el-input>
......@@ -233,7 +233,7 @@
</el-row>
<el-row :gutter="10">
<el-col :span="24">
<el-form-item :class="flag ? 'marginBot0' : ''" label="附记:" prop="cfdj.fj">
<el-form-item :class="flag ? 'marginBot0' : ''" label="附记:">
<el-input
v-model="ruleForm.cfdj.fj"
type="textarea"
......@@ -266,16 +266,16 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :class="flag ? 'marginBot0' : ''" label="解封文件:" prop="cfdj.jfwj">
<el-form-item :class="flag ? 'marginBot0' : ''" label="解封文号:" prop="cfdj.jfwh">
<el-input
v-model="ruleForm.cfdj.jfwj"
v-model="ruleForm.cfdj.jfwh"
:disabled="!viewEdit || ableEdit"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :class="flag ? 'marginBot0' : ''" label="解封文号:" prop="cfdj.jfwh">
<el-form-item :class="flag ? 'marginBot0' : ''" label="解封文件:" prop="cfdj.jfwj">
<el-input
v-model="ruleForm.cfdj.jfwh"
v-model="ruleForm.cfdj.jfwj"
:disabled="!viewEdit || ableEdit"></el-input>
</el-form-item>
</el-col>
......@@ -292,6 +292,7 @@
</template>
<script>
import { Init, saveData } from "@/api/workflow/cfdjFlow.js";
import { formValidate } from "./slxxValidate";
import { mapGetters } from "vuex";
export default {
data () {
......@@ -311,11 +312,7 @@
viewEdit: false,
disabled: true,
flagTop: this.flag ? "top" : "",
rules: {
'cfdj.djyy': [
{ required: true, message: '请输入登记原因', trigger: 'blur' }
]
},
rules: {},
//传递参数
propsParam: {},
//页面数据
......@@ -340,6 +337,7 @@
Init(formdata).then((res) => {
if (res.code === 200 && res.result) {
this.ruleForm = res.result;
this.rules = formValidate(this.ruleForm.sldy.djlx);
} else {
this.$message.error(res.message);
}
......@@ -377,7 +375,7 @@
} else {
this.$message({
showClose: true,
message: "请输入登记原因",
message: "请输入红框内的相关信息!",
type: "error"
})
return false
......
......@@ -4,22 +4,41 @@
* @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();
var formRules={
'cfdj.djyy': [
{ required: false, message: '请输入登记原因', trigger: 'blur' }
],
'cfdj.cfwh': [
{ required: false, message: '查封文号', trigger: 'blur' }
],
'cfdj.cfjg': [
{ required: false, message: '查封机关:', trigger: 'blur' }
],
'cfdj.cfqssj': [
{ required: false, message: '查封起始时间:', trigger: 'blur' }
],
'cfdj.cfjssj': [
{ required: false, message: '查封结束时间:', trigger: 'blur' }
],
'cfdj.jfwh': [
{ required: false, message: '解封文号:', trigger: 'blur' }
],
'cfdj.jfjg': [
{ required: false, message: '解封机关:', trigger: 'blur' }
]
}
if (djlx=="400") {
formRules["cfdj.jfwh"][0].required=true;
formRules["cfdj.jfjg"][0].required=true;
}else{
formRules["cfdj.cfwh"][0].required=true;
formRules["cfdj.cfjg"][0].required=true;
formRules["cfdj.cfqssj"][0].required=true;
formRules["cfdj.cfjssj"][0].required=true;
formRules["cfdj.djyy"][0].required=true;
}
return formRules;
}
/**
......@@ -28,12 +47,6 @@ export function formValidate (djlx) {
* @author: renchao
*/
export function fristValidate () {
var formRules={
'diyaq.djyy': [
{ required: true, message: '请输入登记原因', trigger: 'blur' }
]
}
return formRules;
}
......
......@@ -484,7 +484,7 @@ export default {
});
that.czrOptions = this.ruleForm.qlrList;
that.isSave = that.viewEdit;
that.rules = formValidate(that.ruleForm.qlxx.djlx,that.ruleForm.diyaq.dyfs);
that.rules = formValidate(that.ruleForm.sldy.djlx,that.ruleForm.diyaq.dyfs);
} else {
that.isSave = false;
that.$confirm(res.message, "提示", {
......
......@@ -303,6 +303,7 @@
import tdytTable from "@/views/workflow/components/tdytTable";
import { Init, saveData } from "@/api/workflow/fwsyq1Flow.js";
import { mapGetters } from "vuex";
import { formValidate } from "./slxxValidate";
export default {
mixins: [ywmix],
mounted () {
......
......@@ -431,6 +431,7 @@
import tdytTable from "@/views/workflow/components/tdytTable";
import { Init, saveData } from "@/api/workflow/fwsyqFlow.js";
import { mapGetters } from "vuex";
import { formValidate } from "./slxxValidate";
export default {
mixins: [ywmix],
mounted () {
......
......@@ -302,6 +302,7 @@
import ywrCommonTable from "@/views/workflow/components/ywrCommonTable";
import tdytTable from "@/views/workflow/components/tdytTable";
import { Init, saveData } from "@/api/workflow/jsydsyqFlow.js";
import { formValidate } from "./slxxValidate";
export default {
mixins: [ywmix],
mounted () {
......
......@@ -319,6 +319,7 @@
import ywrCommonTable from "@/views/workflow/components/ywrCommonTable";
import tdytTable from "@/views/workflow/components/tdytTable";
import { Init, saveData } from "@/api/workflow/lqFlow.js";
import { formValidate } from "./slxxValidate";
export default {
mixins: [ywmix],
mounted () {
......
......@@ -334,6 +334,7 @@
import { Init, saveData } from "@/api/workflow/nydsyqFlow.js";
import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
import JtcyTable from "./JtcyTable";
import { formValidate } from "./slxxValidate";
export default {
mixins: [ywmix],
mounted () {
......
......@@ -333,6 +333,7 @@
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 () {
......
......@@ -353,6 +353,7 @@
import { Init, saveData } from "@/api/workflow/tdcbjyq.js";
import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
import ywrCommonTable from "@/views/workflow/components/ywrCommonTable";
import { formValidate } from "./slxxValidate";
export default {
mixins: [ywmix],
mounted () {
......
......@@ -367,6 +367,7 @@
import tdytTable from "@/views/workflow/components/tdytTable";
import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
import ywrCommonTable from "@/views/workflow/components/ywrCommonTable";
import { formValidate } from "./slxxValidate";
export default {
mixins: [ywmix],
components: { qlrCommonTable, tdytTable, ywrCommonTable },
......
......@@ -299,6 +299,7 @@
import ywrCommonTable from "@/views/workflow/components/ywrCommonTable";
import { Init, saveData } from "@/api/workflow/ygdjFlow.js";
import { mapGetters } from "vuex";
import { formValidate } from "./slxxValidate";
export default {
mixins: [ywmix],
mounted () {
......
......@@ -324,6 +324,7 @@
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 () {
......
......@@ -371,6 +371,7 @@
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
......