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 6b1b98be
authored
Apr 11, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
联调代码
1 parent
e68e36f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
177 additions
and
151 deletions
packageCrowdFunding/pages/balanceNote/balanceNote.js
packageCrowdFunding/pages/balanceNote/balanceNote.js
View file @
6b1b98b
...
@@ -6,164 +6,190 @@ const app = getApp()
...
@@ -6,164 +6,190 @@ const app = getApp()
import
api
from
'../../api'
import
api
from
'../../api'
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
orderObj
:
constantData
.
orderObj
,
orderObj
:
constantData
.
orderObj
,
showStatus
:
false
,
showStatus
:
false
,
orderNoPopup
:
false
,
orderNoPopup
:
false
,
orderNoList
:
[],
orderNoList
:
[],
// orderListInfo: {},
// orderListInfo: {},
orderNoInfo
:
{},
orderNoInfo
:
{},
orderInfo
:
{},
orderInfo
:
{},
orderList
:
[
orderList
:
[
{
{
name
:
'客户姓名'
,
name
:
'客户姓名'
,
value
:
'customerName'
value
:
'customerName'
},
},
{
{
name
:
'活动名称'
,
name
:
'活动名称'
,
value
:
'activityName'
value
:
'activityName'
},
},
{
{
name
:
'商品名称'
,
name
:
'商品名称'
,
isMark
:
true
,
isMark
:
true
,
value
:
'goodsName'
value
:
'goodsName'
},
},
{
{
name
:
'订单金额'
,
name
:
'订单金额'
,
value
:
'activityPrice'
value
:
'activityPrice'
},
},
{
{
name
:
'定金支付时间'
,
name
:
'定金支付时间'
,
value
:
'payedDate'
value
:
'payedDate'
},
},
{
{
name
:
'订单编号'
,
name
:
'订单编号'
,
value
:
'subOrderCode'
value
:
'subOrderCode'
}
}
]
]
},
},
handleTransaction
()
{
handleTransaction
()
{
this
.
setData
({
this
.
setData
({
orderNoPopup
:
true
orderNoPopup
:
true
})
},
priceFilter
(
num
)
{
var
pow
=
Math
.
pow
(
10
,
2
)
return
(
Math
.
round
(
num
/
100
*
pow
)
/
pow
).
toFixed
(
2
)
},
initOrderInfo
()
{
const
{
orderObj
,
orderList
}
=
this
.
data
// 商品
if
(
app
.
globalData
?.
crowdFundingShopInfo
&&
orderObj
?.
shopFormList
)
{
if
(
app
.
globalData
?.
crowdFundingShopInfo
?.
length
>
1
)
{
// 多商品
orderList
[
2
].
isMark
=
true
orderObj
.
shopFormList
[
0
].
optionList
=
app
.
globalData
?.
crowdFundingShopInfo
.
map
(
item
=>
{
item
.
shopmallGoodsId
=
item
.
goodsId
return
item
})
})
}
else
{
},
// 单商品直接带出商品名称
priceFilter
(
num
)
{
orderList
[
2
].
isMark
=
false
var
pow
=
Math
.
pow
(
10
,
2
)
orderInfo
[
'totalFee'
]
=
arr
[
0
]?.
crowdFundingPrice
||
0
return
(
Math
.
round
(
num
/
100
*
pow
)
/
pow
).
toFixed
(
2
)
}
},
}
initOrderInfo
()
{
this
.
setData
({
orderObj
,
orderList
})
const
{
orderObj
,
orderList
}
=
this
.
data
},
// 商品
showPopup
(
e
)
{
if
(
app
.
globalData
?.
crowdFundingShopInfo
&&
orderObj
?.
shopFormList
)
{
this
.
setData
({
if
(
app
.
globalData
?.
crowdFundingShopInfo
?.
length
>
1
)
{
showPickerSelect
:
true
,
// 多商品
// orderInfo: this.data.orderListInfo,
orderList
[
2
].
isMark
=
true
pickerObj
:
this
.
data
.
orderObj
.
shopFormList
[
0
]
orderObj
.
shopFormList
[
0
].
optionList
=
app
.
globalData
?.
crowdFundingShopInfo
.
map
(
item
=>
{
})
item
.
shopmallGoodsId
=
item
.
goodsId
},
return
item
confirm
()
{
})
const
{
orderInfo
}
=
this
.
data
}
else
{
// console.log(orderInfo, orderListInfo)
// 单商品直接带出商品名称
if
(
!
orderInfo
||
!
orderInfo
.
outTradeNo
)
{
orderList
[
2
].
isMark
=
false
return
wx
.
$util
.
showToast
(
'请选择交易流水号'
)
orderInfo
[
'totalFee'
]
=
arr
[
0
]?.
crowdFundingPrice
||
0
}
}
}
let
{
default4SStoreInfo_crowdFunding
:
merchantInfo
}
=
wx
.
$util
.
getUserInfo
()
this
.
setData
({
orderObj
,
orderList
})
const
{
customerName
,
customerPhone
,
activityName
,
activityId
,
referrer
,
goodsName
,
shareStaffUuid
:
userId
,
shopmallGoodsId
}
=
orderInfo
},
let
params
=
{
showPopup
(
e
)
{
outTradeNo
:
orderInfo
.
outTradeNo
,
this
.
setData
({
customerName
,
showPickerSelect
:
true
,
customerPhone
,
// orderInfo: this.data.orderListInfo,
activityName
,
pickerObj
:
this
.
data
.
orderObj
.
shopFormList
[
0
]
activityId
:
activityId
||
'10228'
,
})
goodsName
,
},
orderPaySource
:
2
,
confirm
()
{
employeeName
:
referrer
,
const
{
orderInfo
}
=
this
.
data
userId
,
// console.log(orderInfo, orderListInfo)
shopmallGoodsId
,
if
(
!
orderInfo
||
!
orderInfo
.
outTradeNo
)
{
merchantId
:
merchantInfo
.
merchantId
,
return
wx
.
$util
.
showToast
(
'请选择交易流水号'
)
merchantName
:
merchantInfo
.
merchantName
}
}
let
{
accountName
}
=
wx
.
$util
.
getUserInfo
()
const
{
goodsId
:
shopmallGoodsId
,
subOrderCode
}
=
orderInfo
api
.
createFullPayOrderAPI
(
params
).
then
(
res
=>
{
let
params
=
{
let
{
code
,
data
,
message
}
=
res
subOrderCode
,
if
(
code
==
'0'
)
{
orderPaySource
:
2
,
// wx.$router.reLaunch
shopmallGoodsId
,
selectPayType
:
1
,
updatedBy
:
accountName
}
wx
.
$router
.
redirectTo
(
'activityPay'
,
{
orderCode
:
data
.
subOrderCode
,
outTradeNo
})
api
.
createPayOrderAPI
(
params
).
then
(
res
=>
{
}
else
{
let
{
code
,
data
,
message
}
=
res
wx
.
$util
.
showToast
(
message
||
'接口异常'
)
if
(
code
==
'0'
)
{
}
// wx.$router.reLaunch
})
wx
.
$router
.
redirectTo
(
'activityPay'
,
{
orderCode
:
target
.
subOrderCode
})
},
}
else
{
back
()
{
wx
.
$util
.
showToast
(
message
||
'接口异常'
)
wx
.
$router
.
back
()
}
},
})
/**
// let { default4SStoreInfo_crowdFunding: merchantInfo } = wx.$util.getUserInfo()
* 生命周期函数--监听页面加载
// const { customerName, customerPhone, activityName, activityId, referrer, goodsName, shareStaffUuid: userId, shopmallGoodsId } = orderInfo
*/
// let params = {
onLoad
(
options
)
{},
// outTradeNo: orderInfo.outTradeNo,
onRoute
(
options
)
{
// customerName,
const
{
list
}
=
options
// customerPhone,
list
.
activityPrice
=
`¥
${
this
.
priceFilter
(
list
.
activityPrice
||
0
)}
`
// activityName,
list
.
totalFee
=
list
.
crowdFundingPrice
||
0
// activityId: activityId || '10228',
this
.
setData
({
// goodsName,
orderInfo
:
list
// orderPaySource: 2,
})
// employeeName: referrer,
this
.
initOrderInfo
()
// userId,
},
// shopmallGoodsId,
// merchantId: merchantInfo.merchantId,
// merchantName: merchantInfo.merchantName
// }
//
// api.createFullPayOrderAPI(params).then(res => {
// let { code, data, message } = res
// if (code == '0') {
// // wx.$router.reLaunch
//
// wx.$router.redirectTo('activityPay', { orderCode: data.subOrderCode, outTradeNo })
// } else {
// wx.$util.showToast(message || '接口异常')
// }
// })
},
back
()
{
wx
.
$router
.
back
()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
},
onRoute
(
options
)
{
const
{
list
}
=
options
list
.
activityPrice
=
`¥
${
this
.
priceFilter
(
list
.
activityPrice
||
0
)}
`
list
.
totalFee
=
list
.
crowdFundingPrice
||
0
this
.
setData
({
orderInfo
:
list
})
this
.
initOrderInfo
()
},
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
()
{},
onReady
()
{
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{},
onShow
()
{
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
()
{},
onHide
()
{
},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload
()
{},
onUnload
()
{
},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
()
{},
onPullDownRefresh
()
{
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
()
{},
onReachBottom
()
{
},
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
()
{}
onShareAppMessage
()
{
}
})
})
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