Commit e0c1f492 by tianxinyu

Merge branch 'development-202206' of http://114.115.138.98:8900/fukai/vue-gjjs…

Merge branch 'development-202206' of http://114.115.138.98:8900/fukai/vue-gjjs into development-202206
parents fd8d409a 5c48b1dc
import Api from "~/service/Api"
export function queryByPage(data) {
return Api.post("/test/cty/queryByPage", data)
}
export function queryById(inr) {
return Api.post(`/test/cty/queryById?inr=${inr}`)
}
export function add(data) {
return Api.post("/test/cty/add", data)
}
export function edit(data) {
return Api.post("/test/cty/edit", data)
}
export function deleteById(inr) {
return Api.post(`/test/cty/deleteById?inr=${inr}`)
}
export function addBopctyData(inr, data) {
return Api.post(`/test/cty/addBopctyData?inr=${inr}`, data)
}
export function editBopctyData(inr, data) {
return Api.post(`/test/cty/editBopctyData?inr=${inr}`, data)
}
export function deleteBopctyById(data) {
return Api.post(`/test/cty/deleteBopctyById`, data)
}
<template>
<m-cty title="dbacty" type="add"></m-cty>
</template>
<script>
import Dbicty from "~/views/Statics/Dbicty";
export default {
name: "StaticsDbacty",
components: {
"m-cty": Dbicty
},
data() {
return {};
},
mounted() {
}
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-cty title="dbdcty" type="delete"></m-cty>
</template>
<script>
import Dbicty from "~/views/Statics/Dbicty";
export default {
name: "StaticsDbdcty",
components: {
"m-cty": Dbicty
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-cty title="dbecty" type="edit"></m-cty>
</template>
<script>
import Dbicty from "~/views/Statics/Dbicty";
export default {
name: "StaticsDbecty",
components: {
"m-cty": Dbicty
},
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 Cty {
constructor() {
this.data = {
inrBopcty: "",
codBopcty: "",
numcodBopcty: "",
txtBopcty: "",
fultxtBopcty: "",
verBopcty: "",
inr: "",
cod: "",
cur: "",
reg: "",
ver: "",
fmtdomadrtyp: "",
fmtintadrtyp: "",
dhlreg: "",
bopcod: "",
}
}
}
export const Pattern = {
"inr": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"cod": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 2, "message": "最大长度2个字符", "trigger": "blur" }
],
"cur": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 3, "message": "最大长度3个字符", "trigger": "blur" }
],
"reg": [
{ "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" }
],
"fmtdomadrtyp": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"fmtintadrtyp": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"dhlreg": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 2, "message": "最大长度2个字符", "trigger": "blur" }
],
}
<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 Utils from "~/utils";
import Cty, { Pattern } from "./Cty.js";
import ActInfo from "./ActInfo.vue";
import { queryById, add, edit, deleteById } from "~/service/test/cty.js";
export default {
name: "StaticsDbicty",
components: {
"m-act-info": ActInfo,
},
provide() {
return {
root: this,
};
},
props: {
type: {
type: String,
default: "info"
},
title: {
type: String,
default: "dbicty"
}
},
data() {
return {
model: new Cty().data,
tabVal: "cty",
rules: Pattern,
};
},
computed: {
isDisabled() {
return this.type === "info" || this.type === "delete";
},
},
created() {
if (this.type !== "add") {
const inr = this.$route.params.inr;
queryById(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("保存失败!");
});
} else {
Utils.formValidateTips(this.$refs.modelForm.fields)
}
});
},
commitEdit() {
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)
}
});
},
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: "StaticsInfcty", params: { update } });
},
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-col :span="12">
<el-form-item label="Country or region Code" prop="cod">
<c-input disabled v-model="model.cod" placeholder=""></c-input>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="Name" prop="nam">
<c-input disabled v-model="model.nam" placeholder=""></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<c-col :span="12" style="text-align: left">
<el-button type="primary" size="small" @click="ctyAdd">新增</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="onInfctySearch()"
>查询
</el-button>
</c-col>
</c-col>
<!-- <c-col :span="24">
<c-paging-table
:data="ctyData"
:columns="ctyColumns"
: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="ctyInfo(scope.$index, scope.row)"
>详情</c-button
>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="ctyEdit(scope.$index, scope.row)"
>修改</c-button
>
<c-button
size="small"
style="margin-left: 5px"
@click="ctyDelete(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/cty.js";
export default {
name: "",
props: ["model"],
inject: ["root"],
data() {
return {
ctyData: [],
// ctyColumns: [
// { label: 'Country or region', prop: 'extkey', width: 'auto' },
// { label: 'Description', prop: '', width: 'auto' },
// { label: 'Currency', prop: 'nam', width: 'auto' },
// { label: 'Region', prop: 'idtype', width: 'auto' },
// ],
};
},
activated() {
const { update } = this.$route.params
if (update) {
this.onInfctySearch()
}
},
methods: {
handleReset() {
this.root.$refs.modelForm.resetFields();
},
onInfctySearch() {
queryByPage(this.model).then(res => {
/**
* pageNumber: 0
* pageSize: 0
* total: 69
* totalPage: 0
*/
const list = res.list
this.ctyData = 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.onInfctySearch()
},
ctyAdd() {
this.$router.push(`/statics/dbacty`)
},
ctyInfo(index, row) {
this.$router.push(`/statics/dbicty/${row.inr}`)
},
ctyEdit(index, row) {
this.$router.push(`/statics/dbecty/${row.inr}`)
},
ctyDelete(index, row) {
this.$router.push(`/statics/dbdcty/${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: "StaticsInfcty",
components: {
"m-infsea": Infsea,
},
provide() {
return {
root: this,
};
},
data() {
return {
tabVal: "infsea",
model: {
},
};
},
};
</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