Commit 69fc566b authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

Merge branch 'zwpFix' into dev

parents ff4b6d6c 032cb074
...@@ -161,7 +161,7 @@ const ClassProperty: React.FC<{}> = () => { ...@@ -161,7 +161,7 @@ const ClassProperty: React.FC<{}> = () => {
const syncIds = syncTreeActions.getSelectKeys() const syncIds = syncTreeActions.getSelectKeys()
if(syncIds.length) { if(syncIds.length) {
// @ts-ignore // @ts-ignore
PublicApi.postProductCustomerSyncCategory({idList: syncIds}).then(res => { PublicApi.postProductCustomerSyncCategory({idList: syncIds.concat(syncTreeActions.getExpandedKeys()[0])}).then(res => {
resetMenu() resetMenu()
syncTreeActions.setSelectKeys([]) syncTreeActions.setSelectKeys([])
setResetSearch(true) setResetSearch(true)
......
...@@ -320,7 +320,7 @@ const Goods: React.FC<{}> = () => { ...@@ -320,7 +320,7 @@ const Goods: React.FC<{}> = () => {
> >
<PlusOutlined />新建 <PlusOutlined />新建
</Button> </Button>
<Button style={{ margin: '0 16px' }} onClick={() => setImportModal(true)}>导入数据</Button> {/* <Button style={{ margin: '0 16px' }} onClick={() => setImportModal(true)}>导入数据</Button> */}
<Dropdown overlay={menuMore} trigger={['click']}> <Dropdown overlay={menuMore} trigger={['click']}>
<Button> <Button>
更多 <DownOutlined /> 更多 <DownOutlined />
......
...@@ -219,6 +219,12 @@ const LogisticsForm: React.FC<Iprops> = (props) => { ...@@ -219,6 +219,12 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
deliveryType !== 3 && <Form.Item deliveryType !== 3 && <Form.Item
name="sendAddress" name="sendAddress"
label="发货地址" label="发货地址"
rules={[
{
required: true,
message: '请选择发货地址'
},
]}
> >
<Select <Select
placeholder="请选择发货地址" placeholder="请选择发货地址"
......
...@@ -544,9 +544,9 @@ const Products: React.FC<{}> = () => { ...@@ -544,9 +544,9 @@ const Products: React.FC<{}> = () => {
<Menu.Item key="1" icon={<DeleteOutlined />}> <Menu.Item key="1" icon={<DeleteOutlined />}>
批量删除 批量删除
</Menu.Item> </Menu.Item>
<Menu.Item key="2" icon={<DeleteOutlined />}> {/* <Menu.Item key="2" icon={<DeleteOutlined />}>
删除导入批次 删除导入批次
</Menu.Item> </Menu.Item> */}
</Menu> </Menu>
) )
...@@ -558,7 +558,7 @@ const Products: React.FC<{}> = () => { ...@@ -558,7 +558,7 @@ const Products: React.FC<{}> = () => {
> >
<PlusOutlined />新建 <PlusOutlined />新建
</Button> </Button>
<Button style={{margin:'0 16px'}} onClick={()=>setImportModal(true)}>导入数据</Button> {/* <Button style={{margin:'0 16px'}} onClick={()=>setImportModal(true)}>导入数据</Button> */}
<Dropdown overlay={menuMore} trigger={['click']}> <Dropdown overlay={menuMore} trigger={['click']}>
<Button> <Button>
更多 <DownOutlined /> 更多 <DownOutlined />
......
...@@ -72,7 +72,8 @@ const warehouseColumns: any[] = [ ...@@ -72,7 +72,8 @@ const warehouseColumns: any[] = [
dataIndex: 'reductionInventory', dataIndex: 'reductionInventory',
key: 'reductionInventory', key: 'reductionInventory',
title: '扣减仓位库存', title: '扣减仓位库存',
align: 'center' align: 'center',
render: (t, r) => r.type === 4 ? `-${t}` : `+${t}`
}, },
{ {
dataIndex: 'createTime', dataIndex: 'createTime',
......
...@@ -77,7 +77,7 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => { ...@@ -77,7 +77,7 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
}, [sum, freePrice]) }, [sum, freePrice])
useEffect(() => { useEffect(() => {
// 存在商品 并且有选择收货地址,则开始计算运费 // 存在商品 并且有选择收货地址,则开始计算运费,此外 收货方式变动也要重新计算
if (data && data.length > 0 && receiverAddressId) { if (data && data.length > 0 && receiverAddressId) {
// 筛选配送方式为物流的商品并且使用了运费模板 // 筛选配送方式为物流的商品并且使用了运费模板
const logsiticsDataMaps = data.filter(v => v.logistics && v.logistics.useTemplate && v.logistics.deliveryType === 1) const logsiticsDataMaps = data.filter(v => v.logistics && v.logistics.useTemplate && v.logistics.deliveryType === 1)
...@@ -98,7 +98,7 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => { ...@@ -98,7 +98,7 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
setFreePrice(0) setFreePrice(0)
} }
} }
}, [data]) }, [data, receiverAddressId])
return <RowStyle> return <RowStyle>
......
import React, { ReactNode, useRef, useEffect } from 'react' import React, { ReactNode, useRef, useEffect } from 'react'
import { history } from 'umi' import { history } from 'umi'
import { Button, Popconfirm, Card, message, Dropdown, Menu } from 'antd' import { Button, Popconfirm, Card, message, Dropdown, Menu, Space } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout' import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { import {
PlusOutlined, PlusOutlined,
...@@ -14,6 +14,10 @@ import { ColumnType } from 'antd/lib/table/interface' ...@@ -14,6 +14,10 @@ import { ColumnType } from 'antd/lib/table/interface'
import moment from 'moment' import moment from 'moment'
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import { PublicApi } from '@/services/api' import { PublicApi } from '@/services/api'
import NiceForm from '@/components/NiceForm'
import { createFormActions } from '@formily/antd'
const formActions = createFormActions();
const TransactionRules: React.FC<{}> = () => { const TransactionRules: React.FC<{}> = () => {
const ref = useRef<any>({}) const ref = useRef<any>({})
...@@ -121,10 +125,71 @@ const TransactionRules: React.FC<{}> = () => { ...@@ -121,10 +125,71 @@ const TransactionRules: React.FC<{}> = () => {
ref.current.reload() ref.current.reload()
}) })
} }
const Actions = (
<Space>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push('/memberCenter/tranactionAbility/transactionRules/add')}>
新建
</Button>
</Space>
);
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
<Card> <Card>
<StandardTable <StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
expressionScope={{
Actions,
}}
effects={($, actions) => {
}}
schema={{
type: 'object',
properties: {
searchWrap: {
type: 'object',
'x-component': 'Mega-Layout',
'x-component-props': {
grid: true,
},
properties: {
actions: {
type: 'object',
'x-component': 'Children',
'x-component-props': {
children: '{{Actions}}',
},
},
name: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '规则名称',
advanced: false,
// tip: '输入 单据名称 进行搜索',
},
},
},
},
},
}}
onSubmit={values => ref.current.reload(values)}
/>
}
/>
{/* <StandardTable
columns={columns} columns={columns}
currentRef={ref} currentRef={ref}
fetchTableData={(params: any) => fetchData(params)} fetchTableData={(params: any) => fetchData(params)}
...@@ -174,7 +239,8 @@ const TransactionRules: React.FC<{}> = () => { ...@@ -174,7 +239,8 @@ const TransactionRules: React.FC<{}> = () => {
</> </>
) )
}} }}
/> /> */}
</Card> </Card>
</PageHeaderWrapper> </PageHeaderWrapper>
) )
......
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