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 348fa9e9
authored
Dec 27, 2024
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug修复
1 parent
899cef83
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
98 additions
and
37 deletions
api/api.js
components/Merchant-Seles/Merchant-Seles.js
components/Merchant-Seles/Merchant-Seles.wxml
components/Merchant-Seles/Merchant-Seles.wxss
config.js
store/index.js
tabWorkOrder/pages/createOrder/createOrder.js
tabWorkOrder/pages/defeatOrder/defeatOrder.js
api/api.js
View file @
348fa9e
...
@@ -75,6 +75,11 @@ module.exports = {
...
@@ -75,6 +75,11 @@ module.exports = {
// data.sceneList = [1]
// data.sceneList = [1]
return
api
.
post
(
"dj.api.smartcarlife.employee.getByMerchantId"
,
data
);
return
api
.
post
(
"dj.api.smartcarlife.employee.getByMerchantId"
,
data
);
},
},
getEmployeeList
(
data
)
{
// 0->2.0 1->1.1 2->1.2 3->1.3 场景对应
// data.sceneList = [1]
return
api
.
post
(
"dj.api.smartcarlife.employee.onTheJob.getByMerchantId"
,
data
);
},
/** 根据园区店商户号获取绑定4S店列表 */
/** 根据园区店商户号获取绑定4S店列表 */
getServiceMerchantList
(
data
)
{
getServiceMerchantList
(
data
)
{
return
api
.
post
(
"dj.api.smartcarlife.serviceMerchant.list"
,
data
);
return
api
.
post
(
"dj.api.smartcarlife.serviceMerchant.list"
,
data
);
...
...
components/Merchant-Seles/Merchant-Seles.js
View file @
348fa9e
...
@@ -9,7 +9,17 @@ Component({
...
@@ -9,7 +9,17 @@ Component({
* 组件的属性列表
* 组件的属性列表
*/
*/
properties
:
{
properties
:
{
show
:
Boolean
,
show
:
{
type
:
Boolean
,
observer
:
function
(
n
)
{
// console.log('userInfo', n)
// 先请求导流方接口
if
(
n
)
this
.
setData
({
keyWord
:
''
});
this
.
getMerchantList
()
},
},
title
:
String
,
title
:
String
,
subTitle
:
String
,
subTitle
:
String
,
userInfo
:
{
userInfo
:
{
...
@@ -220,10 +230,10 @@ Component({
...
@@ -220,10 +230,10 @@ Component({
let
thisPage
=
wx
.
$router
.
getPageInstance
();
let
thisPage
=
wx
.
$router
.
getPageInstance
();
let
{
orderObj
}
=
thisPage
.
data
;
let
{
orderObj
}
=
thisPage
.
data
;
api
api
.
get
Conversion
EmployeeList
({
.
getEmployeeList
({
merchantId
,
merchantId
,
sceneList
:
type
==
1
?
[
scene
]
:
""
,
sceneList
:
type
==
1
?
[
scene
]
:
""
,
filterStaffN
ame
:
keyWord
n
ame
:
keyWord
})
})
.
then
(
async
(
res
)
=>
{
.
then
(
async
(
res
)
=>
{
wx
.
$util
.
hideLoading
();
wx
.
$util
.
hideLoading
();
...
...
components/Merchant-Seles/Merchant-Seles.wxml
View file @
348fa9e
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
{{item.staffName}}
{{item.staffName}}
</view>
</view>
</block>
</block>
<view class="center " wx:if="{{type == 1&&keyWord&&selesList.length == 0 }}">暂无数据</view>
</view>
</view>
</view>
</view>
</scroll-view>
</scroll-view>
...
...
components/Merchant-Seles/Merchant-Seles.wxss
View file @
348fa9e
...
@@ -11,6 +11,11 @@
...
@@ -11,6 +11,11 @@
justify-content: center;
justify-content: center;
}
}
.seles-list .center {
width: 100%;
text-align: center;
}
.seles-box {
.seles-box {
height: 100%;
height: 100%;
width: calc(100% + var(--fontSize64));
width: calc(100% + var(--fontSize64));
...
...
config.js
View file @
348fa9e
...
@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
...
@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布
* 4预发布
* 5cdptest
* 5cdptest
*/
*/
let
index
=
0
;
let
index
=
1
;
const
accountInfo
=
wx
.
getAccountInfoSync
();
const
accountInfo
=
wx
.
getAccountInfoSync
();
const
systemInfo
=
wx
.
getSystemInfoSync
();
const
systemInfo
=
wx
.
getSystemInfoSync
();
const
envName
=
accountInfo
.
miniProgram
.
envVersion
;
const
envName
=
accountInfo
.
miniProgram
.
envVersion
;
...
...
store/index.js
View file @
348fa9e
...
@@ -372,17 +372,17 @@ export const getPositionList = options => {
...
@@ -372,17 +372,17 @@ export const getPositionList = options => {
api
.
getPositionList
({}).
then
(
res
=>
{
api
.
getPositionList
({}).
then
(
res
=>
{
let
{
code
,
data
}
=
res
let
{
code
,
data
}
=
res
if
(
code
==
0
)
{
if
(
code
==
0
)
{
const
namReplaceobj
=
{
//
const namReplaceobj = {
2
:
'前侧窗玻璃'
,
//
2: '前侧窗玻璃',
3
:
'后侧窗玻璃'
,
//
3: '后侧窗玻璃',
4
:
'后挡'
//
4: '后挡'
}
//
}
data
=
data
.
map
(
item
=>
{
//
data = data.map(item => {
if
(
namReplaceobj
[
item
.
positionValue
])
{
//
if (namReplaceobj[item.positionValue]) {
item
.
positionName
=
namReplaceobj
[
item
.
positionValue
]
//
item.positionName = namReplaceobj[item.positionValue]
}
//
}
return
item
;
//
return item;
})
//
})
app
.
globalData
.
positionTypeList
=
data
app
.
globalData
.
positionTypeList
=
data
}
}
resolve
(
app
.
globalData
.
positionTypeList
)
resolve
(
app
.
globalData
.
positionTypeList
)
...
...
tabWorkOrder/pages/createOrder/createOrder.js
View file @
348fa9e
...
@@ -458,6 +458,7 @@ Page({
...
@@ -458,6 +458,7 @@ Page({
setGoodsTotal
(
goodsList
)
{
setGoodsTotal
(
goodsList
)
{
let
total
=
0
;
let
total
=
0
;
goodsList
.
forEach
((
i
)
=>
{
goodsList
.
forEach
((
i
)
=>
{
console
.
log
(
i
.
shopMinPrice
>
i
.
price
,
' i.shopMinPrice > i.price'
);
if
(
i
.
validMinSellPrice
==
'Y'
&&
i
.
shopMinPrice
>
i
.
price
)
{
if
(
i
.
validMinSellPrice
==
'Y'
&&
i
.
shopMinPrice
>
i
.
price
)
{
i
.
errorTarget
=
true
i
.
errorTarget
=
true
}
}
...
...
tabWorkOrder/pages/defeatOrder/defeatOrder.js
View file @
348fa9e
...
@@ -332,7 +332,7 @@ Page({
...
@@ -332,7 +332,7 @@ Page({
},
},
showPopup
(
e
)
{
showPopup
(
e
)
{
let
{
copyGoodsData
,
baseConfigData
}
=
this
.
data
let
{
copyGoodsData
,
baseConfigData
}
=
this
.
data
let
{
showName
,
index
,
type
}
=
e
.
currentTarget
.
dataset
let
{
showName
,
index
,
type
,
positionnnum
:
positionNum
}
=
e
.
currentTarget
.
dataset
let
arr
=
[]
let
arr
=
[]
if
(
showName
==
'goodsBox'
)
{
if
(
showName
==
'goodsBox'
)
{
// type 产品类型 1前挡 2侧后挡 3天窗 根据类型过滤显示商品弹窗数据
// type 产品类型 1前挡 2侧后挡 3天窗 根据类型过滤显示商品弹窗数据
...
@@ -347,41 +347,78 @@ Page({
...
@@ -347,41 +347,78 @@ Page({
upgradeGoodsList
:
[]
upgradeGoodsList
:
[]
})
})
for
(
var
i
=
0
;
i
<
arr
?.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
arr
?.
length
;
i
++
)
{
let
arr2
=
[]
let
arr2
=
[]
;
val
?.
upgradeGoodsList
?.
forEach
((
subVal
,
subInd
)
=>
{
val
?.
upgradeGoodsList
?.
forEach
((
subVal
,
subInd
)
=>
{
if
(
type
==
1
&&
[
1
].
includes
(
subVal
.
merchantGoodsPosition
))
{
if
(
type
==
1
&&
[
1
].
includes
(
subVal
.
merchantGoodsPosition
))
{
arr2
.
push
(
subVal
)
arr2
.
push
(
subVal
)
;
if
(
if
(
subVal
?.
goodsInfo
?.
goodsType
==
arr
[
i
]?.
goodsType
||
subVal
?.
goodsInfo
?.
goodsType
==
arr
[
i
]?.
goodsType
||
subVal
?.
upgradeGoodsType
==
arr
[
i
]?.
goodsType
subVal
?.
upgradeGoodsType
==
arr
[
i
]?.
goodsType
)
)
arr
[
i
].
upgradeGoodsList
=
arr2
arr
[
i
].
upgradeGoodsList
=
arr2
;
}
}
console
.
log
([
positionNum
],
[
positionNum
].
includes
(
subVal
.
merchantGoodsPosition
));
if
(
if
(
type
==
2
&&
type
==
2
&&
[
2
,
3
,
4
].
includes
(
subVal
.
merchantGoodsPosition
)
[
Number
(
positionNum
)
].
includes
(
subVal
.
merchantGoodsPosition
)
)
{
)
{
arr2
.
push
(
subVal
)
arr2
.
push
(
subVal
)
;
if
(
if
(
subVal
?.
goodsInfo
?.
goodsType
==
arr
[
i
]?.
goodsType
||
subVal
?.
goodsInfo
?.
goodsType
==
arr
[
i
]?.
goodsType
||
subVal
?.
upgradeGoodsType
==
arr
[
i
]?.
goodsType
subVal
?.
upgradeGoodsType
==
arr
[
i
]?.
goodsType
)
)
arr
[
i
].
upgradeGoodsList
=
arr2
arr
[
i
].
upgradeGoodsList
=
arr2
;
}
}
if
(
if
(
type
==
3
&&
type
==
3
&&
[
5
,
6
,
7
].
includes
(
subVal
.
merchantGoodsPosition
)
[
5
,
6
,
7
].
includes
(
subVal
.
merchantGoodsPosition
)
)
{
)
{
arr2
.
push
(
subVal
)
arr2
.
push
(
subVal
)
;
if
(
if
(
subVal
?.
goodsInfo
?.
goodsType
==
arr
[
i
]?.
goodsType
||
subVal
?.
goodsInfo
?.
goodsType
==
arr
[
i
]?.
goodsType
||
subVal
?.
upgradeGoodsType
==
arr
[
i
]?.
goodsType
subVal
?.
upgradeGoodsType
==
arr
[
i
]?.
goodsType
)
)
arr
[
i
].
upgradeGoodsList
=
arr2
arr
[
i
].
upgradeGoodsList
=
arr2
;
}
}
})
})
;
if
(
!
arr
[
i
]?.
upgradeGoodsList
?.
length
)
arr
.
splice
(
i
,
1
)
if
(
!
arr
[
i
]?.
upgradeGoodsList
?.
length
)
arr
.
splice
(
i
,
1
)
;
}
}
// for (var i = 0; i < arr?.length; i++) {
// let arr2 = []
// val?.upgradeGoodsList?.forEach((subVal, subInd) => {
// if (type == 1 && [1].includes(subVal.merchantGoodsPosition)) {
// arr2.push(subVal)
// if (
// subVal?.goodsInfo?.goodsType == arr[i]?.goodsType ||
// subVal?.upgradeGoodsType == arr[i]?.goodsType
// )
// arr[i].upgradeGoodsList = arr2
// }
// if (
// type == 2 &&
// [2, 3, 4].includes(subVal.merchantGoodsPosition)
// ) {
// arr2.push(subVal)
// if (
// subVal?.goodsInfo?.goodsType == arr[i]?.goodsType ||
// subVal?.upgradeGoodsType == arr[i]?.goodsType
// )
// arr[i].upgradeGoodsList = arr2
// }
// if (
// type == 3 &&
// [5, 6, 7].includes(subVal.merchantGoodsPosition)
// ) {
// arr2.push(subVal)
// if (
// subVal?.goodsInfo?.goodsType == arr[i]?.goodsType ||
// subVal?.upgradeGoodsType == arr[i]?.goodsType
// )
// arr[i].upgradeGoodsList = arr2
// }
// })
// if (!arr[i]?.upgradeGoodsList?.length) arr.splice(i, 1)
// }
}
}
})
})
}
}
...
@@ -882,7 +919,9 @@ Page({
...
@@ -882,7 +919,9 @@ Page({
console
.
log
(
orderObj
)
console
.
log
(
orderObj
)
// 去除优惠券 参数
// 去除优惠券 参数
// delete orderObj.couponName;
delete
orderObj
.
customerCouponId
;
delete
orderObj
.
couponName
;
// 使用优惠券的merchantId 避免优惠券和店区不一致的情况
// 使用优惠券的merchantId 避免优惠券和店区不一致的情况
if
(
!
orderObj
.
merchantId
)
if
(
!
orderObj
.
merchantId
)
orderObj
.
merchantId
=
orderObj
.
merchantCoupon
.
merchantId
orderObj
.
merchantId
=
orderObj
.
merchantCoupon
.
merchantId
...
@@ -893,16 +932,16 @@ Page({
...
@@ -893,16 +932,16 @@ Page({
orderObj
.
selectPayType
=
scene
?
3
:
2
orderObj
.
selectPayType
=
scene
?
3
:
2
// 是再次下单的 就删除优惠券字段 不是就赋值
// 是再次下单的 就删除优惠券字段 不是就赋值
// || orderObj.associatedOrderCode
// || orderObj.associatedOrderCode
if
(
orderObj
.
customerCoupon
&&
orderObj
.
constructionFlag
!=
'Y'
)
{
//
if (orderObj.customerCoupon && orderObj.constructionFlag != 'Y') {
orderObj
.
couponName
=
orderObj
.
customerCoupon
.
couponName
//
orderObj.couponName = orderObj.customerCoupon.couponName
orderObj
.
customerCouponCode
=
//
orderObj.customerCouponCode =
orderObj
.
customerCoupon
.
customerCouponCode
?.
split
(
'-'
)[
0
]
//
orderObj.customerCoupon.customerCouponCode?.split('-')[0]
if
(
orderObj
.
couponId
)
{
//
if (orderObj.couponId) {
orderObj
.
customerCouponId
=
orderObj
.
id
//
orderObj.customerCouponId = orderObj.id
}
//
}
}
else
{
//
} else {
delete
orderObj
.
merchantCouponId
//
delete orderObj.merchantCouponId
}
//
}
if
(
scene
)
{
if
(
scene
)
{
orderObj
.
customerCouponId
=
orderObj
.
id
orderObj
.
customerCouponId
=
orderObj
.
id
orderObj
.
orderSource
=
5
orderObj
.
orderSource
=
5
...
...
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