Commit afff2441 by 张立顺

功能开发

1 parent c8fcdef3
......@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布
* 5cdptest
*/
let index = 1
let index = 2
const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync()
......
// packageCrowdFunding/components/OrderNoPopup/OrderNoPopup.js
import api from '~/api/api.js'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function(n) {
console.log(n,'show');
if (n) {
this.getWaitinputorder()
}
}
},
title: String,
orderInfo: Object
},
/**
* 组件的初始数据
*/
data: {
itemFormObj: [
{
label: '交易参考号',
prop: 'outTradeNo'
}, {
label: '支付时间',
prop: 'accountDate'
}, {
label: '交易金额',
prop: 'totalFee',
type: 'price'
}
],
currentPage: 1,
pageSize: 10,
pages: '',
orderNoList: [],
// isAll: false
},
/**
* 组件的方法列表
*/
methods: {
// 选择交易流水号
changeOrderNo(e) {
let { target } = e.currentTarget.dataset
let { orderNoList } = this.data
orderNoList.map(i => {
i.active = false
if (i.outTradeNo && i.outTradeNo == target.outTradeNo) {
i.active = true
}
return i
})
this.setData({orderNoList})
},
restPageNum() {
this.setData({
currentPage: 1
})
this.getWaitinputorder()
},
scrollonReachBottom() {
let { pages, currentPage } = this.data
// 判断当前页是否是末页
if (pages == currentPage) return wx.$util.showToast('列表已到底')
this.setData({
currentPage: currentPage + 1
})
this.getWaitinputorder()
},
getList() {
this.setData({ orderNoList: []})
this.restPageNum()
},
getWaitinputorder() {
let { currentPage, pageSize, orderNoList, orderInfo } = this.data
// totalFee 根据商品众筹价筛选交易流水号
// let totalFee = isAll ? '' : orderInfo.totalFee
// totalFee
// console.log(object);
// debugger
api
.waitinputorder({ currentPage, pageSize, })
.then(result => {
console.log(result,'result');
let { code, data } = result
if (code == 0) {
data.list.forEach(element => {
element.accountDate = new Date(element.accountDate).format('yyyy-MM-dd hh:mm:ss')
element.active = false
// if (element.outTradeNo && element.outTradeNo == orderInfo.outTradeNo) {
// element.active = true
// }
})
console.log(data.list);
this.setData({
orderNoList: currentPage == 1 ? data.list : [...orderNoList, ...data.list],
pages: data.pages,
triggered: false
})
}
})
.catch(err => {})
},
confirm() {
let { orderNoList, orderInfo } = this.data
let arr = orderNoList?.find(v => v.active) || []
if (!arr) {
return wx.showToast({
title: '请选择交易参考号',
icon: 'none'
})
}
let {accountDate, outTradeNo, totalFee } = arr
this.triggerEvent('success', { accountDate, outTradeNo, totalFee })
// let thisPage = wx.$router.getPageInstance()
// orderInfo.outTradeNo = arr[0]?.outTradeNo || ''
// thisPage.setData({
// orderInfo,
// orderNoPopup: false
// })
},
cancel() {
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
orderNoPopup: false
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--packageCrowdFunding/components/OrderNoPopup/OrderNoPopup.wxml-->
<wxs src="index.wxs" module="filter" />
<popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="60%">
<view class="sub-title">
<view>{{title}}</view>
<!-- <view class="all_btn" bindtap="getList" data-target="true">全部</view> -->
</view>
<scroll-view
class="order_no_box"
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="restPageNum"
bindscrolltolower="scrollonReachBottom"
refresher-threshold="104"
refresher-triggered="{{triggered}}">
<block wx:for="{{orderNoList}}" wx:key="index">
<view class="order_no_item {{item.active?'active':''}}" bindtap="changeOrderNo" data-target="{{item}}">
<view class="message">
<block wx:for="{{itemFormObj}}" wx:for-item="subItem" wx:key="idx">
<view class="item">
<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>
</block>
</view>
<view class="checked" wx:if="{{item.active}}">
<image src="../../../components/images/choose.png" />
</view>
</view>
</block>
</scroll-view>
</popup>
.sub-title {
height: 100rpx;
font-size: 32rpx;
color: #222222;
font-weight: 600;
position: sticky;
left: 0;
top: 0;
background-color: #fff;
z-index: 2;
border-bottom: 1rpx solid #EDEDED;
display: flex;
align-items: center;
justify-content: center;
}
.sub-title .all_btn{
position: absolute;
right: 20rpx;
font-size: 24rpx;
color: #9B9B9E;
font-weight: 400;
}
.text-hide {
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
.text-center{
display: flex;
align-items: center;
justify-content: center;
}
.order_no_box{
height: calc(100% - 120rpx);
padding: 20rpx 0;
}
.order_no_item{
height: 160rpx;
box-sizing: border-box;
background: #F7F8FA;
border-radius: 16rpx;
padding: 20rpx 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20rpx;
}
.order_no_item:first-child{
margin-top: 0;
}
.order_no_item:last-child{
margin-bottom: 20rpx;
}
.message{
display: flex;
flex-flow: column;
justify-content: center;
gap: 12rpx;
}
.checked{
width: 32rpx;
height: 32rpx;
}
.order_no_item.active{
background: #3582ee1a;
border: 2rpx solid #3582EE;
border-radius: 16rpx;
}
.order_no_item .item{
display: flex;
font-size: 24rpx;
color: #333333;
}
.item .label{
color: #9B9B9E;
width: 150rpx;
margin-right: 40rpx;
}
.item .price_value{
font-weight: 600;
}
var priceFilter = function (num) {
// 处理金额分转元并补零
var pow = Math.pow(10, 2)
return (Math.round(num / 100 * pow) / pow).toFixed(2)
}
module.exports = {
priceFilter: priceFilter
}
\ No newline at end of file
......@@ -5,7 +5,8 @@
"equity-list": "../carEquity/components/EquityList/EquityList",
"store-picker": "../../components/storePicker/storePicker",
"side-select-popup": "../../../components/SideSelectPopup/SideSelectPopup",
"order-switchPopup": "/components/orderSwitchPopup/orderSwitchPopup"
"order-switchPopup": "/components/orderSwitchPopup/orderSwitchPopup",
"order-no-popup":"../../components/OrderNoPopup/OrderNoPopup"
},
"navigationStyle": "custom"
}
......@@ -14,7 +14,7 @@
</view>
</navigation-bar>
<!-- style="margin-top:{{navBarHeight}}px" -->
<view class="layout {{waitInputCount?'tipsHeigh':''}}" style="padding-top:{{ navBarHeight }}px;position: relative;">
<view class="layout {{waitInputCount && mode == 1?'tipsHeigh':''}}" style="padding-top:{{ navBarHeight }}px;position: relative;">
<block wx:if="{{ navBarHeight && showPage }}">
<quotation-list id="page-0" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 0?'':'hide' }} " mode="{{ mode }}" />
<equity-list
......@@ -25,16 +25,22 @@
/>
</block>
</view>
<view class="waitOrderCon" wx:if="{{ waitInputCount && mode}}">
<view class="waitOrderCon" wx:if="{{ waitInputCount && mode == 1}}">
<tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
</view>
<custom-tabBar list="{{ tabBarList }}" color="#6C6C70" selectedColor="#3582EE" tabIndex="{{ tabIndex }}" bindchange="changeTabBar" />
<store-picker items="{{ storeListRange }}" show="{{ showPicker }}" bindsearch="getStoreList" bindconfirm="changePicker" />
<side-select-popup show="{{ shopSideSelectPopup }}" />
<order-switchPopup
<!-- <order-switchPopup
bind:close="closeSwitchPopup"
bind:success="navigator"
title="{{ '请选择支付订单号' }}"
wx:if="{{ showOrderpop }}"
flag="{{ showOrderpop }}"
/>
\ No newline at end of file
/> -->
<order-no-popup
wx:if="{{showOrderpop}}"
show="{{showOrderpop}}"
title="请选择支付订单号"
bind:success="navigator"
orderNoList="{{orderNoList}}"/>
\ No newline at end of file
......@@ -60,6 +60,9 @@
.waitOrderCon {
position: absolute;
bottom: 85px;
/* bottom: env(safe-area-inset-bottom); */
bottom: constant(safe-area-inset-bottom);
/* height: calc(100vh - 100rpx - 72rpx - env(safe-area-inset-bottom));
height: calc(100vh - 100rpx - 72rpx - constant(safe-area-inset-bottom)); */
width: 100%;
}
\ No newline at end of file
......@@ -54,7 +54,8 @@ Component({
console.log(value, 'outTradeNo')
this.setData({
textNameObj: {
confirmName: '下一步'
confirmName: '确认',
cancelName: '放弃',
}
})
}
......
......@@ -8,6 +8,7 @@ Page({
* 页面的初始数据
*/
data: {
showTips: true,
owner: {
owner: '',
phone: '',
......@@ -57,6 +58,11 @@ Page({
// step: 'second',
needChangeList: ['price', 'base', 'threePremium', 'carInsidePremium', 'passengerPremium', 'payPrice', , 'insurancePrice', 'quotedPriceUpdate', 'minEquityPrice']
},
closeTips() {
this.setData({
showTips: false
})
},
reWrite(type, data) {
console.log(type, data)
let { owner } = this.data
......@@ -150,11 +156,14 @@ Page({
console.log(result)
let {code,data} = result
if (code==0&&data) {
wx.$router.redirectTo('packageEquity.equityPage')
wx.showToast({
title: '补录订单成功',
icon: 'success'
})
setTimeout(()=>{
wx.$router.redirectTo('packageEquity.equityPage')
},1000)
}
})
.catch(err => {console.log(err)})
......@@ -382,6 +391,10 @@ Page({
if (modifyEquityQuotation) {
return this.updateEquityPrice('saveEdit')
}
// 补单点放弃
if (orderInfo.outTradeNo) {
return wx.$router.redirectTo('packageEquity.equityPage')
}
if (saveStatus) return false
wx.showLoading('保存中...')
this.setData({
......@@ -543,13 +556,14 @@ Page({
// 判断是编辑还是新增
// options.id = 14
// options.modifyEquityQuotation = true
let { outTradeNo, totalFee } = options
let { outTradeNo, totalFee,accountDate } = options
// outTradeNo
if (outTradeNo) {
this.setData({
outTradeNo,
totalFee: totalFee,
['orderInfo.outTradeNo']: outTradeNo
['orderInfo.outTradeNo']: outTradeNo,
accountDate
// ['orderInfo.quotedPriceUpdate']: this.divideByHundred(totalFee)
})
}
......
......@@ -13,7 +13,7 @@
</view>
</navigation-bar>
<!-- height: calc(100vh - {{navBarHeight}}px); -->
<view class="layout" style="padding-top:{{ navBarHeight }}px;">
<view class="layout {{showTips?'fullSucreen-tips':'' }} " style="padding-top:{{ navBarHeight }}px;" >
<first-step
id="FirstStep"
serviceInfo="{{ owner }}"
......@@ -30,4 +30,18 @@
bindconfirm="handleSecondConfirm"
bindeditSave="handleEditSave"
/>
</view>
\ No newline at end of file
</view>
<view wx:if="{{showTips}}" class="btns {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="tips" >
<image class=" tipsIcon" src="../../../images/tips.png" />
<view class="contentText">
<view>支付订单号:{{outTradeNo}}</view>
<view>支付时间:{{accountDate}}</view>
</view>
<image class="closeIcon" bindtap="closeTips" src="../../../images/closeIcon.png" />
</view>
<!-- <view class="btns-con">
<view class="save text-center" bindtap="routerBack" data-save>放弃</view>
<view class="confirm text-center" bindtap="submit">提交工单</view>
</view> -->
</view>
\ No newline at end of file
......@@ -44,4 +44,76 @@ page{
flex-direction: column;
/* height: calc(100vh - 50px); */
overflow: scroll;
}
.btns {
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: 100rpx;
background: #FFFFFF;
box-sizing: border-box;
/* padding: 10rpx 32rpx; */
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
z-index: 99;
flex-direction: column;
}
.btn-box .tips {
display: flex;
justify-content: center;
align-items: center;
/* height: 75rpx; */
font-weight: 600;
background-color: #EFF5FE;
}
.tips {
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx;
background: #EFF5FE;
height: 110rpx;
width: 100%;
color: #3582EE;
font-size: 24rpx;
}
.tips .contentText {
margin-left: 20rpx;
margin-right: auto;
display: flex;
font-weight: 500;
flex-direction: column;
justify-content: space-between;
}
.btns-con {
box-sizing: border-box;
display: flex;
padding: 10rpx 0;
}
.btn-box .contentText {
margin: 0 20rpx;
}
.tipsIcon,
.closeIcon {
width: 32rpx;
height: 32rpx;
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.fullSucreen-tips {
padding-bottom: 210rpx !important;
}
\ No newline at end of file
......@@ -361,6 +361,13 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "2.1 权益订单补录",
"pathName": "packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!