Commit 5ba6d478 by WH

usr相关静态交易整改

parent cc362f52
import Api from "~/service/Api"
export function queryByPage(data) {
return Api.post("/manager/ucl/queryByPage", data)
}
export function edit(data) {
return Api.post("/manager/ucl/edit", data)
}
\ No newline at end of file
import Api from "~/service/Api" import Api from "~/service/Api"
export function queryByPage(data) { export function queryByPage(data) {
return Api.post("/manager/usr/queryByPage", data) return Api.post("/service/usr/queryByPage", data)
} }
export function queryDetailById(inr) { export function queryDetailById(inr) {
return Api.post(`/manager/usr/queryDetailById?inr=${inr}`) return Api.post(`/service/usr/queryDetailById?inr=${inr}`)
} }
export function add(data) { export function add(data) {
return Api.post("/manager/usr/add", data) return Api.post("/service/usr/add", data)
} }
export function edit(data) { export function edit(data) {
return Api.post("/manager/usr/edit", data) return Api.post("/service/usr/edit", data)
} }
export function deleteById(inr) { export function deleteById(inr) {
return Api.post(`/manager/usr/deleteById?inr=${inr}`) return Api.post(`/service/usr/deleteById?inr=${inr}`)
} }
export function addUbrData(data) { export function addUbrData(data) {
return Api.post(`/manager/usr/addUbrData`, data) return Api.post(`/service/usr/addUbrData`, data)
} }
export function updateUbrData(data) { export function updateUbrData(data) {
return Api.post(`/manager/usr/updateUbrData`, data) return Api.post(`/service/usr/updateUbrData`, data)
} }
export function deleteUbrData(inr) { export function deleteUbrData(inr) {
return Api.post(`/manager/usr/deleteUbrData?inr=${inr}`, inr) return Api.post(`/service/usr/deleteUbrData?inr=${inr}`, inr)
} }
export function addUclData(inr,data) { export function addUclData(inr,data) {
return Api.post(`/manager/usr/addUclData?inr=${inr}`, data) return Api.post(`/service/usr/addUclData?inr=${inr}`, data)
} }
export function updateUclData(inr,data) { export function updateUclData(inr,data) {
return Api.post(`/manager/usr/updateUclData?inr=${inr}`, data) return Api.post(`/service/usr/updateUclData?inr=${inr}`, data)
} }
export function deleteUclData(usr, branchinr) { export function deleteUclData(usr, branchinr) {
return Api.post(`/manager/usr/deleteUclData?usr=${usr}&&branchinr=${branchinr}`, usr, branchinr) return Api.post(`/service/usr/deleteUclData?usr=${usr}&&branchinr=${branchinr}`, usr, branchinr)
} }
\ 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
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
export default class Pty {
constructor() {
this.data = {
"inr": "",
"extkey": "",
"nam": "",
"lgiflg": "",
"ssnbegdattim": "",
"ssninr": "",
"ver": "",
"pri": "",
"ety": "",
"usg": "",
"lstdiadat": "",
"relcur": "",
"relamt": "",
"relamt2nd": "",
"relgrp": "",
"tel": "",
"fax": "",
"eml": "",
"quepow": "",
"etyextkey": "",
"oenr": "",
"etaextkey": "",
"resusrflg": "",
"secsta": "",
"letoenr": "",
"ubrList": [],
"uclList": [],
}
}
}
export const Pattern = {
"inr": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"extkey": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"nam": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 40, "message": "最大长度40个字符", "trigger": "blur" }
],
"lgiflg": [
{ "required": false, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"ssnbegdattim": [ {"required": true,"type": "string"}
],
"ssninr": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"ver": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 4, "message": "最大长度4个字符", "trigger": "blur" }
],
"pri": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"ety": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"usg": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 6, "message": "最大长度6个字符", "trigger": "blur" }
],
"lstdiadat": [
{ "required": true,"type": "string"}
],
"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" }
],
"tel": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 30, "message": "最大长度30个字符", "trigger": "blur" }
],
"fax": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 30, "message": "最大长度30个字符", "trigger": "blur" }
],
"eml": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 80, "message": "最大长度80个字符", "trigger": "blur" }
],
"quepow": [
{ "required": true, "message": "必输项", "trigger": "blur" },
{ "pattern": /^-?\d{0,6}(\.\d{1,2})?$/, "message": "整数不能超过6位,小数不能超过2位", "trigger": "blur" }
],
"etyextkey": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"oenr": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 4, "message": "最大长度4个字符", "trigger": "blur" }
],
"etaextkey": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"resusrflg": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"secsta": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
}
<template>
<m-usr ref="usr" title="dbausr" type="add"></m-usr>
</template>
<script>
import DbiUsr from "../Dbiusr";
export default {
name: "StaticsDbausr",
components: {
"m-usr": DbiUsr
},
data() {
return {};
},
mounted() {
// this.$refs.usr.rules['ptaList'] = [
// { type: 'array', required: true, min: 1, message: '地址信息栏不能为空' }
// ]
}
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-usr title="dbdusr" type="delete"></m-usr>
</template>
<script>
import DbiUsr from "../Dbiusr";
export default {
name: "StaticsDbdusr",
components: {
"m-usr": DbiUsr
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-usr title="dbeusr" type="edit"></m-usr>
</template>
<script>
import DbiUsr from "../Dbiusr";
export default {
name: "StaticsDbeusr",
components: {
"m-usr": DbiUsr
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<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="交易名" 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-select v-model="ubr.relcur" style="width: 100%" placeholder="请选择授权币种" :code="getCodesByKey('curtxt')"> </c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="授权金额" prop="relamt">
<c-input-currency class="input-currency-left"
v-model="ubr.relamt"
placeholder="请输入授权金额"
>
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="第二授权金额" prop="relamt2nd">
<c-input-currency class="input-currency-left"
v-model="ubr.relamt2nd"
placeholder="请输入第二授权金额"
>
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="授权状态" prop="relgrp">
<c-select v-model="ubr.relgrp" style="width: 100%" placeholder="请选择授权状态" :code="getCodesByKey('relgrp')"> </c-select>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" class="col-right">
<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="一次性释放授权" prop="autamt">
<c-input-currency class="input-currency-left"
v-model="ubr.autamt"
placeholder="请输入一次性释放授权"
>
</c-input-currency>
</el-form-item>
</c-col>
</c-col>
</el-form>
</div>
</template>
<script>
import { Pattern } from "../../model/Ubr";
import codes from "~/config/CodeTable";
export default {
name: "",
props: ['ubr', 'operate'],
data() {
return {
rules: Pattern,
};
},
methods:{
getCodesByKey(key) {
return codes[key] ?? [];
},
},
};
</script>
<style>
</style>
<template>
<div class="eibs-tab">
<div style="text-align: right">
<c-button size="small" type="primary" @click="ubrAdd()" :disabled="false"> 新增 </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 "../../model/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.ubr.usrinr=this.model.inr;
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.inr).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.ubr)
.then((res) => {
if (res) {
this.$message.success("修改柜员权限信息成功!");
//TODO model.uclList回填
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) {
// this.ubr.inr = this.model.inr
addUbrData(this.ubr)
.then((res) => {
if (res) {
this.$message.success("保存柜员权限信息成功!");
//TODO model.uclList回填
// this.model.ubrList = res.ubrList;
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
<template>
<div class="eibs">
<el-form
ref="modelForm"
label-width="160px"
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"
disabled=true
>
</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 "../../model/Ucl";
export default {
name: "",
props: ['ucl', 'operate'],
data() {
return {
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="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 "../../model/Ucl";
import {
addUclData,
updateUclData,
deleteUclData,
} from "@/service/test/usr";
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.ucl.usr=this.model.extkey;
this.operate = "add";
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) => {
console.log(row.branchinr)
deleteUclData(row.usr, row.branchinr).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) {
updateUclData(this.model.inr,this.ucl)
.then((res) => {
if (res) {
this.$message.success("修改柜员组信息成功!");
//TODO model.uclList回填
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) {
this.$message.success("保存柜员组信息成功!");
//TODO model.uclList回填
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
<template>
<div class="eibs-tab">
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="用户ID" prop="extkey">
<c-input
v-model="model.extkey"
placeholder="请输入用户ID"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="用户名" prop="nam">
<c-input
v-model="model.nam"
placeholder="请输入用户名"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="禁止登录" prop="lgiflg">
<c-select style="width: 100%"
v-model="model.lgiflg"
placeholder="请选择禁止登录标识"
:code="getCodesByKey('lgiflg')"
>
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="最近登录时间" prop="ssnbegdattim">
<c-date-picker
style="width: 100%"
v-model="model.ssnbegdattim"
placeholder="请选择最近登录时间"
>
</c-date-picker>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="SSN ID" prop="ssninr">
<c-input
v-model="model.ssninr"
placeholder="请输入SSN ID"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="实体标志" prop="pri">
<c-input
v-model="model.pri"
placeholder="请输入实体标志"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="实体" prop="ety">
<c-input
v-model="model.ety"
placeholder="请输入实体"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="用户组" prop="usg">
<c-input
v-model="model.usg"
placeholder="请输入用户组"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="最近DIA查看时间" prop="lstdiadat">
<c-date-picker
style="width: 100%"
v-model="model.lstdiadat"
placeholder="请选择最近DIA查看时间"
>
</c-date-picker>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="授权币种" prop="relcur">
<c-select v-model="model.relcur" style="width: 100%" placeholder="请选择账号币种" :code="getCodesByKey('curtxt')"> </c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="授权金额" prop="relamt">
<c-input-currency class="input-currency-left"
v-model="model.relamt"
placeholder="请输入授权金额"
>
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="第二授权金额" prop="relamt2nd">
<c-input-currency class="input-currency-left"
v-model="model.relamt2nd"
placeholder="请输入第二授权金额"
>
</c-input-currency>
</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="model.relgrp"
placeholder="请输入授权组"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="电话" prop="tel">
<c-input
v-model="model.tel"
placeholder="请输入电话"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="传真" prop ="fax">
<c-input
v-model="model.fax"
placeholder="请输入传真"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="电子邮箱" prop="eml">
<c-input
v-model="model.eml"
placeholder="请输入电子邮箱"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="可用时间" prop="quepow">
<c-input-currency class="input-currency-left"
v-model="model.quepow"
placeholder="请输入可用时间"
>
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="实体名称" prop="etyextkey">
<c-input
v-model="model.etyextkey"
placeholder="请输入实体名称"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="组织" prop="oenr">
<c-input
v-model="model.oenr"
placeholder="请输入组织"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="实体地址" prop="etaextkey">
<c-input
v-model="model.etaextkey"
placeholder="请输入实体地址"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="客户经理" prop="resusrflg">
<c-input
v-model="model.resusrflg"
placeholder="请输入客户经理"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="用户状态" prop="secsta">
<c-input
v-model="model.secsta"
placeholder="请输入用户状态"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="信件的组织单位" prop="letoenr">
<c-input
v-model="model.letoenr"
placeholder="请输入信件的组织单位"
>
</c-input>
</el-form-item>
</c-col>
<!-- <c-col :span="24">-->
<!-- <el-form-item label="ubrList" prop="ubrList">-->
<!-- <c-input-->
<!-- v-model="model.ubrList"-->
<!-- placeholder="请输入ubrList"-->
<!-- >-->
<!-- </c-input>-->
<!-- </el-form-item>-->
<!-- </c-col>-->
<!-- <c-col :span="24">-->
<!-- <el-form-item label="uclList" prop="uclList">-->
<!-- <c-input-->
<!-- v-model="model.uclList"-->
<!-- placeholder="请输入uclList"-->
<!-- >-->
<!-- </c-input>-->
<!-- </el-form-item>-->
<!-- </c-col>-->
</c-col>
</div>
</template>
<script>
import codes from "~/config/CodeTable";
export default {
name: "",
props: ["model"],
data() {
return {};
},
methods: {
getCodesByKey(key) {
return codes[key] ?? [];
},
},
};
</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="usr">
<c-content>
<m-usr-info :model="model" />
</c-content>
</el-tab-pane>
<el-tab-pane label="柜员权限信息" name="ubr">
<c-content>
<m-ubr-list :model="model" />
</c-content>
</el-tab-pane>
<el-tab-pane label="柜员组" name="ucl">
<c-content>
<m-ucl-list :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 Usr, { Pattern } from "../../model/Usr.js";
import UsrInfo from "./UsrInfo";
import UBrInfo from "./UbrList";
import UclInfo from "./UclList";
import { add, edit, deleteById, queryDetailById } from "~/service/test/usr";
export default {
name: "StaticsDbiusr",
components: {
"m-usr-info": UsrInfo,
"m-ubr-list": UBrInfo,
"m-ucl-list": UclInfo,
},
provide() {
return {
root: this,
};
},
props: {
type: {
type: String,
default: "info"
},
title: {
type: String,
default: "dbiusr"
}
},
data() {
return {
model: new Usr().data,
tabVal: "usr",
rules: Pattern,
};
},
computed: {
isDisabled() {
return this.type === "info" || this.type === "delete";
},
},
created() {
if (this.type !== "add") {
const inr = this.$route.params.inr;
// this.model.inr = this.$route.params.inr;
console.log(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 是否更新infusr的查询列表
*/
goBack(update) {
this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsInfusr", 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="用户ID" prop="extkey">
<c-input
v-model="model.extkey"
placeholder="请输入user-id"
></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="name">
<c-input
v-model="model.nam"
placeholder="请输入name"
></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="usrAdd">新增</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="onSearch()"
>查询
</el-button>
</c-col>
</c-col>
<c-col :span="24">
<c-paging-table
:data="usrData"
:columns="usrColumns"
:pageNumber="model.pageNum"
:pageSize="model.pageSize"
:total="model.total"
v-on:queryFunc="queryFunc"
:border="true"
>
<c-table-column fixed="right" prop="op" label="操作" width="320px">
<template slot-scope="{ scope }">
<c-button
style="margin-left: 0"
size="small"
@click="usrInfo(scope.$index, scope.row)"
>详情</c-button
>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="usrEdit(scope.$index, scope.row)"
>修改</c-button
>
<c-button
size="small"
style="margin-left: 5px"
@click="usrDelete(scope.$index, scope.row)"
>删除</c-button
>
<c-button id="useButton" size="small" style="margin-left: 5px" :disabled="useButtonVisible" @click="use(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 { queryByPage } from "~/service/test/usr.js";
export default {
name: "infsea",
props: ["model"],
inject: ["root"],
data() {
return {
usrData: [],
usrColumns: [
// { label: 'inr', prop: 'inr', width: 'auto' },
{ label: '用户ID', prop: 'extkey', width: 'auto' },
{ label: '用户名称', prop: 'nam', width: 'auto' },
// { label: '禁止登录', prop: 'lgiflg', width: 'auto' },
// { label: '最近登录时间', prop: 'ssnbegdattim', width: 'auto' },
// { label: 'SSN ID', prop: 'ssninr', width: 'auto' },
// { label: '版本号', prop: 'ver', width: 'auto' },
// { label: '实体标志', prop: 'pri', width: 'auto' },
// { label: '实体', prop: 'ety', width: 'auto' },
{ label: '用户组', prop: 'usg', width: 'auto' },
// { label: '
// ', prop: 'lstdiadat', width: 'auto' },
{ label: '授权币种', prop: 'relcur', width: 'auto' },
{ label: '授权金额', prop: 'relamt', width: 'auto' },
// { label: '第二授权金额', prop: 'relamt2nd', width: 'auto' },
// { label: '授权组', prop: 'relgrp', width: 'auto' },
// { label: '电话', prop: 'tel', width: 'auto' },
// { label: '传真', prop: 'fax', width: 'auto' },
// { label: '电子信箱', prop: 'eml', width: 'auto' },
// { label: '可用时间', prop: 'quepow', width: 'auto' },
// { label: '实体名称', prop: 'etyextkey', width: 'auto' },
// { label: '组织', prop: 'oenr', width: 'auto' },
{ label: '实体地址', prop: 'etaextkey', width: 'auto' },
{ label: '客户经理', prop: 'resusrflg', width: 'auto' },
// { label: 'secsta', prop: 'secsta', width: 'auto' },
// { label: 'letoenr', prop: 'letoenr', width: 'auto' },
// { label: 'ubrList', prop: 'ubrList', width: 'auto' },
// { label: 'uclList', prop: 'uclList', width: 'auto' },
],
useButtonVisible: true
};
},
// activated:已进入页面便可触发
activated() {
const { update } = this.$route.params
if (update) {
this.onInfusrSearch()
}
},
created() {
const { from } = this.$route.params
if (from != undefined && from != null) {
this.useButtonVisible = false
}
},
methods: {
use(row) {
const extkey = row.extkey
const { from } = this.$route.params
this.$store.dispatch("TagsView/delView", this.$route)
this.$router.push({
name: from,
params: {
extkey: extkey
}
})
},
handleReset() {
this.root.$refs.modelForm.resetFields();
},
onSearch(){
this.model.pageNum = 1;
this.model.pageSize = 5;
this.onInfusrSearch();
},
onInfusrSearch() {
queryByPage(this.model).then(res => {
/**
* pageNumber: 0
* pageSize: 0
* total:
* totalPage: 0
*/
const list = res.list
this.usrData = 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.onInfusrSearch()
},
// ptytypeChange(val) {
// this.model.ptytyp = val;
// },
// getCodesByKey(key) {
// return codes[key] ?? [];
// },
usrAdd() {
this.$router.push(`/statics/dbausr`)
},
usrInfo(index, row) {
this.$router.push(`/statics/dbiusr/${row.inr}`)
},
usrEdit(index, row) {
this.$router.push(`/statics/dbeusr/${row.inr}`)
},
usrDelete(index, row) {
this.$router.push(`/statics/dbdusr/${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: "StaticsInfusr",
components: {
"m-infsea": Infsea,
},
provide() {
return {
root: this,
};
},
data() {
return {
tabVal: "infsea",
model: {
// condition
nam: "",
extkey: "",
// 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