Commit 8ec3fe15 authored by jiangqihao's avatar jiangqihao

附件,loading

parent a875af9e
...@@ -346,6 +346,7 @@ export const file = { ...@@ -346,6 +346,7 @@ export const file = {
detailUrl: '/file/getOne', detailUrl: '/file/getOne',
updateUrl: '/file/update', updateUrl: '/file/update',
deleteUrl: '/file/delete', deleteUrl: '/file/delete',
batchCreate: '/file/batchCreate'
} }
// export const businessLog = { // export const businessLog = {
......
<template> <template>
<div class="form-container"> <div class="form-container" v-loading="loading">
<Title :title="title"> <Title :title="title">
<span>*</span>为必填项 <span>*</span>为必填项
</Title> </Title>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div class="btn"> <div class="btn">
<el-button <el-button
type="primary" type="primary"
:loading="loading" :loading="btnLoading"
@click="authentication" @click="authentication"
:disabled="showAuthentication" :disabled="showAuthentication"
> >
...@@ -51,6 +51,7 @@ export default { ...@@ -51,6 +51,7 @@ export default {
data () { data () {
return { return {
loading: false, loading: false,
btnLoading: false,
typeCode: uploadCode.customer, typeCode: uploadCode.customer,
title: '城市代理商详情', title: '城市代理商详情',
addBtnStart: true, addBtnStart: true,
...@@ -331,16 +332,21 @@ export default { ...@@ -331,16 +332,21 @@ export default {
return formData; return formData;
}, },
getOneData() { getOneData() {
this.loading = true
const dataId = this.$route.query.objectID const dataId = this.$route.query.objectID
customerGetOne({ objectID: dataId }).then(res => { customerGetOne({ objectID: dataId }).then(res => {
this.loading = false
this.formData = res.results[0] this.formData = res.results[0]
if(res.results[0].ExtCustomerType_SDK === '111') { if(res.results[0].ExtCustomerType_SDK === '111') {
this.btnStart = false this.btnStart = false
} }
}).catch(() => {
this.loading = false
this.$$message.error("数据获取失败")
}) })
}, },
authentication() { authentication() {
this.loading = true this.btnLoading = true
const val = { const val = {
objectID: this.formData.ObjectID, objectID: this.formData.ObjectID,
extLeaderEmail_SDK: this.formData.ExtLeaderEmail_SDK, extLeaderEmail_SDK: this.formData.ExtLeaderEmail_SDK,
...@@ -350,7 +356,7 @@ export default { ...@@ -350,7 +356,7 @@ export default {
extCity_SDK: this.formData.ExtCity_SDK, extCity_SDK: this.formData.ExtCity_SDK,
} }
seniorCertification(val).then(res => { seniorCertification(val).then(res => {
this.loading = false this.btnLoading = false
this.$message.success('认证成功') this.$message.success('认证成功')
}) })
} }
......
<template> <template>
<div class="form-container"> <div class="form-container" v-loading="loading">
<Title :title="title"> <Title :title="title">
<span>*</span>为必填项 <span>*</span>为必填项
</Title> </Title>
...@@ -36,6 +36,7 @@ export default { ...@@ -36,6 +36,7 @@ export default {
}, },
data () { data () {
return { return {
loading: false,
typeCode: uploadCode.customer, typeCode: uploadCode.customer,
title: '总代理商详情', title: '总代理商详情',
addBtnStart: true, addBtnStart: true,
...@@ -313,12 +314,17 @@ export default { ...@@ -313,12 +314,17 @@ export default {
return formData; return formData;
}, },
getOneData() { getOneData() {
this.loading = true
const dataId = this.$route.query.objectID const dataId = this.$route.query.objectID
customerGetOne({ objectID: dataId }).then(res => { customerGetOne({ objectID: dataId }).then(res => {
this.formData = res.results[0] this.formData = res.results[0]
this.loading = false
if(res.results[0].ExtCustomerType_SDK === '111') { if(res.results[0].ExtCustomerType_SDK === '111') {
this.btnStart = false this.btnStart = false
} }
}).catch(() => {
this.loading = false
this.$$message.error("数据获取失败")
}) })
} }
} }
......
<template> <template>
<div class="form-container"> <div class="form-container" v-loading="loading">
<Title :title="title"> <Title :title="title">
<span>*</span>为必填项 <span>*</span>为必填项
</Title> </Title>
...@@ -36,6 +36,7 @@ export default { ...@@ -36,6 +36,7 @@ export default {
}, },
data () { data () {
return { return {
loading: false,
typeCode: uploadCode.customer, typeCode: uploadCode.customer,
title: '省代理商详情', title: '省代理商详情',
addBtnStart: true, addBtnStart: true,
...@@ -314,12 +315,17 @@ export default { ...@@ -314,12 +315,17 @@ export default {
return formData; return formData;
}, },
getOneData() { getOneData() {
this.loading = true
const dataId = this.$route.query.objectID const dataId = this.$route.query.objectID
customerGetOne({ objectID: dataId }).then(res => { customerGetOne({ objectID: dataId }).then(res => {
this.loading = false
this.formData = res.results[0] this.formData = res.results[0]
if(res.results[0].ExtCustomerType_SDK === '111') { if(res.results[0].ExtCustomerType_SDK === '111') {
this.btnStart = false this.btnStart = false
} }
}).catch(() => {
this.loading = false
this.$$message.error("数据获取失败")
}) })
} }
} }
......
...@@ -168,7 +168,7 @@ export default { ...@@ -168,7 +168,7 @@ export default {
}, },
handleAdd() { handleAdd() {
this.dialogTitle = '创建附件' this.dialogTitle = '创建附件'
this.formData = {} // this.formData = {}
this.fileList = [] this.fileList = []
this.dialogFormVisible = true this.dialogFormVisible = true
}, },
......
<template> <template>
<div class="form-container"> <div class="form-container" v-loading="loading">
<Title :title="title"> <Title :title="title">
<span>*</span>为必填项 <span>*</span>为必填项
</Title> </Title>
<div class="basic-info"> <div class="basic-info" >
<ele-form-section <ele-form-section
v-model="formData" v-model="formData"
:request-fn="handleSubmit" :request-fn="handleSubmit"
...@@ -36,8 +36,9 @@ export default { ...@@ -36,8 +36,9 @@ export default {
}, },
data () { data () {
return { return {
loading: false,
typeCode: uploadCode.customer, typeCode: uploadCode.customer,
title: '代理商详情', title: '代理商详情qer',
dedeleBtnStart: true, dedeleBtnStart: true,
objectID: '', objectID: '',
addBtnStart: true, addBtnStart: true,
...@@ -310,20 +311,19 @@ export default { ...@@ -310,20 +311,19 @@ export default {
return formData; return formData;
}, },
async getOneData() { async getOneData() {
// const dataId = await JSON.parse(localStorage.getItem('USERINFO')).ExtCustomerObjectID_SDK this.loading = true
// console.log(dataId)
// this.$router.push({
// path: '/Personal-customers',
// query: { objectID: JSON.parse(localStorage.getItem('USERINFO')).ExtCustomerObjectID_SDK}
// })
customerGetOne({ objectID: JSON.parse(localStorage.getItem('USERINFO')).ExtCustomerObjectID_SDK }).then(res => { customerGetOne({ objectID: JSON.parse(localStorage.getItem('USERINFO')).ExtCustomerObjectID_SDK }).then(res => {
this.formData = res.results[0] this.formData = res.results[0]
this.addBtnStart = false this.addBtnStart = false
this.loading = false
this.dedeleBtnStart = false this.dedeleBtnStart = false
this.$router.push({ this.$router.push({
path: '/Personal-customers', path: '/Personal-customers',
query: { objectID: JSON.parse(localStorage.getItem('USERINFO')).ExtCustomerObjectID_SDK} query: { objectID: JSON.parse(localStorage.getItem('USERINFO')).ExtCustomerObjectID_SDK}
}) })
}).catch(() => {
this.loading = false
this.$$message.error("数据获取失败")
}) })
} }
} }
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
ref="form" ref="form"
v-bind="formConfig" v-bind="formConfig"
v-model="formData" v-model="formData"
/> />
</div> </div>
<div class="submit-btn"> <div class="submit-btn">
<el-button <el-button
...@@ -173,7 +173,7 @@ export default { ...@@ -173,7 +173,7 @@ export default {
OldPassword: { OldPassword: {
type: "input", type: "input",
label: "原始密码", label: "原始密码",
layout: 14, layout: 24,
required: true, required: true,
rules: [ rules: [
{ {
...@@ -190,7 +190,7 @@ export default { ...@@ -190,7 +190,7 @@ export default {
NewPassword: { NewPassword: {
type: "password", type: "password",
label: "新密码", label: "新密码",
layout: 14, layout: 24,
required: true, required: true,
rules: [ rules: [
{ {
...@@ -198,7 +198,7 @@ export default { ...@@ -198,7 +198,7 @@ export default {
max: 16, max: 16,
type: "string", type: "string",
trigger: "blur", trigger: "blur",
message: "请按照密码规则输入!!" } message: "请按照密码规则输入!!"}
], ],
tip: "密码由字母(区分大小写)和数字组成,长度8-16位", tip: "密码由字母(区分大小写)和数字组成,长度8-16位",
attrs: { attrs: {
...@@ -210,7 +210,7 @@ export default { ...@@ -210,7 +210,7 @@ export default {
AgainPassword: { AgainPassword: {
type: "password", type: "password",
label: "确认密码", label: "确认密码",
layout: 14, layout: 24,
required: true, required: true,
rules: [ rules: [
{ {
...@@ -221,7 +221,7 @@ export default { ...@@ -221,7 +221,7 @@ export default {
message: "请按照密码规则输入!!" message: "请按照密码规则输入!!"
} }
], ],
tip: "密码由字母(区分大小写)和数字组成,长度8-16位", tip: "与新密码保持一致",
attrs: { attrs: {
size: "mini", size: "mini",
clearable: false, clearable: false,
...@@ -310,6 +310,7 @@ export default { ...@@ -310,6 +310,7 @@ export default {
} }
}) })
.catch(() => { .catch(() => {
this.$message.error('登录异常,请重新登录')
this.loading = false this.loading = false
}) })
} else { } else {
...@@ -345,7 +346,7 @@ export default { ...@@ -345,7 +346,7 @@ export default {
// console.log("登入成功") // console.log("登入成功")
this.loading = false this.loading = false
this.updatePassword = false this.updatePassword = false
this.$router.push({ path: this.redirect || '/', query: this.otherQuery }) this.$router.push({ path: '/', query: this.otherQuery })
}) })
} else { } else {
this.loading = false this.loading = false
...@@ -508,9 +509,10 @@ $dark_gray:#889aa4; ...@@ -508,9 +509,10 @@ $dark_gray:#889aa4;
} }
} }
.submit-btn { .submit-btn {
padding: 0 15px 20px 0px;
.el-button { .el-button {
height: 40px; height: 40px;
width: 300px; width: 330px;
} }
} }
.el-dialog__body { .el-dialog__body {
...@@ -524,9 +526,12 @@ $dark_gray:#889aa4; ...@@ -524,9 +526,12 @@ $dark_gray:#889aa4;
} }
::v-deep .el-form-item { ::v-deep .el-form-item {
margin-bottom: 20px; margin-bottom: 20px;
.el-input{
height: 37px !important;
}
} }
::v-deep .el-form-item__content { ::v-deep .el-form-item__content {
width: 220px; width: 330px;
height: 32px; height: 32px;
.el-input { .el-input {
height: 32px; height: 32px;
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
<el-button <el-button
type="primary" type="primary"
@click="handleSave" @click="handleSave"
:loading="savaLoading"
>保存</el-button> >保存</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -102,6 +103,7 @@ export default { ...@@ -102,6 +103,7 @@ export default {
dialogFormVisible: false, dialogFormVisible: false,
dialogTitle: '', dialogTitle: '',
loading: false, loading: false,
savaLoading: false,
url: '' url: ''
} }
}, },
...@@ -122,7 +124,7 @@ export default { ...@@ -122,7 +124,7 @@ export default {
constant.formConfig.formDesc.TypeCode.default = this.typeCode constant.formConfig.formDesc.TypeCode.default = this.typeCode
// constant.formConfig.formDesc.Path.default = this.path // constant.formConfig.formDesc.Path.default = this.path
this.tableListeners = { this.tableListeners = {
handleEdit: this.handleEdit, // handleEdit: this.handleEdit,
handleDownload: this.handleDownload handleDownload: this.handleDownload
} }
if (this.$attrs['form-data'] && this.$attrs['form-data'].BusinessObjectID) { if (this.$attrs['form-data'] && this.$attrs['form-data'].BusinessObjectID) {
...@@ -143,25 +145,26 @@ export default { ...@@ -143,25 +145,26 @@ export default {
}, },
handleAdd() { handleAdd() {
this.dialogTitle = '创建附件' this.dialogTitle = '创建附件'
this.formData = {} // this.formData = {}
this.fileList = []
this.dialogFormVisible = true
},
handleEdit(row, index) {
this.dialogTitle = '编辑附件'
this.$index = index
this.row = row
this.formData = {}
this.getDetails({ objectID: row.ObjectID })
this.fileList = [] this.fileList = []
this.dialogFormVisible = true this.dialogFormVisible = true
}, },
// handleEdit(row, index) {
// this.dialogTitle = '编辑附件'
// this.$index = index
// this.row = row
// this.formData = {}
// this.getDetails({ objectID: row.ObjectID })
// this.fileList = []
// this.dialogFormVisible = true
// },
// 选择/删除临时文件 // 选择/删除临时文件
changeFileList(fileList) { changeFileList(fileList) {
this.fileList = fileList this.fileList = fileList
}, },
handleSave() { handleSave() {
const fd = this.$getUpdateChange(this.row, this.formData) const fd = this.$getUpdateChange(this.row, this.formData)
console.log(fd)
if (Object.keys(fd).length < 2 && this.fileList.length === 0) { if (Object.keys(fd).length < 2 && this.fileList.length === 0) {
this.dialogFormVisible = false this.dialogFormVisible = false
return return
...@@ -185,7 +188,10 @@ export default { ...@@ -185,7 +188,10 @@ export default {
formData.append('businessObjectID', businessObjectID) formData.append('businessObjectID', businessObjectID)
formData.delete('objectID') formData.delete('objectID')
this.loading = true this.loading = true
this.savaLoading = true
// console.log(formData)
this.$request(file.createUrl, formData).then(() => { this.$request(file.createUrl, formData).then(() => {
this.savaLoading = false
this.loading = false this.loading = false
this.dialogFormVisible = false this.dialogFormVisible = false
this.fileList = [] this.fileList = []
...@@ -193,6 +199,8 @@ export default { ...@@ -193,6 +199,8 @@ export default {
this.$refs.eleTable.url = file.searchUrl this.$refs.eleTable.url = file.searchUrl
this.$refs.eleTable.handleSearch() this.$refs.eleTable.handleSearch()
}).catch(() => { }).catch(() => {
this.$message.error('添加失败')
this.savaLoading = false
this.loading = false this.loading = false
}) })
} else { } else {
......
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