Commit cf6b80f9 by 潘际乾

pty静态交易初版

parent afb18240
<template>
<div class="eContainer-table-block">
<el-table
ref="table"
:data="data"
style="width: 100%"
class="eContainer-table"
:header-cell-style="{
background: 'rgb(235, 235, 235)',
color: 'rgb(51, 51, 51)',
}"
:highlight-current-row="true"
:border="true"
max-height="380"
>
<c-table-column
v-for="(item, key) in columns"
:key="key"
:prop="item.prop"
:label="item.label"
:width="item.width"
sortable
>
<template v-slot="{ scope }">
<span>{{ scope.row[item.prop] }}</span>
</template>
</c-table-column>
<slot></slot>
</el-table>
<c-col :span="24">
<el-pagination
class="eContainer-pagination"
layout="prev, pager, next, jumper, ->, sizes, total"
:page-sizes="pageSizes"
:page-size="pageSize"
:current-page="pageNumber"
:total="total"
@size-change="sizeChange"
@current-change="currentChange"
></el-pagination>
</c-col>
</div>
</template>
<script>
import CodeTable from "~/config/CodeTable";
/**
* 后端分页的 Table 组件
*/
export default {
props: {
columns: {
type: Array,
default: () => {
return [];
},
},
data: {
type: Array,
default: () => {
return [];
},
},
pageNumber: {
type: Number,
default: 1,
},
pageSize: {
type: Number,
default: 1,
},
total: {
type: Number,
default: 0,
},
},
data() {
return {
pageSizes: [5, 10, 20, 30, 40, 50, 100],
codes: {
...CodeTable,
},
};
},
mounted() {},
methods: {
sizeChange(size) {
this.$emit("queryFunc", this.pageNumber, size);
},
currentChange(currentPage) {
this.$emit("queryFunc", currentPage, this.pageSize);
},
},
};
</script>
<style scoped>
</style>
\ No newline at end of file
......@@ -53,6 +53,8 @@ import Fullbox from "./Fullbox"
import CompareTable from "./CompareTable"
import InputXml from "./InputXml.vue"
import PagingTable from "./PagingTable.vue";
export default {
install(Vue) {
Vue.component("c-page", c_page)
......@@ -106,5 +108,6 @@ export default {
Vue.component("c-fullbox", Fullbox)
Vue.component("c-compare-table", CompareTable)
Vue.component("c-input-xml", InputXml)
Vue.component("c-paging-table", PagingTable)
}
}
\ No newline at end of file
......@@ -55,7 +55,7 @@ export const routes = [
},
{ path: "/review", component: Layout, children: ReviewRouter },
{ path: "/business", component: Layout, children: BusRouter },
{ path: "/static", component: Layout, children: StaticsRouter },
{ path: "/statics", component: Layout, children: StaticsRouter },
{ path: "/display", component: Display, children: DisplayRouter },
{ path: "/login", component: Login, name: "Login" },
{ path: "/docpan", component: () => import("../views/Docpan"), children: DocRouter },
......
......@@ -20,5 +20,14 @@ export function deleteById(inr) {
return Api.post(`/test/pty/deleteById?inr=${inr}`)
}
export function addAdrData(inr, data) {
return Api.post(`/test/pty/addAdrData?inr=${inr}`, data)
}
export function updateAdrData(inr, data) {
return Api.post(`/test/pty/updateAdrData?inr=${inr}`, data)
}
export function deleteAdrData(data) {
return Api.post(`/test/pty/deleteAdrData`, data)
}
<template>
<m-pty title="dbapty" type="add"></m-pty>
</template>
<script>
import Dbipty from "~/views/Statics/Dbipty";
export default {
name: "StaticsDbapty",
components: {
"m-pty": Dbipty
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-pty title="dbdpty" type="delete"></m-pty>
</template>
<script>
import Dbipty from "~/views/Statics/Dbipty";
export default {
name: "StaticsDbdpty",
components: {
"m-pty": Dbipty
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-pty title="dbepty" type="edit"></m-pty>
</template>
<script>
import Dbipty from "~/views/Statics/Dbipty";
export default {
name: "StaticsDbepty",
components: {
"m-pty": Dbipty
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-table :list="model.actList" :columnsConfig="columns"></c-table>
</div>
</template>
<script>
export default {
props: ['model'],
data() {
return {
columns: [
{ label: "typ", prop: "typ", width: "auto" },
{ label: "cur", prop: "cur", width: "auto" },
{ label: "extkey", prop: "extkey", width: "auto" },
{ label: "trmtyp", prop: "trmtyp", width: "auto" },
{ label: "nam", prop: "nam", width: "auto" },
],
};
}
};
</script>
<style>
</style>
\ No newline at end of file
export default class Pty {
constructor() {
this.data = {
inr: "",
extkey: "",
nam: "",
bic: "",
bicaut: "",
bid: "",
dtgcid: "",
blz: "",
clc: "",
dpt: "",
eml: "",
fax1: "",
fax2: "",
nam1: "",
nam2: "",
nam3: "",
str1: "",
str2: "",
loczip: "",
loctxt: "",
loc2: "",
loccty: "",
cortyp: "",
pob: "",
pobzip: "",
pobtxt: "",
tel1: "",
tel2: "",
tid: "",
tlx: "",
tlxaut: "",
uil: "",
ver: "",
manmod: "",
rtgflg: "",
tarflg: "",
dtacid: "",
dtecid: "",
etgextkey: "",
adr1: "",
adr2: "",
adr3: "",
adr4: "",
discod: "",
namelc: "",
adrelc: "",
}
}
constructor() {
this.data = {
inr: "",
extkey: "",
nam: "",
bic: "",
bicaut: "",
bid: "",
blz: "",
clc: "",
dpt: "",
eml: "",
fax1: "",
fax2: "",
nam1: "",
nam2: "",
nam3: "",
str1: "",
str2: "",
loczip: "",
loctxt: "",
loc2: "",
loccty: "",
cortyp: "",
pob: "",
pobzip: "",
pobtxt: "",
tel1: "",
tel2: "",
tid: "",
tlx: "",
tlxaut: "",
uil: "",
ver: "",
manmod: "",
rtgflg: "",
tarflg: "",
dtacid: "",
dtecid: "",
etgextkey: "",
adr1: "",
adr2: "",
adr3: "",
adr4: "",
discod: "",
namelc: "",
adrelc: "",
dtgcid: "",
}
}
}
export const Pattern = {
"usgpat": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 3, "message": "最大长度3个字符", "trigger": "blur" }
],
"adrstapat": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"inr": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
......@@ -237,3 +245,5 @@ export const Pattern = {
{ "max": 23, "message": "最大长度23个字符", "trigger": "blur" }
]
}
......@@ -11,11 +11,11 @@
:disabled="operate === 'details'"
>
<c-col :span="8" class="col-left">
<!-- <c-col :span="24">
<el-form-item label="inr" prop="inr">
<c-input v-model="adr.inr" placeholder="请输入inr"> </c-input>
<c-col :span="24">
<el-form-item label="usgpat" prop="usgpat">
<c-input v-model="adr.usgpat" placeholder="请输入usgpat"> </c-input>
</el-form-item>
</c-col> -->
</c-col>
<c-col :span="24">
<el-form-item label="extkey" prop="extkey">
<c-input v-model="adr.extkey" placeholder="请输入extkey"> </c-input>
......@@ -94,6 +94,11 @@
</c-col>
<c-col :span="8" class="col-left col-right">
<c-col :span="24">
<el-form-item label="adrstapat" prop="adrstapat">
<c-input v-model="adr.adrstapat" placeholder="请输入adrstapat"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="str1" prop="str1">
<c-input v-model="adr.str1" placeholder="请输入str1"> </c-input>
</el-form-item>
......@@ -176,11 +181,6 @@
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="ver" prop="ver">
<c-input v-model="adr.ver" placeholder="请输入ver"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="manmod" prop="manmod">
<c-input v-model="adr.manmod" placeholder="请输入manmod"> </c-input>
</el-form-item>
......@@ -252,7 +252,7 @@
</template>
<script>
import Adr, { Pattern } from "./Adr.js";
import { Pattern } from "./Adr.js";
export default {
......@@ -261,7 +261,6 @@ export default {
data() {
return {
rules: Pattern,
isDisabled: false
};
}
};
......
<template>
<div class="eibs-tab">
<div style="text-align: right">
<c-button
size="small"
type="primary"
@click="adrInfo(scope.$index, scope.row)"
>
新增
</c-button>
</div>
<div style="text-align: right">
<c-button size="small" type="primary" @click="adrAdd()"> 新增 </c-button>
</div>
<c-table :columnsConfig="columns" :list="model.ptaList">
<c-table-column fixed="right" prop="op" label="操作" width="200px">
<template slot-scope="{ scope }">
<c-button
<button
class="el-button el-button--default el-button--small"
style="margin-left: 0"
size="small"
@click="adrInfo(scope.$index, scope.row)"
:disabled="false"
@click.prevent="adrInfo(scope.$index, scope.row)"
>
详情
</c-button>
<span>详情</span>
</button>
<c-button
style="margin-left: 5px"
size="small"
......@@ -28,7 +23,7 @@
>
修改
</c-button>
<c-button
<c-button
style="margin-left: 5px"
size="small"
type="primary"
......@@ -40,126 +35,160 @@
</c-table-column>
</c-table>
<el-dialog
title="地址信息"
<el-dialog
:title="
'地址信息:' +
(operate === 'details' ? '详情' : operate === 'edit' ? '修改' : '新增')
"
:visible.sync="adrDialog"
top="10vh"
top="10vh"
width="80%"
:destroy-on-close="true"
:before-close="handleClose">
<m-adr-info :adr="adr" :operate="operate"></m-adr-info>
:destroy-on-close="true"
:before-close="handleClose"
>
<m-adr-info ref="adr" :adr="adr" :operate="operate"></m-adr-info>
<span slot="footer" class="dialog-footer">
<c-button @click="cancel">取 消</c-button>
<c-button type="primary" @click="cancel" v-if="operate === 'details'">确 定</c-button>
<c-button type="primary" @click="saveAdr" v-if="operate === 'edit'">保 存</c-button>
<button
class="el-button el-button--default el-button--small"
style="margin-left: 0"
size="small"
:disabled="false"
@click.prevent="cancel"
>
<span>取 消</span>
</button>
<c-button type="primary" @click="cancel" v-if="operate === 'details'"
>确 定</c-button
>
<c-button type="primary" @click="editAdr" v-if="operate === 'edit'"
>保 存</c-button
>
<c-button type="primary" @click="saveAdr" v-if="operate === 'add'"
>保 存</c-button
>
</span>
</el-dialog>
</div>
</template>
<script>
import Adr from "./Adr.js";
import AdrInfo from "./AdrInfo.vue";
import {
addAdrData,
updateAdrData,
deleteAdrData,
} from "~/service/test/pty.js";
export default {
name: "AdrList",
components: {
"m-adr-info": AdrInfo
},
props: ['model'],
components: {
"m-adr-info": AdrInfo,
},
props: ["model"],
data() {
return {
adrDialog: false,
adr: null,
operate: '',
operateIdx: 0,
adrDialog: false,
adr: null,
operate: "",
operateIdx: 0,
columns: [
// { label: "inr", prop: "inr", width: "auto" },
{ label: "usgpat", prop: "usgpat", width: "auto" },
{ label: "adrstapat", prop: "adrstapat", width: "auto" },
{ label: "extkey", prop: "extkey", width: "auto" },
{ label: "nam", prop: "nam", width: "auto" },
{ label: "bic", prop: "bic", width: "auto" },
{ label: "bicaut", prop: "bicaut", width: "auto" },
{ label: "bid", prop: "bid", width: "auto" },
{ label: "dtgcid", prop: "dtgcid", width: "auto" },
{ label: "blz", prop: "blz", width: "auto" },
{ label: "clc", prop: "clc", width: "auto" },
{ label: "dpt", prop: "dpt", width: "auto" },
{ label: "eml", prop: "eml", width: "auto" },
{ label: "fax1", prop: "fax1", width: "auto" },
{ label: "fax2", prop: "fax2", width: "auto" },
{ label: "nam1", prop: "nam1", width: "auto" },
{ label: "nam2", prop: "nam2", width: "auto" },
{ label: "nam3", prop: "nam3", width: "auto" },
{ label: "str1", prop: "str1", width: "auto" },
{ label: "str2", prop: "str2", width: "auto" },
{ label: "loczip", prop: "loczip", width: "auto" },
{ label: "loctxt", prop: "loctxt", width: "auto" },
{ label: "loc2", prop: "loc2", width: "auto" },
{ label: "loccty", prop: "loccty", width: "auto" },
{ label: "cortyp", prop: "cortyp", width: "auto" },
{ label: "pob", prop: "pob", width: "auto" },
{ label: "pobzip", prop: "pobzip", width: "auto" },
{ label: "pobtxt", prop: "pobtxt", width: "auto" },
{ label: "tel1", prop: "tel1", width: "auto" },
{ label: "tel2", prop: "tel2", width: "auto" },
{ label: "tid", prop: "tid", width: "auto" },
{ label: "tlx", prop: "tlx", width: "auto" },
{ label: "tlxaut", prop: "tlxaut", width: "auto" },
{ label: "uil", prop: "uil", width: "auto" },
{ label: "ver", prop: "ver", width: "auto" },
{ label: "manmod", prop: "manmod", width: "auto" },
{ label: "rtgflg", prop: "rtgflg", width: "auto" },
{ label: "tarflg", prop: "tarflg", width: "auto" },
{ label: "dtacid", prop: "dtacid", width: "auto" },
{ label: "dtecid", prop: "dtecid", width: "auto" },
{ label: "etgextkey", prop: "etgextkey", width: "auto" },
{ label: "adr1", prop: "adr1", width: "auto" },
{ label: "adr2", prop: "adr2", width: "auto" },
{ label: "adr3", prop: "adr3", width: "auto" },
{ label: "adr4", prop: "adr4", width: "auto" },
{ label: "discod", prop: "discod", width: "auto" },
{ label: "namelc", prop: "namelc", width: "auto" },
{ label: "adrelc", prop: "adrelc", width: "auto" },
],
};
},
methods: {
adrInfo(index, row) {
this.adr = { ...row }
this.operate = 'details'
this.operateIdx = index
this.adrDialog = true
},
adrEdit(index, row) {
this.adr = { ...row }
this.operate = 'edit'
this.operateIdx = index
this.adrDialog = true
},
adrDelete(index, row) {
this.$confirm("是否真的删除?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
}).then((res) => {
// todo
this.model.ptaList.splice(index, 1)
this.$message.success("删除成功!")
})
},
cancel() {
this.handleClose()
},
saveAdr() {
this.model.ptaList.splice(this.operateIdx, 1, this.adr)
this.handleClose()
},
handleClose(done) {
this.adrDialog = false
if (done && typeof done === "function") {
done()
}
}
}
methods: {
adrInfo(index, row) {
this.adr = { ...row };
this.operate = "details";
this.operateIdx = index;
this.adrDialog = true;
},
adrAdd() {
this.adr = new Adr().data;
this.operate = "add";
this.adrDialog = true;
},
adrEdit(index, row) {
this.adr = { ...row };
this.operate = "edit";
this.operateIdx = index;
this.adrDialog = true;
},
adrDelete(index, row) {
this.$confirm("是否真的删除?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
}).then((res) => {
deleteAdrData(row).then((res) => {
if (res) {
this.model.ptaList.splice(index, 1);
this.$message.success("删除成功!");
} else {
this.$message.error("删除失败!");
}
});
});
},
cancel() {
this.handleClose();
},
editAdr() {
this.$refs.adr.$refs.modelForm.validate((validated) => {
if (validated) {
updateAdrData(this.model.inr, this.adr)
.then((res) => {
if (res.inr) {
this.$message.success("修改地址信息成功!");
// this.model.ptaList.splice(this.operateIdx, 1, this.adr);
this.model.ptaList = res.ptaList;
this.handleClose();
}
})
.catch((error) => {
this.$message.error("修改地址信息失败!");
});
}
});
},
saveAdr() {
this.$refs.adr.$refs.modelForm.validate((validated) => {
if (validated) {
addAdrData(this.model.inr, this.adr)
.then((res) => {
if (res) {
this.$message.success("保存地址信息成功!");
// this.model.ptaList.push(res);
this.model.ptaList = res.ptaList;
this.handleClose();
}
})
.catch((error) => {
this.$message.error("保存地址信息失败!");
});
}
});
},
handleClose(done) {
this.adrDialog = false;
if (done && typeof done === "function") {
done();
}
},
},
};
</script>
......
<template>
<div class="eibs-tab">
<c-table :list="model.ptcList" :columnsConfig="columns"></c-table>
</div>
</template>
<script>
export default {
props: ["model"],
data() {
return {
columns: [
{ label: "gen", prop: "gen", width: "auto" },
{ label: "nam", prop: "nam", width: "auto" },
{ label: "dep", prop: "dep", width: "auto" },
{ label: "teloff", prop: "teloff", width: "auto" },
{ label: "eml", prop: "eml", width: "auto" },
{ label: "telfax", prop: "telfax", width: "auto" },
],
};
},
};
</script>
<style>
</style>
\ No newline at end of file
export default class Pty {
constructor() {
this.data = {
inr: "",
extkey: "",
nam: "",
ptytyp: "",
accusr: "",
hbkaccflg: "",
hbkconflg: "",
hbkinr: "",
heqaccflg: "",
heqconflg: "",
heqinr: "",
prfctr: "",
resusr: "",
rskcls: "",
rskcty: "",
rsktxt: "",
uil: "",
ver: "",
akkbra: "",
akkcom: "",
akkreg: "",
lidcndflg: "",
lidmaxdur: "",
trdcndflg: "",
trdtentot: "",
trdtenini: "",
trdtenext: "",
trdextnmb: "",
badcndflg: "",
badtenext: "",
adrsta: "",
seltyp: "",
buytyp: "",
sla: "",
etgextkey: "",
nam1: "",
juscod: "",
bilvvv: "",
cunqii: "",
idcode: "",
idtype: "",
bchkeyinr: "",
clscty: "",
procod: "",
trnman: "",
speeco: "",
selrat: "",
buyrat: "",
bngcod: "",
ecifno: "",
dshflg: "",
crmtyp: "",
ecifnam1: "",
ecifjuscod: "",
qygmgb: "",
khbsdt: "",
ptaList: []
}
}
constructor() {
this.data = {
inr: "",
extkey: "",
nam: "",
ptytyp: "",
accusr: "",
hbkaccflg: "",
hbkconflg: "",
hbkinr: "",
heqaccflg: "",
heqconflg: "",
heqinr: "",
prfctr: "",
resusr: "",
rskcls: "",
rskcty: "",
rsktxt: "",
uil: "",
ver: "",
akkbra: "",
akkcom: "",
akkreg: "",
lidcndflg: "",
lidmaxdur: "",
trdcndflg: "",
trdtentot: "",
trdtenini: "",
trdtenext: "",
trdextnmb: "",
badcndflg: "",
badtenext: "",
adrsta: "",
seltyp: "",
buytyp: "",
sla: "",
etgextkey: "",
nam1: "",
juscod: "",
bilvvv: "",
cunqii: "",
idcode: "",
idtype: "",
bchkeyinr: "",
clscty: "",
procod: "",
trnman: "",
speeco: "",
selrat: "",
buyrat: "",
bngcod: "",
ecifno: "",
dshflg: "",
crmtyp: "",
ecifnam1: "",
ecifjuscod: "",
qygmgb: "",
khbsdt: "",
ptaList: [],
actList: [],
ptcList: [],
fecList: [],
ptyratList: [],
}
}
}
export const Pattern = {
......@@ -153,7 +157,7 @@ export const Pattern = {
],
"lidmaxdur": [
{ "required": true, "message": "必输项", "trigger": "blur" },
{ "pattern": /^[1-9]\d{0,3}$/, "message": "整数不能超过4位", "trigger": "blur" }
{ "pattern": /^-?\d{0,4}$/, "message": "整数不能超过4位", "trigger": "blur" }
],
"trdcndflg": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
......@@ -161,19 +165,19 @@ export const Pattern = {
],
"trdtentot": [
{ "required": true, "message": "必输项", "trigger": "blur" },
{ "pattern": /^[1-9]\d{0,4}$/, "message": "整数不能超过5位", "trigger": "blur" }
{ "pattern": /^-?\d{0,5}$/, "message": "整数不能超过5位", "trigger": "blur" }
],
"trdtenini": [
{ "required": true, "message": "必输项", "trigger": "blur" },
{ "pattern": /^[1-9]\d{0,4}$/, "message": "整数不能超过5位", "trigger": "blur" }
{ "pattern": /^-?\d{0,5}$/, "message": "整数不能超过5位", "trigger": "blur" }
],
"trdtenext": [
{ "required": true, "message": "必输项", "trigger": "blur" },
{ "pattern": /^[1-9]\d{0,4}$/, "message": "整数不能超过5位", "trigger": "blur" }
{ "pattern": /^-?\d{0,5}$/, "message": "整数不能超过5位", "trigger": "blur" }
],
"trdextnmb": [
{ "required": true, "message": "必输项", "trigger": "blur" },
{ "pattern": /^[1-9]\d{0,4}$/, "message": "整数不能超过5位", "trigger": "blur" }
{ "pattern": /^-?\d{0,5}$/, "message": "整数不能超过5位", "trigger": "blur" }
],
"badcndflg": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
......@@ -181,7 +185,7 @@ export const Pattern = {
],
"badtenext": [
{ "required": true, "message": "必输项", "trigger": "blur" },
{ "pattern": /^[1-9]\d{0,3}$/, "message": "整数不能超过4位", "trigger": "blur" }
{ "pattern": /^-?\d{0,4}$/, "message": "整数不能超过4位", "trigger": "blur" }
],
"adrsta": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
......@@ -213,7 +217,7 @@ export const Pattern = {
],
"bilvvv": [
{ "required": true, "message": "必输项", "trigger": "blur" },
{ "pattern": /^[1-9]\d{0,7}\.\d{1,5}$/, "message": "整数不能超过8位,小数不能超过5位", "trigger": "blur" }
{ "pattern": /^-?\d{0,8}(\.\d{1,5})?$/, "message": "整数不能超过8位,小数不能超过5位", "trigger": "blur" }
],
"cunqii": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
......@@ -249,11 +253,11 @@ export const Pattern = {
],
"selrat": [
{ "required": true, "message": "必输项", "trigger": "blur" },
{ "pattern": /^[1-9]\d{0,4}\.\d{1,2}$/, "message": "整数不能超过5位,小数不能超过2位", "trigger": "blur" }
{ "pattern": /^-?\d{0,5}(\.\d{1,2})?$/, "message": "整数不能超过5位,小数不能超过2位", "trigger": "blur" }
],
"buyrat": [
{ "required": true, "message": "必输项", "trigger": "blur" },
{ "pattern": /^[1-9]\d{0,4}\.\d{1,2}$/, "message": "整数不能超过5位,小数不能超过2位", "trigger": "blur" }
{ "pattern": /^-?\d{0,5}(\.\d{1,2})?$/, "message": "整数不能超过5位,小数不能超过2位", "trigger": "blur" }
],
"bngcod": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
......@@ -287,3 +291,5 @@ export const Pattern = {
{ "type": "string", "trigger": "blur" }
]
}
<template>
<div class="eibs-tab">
<c-col :span="24">
<div>汇率信息</div>
</c-col>
<c-col :span="24">
<c-table :list="model.ptyratList" :columnsConfig="ptyratColumns"></c-table>
</c-col>
<c-col :span="24">
<div>费率信息</div>
</c-col>
<c-col :span="24">
<c-table :list="model.fecList" :columnsConfig="fecColumns"></c-table>
</c-col>
</div>
</template>
<script>
export default {
props: ["model"],
data() {
return {
ptyratColumns: [
{ label: "cur", prop: "cur", width: "auto" },
{ label: "buytyp", prop: "buytyp", width: "auto" },
{ label: "buyrat", prop: "buyrat", width: "auto" },
{ label: "seltyp", prop: "seltyp", width: "auto" },
{ label: "selrat", prop: "selrat", width: "auto" },
],
fecColumns: [
{ label: "codFee", prop: "codFee", width: "auto" },
{ label: "begdat", prop: "begdat", width: "auto" },
{ label: "enddat", prop: "enddat", width: "auto" },
{ label: "calcbs", prop: "calcbs", width: "auto" },
{ label: "mincur", prop: "mincur", width: "auto" },
{ label: "minamt", prop: "minamt", width: "auto" },
{ label: "maxamt", prop: "maxamt", width: "auto" },
{ label: "untamt", prop: "untamt", width: "auto" },
{ label: "ratcal", prop: "ratcal", width: "auto" },
],
};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eContainer">
<c-page :title="title">
<el-form
ref="modelForm"
label-width="120px"
size="small"
label-position="right"
:model="model"
:rules="rules"
:validate-on-rule-change="false"
:disabled="isDisabled"
>
<c-tabs v-model="tabVal" ref="elment" type="card">
<el-tab-pane label="基本信息" name="pty">
<c-content>
<m-pty-info :model="model" />
</c-content>
</el-tab-pane>
<el-tab-pane label="地址信息" name="pta,adr">
<c-content>
<m-adr-list :model="model" />
</c-content>
</el-tab-pane>
<el-tab-pane label="账号信息" name="act">
<c-content>
<m-act-info :model="model" />
</c-content>
</el-tab-pane>
<el-tab-pane label="联系人信息" name="ptc">
<c-content>
<m-ptc-info :model="model" />
</c-content>
</el-tab-pane>
<el-tab-pane label="汇率/费率信息" name="ptyrat,fec,fee">
<c-content>
<m-rat-info :model="model" />
</c-content>
</el-tab-pane>
</c-tabs>
</el-form>
<div style="text-align: center">
<c-button
type="primary"
style="margin-right: 10px"
@click="commitAdd"
v-if="type === 'add'"
>提 交</c-button
>
<c-button
type="primary"
style="margin-right: 10px"
@click="commitEdit"
v-if="type === 'edit'"
>提 交</c-button
>
<c-button
type="primary"
style="margin-right: 10px"
@click="commitDelete"
v-if="type === 'delete'"
>提 交</c-button
>
<c-button type="primary" @click="goBack">返 回</c-button>
</div>
</c-page>
</div>
</template>
<script>
import Pty, { Pattern } from "./Pty.js";
import PtyInfo from "./PtyInfo.vue";
import AdrList from "./AdrList.vue";
import ActInfo from "./ActInfo.vue";
import PtcInfo from "./PtcInfo.vue";
import RatInfo from "./RatInfo.vue";
import { queryDetailById, add, edit, deleteById } from "~/service/test/pty.js";
export default {
name: "StaticsDbipty",
components: {
"m-pty-info": PtyInfo,
"m-adr-list": AdrList,
"m-act-info": ActInfo,
"m-ptc-info": PtcInfo,
"m-rat-info": RatInfo,
},
provide() {
return {
root: this,
};
},
props: {
type: {
type: String,
default: "info"
},
title: {
type: String,
default: "dbipty"
}
},
data() {
return {
model: new Pty().data,
tabVal: "pty",
rules: Pattern,
};
},
computed: {
isDisabled() {
return this.type === "info" || this.type === "delete";
},
},
created() {
if (this.type !== "add") {
const inr = this.$route.params.inr;
queryDetailById(inr).then((res) => {
if (res.inr) {
this.model = res;
} else {
this.$message.error("客户不存在")
}
});
}
},
methods: {
commitAdd() {
this.$refs.modelForm.validate((validated) => {
if (validated) {
add(this.model)
.then((res) => {
this.$message.success("保存成功!");
this.goBack(true)
})
.catch((err) => {
this.$message.error("保存失败!");
});
}
});
},
commitEdit() {
this.$refs.modelForm.validate((validated) => {
if (validated) {
edit(this.model)
.then((res) => {
this.$message.success("保存成功!");
this.goBack()
})
.catch((err) => {
this.$message.error("保存失败!");
});
}
});
},
commitDelete() {
this.$confirm("是否确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteById(this.model.inr)
.then((res) => {
this.$message.success("删除成功!");
this.goBack(true)
})
.catch((err) => {
this.$message.error("删除失败!");
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
/**
* update 是否更新infpty的查询列表
*/
goBack(update) {
this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsInfpty", params: { update } });
},
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<!-- ----------左 ---------->
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label=" Name" prop="nam">
<c-input
v-model="model.nam"
placeholder="请输入External Visible Name"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="Street" prop="str1">
<c-input
v-model="model.str1"
maxlength="35"
placeholder="请输入Street/SWIFT Line 3"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="City" prop="loctxt">
<c-input
v-model="model.loctxt"
maxlength="25"
placeholder="请输入Textpart of City/Second Part of SWIFT Line 4"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<!-- PTY.IDTYPE -->
<el-form-item label="客户类别" prop="idtype">
<c-select
v-model="model.idtype"
style="width: 100%"
placeholder="请选择客户类别"
:code="getCodesByKey('persontype')"
>
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<!-- PTA.BRANCHINR -->
<el-form-item label="支行行号" prop="branchinr">
<c-select
v-model="model.branchinr"
style="width: 100%"
placeholder="请选择支行行号"
:code="getCodesByKey('zhbchinr')"
>
</c-select>
</el-form-item>
</c-col>
</c-col>
<!------------- 右 ---------->
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="Party No." prop="extkey">
<c-input
v-model="model.extkey"
maxlength="24"
placeholder="请输入Party No."
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="BIC " prop="bic">
<c-input
v-model="model.bic"
maxlength="11"
placeholder="请输入BIC "
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="ZIP Code" prop="loczip">
<c-input
v-model="model.loczip"
maxlength="10"
placeholder="请输入ZIP Code"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<!-- PTY.TRNMAN -->
<el-form-item label="交易主体" prop="trnman">
<c-select
v-model="model.trnman"
style="width: 100%"
placeholder="请选择交易主体"
:code="getCodesByKey('jyzt')"
>
</c-select>
</el-form-item>
<c-col :span="24">
<!-- PTY.IDCODE -->
<el-form-item label="统一社会信用代码" prop="idcode">
<c-input
v-model="model.idcode"
maxlength="18"
placeholder="请输入统一社会信用代码"
></c-input>
</el-form-item>
</c-col>
</c-col>
</c-col>
<c-col :span="24">
<!-- PTY.PTYTYP -->
<el-form-item label="Type" prop="ptytyp">
<c-col :span="2">
<c-checkbox v-model="seatyph" @change="ptytypeChange('H')"
>海关</c-checkbox
>
</c-col>
<c-col :span="4">
<c-checkbox v-model="seatypo" @change="ptytypeChange('O')"
>Other</c-checkbox
>
</c-col>
<c-col :span="4">
<c-checkbox v-model="seatypa" @change="ptytypeChange('A')"
>Own Address</c-checkbox
>
</c-col>
<c-col :span="4">
<c-checkbox
v-model="seatypb"
:checked="model.ptytyp === 'B'"
@change="ptytypeChange('B')"
>Bank</c-checkbox
>
</c-col>
<c-col :span="4">
<c-checkbox v-model="seatypc" @change="ptytypeChange('C')"
>Client</c-checkbox
>
</c-col>
</el-form-item>
</c-col>
<c-col :span="24">
<c-col :span="12" style="text-align: left">
<el-button type="primary" size="small" @click="ptyAdd">新增</el-button>
</c-col>
<c-col :span="12" style="text-align: right">
<el-button size="small" @click="handleReset">重置</el-button>
<el-button
type="primary"
icon="el-icon-search"
size="small"
@click="onInfptySearch()"
>查询
</el-button>
</c-col>
</c-col>
<c-col :span="24">
<c-paging-table
:data="ptyData"
:columns="ptyColumns"
:pageNumber="model.pageNum"
:pageSize="model.pageSize"
:total="model.total"
v-on:queryFunc="queryFunc"
:border="true"
>
<c-table-column fixed="right" prop="op" label="操作" width="240px">
<template slot-scope="{ scope }">
<c-button
style="margin-left: 0"
size="small"
@click="ptyInfo(scope.$index, scope.row)"
>详情</c-button
>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="ptyEdit(scope.$index, scope.row)"
>修改</c-button
>
<c-button
size="small"
style="margin-left: 5px"
@click="ptyDelete(scope.$index, scope.row)"
>删除</c-button
>
<el-popover placement="top-start" width="50" trigger="click">
<ul class="table-button-item-list">
<li>
<c-button size="small" style="margin-left: 0">指派</c-button>
</li>
<li>
<c-button size="small" style="margin-left: 0">删除</c-button>
</li>
</ul>
<a
slot="reference"
href="javascript:void(0)"
style="margin-left: 5px"
>
<i class="el-icon-more"></i>
</a>
</el-popover>
</template>
</c-table-column>
</c-paging-table>
</c-col>
</div>
</template>
<script>
import codes from "~/config/CodeTable";
import { queryByPage } from "~/service/test/pty.js";
export default {
name: "",
props: ["model"],
inject: ["root"],
data() {
return {
ptyData: [],
ptyColumns: [
{ label: '客户号', prop: 'extkey', width: '120' },
{ label: '中文名称', prop: '', width: '150' },
{ label: 'Name', prop: 'nam', width: '200' },
{ label: '客户类别', prop: 'idtype', width: '100' },
{ label: 'Street', prop: '', width: '200' },
{ label: '支行名称', prop: '', width: '98' },
{ label: 'ZIP', prop: '', width: '98' },
{ label: '支行行号', prop: '', width: '200' },
{ label: 'City', prop: '', width: '120' },
{ label: '组织机构代码', prop: '', width: '200' },
{ label: 'BIC', prop: '', width: '70' },
{ label: '统一社会信用代码', prop: 'idcode', width: '200' },
{ label: '交易主体', prop: 'trnman', width: '98' },
],
};
},
computed: {
seatypb: {
get: function () {
return this.model.ptytyp === "B";
},
set: function (val) {
this.model.ptytyp = val ? "B" : "";
},
},
seatypc: {
get: function () {
return this.model.ptytyp === "C";
},
set: function (val) {
this.model.ptytyp = val ? "C" : "";
},
},
seatypa: {
get: function () {
return this.model.ptytyp === "A";
},
set: function (val) {
this.model.ptytyp = val ? "A" : "";
},
},
seatypo: {
get: function () {
return this.model.ptytyp === "O";
},
set: function (val) {
this.model.ptytyp = val ? "O" : "";
},
},
seatyph: {
get: function () {
return this.model.ptytyp === "H";
},
set: function (val) {
this.model.ptytyp = val ? "H" : "";
},
},
},
activated() {
const { update } = this.$route.params
if (update) {
this.onInfptySearch()
}
},
methods: {
handleReset() {
this.root.$refs.modelForm.resetFields();
},
onInfptySearch() {
queryByPage(this.model).then(res => {
/**
* pageNumber: 0
* pageSize: 0
* total: 69
* totalPage: 0
*/
const list = res.list
this.ptyData = list
this.model.pageNum = res.pageNumber
this.model.pageSize = res.pageSize
this.model.total = res.total
})
},
queryFunc(pageNumber, pageSize) {
this.model.pageNum = pageNumber
this.model.pageSize = pageSize
this.onInfptySearch()
},
ptytypeChange(val) {
this.model.ptytyp = val;
},
getCodesByKey(key) {
return codes[key] ?? [];
},
ptyAdd() {
this.$router.push(`/statics/dbapty`)
},
ptyInfo(index, row) {
this.$router.push(`/statics/dbipty/${row.inr}`)
},
ptyEdit(index, row) {
this.$router.push(`/statics/dbepty/${row.inr}`)
},
ptyDelete(index, row) {
this.$router.push(`/statics/dbdpty/${row.inr}`)
},
},
};
</script>
<style scoped>
.table-button-item-list {
padding: 0;
margin: 0;
}
.table-button-item-list li {
list-style: none;
padding: 5px 0;
text-align: center;
color: #606266;
cursor: pointer;
}</style>
<template>
<div class="eContainer">
<c-page title="客户信息查询">
<el-form
:model="model"
ref="modelForm"
label-width="120px"
label-position="right"
size="small"
>
<c-tabs v-model="tabVal" ref="elment" type="card">
<!--PD000039 -->
<el-tab-pane label="客户查询" name="infsea">
<c-content>
<m-infsea :model="model" ref="infsea" />
</c-content>
</el-tab-pane>
</c-tabs>
</el-form>
</c-page>
</div>
</template>
<script>
import Infsea from "./Infsea";
export default {
name: "StaticsInfpty",
components: {
"m-infsea": Infsea,
},
provide() {
return {
root: this,
};
},
data() {
return {
tabVal: "infsea",
model: {
// pty
nam: "",
extkey: "",
idtype: "",
trnman: "",
idcode: "",
ptytyp: "C",
// adr
loczip: "",
bic: "",
str1: "",
loctxt: "",
// pta
branchinr: "",
// paging
pageNum: 1,
pageSize: 5,
total: 0
},
};
},
};
</script>
<style></style>
<template>
<div class="eContainer">
<c-page title="infpty">
<el-form
ref="modelForm"
label-width="120px"
size="small"
label-position="right"
:model="model"
:rules="rules"
:validate-on-rule-change="false"
>
<c-tabs v-model="tabVal" ref="elment" type="card">
<el-tab-pane label="客户信息" name="pty">
<c-content>
<m-pty-info :model="model"/>
</c-content>
</el-tab-pane>
<el-tab-pane label="详细地址" name="adr">
<c-content>
<m-adr-list :model="model"/>
</c-content>
</el-tab-pane>
</c-tabs>
</el-form>
<div style="text-align: center;">
<c-button type="primary">保 存</c-button>
</div>
</c-page>
</div>
</template>
<script>
import Pty, { Pattern } from "./Pty.js";
import PtyInfo from "./PtyInfo.vue";
import AdrList from "./AdrList.vue";
import { queryDetailById } from "~/service/test";
export default {
name: "Pty",
components: {
"m-pty-info": PtyInfo,
"m-adr-list": AdrList,
},
data() {
return {
model: new Pty().data,
tabVal: "pty",
rules: Pattern
};
},
created() {
const inr = this.$route.params.inr
queryDetailById(inr).then(res => {
this.model = res
})
},
methods: {},
};
</script>
<style>
</style>
\ No newline at end of file
import Pty from "./Pty";
import Infpty from "./Infpty";
import Dbipty from "./Dbipty";
import Dbapty from "./Dbapty";
import Dbepty from "./Dbepty";
import Dbdpty from "./Dbdpty";
const StaticsRouter = [
{ path: 'pty/:inr', component: Pty, name: 'Pty', meta: { title: (tag) => { return 'Pty信息详情-' + tag.params.inr } } },
{ path: 'infpty', component: Infpty, name: 'StaticsInfpty', meta: { title: '客户查询' } },
{ path: 'dbapty', component: Dbapty, name: 'StaticsDbapty', meta: { title: '客户新增' } },
{ path: 'dbipty/:inr', component: Dbipty, name: 'StaticsDbipty', meta: { title: (tag) => { return '客户详情: ' + tag.params.inr } } },
{ path: 'dbepty/:inr', component: Dbepty, name: 'StaticsDbepty', meta: { title: (tag) => { return '客户修改: ' + tag.params.inr } } },
{ path: 'dbdpty/:inr', component: Dbdpty, name: 'StaticsDbdpty', meta: { title: (tag) => { return '客户删除: ' + tag.params.inr } } },
]
export default StaticsRouter
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