Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b0e5aa2b
authored
May 11, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
功能开发
1 parent
5dcd1e01
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
76 deletions
config.js
packageEquity/api.js
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.js
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.wxml
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
packageEquity/pages/carQuotation/index/index.js
store/index.js
config.js
View file @
b0e5aa2
...
...
@@ -10,7 +10,7 @@
* 2测试
* 3生产环境
*/
let
index
=
0
let
index
=
1
const
accountInfo
=
wx
.
getAccountInfoSync
()
const
systemInfo
=
wx
.
getSystemInfoSync
()
...
...
packageEquity/api.js
View file @
b0e5aa2
...
...
@@ -78,5 +78,9 @@ module.exports = {
/** 门店模式查询 */
merchantMode
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.vehicle.damage.upgrade.merchant.mode'
,
data
)
},
/** 商品查询 */
listByMerchantIdAndIds
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.quotationGoods.listByMerchantIdAndIds'
,
data
)
}
}
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.js
View file @
b0e5aa2
...
...
@@ -31,18 +31,22 @@ Component({
orderInfo
:
{
type
:
Object
,
observer
:
function
(
n
)
{
if
(
n
?.
modifyEquityQuotation
)
{
this
.
setData
({
activeNames
:
[
'3'
],
disable
:
true
})
}
else
{
this
.
setData
({
activeNames
:
[
'1'
,
'2'
,
'3'
,
'4'
],
disable
:
false
})
}
//
if (n?.modifyEquityQuotation) {
//
this.setData({
//
activeNames: ['3'],
//
disable: true
//
})
//
} else {
//
this.setData({
//
activeNames: ['1', '2', '3', '4'],
//
disable: false
//
})
//
}
}
},
quotationGoodsList
:
{
type
:
Array
,
value
:
()
=>
{}
}
},
...
...
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.wxml
View file @
b0e5aa2
...
...
@@ -37,20 +37,20 @@
请勾选增值车损险服务
</van-checkbox> -->
<!-- <block wx:if="{{insuranceCheck}}"> -->
<view class="goodsCheckItem">
<view class="goodsCheckItem"
wx:for="{{quotationGoodsList}}" wx:key="index"
>
<view class="check">
<van-checkbox value="{{ insuranceCheck }}" shape="square" bind:change="onChangeInsurance"></van-checkbox>
</view>
<view class="goodsInfo">
<view class="incrementInfo">
<image class="img" src="{{
orderInfo
.quotationGoodsInfo.titlePictureUrl}}" />
<image class="img" src="{{
item
.quotationGoodsInfo.titlePictureUrl}}" />
<view class="info">
<view class="infoTitle">{{
orderInfo
.quotationGoodsInfo.goodsName}}</view>
<view class="infoTitle">{{
item
.quotationGoodsInfo.goodsName}}</view>
<view>
<text>包含</text>
<block wx:
key="index" wx:for="{{orderInfo
.quotationGoodsInfo.quotationGoodsServiceItemsRelationDTOList}}">
<block wx:
for-index="itemIndex" wx:for-item="i" wx:key="itemIndex" wx:for="{{item
.quotationGoodsInfo.quotationGoodsServiceItemsRelationDTOList}}">
<text>
{{i
tem.serviceName}}{{orderInfo
.quotationGoodsInfo.quotationGoodsServiceItemsRelationDTOList.length==index?'':'、'}}
{{i
.serviceName}}{{i
.quotationGoodsInfo.quotationGoodsServiceItemsRelationDTOList.length==index?'':'、'}}
</text>
</block>
</view>
...
...
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
View file @
b0e5aa2
...
...
@@ -17,6 +17,7 @@ Page({
confirmStatus
:
false
,
saveStatus
:
false
},
quotationGoodsList
:
[],
//权益商品列表
// owner: {
// owner: 'test2',
// phone: 15816539334,
...
...
@@ -315,19 +316,32 @@ Page({
.
then
(
result
=>
{
console
.
log
(
result
)
let
{
data
}
=
result
if
(
!
data
.
length
)
return
wx
.
$util
.
showToast
(
'请先添加权益配置'
)
let
{
id
:
appreciation
,
goodsInfo
,
upgradeGoodsName
:
goodsName
,
upgradeGoodsServiceItemsList
}
=
data
[
0
]
this
.
setData
({
[
'orderInfo.valueAddedVehicleLoss'
]:
{
appreciation
,
goodsName
,
type
:
3
},
[
'orderInfo.quotationGoodsInfo'
]:
{
titlePictureUrl
:
goodsInfo
.
thumbUrl
,
goodsName
,
quotationGoodsServiceItemsRelationDTOList
:
upgradeGoodsServiceItemsList
data
=
data
.
map
(
item
=>
{
return
{
...
item
,
appreciation
:
item
.
appreciation
,
goodsName
:
item
.
upgradeGoodsName
,
quotationGoodsServiceItemsRelationDTOList
:
item
.
upgradeGoodsServiceItemsList
,
titlePictureUrl
:
item
.
titlePictureUrl
}
})
this
.
setData
({
quotationGoodsList
:
data
})
// this.setData({
// ['orderInfo.valueAddedVehicleLoss']: {
// appreciation,
// goodsName,
// type: 3
// },
// ['orderInfo.quotationGoodsInfo']: {
// titlePictureUrl: goodsInfo.thumbUrl,
// goodsName,
// quotationGoodsServiceItemsRelationDTOList: upgradeGoodsServiceItemsList
// }
// })
})
.
catch
(
err
=>
{})
},
...
...
packageEquity/pages/carQuotation/index/index.js
View file @
b0e5aa2
...
...
@@ -64,7 +64,8 @@ Component({
triggered
:
false
,
scrollTop
:
0
,
userInfo
:
{},
sufferReason
:
''
sufferReason
:
''
,
mode
:
0
},
lifetimes
:
{
...
...
@@ -96,19 +97,23 @@ Component({
getMerchant4SMode
()
{
let
{
storeInfo
}
=
this
.
data
// 场景
merchantMode
({
merchantId4s
:
storeInfo
?.
merchantId
,
Source
:
2
})
merchantMode
({
merchantId4s
:
storeInfo
?.
merchantId
})
.
then
(
result
=>
{
console
.
log
(
result
,
'mode'
)
this
.
setData
({
mode
:
result
.
data
})
let
{
data
,
code
}
=
result
if
(
code
==
0
)
{
this
.
setData
({
mode
:
data
.
mode
})
}
})
.
catch
(
err
=>
{})
},
handleClickOrderBtn
(
e
)
{
// console.log(e)
// let { target } = e.target.dataset
wx
.
$router
.
go
(
'createOrderCarQuotation'
)
let
{
mode
}
=
this
.
data
wx
.
$router
.
go
(
mode
?
'createOrderCarQuotationSimple'
:
'createOrderCarQuotation'
)
},
onBottomRefresh
()
{
this
.
getList
()
...
...
store/index.js
View file @
b0e5aa2
...
...
@@ -3,7 +3,7 @@ import api from '~/api/api.js'
// console.log(app, 'app')
// console.log(wx)globalData
/** 判断是不是超管角色 */
export
const
checkYqdSuper
=
(
userInfo
,
globalData
)
=>
{
export
const
checkYqdSuper
=
(
userInfo
,
globalData
)
=>
{
let
merchantAccountType
=
userInfo
.
merchantAccountList
.
every
(
item
=>
{
return
item
==
6
||
item
==
8
})
...
...
@@ -14,7 +14,7 @@ export const checkYqdSuper = (userInfo,globalData) => {
// console.log(app);
globalData
.
isYqdSuper
=
userInfo
.
userType
!=
2
&&
!
userInfo
.
isSuper
&&
merchantAccountType
globalData
.
isStaff
=
userInfo
.
userType
==
2
&&
!
userInfo
.
isSuper
&&
merchantAccountType
console
.
log
(
globalData
.
isStaff
);
//
console.log(globalData.isStaff);
}
// 获取园区店信息
export
const
getYQInfo
=
userInfo
=>
{
...
...
@@ -30,9 +30,11 @@ export const getYQInfo = userInfo => {
if
(
!
userInfo
.
isSuper
&&
userInfo
.
merchantType
&&
userInfo
.
userType
==
2
)
{
app
.
globalData
.
yqdInfo
=
{
subIndex
,
merchantRange
:
[{
merchantName
:
userInfo
.
merchantName
}]
merchantRange
:
[
{
merchantName
:
userInfo
.
merchantName
}
]
}
// this.setData({
// merchantRange: [{ merchantName: userInfo.merchantName }]
...
...
@@ -47,10 +49,7 @@ export const getYQInfo = userInfo => {
.
getYQList
()
.
then
(
res
=>
{
// console.log(res)
let
{
code
,
data
}
=
res
let
{
code
,
data
}
=
res
if
(
code
==
0
)
{
let
arr
=
[]
if
(
data
.
length
>
1
)
{
...
...
@@ -61,9 +60,11 @@ export const getYQInfo = userInfo => {
}
arr
=
[
all
,
...
data
]
}
else
{
arr
=
[{
merchantName
:
userInfo
.
merchantName
}]
arr
=
[
{
merchantName
:
userInfo
.
merchantName
}
]
}
app
.
globalData
.
yqdInfo
=
{
merchantRange
:
arr
,
...
...
@@ -89,10 +90,7 @@ export const getYQorderInfo = () => {
}
else
{
let
userInfo
=
wx
.
$util
.
getUserInfo
()
if
(
!
userInfo
)
this
.
login
(
true
)
let
{
merchantId
,
merchantName
}
=
userInfo
.
subLoginUser
let
{
merchantId
,
merchantName
}
=
userInfo
.
subLoginUser
api
.
getMerchantRecordingSettings
({
...
...
@@ -101,10 +99,7 @@ export const getYQorderInfo = () => {
})
.
then
(
res
=>
{
// console.log(res)
let
{
code
,
data
}
=
res
let
{
code
,
data
}
=
res
if
(
code
==
0
)
{
// debugger
// console.log(typeof data.yqPhoneConfig, 'data.yqPhoneConfig')
...
...
@@ -131,9 +126,7 @@ export const setConfigInfo = globalData => {
// 如果有 直接返回
// console.log(app.globalData.YQorderSetting, 'app.globalData.YQorderSetting')
// console.log('app.globalData.YQorderSetting', app.globalData.YQorderSetting)
let
{
configInfo
}
=
globalData
let
{
configInfo
}
=
globalData
if
(
configInfo
)
{
return
resolve
(
configInfo
)
}
else
{
...
...
@@ -162,9 +155,7 @@ export const setConfigInfo = globalData => {
export
const
checkScene
=
options
=>
{
// let query = options.query
let
{
query
}
=
options
let
{
query
}
=
options
if
(
query
)
{
// 解码
for
(
const
key
in
query
)
{
...
...
@@ -252,23 +243,22 @@ export const get4SStoreList = options => {
api
.
getSceneMerchantRefStoreList
(
options
)
.
then
(
res
=>
{
let
{
code
,
data
}
=
res
let
{
code
,
data
}
=
res
if
(
code
==
0
)
{
app
.
globalData
.
storeListRange
=
data
let
default4SStoreInfo
=
wx
.
$util
.
getUserInfo
()?.
default4SStoreInfo
?
wx
.
$util
.
getUserInfo
()?.
default4SStoreInfo
:
data
&&
data
[
0
]
let
default4SStoreInfo_crowdFunding
=
wx
.
$util
.
getUserInfo
()?.
default4SStoreInfo_crowdFunding
?
wx
.
$util
.
getUserInfo
()?.
default4SStoreInfo_crowdFunding
:
data
&&
data
[
0
]
console
.
log
(
options
)
if
(
options
.
scene
==
0
)
wx
.
$util
.
setUserInfo
({
...
wx
.
$util
.
getUserInfo
(),
default4SStoreInfo
:
default4SStoreInfo
})
if
(
options
.
scene
==
3
)
wx
.
$util
.
setUserInfo
({
...
wx
.
$util
.
getUserInfo
(),
default4SStoreInfo_crowdFunding
:
default4SStoreInfo_crowdFunding
})
if
(
options
.
scene
==
0
)
wx
.
$util
.
setUserInfo
({
...
wx
.
$util
.
getUserInfo
(),
default4SStoreInfo
:
default4SStoreInfo
})
if
(
options
.
scene
==
3
)
wx
.
$util
.
setUserInfo
({
...
wx
.
$util
.
getUserInfo
(),
default4SStoreInfo_crowdFunding
:
default4SStoreInfo_crowdFunding
})
resolve
(
app
.
globalData
.
storeListRange
)
}
})
...
...
@@ -285,10 +275,7 @@ export const getStaffListByMerchant = options => {
api
.
getStaffListByMerchantAPI
(
options
)
.
then
(
res
=>
{
let
{
code
,
data
}
=
res
let
{
code
,
data
}
=
res
if
(
code
==
0
)
{
app
.
globalData
.
staffListRange
=
data
resolve
(
app
.
globalData
.
staffListRange
)
...
...
@@ -298,4 +285,4 @@ export const getStaffListByMerchant = options => {
console
.
log
(
error
)
})
})
}
\ No newline at end of file
}
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