Commit dc1bdf8b by huangxin

cty静态交易

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