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 cae4f83f
authored
Jul 19, 2023
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug修改
1 parent
a992d0a3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
37 deletions
subvehicleConversion/components/supplementaryOrderDetail/supplementaryOrderDetail.js
subvehicleConversion/components/supplementaryOrderDetail/supplementaryOrderDetail.wxml
subvehicleConversion/pages/supplementaryOrderPay/supplementaryOrderPay.wxss
subvehicleConversion/components/supplementaryOrderDetail/supplementaryOrderDetail.js
View file @
cae4f83
...
@@ -88,7 +88,8 @@ Component({
...
@@ -88,7 +88,8 @@ Component({
inputValue
:
''
,
inputValue
:
''
,
showRemark
:
false
,
showRemark
:
false
,
showCopyPopup
:
false
,
// 复制二次选择
showCopyPopup
:
false
,
// 复制二次选择
copyObj
:
{}
// 复制 姓名/手机号
copyObj
:
{},
// 复制 姓名/手机号
remarkType
:
''
// 备注类型 1备注 2 退款原因
},
},
lifetimes
:
{
lifetimes
:
{
...
@@ -204,6 +205,57 @@ Component({
...
@@ -204,6 +205,57 @@ Component({
this
.
search
()
this
.
search
()
},
},
showMask
(
e
)
{
const
{
item
}
=
e
.
currentTarget
.
dataset
||
{}
this
.
setData
({
showRemark
:
true
,
remarkType
:
1
,
selectItem
:
item
})
},
// 备注确认
remarkConfirm
(
e
)
{
let
value
=
e
.
detail
// 备注类型 remarkType 1备注 2退款原因
const
{
subOrderCodeCopy
,
remarkType
,
list
,
selectItem
}
=
this
.
data
if
(
remarkType
==
1
)
{
if
(
value
)
{
wx
.
showLoading
()
api
.
updateOrderRemark
({
orderCode
:
selectItem
?.
subOrderCode
,
remark
:
value
}).
then
(
res
=>
{
wx
.
hideLoading
()
let
{
code
}
=
res
if
(
code
==
0
)
{
// 将订单项备注值回填 不请求接口刷新页面
list
.
forEach
(
val
=>
{
if
(
val
.
subOrderCode
==
selectItem
.
subOrderCode
)
{
val
.
remark
=
value
}
})
this
.
setData
({
list
})
}
})
}
}
else
{
let
params
=
{
orderCode
:
subOrderCodeCopy
,
refundRemark
:
value
}
wx
.
showLoading
()
api
.
markAsRefunded
(
params
).
then
(
res
=>
{
wx
.
hideLoading
()
if
(
res
.
code
==
0
)
{
wx
.
$util
.
showToast
(
'退款成功!'
)
this
.
getList
()
}
else
{
wx
.
$util
.
showToast
(
res
.
message
||
'接口异常'
)
}
})
}
},
input
(
e
)
{
input
(
e
)
{
let
{
value
}
=
e
.
detail
let
{
value
}
=
e
.
detail
this
.
setData
({
this
.
setData
({
...
@@ -232,6 +284,7 @@ Component({
...
@@ -232,6 +284,7 @@ Component({
copyData
(
e
)
{
copyData
(
e
)
{
const
{
target
,
flag
}
=
e
.
currentTarget
.
dataset
const
{
target
,
flag
}
=
e
.
currentTarget
.
dataset
if
(
flag
==
1
)
{
// 姓名和手机号
if
(
flag
==
1
)
{
// 姓名和手机号
if
(
target
.
customerName
&&
target
.
customerPhone
)
{
// 姓名手机号都有
return
this
.
setData
({
return
this
.
setData
({
showCopyPopup
:
true
,
showCopyPopup
:
true
,
copyObj
:
{
copyObj
:
{
...
@@ -240,6 +293,11 @@ Component({
...
@@ -240,6 +293,11 @@ Component({
}
}
})
})
}
}
let
copyItem
=
target
.
customerName
||
target
.
customerPhone
// 只手机号或姓名
wx
.
setClipboardData
({
data
:
copyItem
})
}
let
copyItem
=
target
.
subOrderCode
let
copyItem
=
target
.
subOrderCode
wx
.
setClipboardData
({
wx
.
setClipboardData
({
data
:
copyItem
data
:
copyItem
...
@@ -301,37 +359,11 @@ Component({
...
@@ -301,37 +359,11 @@ Component({
}
}
if
(
target
.
tailOrderStatus
==
1
||
target
.
tailOrderStatus
==
4
)
{
// 已支付或退定金状态
if
(
target
.
tailOrderStatus
==
1
||
target
.
tailOrderStatus
==
4
)
{
// 已支付或退定金状态
this
.
setData
({
this
.
setData
({
showRemark
:
true
showRemark
:
true
,
remarkType
:
2
})
})
}
}
},
},
// 退款原因确认
remarkConfirm
(
e
)
{
let
value
=
e
.
detail
const
{
subOrderCodeCopy
}
=
this
.
data
let
params
=
{
orderCode
:
subOrderCodeCopy
,
refundRemark
:
value
}
wx
.
showModal
({
title
:
'温馨提示'
,
content
:
'请确定将此订单状态标记为已退款'
,
complete
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
wx
.
showLoading
()
api
.
markAsRefunded
(
params
).
then
(
res
=>
{
wx
.
hideLoading
()
if
(
res
.
code
==
0
)
{
wx
.
$util
.
showToast
(
'退款成功!'
)
this
.
getList
()
}
else
{
wx
.
$util
.
showToast
(
res
.
message
||
'接口异常'
)
}
})
}
}
})
},
remarkCancel
()
{
remarkCancel
()
{
this
.
setData
({
this
.
setData
({
showRemark
:
false
showRemark
:
false
...
...
subvehicleConversion/components/supplementaryOrderDetail/supplementaryOrderDetail.wxml
View file @
cae4f83
...
@@ -86,11 +86,13 @@
...
@@ -86,11 +86,13 @@
<block>{{item['refundRemark']}}</block>
<block>{{item['refundRemark']}}</block>
</view>
</view>
</view>
</view>
<!-- 待支付订单无备注字段 -->
<view class="order refund_text">
<view class="order refund_text" wx:if="{{item.remark}}">
<view class="order-label">备注 </view>
<view class="order-label">备注 </view>
<view class="order-value">
<view bindtap="showMask" class="order-value" data-item="{{item}}">
<block>{{item['remark'] || ''}}</block>
<view wx:if="{{item.remark}}">
<block>{{item['remark']}}</block>
</view>
<view class="placeholder_class" wx:if="{{!item.remark}}">点击添加备注</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -121,13 +123,14 @@
...
@@ -121,13 +123,14 @@
</view>
</view>
</view>
</view>
<remark-popup wx:if="{{showRemark}}"
<remark-popup wx:if="{{showRemark}}"
title="
退款原因
"
title="
{{remarkType == 1 ? '备注' : '退款备注'}}
"
show="{{showRemark}}"
show="{{showRemark}}"
required="{{true}}"
required="{{true}}"
maxlength="100"
maxlength="{{remarkType == 1 ? 30 : 100}}"
value="{{remarkType == 1 ? selectItem.remark : ''}}"
bindcancel="remarkCancel"
bindcancel="remarkCancel"
bindconfirm="remarkConfirm"
bindconfirm="remarkConfirm"
placeholder="请填写内容,最多
100
个字" />
placeholder="请填写内容,最多
{{remarkType == 1 ? 30 : 100}}
个字" />
<van-popup show="{{ showCopyPopup }}" bind:close="onCopyPopupClose" round>
<van-popup show="{{ showCopyPopup }}" bind:close="onCopyPopupClose" round>
<view class="copy_popup_title">复制</view>
<view class="copy_popup_title">复制</view>
...
...
subvehicleConversion/pages/supplementaryOrderPay/supplementaryOrderPay.wxss
View file @
cae4f83
...
@@ -135,7 +135,7 @@ page {
...
@@ -135,7 +135,7 @@ page {
.order-box .order-item view .placeholder_class{
.order-box .order-item view .placeholder_class{
color: #C8C8C8;
color: #C8C8C8;
}
}
.order-box .order-item
view
remark-text{
.order-box .order-item
.
remark-text{
text-overflow:ellipsis;
text-overflow:ellipsis;
display: -webkit-box;
display: -webkit-box;
word-break: break-all;
word-break: break-all;
...
...
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