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 43fede05
authored
Oct 30, 2025
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'sass+V5.2.0' into 'master'
上线合并 See merge request
!36
2 parents
0a53c0f6
1534648c
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
575 additions
and
161 deletions
api/module/boutique.js
api/request/http.js
components/HomeFrame/components/LeftSide.vue
components/HomeFrame/components/ReceptionCenter/index.vue
components/OrderPopup/components/GoodsCategory.vue
components/OrderPopup/config.js
components/OrderPopup/index.vue
components/Popup.vue
env.js
manifest.json
pages/equity/detail/components/History.vue
api/module/boutique.js
View file @
43fede0
...
...
@@ -62,6 +62,22 @@ module.exports = {
...
data
})
},
// 新历史订单列表
getOrderListPage
(
data
)
{
return
http
.
post
({
method
:
'dj.pad.api.history.order.page'
,
projectName
:
'pad'
,
...
data
})
},
// 查询延保类类目列表
getGoodsCategoryList
(
data
)
{
return
http
.
post
({
method
:
'dj.pad.api.goodsCategoryConfiguration.extendedWarranty'
,
projectName
:
'pad'
,
...
data
})
},
/**客户邀约记录 */
customerInviteRecordPage
(
data
)
{
...
...
api/request/http.js
View file @
43fede0
import
sign
from
"./sign.js"
;
import
{
secretKey
,
pathEnum
,
domain
,
djDomain
,
merchantDomain
,
djSecretKey
,
}
from
"../../env"
;
import
sign
from
'./sign.js'
import
{
secretKey
,
pathEnum
,
domain
,
djDomain
,
merchantDomain
,
djSecretKey
}
from
'../../env'
const
HOST
=
{
scrm
:
domain
,
dj
:
djDomain
,
merchant
:
merchantDomain
,
ip
:
"http://192.168.1.67:8392"
,
}
;
ip
:
'http://192.168.1.125:8080'
}
class
Request
{
get
(
params
,
returnAll
=
false
,
hostType
)
{
return
this
.
request
(
"GET"
,
params
,
returnAll
,
hostType
);
get
(
params
,
returnAll
=
false
,
hostType
)
{
return
this
.
request
(
'GET'
,
params
,
returnAll
,
hostType
)
}
post
(
params
,
returnAll
=
false
,
hostType
)
{
return
this
.
request
(
"POST"
,
params
,
returnAll
,
hostType
);
post
(
params
,
returnAll
=
false
,
hostType
)
{
return
this
.
request
(
'POST'
,
params
,
returnAll
,
hostType
)
}
fetch
(
method
,
data
,
returnAll
=
true
,
hostType
)
{
fetch
(
method
,
data
,
returnAll
=
true
,
hostType
)
{
return
this
.
post
(
{
method
,
...
data
,
...
data
},
returnAll
,
hostType
)
;
)
}
request
(
RequestMethods
,
params
,
returnAll
,
hostType
=
"dj"
)
{
request
(
RequestMethods
,
params
,
returnAll
,
hostType
=
'dj'
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
_this
=
this
;
let
_this
=
this
uni
.
getNetworkType
({
success
(
res
)
{
if
(
res
.
networkType
==
"none"
)
{
uni
.
hideLoading
()
;
success
(
res
)
{
if
(
res
.
networkType
==
'none'
)
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'网络异常'
,
icon
:
"none"
,
})
;
reject
(
"网络异常"
);
return
;
icon
:
'none'
})
reject
(
'网络异常'
)
return
}
let
header
=
RequestMethods
===
"POST"
RequestMethods
===
'POST'
?
{
"content-type"
:
"application/x-www-form-urlencoded"
,
}
'content-type'
:
'application/x-www-form-urlencoded'
}
:
{
"Cache-Control"
:
"no-cache"
,
};
let
projectName
=
params
.
projectName
;
if
(
!
projectName
)
projectName
=
_this
.
getRopProject
(
params
.
method
)
;
const
path
=
pathEnum
[
projectName
]
;
params
=
_this
.
getData
(
params
,
hostType
)
;
'Cache-Control'
:
'no-cache'
}
let
projectName
=
params
.
projectName
if
(
!
projectName
)
projectName
=
_this
.
getRopProject
(
params
.
method
)
const
path
=
pathEnum
[
projectName
]
params
=
_this
.
getData
(
params
,
hostType
)
uni
.
request
({
url
:
`
${
HOST
[
hostType
]}${
path
}
router?method=
${
params
.
method
}
`
,
data
:
params
,
method
:
RequestMethods
,
header
,
dataType
:
"json"
,
responseType
:
"text"
,
success
(
response
)
{
dataType
:
'json'
,
responseType
:
'text'
,
success
(
response
)
{
/**业务代码 */
let
{
data
,
statusCode
}
=
response
;
let
{
data
,
statusCode
}
=
response
if
(
!
data
||
statusCode
!=
200
)
{
uni
.
hideLoading
()
let
errMsg
=
''
if
(
!
data
)
errMsg
=
'获取数据失败,请重试。'
else
errMsg
=
'服务器暂时不可用,请稍后再次尝试。'
return
reject
(
errMsg
)
;
return
reject
(
errMsg
)
}
let
{
code
,
message
}
=
data
;
let
{
code
,
message
}
=
data
if
(
returnAll
)
{
resolve
(
data
)
;
return
;
resolve
(
data
)
return
}
if
(
code
==
20
||
code
==
21
)
{
console
.
log
(
params
.
method
)
const
pages
=
getCurrentPages
(),
currentPage
=
pages
[
pages
.
length
-
1
]
uni
.
hideLoading
();
if
(
currentPage
.
route
!=
'pages/common/login'
)
uni
.
reLaunch
({
url
:
"/pages/common/login"
,
});
uni
.
hideLoading
()
if
(
currentPage
.
route
!=
'pages/common/login'
)
uni
.
reLaunch
({
url
:
'/pages/common/login'
})
}
else
{
if
(
code
==
"0"
)
{
resolve
(
data
.
data
)
;
if
(
code
==
'0'
)
{
resolve
(
data
.
data
)
}
else
{
uni
.
hideLoading
()
;
uni
.
hideLoading
()
uni
.
showToast
({
title
:
message
||
"系统异常"
,
icon
:
"none"
,
})
;
title
:
message
||
'系统异常'
,
icon
:
'none'
})
}
}
},
fail
(
error
)
{
uni
.
hideLoading
()
;
console
.
error
(
`
${
params
.
method
}
接口异常:`
,
error
)
;
fail
(
error
)
{
uni
.
hideLoading
()
console
.
error
(
`
${
params
.
method
}
接口异常:`
,
error
)
uni
.
showToast
({
title
:
typeof
error
==
"string"
?
error
:
error
.
errMsg
?
error
.
errMsg
:
JSON
.
stringify
(
error
)
||
"系统异常"
,
icon
:
"error"
,
});
reject
(
error
);
},
complete
()
{
uni
.
stopPullDownRefresh
();
title
:
typeof
error
==
'string'
?
error
:
error
.
errMsg
?
error
.
errMsg
:
JSON
.
stringify
(
error
)
||
'系统异常'
,
icon
:
'error'
})
reject
(
error
)
},
});
},
});
});
complete
()
{
uni
.
stopPullDownRefresh
()
}
})
}
})
})
}
getData
(
params
,
hostType
=
"scrm"
)
{
let
projectName
=
params
.
projectName
;
if
(
!
projectName
)
projectName
=
this
.
getRopProject
(
params
.
method
)
;
else
delete
params
.
projectName
;
let
appKey
=
"48e5e13229b82c1b4e6e8c96151f0637"
;
let
secret
=
"c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b"
;
getData
(
params
,
hostType
=
'scrm'
)
{
let
projectName
=
params
.
projectName
if
(
!
projectName
)
projectName
=
this
.
getRopProject
(
params
.
method
)
else
delete
params
.
projectName
let
appKey
=
'48e5e13229b82c1b4e6e8c96151f0637'
let
secret
=
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
if
(
secretKey
[
projectName
])
{
appKey
=
secretKey
[
projectName
].
appKey
;
secret
=
secretKey
[
projectName
].
secret
;
appKey
=
secretKey
[
projectName
].
appKey
secret
=
secretKey
[
projectName
].
secret
}
if
(
hostType
==
"dj"
)
{
appKey
=
djSecretKey
.
appKey
;
secret
=
djSecretKey
.
secret
;
if
(
hostType
==
'dj'
)
{
appKey
=
djSecretKey
.
appKey
secret
=
djSecretKey
.
secret
}
let
{
sessionId
}
=
uni
.
$storage
.
get
()
;
let
noSignAttr
=
[]
;
if
(
!
params
.
sessionId
&&
sessionId
)
params
.
sessionId
=
sessionId
;
let
{
sessionId
}
=
uni
.
$storage
.
get
()
let
noSignAttr
=
[]
if
(
!
params
.
sessionId
&&
sessionId
)
params
.
sessionId
=
sessionId
if
(
params
.
delSessionId
)
{
delete
params
.
sessionId
;
delete
params
.
delSessionId
;
delete
params
.
sessionId
delete
params
.
delSessionId
}
if
(
params
.
noSignAttr
)
{
noSignAttr
=
params
.
noSignAttr
;
delete
params
.
noSignAttr
;
noSignAttr
=
params
.
noSignAttr
delete
params
.
noSignAttr
}
params
.
v
=
"1.0.0"
;
params
.
format
=
"json"
;
params
.
locale
=
"zh_CN"
;
params
.
source
=
"app"
;
params
.
appKey
=
appKey
;
return
sign
(
params
,
secret
,
noSignAttr
)
;
params
.
v
=
'1.0.0'
params
.
format
=
'json'
params
.
locale
=
'zh_CN'
params
.
source
=
'app'
params
.
appKey
=
appKey
return
sign
(
params
,
secret
,
noSignAttr
)
}
getRopProject
(
method
)
{
const
projectName
=
method
.
split
(
"."
)[
2
];
return
projectName
;
getRopProject
(
method
)
{
const
projectName
=
method
.
split
(
'.'
)[
2
]
return
projectName
}
uni_request
({
url
,
method
=
"GET"
,
data
=
{},
header
=
{},
dataType
=
"json"
,
responseType
=
"text"
,
})
{
return
new
Promise
((
resolve
)
=>
{
uni_request
({
url
,
method
=
'GET'
,
data
=
{},
header
=
{},
dataType
=
'json'
,
responseType
=
'text'
})
{
return
new
Promise
(
resolve
=>
{
uni
.
request
({
url
,
data
,
...
...
@@ -172,12 +154,12 @@ class Request {
header
,
dataType
,
responseType
,
success
(
response
)
{
resolve
(
response
.
data
)
;
}
,
})
;
})
;
success
(
response
)
{
resolve
(
response
.
data
)
}
})
})
}
}
export
default
new
Request
()
;
export
default
new
Request
()
components/HomeFrame/components/LeftSide.vue
View file @
43fede0
...
...
@@ -192,7 +192,8 @@ export default {
label
:
"场景集市"
,
icon
:
"scene"
,
name
:
'SceneMarket'
,
eventCode
:
'app_scene_market'
eventCode
:
'app_scene_market'
,
hidden
:
false
}
]
let
{
sceneType
}
=
uni
.
$storage
.
get
(
"userInfo"
)
...
...
@@ -435,13 +436,20 @@ export default {
eventCode
:
'app_scene_change'
})
},
// 学习中心权限获取
// 学习中心权限获取
,场景集市权限
getStudyCenterPermission
()
{
const
res
=
uni
.
$storage
.
get
(
'studyCenterPermission'
)
const
{
directSaleAuth
,
hmzxAuth
,
authorizedBusinessList
}
=
res
// 当驻店人员为非直营,且非鸿蒙智行延保业务驻店人员情况下。隐藏左侧【学习中心】图标
const
isYb
=
authorizedBusinessList
&&
authorizedBusinessList
.
includes
(
1
)
// 1.延保 2.轻改 3.权益
if
(
directSaleAuth
||
(
hmzxAuth
&&
isYb
))
{
this
.
tabs
[
2
].
hidden
=
false
const
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
if
(
userInfo
.
subLoginUser
.
channelType
==
9
)
{
this
.
tabs
[
2
].
hidden
=
true
this
.
tabs
[
3
].
hidden
=
true
return
}
else
{
const
res
=
uni
.
$storage
.
get
(
'studyCenterPermission'
)
const
{
directSaleAuth
,
hmzxAuth
,
authorizedBusinessList
}
=
res
// 当驻店人员为非直营,且非鸿蒙智行延保业务驻店人员情况下。隐藏左侧【学习中心】图标
const
isYb
=
authorizedBusinessList
&&
authorizedBusinessList
.
includes
(
1
)
// 1.延保 2.轻改 3.权益
if
(
directSaleAuth
||
(
hmzxAuth
&&
isYb
))
{
this
.
tabs
[
2
].
hidden
=
false
}
}
}
},
...
...
components/HomeFrame/components/ReceptionCenter/index.vue
View file @
43fede0
<
template
>
<view
class=
"reception-box"
>
<view
:class=
"['record-box-content',`$
{showInfo || !showRecord?'hide-record':'show-record'}`]">
<view
class=
"left box-class"
>
<view
class=
"left box-class"
v-if=
"!onlyRight"
>
<view
class=
"common-title"
>
业绩看板
<view
...
...
@@ -67,7 +67,7 @@
</view>
</
template
>
</view>
<view
class=
"right box-class"
>
<view
class=
"right box-class"
:class=
"{'only-right':onlyRight}"
>
<type-tab-component
:typeList=
"typeList"
:tabIndex
.
sync=
"tabIndex"
...
...
@@ -184,6 +184,10 @@ export default {
}
},
computed
:
{
onlyRight
()
{
const
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
return
userInfo
.
subLoginUser
.
channelType
==
9
},
showPageFlag
()
{
return
Object
.
keys
(
this
.
pageData
).
length
},
...
...
@@ -399,6 +403,9 @@ export default {
width
:
toRpx
(
1358
);
border
:
toRpx
(
2
)
solid
#fff
;
box-sizing
:
border-box
;
&.only-right
{
width
:
calc
(
100%
-
#{
toRpx
(
64
)}
);
}
&
-content
{
width
:
100%
;
position
:
absolute
;
...
...
components/OrderPopup/components/GoodsCategory.vue
0 → 100644
View file @
43fede0
<
template
>
<view
class=
"goods-list is-defeat-order"
>
<template
v-if=
"params.loadComplete"
>
<template
v-if=
"categoryList.length"
>
<view
v-for=
"(category, index) in categoryList"
:key=
"index"
class=
"item-box"
>
<view
class=
"goods-title flex"
>
{{
category
.
categoryName
}}
</view>
<view
class=
"defeat-goods-list"
>
<view
v-for=
"(subItem, subIndex) in category.subItems"
:key=
"`$
{index}_${subIndex}`" :class="['item flex', { active: checkActive(subItem) }]" @click="choose(subItem)">
<view
class=
"sprite-icon icon-tag-checked"
></view>
<text
class=
"goods-name text-hide"
>
{{
subItem
.
categoryName
}}
</text>
</view>
</view>
</view>
</
template
>
</template>
</view>
</template>
<
script
>
import
popupmixin
from
'./popupmixin'
export
default
{
mixins
:
[
popupmixin
],
name
:
'GoodsCategory'
,
props
:
{
data
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
data
()
{
return
{
categoryList
:
[],
currentIds
:
[],
chooseList
:
[]
}
},
mounted
()
{
this
.
getList
()
},
watch
:
{
data
:
{
handler
(
newVal
)
{
console
.
log
(
newVal
)
if
(
newVal
&&
newVal
.
length
>
0
)
{
if
(
this
.
categoryList
.
length
>
0
)
{
this
.
restoreSelectedState
()
}
}
},
deep
:
true
,
immediate
:
true
},
categoryList
:
{
handler
(
newVal
)
{
if
(
newVal
&&
newVal
.
length
>
0
&&
this
.
data
&&
this
.
data
.
length
>
0
)
{
this
.
restoreSelectedState
()
}
},
deep
:
true
}
},
methods
:
{
async
getList
(
searchValue
)
{
await
this
.
getGoodsCategoryList
()
if
(
searchValue
)
{
this
.
handleSearch
(
searchValue
)
}
if
(
this
.
data
&&
this
.
data
.
length
>
0
)
{
this
.
restoreSelectedState
()
}
},
reset
()
{
this
.
currentIds
=
[]
this
.
chooseList
=
[]
},
restoreSelectedState
()
{
console
.
log
(
this
.
data
)
console
.
log
(
this
.
categoryList
)
if
(
!
this
.
data
||
!
this
.
categoryList
.
length
)
return
this
.
currentIds
=
[]
this
.
chooseList
=
[]
this
.
categoryList
.
forEach
(
category
=>
{
category
.
subItems
.
forEach
(
item
=>
{
const
isSelected
=
this
.
data
.
some
(
selectedItem
=>
selectedItem
.
id
===
item
.
id
)
console
.
log
(
isSelected
)
if
(
isSelected
)
{
this
.
currentIds
.
push
(
item
.
id
)
this
.
chooseList
.
push
(
item
)
}
})
})
},
async
getGoodsCategoryList
()
{
let
params
=
{
categoryType
:
''
}
let
res
=
await
uni
.
$api
.
boutiqueApi
.
getGoodsCategoryList
(
params
)
console
.
log
(
res
)
if
(
res
&&
res
.
children
)
{
this
.
categoryList
=
this
.
processCategoryData
(
res
.
children
)
}
console
.
log
(
this
.
categoryList
)
this
.
$emit
(
'onComplete'
)
},
processCategoryData
(
children
)
{
return
children
.
map
(
category
=>
{
let
subItems
=
[]
if
(
category
.
children
&&
category
.
children
.
length
>
0
)
{
subItems
=
category
.
children
}
else
{
subItems
=
[
category
]
}
return
{
categoryName
:
category
.
categoryName
,
subItems
:
subItems
}
})
},
handleSearch
(
searchValue
)
{
if
(
!
searchValue
)
{
this
.
searchStatus
=
false
return
}
let
filteredList
=
[]
this
.
categoryList
.
forEach
(
category
=>
{
if
(
category
.
categoryName
.
indexOf
(
searchValue
)
!==
-
1
)
{
filteredList
.
push
(
category
)
}
else
{
const
filteredSubItems
=
category
.
subItems
.
filter
(
item
=>
item
.
categoryName
.
indexOf
(
searchValue
)
!==
-
1
)
if
(
filteredSubItems
.
length
>
0
)
{
filteredList
.
push
({
...
category
,
subItems
:
filteredSubItems
})
}
}
})
this
.
searchList
=
filteredList
this
.
searchStatus
=
true
},
choose
(
item
)
{
let
id
=
item
.
id
let
index
=
this
.
currentIds
.
indexOf
(
id
)
if
(
index
===
-
1
)
{
this
.
currentIds
.
push
(
id
)
this
.
chooseList
.
push
(
item
)
}
else
{
this
.
currentIds
.
splice
(
index
,
1
)
this
.
chooseList
.
splice
(
index
,
1
)
}
console
.
log
(
this
.
chooseList
)
this
.
$emit
(
'choose'
,
this
.
chooseList
)
},
checkActive
(
item
)
{
return
this
.
currentIds
.
includes
(
item
.
id
)
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.goods-list
{
display
:
grid
;
grid-template-columns
:
repeat
(
2
,
1
fr
);
gap
:
toRpx
(
32
);
margin
:
0
toRpx
(
48
);
overflow
:
hidden
;
.item
{
justify-content
:
center
;
height
:
toRpx
(
72
);
border-radius
:
toRpx
(
8
);
border
:
toRpx
(
2
)
solid
#dce0e6
;
box-sizing
:
border-box
;
position
:
relative
;
color
:
#333333
;
font-size
:
toRpx
(
32
);
box-sizing
:
border-box
;
padding
:
0
toRpx
(
32
);
text-align
:
center
;
.no-postion
{
color
:
#f24724
;
margin-left
:
toRpx
(
10
);
font-size
:
toRpx
(
22
);
}
.sprite-icon
{
display
:
none
;
position
:
absolute
;
top
:
0
;
right
:
0
;
}
.price
{
margin-left
:
auto
;
}
.goods-name
{
max-width
:
toRpx
(
600
);
}
}
.active
{
border-color
:
#2c66f7
;
background
:
#ecf1ff
;
color
:
#2c66f7
;
.sprite-icon
{
display
:
block
;
}
}
}
.is-defeat-order
{
display
:
block
;
margin
:
0
;
.item-box
{
margin-bottom
:
toRpx
(
32
);
.goods-title
{
color
:
#888888
;
font-size
:
toRpx
(
28
);
height
:
toRpx
(
40
);
background
:
#f5f7fa
;
padding-left
:
toRpx
(
48
);
margin-bottom
:
toRpx
(
16
);
}
.defeat-goods-list
{
gap
:
toRpx
(
32
);
display
:
flex
;
flex-wrap
:
wrap
;
margin
:
0
toRpx
(
48
);
.item
{
width
:
calc
((
100%
-
#{
toRpx
(
32
)}
)
/
2
);
justify-content
:
center
;
min-height
:
toRpx
(
72
);
border-radius
:
toRpx
(
8
);
border
:
toRpx
(
2
)
solid
#dce0e6
;
box-sizing
:
border-box
;
position
:
relative
;
color
:
#333333
;
font-size
:
toRpx
(
32
);
padding
:
toRpx
(
14
)
toRpx
(
32
);
word-break
:
break-all
;
text-align
:
center
;
.sprite-icon
{
display
:
none
;
position
:
absolute
;
top
:
0
;
right
:
0
;
}
}
.disabled
{
border
:
toRpx
(
2
)
solid
#dce0e666
;
color
:
#3333331
a
;
}
.active
{
border-color
:
#2c66f7
;
background
:
#ecf1ff
;
color
:
#2c66f7
;
.sprite-icon
{
display
:
block
;
}
}
}
}
}
</
style
>
components/OrderPopup/config.js
View file @
43fede0
...
...
@@ -175,8 +175,8 @@ const componentConfig = {
noData
:
false
},
15
:
{
name
:
'
DateTimeChange
'
,
title
:
'选择
时间
'
,
name
:
'
GoodsCategory
'
,
title
:
'选择
商品类目
'
,
hideSearch
:
true
,
loadComplete
:
false
}
...
...
components/OrderPopup/index.vue
View file @
43fede0
<
template
>
<view
class=
"order-popup"
>
<popup
:position=
"position"
:animation=
"animation"
ref=
"popup"
@
onConfirm=
"confirm"
@
onCancel=
"cancel"
>
<popup
:position=
"position"
:animation=
"animation"
ref=
"popup"
@
onConfirm=
"confirm"
@
onCancel=
"cancel"
@
onReset=
"reset"
:showReset=
"popupType === 15"
>
<view
class=
"popup-title flex"
>
{{
title
}}
<view
class=
"popup-close flex"
@
click=
"close"
>
...
...
@@ -43,6 +43,7 @@ import SkuPopup from './components/SkuPopup.vue'
import
DateTime
from
'./components/DateTime.vue'
import
DateTimeChange
from
'./components/DateTimeChange.vue'
import
AgreementList
from
'./components/AgreementList.vue'
import
GoodsCategory
from
'./components/GoodsCategory.vue'
export
default
{
components
:
{
Popup
,
...
...
@@ -56,7 +57,8 @@ export default {
SkuPopup
,
DateTime
,
AgreementList
,
DateTimeChange
DateTimeChange
,
GoodsCategory
},
name
:
''
,
props
:
{
...
...
@@ -170,9 +172,17 @@ export default {
confirm
()
{
try
{
let
{
chooseContent
,
popupType
,
componentObject
}
=
this
if
(
popupType
==
13
||
popupType
==
15
)
{
if
(
popupType
==
13
)
{
chooseContent
=
this
.
componentRef
().
getResult
()
}
if
(
popupType
==
15
)
{
this
.
$emit
(
'onConfirm'
,
{
chooseContent
,
popupType
})
this
.
$refs
.
popup
.
close
()
return
}
if
(
chooseContent
)
{
if
(
Array
.
isArray
(
chooseContent
)
&&
!
chooseContent
.
length
&&
componentObject
[
popupType
].
nullTips
)
throw
componentObject
[
popupType
].
nullTips
this
.
$emit
(
'onConfirm'
,
{
...
...
@@ -205,6 +215,15 @@ export default {
this
.
componentObject
[
this
.
popupType
].
searchValue
=
''
this
.
handleSearch
()
},
reset
()
{
let
componentRef
=
this
.
componentRef
()
if
(
!
componentRef
)
uni
.
showToast
({
title
:
'请稍后再试'
,
icon
:
'none'
})
else
componentRef
.
reset
()
this
.
chooseContent
=
null
},
}
}
</
script
>
...
...
components/Popup.vue
View file @
43fede0
<
template
>
<uni-popup
ref=
"popup"
:type=
"position"
:is-mask-click=
"maskClick"
:animation=
"animation"
>
<view
:class=
"['popup-box',
{'right-box':position=='right'}]">
<uni-popup
ref=
"popup"
:type=
"position"
:is-mask-click=
"maskClick"
:animation=
"animation"
>
<view
:class=
"['popup-box',
{ 'right-box': position == 'right' }]">
<slot></slot>
<view
class=
"popup-footer flex"
>
<view
class=
"popup-btn popup-cancel"
@
click=
"cancel"
>
{{
cancelText
}}
</view>
<view
class=
"popup-btn popup-confirm"
@
click=
"confirm"
>
{{
confirmText
}}
</view>
<view
class=
"popup-footer flex"
v-if=
"showReset"
>
<view
class=
"popup-btn-three popup-cancel"
@
click=
"cancel"
>
{{
cancelText
}}
</view>
<view
class=
"popup-btn-three popup-reset"
@
click=
"reset"
>
{{
resetText
}}
</view>
<view
class=
"popup-btn-three popup-confirm"
@
click=
"confirm"
>
{{
confirmText
}}
</view>
</view>
<view
class=
"popup-footer flex"
v-else
>
<view
class=
"popup-btn popup-cancel"
@
click=
"cancel"
>
{{
cancelText
}}
</view>
<view
class=
"popup-btn popup-confirm"
@
click=
"confirm"
>
{{
confirmText
}}
</view>
</view>
</view>
</uni-popup>
</
template
>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
name
:
'Popup'
,
props
:
{
...
...
@@ -43,9 +36,17 @@ export default {
type
:
String
,
default
:
'取消'
},
resetText
:
{
type
:
String
,
default
:
'重置'
},
confirmText
:{
type
:
String
,
default
:
'确定'
},
showReset
:
{
type
:
Boolean
,
default
:
false
}
},
...
...
@@ -72,11 +73,14 @@ export default {
confirm
()
{
this
.
$emit
(
'onConfirm'
)
},
reset
()
{
this
.
$emit
(
'onReset'
)
},
}
}
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.popup-box
{
border-radius
:
32
rpx
32
rpx
0
0
;
background
:
#ffffff
;
...
...
@@ -97,10 +101,26 @@ export default {
font-size
:
32
rpx
;
font-weight
:
500
;
}
.popup-btn-three
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
470
rpx
;
height
:
80
rpx
;
border-radius
:
64
rpx
;
background
:
#f0f1f5
;
color
:
#333333
;
font-size
:
32
rpx
;
font-weight
:
500
;
}
.popup-confirm
{
color
:
#fff
;
background
:
linear-gradient
(
0deg
,
#2c66f7
0%
,
#48a6ff
100%
);
}
.popup-reset
{
background
:
#e9effe
;
color
:
#2c66f7
;
}
}
}
.right-box
{
...
...
@@ -111,4 +131,4 @@ export default {
margin
:
0
48
rpx
;
}
}
</
style
>
\ No newline at end of file
</
style
>
env.js
View file @
43fede0
...
...
@@ -49,8 +49,8 @@ const domain = {
}[
target
[
index
]]
const
djDomain
=
{
ip
:
'http
s://dj.test
.glsx.com.cn'
,
// ip: 'http://192.168.
2.80:8558
',
ip
:
'http
://dj.dev
.glsx.com.cn'
,
// ip: 'http://192.168.
1.125:8080
',
dev
:
'http://dj.dev.glsx.com.cn'
,
beta
:
'https://dj.beta.glsx.com.cn'
,
//预发布 appid: wx9f91c1ec493eb425
uat
:
'https://dj.test.glsx.com.cn'
,
//测试 appid: wxe10067a63c1856ac
...
...
manifest.json
View file @
43fede0
...
...
@@ -2,8 +2,8 @@
"name"
:
"展业助手"
,
"appid"
:
"__UNI__D3BD3DF"
,
"description"
:
""
,
"versionName"
:
"2.1
4
.0"
,
"versionCode"
:
"21
4
0"
,
"versionName"
:
"2.1
6
.0"
,
"versionCode"
:
"21
6
0"
,
"transformPx"
:
false
,
"sassImplementationName"
:
"node-sass"
,
/*
5
+App特有相关
*/
...
...
pages/equity/detail/components/History.vue
View file @
43fede0
...
...
@@ -6,7 +6,17 @@
<view
class=
"form"
>
<template
v-for=
"(i, index) in formObject"
>
<view
:class=
"['form-item',
{ active: focusIndex == index }]" :key="index">
<view
class=
"form-item-box"
>
<view
class=
"form-item-box"
v-if=
"i.key == 'goodsCtegory'"
>
<view
:class=
"['select flex',
{ placeholderStyle: !customerInfo[i.key] }]" @click="showPopup(i.popKey, index)">
<view
class=
"value text-hide"
v-if=
"chooseContent.length > 0"
>
<text
class=
"category-name"
v-for=
"(item, index) in chooseContent.slice(0, 2)"
:key=
"index"
>
{{
item
.
categoryName
}}
</text>
<text
class=
"category-name"
v-if=
"chooseContent.length > 2"
>
+
{{
chooseContent
.
length
-
2
}}
</text>
</view>
<view
class=
"value text-hide"
v-else
>
请选择
</view>
<uni-icons
class=
"arrow"
type=
"right"
:size=
"16"
></uni-icons>
</view>
</view>
<view
class=
"form-item-box"
v-else
>
<view
:class=
"['select flex',
{ placeholderStyle: !customerInfo[i.key] }]" @click="showPopup(i.popKey, index)">
<view
class=
"value text-hide"
>
{{
customerInfo
[
i
.
key
]
||
i
.
placeholder
}}
</view>
<uni-icons
class=
"arrow"
type=
"right"
:size=
"16"
></uni-icons>
...
...
@@ -14,13 +24,14 @@
</view>
</view>
</
template
>
<view
class=
"form-check flex"
@
click=
"showphoto = !showphoto"
>
<view
:class=
"['check-box flex', { checked: showphoto }]"
>
<uni-icons
type=
"checkmarkempty"
:size=
"14"
color=
"#fff"
></uni-icons>
</view>
显示凭证
</view>
<view
class=
"form-check flex"
@
click=
"merchantOrder = !merchantOrder"
>
<view
class=
"form-check flex"
@
click=
"merchantOrder = !merchantOrder"
v-if=
"!subLoginUserChannelType"
>
<view
:class=
"['check-box flex', { checked: merchantOrder }]"
>
<uni-icons
type=
"checkmarkempty"
:size=
"14"
color=
"#fff"
></uni-icons>
</view>
...
...
@@ -40,7 +51,7 @@
<view
class=
"card-list"
>
<view
class=
"card-item"
v-for=
"item in list"
:key=
"item.id"
>
<template
v-if=
"showphoto"
>
<image
v-if=
"item.
vdQuotationPaymentDoc && item.vdQuotationPaymentDoc.paymentDocUrl"
class=
"image-box"
:src=
"item.vdQuotationPaymentDoc
.paymentDocUrl"
/>
<image
v-if=
"item.
paymentDocUrl"
class=
"image-box"
:src=
"item
.paymentDocUrl"
/>
<image
v-else
class=
"image-box photo"
src=
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/common/pay.webp"
/>
<view
class=
"gradient-overlay"
></view>
</
template
>
...
...
@@ -68,7 +79,7 @@
<view
class=
"label"
>
实收金额
</view>
<view
class=
"price"
>
<view
class=
"flag"
>
¥
</view>
{{
accDiv(item.equityPrice)
}}
{{
item.equityPrice
}}
</view>
</view>
</view>
...
...
@@ -87,6 +98,7 @@
</
template
>
</view>
<car-brands
ref=
"carBrandListVisible"
@
select=
"handleSelect($event, 'carBrandListVisible')"
@
close=
"resetFocusIndex"
/>
<OrderPopup
ref=
"goodsCtegoryVisible"
:data=
"chooseContent"
@
onConfirm=
"onConfirm"
:externalData=
"[]"
:popupType=
"15"
/>
</view>
</template>
...
...
@@ -95,8 +107,9 @@ import utils from '@/utils/utils'
import
Record
from
'@/mixin/record'
import
CarBrands
from
'@/components/CarBrands.vue'
import
dayjs
from
'dayjs'
import
OrderPopup
from
'@/components/OrderPopup/index.vue'
export
default
{
components
:
{
CarBrands
},
components
:
{
CarBrands
,
OrderPopup
},
name
:
'History'
,
mixins
:
[
Record
],
props
:
{
...
...
@@ -115,13 +128,21 @@ export default {
key
:
'carModel'
,
type
:
'select'
,
popKey
:
'carBrandListVisible'
},
{
placeholder
:
'商品类目'
,
key
:
'goodsCtegory'
,
type
:
'select'
,
popKey
:
'goodsCtegoryVisible'
}
],
customerInfo
:
{},
focusIndex
:
-
1
,
showphoto
:
false
,
formatList
:
[],
merchantOrder
:
false
//门店订单
merchantOrder
:
false
,
//门店订单
historyOrderGoodsTypes
:
[],
chooseContent
:
[]
}
},
watch
:
{
...
...
@@ -165,6 +186,9 @@ export default {
shopMerchantId
()
{
return
uni
.
$storage
.
get
(
'userInfo'
).
shopMerchantId
},
subLoginUserChannelType
()
{
return
uni
.
$storage
.
get
(
'userInfo'
).
subLoginUser
.
channelType
==
9
},
channelType
()
{
const
{
channelType
}
=
uni
.
$storage
.
get
(
'userInfo'
)
return
channelType
...
...
@@ -176,6 +200,9 @@ export default {
methods
:
{
init
()
{
this
.
customerInfo
=
this
.
watchCustomerInfo
if
(
this
.
subLoginUserChannelType
)
{
this
.
merchantOrder
=
true
}
// if (!this.customerInfo.carModel && !this.isByd) this.$refs.carBrandListVisible.autoSelect()
// else
this
.
search
()
...
...
@@ -198,6 +225,7 @@ export default {
return
`
${
year
}
-
${
month
}
-
${
day
}
`
},
async
getQuotationList
()
{
const
{
shopMerchantId
,
pageNum
,
pageSize
,
merchantOrder
}
=
this
,
carModel
=
this
.
customerInfo
.
carModel
...
...
@@ -213,7 +241,8 @@ export default {
pageSize
,
carModel
:
carModel
||
''
,
orderStatus
:
3
,
merchantOrder
merchantOrder
,
historyOrderGoodsTypes
:
this
.
historyOrderGoodsTypes
}
if
(
!
params
.
merchantOrder
)
{
delete
params
.
merchantId
...
...
@@ -221,7 +250,7 @@ export default {
params
.
minCreateTime
=
dayjs
(
Date
.
now
()
-
90
*
24
*
60
*
60
*
1000
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
params
.
carChildsBrandIds
=
carChildsBrandIds
}
let
{
list
,
total
}
=
await
uni
.
$api
.
boutiqueApi
.
getOrderList
(
params
)
let
{
list
,
total
}
=
await
uni
.
$api
.
boutiqueApi
.
getOrderList
Page
(
params
)
uni
.
hideLoading
()
this
.
list
=
[...(
pageNum
==
1
?
[]
:
this
.
list
),
...
list
]
...
...
@@ -291,6 +320,53 @@ export default {
},
resetFocusIndex
()
{
this
.
focusIndex
=
-
1
},
// 修改 onConfirm 方法
onConfirm
(
chooseList
)
{
console
.
log
(
chooseList
)
this
.
chooseContent
=
chooseList
.
chooseContent
||
[]
this
.
historyOrderGoodsTypes
=
[]
// 检查chooseList和chooseContent是否存在
if
(
chooseList
&&
chooseList
.
chooseContent
&&
chooseList
.
chooseContent
.
length
>
0
)
{
// 按parentId分组处理level为3的数据
const
level3Map
=
new
Map
()
// 首先处理所有数据
chooseList
.
chooseContent
.
forEach
(
item
=>
{
if
(
item
.
level
===
2
)
{
// 当level为2时,添加结构为{secondaryGoodsType:item.categoryType, thirdLevelGoodsTypes:null}
this
.
historyOrderGoodsTypes
.
push
({
secondaryGoodsType
:
item
.
categoryType
,
thirdLevelGoodsTypes
:
null
})
}
else
if
(
item
.
level
===
3
)
{
// 当level为3时,先按parentId分组
const
parentCategoryType
=
item
.
parentCategoryType
if
(
level3Map
.
has
(
parentCategoryType
))
{
// 如果parentId已存在,则将当前categoryType添加到数组中
level3Map
.
get
(
parentCategoryType
).
push
(
item
.
categoryType
)
}
else
{
// 如果parentId不存在,则创建新数组
level3Map
.
set
(
parentCategoryType
,
[
item
.
categoryType
])
}
}
})
// 然后将分组后的level3数据添加到historyOrderGoodsTypes中
level3Map
.
forEach
((
categoryTypes
,
parentCategoryType
)
=>
{
this
.
historyOrderGoodsTypes
.
push
({
secondaryGoodsType
:
parentCategoryType
,
thirdLevelGoodsTypes
:
categoryTypes
})
})
}
console
.
log
(
this
.
historyOrderGoodsTypes
)
this
.
list
=
[]
this
.
pageNum
=
1
uni
.
$track
.
add
({
eventCode
:
'app_goodsGategory_change'
,
eventType
:
0
})
this
.
getQuotationList
()
}
}
}
...
...
@@ -334,6 +410,19 @@ export default {
box-sizing
:
border-box
;
padding
:
0
toRpx
(
24
);
z-index
:
2
;
.category-name
{
width
:
toRpx
(
160
);
height
:
toRpx
(
48
);
border-radius
:
toRpx
(
8
);
background
:
#f5f6f7
;
color
:
#333333
;
font-size
:
toRpx
(
26
);
padding
:
toRpx
(
6
)
toRpx
(
16
);
margin-right
:
toRpx
(
12
);
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
.input
,
.select
{
...
...
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