Commit 89410d2e by javaHeight

gtx

parent b5e305e6
<template>
<m-gtx title="dbagtx" type="add"></m-gtx>
</template>
<script>
import Dbigtx from "~/views/Statics/Dbigtx";
export default {
name: "StaticsDbagtx",
components: {
"m-gtx": Dbigtx
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-gtx title="dbdgtx" type="delete"></m-gtx>
</template>
<script>
import Dbigtx from "~/views/Statics/Dbigtx";
export default {
name: "StaticsDbdgtx",
components: {
"m-gtx": Dbigtx
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-gtx title="dbegtx" type="edit"></m-gtx>
</template>
<script>
import Dbigtx from "~/views/Statics/Dbigtx";
export default {
name: "StaticsDbegtx",
components: {
"m-gtx": Dbigtx
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
export default class Pty {
constructor() {
this.data = {
inr: "",
extkey: "",
nam: "",
ver: "",
gidtxt: "",
gartyp: "",
hndtyp: "",
objtyp: "",
objinr: "",
gtxpri: "",
expflg: "",
uil: "",
laborcdat: "",
labaddinf: "",
legfrm: "",
covgodsrvdft: "",
etgextkey: "",
}
}
}
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": 24, "message": "最大长度24个字符", "trigger": "blur" }
],
"nam": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 44, "message": "最大长度44个字符", "trigger": "blur" }
],
"ver": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 4, "message": "最大长度4个字符", "trigger": "blur" }
],
"gidtxt": [
],
"gartyp": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"hndtyp": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 2, "message": "最大长度2个字符", "trigger": "blur" }
],
"objtyp": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 6, "message": "最大长度6个字符", "trigger": "blur" }
],
"objinr": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"gtxpri": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"expflg": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"uil": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 2, "message": "最大长度2个字符", "trigger": "blur" }
],
"laborcdat": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 15, "message": "最大长度15个字符", "trigger": "blur" }
],
"labaddinf": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 15, "message": "最大长度15个字符", "trigger": "blur" }
],
"legfrm": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 4, "message": "最大长度4个字符", "trigger": "blur" }
],
"covgodsrvdft": [
{ "type": "string", "trigger": "blur" },
{ "max": 420, "message": "最大长度420个字符", "trigger": "blur" }
],
}
<template>
<div class="eibs-tab">
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="inr" prop="inr">
<c-input
v-model="model.inr"
placeholder="请输入inr"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="extkey" prop="extkey">
<c-input
v-model="model.extkey"
placeholder="请输入extkey"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="nam" prop="nam">
<c-input
v-model="model.nam"
placeholder="请输入nam"
>
</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="gidtxt" prop="gidtxt">
<c-input
v-model="model.gidtxt"
placeholder="请输入gidtxt"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="gartyp" prop="gartyp">
<c-input
v-model="model.gartyp"
placeholder="请输入gartyp"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="hndtyp" prop="hndtyp">
<c-input
v-model="model.hndtyp"
placeholder="请输入hndtyp"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="objtyp" prop="objtyp">
<c-input
v-model="model.objtyp"
placeholder="请输入objtyp"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="objinr" prop="objinr">
<c-input
v-model="model.objinr"
placeholder="请输入objinr"
>
</c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="gtxpri" prop="gtxpri">
<c-input
v-model="model.gtxpri"
placeholder="请输入gtxpri"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="expflg" prop="expflg">
<c-input
v-model="model.expflg"
placeholder="请输入expflg"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="uil" prop="uil">
<c-input
v-model="model.uil"
placeholder="请输入uil"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="laborcdat" prop="laborcdat">
<c-input
v-model="model.laborcdat"
placeholder="请输入laborcdat"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="labaddinf" prop="labaddinf">
<c-input
v-model="model.labaddinf"
placeholder="请输入labaddinf"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="legfrm" prop="legfrm">
<c-input
v-model="model.legfrm"
placeholder="请输入legfrm"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="covgodsrvdft" prop="covgodsrvdft">
<c-input
v-model="model.covgodsrvdft"
placeholder="请输入covgodsrvdft"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="etgextkey" prop="etgextkey">
<c-input
v-model="model.etgextkey"
placeholder="请输入etgextkey"
>
</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="gtx">
<c-content>
<!-- <m-pty-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 Gtx, { Pattern } from "./Gtx.js";
// import PtyInfo from "./PtyInfo.vue";
// import AdrList from "./AdrList.vue";
// import ActInfo from "./ActInfo.vue";
// import PtcInfo from "./PtcInfo.vue";
// import RatInfo from "./RatInfo.vue";
import { queryDetailById, add, edit, deleteById } from "~/service/test/pty.js";
export default {
name: "StaticsDbipty",
components: {
// "m-pty-info": PtyInfo,
// "m-adr-list": AdrList,
// "m-act-info": ActInfo,
// "m-ptc-info": PtcInfo,
// "m-rat-info": RatInfo,
},
provide() {
return {
root: this,
};
},
props: {
type: {
type: String,
default: "info"
},
title: {
type: String,
default: "dbigtx"
}
},
data() {
return {
model: new Gtx().data,
tabVal: "gtx",
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 是否更新infpty的查询列表
*/
goBack(update) {
this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsInfgtx", params: { update } });
},
},
};
</script>
<style>
</style>
\ No newline at end of file
...@@ -26,6 +26,12 @@ import Dbafec from "./Dbafec"; ...@@ -26,6 +26,12 @@ import Dbafec from "./Dbafec";
import Dbefec from "./Dbefec"; import Dbefec from "./Dbefec";
import Dbdfec from "./Dbdfec"; import Dbdfec from "./Dbdfec";
import Infgtx from "./Infgtx";
import Dbigtx from "./Dbigtx";
import Dbagtx from "./Dbagtx";
import Dbegtx from "./Dbegtx";
import Dbdgtx from "./Dbdgtx";
const StaticsRouter = [ const StaticsRouter = [
{ path: 'infpty', component: Infpty, name: 'StaticsInfpty', meta: { title: '客户查询' } }, { path: 'infpty', component: Infpty, name: 'StaticsInfpty', meta: { title: '客户查询' } },
{ path: 'dbapty', component: Dbapty, name: 'StaticsDbapty', meta: { title: '客户新增' } }, { path: 'dbapty', component: Dbapty, name: 'StaticsDbapty', meta: { title: '客户新增' } },
...@@ -55,6 +61,12 @@ const StaticsRouter = [ ...@@ -55,6 +61,12 @@ const StaticsRouter = [
{ path: 'dbifec/:inr', component: Dbifec, name: 'StaticsDbifec', meta: { title: (tag) => { return '费率详情: ' + tag.params.inr } } }, { path: 'dbifec/:inr', component: Dbifec, name: 'StaticsDbifec', meta: { title: (tag) => { return '费率详情: ' + tag.params.inr } } },
{ path: 'dbefec/:inr', component: Dbefec, name: 'StaticsDbefec', meta: { title: (tag) => { return '费率修改: ' + tag.params.inr } } }, { path: 'dbefec/:inr', component: Dbefec, name: 'StaticsDbefec', meta: { title: (tag) => { return '费率修改: ' + tag.params.inr } } },
{ path: 'dbdfec/:inr', component: Dbdfec, name: 'StaticsDbdfec', meta: { title: (tag) => { return '费率删除: ' + tag.params.inr } } }, { path: 'dbdfec/:inr', component: Dbdfec, name: 'StaticsDbdfec', meta: { title: (tag) => { return '费率删除: ' + tag.params.inr } } },
{ path: 'infgtx', component: Infgtx, name: 'StaticsInfgtx', meta: { title: '保函文本查询' } },
{ path: 'dbagtx', component: Dbagtx, name: 'StaticsDbagtx', meta: { title: '保函文本新增' } },
{ path: 'dbigtx/:inr', component: Dbigtx, name: 'StaticsDbigtx', meta: { title: (tag) => { return '保函文本详情: ' + tag.params.inr } } },
{ path: 'dbegtx/:inr', component: Dbegtx, name: 'StaticsDbegtx', meta: { title: (tag) => { return '保函文本修改: ' + tag.params.inr } } },
{ path: 'dbdgtx/:inr', component: Dbdgtx, name: 'StaticsDbdgtx', meta: { title: (tag) => { return '保函文本删除: ' + tag.params.inr } } },
] ]
export default StaticsRouter export default StaticsRouter
<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: "StaticsInfgtx",
components: {
"m-infsea": Infsea,
},
provide() {
return {
root: this,
};
},
data() {
return {
tabVal: "infsea",
model: {
// pty
nam: "",
extkey: "",
idtype: "",
trnman: "",
idcode: "",
ptytyp: "C",
// 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