✨ feat:新建收款完成100%
This commit is contained in:
parent
5c2e3d46ac
commit
ccc3530aff
@ -14,4 +14,17 @@ export const mpcashManagementOrder = () => {
|
|||||||
method: "get",
|
method: "get",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//收款账号
|
||||||
|
export const mpcashManagementOrderaccount = () => {
|
||||||
|
return useRequest({
|
||||||
|
url: `/v1/mp/cashManagementOrder/account`,
|
||||||
|
method: "get",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//新建收款单
|
||||||
|
export const mpcashManagementOrderpost = () => {
|
||||||
|
return useRequest({
|
||||||
|
url: `/v1/mp/cashManagementOrder`,
|
||||||
|
method: "post",
|
||||||
|
})
|
||||||
|
}
|
@ -36,7 +36,7 @@ export const mpproductcolorlist = () => {
|
|||||||
method: "get"
|
method: "get"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//加入购物车
|
//购物车提交
|
||||||
export const mpsaleOrderpreView = () => {
|
export const mpsaleOrderpreView = () => {
|
||||||
return useRequest({
|
return useRequest({
|
||||||
url: `/v1/mp/saleOrder/preView`,
|
url: `/v1/mp/saleOrder/preView`,
|
||||||
|
@ -64,4 +64,18 @@
|
|||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.itemBox {
|
||||||
|
width: 100%;
|
||||||
|
height: 88px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
justify-content: center;
|
||||||
|
line-height: 88px;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #000000;
|
||||||
|
border-bottom: 1px solid #f7f7f7;
|
||||||
|
}
|
||||||
}
|
}
|
@ -5,6 +5,7 @@ import { Image, Text, View } from '@tarojs/components'
|
|||||||
import { formatImgUrl } from '@/common/format'
|
import { formatImgUrl } from '@/common/format'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
|
import Popup from '@/components/popup'
|
||||||
|
|
||||||
//图片列表
|
//图片列表
|
||||||
type ImageParam = {
|
type ImageParam = {
|
||||||
@ -13,7 +14,7 @@ type ImageParam = {
|
|||||||
onlyRead?: false | true
|
onlyRead?: false | true
|
||||||
}
|
}
|
||||||
const PictureItem: FC<ImageParam> = memo(({ onChange, defaultList, onlyRead = false }) => {
|
const PictureItem: FC<ImageParam> = memo(({ onChange, defaultList, onlyRead = false }) => {
|
||||||
const { getWxPhoto } = useUploadCDNImg()
|
const { getWxPhoto, getChatPhoto } = useUploadCDNImg()
|
||||||
const [imageList, setImageLise] = useState<string[]>([])
|
const [imageList, setImageLise] = useState<string[]>([])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -22,13 +23,27 @@ const PictureItem: FC<ImageParam> = memo(({ onChange, defaultList, onlyRead = fa
|
|||||||
|
|
||||||
//上传图片
|
//上传图片
|
||||||
const uploadImage = async () => {
|
const uploadImage = async () => {
|
||||||
let list: any = await getWxPhoto('after-sale', 5)
|
setshowPopup(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
//上传图片逻辑
|
||||||
|
const handPic = async (id) => {
|
||||||
|
// let resArr = List.filter(item => {
|
||||||
|
// return item.check
|
||||||
|
// })
|
||||||
|
if (id == 1) {
|
||||||
|
var list: any = await getWxPhoto('after-sale', 5)
|
||||||
|
} else {
|
||||||
|
var list: any = await getChatPhoto('after-sale', 5)
|
||||||
|
}
|
||||||
let images: any[] = []
|
let images: any[] = []
|
||||||
list?.map((item) => {
|
list?.map((item) => {
|
||||||
images.push(item.url)
|
images.push(item.url)
|
||||||
})
|
})
|
||||||
setImageLise([...imageList, ...images])
|
setImageLise([...imageList, ...images])
|
||||||
|
setshowPopup(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
//删除图片
|
//删除图片
|
||||||
const delImage = (index) => {
|
const delImage = (index) => {
|
||||||
imageList.splice(index, 1)
|
imageList.splice(index, 1)
|
||||||
@ -50,6 +65,23 @@ const PictureItem: FC<ImageParam> = memo(({ onChange, defaultList, onlyRead = fa
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//筛选内容展示
|
||||||
|
const [showPopup, setshowPopup] = useState(false)
|
||||||
|
const [List, setList] = useState<any[]>([{ id: 1, name: '手机相册', check: false }, { id: 2, name: '从微信对话选择', check: false }])
|
||||||
|
//点击选择的方式
|
||||||
|
const handItem = (item) => {
|
||||||
|
List.map(it => {
|
||||||
|
if (item.id == it.id) {
|
||||||
|
it.check = true
|
||||||
|
} else {
|
||||||
|
it.check = false
|
||||||
|
}
|
||||||
|
return it
|
||||||
|
})
|
||||||
|
setList([...List])
|
||||||
|
handPic(item.id)
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.image_main}>
|
<View className={styles.image_main}>
|
||||||
{imageList?.map((item, index) => (
|
{imageList?.map((item, index) => (
|
||||||
@ -64,6 +96,16 @@ const PictureItem: FC<ImageParam> = memo(({ onChange, defaultList, onlyRead = fa
|
|||||||
{/* <Text className={styles.uploadText}>上传照片</Text> */}
|
{/* <Text className={styles.uploadText}>上传照片</Text> */}
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
<Popup title={'选择方式'} show={showPopup} onClose={() => setshowPopup(false)}>
|
||||||
|
{
|
||||||
|
List.map((item, index) => {
|
||||||
|
return (
|
||||||
|
<View className={styles.itemBox} key={index} onClick={() => handItem(item)}>{item.name}</View>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
</Popup>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
@ -37,7 +37,6 @@ page {
|
|||||||
|
|
||||||
.cussName {
|
.cussName {
|
||||||
margin-left: 48px;
|
margin-left: 48px;
|
||||||
width: 168px;
|
|
||||||
height: 34px;
|
height: 34px;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
font-family: PingFangSC-Medium, PingFang SC;
|
font-family: PingFangSC-Medium, PingFang SC;
|
||||||
|
@ -3,7 +3,7 @@ import { useCallback, useEffect, useMemo, useRef, useState, memo } from 'react'
|
|||||||
import styles from "./index.module.scss"
|
import styles from "./index.module.scss"
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
import Search from '@/components/search'
|
import Search from '@/components/search'
|
||||||
import { mpenumsaleUserlist } from '@/api/order'
|
import { mpcashManagementOrderaccount } from '@/api/newCollection'
|
||||||
import { useDidShow } from '@tarojs/taro';
|
import { useDidShow } from '@tarojs/taro';
|
||||||
import Taro from '@tarojs/taro'
|
import Taro from '@tarojs/taro'
|
||||||
import { useRouter } from '@tarojs/taro'
|
import { useRouter } from '@tarojs/taro'
|
||||||
@ -15,13 +15,13 @@ export default () => {
|
|||||||
|
|
||||||
|
|
||||||
const [search, setSearch] = useState({
|
const [search, setSearch] = useState({
|
||||||
name: null,
|
search_name: null,
|
||||||
page: 1,
|
page: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
})
|
})
|
||||||
const [clentList, setClientlist] = useState<{ list: any[]; total: number }>({ list: [], total: 0 })
|
const [clentList, setClientlist] = useState<{ list: any[]; total: number }>({ list: [], total: 0 })
|
||||||
|
|
||||||
const { fetchData: clitentFetch, state: orderState } = mpenumsaleUserlist()
|
const { fetchData: clitentFetch, state: orderState } = mpcashManagementOrderaccount()
|
||||||
//数据加载状态
|
//数据加载状态
|
||||||
const statusMore = useMemo(() => {
|
const statusMore = useMemo(() => {
|
||||||
return dataLoadingStatus({ list: clentList.list, total: clentList.total, status: orderState.loading })
|
return dataLoadingStatus({ list: clentList.list, total: clentList.total, status: orderState.loading })
|
||||||
@ -36,17 +36,17 @@ export default () => {
|
|||||||
const getSearchData = useCallback((eq) => {
|
const getSearchData = useCallback((eq) => {
|
||||||
pageNum.current.page = 1
|
pageNum.current.page = 1
|
||||||
setClientlist(() => ({ list: [], total: 0 }))
|
setClientlist(() => ({ list: [], total: 0 }))
|
||||||
setSearch((e) => ({ ...e, name: eq, size: 10 }))
|
setSearch((e) => ({ ...e, search_name: eq, size: 10 }))
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (search.name === '') {
|
if (search.search_name === '') {
|
||||||
setSearch((e) => ({ ...e, name: null }))
|
setSearch((e) => ({ ...e, search_name: null }))
|
||||||
}
|
}
|
||||||
if (search.name !== '') getCuss()
|
if (search.search_name !== '') getCuss()
|
||||||
}, [search])
|
}, [search])
|
||||||
|
|
||||||
//上拉加载数据
|
//上拉加载数据
|
||||||
@ -68,10 +68,10 @@ export default () => {
|
|||||||
setSearch((val) => ({ ...val, size: 10 }))
|
setSearch((val) => ({ ...val, size: 10 }))
|
||||||
}
|
}
|
||||||
const getCuss = async () => {
|
const getCuss = async () => {
|
||||||
let res = await clitentFetch({ name: search.name === null ? '' : search.name, page: search.page, size: search.size })
|
let res = await clitentFetch({ search_name: search.search_name === null ? '' : search.search_name, page: search.page, size: search.size })
|
||||||
if (router?.params.bankId) {
|
if (router?.params.bankId) {
|
||||||
res.data.list.map(item => {
|
res.data.list.map(item => {
|
||||||
if (item.id == router?.params.bankId) {
|
if (item.receiving_account_id == router?.params.bankId) {
|
||||||
item.checked = true
|
item.checked = true
|
||||||
} else {
|
} else {
|
||||||
item.checked = false
|
item.checked = false
|
||||||
@ -85,7 +85,7 @@ export default () => {
|
|||||||
//选择业务员
|
//选择业务员
|
||||||
const selectClient = (item) => {
|
const selectClient = (item) => {
|
||||||
clentList.list.map(it => {
|
clentList.list.map(it => {
|
||||||
if (item.id === it.id) {
|
if (item.receiving_account_id === it.receiving_account_id) {
|
||||||
it.checked = true
|
it.checked = true
|
||||||
} else {
|
} else {
|
||||||
it.checked = false
|
it.checked = false
|
||||||
@ -95,8 +95,8 @@ export default () => {
|
|||||||
let pages = Taro.getCurrentPages(); // 获取当前的页面栈
|
let pages = Taro.getCurrentPages(); // 获取当前的页面栈
|
||||||
let prevPage = pages[pages.length - 2];
|
let prevPage = pages[pages.length - 2];
|
||||||
prevPage.setData({ //设置上一个页面的值
|
prevPage.setData({ //设置上一个页面的值
|
||||||
bankId: item.id,
|
bankId: item.receiving_account_id,
|
||||||
bankName: item.name
|
bankName: item.company_account
|
||||||
});
|
});
|
||||||
setClientlist((e) => ({ ...e, list: clentList?.list, total: clentList?.total }))
|
setClientlist((e) => ({ ...e, list: clentList?.list, total: clentList?.total }))
|
||||||
setclientObj(item)
|
setclientObj(item)
|
||||||
@ -107,23 +107,24 @@ export default () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (clientObj?.bankId !== null) {
|
if (clientObj?.bankId !== null) {
|
||||||
setclientObj(clientObj)
|
setclientObj(clientObj)
|
||||||
} else {
|
|
||||||
let pages = Taro.getCurrentPages(); // 获取当前的页面栈
|
|
||||||
let prevPage = pages[pages.length - 2];
|
|
||||||
prevPage.setData({ //设置上一个页面的值
|
|
||||||
bankId: '',
|
|
||||||
bankName: '',
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
// else {
|
||||||
|
// let pages = Taro.getCurrentPages(); // 获取当前的页面栈
|
||||||
|
// let prevPage = pages[pages.length - 2];
|
||||||
|
// prevPage.setData({ //设置上一个页面的值
|
||||||
|
// bankId: '',
|
||||||
|
// bankName: '',
|
||||||
|
// });
|
||||||
|
// }
|
||||||
}, [clientObj])
|
}, [clientObj])
|
||||||
return (
|
return (
|
||||||
<View className={styles.cussBox}>
|
<View className={styles.cussBox}>
|
||||||
<View className={styles.searchBox}>
|
{/* <View className={styles.searchBox}>
|
||||||
<View className={styles.two}>
|
<View className={styles.two}>
|
||||||
<Search placeholder='请输入业务员名称' showBtn={false} changeOnSearch={getSearchData} debounceTime={300} />
|
<Search placeholder='请输入收款账户' showBtn={false} changeOnSearch={getSearchData} debounceTime={300} />
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
</View>
|
</View> */}
|
||||||
<View className={styles.listBox}>
|
<View className={styles.listBox}>
|
||||||
<InfiniteScroll
|
<InfiniteScroll
|
||||||
statusMore={statusMore}
|
statusMore={statusMore}
|
||||||
@ -135,9 +136,9 @@ export default () => {
|
|||||||
clentList.list.map((item, index) => {
|
clentList.list.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<View className={classnames(item.checked ? styles.acticveitemBox : styles.itemBox)} key={index} onClick={() => { selectClient(item) }}>
|
<View className={classnames(item.checked ? styles.acticveitemBox : styles.itemBox)} key={index} onClick={() => { selectClient(item) }}>
|
||||||
<View className={styles.cussName}>{item.name}</View>
|
<View className={styles.cussName}>{item.company_account}</View>
|
||||||
<View className={styles.phone}>{item.phone}</View>
|
{/* <View className={styles.phone}>{item.phone}</View>
|
||||||
<View className={styles.woker}>{item.sale_user_name}</View>
|
<View className={styles.woker}>{item.company_account}</View> */}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
@ -56,6 +56,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.rightFlex {
|
.rightFlex {
|
||||||
|
width: 50%;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
.placeholderStyle {
|
.placeholderStyle {
|
||||||
color: #f7f7f7;
|
color: #f7f7f7;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
|
@ -10,7 +10,7 @@ import Taro, { faceVerifyForPay, useDidShow } from '@tarojs/taro'
|
|||||||
import Form from './components/form'
|
import Form from './components/form'
|
||||||
import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/format'
|
import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/format'
|
||||||
import {
|
import {
|
||||||
mpreturnApplyOrderlist
|
mpcashManagementOrderpost
|
||||||
} from "@/api/newCollection"
|
} from "@/api/newCollection"
|
||||||
import TimePicker from "@/components/timePicker"
|
import TimePicker from "@/components/timePicker"
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
@ -18,20 +18,18 @@ import { alert } from "@/common/common"
|
|||||||
import smallToBig from '@/common/money'
|
import smallToBig from '@/common/money'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
|
//获取选择的客户
|
||||||
|
let pages = Taro.getCurrentPages();
|
||||||
|
let currPage = pages[pages.length - 1]; // 获取当前页面
|
||||||
useDidShow(() => {
|
useDidShow(() => {
|
||||||
|
|
||||||
//获取选择的客户
|
|
||||||
let pages = Taro.getCurrentPages();
|
|
||||||
let currPage = pages[pages.length - 1]; // 获取当前页面
|
|
||||||
console.log(currPage.data, '8888')
|
|
||||||
|
|
||||||
setQuery((e) => ({
|
setQuery((e) => ({
|
||||||
...e,
|
...e,
|
||||||
purchaser_id: currPage.data?.clientId ? currPage.data?.clientId : '',
|
purchaser_id: currPage.data?.clientId ? currPage.data?.clientId : '',
|
||||||
clientName: currPage.data?.clientName ? currPage.data?.clientName : '',
|
clientName: currPage.data?.clientName ? currPage.data?.clientName : '',
|
||||||
// sale_user_id: currPage.data?.saleuserId ? currPage.data?.saleuserId : '',
|
bankId: currPage.data?.bankId ? currPage.data?.bankId : '',
|
||||||
// saleuserName: currPage.data?.saleuserName ? currPage.data?.saleuserName : '',
|
bankName: currPage.data?.bankName ? currPage.data?.bankName : '',
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -50,6 +48,7 @@ export default () => {
|
|||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
Taro.scanCode({
|
Taro.scanCode({
|
||||||
success(res) {
|
success(res) {
|
||||||
|
// setQuery({...Query})
|
||||||
// setsearchObj((e) => ({ ...e, orderNo: res.result }))
|
// setsearchObj((e) => ({ ...e, orderNo: res.result }))
|
||||||
},
|
},
|
||||||
fail(res) {
|
fail(res) {
|
||||||
@ -60,14 +59,16 @@ export default () => {
|
|||||||
|
|
||||||
//选择内容跳转
|
//选择内容跳转
|
||||||
const navTo = (val) => {
|
const navTo = (val) => {
|
||||||
if (val === 1) {
|
if (val == 1) {
|
||||||
|
Taro.navigateTo({
|
||||||
|
url: '/pages/customerPage/index?clientId=' + Query.purchaser_id
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
if (Query.purchaser_id == '') {
|
if (typeof (Query.purchaser_id) == 'undefined') {
|
||||||
return alert.error('请先选择客户')
|
return alert.error('请先选择客户')
|
||||||
} else {
|
} else {
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: '/pages/accountPage/id?' + Query.bankId
|
url: '/pages/accountPage/index?bankId?=' + Query?.bankId
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -77,14 +78,13 @@ export default () => {
|
|||||||
const isDisabled = useMemo(() => {
|
const isDisabled = useMemo(() => {
|
||||||
if (Query.clientName == '' ||
|
if (Query.clientName == '' ||
|
||||||
Query.money == '' ||
|
Query.money == '' ||
|
||||||
Query.bankNum == '' ||
|
|
||||||
picUrl.current.length == 0
|
picUrl.current.length == 0
|
||||||
) {
|
) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}, [])
|
}, [Query, picUrl])
|
||||||
|
|
||||||
//收款金额回调
|
//收款金额回调
|
||||||
const getInput = (e) => {
|
const getInput = (e) => {
|
||||||
@ -95,6 +95,12 @@ export default () => {
|
|||||||
setQuery(Query)
|
setQuery(Query)
|
||||||
}, [Query])
|
}, [Query])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (currPage.data?.clientId && (currPage.data?.clientId != Query.purchaser_id)) {
|
||||||
|
setQuery({ ...Query, bankId: '', bankName: '' })
|
||||||
|
}
|
||||||
|
}, [Query])
|
||||||
|
|
||||||
|
|
||||||
//备注信息
|
//备注信息
|
||||||
const [TextareaValue, setTextareaValue] = useState('')
|
const [TextareaValue, setTextareaValue] = useState('')
|
||||||
@ -110,7 +116,46 @@ export default () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//确认新建
|
||||||
|
const { fetchData: sureFetch } = mpcashManagementOrderpost()
|
||||||
|
const handSure = () => {
|
||||||
|
|
||||||
|
const query = {
|
||||||
|
payment_credential_url: picUrl.current,
|
||||||
|
purchaser_id: Query.purchaser_id,
|
||||||
|
receipt_amount: Number(Query.money) * 100,
|
||||||
|
receiving_account_id: Query.bankId,
|
||||||
|
remark: TextareaValue
|
||||||
|
}
|
||||||
|
Taro.showModal({
|
||||||
|
content: "确认提交吗?",
|
||||||
|
confirmText: "确认",
|
||||||
|
cancelText: "取消",
|
||||||
|
success: async function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
Taro.showLoading({
|
||||||
|
title: '请稍等...',
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
|
const res = await sureFetch(query)
|
||||||
|
if (res?.msg === 'success') {
|
||||||
|
Taro.showToast({
|
||||||
|
title: '成功'
|
||||||
|
})
|
||||||
|
Taro.hideLoading()
|
||||||
|
handCancl()
|
||||||
|
} else {
|
||||||
|
Taro.hideLoading()
|
||||||
|
Taro.showToast({
|
||||||
|
title: res?.msg,
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<View className={styles.addBox}>
|
<View className={styles.addBox}>
|
||||||
@ -162,7 +207,7 @@ export default () => {
|
|||||||
isInput={true}
|
isInput={true}
|
||||||
disabled={true}
|
disabled={true}
|
||||||
placeholderFont={'请选择银行账号'}
|
placeholderFont={'请选择银行账号'}
|
||||||
inputValue={Query.bankNum}
|
inputValue={Query.bankName}
|
||||||
showMore={true}
|
showMore={true}
|
||||||
showScan={false}
|
showScan={false}
|
||||||
styleNone={true}
|
styleNone={true}
|
||||||
@ -178,7 +223,6 @@ export default () => {
|
|||||||
onInput={(e) => getDesc(e.detail.value)}
|
onInput={(e) => getDesc(e.detail.value)}
|
||||||
value={TextareaValue}
|
value={TextareaValue}
|
||||||
placeholderStyle='font-size: 28rpx;font-weight: 400;'
|
placeholderStyle='font-size: 28rpx;font-weight: 400;'
|
||||||
autoFocus
|
|
||||||
maxlength={64}
|
maxlength={64}
|
||||||
placeholder={'请填写备注信息'}
|
placeholder={'请填写备注信息'}
|
||||||
></Textarea>
|
></Textarea>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
export default {
|
export default {
|
||||||
navigationBarTitleText: '新建收款单',
|
navigationBarTitleText: '收款单详情',
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,6 @@ export default () => {
|
|||||||
// it = IMG_CND_Prefix + it
|
// it = IMG_CND_Prefix + it
|
||||||
// return it
|
// return it
|
||||||
// })
|
// })
|
||||||
// console.log(res.data, 4444)
|
|
||||||
Taro.hideLoading()
|
Taro.hideLoading()
|
||||||
setQuery(res.data)
|
setQuery(res.data)
|
||||||
}
|
}
|
||||||
@ -89,7 +88,7 @@ export default () => {
|
|||||||
styleNone={false}
|
styleNone={false}
|
||||||
title={'收款凭证'}
|
title={'收款凭证'}
|
||||||
require={false}
|
require={false}
|
||||||
PicList={Query.payment_credential_url}
|
PicList={Query?.payment_credential_url}
|
||||||
isInput={false}
|
isInput={false}
|
||||||
showMore={false}
|
showMore={false}
|
||||||
showScan={false}
|
showScan={false}
|
||||||
|
@ -110,14 +110,15 @@ export default () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (clientObj?.clientId !== null) {
|
if (clientObj?.clientId !== null) {
|
||||||
setclientObj(clientObj)
|
setclientObj(clientObj)
|
||||||
} else {
|
|
||||||
let pages = Taro.getCurrentPages(); // 获取当前的页面栈
|
|
||||||
let prevPage = pages[pages.length - 2];
|
|
||||||
prevPage.setData({ //设置上一个页面的值
|
|
||||||
clientId: '',
|
|
||||||
clientName: '',
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
// else {
|
||||||
|
// let pages = Taro.getCurrentPages(); // 获取当前的页面栈
|
||||||
|
// let prevPage = pages[pages.length - 2];
|
||||||
|
// prevPage.setData({ //设置上一个页面的值
|
||||||
|
// clientId: '',
|
||||||
|
// clientName: '',
|
||||||
|
// });
|
||||||
|
// }
|
||||||
}, [clientObj])
|
}, [clientObj])
|
||||||
return (
|
return (
|
||||||
<View className={styles.cussBox}>
|
<View className={styles.cussBox}>
|
||||||
|
@ -33,6 +33,10 @@ export default () => {
|
|||||||
})
|
})
|
||||||
const pageNum = useRef({ size: searchField.size, page: searchField.page })
|
const pageNum = useRef({ size: searchField.size, page: searchField.page })
|
||||||
|
|
||||||
|
useDidShow(() => {
|
||||||
|
getOrderList()
|
||||||
|
})
|
||||||
|
|
||||||
//监听筛选条件变化
|
//监听筛选条件变化
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getOrderList()
|
getOrderList()
|
||||||
@ -130,6 +134,7 @@ export default () => {
|
|||||||
|
|
||||||
//选择时间item
|
//选择时间item
|
||||||
const handSelect = (it) => {
|
const handSelect = (it) => {
|
||||||
|
|
||||||
TimeList.map(item => {
|
TimeList.map(item => {
|
||||||
if (item.id == it.id) {
|
if (item.id == it.id) {
|
||||||
item.checked = true
|
item.checked = true
|
||||||
@ -141,7 +146,7 @@ export default () => {
|
|||||||
setTimeList([...TimeList])
|
setTimeList([...TimeList])
|
||||||
pageNum.current.size = 10
|
pageNum.current.size = 10
|
||||||
setSearchField({ ...searchField, start_time: it.start_time, end_time: it.end_time, size: 10 })
|
setSearchField({ ...searchField, start_time: it.start_time, end_time: it.end_time, size: 10 })
|
||||||
setEnd(it.end_time)
|
setEnd('')
|
||||||
}
|
}
|
||||||
|
|
||||||
//重置
|
//重置
|
||||||
@ -206,10 +211,11 @@ export default () => {
|
|||||||
|
|
||||||
|
|
||||||
const timeArea = useMemo(() => {
|
const timeArea = useMemo(() => {
|
||||||
const res = TimeList.filter(item => {
|
// const res = TimeList.filter(item => {
|
||||||
return item.checked
|
// return item.checked
|
||||||
})
|
// })
|
||||||
if (end !== '' && res.length > 0) {
|
// && res.length > 0
|
||||||
|
if (end !== '') {
|
||||||
return start + ' ' + '-' + ' ' + end
|
return start + ' ' + '-' + ' ' + end
|
||||||
} else {
|
} else {
|
||||||
return '自定义起始时间'
|
return '自定义起始时间'
|
||||||
|
@ -52,7 +52,7 @@ const feature: IconCardType[] = [
|
|||||||
{
|
{
|
||||||
iconName: 'icon-shoukuanliebiao',
|
iconName: 'icon-shoukuanliebiao',
|
||||||
name: '收款列表',
|
name: '收款列表',
|
||||||
path: '',
|
path: '/pages/newCollection/index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
iconName: 'icon-kehuxinxi',
|
iconName: 'icon-kehuxinxi',
|
||||||
|
@ -148,8 +148,46 @@ export default () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// product 产品相关,图片、纹理图等 全平台
|
||||||
|
// after-sale 售后(申请退货、退款)相关的、图片、视频 全平台
|
||||||
|
// mall 电子商城相关的 全平台
|
||||||
|
// logistics 物流(发货、提货)相关的、图片、视频 全平台
|
||||||
|
/**
|
||||||
|
* 上传聊天记录图片
|
||||||
|
* @param cdn_upload_type 场景值
|
||||||
|
* @param count // 1时返回一张图片信息, 大于1时返回图片数组
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
const getChatPhoto = (cdn_upload_type: cdn_upload_type_Param, count: number = 1) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let list: any[] = []
|
||||||
|
Taro.chooseMessageFile({
|
||||||
|
count: count,
|
||||||
|
type: 'image',
|
||||||
|
success: async function (res) {
|
||||||
|
try {
|
||||||
|
if (count > 1) {
|
||||||
|
for (let i = 0; i < res.tempFiles.length; i++) {
|
||||||
|
let data = await uploadCDNImg(res.tempFiles[i], cdn_upload_type, cdn_upload_type)
|
||||||
|
list.push(data)
|
||||||
|
}
|
||||||
|
resolve(list)
|
||||||
|
} else {
|
||||||
|
//兼容以前上传一张的情况
|
||||||
|
let data = await uploadCDNImg(res.tempFiles[0], cdn_upload_type, cdn_upload_type)
|
||||||
|
resolve(data)
|
||||||
|
}
|
||||||
|
} catch (res) {
|
||||||
|
reject(res)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
uploadCDNImg,
|
uploadCDNImg,
|
||||||
getWxPhoto,
|
getWxPhoto,
|
||||||
|
getChatPhoto
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user