Commit 5ec74000 by 潘际乾

弹出框回填的提取

parent ce8c64da
<template>
<el-dialog :title="title" :visible.sync="show"
<el-dialog :title="promptData.title" :visible.sync="show"
custom-class="grid-ety"
:highlight-current-row="true"
width="60%"
......@@ -27,7 +27,20 @@
<script>
export default {
props: ["title", "columnStr", "data", "type", "rulePath"],
props: {
promptData: {
required: true,
type: Object,
default: () => {
return {
title: '',
columnStr: '',
data: [],
rulePath: ''
}
}
}
},
data() {
return {
show: false,
......@@ -38,36 +51,26 @@ export default {
},
computed: {
tableColumn() {
if (this.type === "extkey") {
return this.dealExtKeyTableColumn()
} else if (this.type === "bankno") {
return this.dealBanknoTableColumn()
}
return []
return this.dealExtKeyTableColumn()
},
tableData() {
if (this.type === "extkey") {
return this.dealExtKeyTableData()
} else if (this.type === "bankno") {
return this.dealBanknoTableData()
}
return []
return this.dealExtKeyTableData()
}
},
methods: {
dealExtKeyTableColumn() {
const columnArr = []
const lines = this.columnStr.split("\r\n")
// 1 7:1 QuoteBranch codeQuote 150 50\r\n
const etyReg = /Quote(\w*\s?\w*)Quote/
const lines = this.promptData.columnStr.split("\r\n")
const etyReg = /\"([^\"]*)\"/
const obj = {}
for (let i = 0; i < lines.length; i++) {
const line = lines[i];
let line = lines[i];
line = line.replace(/Quote/g, "\"");
if (etyReg.test(line)) {
const gs = line.match(etyReg)
const columnName = gs[1]
const newLine = line.replace(gs[0], "_")
const colPropArr = newLine.split(" ")
const newLine = line.replace(gs[0], " _ ")
const colPropArr = newLine.split(/\s+/)
const positionArr = colPropArr[1].split(":")
if (!obj[positionArr[0]]) {
obj[positionArr[0]] = []
......@@ -99,8 +102,8 @@ export default {
},
dealExtKeyTableData() {
const arr = []
for (let i = 0; i < this.data.length; i++) {
const d = this.data[i];
for (let i = 0; i < this.promptData.data.length; i++) {
const d = this.promptData.data[i];
const items = d.split("\t")
const it = {}
for (let j = 0; j < this.tableColumn.length; j++) {
......@@ -112,57 +115,13 @@ export default {
}
return arr
},
dealBanknoTableColumn() {
const columnArr = []
const lines = this.columnStr.split("\r\n")
// 0 1 \"联行行号\"120\r\n
const etyReg = /\"([^\"]*)\"/
for (let i = 0; i < lines.length; i++) {
const line = lines[i];
if (etyReg.test(line)) {
const gs = line.match(etyReg)
const columnName = gs[1]
const newLine = line.replace(gs[0], "_ ")
const colPropArr = newLine.split(" ")
columnArr.push({
idx: colPropArr[0],
prop: columnName,
label: columnName,
// width: colPropArr[3],
width: "auto",
})
}
}
return columnArr
},
dealBanknoTableData() {
const arr = []
for (let i = 0; i < this.data.length; i++) {
const d = this.data[i];
const items = d.split("\t")
const it = {}
for (let j = 0; j < this.tableColumn.length; j++) {
const column = this.tableColumn[j];
it[column['prop']] = items[column['idx']]
}
it['IDX'] = i
arr.push(it)
}
return arr
},
currentChange(currentPage) {
this.currentPage = currentPage;
},
selectEty(row, column, event) {
// const str = this.data[row.IDX]
// let v = "";
// if (this.type === 'extkey') {
// v = str.split("\t")[4].trim()
// } else if (this.type === 'bankno') {
// v = str.split("\t")[0].trim()
// }
// 默认第一列
const v = row[this.tableColumn[0].prop].split("\n")[0]
this.$emit("select-ety", v, this.rulePath)
this.$emit("select-ety", v, this.promptData.rulePath)
this.show = false;
this.currentPage = 1;
},
......
......@@ -7,7 +7,14 @@ export default {
mixins: [commonApi,commonDeclare],
data: function () {
return {
defFlag:true
defFlag:true,
// 弹框回填
promptData: {
title: '',
columnStr: '',
data: [],
rulePath: ''
}
}
},
created() {
......@@ -95,6 +102,34 @@ export default {
*/
updateModel(data) {
Utils.copyValueFromVO(this.model, data);
},
showGridPromptDialog(rulePath) {
this.executeRule(rulePath).then((res) => {
if (res.respCode = SUCCESS){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.promptData = {
title: res.data.title,
columnStr: res.data.columns,
data: res.data.vals.rows,
rulePath: rulePath,
}
}
}
})
},
selectEty(val, rulePath) {
const props = rulePath.replaceAll(".", "_")
const obj = {}
obj[props] = val;
Utils.copyValueFromVO(this.model, obj);
this.executeRule(rulePath).then((res) => {
if (res.respCode = SUCCESS){
Utils.copyValueFromVO(this.model, res.data);
}
});
}
},
computed:{
......
......@@ -348,7 +348,7 @@
v-model="model.cptp.payeecountcode"
maxlength="3"
placeholder="请输入收款人常驻国家/地区代码"
@keyup.enter.native="payeecountcodeEvent"
@keyup.enter.native="showGridPromptDialog('cptp.payeecountcode')"
></c-input>
</el-form-item>
</el-col>
......@@ -627,7 +627,7 @@
v-model="model.cptp.pyebchkey"
maxlength="14"
placeholder="请输入收款人"
@keyup.enter.native="pyebchkeyEvent"
@keyup.enter.native="showGridPromptDialog('cptp.pyebchkey')"
></c-input>
</el-form-item>
</el-col>
......@@ -2021,16 +2021,7 @@
</el-form-item>
</el-col> -->
<c-grid-ety-prompt-dialog
ref="etyDialog"
:title="gridPromptDialog.title"
:columnStr="gridPromptDialog.columnStr"
:data="gridPromptDialog.data"
:type="gridPromptDialog.type"
:rulePath="gridPromptDialog.rulePath"
v-on:select-ety="selectEty"
>
</c-grid-ety-prompt-dialog>
<c-grid-ety-prompt-dialog ref="etyDialog" :promptData="promptData" v-on:select-ety="selectEty"></c-grid-ety-prompt-dialog>
</div>
</template>
<script>
......@@ -2053,66 +2044,15 @@ export default {
{ value: "2", label: "资本" },
{ value: "3", label: "其他" },
],
liqtypOptions: [
{ value: "B", label: "人行支付系统" },
{ value: "C", label: "代理行模式" },
{ value: "O", label: "Other" },
{ value: "S", label: "CIPS系统" },
],
gridPromptDialog: {
title: "",
columnStr: "",
data: [],
type: "",
rulePath: "",
},
]
};
},
methods: {
payeecountcodeEvent() {
this.executeRule("cptp.payeecountcode").then((res) => {
if ((res.respCode = "AAAAAA")) {
if (res.data.params) {
this.updateModel(res.data);
} else {
this.$refs.etyDialog.show = true;
this.gridPromptDialog.title = res.data.title;
this.gridPromptDialog.columnStr = res.data.columns;
this.gridPromptDialog.data = res.data.vals.rows;
this.gridPromptDialog.type = "extkey";
this.gridPromptDialog.rulePath = "cptp.payeecountcode";
}
}
});
},
pyebchkeyEvent() {
this.executeRule("cptp.pyebchkey").then((res) => {
if ((res.respCode = "AAAAAA")) {
if (res.data.params) {
this.updateModel(res.data);
} else {
this.$refs.etyDialog.show = true;
this.gridPromptDialog.title = res.data.title;
this.gridPromptDialog.columnStr = res.data.columns;
this.gridPromptDialog.data = res.data.vals.rows;
this.gridPromptDialog.type = "extkey";
this.gridPromptDialog.rulePath = "cptp.pyebchkey";
}
}
});
},
selectEty(val, rulePath) {
const props = rulePath.replaceAll(".", "_");
const obj = {};
obj[props] = val;
Utils.copyValueFromVO(this.model, obj);
this.executeRule(rulePath).then((res) => {
if ((res.respCode = "AAAAAA")) {
Utils.copyValueFromVO(this.model, res.data);
}
});
},
onCptpGetmod() {},
...Event,
},
......
......@@ -19,7 +19,7 @@
v-model="model.didgrp.adv.pts.extkey"
maxlength="16"
placeholder="请输入External Key of Address"
@keyup.enter.native="advPtsExtkeyEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.adv.pts.extkey')"
disabled
></c-input>
</el-form-item>
......@@ -28,7 +28,7 @@
v-model="model.didgrp.adv.pts.bankno"
maxlength="20"
placeholder="请输入Number of bank"
@keyup.enter.native="advPtsBanknoEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.adv.pts.bankno')"
disabled
></c-input>
</el-form-item>
......@@ -81,7 +81,7 @@
v-model="model.didgrp.iss.pts.extkey"
maxlength="16"
placeholder="请输入External Key of Address"
@keyup.enter.native="issPtsExtkeyEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.iss.pts.extkey')"
></c-input>
</el-form-item>
<el-form-item label="开证行联行行号" prop="didgrp.iss.pts.bankno">
......@@ -173,7 +173,7 @@
v-model="model.didgrp.avb.pts.bankno"
maxlength="20"
placeholder="请输入Number of bank"
@keyup.enter.native="avbPtsBanknoEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.avb.pts.bankno')"
></c-input>
</el-form-item>
......@@ -223,7 +223,7 @@
v-model="model.didgrp.rmb.pts.bankno"
maxlength="20"
placeholder="请输入Number of bank"
@keyup.enter.native="rmbPtsBanknoEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.rmb.pts.bankno')"
></c-input>
</el-form-item>
......@@ -273,7 +273,7 @@
v-model="model.didgrp.cmb.pts.bankno"
maxlength="20"
placeholder="请输入Number of bank"
@keyup.enter.native="cmbPtsBanknoEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.cmb.pts.bankno')"
></c-input>
</el-form-item>
<el-form-item label="转让行名称" prop="didgrp.cmb.pts.jigomc">
......@@ -303,7 +303,7 @@
v-model="model.didgrp.apc.pts.bankno"
maxlength="20"
placeholder="请输入Number of bank"
@keyup.enter.native="apcPtsBanknoEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.apc.pts.bankno')"
></c-input>
</el-form-item>
<el-form-item label="申请行名称" prop="didgrp.apc.pts.jigomc">
......@@ -345,199 +345,24 @@
</el-col>
<c-grid-ety-prompt-dialog ref="etyDialog"
:title="gridPromptDialog.title"
:columnStr="gridPromptDialog.columnStr"
:data="gridPromptDialog.data"
:type="gridPromptDialog.type"
:rulePath="gridPromptDialog.rulePath"
v-on:select-ety="selectEty"
>
</c-grid-ety-prompt-dialog>
<c-grid-ety-prompt-dialog ref="etyDialog" :promptData="promptData" v-on:select-ety="selectEty"></c-grid-ety-prompt-dialog>
</div>
</template>
<script>
import Api from "~/service/Api";
import CommonProcess from "~/mixin/CommonProcess";
import Event from "~/model/Ditopn/Event";
import Utils from "~/utils";
export default {
inject: ['root'],
props: ["model", "codes"],
mixins: [CommonProcess],
data() {
return {
gridPromptDialog: {
title: '',
columnStr: '',
data: [],
type: '',
rulePath: ''
}
};
},
methods: {
/**
* 通知行 extkey
*/
advPtsExtkeyEvent() {
Api.post("ditopn/executeRule/didgrp.adv.pts.extkey", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'extkey'
this.gridPromptDialog.rulePath = 'didgrp.adv.pts.extkey'
}
}
}
);
},
/**
* 通知行
*/
advPtsBanknoEvent() {
Api.post("ditopn/executeRule/didgrp.adv.pts.bankno", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'bankno'
this.gridPromptDialog.rulePath = 'didgrp.adv.pts.bankno'
}
}
}
);
},
/**
* 开证行 extkey
*/
issPtsExtkeyEvent() {
Api.post("ditopn/executeRule/didgrp.iss.pts.extkey", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'extkey'
this.gridPromptDialog.rulePath = 'didgrp.iss.pts.extkey'
}
}
}
);
},
/**
* 议付行
*/
avbPtsBanknoEvent() {
Api.post("ditopn/executeRule/didgrp.avb.pts.bankno", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'bankno'
this.gridPromptDialog.rulePath = 'didgrp.avb.pts.bankno'
}
}
}
);
},
/**
* 保兑行
*/
rmbPtsBanknoEvent() {
Api.post("ditopn/executeRule/didgrp.rmb.pts.bankno", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'bankno'
this.gridPromptDialog.rulePath = 'didgrp.rmb.pts.bankno'
}
}
}
);
},
/**
* 转让行
*/
cmbPtsBanknoEvent() {
Api.post("ditopn/executeRule/didgrp.cmb.pts.bankno", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'bankno'
this.gridPromptDialog.rulePath = 'didgrp.cmb.pts.bankno'
}
}
}
);
},
/**
* 申请行
*/
apcPtsBanknoEvent() {
Api.post("ditopn/executeRule/didgrp.apc.pts.bankno", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'bankno'
this.gridPromptDialog.rulePath = 'didgrp.apc.pts.bankno'
}
}
}
}
);
},
selectEty(val, rulePath) {
const props = rulePath.replaceAll(".", "_")
const obj = {}
obj[props] = val;
Utils.copyValueFromVO(this.model, obj);
Api.post(`ditopn/executeRule/${rulePath}`, Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
Utils.copyValueFromVO(this.model, res.data);
}
}
);
},
...Event
},
created: function () {}
......
......@@ -397,7 +397,7 @@
v-model="model.didgrp.apl.pts.extkey"
maxlength="16"
placeholder="请输入External Key of Address"
@keyup.enter.native="aplExtkeyEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.apl.pts.extkey')"
disabled
></c-input>
</el-form-item>
......@@ -503,7 +503,7 @@
v-model="model.didgrp.apb.pts.bankno"
maxlength="20"
placeholder="请输入Number of bank"
@keyup.enter.native="apbPtsBanknoEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.apb.pts.bankno')"
></c-input>
</el-form-item>
</el-col>
......@@ -544,7 +544,7 @@
v-model="model.didgrp.ben.pts.extkey"
maxlength="16"
placeholder="请输入External Key of Address"
@keyup.enter.native="benExtkeyEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.ben.pts.extkey')"
></c-input>
</el-form-item>
</el-col>
......@@ -675,7 +675,7 @@
v-model="model.didgrp.beb.pts.bankno"
maxlength="20"
placeholder="请输入Number of bank"
@keyup.enter.native="banknoEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.beb.pts.bankno')"
></c-input>
</el-form-item>
</el-col>
......@@ -693,26 +693,19 @@
</el-form-item>
</el-col>
</el-col>
<c-grid-ety-prompt-dialog ref="etyDialog"
:title="gridPromptDialog.title"
:columnStr="gridPromptDialog.columnStr"
:data="gridPromptDialog.data"
:type="gridPromptDialog.type"
:rulePath="gridPromptDialog.rulePath"
v-on:select-ety="selectEty"
>
</c-grid-ety-prompt-dialog>
<c-grid-ety-prompt-dialog ref="etyDialog" :promptData="promptData" v-on:select-ety="selectEty"></c-grid-ety-prompt-dialog>
</el-row>
</template>
<script>
import Api from "~/service/Api";
import CommonProcess from "~/mixin/CommonProcess";
import Event from "~/model/Ditopn/Event";
import Utils from "~/utils";
export default {
inject: ['root'],
props: ["model", "codes"],
// mixins: [CommonProcess],
mixins: [CommonProcess],
data() {
return {
declareParams: {
......@@ -726,97 +719,11 @@ export default {
uri: "/ditopn/getElcsRef",
},
jigomcFlag:false,
trade: "",
gridPromptDialog: {
title: '',
columnStr: '',
data: [],
type: '',
rulePath: ''
}
trade: ""
};
},
methods: {
...Event,
aplExtkeyEvent() {
Api.post("ditopn/executeRule/didgrp.apl.pts.extkey", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
//失去焦点,避免多次触发
document.getElementById('extkey').blur();
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'extkey'
this.gridPromptDialog.rulePath = 'didgrp.apl.pts.extkey'
}
}
}
);
},
benExtkeyEvent() {
Api.post("ditopn/executeRule/didgrp.ben.pts.extkey", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'extkey'
this.gridPromptDialog.rulePath = 'didgrp.ben.pts.extkey'
}
}
}
);
},
apbPtsBanknoEvent() {
Api.post("ditopn/executeRule/didgrp.apb.pts.bankno", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'bankno'
this.gridPromptDialog.rulePath = 'didgrp.apb.pts.bankno'
}
}
}
)
},
banknoEvent() {
// const data = Utils.flatObject(this.model);
// var temp = this.model.didgrp.beb.pts.bankno;
// if (temp.length < 6){
// return;
// }
Api.post("ditopn/executeRule/didgrp.beb.pts.bankno", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'bankno'
this.gridPromptDialog.rulePath = 'didgrp.beb.pts.bankno'
}
}
}
)
},
mytypeChange(){
if (this.model.didgrp.rec.mytype == "F"){
this.model.didgrp.rec.tratyp = "";
......@@ -836,19 +743,6 @@ export default {
}
}
);
},
selectEty(val, rulePath) {
const props = rulePath.replaceAll(".", "_")
const obj = {}
obj[props] = val;
Utils.copyValueFromVO(this.model, obj);
Api.post(`ditopn/executeRule/${rulePath}`, Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
Utils.copyValueFromVO(this.model, res.data);
}
}
);
}
},
created: function () {},
......
......@@ -19,7 +19,7 @@
v-model="model.didgrp.adv.pts.extkey"
maxlength="16"
placeholder="请输入External Key of Address"
@keyup.enter.native="advPtsExtkeyEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.adv.pts.extkey')"
></c-input>
</el-form-item>
<el-form-item label="通知行联行行号" prop="didgrp.adv.pts.bankno">
......@@ -27,7 +27,7 @@
v-model="model.didgrp.adv.pts.bankno"
maxlength="20"
placeholder="请输入Number of bank"
@keyup.enter.native="advPtsBanknoEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.adv.pts.bankno')"
></c-input>
</el-form-item>
......@@ -79,7 +79,7 @@
v-model="model.didgrp.iss.pts.extkey"
maxlength="16"
placeholder="请输入External Key of Address"
@keyup.enter.native="issPtsExtkeyEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.iss.pts.extkey')"
></c-input>
</el-form-item>
<el-form-item label="开证行联行行号" prop="didgrp.iss.pts.bankno">
......@@ -171,7 +171,7 @@
v-model="model.didgrp.avb.pts.bankno"
maxlength="20"
placeholder="请输入Number of bank"
@keyup.enter.native="avbPtsBanknoEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.avb.pts.bankno')"
></c-input>
</el-form-item>
......@@ -221,7 +221,7 @@
v-model="model.didgrp.rmb.pts.bankno"
maxlength="20"
placeholder="请输入Number of bank"
@keyup.enter.native="rmbPtsBanknoEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.rmb.pts.bankno')"
></c-input>
</el-form-item>
......@@ -271,7 +271,7 @@
v-model="model.didgrp.cmb.pts.bankno"
maxlength="20"
placeholder="请输入Number of bank"
@keyup.enter.native="cmbPtsBanknoEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.cmb.pts.bankno')"
></c-input>
</el-form-item>
<el-form-item label="转让行名称" prop="didgrp.cmb.pts.jigomc">
......@@ -301,7 +301,7 @@
v-model="model.didgrp.apc.pts.bankno"
maxlength="20"
placeholder="请输入Number of bank"
@keyup.enter.native="apcPtsBanknoEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.apc.pts.bankno')"
></c-input>
</el-form-item>
<el-form-item label="申请行名称" prop="didgrp.apc.pts.jigomc">
......@@ -343,199 +343,24 @@
</el-col>
<c-grid-ety-prompt-dialog ref="etyDialog"
:title="gridPromptDialog.title"
:columnStr="gridPromptDialog.columnStr"
:data="gridPromptDialog.data"
:type="gridPromptDialog.type"
:rulePath="gridPromptDialog.rulePath"
v-on:select-ety="selectEty"
>
</c-grid-ety-prompt-dialog>
<c-grid-ety-prompt-dialog ref="etyDialog" :promptData="promptData" v-on:select-ety="selectEty"></c-grid-ety-prompt-dialog>
</div>
</template>
<script>
import Api from "~/service/Api";
import CommonProcess from "~/mixin/CommonProcess";
import Event from "~/model/Ditopn/Event";
import Utils from "~/utils";
export default {
inject: ['root'],
props: ["model", "codes"],
mixins: [CommonProcess],
data() {
return {
gridPromptDialog: {
title: '',
columnStr: '',
data: [],
type: '',
rulePath: ''
}
};
},
methods: {
/**
* 通知行 extkey
*/
advPtsExtkeyEvent() {
Api.post("ditopn/executeRule/didgrp.adv.pts.extkey", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'extkey'
this.gridPromptDialog.rulePath = 'didgrp.adv.pts.extkey'
}
}
}
);
},
/**
* 通知行
*/
advPtsBanknoEvent() {
Api.post("ditopn/executeRule/didgrp.adv.pts.bankno", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'bankno'
this.gridPromptDialog.rulePath = 'didgrp.adv.pts.bankno'
}
}
}
);
},
/**
* 开证行 extkey
*/
issPtsExtkeyEvent() {
Api.post("ditopn/executeRule/didgrp.iss.pts.extkey", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'extkey'
this.gridPromptDialog.rulePath = 'didgrp.iss.pts.extkey'
}
}
}
);
},
/**
* 议付行
*/
avbPtsBanknoEvent() {
Api.post("ditopn/executeRule/didgrp.avb.pts.bankno", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'bankno'
this.gridPromptDialog.rulePath = 'didgrp.avb.pts.bankno'
}
}
}
);
},
/**
* 保兑行
*/
rmbPtsBanknoEvent() {
Api.post("ditopn/executeRule/didgrp.rmb.pts.bankno", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'bankno'
this.gridPromptDialog.rulePath = 'didgrp.rmb.pts.bankno'
}
}
}
);
},
/**
* 转让行
*/
cmbPtsBanknoEvent() {
Api.post("ditopn/executeRule/didgrp.cmb.pts.bankno", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'bankno'
this.gridPromptDialog.rulePath = 'didgrp.cmb.pts.bankno'
}
}
}
);
},
/**
* 申请行
*/
apcPtsBanknoEvent() {
Api.post("ditopn/executeRule/didgrp.apc.pts.bankno", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'bankno'
this.gridPromptDialog.rulePath = 'didgrp.apc.pts.bankno'
}
}
}
}
);
},
selectEty(val, rulePath) {
const props = rulePath.replaceAll(".", "_")
const obj = {}
obj[props] = val;
Utils.copyValueFromVO(this.model, obj);
Api.post(`ditopn/executeRule/${rulePath}`, Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
Utils.copyValueFromVO(this.model, res.data);
}
}
);
},
...Event
},
created: function () {}
......
......@@ -389,7 +389,7 @@
v-model="model.didgrp.apl.pts.extkey"
maxlength="16"
placeholder="请输入External Key of Address"
@keyup.enter.native="aplExtkeyEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.apl.pts.extkey')"
></c-input>
</el-form-item>
</el-col>
......@@ -494,7 +494,7 @@
v-model="model.didgrp.apb.pts.bankno"
maxlength="20"
placeholder="请输入Number of bank"
@keyup.enter.native="apbPtsBanknoEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.apb.pts.bankno')"
></c-input>
</el-form-item>
</el-col>
......@@ -535,7 +535,7 @@
v-model="model.didgrp.ben.pts.extkey"
maxlength="16"
placeholder="请输入External Key of Address"
@keyup.enter.native="benExtkeyEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.ben.pts.extkey')"
></c-input>
</el-form-item>
</el-col>
......@@ -664,7 +664,7 @@
v-model="model.didgrp.beb.pts.bankno"
maxlength="20"
placeholder="请输入Number of bank"
@keyup.enter.native="banknoEvent"
@keyup.enter.native="showGridPromptDialog('didgrp.beb.pts.bankno')"
></c-input>
</el-form-item>
</el-col>
......@@ -682,130 +682,27 @@
</el-form-item>
</el-col>
</el-col>
<c-grid-ety-prompt-dialog ref="etyDialog"
:title="gridPromptDialog.title"
:columnStr="gridPromptDialog.columnStr"
:data="gridPromptDialog.data"
:type="gridPromptDialog.type"
:rulePath="gridPromptDialog.rulePath"
v-on:select-ety="selectEty"
>
</c-grid-ety-prompt-dialog>
<c-grid-ety-prompt-dialog ref="etyDialog" :promptData="promptData" v-on:select-ety="selectEty"></c-grid-ety-prompt-dialog>
</el-row>
</template>
<script>
import Api from "~/service/Api";
import CommonProcess from "~/mixin/CommonProcess";
import Event from "~/model/Ditopn/Event";
import Utils from "~/utils";
export default {
inject: ['root'],
props: ["model", "codes"],
// mixins: [CommonProcess],
mixins: [CommonProcess],
data() {
return {
declareParams: {
fileName: "ditopn.json",
basePath: "{{basePath}}",
method: "post",
scheme: "{{schemes}}",
host: "{{host}}",
consume: "0",
produce: "0",
uri: "/ditopn/getElcsRef",
},
jigomcFlag:false,
trade: "",
gridPromptDialog: {
title: '',
columnStr: '',
data: [],
type: '',
rulePath: ''
}
trade: ""
};
},
methods: {
...Event,
aplExtkeyEvent() {
Api.post("ditopn/executeRule/didgrp.apl.pts.extkey", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
//失去焦点,避免多次触发
document.getElementById('extkey').blur();
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'extkey'
this.gridPromptDialog.rulePath = 'didgrp.apl.pts.extkey'
}
}
}
);
},
benExtkeyEvent() {
Api.post("ditopn/executeRule/didgrp.ben.pts.extkey", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'extkey'
this.gridPromptDialog.rulePath = 'didgrp.ben.pts.extkey'
}
}
}
);
},
apbPtsBanknoEvent() {
Api.post("ditopn/executeRule/didgrp.apb.pts.bankno", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'bankno'
this.gridPromptDialog.rulePath = 'didgrp.apb.pts.bankno'
}
}
}
)
},
banknoEvent() {
// const data = Utils.flatObject(this.model);
// var temp = this.model.didgrp.beb.pts.bankno;
// if (temp.length < 6){
// return;
// }
Api.post("ditopn/executeRule/didgrp.beb.pts.bankno", Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'bankno'
this.gridPromptDialog.rulePath = 'didgrp.beb.pts.bankno'
}
}
}
)
},
mytypeChange(){
if (this.model.didgrp.rec.mytype == "F"){
this.model.didgrp.rec.tratyp = "";
......@@ -825,19 +722,6 @@ export default {
}
}
);
},
selectEty(val, rulePath) {
const props = rulePath.replaceAll(".", "_")
const obj = {}
obj[props] = val;
Utils.copyValueFromVO(this.model, obj);
Api.post(`ditopn/executeRule/${rulePath}`, Utils.getRequestDataFn.call(this)).then(
(res) => {
if (res.respCode = "AAAAAA"){
Utils.copyValueFromVO(this.model, res.data);
}
}
);
}
},
created: function () {
......
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