Commit ae29b1bf by zhengxiaokui

bdtudp

parent 4d613b53
<template>
<div class="eContainer-table-block">
<el-table ref="table" :data="tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
<el-table
ref="table"
:data="
tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)
"
style="width: 100%"
class="eContainer-table"
@selection-change="handleSelectionChange"
:row-key="getRowKey"
:header-cell-style="{background: 'eef1f6', color: '#606266'}"
:highlight-current-row="true"
:header-cell-style="{ background: 'eef1f6', color: '#606266' }"
:highlight-current-row="true"
@row-click="rowClick"
:border="true">
<el-table-column type="selection" width="55" v-if="showSelection" :reserve-selection="true"></el-table-column>
:border="true"
>
<el-table-column
type="selection"
width="55"
v-if="showSelection"
:reserve-selection="true"
></el-table-column>
<el-table-column
v-for="(item, key) in tableColumns"
:key="key"
:prop="item.prop"
:prop="item.prop"
:label="item.label"
:width="item.width"
>
</el-table-column>
<slot></slot>
</el-table>
<el-pagination
<el-pagination
class="eContainer-pagination"
layout="prev, pager, next, jumper"
:page-sizes="pageSizes"
:page-size="pageSize"
:current-page="currentPage"
:total="tableData.length"
@size-change="sizeChange"
@current-change="currentChange"
@size-change="sizeChange"
@current-change="currentChange"
></el-pagination>
<div class="paginationLable">当前显示第 {{(currentPage - 1) * pageSize + 1}}-{{currentPage * pageSize > tableData.length ? tableData.length : currentPage * pageSize}} 条,共 {{tableData.length}}</div>
<div class="paginationLable">
当前显示第 {{ (currentPage - 1) * pageSize + 1 }}-{{
currentPage * pageSize > tableData.length
? tableData.length
: currentPage * pageSize
}}
条,共 {{ tableData.length }}
</div>
</div>
</template>
......@@ -51,128 +68,130 @@ export default {
},
showSelection: {
type: Boolean,
default: false
}
default: false,
},
},
computed: {
tableColumns() {
const columnArr = []
const columnArr = [];
const lines = this.columns;
const etyReg = /\"([^\"]*)\"/
const obj = {}
const etyReg = /\"([^\"]*)\"/;
const obj = {};
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(" ")
const positionArr = colPropArr[1].split(":")
if (!obj[positionArr[0]]) {
obj[positionArr[0]] = []
}
obj[positionArr[0]].push({
idx: colPropArr[0],
prop: columnName,
width: colPropArr[3]
})
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(" ");
const positionArr = colPropArr[1].split(":");
if (!obj[positionArr[0]]) {
obj[positionArr[0]] = [];
}
obj[positionArr[0]].push({
idx: colPropArr[0],
prop: columnName,
width: colPropArr[3] + 'px',
});
}
}
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
})
}
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)
})
return columnArr.sort((a, b) => {
return parseInt(a.index) - parseInt(b.index);
});
},
tableData() {
// return this.list.map((row) => {
// const res = {}
// const res = {}
// const vals = row.split("\t");
// for (let i = 0; i < vals.length; i++) {
// res[`${i}`] = vals[i];
// }
// return res;
// for (let i = 0; i < vals.length; i++) {
// res[`${i}`] = vals[i];
// }
// return res;
// });
const arr = []
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)
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
return arr;
},
},
data() {
return {
currentPage: 1,
pageSizes: [5, 10, 20, 30, 40, 50, 100],
pageSize: 5
};
currentPage: 1,
pageSizes: [5, 10, 20, 30, 40, 50, 100],
pageSize: 5,
};
},
methods: {
sizeChange(size) {
this.pageSize = size;
},
currentChange(currentPage) {
this.currentPage = currentPage;
},
sizeChange(size) {
this.pageSize = size;
},
currentChange(currentPage) {
this.currentPage = currentPage;
},
handleSelectionChange(val) {
this.$emit("multipleSelect", this.getSelectedRowIndex(val))
this.$emit("multipleSelect", this.getSelectedRowIndex(val));
},
getRowKey(row) {
return row['IDX']
return row["IDX"];
},
getSelectedRowIndex(val) {
const indexArr = []
const indexArr = [];
for (let j = 0; j < val.length; j++) {
const v = val[j];
for (let i = 0; i < this.tableData.length; i++) {
const data = this.tableData[i];
if (v['IDX'] === data ['IDX']) {
indexArr.push(i)
}
if (v["IDX"] === data["IDX"]) {
indexArr.push(i);
}
}
}
return indexArr
return indexArr;
},
// 行点击,设置高亮
rowClick(row, column, event) {
this.$refs.table.setCurrentRow(row);
this.$emit("chooseRowEvent", row)
}
}
this.$emit("chooseRowEvent", row);
},
},
};
</script>
<style>
.eContainer-table-block{
.eContainer-table-block {
margin-top: 15px;
}
.eContainer-table-block .paginationLable{
font-size: 12px;
color: #808080;
height: 26px;
line-height: 26px;
float:right;
margin-top:20px;
.eContainer-table-block .paginationLable {
font-size: 12px;
color: #808080;
height: 26px;
line-height: 26px;
float: right;
margin-top: 20px;
}
.eContainer-table-block .el-table__body-wrapper {
overflow: auto;
......@@ -184,7 +203,7 @@ export default {
background: #f0f9eb;
}
.eContainer-table-block .el-table .cell{
white-space: pre-wrap;
.eContainer-table-block .el-table .cell {
white-space: pre-wrap;
}
</style>
\ No newline at end of file
import Api from "~/service/Api"
import Utils from "../utils"
export default {
data(){
data() {
return {}
},
mounted(){
mounted() {
//this.restoreDisplay()
},
methods:{
init(params){
return Api.post(this.declareParams.trnName+"/init",{params})
methods: {
init(params) {
return Api.post(this.declareParams.trnName + "/init", { params })
},
save(params){
return Api.post(this.declareParams.trnName+"/saveData", this.wrapper(params))
save(params) {
return Api.post(this.declareParams.trnName + "saveData", this.wrapper(params))
},
exeuteCheck(rulePath,params){
return Api.post(this.declareParams.trnName+"/executeCheck/"+rulePath, this.wrapper(params))
exeuteCheck(rulePath, params) {
return Api.post(this.declareParams.trnName + "/executeCheck/" + rulePath, this.wrapper(params))
},
executeDefault(rulePath,params)
{
return Api.post(this.declareParams.trnName+"/executeDefault/"+rulePath, this.wrapper(params))
executeDefault(rulePath, params) {
return Api.post(this.declareParams.trnName + "/executeDefault/" + rulePath, this.wrapper(params))
},
executeRule(rulePath,params)
{
return Api.post(this.declareParams.trnName+"/executeRule/"+rulePath, this.wrapper(params))
executeRule(rulePath, params) {
return Api.post(this.declareParams.trnName + "/executeRule/" + rulePath, this.wrapper(params))
},
async checkAll(params){
const res = await Api.post(this.declareParams.trnName+"/checkAll", this.wrapper(params))
async checkAll(params) {
const res = await Api.post(this.declareParams.trnName + "/checkAll", this.wrapper(params))
return res
},
pedding(params){
return Api.post(this.declareParams.trnName+"/pending", this.wrapper(params))
pedding(params) {
return Api.post(this.declareParams.trnName + "/pending", this.wrapper(params))
},
async restoreDisplay()
{
async restoreDisplay() {
let inr = this.$route.query.trn
if(!inr)
if (!inr)
return
let data =await Api.post("display/"+inr)
Utils.copyValueFromVO(this.model,JSON.parse(data.data))
let data = await Api.post("display/" + inr)
Utils.copyValueFromVO(this.model, JSON.parse(data.data))
},
executeNotify(params)
{
return Api.post(this.declareParams.trnName+"/executeNotify", this.wrapper(params))
executeNotify(params) {
return Api.post(this.declareParams.trnName + "/executeNotify", this.wrapper(params))
},
}
}
\ No newline at end of file
}
\ No newline at end of file
......@@ -139,6 +139,7 @@ export default class Bdtudp {
},
docgrdm: {
docdsclab: "", // Label of document description .bdtp.docgrdm.docdsclab
docgrd: [],
},
cre752flg: "", // Create 752 .bdtp.cre752flg
furide: "", // Further Identification .bdtp.furide
......
<template>
<div class="eibs-tab">
<c-row>
<c-col :span="6">
<c-checkbox v-model="model.bddgrp.rec.igndisflg"
>Ignore Discrepancies</c-checkbox
>
</c-col>
<c-col :span="12">
<c-row>
<c-col :span="24">
<el-form-item label="不符点">
<c-input
type="textarea"
:rows="6"
v-model="model.bddgrp.blk.docdis"
maxlength="65"
show-word-limit
placeholder="请输入不符点"
></c-input>
</el-form-item>
</c-col>
<c-col :span="6">
<c-checkbox v-model="model.bddgrp.rec.approvcod"
>Documents on Approval Basis</c-checkbox
>
</c-col>
<c-col :span="24">
<el-form-item label="解释和结论">
<c-input
type="textarea"
:rows="4"
v-model="model.bddgrp.blk.comcon"
maxlength="65"
show-word-limit
placeholder="请输入解释和结论"
></c-input>
</el-form-item>
</c-col>
<c-col :span="6">
<c-checkbox v-model="model.bdtp.cre752flg">Create 752</c-checkbox>
<c-col :span="24">
<el-form-item label="到期付款确认备注">
<c-input
type="textarea"
:rows="2"
resize="none"
v-model="model.bddgrp.blk.accrmk"
maxlength="65"
show-word-limit
placeholder="请输入到期付款确认备注"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<c-istream-table
:list="model.bdtp.docgrdm.docgrd"
:columns="columns"
>
</c-istream-table>
</c-col>
</c-row>
</c-col>
<c-col :span="6">
<c-checkbox v-model="model.bdtp.cre732flg">Create MT 732</c-checkbox>
</c-col>
<c-col :span="12">
<c-row>
<c-col :span="24">
<div class="c-checkbox">
<c-checkbox v-model="model.bddgrp.rec.igndisflg"
>忽略不符点</c-checkbox
>
</div>
</c-col>
<c-col :span="24">
<div class="c-checkbox">
<c-checkbox v-model="model.bddgrp.blk.docdisflg"
>录入不符点</c-checkbox
>
</div>
</c-col>
<!-- <c-col :span="12">
<c-button
size="small"
type="primary"
icon="el-icon-search"
@click="onDocdisButtxmsel"
>
...
</c-button>
</c-col> -->
<c-col :span="24">
<el-form-item label="收到的通知类型" prop="bddgrp.rec.advtyp">
<c-select
v-model="model.bddgrp.rec.advtyp"
style="width: 100%"
placeholder="请选择收到的通知类型"
>
</c-select>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="Type of Advice Received" prop="bddgrp.rec.advtyp">
<c-select
v-model="model.bddgrp.rec.advtyp"
style="width: 100%"
placeholder="请选择Type of Advice Received"
>
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="付款日期" prop="bddgrp.rec.totdat">
<c-date-picker
type="date"
v-model="model.bddgrp.rec.totdat"
style="width: 100%"
placeholder="请选择付款日期"
></c-date-picker>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="不符点通知日期" prop="bddgrp.rec.disdat">
<c-date-picker
type="date"
v-model="model.bddgrp.rec.disdat"
style="width: 100%"
placeholder="请选择不符点通知日期"
></c-date-picker>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="不符点通知日期" prop="bddgrp.rec.disdat">
<c-date-picker
type="date"
v-model="model.bddgrp.rec.disdat"
style="width: 100%"
placeholder="请选择不符点通知日期"
></c-date-picker>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="Comments and Conclusions">
<c-input
type="textarea"
v-model="model.bddgrp.blk.comcon"
maxlength="65"
show-word-limit
placeholder="请输入Comments and Conclusions"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<div class="c-checkbox">
<c-checkbox v-model="model.bddgrp.rec.approvcod"
>议付行担保议付</c-checkbox
>
</div>
</c-col>
<c-col :span="12">
<span
v-text="model.bdtp.docgrdm.docdsclab"
data-path=".bdtp.docgrdm.docdsclab"
>
</span>
</c-col>
<c-col :span="24">
<div class="c-checkbox">
<c-checkbox v-model="model.bdtp.cre752flg"
>Create MT 752</c-checkbox
>
</div>
</c-col>
<c-col :span="12">
<el-form-item label="到期付款确认备注">
<c-input
type="textarea"
v-model="model.bddgrp.blk.accrmk"
maxlength="65"
show-word-limit
placeholder="请输入到期付款确认备注"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="Further Identification" prop="bdtp.furide">
<c-select
v-model="model.bdtp.furide"
style="width: 100%"
placeholder="请选择Further Identification"
>
</c-select>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="Further Identification" prop="bdtp.furide">
<c-select
v-model="model.bdtp.furide"
style="width: 100%"
placeholder="请选择Further Identification"
>
</c-select>
</el-form-item>
<c-col :span="24">
<div class="c-checkbox">
<c-checkbox v-model="model.bdtp.cre732flg"
>Create MT 732</c-checkbox
>
</div>
</c-col>
</c-row>
</c-col>
</c-row>
</div>
......@@ -110,11 +152,22 @@ export default {
props: ["model", "codes"],
mixins: [CommonProcess],
data() {
return {};
return {
columns: [
"0 0 \"lst1\" 50 ",
"1 1 \"lst2\" 50",
"2 2 \"document\" 200",
],
};
},
methods: { ...Event },
created: function () {},
};
</script>
<style>
.c-checkbox {
text-align: center;
margin: 10px;
font-size: 16px;
}
</style>
<template>
<div class="eibs-tab">
<c-col :span="24">
<el-form-item :label="argadr.title" :prop="argadr.rol">
<c-input
v-model="model[argadr.rol]"
:placeholder="'请输入' + argadr.title + '角色'"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="BIC" :prop="argadr.url + 'extkey'">
<c-input
v-model="model[argadr.url + 'extkey']"
maxlength="16"
:placeholder="'请输入' + argadr.title + 'BIC'"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="联行行号" :prop="argadr.url + 'bankno'">
<c-input
v-model="model[argadr.url + 'bankno']"
maxlength="20"
placeholder="请输入联行行号"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="联行行名" :prop="argadr.url + 'jigomc'">
<c-input
v-model="model[argadr.url + 'jigomc']"
maxlength="35"
placeholder="请输入联行行名"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="联行地址" :prop="argadr.url + 'dizhii'">
<c-input
type="textarea"
v-model="model[argadr.url + 'dizhii']"
maxlength="35"
placeholder="请输入联行地址"
></c-input>
</el-form-item>
</c-col>
</div>
</template>
<script>
import Api from "~/service/Api";
import CommonProcess from "~/mixin/CommonProcess";
import CodeTable from "~/config/CodeTable";
export default {
inject: ["root"],
mixins: [CommonProcess],
props: ["model", "codes", "argadr"],
data() {
return {
data: [],
};
},
watch: {},
methods: { ...Event },
created: function () {},
};
</script>
<style>
</style>
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