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({ ...@@ -67,7 +67,7 @@ Component({
if (pickerObj.flag) { // 商品带出金额 if (pickerObj.flag) { // 商品带出金额
orderInfo['activityPrice'] = `¥${this.priceFilter(arr[0]?.activityPrice / 100 || 0)}` 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['crowdFundingPrice'] = `¥${this.priceFilter(arr[0]?.crowdFundingPrice / 100 || 0)}`
// 筛选交易流水号 订单金额字段 // 筛选交易流水号 订单金额字段
orderInfo['totalFee'] = arr[0]?.crowdFundingPrice || 0 orderInfo['totalFee'] = arr[0]?.crowdFundingPrice || 0
......
...@@ -25,7 +25,7 @@ Page({ ...@@ -25,7 +25,7 @@ Page({
}, },
onRoute(options) { onRoute(options) {
if (!Object.keys(options).length) return if (!options.activityId) return
let activityId = options.activityId let activityId = options.activityId
let activityName = options.activityName let activityName = options.activityName
this.setData({ this.setData({
......
...@@ -43,7 +43,7 @@ Page({ ...@@ -43,7 +43,7 @@ Page({
}, },
{ {
name: '订金金额', name: '订金金额',
value: 'orderMoney', value: 'depositPrice',
handle: 'money' handle: 'money'
}, },
{ {
...@@ -106,7 +106,6 @@ Page({ ...@@ -106,7 +106,6 @@ Page({
if (app.globalData?.crowdFundingShopInfo?.length > 1) { if (app.globalData?.crowdFundingShopInfo?.length > 1) {
// 多商品 // 多商品
orderList[2].isMark = true orderList[2].isMark = true
console.log(app.globalData?.crowdFundingShopInfo)
orderObj.shopFormList[0].optionList = app.globalData?.crowdFundingShopInfo.map(item => { orderObj.shopFormList[0].optionList = app.globalData?.crowdFundingShopInfo.map(item => {
item.shopmallGoodsId = item.goodsId item.shopmallGoodsId = item.goodsId
return item return item
...@@ -139,8 +138,8 @@ Page({ ...@@ -139,8 +138,8 @@ Page({
orderDetail: { orderDetail: {
...data.customer, ...data.customer,
...data, ...data,
...data.shopmallSubOrder,
...data.shopmallSubOrder.shopmallOrder, ...data.shopmallSubOrder.shopmallOrder,
...data.shopmallSubOrder,
...data.payOrder ...data.payOrder
} }
}) })
...@@ -217,7 +216,7 @@ Page({ ...@@ -217,7 +216,7 @@ Page({
// orderCode: 'S2304101345174444', // orderCode: 'S2304101345174444',
// orderPaySource: 1 // orderPaySource: 1
// } // }
// this.initOrderInfo() this.initOrderInfo()
// selectPayType // selectPayType
let { orderCode, selectPayType: orderPaySource = 1, outTradeNo } = options let { orderCode, selectPayType: orderPaySource = 1, outTradeNo } = options
this.setData({ this.setData({
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</view> </view>
<view class="money"> <view class="money">
尾款金额 尾款金额
<view class="sum">¥{{filter.priceFilter(orderInfo.tailPayment || 0)}}</view> <view class="sum">¥{{orderDetail.totalPrice || 0}}</view>
</view> </view>
</view> </view>
<view class=" box"> <view class=" box">
...@@ -50,10 +50,10 @@ ...@@ -50,10 +50,10 @@
<view class="order-item" wx:for="{{orderList}}" wx:key="index"> <view class="order-item" wx:for="{{orderList}}" wx:key="index">
<view>{{item.name}}</view> <view>{{item.name}}</view>
<view wx:if="{{item.isMark}}" class="mark-text" bindtap="showPopup"> <view wx:if="{{item.isMark}}" class="mark-text" bindtap="showPopup">
{{orderInfo[item.value] || '请选择商品'}} > {{orderDetail[item.value] || '请选择商品'}} >
</view> </view>
<view class="money" wx:elif="{{item.handle == 'money'}}" > <view class="money" wx:elif="{{item.handle == 'money'}}" >
¥{{filter.priceFilter(orderDetail[item.value] || 0)}} ¥{{orderDetail[item.value] || 0}}
</view> </view>
<view wx:else>{{orderDetail[item.value] || ''}}</view> <view wx:else>{{orderDetail[item.value] || ''}}</view>
</view> </view>
......
...@@ -34,12 +34,14 @@ Page({ ...@@ -34,12 +34,14 @@ Page({
orderObj.shopFormList[0].readonly = true orderObj.shopFormList[0].readonly = true
orderInfo.shopmallGoodsId = app.globalData?.crowdFundingShopInfo[0]?.goodsId || '' orderInfo.shopmallGoodsId = app.globalData?.crowdFundingShopInfo[0]?.goodsId || ''
orderInfo.goodsName = app.globalData?.crowdFundingShopInfo[0]?.goodsName || '' orderInfo.goodsName = app.globalData?.crowdFundingShopInfo[0]?.goodsName || ''
orderInfo.activityPrice = `¥${this.priceFilter(app.globalData?.crowdFundingShopInfo[0]?.activityPrice || 0)}` orderInfo.activityPrice = `¥${this.priceFilter(app.globalData?.crowdFundingShopInfo[0]?.activityPrice / 100 || 0)}`
orderInfo.crowdFundingPrice = `¥${this.priceFilter(app.globalData?.crowdFundingShopInfo[0]?.crowdFundingPrice || 0)}` orderInfo.crowdFundingPrice = `¥${this.priceFilter(app.globalData?.crowdFundingShopInfo[0]?.crowdFundingPrice / 100 || 0)}`
orderInfo['totalFee'] = arr[0]?.crowdFundingPrice || 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) { priceFilter(num) {
...@@ -103,9 +105,9 @@ Page({ ...@@ -103,9 +105,9 @@ Page({
activityId: activityId, activityId: activityId,
activityName: activityName activityName: activityName
} }
wx.showLoading() wx.$util.showLoading()
api.createFullPayOrderAPI(params).then(res => { api.createFullPayOrderAPI(params).then(res => {
wx.hideLoading() wx.$util.hideLoading()
let { code } = res let { code } = res
if (code == '0') { if (code == '0') {
wx.$router.back() wx.$router.back()
......
...@@ -33,7 +33,7 @@ const orderObj = { ...@@ -33,7 +33,7 @@ const orderObj = {
}, },
{ {
label: '尾款金额', label: '尾款金额',
name: 'balancePrice', name: 'tailPayment',
type: 'input', type: 'input',
readonly: true, readonly: true,
noBorder: true noBorder: true
......
...@@ -6,164 +6,191 @@ const app = getApp() ...@@ -6,164 +6,191 @@ 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('请选择交易流水号') }
} }
this.setData({orderObj, orderList})
let { default4SStoreInfo_crowdFunding: merchantInfo } = wx.$util.getUserInfo() },
const { customerName, customerPhone, activityName, activityId, referrer, goodsName, shareStaffUuid: userId, shopmallGoodsId } = orderInfo showPopup(e) {
let params = { this.setData({
outTradeNo: orderInfo.outTradeNo, showPickerSelect: true,
customerName, // orderInfo: this.data.orderListInfo,
customerPhone, pickerObj: this.data.orderObj.shopFormList[0]
activityName, })
activityId: activityId || '10228', },
goodsName, confirm() {
orderPaySource: 2, const {orderInfo} = this.data
employeeName: referrer, // console.log(orderInfo, orderListInfo)
userId, if (!orderInfo || !orderInfo.outTradeNo) {
shopmallGoodsId, return wx.$util.showToast('请选择交易流水号')
merchantId: merchantInfo.merchantId, }
merchantName: merchantInfo.merchantName let {accountName} = wx.$util.getUserInfo()
} const {goodsId: shopmallGoodsId, subOrderCode, outTradeNo} = orderInfo
let params = {
api.createFullPayOrderAPI(params).then(res => { outTradeNo,
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', {outTradeNo})
}, } 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
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 @@ ...@@ -16,7 +16,7 @@
color: #fff; color: #fff;
.imgBox image{ .imgBox image{
width: 18rpx; width: 24rpx;
height: 34rpx; height: 34rpx;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
......
...@@ -48,6 +48,7 @@ Page({ ...@@ -48,6 +48,7 @@ Page({
orderObj.shopFormList[1].readonly = true orderObj.shopFormList[1].readonly = true
orderInfo.shopmallGoodsId = app.globalData?.crowdFundingShopInfo[0]?.goodsId || '' orderInfo.shopmallGoodsId = app.globalData?.crowdFundingShopInfo[0]?.goodsId || ''
orderInfo.goodsName = app.globalData?.crowdFundingShopInfo[0]?.goodsName || '' orderInfo.goodsName = app.globalData?.crowdFundingShopInfo[0]?.goodsName || ''
orderInfo.crowdFundingPrice = `¥${this.priceFilter(app.globalData?.crowdFundingShopInfo[0]?.crowdFundingPrice / 100 || 0)}`
} }
} }
if (app.globalData?.staffListRange && orderObj?.orderFormList) { if (app.globalData?.staffListRange && orderObj?.orderFormList) {
...@@ -57,7 +58,12 @@ Page({ ...@@ -57,7 +58,12 @@ Page({
return item 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) { confirm(e) {
const { target } = e.currentTarget.dataset const { target } = e.currentTarget.dataset
...@@ -79,7 +85,7 @@ Page({ ...@@ -79,7 +85,7 @@ Page({
const orderObj = wx.$util.deepClone(orderInfo) const orderObj = wx.$util.deepClone(orderInfo)
delete orderObj.activityPrice delete orderObj.activityPrice
delete orderObj.crowdFundingPrice delete orderObj.crowdFundingPrice
delete orderObj.balancePrice delete orderObj.tailPayment
let params = { let params = {
...orderObj, ...orderObj,
selectPayType, selectPayType,
......
...@@ -221,6 +221,10 @@ Component({ ...@@ -221,6 +221,10 @@ Component({
// 复制链接 // 复制链接
copyContractUrl(e) { copyContractUrl(e) {
if (!e) {
wx.$util.showToast('没有合同')
return
}
wx.showModal({ wx.showModal({
title: '温馨提示', title: '温馨提示',
content: '如需下载PDF报告单,请复制下载地址后到手机浏览器中打开。下载地址5分钟内有效', content: '如需下载PDF报告单,请复制下载地址后到手机浏览器中打开。下载地址5分钟内有效',
......
...@@ -37,7 +37,8 @@ Page({ ...@@ -37,7 +37,8 @@ Page({
}, },
{ {
label: '礼券名称', label: '礼券名称',
key: 'couponName' key: 'couponName',
e_key: 'employeeName'
}, },
{ {
label: '领券时间', label: '领券时间',
......
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
<!-- </view> --> <!-- </view> -->
</block> </block>
</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> <block wx:else>
{{item.enum? item.enum[detail[item.key]] : detail[item.key] || ''}} {{item.enum? item.enum[detail[item.key]] : detail[item.key] || ''}}
</block> </block>
......
...@@ -17,7 +17,8 @@ Page({ ...@@ -17,7 +17,8 @@ Page({
{ {
label: '礼券名称', label: '礼券名称',
c_key: 'couponName', c_key: 'couponName',
key: 'customerCoupon' key: 'customerCoupon',
e_key: 'employeeName'
}, },
{ {
label: '领券时间', label: '领券时间',
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
</block> </block>
</block> </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>
</view> </view>
</block> </block>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!