Commit 9c6a766b by wangna

TRL静态交易暂存

parent ef9cc501
import Api from "~/service/Api"
export function queryByPage(data) {
return Api.post("/test/trl/queryByPage", data)
}
export function queryById(inr) {
return Api.post(`/test/trl/queryById?inr=${inr}`)
}
export function add(data) {
return Api.post("/test/trl/add", data)
}
export function edit(data) {
return Api.post("/test/trl/edit", data)
}
export function deleteById(inr) {
return Api.post(`/test/trl/deleteById?inr=${inr}`)
}
\ No newline at end of file
<template>
<m-trl ref="trl" title="dbatrl" type="add"></m-trl>
</template>
<script>
import Dbitrl from "~/views/Statics/Dbitrl";
export default {
name: "StaticsDbatrl",
components: {
"m-trl": Dbitrl
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-trl title="dbdtrl" type="delete"></m-trl>
</template>
<script>
import Dbitrl from "~/views/Statics/Dbitrl";
export default {
name: "StaticsDbdtrl",
components: {
"m-trl": Dbitrl
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-trl title="dbetrl" type="edit"></m-trl>
</template>
<script>
import Dbitrl from "~/views/Statics/Dbitrl";
export default {
name: "StaticsDbetrl",
components: {
"m-trl": Dbitrl
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
export default class Trl {
constructor() {
this.data = {
inr: "",
bchkey: "",
trn: "",
relcur: "",
relamt: "",
ver: "",
relflg: "",
}
}
}
export const Pattern = {
"inr": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"bchkey": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"trn": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 6, "message": "最大长度6个字符", "trigger": "blur" }
],
"relcur": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 3, "message": "最大长度3个字符", "trigger": "blur" }
],
"relamt": [
{ "required": true, "message": "必输项", "trigger": "blur" },
{ "pattern": /^-?\d{0,18}(\.\d{1,3})?$/, "message": "整数不能超过18位,小数不能超过3位", "trigger": "blur" }
],
"ver": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 4, "message": "最大长度4个字符", "trigger": "blur" }
],
}
<template>
<div class="eibs-tab">
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="bchkey" prop="bchkey">
<c-input v-model="model.bchkey" placeholder="请输入bchkey"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="trn" prop="trn">
<c-input v-model="model.trn" placeholder="请输入trn"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="relcur" prop="relcur">
<c-input v-model="model.relcur" placeholder="请输入relcur"> </c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="relamt" prop="relamt">
<c-input v-model="model.relamt" placeholder="请输入relamt"> </c-input>
</el-form-item>
</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="relflg" prop="relflg">
<c-input v-model="model.relflg" placeholder="请输入relflg"> </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="trl">
<c-content>
<m-trl-info :model="model" />
</c-content>
</el-tab-pane>
<!-- <el-tab-pane label="CopyPanl" name="copy">
<c-content>
<m-adr-list :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 Trl, { Pattern } from "./Trl.js";
import TrlInfo from "./TrlInfo.vue";
import { queryById, add, edit, deleteById } from "~/service/test/trl.js";
export default {
name: "StaticsDbitrl",
components: {
"m-trl-info": TrlInfo,
},
provide() {
return {
root: this,
};
},
props: {
type: {
type: String,
default: "info"
},
title: {
type: String,
default: "dbitrl"
}
},
data() {
return {
model: new Trl().data,
tabVal: "trl",
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 是否更新inftrl的查询列表
*/
goBack(update) {
this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsInftrl", params: { update } });
},
},
};
</script>
<style>
</style>
\ 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="bchkey" prop="bchkey">
<c-input v-model="model.bchkey" placeholder="请输入bchkey"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="trn" prop="trn">
<c-input v-model="model.trn" placeholder="请输入trn"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="relcur" prop="relcur">
<c-input v-model="model.relcur" placeholder="请输入relcur"> </c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="relamt" prop="relamt">
<c-input v-model="model.relamt" placeholder="请输入relamt"> </c-input>
</el-form-item>
</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="relflg" prop="relflg">
<c-input v-model="model.relflg" placeholder="请输入relflg"> </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="trlAdd">新增</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="onInftrlSearch()"
>查询
</el-button>
</c-col>
</c-col>
<c-col :span="24">
<c-paging-table
:data="trlData"
:columns="trlColumns"
: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="trlInfo(scope.$index, scope.row)"
>详情</c-button
>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="trlEdit(scope.$index, scope.row)"
>修改</c-button
>
<c-button
size="small"
style="margin-left: 5px"
@click="trlDelete(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/trl.js";
export default {
name: "",
props: ["model"],
inject: ["root"],
data() {
return {
trlData: [],
trlColumns: [
{ label: "bchkey", prop: "bchkey", width: "auto" },
{ label: "trn", prop: "trn", width: "auto" },
{ label: "relcur", prop: "relcur", width: "auto" },
{ label: "relamt", prop: "relamt", width: "auto" },
{ label: "ver", prop: "ver", width: "auto" },
{ label: "relflg", prop: "relflg", width: "auto" },
],
};
},
computed: {
},
activated() {
const { update } = this.$route.params;
if (update) {
this.onInftrlSearch();
}
},
methods: {
handleReset() {
this.root.$refs.modelForm.resetFields();
},
onInftrlSearch() {
queryByPage(this.model).then((res) => {
/**
* pageNumber: 0
* pageSize: 0
* total: 69
* totalPage: 0
*/
const list = res.list;
this.trlData = 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.onInftrlSearch();
},
trlAdd() {
this.$router.push(`/statics/dbatrl`);
},
trlInfo(index, row) {
this.$router.push(`/statics/dbitrl/${row.inr}`);
},
trlEdit(index, row) {
this.$router.push(`/statics/dbetrl/${row.inr}`);
},
trlDelete(index, row) {
this.$router.push(`/statics/dbdtrl/${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: "StaticsInftrl",
components: {
"m-infsea": Infsea,
},
provide() {
return {
root: this,
};
},
data() {
return {
tabVal: "infsea",
model: {
// trl
bchkey: "",
trn: "",
relcur: "",
relamt: "",
ver: "",
relflg: "",
// paging
pageNum: 1,
pageSize: 5,
total: 0,
},
};
},
};
</script>
<style></style>
......@@ -3,6 +3,11 @@ import Dbipty from "./Dbipty";
import Dbapty from "./Dbapty";
import Dbepty from "./Dbepty";
import Dbdpty from "./Dbdpty";
import Inftrl from "./Inftrl";
import Dbitrl from "./Dbitrl";
import Dbatrl from "./Dbatrl";
import Dbetrl from "./Dbetrl";
import Dbdtrl from "./Dbdtrl";
const StaticsRouter = [
{ path: 'infpty', component: Infpty, name: 'StaticsInfpty', meta: { title: '客户查询' } },
......@@ -10,6 +15,11 @@ const StaticsRouter = [
{ path: 'dbipty/:inr', component: Dbipty, name: 'StaticsDbipty', meta: { title: (tag) => { return '客户详情: ' + tag.params.inr } } },
{ path: 'dbepty/:inr', component: Dbepty, name: 'StaticsDbepty', meta: { title: (tag) => { return '客户修改: ' + tag.params.inr } } },
{ path: 'dbdpty/:inr', component: Dbdpty, name: 'StaticsDbdpty', meta: { title: (tag) => { return '客户删除: ' + tag.params.inr } } },
{ path: 'inftrl', component: Inftrl, name: 'StaticsInftrl', meta: { title: '复核级别查询' } },
{ path: 'dbatrl', component: Dbatrl, name: 'StaticsDbatrl', meta: { title: '复核级别新增' } },
{ path: 'dbitrl/:inr', component: Dbitrl, name: 'StaticsDbitrl', meta: { title: (tag) => { return '复核级别详情: ' + tag.params.inr } } },
{ path: 'dbetrl/:inr', component: Dbetrl, name: 'StaticsDbetrl', meta: { title: (tag) => { return '复核级别修改: ' + tag.params.inr } } },
{ path: 'dbdtrl/:inr', component: Dbdtrl, name: 'StaticsDbdtrl', meta: { title: (tag) => { return '复核级别删除: ' + tag.params.inr } } },
]
export default StaticsRouter
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