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 74cb15ec
authored
Aug 12, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v4.10.0功能开发
1 parent
a1d8fcae
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
145 additions
and
26 deletions
components/Merchant-Seles/Merchant-Seles.js
project.private.config.json
tabWorkOrder/api.js
tabWorkOrder/images/drawingIcon.png
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.js
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.wxml
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.wxss
tabWorkOrder/pages/createArchives/createArchives.js
tabWorkOrder/pages/createOrder/createOrder.js
tabWorkOrder/pages/createOrder/createOrder.wxml
tabWorkOrder/pages/createOrder/createOrder.wxss
components/Merchant-Seles/Merchant-Seles.js
View file @
74cb15e
...
@@ -283,7 +283,7 @@ Component({
...
@@ -283,7 +283,7 @@ Component({
// 保存销售勾选做回显
// 保存销售勾选做回显
util
.
setSellerInfo
(
this
.
data
.
orderObj
)
util
.
setSellerInfo
(
this
.
data
.
orderObj
)
thisPage
.
getOrderBaseGoodsList
(
orderObj
.
merchantId
)
thisPage
.
getOrderBaseGoodsList
&&
thisPage
.
getOrderBaseGoodsList
(
orderObj
.
merchantId
)
delete
orderObj
.
couponName
delete
orderObj
.
couponName
delete
orderObj
.
merchantCouponId
delete
orderObj
.
merchantCouponId
delete
orderObj
.
customerCouponId
delete
orderObj
.
customerCouponId
...
...
project.private.config.json
View file @
74cb15e
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
{
{
"name"
:
"订单完成施工"
,
"name"
:
"订单完成施工"
,
"pathName"
:
"tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail"
,
"pathName"
:
"tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail"
,
"query"
:
"orderCode=220705
1649233012
"
,
"query"
:
"orderCode=220705
2048142703
"
,
"scene"
:
null
,
"scene"
:
null
,
"launchMode"
:
"default"
"launchMode"
:
"default"
},
},
...
...
tabWorkOrder/api.js
View file @
74cb15e
...
@@ -88,5 +88,10 @@ module.exports = {
...
@@ -88,5 +88,10 @@ module.exports = {
/** 订单修正 */
/** 订单修正 */
correctionOrder
(
data
)
{
correctionOrder
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.correctionOrder'
,
data
)
return
api
.
post
(
'dj.api.smartcarlife.order.correctionOrder'
,
data
)
},
/** 订单修正 */
notUpgradeOrder
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.order.notUpgrade.batchInsert'
,
data
)
}
}
}
}
tabWorkOrder/images/drawingIcon.png
0 → 100644
View file @
74cb15e
494 Bytes
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.js
View file @
74cb15e
...
@@ -15,12 +15,42 @@ Page({
...
@@ -15,12 +15,42 @@ Page({
customerService
:
''
,
customerService
:
''
,
defaultCustomerService
:
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/kf.png'
,
defaultCustomerService
:
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/kf.png'
,
// defaultCustomerService: 'https://img01.glsx.com.cn/group1/M00/21/01/wKgFHWKEkeSAZRltAAED5CfS91o118.png',
// defaultCustomerService: 'https://img01.glsx.com.cn/group1/M00/21/01/wKgFHWKEkeSAZRltAAED5CfS91o118.png',
failCustomerService
:
'../images/kfrefresh.png'
failCustomerService
:
'../images/kfrefresh.png'
,
showTip
:
false
},
},
// 跳转正确订单
// 跳转正确订单
redirectOrder
()
{
redirectOrder
()
{
let
{
orderInfo
}
=
this
.
data
let
{
orderInfo
}
=
this
.
data
wx
.
$router
.
redirectTo
(
'constructionOrderDetail'
,
{
orderCode
:
orderInfo
.
associatedOrderCode
})
let
_this
=
this
wx
.
$util
.
showLoading
(
'加载中...'
)
api
.
getOrderDetail
({
orderCode
:
orderInfo
.
associatedOrderCode
})
.
then
(
result
=>
{
// 根据不同状态和施工标志做对应跳转
let
{
code
,
data
:
item
}
=
result
if
(
code
==
0
)
{
item
.
oldOrderCode
=
orderInfo
.
associatedOrderCode
let
name
=
item
.
status
==
3
?
'confirmOrder'
:
item
.
status
==
1
?
'createOrder'
:
'orderDetail'
if
(
item
.
constructionFlag
==
'Y'
&&
item
.
status
!=
10
)
{
wx
.
$router
.
go
(
'constructionOrderDetail'
,
item
)
}
else
{
// console.log(item)
wx
.
$router
.
go
(
name
,
item
)
}
}
})
.
catch
(
err
=>
{
console
.
log
(
err
)
})
// wx.$router.redirectTo('constructionOrderDetail', { orderCode: orderInfo.associatedOrderCode })
},
targetOperate
()
{
let
{
showTip
}
=
this
.
data
this
.
setData
({
showTip
:
!
showTip
})
},
},
// 确定是否要显示
// 确定是否要显示
targetError
()
{
targetError
()
{
...
@@ -32,7 +62,7 @@ Page({
...
@@ -32,7 +62,7 @@ Page({
// 跳转新增订单页面 并带特定参数
// 跳转新增订单页面 并带特定参数
let
{
orderInfo
}
=
this
.
data
let
{
orderInfo
}
=
this
.
data
// orderInfo.orderSource = type
// orderInfo.orderSource = type
orderInfo
.
associate
dOrderCode
=
orderInfo
.
orderCode
orderInfo
.
ol
dOrderCode
=
orderInfo
.
orderCode
delete
orderInfo
.
orderCode
delete
orderInfo
.
orderCode
orderInfo
.
selectPayType
=
2
orderInfo
.
selectPayType
=
2
wx
.
$router
.
redirectTo
(
'createOrder'
,
orderInfo
)
wx
.
$router
.
redirectTo
(
'createOrder'
,
orderInfo
)
...
...
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.wxml
View file @
74cb15e
...
@@ -58,7 +58,14 @@
...
@@ -58,7 +58,14 @@
<view class="box">
<view class="box">
<view class="title infoTitle">
<view class="title infoTitle">
<text>工单信息</text>
<text>工单信息</text>
<text bindtap="targetError" class="operate" wx:if="{{orderInfo.canOperate}}">操作</text>
<view class="operate" wx:if="{{orderInfo.canOperate&&(isYqdSuper||isStaff)}}">
<text bindtap="targetOperate">操作</text>
<view class="tip {{showTip?'':'none'}}" bindtap="targetError">
<view class="tip-trangle-top" />
<image src="../../images/drawingIcon.png" class="drawIcon" />
工单有误?
</view>
</view>
</view>
</view>
<block wx:for="{{orderObj}}" wx:key="index">
<block wx:for="{{orderObj}}" wx:key="index">
<view class="cell">
<view class="cell">
...
...
tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.wxss
View file @
74cb15e
...
@@ -75,10 +75,59 @@ page {
...
@@ -75,10 +75,59 @@ page {
}
}
.box .operate {
.box .operate {
position: relative;
font-size: 28rpx;
font-size: 28rpx;
color: #3582EE;
color: #3582EE;
}
}
.operate .tip.none {
display: none;
}
/*提示框容器*/
.tip {
display: none;
box-sizing: border-box;
/* position: relative; */
position: absolute;
/* margin-left: 20px;
margin-top: 20px; */
left: -100rpx;
top: 50rpx;
display: flex;
align-items: center;
width: 196rpx;
font-size: 28rpx;
/* background: #fff; */
background: rgba(0, 0, 0, 0.8000);
color: #fff;
padding: 20rpx 15rpx;
/* padding-right: 10rpx; */
/*设置圆角*/
-webkit-border-radius: 10rpx;
-moz-border-radius: 10rpx;
border-radius: 10rpx;
}
.drawIcon {
width: 32rpx;
height: 32rpx;
/* margin-right: 5rpx; */
}
/*提示框-上三角*/
.tip-trangle-top {
position: absolute;
top: -10px;
left: 55px;
width: 0;
height: 0;
border-left: 20rpx solid transparent;
border-right: 20rpx solid transparent;
border-bottom: 20rpx solid rgba(0, 0, 0, 0.8000);
}
.box .infoTitle {
.box .infoTitle {
display: flex;
display: flex;
justify-content: space-between;
justify-content: space-between;
...
...
tabWorkOrder/pages/createArchives/createArchives.js
View file @
74cb15e
...
@@ -33,14 +33,14 @@ Page({
...
@@ -33,14 +33,14 @@ Page({
standNo
:
''
,
standNo
:
''
,
customerSex
:
1
,
customerSex
:
1
,
confirmIndex
:
false
confirmIndex
:
false
},
{
customerName
:
''
,
customerPhone
:
''
,
standNo
:
''
,
customerSex
:
1
,
confirmIndex
:
false
}
}
// {
// customerName: '',
// customerPhone: '',
// standNo: '',
// customerSex: 1,
// confirmIndex: false
// }
],
],
dateObj
:
{
dateObj
:
{
beforeDay
:
''
,
beforeDay
:
''
,
...
@@ -290,10 +290,10 @@ Page({
...
@@ -290,10 +290,10 @@ Page({
// const element = array[index];
// const element = array[index];
// let
// let
if
(
!
notUpgradeOrderList
[
index
].
customerName
)
{
if
(
!
notUpgradeOrderList
[
index
].
customerName
)
{
return
this
.
showToast
(
`请输入第
${
index
}
位客户姓名`
)
return
this
.
showToast
(
`请输入第
${
index
+
1
}
位客户姓名`
)
}
}
if
(
!
phoneRex
.
test
(
item
.
customerPhone
))
{
if
(
!
phoneRex
.
test
(
notUpgradeOrderList
[
index
]
.
customerPhone
))
{
this
.
showToast
(
`请输入第
${
index
}
位客户正确的手机号`
)
this
.
showToast
(
`请输入第
${
index
+
1
}
位客户正确的手机号`
)
return
return
}
}
}
}
...
@@ -304,7 +304,9 @@ Page({
...
@@ -304,7 +304,9 @@ Page({
}
}
this
.
showLoading
(
'提交中...'
)
this
.
showLoading
(
'提交中...'
)
api
.
supplementOrder
(
orderObj
).
then
(
res
=>
{
console
.
log
(
'orderObj'
,
orderObj
)
// return
api
.
notUpgradeOrder
(
orderObj
).
then
(
res
=>
{
wx
.
hideLoading
()
wx
.
hideLoading
()
// console.log(orderObj, res)
// console.log(orderObj, res)
let
{
code
,
data
,
message
}
=
res
let
{
code
,
data
,
message
}
=
res
...
@@ -314,6 +316,7 @@ Page({
...
@@ -314,6 +316,7 @@ Page({
title
:
'提交成功'
title
:
'提交成功'
})
})
wx
.
$router
.
back
()
wx
.
$router
.
back
()
// if (save) {
// if (save) {
// wx.showModal({
// wx.showModal({
// title: '温馨提示',
// title: '温馨提示',
...
...
tabWorkOrder/pages/createOrder/createOrder.js
View file @
74cb15e
...
@@ -252,6 +252,9 @@ Page({
...
@@ -252,6 +252,9 @@ Page({
this
.
setGoodsTotal
(
goodsList
)
this
.
setGoodsTotal
(
goodsList
)
},
},
setCorrectionOrder
(
orderObj
)
{
setCorrectionOrder
(
orderObj
)
{
// console.log('orderObj', orderObj)
// return
// delete orderObj.associatedOrderCode
api
.
correctionOrder
(
orderObj
).
then
(
res
=>
{
api
.
correctionOrder
(
orderObj
).
then
(
res
=>
{
wx
.
hideLoading
()
wx
.
hideLoading
()
// console.log(orderObj, res)
// console.log(orderObj, res)
...
@@ -273,10 +276,11 @@ Page({
...
@@ -273,10 +276,11 @@ Page({
// }
// }
// })
// })
// } else {
// } else {
wx
.
disableAlertBeforeUnload
&&
wx
.
disableAlertBeforeUnload
()
//关闭小程序页面返回询问对话框
wx
.
$refresh
=
true
wx
.
$refresh
=
true
// 跳转施工确认页
// 跳转施工确认页
wx
.
$router
.
redirectTo
(
'orderDetail'
,
data
)
// wx.$router.redirectTo('orderDetail', data)
wx
.
$router
.
redirectTo
(
'confirmOrder'
,
data
)
// wx.$router.redirectTo('confirmOrder', data)
// wx.$router.redirectTo('confirmOrder', data)
// 暂时保留跳转页面
// 暂时保留跳转页面
// wx.$router.go('confirmOrder', data)
// wx.$router.go('confirmOrder', data)
...
@@ -383,15 +387,16 @@ Page({
...
@@ -383,15 +387,16 @@ Page({
this
.
showLoading
(
'提交中...'
)
this
.
showLoading
(
'提交中...'
)
// 判断是不是 修改订单 是走另外接口逻辑
// 判断是不是 修改订单 是走另外接口逻辑
if
(
isErrorOrder
)
{
//
if (isErrorOrder) {
return
this
.
setCorrectionOrder
(
orderObj
)
//
return this.setCorrectionOrder(orderObj)
}
//
}
let
apiName
=
isErrorOrder
?
'correctionOrder'
:
'createWithPay'
api
.
createWithPay
(
orderObj
).
then
(
res
=>
{
api
[
apiName
]
(
orderObj
).
then
(
res
=>
{
wx
.
hideLoading
()
wx
.
hideLoading
()
// console.log(orderObj, res)
// console.log(orderObj, res)
let
{
code
,
data
,
message
}
=
res
let
{
code
,
data
,
message
}
=
res
if
(
code
==
0
)
{
if
(
code
==
0
)
{
wx
.
disableAlertBeforeUnload
&&
wx
.
disableAlertBeforeUnload
()
//关闭小程序页面返回询问对话框
if
(
save
)
{
if
(
save
)
{
wx
.
showModal
({
wx
.
showModal
({
title
:
'温馨提示'
,
title
:
'温馨提示'
,
...
@@ -466,6 +471,7 @@ Page({
...
@@ -466,6 +471,7 @@ Page({
if
(
orderObj
.
selectPayType
==
null
||
orderObj
.
selectPayType
==
undefined
)
orderObj
.
selectPayType
=
3
if
(
orderObj
.
selectPayType
==
null
||
orderObj
.
selectPayType
==
undefined
)
orderObj
.
selectPayType
=
3
// debugger
// debugger
// 是再次下单的 就删除优惠券字段 不是就赋值
// 是再次下单的 就删除优惠券字段 不是就赋值
// || 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
.
customerCoupon
.
customerCouponCode
.
split
(
'-'
)[
0
]
orderObj
.
customerCouponCode
=
orderObj
.
customerCoupon
.
customerCouponCode
.
split
(
'-'
)[
0
]
...
@@ -489,7 +495,7 @@ Page({
...
@@ -489,7 +495,7 @@ Page({
if
(
!
orderObj
.
customer
.
customerSex
)
orderObj
.
customer
.
customerSex
=
1
if
(
!
orderObj
.
customer
.
customerSex
)
orderObj
.
customer
.
customerSex
=
1
if
(
!
orderObj
.
customer
.
experienceFlag
)
orderObj
.
customer
.
experienceFlag
=
'N'
if
(
!
orderObj
.
customer
.
experienceFlag
)
orderObj
.
customer
.
experienceFlag
=
'N'
if
(
orderObj
.
associate
dOrderCode
)
{
if
(
orderObj
.
ol
dOrderCode
)
{
wx
.
setNavigationBarTitle
({
wx
.
setNavigationBarTitle
({
title
:
'修正订单'
title
:
'修正订单'
})
})
...
...
tabWorkOrder/pages/createOrder/createOrder.wxml
View file @
74cb15e
...
@@ -280,6 +280,25 @@
...
@@ -280,6 +280,25 @@
</block>
</block>
</view>
</view>
</gl-cell>
</gl-cell>
<gl-cell
border
label="支付方式"
valueAlign="right"
wx:if="{{isErrorOrder}}"
labelWidth="152rpx">
<view class="payType-box">
<!-- <block wx:for="{{showPayList}}" wx:key="index"> data-item="{{item}}"
data-index="{{index}}" -->
<!-- bindtap="changePayType" -->
<view class="item text-center active disabled">
门店收款
<view class="active-icon">
<image src="../../images/active.png" />
</view>
</view>
<!-- </block> -->
</view>
</gl-cell>
</view>
</view>
</view>
</view>
<view class="btns {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btns {{isFullSucreen?'isFullSucreen-btn':''}}">
...
...
tabWorkOrder/pages/createOrder/createOrder.wxss
View file @
74cb15e
...
@@ -279,7 +279,7 @@ page {
...
@@ -279,7 +279,7 @@ page {
background-color: #3582EE;
background-color: #3582EE;
}
}
.save.disabled {
.
btns .
save.disabled {
border: 1px solid #DCDEE0;
border: 1px solid #DCDEE0;
color: #c0c0cc;
color: #c0c0cc;
}
}
...
...
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