Commit 939e9a2c by liuxin

弹出回填框可自定义回填列

parent 9f6ffc84
......@@ -48,6 +48,7 @@ export default {
data: [],
rulePath: "",
modelUrl: "", //非机构处理需要回填的字段路劲信息,isPty为false时必输
defaultColumn: "",
};
},
},
......@@ -143,8 +144,9 @@ export default {
},
selectEty(row, column, event) {
// 默认第一列
var idx = this.promptData.defaultColumn;
if (this.isPty) {
const v = row[this.tableColumn[0].prop].split("\n")[0];
const v = row[this.tableColumn[idx].prop].split("\n")[0];
this.$emit("select-ety", v, this.promptData.rulePath);
} else {
const { modelUrl, isCover, rulePath } = this.promptData;
......
......@@ -275,8 +275,9 @@ export default {
* @param {String} shadow 自定义列后需要保留的影藏字段
* @param {String} modelUrl 非机构双击后需要回填的字段路劲,k:对应列,value:应用model路劲,如{TXT:'ledgrp.blk.lcrgod'}
* @param {String} isCover 非机构双击后需要回填的字段值是覆盖还是叠加,部分覆盖值为对象,false为叠加,如{TXT:false},k值为modelUrl的k,如全部覆盖则isCover='T',如全部叠加则isCover='',默认全部覆盖
* @param {String} defaultColumn 选中列,默认第0列
*/
showGridPromptDialog(rulePath, columns, shadow, modelUrl, isCover = "T",Dialog='etyDialog') {
showGridPromptDialog(rulePath, columns, shadow, modelUrl, isCover = "T",Dialog='etyDialog', defaultColumn = 0) {
this.executeRule(rulePath, {'EventType' : 4}).then((res) => {
if (res.respCode == SUCCESS) {
if (res.data.params) {
......@@ -291,6 +292,7 @@ export default {
rulePath: rulePath,
modelUrl: modelUrl,
isCover: isCover,
defaultColumn: defaultColumn
}
}
}
......@@ -319,7 +321,6 @@ export default {
obj[props] = val;
Utils.copyValueFromVO(this.model, obj);
this.executeRule(rulePath, {"selectStatus" : 1}).then((res) => {
if (res.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model, res.data);
}
......
......@@ -220,7 +220,7 @@
maxlength="3"
placeholder="请输入付款人常驻国家(地区)代码"
@keyup.enter.native="
showGridPromptDialog(`cnybop.cnyinc.spayercountrycode`)
showGridPromptDialog(`cnybop.cnyinc.spayercountrycode`, null, null,{TXT: 'cnybop.cnyinc.spayercountrycode'}, {TXT: false},'etyDialog', 1)
"
></c-input>
<template slot="footer">
......
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