Commit d877e1d5 authored by XieZhiXiong's avatar XieZhiXiong
parents 063cec32 fe4a565c
......@@ -329,9 +329,29 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
_tempObj['规格ID'] = productInfoByEdit.unitPriceAndPicList[i]?.id
}
if(updateFlag.current){ // 初次渲染tab 再次进入tab采用缓存数据
_tempObj['单价'] = productInfoByEdit.unitPriceAndPicList[i]?.unitPrice || {}
// _tempObj['单价'] = productInfoByEdit.unitPriceAndPicList[i]?.unitPrice || {}
if(productInfoByEdit.unitPriceAndPicList[i]?.unitPrice) {
let tempUnit = {}
let unitPric = productInfoByEdit.unitPriceAndPicList[i]?.unitPrice
Object.keys(unitPric).sort().forEach(function(key) {
tempUnit[key] = unitPric[key];
})
_tempObj['单价'] = tempUnit
} else {
_tempObj['单价'] = {}
}
}else{
_tempObj['单价'] = _tableDataSource[i] && tableDataSource[i] && tableDataSource[i]['单价'] || {}
// _tempObj['单价'] = _tableDataSource[i] && tableDataSource[i] && tableDataSource[i]['单价'] || {}
if(_tableDataSource[i] && tableDataSource[i] && tableDataSource[i]['单价']) {
let tempUnit = {}
let unitPric = _tableDataSource[i] && tableDataSource[i] && tableDataSource[i]['单价']
Object.keys(unitPric).sort().forEach(function(key) {
tempUnit[key] = unitPric[key]
})
_tempObj['单价'] = tempUnit
} else {
_tempObj['单价'] = {}
}
}
}else{
_tempObj['对应货品'] = selectedGoods.length > 0 ? selectedGoods[0].id : 0
......
......@@ -124,7 +124,7 @@ const AccountDetail: React.FC<{}> = () => {
title: '交易时间',
dataIndex: 'tradeTime',
key: 'tradeTime',
render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss")
render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss")
},
{
title: '交易金额(元)',
......@@ -156,7 +156,7 @@ const AccountDetail: React.FC<{}> = () => {
title: '序号',
dataIndex: 'id',
key: 'id',
render: (t, c, i) => i + 1
render: (t, c, i) => i + 1
},
{
title: '操作角色',
......@@ -174,14 +174,14 @@ const AccountDetail: React.FC<{}> = () => {
dataIndex: 'operation',
key: 'operation',
render: (t, r)=> {
return t === 1 ? '冻结资金账户' : '解冻资金账户'
return t === 1 ? '解冻资金账户' : '冻结资金账户'
}
},
{
title: '操作时间',
dataIndex: 'createTime',
key: 'createTime',
render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss")
render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss")
},
{
title: '意见',
......@@ -195,7 +195,7 @@ const AccountDetail: React.FC<{}> = () => {
}
const handleCannel = () => {
}
const handleSubmit = (value) => {
......@@ -240,8 +240,8 @@ const AccountDetail: React.FC<{}> = () => {
<Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="账户信息">
<Row gutter={100}>
<Col
// span={8}
<Col
// span={8}
xxl={8}
xl={9}
lg={9}
......@@ -262,24 +262,24 @@ const AccountDetail: React.FC<{}> = () => {
</div>
</div>
</Col>
<Col
// span={10}
<Col
// span={10}
xxl={10}
xl={8}
lg={8}
>
<div className={styles.infoRight}>
<Row>
<Col
// span={4}
<Col
// span={4}
xxl={4}
xl={10}
lg={10}
>
<p className={styles.rightTitle}>账户归属:</p>
</Col>
<Col
// span={20}
<Col
// span={20}
xxl={20}
xl={14}
lg={14}
......@@ -288,15 +288,15 @@ const AccountDetail: React.FC<{}> = () => {
</Col>
</Row>
<Row>
<Col
<Col
xxl={4}
xl={10}
lg={10}
>
<p className={styles.rightTitle}>账户余额(元):</p>
</Col>
<Col
// span={20}
<Col
// span={20}
xxl={20}
xl={14}
lg={14}
......@@ -305,15 +305,15 @@ const AccountDetail: React.FC<{}> = () => {
</Col>
</Row>
<Row>
<Col
<Col
xxl={4}
xl={10}
lg={10}
>
<p className={styles.rightTitle}>锁定金额(元):</p>
</Col>
<Col
// span={20}
<Col
// span={20}
xxl={20}
xl={14}
lg={14}
......@@ -322,15 +322,15 @@ const AccountDetail: React.FC<{}> = () => {
</Col>
</Row>
<Row>
<Col
<Col
xxl={4}
xl={10}
lg={10}
>
<p className={styles.rightTitle}>账户状态:</p>
</Col>
<Col
// span={20}
<Col
// span={20}
xxl={20}
xl={14}
lg={14}
......@@ -345,8 +345,8 @@ const AccountDetail: React.FC<{}> = () => {
</Row>
</div>
</Col>
<Col
// span={20}
<Col
// span={20}
xxl={6}
xl={7}
lg={7}
......
import React, {useState, useRef, useEffect} from 'react'
import { history } from 'umi'
import { Button, Form, Card, Modal, Select, Table, Checkbox, Row, Col, Tooltip, Slider, InputNumber, Avatar, message } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
PlusOutlined,
SaveOutlined,
LinkOutlined,
LoadingOutlined,
} from '@ant-design/icons'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god'
import ReutrnEle from '@/components/ReturnEle';
import './index.less'
import NiceForm from '@/components/NiceForm'
import { repositDetailSchema } from './schema'
import { createFormActions, ISchema, FormEffectHooks } from '@formily/antd'
import EyePreview from '@/components/EyePreview'
import { findItemAndDelete, omit } from '@/utils'
import { PublicApi } from '@/services/api'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus'
import PositionSetting from './components/PositionSetting'
const addSchemaAction = createFormActions()
const AddRepository:React.FC<{}> = (props) => {
const {
id,
preview,
pageStatus
} = usePageStatus()
// 整体表单提交
const formSubmit = async (values) => {
const params = omit(values, ['NO_SUBMIT3'])
if (params['applyMember']) {
params['applyMember'] = params['applyMember']
}
if(!params['isAllMemberShare'] && !params['applyMember']?.length) {
message.error('请选择指定会员')
} else {
await PublicApi.postWarehouseFreightSpaceAdd(params)
setTimeout(() => {
history.goBack(-1)
}, 1000)
}
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回"/>}
className='addRepository'
title={pageStatus === PageStatus.PREVIEW ? '查看仓位' : '新增仓位'}
extra={(
pageStatus !== PageStatus.PREVIEW
? (
<Button key="1" onClick={() => addSchemaAction.submit()} type="primary" icon={<SaveOutlined />}>
保存
</Button>
)
: null
)}
>
<Card className=''>
<PositionSetting addSchemaAction={addSchemaAction} schema={repositDetailSchema} formSubmit={formSubmit}/>
</Card>
</PageHeaderWrapper>
)
}
export default AddRepository
import React, {useState, useRef, useEffect} from 'react'
import { history } from 'umi'
import { Button, Form, Card, Modal, Select, Table, Checkbox, Row, Col, Tooltip, Slider, InputNumber, Avatar, message } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
PlusOutlined,
SaveOutlined,
LinkOutlined,
LoadingOutlined,
} from '@ant-design/icons'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god'
import ReutrnEle from '@/components/ReturnEle';
import './index.less'
import NiceForm from '@/components/NiceForm'
import { repositDetailSchema } from './schema'
import { createFormActions, ISchema, FormEffectHooks } from '@formily/antd'
import EyePreview from '@/components/EyePreview'
import { findItemAndDelete, omit } from '@/utils'
import { PublicApi } from '@/services/api'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus'
import PositionSetting from './components/PositionSetting'
const addSchemaAction = createFormActions()
const AddRepository:React.FC<{}> = (props) => {
const {
id,
preview,
pageStatus
} = usePageStatus()
// 整体表单提交
const formSubmit = async (values) => {
const params = omit(values, ['NO_SUBMIT3'])
if (params['applyMember']) {
params['applyMember'] = params['applyMember']
}
if(!params['isAllMemberShare'] && !params['applyMember']?.length) {
message.error('请选择指定会员')
} else {
addSchemaAction.getFieldState('warehouseId', prevState => {
params['warehouseName'] = prevState.props.enum.filter((item: any) => item.value === prevState.value)[0]['label']
})
await PublicApi.postWarehouseFreightSpaceAdd(params)
setTimeout(() => {
history.goBack(-1)
}, 1000)
}
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回"/>}
className='addRepository'
title={pageStatus === PageStatus.PREVIEW ? '查看仓位' : '新增仓位'}
extra={(
pageStatus !== PageStatus.PREVIEW
? (
<Button key="1" onClick={() => addSchemaAction.submit()} type="primary" icon={<SaveOutlined />}>
保存
</Button>
)
: null
)}
>
<Card className=''>
<PositionSetting addSchemaAction={addSchemaAction} schema={repositDetailSchema} formSubmit={formSubmit}/>
</Card>
</PageHeaderWrapper>
)
}
export default AddRepository
......@@ -48,9 +48,9 @@ export const useOrderDetail = (options: OrderDetailHookProps) => {
const { code, data, message: msg } = res
if (code === 1000) {
setFormData(data)
if(data.paymentInformationResponses.length > 0){
setCurrentPayInfoId(data.paymentInformationResponses[0].id)
}
// if(data.paymentInformationResponses.length > 0){
// setCurrentPayInfoId(data.paymentInformationResponses[0].id)
// }
reloadPayList(data.supplyMembersId, data.supplyMembersRoleId)
} else {
message.error(msg)
......
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