Commit 5c681ba7 authored by alwayOnlie's avatar alwayOnlie
parents ef6801fb 006a1c1b
......@@ -87,7 +87,7 @@ export function render(oldRender: Function) {
const { data, code } = res
if (code === 1000) {
setAuth(data as any)
setRouters(data.urls as any)
setRouters(data.urls)
} else {
removeAuth()
removeRouters()
......
......@@ -121,8 +121,8 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
tableType='small'
currentRef={selfRef}
formRender={(child, ps) => <Row justify='space-between' style={{marginBottom: 16}}>
<Col span={22} style={{ zIndex: 99 }}>{child}</Col>
<Col span={2} style={{ marginTop: 4 }}>{ps}</Col>
<Col style={{ zIndex: 99, width: 'calc(100% - 130px)' }}>{child}</Col>
<Col style={{ marginTop: 4, minWidth: 128 }}>{ps}</Col>
</Row >}
formilyProps={
modalType === 'none' ? null : {
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-08-20 16:15:59
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-28 17:39:18
* @LastEditTime: 2021-07-29 14:08:56
* @Description: 可以带查询的表格,内置 formily,如果需要其他Form可以传入 customRenderSearchForm 配合 reload() 实现查询
*/
import React, { useState, useEffect, useRef, useImperativeHandle } from 'react';
......@@ -90,7 +90,7 @@ const NormalTable: React.ForwardRefRenderFunction<NormalTableRefHandleType, Norm
return {
...prevState,
data: props.dataSource as T[],
totalCount: props.dataSource.length,
totalCount: props.dataSource?.length || 0,
}
});
}
......
......@@ -306,3 +306,11 @@
.ant-table-filter-column {
justify-content: center !important;
}
// 修复所有输入框不对称搜索
.ant-input-group {
.ant-input {
padding-top: 6px;
padding-bottom: 6px;
}
}
......@@ -122,7 +122,6 @@ const UserSystem: React.FC<{}> = () => {
return (
<PageHeaderWrapper>
<Card className="common-wrapper">
<StandardTable
columns={columns}
......
......@@ -137,10 +137,6 @@ const AddUser: React.FC<{}> = () => {
}
}
const handleAddRole = () => {
setRoleVisible(true);
}
const handlePlateformSelect = (key, node) => {
setOriginSelectNode({ id: key * 1, name: node._title })
}
......@@ -233,7 +229,6 @@ const AddUser: React.FC<{}> = () => {
okText="确认"
cancelText="取消"
getContainer='#root'
// destroyOnClose={true}
>
<TabTree
fetchData={params => fetchOriginTreeData(params)}
......
......@@ -88,7 +88,7 @@ const MemberDetail: React.FC<{}> = () => {
if (!keywordName) {
return tableData
}
return tableData.filter(v => v.memberId.toString().includes(keywordName))
return tableData.filter(v => v.name.toString().includes(keywordName))
}, [tableData, keywordName])
const fetchMemberSaleChannel = async (params) => {
const userInfo = formAction.getFieldValue('userId')
......@@ -503,7 +503,7 @@ const MemberDetail: React.FC<{}> = () => {
<Button type='default' onClick={() => unBindMember()} disabled={pageStatus === PageStatus.PREVIEW}>批量解除绑定关系</Button>
</Col>
<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>
</Col>
</Row>
......
......@@ -85,6 +85,7 @@ const HandlingInfo: React.FC<HandlingInfoPropsType> = (props) => {
const data: any = res.data
if (res.code === 1000) {
if (data) {
setShopInfo(data);
setSelectCityData(initMemberShopArea(data.areaBOList))
setSelectCategoryData(initMemberCategory(data.categoryBOList))
setLogo(data.logo)
......
......@@ -44,7 +44,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
tempObject.memberName = item.memberName
for(let j = 0; j < item.evaluationTenderList.length; j++) {
let _item = item['evaluationTenderList'][j]
tempObject.expertExtractRecordId = _item['expertExtractRecord']['id']
tempObject.expertExtractRecordId = _item.expertExtractRecord?.id || _item['sort']
tempObject.score = _item['score']
tempObject.sort = _item['sort']
tempObject.standard = _item['standard']
......
......@@ -44,7 +44,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
tempObject.memberName = item.memberName
for(let j = 0; j < item.evaluationTenderList.length; j++) {
let _item = item['evaluationTenderList'][j]
tempObject.expertExtractRecordId = _item['expertExtractRecord']['id']
tempObject.expertExtractRecordId = _item.expertExtractRecord?.id || _item['sort']
tempObject.score = _item['score']
tempObject.sort = _item['sort']
tempObject.standard = _item['standard']
......
......@@ -44,7 +44,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
tempObject.memberName = item.memberName
for(let j = 0; j < item.evaluationTenderList.length; j++) {
let _item = item['evaluationTenderList'][j]
tempObject.expertExtractRecordId = _item['expertExtractRecord']['id']
tempObject.expertExtractRecordId = _item.expertExtractRecord?.id || _item['sort']
tempObject.score = _item['score']
tempObject.sort = _item['sort']
tempObject.standard = _item['standard']
......
......@@ -44,7 +44,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
tempObject.memberName = item.memberName
for(let j = 0; j < item.evaluationTenderList.length; j++) {
let _item = item['evaluationTenderList'][j]
tempObject.expertExtractRecordId = _item['expertExtractRecord']['id']
tempObject.expertExtractRecordId = _item.expertExtractRecord?.id || _item['sort']
tempObject.score = _item['score']
tempObject.sort = _item['sort']
tempObject.standard = _item['standard']
......
......@@ -46,7 +46,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
if(item.evaluationTenderList)
for(let j = 0; j < item.evaluationTenderList.length; j++) {
let _item = item['evaluationTenderList'][j]
tempObject.expertExtractRecordId = _item['expertExtractRecord']['id']
tempObject.expertExtractRecordId = _item.expertExtractRecord?.id || _item['sort']
tempObject.score = _item['score']
tempObject.sort = _item['sort']
tempObject.standard = _item['standard']
......
import React from 'react';
import moment from 'moment';
export const format = (text, fmt?: string) => {
......
......@@ -186,6 +186,7 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
dataIndex: 'createTime',
align: 'center',
key: 'createTime',
render: text => formatTimeString(text, 'YYYY-MM-DD')
},
{
title: '物流单号',
......
......@@ -191,7 +191,7 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
dataIndex: 'createTime',
align: 'center',
key: 'createTime',
// render: text => formatTimeString(text)
render: text => formatTimeString(text, 'YYYY-MM-DD')
},
{
title: '物流单号',
......
......@@ -286,7 +286,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
if(!data.allContracts) {
const res = await getBindingContracts({id: id.toString(), current: '1', pageSize: '1000', digest: ''})
addSchemaAction.setFieldState('contracts', state => {
state.value = processFields(res.data, false)
state.value = res.data
})
setProductsLength(res.totalCount)
}
......
import React, { useState, useRef, useEffect } from 'react'
import styled from 'styled-components'
import { ISchemaFormProps, ISchemaFieldProps, ISchemaFieldComponentProps, createFormActions, useFieldState } from '@formily/antd'
import { Button, Space, Row, Col, Tag } from 'antd'
import { PlusOutlined, DeleteColumnOutlined, EditOutlined, DeleteOutlined, CaretUpOutlined, CaretDownOutlined, EyeOutlined } from '@ant-design/icons'
import { ISchemaFieldComponentProps, useFieldState } from '@formily/antd'
import { Row, Col, Tag } from 'antd'
import { CaretUpOutlined, CaretDownOutlined } from '@ant-design/icons'
import cx from 'classnames'
import { PublicApi } from '@/services/api'
......@@ -62,7 +62,7 @@ const SelectProcesss = (props: ISchemaFieldComponentProps) => {
const { value, mutators, editable } = props
useEffect(() => {
PublicApi.getOrderTradeProcessBaseList().then(res => {
PublicApi.getOrderPurchaseProcessBaseList().then(res => {
setFieldState({
dataSource: res.data,
showMore
......
......@@ -69,7 +69,7 @@ const PurchaseRules: React.FC<{}> = () => {
>
<Button
type="link"
style={record.status ? { color: '#00B37A' } : { color: 'red' }}>{record.state ? <>有效 <PlayCircleOutlined /></> : <>无效 <PauseCircleOutlined /></>}</Button>
style={record.status ? { color: '#00B37A' } : { color: 'red' }}>{record.status ? <>有效 <PlayCircleOutlined /></> : <>无效 <PauseCircleOutlined /></>}</Button>
</Popconfirm>
)
return component
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-03-02 14:30:30
* @LastEditTime: 2021-07-29 13:40:54
* @Description: 联动逻辑相关
*/
import { Modal, message } from 'antd';
......@@ -388,6 +388,7 @@ export const useBusinessEffects = (context, actions) => {
FormPath.setIn(state, 'originAsyncData', details.map(item => ({
...item,
// 这里的数据以采购、销售订单的为准
price: item.processPrice, // 与采购入库单、销售发货单统一
logistics: {
deliveryType, // 手动赋值配送方式,同一个通知单下的所有商品都是统一的配送方式
},
......@@ -418,7 +419,10 @@ export const useBusinessEffects = (context, actions) => {
value: item.id,
}));
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);
});
});
......@@ -731,6 +735,14 @@ export const useBusinessEffects = (context, actions) => {
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;
}
......
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