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 e51fb371
authored
Oct 24, 2023
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
战败下单修改
1 parent
9c6e4a0d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
20 deletions
components/Coupon/Coupon.js
tabWorkOrder/pages/defeatOrder/defeatOrder.js
tabWorkOrder/pages/defeatOrder/defeatOrder.json
tabWorkOrder/pages/defeatOrder/defeatOrder.wxml
tabWorkOrder/pages/premiumUpgrade/premiumUpgrade.wxml
components/Coupon/Coupon.js
View file @
e51fb37
...
...
@@ -90,7 +90,7 @@ Component({
wx
.
$util
.
showToast
(
message
)
}
this
.
getCustomerCouponList
(
n
)
this
.
getCouponList
(
this
.
data
.
merchantId
)
this
.
getCouponList
(
this
.
data
.
merchantId
,
!
(
data
&&
Object
.
keys
(
data
)?.
length
)
)
})
}
else
{
this
.
getCustomerCouponList
(
n
)
...
...
@@ -102,7 +102,8 @@ Component({
returnFun
:
Boolean
,
pageName
:
{
type
:
String
}
},
filmOrder
:
String
// 下单类型
},
lifetimes
:
{
attached
()
{}
...
...
@@ -154,9 +155,10 @@ Component({
}
})
},
getCouponList
(
merchantId
,
refresh
)
{
getCouponList
(
merchantId
,
setCoupon
)
{
let
{
yqMerchantId
yqMerchantId
,
filmOrder
}
=
this
.
data
// console.log(merchantId, yqMerchantId, 'yqMerchantId');
// 解决 yqMerchantId 为0 请求空数据的问题
...
...
@@ -175,11 +177,16 @@ Component({
if
(
code
==
0
)
{
let
couponTypeList
=
Array
.
from
(
new
Set
([...
data
.
map
(
e
=>
e
.
couponInfo
.
couponType
)]))
// console.log(couponTypeList)
// 精品升级 过滤掉太阳膜礼券
if
(
filmOrder
==
'1'
)
{
let
index
=
couponTypeList
.
findIndex
(
v
=>
v
==
1
)
index
>
-
1
&&
couponTypeList
.
splice
(
index
,
1
)
}
let
thisPage
=
wx
.
$router
.
getPageInstance
()
let
{
orderObj
}
=
thisPage
.
data
let
couponList
=
couponTypeList
.
map
(
e
=>
{
let
couponList
=
couponTypeList
.
map
(
(
e
,
index
)
=>
{
let
list
=
[]
let
title
=
''
data
.
map
(
i
=>
{
...
...
@@ -188,17 +195,27 @@ Component({
list
.
push
(
i
)
title
=
i
.
couponInfo
.
couponTypeName
}
if
(
e
==
1
&&
list
.
length
&&
!
orderObj
?.
customer
.
customerPhone
)
{
// 太阳膜礼券 无客户默认选择第一张太阳膜礼券
orderObj
=
{
...
orderObj
,
couponName
:
list
[
0
]?.
couponName
,
customerCouponCode
:
list
[
0
]?.
merchantCouponCode
,
merchantCouponId
:
list
[
0
]?.
id
,
merchantId
:
list
[
0
]?.
merchantId
if
(
setCoupon
)
{
if
(
e
==
1
&&
list
.
length
)
{
// 太阳膜礼券 无客户默认选择第一张太阳膜礼券
list
[
0
].
active
=
true
orderObj
=
{
...
orderObj
,
couponName
:
list
[
0
]?.
couponName
,
customerCouponCode
:
list
[
0
]?.
merchantCouponCode
,
merchantCouponId
:
list
[
0
]?.
id
,
merchantId
:
list
[
0
]?.
merchantId
}
}
else
if
(
filmOrder
==
'1'
&&
index
==
0
&&
list
.
length
)
{
// 精品升级礼券 默认选择第一张
let
objProp
=
list
[
0
]
objProp
.
active
=
true
orderObj
=
{
...
orderObj
,
couponName
:
objProp
?.
couponName
,
customerCouponCode
:
objProp
?.
merchantCouponCode
,
merchantCouponId
:
objProp
?.
id
,
merchantId
:
objProp
?.
merchantId
}
}
thisPage
.
setData
({
orderObj
})
}
})
return
{
...
...
@@ -206,12 +223,15 @@ Component({
list
}
})
thisPage
.
setData
({
orderObj
})
this
.
setData
({
couponList
})
this
.
checkCoupon
()
}
else
{
if
(
refresh
)
wx
.
$util
.
showToast
(
message
)
wx
.
$util
.
showToast
(
message
)
}
})
},
...
...
tabWorkOrder/pages/defeatOrder/defeatOrder.js
View file @
e51fb37
...
...
@@ -52,7 +52,8 @@ Page({
copyGoodsData
:
[],
frontGearArr
:
[],
sideRearGearArr
:
[],
skylightArr
:
[]
skylightArr
:
[],
customerInfoBox
:
false
,
},
routerBack
()
{
wx
.
$router
.
back
()
...
...
@@ -80,6 +81,33 @@ Page({
[
subOrderListProp
]:
arr
})
},
chooseCustomerInfo
(
e
)
{
let
{
detail
}
=
e
let
{
selectCustomIndex
}
=
this
.
data
let
prop
=
`notUpgradeOrderList[
${
selectCustomIndex
}
].customer`
this
.
setData
({
[
prop
]:
{
customerName
:
detail
.
customer
.
customerName
,
customerSex
:
detail
.
customer
.
customerSex
,
customerPhone
:
detail
.
customer
.
customerPhone
,
carBrandId
:
detail
.
customer
.
carBrandId
,
carBrand
:
detail
.
customer
.
carBrand
,
carChildsBrandId
:
detail
.
customer
.
carChildsBrandId
,
carChildsBrandName
:
detail
.
customer
.
carChildsBrandName
,
carSeriesId
:
detail
.
customer
.
carSeriesId
,
carSeriesName
:
detail
.
customer
.
carSeriesName
,
standNo
:
detail
.
customer
.
standNo
,
plateNumber
:
detail
.
customer
.
plateNumber
}
})
},
showCustomPop
(
e
)
{
let
{
index
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
customerInfoBox
:
true
,
selectCustomIndex
:
index
})
},
addUserItem
()
{
let
{
notUpgradeOrderList
,
copyGoodsData
}
=
this
.
data
notUpgradeOrderList
.
push
({
...
...
tabWorkOrder/pages/defeatOrder/defeatOrder.json
View file @
e51fb37
...
...
@@ -3,6 +3,7 @@
"usingComponents"
:
{
"car-brands"
:
"/components/CarBrands/CarBrands"
,
"merchant-seles"
:
"/components/Merchant-Seles/Merchant-Seles"
,
"goods"
:
"/components/Goods/Goods"
"goods"
:
"/components/Goods/Goods"
,
"customerInfo"
:
"/components/CustomerInfo/CustomerInfo"
}
}
\ No newline at end of file
tabWorkOrder/pages/defeatOrder/defeatOrder.wxml
View file @
e51fb37
...
...
@@ -101,8 +101,11 @@
border
valueAlign="right"
label="车主姓名"
titleBtn="客户档案"
bindtitleClick="showCustomPop"
data-index="{{ind}}"
requiredAfter
labelWidth="
14
0rpx"
labelWidth="
29
0rpx"
required>
<input
placeholder="点击输入"
...
...
@@ -378,7 +381,7 @@
</view>
</view>
</block>
<view class="addBtn" bindtap="addUserItem" id="addBtn">
<view class="addBtn" bindtap="addUserItem" id="addBtn"
wx:if="{{notUpgradeOrderList.length <= 10}}"
>
<image class="addIcon" src="../../images/addIcon.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" />
<text class="text">新增客户</text>
</view>
...
...
@@ -408,4 +411,5 @@
/>
<merchant-seles show="{{ salesmanBox }}" isDefault="{{ isDefault }}" title="选择园区店" sub-title="选择转化人员" userInfo="{{ userInfo }}" type="2" />
<goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ notUpgradeOrderList[selectCustomIndex].subOrderList || [] }}" isSolarFilm="{{true}}"/>
<customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" />
tabWorkOrder/pages/premiumUpgrade/premiumUpgrade.wxml
View file @
e51fb37
...
...
@@ -353,6 +353,7 @@
selectPayType="{{orderObj.selectPayType}}"
returnFun="{{ returnFun }}"
phoneShow="{{ !phoneShow}}"
filmOrder="1"
/>
<goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" />
<customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" />
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