Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-dj-oss-equity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 303a7e16
authored
Jul 26, 2021
by
zhouzy
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
快速点击提交存在的问题
1 parent
786eaa28
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
253 additions
and
24 deletions
src/views/customer/customerService/index.vue
src/views/customer/rightsCardManagement/index.vue
src/views/customer/customerService/index.vue
View file @
303a7e1
<!--客服管理-->
<
template
>
<div
class=
"ctn"
>
<div
class=
"addCustomer"
@
click=
"addCustomer"
>
点击添加客服
<!-- 客服列表 -->
<div
class=
"tableCtn"
>
<d2-table
ref=
"recordTable"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<el-button
type=
"text"
@
click=
"mod(scope.scope)"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"del(scope.scope)"
>
删除
</el-button>
</span>
</d2-table>
</div>
<!-- 添加客服弹窗 -->
<el-dialog
title=
"添加客服"
:visible
.
sync=
"dialogVisible"
width=
"30%"
:before-close=
"handleClose"
width=
"610px"
>
<span>
添加客服
</span>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
class=
"demo-ruleForm"
>
<el-form-item
label=
"客服名称:"
prop=
"customerService"
>
<el-input
v-model=
"ruleForm.customerService"
></el-input>
</el-form-item>
<el-form-item
label=
"联系电话:"
prop=
"radio"
>
<el-radio-group
v-model=
"ruleForm.radio"
>
<el-radio
:label=
"3"
>
手机号
</el-radio>
<el-radio
:label=
"6"
>
座机号
</el-radio>
<el-radio
:label=
"9"
>
不填
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"手机号码:"
prop=
"telNumber"
>
<el-input
v-model=
"ruleForm.telNumber"
></el-input>
</el-form-item>
<el-form-item
label=
"验证码:"
prop=
"code"
>
<div
class=
"lineCtn"
>
<el-input
v-model=
"ruleForm.code"
></el-input>
<div
class=
"buttonCtn"
>
<el-button
type=
"primary"
>
获取验证码
</el-button>
</div>
</div>
</el-form-item>
<el-form-item
label=
"客服二维码:"
prop=
""
>
<el-upload
class=
"avatar-uploader"
action=
"https://jsonplaceholder.typicode.com/posts/"
:show-file-list=
"false"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
<div>
建议尺寸750*500px,JPG
</div>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"
dialogVisible = false
"
>
取 消
</el-button>
<el-button
@
click=
"
resetForm('ruleForm')
"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"
dialogVisible = false
"
@
click=
"
submitForm('ruleForm')
"
>
确 定
</el-button>
</span>
</el-dialog>
...
...
@@ -30,23 +110,108 @@
</
template
>
<
script
>
import
{
equityApi
}
from
'@/api/api'
export
default
{
data
()
{
return
{
dialogVisible
:
false
imageUrl
:
''
,
dialogVisible
:
false
,
ruleForm
:
{
customerService
:
''
,
phoneStyle
:
''
,
telNumber
:
''
,
code
:
''
,
radio
:
''
},
//客户服务管理列表
getListApi
:
equityApi
.
getEquityCardList
,
// getListApi: none,
searchForm
:
{
merchantName
:
''
},
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
'list'
,
tableOption
:
true
,
tableColumns
:
[
{
label
:
'客服编号'
,
prop
:
'cardClassName'
// minWidth: '200'
},
{
label
:
'客服名称'
,
prop
:
'merchantName'
,
minWidth
:
'200'
,
},
{
label
:
'手机号码'
,
prop
:
'recipientCount'
},
{
label
:
'手机二维码'
,
prop
:
'status'
,
},
]
},
rules
:
{
customerService
:
[
{
required
:
true
,
message
:
'请输入客服名称'
,
trigger
:
'change'
},
],
radio
:
[
{
required
:
true
,
message
:
'请选择联系方式'
,
trigger
:
'change'
},
],
telNumber
:
[
{
required
:
true
,
message
:
'请输入手机号码'
,
trigger
:
'change'
},
],
code
:
[
{
required
:
true
,
message
:
'请输入验证码'
,
trigger
:
'change'
},
],
}
};
},
methods
:
{
handleClose
(
done
)
{
this
.
$confirm
(
'确认关闭?'
)
.
then
(
_
=>
{
done
();
})
.
catch
(
_
=>
{
});
//修改客户
mod
()
{
this
.
dialogVisible
=
true
},
//删除客户
del
()
{
},
//上传二维码
handleAvatarSuccess
(
res
,
file
)
{
this
.
imageUrl
=
URL
.
createObjectURL
(
file
.
raw
);
},
beforeAvatarUpload
(
file
)
{
const
isJPG
=
file
.
type
===
'image/jpg'
;
const
isPNG
=
file
.
type
===
'image/png'
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
0.4882813
;
if
(
!
isJPG
&&
!
isPNG
)
{
this
.
$message
.
error
(
'上传头像图片只能是jpg,png格式!'
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'上传头像图片大小不能超过 500KB!'
);
}
return
isJPG
&&
isLt2M
;
},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
alert
(
'submit!'
);
this
.
dialogVisible
=
false
this
.
$refs
[
formName
].
resetFields
();
}
else
{
console
.
log
(
'error submit!!'
);
return
false
;
}
});
},
resetForm
(
formName
)
{
this
.
$refs
[
formName
].
resetFields
();
this
.
dialogVisible
=
false
},
// 打开客服弹窗
addCustomer
(){
this
.
dialogVisible
=
true
addCustomer
()
{
this
.
dialogVisible
=
true
}
}
};
...
...
@@ -57,4 +222,64 @@ export default {
margin
:
0
;
border
:
0
;
}
.lineCtn
{
display
:
flex
;
flex-direction
:
row
;
}
.buttonCtn
{
margin-left
:
20px
;
}
.avatar-uploader
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
border-radius
:
6px
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
}
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409eff
;
}
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
#8c939d
;
width
:
178px
;
height
:
178px
;
line-height
:
178px
;
text-align
:
center
;
}
.avatar
{
width
:
178px
;
height
:
178px
;
display
:
block
;
}
.tableCtn
{
margin-top
:
20px
;
margin-left
:
20px
;
margin-right
:
20px
;
}
/* .el-icon {
font-family: element-icons!important;
font-style: normal;
font-weight: 400;
font-variant: normal;
text-transform: none;
line-height: 178px;
vertical-align: baseline;
display: inline-block;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
} */
.el-icon-
{
font-family
:
element-icons
!important
;
font-style
:
normal
;
font-weight
:
400
;
font-variant
:
normal
;
text-transform
:
none
;
line-height
:
178px
;
vertical-align
:
baseline
;
display
:
inline-block
;
-webkit-font-smoothing
:
antialiased
;
-moz-osx-font-smoothing
:
grayscale
;
}
</
style
>
src/views/customer/rightsCardManagement/index.vue
View file @
303a7e1
...
...
@@ -210,6 +210,7 @@
<div
class=
"buttonCtn"
>
<el-form-item>
<el-button
:disabled=
"submitBtn"
type=
"primary"
@
click=
"submitForm('ruleForm')"
>
提交
</el-button>
...
...
@@ -238,7 +239,8 @@ import { equityApi } from '@/api/api'
export
default
{
data
()
{
return
{
disableInputNumber
:
false
,
submitBtn
:
false
,
disableInputNumber
:
false
,
disableSelect
:
false
,
//分页查询下拉框
options
:
[],
...
...
@@ -474,6 +476,7 @@ export default {
// console.log(this.isAdd)
// console.log(row)
this
.
ruleForm
=
row
this
.
submitBtn
=
false
// this.changeStore()
this
.
dialogVisible
=
true
console
.
log
(
this
.
ruleForm
.
effectiveType
)
...
...
@@ -495,6 +498,7 @@ export default {
},
//复制
copy
(
row
)
{
this
.
submitBtn
=
false
this
.
disableSelect
=
false
this
.
isAdd
=
true
console
.
log
(
this
.
isAdd
)
...
...
@@ -506,6 +510,7 @@ export default {
}
},
addCard
(
cd
)
{
this
.
submitBtn
=
false
this
.
generateOptions
=
[]
this
.
dialogVisible
=
true
this
.
isAdd
=
cd
...
...
@@ -559,14 +564,14 @@ export default {
//判断是否是从新建按钮进来的
var
apiName
=
this
.
isAdd
?
'newEquityCard'
:
'editEquityCard'
console
.
log
(
apiName
)
this
.
submitBtn
=
true
equityApi
[
apiName
](
this
.
ruleForm
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
apiName
)
//请求是否成功
if
(
res
.
code
==
0
)
{
this
.
effectiveNum
=
''
this
.
ruleForm
=
{}
this
.
dialogVisible
=
false
this
.
effectiveNum
=
''
this
.
isAdd
=
false
this
.
$message
({
message
:
"操作成功"
,
...
...
@@ -596,12 +601,11 @@ export default {
});
},
resetForm
(
formName
)
{
this
.
dialogVisible
=
false
this
.
effectiveNum
=
''
this
.
isAdd
=
false
this
.
inputSwitch
=
true
this
.
dialogVisible
=
false
console
.
log
(
this
.
isAdd
)
this
.
clearStyle
()
this
.
disableSelect
=
false
this
.
$refs
[
formName
].
resetFields
();
},
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment