Commit 8ec3fe15 authored by jiangqihao's avatar jiangqihao

附件,loading

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