🐳 chore(eslint): 修正所有文件的eslint 错误❌

This commit is contained in:
xuan
2022-11-28 11:06:15 +08:00
parent 99a920975f
commit cc99111b4f
149 changed files with 3270 additions and 3252 deletions
@@ -30,8 +30,7 @@ interface Params {
bigMoney?: any // 展示的大写金额,
isOpen?: boolean // 是否展开状态
}
export default memo((pros: Params) => {
const Form = (pros: Params) => {
return (
<>
{
@@ -98,4 +97,5 @@ export default memo((pros: Params) => {
}
</>
)
})
}
export default memo(Form)
+20 -20
View File
@@ -5,26 +5,17 @@ import classnames from 'classnames'
import styles from './index.module.scss'
import Form from './components/form'
import {
mpcashManagementOrderaccount, mpcashManagementOrderpost,
mpshouldCollectOrderpurchaser,
MpCashManagementOrderAccount, MpCashManagementOrderPost,
MpShouldCollectOrderPurchaser,
} from '@/api/newCollection'
import { alert } from '@/common/common'
import smallToBig from '@/common/money'
import IconFont from '@/components/iconfont/iconfont'
export default () => {
const AddCollection = () => {
// 获取选择的客户
const pages = Taro.getCurrentPages()
const currPage = pages[pages.length - 1] // 获取当前页面
useDidShow(() => {
setQuery(e => ({
...e,
purchaser_id: currPage.data?.clientId ? currPage.data?.clientId : Query.purchaser_id,
clientName: currPage.data?.clientName ? currPage.data?.clientName : Query.clientName,
bankId: currPage.data?.bankId ? currPage.data?.bankId : Query.bankId,
bankName: currPage.data?.bankName ? currPage.data?.bankName : Query.bankName,
}))
})
const [Query, setQuery] = useState<any>({})
@@ -35,12 +26,8 @@ export default () => {
setQuery(val => ({ ...val, picList: list }))
}, [])
useEffect(() => {
getCuss()
}, [])
// 获取首个银行账号
const { fetchData: clitentFetch } = mpcashManagementOrderaccount()
const { fetchData: clitentFetch } = MpCashManagementOrderAccount()
const getCuss = async() => {
const res = await clitentFetch({ page: 1, size: 10 })
if (res.data) {
@@ -48,7 +35,7 @@ export default () => {
}
}
const { fetchData: scanFetch } = mpshouldCollectOrderpurchaser()
const { fetchData: scanFetch } = MpShouldCollectOrderPurchaser()
// 扫描
const handScan = (e) => {
e.stopPropagation()
@@ -81,7 +68,18 @@ export default () => {
}
}
}
useDidShow(() => {
setQuery(e => ({
...e,
purchaser_id: currPage.data?.clientId ? currPage.data?.clientId : Query.purchaser_id,
clientName: currPage.data?.clientName ? currPage.data?.clientName : Query.clientName,
bankId: currPage.data?.bankId ? currPage.data?.bankId : Query.bankId,
bankName: currPage.data?.bankName ? currPage.data?.bankName : Query.bankName,
}))
})
useEffect(() => {
getCuss()
}, [])
// 判断是否可以提交
const isDisabled = useMemo(() => {
if (Query.clientName == ''
@@ -125,7 +123,7 @@ export default () => {
}
// 确认新建
const { fetchData: sureFetch } = mpcashManagementOrderpost()
const { fetchData: sureFetch } = MpCashManagementOrderPost()
const handSure = () => {
const query = {
payment_credential_url: picUrl.current,
@@ -279,3 +277,5 @@ export default () => {
</>
)
}
export default AddCollection