Commit 4691fc7a by 张立顺

Merge branch 'dev_v4.19.0' of http://192.168.3.233:8090/saas_plus/dj-car-boutiqu…

…e-work-wechat into dev_v4.19.0
2 parents 296fde9f 25e5ab58
......@@ -67,7 +67,7 @@ Component({
if (pickerObj.flag) { // 商品带出金额
orderInfo['activityPrice'] = `¥${this.priceFilter(arr[0]?.activityPrice / 100 || 0)}`
// 尾款金额 = 众筹价 - 定金金额
orderInfo['balancePrice'] = `¥${this.priceFilter((arr[0]?.crowdFundingPrice - arr[0]?.activityPrice) / 100 || 0)}`
orderInfo['tailPayment'] = `¥${this.priceFilter((arr[0]?.crowdFundingPrice - arr[0]?.activityPrice) / 100 || 0)}`
orderInfo['crowdFundingPrice'] = `¥${this.priceFilter(arr[0]?.crowdFundingPrice / 100 || 0)}`
// 筛选交易流水号 订单金额字段
orderInfo['totalFee'] = arr[0]?.crowdFundingPrice || 0
......
......@@ -25,7 +25,7 @@ Page({
},
onRoute(options) {
if (!Object.keys(options).length) return
if (!options.activityId) return
let activityId = options.activityId
let activityName = options.activityName
this.setData({
......
......@@ -43,7 +43,7 @@ Page({
},
{
name: '订金金额',
value: 'orderMoney',
value: 'depositPrice',
handle: 'money'
},
{
......@@ -106,7 +106,6 @@ Page({
if (app.globalData?.crowdFundingShopInfo?.length > 1) {
// 多商品
orderList[2].isMark = true
console.log(app.globalData?.crowdFundingShopInfo)
orderObj.shopFormList[0].optionList = app.globalData?.crowdFundingShopInfo.map(item => {
item.shopmallGoodsId = item.goodsId
return item
......@@ -139,8 +138,8 @@ Page({
orderDetail: {
...data.customer,
...data,
...data.shopmallSubOrder,
...data.shopmallSubOrder.shopmallOrder,
...data.shopmallSubOrder,
...data.payOrder
}
})
......@@ -217,7 +216,7 @@ Page({
// orderCode: 'S2304101345174444',
// orderPaySource: 1
// }
// this.initOrderInfo()
this.initOrderInfo()
// selectPayType
let { orderCode, selectPayType: orderPaySource = 1, outTradeNo } = options
this.setData({
......
......@@ -9,7 +9,7 @@
</view>
<view class="money">
尾款金额
<view class="sum">¥{{filter.priceFilter(orderInfo.tailPayment || 0)}}</view>
<view class="sum">¥{{orderDetail.totalPrice || 0}}</view>
</view>
</view>
<view class=" box">
......@@ -50,10 +50,10 @@
<view class="order-item" wx:for="{{orderList}}" wx:key="index">
<view>{{item.name}}</view>
<view wx:if="{{item.isMark}}" class="mark-text" bindtap="showPopup">
{{orderInfo[item.value] || '请选择商品'}} >
{{orderDetail[item.value] || '请选择商品'}} >
</view>
<view class="money" wx:elif="{{item.handle == 'money'}}" >
¥{{filter.priceFilter(orderDetail[item.value] || 0)}}
¥{{orderDetail[item.value] || 0}}
</view>
<view wx:else>{{orderDetail[item.value] || ''}}</view>
</view>
......
......@@ -34,12 +34,14 @@ Page({
orderObj.shopFormList[0].readonly = true
orderInfo.shopmallGoodsId = app.globalData?.crowdFundingShopInfo[0]?.goodsId || ''
orderInfo.goodsName = app.globalData?.crowdFundingShopInfo[0]?.goodsName || ''
orderInfo.activityPrice = `¥${this.priceFilter(app.globalData?.crowdFundingShopInfo[0]?.activityPrice || 0)}`
orderInfo.crowdFundingPrice = `¥${this.priceFilter(app.globalData?.crowdFundingShopInfo[0]?.crowdFundingPrice || 0)}`
orderInfo['totalFee'] = arr[0]?.crowdFundingPrice || 0
orderInfo.activityPrice = `¥${this.priceFilter(app.globalData?.crowdFundingShopInfo[0]?.activityPrice / 100 || 0)}`
orderInfo.crowdFundingPrice = `¥${this.priceFilter(app.globalData?.crowdFundingShopInfo[0]?.crowdFundingPrice / 100 || 0)}`
orderInfo.tailPayment = `¥${this.priceFilter((app.globalData?.crowdFundingShopInfo[0]?.crowdFundingPrice - app.globalData?.crowdFundingShopInfo[0]?.activityPrice) / 100 || 0)}`
orderInfo['totalFee'] = app.globalData?.crowdFundingShopInfo[0]?.crowdFundingPrice || 0
orderInfo.goodsId = app.globalData?.crowdFundingShopInfo[0]?.goodsId
}
}
this.setData({ orderObj })
this.setData({ orderObj, orderInfo })
},
priceFilter(num) {
......@@ -103,9 +105,9 @@ Page({
activityId: activityId,
activityName: activityName
}
wx.showLoading()
wx.$util.showLoading()
api.createFullPayOrderAPI(params).then(res => {
wx.hideLoading()
wx.$util.hideLoading()
let { code } = res
if (code == '0') {
wx.$router.back()
......
......@@ -33,7 +33,7 @@ const orderObj = {
},
{
label: '尾款金额',
name: 'balancePrice',
name: 'tailPayment',
type: 'input',
readonly: true,
noBorder: true
......
......@@ -6,164 +6,191 @@ const app = getApp()
import api from '../../api'
Page({
/**
* 页面的初始数据
*/
data: {
orderObj: constantData.orderObj,
showStatus: false,
orderNoPopup: false,
orderNoList: [],
// orderListInfo: {},
orderNoInfo: {},
orderInfo: {},
orderList: [
{
name: '客户姓名',
value: 'customerName'
},
{
name: '活动名称',
value: 'activityName'
},
{
name: '商品名称',
isMark: true,
value: 'goodsName'
},
{
name: '订单金额',
value: 'activityPrice'
},
{
name: '定金支付时间',
value: 'payedDate'
},
{
name: '订单编号',
value: 'subOrderCode'
}
]
},
handleTransaction() {
this.setData({
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
/**
* 页面的初始数据
*/
data: {
orderObj: constantData.orderObj,
showStatus: false,
orderNoPopup: false,
orderNoList: [],
// orderListInfo: {},
orderNoInfo: {},
orderInfo: {},
orderList: [
{
name: '客户姓名',
value: 'customerName'
},
{
name: '活动名称',
value: 'activityName'
},
{
name: '商品名称',
isMark: true,
value: 'goodsName'
},
{
name: '订单金额',
value: 'activityPrice'
},
{
name: '定金支付时间',
value: 'payedDate'
},
{
name: '订单编号',
value: 'subOrderCode'
}
]
},
handleTransaction() {
this.setData({
orderNoPopup: true
})
} else {
// 单商品直接带出商品名称
orderList[2].isMark = false
orderInfo['totalFee'] = arr[0]?.crowdFundingPrice || 0
}
}
this.setData({ orderObj, orderList })
},
showPopup(e) {
this.setData({
showPickerSelect: true,
// orderInfo: this.data.orderListInfo,
pickerObj: this.data.orderObj.shopFormList[0]
})
},
confirm() {
const { orderInfo } = this.data
// console.log(orderInfo, orderListInfo)
if (!orderInfo || !orderInfo.outTradeNo) {
return wx.$util.showToast('请选择交易流水号')
}
let { default4SStoreInfo_crowdFunding: merchantInfo } = wx.$util.getUserInfo()
const { customerName, customerPhone, activityName, activityId, referrer, goodsName, shareStaffUuid: userId, shopmallGoodsId } = orderInfo
let params = {
outTradeNo: orderInfo.outTradeNo,
customerName,
customerPhone,
activityName,
activityId: activityId || '10228',
goodsName,
orderPaySource: 2,
employeeName: referrer,
userId,
shopmallGoodsId,
merchantId: merchantInfo.merchantId,
merchantName: merchantInfo.merchantName
}
api.createFullPayOrderAPI(params).then(res => {
let { code, data, message } = res
if (code == '0') {
// wx.$router.reLaunch
},
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 {
// 单商品直接带出商品名称
orderList[2].isMark = false
}
}
this.setData({orderObj, orderList})
},
showPopup(e) {
this.setData({
showPickerSelect: true,
// orderInfo: this.data.orderListInfo,
pickerObj: this.data.orderObj.shopFormList[0]
})
},
confirm() {
const {orderInfo} = this.data
// console.log(orderInfo, orderListInfo)
if (!orderInfo || !orderInfo.outTradeNo) {
return wx.$util.showToast('请选择交易流水号')
}
let {accountName} = wx.$util.getUserInfo()
const {goodsId: shopmallGoodsId, subOrderCode, outTradeNo} = orderInfo
let params = {
outTradeNo,
subOrderCode,
orderPaySource: 2,
shopmallGoodsId,
selectPayType: 1,
updatedBy: accountName
}
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()
},
api.createPayOrderAPI(params).then(res => {
let {code, data, message} = res
if (code == '0') {
// wx.$router.reLaunch
wx.$router.redirectTo('activityPay', {outTradeNo})
} else {
wx.$util.showToast(message || '接口异常')
}
})
// let { default4SStoreInfo_crowdFunding: merchantInfo } = wx.$util.getUserInfo()
// const { customerName, customerPhone, activityName, activityId, referrer, goodsName, shareStaffUuid: userId, shopmallGoodsId } = orderInfo
// let params = {
// outTradeNo: orderInfo.outTradeNo,
// customerName,
// customerPhone,
// activityName,
// activityId: activityId || '10228',
// goodsName,
// orderPaySource: 2,
// employeeName: referrer,
// 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
console.log(list)
list.activityPrice = `¥${this.priceFilter(list.activityPrice || 0)}`
list.totalFee = list.tailPayment || 0
this.setData({
orderInfo: list
})
this.initOrderInfo()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {}
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
......@@ -16,7 +16,7 @@
color: #fff;
.imgBox image{
width: 18rpx;
width: 24rpx;
height: 34rpx;
display: inline-block;
vertical-align: middle;
......
......@@ -48,6 +48,7 @@ Page({
orderObj.shopFormList[1].readonly = true
orderInfo.shopmallGoodsId = app.globalData?.crowdFundingShopInfo[0]?.goodsId || ''
orderInfo.goodsName = app.globalData?.crowdFundingShopInfo[0]?.goodsName || ''
orderInfo.crowdFundingPrice = `¥${this.priceFilter(app.globalData?.crowdFundingShopInfo[0]?.crowdFundingPrice / 100 || 0)}`
}
}
if (app.globalData?.staffListRange && orderObj?.orderFormList) {
......@@ -57,7 +58,12 @@ Page({
return item
})
}
this.setData({ orderObj })
this.setData({ orderObj, orderInfo })
},
priceFilter(num) {
var pow = Math.pow(10, 2)
return (Math.round(num * pow) / pow).toFixed(2)
},
confirm(e) {
const { target } = e.currentTarget.dataset
......@@ -79,7 +85,7 @@ Page({
const orderObj = wx.$util.deepClone(orderInfo)
delete orderObj.activityPrice
delete orderObj.crowdFundingPrice
delete orderObj.balancePrice
delete orderObj.tailPayment
let params = {
...orderObj,
selectPayType,
......
......@@ -221,6 +221,10 @@ Component({
// 复制链接
copyContractUrl(e) {
if (!e) {
wx.$util.showToast('没有合同')
return
}
wx.showModal({
title: '温馨提示',
content: '如需下载PDF报告单,请复制下载地址后到手机浏览器中打开。下载地址5分钟内有效',
......
......@@ -37,7 +37,8 @@ Page({
},
{
label: '礼券名称',
key: 'couponName'
key: 'couponName',
e_key: 'employeeName'
},
{
label: '领券时间',
......
......@@ -20,6 +20,10 @@
<!-- </view> -->
</block>
</block>
<block wx:elif="{{item.key == 'couponName'}}">
<text>{{item.enum? item.enum[detail[item.key]] : detail[item.key] || ''}}</text>
<text>({{item.enum? item.enum[detail[item.e_key]] : detail[item.e_key] || ''}})</text>
</block>
<block wx:else>
{{item.enum? item.enum[detail[item.key]] : detail[item.key] || ''}}
</block>
......
......@@ -17,7 +17,8 @@ Page({
{
label: '礼券名称',
c_key: 'couponName',
key: 'customerCoupon'
key: 'customerCoupon',
e_key: 'employeeName'
},
{
label: '领券时间',
......
......@@ -82,7 +82,7 @@
</block>
</block>
</block>
<block wx:else>{{li[i.key][i.c_key]|| ''}}</block>
<block wx:else><text>{{li[i.key][i.c_key]|| ''}}</text><text wx:if="{{li[i.key][i.e_key]}}">({{li[i.key][i.e_key]}})</text></block>
</view>
</view>
</block>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!