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 7d443748
authored
Jun 27, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 支付凭证页面修改为组件
1 parent
098d35a5
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
89 additions
and
398 deletions
api/module/systemApi.js
pages.json
pages/equity/detail/components/Media_6.vue
pages/equity/detail/components/Reception.vue
pages/equity/informationEntry.vue → pages/equity/detail/components/informationEntry.vue
pages/equity/detail/components/payPop.vue
pages/equity/detail/detail.vue
pages/equity/index.vue
api/module/systemApi.js
View file @
7d44374
...
...
@@ -50,18 +50,16 @@ const imgToBase64 = (list, urlKey) => {
let
arr
=
[],
newList
=
JSON
.
parse
(
JSON
.
stringify
(
list
))
list
.
map
((
e
,
index
)
=>
{
if
(
!
(
urlKey
?
e
[
urlKey
]
:
e
).
startsWith
(
'https'
))
return
resolve
(
list
)
if
(
!
e
[
urlKey
])
return
resolve
(
list
)
if
(
!
e
[
urlKey
].
startsWith
(
'https'
))
return
resolve
(
list
)
uni
.
request
({
url
:
urlKey
?
e
[
urlKey
]
:
e
,
method
:
'GET'
,
responseType
:
'arraybuffer'
,
success
:
(
res
)
=>
{
const
base64
=
`data:image/png;base64,
${
uni
.
arrayBufferToBase64
(
res
.
data
)}
`
if
(
urlKey
)
{
newList
[
index
][
urlKey
]
=
base64
newList
[
index
][
`original_
${
urlKey
}
`
]
=
e
[
urlKey
]
}
else
newList
[
index
]
=
base64
newList
[
index
][
urlKey
]
=
base64
newList
[
index
][
`original_
${
urlKey
}
`
]
=
e
[
urlKey
]
arr
.
push
(
e
)
if
(
arr
.
length
===
list
.
length
)
resolve
(
newList
)
},
...
...
pages.json
View file @
7d44374
...
...
@@ -22,13 +22,7 @@
"disableSwipeBack"
:
true
}
},
{
"path"
:
"pages/equity/informationEntry"
,
"style"
:
{
"navigationBarTitleText"
:
"信息录入"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/equity/detail/detail"
,
"style"
:
{
...
...
pages/equity/detail/components/Media_6.vue
deleted
100644 → 0
View file @
098d35a
<
template
>
<view
class=
"layout"
>
<view
class=
"bg"
>
<!--
<image
src=
"../../../assets/images/media/bg-6.webp"
/>
-->
</view>
<view
class=
"content"
>
<view
class=
"title"
>
{{
title
||
"历史成交记录"
}}
</view>
<template
v-if=
"list.length && shopMerchantId"
>
<Tabs
:list=
"list"
@
tabclick=
"tabclick"
ref=
"tabs"
/>
</
template
>
<view
class=
"card-list"
>
<
template
v-if=
"historyList.length > 0"
>
<view
class=
"card-item"
v-for=
"item in historyList"
:key=
"item.id"
>
<view
class=
"name"
>
{{
nameHide
(
item
.
customerName
)
}}
<view
v-if=
"item.ownerGender"
:class=
"[
'sex-avatar sprite-icon',
`icon-$
{sexType[item.ownerGender]}`,
]"
>
</view>
</view>
<view
class=
"goods-name"
>
{{
item
.
goodsName
}}
</view>
<view
class=
"card-info"
>
<view>
车架号
</view>
<view>
{{
item
.
carVin
||
"-"
}}
</view>
</view>
<view
class=
"card-info"
>
<view>
工单号
</view>
<view>
{{
item
.
payId
}}
</view>
</view>
<view
class=
"card-info"
>
<view>
订单时间
</view>
<view>
{{
format
(
item
.
createdTime
)
}}
</view>
</view>
<view
class=
"card-info"
>
<view>
交易流水号
</view>
<view>
{{
item
.
transactionNo
}}
</view>
</view>
<view
class=
"card-info"
>
<view>
支付方式
</view>
<view
:class=
"[
'pay-type sprite-icon',
`icon-$
{payType[item.payType]}`,
]"
>
</view>
</view>
<view
class=
"card-info"
>
<view>
实收金额
</view>
<view
class=
"price"
>
¥
{{
accDiv
(
item
.
equityPrice
)
}}
</view>
</view>
</view>
</
template
>
<
template
v-else
>
<view
class=
"no-data"
>
<glsx-image
class=
"no-data-img"
src=
"media/no-data.png"
mode=
"scaleToFill"
/>
<view
class=
"no-data-text"
>
暂无数据
</view>
</view>
</
template
>
<!-- <uni-grid :column="3" :show-border="false" :square="false">
<uni-grid-item v-for="item in historyList" :key="item.id"> -->
<!-- </uni-grid-item>
</uni-grid> -->
</view>
<view
class=
"end-text"
v-if=
"historyList.length > 0 && isEnd"
>
我是一个有底线的人
</view
>
</view>
</view>
</template>
<
script
type=
"text/ecmascript-6"
>
import
utils
from
'@/utils/utils'
;
import
Tabs
from
'./Tabs.vue'
;
export
default
{
name
:
'Media_6'
,
props
:
{
show
:
Boolean
,
title
:
String
},
components
:
{
Tabs
},
data
()
{
return
{
list
:
[
{
tabName
:
'问界 M5'
,
value
:
'M5'
},
{
tabName
:
'问界 M7'
,
value
:
'M7'
},
{
tabName
:
'问界 M9'
,
value
:
'M9'
}
],
historyList
:
[],
payType
:
{
1
:
'icon-weixin'
,
2
:
'icon-shop'
},
sexType
:
{
'男'
:
'icon-male'
,
'女'
:
'icon-female'
},
goodsName
:
'M5'
,
shopMerchantId
:
''
,
currentPage
:
1
,
isEnd
:
false
}
},
watch
:
{
show
(
n
)
{
if
(
n
)
this
.
init
()
},
watchStatus
:
{
immediate
:
true
,
handler
(
newval
)
{
this
.
$refs
?.
tabs
?.
tabClick
(
0
)
}
},
},
computed
:
{
watchStatus
()
{
return
this
.
$store
.
state
.
user
.
historyStatus
},
},
mounted
()
{
if
(
this
.
show
)
this
.
init
()
// const { shopMerchantId } = uni.$storage.get("userInfo");
// this.shopMerchantId = shopMerchantId
// this.getQuotationList();
},
methods
:
{
format
(
dateTimeStr
)
{
return
utils
.
convertDateTimeFormat
(
dateTimeStr
,
'/'
)
},
accDiv
(
val
)
{
return
utils
.
accDiv
(
val
,
100
)
},
init
()
{
const
{
shopMerchantId
}
=
uni
.
$storage
.
get
(
"userInfo"
);
this
.
shopMerchantId
=
shopMerchantId
this
.
getQuotationList
();
},
async
getQuotationList
(
isSwitch
=
false
,
next
=
false
)
{
const
{
goodsName
,
shopMerchantId
,
currentPage
}
=
this
if
(
next
)
this
.
currentPage
++
const
data
=
await
uni
.
$api
.
commonApi
.
getQuotationList
({
currentPage
,
pageSize
:
18
,
merchantId
:
shopMerchantId
,
orderStatus
:
3
,
goodsName
})
if
(
isSwitch
)
{
this
.
historyList
=
data
.
list
this
.
isEnd
=
false
}
else
{
if
(
data
.
list
.
length
>
0
)
{
this
.
historyList
=
this
.
historyList
.
concat
(
data
.
list
)
this
.
isEnd
=
false
}
else
{
if
(
this
.
historyList
.
length
>
9
)
this
.
isEnd
=
true
}
}
},
tabclick
(
index
)
{
this
.
goodsName
=
this
.
list
[
index
].
value
this
.
currentPage
=
1
this
.
getQuotationList
(
true
)
},
// 脱敏
nameHide
(
name
)
{
return
name
.
substring
(
0
,
1
)
+
'**'
;
// if (name.length == 2) {
// name = name.substring(0, 1) + '*'; // 截取name 字符串截取第一个字符,
// return name; // 张三显示为张*
// } else if (name.length == 3) {
// name = name.substring(0, 1) + '*' + name.substring(2, 3); // 截取第一个和第三个字符
// return name; // 李思思显示为李*思
// } else if (name.length > 3) {
// name = name.substring(0, 1) + '*' + '*' + name.substring(3, name.length); // 截取第一个和大于第4个字符
// return name; // 王五哈哈显示为王**哈
// }
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.layout
{
padding-top
:
192
rpx
;
position
:
relative
;
.bg
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
240
rpx
;
image
{
width
:
100%
;
height
:
100%
;
}
}
.content
{
border-radius
:
40
rpx
40
rpx
0
0
;
background
:
linear-gradient
(
180deg
,
#f7f9fc
0%
,
#f7f9fc
100%
);
overflow
:
hidden
;
position
:
relative
;
z-index
:
1
;
.title
{
font-size
:
40
rpx
;
line-height
:
48
rpx
;
color
:
#1a1a1a
;
padding
:
32
rpx
0
;
text-align
:
center
;
}
.card-list
{
position
:
relative
;
margin
:
0
72
rpx
;
display
:
grid
;
grid-template-columns
:
repeat
(
3
,
664
rpx
);
grid-template-rows
:
0
fr
;
justify-content
:
center
;
grid-gap
:
32
rpx
;
min-height
:
calc
(
100vh
-
416
rpx
);
.card-item
{
margin
:
16
rpx
auto
;
padding
:
24
rpx
40
rpx
;
width
:
664
rpx
;
//
height
:
440
rpx
;
background
:
#ffffff
;
border
:
2
rpx
solid
#dce0e6
;
border-radius
:
16
rpx
;
height
:
448
rpx
;
.name
{
display
:
flex
;
align-items
:
center
;
font-weight
:
500
;
font-size
:
32
rpx
;
color
:
#1a1a1a
;
margin-bottom
:
16
rpx
;
.sex-avatar
{
width
:
32
rpx
;
height
:
32
rpx
;
margin-left
:
8
rpx
;
}
}
.goods-name
{
margin-bottom
:
16
rpx
;
font-weight
:
500
;
font-size
:
32
rpx
;
color
:
#2c66f7
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.card-info
{
display
:
flex
;
justify-content
:
space-between
;
font-size
:
24
rpx
;
color
:
#999999
;
line-height
:
32
rpx
;
margin-bottom
:
16
rpx
;
.pay-type
{
width
:
32
rpx
;
height
:
32
rpx
;
}
.price
{
font-weight
:
600
;
font-size
:
36
rpx
;
color
:
#14cc68
;
}
}
}
}
}
}
.end-text
{
color
:
#999
;
text-align
:
center
;
margin
:
50
rpx
0
;
}
.no-data
{
position
:
absolute
;
left
:
50%
;
top
:
30%
;
transform
:
translate
(
-50%
,
-50%
);
&-img
{
width
:
640
rpx
;
height
:
272
rpx
;
}
&
-text
{
font-size
:
32
rpx
;
color
:
#999999
;
text-align
:
center
;
margin-top
:
24
rpx
;
}
}
</
style
>
pages/equity/detail/components/Reception.vue
View file @
7d44374
...
...
@@ -153,7 +153,7 @@ export default {
'问界M7'
:
1
,
'问界M9'
:
2
}[
this
.
customerInfo
.
carModel
]
return
this
.
carTypeList
[
name
||
0
]
return
this
.
carTypeList
[
name
||
0
]
.
url
}
},
methods
:
{
...
...
pages/equity/informationEntry.vue
→
pages/equity/
detail/components/
informationEntry.vue
View file @
7d44374
...
...
@@ -6,7 +6,20 @@
* @LastEditTime: 2024-04-18 11:24:22
-->
<
template
>
<view
class=
"information-entry"
>
<view
class=
"information-entry"
v-if=
"showPayPage"
>
<view
class=
"nav-bar"
>
<view
class=
"back"
@
click=
"$emit('update:showPayPage', false)"
>
<uni-icons
type=
"left"
:size=
"20"
color=
"#000"
></uni-icons>
</view>
<view
class=
"title"
>
信息录入
</view>
</view>
<view
class=
"information-tips"
>
建议同步采集凭证,若接待工作繁忙可在提单环节再进行补充。
</view>
<view
class=
"information-box"
>
<view
...
...
@@ -50,24 +63,11 @@
</view>
<view
class=
"information-done"
@
click=
"
done(
)"
@
click=
"
$emit('finish'
)"
>
完成接待
</view>
<!--
<uni-popup
ref=
"preview"
type=
"center"
border-radius=
"10px 10px 0 0"
>
<image
class=
"preview-img"
:src=
"previewImg"
mode=
"aspectFit"
/>
</uni-popup>
-->
<MessageBox
ref=
"tipBox"
@
cancel=
"tipCancel"
@
confirm=
"tipConfirm"
content=
"系统检测到您在当前页面停留较久,是否仍在客户接待中?"
cancelBtnText=
"否"
confirmBtnText=
"是"
></MessageBox>
<finish-step
ref=
"stepRef"
@
submit=
"submit"
/>
<update-box
/>
</view>
</
template
>
<
script
>
...
...
@@ -88,12 +88,11 @@ const INFO_LIST = [
title
:
"客户延保合同"
,
},
];
import
myClick
from
"@/mixin/click"
;
import
{
mapMutations
}
from
"vuex"
;
import
FinishStep
from
"@/components/FinishStep.vue"
;
export
default
{
components
:
{
FinishStep
},
mixins
:
[
myClick
],
props
:
{
showPayPage
:
Boolean
},
data
()
{
return
{
infoList
:
JSON
.
parse
(
JSON
.
stringify
(
INFO_LIST
)),
...
...
@@ -101,19 +100,13 @@ export default {
isPreview
:
false
,
};
},
onLoad
(
options
)
{
const
text
=
options
.
text
;
uni
.
setNavigationBarTitle
({
title
:
text
,
});
},
watch
:
{
watchBooksList
:
{
immediate
:
true
,
handler
(
newValue
)
{
console
.
log
(
newValue
,
'==='
)
if
(
newValue
.
length
)
this
.
infoList
=
newValue
else
this
.
infoList
=
JSON
.
parse
(
JSON
.
stringify
(
INFO_LIST
))
console
.
log
(
newValue
,
'==='
)
if
(
newValue
.
length
)
this
.
infoList
=
newValue
else
this
.
infoList
=
JSON
.
parse
(
JSON
.
stringify
(
INFO_LIST
))
},
}
},
...
...
@@ -122,14 +115,6 @@ export default {
return
this
.
$store
.
state
.
audio
.
booksList
}
},
onBackPress
()
{
// this.infoList = this.infoList.map((item) => {
// if (item.imgUrl) {
// delete item.imgUrl;
// }
// return item;
// });
},
methods
:
{
...
mapMutations
(
"audio"
,
[
"setBooks"
]),
// 上传图
...
...
@@ -168,20 +153,6 @@ export default {
this
.
infoList
[
index
].
imgUrl
=
''
this
.
setBooks
(
utils
.
deepClone
(
this
.
infoList
))
},
// 完成接待按钮
done
()
{
this
.
$refs
.
stepRef
.
open
();
},
submit
()
{
this
.
$refs
.
stepRef
.
close
();
this
.
stopAudio
();
// this.infoList = INFO_LIST.map((item) => delete item.imgUrl);
setTimeout
(()
=>
{
uni
.
reLaunch
({
url
:
"/pages/equity/index"
,
});
},
1500
);
},
// 预览图片
preview
(
index
)
{
this
.
isPreview
=
true
;
...
...
@@ -214,6 +185,33 @@ export default {
position
:
relative
;
background-color
:
#fff
;
height
:
100vh
;
z-index
:
998
;
box-sizing
:
border-box
;
padding-top
:
72px
;
.nav-bar
{
position
:
fixed
;
width
:
100%
;
height
:
96
rpx
;
left
:
0
;
top
:
48
rpx
;
z-index
:
9
;
.back
{
height
:
100%
;
aspect-ratio
:
1
/
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.title
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
font-weight
:
500
;
font-size
:
32
rpx
;
color
:
#1a1a1a
;
}
}
.information-tips
{
background
:
rgba
(
44
,
102
,
247
,
0.1
);
color
:
#2c66f7
;
...
...
pages/equity/detail/components/payPop.vue
View file @
7d44374
...
...
@@ -163,9 +163,10 @@ export default {
// delta: 1,
// });
// this.stopAudio();
uni
.
navigateTo
({
url
:
`/pages/equity/informationEntry`
,
});
// uni.navigateTo({
// url: `/pages/equity/informationEntry`,
// });
this
.
$emit
(
'jumpPay'
)
this
.
close
();
},
},
...
...
pages/equity/detail/detail.vue
View file @
7d44374
...
...
@@ -60,35 +60,42 @@
<view
:class=
"['sprite-icon', `$
{!drawStatus ? 'icon-pen' : 'icon-pen-active'}`]">
</view>
</view>
</
template
>
<pay-pop
ref=
"pay"
></pay-pop>
<pay-pop
ref=
"pay"
@
jumpPay=
"showPayPage = true"
></pay-pop>
<finish-step
ref=
"stepRef"
@
submit=
"done"
/>
<informationEntry
:showPayPage
.
sync=
"showPayPage"
@
finish=
"open"
/>
</view>
</template>
<
script
>
import
ToolBox
from
"@/components/ToolBox.vue"
;
import
Reception
from
"./components/Reception.vue"
;
import
MediaComponent
from
"./components/MediaComponent.vue"
;
import
Media_6
from
"./components/Media_6.vue"
;
import
History
from
"./components/History.vue"
;
import
ThreeGuarantees
from
"./components/ThreeGuarantees.vue"
;
import
Guarantee
from
'./components/Guarantee.vue'
;
import
payPop
from
"./components/payPop.vue"
;
import
FinishStep
from
'@/components/FinishStep.vue'
;
import
{
mapMutations
}
from
"vuex"
;
import
informationEntry
from
'./components/informationEntry.vue'
export
default
{
components
:
{
ToolBox
,
Reception
,
MediaComponent
,
Media_6
,
payPop
,
FinishStep
,
Guarantee
,
History
,
ThreeGuarantees
ThreeGuarantees
,
informationEntry
},
props
:
{
id
:
[
String
,
Number
],
...
...
@@ -105,7 +112,8 @@ export default {
startX
:
null
,
startY
:
null
,
screenWidth
:
null
,
scaleValueObject
:
{}
scaleValueObject
:
{},
showPayPage
:
false
};
},
computed
:
{
...
...
@@ -155,6 +163,7 @@ export default {
this
.
$emit
(
'back'
)
},
done
(
e
)
{
this
.
showPayPage
=
false
this
.
$refs
.
toolRef
.
hide
()
this
.
$refs
.
stepRef
.
close
()
this
.
$emit
(
'done'
,
e
)
...
...
@@ -183,7 +192,7 @@ export default {
isDistanceSignificant
=
Math
.
abs
(
touch
.
pageX
-
startX
)
>
screenWidth
/
3
,
index
=
toolList
.
findIndex
(
item
=>
item
.
id
==
id
)
if
(
Math
.
abs
(
this
.
startY
-
touch
.
pageY
)
>
100
)
return
if
(
!
scaleValueObject
[
id
])
scaleValueObject
[
id
]
=
1
if
(
!
scaleValueObject
[
id
])
scaleValueObject
[
id
]
=
1
if
(
isDistanceSignificant
&&
index
!=
-
1
&&
scaleValueObject
[
id
]
==
1
)
{
const
nextId
=
this
.
getNextId
(
index
,
toolList
,
startX
,
halfScreenWidth
)
this
.
$emit
(
'update:id'
,
nextId
)
...
...
@@ -199,8 +208,8 @@ export default {
return
index
===
0
?
toolList
[
toolList
.
length
-
1
].
id
:
toolList
[
index
-
1
].
id
;
}
},
scale
(
e
)
{
let
{
id
}
=
this
scale
(
e
)
{
let
{
id
}
=
this
this
.
scaleValueObject
[
id
]
=
e
}
},
...
...
pages/equity/index.vue
View file @
7d44374
...
...
@@ -85,6 +85,7 @@ export default {
const
mock_data
=
uni
.
$storage
.
get
(
'mock_data'
)
||
{}
this
.
moduleList
=
mock_data
.
moduleList
||
[]
this
.
toolList
=
mock_data
.
toolList
||
[]
this
.
get_Vehicle_Sales_Data
()
},
onShow
()
{
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
)
...
...
@@ -107,12 +108,24 @@ export default {
init
()
{
this
.
getSoure
();
this
.
findPayInfo
();
},
/**获取车型&销售数据 */
get_Vehicle_Sales_Data
()
{
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
storageCarBrandList
=
uni
.
$storage
.
get
(
'carBrandList'
),
storageEmployeeList
=
uni
.
$storage
.
get
(
'employeeList'
),
{
shopMerchantId
}
=
userInfo
if
(
storageCarBrandList
)
this
.
$store
.
dispatch
(
"setCarBrandsList"
,
storageCarBrandList
);
if
(
storageEmployeeList
)
this
.
$store
.
dispatch
(
"setEmployeeList"
,
storageEmployeeList
);
/**获取销售人员 */
uni
.
$api
.
commonApi
.
getEmployeeList
({
merchantId
:
shopMerchantId
,
})
.
then
((
res
)
=>
{
this
.
$store
.
dispatch
(
"setEmployeeList"
,
res
||
[]);
uni
.
$storage
.
set
(
'employeeList'
,
res
||
[])
});
/**获取品牌车型 */
uni
.
$api
.
commonApi
.
getMerchantCarBrandList
([
shopMerchantId
])
...
...
@@ -139,24 +152,14 @@ export default {
}
})
}
})
/**获取销售人员 */
uni
.
$api
.
commonApi
.
getEmployeeList
({
merchantId
:
shopMerchantId
,
})
.
then
((
res
)
=>
{
this
.
$store
.
dispatch
(
"setEmployeeList"
,
res
||
[]);
uni
.
$storage
.
set
(
'employeeList'
,
res
||
[])
});
},
// 查询素材
async
getSoure
()
{
const
{
moduleList
,
toolList
}
=
await
uni
.
$api
.
systemApi
.
getMockData
(
true
);
await
moduleList
.
map
(
async
e
=>
{
if
(
e
.
receptionSourceDetailList
)
e
.
receptionSourceDetailList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
receptionSourceDetailList
,
'detailUrl'
)
if
(
e
.
carTypeList
)
e
.
carTypeList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
carTypeList
)
if
(
e
.
carTypeList
)
e
.
carTypeList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
carTypeList
,
'url'
)
})
this
.
moduleList
=
moduleList
this
.
toolList
=
toolList
...
...
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