Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 95a36eb9
authored
Apr 09, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交保存
1 parent
f9319efa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
179 additions
and
59 deletions
mixin/click.js
pages/informationEntry/informationEntry.vue
mixin/click.js
View file @
95a36eb
...
...
@@ -16,7 +16,7 @@ export default {
voicePath
:
""
,
timer
:
null
,
times
:
0
,
timeout
:
30
,
//十分钟提示
timeout
:
30
000
,
//十分钟提示
reaction
:
10
,
};
},
...
...
pages/informationEntry/informationEntry.vue
View file @
95a36eb
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-07 14:54:28
* @LastEditors: huyue
* @LastEditTime: 2024-04-09 1
8:43:19
* @LastEditTime: 2024-04-09 1
9:22:47
-->
<
template
>
<view
class=
"information-entry"
>
...
...
@@ -17,7 +17,12 @@
:key=
"item.title"
>
<view
class=
"upload-img"
v-if=
"item.imgUrl"
>
<image
class=
"img"
:src=
"item.imgUrl"
mode=
"top"
@
click=
"preview(index)"
/>
<image
class=
"img"
:src=
"item.imgUrl"
mode=
"top"
@
click=
"preview(index)"
/>
<uni-icons
class=
"upload-close"
type=
"clear"
...
...
@@ -37,11 +42,7 @@
</view>
<view
class=
"information-done"
@
click=
"done()"
>
完成接待
</view>
<uni-popup
ref=
"preview"
type=
"center"
border-radius=
"10px 10px 0 0"
>
<image
class=
"preview-img"
:src=
"previewImg"
mode=
"aspectFit"
/>
<image
class=
"preview-img"
:src=
"previewImg"
mode=
"aspectFit"
/>
</uni-popup>
<MessageBox
v-if=
"messageBoxVisible"
...
...
@@ -49,7 +50,7 @@
@
confirm=
"submit"
confirmBtnText=
"保存"
:popupW=
"704"
:popupH=
"8
0
0"
:popupH=
"8
2
0"
>
<view
name=
"content"
>
<view
class=
"pop-tips"
...
...
@@ -59,12 +60,20 @@
<template
v-for=
"(i, index) in formObject"
>
<view
class=
"form-item"
:key=
"index"
>
<view
class=
"label"
>
{{
i
.
label
}}
</view>
<view>
<view
class=
"value"
>
<template
v-if=
"i.type == 'input'"
>
<uni-easyinput
v-model=
"formData[i.key]"
class=
"value"
placeholder=
"请输入内容"
:maxlength=
"i.maxlength"
></uni-easyinput>
<input
:type=
"i.inputType"
:maxlength=
"i.maxlength"
v-model=
"formData[i.key]"
class=
"input"
/>
</
template
>
<
template
v-else
>
<uni-easyinput
class=
"uni-mt-5 value"
suffixIcon=
"down"
v-model=
"formData[i.key]"
@
focus=
"showPop(i.key)"
clearable
placeholder=
"请选择内容"
></uni-easyinput>
<view
class=
"select"
@
click=
"showPopup(i.popKey)"
>
{{
formData
[
i
.
key
]
}}
<uni-icons
class=
"arrow"
type=
"down"
:size=
"16"
></uni-icons>
</view>
</
template
>
</view>
</view>
...
...
@@ -80,6 +89,46 @@
cancelBtnText=
"否"
confirmBtnText=
"是"
></MessageBox>
<MessageBox
position=
"bottom"
v-if=
"carBoxVisible"
:isFooter=
"false"
title=
"请选择车型"
@
cancel=
"carBoxVisible = false"
>
<view
class=
"select-box"
>
<view
class=
"select-item"
:class=
"{ checked: selectId == item.id }"
@
click=
"handleSelect(item, 'carBoxVisible')"
v-for=
"(item, index) in carlist"
:key=
"index"
>
{{ item.name }}
</view>
</view>
</MessageBox>
<
template
v-if=
"employeeBoxVisible"
>
<MessageBox
position=
"bottom"
:popupH=
"480"
:isFooter=
"false"
title=
"请选择销售"
@
cancel=
"employeeBoxVisible = false"
>
<view
class=
"select-box"
>
<view
class=
"select-item"
:class=
"
{ checked: selectId == item.id }"
@click="handleSelect(item, 'employeeBoxVisible')"
v-for="(item, index) in employeeList"
:key="index"
>
{{
item
.
staffName
}}
</view>
</view>
</MessageBox>
</
template
>
</view>
</template>
<
script
>
...
...
@@ -100,6 +149,7 @@ const INFO_LIST = [
},
];
import
myClick
from
"@/mixin/click"
;
import
env
from
"../../env"
;
export
default
{
mixins
:
[
myClick
],
data
()
{
...
...
@@ -113,8 +163,8 @@ export default {
type
:
"input"
,
inputType
:
"text"
,
maxlength
:
50
,
},
{
},
{
label
:
"车主电话"
,
key
:
"phoneNumber"
,
type
:
"input"
,
...
...
@@ -125,21 +175,29 @@ export default {
label
:
"车型"
,
key
:
"carModel"
,
type
:
"select"
,
popKey
:
"carBoxVisible"
,
},
{
label
:
"销售姓名"
,
key
:
"s
ales
"
,
key
:
"s
taffName
"
,
type
:
"select"
,
popKey
:
"employeeBoxVisible"
,
},
],
formData
:
{
customerName
:
''
,
phoneNumber
:
''
,
carModel
:
''
,
sales
:
''
},
],
formData
:
{
customerName
:
''
,
carModel
:
''
,
phoneNumber
:
''
,
salesUuid
:
''
,
staffName
:
''
},
carBoxVisible
:
false
,
previewImg
:
""
,
isPass
:
false
,
carBoxVisible
:
false
,
previewImg
:
''
employeeBoxVisible
:
false
,
carlist
:
[],
employeeList
:
[],
};
},
onLoad
(
options
)
{
...
...
@@ -147,6 +205,10 @@ export default {
uni
.
setNavigationBarTitle
({
title
:
text
,
});
this
.
$store
.
dispatch
(
"getCustomerInfo"
).
then
((
customerInfo
)
=>
{
this
.
isPass
=
Object
.
values
(
customerInfo
).
every
((
value
)
=>
!!
value
);
});
},
watch
:
{
infoList
:
{
...
...
@@ -176,30 +238,63 @@ export default {
close
(
index
)
{
this
.
$set
(
this
.
infoList
[
index
],
"imgUrl"
);
},
// 完成接待按钮
done
()
{
this
.
messageBoxVisible
=
true
},
// 保存
submit
()
{
console
.
log
(
this
.
formData
)
this
.
messageBoxVisible
=
false
// 完成接待按钮
done
()
{
if
(
this
.
isPass
)
{
this
.
stopAudio
();
}
else
{
let
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
);
uni
.
$api
.
commonApi
.
getCarBrandsList
({
brandId
:
env
.
index
==
3
?
2365
:
2978
,
childBrandId
:
env
.
index
==
3
?
2695
:
3454
,
})
.
then
((
res
)
=>
{
this
.
carlist
=
res
;
});
uni
.
$api
.
commonApi
.
getEmployeeList
({
merchantId
:
userInfo
.
shopMerchantId
,
})
.
then
((
res
)
=>
{
this
.
employeeList
=
res
;
});
this
.
messageBoxVisible
=
true
;
// 打开完善用户信息弹窗
}
},
// 保存
submit
()
{
console
.
log
(
this
.
formData
);
this
.
messageBoxVisible
=
false
;
this
.
stopAudio
();
},
// 选择车型与销售
showPop
(
key
)
{
console
.
log
(
key
)
// this.carBoxVisible = true
},
// 取消
cancel
()
{
this
.
messageBoxVisible
=
false
},
// 选择车型与销售
showPop
(
key
)
{
console
.
log
(
key
);
// this.carBoxVisible = true
},
// 取消
cancel
()
{
this
.
messageBoxVisible
=
false
;
},
// 预览图片
preview
(
index
)
{
this
.
previewImg
=
this
.
infoList
[
index
].
imgUrl
;
this
.
$refs
.
preview
.
open
(
'center'
)
}
this
.
$refs
.
preview
.
open
(
"center"
);
},
handleSelect
(
item
,
popkey
)
{
console
.
log
(
item
)
this
[
popkey
]
=
false
;
if
(
popkey
==
"employeeBoxVisible"
)
{
this
.
formData
.
salesUuid
=
item
.
uuid
;
this
.
formData
.
staffName
=
item
.
staffName
;
}
else
this
.
formData
.
carModel
=
item
.
name
;
this
.
$store
.
dispatch
(
"setCustomerInfo"
,
this
.
formData
);
console
.
log
(
this
.
formData
)
},
showPopup
(
e
)
{
this
[
e
]
=
true
;
},
},
};
</
script
>
...
...
@@ -308,32 +403,40 @@ export default {
//
flex
:
50%
;
display
:
flex
;
align-items
:
center
;
color
:
#6
C6C
70
;
color
:
#6
c6c
70
;
font-size
:
30
rpx
;
box-sizing
:
border-box
;
.label
{
position
:
relative
;
position
:
relative
;
margin-left
:
auto
;
flex-shrink
:
0
;
width
:
124
rpx
;
&::before
{
content
:
'*'
;
color
:
#ff0000
;
position
:
absolute
;
left
:
-20
rpx
;
top
:
50%
;
transform
:
translate
(
0
,
-50%
);
}
width
:
124
rpx
;
&::before
{
content
:
"*"
;
color
:
#ff0000
;
position
:
absolute
;
left
:
-20
rpx
;
top
:
50%
;
transform
:
translate
(
0
,
-50%
);
}
}
.value
{
width
:
468
rpx
;
margin-left
:
16
rpx
;
width
:
428
rpx
;
height
:
80
rpx
;
border
:
2
rpx
solid
#e8e8ea
;
background
:
#ffffff
;
margin-left
:
32
rpx
;
box-sizing
:
border-box
;
//
padding
:
0
40
rpx
;
input,
padding
:
0
40
rpx
;
.
input,
.select
{
width
:
100%
;
height
:
100%
;
border
:
none
!important
;
outline
:
none
;
}
.input
{
height
:
70
rpx
;
}
.select
{
display
:
flex
;
...
...
@@ -345,7 +448,24 @@ export default {
}
}
}
.preview-img
{
//
width
:
100%
;
.select-box
{
margin
:
40
rpx
0
;
display
:
grid
;
grid-template-columns
:
repeat
(
3
,
1
fr
);
gap
:
20
rpx
;
overflow-y
:
scroll
;
height
:
100%
;
.select-item
{
text-align
:
center
;
height
:
68
rpx
;
line-height
:
68
rpx
;
opacity
:
1
;
border
:
2
rpx
solid
#dce0e6
;
color
:
#292d33
;
font-size
:
28
rpx
;
&.checked
{
border
:
2
rpx
solid
#292d33
;
}
}
}
</
style
>
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