Commit 90bf4159 by wangguangchao
parents 9185351a ece29642
...@@ -54,32 +54,68 @@ export default { ...@@ -54,32 +54,68 @@ export default {
}, },
computed: { computed: {
tableColumns() { tableColumns() {
const arr = []; const columnArr = []
for (let i = 0; i < this.columns.length; i++) { const lines = this.columns;
const column = this.columns[i]; const etyReg = /\"(\w*\s?\w*)\"/
const label = column.split("\"")[1] const obj = {}
const newStr = column.replace(`\"${label}\"`, "label") for (let i = 0; i < lines.length; i++) {
const vals = newStr.split(" ") const line = lines[i];
// "P VERTLINES TRUE" if (etyReg.test(line)) {
if (vals.length <= 3) continue; const gs = line.match(etyReg)
arr.push({ const columnName = gs[1]
prop: vals[0], const newLine = line.replace(gs[0], "_")
label: label, const colPropArr = newLine.split(" ")
// width: vals[3], const positionArr = colPropArr[1].split(":")
width: "auto", if (!obj[positionArr[0]]) {
}); obj[positionArr[0]] = []
}
obj[positionArr[0]].push({
idx: colPropArr[0],
prop: columnName,
width: colPropArr[3]
})
}
} }
return arr; for (const k in obj) {
if (Object.hasOwnProperty.call(obj, k)) {
const o = obj[k];
const tableColumn = o.map(item => item.prop).join("\n")
columnArr.push({
prop: tableColumn,
label: tableColumn,
// width: o[0].width,
width: "auto",
index: k,
children: o
})
}
}
return columnArr.sort((a,b) => {
return parseInt(a.index) - parseInt(b.index)
})
}, },
tableData() { tableData() {
return this.list.map((row) => { // return this.list.map((row) => {
const res = {} // const res = {}
const vals = row.split("\t"); // const vals = row.split("\t");
for (let i = 0; i < vals.length; i++) { // for (let i = 0; i < vals.length; i++) {
res[`${i}`] = vals[i]; // res[`${i}`] = vals[i];
} // }
return res; // return res;
}); // });
const arr = []
for (let i = 0; i < this.list.length; i++) {
const d = this.list[i];
const items = d.split("\t")
const it = {}
for (let j = 0; j < this.tableColumns.length; j++) {
const column = this.tableColumns[j];
it[column['prop']] = column.children.map(c => items[c['idx']] || " ").join("\n")
}
it['IDX'] = i
arr.push(it)
}
return arr
}, },
}, },
data() { data() {
...@@ -120,6 +156,9 @@ export default { ...@@ -120,6 +156,9 @@ export default {
</script> </script>
<style> <style>
.eContainer-table-block{
margin-top: 15px;
}
.eContainer-table-block .paginationLable{ .eContainer-table-block .paginationLable{
font-size: 12px; font-size: 12px;
color: #808080; color: #808080;
...@@ -137,4 +176,8 @@ export default { ...@@ -137,4 +176,8 @@ export default {
.el-table .success-row { .el-table .success-row {
background: #f0f9eb; background: #f0f9eb;
} }
.eContainer-table-block .el-table .cell{
white-space: pre-wrap;
}
</style> </style>
\ No newline at end of file
...@@ -231,17 +231,16 @@ function defaultDidgrpCbsNom1Cur(rule, value, callback) ...@@ -231,17 +231,16 @@ function defaultDidgrpCbsNom1Cur(rule, value, callback)
function defaultDidgrpCbsNom1Amt(rule, value, callback) { function defaultDidgrpCbsNom1Amt(rule, value, callback) {
const that = this; const that = this;
// 信用证最大金额 // 信用证最大金额
caculateMaxAmt(that) caculateMaxAmt(that, callback)
// 大写金额 // // 大写金额
that.executeDefault("ditp.amt").then(res => { // that.executeDefault("ditp.amt").then(res => {
that.model.ditp.amt = res.data.ditp_amt; // that.model.ditp.amt = res.data.ditp_amt;
}) // })
// 摘要 // // 摘要
that.executeDefault("didgrp.rec.nam").then(res => { // that.executeDefault("didgrp.rec.nam").then(res => {
that.model.didgrp.rec.nam = res.data.didgrp_rec_nam; // that.model.didgrp.rec.nam = res.data.didgrp_rec_nam;
}) // })
// callback()
callback()
} }
function defaultSetmodZmqacc() { function defaultSetmodZmqacc() {
} }
...@@ -439,6 +438,11 @@ function defaultDidgrpRecNomton(rule, value, callback) { ...@@ -439,6 +438,11 @@ function defaultDidgrpRecNomton(rule, value, callback) {
function caculateMaxAmt (that, callback) { function caculateMaxAmt (that, callback) {
that.executeDefault("didgrp.cbs.max.amt").then(res => { that.executeDefault("didgrp.cbs.max.amt").then(res => {
// 大写金额
that.model.ditp.amt = res.data.ditp_amt;
// 摘要
that.model.didgrp.rec.nam = res.data.didgrp_rec_nam;
// 信用证最大金额
that.model.didgrp.cbs.max.amt = res.data.didgrp_cbs_max_amt; that.model.didgrp.cbs.max.amt = res.data.didgrp_cbs_max_amt;
if (callback) { if (callback) {
callback() callback()
......
...@@ -5,29 +5,10 @@ export default { ...@@ -5,29 +5,10 @@ export default {
let rtnmsg = await Api.post("ditopn/executeRule/ditp.butgetref", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("ditopn/executeRule/ditp.butgetref", Utils.getRequestDataFn.call(this))
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
const ownref = rtnmsg.data.didgrp_rec_ownref this.model.didgrp.rec.ownref=rtnmsg.data.didgrp_rec_ownref
this.$message({
const h = this.$createElement; type: 'success',
this.$msgbox({ message: '获取成功!'
title: '获取结果',
message: h('p', null, [
h('div', { style: 'margin-left: 25%'}, `参考号:${ownref}`),
h('div', { style: 'margin-left: 25%' }, '是否将结果填入表单?')
]),
showCancelButton: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(action => {
this.model.didgrp.rec.ownref = ownref
this.$message({
type: 'success',
message: '填入成功!'
});
}).catch(action => {
this.$message({
type: 'info',
message: "已取消"
})
}); });
} }
else { else {
......
...@@ -379,7 +379,9 @@ export default { ...@@ -379,7 +379,9 @@ export default {
}, },
display(index, row){ display(index, row){
let viewurl ="/#/display/"+row['10'].toLowerCase()+"?trn="+row['1'] const d = this.stmData.data[index]
const ds = d.split("\t")
let viewurl ="/#/display/"+ds['10'].toLowerCase()+"?trn="+ds['1']
window.open(viewurl, 'newwindow', 'height=1200,width=900,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no'); window.open(viewurl, 'newwindow', 'height=1200,width=900,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no');
} }
} }
\ No newline at end of file
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