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 3dcb1d3b
authored
Aug 19, 2024
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加注释
1 parent
5d2360d1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
22 deletions
components/Merchant-Seles/Merchant-Seles.js
components/Merchant-Seles/Merchant-Seles.js
View file @
3dcb1d3
...
@@ -30,6 +30,7 @@ Component({
...
@@ -30,6 +30,7 @@ Component({
},
},
oderType
:
String
,
oderType
:
String
,
scene
:
{
scene
:
{
// 0会员 1精品 2次新车 3众筹 4积分商城
type
:
Number
,
type
:
Number
,
},
},
},
},
...
@@ -185,7 +186,6 @@ Component({
...
@@ -185,7 +186,6 @@ Component({
this
.
getConversionEmployeeList
(
merchantId
);
this
.
getConversionEmployeeList
(
merchantId
);
}
}
);
);
}
}
});
});
},
},
...
@@ -197,7 +197,7 @@ Component({
...
@@ -197,7 +197,7 @@ Component({
isFirst
,
isFirst
,
orderObj
:
comOrderObj
,
orderObj
:
comOrderObj
,
orderSellerInfo
,
orderSellerInfo
,
scene
scene
,
}
=
this
.
data
;
}
=
this
.
data
;
let
thisPage
=
wx
.
$router
.
getPageInstance
();
let
thisPage
=
wx
.
$router
.
getPageInstance
();
...
@@ -238,7 +238,10 @@ Component({
...
@@ -238,7 +238,10 @@ Component({
// });
// });
// }
// }
// 增加销售顾问默认勾选逻辑是第一次
// 增加销售顾问默认勾选逻辑是第一次
console
.
log
(
thisPage
.
data
.
orderCreateType
,
'thisPage.data.orderCreateType'
);
console
.
log
(
thisPage
.
data
.
orderCreateType
,
"thisPage.data.orderCreateType"
);
if
(
type
==
1
&&
isFirst
)
{
if
(
type
==
1
&&
isFirst
)
{
// debugger
// debugger
// console.log(merchantId)
// console.log(merchantId)
...
@@ -262,7 +265,10 @@ Component({
...
@@ -262,7 +265,10 @@ Component({
uuid
=
e
.
uuid
;
uuid
=
e
.
uuid
;
// 没有就自动回显到页面
// 没有就自动回显到页面
// debugger
// debugger
if
(
!
orderObj
.
userId
&&
thisPage
.
data
.
orderCreateType
!=
"additionRecordOrder"
)
{
if
(
!
orderObj
.
userId
&&
thisPage
.
data
.
orderCreateType
!=
"additionRecordOrder"
)
{
thisPage
.
setData
(
thisPage
.
setData
(
{
{
[
"orderObj.employeeName"
]:
staffName
,
[
"orderObj.employeeName"
]:
staffName
,
...
@@ -275,21 +281,22 @@ Component({
...
@@ -275,21 +281,22 @@ Component({
this
.
confirm
();
this
.
confirm
();
}
}
);
);
}
}
else
if
(
else
if
(
thisPage
.
data
.
orderCreateType
==
"additionRecordOrder"
)
{
thisPage
.
data
.
orderCreateType
==
"additionRecordOrder"
)
{
// debugger
// debugger
thisPage
.
setData
(
thisPage
.
setData
(
{
{
[
"orderObj.employeeName"
]:
''
,
[
"orderObj.employeeName"
]:
""
,
[
"orderObj.userId"
]:
''
,
[
"orderObj.userId"
]:
""
,
[
"orderObj.merchantId"
]:
comOrderObj
.
merchantId
,
[
"orderObj.merchantId"
]:
comOrderObj
.
merchantId
,
[
"orderObj.merchantName"
]:
comOrderObj
.
merchantName
,
[
"orderObj.merchantName"
]:
comOrderObj
.
merchantName
,
}
,
}
// () => {
// () => {
// this.confirm();
// this.confirm();
// }
// }
);
);
console
.
log
(
this
.
data
.
selesList
,
'this.data.selesList'
);
console
.
log
(
this
.
data
.
selesList
,
"this.data.selesList"
);
}
}
}
}
});
});
...
@@ -315,7 +322,12 @@ Component({
...
@@ -315,7 +322,12 @@ Component({
// 订单补录页面新增一个逻辑 只有一个导流方并且没有勾选过的话自动帮他选中第一个
// 订单补录页面新增一个逻辑 只有一个导流方并且没有勾选过的话自动帮他选中第一个
// 没有一个员工就自动帮他追加一个默认的
// 没有一个员工就自动帮他追加一个默认的
// 还要订单不是回显的
// 还要订单不是回显的
console
.
log
(
type
==
1
&&
merchantList
.
length
==
1
&&
!
orderObj
.
merchantId
&&
!
orderObj
.
merchantName
)
console
.
log
(
type
==
1
&&
merchantList
.
length
==
1
&&
!
orderObj
.
merchantId
&&
!
orderObj
.
merchantName
);
if
(
if
(
type
==
1
&&
type
==
1
&&
merchantList
.
length
==
1
&&
merchantList
.
length
==
1
&&
...
@@ -383,8 +395,8 @@ Component({
...
@@ -383,8 +395,8 @@ Component({
this
.
getConversionEmployeeList
(
item
.
merchantId
,
true
);
this
.
getConversionEmployeeList
(
item
.
merchantId
,
true
);
},
},
async
confirm
(
e
)
{
async
confirm
(
e
)
{
let
form
=
e
?.
currentTarget
?.
dataset
?.
form
let
form
=
e
?.
currentTarget
?.
dataset
?.
form
;
console
.
log
(
e
,
form
,
'form'
);
console
.
log
(
e
,
form
,
"form"
);
let
data
=
this
.
data
.
orderObj
;
let
data
=
this
.
data
.
orderObj
;
let
{
type
,
oderType
,
selesList
,
merchantList
}
=
this
.
data
;
let
{
type
,
oderType
,
selesList
,
merchantList
}
=
this
.
data
;
let
thisPage
=
wx
.
$router
.
getPageInstance
();
let
thisPage
=
wx
.
$router
.
getPageInstance
();
...
@@ -394,24 +406,23 @@ Component({
...
@@ -394,24 +406,23 @@ Component({
...
orderObj
,
...
orderObj
,
...
data
,
...
data
,
};
};
console
.
log
(
orderObj
,
data
)
console
.
log
(
orderObj
,
data
)
;
if
(
type
==
1
)
{
if
(
type
==
1
)
{
// console.log(data.userId)
// console.log(data.userId)
// 过滤选中的商户和员工
// 过滤选中的商户和员工
// let merchantListObj = merchantList.
// let merchantListObj = merchantList.
let
filter
=
selesList
.
find
((
item
)
=>
item
.
active
)
let
filter
=
selesList
.
find
((
item
)
=>
item
.
active
)
;
let
filterMerchant
=
merchantList
.
find
((
item
)
=>
item
.
active
)
let
filterMerchant
=
merchantList
.
find
((
item
)
=>
item
.
active
)
;
console
.
log
(
filter
,
'filter'
);
console
.
log
(
filter
,
"filter"
);
if
(
!
filter
)
{
if
(
!
filter
)
{
wx
.
$util
.
showToast
(
"请选择销售顾问"
);
wx
.
$util
.
showToast
(
"请选择销售顾问"
);
return
;
return
;
}
}
if
(
form
)
{
if
(
form
)
{
orderObj
.
employeeName
=
filter
.
staffName
;
orderObj
.
employeeName
=
filter
.
staffName
orderObj
.
userId
=
filter
.
uuid
;
orderObj
.
userId
=
filter
.
uuid
orderObj
.
merchantId
=
filterMerchant
.
merchantId
;
orderObj
.
merchantId
=
filterMerchant
.
merchantId
orderObj
.
merchantName
=
filterMerchant
.
merchantName
;
orderObj
.
merchantName
=
filterMerchant
.
merchantName
}
}
// 判断销售顾问对应的门店是否符合规则
// 判断销售顾问对应的门店是否符合规则
// let result;
// let result;
...
...
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