--预存款部分完成
This commit is contained in:
parent
d725e5d01b
commit
0114259106
34
src/api/deposit.ts
Normal file
34
src/api/deposit.ts
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { useRequest } from "@/use/useHttp"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预存款信息获取
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const depositInfoApi = () => {
|
||||||
|
return useRequest({
|
||||||
|
url: `/v1/mall/rechargeApplication`,
|
||||||
|
method: "get",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预存款收支明细
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const depositListApi = () => {
|
||||||
|
return useRequest({
|
||||||
|
url: `/v1/mall/rechargeApplication/list`,
|
||||||
|
method: "get",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预存款收支明细详情
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const depositDetailApi = () => {
|
||||||
|
return useRequest({
|
||||||
|
url: `/v1/mall/rechargeApplication/order`,
|
||||||
|
method: "get",
|
||||||
|
})
|
||||||
|
}
|
@ -8,8 +8,8 @@
|
|||||||
// export const BASE_URL = `http://192.168.1.30:40001/lymarket` // 发
|
// export const BASE_URL = `http://192.168.1.30:40001/lymarket` // 发
|
||||||
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
|
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
|
||||||
// export const BASE_URL = `https://www.zzfzyc.com/lymarket` // 正式环境
|
// export const BASE_URL = `https://www.zzfzyc.com/lymarket` // 正式环境
|
||||||
// export const BASE_URL = `http://192.168.1.4:40001/lymarket` // 王霞
|
export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞
|
||||||
export const BASE_URL = `http://192.168.1.224:50001/lymarket` // 添
|
// export const BASE_URL = `http://192.168.1.224:50001/lymarket` // 添
|
||||||
// export const BASE_URL = `http://192.168.1.15:50001/lymarket` // 添
|
// export const BASE_URL = `http://192.168.1.15:50001/lymarket` // 添
|
||||||
|
|
||||||
// CDN
|
// CDN
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
export default {
|
export default {
|
||||||
navigationBarTitleText: ''
|
navigationBarTitleText: '',
|
||||||
|
enableShareAppMessage: true,
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
export default {
|
export default {
|
||||||
navigationBarTitleText: '地址管理'
|
navigationBarTitleText: '地址管理',
|
||||||
|
enableShareAppMessage: true,
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
export default {
|
export default {
|
||||||
navigationBarTitleText: '公司资料'
|
navigationBarTitleText: '公司资料',
|
||||||
|
enableShareAppMessage: true,
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
export default {
|
export default {
|
||||||
navigationBarTitleText: '授信额度'
|
navigationBarTitleText: '授信额度',
|
||||||
|
enableShareAppMessage: true,
|
||||||
}
|
}
|
||||||
|
@ -9,13 +9,13 @@
|
|||||||
.credit-line-tips{
|
.credit-line-tips{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 66px;
|
height: 66px;
|
||||||
background: #ecf5ff;
|
background: #FFE6CE;
|
||||||
border: 2px solid #cde5ff;
|
border: 2px solid #ffe6ce;
|
||||||
padding: 0 30px;
|
padding: 0 30px;
|
||||||
display: flex;align-items: center;
|
display: flex;align-items: center;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #007aff;
|
color: #EE7500;
|
||||||
}
|
}
|
||||||
.credit-line-tips text{
|
.credit-line-tips text{
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
@ -33,6 +33,7 @@
|
|||||||
display: flex;align-items: flex-end;
|
display: flex;align-items: flex-end;
|
||||||
padding: 30px 20px;
|
padding: 30px 20px;
|
||||||
border-bottom: 1px solid #f6f6f6;
|
border-bottom: 1px solid #f6f6f6;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
.credit-line-card-top-info{
|
.credit-line-card-top-info{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@ -58,6 +59,18 @@
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #ababab;
|
color: #ababab;
|
||||||
}
|
}
|
||||||
|
.credit-line-card-top-status{
|
||||||
|
padding: 0 20px;
|
||||||
|
height: 38px;
|
||||||
|
background: #ebfaea;
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #07c160;
|
||||||
|
display: flex;align-items: center;justify-content: center;
|
||||||
|
border-top-right-radius: 20px;
|
||||||
|
border-bottom-left-radius: 20px;
|
||||||
|
position: absolute;right: 0;top: 30px;
|
||||||
|
}
|
||||||
.credit-line-card-bottom{
|
.credit-line-card-bottom{
|
||||||
padding: 30px 0;
|
padding: 30px 0;
|
||||||
display: grid;
|
display: grid;
|
||||||
|
@ -6,7 +6,7 @@ import { useEffect, useState } from "react"
|
|||||||
import {creditInfoApi} from "@/api/creditLine"
|
import {creditInfoApi} from "@/api/creditLine"
|
||||||
import "./index.scss"
|
import "./index.scss"
|
||||||
import { useSelector } from "@/reducers/hooks";
|
import { useSelector } from "@/reducers/hooks";
|
||||||
import { formatPriceDiv } from "@/common/fotmat"
|
import { formatDateTime, formatPriceDiv } from "@/common/fotmat"
|
||||||
|
|
||||||
export default ()=>{
|
export default ()=>{
|
||||||
|
|
||||||
@ -20,7 +20,20 @@ export default ()=>{
|
|||||||
credit_quota_line: [0,"00"],
|
credit_quota_line: [0,"00"],
|
||||||
credit_quota_available_line: [0,"00"],
|
credit_quota_available_line: [0,"00"],
|
||||||
progress: 0,
|
progress: 0,
|
||||||
create_time: ""
|
create_time: "",
|
||||||
|
quota_status_name: "",
|
||||||
|
quota_status: "",
|
||||||
|
credit_quota_start_time: "",
|
||||||
|
credit_quota_end_time: ""
|
||||||
|
});
|
||||||
|
const [style, setStyle]= useState({
|
||||||
|
type: {},
|
||||||
|
cir: {
|
||||||
|
color: "",
|
||||||
|
background: {start: [], end: []}
|
||||||
|
},
|
||||||
|
available: {},
|
||||||
|
bottomTitle: {}
|
||||||
});
|
});
|
||||||
// 获取数据
|
// 获取数据
|
||||||
const getData = async ()=>{
|
const getData = async ()=>{
|
||||||
@ -28,20 +41,79 @@ export default ()=>{
|
|||||||
const credit_quota_used_line = convertPrice(formatPriceDiv(result.data.credit_quota_used_line));
|
const credit_quota_used_line = convertPrice(formatPriceDiv(result.data.credit_quota_used_line));
|
||||||
const credit_quota_line = convertPrice(formatPriceDiv(result.data.credit_quota_line));
|
const credit_quota_line = convertPrice(formatPriceDiv(result.data.credit_quota_line));
|
||||||
const credit_quota_available_line = convertPrice(formatPriceDiv(result.data.credit_quota_available_line));
|
const credit_quota_available_line = convertPrice(formatPriceDiv(result.data.credit_quota_available_line));
|
||||||
const progress = credit_quota_line[0] / credit_quota_available_line[0] * 100;
|
const progress = (credit_quota_available_line[0] / credit_quota_line[0] * 100).toFixed(0);
|
||||||
|
|
||||||
|
switch(Number(result.data.quota_status)){
|
||||||
|
case 0://暂未开通
|
||||||
|
setStyle({
|
||||||
|
type: {background: "#e4e4ff",color: "#1818B4" },
|
||||||
|
cir: {
|
||||||
|
color: "#707070",
|
||||||
|
background: {start: ["#727272", "#CDCDCD"] as any, end: ["#CDCDCD", "#EEEEEE"] as any}
|
||||||
|
},
|
||||||
|
available: {color: "#707070", textDecoration: "line-through"},
|
||||||
|
bottomTitle: {color: "#cccccc"}
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 1://申请中
|
||||||
|
setStyle({
|
||||||
|
type: {background: "#cde5ff",color: "#007AFF" },
|
||||||
|
cir: {
|
||||||
|
color: "#707070",
|
||||||
|
background: {start: ["#727272", "#CDCDCD"] as any, end: ["#CDCDCD", "#EEEEEE"] as any}
|
||||||
|
},
|
||||||
|
available: {color: "#707070", textDecoration: "line-through"},
|
||||||
|
bottomTitle: {color: "#cccccc"}
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 2://生效中
|
||||||
|
setStyle({
|
||||||
|
type: {background: "#cde5ff",color: "#007AFF" },
|
||||||
|
cir: {
|
||||||
|
color: "#007aff",
|
||||||
|
background: {start: ["#047CFF", "#51A4FF"] as any, end: ["#87C0FF", "#57A8FF"] as any}
|
||||||
|
},
|
||||||
|
available: {color: "#007aff"},
|
||||||
|
bottomTitle: {color: "#007AFF"}
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 3://已失效
|
||||||
|
setStyle({
|
||||||
|
type: {background: "#f6f6f6",color: "#ABABAB" },
|
||||||
|
cir: {
|
||||||
|
color: "#707070",
|
||||||
|
background: {start: ["#727272", "#CDCDCD"] as any, end: ["#CDCDCD", "#EEEEEE"] as any}
|
||||||
|
},
|
||||||
|
available: {color: "#707070", textDecoration: "line-through"},
|
||||||
|
bottomTitle: {color: "#cccccc"}
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 4://失效待还款
|
||||||
|
setStyle({
|
||||||
|
type: {background: "#FFE6CE",color: "#EE7500" },
|
||||||
|
cir: {
|
||||||
|
color: "#707070",
|
||||||
|
background: {start: ["#EF7907", "#FAC897"] as any, end: ["#FAC897", "#FFE6CE"] as any}
|
||||||
|
},
|
||||||
|
available: {color: "#EE7500"},
|
||||||
|
bottomTitle: {color: "#007AFF"}
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
setData({
|
setData({
|
||||||
...result.data,
|
...result.data,
|
||||||
progress,
|
progress,
|
||||||
credit_quota_used_line,
|
credit_quota_used_line,
|
||||||
credit_quota_line,
|
credit_quota_line,
|
||||||
credit_quota_available_line
|
credit_quota_available_line,
|
||||||
|
credit_quota_start_time: formatDateTime(result.data?.credit_quota_start_time, "YYYY-MM-DD"),
|
||||||
|
credit_quota_end_time: formatDateTime(result.data?.credit_quota_end_time, "YYYY-MM-DD"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const convertPrice = (data)=>{
|
const convertPrice = (data)=>{
|
||||||
var t = data.toString().split(".");
|
var t = data.toString().split(".");
|
||||||
t[0] = t[0].toLocaleString();
|
t[1] = t[1]?t[1].padEnd(2,0):"00";
|
||||||
t[1] = t[1]?t[1].padStart(2,0):"00";
|
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,27 +125,28 @@ export default ()=>{
|
|||||||
</View>
|
</View>
|
||||||
<View className="credit-line-card">
|
<View className="credit-line-card">
|
||||||
<View className="credit-line-card-top">
|
<View className="credit-line-card-top">
|
||||||
<View><Progress progress={data.progress} /></View>
|
<View><Progress progress={data.progress} style={style} /></View>
|
||||||
<View className="credit-line-card-top-info">
|
<View className="credit-line-card-top-info">
|
||||||
<View className="credit-line-card-top-info-title">可用额度</View>
|
<View className="credit-line-card-top-info-title">可用额度</View>
|
||||||
<View className="credit-line-card-top-info-price"><Text>¥</Text>{data.credit_quota_available_line[0]}<Text>.{data.credit_quota_available_line[1]}</Text></View>
|
<View className="credit-line-card-top-info-price" style={style.available}><Text>¥</Text>{Number(data.credit_quota_available_line[0])?.toLocaleString()}<Text>.{data.credit_quota_available_line[1]}</Text></View>
|
||||||
<View className="credit-line-card-top-info-date">有效期: {data.create_time} 2022-03-09至2022-05-13</View>
|
<View className="credit-line-card-top-info-date">有效期: {data?.credit_quota_start_time} 至{data?.credit_quota_end_time}</View>
|
||||||
</View>
|
</View>
|
||||||
|
<View className="credit-line-card-top-status" style={style.type}>{data.quota_status_name}</View>
|
||||||
</View>
|
</View>
|
||||||
<View className="credit-line-card-bottom">
|
<View className="credit-line-card-bottom">
|
||||||
<View className="credit-line-card-bottom-item">
|
<View className="credit-line-card-bottom-item">
|
||||||
<View className="credit-line-card-bottom-item-title">
|
<View className="credit-line-card-bottom-item-title">
|
||||||
<Text className="iconfont icon-yucunkuan"></Text>
|
<Text style={style.bottomTitle} className="iconfont icon-yucunkuan"></Text>
|
||||||
<View>总额度</View>
|
<View>总额度</View>
|
||||||
</View>
|
</View>
|
||||||
<View className="credit-line-card-bottom-item-price"><Text>¥</Text>{data.credit_quota_line[0]}<Text>.{data.credit_quota_line[1]}</Text></View>
|
<View className="credit-line-card-bottom-item-price"><Text>¥</Text>{Number(data.credit_quota_line[0])?.toLocaleString()}<Text>.{data.credit_quota_line[1]}</Text></View>
|
||||||
</View>
|
</View>
|
||||||
<View className="credit-line-card-bottom-item">
|
<View className="credit-line-card-bottom-item">
|
||||||
<View className="credit-line-card-bottom-item-title">
|
<View className="credit-line-card-bottom-item-title">
|
||||||
<Text className="iconfont icon-tick-pressed"></Text>
|
<Text style={style.bottomTitle} className="iconfont icon-tick-pressed"></Text>
|
||||||
<View>已用额度</View>
|
<View>已用额度</View>
|
||||||
</View>
|
</View>
|
||||||
<View className="credit-line-card-bottom-item-price"><Text>¥</Text>{data?.credit_quota_used_line[0]}<Text>.{data.credit_quota_used_line[1]}</Text></View>
|
<View className="credit-line-card-bottom-item-price"><Text>¥</Text>{Number(data?.credit_quota_used_line[0])?.toLocaleString()}<Text>.{data.credit_quota_used_line[1]}</Text></View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@ -86,6 +159,7 @@ const Progress = (props)=>{
|
|||||||
getCanvas();
|
getCanvas();
|
||||||
},[props.progress])
|
},[props.progress])
|
||||||
const getCanvas = ()=>{
|
const getCanvas = ()=>{
|
||||||
|
// const percentage = props.progress??0;
|
||||||
const percentage = props.progress??0;
|
const percentage = props.progress??0;
|
||||||
const query = Taro.createSelectorQuery();
|
const query = Taro.createSelectorQuery();
|
||||||
query.select("#myCanvas").fields({ node: true, size: true }).exec((res) => {
|
query.select("#myCanvas").fields({ node: true, size: true }).exec((res) => {
|
||||||
@ -134,7 +208,7 @@ const Progress = (props)=>{
|
|||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.restore();
|
ctx.restore();
|
||||||
|
|
||||||
ctx.fillStyle = "#007aff";
|
ctx.fillStyle = props.style?.cir?.color// "#007aff";
|
||||||
ctx.font="42px Cambria, Cambria-Bold";
|
ctx.font="42px Cambria, Cambria-Bold";
|
||||||
ctx.textAlign="center";
|
ctx.textAlign="center";
|
||||||
ctx.textBaseline="middle";
|
ctx.textBaseline="middle";
|
||||||
@ -146,8 +220,8 @@ const Progress = (props)=>{
|
|||||||
ctx.lineWidth = 25;
|
ctx.lineWidth = 25;
|
||||||
ctx.lineCap = "round";
|
ctx.lineCap = "round";
|
||||||
const gad = ctx.createLinearGradient(100,0,0,100);
|
const gad = ctx.createLinearGradient(100,0,0,100);
|
||||||
gad.addColorStop(0, "#047CFF");
|
gad.addColorStop(0, props.style?.cir?.background?.start[0]);
|
||||||
gad.addColorStop(1, "#51A4FF");
|
gad.addColorStop(1, props.style?.cir?.background?.start[1]);
|
||||||
ctx.strokeStyle = gad;
|
ctx.strokeStyle = gad;
|
||||||
ctx.arc(0,0,104,-Math.PI*0.5,2*Math.PI/100*((percentage<50?percentage:50)-25), false);
|
ctx.arc(0,0,104,-Math.PI*0.5,2*Math.PI/100*((percentage<50?percentage:50)-25), false);
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
@ -156,8 +230,8 @@ const Progress = (props)=>{
|
|||||||
if(percentage>50){
|
if(percentage>50){
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
const gad2 = ctx.createLinearGradient(0,-100,0,0);
|
const gad2 = ctx.createLinearGradient(0,-100,0,0);
|
||||||
gad2.addColorStop(0, "#87C0FF");
|
gad2.addColorStop(0, props.style?.cir?.background?.end[0]);
|
||||||
gad2.addColorStop(1, "#57A8FF");
|
gad2.addColorStop(1, props.style?.cir?.background?.start[1]);
|
||||||
ctx.strokeStyle = gad2;
|
ctx.strokeStyle = gad2;
|
||||||
ctx.arc(0,0,104,Math.PI*0.5,2*Math.PI/100*(percentage-25), false);
|
ctx.arc(0,0,104,Math.PI*0.5,2*Math.PI/100*(percentage-25), false);
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
export default {
|
export default {
|
||||||
navigationBarTitleText: '已用额度'
|
navigationBarTitleText: '已用额度',
|
||||||
|
enableShareAppMessage: true,
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
export default {
|
export default {
|
||||||
navigationBarTitleText: '预存款'
|
navigationBarTitleText: '预存款',
|
||||||
|
enableShareAppMessage: true,
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,23 @@
|
|||||||
background-color: #f3f3f3;
|
background-color: #f3f3f3;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
.deposit-beforehand-tips{
|
||||||
|
width: 100%;
|
||||||
|
height: 66px;
|
||||||
|
background: #FFE6CE;
|
||||||
|
border: 2px solid #ffe6ce;
|
||||||
|
padding: 0 30px;
|
||||||
|
display: flex;align-items: center;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #EE7500;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.deposit-beforehand-tips text{
|
||||||
|
margin-right: 10px;
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
.deposit-beforehand-card{
|
.deposit-beforehand-card{
|
||||||
width: 702px;
|
width: 702px;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
@ -52,7 +69,7 @@
|
|||||||
}
|
}
|
||||||
.deposit-beforehand-info-list{
|
.deposit-beforehand-info-list{
|
||||||
display: flex;align-items: center;
|
display: flex;align-items: center;
|
||||||
line-height: 60px;
|
margin-bottom: 38px;
|
||||||
}
|
}
|
||||||
.deposit-beforehand-info-list-left{
|
.deposit-beforehand-info-list-left{
|
||||||
width: 160px;
|
width: 160px;
|
||||||
|
@ -2,15 +2,34 @@
|
|||||||
|
|
||||||
import { Button, Canvas, Navigator, ScrollView, Text, View } from "@tarojs/components"
|
import { Button, Canvas, Navigator, ScrollView, Text, View } from "@tarojs/components"
|
||||||
import "./index.scss"
|
import "./index.scss"
|
||||||
|
import { depositInfoApi } from "@/api/deposit"
|
||||||
|
import { useEffect } from "react";
|
||||||
|
import { formatPriceDiv, toDecimal2 } from "@/common/fotmat";
|
||||||
|
import { setClipboardData } from "@tarojs/taro";
|
||||||
|
|
||||||
export default ()=>{
|
export default ()=>{
|
||||||
|
const {fetchData, state} = depositInfoApi();
|
||||||
|
const getData = async ()=>{
|
||||||
|
fetchData();
|
||||||
|
}
|
||||||
|
useEffect(() => {
|
||||||
|
getData();
|
||||||
|
}, []);
|
||||||
|
// 复制
|
||||||
|
const handleCopy = ()=>{
|
||||||
|
setClipboardData({data: state.data?.transfer_remittance_account})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className="deposit-beforehand">
|
<View className="deposit-beforehand">
|
||||||
|
<View className="deposit-beforehand-tips">
|
||||||
|
<Text className="iconfont icon-zhuyi"></Text> 汇款成功后,1-5分钟自动到账。
|
||||||
|
</View>
|
||||||
<View className="deposit-beforehand-card">
|
<View className="deposit-beforehand-card">
|
||||||
<View className="deposit-beforehand-balance">
|
<View className="deposit-beforehand-balance">
|
||||||
<View className="deposit-beforehand-balance-title">余额 (元)</View>
|
<View className="deposit-beforehand-balance-title">余额 (元)</View>
|
||||||
<Text className="deposit-beforehand-balance-price">999,999.20</Text>
|
<Text className="deposit-beforehand-balance-price">{toDecimal2(formatPriceDiv(state.data?.amount)).toLocaleString()}</Text>
|
||||||
<View className="deposit-beforehand-balance-button">转出</View>
|
<View className="deposit-beforehand-balance-button">转出</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@ -18,20 +37,20 @@ export default ()=>{
|
|||||||
<View className="deposit-beforehand-info">
|
<View className="deposit-beforehand-info">
|
||||||
<View className="deposit-beforehand-info-title">
|
<View className="deposit-beforehand-info-title">
|
||||||
<View className="deposit-beforehand-info-title-left"><Text></Text> 预存款充值</View>
|
<View className="deposit-beforehand-info-title-left"><Text></Text> 预存款充值</View>
|
||||||
<View className="deposit-beforehand-info-title-copy">复制</View>
|
<View className="deposit-beforehand-info-title-copy" onClick={handleCopy}>复制</View>
|
||||||
</View>
|
</View>
|
||||||
<View className="deposit-beforehand-info-content">
|
<View className="deposit-beforehand-info-content">
|
||||||
<View className="deposit-beforehand-info-list">
|
<View className="deposit-beforehand-info-list">
|
||||||
<View className="deposit-beforehand-info-list-left">开户名称</View>
|
<View className="deposit-beforehand-info-list-left">开户名称</View>
|
||||||
<View className="deposit-beforehand-info-list-right">佛山市浩川盛世科技有限公司</View>
|
<View className="deposit-beforehand-info-list-right">{state.data?.account_name}</View>
|
||||||
</View>
|
</View>
|
||||||
<View className="deposit-beforehand-info-list">
|
<View className="deposit-beforehand-info-list">
|
||||||
<View className="deposit-beforehand-info-list-left">开户银行</View>
|
<View className="deposit-beforehand-info-list-left">开户银行</View>
|
||||||
<View className="deposit-beforehand-info-list-right">招商银行汾江支行</View>
|
<View className="deposit-beforehand-info-list-right">{state.data?.bank_of_deposit}</View>
|
||||||
</View>
|
</View>
|
||||||
<View className="deposit-beforehand-info-list">
|
<View className="deposit-beforehand-info-list">
|
||||||
<View className="deposit-beforehand-info-list-left">专属汇款账号</View>
|
<View className="deposit-beforehand-info-list-left">专属汇款账号</View>
|
||||||
<View className="deposit-beforehand-info-list-right">62062342120001221231212</View>
|
<View className="deposit-beforehand-info-list-right">{state.data?.transfer_remittance_account}</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
export default {
|
export default {
|
||||||
navigationBarTitleText: '交易详情'
|
navigationBarTitleText: '交易详情',
|
||||||
|
enableShareAppMessage: true,
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,108 @@
|
|||||||
.deposit-detail{
|
.deposit-detail{
|
||||||
// height: 100vh;
|
// height: 100vh;
|
||||||
// background-color: #f3f3f3;
|
// background-color: #f3f3f3;
|
||||||
|
.deposit-detail-tips{
|
||||||
|
width: 100%;
|
||||||
|
height: 66px;
|
||||||
|
background: #FFE6CE;
|
||||||
|
border: 2px solid #ffe6ce;
|
||||||
|
padding: 0 30px;
|
||||||
|
display: flex;align-items: center;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #EE7500;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.deposit-detail-tips text{
|
||||||
|
margin-right: 10px;
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
&>view{
|
||||||
|
padding: 30px 0;
|
||||||
|
margin: 0 25px;
|
||||||
|
border-bottom: 1px solid #F6F6F6;
|
||||||
|
}
|
||||||
|
&>view:last-child{
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
.deposit-amount{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.deposit-type{
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #000000;
|
||||||
|
margin-bottom: 35px;
|
||||||
|
}
|
||||||
|
.deposit-price{
|
||||||
|
font-size: 40px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
.deposit-status{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.deposit-status-title{
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #707070;
|
||||||
|
margin-right: 105px;
|
||||||
|
}
|
||||||
|
.deposit-voucher-title{
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #707070;
|
||||||
|
margin-bottom: 28px;
|
||||||
|
}
|
||||||
|
.deposit-voucher-title::before{
|
||||||
|
content: "*";
|
||||||
|
color: #007AFF;
|
||||||
|
}
|
||||||
|
.deposit-voucher-content{
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(5, 1fr);
|
||||||
|
gap: 30px;
|
||||||
|
height: 98px;
|
||||||
|
}
|
||||||
|
.deposit-voucher-content image{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
.deposit-info-list{
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.deposit-info-list-title{
|
||||||
|
width: 140px;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #707070;
|
||||||
|
border-right: 1px solid #F0F0F0;
|
||||||
|
}
|
||||||
|
.deposit-info-list-content{
|
||||||
|
width: 468px;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #000000;
|
||||||
|
padding-left: 25px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.deposit-info-list-copy{
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #ababab;
|
||||||
|
padding-left: 18px;
|
||||||
|
border-left: 1px solid #F0F0F0;
|
||||||
|
}
|
||||||
|
|
||||||
.deposit-timeline{
|
.deposit-timeline{
|
||||||
|
|
||||||
}
|
}
|
||||||
.deposit-timeline-item{
|
.deposit-timeline-item{
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-left: 50px;
|
margin-left: 50px;
|
||||||
|
height: 100px;
|
||||||
}
|
}
|
||||||
.deposit-timeline-item-title{
|
.deposit-timeline-item-title{
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
@ -17,11 +113,11 @@
|
|||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #ababab;
|
color: #ababab;
|
||||||
margin-bottom: 55px;
|
|
||||||
}
|
}
|
||||||
.deposit-timeline-item-left{
|
.deposit-timeline-item-left{
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-right: 55px;
|
margin-right: 55px;
|
||||||
|
width: 12px;
|
||||||
}
|
}
|
||||||
.deposit-timeline-item-left::before{
|
.deposit-timeline-item-left::before{
|
||||||
content: " ";
|
content: " ";
|
||||||
@ -38,4 +134,23 @@
|
|||||||
position: absolute;top: 25px;bottom: -8px;
|
position: absolute;top: 25px;bottom: -8px;
|
||||||
left: 50%;transform: translateX(-50%);
|
left: 50%;transform: translateX(-50%);
|
||||||
}
|
}
|
||||||
|
.deposit-timeline-item-success,.deposit-timeline-item-error{
|
||||||
|
position: relative;
|
||||||
|
margin-right: 55px;
|
||||||
|
width: 12px;
|
||||||
|
}
|
||||||
|
.deposit-timeline-item-error Text,.deposit-timeline-item-success Text{
|
||||||
|
display: inline-block;
|
||||||
|
width: 38px;
|
||||||
|
height: 38px;
|
||||||
|
background: #007aff;
|
||||||
|
border-radius: 50%;
|
||||||
|
position: absolute;left: 50%;transform: translateX(-50%);
|
||||||
|
color: white;
|
||||||
|
font-size: 30px;
|
||||||
|
display: flex;align-items: center;justify-content: center;
|
||||||
|
}
|
||||||
|
.deposit-timeline-item-error Text{
|
||||||
|
background: #cccccc;
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
import AddressList from "@/components/AddressList"
|
import AddressList from "@/components/AddressList"
|
||||||
import InfiniteScroll from "@/components/infiniteScroll"
|
import InfiniteScroll from "@/components/infiniteScroll"
|
||||||
import { Button, Canvas, ScrollView, Text, View } from "@tarojs/components"
|
import { Button, Canvas, Image, ScrollView, Text, View } from "@tarojs/components"
|
||||||
import Taro, { useReady } from "@tarojs/taro"
|
import Taro, { useReady } from "@tarojs/taro"
|
||||||
import { useEffect, useState } from "react"
|
import { useEffect, useState } from "react"
|
||||||
import {creditListApi} from "@/api/creditLine"
|
import {creditListApi} from "@/api/creditLine"
|
||||||
@ -11,8 +11,49 @@ export default ()=>{
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View className="deposit-detail">
|
<View className="deposit-detail">
|
||||||
|
<View className="deposit-detail-tips">
|
||||||
|
<Text className="iconfont icon-zhuyi"></Text> 转入失败原因:付款凭证与实际转入信息不符,请重新上传。
|
||||||
|
</View>
|
||||||
|
<View className="deposit-amount">
|
||||||
|
<View className="deposit-type">转入 (元)</View>
|
||||||
|
<View className="deposit-price">999,999.20</View>
|
||||||
|
</View>
|
||||||
|
<View className="deposit-status">
|
||||||
|
<View className="deposit-status-title">状态</View>
|
||||||
<TimeLine/>
|
<TimeLine/>
|
||||||
</View>
|
</View>
|
||||||
|
<View className="deposit-voucher">
|
||||||
|
<View className="deposit-voucher-title">付款凭证</View>
|
||||||
|
<View className="deposit-voucher-content">
|
||||||
|
<Image src="https://seopic.699pic.com/photo/40216/8643.jpg_wh1200.jpg"/>
|
||||||
|
<Image src="https://seopic.699pic.com/photo/40216/8643.jpg_wh1200.jpg"/>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View className="deposit-info">
|
||||||
|
<View className="deposit-info-list">
|
||||||
|
<View className="deposit-info-list-title">银行流水号</View>
|
||||||
|
<View className="deposit-info-list-content">2278204399678121212121288</View>
|
||||||
|
<View className="deposit-info-list-copy">复制</View>
|
||||||
|
</View>
|
||||||
|
<View className="deposit-info-list">
|
||||||
|
<View className="deposit-info-list-title">付款人</View>
|
||||||
|
<View className="deposit-info-list-content">带生</View>
|
||||||
|
</View>
|
||||||
|
<View className="deposit-info-list">
|
||||||
|
<View className="deposit-info-list-title">付款账号</View>
|
||||||
|
<View className="deposit-info-list-content">带生</View>
|
||||||
|
<View className="deposit-info-list-copy">复制</View>
|
||||||
|
</View>
|
||||||
|
<View className="deposit-info-list">
|
||||||
|
<View className="deposit-info-list-title">联系方式</View>
|
||||||
|
<View className="deposit-info-list-content">带生</View>
|
||||||
|
</View>
|
||||||
|
<View className="deposit-info-list">
|
||||||
|
<View className="deposit-info-list-title">备注信息</View>
|
||||||
|
<View className="deposit-info-list-content">带生</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,6 +69,14 @@ const TimeLine = ()=>{
|
|||||||
</View>
|
</View>
|
||||||
<View className="deposit-timeline-item">
|
<View className="deposit-timeline-item">
|
||||||
<View className="deposit-timeline-item-left"></View>
|
<View className="deposit-timeline-item-left"></View>
|
||||||
|
<View className="deposit-timeline-item-right">
|
||||||
|
<View className="deposit-timeline-item-title">申请提交</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View className="deposit-timeline-item">
|
||||||
|
<View className="deposit-timeline-item-success">
|
||||||
|
<Text className="iconfont icon-tick" />
|
||||||
|
</View>
|
||||||
<View className="deposit-timeline-item-right">
|
<View className="deposit-timeline-item-right">
|
||||||
<View className="deposit-timeline-item-title">申请提交</View>
|
<View className="deposit-timeline-item-title">申请提交</View>
|
||||||
<View className="deposit-timeline-item-date">2022-04-24 16:10:11</View>
|
<View className="deposit-timeline-item-date">2022-04-24 16:10:11</View>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
export default {
|
export default {
|
||||||
navigationBarTitleText: '收支明细'
|
navigationBarTitleText: '收支明细',
|
||||||
|
enableShareAppMessage: true,
|
||||||
}
|
}
|
||||||
|
@ -1,71 +1,45 @@
|
|||||||
|
|
||||||
import AddressList from "@/components/AddressList"
|
import AddressList from "@/components/AddressList"
|
||||||
import InfiniteScroll from "@/components/infiniteScroll"
|
import InfiniteScrollPaging from "@/components/InfiniteScrollPaging"
|
||||||
import { Button, Canvas, ScrollView, Text, View } from "@tarojs/components"
|
import { Button, Canvas, ScrollView, Text, View } from "@tarojs/components"
|
||||||
import Taro, { useReady } from "@tarojs/taro"
|
import Taro, { useReady } from "@tarojs/taro"
|
||||||
import { useEffect, useState } from "react"
|
import { useCallback, useEffect, useState } from "react"
|
||||||
import {creditListApi} from "@/api/creditLine"
|
import { depositListApi } from "@/api/deposit"
|
||||||
import "./index.scss"
|
import "./index.scss"
|
||||||
|
import { formatDateTime, formatPriceDiv } from "@/common/fotmat"
|
||||||
|
|
||||||
export default ()=>{
|
export default ()=>{
|
||||||
useEffect(()=>{
|
const {fetchData, state} = depositListApi();
|
||||||
getData();
|
// 渲染(数据)
|
||||||
|
const [data, setData] = useState({
|
||||||
|
list: [],
|
||||||
|
total: 0
|
||||||
|
});
|
||||||
|
// 数据更新
|
||||||
|
const handleChange = useCallback((result)=>{
|
||||||
|
setData({
|
||||||
|
list: result.data.list,
|
||||||
|
total: result.data.total
|
||||||
|
})
|
||||||
}, [])
|
}, [])
|
||||||
const {fetchData, state} = creditListApi();
|
|
||||||
const data = Array.from({length: 10});
|
|
||||||
const getData = async ()=>{
|
|
||||||
fetchData();
|
|
||||||
}
|
|
||||||
// 刷新
|
|
||||||
const [refreshData, setRefreshData] = useState({
|
|
||||||
refreshStatus: false,
|
|
||||||
moreStatus: false,
|
|
||||||
statusMore: 1
|
|
||||||
})
|
|
||||||
const handleRefresh = async ()=>{
|
|
||||||
setRefreshData({
|
|
||||||
...refreshData,
|
|
||||||
refreshStatus: true
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
setTimeout(()=>{
|
|
||||||
setRefreshData({
|
|
||||||
...refreshData,
|
|
||||||
refreshStatus: false
|
|
||||||
})
|
|
||||||
}, 3000)
|
|
||||||
}
|
|
||||||
const handleMoreLoad = async ()=>{
|
|
||||||
setRefreshData({
|
|
||||||
...refreshData,
|
|
||||||
moreStatus: true
|
|
||||||
})
|
|
||||||
|
|
||||||
// setTimeout(()=>{
|
|
||||||
// setRefreshData({
|
|
||||||
// ...refreshData,
|
|
||||||
// moreStatus: false
|
|
||||||
// })
|
|
||||||
// },3000)
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className="credit-used">
|
<View className="credit-used">
|
||||||
<InfiniteScroll refresherEnabled={true} refresherTriggered={refreshData.refreshStatus} moreStatus={refreshData.moreStatus}
|
<InfiniteScrollPaging fetchData={fetchData} change={handleChange}>
|
||||||
selfOnRefresherRefresh={handleRefresh} selfonScrollToLower={handleMoreLoad} statusMore={refreshData.statusMore as any}>
|
|
||||||
{
|
{
|
||||||
data.map((item,index)=>{
|
data.list?.map((item,index)=>{
|
||||||
return (
|
return (
|
||||||
<View key={index} className="credit-used-list">
|
<View key={index} className="credit-used-list">
|
||||||
<View className="credit-used-list-left">
|
<View className="credit-used-list-left">
|
||||||
<View className="credit-used-list-type">下单</View>
|
<View className="credit-used-list-type">{(item as any).type_name}</View>
|
||||||
<View className="credit-used-list-date">2022-04-24 16:10:11</View>
|
<View className="credit-used-list-date">{formatDateTime((item as any).create_time)}</View>
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
<View className="credit-used-list-right">
|
<View className="credit-used-list-right">
|
||||||
<View>
|
<View>
|
||||||
<View className={`credit-used-list-price ${index%2==0?'green':'red'}`}>-999,999.00</View>
|
<View className={`credit-used-list-price ${(item as any).amount_received_this_time>0?'red':'green'}`}>
|
||||||
|
{(item as any).amount_received_this_time>0&&"+"}{formatPriceDiv((item as any).amount_received_this_time)}
|
||||||
|
</View>
|
||||||
<View className="credit-used-list-orderno">处理中</View>
|
<View className="credit-used-list-orderno">处理中</View>
|
||||||
</View>
|
</View>
|
||||||
<Text className="iconfont icon-a-moreback"></Text>
|
<Text className="iconfont icon-a-moreback"></Text>
|
||||||
@ -76,7 +50,7 @@ export default ()=>{
|
|||||||
}
|
}
|
||||||
{/* {data.length>0&&<View className="credit-used-list"></View>} */}
|
{/* {data.length>0&&<View className="credit-used-list"></View>} */}
|
||||||
<View className="credit-used-list"></View>
|
<View className="credit-used-list"></View>
|
||||||
</InfiniteScroll>
|
</InfiniteScrollPaging>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
export default {
|
export default {
|
||||||
navigationBarTitleText: '我的',
|
navigationBarTitleText: '我的',
|
||||||
navigationStyle: 'custom'
|
navigationStyle: 'custom',
|
||||||
|
enableShareAppMessage: true,
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
export default {
|
export default {
|
||||||
navigationBarTitleText: '编辑个人资料'
|
navigationBarTitleText: '编辑个人资料',
|
||||||
|
enableShareAppMessage: true,
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
export default {
|
export default {
|
||||||
navigationBarTitleText: '码单管理'
|
navigationBarTitleText: '码单管理',
|
||||||
|
enableShareAppMessage: true,
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
export default {
|
export default {
|
||||||
navigationBarTitleText: ''
|
navigationBarTitleText: '',
|
||||||
|
enableShareAppMessage: true,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user