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 e43a80ed
authored
Feb 22, 2024
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
订单补录模块
1 parent
fe3cf981
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
516 additions
and
38 deletions
packageEquity/api.js
packageEquity/components/OrderNoPopup/OrderNoPopup.js
packageEquity/components/OrderNoPopup/OrderNoPopup.wxml
packageEquity/components/OrderNoPopup/OrderNoPopup.wxss
packageEquity/images/copy_name.png
packageEquity/pages/carEquity/components/SecondStep/SecondStep.js
packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxml
packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxss
packageEquity/pages/carEquity/components/constant/secondStepData.js
packageEquity/pages/carEquity/serviceInfo/serviceInfo.js
packageEquity/pages/carQuotation/components/OrderPopup/OrderPopup.js
packageEquity/pages/carQuotation/components/OrderPopup/OrderPopup.wxml
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.js
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.sass
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.wxml
packageEquity/pages/carQuotation/constant/data.js
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.wxml
packageEquity/pages/carQuotation/index/index.js
packageEquity/pages/carQuotation/index/index.wxml
packageEquity/pages/carQuotation/index/index.wxss
project.private.config.json
packageEquity/api.js
View file @
e43a80e
...
...
@@ -108,6 +108,18 @@ module.exports = {
orderStatistics
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.order.status.statistics'
,
data
)
},
/** 报价单订单分状态统计信息 */
orderStatistics
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.order.status.statistics'
,
data
)
},
/**报价单-撤销工单 */
cancelOrderById
(
data
){
return
api
.
post
(
'dj.api.smartcarlife.quotation.cancel'
,
data
)
},
/** 标记错误订单 */
errorOrderById
(
data
){
return
api
.
post
(
'dj.api.smartcarlife.quotation.correct'
,
data
)
},
/** 校验员工绩效密码 */
performancePasswordCheck
(
data
)
{
...
...
packageEquity/components/OrderNoPopup/OrderNoPopup.js
View file @
e43a80e
...
...
@@ -25,7 +25,8 @@ Component({
itemFormObj
:
[
{
label
:
'交易参考号'
,
prop
:
'outTradeNo'
prop
:
'outTradeNo'
,
copy
:
true
},
{
label
:
'支付时间'
,
...
...
@@ -136,6 +137,16 @@ Component({
thisPage
.
setData
({
orderNoPopup
:
false
})
},
// 复制交易参考号
toCopyNumber
(
e
){
const
{
ordernum
}
=
e
.
currentTarget
.
dataset
wx
.
setClipboardData
({
data
:
ordernum
.
toString
(),
success
(
res
)
{
wx
.
$util
.
showToast
(
'已复制'
)
}
})
}
}
})
packageEquity/components/OrderNoPopup/OrderNoPopup.wxml
View file @
e43a80e
...
...
@@ -15,13 +15,16 @@
refresher-threshold="104"
refresher-triggered="{{triggered}}">
<block wx:for="{{orderNoList}}" wx:key="index">
<view class="order_no_item {{item.active?'active':''}}"
bind
tap="changeOrderNo" data-target="{{item}}">
<view class="order_no_item {{item.active?'active':''}}"
catch:
tap="changeOrderNo" data-target="{{item}}">
<view class="message">
<block wx:for="{{itemFormObj}}" wx:for-item="subItem" wx:key="idx">
<view class="item" wx:if="{{item[subItem.prop]}}">
<view class="label">{{subItem.label}}</view>
<view class="value price_value" wx:if="{{subItem.type == 'price'}}">¥{{filter.priceFilter(item[subItem.prop])}}</view>
<view class="value" wx:else>{{item[subItem.prop]}}</view>
<view class="value" wx:else>
{{item[subItem.prop]}}
<image wx:if="{{subItem.copy}}" catch:tap="toCopyNumber" data-ordernum="{{item[subItem.prop]}}" class="copy_icon" src="../../images/copy_name.png" />
</view>
</view>
</block>
</view>
...
...
packageEquity/components/OrderNoPopup/OrderNoPopup.wxss
View file @
e43a80e
...
...
@@ -87,3 +87,7 @@
.item .price_value{
font-weight: 600;
}
.order_no_item .item .copy_icon{
width: 28rpx;
height: 28rpx;
}
packageEquity/images/copy_name.png
0 → 100644
View file @
e43a80e
2.05 KB
packageEquity/pages/carEquity/components/SecondStep/SecondStep.js
View file @
e43a80e
...
...
@@ -60,14 +60,17 @@ Component({
customer
:
true
,
product
:
true
,
info
:
true
,
store
:
true
store
:
true
,
retrofit
:
true
},
codeToAttr
:
{
YB0001
:
'invoice'
,
YB0003
:
'driveFront'
,
YB0004
:
'driveBack'
,
YB0002
:
'contract'
,
YB0005
:
'other'
YB0005
:
'other'
,
QS0001
:
'retrofitInvoice'
,
QS0002
:
'retrofit'
},
imgToInfo
:
{
invoice
:
{
...
...
@@ -88,6 +91,14 @@ Component({
},
other
:
{
code
:
'YB0005'
},
retrofitInvoice
:{
code
:
'QS0001'
,
label
:
'发票或收据'
},
retrofit
:{
code
:
'QS0002'
,
label
:
'加改装部位'
}
},
imgObj
:
{
...
...
@@ -95,12 +106,17 @@ Component({
driveFront
:
[],
driveBack
:
[],
contract
:
[],
other
:
[]
other
:
[],
retrofitInvoice
:[],
retrofit
:[]
},
popObj
:
{
popValue
:
''
},
tireObjList
:
constantData
.
tireObjList
tireObjList
:
constantData
.
tireObjList
,
retrofitInfo
:{
inclueType
:
1
}
},
lifetimes
:
{
...
...
@@ -113,6 +129,15 @@ Component({
* 组件的方法列表
*/
methods
:
{
changeInclueType
(
e
){
const
{
types
}
=
e
.
target
.
dataset
let
formData
=
this
.
getPageData
()
formData
.
addOnsFlag
=
types
this
.
setData
({
'retrofitInfo.inclueType'
:
types
,
formData
})
},
onClickShow
(
e
)
{
const
{
type
}
=
e
.
target
.
dataset
this
.
setData
({
imgShow
:
true
,
imgType
:
type
})
...
...
@@ -122,7 +147,7 @@ Component({
},
dealFormRule
()
{
let
formData
=
this
.
getPageData
()
var
{
formRule
}
=
this
.
data
var
{
formRule
,
retrofitInfo
}
=
this
.
data
// const list = ['tireBrand', 'frontTireSpecification', 'rearTireSpecification']
const
list
=
[
'tireBrand'
,
'tireScale'
,
'leftFrontDTO'
,
'leftFrontBatch'
,
'rightFrontDTO'
,
'rightFrontBatch'
,
'leftRearDTO'
,
'leftRearBatch'
,
'rightRearDTO'
,
'rightRearBatch'
]
if
(
formData
&&
formData
.
tireFlag
==
0
)
{
...
...
@@ -130,13 +155,15 @@ Component({
formRule
[
item
][
0
].
required
=
false
})
}
retrofitInfo
.
inclueType
=
formData
.
addOnsFlag
==
0
?
2
:
1
this
.
setData
({
formRule
formRule
,
retrofitInfo
})
},
dealImg
()
{
let
{
serviceInfo
,
codeToAttr
,
imgObj
}
=
this
.
data
if
(
serviceInfo
.
ybAttachmentFlag
==
0
&&
serviceInfo
.
attachmentList
.
length
)
{
if
(
(
serviceInfo
.
ybAttachmentFlag
==
0
||
serviceInfo
.
qsFlag
==
1
)
&&
serviceInfo
.
attachmentList
.
length
)
{
serviceInfo
.
attachmentList
.
forEach
(
item
=>
{
imgObj
[
codeToAttr
[
item
.
attachmentCode
]].
push
({
url
:
item
.
attachmentFile
})
})
...
...
@@ -182,20 +209,28 @@ Component({
return
thisPage
?.
data
[
this
.
data
.
dataAttrName
]
},
confirmDealImg
()
{
var
{
serviceInfo
,
imgObj
,
imgToInfo
}
=
this
.
data
var
{
serviceInfo
,
imgObj
,
imgToInfo
,
retrofitInfo
}
=
this
.
data
let
formData
=
this
.
getPageData
()
// 图片处理
if
(
serviceInfo
.
ybAttachmentFlag
==
0
)
{
if
(
serviceInfo
.
ybAttachmentFlag
==
0
||
serviceInfo
.
qsFlag
==
1
)
{
formData
.
attachmentList
=
[]
let
attrList
=
Object
.
keys
(
imgObj
)
for
(
let
i
=
0
;
i
<
attrList
.
length
;
i
++
)
{
let
item
=
attrList
[
i
]
imgObj
[
item
].
forEach
(
k
=>
{
formData
.
attachmentList
.
push
({
attachmentCode
:
imgToInfo
[
item
].
code
,
attachmentType
:
'IMG'
,
attachmentFile
:
k
.
url
})
if
((
item
==
'retrofitInvoice'
||
item
==
'retrofit'
)
&&
retrofitInfo
.
inclueType
==
1
){
formData
.
attachmentList
.
push
({
attachmentCode
:
imgToInfo
[
item
].
code
,
attachmentType
:
'IMG'
,
attachmentFile
:
k
.
url
})
}
else
if
(
item
!=
'retrofitInvoice'
&&
item
!=
'retrofit'
){
formData
.
attachmentList
.
push
({
attachmentCode
:
imgToInfo
[
item
].
code
,
attachmentType
:
'IMG'
,
attachmentFile
:
k
.
url
})
}
})
}
}
...
...
@@ -214,7 +249,7 @@ Component({
})
},
handleConfirm
(
e
)
{
var
{
formRule
,
serviceInfo
,
imgObj
,
imgToInfo
,
energyFormRule
,
oilFormRule
}
=
this
.
data
var
{
formRule
,
serviceInfo
,
imgObj
,
imgToInfo
,
energyFormRule
,
oilFormRule
,
retrofitInfo
}
=
this
.
data
let
formData
=
this
.
getPageData
()
let
validObj
=
fn
.
checkRequired
(
formData
,
formRule
)
if
(
validObj
)
{
...
...
@@ -259,12 +294,12 @@ Component({
}
}
// 图片处理
if
(
serviceInfo
.
ybAttachmentFlag
==
0
)
{
if
(
serviceInfo
.
ybAttachmentFlag
==
0
||
serviceInfo
.
qsFlag
==
1
)
{
formData
.
attachmentList
=
[]
let
attrList
=
Object
.
keys
(
imgObj
)
for
(
let
i
=
0
;
i
<
attrList
.
length
;
i
++
)
{
let
item
=
attrList
[
i
]
if
(
item
!=
'other'
&&
!
imgObj
[
item
].
length
)
{
if
(
(
item
!=
'other'
&&
!
imgObj
[
item
].
length
&&
item
!=
'retrofitInvoice'
&&
item
!=
'retrofit'
&&
serviceInfo
.
ybAttachmentFlag
==
0
)
||
(
item
==
'retrofitInvoice'
&&
!
imgObj
[
item
].
length
&&
retrofitInfo
.
inclueType
==
1
)
||
(
item
==
'retrofit'
&&
!
imgObj
[
item
].
length
&&
retrofitInfo
.
inclueType
==
1
)
)
{
wx
.
$util
.
showToast
(
'请上传'
+
imgToInfo
[
item
].
label
)
return
true
}
...
...
packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxml
View file @
e43a80e
...
...
@@ -131,6 +131,36 @@
</view>
</gl-form>
</view>
<!-- 改装件信息 -->
<view wx:if="{{serviceInfo.qsFlag==1}}" class="box m-b-40">
<view class="title">
<view>改装件信息</view>
<view class="up-down-box" bindtap="handleUpDown" data-attr="retrofit">
<view class="up-down-arrow">
<view class="arrow-up {{isShowObj.retrofit ? '' : 'arrow-down'}}"></view>
</view>
</view>
</view>
<gl-form wx:if="{{isShowObj.retrofit}}" id="retrofit" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.retrofitList}}">
<view slot="upload" class="{{retrofitInfo.inclueType==1?'upload':''}}">
<gl-cell border class="pay-type" label="含加改装件" valueAlign="right" labelWidth="140rpx">
<view class="switch-box">
<view class="block text-center {{ retrofitInfo.inclueType==1?'':'right' }}" />
<view class="left text-center {{ retrofitInfo.inclueType == 1?'active':'' }}" bindtap="changeInclueType" data-types="1">是</view>
<view class="right text-center {{ retrofitInfo.inclueType == 2?'active':'' }}" bindtap="changeInclueType" data-types="2">否</view>
</view>
</gl-cell>
<block wx:if="{{retrofitInfo.inclueType==1}}">
<view class="label">发票或收据</view>
<van-uploader class="plus" file-list="{{ imgObj.retrofitInvoice }}" upload-text="上传照片" max-count="1" deletable preview-size="192rpx" bind:after-read="upLoad" bind:delete="handleDeleteImg" data-attr="retrofitInvoice">
</van-uploader>
<view class="label">加改装部位照片</view>
<van-uploader class="plus" file-list="{{ imgObj.retrofit }}" upload-text="上传照片" max-count="1" deletable preview-size="192rpx" bind:after-read="upLoad" bind:delete="handleDeleteImg" data-attr="retrofit">
</van-uploader>
</block>
</view>
</gl-form>
</view>
<view class="box m-b-40">
<view class="title">
<view>店面信息</view>
...
...
packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxss
View file @
e43a80e
...
...
@@ -313,4 +313,62 @@
.upload .van-uploader .van-uploader__wrapper .van-uploader__upload {
order: 0 !important;
}
.switch-box {
/* box-sizing: border-box; */
width: 216rpx;
height: 60rpx;
display: flex;
border: 2rpx solid #347BFF;
border-radius: 12rpx;
font-size: 28rpx;
color: #347BFF;
margin-left: auto;
margin-right: -30rpx;
position: relative;
}
.switch-box .block {
position: absolute;
/* top: 0; */
top: 50%;
transform: translateY(-50%);
border: 2rpx solid #347BFF;
left: 0;
width: 50%;
border-radius: 12rpx;
height: 100%;
background: #347BFF;
color: #fff;
transition: all .25s;
}
.switch-box .block.right {
left: 50%;
top: 50%;
}
.switch-box .left,
.switch-box .right {
width: 50%;
height: 100%;
position: absolute;
top: 0;
transition: all .25s;
}
.switch-box .left {
left: 0;
}
.switch-box .right {
right: 0;
}
.switch-box .left.active,
.switch-box .right.active {
color: #fff;
}
.pay-type .cell {
padding-left: 20rpx!important;
}
\ No newline at end of file
packageEquity/pages/carEquity/components/constant/secondStepData.js
View file @
e43a80e
...
...
@@ -649,7 +649,14 @@ const secondObj = {
// noCellHeight: true,
maxlength
:
'100'
}
]
],
retrofitList
:[{
label
:
' '
,
name
:
'upload'
,
type
:
'slot'
,
labelWidth
:
'0rpx'
,
noCellHeight
:
true
,
}]
}
export
default
{
...
...
packageEquity/pages/carEquity/serviceInfo/serviceInfo.js
View file @
e43a80e
...
...
@@ -48,7 +48,6 @@ Page({
cardSetting
:
true
,
isAsk
:
false
},
getPickerObj
(
obj
)
{
let
data
=
[]
if
(
!
obj
)
{
...
...
@@ -290,6 +289,7 @@ Page({
let
params
=
this
.
dealComfirmData
(
JSON
.
parse
(
JSON
.
stringify
(
serviceInfo
)))
// 0草稿,1提单
params
.
operationType
=
typeObj
[
type
]
params
.
addOnsFlag
=
serviceInfo
.
addOnsFlag
==
2
?
0
:
1
console
.
log
(
params
,
'调接口---'
)
this
.
setData
({
isAsk
:
true
...
...
packageEquity/pages/carQuotation/components/OrderPopup/OrderPopup.js
View file @
e43a80e
...
...
@@ -14,6 +14,8 @@ Component({
observer
:
function
(
n
)
{
}
},
resetTransNo
:
String
,
resetOrder
:
Boolean
},
/**
...
...
@@ -108,10 +110,11 @@ Component({
})
},
confirm
(
e
)
{
let
{
outTradeNo
,
payVoucherList
}
=
this
.
data
let
{
outTradeNo
,
payVoucherList
,
resetOrder
}
=
this
.
data
// debugger
// console.log(wx.$router)
let
thisPage
=
wx
.
$router
.
getPageInstance
()
if
(
resetOrder
)
return
this
.
newResetOrder
()
// if (orderType == 2) {
if
(
payVoucherList
.
length
&&
outTradeNo
)
{
thisPage
.
setData
({
...
...
@@ -125,7 +128,20 @@ Component({
}
// }
},
// 标记错误订单&补录订单
newResetOrder
(){
let
{
resetTransNo
,
payVoucherList
}
=
this
.
data
let
thisPage
=
wx
.
$router
.
getPageInstance
()
if
(
payVoucherList
.
length
&&
resetTransNo
)
{
thisPage
.
setData
({
[
'orderInfo.transactionNo'
]:
resetTransNo
,
[
'orderInfo.paymentDocList'
]:
payVoucherList
.
map
(
item
=>
item
.
url
)
})
thisPage
.
handleSecondConfirm
()
}
else
{
wx
.
$util
.
showToast
(
'交易流水号或付款凭证不能为空!'
)
}
}
}
})
packageEquity/pages/carQuotation/components/OrderPopup/OrderPopup.wxml
View file @
e43a80e
...
...
@@ -10,7 +10,8 @@
<block wx:if="{{orderType == 2}}">
<view class="input-item">
<view class="title-text">交易流水号</view>
<view class="input-box">
<view class="input-box" wx:if="{{resetOrder}}">{{resetTransNo}}</view>
<view wx:else class="input-box">
<input
type="text"
class="input"
...
...
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.js
View file @
e43a80e
...
...
@@ -72,6 +72,14 @@ Component({
})
// }
},
'orderInfo.resetOrder'
:
function
(
value
)
{
// console.log(value, 'outTradeNo')
// if (value) {
value
&&
this
.
setData
({
[
'textNameObj.cancelName'
]:
'放弃'
})
// }
},
},
/**
* 组件的初始数据
...
...
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.sass
View file @
e43a80e
...
...
@@ -391,4 +391,15 @@
.van-cell
:after
{
border
:
none
!
important
;
}
\ No newline at end of file
}
.only-select-text
{
width
:
300rpx
;
height
:
60rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
font-size
:
28rpx
;
margin-left
:
auto
;
margin-right
:
-30rpx
;
position
:
relative
;
}
\ No newline at end of file
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.wxml
View file @
e43a80e
...
...
@@ -51,8 +51,9 @@
<view class="label">其他信息</view>
</view>
</view>
<gl-cell wx:if="{{!orderInfo.outTradeNo}}" border class="pay-type" label="支付方式" valueAlign="right" labelWidth="140rpx">
<view class="switch-box">
<gl-cell wx:if="{{!orderInfo.outTradeNo || orderInfo.resetOrder}}" border class="pay-type" label="支付方式" valueAlign="right" labelWidth="140rpx">
<view class="only-select-text" wx:if="{{orderInfo.resetOrder}}">门店收款</view>
<view wx:else class="switch-box">
<view class="block text-center {{ orderInfo.payType==1?'':'right' }}" />
<view class="left text-center {{ orderInfo.payType == 1?'active':'' }}" bindtap="changePayType" data-payType="1">线上支付</view>
<view class="right text-center {{ orderInfo.payType == 2?'active':'' }}" bindtap="changePayType" data-payType="2">门店收款</view>
...
...
packageEquity/pages/carQuotation/constant/data.js
View file @
e43a80e
...
...
@@ -7,6 +7,8 @@ const orderStatusObj = {
'4'
:
'已支付'
,
'5'
:
'已完成'
,
'-1'
:
'战败'
,
'9'
:
'已撤销'
,
'11'
:
'已退单'
}
const
orderStatusList
=
[{
confName
:
'待报价'
,
...
...
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
View file @
e43a80e
...
...
@@ -7,7 +7,8 @@ import {
quotationUpgrade
,
getQuotationInfoById
,
listByMerchantIdAndIds
,
quotationRecording
quotationRecording
,
errorOrderById
}
from
'../../../api'
import
{
quotedImgUrl
...
...
@@ -201,9 +202,10 @@ Page({
// 是订单补录直接走另外的补录逻辑
console
.
log
(
outTradeNo
,
'是订单补录直接走另外的补录逻辑'
);
if
(
outTradeNo
)
return
this
.
setQuotationRecording
()
if
(
outTradeNo
&&!
orderInfo
.
resetOrder
)
return
this
.
setQuotationRecording
()
// debugger
// 如果是门店收款 并且付款凭证没有填
orderInfo
.
paymentDocList
=
orderInfo
.
paymentDocList
||
[]
if
(
orderInfo
.
payType
==
2
&&
!
(
orderInfo
.
transactionNo
&&
orderInfo
.
paymentDocList
.
length
))
return
this
.
setData
({
showPopup
:
true
,
confirmStatus
:
false
...
...
@@ -303,6 +305,13 @@ Page({
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
// let { orderInfo } = this.data
console
.
log
(
'调接口---'
)
// 标记错误--补录订单
if
(
orderInfo
.
resetOrder
&&
orderInfo
.
id
){
orderInfo
.
oldQuotationId
=
orderInfo
.
id
delete
orderInfo
.
id
let
result
=
await
errorOrderById
(
orderInfo
)
return
resolve
(
result
)
}
// 编辑后重新提交
if
(
orderInfo
.
id
)
{
let
result
=
await
updateQuotation
(
orderInfo
)
...
...
@@ -355,7 +364,11 @@ Page({
item
.
price
=
this
.
divideByHundred
(
item
.
goodsPrice
)
return
item
})
// 标识为补录工单
if
(
this
.
resetOrder
){
orderInfo
.
resetOrder
=
this
.
resetOrder
tableInfo
.
payType
=
2
}
this
.
setData
({
orderInfo
:
Object
.
assign
(
orderInfo
,
tableInfo
,
{
insureList
:
[]
...
...
@@ -413,7 +426,7 @@ Page({
saveStatus
}
=
this
.
data
// 补单点放弃
if
(
orderInfo
.
outTradeNo
)
{
if
(
orderInfo
.
outTradeNo
||
orderInfo
.
resetOrder
)
{
return
wx
.
$router
.
redirectTo
(
'packageEquity.equityPage'
,
{
tabIndex
:
1
})
...
...
@@ -580,7 +593,8 @@ Page({
outTradeNo
,
totalFee
,
accountDate
,
id
id
,
resetOrder
}
=
options
// outTradeNo
if
(
outTradeNo
)
{
...
...
@@ -591,7 +605,7 @@ Page({
accountDate
})
}
if
(
resetOrder
)
this
.
resetOrder
=
resetOrder
if
(
id
)
{
this
.
setData
({
id
...
...
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.wxml
View file @
e43a80e
...
...
@@ -48,5 +48,7 @@
</view>
<order-popup
orderType="{{orderInfo.payType }}"
resetTransNo="{{orderInfo.transactionNo}}"
resetOrder="{{orderInfo.resetOrder}}"
wx:if="{{showPopup}}"
show="{{showPopup}}" />
\ No newline at end of file
packageEquity/pages/carQuotation/index/index.js
View file @
e43a80e
...
...
@@ -4,7 +4,8 @@ import {
getQuotationStatistics
,
updateOrderStatus
,
merchantMode
,
orderStatistics
orderStatistics
,
cancelOrderById
}
from
'../../../api'
import
data
from
'../constant/data'
import
constantData
from
'../constant/data'
...
...
@@ -43,6 +44,15 @@ Component({
key
:
'goodsName'
},
{
label
:
'工单编号'
,
key
:
'payId'
},
{
label
:
'交易流水号'
,
key
:
'transactionNo'
,
canCopy
:
true
},
{
label
:
'拒升原因'
,
key
:
'remark'
},
...
...
@@ -53,7 +63,15 @@ Component({
{
label
:
'创建时间'
,
key
:
'createdTime'
}
},
{
label
:
'支付方式'
,
key
:
'payType'
,
mapValue
:{
1
:
'线上支付'
,
2
:
'门店收款'
}
},
],
// statisticsObj: {},
btnTxt
:
{
...
...
@@ -116,7 +134,7 @@ Component({
*/
methods
:
{
onScroll
:
function
(
e
)
{
console
.
log
(
e
,
'onPageScroll'
);
//
console.log(e, 'onPageScroll');
// const {
// scrollTop
// } = e.detail
...
...
@@ -250,6 +268,8 @@ Component({
if
(
item
.
payTime
)
{
item
.
payTime
=
wx
.
$util
.
tsFormatTime
(
item
.
payTime
,
'Y/M/D h:m:s'
)
}
item
.
isTouchMove
=
false
item
.
repeal
=
item
.
orderStatus
==
3
||
item
.
orderStatus
==
5
return
item
})
this
.
setData
({
...
...
@@ -456,5 +476,187 @@ Component({
console
.
log
(
err
)
})
},
//手指触摸动作开始 记录起点X坐标
touchstart
:
function
(
e
)
{
//开始触摸时 重置所有删除
this
.
data
.
list
.
forEach
(
v
=>
{
// console.log(item)
if
(
v
.
isTouchMove
)
//只操作为true的
v
.
isTouchMove
=
false
v
.
confirmIndex
=
false
})
this
.
setData
({
startX
:
e
.
changedTouches
[
0
].
clientX
,
startY
:
e
.
changedTouches
[
0
].
clientY
,
list
:
this
.
data
.
list
})
},
//滑动事件处理
touchmove
:
function
(
e
)
{
// console.log(e)
// if (condition) {
// }
// let { userInfo } = this.data
let
{
item
}
=
e
.
currentTarget
.
dataset
// console.log(!li.repeal)
if
(
!
item
.
repeal
)
return
// let userType = !userInfo.isSuper && userInfo.merchantType
// let orderType = userInfo.userType == 1 && li.status != 9 && li.status != 1 && li.selectPayType != 3 && li.selectPayType != 1
// // 权限检验
// // console.log(!userType || !orderType)
// if (!userType || !orderType) return
var
that
=
this
,
index
=
e
.
currentTarget
.
dataset
.
index
,
//当前索引
// ind = e.currentTarget.dataset.ind, //当前索引
startX
=
that
.
data
.
startX
,
//开始X坐标
startY
=
that
.
data
.
startY
,
//开始Y坐标
touchMoveX
=
e
.
changedTouches
[
0
].
clientX
,
//滑动变化坐标
touchMoveY
=
e
.
changedTouches
[
0
].
clientY
,
//滑动变化坐标
//获取滑动角度
angle
=
that
.
angle
({
X
:
startX
,
Y
:
startY
},
{
X
:
touchMoveX
,
Y
:
touchMoveY
})
// console.log(that.data.list[index])
that
.
data
.
list
.
forEach
(
function
(
v
,
i
)
{
v
.
isTouchMove
=
false
//滑动超过30度角 return
if
(
Math
.
abs
(
angle
)
>
30
)
return
if
(
i
==
index
)
{
if
(
touchMoveX
>
startX
)
//右滑
v
.
isTouchMove
=
false
//左滑
else
v
.
isTouchMove
=
true
}
})
//更新数据
that
.
setData
({
list
:
that
.
data
.
list
})
},
touchE
:
function
(
e
)
{
// console.log(e)
var
that
=
this
// console.log(e.changedTouches.length)
// debugger
let
{
item
}
=
e
.
currentTarget
.
dataset
// // console.log(!li.repeal)
if
(
!
item
.
repeal
)
return
if
(
e
.
changedTouches
.
length
==
1
)
{
//手指移动结束后触摸点位置的X坐标
var
endX
=
e
.
changedTouches
[
0
].
clientX
//触摸开始与结束,手指移动的距离
var
disX
=
that
.
data
.
startX
-
endX
// console.log(disX)
var
delBtnWidth
=
that
.
data
.
delBtnWidth
//如果距离小于删除按钮的1/2,不显示删除按钮
var
txtStyle
=
disX
>
delBtnWidth
/
2
?
'left:-'
+
delBtnWidth
+
'rpx'
:
'left:0rpx'
//获取手指触摸的是哪一项
var
index
=
e
.
currentTarget
.
dataset
.
index
// var ind = e.currentTarget.dataset.ind
var
list
=
that
.
data
.
list
list
[
index
].
txtStyle
=
txtStyle
// console.log(list)
//更新列表的状态
that
.
setData
({
list
:
list
})
}
},
angle
:
function
(
start
,
end
)
{
var
_X
=
end
.
X
-
start
.
X
,
_Y
=
end
.
Y
-
start
.
Y
//返回角度 /Math.atan()返回数字的反正切值
return
(
360
*
Math
.
atan
(
_Y
/
_X
))
/
(
2
*
Math
.
PI
)
},
toConfirmReturanOrder
(
e
){
const
{
id
}
=
e
.
currentTarget
.
dataset
let
_this
=
this
wx
.
showModal
({
title
:
''
,
content
:
'是否取撤销该工单?'
,
confirmText
:
'是'
,
confirmColor
:
'#347BFF'
,
cancelText
:
'否'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
// _this.showLoading('取消中...')
_this
.
repeal
(
id
)
}
}
})
},
toCopyNumber
(
e
){
const
{
ordernum
}
=
e
.
currentTarget
.
dataset
wx
.
setClipboardData
({
data
:
ordernum
.
toString
(),
success
(
res
)
{
wx
.
$util
.
showToast
(
'已复制'
)
}
})
},
repeal
(
id
){
let
_this
=
this
cancelOrderById
({
id
}).
then
(
_res_
=>
{
let
{
code
,
message
}
=
_res_
if
(
code
==
0
)
{
wx
.
showToast
({
title
:
'操作成功'
,
icon
:
'success'
})
setTimeout
(()
=>
{
_this
.
getList
()
},
500
)
}
else
{
wx
.
$util
.
showToast
(
message
)
}
})
},
toshowErrorOrder
(
e
){
const
{
item
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
showErrorId
:
item
.
payId
},()
=>
{
wx
.
$modal
(
this
,
{
show
:
true
,
title
:
'工单标记'
,
tabTitleShow
:
false
,
success
:
res
=>
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'是否补录新工单?'
,
confirmText
:
'确定'
,
confirmColor
:
'#347BFF'
,
cancelText
:
'取消'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
$router
.
go
(
item
.
mode
!=
0
?
'createOrderCarQuotationSimple'
:
'createOrderCarQuotation'
,
{
id
:
item
.
id
,
resetOrder
:
true
})
}
}
})
},
error
:
()
=>
{
}
})
})
},
}
})
\ No newline at end of file
packageEquity/pages/carQuotation/index/index.wxml
View file @
e43a80e
This diff is collapsed.
Click to expand it.
packageEquity/pages/carQuotation/index/index.wxss
View file @
e43a80e
...
...
@@ -210,8 +210,35 @@
border-radius: 16rpx;
margin: 0 6rpx 20rpx;
padding-bottom: 20rpx;
display: flex;
justify-content: space-between;
overflow: hidden;
}
.list .item .item-inner{
width: 100%;
margin-right: 0;
-webkit-transition: all 0.4s;
transition: all 0.4s;
-webkit-transform: translateX(72px);
transform: translateX(72px);
margin-left: -72px;
}
.list .item .del {
width: 72px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #fff;
background-color: #f1554c;
-webkit-transform: translateX(90px);
transform: translateX(90px);
-webkit-transition: all 0.4s;
transition: all 0.4s;
font-size: 28rpx;
}
.list .item:first-child {
margin-top: 20rpx;
}
...
...
@@ -701,4 +728,36 @@
/* line-height: 136rpx; */
width: 32rpx;
height: 32rpx;
}
.touch-move-active .item-inner,
.touch-move-active .del {
-webkit-transform: translateX(0) !important;
transform: translateX(0) !important;
}
.modatcontent {
box-sizing: border-box;
padding: 48rpx 50rpx;
}
.modal text,
.modal {
font-size: 28rpx;
color: #333333;
}
.modal .orderCode {
margin-bottom: 20rpx;
}
.modal .code {
color: #888888;
}
.modal .color {
color: #347BFF;
}
.copy_icon{
width: 28rpx;
height: 28rpx;
margin-left: 12rpx;
}
\ No newline at end of file
project.private.config.json
View file @
e43a80e
...
...
@@ -97,5 +97,7 @@
]
}
},
"libVersion"
:
"3.3.4"
"setting"
:
{
"compileHotReLoad"
:
true
}
}
\ No newline at end of file
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