Commit fd8d409a by tianxinyu

fec

parent b93da248
import Api from "~/service/Api"
export function queryByPage(data) {
return Api.post("/test/fec/queryByPage", data)
}
export function queryDetailById(inr) {
return Api.post(`/test/fec/queryDetailById?inr=${inr}`)
}
export function add(data) {
return Api.post("/test/fec/add", data)
}
export function edit(data) {
return Api.post("/test/fec/edit", data)
}
export function deleteById(inr) {
return Api.post(`/test/fec/deleteById?inr=${inr}`)
}
export function addFeeData(data) {
return Api.post(`/test/fec/addFeeData`, data)
}
export function editFeeData(data) {
return Api.post(`/test/fec/editFeeData?inr=${inr}`, data)
}
export function deleteFeeData(data) {
return Api.post(`/test/fec/deleteFeeData`, data)
}
\ 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="inrFee" prop="inrFee">
<c-input
v-model="model.inrFee"
placeholder="请输入inrFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="codFee" prop="codFee">
<c-input
v-model="model.codFee"
placeholder="请输入codFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="sftcodFee" prop="sftcodFee">
<c-input
v-model="model.sftcodFee"
placeholder="请输入sftcodFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="rolFee" prop="rolFee">
<c-input
v-model="model.rolFee"
placeholder="请输入rolFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="incflgFee" prop="incflgFee">
<c-input
v-model="model.incflgFee"
placeholder="请输入incflgFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="staflgFee" prop="staflgFee">
<c-input
v-model="model.staflgFee"
placeholder="请输入staflgFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="vatflgFee" prop="vatflgFee">
<c-input
v-model="model.vatflgFee"
placeholder="请输入vatflgFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="accFee" prop="accFee">
<c-input
v-model="model.accFee"
placeholder="请输入accFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="accacrFee" prop="accacrFee">
<c-input
v-model="model.accacrFee"
placeholder="请输入accacrFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="enoFee" prop="enoFee">
<c-input
v-model="model.enoFee"
placeholder="请输入enoFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="reltirFee" prop="reltirFee">
<c-input
v-model="model.reltirFee"
placeholder="请输入reltirFee"
>
</c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="8" class="col-left col-right">
<c-col :span="24">
<el-form-item label="grpcodFee" prop="grpcodFee">
<c-input
v-model="model.grpcodFee"
placeholder="请输入grpcodFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="verFee" prop="verFee">
<c-input
v-model="model.verFee"
placeholder="请输入verFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="dscmodflgFee" prop="dscmodflgFee">
<c-input
v-model="model.dscmodflgFee"
placeholder="请输入dscmodflgFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="reltrnFee" prop="reltrnFee">
<c-input
v-model="model.reltrnFee"
placeholder="请输入reltrnFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="begdatFee" prop="begdatFee">
<c-date-picker
v-model="model.begdatFee"
placeholder="请输入begdatFee"
>
</c-date-picker>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="enddatFee" prop="enddatFee">
<c-date-picker
v-model="model.enddatFee"
placeholder="请输入enddatFee"
>
</c-date-picker>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="dtacodFee" prop="dtacodFee">
<c-input
v-model="model.dtacodFee"
placeholder="请输入dtacodFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="etgextkeyFee" prop="etgextkeyFee">
<c-input
v-model="model.etgextkeyFee"
placeholder="请输入etgextkeyFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="taxaccFee" prop="taxaccFee">
<c-input
v-model="model.taxaccFee"
placeholder="请输入taxaccFee"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="taxflgFee" prop="taxflgFee">
<c-input
v-model="model.taxflgFee"
placeholder="请输入taxflgFee"
>
</c-input>
</el-form-item>
</c-col>
</c-col>
</div>
</template>
<script>
export default {
name: "",
props: ["model"],
data() {
return {};
},
};
</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="fec">
<c-content>
<m-fec-info :model="model" />
</c-content>
</el-tab-pane>
<el-tab-pane label="费用代码信息" name="fee">
<c-content>
<m-fee-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 Fec, { Pattern } from "./Fec.js";
import FecInfo from "./FecInfo.vue";
import FeeInfo from "./FeeInfo.vue";
import { queryDetailById, add, edit, deleteById } from "~/service/test/fec.js";
export default {
name: "StaticsDbifec",
components: {
"m-fec-info": FecInfo,
"m-fee-info": FeeInfo,
},
provide() {
return {
root: this,
};
},
props: {
type: {
type: String,
default: "info"
},
title: {
type: String,
default: "dbifec"
}
},
data() {
return {
model: new Fec().data,
tabVal: "fec",
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("保存失败!");
});
} 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 是否更新inffec的查询列表
*/
goBack(update) {
this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsInffec", params: { update } });
},
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-col :span="24" class="col-left">
<c-col :span="12">
<el-form-item label="费用代码" prop="codfee">
<c-input
v-model="model.codFee"
placeholder="请输入 费用代码"
style="width: 100%"
:code="getCodesByKey('fepfeecod')"
>
</c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24" class="col-left">
<c-col :span="12">
<el-form-item label="condition" prop="feepri">
<c-select
v-model="model.feepri"
style="width: 100%"
placeholder="feepri"
:code="getCodesByKey('feepri')"
></c-select>
</el-form-item>
</c-col>
</c-col>
<!-- bus.sector -->
<c-col :span="24" v-if="(this.model.feepri==`$`)" class="col-left">
<c-col :span="12">
<el-form-item label="sector" prop="objtyp">
<c-input
v-model="model.objtyp"
placeholder="请输入 sector"
:disabled="true"
>
</c-input>
</el-form-item>
</c-col>
</c-col>
<!-- entity -->
<c-col :span="24" v-if="(this.model.feepri==`*`)" class="col-left">
<c-col :span="12">
<el-form-item label="实体" prop="objtyp">
<c-input
v-model="model.objtyp"
placeholder="请输入实体"
:disabled="true"
>
</c-input>
</el-form-item>
</c-col>
</c-col>
<!-- region -->
<c-col :span="24" v-if="(this.model.feepri==1)" class="col-left">
<c-col :span="12">
<el-form-item label="区域" prop="objtyp">
<c-input
v-model="model.objtyp"
placeholder="请输入区域"
:disabled="true"
>
</c-input>
</el-form-item>
</c-col>
</c-col>
<!-- country -->
<c-col :span="24" v-if="(this.model.feepri==2)" class="col-left">
<c-col :span="12">
<el-form-item label="国家" prop="objtyp">
<c-input
v-model="model.objtyp"
placeholder="请输入国家"
:disabled="true"
>
</c-input>
</el-form-item>
</c-col>
</c-col>
<!-- group -->
<c-col :span="24" v-if="(this.model.feepri==3)" class="col-left">
<c-col :span="12">
<el-form-item label="组" prop="objtyp">
<c-input
v-model="model.objtyp"
placeholder="请输入组"
:disabled="true"
>
</c-input>
</el-form-item>
</c-col>
</c-col>
<!-- party -->
<c-col :span="24" v-if="(this.model.feepri==4)" class="col-left">
<c-col :span="12">
<el-form-item label="当事人" prop="objtyp">
<c-input
v-model="model.objtyp"
placeholder="请输入当事人"
:disabled="true"
>
</c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="12" style="text-align: left">
<el-button type="primary" size="small" @click="fecAdd">新增</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="onInffecSearch()"
>查询
</el-button>
</c-col>
</c-col>
<c-col :span="24">
<c-paging-table
:data="fecData"
:columns="fecColumns"
: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="fecInfo(scope.$index, scope.row)"
>详情</c-button
>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="fecEdit(scope.$index, scope.row)"
>修改</c-button
>
<c-button
size="small"
style="margin-left: 5px"
@click="fecDelete(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/fec.js";
export default {
name: "",
props: ["model"],
inject: ["root"],
data() {
return {
fecData: [],
fecColumns: [
{ label: '费用代码', prop: 'codFee', width: '120' },
{ label: '收费条件类型', prop: 'feepri', width: '120' },
{ label: '最小金额币种', prop: 'maxcur', width: '120' },
{ label: '费用最小金额', prop: 'lowamt', width: '120' },
{ label: '费用最大金额', prop: 'highamt', width: '120' },
{ label: '起始日期', prop: 'begdat', width: '120' },
{ label: '终止日期', prop: 'enddat', width: '120' },
{ label: '计算规则', prop: 'calrul', width: '120' },
{ label: '每份的费用金额', prop: 'untamt', width: '150' },
{ label: '计算费率', prop: 'ratcal', width: '120' },
],
};
},
computed: {
},
activated() {
const { update } = this.$route.params
if (update) {
this.onInffecSearch()
}
},
methods: {
handleReset() {
this.root.$refs.modelForm.resetFields();
},
onInffecSearch() {
queryByPage(this.model).then(res => {
/**
* pageNumber: 0
* pageSize: 0
* total: 69
* totalPage: 0
*/
const list = res.list
this.fecData = 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.onInffecSearch()
},
fectypeChange(val) {
this.model.fectyp = val;
},
getCodesByKey(key) {
return codes[key] ?? [];
},
fecAdd() {
this.$router.push(`/statics/dbafec`)
},
fecInfo(index, row) {
this.$router.push(`/statics/dbifec/${row.inr}`)
},
fecEdit(index, row) {
this.$router.push(`/statics/dbefec/${row.inr}`)
},
fecDelete(index, row) {
this.$router.push(`/statics/dbdfec/${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: "StaticsInffec",
components: {
"m-infsea": Infsea,
},
provide() {
return {
root: this,
};
},
data() {
return {
tabVal: "infsea",
model: {
codfee:"",
feepri:"!",
objtyp:"",
// paging
pageNum: 1,
pageSize: 5,
total: 0
},
};
},
};
</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