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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
151 additions
and
31 deletions
mixin/click.js
pages/informationEntry/informationEntry.vue
mixin/click.js
View file @
95a36eb
...
@@ -16,7 +16,7 @@ export default {
...
@@ -16,7 +16,7 @@ export default {
voicePath
:
""
,
voicePath
:
""
,
timer
:
null
,
timer
:
null
,
times
:
0
,
times
:
0
,
timeout
:
30
,
//十分钟提示
timeout
:
30
000
,
//十分钟提示
reaction
:
10
,
reaction
:
10
,
};
};
},
},
...
...
pages/informationEntry/informationEntry.vue
View file @
95a36eb
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2024-04-07 14:54:28
* @Date: 2024-04-07 14:54:28
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2024-04-09 1
8:43:19
* @LastEditTime: 2024-04-09 1
9:22:47
-->
-->
<
template
>
<
template
>
<view
class=
"information-entry"
>
<view
class=
"information-entry"
>
...
@@ -17,7 +17,12 @@
...
@@ -17,7 +17,12 @@
:key=
"item.title"
:key=
"item.title"
>
>
<view
class=
"upload-img"
v-if=
"item.imgUrl"
>
<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
<uni-icons
class=
"upload-close"
class=
"upload-close"
type=
"clear"
type=
"clear"
...
@@ -37,11 +42,7 @@
...
@@ -37,11 +42,7 @@
</view>
</view>
<view
class=
"information-done"
@
click=
"done()"
>
完成接待
</view>
<view
class=
"information-done"
@
click=
"done()"
>
完成接待
</view>
<uni-popup
ref=
"preview"
type=
"center"
border-radius=
"10px 10px 0 0"
>
<uni-popup
ref=
"preview"
type=
"center"
border-radius=
"10px 10px 0 0"
>
<image
<image
class=
"preview-img"
:src=
"previewImg"
mode=
"aspectFit"
/>
class=
"preview-img"
:src=
"previewImg"
mode=
"aspectFit"
/>
</uni-popup>
</uni-popup>
<MessageBox
<MessageBox
v-if=
"messageBoxVisible"
v-if=
"messageBoxVisible"
...
@@ -49,7 +50,7 @@
...
@@ -49,7 +50,7 @@
@
confirm=
"submit"
@
confirm=
"submit"
confirmBtnText=
"保存"
confirmBtnText=
"保存"
:popupW=
"704"
:popupW=
"704"
:popupH=
"8
0
0"
:popupH=
"8
2
0"
>
>
<view
name=
"content"
>
<view
name=
"content"
>
<view
class=
"pop-tips"
<view
class=
"pop-tips"
...
@@ -59,12 +60,20 @@
...
@@ -59,12 +60,20 @@
<template
v-for=
"(i, index) in formObject"
>
<template
v-for=
"(i, index) in formObject"
>
<view
class=
"form-item"
:key=
"index"
>
<view
class=
"form-item"
:key=
"index"
>
<view
class=
"label"
>
{{
i
.
label
}}
</view>
<view
class=
"label"
>
{{
i
.
label
}}
</view>
<view>
<view
class=
"value"
>
<template
v-if=
"i.type == 'input'"
>
<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
>
<
template
v-else
>
<
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
>
</
template
>
</view>
</view>
</view>
</view>
...
@@ -80,6 +89,46 @@
...
@@ -80,6 +89,46 @@
cancelBtnText=
"否"
cancelBtnText=
"否"
confirmBtnText=
"是"
confirmBtnText=
"是"
></MessageBox>
></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>
</view>
</template>
</template>
<
script
>
<
script
>
...
@@ -100,6 +149,7 @@ const INFO_LIST = [
...
@@ -100,6 +149,7 @@ const INFO_LIST = [
},
},
];
];
import
myClick
from
"@/mixin/click"
;
import
myClick
from
"@/mixin/click"
;
import
env
from
"../../env"
;
export
default
{
export
default
{
mixins
:
[
myClick
],
mixins
:
[
myClick
],
data
()
{
data
()
{
...
@@ -125,21 +175,29 @@ export default {
...
@@ -125,21 +175,29 @@ export default {
label
:
"车型"
,
label
:
"车型"
,
key
:
"carModel"
,
key
:
"carModel"
,
type
:
"select"
,
type
:
"select"
,
popKey
:
"carBoxVisible"
,
},
},
{
{
label
:
"销售姓名"
,
label
:
"销售姓名"
,
key
:
"s
ales
"
,
key
:
"s
taffName
"
,
type
:
"select"
,
type
:
"select"
,
popKey
:
"employeeBoxVisible"
,
},
},
],
],
formData
:
{
formData
:
{
customerName
:
''
,
customerName
:
''
,
phoneNumber
:
''
,
carModel
:
''
,
carModel
:
''
,
sales
:
''
phoneNumber
:
''
,
salesUuid
:
''
,
staffName
:
''
},
},
carBoxVisible
:
false
,
carBoxVisible
:
false
,
previewImg
:
''
previewImg
:
""
,
isPass
:
false
,
carBoxVisible
:
false
,
employeeBoxVisible
:
false
,
carlist
:
[],
employeeList
:
[],
};
};
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
...
@@ -147,6 +205,10 @@ export default {
...
@@ -147,6 +205,10 @@ export default {
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
title
:
text
,
title
:
text
,
});
});
this
.
$store
.
dispatch
(
"getCustomerInfo"
).
then
((
customerInfo
)
=>
{
this
.
isPass
=
Object
.
values
(
customerInfo
).
every
((
value
)
=>
!!
value
);
});
},
},
watch
:
{
watch
:
{
infoList
:
{
infoList
:
{
...
@@ -178,28 +240,61 @@ export default {
...
@@ -178,28 +240,61 @@ export default {
},
},
// 完成接待按钮
// 完成接待按钮
done
()
{
done
()
{
this
.
messageBoxVisible
=
true
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
()
{
submit
()
{
console
.
log
(
this
.
formData
)
console
.
log
(
this
.
formData
);
this
.
messageBoxVisible
=
false
this
.
messageBoxVisible
=
false
;
this
.
stopAudio
();
this
.
stopAudio
();
},
},
// 选择车型与销售
// 选择车型与销售
showPop
(
key
)
{
showPop
(
key
)
{
console
.
log
(
key
)
console
.
log
(
key
);
// this.carBoxVisible = true
// this.carBoxVisible = true
},
},
// 取消
// 取消
cancel
()
{
cancel
()
{
this
.
messageBoxVisible
=
false
this
.
messageBoxVisible
=
false
;
},
},
// 预览图片
// 预览图片
preview
(
index
)
{
preview
(
index
)
{
this
.
previewImg
=
this
.
infoList
[
index
].
imgUrl
;
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
>
</
script
>
...
@@ -308,7 +403,7 @@ export default {
...
@@ -308,7 +403,7 @@ export default {
//
flex
:
50%
;
//
flex
:
50%
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
color
:
#6
C6C
70
;
color
:
#6
c6c
70
;
font-size
:
30
rpx
;
font-size
:
30
rpx
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.label
{
.label
{
...
@@ -317,7 +412,7 @@ export default {
...
@@ -317,7 +412,7 @@ export default {
flex-shrink
:
0
;
flex-shrink
:
0
;
width
:
124
rpx
;
width
:
124
rpx
;
&::before
{
&::before
{
content
:
'*'
;
content
:
"*"
;
color
:
#ff0000
;
color
:
#ff0000
;
position
:
absolute
;
position
:
absolute
;
left
:
-20
rpx
;
left
:
-20
rpx
;
...
@@ -326,14 +421,22 @@ export default {
...
@@ -326,14 +421,22 @@ export default {
}
}
}
}
.value
{
.value
{
width
:
468
rpx
;
width
:
428
rpx
;
margin-left
:
16
rpx
;
height
:
80
rpx
;
border
:
2
rpx
solid
#e8e8ea
;
background
:
#ffffff
;
margin-left
:
32
rpx
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
//
padding
:
0
40
rpx
;
padding
:
0
40
rpx
;
input,
.
input,
.select
{
.select
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
border
:
none
!important
;
outline
:
none
;
}
.input
{
height
:
70
rpx
;
}
}
.select
{
.select
{
display
:
flex
;
display
:
flex
;
...
@@ -345,7 +448,24 @@ export default {
...
@@ -345,7 +448,24 @@ export default {
}
}
}
}
}
}
.preview-img
{
.select-box
{
//
width
:
100%
;
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
>
</
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