Commit c549a696 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

Merge branch 'dev' into test

parents 39730bde 069925a8
......@@ -224,6 +224,8 @@ export default {
'menu.tranactionAbility.stockSellStorage.inventory': '库存',
'menu.tranactionAbility.transactionRules': '交易规则',
'menu.tranactionAbility.addRule': '新建交易规则',
'menu.tranactionAbility.editRule': '编辑交易规则',
'menu.tranactionAbility.ruleDetail': '交易规则详情',
// 需求发布 2020-10-26修改
'menu.tranactionAbility.enquirySubmit': '需求发布',
......
import { GetProductGoodsGetGoodsListResponseDetail, GetProductCommodityGetCommodityResponse } from '@/services';
import { GetProductGoodsGetGoodsListResponseDetail, GetProductCommodityGetCommodityResponse } from '@/services/ProductApi';
export interface IBasicFormParam {
brandId: number;
......@@ -65,6 +65,7 @@ export interface IProductModule {
productAttributeAndImageParams: any[]; //价格属性包含图片的传输数据
areaOption: any[]; // 省市数据
currentPageInStore: IPage;
tabClickItem: any[];
setAttributeLists(lists: any[]): void;
setProductName(name: string): void;
......@@ -79,4 +80,5 @@ export interface IProductModule {
setAreaOption(datas: any[]): void;
setProductInfoByEdit(data: GetProductCommodityGetCommodityResponse): void;
setCurrentPageInStore(data: IPage): void;
setTabClickItem(data: any): void;
}
......@@ -50,7 +50,8 @@ const AddProducts: React.FC<{}> = (props) => {
isAllAttributePic,
productInfoByEdit,
selectCategoryId,
clearPartData
clearPartData,
setTabClickItem
} = ProductStore
useEffect(() => {
......@@ -161,7 +162,7 @@ const AddProducts: React.FC<{}> = (props) => {
// 移除描述中的[]
let _productDescription = { ...productDescription }
for(let i in _productDescription){
if(_productDescription[i].length === 0){
if(_productDescription[i]?.length === 0){
delete _productDescription[i]
}
}
......@@ -304,13 +305,12 @@ const AddProducts: React.FC<{}> = (props) => {
}
console.log(e, 'e')
}).catch(error => {
console.log(error, '_error')
setIsDisableSaveBtn(false)
if (error.messge)
message.error(error.message)
else
message.error(error.errorFields[0].errors.toString())
console.log(error, '_error')
})
} catch (e) {
setIsDisableSaveBtn(false)
......@@ -330,6 +330,8 @@ const AddProducts: React.FC<{}> = (props) => {
const callback = (key: any) => {
setClickTabIndex([...clickTabIndex, key])
// 点击项存入store 用于后续编辑步骤判断 是直接点击进去某个子模块还是已经进入子模块 从而采用缓存数据还是采用接口返回的编辑数据
setTabClickItem([...clickTabIndex, key])
}
return (<PageHeaderWrapper
......
......@@ -69,6 +69,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
getPriceAttributeFormParamsByEdit,
selectCategoryId,
productAttributeAndImageParams,
tabClickItem
} = ProductStore
_tableDataSource = useMemo(() => tableDataSource, [tableDataSource]) // 保持最新值
......@@ -193,7 +194,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
let { _attributeNameArr, _attributeValueArr, _temp_attributeObjArr, _temp_attributeValObjArr } = needObject
// console.log(_priceAttribute, _attributeNameArr, _attributeValueArr, _temp_attributeObjArr, _temp_attributeValObjArr, selectedGoods, '---constructimg---') // 编辑直接进入价格设置 都为空数组
console.log(_priceAttribute, _attributeNameArr, _attributeValueArr, _temp_attributeObjArr, _temp_attributeValObjArr, selectedGoods, '---constructimg---') // 编辑直接进入价格设置 都为空数组
if(selectedGoods.length>0){ // 编辑情况下 select货品列表可能会采用接口数据
_col.push({
......@@ -211,32 +212,34 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
</Select>
</>
})
}else if(history.location.query?.id){ // 此时没有货品并且处于编辑状态 取接口返回的数据
let _goods: any[] = Object.values(productInfoByEdit.unitPriceAndPicList.map(_ => _.goods))
if(_goods.indexOf(null)===-1){
let goodsInApi : any = Object.values(_goods.reduce((item, next)=>{
item[next.id] = next
return item
},{}))
if(goodsInApi.length > 0){ // *9.12*
_col.push({
title: '对应货品',
dataIndex: '对应货品',
key: '对应货品',
width: 360,
render: (text: any, record: any) => <>
<Select style={{width:'100%'}} defaultValue={text} onChange={(v)=> {tableSelelctChange(v, record) }}>
{
goodsInApi.map(_item => (
<Option key={_item.id} value={_item.id}>{_item.code}/{_item.name}/{_item.type}/¥{_item.costPrice}</Option>
))
}
</Select>
</>
})
}
}
}
/** 注释原因:编辑时操作货品 没有更新价格属性表格中的货品选项 */
// else if(history.location.query?.id){ // 此时没有货品并且处于编辑状态 取接口返回的数据
// let _goods: any[] = Object.values(productInfoByEdit.unitPriceAndPicList.map(_ => _.goods))
// if(_goods.indexOf(null)===-1){
// let goodsInApi : any = Object.values(_goods.reduce((item, next)=>{
// item[next.id] = next
// return item
// },{}))
// if(goodsInApi.length > 0){
// _col.push({
// title: '对应货品',
// dataIndex: '对应货品',
// key: '对应货品',
// width: 360,
// render: (text: any, record: any) => <>
// <Select style={{width:'100%'}} defaultValue={text} onChange={(v)=> {tableSelelctChange(v, record) }}>
// {
// goodsInApi.map(_item => (
// <Option key={_item.id} value={_item.id}>{_item.code}/{_item.name}/{_item.type}/¥{_item.costPrice}</Option>
// ))
// }
// </Select>
// </>
// })
// }
// }
// }
if(_attributeNameArr?.length>0){
_attributeNameArr.map( _attr => {
......@@ -276,7 +279,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
setColumns(_col)
// 生成表格data
// 生成表格dataSource
let combineArray = SKUCombine(_attributeValueArr)
setCombineAttributeArray(combineArray)
setAttributeObjArr(_temp_attributeObjArr)
......@@ -292,8 +295,12 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
}) : _tempObj[_attributeNameArr[i]||_attributeNameArr[0]] = _rowArr // 当一项变动的时候 找_attributeNameArr可能会找不到 找不到的情况下置为索引0的那项
if(history.location.query?.id){
// 编辑的时候,先指定数据中的货品id,如果是重新组合的不存在id就使用选择的货品中的第一个,如果没有置为0;同理,不存在单价就置为{}
// _tempObj['对应货品'] = selectedGoods.length > 0 ? selectedGoods[0].id : 0
_tempObj['对应货品'] = productInfoByEdit.unitPriceAndPicList[i]?.goods?.id || selectedGoods[0]?.id || 0
_tempObj['单价'] = productInfoByEdit.unitPriceAndPicList[i]?.unitPrice || {}
console.log(_tableDataSource, '编辑构建table数据的时候')
console.log(tabClickItem, 'store中的点项')
// 通过store中的点击项可以判断当前表格的数据是采用接口返回的全局编辑数据还是子模块的局部缓存数据
}else{
_tempObj['对应货品'] = selectedGoods.length > 0 ? selectedGoods[0].id : 0
_tempObj['单价'] = {}
......@@ -307,7 +314,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
_tempObj['单价'] = productInfoByEdit?.unitPriceAndPicList[0]?.unitPrice || {}
_tableData.push(_tempObj)
}
// console.log(_tableData, '_tableData') // 只有一项 变动情况下表格数据的key获取不到
console.log(_tableData, '_tableData') // 只有一项 变动情况下表格数据的key获取不到
_tableDataSource = _tableData
// 有前面tab变动引起的二次构建 需要清空价格数据
if(updateFlag.current){
......@@ -450,7 +457,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
}
_tableDataSource = newTabeData
setTableDataSource(_tableDataSource)
// console.log(_tableDataSource, curretSetPriceRow, v, isBatchSetting, 'setPriceOk')
console.log(_tableDataSource, curretSetPriceRow, v, isBatchSetting, 'setPriceOk')
})
}
......
......@@ -340,9 +340,16 @@ const company: React.FC<parmas> = (props) => {
<Button loading={loading} onClick={handleSubmitAllSetting} type="primary" style={{ marginTop: 32, marginBottom: 16, marginRight: 24 }}>
保存
</Button>
<Button onClick={handleCancel} style={{ marginTop: 32, marginBottom: 16 }}>
取消
</Button>
<Popconfirm
title="未保存,是否确定执行这个操作?"
onConfirm={handleCancel}
okText="是"
cancelText="否"
>
<Button style={{ marginTop: 32, marginBottom: 16 }}>
取消
</Button>
</Popconfirm>
</Col>
</Row>
</Col>
......
import React, { useState, useEffect, useRef } from 'react'
import { Card, Space, Button, } from 'antd'
import { history } from 'umi'
import { Card, Space, Button, Modal, message } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface'
......@@ -9,17 +10,20 @@ import { createFormActions, FormEffectHooks } from '@formily/antd'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { searchSchema } from './schema'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { PlusOutlined } from '@ant-design/icons'
import EyePreview from '@/components/EyePreview'
import { DatePicker } from '@formily/antd-components'
import StatusTag from '@/components/StatusTag'
import { accountStatusMap, memberStatusMap } from '../../constant'
import { statusMap } from '../../constant'
import moment from 'moment'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { ExclamationCircleOutlined } from '@ant-design/icons'
const { confirm } = Modal
const formActions = createFormActions();
const CheckWithdraw: React.FC<{}> = () => {
const ref = useRef<any>({})
const [withdrawRowSelection, withdrawRowCtl] = useRowSelectionTable()
const columns: ColumnType<any>[] = [
{
......@@ -28,7 +32,7 @@ const CheckWithdraw: React.FC<{}> = () => {
key: 'memberAssetAccount',
className: 'commonPickColor',
render: (text, record) => <EyePreview
url={`/memberCenter/payandSettle/amountAccountManage/memberAccountManage/detail?id=${record.id}`}
url={`/memberCenter/payandSettle/amountAccountManage/memberAccountManage/detail?id=${record.memberAssetAccount.id}`}
>
{text}
</EyePreview>
......@@ -45,8 +49,9 @@ const CheckWithdraw: React.FC<{}> = () => {
},
{
title: '提现金额(元)',
dataIndex: 'memberRoleName',
key: 'memberRoleName',
dataIndex: 'tradeMoney',
key: 'tradeMoney',
render: (t, r) => t.toFixed(2)
},
{
title: '提现申请时间',
......@@ -55,10 +60,10 @@ const CheckWithdraw: React.FC<{}> = () => {
render: (t, r) => moment(t).format('YYYY-MM-DD HH:mm:ss')
},
{
title: '会员状态',
dataIndex: 'memberStatus',
key: 'memberStatus',
render: (t, r) => (<StatusTag title={memberStatusMap[t]['title']} type={memberStatusMap[t]['type']} />)
title: '状态',
dataIndex: 'status',
key: 'status',
render: (t, r) => (<StatusTag title={statusMap[t]['title']} type={statusMap[t]['type']} />)
},
{
title: '操作',
......@@ -78,11 +83,34 @@ const CheckWithdraw: React.FC<{}> = () => {
}
const clickUp = (r: any) => {
console.log('通过')
let params = {
tradeCode: r.tradeCode,
id: r.memberAssetAccount.id,
amount: r.tradeMoney
}
history.push(`/memberCenter/payandSettle/amountAccountManage/checkWithdraw/detail?detailinfo=${btoa(JSON.stringify(params))}`)
}
const handleBatchCheck = () => {
console.log('批量通过')
if(withdrawRowCtl.selectedRowKeys.length > 0){
confirm({
title: '确定要执行批量审核操作?',
icon: <ExclamationCircleOutlined />,
onOk() {
PublicApi.postPayMemberAssetAccountBatchCheck({ idList: withdrawRowCtl.selectedRowKeys }).then(res => {
ref.current.reload()
})
},
okType: 'danger',
onCancel() {
console.log('Cancel');
},
okText: '确定',
cancelText: '取消'
})
}else{
message.error('请先选择对应项目进行操作!')
}
}
const controllerBtns = (
......@@ -100,6 +128,7 @@ const CheckWithdraw: React.FC<{}> = () => {
columns={columns}
currentRef={ref}
tableProps={{ rowKey: "id" }}
rowSelection={withdrawRowSelection}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<NiceForm
......
......@@ -14,7 +14,7 @@ import EyePreview from '@/components/EyePreview'
import { DatePicker } from '@formily/antd-components'
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect'
import StatusTag from '@/components/StatusTag'
import { accountStatusMap, memberStatusMap } from '../../constant'
import { accountMemberType, accountStatusMap, memberStatusMap } from '../../constant'
import LevelBrand from '@/pages/member/components/LevelBrand'
import { validatorByte } from '@/utils/regExp'
import { GetPayMemberAssetAccountGetMemberAssetAccountListResponseDetail } from '@/services/PayApi'
......@@ -44,8 +44,9 @@ const AccountLists: React.FC<{}> = () => {
},
{
title: '会员类型',
dataIndex: 'memberTypeName',
key: 'memberTypeName',
dataIndex: 'memberType',
key: 'memberType',
render: (t, r) => accountMemberType[t]
},
{
title: '会员角色',
......
......@@ -8,7 +8,7 @@ import StatusTag from '@/components/StatusTag'
import cx from 'classnames'
import moment from 'moment'
import { ColumnType } from 'antd/lib/table/interface'
import { memberStatusMap, moveStatusMap, statusMap } from '../../constant'
import { memberStatusMap, moveStatusMap, operationMap, statusMap } from '../../constant'
import { SettingOutlined, StopOutlined } from '@ant-design/icons'
import { validatorByte } from '@/utils/regExp'
import { PublicApi } from '@/services/api'
......@@ -79,11 +79,13 @@ const AccountDetail: React.FC<{}> = () => {
title: '交易金额(元)',
dataIndex: 'tradeMoney',
key: 'tradeMoney',
render: (t, r) => `${operationMap[r.operation]['operator']} ${t.toFixed(2)}`
},
{
title: '交易项目',
dataIndex: 'operation',
key: 'operation',
render: (t, r) => operationMap[t]['title']
},
{
title: '状态',
......
......@@ -47,6 +47,7 @@ const PaymentWithdraw: React.FC<{}> = () => {
title: '提现金额(元)',
dataIndex: 'memberRoleName',
key: 'memberRoleName',
render: (t, r) => `¥${t.toFixed(2)}`
},
{
title: '提现申请时间',
......@@ -71,7 +72,7 @@ const PaymentWithdraw: React.FC<{}> = () => {
console.log(params)
return new Promise((resolve, reject) => {
let obj = { ...params }
PublicApi.getPayMemberAssetAccountGetCheckCashOutList(obj).then(res => {
PublicApi.getPayMemberAssetAccountGetPayCashOutList(obj).then(res => {
resolve(res.data)
})
})
......
......@@ -78,12 +78,13 @@ const AccountDetail: React.FC<{}> = () => {
title: '交易金额(元)',
dataIndex: 'tradeMoney',
key: 'tradeMoney',
render: (t, r) => `${operationMap[r.operation]['operator']} ${t.toFixed(2)}`
},
{
title: '交易项目',
dataIndex: 'operation',
key: 'operation',
render: (t, r) => operationMap[t]
render: (t, r) => operationMap[t]['title']
},
{
title: '状态',
......@@ -107,8 +108,8 @@ const AccountDetail: React.FC<{}> = () => {
},
{
title: '操作角色',
dataIndex: 'parentMemberRoleName',
key: 'parentMemberRoleName',
dataIndex: ['memberAssetAccount','parentMemberRoleName'],
key: 'id',
},
{
title: '状态',
......@@ -138,7 +139,6 @@ const AccountDetail: React.FC<{}> = () => {
];
const handleConfirm = () => {
setIsBtnLoading(true)
schemaActions.submit()
}
......@@ -148,6 +148,7 @@ const AccountDetail: React.FC<{}> = () => {
const handleSubmit = (value) => {
// 提交重置
setIsBtnLoading(true)
let parasm = {
memberAssetAccountId: pageId,
money: Number(value.money),
......@@ -188,7 +189,7 @@ const AccountDetail: React.FC<{}> = () => {
</div>
<div className={styles['repayment-end']}>
<span className={styles['repayment-time']}>
{details?.memberName}
{details?.parentMemberName}
</span>
</div>
</div>
......
......@@ -31,7 +31,7 @@ const AccountDetail: React.FC<{}> = () => {
let res = await PublicApi.getPayAssetAccountGetAssetAccount({id})
const { code, data } = res
setDetails(data)
if(code === 1000){
if(code === 1000) {
let bankRes = await PublicApi.getSettleAccountsCorporateAccountConfig({memberId: data.memberId + ''})
setBankDetail(bankRes.data)
}
......@@ -62,12 +62,13 @@ const AccountDetail: React.FC<{}> = () => {
title: '交易金额(元)',
dataIndex: 'tradeMoney',
key: 'tradeMoney',
render: (t, r) => `${operationMap[r.operation]['operator']} ${t.toFixed(2)}`
},
{
title: '交易项目',
dataIndex: 'operation',
key: 'operation',
render: (t, r) => operationMap[t]
render: (t, r) => operationMap[t]['title']
},
{
title: '状态',
......
......@@ -41,20 +41,20 @@
font-weight: 500;
}
&-input {
display: block;
width: 180px;
line-height: 40px;
padding: 8px 0;
font-size: 32px;
font-weight: 500;
color: #fff;
background: none;
border-top: none;
border-right: none;
border-left: none;
border-image: initial;
outline: none;
border-bottom: 1px solid #fff;
display: block !important;
width: 180px !important;
line-height: 40px !important;
padding: 8px 0 !important;
font-size: 32px !important;
font-weight: 500 !important;
color: #fff !important;
background: none !important;
border-top: none !important;
border-right: none !important;
border-left: none !important;
border-image: initial !important;
outline: none !important;
border-bottom: 1px solid #fff !important;
}
}
......
......@@ -12,7 +12,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const'
import EyePreview from '@/components/EyePreview'
import { DatePicker } from '@formily/antd-components'
import StatusTag from '@/components/StatusTag'
import { accountStatusMap, memberStatusMap, memberLevelTypeMap } from '../../constant'
import { accountStatusMap, memberStatusMap, memberLevelTypeMap, accountMemberType } from '../../constant'
import LevelBrand from '@/pages/member/components/LevelBrand'
const formActions = createFormActions();
......@@ -23,8 +23,8 @@ const AccountLists: React.FC<{}> = () => {
const columns: ColumnType<any>[] = [
{
title: '账户归属',
dataIndex: 'memberName',
key: 'memberName',
dataIndex: 'parentMemberName',
key: 'parentMemberName',
className: 'commonPickColor',
render: (text, record) => <EyePreview
url={`/memberCenter/payandSettle/capitalAccounts/accountLists/detail?id=${record.id}`}
......@@ -34,8 +34,9 @@ const AccountLists: React.FC<{}> = () => {
},
{
title: '会员类型',
dataIndex: 'memberTypeName',
key: 'memberTypeName',
dataIndex: 'memberType',
key: 'memberType',
render: (t, r) => accountMemberType[t]
},
{
title: '会员角色',
......
......@@ -130,9 +130,17 @@ export const memberLevelTypeMap = {
// 操作项目
export const operationMap = {
'1': '账户充值',
'2': '账户提现',
'3': '订单支付',
'4': '订单退款',
'5': '订单返利'
'1': {title: '账户充值', operator: '+'},
'2': {title: '账户提现', operator: '-'},
'3': {title: '订单支付', operator: '-'},
'4': {title: '订单退款', operator: '+'},
'5': {title: '订单返利', operator: '+'}
}
// 会员类型
export const accountMemberType = {
'1': '企业会员',
'2': '企业个人会员',
'3': '渠道会员',
'4': '渠道个人会员',
}
\ No newline at end of file
......@@ -13,10 +13,11 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import { PublicApi } from '@/services/api';
import { GetPayCreditApplyGetApplyDetailResponse } from '@/services/PayApi';
import { CREDIT_INNER_STATUS, CREDIT_OUTER_STATUS } from '@/constants';
import { CREDIT_INNER_STATUS, CREDIT_OUTER_STATUS, CREDIT_STATUS } from '@/constants';
import AvatarWrap from '@/components/AvatarWrap';
import StatusTag from '@/components/StatusTag';
import { CREDIT_STATUS_TAG_MAP, CREDIT_OUTER_STATUS_TAG_MAP, CREDIT_OUTER_STATUS_BADGE_MAP } from '../../../constant';
import { normalizeFiledata, FileData } from '@/utils';
const OuterCirculation = React.lazy(() => import('../OuterCirculation'));
const QuotaApplicationInfo = React.lazy(() => import('../QuotaApplicationInfo'));
......@@ -41,6 +42,8 @@ interface QuotaValues {
billDay: number | null;
// 申请还款周期
repayPeriod: number | null;
// 申请附件
fileList: FileData[];
};
const DetailInfo: React.FC<DetailInfoProps> = ({
......@@ -54,24 +57,28 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
applyQuota: null,
billDay: null,
repayPeriod: null,
fileList: [],
});
const [infoLoading, setInfoloading] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
// 获取授信详情
const getQuotaInfo = () => {
if (!id) {
return;
}
setInfoloading(true);
PublicApi.getPayCreditApplyGetApplyDetail({
id,
applyId: id,
creditId,
}).then(res => {
if (res.code === 1000) {
setQuotaInfo(res.data);
setQuotaValues({
applyQuota: res.data.applyQuota,
billDay: res.data.billDay,
repayPeriod: res.data.repayPeriod,
applyQuota: res.data.apply.applyQuota,
billDay: res.data.apply.billDay,
repayPeriod: res.data.apply.repayPeriod,
fileList: res.data.apply.fileList ? res.data.apply.fileList.map(item => normalizeFiledata(item.fileUrl)) : [],
});
}
}).finally(() => {
......@@ -90,10 +97,13 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
const handleSubmit = () => {
setSubmitLoading(true);
const { fileList, ...rest } = quotaValues;
PublicApi.postPayCreditApplyAddCreditApply({
applyId: +id,
creditId: creditId ? +creditId : 0,
...quotaValues,
fileList: fileList.map(item => ({ name: item.name, fileUrl: item.url })),
...rest,
}).then(res => {
if (res.code === 1000) {
setTimeout(() => {
......@@ -117,7 +127,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<AvatarWrap
info={{
aloneTxt: '单',
name: `申请单号:${quotaInfo && quotaInfo.applyNo ? quotaInfo.applyNo : ''}`,
name: `申请单号:${quotaInfo && quotaInfo.member ? quotaInfo.member.applyNo : ''}`,
}}
extra={quotaInfo && quotaInfo.member ? quotaInfo.member.levelTag || '' : ''}
/>
......@@ -143,20 +153,20 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
padding: '0 32px',
}}
>
<Descriptions.Item label="会员归属">{'暂无'}</Descriptions.Item>
<Descriptions.Item label="会员归属">{quotaInfo?.member?.parentMemberName}</Descriptions.Item>
<Descriptions.Item label="会员类型">{quotaInfo?.member?.memberTypeName}</Descriptions.Item>
<Descriptions.Item label="会员角色名称">{quotaInfo?.member?.roleName}</Descriptions.Item>
<Descriptions.Item label="会员状态">
<StatusTag
type={CREDIT_STATUS_TAG_MAP[quotaInfo && quotaInfo.member ? quotaInfo.member.status || 1 : 1]}
title={quotaInfo && quotaInfo.member ? quotaInfo.member.status || 1 : 1}
type={CREDIT_STATUS_TAG_MAP[quotaInfo && quotaInfo.member ? quotaInfo.member.status : 'default']}
title={quotaInfo && quotaInfo.member ? CREDIT_STATUS[quotaInfo.member.status] : ''}
/>
</Descriptions.Item>
<Descriptions.Item label="外部状态">
<StatusTag type={CREDIT_OUTER_STATUS_TAG_MAP[quotaInfo?.outerStatus]} title={CREDIT_OUTER_STATUS[quotaInfo?.outerStatus]} />
<StatusTag type={CREDIT_OUTER_STATUS_TAG_MAP[quotaInfo?.member.outerStatus]} title={CREDIT_OUTER_STATUS[quotaInfo?.member.outerStatus]} />
</Descriptions.Item>
<Descriptions.Item label="内部状态">
<Badge color={CREDIT_OUTER_STATUS_BADGE_MAP[quotaInfo?.innerStatus]} text={CREDIT_INNER_STATUS[quotaInfo?.innerStatus]} />
<Badge color={CREDIT_OUTER_STATUS_BADGE_MAP[quotaInfo?.member.innerStatus]} text={CREDIT_INNER_STATUS[quotaInfo?.member.innerStatus]} />
</Descriptions.Item>
</Descriptions>
</PageHeader>
......@@ -166,25 +176,26 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<Suspense fallback={null}>
<OuterCirculation
steps={
quotaInfo && quotaInfo.outerVerifyRecordList ?
quotaInfo.outerVerifyRecordList.map(item => ({
title: item.operate,
quotaInfo && quotaInfo.outerTaskList ?
quotaInfo.outerTaskList.map(item => ({
title: item.taskName,
description: item.roleName,
})) :
[]
}
current={0}
current={quotaInfo && quotaInfo.outerTaskList ? quotaInfo && quotaInfo.outerTaskList.findIndex(item => item.isExecute === 0) : 0}
/>
</Suspense>
<Suspense fallback={null}>
<QuotaApplicationInfo
quotaInfo={{
originalQuota: quotaInfo?.originalQuota,
originalQuota: quotaInfo?.apply.originalQuota,
applyQuota: quotaValues.applyQuota,
billDay: quotaValues.billDay,
repayPeriod: quotaValues.repayPeriod,
applyTime: quotaInfo?.applyTime,
applyTime: quotaInfo?.apply.applyTime,
fileList: quotaValues.fileList,
}}
verify={
quotaInfo && quotaInfo.verify ? {
......
......@@ -11,6 +11,7 @@ import {
} from 'antd';
import { FormOutlined, RightCircleFilled } from '@ant-design/icons';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { FileData } from '@/utils';
import MellowCard from '@/components/MellowCard';
import NiceForm from '@/components/NiceForm';
import { editModalSchema } from './schema';
......@@ -33,8 +34,10 @@ interface QuotaApplicationInfo {
billDay: number,
// 申请还款周期
repayPeriod: number,
// //申请时间
// 申请时间
applyTime: string,
// 申请附件
fileList: FileData[];
},
// 授信审批信息
verify: {
......@@ -189,26 +192,7 @@ const QuotaApplicationInfo: React.FC<QuotaApplicationInfo> = ({
</div>
<Upload
defaultFileList={[
{
uid: '1',
name: 'xxx.png',
status: 'done',
url: 'http://www.baidu.com/xxx.png',
},
{
uid: '2',
name: 'yyy.png',
status: 'done',
url: 'http://www.baidu.com/yyy.png',
},
{
uid: '3',
name: 'zzz.png',
status: 'done',
url: 'http://www.baidu.com/zzz.png',
},
]}
fileList={quotaInfo.fileList}
disabled
/>
</Col>
......@@ -261,6 +245,7 @@ const QuotaApplicationInfo: React.FC<QuotaApplicationInfo> = ({
>
<NiceForm
previewPlaceholder=""
initialValues={quotaInfo}
effects={($, actions) => {
const { setFieldState, setFieldValue } = actions;
......
......@@ -101,7 +101,7 @@ export const editModalSchema: ISchema = {
},
],
},
attachment: {
fileList: {
type: 'string',
title: '申请附件',
'x-component': 'Upload',
......@@ -112,7 +112,7 @@ export const editModalSchema: ISchema = {
prefix: '/creditApplication/applicationAttachment/',
},
beforeUpload: '{{beforeUpload}}',
accept: '.png, .jpg, .jpeg',
accept: '.xls, .xlsx, .doc, .docx, .wps, .pdf, .jpg, .png, .jpeg',
},
'x-rules': [
{
......
......@@ -36,7 +36,7 @@ const QuotaFormQuery: React.FC = () => {
render: (text, record) => (
<>
<EyePreview
url={`/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail?id=${record.id}`}
url={`/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail?id=${record.id}&creditId=${record.creditId}`}
>
{text}
</EyePreview>
......
......@@ -3,11 +3,11 @@ import { usePageStatus } from '@/hooks/usePageStatus';
import DetailInfo from '../components/DetailInfo';
const QuotaMenageApply: React.FC = () => {
const { id, creditId } = usePageStatus();
const { applyId, creditId } = usePageStatus();
return (
<DetailInfo
id={id}
id={applyId}
creditId={creditId}
target="/memberCenter/payandSettle/creditApplication/quotaMenage/history"
isEdit
......
......@@ -67,6 +67,10 @@ export interface BillDetailData {
* 最后还款日期
*/
lastRepayDate: string
/**
* 收款人Id
*/
memberId: number
};
export interface BillRecordParams extends RecordParams {
......@@ -162,7 +166,7 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
id: `${id}`,
}).then(res => {
this.setState({ billInfo: res });
// this.getSettleAccountsCorporateAccountConfig();
this.getSettleAccountsCorporateAccountConfig(res.memberId);
}).finally(() => {
this.setState({ billInfoLoading: false });
});
......@@ -170,7 +174,10 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
};
// 获取对公账户信息
getSettleAccountsCorporateAccountConfig = (payee: string) => {
getSettleAccountsCorporateAccountConfig = (payee: number) => {
if (!payee) {
return;
}
PublicApi.getSettleAccountsCorporateAccountConfig({
memberId: payee,
}).then(res => {
......@@ -256,7 +263,7 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
const { payProveList } = values;
const { repaymentValues, billId, bankAccount } = this.state;
if (!bankAccount.id || !bankAccount.memberId) {
if (!bankAccount || !bankAccount.id || !bankAccount.memberId) {
message.error('没有还款账户相关信息,无法还款');
return;
}
......
......@@ -35,7 +35,7 @@ const QuotaMenage: React.FC = () => {
const handleJumpApply = record => {
// 跳转申请页面
history.push(`/memberCenter/payandSettle/creditApplication/quotaMenage/apply?id=${record.id}`);
history.push(`/memberCenter/payandSettle/creditApplication/quotaMenage/apply?creditId=${record.id}&applyId=0`);
};
const defaultColumns: ColumnType<any>[] = [
......
......@@ -72,6 +72,7 @@ export const enquirySearchexternalState = (text:any) => {
/****** *********************** 报价单 ************************** */
//内部
// 内部状态:1.新增需求单 2.审核需求单一级 3.审核需求单二级 4.提交需求单 5.完成 6.审核不通过 7.取消报价单
export const enquiryOfferSearchInteriorState = (text:any) => {
let component: ReactNode = null;
text === 1 ? component = <Badge status='default' text="新增报价单" />:
......@@ -94,6 +95,7 @@ export const enquiryOfferSearchexternalState = (text:any) => {
// text === 5 ? component = <Badge status='success' text="完成" />:
// text === 6 ? component = <Badge status='error' text="审核不通过" />:
// component = <Badge status="default" text="取消报价单" />
// 外部状态:1.提交需求单 2.审核需求单 3.提交报价单 4.确认报价单 5.完成 6.审核不通过 7.取消报价单
text === 1 ? component = <span style={statuStyle.default}>待提交需求单</span>:
text === 2 ? component = <span style={statuStyle.default}>审核需求单</span>:
text === 3 ? component = <span style={statuStyle.confirm}>待提交报价单</span>:
......
......@@ -862,7 +862,8 @@ const Detail: React.FC<{}> = () => {
otherList.forEach(j => {
let otherItem: any = {}
if (child === j.title) {
otherItem[child] = v[child]
otherItem[child] = v[child].split('/');
console.log(v[child], '我要这里做修改')
_otherList.push(otherItem)
}
})
......
......@@ -16,6 +16,7 @@ class ProductStore implements IProductModule {
@observable public productDescription: IDecsParams;
@observable public isAllAttributePic: boolean = true; // 是否所有属性共用
@observable public currentPageInStore: IPage = { current: null, pageSize: null }; // 页码相关
@observable public tabClickItem: any[] = []; // tab标签页点击项
/** 计算操作 **/
// 加工接口返回的数据,用户编辑回显数据
......@@ -193,6 +194,10 @@ class ProductStore implements IProductModule {
this.currentPageInStore = data
}
@action.bound
public setTabClickItem(data: any) {
this.tabClickItem = data
}
}
......
......@@ -445,7 +445,6 @@ export interface FileData {
};
// 初始化 Upload 数据
export function normalizeFiledata<T>(url: T): T
export function normalizeFiledata(url: string): FileData
export function normalizeFiledata(url: any): any {
if (!url) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment