✨ feat(收款):收款完成70%
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
)
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
export default {
|
||||
navigationBarTitleText: '新建收款单',
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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 >
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user