Commit 4cd63863 authored by jiangweijia's avatar jiangweijia

上传页面

parent 0d28092f
import { defineMock } from 'vite-plugin-mock-dev-server'
import mockjs from 'mockjs'
export default defineMock([
// 1001
{
url: '/api/1001.do',
body: (request) => {
return mockjs.mock({
'flist1': [
{
creditsCustNo: '102379731',
custNm: '测试客户102379731',
certTp: '身份证',
certNo: '532527198308242049',
custMgrNm: '[2215]秦敏捷',
belongdBrnLiqdNo: '机构53010255',
custValidStat: '有效'
},{
creditsCustNo: '102379351',
custNm: '测试客户102379351',
certTp: '身份证',
certNo: '370783198401010373',
custMgrNm: '[2215]秦敏捷',
belongdBrnLiqdNo: '机构53010255',
custValidStat: '有效'
},{
creditsCustNo: '102379511',
custNm: '测试客户102379511',
certTp: '身份证',
certNo: '441522198402164273',
custMgrNm: '[2215]秦敏捷',
belongdBrnLiqdNo: '机构53010255',
custValidStat: '有效'
},{
creditsCustNo: '102379361',
custNm: '测试客户102379361',
certTp: '身份证',
certNo: '130434198804030864',
custMgrNm: '[2216]刘瑞',
belongdBrnLiqdNo: '机构53010255',
custValidStat: '有效'
}
],
total:4
})
}
},
// 1004 查询
{
url: '/api/1004.do',
body: (request) => {
return mockjs.mock({
'flist1': [
{
CIFcustno: '100330494',
certTp: '身份证',
certNo: '530302198702126345',
custPsnNm: '王雅雯',
},{
CIFcustno: '100395430',
certTp: '身份证',
certNo: '532233196808023813',
custPsnNm: '虎恩德',
},{
CIFcustno: '100390276',
certTp: '身份证',
certNo: '533523198008080653',
custPsnNm: '杨继军',
},{
CIFcustno: '100330498',
certTp: '身份证',
certNo: '372922197502137715',
custPsnNm: '刘玉力',
},{
CIFcustno: '100357694',
certTp: '身份证',
certNo: '533522198610021617',
custPsnNm: '杨名先',
}
],
total:5
})
}
}
])
<template>
<div class="w-24 h-24 bg-slate-100">
<h1>1001</h1>
</div>
</template>
<script>
export default {
name: '1001',
data() {
return {}
},
methods: {},
created() {},
mounted() {}
}
</script>
<style scoped lang="less"></style>
import './index.less'
import { Icon } from '@iconify/vue2'
let _that
export default {
cName: '对公客户',
cCode: '1001',
beforeRouteLeave(to, from, next) {
next()
},
beforeRouteEnter(to, from, next) {
const _autorun = to.params._autorun
next((vm) => {
_autorun && _autorun(vm)
from && (vm.$from = from.name)
})
},
components: {
Icon
},
filters: {},
props: {},
data() {
return {
params: {
flist1: [],
form: { custNm: '', custCatgry: '', custMgrDept: '', certTp: '', certNo: '', custChoos: [] }
},
options: {},
table: {
flist1: {
options: {
rowKey: (record, index) => {
return index
}
},
pagination: {
current: 1,
pageSize: 10,
total: 0,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: ['10', '20', '50', '100'],
showTotal: (total) => `共 ${total} 条`,
onChange: this.handlePageChange_table67369,
onShowSizeChange: this.handlePageChange_table67369
}
}
},
enums: [],
result: {},
customData: {},
stepField: []
}
},
computed: {},
watch: {},
methods: {
// ----------------- 系统自带方法,严禁修改 -----------------
// 获取枚举
async $getOptions() {
const options = await this.$queryEnum(this.enums.join(';'))
Object.keys(options).forEach((key) => {
if (options[key] !== null && typeof options[key] === 'object') {
this.options[key] = Object.entries(options[key]).map(([value, label]) => ({
value,
label
}))
}
})
},
// 提交表单
$submit(callback) {
this.$refs.form.validate((state, data) => state && callback && callback(this.params))
},
// 重置表单
$reset() {
this.$refs.form.resetFields()
},
// 清除表单验证
$clearValidate(props) {
this.$refs.form.clearValidate(props)
},
// 跳转页面
$go(code, callback, replace = false) {
this.$router.push({
name: code,
params: {
_autorun: callback,
_replace: replace
}
})
},
// 返回上一页
$back(callback) {
if (!this.$from) return
this.$go(this.$from, callback, true)
},
// ----------------- 表格数据请求、分页、按钮方法 -----------------------------
async handlePageChange_table67369(current, pageSize) {
this.table.flist1.pagination.current = current
this.table.flist1.pagination.pageSize = pageSize
this.$submit((values) => {
this.updateTable_table67369(values)
})
},
async updateTable_table67369(values) {
let pagination = this.table.flist1.pagination
let params = {
...values,
current: String(pagination.current),
pageSize: String(pagination.pageSize)
}
this.$remote({
url: '1001.do',
params,
successFn: (response) => {
this.table.flist1.pagination.total = response.total
this.params.flist1 = response.flist1
},
failedFn: (error) => {
console.log(error)
},
conf: {
timeout: 1000
}
})
},
async table_btn_99424() {
this.$router.push({ name: 'trades-1001_1' })
},
// render table row buttn
async table_btn_100693(value) {
this.$go(
'trades-1001_2',
(vm) => {
// 自定义操作
},
true
)
},
// ----------------- 用户自定义方法 -----------------------------
async button27913_onClick() {
this.$submit((params) => {
this.$remote({
url: '1001.do',
params: {
...params.form
},
successFn: (response) => {
/*成功回调函数 (数据存储在response)*/
;(this.params.flist1 = response.flist1),
(this.table.flist1.pagination.total = response.total)
},
failedFn: (error) => {
console.log(error)
},
conf: {
timeout: 1000
}
})
})
},
async button70657_onClick() {
this.$reset()
}
},
created() {
_that = this
},
mounted() {
this.$getOptions()
this.button27913_onClick()
},
updated() {}
}
.ant-form-item {
width: 100%;
}
This diff is collapsed.
import './index.less'
import { Icon } from '@iconify/vue2'
let _that
export default {
cName: '对公客户新增',
cCode: '1001_1',
beforeRouteLeave(to, from, next) {
next()
},
beforeRouteEnter(to, from, next) {
const _autorun = to.params._autorun
next((vm) => {
_autorun && _autorun(vm)
from && (vm.$from = from.name)
})
},
components: {
Icon
},
filters: {},
props: {},
data() {
return {
params: {
form: {
cifCustno: '',
certTp: '',
certNo: '',
certAdd: '',
lnCardNo: '',
custNm: '',
custEngNm: '',
psnNmSpell: '',
formerName: '',
custTp: '',
custProperty: ''
}
},
options: {},
table: {},
enums: [],
result: {},
customData: {},
stepField: []
}
},
computed: {},
watch: {},
methods: {
// ----------------- 系统自带方法,严禁修改 -----------------
// 获取枚举
async $getOptions() {
const options = await this.$queryEnum(this.enums.join(';'))
Object.keys(options).forEach((key) => {
if (options[key] !== null && typeof options[key] === 'object') {
this.options[key] = Object.entries(options[key]).map(([value, label]) => ({
value,
label
}))
}
})
},
// 提交表单
$submit(callback) {
this.$refs.form.validate((state, data) => state && callback && callback(this.params))
},
// 重置表单
$reset() {
this.$refs.form.resetFields()
},
// 清除表单验证
$clearValidate(props) {
this.$refs.form.clearValidate(props)
},
// 跳转页面
$go(code, callback, replace = false) {
this.$router.push({
name: code,
params: {
_autorun: callback,
_replace: replace
}
})
},
// 返回上一页
$back(callback) {
if (!this.$from) return
this.$go(this.$from, callback, true)
},
// ----------------- 表格数据请求、分页、按钮方法 -----------------------------
// ----------------- 用户自定义方法 -----------------------------
async button109370_onClick() {
this.$submit((params) => {
this.$remote({
url: 'trade/1001add.do',
params: {
...params
},
successFn: (response) => {
/*成功回调函数 (数据存储在response)*/
},
failedFn: (error) => {
console.log(error)
},
conf: {
timeout: 1000
}
})
})
},
async button13986_onClick() {
this.$router.back()
}
},
created() {
_that = this
},
mounted() {
this.$getOptions()
},
updated() {}
}
.ant-form-item { width: 100%; }
This diff is collapsed.
This diff is collapsed.
.ant-form-item {
width: 100%;
}
This diff is collapsed.
import './index.less'
import { Icon } from '@iconify/vue2'
let _that
export default {
cName: '对公客户',
cCode: '1004',
beforeRouteLeave(to, from, next) {
next()
},
beforeRouteEnter(to, from, next) {
const _autorun = to.params._autorun
next((vm) => {
_autorun && _autorun(vm)
from && (vm.$from = from.name)
})
},
components: {
Icon
},
filters: {},
props: {},
data() {
return {
params: { flist1: [], form: { custPsnNm: '', certPsnNm: '' } },
options: {},
table: {
flist1: {
options: {
rowKey: (record, index) => {
return index
}
},
pagination: {
current: 1,
pageSize: 10,
total: 0,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: ['10', '20', '50', '100'],
showTotal: (total) => `共 ${total} 条`,
onChange: this.handlePageChange_table64418,
onShowSizeChange: this.handlePageChange_table64418
}
}
},
enums: [],
result: {},
customData: {},
stepField: []
}
},
computed: {},
watch: {},
methods: {
// ----------------- 系统自带方法,严禁修改 -----------------
// 获取枚举
async $getOptions() {
const options = await this.$queryEnum(this.enums.join(';'))
Object.keys(options).forEach((key) => {
if (options[key] !== null && typeof options[key] === 'object') {
this.options[key] = Object.entries(options[key]).map(([value, label]) => ({
value,
label
}))
}
})
},
// 提交表单
$submit(callback) {
this.$refs.form.validate((state, data) => state && callback && callback(this.params))
},
// 重置表单
$reset() {
this.$refs.form.resetFields()
},
// 清除表单验证
$clearValidate(props) {
this.$refs.form.clearValidate(props)
},
// 跳转页面
$go(code, callback, replace = false) {
this.$router.push({
name: code,
params: {
_autorun: callback,
_replace: replace
}
})
},
// 返回上一页
$back(callback) {
if (!this.$from) return
this.$go(this.$from, callback, true)
},
// ----------------- 表格数据请求、分页、按钮方法 -----------------------------
async handlePageChange_table64418(current, pageSize) {
this.table.flist1.pagination.current = current
this.table.flist1.pagination.pageSize = pageSize
this.$submit((values) => {
this.updateTable_table64418(values)
})
},
async updateTable_table64418(values) {
let pagination = this.table.flist1.pagination
let params = {
...values,
current: String(pagination.current),
pageSize: String(pagination.pageSize)
}
this.$remote({
url: '1004.do',
params,
successFn: (response) => {
this.table.flist1.pagination.total = response.total
this.params.flist1 = response.flist1
},
failedFn: (error) => {
console.log(error)
},
conf: {
timeout: 1000
}
})
},
async table_btn_90424() {
this.$router.push({ name: 'trades-1004_1' })
},
// render table row buttn
async table_btn_14181(value) {},
async table_btn_107866(value) {},
// ----------------- 用户自定义方法 -----------------------------
async button71746_onClick() {
this.$submit((params) => {
this.$remote({
url: '1004.do',
params: {
...params.form
},
successFn: (response) => {
/*成功回调函数 (数据存储在response)*/
console.log(response)
this.params.flist1 = response.flist1
this.table.flist1.pagination.total = 11
},
failedFn: (error) => {
console.log(error)
},
conf: {
timeout: 1000
}
})
})
}
},
created() {
_that = this
},
mounted() {
this.$getOptions()
this.button71746_onClick()
},
updated() {}
}
.ant-form-item {
width: 100%;
}
This diff is collapsed.
This diff is collapsed.
.ant-form-item {
width: 100%;
}
This diff is collapsed.
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