Commit 3463cec7 by lixinyi

更新

parent a82ab3f6
<template>
<div class="container">
<el-page-header
@back="goBack"
content="Detail Page"
title="Return"
></el-page-header>
<h3 class="page_title" :title="msg">{{ title }}</h3>
<div class="iso_tools">
<el-button
v-if="onShow"
@click="validateMessage"
size="small"
type="primary"
>Check</el-button
>
<el-button
v-if="thShow"
ref="openBtn"
@click="open"
size="small"
type="primary"
>Expansion</el-button
>
<br /><br /><br />
<el-button v-if="onShow" @click="genMessage" size="small" type="primary"
>Save</el-button
>
<el-button
v-else
ref="closeBtn"
@click="close"
size="small"
type="primary"
>Put away</el-button
>
<!-- <el-button v-if="thShow" ref="closeBtn" @click="close" size="small" type="primary">收起</el-button> -->
<br /><br /><br />
<!-- <el-button v-if="thShow" @click="mx2mt" size="small" type="primary">转换</el-button> -->
<el-button
v-if="thShow && (mty.includes('pacs.004') || mty.includes('camt.056'))"
ref="fillBtn"
@click="showCancelMessageInfos(mty)"
size="small"
type="primary"
>Fill Infos</el-button>
<br v-if="thShow && (mty.includes('pacs.004') || mty.includes('camt.056'))" />
<br v-if="thShow && (mty.includes('pacs.004') || mty.includes('camt.056'))" />
<br v-if="thShow && (mty.includes('pacs.004') || mty.includes('camt.056'))" />
<el-button v-if="thShow" type="primary" @click="showTemplate(mty)" size="small">Template</el-button>
</div>
<el-tabs
type="card"
tab-position="top"
style="height: 200px"
activeName="messageTab"
:before-leave="beforeTabLeave"
>
<el-tab-pane label="Message" name="messageTab">
<el-form :model="treeModel" size="small" inline-message ref="form">
<el-tree
ref="tree"
:data="treeModel.treeNodeArry"
node-key="path"
icon-class="el-icon-folder"
>
<span class="tree_node" slot-scope="{ node, data }">
<el-col :span="8">
<span class="msg_title" :class="{ node_nonleaf: !node.isLeaf }">
<input
type="radio"
:name="parentNodeData(node).path"
:checked="data.checked"
v-if="
'Choice' === parentNodeData(node).type &&
!parentNodeData(node).disabled
"
@click.stop
@change="radioChange(node)"
/>
<span
style="margin-right: 5px"
v-if="node.data.type != 'HiddenInput'"
>
{{ node.data.label }}</span
>
<!--添加 报文模板保存功能 -->
<template-infos
:mty="mty"
:obj="templateData"
:loginUser="loginUser"
ref="templateInfos"
>
</template-infos>
<!-- 添加camt056、pacs004需要带入其它报文字段查询按钮 -->
<cancel-msg-infos
:mty="mty"
ref="cancelMessInfos"
@updateCancelMessageInfos="updateCancelMessageInfos">
</cancel-msg-infos>
<el-button
v-if="
data.array &&
(data._children === undefined ||
data._children === null) &&
!(siblSameTagNodeNum(node) >= data.maxLength)
"
type="text"
icon="el-icon-circle-plus-outline"
size="mini"
circle
@click.stop="addNodeArryElem(node)"
></el-button>
<el-button
v-if="
data.array &&
siblNodeData(node, -1).array &&
siblNodeData(node, -1).tag == data.tag
"
type="text"
icon="el-icon-remove-outline"
size="mini"
circle
@click.stop="removeNodeArryElem(node)"
>
</el-button>
</span>
</el-col>
<el-col :span="16">
<span>
<el-form-item
label=" "
:prop="`treeNodeArry${nodePath(data.path)}.value`"
:rules="genRules(data, node)"
>
<component
:is="msgComRender(node).is"
:dataModel="data"
:ref="data.ref"
v-bind="msgComRender(node).props"
>
</component>
</el-form-item>
</span>
</el-col>
</span>
</el-tree>
</el-form>
</el-tab-pane>
<el-tab-pane label="Preview" name="previewTab">
<div>
<div class="left">
<h3 class="title1">MX Message</h3>
<textarea class="textleft" readonly v-model="message"></textarea>
</div>
<!-- <div v-if="flag" class="right">
<h3 class="title2">mt报文</h3>
<textarea class="textright" readonly v-model="mtmessage"></textarea>
</div> -->
</div>
</el-tab-pane>
</el-tabs>
<el-dialog title="mtType" :visible.sync="dialogFormVisible">
<el-form :model="form">
<el-form-item label="mtType:">
<el-select v-model="form.mtType" placeholder="Please select mtType">
<el-option label="MT202" value="202"></el-option>
<el-option label="MT205" value="205"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">Cancellation</el-button>
<el-button type="primary" @click="sure">Confirm</el-button>
</div>
</el-dialog>
<el-backtop style="right: 18px" />
</div>
</template>
<script>
import MsgCodes from "../script/MsgCode";
import MsgJsonMap from "../script/MsgJsonRtgs";
import msgComRender from "../script/MsgComRender";
import {
appendTreeChild,
deleteEmptyProperty,
hasMandatoryChildNode,
clearMsgValue,
deepClone,
} from "../script/MsgJsonRtgs/MsgHander";
import ISOComs from "../components";
import send from "../Service/post";
import { validatorRule } from "../script/Rule/Rule";
export default {
props: ["mty"],
components: {
...ISOComs,
},
data() {
return {
isCheck: false,
title: "ISO Manual reporting",
message: "",
treeModel: { treeNodeArry: [] },
jsonMsg: "",
flag: false,
mtmessage: "",
msg: "",
onShow: false,
thShow: true,
form: {
mtType: "",
},
dialogFormVisible: false,
data: {},
map: "",
smhinr: this.$route.query.smhinr,
mxminr: this.$route.query.mxminr,
loginUser: this.$route.params.loginUser,
templateData:"",
};
},
methods: {
goBack() {
this.$router.push({
path: "/",
query: {
loginUser: this.loginUser,
},
});
},
msgComRender,
buildMsgStruct() {
this.title = this.mty;
let messageTypeCodes = MsgCodes["messageTypeCodeRtgs"];
for (let messageTypeCode of messageTypeCodes) {
if (messageTypeCode.value == this.mty) {
this.title = messageTypeCode.label2;
this.msg = messageTypeCode.value;
}
}
const jsonArry = MsgJsonMap(this.mty);
if (jsonArry !== null) {
this.commonNodeReplace(jsonArry, null);
this.resetValueAndStatus(jsonArry);
// 报文回退编辑
let smhinr = this.smhinr;
let mxminr = this.mxminr;
if (smhinr != undefined && smhinr != null) {
this.setJSonValue(jsonArry);
} else if(mxminr != undefined && mxminr != null) {
//模板查询报文编辑
this.getTemplate(jsonArry);
} else {
this.treeModel.treeNodeArry = jsonArry;
}
}
},
getTemplate(jsonArry) {
const data = { mty: this.mty, type: "rtgs", mxminr: this.mxminr };
send.getTemplate(data).then((res) => {
this.map = res.data;
this.setValue2JsonArry(jsonArry, this.map, true);
this.treeModel.treeNodeArry = jsonArry;
this.changeTreeNodeStatus(this.treeModel.treeNodeArry);
});
},
changeTreeNodeStatus(jsonArry){
for(let job of jsonArry){
let type = job.type;
let children = job.children;
let children2 = job._children;
//得到最外层的Choice节点
if(type == "Choice"){
if(children != undefined && children != null){
let count = 0;
for(let i = 0 ; i< children.length;i++){
//判断节点是否为空
if(this.judgeArrayNone(children[i]) != null){
//当前节点不为空
//修改当前节点的checked状态
this.changeChildsStatus(children[i],false,true,true);
this.UpdateChoiceNode(children[i]);
}else{
count++;
//当前节点值为空置灰
this.changeChildsStatus(children[i],true,false,true);
}
}
//若只有一层Choice节点,默认设置checked为第一项
if(count == children.length){
this.changeChildsStatus(children[0],false,true,true);
}
}
if(children2 != undefined && children2 != null){
let count = 0;
for(let i = 0 ; i< children2.length;i++){
if(this.judgeArrayNone(children2[i]) != null){
this.changeChildsStatus(children2[i],false,true,true);
this.UpdateChoiceNode(children2[i]);
}else{
count++;
this.changeChildsStatus(children2[i],true,false,true);
}
}
//若只有一层Choice节点,默认设置checked为第一项
if(count == children2.length){
this.changeChildsStatus(children2[0],false,true,true);
}
}
continue;
}
if(children != undefined && children != null){
this.changeTreeNodeStatus(children);
}
if(children2 != undefined && children2 != null){
this.changeTreeNodeStatus(children2);
}
}
},
//判断是Choice的子节点是值是否为空
judgeArrayNone(jsonarray){
if(jsonarray.value !=undefined && jsonarray.value != ""){
return jsonarray;
}
if(jsonarray.children != undefined && jsonarray.children != null){
for(let data of jsonarray.children){
const res = this.judgeArrayNone(data);
if(res) return res;
}
}
if(jsonarray._children != undefined && jsonarray._children != null){
for(let data of jsonarray._children){
const res = this.judgeArrayNone(data);
if(res) return res;
}
}
return null;
},
////判断是否含有Choice节点
judgeChoiceNode(jsonarray){
if(jsonarray.type == "Choice"){
return jsonarray;
}
if(jsonarray.children != undefined && jsonarray.children != null){
for(let data of jsonarray.children){
const res = this.judgeChoiceNode(data);
if(res) return res;
}
}
if(jsonarray._children != undefined && jsonarray._children != null){
for(let data of jsonarray._children){
const res = this.judgeChoiceNode(data);
if(res) return res;
}
}
return null;
},
//修改子节点含有Choice的checked状态
UpdateChoiceNode(jsonarray){
if(jsonarray.children != undefined && jsonarray.children != null){
for(let data of jsonarray.children){
//判断是否还有Choice节点
if(this.judgeChoiceNode(data) != null){
data = this.judgeChoiceNode(data);
if(data.children != undefined || data._children != undefined){
//如果是数组则继续递归修改状态
this.UpdateChoiceNode(data);
}else{
this.changeChildsStatus(data,false,true,true);
}
}else{
//当前节点没有子节点
if(data.children == undefined && data._children == undefined){
if(data.value != ''){
this.changeChildsStatus(data,false,true,true);
}else{
this.changeChildsStatus(data,true,false,true);
}
}
}
}
}
if(jsonarray._children != undefined && jsonarray._children != null){
for(let data of jsonarray._children){
if(this.judgeChoiceNode(data) != null){
data = this.judgeChoiceNode(data);
console.log(data);
if(data.children != undefined || data._children != undefined){
this.UpdateChoiceNode(data);
}else{
this.changeChildsStatus(data,false,true,true);
}
}else{
if(data.children == undefined && data._children == undefined){
if(data.value != ''){
this.changeChildsStatus(data,false,true,true);
}else{
this.changeChildsStatus(data,true,false,true);
}
}
}
}
}
},
genRules(data, node) {
const rules = [];
rules.push({
required:
"M" === data.status &&
node.isLeaf &&
data.unable !== true &&
data.disabled !== true,
message: node.data.name + " Cannot be null",
});
let validator = msgComRender(node).contextValidator;
if (validator !== undefined) {
if (Array.isArray(validator)) {
for (let v of validator) {
rules.push(v);
}
} else {
rules.push(validator);
}
}
return rules;
},
commonNodeReplace(jsonArry, pathSufix) {
for (let job of jsonArry) {
if (pathSufix !== null) {
job.path = pathSufix + "." + job.path;
}
if (job.children === undefined || job.children === null) {
let child = MsgJsonMap(job.type);
if (child != null && child.length === 9) {
let id = jsonArry[jsonArry.length - 2].defaultValue;
if ("admi.002.001.01" === id) {
child[4].defaultValue = "hkicl.chats.rtpadm.01";
child[4].unable = true;
} else if ("camt.019.001.07" === id) {
child[4].defaultValue = "hkicl.chats.rtpadm.01";
child[4].unable = true;
} else if ("camt.021.001.06" === id) {
child[4].type = "Select#camt021";
} else if ("camt.025.001.05" === id) {
child[4].defaultValue = "hkicl.chats.rtpsta.01";
child[4].unable = true;
} else if ("camt.029.001.09" === id) {
child[4].defaultValue = "hkicl.chats.rtpcan.01";
child[4].unable = true;
} else if ("camt.052.001.08" === id) {
child[4].defaultValue = "hkicl.chats.rtpsta.01";
child[4].unable = true;
} else if ("camt.053.001.08" === id) {
child[4].defaultValue = "hkicl.chats.rtpsta.01";
child[4].unable = true;
} else if ("camt.054.001.08" === id) {
child[4].defaultValue = "hkicl.chats.rtpntf.01";
child[4].unable = true;
} else if ("camt.056.001.08" === id) {
child[4].defaultValue = "hkicl.chats.rtpcan.01";
child[4].unable = true;
} else if ("camt.060.001.05" === id) {
child[4].defaultValue = "hkicl.chats.rtpsta.01";
child[4].unable = true;
} else if ("pacs.002.001.10" === id) {
child[4].type = "Select#pacs002";
} else if ("pacs.004.001.09" === id) {
child[4].defaultValue = "hkicl.chats.rtprtn.01";
child[4].unable = true;
} else if ("pacs.008.001.08" === id) {
child[4].defaultValue = "hkicl.chats.rtppay.01";
child[4].unable = true;
} else if ("pacs.009.001.08" === id) {
child[4].defaultValue = "hkicl.chats.rtppay.01";
child[4].unable = true;
} else if ("pacs.009.001.08.cov" === id) {
child[4].defaultValue = "hkicl.chats.rtppay.cov.01";
child[4].unable = true;
} else if ("pacs.009.001.08.credit" === id) {
child[4].defaultValue = "hkicl.chats.rtpntf.01";
child[4].unable = true;
} else if ("pacs.010.001.03" === id) {
child[4].defaultValue = "hkicl.chats.rtppay.01";
child[4].unable = true;
} else if ("pain.001.001.09" === id) {
child[4].defaultValue = "hkicl.chats.rtpntf.01";
child[4].unable = true;
}
id = id.substring(0, 15);
child[3].defaultValue = id;
}
if (child !== null && Array.isArray(child)) {
this.commonNodeReplace(child, job.path);
job.children = child;
}
} else {
this.commonNodeReplace(job.children, pathSufix);
}
if (job.status !== "M" && hasMandatoryChildNode(job.children)) {
//pacs004、camt056联动开发,点击按钮‘Original Group Information’无法展开修改
if(job.label !== 'Original Group Information'){
job._children = job.children;
job.children = null;
}
}
}
},
setValue2JsonArry(jsonArry, map, flag) {
let j = 0;
for (let job of jsonArry) {
let children = job.children;
let children2 = job._children;
let tag = job.tag;
let value = "";
let type = job.type;
if (map[tag] === null || map[tag] === undefined) {
continue;
}
if (type != undefined && type.includes("List")) {
value = [];
for (let i = 0; i < map[tag].length; i++) {
value.push({ name: map[tag][i] });
}
job.value = value;
continue;
}
if (tag === "ntry" && this.count === 1) {
flag = true;
j = 0;
this.count++;
}
if (map[tag] instanceof Array) {
if (map[tag].length > 1 && flag) {
for (let i = 0; i < map[tag].length - 1; i++) {
this.addNode(jsonArry, job);
}
flag = false;
this.setValue2JsonArry(jsonArry, map, flag);
}
value = map[tag][j];
j++;
} else {
value = map[tag];
}
if (value === undefined || value === null) {
continue;
}
if (children === undefined || children === null) {
if (children2 === undefined || children2 === null) {
job.value = value;
} else {
this.setValue2JsonArry(children2, value, flag);
}
} else {
this.setValue2JsonArry(children, value, flag);
}
}
},
setJSonValue(jsonArry) {
const data = { mty: this.mty, type: "rtgs", smhinr: this.smhinr };
send.mx2Json(data).then((res) => {
this.map = res.data;
this.setValue2JsonArry(jsonArry, this.map, true);
this.treeModel.treeNodeArry = jsonArry;
//解决选择checked的但依旧置灰的错误
this.changeTreeNodeStatus(this.treeModel.treeNodeArry);
});
},
parentNodeData(node) {
return node.parent.data;
},
siblNodeData(node, num) {
const parent = this.getParentTreeModel(node.data.path);
const split = node.data.path.split(".");
const index = Number(split[split.length - 1]) + num;
const ret = parent[index];
return ret ? ret : {};
},
siblSameTagNodeNum(node) {
let cnt = 0;
const targetTag = node.data.tag;
for (let n of node.parent.childNodes) {
if (n.data.tag === targetTag) {
++cnt;
}
}
return cnt;
},
nodePath(path) {
if (path !== undefined) {
const split = path.split(".");
let nodePath = `[${split[0]}]`;
if (split.length > 1) {
for (let j = 1; j < split.length; j++) {
nodePath += `.children[${split[j]}]`;
}
}
return nodePath;
}
},
//币种比较,当不一致时,跳转提示
amountvalidate(array){
if(this.mty.includes('pacs.004')){
let dataArray = deepClone(array);
let orgnlIntrBkSttlmAmt = dataArray[2].children[7];
let rtrdIntrBkSttlmAmt = dataArray[2].children[9];
if(orgnlIntrBkSttlmAmt.value.ccy != undefined && orgnlIntrBkSttlmAmt.value.ccy != '' && orgnlIntrBkSttlmAmt.value.ccy != rtrdIntrBkSttlmAmt.value.ccy){
this.$message({
message: orgnlIntrBkSttlmAmt.name+' And '+rtrdIntrBkSttlmAmt.name+' have different Currency',
type: "warning",
duration: 5000
});
}
}
},
beforeTabLeave(to, from) {
if (to === "previewTab") {
this.isCheck = false;
return this.$refs.form
.validate()
.then((success) => {
let dataArray = deepClone(this.treeModel.treeNodeArry);
console.log(dataArray);
let obj = appendTreeChild(dataArray);
let flag = validatorRule(this.mty, obj);
if (!flag) {
this.onShow = false;
this.thShow = true;
return Promise.reject();
}
this.amountvalidate(dataArray);
const json = appendTreeChild(dataArray);
deleteEmptyProperty(json);
this.jsonMsg = JSON.stringify(json);
this.onShow = true;
this.thShow = false;
let smhinr = this.smhinr;
let data = { json: this.jsonMsg };
if (smhinr != undefined && smhinr != null) {
this.$set(data, "opeType", "2");
}
send
.sendSWiftMes(data)
.then((res) => {
this.message = res.data;
})
.catch((err) => {
this.$message({
message: "Network exception(" + err.message + ")",
type: "error",
});
});
})
.catch((errMsg) => {
console.log("com to catch");
console.log(errMsg);
for (let err of Object.keys(errMsg)) {
if (err.indexOf("children") !== -1) {
const firstErrorPath = eval(
"this.treeModel." + err.slice(0, -5) + "path"
);
this.updateTreeNodeParentExpand(firstErrorPath, true);
break;
}
}
setTimeout(() => {
const isError = document.getElementsByClassName("is-error");
if (
isError[0] === null ||
isError[0] === "" ||
isError[0] === undefined
)
return;
isError[0].scrollIntoView({
block: "center",
behavior: "smooth",
});
}, 100);
throw new Error(errMsg);
});
} else {
this.onShow = false;
this.thShow = true;
}
},
radioChange(node) {
this.updateTreeNodeStatus(node, true);
const curId = node.id;
for (let collNode of node.parent.childNodes) {
if (collNode.id !== curId) {
this.updateTreeNodeStatus(collNode, false);
}
}
},
updateTreeNodeStatus(node, bFlag, checked) {
let disable;
if (bFlag) {
if (checked) {
node.data.checked = true;
}
disable = checked === false;
} else {
clearMsgValue(node.data);
this.$refs.form.clearValidate(
`treeNodeArry${this.nodePath(node.data.path)}.value`
);
disable = true;
}
if (node.data.disabled === undefined) {
this.$set(node.data, "disabled", disable);
} else {
node.data.disabled = disable;
}
if (
(node.childNodes && node.childNodes.length > 0) ||
node.data.children ||
node.data._children
) {
const relChildren =
node.childNodes && node.childNodes.length > 0
? node.childNodes
: node.data.children
? node.data.children
: node.data._children;
for (let i = 0; i < relChildren.length; i++) {
if (node.data.type === "Choice") {
checked = i === 0;
}
let child = relChildren[i].data
? relChildren[i]
: { data: relChildren[i] };
this.updateTreeNodeStatus(child, bFlag, checked);
}
}
if (node.expanded !== undefined && !node.isLeaf) {
node.expanded = bFlag;
}
},
getParentTreeModel(childPath) {
const path = this.nodePath(childPath);
let index = path.lastIndexOf(".");
let parent;
if (index != -1) {
parent = eval(
"this.treeModel.treeNodeArry" + path.substring(0, index) + ".children"
);
} else {
parent = this.treeModel.treeNodeArry;
}
return parent;
},
addNode(jsonArry, job) {
const newNode = this.copyNewNode(job);
const split = job.path.split(".");
this.updateNodePath(newNode, split.length, 1);
let index = split[split.length - 1];
index = Number(index) + 1;
for (let i = index; i < jsonArry.length; i++) {
this.updateNodePath(jsonArry[i], split.length, 1);
}
jsonArry.splice(index, 0, newNode);
},
addNodeArryElem(node) {
//debugger;
const parent = this.getParentTreeModel(node.data.path);
const newNode = this.copyNewNode(node.data);
this.updateNodePath(newNode, node.level, 1);
const split = node.data.path.split(".");
let index = split[split.length - 1];
index = Number(index) + 1;
for (let i = index; i < parent.length; i++) {
this.updateNodePath(parent[i], node.level, 1);
}
parent.splice(index, 0, newNode);
},
removeNodeArryElem(node) {
const parent = this.getParentTreeModel(node.data.path);
const split = node.data.path.split(".");
let index = split[split.length - 1];
index = Number(index);
parent.splice(index, 1);
for (let i = index; i < parent.length; i++) {
this.updateNodePath(parent[i], node.level, -1);
}
},
resetValueAndStatus(data, checked) {
if (Array.isArray(data)) {
for (let node of data) {
checked = this.resetValueAndStatus(node, checked);
}
} else {
let nextChecked = checked;
clearMsgValue(data);
if (checked === undefined) {
Reflect.deleteProperty(data, "disable");
Reflect.deleteProperty(data, "checked");
} else if (checked === true) {
data.checked = true;
Reflect.deleteProperty(data, "disable");
nextChecked = false;
checked = undefined;
} else if (checked === false) {
data.disabled = true;
Reflect.deleteProperty(data, "checked");
}
if (data.children || data._children) {
if (data.type === "Choice" && checked !== false) {
checked = true;
}
const relChildren = data.children ? data.children : data._children;
this.resetValueAndStatus(relChildren, checked);
}
return nextChecked;
}
},
copyNewNode(json) {
const data = JSON.parse(JSON.stringify(json));
this.resetValueAndStatus(data);
return data;
},
updateNodePath(json, level, num) {
const split = json.path.split(".");
split[level - 1] = Number(split[level - 1]) + num;
json.path = split.join(".");
if (json.children || json._children) {
const realChild = json.children ? json.children : json._children;
for (let child of realChild) {
this.updateNodePath(child, level, num);
}
}
},
genMessage() {
if (!this.isCheck) {
this.$message({
message: "save requires successful check",
type: "error",
});
return;
}
let data = { json: this.jsonMsg };
let smhinr = this.smhinr;
if (smhinr != undefined && smhinr != null) {
this.$set(data, "opeType", "2");
}
let loginUser = this.loginUser;
if (loginUser != undefined && loginUser != null) {
this.$set(data, "loginUser", loginUser);
}
send
.saveSWiftMes(data)
.then((res) => {
if ("1" === res.data.substring(0, 1)) {
this.$message({
message: res.data.substring(1),
type: "success",
});
this.$router.push({
path: "/success",
query: {
loginUser: this.loginUser,
},
});
} else {
this.$message({
message: "Save failure",
type: "error",
});
}
})
.catch((err) => {
this.$message({
message: "Network exception(" + err.message + ")",
type: "error",
});
});
},
validateMessage() {
console.log(this.treeModel.treeNodeArry)
let data = { xml: this.message, type: "rtgs", mty: this.mty };
send
.validateSWiftMes(data)
.then((res) => {
if ("1" == res.data) {
this.$message({
message: "Verify success",
type: "success",
});
this.isCheck = true;
} else {
this.$message({
message: res.data,
type: "error",
});
this.isCheck = false;
}
})
.catch((err) => {
this.$message({
message: "Network exception(" + err.message + ")",
type: "error",
});
this.isCheck = false;
});
},
updateTreeNodeParentExpand(path, expanded) {
const split = path.split(".");
if (split.length < 2) {
return;
}
for (let i = split.length - 1; i > 0; i--) {
path = split.slice(0, i).join(".");
this.updateTreeNodeExpand(path, expanded);
}
},
updateTreeNodeExpand(path, expanded) {
this.$refs.tree.store.nodesMap[path].expanded = expanded;
},
// 展开按钮
open() {
// 控制按钮点击之后失焦
this.$refs.openBtn.$el.blur();
// for (let key in this.$refs.tree.store.nodesMap) {
// this.$refs.tree.store.nodesMap[key].expanded = true;s
// }
//只展开必输项
for (let key in this.$refs.tree.store.nodesMap) {
if(!this.$refs.tree.store.nodesMap[key].isLeaf && this.$refs.tree.store.nodesMap[key].data.status === "M"){
this.$refs.tree.store.nodesMap[key].expanded = true;
}
}
},
// 收起按钮
close() {
// 控制按钮点击之后失焦
this.$refs.closeBtn.$el.blur();
for (let key in this.$refs.tree.store.nodesMap) {
if(!this.$refs.tree.store.nodesMap[key].isLeaf)
this.$refs.tree.store.nodesMap[key].expanded = false;
}
},
mx2mt() {
this.data = { xml: this.message };
if (this.mty == "pacs.009.001.08") {
this.dialogFormVisible = true;
} else {
send
.mx2mt(this.data)
.then((res) => {
this.mtmessage = res.data;
})
.catch((err) => {
this.$message({
message: "Network exception(" + err.message + ")",
type: "error",
});
});
}
this.flag = true;
},
sure() {
this.dialogFormVisible = false;
this.data = { xml: this.message, mtType: this.form.mtType };
send
.mx2mt(this.data)
.then((res) => {
this.mtmessage = res.data;
//console.log(this.mtmessage)
})
.catch((err) => {
this.$message({
message: "Network exception(" + err.message + ")",
type: "error",
});
});
},
showTemplate(mty){
let dataArray = deepClone(this.treeModel.treeNodeArry);
dataArray = appendTreeChild(dataArray);
this.templateData = JSON.stringify(dataArray);
this.$refs.templateInfos.showDialog();
console.log("-----json-----")
console.log(this.templateData);
},
//camt056、pacs004获取取消原报文关键字段控制弹窗函数
showCancelMessageInfos(type){
//分类型在el-tree展开original message关键信息字段,让组件挂载出来。。。
this.$refs.fillBtn.$el.blur();
if(type.includes("pacs.004")){
this.open();
this.$refs.cancelMessInfos.showDialog();
}else if(type.includes("camt.056")){
this.open();
this.$refs.cancelMessInfos.showDialog();
}
},
async updateCancelMessageInfos(dataObj){
//根据vue官网单项数据流原则,不在子组件中修改父组件数据;而是通知父组件,让父组件修改数据。
let node = null;
let type = this.mty;
let resultMap = {};
//填充pacs004其它字段信息, 20230905
let fillData = {
//pacs004查询的是收到的pacs008、pacs009报文;目前需要转换为MT报文,填充报文优先查询orgsmhinr字段
orgSmhInr:dataObj.orgsmhinr,
smhinr:dataObj.smhinr,
mty: dataObj.orgnlMsgNmId + "|" + type
};
await send
.getFillElements(fillData)
.then((res) => {
//console.log(res.data.result);
if("1" === res.data.result){
//未查询到数据
this.$alert("No Pacs004 message found.");
}else if("0" === res.data.result){
//查询失败
this.$alert("Searching Pacs004 details failed.");
}else if("SUCCESS" === res.data.result){
//查询成功
//查询到的数据
resultMap = res.data;
//console.log(pacs004Map);
}
}).catch((err) => {
this.$message({
message: "Network exception(" + err.message + ")",
type: "error",
});
});
if(type.includes("pacs.004")){
//获取pacs004报文label值为Original Message Identification的树节点
node = this.$refs.tree.getNode("2.1.0");
this.fullFillPacs004Elements(this.$refs.tree, resultMap, dataObj.orgnlMsgNmId);
}
else if(type.includes("camt.056")){
//获取camt056报文label值为Original Message Identification的树节点
node = this.$refs.tree.getNode("2.0.1.0");
this.fullFillCamt056Elements(this.$refs.tree, resultMap, dataObj.orgnlMsgNmId);
}
//此处添加的是Orignal Message Informations, 20230727
if(node !== null && dataObj !== null){
//node表示label值为Original Message Identification的节点
this.$set(node.data, "value", dataObj.orgnlMsgId);
this.$set(this.siblNodeData(node,1), "value", dataObj.orgnlMsgNmId);
//this.$set(this.siblNodeData(node,2), "value", this.$moment(new Date(dataObj.orgnlCreDtTm)).format("YYYY-MM-DDTHH:mm:ss.SSS+08:00"));
this.$set(this.siblNodeData(node,2), "value", this.transferDateStringToWebDate(dataObj.orgnlCreDtTm, "YYYY-MM-DDTHH:mm:ss.SSS+08:00"));
let parentNode = node.parent;
this.$set(this.siblNodeData(parentNode,1), "value", dataObj.orgnlInstrId);
this.$set(this.siblNodeData(parentNode,2), "value", dataObj.orgnlEndToEndId);
this.$set(this.siblNodeData(parentNode,3), "value", dataObj.orgnlTxId);
this.$set(this.siblNodeData(parentNode,4), "value", dataObj.orgnlUETR);
this.$set(this.siblNodeData(parentNode,5), "value", dataObj.orgnlClrSysRef);
let amount_cur = {ccy: dataObj.orgnlIntrBkSttlmCcy, value: JSON.stringify(dataObj.orgnlIntrBkSttlmAmt),};
//获取在js文件中有定义ref:"refFlg"的Amount组件,并异步改变Amount组件orgData的值
this.$refs.refFlg.orgData = amount_cur;
//this.$set(this.siblNodeData(parentNode,7), "value", this.$moment(new Date(dataObj.orgnlIntrBkSttlmDt)).format("YYYY-MM-DD"));
this.$set(this.siblNodeData(parentNode,7), "value", this.transferDateStringToWebDate(dataObj.orgnlIntrBkSttlmDt, "YYYY-MM-DD"));
}
},
/**
* 将后端传入的date字符串按pattern转换前端可用date
* @param {date字符串} dataStr
* @param {日期格式} pattern
*/
transferDateStringToWebDate(dateStr, pattern){
if(dateStr === null || dateStr === undefined){
return null;
}else{
return this.$moment(new Date(dateStr)).format(pattern);
}
},
/**
* 根据传入的el-tree的path值,将传入的value同步到整棵el-tree中。
* @param {*} treeObj 传入的el-tree对象
* @param {*} path el-tree对应的path
* @param {*} value 要修改的值
*/
setTreeNodeData(treeObj, path, value){
if(value === null || value === undefined){
return;
}
else{
let nodeData = this.getTreeNodeDate(treeObj, path);
if(nodeData === null || nodeData === undefined)
return;
else
this.$set(nodeData, "value", value);
}
},
/**
* 将地址(AddressLine)数组对象转化为前端可用的对象数组
* @param {地址(AddressLine)数组} adrArr
*/
getListFullArray(adrArr){
let value = [];
if(adrArr === null || adrArr === undefined)
return null;
for(let i = 0; i < adrArr.length; i++){
value.push({name : adrArr[i]});
}
return value;
},
/**
* 根据node-key获取node(Address Line),判断node的父节点是否展开;
* 如果展开了,用ref方式,获取到每一个组件实例,直接改变里面的tableData值。
* 如果没展开,用setTreeNodeData方法直接设置Address Line的值即可。
* @param {传入的el-tree对象} treeObj
* @param {Address Line ref变量值} refName
* @param {需要设置Address Line的el-tree节点的node-key} path
* @param {地址对象数组} adrArr
*/
setListFullArray(treeObj, refName, path, adrArr){
let node = this.$refs.tree.getNode(path);
let values = this.getListFullArray(adrArr);
//console.log(values);
if(node === null || node === undefined){
this.setTreeNodeData(treeObj, path, values);
}else{
if(node.parent.expanded && (values != null || values != undefined)){
this.$refs[`${refName}`].tableData = values;
}
else{
this.setTreeNodeData(treeObj, path, values);
}
//console.log(node.data);
}
},
/**
* 此函数是一个特定函数,只针对父节点为“Choice”的后代节点做遍历;
* 只有父节点为“Choice”的第二个子节点有填入值时才需要调用这个函数。
* Choice节点(只有第二个子节点需要)同步,changeCheckNodes方法只检查任意一个status="M"的后代节点即可,
* 其它没必要,因为报文在填入时比需要输入必输项。
* @param {传入的el-tree对象} treeObj
* @param {父节点为“Choice”的第一个子节点的path} path1
* @param {父节点为“Choice”的第二个子节点的path} path2
* @param {要填入第二个子节点的值} value
*/
changeCheckNodes(treeObj, path1, path2, value){
let nodeData1 = this.getTreeNodeDate(treeObj, path1);
let nodeData2 = this.getTreeNodeDate(treeObj, path2);
if(nodeData1 === null || nodeData1 === undefined || nodeData2 === null || nodeData2 === undefined){
return;
}
//根据传入的父节点为“Choice”的第二个子节点的value值,来判断是否修改后代节点的状态
if(value){
this.changeChildsStatus(nodeData1, true, false, true);
this.changeChildsStatus(nodeData2, false, true, true);
}
},
/**
* 修改节点disable、checked状态;
*
* @param {tree node对应的数据对象} nodeData
* @param {*disable值} sta
* @param {*checked值} checked
* @param {*当前节点的父节点是否为“Choice”} parentIsChoice
*/
changeChildsStatus(nodeData, sta, checked, parentIsChoice){
//父节点是“Choice”,并且要将disable置为false(表现在web页面上为可以输入)
if(parentIsChoice && !sta){
if(nodeData.checked === undefined)
this.$set(nodeData, "checked", checked);
else
nodeData.checked = checked;
//当前节点及其后代节点disable的值要继承
//若当前节checked === true,disable的值要固定为false(可用)
//若当前节checked === false,disable的值要固定为true(不可用)
if(checked)
sta = false;
else
sta = true;
}
if(nodeData.disabled === undefined){
this.$set(nodeData, "disabled", sta);
}else{
nodeData.disabled = sta;
}
if(nodeData.children !== null && nodeData.children !== undefined){
for(let i = 0; i < nodeData.children.length; i++){
//父节点是“Choice”的节点,默认(子节点都没有值)第一个子节点checked值为true
this.changeChildsStatus(nodeData.children[i], sta, i === 0, nodeData.type === "Choice");
}
}else if(nodeData._children !== null && nodeData._children !== undefined){
for(let i = 0; i < nodeData._children.length; i++){
this.changeChildsStatus(nodeData._children[i], sta, i === 0, nodeData.type === "Choice");
}
}
},
/**
* 获取Tree Node节点中的数据对象
* @param {*} treeObj
* @param {*} path
*/
getTreeNodeDate(treeObj, path){
let pathArr = path.split(".");
let nodeData = treeObj.getNode(pathArr[0]).data;
for(let i = 1; i < pathArr.length; i++){
nodeData = nodeData.children === null ?
(nodeData._children === null ? null : nodeData._children[pathArr[i]])
: nodeData.children[pathArr[i]];
if(nodeData === null || nodeData === undefined) {
break;
}
}
return nodeData;
},
/**
* 填充Pacs004元素
* @param {整棵树对象} treeObj
* @param {填充数据} map
* @param {报文类型} type
*/
fullFillPacs004Elements(treeObj,map,type){
// console.log(type);
// console.log(map);
//pacs004 Instructing Agent
this.setTreeNodeData(treeObj,"2.19.0.0", map.instdAgtBicfi);
this.setTreeNodeData(treeObj,"2.19.0.1.0.0", map.instdAgtClrSysIdCd);
this.setTreeNodeData(treeObj,"2.19.0.1.1", map.instdAgtMmbId);
this.setTreeNodeData(treeObj,"2.19.0.2", map.instdAgtLei);
this.setTreeNodeData(treeObj,"2.19.0.3", map.instdAgtNm);
this.setTreeNodeData(treeObj,"2.19.0.4.0", map.instdAgtDept);
this.setTreeNodeData(treeObj,"2.19.0.4.1", map.instdAgtSubDept);
this.setTreeNodeData(treeObj,"2.19.0.4.2", map.instdAgtStrtNm);
this.setTreeNodeData(treeObj,"2.19.0.4.3", map.instdAgtBldgNb);
this.setTreeNodeData(treeObj,"2.19.0.4.4", map.instdAgtBldgNm);
this.setTreeNodeData(treeObj,"2.19.0.4.5", map.instdAgtFlr);
this.setTreeNodeData(treeObj,"2.19.0.4.6", map.instdAgtPstBx);
this.setTreeNodeData(treeObj,"2.19.0.4.7", map.instdAgtRoom);
this.setTreeNodeData(treeObj,"2.19.0.4.8", map.instdAgtPstCd);
this.setTreeNodeData(treeObj,"2.19.0.4.9", map.instdAgtTwnNm);
this.setTreeNodeData(treeObj,"2.19.0.4.10", map.instdAgtTwnLctnNm);
this.setTreeNodeData(treeObj,"2.19.0.4.11", map.instdAgtDstrctNm);
this.setTreeNodeData(treeObj,"2.19.0.4.12", map.instdAgtCtrySubDvsn);
this.setTreeNodeData(treeObj,"2.19.0.4.13", map.instdAgtCtry);
this.setListFullArray(treeObj, "refInstdAgtAdrLine", "2.19.0.4.14", map.instdAgtAdrLine);
this.setTreeNodeData(treeObj,"2.19.1.0", map.instdAgtBrnchIdId);
this.setTreeNodeData(treeObj,"2.19.1.1", map.instdAgtBrnchIdLei);
this.setTreeNodeData(treeObj,"2.19.1.2", map.instdAgtBrnchIdNm);
this.setTreeNodeData(treeObj,"2.19.1.3.0.0", map.instdAgtBrnchIdAdrTpCd);
this.setTreeNodeData(treeObj,"2.19.1.3.0.1.0", map.instdAgtBrnchIdAdrTpPrtryId);
this.setTreeNodeData(treeObj,"2.19.1.3.0.1.1", map.instdAgtBrnchIdAdrTpPrtryIssr);
this.setTreeNodeData(treeObj,"2.19.1.3.0.1.2", map.instdAgtBrnchIdAdrTpPrtrySchmeNm);
this.setTreeNodeData(treeObj,"2.19.1.3.1", map.instdAgtBrnchIdDept);
this.setTreeNodeData(treeObj,"2.19.1.3.2", map.instdAgtBrnchIdSubDept);
this.setTreeNodeData(treeObj,"2.19.1.3.3", map.instdAgtBrnchIdStrtNm);
this.setTreeNodeData(treeObj,"2.19.1.3.4", map.instdAgtBrnchIdBldgNb);
this.setTreeNodeData(treeObj,"2.19.1.3.5", map.instdAgtBrnchIdBldgNm);
this.setTreeNodeData(treeObj,"2.19.1.3.6", map.instdAgtBrnchIdFlr);
this.setTreeNodeData(treeObj,"2.19.1.3.7", map.instdAgtBrnchIdPstBx);
this.setTreeNodeData(treeObj,"2.19.1.3.8", map.instdAgtBrnchIdRoom);
this.setTreeNodeData(treeObj,"2.19.1.3.9", map.instdAgtBrnchIdPstCd);
this.setTreeNodeData(treeObj,"2.19.1.3.10", map.instdAgtBrnchIdTwnNm);
this.setTreeNodeData(treeObj,"2.19.1.3.11", map.instdAgtBrnchIdTwnLctnNm);
this.setTreeNodeData(treeObj,"2.19.1.3.12", map.instdAgtBrnchIdDstrctNm);
this.setTreeNodeData(treeObj,"2.19.1.3.13", map.instdAgtBrnchIdCtrySubDvsn);
this.setTreeNodeData(treeObj,"2.19.1.3.14", map.instdAgtBrnchIdCtry);
this.setListFullArray(treeObj, "refInstdAgtBrnchIdAdrLine", "2.19.1.3.15", map.instdAgtBrnchIdAdrLine);
//pacs004 Instructed Agent
this.setTreeNodeData(treeObj,"2.20.0.0", map.instgAgtBicfi);
this.setTreeNodeData(treeObj,"2.20.0.1.0.0", map.instgAgtClrSysIdCd);
this.setTreeNodeData(treeObj,"2.20.0.1.1", map.instgAgtMmbId);
this.setTreeNodeData(treeObj,"2.20.0.2", map.instgAgtLei);
this.setTreeNodeData(treeObj,"2.20.0.3", map.instgAgtNm);
this.setTreeNodeData(treeObj,"2.20.0.4.0", map.instgAgtDept);
this.setTreeNodeData(treeObj,"2.20.0.4.1", map.instgAgtSubDept);
this.setTreeNodeData(treeObj,"2.20.0.4.2", map.instgAgtStrtNm);
this.setTreeNodeData(treeObj,"2.20.0.4.3", map.instgAgtBldgNb);
this.setTreeNodeData(treeObj,"2.20.0.4.4", map.instgAgtBldgNm);
this.setTreeNodeData(treeObj,"2.20.0.4.5", map.instgAgtFlr);
this.setTreeNodeData(treeObj,"2.20.0.4.6", map.instgAgtPstBx);
this.setTreeNodeData(treeObj,"2.20.0.4.7", map.instgAgtRoom);
this.setTreeNodeData(treeObj,"2.20.0.4.8", map.instgAgtPstCd);
this.setTreeNodeData(treeObj,"2.20.0.4.9", map.instgAgtTwnNm);
this.setTreeNodeData(treeObj,"2.20.0.4.10", map.instgAgtTwnLctnNm);
this.setTreeNodeData(treeObj,"2.20.0.4.11", map.instgAgtDstrctNm);
this.setTreeNodeData(treeObj,"2.20.0.4.12", map.instgAgtCtrySubDvsn);
this.setTreeNodeData(treeObj,"2.20.0.4.13", map.instgAgtCtry);
this.setListFullArray(treeObj, "refInstgAgtAdrLine", "2.20.0.4.14", map.instgAgtAdrLine);
//this.setTreeNodeData(treeObj,"2.20.0.4.14", this.getListFullArray(map.instgAgtAdrLine));
this.setTreeNodeData(treeObj,"2.20.1.0", map.instgAgtBrnchIdId);
this.setTreeNodeData(treeObj,"2.20.1.1", map.instgAgtBrnchIdLei);
this.setTreeNodeData(treeObj,"2.20.1.2", map.instgAgtBrnchIdNm);
this.setTreeNodeData(treeObj,"2.20.1.3.0.0", map.instgAgtBrnchIdAdrTpCd);
//Choice节点(只有第二个子节点需要)同步,changeCheckNodes方法只检查任意一个status="M"的后代节点即可,
//其它没必要,因为报文在填入时比需要输入必输项
this.setTreeNodeData(treeObj,"2.20.1.3.0.1.0", map.instgAgtBrnchIdAdrTpPrtryId);
this.changeCheckNodes(treeObj, "2.20.1.3.0.0", "2.20.1.3.0.1", map.instgAgtBrnchIdAdrTpPrtryId);
this.setTreeNodeData(treeObj,"2.20.1.3.0.1.1", map.instgAgtBrnchIdAdrTpPrtryIssr);
this.setTreeNodeData(treeObj,"2.20.1.3.0.1.2", map.instgAgtBrnchIdAdrTpPrtrySchmeNm);
this.setTreeNodeData(treeObj,"2.20.1.3.1", map.instgAgtBrnchIdDept);
this.setTreeNodeData(treeObj,"2.20.1.3.2", map.instgAgtBrnchIdSubDept);
this.setTreeNodeData(treeObj,"2.20.1.3.3", map.instgAgtBrnchIdStrtNm);
this.setTreeNodeData(treeObj,"2.20.1.3.4", map.instgAgtBrnchIdBldgNb);
this.setTreeNodeData(treeObj,"2.20.1.3.5", map.instgAgtBrnchIdBldgNm);
this.setTreeNodeData(treeObj,"2.20.1.3.6", map.instgAgtBrnchIdFlr);
this.setTreeNodeData(treeObj,"2.20.1.3.7", map.instgAgtBrnchIdPstBx);
this.setTreeNodeData(treeObj,"2.20.1.3.8", map.instgAgtBrnchIdRoom);
this.setTreeNodeData(treeObj,"2.20.1.3.9", map.instgAgtBrnchIdPstCd);
this.setTreeNodeData(treeObj,"2.20.1.3.10", map.instgAgtBrnchIdTwnNm);
this.setTreeNodeData(treeObj,"2.20.1.3.11", map.instgAgtBrnchIdTwnLctnNm);
this.setTreeNodeData(treeObj,"2.20.1.3.12", map.instgAgtBrnchIdDstrctNm);
this.setTreeNodeData(treeObj,"2.20.1.3.13", map.instgAgtBrnchIdCtrySubDvsn);
this.setTreeNodeData(treeObj,"2.20.1.3.14", map.instgAgtBrnchIdCtry);
this.setListFullArray(treeObj, "refInstgAgtBrnchIdAdrLine", "2.20.1.3.15", map.instgAgtBrnchIdAdrLine);
//this.setTreeNodeData(treeObj,"2.20.1.3.15", this.getListFullArray(map.instgAgtBrnchIdAdrLine));
//pacs004 Debtor/Agent
//由pacs008、pacs009 Instructed Agent字段填入 2.21.1.1
this.changeCheckNodes(treeObj, "2.21.1.0", "2.21.1.1", true);
this.setTreeNodeData(treeObj,"2.21.1.1.0.0", map.instdAgtBicfi);
this.setTreeNodeData(treeObj,"2.21.1.1.0.1.0.0", map.instdAgtClrSysIdCd);
this.setTreeNodeData(treeObj,"2.21.1.1.0.1.0.1", map.instdAgtClrSysIdPrtry);
this.changeCheckNodes(treeObj, "2.21.1.1.0.1.0.0", "2.21.1.1.0.1.0.1", map.instdAgtClrSysIdPrtry);
this.setTreeNodeData(treeObj,"2.21.1.1.0.1.1", map.instdAgtMmbId);
this.setTreeNodeData(treeObj,"2.21.1.1.0.2", map.instdAgtLei);
this.setTreeNodeData(treeObj,"2.21.1.1.0.3", map.instdAgtNm);
this.setTreeNodeData(treeObj,"2.21.1.1.0.4.0", map.instdAgtDept);
this.setTreeNodeData(treeObj,"2.21.1.1.0.4.1", map.instdAgtSubDept);
this.setTreeNodeData(treeObj,"2.21.1.1.0.4.2", map.instdAgtStrtNm);
this.setTreeNodeData(treeObj,"2.21.1.1.0.4.3", map.instdAgtBldgNb);
this.setTreeNodeData(treeObj,"2.21.1.1.0.4.4", map.instdAgtBldgNm);
this.setTreeNodeData(treeObj,"2.21.1.1.0.4.5", map.instdAgtFlr);
this.setTreeNodeData(treeObj,"2.21.1.1.0.4.6", map.instdAgtPstBx);
this.setTreeNodeData(treeObj,"2.21.1.1.0.4.7", map.instdAgtRoom);
this.setTreeNodeData(treeObj,"2.21.1.1.0.4.8", map.instdAgtPstCd);
this.setTreeNodeData(treeObj,"2.21.1.1.0.4.9", map.instdAgtTwnNm);
this.setTreeNodeData(treeObj,"2.21.1.1.0.4.10", map.instdAgtTwnLctnNm);
this.setTreeNodeData(treeObj,"2.21.1.1.0.4.11", map.instdAgtDstrctNm);
this.setTreeNodeData(treeObj,"2.21.1.1.0.4.12", map.instdAgtCtrySubDvsn);
this.setTreeNodeData(treeObj,"2.21.1.1.0.4.13", map.instdAgtCtry);
this.setListFullArray(treeObj, "refRtnChainDbtrAgtAdrLine", "2.21.1.1.0.4.14", map.instdAgtAdrLine);
//pacs004 Debtor Agent
//由pacs008、pacs009 Instructing Agent字段填入 2.21.3.0.0
this.setTreeNodeData(treeObj,"2.21.3.0.0", map.instgAgtBicfi);
this.setTreeNodeData(treeObj,"2.20.0.1.0.0", map.instgAgtClrSysIdCd);
this.setTreeNodeData(treeObj,"2.20.0.1.1", map.instgAgtMmbId);
this.setTreeNodeData(treeObj,"2.20.0.2", map.instgAgtLei);
this.setTreeNodeData(treeObj,"2.20.0.3", map.instgAgtNm);
this.setTreeNodeData(treeObj,"2.20.0.4.0", map.instgAgtDept);
this.setTreeNodeData(treeObj,"2.20.0.4.1", map.instgAgtSubDept);
this.setTreeNodeData(treeObj,"2.20.0.4.2", map.instgAgtStrtNm);
this.setTreeNodeData(treeObj,"2.20.0.4.3", map.instgAgtBldgNb);
this.setTreeNodeData(treeObj,"2.20.0.4.4", map.instgAgtBldgNm);
this.setTreeNodeData(treeObj,"2.20.0.4.5", map.instgAgtFlr);
this.setTreeNodeData(treeObj,"2.20.0.4.6", map.instgAgtPstBx);
this.setTreeNodeData(treeObj,"2.20.0.4.7", map.instgAgtRoom);
this.setTreeNodeData(treeObj,"2.20.0.4.8", map.instgAgtPstCd);
this.setTreeNodeData(treeObj,"2.20.0.4.9", map.instgAgtTwnNm);
this.setTreeNodeData(treeObj,"2.20.0.4.10", map.instgAgtTwnLctnNm);
this.setTreeNodeData(treeObj,"2.20.0.4.11", map.instgAgtDstrctNm);
this.setTreeNodeData(treeObj,"2.20.0.4.12", map.instgAgtCtrySubDvsn);
this.setTreeNodeData(treeObj,"2.20.0.4.13", map.instgAgtCtry);
this.setListFullArray(treeObj, "refInstgAgtAdrLine", "2.20.0.4.14", map.instgAgtAdrLine);
//this.setTreeNodeData(treeObj,"2.20.0.4.14", this.getListFullArray(map.instgAgtAdrLine));
this.setTreeNodeData(treeObj,"2.20.1.0", map.instgAgtBrnchIdId);
this.setTreeNodeData(treeObj,"2.20.1.1", map.instgAgtBrnchIdLei);
this.setTreeNodeData(treeObj,"2.20.1.2", map.instgAgtBrnchIdNm);
this.setTreeNodeData(treeObj,"2.20.1.3.0.0", map.instgAgtBrnchIdAdrTpCd);
//Choice节点(只有第二个子节点需要)同步,changeCheckNodes方法只检查任意一个status="M"的后代节点即可,
//其它没必要,因为报文在填入时比需要输入必输项
this.setTreeNodeData(treeObj,"2.20.1.3.0.1.0", map.instgAgtBrnchIdAdrTpPrtryId);
this.changeCheckNodes(treeObj, "2.20.1.3.0.0", "2.20.1.3.0.1", map.instgAgtBrnchIdAdrTpPrtryId);
this.setTreeNodeData(treeObj,"2.20.1.3.0.1.1", map.instgAgtBrnchIdAdrTpPrtryIssr);
this.setTreeNodeData(treeObj,"2.20.1.3.0.1.2", map.instgAgtBrnchIdAdrTpPrtrySchmeNm);
this.setTreeNodeData(treeObj,"2.20.1.3.1", map.instgAgtBrnchIdDept);
this.setTreeNodeData(treeObj,"2.20.1.3.2", map.instgAgtBrnchIdSubDept);
this.setTreeNodeData(treeObj,"2.20.1.3.3", map.instgAgtBrnchIdStrtNm);
this.setTreeNodeData(treeObj,"2.20.1.3.4", map.instgAgtBrnchIdBldgNb);
this.setTreeNodeData(treeObj,"2.20.1.3.5", map.instgAgtBrnchIdBldgNm);
this.setTreeNodeData(treeObj,"2.20.1.3.6", map.instgAgtBrnchIdFlr);
this.setTreeNodeData(treeObj,"2.20.1.3.7", map.instgAgtBrnchIdPstBx);
this.setTreeNodeData(treeObj,"2.20.1.3.8", map.instgAgtBrnchIdRoom);
this.setTreeNodeData(treeObj,"2.20.1.3.9", map.instgAgtBrnchIdPstCd);
this.setTreeNodeData(treeObj,"2.20.1.3.10", map.instgAgtBrnchIdTwnNm);
this.setTreeNodeData(treeObj,"2.20.1.3.11", map.instgAgtBrnchIdTwnLctnNm);
this.setTreeNodeData(treeObj,"2.20.1.3.12", map.instgAgtBrnchIdDstrctNm);
this.setTreeNodeData(treeObj,"2.20.1.3.13", map.instgAgtBrnchIdCtrySubDvsn);
this.setTreeNodeData(treeObj,"2.20.1.3.14", map.instgAgtBrnchIdCtry);
this.setListFullArray(treeObj, "refInstgAgtBrnchIdAdrLine", "2.20.1.3.15", map.instgAgtBrnchIdAdrLine);
//pacs004 Previous Instructing Agent 1 由pacs008、pacs009 Previous Instructing Agent 3填入
//根据
//规则1:Either BIC or (Name and Postal Address) must be present and both can be present. Other elements remain optional.规则,
//规则2:If “PostalAddress” is used, and if AddressLine is absent, then Country and Town name must be present.
//判断pacs008、pacs009 Previous Instructing Agent X 是否有值时,只需要判断BIC、Name 、 Postal Address是否为空即可。
let isPreviousInstructingAgent3Exist = map.prvsInstgAgt3Bicfi || map.prvsInstgAgt3Nm || map.prvsInstgAgt3AdrLine;
let isPreviousInstructingAgent2Exist = map.prvsInstgAgt2Bicfi || map.prvsInstgAgt2Nm || map.prvsInstgAgt2AdrLine;
let isPreviousInstructingAgent1Exist = map.prvsInstgAgt1Bicfi || map.prvsInstgAgt1Nm || map.prvsInstgAgt1AdrLine;
if(isPreviousInstructingAgent3Exist && isPreviousInstructingAgent2Exist && isPreviousInstructingAgent1Exist){
//若pacs008、pacs009 PreviousInstructingAgent1、2、3字段存在,填入pacs004 Intermediary Agent 3、2、1
//pacs004 Intermediary Agent 1
this.setTreeNodeData(treeObj,"2.21.7.0.0", map.prvsInstgAgt3Bicfi);
this.setTreeNodeData(treeObj,"2.21.7.0.1.0.0", map.prvsInstgAgt3ClrSysIdCd);
this.setTreeNodeData(treeObj,"2.21.7.0.1.1", map.prvsInstgAgt3MmbId);
this.setTreeNodeData(treeObj,"2.21.7.0.2", map.prvsInstgAgt3Lei);
this.setTreeNodeData(treeObj,"2.21.7.0.3", map.prvsInstgAgt3Nm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.0", map.prvsInstgAgt3Dept);
this.setTreeNodeData(treeObj,"2.21.7.0.4.1", map.prvsInstgAgt3SubDept);
this.setTreeNodeData(treeObj,"2.21.7.0.4.2", map.prvsInstgAgt3StrtNm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.3", map.prvsInstgAgt3BldgNb);
this.setTreeNodeData(treeObj,"2.21.7.0.4.4", map.prvsInstgAgt3BldgNm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.5", map.prvsInstgAgt3Flr);
this.setTreeNodeData(treeObj,"2.21.7.0.4.6", map.prvsInstgAgt3PstBx);
this.setTreeNodeData(treeObj,"2.21.7.0.4.7", map.prvsInstgAgt3Room);
this.setTreeNodeData(treeObj,"2.21.7.0.4.8", map.prvsInstgAgt3PstCd);
this.setTreeNodeData(treeObj,"2.21.7.0.4.9", map.prvsInstgAgt3TwnNm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.10", map.prvsInstgAgt3TwnLctnNm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.11", map.prvsInstgAgt3DstrctNm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.12", map.prvsInstgAgt3CtrySubDvsn);
this.setTreeNodeData(treeObj,"2.21.7.0.4.13", map.prvsInstgAgt3Ctry);
this.setListFullArray(treeObj, "refIntrmyAgt1AdrLine", "2.21.7.0.4.14", map.prvsInstgAgt3AdrLine);
//this.setTreeNodeData(treeObj,"2.21.7.0.4.14", this.getListFullArray(map.intrmyAgt3AdrLine));
//pacs004 Intermediary Agent 2
this.setTreeNodeData(treeObj,"2.21.8.0.0", map.prvsInstgAgt2Bicfi);
this.setTreeNodeData(treeObj,"2.21.8.0.1.0.0", map.prvsInstgAgt2ClrSysIdCd);
this.setTreeNodeData(treeObj,"2.21.8.0.1.1", map.prvsInstgAgt2MmbId);
this.setTreeNodeData(treeObj,"2.21.8.0.2", map.prvsInstgAgt2Lei);
this.setTreeNodeData(treeObj,"2.21.8.0.3", map.prvsInstgAgt2Nm);
this.setTreeNodeData(treeObj,"2.21.8.0.4.0", map.prvsInstgAgt2Dept);
this.setTreeNodeData(treeObj,"2.21.8.0.4.1", map.prvsInstgAgt2SubDept);
this.setTreeNodeData(treeObj,"2.21.8.0.4.2", map.prvsInstgAgt2StrtNm);
this.setTreeNodeData(treeObj,"2.21.8.0.4.3", map.prvsInstgAgt2BldgNb);
this.setTreeNodeData(treeObj,"2.21.8.0.4.4", map.prvsInstgAgt2BldgNm);
this.setTreeNodeData(treeObj,"2.21.8.0.4.5", map.prvsInstgAgt2Flr);
this.setTreeNodeData(treeObj,"2.21.8.0.4.6", map.prvsInstgAgt2PstBx);
this.setTreeNodeData(treeObj,"2.21.8.0.4.7", map.prvsInstgAgt2Room);
this.setTreeNodeData(treeObj,"2.21.8.0.4.8", map.prvsInstgAgt2PstCd);
this.setTreeNodeData(treeObj,"2.21.8.0.4.9", map.prvsInstgAgt2TwnNm);
this.setTreeNodeData(treeObj,"2.21.8.0.4.10", map.prvsInstgAgt2TwnLctnNm);
this.setTreeNodeData(treeObj,"2.21.8.0.4.11", map.prvsInstgAgt2DstrctNm);
this.setTreeNodeData(treeObj,"2.21.8.0.4.12", map.prvsInstgAgt2CtrySubDvsn);
this.setTreeNodeData(treeObj,"2.21.8.0.4.13", map.prvsInstgAgt2Ctry);
//pacs004 Intermediary Agent 3
this.setTreeNodeData(treeObj,"2.21.9.0.0", map.prvsInstgAgt1Bicfi);
this.setTreeNodeData(treeObj,"2.21.9.0.1.0.0", map.prvsInstgAgt1ClrSysIdCd);
this.setTreeNodeData(treeObj,"2.21.9.0.1.1", map.prvsInstgAgt1MmbId);
this.setTreeNodeData(treeObj,"2.21.9.0.2", map.prvsInstgAgt1Lei);
this.setTreeNodeData(treeObj,"2.21.9.0.3", map.prvsInstgAgt1Nm);
this.setTreeNodeData(treeObj,"2.21.9.0.4.0", map.prvsInstgAgt1Dept);
this.setTreeNodeData(treeObj,"2.21.9.0.4.1", map.prvsInstgAgt1SubDept);
this.setTreeNodeData(treeObj,"2.21.9.0.4.2", map.prvsInstgAgt1StrtNm);
this.setTreeNodeData(treeObj,"2.21.9.0.4.3", map.prvsInstgAgt1BldgNb);
this.setTreeNodeData(treeObj,"2.21.9.0.4.4", map.prvsInstgAgt1BldgNm);
this.setTreeNodeData(treeObj,"2.21.9.0.4.5", map.prvsInstgAgt1Flr);
this.setTreeNodeData(treeObj,"2.21.9.0.4.6", map.prvsInstgAgt1PstBx);
this.setTreeNodeData(treeObj,"2.21.9.0.4.7", map.prvsInstgAgt1Room);
this.setTreeNodeData(treeObj,"2.21.9.0.4.8", map.prvsInstgAgt1PstCd);
this.setTreeNodeData(treeObj,"2.21.9.0.4.9", map.prvsInstgAgt1TwnNm);
this.setTreeNodeData(treeObj,"2.21.9.0.4.10", map.prvsInstgAgt1TwnLctnNm);
this.setTreeNodeData(treeObj,"2.21.9.0.4.11", map.prvsInstgAgt1DstrctNm);
this.setTreeNodeData(treeObj,"2.21.9.0.4.12", map.prvsInstgAgt1CtrySubDvsn);
this.setTreeNodeData(treeObj,"2.21.9.0.4.13", map.prvsInstgAgt1Ctry);
}else if(isPreviousInstructingAgent2Exist && isPreviousInstructingAgent1Exist){
//若pacs008、pacs009 PreviousInstructingAgent1、2字段存在,填入pacs004 Intermediary Agent 2、1
//pacs004 Intermediary Agent 1
this.setTreeNodeData(treeObj,"2.21.7.0.0", map.prvsInstgAgt2Bicfi);
this.setTreeNodeData(treeObj,"2.21.7.0.1.0.0", map.prvsInstgAgt2ClrSysIdCd);
this.setTreeNodeData(treeObj,"2.21.7.0.1.1", map.prvsInstgAgt2MmbId);
this.setTreeNodeData(treeObj,"2.21.7.0.2", map.prvsInstgAgt2Lei);
this.setTreeNodeData(treeObj,"2.21.7.0.3", map.prvsInstgAgt2Nm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.0", map.prvsInstgAgt2Dept);
this.setTreeNodeData(treeObj,"2.21.7.0.4.1", map.prvsInstgAgt2SubDept);
this.setTreeNodeData(treeObj,"2.21.7.0.4.2", map.prvsInstgAgt2StrtNm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.3", map.prvsInstgAgt2BldgNb);
this.setTreeNodeData(treeObj,"2.21.7.0.4.4", map.prvsInstgAgt2BldgNm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.5", map.prvsInstgAgt2Flr);
this.setTreeNodeData(treeObj,"2.21.7.0.4.6", map.prvsInstgAgt2PstBx);
this.setTreeNodeData(treeObj,"2.21.7.0.4.7", map.prvsInstgAgt2Room);
this.setTreeNodeData(treeObj,"2.21.7.0.4.8", map.prvsInstgAgt2PstCd);
this.setTreeNodeData(treeObj,"2.21.7.0.4.9", map.prvsInstgAgt2TwnNm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.10", map.prvsInstgAgt2TwnLctnNm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.11", map.prvsInstgAgt2DstrctNm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.12", map.prvsInstgAgt2CtrySubDvsn);
this.setTreeNodeData(treeObj,"2.21.7.0.4.13", map.prvsInstgAgt2Ctry);
this.setListFullArray(treeObj, "refIntrmyAgt1AdrLine", "2.21.7.0.4.14", map.prvsInstgAgt2AdrLine);
//this.setTreeNodeData(treeObj,"2.21.7.0.4.14", this.getListFullArray(map.intrmyAgt3AdrLine));
//pacs004 Intermediary Agent 2
this.setTreeNodeData(treeObj,"2.21.8.0.0", map.prvsInstgAgt1Bicfi);
this.setTreeNodeData(treeObj,"2.21.8.0.1.0.0", map.prvsInstgAgt1ClrSysIdCd);
this.setTreeNodeData(treeObj,"2.21.8.0.1.1", map.prvsInstgAgt1MmbId);
this.setTreeNodeData(treeObj,"2.21.8.0.2", map.prvsInstgAgt1Lei);
this.setTreeNodeData(treeObj,"2.21.8.0.3", map.prvsInstgAgt1Nm);
this.setTreeNodeData(treeObj,"2.21.8.0.4.0", map.prvsInstgAgt1Dept);
this.setTreeNodeData(treeObj,"2.21.8.0.4.1", map.prvsInstgAgt1SubDept);
this.setTreeNodeData(treeObj,"2.21.8.0.4.2", map.prvsInstgAgt1StrtNm);
this.setTreeNodeData(treeObj,"2.21.8.0.4.3", map.prvsInstgAgt1BldgNb);
this.setTreeNodeData(treeObj,"2.21.8.0.4.4", map.prvsInstgAgt1BldgNm);
this.setTreeNodeData(treeObj,"2.21.8.0.4.5", map.prvsInstgAgt1Flr);
this.setTreeNodeData(treeObj,"2.21.8.0.4.6", map.prvsInstgAgt1PstBx);
this.setTreeNodeData(treeObj,"2.21.8.0.4.7", map.prvsInstgAgt1Room);
this.setTreeNodeData(treeObj,"2.21.8.0.4.8", map.prvsInstgAgt1PstCd);
this.setTreeNodeData(treeObj,"2.21.8.0.4.9", map.prvsInstgAgt1TwnNm);
this.setTreeNodeData(treeObj,"2.21.8.0.4.10", map.prvsInstgAgt1TwnLctnNm);
this.setTreeNodeData(treeObj,"2.21.8.0.4.11", map.prvsInstgAgt1DstrctNm);
this.setTreeNodeData(treeObj,"2.21.8.0.4.12", map.prvsInstgAgt1CtrySubDvsn);
this.setTreeNodeData(treeObj,"2.21.8.0.4.13", map.prvsInstgAgt1Ctry);
}else if(isPreviousInstructingAgent1Exist){
//若pacs008、pacs009 PreviousInstructingAgent1字段存在,填入pacs004 Intermediary Agent 1
//pacs004 Intermediary Agent 1
this.setTreeNodeData(treeObj,"2.21.7.0.0", map.prvsInstgAgt1Bicfi);
this.setTreeNodeData(treeObj,"2.21.7.0.1.0.0", map.prvsInstgAgt1ClrSysIdCd);
this.setTreeNodeData(treeObj,"2.21.7.0.1.1", map.prvsInstgAgt1MmbId);
this.setTreeNodeData(treeObj,"2.21.7.0.2", map.prvsInstgAgt1Lei);
this.setTreeNodeData(treeObj,"2.21.7.0.3", map.prvsInstgAgt1Nm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.0", map.prvsInstgAgt1Dept);
this.setTreeNodeData(treeObj,"2.21.7.0.4.1", map.prvsInstgAgt1SubDept);
this.setTreeNodeData(treeObj,"2.21.7.0.4.2", map.prvsInstgAgt1StrtNm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.3", map.prvsInstgAgt1BldgNb);
this.setTreeNodeData(treeObj,"2.21.7.0.4.4", map.prvsInstgAgt1BldgNm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.5", map.prvsInstgAgt1Flr);
this.setTreeNodeData(treeObj,"2.21.7.0.4.6", map.prvsInstgAgt1PstBx);
this.setTreeNodeData(treeObj,"2.21.7.0.4.7", map.prvsInstgAgt1Room);
this.setTreeNodeData(treeObj,"2.21.7.0.4.8", map.prvsInstgAgt1PstCd);
this.setTreeNodeData(treeObj,"2.21.7.0.4.9", map.prvsInstgAgt1TwnNm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.10", map.prvsInstgAgt1TwnLctnNm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.11", map.prvsInstgAgt1DstrctNm);
this.setTreeNodeData(treeObj,"2.21.7.0.4.12", map.prvsInstgAgt1CtrySubDvsn);
this.setTreeNodeData(treeObj,"2.21.7.0.4.13", map.prvsInstgAgt1Ctry);
this.setListFullArray(treeObj, "refIntrmyAgt1AdrLine", "2.21.7.0.4.14", map.prvsInstgAgt1AdrLine);
}
//pacs004 Creditor Agent 填入 pacs008、pacs009 Debtor Agent
this.setTreeNodeData(treeObj,"2.21.10.0.0", map.dbtrAgtBicfi);
this.setTreeNodeData(treeObj,"2.21.10.0.1.0.0", map.dbtrAgtClrSysIdCd);
this.setTreeNodeData(treeObj,"2.21.10.0.1.1", map.dbtrAgtMmbId);
this.setTreeNodeData(treeObj,"2.21.10.0.2", map.dbtrAgtLei);
this.setTreeNodeData(treeObj,"2.21.10.0.3", map.dbtrAgtNm);
this.setTreeNodeData(treeObj,"2.21.10.0.4.0", map.dbtrAgtDept);
this.setTreeNodeData(treeObj,"2.21.10.0.4.1", map.dbtrAgtSubDept);
this.setTreeNodeData(treeObj,"2.21.10.0.4.2", map.dbtrAgtStrtNm);
this.setTreeNodeData(treeObj,"2.21.10.0.4.3", map.dbtrAgtBldgNb);
this.setTreeNodeData(treeObj,"2.21.10.0.4.4", map.dbtrAgtBldgNm);
this.setTreeNodeData(treeObj,"2.21.10.0.4.5", map.dbtrAgtFlr);
this.setTreeNodeData(treeObj,"2.21.10.0.4.6", map.dbtrAgtPstBx);
this.setTreeNodeData(treeObj,"2.21.10.0.4.7", map.dbtrAgtRoom);
this.setTreeNodeData(treeObj,"2.21.10.0.4.8", map.dbtrAgtPstCd);
this.setTreeNodeData(treeObj,"2.21.10.0.4.9", map.dbtrAgtTwnNm);
this.setTreeNodeData(treeObj,"2.21.10.0.4.10", map.dbtrAgtTwnLctnNm);
this.setTreeNodeData(treeObj,"2.21.10.0.4.11", map.dbtrAgtDstrctNm);
this.setTreeNodeData(treeObj,"2.21.10.0.4.12", map.dbtrAgtCtrySubDvsn);
this.setTreeNodeData(treeObj,"2.21.10.0.4.13", map.dbtrAgtCtry);
this.setListFullArray(treeObj, "refCdtrAgtAdrLine", "2.21.10.0.4.14", map.dbtrAgtAdrLine);
//this.setTreeNodeData(treeObj,"2.21.10.0.4.14", this.getListFullArray(map.dbtrAgtAdrLine));
if(type.includes("pacs.008")){
//pacs004 Creditor/Party 由pacs008 Debtor字段填入
this.setTreeNodeData(treeObj,"2.21.11.0.0", map.dbtrNm);
this.setTreeNodeData(treeObj,"2.21.11.0.1.0", map.dbtrDept);
this.setTreeNodeData(treeObj,"2.21.11.0.1.1", map.dbtrSubDept);
this.setTreeNodeData(treeObj,"2.21.11.0.1.2", map.dbtrStrtNm);
this.setTreeNodeData(treeObj,"2.21.11.0.1.3", map.dbtrBldgNb);
this.setTreeNodeData(treeObj,"2.21.11.0.1.4", map.dbtrBldgNm);
this.setTreeNodeData(treeObj,"2.21.11.0.1.5", map.dbtrFlr);
this.setTreeNodeData(treeObj,"2.21.11.0.1.6", map.dbtrPstBx);
this.setTreeNodeData(treeObj,"2.21.11.0.1.7", map.dbtrRoom);
this.setTreeNodeData(treeObj,"2.21.11.0.1.8", map.dbtrPstCd);
this.setTreeNodeData(treeObj,"2.21.11.0.1.9", map.dbtrTwnNm);
this.setTreeNodeData(treeObj,"2.21.11.0.1.10", map.dbtrTwnLctnNm);
this.setTreeNodeData(treeObj,"2.21.11.0.1.11", map.dbtrDstrctNm);
this.setTreeNodeData(treeObj,"2.21.11.0.1.12", map.dbtrCtrySubDvsn);
this.setTreeNodeData(treeObj,"2.21.11.0.1.13", map.dbtrCtry);
this.setListFullArray(treeObj, "refCdtrPtyAdrLine", "2.21.11.0.1.14", map.dbtrAdrLine);
this.setTreeNodeData(treeObj,"2.21.11.0.2.0.0", map.dbtrAnyBIC);
this.setTreeNodeData(treeObj,"2.21.11.0.2.0.1", map.dbtrLei);
//Other array待解决
this.setTreeNodeData(treeObj,"2.21.11.0.2.0.2.0", map.dbtrOrgIdId);
this.setTreeNodeData(treeObj,"2.21.11.0.2.0.2.1.0", map.dbtrOrgIdSchmeNmCd);
this.setTreeNodeData(treeObj,"2.21.11.0.2.0.2.1.1", map.dbtrOrgIdSchmeNmPrtry);
this.changeCheckNodes(treeObj,"2.21.11.0.2.0.2.1.0","2.21.11.0.2.0.2.1.1",map.dbtrOrgIdSchmeNmPrtry);
this.setTreeNodeData(treeObj,"2.21.11.0.2.0.2.2", map.dbtrOrgIdIssr);
/** */
this.setTreeNodeData(treeObj,"2.21.11.0.2.1.0.0", this.transferDateStringToWebDate(map.dbtrBirthDt, "YYYY-MM-DD"));
this.changeCheckNodes(treeObj,"2.21.11.0.2.0","2.21.11.0.2.1",map.dbtrBirthDt);
this.setTreeNodeData(treeObj,"2.21.11.0.2.1.0.1", map.dbtrPrvcOfBirth);
this.setTreeNodeData(treeObj,"2.21.11.0.2.1.0.2", map.dbtrCityOfBirth);
this.setTreeNodeData(treeObj,"2.21.11.0.2.1.0.3", map.dbtrCtryOfBirth);
//Other array待解决
this.setTreeNodeData(treeObj,"2.21.11.0.2.1.1.0", map.dbtrPrvtIdId);
this.setTreeNodeData(treeObj,"2.21.11.0.2.1.1.1.0", map.dbtrPrvtIdSchmeNmCd);
this.setTreeNodeData(treeObj,"2.21.11.0.2.1.1.1.1", map.dbtrPrvtIdSchmeNmPrtry);
this.changeCheckNodes(treeObj,"2.21.11.0.2.1.1.1.0","2.21.11.0.2.1.1.1.1", map.dbtrPrvtIdSchmeNmPrtry);
this.setTreeNodeData(treeObj,"2.21.11.0.2.1.1.2", map.dbtrPrvtIdIssr);
/** */
this.setTreeNodeData(treeObj,"2.21.11.0.3", map.dbtrCtryOfRes);
}else if(type.includes("pacs.009")){
//pacs004 Creditor/Agent 由pacs009 Debtor字段
this.changeCheckNodes(treeObj, "2.21.11.0", "2.21.11.1", true);
this.setTreeNodeData(treeObj,"2.21.11.1.0.0", map.dbtrBicfi);
this.setTreeNodeData(treeObj,"2.21.11.1.0.1.0.0", map.dbtrClrSysIdCd);
this.setTreeNodeData(treeObj,"2.21.11.1.0.1.1", map.dbtrMmbId);
this.setTreeNodeData(treeObj,"2.21.11.1.0.2", map.dbtrLei);
this.setTreeNodeData(treeObj,"2.21.11.1.0.3", map.dbtrNm);
this.setTreeNodeData(treeObj,"2.21.11.1.0.4.0", map.dbtrDept);
this.setTreeNodeData(treeObj,"2.21.11.1.0.4.1", map.dbtrSubDept);
this.setTreeNodeData(treeObj,"2.21.11.1.0.4.2", map.dbtrStrtNm);
this.setTreeNodeData(treeObj,"2.21.11.1.0.4.3", map.dbtrBldgNb);
this.setTreeNodeData(treeObj,"2.21.11.1.0.4.4", map.dbtrBldgNm);
this.setTreeNodeData(treeObj,"2.21.11.1.0.4.5", map.dbtrFlr);
this.setTreeNodeData(treeObj,"2.21.11.1.0.4.6", map.dbtrPstBx);
this.setTreeNodeData(treeObj,"2.21.11.1.0.4.7", map.dbtrRoom);
this.setTreeNodeData(treeObj,"2.21.11.1.0.4.8", map.dbtrPstCd);
this.setTreeNodeData(treeObj,"2.21.11.1.0.4.9", map.dbtrTwnNm);
this.setTreeNodeData(treeObj,"2.21.11.1.0.4.10", map.dbtrTwnLctnNm);
this.setTreeNodeData(treeObj,"2.21.11.1.0.4.11", map.dbtrDstrctNm);
this.setTreeNodeData(treeObj,"2.21.11.1.0.4.12", map.dbtrCtrySubDvsn);
this.setTreeNodeData(treeObj,"2.21.11.1.0.4.13", map.dbtrCtry);
this.setListFullArray(treeObj, "refRtnChainCdtrAgtAdrLine", "2.21.11.1.0.4.14", map.dbtrAdrLine);
}
},
/**
* 填充Camt056元素
* @param {整棵树对象} treeObj
* @param {填充数据} map
* @param {报文类型} type
*/
fullFillCamt056Elements(treeObj,map,type){
this.setTreeNodeData(treeObj,"1.1.0.0.0", map.instgAgtBicfi);
this.setTreeNodeData(treeObj,"1.2.0.0.0", map.instdAgtBicfi);
},
},
mounted() {
this.buildMsgStruct();
},
created() {
window.sessionStorage.clear();
},
};
</script>
<style scoped>
.page_title {
text-align: center;
}
.node_nonleaf {
color: #169bff;
border-bottom: 1px dotted #169bff;
}
.msg_title input {
vertical-align: top;
margin-right: 0px;
}
.el-form-item {
margin-bottom: 0px;
}
:deep(.el-form-item__content) {
padding-left: 23px;
}
:deep(.el-tree-node__content) {
height: auto;
}
.el-button + .el-button {
margin-left: 0px;
}
.el-button--mini.is-circle {
padding: 1px;
}
.tree_node {
flex: 1;
display: flex;
align-items: center;
font-size: 14px;
}
.iso_tools {
position: fixed;
top: 150px;
right: 10px;
z-index: 9;
}
.left {
width: 90%;
height: 100%;
background: #ffffff;
float: left;
}
.right {
float: left;
width: 50%;
height: 100%;
background: #fff;
}
.title1 {
background: red;
text-align: center;
}
.title2 {
background: green;
text-align: center;
}
.textleft {
width: 100%;
height: 600px;
}
.textright {
width: 100%;
height: 600px;
}
/*/deep/ .el-form-item.is-error .el-input__inner {
background-color: red;
}
/deep/ .el-form-item.is-error .el-input__count-inner {
background-color: red;
}*/
</style>
\ No newline at end of file
.el-input[data-v-847ac5b6] input,.el-select[data-v-847ac5b6] input{background-color:#fff;background-image:none;border-radius:4px;border:1px solid #dcdfe6;box-sizing:border-box;color:#606266;display:inline-block;height:30px;line-height:30px;outline:0;padding:0 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:300px}.el-form-item[data-v-847ac5b6]{font-size:14px;color:#606266;line-height:40px;padding:0 12px 0 0;box-sizing:border-box;margin-bottom:5px}.inputDeep[data-v-0826e2f4] .el-input__inner{background-color:#fff}.el_table[data-v-151331da]{border:1px solid #ebebeb}.tipCls[data-v-151331da]{color:#f56c6c;font-size:12px;margin-left:5px;float:left}[data-v-151331da] .isError .el-input__inner{border-color:#f56c6c}.tip[data-v-81e69ab8]{color:red}.page_title[data-v-18d12c12]{text-align:center}.node_nonleaf[data-v-18d12c12]{color:#169bff;border-bottom:1px dotted #169bff}.msg_title input[data-v-18d12c12]{vertical-align:top;margin-right:0}.el-form-item[data-v-18d12c12]{margin-bottom:0}[data-v-18d12c12] .el-form-item__content{padding-left:23px}[data-v-18d12c12] .el-tree-node__content{height:auto}.el-button+.el-button[data-v-18d12c12]{margin-left:0}.el-button--mini.is-circle[data-v-18d12c12]{padding:1px}.tree_node[data-v-18d12c12]{flex:1;display:flex;align-items:center;font-size:14px}.iso_tools[data-v-18d12c12]{position:fixed;top:150px;right:10px;z-index:9}.left[data-v-18d12c12],.right[data-v-18d12c12]{width:50%;height:100%;background:#fff;float:left}.title1[data-v-18d12c12]{background:red;text-align:center}.title2[data-v-18d12c12]{background:green;text-align:center}.textleft[data-v-18d12c12],.textright[data-v-18d12c12]{width:100%;height:600px}a[data-v-8aebcede]{text-decoration:none}.box[data-v-91a4afba]{width:100%;height:100%;margin:1% 0;overflow:hidden;box-shadow:-1px 9px 10px 3px rgba(0,0,0,.11)}.left[data-v-91a4afba],.mid[data-v-91a4afba]{width:50%;height:100%;background:#fff;float:left}.title1[data-v-91a4afba]{background:red;text-align:center}.title2[data-v-91a4afba]{background:green;text-align:center}.textleft[data-v-91a4afba],.textright[data-v-91a4afba]{width:100%;height:600px}.box[data-v-6b5c7b01]{width:100%;height:100%;margin:1% 0;overflow:hidden;box-shadow:-1px 9px 10px 3px rgba(0,0,0,.11)}.left[data-v-6b5c7b01],.mid[data-v-6b5c7b01]{width:50%;height:100%;background:#fff;float:left}.title1[data-v-6b5c7b01]{background:red;text-align:center}.title2[data-v-6b5c7b01]{background:green;text-align:center}.textleft[data-v-6b5c7b01],.textright[data-v-6b5c7b01]{width:100%;height:600px}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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