Commit e492e5c5 by 潘际乾

gitopn、gitame保函文本模块

parent 07973f2f
<template>
<c-rich-text-editor
ref="editor"
v-model="value"
v-bind="$attrs"
@blur="blurEvent"
......@@ -20,14 +21,25 @@ export default {
watch: {
model() {
let rows = this.model["rows"] || [];
let enabled = false
if (this.$refs.editor.quill) {
enabled = this.$refs.editor.quill.isEnabled()
this.$refs.editor.quill.enable(false)
}
this.value = this.show(rows);
this.$nextTick(() => {
if (this.$refs.editor.quill) {
this.$refs.editor.quill.enable(enabled)
}
})
},
},
methods: {
// 修改文本后的失去焦点事件
blurEvent(quill) {
if (this.model && this.model.rows) {
// const v = this.format(this.value);
const v = this.format(quill.getText());
const v = this.format(this.value);
// const v = this.format(quill.getText());
this.model["rows"].length = 0;
this.model["rows"].unshift(v);
// this.$emit("change", v);
......@@ -56,13 +68,13 @@ export default {
return strs;
},
format: function (value) {
if (this.isXml) {
var len = value.length;
value = value.replace(/\n/g, "<br/>");
var head = "<?xml version='1.0'?><tdfmt sel-start='" + len + "'>";
var tail = "</tdfmt>";
return head + value + tail;
}
// if (this.isXml) {
// var len = value.length;
// value = value.replace(/\n/g, "<br/>");
// var head = "<?xml version='1.0'?><tdfmt sel-start='" + len + "'>";
// var tail = "</tdfmt>";
// return head + value + tail;
// }
return value;
},
},
......
......@@ -14,6 +14,7 @@ export default {
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
onExtkey() {},
async onGitpButdifhiscovgodsrv(){
let rtnmsg = await this.executeRule("gitp.butdifhiscovgodsrv")
if(rtnmsg.respCode == SUCCESS)
......
......@@ -447,7 +447,7 @@ export default {
"gidgrp.rec.opndat":[
{type: "date", required: false, message: "输入正确的日期"}
{type: "string", required: false, message: "输入正确的日期"}
],
"gidgrp.iss.adrelc":[
{type: "string", required: true, message: "必输项"},
......
......@@ -7,19 +7,19 @@
<c-col :span="16">
<c-col :span="24">
<el-form-item v-if="model.gitp.gidtxtmodflg == ''" label="保函文本可变因素" prop="gidgrp.blk.gidtxt">
<c-xml-format-editor :disabled="model.gitp.gidtxtmodflg == ''" type="textarea" rows="16"
<c-xml-format-editor :disabled="model.gitp.gidtxtmodflg == ''" key="model.gidgrp.blk.gidtxt" @blur="setTxt1"
:model="model.gidgrp.blk.gidtxt" maxlength="65" show-word-limit placeholder="请输入保函文本可变因素">
</c-xml-format-editor>
</el-form-item>
<el-form-item v-if="model.gitp.gidtxtmodflg == 'X'" label="保函文本可变因素" prop="gidgrp.blk.gtxgidtxt">
<c-xml-format-editor type="textarea" :model="model.gidgrp.blk.gtxgidtxt" rows="16" maxlength="65"
<c-xml-format-editor type="textarea" :model="model.gidgrp.blk.gtxgidtxt" key="model.gidgrp.blk.gtxgidtxt" @blur="setTxt2"
show-word-limit placeholder="请输入保函文本可变因素"></c-xml-format-editor>
</el-form-item>
</c-col>
</c-col>
<c-col :span="6">
<c-col :span="12" :offset="12">
<c-checkbox v-model="model.gitp.gidtxtmodflg" style="margin: 0 0 0 10px" class="checkbox-left">修改保函文本</c-checkbox>
<c-checkbox v-model="model.gitp.gidtxtmodflg" style="margin: 0 0 0 10px" class="checkbox-left" @change="modflgChange">修改保函文本</c-checkbox>
</c-col>
<c-col :span="24" :offset="12">
<c-checkbox v-model="model.gitp.chkgidtxt" style="margin: 0 0 0 10px" class="checkbox-left">允许</c-checkbox>
......@@ -82,7 +82,42 @@ export default {
data() {
return {};
},
methods: { ...Event },
methods: {
...Event,
async modflgChange() {
const rtnmsg = await this.executeRule("gitp.gidtxtmodflg");
if (rtnmsg.respCode == SUCCESS) {
this.updateModel(rtnmsg.data);
}
},
async setTxt1(val, fn){
// this.executeDefault("gitp.gidgrp.blk.gidtxt").then((res) => {
// if ((res.respCode == SUCCESS)) {
// Utils.copyValueFromVO(this.model, res.data);
// }
// });
this.executeRule("gitp.gidgrp.blk.gidtxt").then((res) => {
if ((res.respCode == SUCCESS)) {
this.updateModel(res.data);
this.$nextTick(() => fn())
}
});
},
async setTxt2(val, fn){
// this.executeDefault("gitp.gidgrp.blk.gtxgidtxt").then((res) => {
// if ((res.respCode == SUCCESS)) {
// Utils.copyValueFromVO(this.model, res.data);
// }
// });
this.executeRule("gitp.gidgrp.blk.gtxgidtxt").then((res) => {
if ((res.respCode == SUCCESS)) {
this.updateModel(res.data);
this.$nextTick(() => fn())
}
});
},
},
created: function () { },
};
</script>
......
......@@ -31,7 +31,12 @@ export default {
activeNames: ["addbcb1"],
};
},
methods: { ...Event },
methods: {
...Event,
handleChange() {
}
},
created: function () {},
};
</script>
......
......@@ -23,6 +23,7 @@
:model="model.gidgrp.blk.gidtxt"
:disabled="model.gitp.gidtxtmodflg == ''"
placeholder="请输入保函文本可变因素"
key="model.gidgrp.blk.gidtxt"
@blur="setTxt1"
></c-xml-format-editor>
</el-form-item>
......@@ -43,6 +44,7 @@
<c-xml-format-editor
:model="model.gidgrp.blk.gtxgidtxt"
placeholder="请输入保函文本可变因素"
key="model.gidgrp.blk.gtxgidtxt"
@blur="setTxt2"
></c-xml-format-editor>
</el-form-item>
......@@ -153,7 +155,8 @@ export default {
data() {
return {};
},
methods: {async setTxt1(val, fn){
methods: {
async setTxt1(val, fn){
// this.executeDefault("gitp.gidgrp.blk.gidtxt").then((res) => {
// if ((res.respCode == SUCCESS)) {
// Utils.copyValueFromVO(this.model, res.data);
......
......@@ -16,9 +16,9 @@
<el-collapse-item title="详细信息" name="detp">
<m-detp :model="model" :codes="codes" />
</el-collapse-item>
<el-collapse-item title="保函文本" name="gidtxtp">
<!-- <el-collapse-item title="保函文本" name="gidtxtp">
<m-gidtxtp :model="model" :codes="codes" />
</el-collapse-item>
</el-collapse-item> -->
<el-collapse-item
title="确认详细信息"
name="confp"
......@@ -86,7 +86,7 @@ import Opnp from "./Opnp";
import Ptyp from "./Ptyp";
import Preperp from "./Preperp";
import Detp from "./Detp";
import Gidtxtp from "./Gidtxtp";
// import Gidtxtp from "./Gidtxtp";
import Confp from "./Confp";
import Cfap from "./Cfap";
import Conp from "./Conp";
......@@ -104,7 +104,7 @@ const tabNameToRulePathMapping = {
"voup": "cnybop.voup",
"cfap": "cfagit.cfap",
"dclpp": "Ebbp.dclpp",
"gidtxtp": "gitp.gidtxtp",
// "gidtxtp": "gitp.gidtxtp",
"ptypc": "gitp.ptypc",
"detp": "gitp.detp",
}
......@@ -117,7 +117,7 @@ export default {
"m-ptyp": Ptyp,
"m-preperp": Preperp,
"m-detp": Detp,
"m-gidtxtp": Gidtxtp,
// "m-gidtxtp": Gidtxtp,
"m-confp": Confp,
"m-cfap": Cfap,
"m-conp": Conp,
......
......@@ -404,6 +404,7 @@
v-if="model.gitp.swiftflg != 'Y'"
label="保函开立日期"
prop="gidgrp.rec.opndat"
key="gidgrp.rec.opndat"
>
<c-date-picker
type="date"
......@@ -1406,6 +1407,9 @@ export default {
this.model.gidgrp.rec.gtxinr = "<NILTXT>";
}
},
"model.gidgrp.ben.pts.adrblk": function (newVal, oldVal) {
this.executeDefault("gidgrp.benadrlin")
}
},
methods: {
...Event,
......
......@@ -18,6 +18,12 @@
</c-content>
</el-tab-pane>
<el-tab-pane label="保函文本" name="gidtxtp">
<c-content>
<m-gidtxtp :model="model" :codes="codes" />
</c-content>
</el-tab-pane>
<!--PD000001 -->
<el-tab-pane label="保证金" name="ccvpan">
<c-content>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment