Commit 8474dcb8 by Wuyuqiu

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 a3801eed 8e453fac
......@@ -20,14 +20,25 @@ export function deleteById(inr) {
return Api.post(`/test/usr/deleteById?inr=${inr}`)
}
// export function addAdrData(inr, data) {
// return Api.post(`/test/usr/addAdrData?inr=${inr}`, data)
// }
//
// export function updateAdrData(inr, data) {
// return Api.post(`/test/usr/updateAdrData?inr=${inr}`, data)
// }
//
// export function deleteAdrData(data) {
// return Api.post(`/test/usr/deleteAdrData`, data)
// }
\ No newline at end of file
export function addUbrData(inr, data) {
return Api.post(`/test/usr/addUbrData?inr=${inr}`, data)
}
export function updateUbrData(inr, data) {
return Api.post(`/test/usr/updateUbrData?inr=${inr}`, data)
}
export function deleteUbrData(data) {
return Api.post(`/test/usr/deleteUbrData`, data)
}
export function addUclData(inr, data) {
return Api.post(`/test/usr/addUclData?inr=${inr}`, data)
}
export function updateUclData(inr, data) {
return Api.post(`/test/usr/updateUclData?inr=${inr}`, data)
}
export function deleteUclData(data) {
return Api.post(`/test/usr/deleteUclData`, data)
}
\ No newline at end of file
export default class Ubr {
constructor() {
this.data = {
usrinr: "",
bussec: "",
relcur: "",
relamt: "",
relamt2nd: "",
relgrp: "",
trncod: "",
branchinr: "",
autcur: "",
autamt: "",
}
}
}
export const Pattern = {
"inr": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"usrinr": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"bussec": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 2, "message": "最大长度2个字符", "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" }
],
"relamt2nd": [
{ "required": true, "message": "必输项", "trigger": "blur" },
{ "pattern": /^-?\d{0,18}(\.\d{1,3})?$/, "message": "整数不能超过18位,小数不能超过3位", "trigger": "blur" }
],
"relgrp": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"trncod": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 6, "message": "最大长度6个字符", "trigger": "blur" }
],
"branchinr": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"autcur": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 3, "message": "最大长度3个字符", "trigger": "blur" }
],
"autamt": [
],
}
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-table :list="model.ubrList" :columnsConfig="columns"></c-table>
<div class="eibs">
<el-form
ref="modelForm"
label-width="120px"
size="small"
label-position="right"
:model="ubr"
:rules="rules"
:validate-on-rule-change="false"
:disabled="operate === 'details'"
>
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="唯一ID" prop="inr">
<c-input
v-model="ubr.inr"
placeholder="请输入唯一ID"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="用户ID" prop="usrinr">
<c-input
v-model="ubr.usrinr"
placeholder="请输入用户ID"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="交易名" prop="bussec">
<c-input
v-model="ubr.bussec"
placeholder="请输入交易名"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="授权币种" prop="relcur">
<c-input
v-model="ubr.relcur"
placeholder="请输入授权币种"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="授权金额" prop="relamt">
<c-input
v-model="ubr.relamt"
placeholder="请输入授权金额"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="第二授权金额" prop="relamt2nd">
<c-input
v-model="ubr.relamt2nd"
placeholder="请输入第二授权金额"
>
</c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="授权状态" prop="relgrp">
<c-input
v-model="ubr.relgrp"
placeholder="请输入授权状态"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="交易代码" prop="trncod">
<c-input
v-model="ubr.trncod"
placeholder="请输入交易代码"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="交易所属机构" prop="branchinr">
<c-input
v-model="ubr.branchinr"
placeholder="请输入交易所属机构"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="一次性授权" prop="autcur">
<c-input
v-model="ubr.autcur"
placeholder="请输入一次性授权"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="autamt" prop="autamt">
<c-input
v-model="ubr.autamt"
placeholder="请输入一次性释放授权"
>
</c-input>
</el-form-item>
</c-col>
</c-col>
</el-form>
</div>
</template>
<script>
import { Pattern } from "./Ubr";
export default {
props: ["model"],
name: "",
props: ['ubr', 'operate'],
data() {
return {
columns: [
// 表结构说明:
// { label: '唯一ID', prop: 'inr', width: 'auto' },
{ label: '用户ID', prop: 'usrinr', width: 'auto' },
{ label: '交易名', prop: 'bussec', width: 'auto' },
{ label: '授权币种', prop: 'relcur', width: 'auto' },
{ label: '授权金额', prop: 'relamt', width: 'auto' },
{ label: '第二授权金额', prop: 'relamt2nd', width: 'auto' },
{ label: '授权状态', prop: 'relgrp', width: 'auto' },
{ label: '交易代码', prop: 'trncod', width: 'auto' },
{ label: '交易所属机构', prop: 'branchinr', width: 'auto' },
{ label: '一次性授权', prop: 'autcur', width: 'auto' },
{ label: '一次性释放授权', prop: 'autamt', width: 'auto' },
],
rules: Pattern,
};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<div style="text-align: right">
<c-button size="small" type="primary" @click="ubrAdd()"> 新增 </c-button>
</div>
<el-form-item label="" label-width="0" prop="ubrList">
<c-table :columnsConfig="columns" :list="model.ubrList">
<c-table-column fixed="right" prop="op" label="操作" width="200px">
<template slot-scope="{ scope }">
<button
class="el-button el-button--default el-button--small"
style="margin-left: 0"
size="small"
:disabled="false"
@click.prevent="ubrInfo(scope.$index, scope.row)"
>
<span>详情</span>
</button>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="ubrEdit(scope.$index, scope.row)"
>
修改
</c-button>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="ubrDelete(scope.$index, scope.row)"
>
删除
</c-button>
</template>
</c-table-column>
</c-table>
</el-form-item>
<el-dialog
:title="
'柜员权限信息:' +
(operate === 'details' ? '详情' : operate === 'edit' ? '修改' : '新增')
"
:visible.sync="ubrDialog"
top="10vh"
width="80%"
:destroy-on-close="true"
:before-close="handleClose"
>
<m-ubr-inf ref="ubr" :ubr="ubr" :operate="operate"></m-ubr-inf>
<span slot="footer" class="dialog-footer">
<button
class="el-button el-button--default el-button--small"
style="margin-left: 0"
size="small"
:disabled="false"
@click.prevent="cancel"
>
<span>取 消</span>
</button>
<c-button type="primary" @click="cancel" v-if="operate === 'details'"
>确 定</c-button
>
<c-button type="primary" @click="editUbr" v-if="operate === 'edit'"
>保 存</c-button
>
<c-button type="primary" @click="saveUbr" v-if="operate === 'add'"
>保 存</c-button
>
</span>
</el-dialog>
</div>
</template>
<script>
import Ubr from "./Ubr";
import UbrInfo from "./UbrInfo";
import {
addUbrData,
updateUbrData,
deleteUbrData,
} from "~/service/test/usr";
export default {
name: "UbrList",
props: ["model"],
inject: ["root"],
components: {
"m-ubr-inf": UbrInfo,
},
data() {
return {
ubrDialog: false,
ubr: null,
operate: "",
operateIdx: 0,
columns: [
// 表结构说明:
// { label: '唯一ID', prop: 'inr', width: 'auto' },
{ label: '用户ID', prop: 'usrinr', width: 'auto' },
{ label: '交易名', prop: 'bussec', width: 'auto' },
{ label: '授权币种', prop: 'relcur', width: 'auto' },
{ label: '授权金额', prop: 'relamt', width: 'auto' },
{ label: '第二授权金额', prop: 'relamt2nd', width: 'auto' },
{ label: '授权状态', prop: 'relgrp', width: 'auto' },
{ label: '交易代码', prop: 'trncod', width: 'auto' },
{ label: '交易所属机构', prop: 'branchinr', width: 'auto' },
{ label: '一次性授权', prop: 'autcur', width: 'auto' },
{ label: '一次性释放授权', prop: 'autamt', width: 'auto' },
],
};
},
methods: {
/**
* 详情
*/
ubrInfo(index, row) {
this.ubr = { ...row };
this.operate = "details";
this.operateIdx = index;
this.ubrDialog = true;
},
/**
* 新增
*/
ubrAdd() {
this.ubr = new Ubr().data;
this.operate = "add";
this.ubrDialog = true;
},
/**
* 修改
*/
ubrEdit(index, row) {
this.ubr = { ...row };
this.operate = "edit";
this.operateIdx = index;
this.ubrDialog = true;
},
/**
* 删除
*/
ubrDelete(index, row) {
this.$confirm("是否真的删除?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
}).then((res) => {
deleteUbrData(row).then((res) => {
if (res) {
this.model.ubrList.splice(index, 1);
this.$message.success("删除成功!");
} else {
this.$message.error("删除失败!");
}
});
});
},
cancel() {
this.handleClose();
},
editUbr() {
this.$refs.ubr.$refs.modelForm.validate((validated) => {
if (validated) {
updateUbrData(this.model.inr, this.ubr)
.then((res) => {
if (res.ubr) {
this.$message.success("修改柜员权限信息成功!");
this.model.ubrList = res.ubrList;
this.handleClose();
}
})
.catch((error) => {
this.$message.error("修改柜员权限信息失败!");
});
}
});
},
saveUbr() {
for (const key in this.ubr) {
if (Object.hasOwnProperty.call(this.ubr, key)) {
const v = this.ubr[key];
if (typeof v === 'string' && v === '') {
this.ubr[key] = " "
}
}
}
if (this.root.type === "add") {
this.model.ubrList.push(this.ubr);
this.handleClose();
} else {
this.$refs.ubr.$refs.modelForm.validate((validated) => {
if (validated) {
addUbrData(this.model.inr, this.ubr)
.then((res) => {
if (res && res.inr) {
this.$message.success("保存地址信息成功!");
this.model.ubrList = res.ubrList;
this.handleClose();
}
})
.catch((error) => {
this.$message.error("保存地址信息失败!");
});
}
});
}
},
handleClose(done) {
this.ubrDialog = false;
if (done && typeof done === "function") {
done();
}
},
},
};
</script>
<style>
</style>
\ No newline at end of file
export default class Ucl {
constructor() {
this.data = {
usrdef: "",
usr: "",
mannam: "",
branchinr: "",
objlst: "",
assignflg: "",
}
}
}
export const Pattern = {
"usrdef": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"usr": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"mannam": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 40, "message": "最大长度40个字符", "trigger": "blur" }
],
"branchinr": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"objlst": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 80, "message": "最大长度80个字符", "trigger": "blur" }
],
}
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-table :list="model.uclList" :columnsConfig="columns"></c-table>
<div class="eibs">
<el-form
ref="modelForm"
label-width="120px"
size="small"
label-position="right"
:model="ucl"
:rules="rules"
:validate-on-rule-change="false"
:disabled="operate === 'details'"
>
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="默认的机构标志" prop="usrdef">
<c-input
v-model="ucl.usrdef"
placeholder="请输入默认的机构标志"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="用户ID" prop="usr">
<c-input
v-model="ucl.usr"
placeholder="请输入用户ID"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="用户所在机构和用户名称" prop="mannam">
<c-input
v-model="ucl.mannam"
placeholder="请输入用户所在机构和用户名称"
>
</c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="机构INR" prop="branchinr">
<c-input
v-model="ucl.branchinr"
placeholder="请输入机构INR"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="用户可作业务的列表" prop="objlst">
<c-input
v-model="ucl.objlst"
placeholder="请输入用户可作业务的列表"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="是否参与任务分配" prop="assignflg">
<c-input
v-model="ucl.assignflg"
placeholder="是否参与任务分配"
>
</c-input>
</el-form-item>
</c-col>
</c-col>
</el-form>
</div>
</template>
<script>
import { Pattern } from "./Ucl";
export default {
props: ["model"],
name: "",
props: ['ucl', 'operate'],
data() {
return {
columns: [
{ label: '默认的机构标志', prop: 'usrdef', width: 'auto' },
{ label: '用户ID', prop: 'usr', width: 'auto' },
{ label: '用户所在机构和用户名称', prop: 'mannam', width: 'auto' },
{ label: '机构INR', prop: 'branchinr', width: 'auto' },
{ label: '用户可作业务的列表', prop: 'objlst', width: 'auto' },
{ label: '是否参与任务分配', prop: 'assignflg', width: 'auto' },
],
rules: Pattern,
};
},
};
</script>
<style>
</style>
\ No newline at end of file
}
}
</script>
\ No newline at end of file
<template>
<div class="eibs-tab">
<div style="text-align: right">
<c-button size="small" type="primary" @click="uclAdd()"> 新增 </c-button>
</div>
<el-form-item label="" label-width="0" prop="uclList">
<c-table :columnsConfig="columns" :list="model.uclList">
<c-table-column fixed="right" prop="op" label="操作" width="200px">
<template slot-scope="{ scope }">
<button
class="el-button el-button--default el-button--small"
style="margin-left: 0"
size="small"
:disabled="false"
@click.prevent="uclInfo(scope.$index, scope.row)"
>
<span>详情</span>
</button>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="uclEdit(scope.$index, scope.row)"
>
修改
</c-button>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="uclDelete(scope.$index, scope.row)"
>
删除
</c-button>
</template>
</c-table-column>
</c-table>
</el-form-item>
<el-dialog
:title="
'柜员组信息:' +
(operate === 'details' ? '详情' : operate === 'edit' ? '修改' : '新增')
"
:visible.sync="uclDialog"
top="10vh"
width="80%"
:destroy-on-close="true"
:before-close="handleClose"
>
<m-ucl-inf ref="ucl" :ucl="ucl" :operate="operate"></m-ucl-inf>
<span slot="footer" class="dialog-footer">
<button
class="el-button el-button--default el-button--small"
style="margin-left: 0"
size="small"
:disabled="false"
@click.prevent="cancel"
>
<span>取 消</span>
</button>
<c-button type="primary" @click="cancel" v-if="operate === 'details'"
>确 定</c-button
>
<c-button type="primary" @click="editUcl" v-if="operate === 'edit'"
>保 存</c-button
>
<c-button type="primary" @click="saveUcl" v-if="operate === 'add'"
>保 存</c-button
>
</span>
</el-dialog>
</div>
</template>
<script>
import UclInfo from "./UclInfo";
import Ucl from "./Ucl";
import {
addUclData,
updateUclData,
deleteUclData,
} from "@/service/test/usr";
import {addAdrData, deleteAdrData, updateAdrData} from "@/service/test/pty";
export default {
name: "UclList",
inject: ["root"],
props: ["model"],
components: {
"m-ucl-inf": UclInfo,
},
data() {
return {
uclDialog: false,
ucl: null,
operate: "",
operateIdx: 0,
columns: [
{ label: '默认的机构标志', prop: 'usrdef', width: 'auto' },
{ label: '用户ID', prop: 'usr', width: 'auto' },
{ label: '用户所在机构和用户名称', prop: 'mannam', width: 'auto' },
{ label: '机构INR', prop: 'branchinr', width: 'auto' },
{ label: '用户可作业务的列表', prop: 'objlst', width: 'auto' },
{ label: '是否参与任务分配', prop: 'assignflg', width: 'auto' },
],
};
},
methods: {
/**
* 信息详情
*/
uclInfo(index, row) {
this.ucl = { ...row };
this.operate = "details";
this.operateIdx = index;
this.uclDialog = true;
},
/**
* 新增
*/
uclAdd() {
this.ucl = new Ucl().data;
this.operate = "add";
this.operateIdx = index;
this.uclDialog = true;
},
/**
* 修改
*/
uclEdit(index, row) {
this.ucl = { ...row };
this.operate = "edit";
this.operateIdx = index;
this.uclDialog = true;
},
/**
* 删除
*/
uclDelete(index, row) {
this.$confirm("是否真的删除?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
}).then((res) => {
deleteUclData(row).then((res) => {
if (res) {
this.model.uclList.splice(index, 1);
this.$message.success("删除成功!");
} else {
this.$message.error("删除失败!");
}
});
});
},
cancel() {
this.handleClose();
},
editUcl() {
this.$refs.ucl.$refs.modelForm.validate((validated) => {
if (validated) {
updateAdrData(this.model.inr, this.ucl)
.then((res) => {
if (res.inr) {
this.$message.success("修改柜员组信息成功!");
this.model.uclList = res.uclList;
this.handleClose();
}
})
.catch((error) => {
this.$message.error("修改柜员组信息失败!");
});
}
});
},
saveUcl() {
for (const key in this.ucl) {
if (Object.hasOwnProperty.call(this.ucl, key)) {
const v = this.ucl[key];
if (typeof v === 'string' && v === '') {
this.ucl[key] = " "
}
}
}
if (this.root.type === "add") {
this.model.uclList.push(this.ucl);
this.handleClose();
} else {
this.$refs.ucl.$refs.modelForm.validate((validated) => {
if (validated) {
addUclData(this.model.inr, this.ucl)
.then((res) => {
if (res && res.inr) {
this.$message.success("保存地址信息成功!");
this.model.uclList = res.uclList;
this.handleClose();
}
})
.catch((error) => {
this.$message.error("保存地址信息失败!");
});
}
});
}
},
handleClose(done) {
this.uclDialog = false;
if (done && typeof done === "function") {
done();
}
},
},
};
</script>
<style>
</style>
\ No newline at end of file
......@@ -149,7 +149,7 @@
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="传真" prop="fax">
<el-form-item label="传真" prop ="fax">
<c-input
v-model="model.fax"
placeholder="请输入fax"
......
......@@ -45,7 +45,7 @@
style="margin-right: 10px"
@click="commitAdd"
v-if="type === 'add'"
>1</c-button
></c-button
>
<c-button
type="primary"
......@@ -71,8 +71,8 @@
import Utils from "~/utils";
import Usr, { Pattern } from "./Usr.js";
import UsrInfo from "./UsrInfo";
import UBrInfo from "./UbrInfo";
import UclInfo from "./UclInfo";
import UBrInfo from "./UbrList";
import UclInfo from "./UclList";
import { add, edit, deleteById, queryDetailById } from "~/service/test/usr";
......
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