Commit 4192beda by nanrui

cur静态交易优化。

parent a4a58527
......@@ -4,8 +4,8 @@ export function queryByPage(data) {
return Api.post("/test/cur/queryByPage", data)
}
export function queryDetailById(inr) {
return Api.post(`/test/cur/queryDetailById?inr=${inr}`)
export function curInfo(inr) {
return Api.post(`/test/cur/queryById?inr=${inr}`)
}
export function add(data) {
......@@ -16,8 +16,8 @@ export function edit(data) {
return Api.post("/test/cur/edit", data)
}
export function deleteById(inr) {
return Api.post(`/test/cur/deleteById?inr=${inr}`)
export function deleteById(data) {
return Api.post(`/test/cur/deleteById`, data)
}
// export function addAdrData(inr, data) {
......
<template>
<div class="eibs-tab">
<!-- 左边 -->
<c-col :span="12" class="col-left">
<!-- <c-col :span="24">
<el-form-item label="inr" prop="inr">
<c-input v-model="model.inr" placeholder="请输入inr">
</c-input>
</el-form-item>
</c-col> -->
<c-col :span="24">
<el-form-item label="cod" prop="cod">
<!-- <c-select v-model="model.cod" style="width: 100%" placeholder="请输入cod">
<el-option v-for="item in codes.currencycode" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</c-select> -->
<c-input v-model="model.cod" style="width: 100%" placeholder="请输入cod">
</c-input>
<!-- <c-select v-model="model.cod" placeholder="请输入cod" code="codes.currencycode"
style="width: 100%;">
</c-select> -->
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="rndunt" prop="rndunt">
<c-input-currency-min v-model="model.rndunt" placeholder="请输入rndunt">
</c-input-currency-min>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="bas" prop="bas">
<c-input v-model="model.bas" placeholder="请输入bas">
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="acc1" prop="acc1">
<c-input v-model="model.acc1" placeholder="请输入acc1">
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="acc2" prop="acc2">
<c-input v-model="model.acc2" placeholder="请输入acc2">
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<c-col :span="12">
<el-form-item label="seq" prop="seq" style="width: 100%">
<c-input v-model="model.seq" placeholder="请输入seq" style="width: 100%">
</c-input>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="newcur" prop="newcur" style="width: 100%">
<c-select v-model="model.newcur" placeholder="请输入newcur" style="width: 100%">
<el-option v-for="item in codes.currencycode" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="12">
<el-form-item label="begdat" prop="begdat" style="width: 100%">
<c-date-picker type="date" v-model="model.begdat" placeholder="请输入begdat"
style="width: 100%">
</c-date-picker>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="enddat" prop="enddat" style="width: 100%">
<c-date-picker type="date" v-model="model.enddat" placeholder="请输入enddat"
style="width: 100%">
</c-date-picker>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12">
<el-form-item label="dbtday" prop="dbtday">
<c-input v-model="model.dbtday" placeholder="请输入dbtday">
</c-input>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="cdtday" prop="cdtday">
<c-input v-model="model.cdtday" placeholder="请输入cdtday">
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<c-col :span="12">
<el-form-item label="maxcur" prop="maxcur" style="width: 100%">
<c-select v-model="model.maxcur" placeholder="请输入maxcur" style="width: 100%">
<el-option v-for="item in codes.currencycode" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="maxamt" prop="maxamt">
<c-input-currency v-model="model.maxamt" placeholder="请输入maxamt">
</c-input-currency>
</el-form-item>
</c-col>
</c-col>
</c-col>
<!-- 右边 -->
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="altcod" prop="altcod">
<c-input v-model="model.altcod" placeholder="请输入altcod">
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="dec" prop="dec">
<c-input v-model="model.dec" placeholder="请输入dec">
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="dif" prop="dif">
<c-input v-model="model.dif" placeholder="请输入dif">
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="glbrat" prop="glbrat">
<c-input-currency v-model="model.glbrat" placeholder="请输入glbrat">
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="bsrmar" prop="bsrmar">
<c-input-currency v-model="model.bsrmar" placeholder="请输入bsrmar">
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="sqrmar" prop="sqrmar">
<c-input-currency v-model="model.sqrmar" placeholder="请输入sqrmar">
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="odrintday" prop="odrintday">
<c-input v-model="model.odrintday" placeholder="请输入odrintday">
</c-input>
</el-form-item>
</c-col>
<c-col :span="24" style="padding-left: 120px">
<el-table :data="stmData.data" border>
<el-table-column prop="uilcod" label="Language" sortable width="220">
</el-table-column>
<el-table-column prop="nam" label="Description" sortable width="300">
</el-table-column>
</el-table>
</c-col>
<!-- <c-col :span="24">
<el-form-item label="ver" prop="ver">
<c-input v-model="model.ver" placeholder="请输入ver">
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="etgextkey" prop="etgextkey">
<c-input v-model="model.etgextkey" placeholder="请输入etgextkey">
</c-input>
</el-form-item>
</c-col> -->
</c-col>
</div>
</template>
<script>
export default {
name: "",
inject: ["root"],
props: ["model",],
data() {
return {
stmData: {
data: [],
},
codes: {
currencycode: [
{ label: "人民币", value: "CNY" },
{ label: "韩圆", value: "KRW" },
{ label: "新西兰元", value: "NZD" },
{ label: "美元", value: "USD" },
],
}
};
},
mounted() {
// console.log(codes);
}
};
</script>
\ No newline at end of file
<template>
<m-cur ref="cur" title="dbacur" type="add"></m-cur>
<div class="eContainer">
<c-page title="货币查询">
<el-form :model="model" ref="modelForm" label-width="120px" label-position="right" size="small">
<c-content>
<m-currency :model="model" ref="currency" />
</c-content>
</el-form>
<div style="text-align: center">
<c-button type="primary" style="margin-right: 10px" @click="commitAdd">提 交</c-button>
<c-button type="primary" @click="goBack">返 回</c-button>
</div>
</c-page>
</div>
</template>
<script>
import Dbicur from "~/views/Statics/Dbicur";
import Utils from "~/utils";
import commonFuncs from "~/mixin/commonFuncs";
import Cur, { Pattern } from "../Infcur/Cur.js";
import Currency from "./Currency";
import { curInfo, add, edit, curDelete } from "~/service/test/cur.js";
export default {
name: "StaticsDbacur",
components: {
"m-cur": Dbicur
"m-currency": Currency
},
provide() {
return {
root: this,
};
},
mixins: [commonFuncs],
data() {
return {};
return {
tabVal: "",
model: new Cur().data,
rules: Pattern,
};
},
methods: {
commitAdd() {
this.$refs.modelForm.validate((validated) => {
if (validated) {
add(this.model)
.then((res) => {
console.log(this.model);
this.$message.success("保存成功!");
this.goBack(true)
})
.catch((err) => {
this.$message.error("保存失败!");
});
} else {
Utils.formValidateTips(this.$refs.modelForm.fields)
}
});
},
goBack(update) {
this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsInfcur", params: { update } });
},
},
mounted() {
// this.$refs.cur.rules['ptaList'] = [
// { type: 'array', required: true, min: 1, message: '地址信息栏不能为空' }
// ]
console.log(this.$refs.modelForm);
}
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-cur title="dbecur" type="edit"></m-cur>
<div class="eContainer">
<c-page title="货币查询">
<el-form :model="model" ref="modelForm" label-width="120px" label-position="right" size="small">
<c-content>
<m-currency :model="model" ref="currency" />
</c-content>
</el-form>
<div style="text-align: center">
<c-button type="primary" style="margin-right: 10px" @click="commitEdit">提 交</c-button>
<c-button type="primary" @click="goBack">返 回</c-button>
</div>
</c-page>
</div>
</template>
<script>
import Dbicur from "~/views/Statics/Dbicur";
import Utils from "~/utils";
// import commonFuncs from "~/mixin/commonFuncs";
import Cur, { Pattern } from "../Infcur/Cur.js";
import Currency from "../Dbacur/Currency";
import { curInfo, add, edit, curDelete } from "~/service/test/cur.js";
export default {
name: "StaticsDbecur",
name: "StaticsDbacur",
components: {
"m-cur": Dbicur
"m-currency": Currency
},
provide() {
return {
root: this,
};
},
// mixins: [commonFuncs],
data() {
return {};
return {
tabVal: "",
model: new Cur().data,
rules: Pattern,
};
},
methods: {
commitEdit() {
this.model.inr = this.$route.params.inr
this.$refs.modelForm.validate((validated) => {
if (validated) {
edit(this.model)
.then((res) => {
this.$message.success("保存成功!");
this.goBack()
})
.catch((err) => {
this.$message.error("保存失败!");
});
} else {
Utils.formValidateTips(this.$refs.modelForm.fields)
}
});
},
goBack(update) {
this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsInfcur", params: { update } });
},
},
mounted() {
// this.$refs.cur.rules['ptaList'] = [
// { type: 'array', required: true, min: 1, message: '地址信息栏不能为空' }
// ]
console.log(this.$refs.modelForm);
}
};
</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: "",
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: "",
// pat
inrpat: "",
ptyinrpat: "",
nampat: "",
pripat: "",
enopat: "",
objtyppat: "",
objinrpat: "",
objkeypat: "",
usgpat: "",
verpat: "",
bicpat: "",
adrstapat: "",
ptytyppat: "",
ptyextkeypat: "",
tidpat: "",
etgextkeypat: "",
branchinrpat: "",
bchkeyinrpat: "",
nam1pat: "",
issbchinfpat: "",
opnflgpat: "",
}
}
}
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" }
],
"extkey": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 16, "message": "最大长度16个字符", "trigger": "blur" }
],
"nam": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 40, "message": "最大长度40个字符", "trigger": "blur" }
],
"bic": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 11, "message": "最大长度11个字符", "trigger": "blur" }
],
"bicaut": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"bid": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 35, "message": "最大长度35个字符", "trigger": "blur" }
],
"blz": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"clc": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 35, "message": "最大长度35个字符", "trigger": "blur" }
],
"dpt": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 35, "message": "最大长度35个字符", "trigger": "blur" }
],
"eml": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 80, "message": "最大长度80个字符", "trigger": "blur" }
],
"fax1": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 20, "message": "最大长度20个字符", "trigger": "blur" }
],
"fax2": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 20, "message": "最大长度20个字符", "trigger": "blur" }
],
"nam1": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 35, "message": "最大长度35个字符", "trigger": "blur" }
],
"nam2": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 35, "message": "最大长度35个字符", "trigger": "blur" }
],
"nam3": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 35, "message": "最大长度35个字符", "trigger": "blur" }
],
"str1": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 35, "message": "最大长度35个字符", "trigger": "blur" }
],
"str2": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 35, "message": "最大长度35个字符", "trigger": "blur" }
],
"loczip": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 10, "message": "最大长度10个字符", "trigger": "blur" }
],
"loctxt": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 25, "message": "最大长度25个字符", "trigger": "blur" }
],
"loc2": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 35, "message": "最大长度35个字符", "trigger": "blur" }
],
"loccty": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 2, "message": "最大长度2个字符", "trigger": "blur" }
],
"cortyp": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 3, "message": "最大长度3个字符", "trigger": "blur" }
],
"pob": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 35, "message": "最大长度35个字符", "trigger": "blur" }
],
"pobzip": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 10, "message": "最大长度10个字符", "trigger": "blur" }
],
"pobtxt": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 25, "message": "最大长度25个字符", "trigger": "blur" }
],
"tel1": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 20, "message": "最大长度20个字符", "trigger": "blur" }
],
"tel2": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 20, "message": "最大长度20个字符", "trigger": "blur" }
],
"tid": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 23, "message": "最大长度23个字符", "trigger": "blur" }
],
"tlx": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 20, "message": "最大长度20个字符", "trigger": "blur" }
],
"tlxaut": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"uil": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 2, "message": "最大长度2个字符", "trigger": "blur" }
],
"ver": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 4, "message": "最大长度4个字符", "trigger": "blur" }
],
"manmod": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"rtgflg": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"tarflg": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"dtacid": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 23, "message": "最大长度23个字符", "trigger": "blur" }
],
"dtecid": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 23, "message": "最大长度23个字符", "trigger": "blur" }
],
"etgextkey": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"adr1": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 40, "message": "最大长度40个字符", "trigger": "blur" }
],
"adr2": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 40, "message": "最大长度40个字符", "trigger": "blur" }
],
"adr3": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 40, "message": "最大长度40个字符", "trigger": "blur" }
],
"adr4": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 40, "message": "最大长度40个字符", "trigger": "blur" }
],
"discod": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 6, "message": "最大长度6个字符", "trigger": "blur" }
],
"namelc": [
{ "type": "string", "trigger": "blur" },
{ "max": 216, "message": "最大长度216个字符", "trigger": "blur" }
],
"adrelc": [
{ "type": "string", "trigger": "blur" },
{ "max": 216, "message": "最大长度216个字符", "trigger": "blur" }
],
"dtgcid": [
{ "type": "string", "trigger": "blur" },
{ "max": 23, "message": "最大长度23个字符", "trigger": "blur" }
]
}
<template>
<div class="eibs-tab">
<div style="text-align: right">
<c-button size="small" type="primary" @click="adrAdd()"> 新增 </c-button>
</div>
<el-form-item label="" label-width="0" prop="ptaList">
<c-table :columnsConfig="columns" :list="model.ptaList">
<c-table-column fixed="right" prop="op" label="操作" width="200px">
<template slot-scope="{ scope }">
<button
class="el-button el-button--default el-button--small"
style="margin-left: 0"
size="small"
:disabled="false"
@click.prevent="adrInfo(scope.$index, scope.row)"
>
<span>详情</span>
</button>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="adrEdit(scope.$index, scope.row)"
>
修改
</c-button>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="adrDelete(scope.$index, scope.row)"
>
删除
</c-button>
</template>
</c-table-column>
</c-table>
</el-form-item>
<el-dialog
:title="
'地址信息:' +
(operate === 'details' ? '详情' : operate === 'edit' ? '修改' : '新增')
"
:visible.sync="adrDialog"
top="10vh"
width="80%"
: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">
<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,
},
inject: ["root"],
props: ["model"],
data() {
return {
adrDialog: false,
adr: null,
operate: "",
operateIdx: 0,
columns: [
{ label: "usgpat", prop: "usgpat", width: "auto" },
{ label: "adrstapat", prop: "adrstapat", width: "auto" },
{ label: "extkey", prop: "extkey", width: "auto" },
{ label: "bic", prop: "bic", 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: "adr1", prop: "adr1", width: "auto" },
{ label: "adr2", prop: "adr2", width: "auto" },
{ label: "adr3", prop: "adr3", width: "auto" },
],
};
},
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("修改地址信息失败!");
});
}
});
},
/**
* Adr新增有2种情况
* 1. pty的新增界面下,此时pty的inr为空,adr需要在pty插入之后,才能执行新增,
* 所以我们在这里不能直接调用新增接口,将adr添加到ptaList中,随着这个pty一起传入接口。
* 2. pty的修改界面下,可直接新增 ;
*/
saveAdr() {
for (const key in this.adr) {
if (Object.hasOwnProperty.call(this.adr, key)) {
const v = this.adr[key];
if (typeof v === 'string' && v === '') {
this.adr[key] = " "
}
}
}
if (this.root.type === "add") {
this.model.ptaList.push(this.adr);
this.handleClose();
} else {
this.$refs.adr.$refs.modelForm.validate((validated) => {
if (validated) {
addAdrData(this.model.inr, this.adr)
.then((res) => {
if (res && res.inr) {
this.$message.success("保存地址信息成功!");
this.model.ptaList = res.ptaList;
this.handleClose();
}
})
.catch((error) => {
this.$message.error("保存地址信息失败!");
});
}
});
}
},
handleClose(done) {
this.adrDialog = false;
if (done && typeof done === "function") {
done();
}
},
},
};
</script>
<style></style>
<template>
<div class="eibs-tab">
<!-- 左边 -->
<c-col :span="12" class="col-left">
<!-- <c-col :span="24">
<el-form-item label="inr" prop="inr">
<c-input v-model="model.inr" placeholder="请输入inr">
</c-input>
</el-form-item>
</c-col> -->
<c-col :span="24">
<el-form-item label="cod" prop="cod">
<c-select v-model="model.cod" style="width: 100%" placeholder="请输入cod" disabled>
<el-option v-for="item in codes.currencycode" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</c-select>
<!-- <c-select v-model="model.cod" placeholder="请输入cod" code="codes.currencycode"
style="width: 100%;">
</c-select> -->
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="rndunt" prop="rndunt">
<c-input-currency-min v-model="model.rndunt" placeholder="请输入rndunt" disabled>
</c-input-currency-min>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="bas" prop="bas">
<c-input v-model="model.bas" placeholder="请输入bas" disabled>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="acc1" prop="acc1">
<c-input v-model="model.acc1" placeholder="请输入acc1" disabled>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="acc2" prop="acc2">
<c-input v-model="model.acc2" placeholder="请输入acc2" disabled>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<c-col :span="12">
<el-form-item label="seq" prop="seq" style="width: 100%">
<c-input v-model="model.seq" placeholder="请输入seq" style="width: 100%" disabled>
</c-input>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="newcur" prop="newcur" style="width: 100%">
<c-select v-model="model.newcur" placeholder="请输入newcur" style="width: 100%" disabled>
<el-option v-for="item in codes.currencycode" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="12">
<el-form-item label="begdat" prop="begdat" style="width: 100%">
<c-date-picker type="date" v-model="model.begdat" placeholder="请输入begdat"
style="width: 100%" disabled>
</c-date-picker>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="enddat" prop="enddat" style="width: 100%">
<c-date-picker type="date" v-model="model.enddat" placeholder="请输入enddat"
style="width: 100%" disabled>
</c-date-picker>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12">
<el-form-item label="dbtday" prop="dbtday">
<c-input v-model="model.dbtday" placeholder="请输入dbtday" disabled>
</c-input>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="cdtday" prop="cdtday">
<c-input v-model="model.cdtday" placeholder="请输入cdtday" disabled>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<c-col :span="12">
<el-form-item label="maxcur" prop="maxcur" style="width: 100%">
<c-select v-model="model.maxcur" placeholder="请输入maxcur" style="width: 100%" disabled>
<el-option v-for="item in codes.currencycode" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="maxamt" prop="maxamt">
<c-input-currency v-model="model.maxamt" placeholder="请输入maxamt" disabled>
</c-input-currency>
</el-form-item>
</c-col>
</c-col>
</c-col>
<!-- 右边 -->
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="altcod" prop="altcod">
<c-input v-model="model.altcod" placeholder="请输入altcod" disabled>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="dec" prop="dec">
<c-input v-model="model.dec" placeholder="请输入dec" disabled>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="dif" prop="dif">
<c-input v-model="model.dif" placeholder="请输入dif" disabled>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="glbrat" prop="glbrat">
<c-input-currency v-model="model.glbrat" placeholder="请输入glbrat" disabled>
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="bsrmar" prop="bsrmar">
<c-input-currency v-model="model.bsrmar" placeholder="请输入bsrmar" disabled>
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="sqrmar" prop="sqrmar" disabled>
<c-input-currency v-model="model.sqrmar" placeholder="请输入sqrmar" disabled>
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="odrintday" prop="odrintday">
<c-input v-model="model.odrintday" placeholder="请输入odrintday" disabled>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24" style="padding-left: 120px">
<el-table :data="stmData.data" border>
<el-table-column prop="uilcod" label="Language" sortable width="220">
</el-table-column>
<el-table-column prop="nam" label="Description" sortable width="300">
</el-table-column>
</el-table>
</c-col>
<!-- <c-col :span="24">
<el-form-item label="ver" prop="ver">
<c-input v-model="model.ver" placeholder="请输入ver">
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="etgextkey" prop="etgextkey">
<c-input v-model="model.etgextkey" placeholder="请输入etgextkey">
</c-input>
</el-form-item>
</c-col> -->
</c-col>
</div>
</template>
<script>
export default {
name: "",
inject: ["root"],
props: ["model",],
data() {
return {
stmData: {
data: [],
},
codes: {
currencycode: [
{ label: "人民币", value: "CNY" },
{ label: "韩圆", value: "KRW" },
{ label: "新西兰元", value: "NZD" },
{ label: "美元", value: "USD" },
],
}
};
},
mounted() {
// console.log(codes);
}
};
</script>
\ No newline at end of file
<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
<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">
<el-form ref="modelForm" label-width="120px" size="small" label-position="right" :model="model" :rules="rules">
<c-content>
<m-pty-info :model="model" />
<m-cur-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>
......@@ -44,24 +19,16 @@
<script>
import Utils from "~/utils";
import Cur, { Pattern } from "./Cur.js";
import Cur, { Pattern } from "../Infcur/Cur.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 Currency from "./Currency.vue";
import { queryDetailById, add, edit, deleteById } from "~/service/test/cur.js";
import { curInfo, add, edit, deleteById } from "~/service/test/cur.js";
export default {
name: "StaticsDbicur",
components: {
"m-pty-info": PtyInfo,
"m-adr-list": AdrList,
"m-act-info": ActInfo,
"m-ptc-info": PtcInfo,
"m-rat-info": RatInfo,
"m-cur-info": Currency,
},
provide() {
return {
......@@ -93,14 +60,16 @@ export default {
created() {
if (this.type !== "add") {
const inr = this.$route.params.inr;
queryDetailById(inr).then((res) => {
curInfo(inr).then((res) => {
if (res.inr) {
console.log(res);
this.model = res;
} else {
this.$message.error("客户不存在")
}
});
}
},
methods: {
commitAdd() {
......@@ -163,7 +132,7 @@ export default {
*/
goBack(update) {
this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsInfpty", params: { update } });
this.$router.push({ name: "StaticsInfcur", params: { update } });
},
},
......
export default class Cur {
constructor() {
this.data = {
inr: "",
cod: "",
newcur: "",
altcod: "",
dec: "",
seq: "",
acc1: "",
acc2: "",
bsrmar: "",
sqrmar: "",
glbrat: "",
dif: "",
bas: "",
rndunt: "",
begdat: "",
enddat: "",
odrintday: "",
dbtday: "",
cdtday: "",
maxcur: "",
maxamt: "",
ver: "",
etgextkey: "",
// cod: "",
// seanam: "",
// inr: "",
// cod: "",
// newcur: "",
// altcod: "",
// dec: "",
// seq: "",
// acc1: "",
// acc2: "",
// bsrmar: "",
// sqrmar: "",
// glbrat: "",
// dif: "",
// bas: "",
// rndunt: "",
// begdat: "",
// enddat: "",
// odrintday: "",
// dbtday: "",
// cdtday: "",
// maxcur: "",
// maxamt: "",
// ver: "",
// etgextkey: "",
"cod": "ppp",
"newcur": "",
"altcod": "",
"dec": 0,
"seq": 0,
"acc1": "",
"acc2": "",
"bsrmar": 0,
"sqrmar": 0,
"glbrat": 0,
"dif": 50,
"bas": 1,
"rndunt": 0,
"begdat": "2001-04-10T16:00:00.000+00:00",
"enddat": null,
"odrintday": 0,
"dbtday": 1,
"cdtday": 1,
"maxcur": "USD",
"maxamt": 9999999999.99,
"ver": "0001",
"etgextkey": "CEBGRP",
"pageSize": 0,
"pageNum": 0
}
}
}
......
......@@ -4,8 +4,8 @@
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="货币代码" prop="cod">
<c-select v-model="model.cod" placeholder="请输入货币代码" style="width: 100%">
</c-select>
<c-input v-model="model.cod" placeholder="请输入货币代码" style="width: 100%">
</c-input>
</el-form-item>
</c-col>
</c-col>
......@@ -25,6 +25,10 @@
</el-button>
</c-col>
<c-col :span="24" style="margin-top: 10px">
<c-button class="medium_bcs" size="medium" style="margin-left: 0px" type="primary" @click="toBbacur">添加货币</c-button>
</c-col>
<c-col :span="24">
<c-paging-table :data="curData" :columns="curColumns" :pageNumber="model.pageNum" :pageSize="model.pageSize"
:total="model.total" v-on:queryFunc="queryFunc" :border="true">
......@@ -57,7 +61,7 @@
<script>
import codes from "~/config/CodeTable";
import { queryByPage } from "~/service/test/cur.js";
import { queryByPage, deleteById } from "~/service/test/cur.js";
export default {
name: "",
......@@ -67,12 +71,15 @@ export default {
return {
curData: [],
curColumns: [
{ label: '币种', prop: 'extkey', width: '200' },
{ label: '描述', prop: '', width: '636' },
{ label: 'Currency', prop: 'cod', width: '200' },
{ label: 'Description', prop: 'seanam', width: '636' },
],
};
},
methods: {
toBbacur(){
this.$router.history.push("/statics/dbacur");
},
handleReset() {
this.root.$refs.modelForm.resetFields();
},
......@@ -93,6 +100,7 @@ export default {
this.model.pageNum = res.pageNumber
this.model.pageSize = res.pageSize
this.model.total = res.total
console.log(this.model);
})
},
async onInfbutSearow() {
......@@ -107,21 +115,6 @@ export default {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
// onInfcurSearch() {
// queryByPage(this.model).then(res => {
// /**
// * pageNumber: 0
// * pageSize: 0
// * total: 69
// * totalPage: 0
// */
// const list = res.list
// this.curData = 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
......@@ -137,13 +130,51 @@ export default {
this.$router.push(`/statics/dbacur`)
},
curInfo(index, row) {
// console.log(row);
this.$router.push(`/statics/dbicur/${row.inr}`)
},
curEdit(index, row) {
this.$router.push(`/statics/dbecur/${row.inr}`)
},
curDelete(index, row) {
this.$router.push(`/statics/dbdcur/${row.inr}`)
// curDelete(index, row) {
// this.$router.push(`/statics/dbdcur/${row.inr}`)
// },
curDelete(idx, row) {
this.$confirm("是否确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let paramsData = { };
paramsData.inr = row.inr;
// let result = deleteById(paramsData).then((d) => {return {data: d}});
// console.log(result);
// if(result == "true"){
// this.$message.success("删除成功!");
// }else{
// this.$message.error("删除失败!");
// }
deleteById(paramsData)
.then((res) => {
console.log(res);
this.$message.success("删除成功!");
this.goBack(true)
})
.catch((err) => {
console.log(err);
this.$message.error("删除失败!");
});
}).catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
goBack(update) {
this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsInfcur", params: { update } });
},
},
};
......
......@@ -2,44 +2,53 @@
<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">
<!-- <el-tab-pane label="查询面板" name="infsea"> -->
<c-content>
<m-infsea :model="model" ref="infsea" />
</c-content>
</el-tab-pane>
<!-- <el-tab-pane label="货币" name="curpo">
<!-- </el-tab-pane> -->
<!-- <el-tab-pane label="货币" name="currency">
<c-content>
<m-curpo :model="model" ref="curpo" />
<m-currency :model="model" ref="currency" />
</c-content>
</el-tab-pane> -->
</c-tabs>
</el-form>
</c-page>
</div>
</template>
<script>
import Utils from "~/utils";
import CodeTable from "~/config/CodeTable"
// import commonProcess from "~/mixin/commonProcess"
// import commonFuncs from "~/mixin/commonFuncs";
import Cur, { Pattern } from "./Cur.js";
import Infsea from "./Infsea";
// import Currency from "./Currency";
import { queryDetailById, add, edit, deleteById } from "~/service/test/cur.js";
export default {
name: "StaticsInfcur",
components: {
"m-infsea": Infsea,
// "m-currency": Currency,
},
provide() {
return {
root: this,
};
},
// mixins: [commonProcess, commonFuncs],
data() {
return {
tabVal: "infsea",
model: {
// cur
cod: "",
seanam: "",
tabVal: "",
model: new Cur().data,
rules: Pattern,
codes: {
...CodeTable,
},
};
},
......
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