Commit 006a1c1b authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents 46df50eb 501f1dbf
...@@ -87,7 +87,7 @@ export function render(oldRender: Function) { ...@@ -87,7 +87,7 @@ export function render(oldRender: Function) {
const { data, code } = res const { data, code } = res
if (code === 1000) { if (code === 1000) {
setAuth(data as any) setAuth(data as any)
setRouters(data.urls as any) setRouters(data.urls)
} else { } else {
removeAuth() removeAuth()
removeRouters() removeRouters()
......
...@@ -121,8 +121,8 @@ const ModalTable:React.FC<ModalTableProps> = (props) => { ...@@ -121,8 +121,8 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
tableType='small' tableType='small'
currentRef={selfRef} currentRef={selfRef}
formRender={(child, ps) => <Row justify='space-between' style={{marginBottom: 16}}> formRender={(child, ps) => <Row justify='space-between' style={{marginBottom: 16}}>
<Col span={22} style={{ zIndex: 99 }}>{child}</Col> <Col style={{ zIndex: 99, width: 'calc(100% - 130px)' }}>{child}</Col>
<Col span={2} style={{ marginTop: 4 }}>{ps}</Col> <Col style={{ marginTop: 4, minWidth: 128 }}>{ps}</Col>
</Row >} </Row >}
formilyProps={ formilyProps={
modalType === 'none' ? null : { modalType === 'none' ? null : {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-08-20 16:15:59 * @Date: 2020-08-20 16:15:59
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-28 17:39:18 * @LastEditTime: 2021-07-29 14:08:56
* @Description: 可以带查询的表格,内置 formily,如果需要其他Form可以传入 customRenderSearchForm 配合 reload() 实现查询 * @Description: 可以带查询的表格,内置 formily,如果需要其他Form可以传入 customRenderSearchForm 配合 reload() 实现查询
*/ */
import React, { useState, useEffect, useRef, useImperativeHandle } from 'react'; import React, { useState, useEffect, useRef, useImperativeHandle } from 'react';
...@@ -90,7 +90,7 @@ const NormalTable: React.ForwardRefRenderFunction<NormalTableRefHandleType, Norm ...@@ -90,7 +90,7 @@ const NormalTable: React.ForwardRefRenderFunction<NormalTableRefHandleType, Norm
return { return {
...prevState, ...prevState,
data: props.dataSource as T[], data: props.dataSource as T[],
totalCount: props.dataSource.length, totalCount: props.dataSource?.length || 0,
} }
}); });
} }
......
...@@ -306,3 +306,11 @@ ...@@ -306,3 +306,11 @@
.ant-table-filter-column { .ant-table-filter-column {
justify-content: center !important; justify-content: center !important;
} }
// 修复所有输入框不对称搜索
.ant-input-group {
.ant-input {
padding-top: 6px;
padding-bottom: 6px;
}
}
...@@ -122,7 +122,6 @@ const UserSystem: React.FC<{}> = () => { ...@@ -122,7 +122,6 @@ const UserSystem: React.FC<{}> = () => {
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
<Card className="common-wrapper"> <Card className="common-wrapper">
<StandardTable <StandardTable
columns={columns} columns={columns}
......
...@@ -137,10 +137,6 @@ const AddUser: React.FC<{}> = () => { ...@@ -137,10 +137,6 @@ const AddUser: React.FC<{}> = () => {
} }
} }
const handleAddRole = () => {
setRoleVisible(true);
}
const handlePlateformSelect = (key, node) => { const handlePlateformSelect = (key, node) => {
setOriginSelectNode({ id: key * 1, name: node._title }) setOriginSelectNode({ id: key * 1, name: node._title })
} }
...@@ -233,7 +229,6 @@ const AddUser: React.FC<{}> = () => { ...@@ -233,7 +229,6 @@ const AddUser: React.FC<{}> = () => {
okText="确认" okText="确认"
cancelText="取消" cancelText="取消"
getContainer='#root' getContainer='#root'
// destroyOnClose={true}
> >
<TabTree <TabTree
fetchData={params => fetchOriginTreeData(params)} fetchData={params => fetchOriginTreeData(params)}
......
...@@ -88,7 +88,7 @@ const MemberDetail: React.FC<{}> = () => { ...@@ -88,7 +88,7 @@ const MemberDetail: React.FC<{}> = () => {
if (!keywordName) { if (!keywordName) {
return tableData return tableData
} }
return tableData.filter(v => v.memberId.toString().includes(keywordName)) return tableData.filter(v => v.name.toString().includes(keywordName))
}, [tableData, keywordName]) }, [tableData, keywordName])
const fetchMemberSaleChannel = async (params) => { const fetchMemberSaleChannel = async (params) => {
const userInfo = formAction.getFieldValue('userId') const userInfo = formAction.getFieldValue('userId')
...@@ -503,7 +503,7 @@ const MemberDetail: React.FC<{}> = () => { ...@@ -503,7 +503,7 @@ const MemberDetail: React.FC<{}> = () => {
<Button type='default' onClick={() => unBindMember()} disabled={pageStatus === PageStatus.PREVIEW}>批量解除绑定关系</Button> <Button type='default' onClick={() => unBindMember()} disabled={pageStatus === PageStatus.PREVIEW}>批量解除绑定关系</Button>
</Col> </Col>
<Col style={{display: 'flex'}}> <Col style={{display: 'flex'}}>
<Input.Search value={keywordName} onChange={e => setKeywordName(e.target.value)} onPressEnter={handleSearchChannel}/> <Input.Search placeholder='请搜索会员名称' value={keywordName} onChange={e => setKeywordName(e.target.value)} onPressEnter={handleSearchChannel}/>
<Button type='default' style={{marginLeft: 20}} onClick={() => setKeywordName('')}>重置</Button> <Button type='default' style={{marginLeft: 20}} onClick={() => setKeywordName('')}>重置</Button>
</Col> </Col>
</Row> </Row>
......
...@@ -85,6 +85,7 @@ const HandlingInfo: React.FC<HandlingInfoPropsType> = (props) => { ...@@ -85,6 +85,7 @@ const HandlingInfo: React.FC<HandlingInfoPropsType> = (props) => {
const data: any = res.data const data: any = res.data
if (res.code === 1000) { if (res.code === 1000) {
if (data) { if (data) {
setShopInfo(data);
setSelectCityData(initMemberShopArea(data.areaBOList)) setSelectCityData(initMemberShopArea(data.areaBOList))
setSelectCategoryData(initMemberCategory(data.categoryBOList)) setSelectCategoryData(initMemberCategory(data.categoryBOList))
setLogo(data.logo) setLogo(data.logo)
......
import React from 'react';
import moment from 'moment'; import moment from 'moment';
export const format = (text, fmt?: string) => { export const format = (text, fmt?: string) => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47 * @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-03-02 14:30:30 * @LastEditTime: 2021-07-29 13:40:54
* @Description: 联动逻辑相关 * @Description: 联动逻辑相关
*/ */
import { Modal, message } from 'antd'; import { Modal, message } from 'antd';
...@@ -388,6 +388,7 @@ export const useBusinessEffects = (context, actions) => { ...@@ -388,6 +388,7 @@ export const useBusinessEffects = (context, actions) => {
FormPath.setIn(state, 'originAsyncData', details.map(item => ({ FormPath.setIn(state, 'originAsyncData', details.map(item => ({
...item, ...item,
// 这里的数据以采购、销售订单的为准 // 这里的数据以采购、销售订单的为准
price: item.processPrice, // 与采购入库单、销售发货单统一
logistics: { logistics: {
deliveryType, // 手动赋值配送方式,同一个通知单下的所有商品都是统一的配送方式 deliveryType, // 手动赋值配送方式,同一个通知单下的所有商品都是统一的配送方式
}, },
...@@ -418,7 +419,10 @@ export const useBusinessEffects = (context, actions) => { ...@@ -418,7 +419,10 @@ export const useBusinessEffects = (context, actions) => {
value: item.id, value: item.id,
})); }));
setFieldState('invoicesDetailsRequests.*.product', state => { setFieldState('invoicesDetailsRequests.*.product', state => {
FormPath.setIn(state, 'originAsyncData', details); FormPath.setIn(state, 'originAsyncData', details.map((item) => ({
...item,
price: item.processPrice, // 与采购入库单、销售发货单统一
})));
FormPath.setIn(state, 'props.enum', goodOptions); FormPath.setIn(state, 'props.enum', goodOptions);
}); });
}); });
...@@ -731,6 +735,14 @@ export const useBusinessEffects = (context, actions) => { ...@@ -731,6 +735,14 @@ export const useBusinessEffects = (context, actions) => {
state.value = current.processNum; state.value = current.processNum;
} }
); );
setFieldState(
FormPath.transform(name, /\d/, $1 => {
return `invoicesDetailsRequests.${$1}.amount`
}),
state => {
state.value = current.processPrice ? `¥${(current.processNum * current.processPrice).toFixed(2)}` : null;
}
);
break; break;
} }
......
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