✨ feat(收款):收款完成70%
This commit is contained in:
parent
d2a1441810
commit
5c2e3d46ac
@ -120,6 +120,27 @@
|
||||
"query": "orderId=28411",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/newCollection/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/addCollection/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/collectionDetail/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
}
|
||||
]
|
||||
}
|
||||
|
17
src/api/newCollection.ts
Normal file
17
src/api/newCollection.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { useRequest } from '@/use/useHttp'
|
||||
|
||||
//收款单列表
|
||||
export const mpcashManagementOrderlist = () => {
|
||||
return useRequest({
|
||||
url: `/v1/mp/cashManagementOrder/list`,
|
||||
method: "get",
|
||||
})
|
||||
}
|
||||
//收款单详情
|
||||
export const mpcashManagementOrder = () => {
|
||||
return useRequest({
|
||||
url: `/v1/mp/cashManagementOrder`,
|
||||
method: "get",
|
||||
})
|
||||
}
|
||||
|
@ -105,6 +105,30 @@ export default defineAppConfig({
|
||||
pages: [
|
||||
"index"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
root: "pages/newCollection",
|
||||
pages: [
|
||||
"index"
|
||||
]
|
||||
},
|
||||
{
|
||||
root: "pages/addCollection",
|
||||
pages: [
|
||||
"index"
|
||||
]
|
||||
},
|
||||
{
|
||||
root: "pages/accountPage",
|
||||
pages: [
|
||||
"index"
|
||||
]
|
||||
},
|
||||
{
|
||||
root: "pages/collectionDetail",
|
||||
pages: [
|
||||
"index"
|
||||
]
|
||||
},
|
||||
],
|
||||
})
|
||||
|
@ -1,4 +1,4 @@
|
||||
export const BASE_URL = CURRENT_BASE_URL
|
||||
// export const BASE_URL = CURRENT_BASE_URL
|
||||
// export const BASE_URL = `http://192.168.0.75:50001/lymarket`
|
||||
// export const BASE_URL = `http://192.168.0.89:50001/lymarket`
|
||||
// export const BASE_URL = `http://10.0.0.5:50001/lymarket`
|
||||
@ -14,6 +14,7 @@ export const BASE_URL = CURRENT_BASE_URL
|
||||
// export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞
|
||||
// export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添
|
||||
// export const BASE_URL = `http://192.168.1.42:50001/lymarket` // 杰
|
||||
export const BASE_URL = `http://192.168.1.95:40001/lymarket` // 华
|
||||
|
||||
// CDN
|
||||
// 生成密钥
|
||||
|
88
src/common/money.ts
Normal file
88
src/common/money.ts
Normal file
@ -0,0 +1,88 @@
|
||||
const smallToBig = function (money) {
|
||||
// 将数字金额转换为大写金额
|
||||
var cnNums = new Array(
|
||||
'零',
|
||||
'壹',
|
||||
'贰',
|
||||
'叁',
|
||||
'肆',
|
||||
'伍',
|
||||
'陆',
|
||||
'柒',
|
||||
'捌',
|
||||
'玖'
|
||||
); //汉字的数字
|
||||
var cnIntRadice = new Array('', '拾', '佰', '仟'); //基本单位
|
||||
var cnIntUnits = new Array('', '万', '亿', '兆'); //对应整数部分扩展单位
|
||||
var cnDecUnits = new Array('角', '分', '毫', '厘'); //对应小数部分单位
|
||||
var cnInteger = '整'; //整数金额时后面跟的字符
|
||||
var cnIntLast = '元'; //整数完以后的单位
|
||||
//最大处理的数字
|
||||
var maxNum = 999999999999999.9999;
|
||||
var integerNum; //金额整数部分
|
||||
var decimalNum; //金额小数部分
|
||||
//输出的中文金额字符串
|
||||
var chineseStr = '';
|
||||
var parts; //分离金额后用的数组,预定义
|
||||
if (money == '') {
|
||||
return '';
|
||||
}
|
||||
|
||||
money = parseFloat(money);
|
||||
if (money >= maxNum) {
|
||||
//超出最大处理数字
|
||||
return '超出最大处理数字';
|
||||
}
|
||||
if (money == 0) {
|
||||
chineseStr = cnNums[0] + cnIntLast + cnInteger;
|
||||
return chineseStr;
|
||||
}
|
||||
|
||||
//四舍五入保留两位小数,转换为字符串
|
||||
money = Math.round(money * 100).toString();
|
||||
integerNum = money.substr(0, money.length - 2);
|
||||
decimalNum = money.substr(money.length - 2);
|
||||
|
||||
//获取整型部分转换
|
||||
if (parseInt(integerNum, 10) > 0) {
|
||||
var zeroCount = 0;
|
||||
var IntLen = integerNum.length;
|
||||
for (var i = 0; i < IntLen; i++) {
|
||||
var n = integerNum.substr(i, 1);
|
||||
var p = IntLen - i - 1;
|
||||
var q = p / 4;
|
||||
var m = p % 4;
|
||||
if (n == '0') {
|
||||
zeroCount++;
|
||||
} else {
|
||||
if (zeroCount > 0) {
|
||||
chineseStr += cnNums[0];
|
||||
}
|
||||
//归零
|
||||
zeroCount = 0;
|
||||
chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
|
||||
}
|
||||
if (m == 0 && zeroCount < 4) {
|
||||
chineseStr += cnIntUnits[q];
|
||||
}
|
||||
}
|
||||
chineseStr += cnIntLast;
|
||||
}
|
||||
//小数部分
|
||||
if (decimalNum != '') {
|
||||
var decLen = decimalNum.length;
|
||||
for (var i = 0; i < decLen; i++) {
|
||||
var n = decimalNum.substr(i, 1);
|
||||
if (n != '0') {
|
||||
chineseStr += cnNums[Number(n)] + cnDecUnits[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (chineseStr == '') {
|
||||
chineseStr += cnNums[0] + cnIntLast + cnInteger;
|
||||
} else if (decimalNum == '' || /^0*$/.test(decimalNum)) {
|
||||
chineseStr += cnInteger;
|
||||
}
|
||||
return chineseStr;
|
||||
};
|
||||
export default smallToBig;
|
3
src/pages/accountPage/index.config.ts
Normal file
3
src/pages/accountPage/index.config.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export default {
|
||||
navigationBarTitleText: '收款账户',
|
||||
}
|
110
src/pages/accountPage/index.module.scss
Normal file
110
src/pages/accountPage/index.module.scss
Normal file
@ -0,0 +1,110 @@
|
||||
page {
|
||||
background: #f7f7f7;
|
||||
}
|
||||
|
||||
.cussBox {
|
||||
|
||||
.searchBox {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
width: 750px;
|
||||
height: 96px;
|
||||
background: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.two {
|
||||
width: 702px;
|
||||
height: 72px;
|
||||
margin-left: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.listBox {
|
||||
height: calc(100vh - 96px);
|
||||
}
|
||||
|
||||
.itemBox {
|
||||
margin-left: 24px;
|
||||
width: 702px;
|
||||
height: 104px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 24px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.cussName {
|
||||
margin-left: 48px;
|
||||
width: 168px;
|
||||
height: 34px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.phone {
|
||||
margin-left: 88px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.woker {
|
||||
margin-left: 88px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
.acticveitemBox {
|
||||
margin-left: 24px;
|
||||
width: 702px;
|
||||
height: 104px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 24px;
|
||||
box-sizing: border-box;
|
||||
|
||||
border: 1px solid #337FFF;
|
||||
|
||||
.cussName {
|
||||
margin-left: 48px;
|
||||
width: 168px;
|
||||
height: 34px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.phone {
|
||||
margin-left: 88px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.woker {
|
||||
margin-left: 88px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
}
|
151
src/pages/accountPage/index.tsx
Normal file
151
src/pages/accountPage/index.tsx
Normal file
@ -0,0 +1,151 @@
|
||||
import { View, ScrollView, Image, Input, Button } from '@tarojs/components'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState, memo } from 'react'
|
||||
import styles from "./index.module.scss"
|
||||
import classnames from "classnames";
|
||||
import Search from '@/components/search'
|
||||
import { mpenumsaleUserlist } from '@/api/order'
|
||||
import { useDidShow } from '@tarojs/taro';
|
||||
import Taro from '@tarojs/taro'
|
||||
import { useRouter } from '@tarojs/taro'
|
||||
import InfiniteScroll from '@/components/infiniteScroll'
|
||||
import { dataLoadingStatus, getFilterData } from '@/common/util'
|
||||
|
||||
export default () => {
|
||||
|
||||
|
||||
|
||||
const [search, setSearch] = useState({
|
||||
name: null,
|
||||
page: 1,
|
||||
size: 10,
|
||||
})
|
||||
const [clentList, setClientlist] = useState<{ list: any[]; total: number }>({ list: [], total: 0 })
|
||||
|
||||
const { fetchData: clitentFetch, state: orderState } = mpenumsaleUserlist()
|
||||
//数据加载状态
|
||||
const statusMore = useMemo(() => {
|
||||
return dataLoadingStatus({ list: clentList.list, total: clentList.total, status: orderState.loading })
|
||||
}, [clentList, orderState])
|
||||
|
||||
const [clientObj, setclientObj] = useState({
|
||||
bankId: null,
|
||||
bankName: ''
|
||||
})
|
||||
|
||||
//输入了搜索关键字
|
||||
const getSearchData = useCallback((eq) => {
|
||||
pageNum.current.page = 1
|
||||
setClientlist(() => ({ list: [], total: 0 }))
|
||||
setSearch((e) => ({ ...e, name: eq, size: 10 }))
|
||||
}, [])
|
||||
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
useEffect(() => {
|
||||
if (search.name === '') {
|
||||
setSearch((e) => ({ ...e, name: null }))
|
||||
}
|
||||
if (search.name !== '') getCuss()
|
||||
}, [search])
|
||||
|
||||
//上拉加载数据
|
||||
const pageNum = useRef({ size: search.size, page: search.page })
|
||||
const getScrolltolower = useCallback(() => {
|
||||
if (clentList.list.length < clentList.total) {
|
||||
pageNum.current.page++
|
||||
const size = pageNum.current.size * pageNum.current.page
|
||||
setSearch((e) => ({ ...e, size }))
|
||||
console.log(search, 11111)
|
||||
}
|
||||
}, [clentList])
|
||||
|
||||
//列表下拉刷新
|
||||
const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false)
|
||||
const getRefresherRefresh = async () => {
|
||||
pageNum.current.size = 1
|
||||
setRefresherTriggeredStatus(true)
|
||||
setSearch((val) => ({ ...val, size: 10 }))
|
||||
}
|
||||
const getCuss = async () => {
|
||||
let res = await clitentFetch({ name: search.name === null ? '' : search.name, page: search.page, size: search.size })
|
||||
if (router?.params.bankId) {
|
||||
res.data.list.map(item => {
|
||||
if (item.id == router?.params.bankId) {
|
||||
item.checked = true
|
||||
} else {
|
||||
item.checked = false
|
||||
}
|
||||
return item
|
||||
})
|
||||
}
|
||||
setClientlist((e) => ({ ...e, list: res.data?.list, total: res.data?.total }))
|
||||
setRefresherTriggeredStatus(() => false)
|
||||
}
|
||||
//选择业务员
|
||||
const selectClient = (item) => {
|
||||
clentList.list.map(it => {
|
||||
if (item.id === it.id) {
|
||||
it.checked = true
|
||||
} else {
|
||||
it.checked = false
|
||||
}
|
||||
return it
|
||||
})
|
||||
let pages = Taro.getCurrentPages(); // 获取当前的页面栈
|
||||
let prevPage = pages[pages.length - 2];
|
||||
prevPage.setData({ //设置上一个页面的值
|
||||
bankId: item.id,
|
||||
bankName: item.name
|
||||
});
|
||||
setClientlist((e) => ({ ...e, list: clentList?.list, total: clentList?.total }))
|
||||
setclientObj(item)
|
||||
Taro.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
useEffect(() => {
|
||||
if (clientObj?.bankId !== null) {
|
||||
setclientObj(clientObj)
|
||||
} else {
|
||||
let pages = Taro.getCurrentPages(); // 获取当前的页面栈
|
||||
let prevPage = pages[pages.length - 2];
|
||||
prevPage.setData({ //设置上一个页面的值
|
||||
bankId: '',
|
||||
bankName: '',
|
||||
});
|
||||
}
|
||||
}, [clientObj])
|
||||
return (
|
||||
<View className={styles.cussBox}>
|
||||
<View className={styles.searchBox}>
|
||||
<View className={styles.two}>
|
||||
<Search placeholder='请输入业务员名称' showBtn={false} changeOnSearch={getSearchData} debounceTime={300} />
|
||||
</View>
|
||||
|
||||
</View>
|
||||
<View className={styles.listBox}>
|
||||
<InfiniteScroll
|
||||
statusMore={statusMore}
|
||||
selfonScrollToLower={getScrolltolower}
|
||||
refresherEnabled={true}
|
||||
refresherTriggered={refresherTriggeredStatus}
|
||||
selfOnRefresherRefresh={getRefresherRefresh}>
|
||||
{
|
||||
clentList.list.map((item, index) => {
|
||||
return (
|
||||
<View className={classnames(item.checked ? styles.acticveitemBox : styles.itemBox)} key={index} onClick={() => { selectClient(item) }}>
|
||||
<View className={styles.cussName}>{item.name}</View>
|
||||
<View className={styles.phone}>{item.phone}</View>
|
||||
<View className={styles.woker}>{item.sale_user_name}</View>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
}
|
||||
</InfiniteScroll>
|
||||
</View>
|
||||
|
||||
|
||||
</View>
|
||||
)
|
||||
}
|
97
src/pages/addCollection/components/form/index.module.scss
Normal file
97
src/pages/addCollection/components/form/index.module.scss
Normal file
@ -0,0 +1,97 @@
|
||||
.itemBox {
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
display: flex;
|
||||
// align-items: center;
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px;
|
||||
|
||||
.itemLeft {
|
||||
|
||||
// align-items: center;
|
||||
.finkFlex {
|
||||
display: flex;
|
||||
|
||||
.itemTitle {
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.xing {
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
color: #E42945;
|
||||
margin-right: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
.finkFont {
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.bigPic {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.itemRight {
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// justify-content: space-between;
|
||||
width: 70%;
|
||||
// position: relative;
|
||||
|
||||
.assginFont {
|
||||
// position: absolute;
|
||||
// bottom: 10px;
|
||||
// left: 0px;
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.rightFlex {
|
||||
.placeholderStyle {
|
||||
color: #f7f7f7;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.inputStyle {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.iconFlex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.chakanquanbukehu2 {
|
||||
font-size: 50px !important;
|
||||
}
|
||||
|
||||
.shu {
|
||||
width: 2px;
|
||||
height: 36px;
|
||||
background: #000000;
|
||||
opacity: 0.2;
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
.saomiao {
|
||||
margin-left: 24px;
|
||||
color: #087EFF;
|
||||
font-size: 40px !important;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
101
src/pages/addCollection/components/form/index.tsx
Normal file
101
src/pages/addCollection/components/form/index.tsx
Normal file
@ -0,0 +1,101 @@
|
||||
import { ScrollView, View, Text, Input } from '@tarojs/components'
|
||||
import { memo, useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import styles from './index.module.scss'
|
||||
import classnames from 'classnames'
|
||||
// import BottomBtns from '@/components/BottomBtns'
|
||||
import { formatPriceDiv, formatDateTime } from '@/common/format'
|
||||
import Taro from '@tarojs/taro'
|
||||
import IconFont from '@/components/iconfont/iconfont'
|
||||
import UploadImage from '@/components/uploadImage'
|
||||
|
||||
interface Params {
|
||||
title?: string, //传入的名称
|
||||
require?: boolean, //是否显示必须选填的内容图标
|
||||
isInput?: boolean, //是否显示输入框
|
||||
inputValue?: string, //输入框的值
|
||||
inputType?: any, //输入框类型
|
||||
getInput?: (any) => void //输入框回调
|
||||
showScan?: boolean, //是否显示扫描图标
|
||||
placeholderFont?: string, //输入框默认文本
|
||||
showMore?: boolean, // 是否显示更多图标
|
||||
disabled?: boolean, // 是否输入框禁止
|
||||
onlyRead?: boolean, //图片是否只读
|
||||
showPic?: boolean, // 是否显示图片组件
|
||||
getImageList?: (any) => void //上传图片回调
|
||||
PicList?: [], //默认图片列表
|
||||
styleNone?: boolean, //根据不同的栏目调整样式
|
||||
getScan?: (any) => void, // 扫描
|
||||
navTo?: () => void, //跳转选择
|
||||
showSizeFont?: boolean, //展示金额的大写
|
||||
bigMoney?: any //展示的大写金额
|
||||
}
|
||||
|
||||
export default memo((pros: Params) => {
|
||||
|
||||
|
||||
return (
|
||||
<View className={styles.itemBox}
|
||||
style={{ justifyContent: `${pros.styleNone ? 'space-between' : ''}`, alignItems: `${pros.styleNone ? 'center' : ''}` }}>
|
||||
<View className={styles.itemLeft}
|
||||
|
||||
>
|
||||
<View className={styles.finkFlex}>
|
||||
<View className={styles.itemTitle}>{pros.title}</View>
|
||||
{
|
||||
pros.require && <Text className={styles.xing}>*</Text>
|
||||
}
|
||||
</View>
|
||||
{
|
||||
pros.showSizeFont && <View className={styles.finkFont}>展示大小写</View>
|
||||
}
|
||||
</View>
|
||||
{
|
||||
pros.showPic &&
|
||||
<View className={styles.bigPic}>
|
||||
<UploadImage onChange={pros.getImageList} defaultList={pros.PicList} onlyRead={pros.onlyRead} />
|
||||
</View>
|
||||
}
|
||||
{
|
||||
!pros.showPic && <View className={styles.itemRight} onClick={() => pros.navTo?.()}
|
||||
style={{
|
||||
justifyContent: `${!pros.showSizeFont ? 'space-between' : ''}`, alignItems: `${!pros.showSizeFont ? 'center' : ''}`,
|
||||
display: `${!pros.showSizeFont ? 'flex' : ''}`
|
||||
}}
|
||||
>
|
||||
<View className={styles.rightFlex}>
|
||||
{
|
||||
pros.isInput && <Input
|
||||
disabled={pros.disabled}
|
||||
placeholder={pros.placeholderFont}
|
||||
value={pros.inputValue}
|
||||
className={styles.inputStyle}
|
||||
type={pros.inputType}
|
||||
placeholderStyle={styles.placeholderStyle}
|
||||
onBlur={(e) => pros.getInput?.(e.detail.value)}
|
||||
></Input>
|
||||
}
|
||||
</View>
|
||||
|
||||
<View className={styles.iconFlex}></View>
|
||||
{
|
||||
pros.showMore && <IconFont name={'icon-chakanquanbukehu'} size={50} color={'#000000'}></IconFont>
|
||||
|
||||
|
||||
}
|
||||
{
|
||||
pros.showScan && <View className={styles.shu}></View>
|
||||
|
||||
}
|
||||
{
|
||||
pros.showScan && <View onClick={(e) => pros.getScan?.(e)}><IconFont name={'icon-saomiao'} size={50} color={'#337FFF'}></IconFont></View>
|
||||
|
||||
}
|
||||
{
|
||||
pros.showSizeFont && <View className={styles.assginFont}>{pros.bigMoney}</View>
|
||||
}
|
||||
</View>
|
||||
}
|
||||
|
||||
</View>
|
||||
)
|
||||
})
|
3
src/pages/addCollection/index.config.ts
Normal file
3
src/pages/addCollection/index.config.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export default {
|
||||
navigationBarTitleText: '新建收款单',
|
||||
}
|
96
src/pages/addCollection/index.module.scss
Normal file
96
src/pages/addCollection/index.module.scss
Normal file
@ -0,0 +1,96 @@
|
||||
.addBox {
|
||||
margin: 24px;
|
||||
padding: 0px 32px 40px 32px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16px 16px 0px 0px;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
.textAreaBox {
|
||||
margin-top: 40px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
|
||||
.textAreaLeft {
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.textAreaRight {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.numsTotal {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.bottomBox {
|
||||
width: 750px;
|
||||
height: 160px;
|
||||
background: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
z-index: 99;
|
||||
display: flex;
|
||||
padding-top: 16px;
|
||||
justify-content: space-between;
|
||||
|
||||
.resetBox {
|
||||
margin-left: 48px;
|
||||
width: 311px;
|
||||
height: 80px;
|
||||
border-radius: 44px;
|
||||
border: 1px solid #087EFF;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #337FFF;
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
}
|
||||
|
||||
.button {
|
||||
margin-right: 32px;
|
||||
width: 311px;
|
||||
height: 80px;
|
||||
background: #68b4ff;
|
||||
border-radius: 44px;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
}
|
||||
|
||||
.activeButton {
|
||||
margin-right: 32px;
|
||||
width: 311px;
|
||||
height: 80px;
|
||||
background: #337FFF;
|
||||
border-radius: 44px;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
.safeBox {
|
||||
height: 160px;
|
||||
width: 100%;
|
||||
}
|
198
src/pages/addCollection/index.tsx
Normal file
198
src/pages/addCollection/index.tsx
Normal file
@ -0,0 +1,198 @@
|
||||
import { View, Input, Button, Textarea } from '@tarojs/components'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState, } from 'react'
|
||||
import Search from '@/components/search'
|
||||
import { dataLoadingStatus, getFilterData } from '@/common/util'
|
||||
import styles from "./index.module.scss"
|
||||
import classnames from "classnames";
|
||||
import Popup from '@/components/popup'
|
||||
import InfiniteScroll from '@/components/infiniteScroll'
|
||||
import Taro, { faceVerifyForPay, useDidShow } from '@tarojs/taro'
|
||||
import Form from './components/form'
|
||||
import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/format'
|
||||
import {
|
||||
mpreturnApplyOrderlist
|
||||
} from "@/api/newCollection"
|
||||
import TimePicker from "@/components/timePicker"
|
||||
import dayjs from 'dayjs'
|
||||
import { alert } from "@/common/common"
|
||||
import smallToBig from '@/common/money'
|
||||
|
||||
export default () => {
|
||||
|
||||
useDidShow(() => {
|
||||
|
||||
//获取选择的客户
|
||||
let pages = Taro.getCurrentPages();
|
||||
let currPage = pages[pages.length - 1]; // 获取当前页面
|
||||
console.log(currPage.data, '8888')
|
||||
|
||||
setQuery((e) => ({
|
||||
...e,
|
||||
purchaser_id: currPage.data?.clientId ? currPage.data?.clientId : '',
|
||||
clientName: currPage.data?.clientName ? currPage.data?.clientName : '',
|
||||
// sale_user_id: currPage.data?.saleuserId ? currPage.data?.saleuserId : '',
|
||||
// saleuserName: currPage.data?.saleuserName ? currPage.data?.saleuserName : '',
|
||||
}))
|
||||
})
|
||||
|
||||
const [Query, setQuery] = useState<any>({})
|
||||
|
||||
//获取图片列表
|
||||
const picUrl = useRef([])
|
||||
const getImageList = useCallback((list) => {
|
||||
picUrl.current = list
|
||||
console.log(picUrl.current, 'picUrl.current')
|
||||
}, [])
|
||||
|
||||
|
||||
//扫描
|
||||
const handScan = (e) => {
|
||||
e.stopPropagation()
|
||||
Taro.scanCode({
|
||||
success(res) {
|
||||
// setsearchObj((e) => ({ ...e, orderNo: res.result }))
|
||||
},
|
||||
fail(res) {
|
||||
console.log(res);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
//选择内容跳转
|
||||
const navTo = (val) => {
|
||||
if (val === 1) {
|
||||
|
||||
} else {
|
||||
if (Query.purchaser_id == '') {
|
||||
return alert.error('请先选择客户')
|
||||
} else {
|
||||
Taro.navigateTo({
|
||||
url: '/pages/accountPage/id?' + Query.bankId
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//判断是否可以提交
|
||||
const isDisabled = useMemo(() => {
|
||||
if (Query.clientName == '' ||
|
||||
Query.money == '' ||
|
||||
Query.bankNum == '' ||
|
||||
picUrl.current.length == 0
|
||||
) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}, [])
|
||||
|
||||
//收款金额回调
|
||||
const getInput = (e) => {
|
||||
setQuery({ ...Query, money: e })
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
setQuery(Query)
|
||||
}, [Query])
|
||||
|
||||
|
||||
//备注信息
|
||||
const [TextareaValue, setTextareaValue] = useState('')
|
||||
const getDesc = (e) => {
|
||||
setQuery({ ...Query, nums: e.length })
|
||||
setTextareaValue(e)
|
||||
}
|
||||
|
||||
//取消返回
|
||||
const handCancl = () => {
|
||||
Taro.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<View className={styles.addBox}>
|
||||
<Form
|
||||
title={'客户名称'}
|
||||
require={true}
|
||||
isInput={true}
|
||||
disabled={true}
|
||||
placeholderFont={'请选择客户信息'}
|
||||
inputValue={Query.clientName}
|
||||
showMore={true}
|
||||
showScan={true}
|
||||
styleNone={true}
|
||||
showPic={false}
|
||||
getScan={(e) => handScan(e)}
|
||||
navTo={() => navTo(1)}
|
||||
showSizeFont={false}
|
||||
></Form>
|
||||
<Form
|
||||
title={'收款金额'}
|
||||
require={true}
|
||||
isInput={true}
|
||||
disabled={false}
|
||||
placeholderFont={'请输入金额'}
|
||||
inputType={'digit'}
|
||||
showMore={false}
|
||||
inputValue={Query.money}
|
||||
showScan={false}
|
||||
styleNone={true}
|
||||
showPic={false}
|
||||
getInput={(e) => getInput(e)}
|
||||
showSizeFont={true}
|
||||
bigMoney={smallToBig(typeof (Query.money) == 'undefined' ? 0 : Query.money)}
|
||||
></Form>
|
||||
<Form
|
||||
styleNone={false}
|
||||
title={'收款凭证'}
|
||||
require={true}
|
||||
isInput={false}
|
||||
showMore={false}
|
||||
showScan={false}
|
||||
showPic={true}
|
||||
getImageList={(list) => getImageList(list)}
|
||||
showSizeFont={false}
|
||||
></Form>
|
||||
<Form
|
||||
title={'收款账户'}
|
||||
require={false}
|
||||
isInput={true}
|
||||
disabled={true}
|
||||
placeholderFont={'请选择银行账号'}
|
||||
inputValue={Query.bankNum}
|
||||
showMore={true}
|
||||
showScan={false}
|
||||
styleNone={true}
|
||||
showPic={false}
|
||||
navTo={() => navTo(2)}
|
||||
showSizeFont={false}
|
||||
></Form>
|
||||
<View className={styles.textAreaBox}>
|
||||
<View className={styles.textAreaLeft}>备注信息</View>
|
||||
<View className={styles.textAreaRight}>
|
||||
<Textarea
|
||||
style={{ width: '70%' }}
|
||||
onInput={(e) => getDesc(e.detail.value)}
|
||||
value={TextareaValue}
|
||||
placeholderStyle='font-size: 28rpx;font-weight: 400;'
|
||||
autoFocus
|
||||
maxlength={64}
|
||||
placeholder={'请填写备注信息'}
|
||||
></Textarea>
|
||||
<View className={styles.numsTotal}>{`${typeof (Query.nums) == 'undefined' ? 0 : Query.nums}/64`}</View>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
|
||||
</View >
|
||||
<View className={styles.safeBox}> </View>
|
||||
<View className={styles.bottomBox}>
|
||||
<Button className={styles.resetBox} onClick={() => { handCancl() }}> 取消</Button >
|
||||
<Button className={classnames(isDisabled ? styles.button : styles.activeButton)} disabled={isDisabled} onClick={() => handSure()}> 提交</Button >
|
||||
</View>
|
||||
</>
|
||||
)
|
||||
}
|
97
src/pages/collectionDetail/components/form/index.module.scss
Normal file
97
src/pages/collectionDetail/components/form/index.module.scss
Normal file
@ -0,0 +1,97 @@
|
||||
.itemBox {
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
display: flex;
|
||||
// align-items: center;
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px;
|
||||
|
||||
.itemLeft {
|
||||
|
||||
// align-items: center;
|
||||
.finkFlex {
|
||||
display: flex;
|
||||
|
||||
.itemTitle {
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.xing {
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
color: #E42945;
|
||||
margin-right: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
.finkFont {
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.bigPic {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.itemRight {
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// justify-content: space-between;
|
||||
width: 70%;
|
||||
// position: relative;
|
||||
|
||||
.assginFont {
|
||||
// position: absolute;
|
||||
// bottom: 10px;
|
||||
// left: 0px;
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.rightFlex {
|
||||
.placeholderStyle {
|
||||
color: #f7f7f7;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.inputStyle {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.iconFlex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.chakanquanbukehu2 {
|
||||
font-size: 50px !important;
|
||||
}
|
||||
|
||||
.shu {
|
||||
width: 2px;
|
||||
height: 36px;
|
||||
background: #000000;
|
||||
opacity: 0.2;
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
.saomiao {
|
||||
margin-left: 24px;
|
||||
color: #087EFF;
|
||||
font-size: 40px !important;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
101
src/pages/collectionDetail/components/form/index.tsx
Normal file
101
src/pages/collectionDetail/components/form/index.tsx
Normal file
@ -0,0 +1,101 @@
|
||||
import { ScrollView, View, Text, Input } from '@tarojs/components'
|
||||
import { memo, useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import styles from './index.module.scss'
|
||||
import classnames from 'classnames'
|
||||
// import BottomBtns from '@/components/BottomBtns'
|
||||
import { formatPriceDiv, formatDateTime } from '@/common/format'
|
||||
import Taro from '@tarojs/taro'
|
||||
import IconFont from '@/components/iconfont/iconfont'
|
||||
import UploadImage from '@/components/uploadImage'
|
||||
|
||||
interface Params {
|
||||
title?: string, //传入的名称
|
||||
require?: boolean, //是否显示必须选填的内容图标
|
||||
isInput?: boolean, //是否显示输入框
|
||||
inputValue?: string, //输入框的值
|
||||
inputType?: any, //输入框类型
|
||||
getInput?: (any) => void //输入框回调
|
||||
showScan?: boolean, //是否显示扫描图标
|
||||
placeholderFont?: string, //输入框默认文本
|
||||
showMore?: boolean, // 是否显示更多图标
|
||||
disabled?: boolean, // 是否输入框禁止
|
||||
onlyRead?: boolean, //图片是否只读
|
||||
showPic?: boolean, // 是否显示图片组件
|
||||
getImageList?: (any) => void //上传图片回调
|
||||
PicList?: any[], //默认图片列表
|
||||
styleNone?: boolean, //根据不同的栏目调整样式
|
||||
getScan?: (any) => void, // 扫描
|
||||
navTo?: () => void, //跳转选择
|
||||
showSizeFont?: boolean, //展示金额的大写
|
||||
bigMoney?: any //展示的大写金额
|
||||
}
|
||||
|
||||
export default memo((pros: Params) => {
|
||||
|
||||
|
||||
return (
|
||||
<View className={styles.itemBox}
|
||||
style={{ justifyContent: `${pros.styleNone ? 'space-between' : ''}`, alignItems: `${pros.styleNone ? 'center' : ''}` }}>
|
||||
<View className={styles.itemLeft}
|
||||
|
||||
>
|
||||
<View className={styles.finkFlex}>
|
||||
<View className={styles.itemTitle}>{pros.title}</View>
|
||||
{
|
||||
pros.require && <Text className={styles.xing}>*</Text>
|
||||
}
|
||||
</View>
|
||||
{
|
||||
pros.showSizeFont && <View className={styles.finkFont}>展示大小写</View>
|
||||
}
|
||||
</View>
|
||||
{
|
||||
pros.showPic &&
|
||||
<View className={styles.bigPic}>
|
||||
<UploadImage onChange={pros.getImageList} defaultList={pros.PicList} onlyRead={pros.onlyRead} />
|
||||
</View>
|
||||
}
|
||||
{
|
||||
!pros.showPic && <View className={styles.itemRight} onClick={() => pros.navTo?.()}
|
||||
style={{
|
||||
justifyContent: `${!pros.showSizeFont ? 'space-between' : ''}`, alignItems: `${!pros.showSizeFont ? 'center' : ''}`,
|
||||
display: `${!pros.showSizeFont ? 'flex' : ''}`
|
||||
}}
|
||||
>
|
||||
<View className={styles.rightFlex}>
|
||||
{
|
||||
pros.isInput && <Input
|
||||
disabled={pros.disabled}
|
||||
placeholder={pros.placeholderFont}
|
||||
value={pros.inputValue}
|
||||
className={styles.inputStyle}
|
||||
type={pros.inputType}
|
||||
placeholderStyle={styles.placeholderStyle}
|
||||
onBlur={(e) => pros.getInput?.(e.detail.value)}
|
||||
></Input>
|
||||
}
|
||||
</View>
|
||||
|
||||
<View className={styles.iconFlex}></View>
|
||||
{
|
||||
pros.showMore && <IconFont name={'icon-chakanquanbukehu'} size={50} color={'#000000'}></IconFont>
|
||||
|
||||
|
||||
}
|
||||
{
|
||||
pros.showScan && <View className={styles.shu}></View>
|
||||
|
||||
}
|
||||
{
|
||||
pros.showScan && <View onClick={(e) => pros.getScan?.(e)}><IconFont name={'icon-saomiao'} size={50} color={'#337FFF'}></IconFont></View>
|
||||
|
||||
}
|
||||
{
|
||||
pros.showSizeFont && <View className={styles.assginFont}>{pros.bigMoney}</View>
|
||||
}
|
||||
</View>
|
||||
}
|
||||
|
||||
</View>
|
||||
)
|
||||
})
|
3
src/pages/collectionDetail/index.config.ts
Normal file
3
src/pages/collectionDetail/index.config.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export default {
|
||||
navigationBarTitleText: '新建收款单',
|
||||
}
|
71
src/pages/collectionDetail/index.module.scss
Normal file
71
src/pages/collectionDetail/index.module.scss
Normal file
@ -0,0 +1,71 @@
|
||||
.addBox {
|
||||
margin: 24px;
|
||||
padding: 0px 32px 40px 32px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16px 16px 0px 0px;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
.textAreaBox {
|
||||
margin-top: 40px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
|
||||
.textAreaLeft {
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.textAreaRight {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.numsTotal {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.msgBox {
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px;
|
||||
justify-content: space-between;
|
||||
|
||||
.msgLeft {
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.msgFlex {
|
||||
width: 70%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.msgName {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.msgTime {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
}
|
144
src/pages/collectionDetail/index.tsx
Normal file
144
src/pages/collectionDetail/index.tsx
Normal file
@ -0,0 +1,144 @@
|
||||
import { View, Input, Button, Textarea } from '@tarojs/components'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState, } from 'react'
|
||||
import Search from '@/components/search'
|
||||
import { dataLoadingStatus, getFilterData } from '@/common/util'
|
||||
import styles from "./index.module.scss"
|
||||
import classnames from "classnames";
|
||||
import Popup from '@/components/popup'
|
||||
import InfiniteScroll from '@/components/infiniteScroll'
|
||||
import Taro, { faceVerifyForPay, useDidShow, useRouter } from '@tarojs/taro'
|
||||
import Form from './components/form'
|
||||
import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/format'
|
||||
import {
|
||||
mpcashManagementOrder
|
||||
} from "@/api/newCollection"
|
||||
import TimePicker from "@/components/timePicker"
|
||||
import dayjs from 'dayjs'
|
||||
import { alert } from "@/common/common"
|
||||
import smallToBig from '@/common/money'
|
||||
import { IMG_CND_Prefix } from "@/common/constant";
|
||||
|
||||
export default () => {
|
||||
|
||||
const router = useRouter()
|
||||
const [Query, setQuery] = useState<any>({})
|
||||
const { fetchData: getFetch } = mpcashManagementOrder()
|
||||
useEffect(() => {
|
||||
getDetail()
|
||||
}, [])
|
||||
const getDetail = async () => {
|
||||
Taro.showLoading({
|
||||
title: '请稍等',
|
||||
mask: true
|
||||
})
|
||||
const res = await getFetch({ id: Number(router.params.id) })
|
||||
if (res.data) {
|
||||
// res.data?.payment_credential_url?.map(it => {
|
||||
// it = IMG_CND_Prefix + it
|
||||
// return it
|
||||
// })
|
||||
// console.log(res.data, 4444)
|
||||
Taro.hideLoading()
|
||||
setQuery(res.data)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
setQuery(Query)
|
||||
}, [Query])
|
||||
|
||||
const money = useMemo(() => {
|
||||
let res = 0
|
||||
res = Query.receipt_amount / 100
|
||||
return res
|
||||
}, [Query])
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<View className={styles.addBox}>
|
||||
<Form
|
||||
title={'客户名称'}
|
||||
require={false}
|
||||
isInput={true}
|
||||
disabled={true}
|
||||
inputValue={Query.purchaser_name}
|
||||
showMore={false}
|
||||
showScan={false}
|
||||
styleNone={true}
|
||||
showPic={false}
|
||||
showSizeFont={false}
|
||||
></Form>
|
||||
<Form
|
||||
title={'收款金额'}
|
||||
require={false}
|
||||
isInput={true}
|
||||
disabled={true}
|
||||
inputType={'digit'}
|
||||
showMore={false}
|
||||
inputValue={money as any}
|
||||
showScan={false}
|
||||
styleNone={true}
|
||||
showPic={false}
|
||||
showSizeFont={true}
|
||||
bigMoney={smallToBig(typeof (money) == 'undefined' ? 0 : money)}
|
||||
></Form>
|
||||
<Form
|
||||
styleNone={false}
|
||||
title={'收款凭证'}
|
||||
require={false}
|
||||
PicList={Query.payment_credential_url}
|
||||
isInput={false}
|
||||
showMore={false}
|
||||
showScan={false}
|
||||
onlyRead={true}
|
||||
showPic={true}
|
||||
showSizeFont={false}
|
||||
></Form>
|
||||
<Form
|
||||
title={'收款账户'}
|
||||
require={false}
|
||||
isInput={true}
|
||||
disabled={true}
|
||||
inputValue={Query.receiving_account}
|
||||
showMore={false}
|
||||
showScan={false}
|
||||
styleNone={true}
|
||||
showPic={false}
|
||||
showSizeFont={false}
|
||||
></Form>
|
||||
<View className={styles.textAreaBox}>
|
||||
<View className={styles.textAreaLeft}>备注信息</View>
|
||||
<View className={styles.textAreaRight}>
|
||||
<Textarea
|
||||
disabled={true}
|
||||
style={{ width: '70%' }}
|
||||
value={Query.remark}
|
||||
placeholderStyle='font-size: 28rpx;font-weight: 400;'
|
||||
autoFocus
|
||||
maxlength={64}
|
||||
placeholder={'请填写备注信息'}
|
||||
></Textarea>
|
||||
{/* <View className={styles.numsTotal}>{`${typeof (Query.nums) == 'undefined' ? 0 : Query.nums}/64`}</View> */}
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.msgBox}>
|
||||
<View className={styles.msgLeft}>创建信息</View>
|
||||
<View className={styles.msgFlex}>
|
||||
<View className={styles.msgName}>{Query.creator_name}</View>
|
||||
<View className={styles.msgTime}>{formatDateTime(Query.create_time)}</View>
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.msgBox} style={{ borderBottom: 'none', paddingBottom: '10rpx' }}>
|
||||
<View className={styles.msgLeft}>审核信息</View>
|
||||
<View className={styles.msgFlex}>
|
||||
<View className={styles.msgName}>{Query.auditor_name}</View>
|
||||
<View className={styles.msgTime}>{formatDateTime(Query.audit_time)}</View>
|
||||
</View>
|
||||
</View>
|
||||
</View >
|
||||
</>
|
||||
)
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
.itemBox {
|
||||
margin: 24px;
|
||||
height: 383px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16px;
|
||||
padding: 0px 32px 32px 32px;
|
||||
position: relative;
|
||||
|
||||
.itemTop {
|
||||
width: 100%;
|
||||
height: 82px;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.itemTopLeft {
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.itemTopRight {
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
color: #E42945;
|
||||
}
|
||||
}
|
||||
|
||||
.flexBox {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
|
||||
.flexLeft1 {
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.flexRight1 {
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.flexLeft {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.flexRight {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
.btnAnd {
|
||||
position: absolute;
|
||||
width: 160px;
|
||||
height: 72px;
|
||||
border-radius: 40px;
|
||||
opacity: 0.6;
|
||||
border: 1px solid #000000;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
line-height: 72px;
|
||||
right: 32px;
|
||||
bottom: 32px;
|
||||
}
|
||||
}
|
54
src/pages/newCollection/components/itemList/index.tsx
Normal file
54
src/pages/newCollection/components/itemList/index.tsx
Normal file
@ -0,0 +1,54 @@
|
||||
import { ScrollView, View } from '@tarojs/components'
|
||||
import { memo, useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import styles from './index.module.scss'
|
||||
import classnames from 'classnames'
|
||||
// import BottomBtns from '@/components/BottomBtns'
|
||||
import { formatPriceDiv, formatDateTime } from '@/common/format'
|
||||
import Taro from '@tarojs/taro'
|
||||
import { navigateTo } from '@tarojs/router'
|
||||
|
||||
interface Params {
|
||||
obj: any
|
||||
}
|
||||
|
||||
export default memo((pros: Params) => {
|
||||
|
||||
|
||||
const navTo = () => {
|
||||
Taro.navigateTo({
|
||||
url: '/pages/collectionDetail/index?id=' + pros.obj.id
|
||||
})
|
||||
}
|
||||
|
||||
const styleColor = useMemo(() => {
|
||||
if (pros.obj.auditor_status_name == '待审核') {
|
||||
return '#E42945'
|
||||
} else if (pros.obj.auditor_status_name == '已审核') {
|
||||
return '#337FFF'
|
||||
} else if (pros.obj.auditor_status_name == '已拒绝') {
|
||||
return '#000000'
|
||||
}
|
||||
}, [pros.obj])
|
||||
|
||||
return (
|
||||
<View className={styles.itemBox}>
|
||||
<View className={styles.itemTop}>
|
||||
<View className={styles.itemTopLeft}>{pros.obj.purchaser_name}</View>
|
||||
<View className={styles.itemTopRight} style={{ color: styleColor }}>{pros.obj.auditor_status_name}</View>
|
||||
</View>
|
||||
<View className={styles.flexBox}>
|
||||
<View className={styles.flexLeft1}>转账金额:</View>
|
||||
<View className={styles.flexRight1}>¥{formatPriceDiv(pros.obj.receipt_amount)}</View>
|
||||
</View>
|
||||
<View className={styles.flexBox}>
|
||||
<View className={styles.flexLeft}>待认款金额:</View>
|
||||
<View className={styles.flexRight}>¥{formatPriceDiv(pros.obj.pending_distribute_amount)}</View>
|
||||
</View>
|
||||
<View className={styles.flexBox}>
|
||||
<View className={styles.flexLeft}>收款时间:</View>
|
||||
<View className={styles.flexRight}>{formatDateTime(pros.obj.create_time)}</View>
|
||||
</View>
|
||||
<View className={styles.btnAnd} onClick={() => navTo()}>查看详情</View>
|
||||
</View>
|
||||
)
|
||||
})
|
3
src/pages/newCollection/index.config.ts
Normal file
3
src/pages/newCollection/index.config.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export default {
|
||||
navigationBarTitleText: '收款列表',
|
||||
}
|
232
src/pages/newCollection/index.module.scss
Normal file
232
src/pages/newCollection/index.module.scss
Normal file
@ -0,0 +1,232 @@
|
||||
.flexBox {
|
||||
display: flex;
|
||||
width: 200px;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.icon_shaixuan {
|
||||
color: #0D7CFF;
|
||||
font-size: 35px !important;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.activeshaixuan {
|
||||
color: #000;
|
||||
font-size: 35px !important;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.shaixuan {
|
||||
margin-right: 32px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.activeshai {
|
||||
color: #0D7CFF;
|
||||
margin-right: 32px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.order_list {
|
||||
height: calc(100vh - 300px);
|
||||
background: #f7f7f7;
|
||||
|
||||
.bigBpx {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.kongboxTwo {
|
||||
height: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.fixedBox {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 64px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.addBtn {
|
||||
width: 490px;
|
||||
height: 80px;
|
||||
background: #337FFF;
|
||||
border-radius: 44px;
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.pageTop {
|
||||
width: 100%;
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.pageTopLeft {
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
.pageTopRight {
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
margin-right: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.popupBox {
|
||||
|
||||
// padding: 48px;
|
||||
.timeFlex {
|
||||
display: flex;
|
||||
padding-left: 48px;
|
||||
|
||||
.timeOne {
|
||||
width: 319px;
|
||||
height: 68px;
|
||||
background: #E9E9E9;
|
||||
border-radius: 8px;
|
||||
opacity: 0.4;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
line-height: 68px;
|
||||
border: 1px solid #f7f7f7;
|
||||
box-sizing: border-box;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.activetimeOne {
|
||||
width: 319px;
|
||||
height: 68px;
|
||||
background: rgba(51, 127, 255, 0.1);
|
||||
border-radius: 8px;
|
||||
border: 1px solid #337FFF;
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
color: #337FFF;
|
||||
margin-right: 16px;
|
||||
text-align: center;
|
||||
line-height: 68px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.timeBox2 {
|
||||
margin-top: 16px;
|
||||
margin-right: 48px;
|
||||
margin-left: 48px;
|
||||
height: 68px;
|
||||
background: #E9E9E9;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
line-height: 68px;
|
||||
position: relative;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
margin-bottom: 72px;
|
||||
|
||||
.more {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: 5px;
|
||||
font-size: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.activetimeBox2 {
|
||||
margin-top: 16px;
|
||||
margin-right: 48px;
|
||||
margin-left: 48px;
|
||||
background: rgba(51, 127, 255, 0.1);
|
||||
height: 68px;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
line-height: 68px;
|
||||
position: relative;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #337FFF;
|
||||
margin-bottom: 72px;
|
||||
border: 1px solid #337FFF;
|
||||
|
||||
.more {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: 5px;
|
||||
font-size: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.bottomBox {
|
||||
height: 160px;
|
||||
background: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
z-index: 99;
|
||||
display: flex;
|
||||
padding-top: 16px;
|
||||
justify-content: space-between;
|
||||
width: 100vw;
|
||||
|
||||
.resetBox {
|
||||
width: 311px;
|
||||
height: 80px;
|
||||
border-radius: 44px;
|
||||
border: 1px solid #087EFF;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #337FFF;
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
}
|
||||
|
||||
.button {
|
||||
width: 311px;
|
||||
height: 80px;
|
||||
background: #68b4ff;
|
||||
border-radius: 44px;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
margin-right: 48px;
|
||||
}
|
||||
|
||||
.activeButton {
|
||||
margin-right: 48px;
|
||||
width: 311px;
|
||||
height: 80px;
|
||||
background: #337FFF;
|
||||
border-radius: 44px;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
}
|
||||
}
|
||||
}
|
292
src/pages/newCollection/index.tsx
Normal file
292
src/pages/newCollection/index.tsx
Normal file
@ -0,0 +1,292 @@
|
||||
import { View, Input, Button } from '@tarojs/components'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState, } from 'react'
|
||||
import Search from '@/components/search'
|
||||
import { dataLoadingStatus, getFilterData } from '@/common/util'
|
||||
import styles from "./index.module.scss"
|
||||
import classnames from "classnames";
|
||||
import Popup from '@/components/popup'
|
||||
import InfiniteScroll from '@/components/infiniteScroll'
|
||||
import Taro, { faceVerifyForPay, useDidShow } from '@tarojs/taro'
|
||||
import ItemList from './components/itemList'
|
||||
import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/format'
|
||||
import {
|
||||
mpcashManagementOrderlist
|
||||
} from "@/api/newCollection"
|
||||
import TimePicker from "@/components/timePicker"
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
export default () => {
|
||||
let myDate = new Date();
|
||||
const [searchField, setSearchField] = useState<
|
||||
{
|
||||
page: number;
|
||||
size: number;
|
||||
search_name: string;
|
||||
start_time: number | string;
|
||||
end_time: number | string;
|
||||
}>({
|
||||
page: 1,
|
||||
size: 10,
|
||||
search_name: '',
|
||||
start_time: `${dayjs(new Date(myDate?.toLocaleDateString() + ' ' + '00:00:00',)).format('YYYY-MM-DD')} 00:00:00`,
|
||||
end_time: `${dayjs(new Date(myDate?.toLocaleDateString() + ' ' + '00:00:00',)).add(14, 'day').format('YYYY-MM-DD')} 00:00:00`,
|
||||
})
|
||||
const pageNum = useRef({ size: searchField.size, page: searchField.page })
|
||||
|
||||
//监听筛选条件变化
|
||||
useEffect(() => {
|
||||
getOrderList()
|
||||
}, [searchField.size, searchField.search_name])
|
||||
//输入了搜索关键字
|
||||
const getSearchData = useCallback((e) => {
|
||||
pageNum.current.page = 1
|
||||
setOrderData(() => ({ list: [], total: 0 }))
|
||||
setSearchField((val) => ({ ...val, search_name: e, size: 10 }))
|
||||
}, [])
|
||||
|
||||
|
||||
//获取订单列表
|
||||
const { fetchData: listFetchData, state: orderState } = mpcashManagementOrderlist()
|
||||
const [orderData, setOrderData] = useState<{ list: any[]; total: number, summary?: any }>({ list: [], total: 0, summary: {} })
|
||||
const getOrderList = async () => {
|
||||
let res = await listFetchData({
|
||||
...searchField
|
||||
})
|
||||
setOrderData((e) => ({ ...e, list: res.data?.list, total: res.data?.total, summary: res.data?.summary }))
|
||||
// setshowPopup(false)
|
||||
setRefresherTriggeredStatus(false)
|
||||
}
|
||||
|
||||
//列表下拉刷新
|
||||
const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false)
|
||||
const getRefresherRefresh = async () => {
|
||||
pageNum.current.page = 1
|
||||
// pageNum.current.size = 10
|
||||
setRefresherTriggeredStatus(true)
|
||||
getOrderList()
|
||||
setSearchField((val) => ({ ...val, size: 10 }))
|
||||
}
|
||||
//数据加载状态
|
||||
const statusMore = useMemo(() => {
|
||||
return dataLoadingStatus({ list: orderData.list, total: orderData.total, status: orderState.loading })
|
||||
}, [orderData, orderState])
|
||||
|
||||
//上拉加载数据
|
||||
const getScrolltolower = useCallback(() => {
|
||||
if (orderData.list.length < orderData.total) {
|
||||
pageNum.current.page++
|
||||
const size = pageNum.current.size * pageNum.current.page
|
||||
console.log(pageNum.current.page, 'pageNum.current.page')
|
||||
console.log(size, 123123)
|
||||
setSearchField({ ...searchField, size })
|
||||
}
|
||||
}, [orderData])
|
||||
|
||||
//是否不允许确认筛选
|
||||
const isDisabled = useMemo(() => {
|
||||
// if (searchField.stage !== '不限' ||
|
||||
// searchField.sale_mode !== '不限' ||
|
||||
// searchField.return_type !== '不限' ||
|
||||
// searchField.start_time !== '' ||
|
||||
// searchField.end_time !== ''
|
||||
// ) {
|
||||
// return false
|
||||
// } else {
|
||||
// return true
|
||||
// }
|
||||
return false
|
||||
}, [])
|
||||
|
||||
//新建收款
|
||||
const handAdd = () => {
|
||||
Taro.navigateTo({
|
||||
url: '/pages/addCollection/index'
|
||||
})
|
||||
}
|
||||
|
||||
//筛选弹出
|
||||
|
||||
const [SelectPopup, setSelectPopup] = useState(false)
|
||||
|
||||
//时间数组
|
||||
const [TimeList, setTimeList] = useState<any[]>(
|
||||
[
|
||||
{
|
||||
id: 1,
|
||||
name: '默认14天内',
|
||||
start_time: `${dayjs(new Date(myDate?.toLocaleDateString() + ' ' + '00:00:00',)).format('YYYY-MM-DD')} 00:00:00`,
|
||||
end_time: `${dayjs(new Date(myDate?.toLocaleDateString() + ' ' + '00:00:00',)).add(14, 'day').format('YYYY-MM-DD')} 00:00:00`,
|
||||
checked: true
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '展示全部日期',
|
||||
start_time: '',
|
||||
end_time: '',
|
||||
checked: false
|
||||
}
|
||||
]
|
||||
)
|
||||
|
||||
//选择时间item
|
||||
const handSelect = (it) => {
|
||||
TimeList.map(item => {
|
||||
if (item.id == it.id) {
|
||||
item.checked = true
|
||||
} else {
|
||||
item.checked = false
|
||||
}
|
||||
return item
|
||||
})
|
||||
setTimeList([...TimeList])
|
||||
pageNum.current.size = 10
|
||||
setSearchField({ ...searchField, start_time: it.start_time, end_time: it.end_time, size: 10 })
|
||||
setEnd(it.end_time)
|
||||
}
|
||||
|
||||
//重置
|
||||
const handReset = () => {
|
||||
TimeList.map(item => {
|
||||
if (item.id == 1) {
|
||||
item.checked = true
|
||||
} else {
|
||||
item.checked = false
|
||||
}
|
||||
return item
|
||||
})
|
||||
setTimeList([...TimeList])
|
||||
pageNum.current.size = 10
|
||||
setSearchField({
|
||||
...searchField,
|
||||
start_time: `${dayjs(new Date(myDate?.toLocaleDateString() + ' ' + '00:00:00',)).format('YYYY-MM-DD')} 00:00:00`,
|
||||
end_time: `${dayjs(new Date(myDate?.toLocaleDateString() + ' ' + '00:00:00',)).add(14, 'day').format('YYYY-MM-DD')} 00:00:00`,
|
||||
size: 10
|
||||
})
|
||||
setStart(myDate.toLocaleDateString())
|
||||
setEnd('')
|
||||
}
|
||||
|
||||
|
||||
|
||||
//弹窗确认选择
|
||||
const handSureSelect = () => {
|
||||
pageNum.current.size = 10
|
||||
setSearchField({ ...searchField, size: 10 })
|
||||
getOrderList()
|
||||
setSelectPopup(false)
|
||||
}
|
||||
|
||||
//展示时间筛选
|
||||
const [showTime, setShowTime] = useState(false)
|
||||
//关闭时间筛选
|
||||
const handClose = () => {
|
||||
setShowTime(false)
|
||||
}
|
||||
|
||||
const [start, setStart] = useState<any>(myDate.toLocaleDateString())
|
||||
const [end, setEnd] = useState<any>('')
|
||||
//选择时间
|
||||
const handTime = (eq) => {
|
||||
//直接进来点确定的时候做处理
|
||||
if (Object.keys(eq).length === 0) {
|
||||
let obj = {
|
||||
start: '',
|
||||
end: ''
|
||||
}
|
||||
obj.start = `${dayjs(new Date(myDate?.toLocaleDateString() + ' ' + '00:00:00',)).format('YYYY-MM-DD')} 00:00:00`,
|
||||
obj.end = `${dayjs(new Date(obj?.start)).add(1, 'day').format('YYYY-MM-DD')} 00:00:00`
|
||||
eq.value = obj
|
||||
}
|
||||
setSearchField((val) => ({ ...val, start_time: eq?.value?.start, end_time: eq?.value?.end }))
|
||||
setStart(eq?.value?.start)
|
||||
setEnd(eq?.value?.end)
|
||||
setShowTime(false)
|
||||
pageNum.current.size = 10
|
||||
}
|
||||
|
||||
|
||||
const timeArea = useMemo(() => {
|
||||
const res = TimeList.filter(item => {
|
||||
return item.checked
|
||||
})
|
||||
if (end !== '' && res.length > 0) {
|
||||
return start + ' ' + '-' + ' ' + end
|
||||
} else {
|
||||
return '自定义起始时间'
|
||||
}
|
||||
}, [end])
|
||||
|
||||
useEffect(() => {
|
||||
setSearchField(searchField)
|
||||
}, [searchField])
|
||||
|
||||
return (
|
||||
<>
|
||||
<View style={{ background: '#FFFFFF', paddingLeft: '20rpx', paddingBottom: '20rpx', position: 'sticky', top: '0', zIndex: '99' }}>
|
||||
<Search placeholder='请输入客户或客户跟进人' showBtn={false} changeOnSearch={getSearchData} debounceTime={300} >
|
||||
<View className={styles.flexBox} onClick={() => { setSelectPopup(true) }}>
|
||||
<View className={classnames('iconfont', 'icon-shaixuan', !isDisabled ? styles.icon_shaixuan : styles.activeshaixuan)}></View>
|
||||
<View className={classnames(isDisabled ? styles.shaixuan : styles.activeshai)}>筛选</View>
|
||||
</View>
|
||||
</Search>
|
||||
</View>
|
||||
<View className={styles.pageTop}>
|
||||
<View className={styles.pageTopLeft}>时间默认14天内</View>
|
||||
<View className={styles.pageTopRight}>金额汇总:{formatPriceDiv(orderData.summary.receipt_amount)}</View>
|
||||
</View>
|
||||
<View className={styles.order_list}>
|
||||
<InfiniteScroll
|
||||
statusMore={statusMore}
|
||||
selfonScrollToLower={getScrolltolower}
|
||||
refresherEnabled={true}
|
||||
refresherTriggered={refresherTriggeredStatus}
|
||||
selfOnRefresherRefresh={getRefresherRefresh}>
|
||||
{orderData?.list?.map((item, index) => {
|
||||
return (
|
||||
<View key={item.id} className={styles.order_item_con}>
|
||||
<ItemList
|
||||
obj={item}
|
||||
key={index}
|
||||
></ItemList>
|
||||
</View>
|
||||
)
|
||||
})}
|
||||
</InfiniteScroll>
|
||||
<View className={styles.kongboxTwo}></View>
|
||||
<View className={styles.fixedBox}>
|
||||
<View className={styles.addBtn} onClick={() => handAdd()}>新建收款</View>
|
||||
</View>
|
||||
</View>
|
||||
<Popup title={'选择日期'} show={SelectPopup} onClose={() => { setSelectPopup(false) }}>
|
||||
<View className={styles.popupBox}>
|
||||
<View className={styles.timeFlex}>
|
||||
{
|
||||
TimeList.map((item, index) => {
|
||||
return (
|
||||
<View onClick={() => handSelect(item)} className={classnames((item.checked && timeArea == '自定义起始时间') ? styles.activetimeOne : styles.timeOne)} key={index}>{item.name}</View>
|
||||
)
|
||||
})
|
||||
}
|
||||
</View>
|
||||
<View className={classnames(timeArea == '自定义起始时间' ? styles.timeBox2 : styles.activetimeBox2)} onClick={() => { setShowTime(true) }}>{timeArea}
|
||||
{
|
||||
timeArea == '自定义起始时间' && <View className={classnames('iconfont', 'icon-chakanquanbukehu', styles.more)}></View>
|
||||
}
|
||||
</View>
|
||||
<View style={{ height: '100rpx' }}></View>
|
||||
<View className={styles.bottomBox}>
|
||||
<Button className={styles.resetBox} onClick={() => { handReset() }}> 重置</Button >
|
||||
<Button className={classnames(isDisabled ? styles.button : styles.activeButton)} disabled={isDisabled} onClick={() => handSureSelect()}> 确认</Button >
|
||||
</View>
|
||||
</View>
|
||||
</Popup>
|
||||
<TimePicker
|
||||
start={start}
|
||||
end={end}
|
||||
showTime={showTime}
|
||||
closePopup={handClose}
|
||||
onSelectDate={(e) => handTime(e)}
|
||||
></TimePicker>
|
||||
</>
|
||||
)
|
||||
}
|
@ -363,7 +363,7 @@ export default () => {
|
||||
<View className={styles.thirdTopfont}>售后时间</View>
|
||||
<View className={styles.timeBox2} onClick={() => { setShowTime(true) }}>{timeArea}
|
||||
{
|
||||
timeArea != '自定义起始时间' && <View className={classnames('iconfont', 'icon-chakanquanbukehu', styles.more)}></View>
|
||||
timeArea == '自定义起始时间' && <View className={classnames('iconfont', 'icon-chakanquanbukehu', styles.more)}></View>
|
||||
}
|
||||
</View>
|
||||
</View>
|
||||
|
Loading…
x
Reference in New Issue
Block a user