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 5d2360d1
authored
Aug 19, 2024
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix 精品套餐联动问题修复和销售顾问场景值错误
1 parent
929f226a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
70 additions
and
146 deletions
components/Goods/Goods.js
components/Merchant-Seles/Merchant-Seles.js
packageEquity/pages/createDeafeatOrder/createDeafeatOrder.wxml
packageEquity/pages/createDeafeatOrderAi/createDeafeatOrderAi.wxml
tabWorkOrder/pages/additionRecordOrder/additionRecordOrder.wxml
tabWorkOrder/pages/createArchives/createArchives.wxml
tabWorkOrder/pages/createOrder/createOrder.wxml
tabWorkOrder/pages/defeatOrder/defeatOrder.wxml
tabWorkOrder/pages/premiumUpgrade/premiumUpgrade.wxml
components/Goods/Goods.js
View file @
5d2360d
...
...
@@ -85,10 +85,12 @@ Component({
},
// 删除数组重复项 都不保留
removeDuplicates
(
arr
,
property
)
{
console
.
log
(
arr
,
'packageCode'
);
var
uniqueArray
=
[];
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
var
value
=
arr
[
i
][
property
];
if
(
!
uniqueArray
.
some
((
obj
)
=>
obj
[
property
]
===
value
))
{
// 兼容套餐
if
((
!
uniqueArray
.
some
((
obj
)
=>
obj
[
property
]
===
value
)
||
arr
[
i
]?.
packageCode
))
{
uniqueArray
.
push
(
arr
[
i
]);
}
}
...
...
@@ -96,10 +98,12 @@ Component({
},
// 去重保留第二项
arrayUnique
(
arr
,
name
)
{
arrayUnique
(
arr
,
name
,
packageCode
=
'packageCode'
)
{
console
.
log
(
arr
,
'arrayUnique'
);
var
hash
=
{};
return
arr
.
reduce
(
function
(
acc
,
cru
,
index
)
{
if
(
!
hash
[
cru
[
name
]])
{
// 兼容套餐逻辑
if
(
!
hash
[
cru
[
name
]]
||
!
hash
[
cru
[
packageCode
]])
{
hash
[
cru
[
name
]]
=
{
index
:
index
};
acc
.
push
(
cru
);
}
else
{
...
...
@@ -110,7 +114,9 @@ Component({
},
getChooseList
()
{
let
{
goodsList
,
chooseGoodsList
,
isSolarFilm
}
=
this
.
data
;
console
.
log
(
goodsList
,
chooseGoodsList
,
'goodsList'
);
let
chooseList
=
[];
// debugger
// 太阳膜下单 需保留已选的商品
if
(
isSolarFilm
)
{
let
upgradeGoodsList
=
[];
...
...
@@ -124,10 +130,12 @@ Component({
}
if
(
!
selectActiveArr
?.
length
)
return
wx
.
$util
.
showToast
(
"请勾选商品"
);
// 将已选商品与当前弹窗数据对比处理数据
console
.
log
(
upgradeGoodsList
,
chooseGoodsList
,
'chooseGoodsList'
);
let
arr
=
this
.
removeDuplicates
(
upgradeGoodsList
.
concat
(
chooseGoodsList
),
"id"
);
console
.
log
(
arr
,
'arr'
);
arr
?.
map
((
c
)
=>
{
if
(
c
.
active
)
{
if
(
!
c
.
count
)
c
.
count
=
1
;
...
...
@@ -159,6 +167,7 @@ Component({
c
.
price
=
c
.
upgradePrice
||
0
;
}
if
(
!
c
.
price
)
c
.
price
=
c
.
upgradePrice
;
console
.
log
(
c
,
'isSolarFilm'
);
chooseList
.
push
(
c
);
}
});
...
...
components/Merchant-Seles/Merchant-Seles.js
View file @
5d2360d
...
...
@@ -31,7 +31,6 @@ Component({
oderType
:
String
,
scene
:
{
type
:
Number
,
value
:
1
,
},
},
// 处理先要调用销售顾问接口再调用转化人员接口的问题
...
...
@@ -198,6 +197,7 @@ Component({
isFirst
,
orderObj
:
comOrderObj
,
orderSellerInfo
,
scene
}
=
this
.
data
;
let
thisPage
=
wx
.
$router
.
getPageInstance
();
...
...
@@ -205,7 +205,7 @@ Component({
api
.
getConversionEmployeeList
({
merchantId
,
sceneList
:
type
==
1
?
[
0
]
:
""
,
sceneList
:
type
==
1
?
[
scene
]
:
""
,
})
.
then
(
async
(
res
)
=>
{
wx
.
$util
.
hideLoading
();
...
...
packageEquity/pages/createDeafeatOrder/createDeafeatOrder.wxml
View file @
5d2360d
<view class="main">
<view class="createData">
<view class="label">战败时间</view>
<calendar
id="calender"
class="calendar"
allowSameDay
shortcut
bindselect="rangeSelect"
rangeAll
dateType="single"
calenderColor="#347BFF"
vertical
minDate="2020-10-01"
maxDate="{{ dateObj.maxDate }}"
isComponents
>
<view class="calendarItem text-center dateNum">
{{dateObj.todayShow}}
<image class="solidArrow" src="/tabIndex/images/arrSolid.png" />
</view>
</calendar>
</view>
<view class="wrapper">
<view class="cell">
<gl-cell
border
valueAlign="right"
label="推荐人员"
requiredAfter
labelWidth="var(--fontSize140)"
required
haveArrow
bindclick="showPopup"
data-show-name="selesBox"
placeholder="点击选择"
>
<view class="between">
<view class="start text-hide {{ orderObj.employeeName?'':'placeholder-class' }}">{{orderObj.employeeName || '请选择'}}</view>
</view>
</gl-cell>
</view>
<view class="cell two-cell">
<gl-cell
border
valueAlign="right"
label="车主姓名"
titleBtn="客户档案"
bindtitleClick="showCustomPop"
data-index="{{ ind }}"
requiredAfter
labelWidth="var(--fontSize390)"
required
>
<input
placeholder="点击输入"
class="input"
placeholder-class="placeholder-class"
maxlength="16"
value="{{ customer.customerName }}"
bindinput="input"
data-index="{{ ind }}"
data-name="customer.customerName"
always-embed
></input>
</gl-cell>
<gl-cell border valueAlign="right" label="手机号" requiredAfter labelWidth="var(--fontSize140)" required>
<input
placeholder="点击输入"
class="input"
type="number"
maxlength="11"
placeholder-class="placeholder-class"
value="{{ customer.customerPhone }}"
bindinput="input"
data-index="{{ ind }}"
data-name="customer.customerPhone"
always-embed
></input>
</gl-cell>
<gl-cell
border
valueAlign="right"
label="客户来源"
requiredAfter
labelWidth="var(--fontSize140)"
required
haveArrow
bindclick="showPopup"
data-show-name="salesTypeShow"
placeholder="点击选择"
>
<view class="between">
<view class="start text-hide">{{customer.salesType?'售后':'售前'}}</view>
</view>
</gl-cell>
</view>
<view class="cell cell-textarea">
<view class="label">战败原因</view>
<view class="inner">
<textarea
class="cus-textarea"
bindinput="intReason"
value="{{ deafeatReason }}"
placeholder="请输入"
placeholder-class="textarea-placeholder"
maxlength="30"
></textarea>
<text class="maxCount">{{deafeatReason.length || 0}}/30</text>
</view>
<view class="select-content">
<block wx:for="{{ reasonList }}" wx:key="index">
<view bind:tap="toSelectReason" data-item="{{ item }}" data-index="{{ index }}" class="reason">{{item.name}}</view>
</block>
</view>
</view>
<view class="btn-group">
<view bind:tap="toSumbit" class="btn-class primary">立即提交</view>
<view bind:tap="toContinueSumbit" class="btn-class">提交后继续添加</view>
</view>
</view>
<view class="createData">
<view class="label">战败时间</view>
<calendar id="calender" class="calendar" allowSameDay shortcut bindselect="rangeSelect" rangeAll dateType="single" calenderColor="#347BFF" vertical minDate="2020-10-01" maxDate="{{ dateObj.maxDate }}" isComponents>
<view class="calendarItem text-center dateNum">
{{dateObj.todayShow}}
<image class="solidArrow" src="/tabIndex/images/arrSolid.png" />
</view>
</calendar>
</view>
<view class="wrapper">
<view class="cell">
<gl-cell border valueAlign="right" label="推荐人员" requiredAfter labelWidth="var(--fontSize140)" required haveArrow bindclick="showPopup" data-show-name="selesBox" placeholder="点击选择">
<view class="between">
<view class="start text-hide {{ orderObj.employeeName?'':'placeholder-class' }}">{{orderObj.employeeName || '请选择'}}</view>
</view>
</gl-cell>
</view>
<view class="cell two-cell">
<gl-cell border valueAlign="right" label="车主姓名" titleBtn="客户档案" bindtitleClick="showCustomPop" data-index="{{ ind }}" requiredAfter labelWidth="var(--fontSize390)" required>
<input placeholder="点击输入" class="input" placeholder-class="placeholder-class" maxlength="16" value="{{ customer.customerName }}" bindinput="input" data-index="{{ ind }}" data-name="customer.customerName" always-embed></input>
</gl-cell>
<gl-cell border valueAlign="right" label="手机号" requiredAfter labelWidth="var(--fontSize140)" required>
<input placeholder="点击输入" class="input" type="number" maxlength="11" placeholder-class="placeholder-class" value="{{ customer.customerPhone }}" bindinput="input" data-index="{{ ind }}" data-name="customer.customerPhone" always-embed></input>
</gl-cell>
<gl-cell border valueAlign="right" label="客户来源" requiredAfter labelWidth="var(--fontSize140)" required haveArrow bindclick="showPopup" data-show-name="salesTypeShow" placeholder="点击选择">
<view class="between">
<view class="start text-hide">{{customer.salesType?'售后':'售前'}}</view>
</view>
</gl-cell>
</view>
<view class="cell cell-textarea">
<view class="label">战败原因</view>
<view class="inner">
<textarea class="cus-textarea" bindinput="intReason" value="{{ deafeatReason }}" placeholder="请输入" placeholder-class="textarea-placeholder" maxlength="30"></textarea>
<text class="maxCount">{{deafeatReason.length || 0}}/30</text>
</view>
<view class="select-content">
<block wx:for="{{ reasonList }}" wx:key="index">
<view bind:tap="toSelectReason" data-item="{{ item }}" data-index="{{ index }}" class="reason">{{item.name}}</view>
</block>
</view>
</view>
<view class="btn-group">
<view bind:tap="toSumbit" class="btn-class primary">立即提交</view>
<view bind:tap="toContinueSumbit" class="btn-class">提交后继续添加</view>
</view>
</view>
</view>
<merchant-seles
show="{{ selesBox }}"
title="选择合作门店"
sub-title="选择销售顾问"
orderObj="{{ orderObj }}"
userInfo="{{ userInfo }}"
singleSeller="{{ true }}"
scene="0"
type="1"
/>
<merchant-seles show="{{ selesBox }}" title="选择合作门店" sub-title="选择销售顾问" orderObj="{{ orderObj }}" userInfo="{{ userInfo }}" singleSeller="{{ true }}" scene="0" type="1" />
<customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" />
<van-popup show="{{ salesTypeShow }}" position="bottom" bind:close="onCloseSaleType">
<van-picker
show-toolbar
columns="{{ saleTypesList }}"
value-key="name"
bind:cancel="onCloseSaleType"
bind:confirm="onChangeSaleType"
/>
<van-picker show-toolbar columns="{{ saleTypesList }}" value-key="name" bind:cancel="onCloseSaleType" bind:confirm="onChangeSaleType" />
</van-popup>
\ No newline at end of file
packageEquity/pages/createDeafeatOrderAi/createDeafeatOrderAi.wxml
View file @
5d2360d
...
...
@@ -94,7 +94,7 @@
</block>
</view>
</block>
<merchant-seles show="{{ selesBox }}" title="选择合作门店" sub-title="选择销售顾问" orderObj="{{ orderObj }}" userInfo="{{ userInfo }}" singleSeller="{{ true }}" type="1" />
<merchant-seles show="{{ selesBox }}" title="选择合作门店" sub-title="选择销售顾问" orderObj="{{ orderObj }}" userInfo="{{ userInfo }}" singleSeller="{{ true }}" type="1"
scene="0"
/>
<customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" />
<van-popup show="{{ salesTypeShow }}" position="bottom" bind:close="onCloseSaleType">
<van-picker show-toolbar columns="{{ saleTypesList }}" value-key="name" bind:cancel="onCloseSaleType" bind:confirm="onChangeSaleType" />
...
...
tabWorkOrder/pages/additionRecordOrder/additionRecordOrder.wxml
View file @
5d2360d
...
...
@@ -505,6 +505,7 @@
orderObj="{{orderObj}}"
userInfo="{{userInfo}}"
type="1"
scene="1"
oderType="recorder" />
<sub-shop-merchant
show="{{subShopMerchantBox}}"
...
...
@@ -530,6 +531,7 @@
title="选择园区店"
sub-title="选择转化人员"
userInfo="{{userInfo}}"
scene="1"
type="2" />
<coupon
id="coupon"
...
...
tabWorkOrder/pages/createArchives/createArchives.wxml
View file @
5d2360d
...
...
@@ -270,8 +270,9 @@
sub-title="选择销售顾问"
orderObj="{{orderObj}}"
userInfo="{{userInfo}}"
scene="1"
type="1" />
<merchant-seles show="{{ salesmanBox }}" isDefault="{{ isDefault }}" title="选择园区店" sub-title="选择转化人员" userInfo="{{ userInfo }}" type="2" />
<merchant-seles show="{{ salesmanBox }}" isDefault="{{ isDefault }}" title="选择园区店" sub-title="选择转化人员" userInfo="{{ userInfo }}" type="2"
scene="1"
/>
<car-brands
show="{{ carBrandBox }}"
bindconfirm="chooseCar"
...
...
tabWorkOrder/pages/createOrder/createOrder.wxml
View file @
5d2360d
...
...
@@ -356,8 +356,8 @@
<tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
</view>
<recording-order-popup wx:if="{{showOrderpop && !(isErrorOrder)}}" outTradeNo="{{outTradeNo}}" show="{{showOrderpop}}" bind:success="navigator" title="请选择交易参考号" />
<merchant-seles show="{{ salesmanBox }}" isDefault="{{ isDefault }}" title="选择园区店" sub-title="选择转化人员" userInfo="{{ userInfo }}" type="2" />
<merchant-seles show="{{ selesBox }}" title="选择合作门店" orderObj="{{ orderObj }}" sub-title="选择销售顾问" userInfo="{{ userInfo }}" singleSeller="{{ true }}" type="1" />
<merchant-seles show="{{ salesmanBox }}" isDefault="{{ isDefault }}" title="选择园区店" sub-title="选择转化人员" userInfo="{{ userInfo }}" type="2"
scene="1"
/>
<merchant-seles show="{{ selesBox }}" title="选择合作门店" orderObj="{{ orderObj }}" sub-title="选择销售顾问" userInfo="{{ userInfo }}" singleSeller="{{ true }}" type="1"
scene="1"
/>
<sub-shop-merchant show="{{ subShopMerchantBox }}" title="选择二级流量方" selectedSelesMerchantId="{{ orderObj.merchantId }}" selectedCustomerInfo="{{ orderObj.customer.customerId }}" selectedSubShopMerchantId="{{ orderObj.subShopMerchantId }}" />
<car-brands show="{{ carBrandBox }}" bindconfirm="chooseCar" carSeriesId="{{ orderObj.customer.carSeriesId || '' }}" merchantId="{{ orderObj.merchantId || undefined }}" />
<remark-popup wx:if="{{ showRemark }}" show="{{ showRemark }}" bindconfirm="remarkConfirm" placeholder="请填写内容,最多30个字" maxlength="30" value="{{ orderObj.remark }}" />
...
...
tabWorkOrder/pages/defeatOrder/defeatOrder.wxml
View file @
5d2360d
This diff is collapsed.
Click to expand it.
tabWorkOrder/pages/premiumUpgrade/premiumUpgrade.wxml
View file @
5d2360d
This diff is collapsed.
Click to expand it.
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