Commit dc1bdf8b by huangxin

cty静态交易

parent 544dbefb
<template> <template>
<div class="eibs-tab"> <div class="eibs-tab">
<c-col :span="12" class="col-left"> <c-col :span="12" class="col-left">
<c-col :span="24"> <!-- <c-col :span="24">
<el-form-item label="inrBopcty" prop="inrBopcty"> <el-form-item label="ID" prop="inrBopcty">
<c-input <c-input
v-model="model.inrBopcty" v-model="model.inrBopcty"
placeholder="请输入inrBopcty" placeholder="请输入ID"
> >
</c-input> </c-input>
</el-form-item> </el-form-item>
</c-col> </c-col> -->
<c-col :span="24"> <c-col :span="24">
<el-form-item label="codBopcty" prop="codBopcty"> <el-form-item label="国家编号" prop="codBopcty">
<c-input <c-input
v-model="model.codBopcty" v-model="model.codBopcty"
placeholder="请输入codBopcty" placeholder="请输入国家编号"
> >
</c-input> </c-input>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="24"> <c-col :span="24">
<el-form-item label="numcodBopcty" prop="numcodBopcty"> <el-form-item label="Numcod" prop="numcodBopcty">
<c-input <c-input
v-model="model.numcodBopcty" v-model="model.numcodBopcty"
placeholder="请输入numcodBopcty" placeholder="请输入Numcod"
> >
</c-input> </c-input>
</el-form-item> </el-form-item>
...@@ -31,32 +31,32 @@ ...@@ -31,32 +31,32 @@
</c-col> </c-col>
<c-col :span="12" class="col-right"> <c-col :span="12" class="col-right">
<c-col :span="24"> <c-col :span="24">
<el-form-item label="txtBopcty" prop="txtBopcty"> <el-form-item label="国家简称" prop="txtBopcty">
<c-input <c-input
v-model="model.txtBopcty" v-model="model.txtBopcty"
placeholder="请输入txtBopcty" placeholder="请输入国家简称"
> >
</c-input> </c-input>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="24"> <c-col :span="24">
<el-form-item label="fultxtBopcty" prop="fultxtBopcty"> <el-form-item label="国家全称" prop="fultxtBopcty">
<c-input <c-input
v-model="model.fultxtBopcty" v-model="model.fultxtBopcty"
placeholder="请输入fultxtBopcty" placeholder="请输入国家全称"
> >
</c-input> </c-input>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="24"> <!-- <c-col :span="24">
<el-form-item label="verBopcty" prop="verBopcty"> <el-form-item label="Version" prop="verBopcty">
<c-input <c-input
v-model="model.verBopcty" v-model="model.verBopcty"
placeholder="请输入verBopcty" placeholder="请输入Version"
> >
</c-input> </c-input>
</el-form-item> </el-form-item>
</c-col> </c-col> -->
</c-col> </c-col>
</div> </div>
</template> </template>
......
<template> <template>
<div class="eibs-tab"> <div class="eibs-tab">
<c-col :span="12" class="col-left"> <c-col :span="12" class="col-left">
<c-col :span="24"> <!-- <c-col :span="24">
<el-form-item label="inr" prop="inr"> <el-form-item label="内部唯一ID号" prop="inr">
<c-input <c-input
v-model="model.inr" v-model="model.inr"
placeholder="请输入inr" placeholder="请输入内部唯一ID号"
> >
</c-input> </c-input>
</el-form-item> </el-form-item>
</c-col> </c-col> -->
<c-col :span="24"> <c-col :span="24">
<el-form-item label="cod" prop="cod"> <el-form-item label="国家代码" prop="cod">
<c-input <c-input
v-model="model.cod" v-model="model.cod"
placeholder="请输入cod" placeholder="请输入国家代码"
> >
</c-input> </c-input>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="24"> <c-col :span="24">
<el-form-item label="cur" prop="cur"> <el-form-item label="币种" prop="cur">
<c-input <c-input
v-model="model.cur" v-model="model.cur"
placeholder="请输入cur" placeholder="请输入币种"
> >
</c-input> </c-input>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="24"> <c-col :span="24">
<el-form-item label="reg" prop="reg"> <el-form-item label="区域" prop="reg">
<c-input <c-input
v-model="model.reg" v-model="model.reg"
placeholder="请输入reg" placeholder="请输入区域"
> >
</c-input> </c-input>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="24"> <!-- <c-col :span="24">
<el-form-item label="ver" prop="ver"> <el-form-item label="版本号" prop="ver">
<c-input <c-input
v-model="model.ver" v-model="model.ver"
placeholder="请输入ver" placeholder="请输入版本号"
> >
</c-input> </c-input>
</el-form-item> </el-form-item>
</c-col> </c-col> -->
</c-col> </c-col>
<c-col :span="12" class="col-right"> <c-col :span="12" class="col-right">
<c-col :span="24"> <c-col :span="24">
<el-form-item label="fmtdomadrtyp" prop="fmtdomadrtyp"> <el-form-item label="本国地址" prop="fmtdomadrtyp">
<c-input <c-input
v-model="model.fmtdomadrtyp" v-model="model.fmtdomadrtyp"
placeholder="请输入fmtdomadrtyp" placeholder="请输入本国地址"
> >
</c-input> </c-input>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="24"> <c-col :span="24">
<el-form-item label="fmtintadrtyp" prop="fmtintadrtyp"> <el-form-item label="国际地址" prop="fmtintadrtyp">
<c-input <c-input
v-model="model.fmtintadrtyp" v-model="model.fmtintadrtyp"
placeholder="请输入fmtintadrtyp" placeholder="请输入国际地址"
> >
</c-input> </c-input>
</el-form-item> </el-form-item>
......
...@@ -11,15 +11,15 @@ ...@@ -11,15 +11,15 @@
:validate-on-rule-change="false" :validate-on-rule-change="false"
:disabled="isDisabled" :disabled="isDisabled"
> >
<c-tabs v-model="tabVal" ref="elment" type="card"> <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="changePosition">
<el-tab-pane label="基本信息" name="cty"> <el-tab-pane label="国家地区信息" name="cty">
<c-content> <c-content>
<m-cty-info :model="model" /> <m-cty-info :model="model" />
</c-content> </c-content>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="???" name="bopcty"> <el-tab-pane label="收支申报国家代码表" name="bopcty">
<c-content> <c-content>
<m-bopcty-list :model="model" /> <m-bopcty-info :model="model" />
</c-content> </c-content>
</el-tab-pane> </el-tab-pane>
</c-tabs> </c-tabs>
...@@ -59,13 +59,13 @@ import Cty, { Pattern } from "./Cty.js"; ...@@ -59,13 +59,13 @@ import Cty, { Pattern } from "./Cty.js";
import CtyInfo from "./CtyInfo.vue"; import CtyInfo from "./CtyInfo.vue";
import BopctyInfo from "./BopctyInfo.vue"; import BopctyInfo from "./BopctyInfo.vue";
import { queryById, add, edit, deleteById } from "~/service/test/cty.js"; import { queryById, add, edit, deleteById, editBopctyData, deleteBopctyById} from "~/service/test/cty.js";
export default { export default {
name: "StaticsDbicty", name: "StaticsDbicty",
components: { components: {
"m-cty-info":CtyInfo, "m-cty-info":CtyInfo,
"m-bopcty-list":BopctyInfo, "m-bopcty-info":BopctyInfo,
}, },
provide() { provide() {
return { return {
...@@ -87,6 +87,7 @@ export default { ...@@ -87,6 +87,7 @@ export default {
model: new Cty().data, model: new Cty().data,
tabVal: "cty", tabVal: "cty",
rules: Pattern, rules: Pattern,
tabPosition:"tab-cty",
}; };
}, },
computed: { computed: {
...@@ -101,7 +102,7 @@ export default { ...@@ -101,7 +102,7 @@ export default {
if (res.inr) { if (res.inr) {
this.model = res; this.model = res;
} else { } else {
this.$message.error("国家代码不存在") this.$message.error("国家地区信息不存在")
} }
}); });
} }
...@@ -126,14 +127,24 @@ export default { ...@@ -126,14 +127,24 @@ export default {
commitEdit() { commitEdit() {
this.$refs.modelForm.validate((validated) => { this.$refs.modelForm.validate((validated) => {
if (validated) { if (validated) {
if(this.tabPosition===`tab-cty`){
edit(this.model) edit(this.model)
.then((res) => { .then((res) => {
this.$message.success("保存成功!"); this.$message.success("国家地区信息保存成功!");
this.goBack() this.goBack()
}) })
.catch((err) => { .catch((err) => {
this.$message.error("保存失败!"); this.$message.error("国家地区信息保存失败!");
});}else{
editBopctyData(this.model.inr,this.model)
.then((res) => {
this.$message.success("收支申报国家代码表保存成功!");
this.goBack()
})
.catch((err) => {
this.$message.error("收支申报国家代码表保存失败!");
}); });
}
} else { } else {
Utils.formValidateTips(this.$refs.modelForm.fields) Utils.formValidateTips(this.$refs.modelForm.fields)
} }
...@@ -146,14 +157,24 @@ export default { ...@@ -146,14 +157,24 @@ export default {
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
if(this.tabPosition===`tab-cty`){
deleteById(this.model.inr) deleteById(this.model.inr)
.then((res) => { .then((res) => {
this.$message.success("删除成功!"); this.$message.success("国家地区信息删除成功!");
this.goBack(true) this.goBack(true)
}) })
.catch((err) => { .catch((err) => {
this.$message.error("删除失败!"); this.$message.error("国家地区信息删除失败!");
}); })}else{
deleteBopctyById(this.model)
.then((res) => {
this.$message.success("收支申报国家代码表删除成功!");
this.goBack(true)
})
.catch((err) => {
this.$message.error("收支申报国家代码表删除失败!");
})
};
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({
...@@ -169,6 +190,10 @@ export default { ...@@ -169,6 +190,10 @@ export default {
this.$store.dispatch("TagsView/delView", this.$route); this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsInfcty", params: { update } }); this.$router.push({ name: "StaticsInfcty", params: { update } });
}, },
changePosition(tab,event){
this.tabPosition=event.target.getAttribute('id');
console.log(this.tabPosition)
},
}, },
}; };
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- ----------左 ----------> <!-- ----------左 ---------->
<c-col :span="12" class="col-left"> <c-col :span="12" class="col-left">
<c-col :span="24"> <c-col :span="24">
<el-form-item label="Country or region Code" prop="cod"> <el-form-item label="国家代码" prop="cod">
<c-input v-model="model.cod" placeholder=""></c-input> <c-input v-model="model.cod" placeholder=""></c-input>
</el-form-item> </el-form-item>
</c-col> </c-col>
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
<!------------- 右 ----------> <!------------- 右 ---------->
<c-col :span="12" class="col-right"> <c-col :span="12" class="col-right">
<c-col :span="24"> <c-col :span="24">
<el-form-item label="Name" prop="nam"> <el-form-item label="国家简称" prop="txtBopcty">
<c-input v-model="model.nam" placeholder=""></c-input> <c-input v-model="model.txtBopcty" placeholder=""></c-input>
</el-form-item> </el-form-item>
</c-col> </c-col>
</c-col> </c-col>
...@@ -96,17 +96,17 @@ import codes from "~/config/CodeTable"; ...@@ -96,17 +96,17 @@ import codes from "~/config/CodeTable";
import { queryByPage } from "~/service/test/cty.js"; import { queryByPage } from "~/service/test/cty.js";
export default { export default {
name: "infsea", name: "",
props: ["model"], props: ["model"],
inject: ["root"], inject: ["root"],
data() { data() {
return { return {
ctyData: [], ctyData: [],
ctyColumns: [ ctyColumns: [
{ label: 'Country or region', prop: '', width: 'auto' }, { label: '国家代码', prop: 'cod', width: 'auto' },
{ label: 'Description', prop: '', width: 'auto' }, { label: '国家简称', prop: 'txtBopcty', width: 'auto' },
{ label: 'Currency', prop: '', width: 'auto' }, { label: '币种', prop: 'cur', width: 'auto' },
{ label: 'Region', prop: '', width: 'auto' }, { label: '区域', prop: 'reg', width: 'auto' },
], ],
}; };
}, },
......
...@@ -38,7 +38,12 @@ export default { ...@@ -38,7 +38,12 @@ export default {
return { return {
tabVal: "infsea", tabVal: "infsea",
model: { model: {
txtBopcty: "",
cod: "",
// paging
pageNum: 1,
pageSize: 5,
total: 0
}, },
}; };
}, },
......
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