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

Merge branch 'dev' into test

parents b78a59d6 e0d66d1f
......@@ -303,19 +303,19 @@ const detailInfo: React.FC<{}> = () => {
</div>
</>
}
extra={
dataInfo.status === 2 &&
<>
<Button onClick={() => setvisible(true)}>
<StopOutlined />
不接受物流单
</Button>
<Button onClick={() => setvisible(true)} className={style['saveBtn']}>
<CheckSquareOutlined />
接受物流单
</Button>
</>
}
// extra={
// dataInfo.status === 2 &&
// <>
// <Button onClick={() => setvisible(true)}>
// <StopOutlined />
// 不接受物流单
// </Button>
// <Button onClick={() => setvisible(true)} className={style['saveBtn']}>
// <CheckSquareOutlined />
// 接受物流单
// </Button>
// </>
// }
content={
<div className={style['headerMain']}>
<div className={style['headerMain-left']}>
......
......@@ -18,6 +18,12 @@ import { timeRange } from '@/utils/index'
import statuStyle from '../colorTag'
import { TimeList, statusList, outSideStatusList } from '../statusList'
import moment from 'moment'
import { LogisticsOrderSearchSchema, confirmLogisticsOrderSearchSchema } from '../components/schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import NiceForm from '@/components/NiceForm';
import { createFormActions } from '@formily/antd';
const formActions = createFormActions();
let { Option } = Select
export interface listProps {
title?: ReactNode,
......@@ -323,8 +329,13 @@ const orderSearchList: React.FC<listProps> = (props) => {
setSearchForm({ ...searchForm })
ref.current.reload({ ...searchForm })
}
const search = (values: any) => {
ref.current.reload(values)
}
return (
<PageHeaderWrapper title='快递单查询'>
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{ rowKey: 'id' }}
......@@ -335,105 +346,15 @@ const orderSearchList: React.FC<listProps> = (props) => {
fetchTableData={(params: any) => fetchData(params)}
rowClassName="editable-row"
controlRender={
<>
<Row>
<Col span={12}>
<Tooltip trigger={['focus']} placement='top'
title={'输入物流单号进行搜索'}>
<Input.Search
style={{ width: '232px' }}
value={searchForm.logisticsOrderNo}
placeholder='搜索'
onChange={(e) => setSearchForm({ ...searchForm, logisticsOrderNo: e.target.value })}
onSearch={(val) => handleChange('logisticsOrderNo', val)}
/>
</Tooltip>
<Button className={style['filter-btn']} onClick={() => setIsSearch(isSearch = !isSearch)}>
高级筛选{isSearch ? <UpOutlined /> : <DownOutlined />}
</Button>
<Button className={style.selectBtn} onClick={() => handleReset()}>重置</Button>
</Col>
</Row>
<Row style={{ margin: '16px 0' }}>
{
isSearch &&
<Col>
<Space size={16}>
{
props.type === '1' ?
<>
<Input.Search
style={{ width: '232px' }}
value={searchForm.invoicesNo}
placeholder='输入对应单号进行搜索'
onChange={(e) => setSearchForm({ ...searchForm, invoicesNo: e.target.value })}
onSearch={(val) => handleChange('invoicesNo', val)}
/>
<Select
className={style.select}
showSearch
value={searchForm.companyId}
onChange={(val) => handleChange('companyId', val)}
optionFilterProp='children'
filterOption={(input, option) =>
option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
>
<Option value=''>物流服务商(全部)</Option>
{
companyList.map((item, index) => {
return <Option value={item.id}>{item.name}</Option>
})
}
</Select>
</>
:
<Select
className={style.select}
showSearch
value={searchForm.shipperId}
onChange={(val) => handleChange('shipperId', val)}
optionFilterProp='children'
filterOption={(input, option) =>
option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
<NiceForm
actions={formActions}
onSubmit={values => search(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'logisticsOrderNo', FORM_FILTER_PATH)
}}
schema={props.type === '1' ? confirmLogisticsOrderSearchSchema : LogisticsOrderSearchSchema}
>
<Option value=''>发货方(全部)</Option>
{
shipperAddressList.map((item, index) => {
return <Option key={index} value={item.value}>{item.label}</Option>
})
}
</Select>
}
<Select
className={style.select}
value={TimeRange}
onChange={(val) => {
setTimeRange(val),
setSearchForm({
...searchForm,
invoicesTimeStart: timeRange(val).st,
invoicesTimeEnd: timeRange(val).et
})
}
}
>
{
TimeList.map((item, index) => {
return <Option key={index} value={item.value}>{item.label}</Option>
})
}
</Select>
</Space>
</Col>
}
</Row>
</>
</NiceForm>
}
/>
......
This diff is collapsed.
......@@ -113,13 +113,17 @@ const Company: React.FC<{}> = () => {
const title = `确定要${status}吗?`
return (
<>
<Button disabled={record.status !== 0} type='link' onClick={() => history.push(`/memberCenter/logisticsAbility/logistics/company/edit?id=${record.id}`)}>编辑</Button>
<Popconfirm disabled={record.status !== 0} title="确定要删除吗?" okText="是" cancelText="否" onConfirm={() => handleDelete(record.id)}>
<Button disabled={record.status !== 0} type='link'>
{record.status === 0 &&
<>
<Button type='link' onClick={() => history.push(`/memberCenter/logisticsAbility/logistics/company/edit?id=${record.id}`)}>编辑</Button>
<Popconfirm title="确定要删除吗?" okText="是" cancelText="否" onConfirm={() => handleDelete(record.id)}>
<Button type='link'>
删除
</Button>
</Popconfirm>
</>
}
</>
)
}
}
......
......@@ -190,8 +190,9 @@ const diaLogForm: React.FC<ListProps> = (props) => {
// provic: '广东省',
pricingMode: '1',
transportMode: '1',
designateList: [{}]
designateList: [{}],
}}
previewPlaceholder=' '
onSubmit={(values) => FormSumbit(values)}
components={{
Input, Select, TextArea: Input.TextArea, Switch, Radio,
......
......@@ -25,11 +25,17 @@ import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface'
import { IFormFilter, IButtonFilter } from 'god/dist/src/standard-table/TableController'
import { PublicApi } from '@/services/api'
import { timeRange} from '@/utils/index'
import { timeRange } from '@/utils/index'
import moment from 'moment'
import statuStyle from '../colorTag'
import {TimeList,outSideStatusList,statusList} from '../statusList'
import { TimeList, outSideStatusList, statusList } from '../statusList'
import style from '../components/index.less'
import { confirmLogisticsOrderSchema } from '../components/schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import NiceForm from '@/components/NiceForm';
import { createFormActions } from '@formily/antd';
const formActions = createFormActions();
const { Option } = Select
const data = [
{
......@@ -195,7 +201,7 @@ const OrderList: React.FC<ListProps> = (props) => {
align: 'center',
dataIndex: 'invoicesTime',
key: 'invoicesTime',
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: '外部状态',
......@@ -204,7 +210,7 @@ const OrderList: React.FC<ListProps> = (props) => {
key: 'status',
filters: statusList,
filterMultiple: false,
onFilter:(value,record) => record.status === value,
onFilter: (value, record) => record.status === value,
render: (text: any, record: any) => {
let component: ReactNode = null
if (text == 3) {
......@@ -296,7 +302,10 @@ const OrderList: React.FC<ListProps> = (props) => {
ref.current.reload()
}
// 搜索
const search = (values: any) => {
ref.current.reload(values)
}
const onCancel = () => {
setvisible(false)
}
......@@ -308,64 +317,16 @@ const OrderList: React.FC<ListProps> = (props) => {
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
rowClassName="editable-row"
formilyChilds={{
children: (
<>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push(`/memberCenter/logisticsAbility/logistics/list/addressForm?addType=${props.type}`)}>新建</Button>
</>
)
}}
controlRender={
<>
<Row>
<Col span={12}>
<Tooltip trigger={['focus']} placement='top'
title={props.type === '1' ? '输入物流单号、订单号进行搜索' : '输入物流单号、发货方进行搜索'}>
<Input.Search
style={{ width: '232px' }}
value={searchForm.logisticsOrderNo}
placeholder='搜索'
onChange={(e) => setSearchForm({ ...searchForm, logisticsOrderNo: e.target.value })}
onSearch={() => handleSearch}
/>
</Tooltip>
<Button className={style['filter-btn']} onClick={() => setIsSearch(isSearch = !isSearch)}>
高级筛选{isSearch ? <UpOutlined /> : <DownOutlined />}
</Button>
<Button className={style.selectBtn} onClick={() => handleReset()}>重置</Button>
</Col>
</Row>
<Row style={{ margin: '16px 0' }}>
{
isSearch &&
<Col>
<Space size={16}>
<Select
className={style.select}
value={TimeRange}
onChange={(val) => {
setTimeRange(val),
setSearchForm({
...searchForm,
invoicesTimeStart: timeRange(val).st,
invoicesTimeEnd: timeRange(val).et
})
}
}
<NiceForm
actions={formActions}
onSubmit={values => search(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'logisticsOrderNo', FORM_FILTER_PATH)
}}
schema={confirmLogisticsOrderSchema}
>
{
TimeList.map((item,index) => {
return <Option key={index} value={item.value}>{item.label}</Option>
})
}
</Select>
</Space>
</Col>
}
</Row>
</>
</NiceForm>
}
/>
<ConfirmModal
......
......@@ -30,6 +30,12 @@ import {TimeList,outSideStatusList,statusList} from '../statusList'
import moment from 'moment'
import { timeRange } from '@/utils/index'
import Index from '@/pages';
import { submitLogisticsOrderSchema } from '../components/schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import NiceForm from '@/components/NiceForm';
import { createFormActions } from '@formily/antd';
const formActions = createFormActions();
let { Option } = Select
const data = [
{
......@@ -315,7 +321,17 @@ const OrderList: React.FC<ListProps> = (props) => {
setSearchForm(obj)
ref.current.reload(obj)
}
// 搜索
const search = (values: any) => {
ref.current.reload(values)
}
const controllerBtns = <Row>
<Col span={24}>
<Space direction="horizontal" size={16}>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push(`/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add`)}>新建</Button>
</Space>
</Col>
</Row>
return (
<PageHeaderWrapper>
<Card>
......@@ -326,96 +342,16 @@ const OrderList: React.FC<ListProps> = (props) => {
fetchTableData={(params: any) => fetchData(params)}
rowClassName="editable-row"
controlRender={
<>
<Row>
<Col span={8}>
<Button
type="primary"
onClick={() =>
history.push('/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add')
}
>
<PlusOutlined />
新建
</Button>
</Col>
<Col span={10}
offset={6}
style={{ textAlign: 'right' }}
>
<Tooltip trigger={['focus']} placement='top'
title='输入物流单号、订单号进行搜索'>
<Input.Search
style={{ width: '232px' }}
value={searchForm.logisticsOrderNo}
placeholder='搜索'
onChange={(e) => setSearchForm({ ...searchForm, logisticsOrderNo: e.target.value })}
onSearch={(val) => handleChange('logisticsOrderNo', val)}
/>
</Tooltip>
<Button className={style['filter-btn']} onClick={() => setIsSearch(isSearch = !isSearch)}>
高级筛选{isSearch ? <UpOutlined /> : <DownOutlined />}
</Button>
<Button className={style.selectBtn} onClick={() => handleReset()}>重置</Button>
<Row style={{ margin: '16px 0' }}>
{
isSearch &&
<Col
offset={2}
span={22}
>
<Space size={16}>
<Input.Search
style={{ width: '232px' }}
value={searchForm.invoicesNo}
placeholder='输入对应单号进行搜索'
onChange={(e) => setSearchForm({ ...searchForm, invoicesNo: e.target.value })}
onSearch={(val) => handleChange('invoicesNo', val)}
/>
<Select
className={style.select}
value={searchForm.companyId}
showSearch
onChange={(val) => handleChange('companyId', val)}
optionFilterProp='children'
filterOption={(input, option) =>
option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
>
<Option value=''>物流服务商(全部)</Option>
{
companyList.map((item, index) => {
return <Option key={index} value={item.id}>{item.name}</Option>
})
}
</Select>
<Select
className={style.select}
value={TimeRange}
onChange={(val) => {
setTimeRange(val),
setSearchForm({
...searchForm,
invoicesTimeStart: timeRange(val).st,
invoicesTimeEnd: timeRange(val).et
})
<NiceForm
actions={formActions}
onSubmit={values => search(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'logisticsOrderNo', FORM_FILTER_PATH)
}}
expressionScope={{controllerBtns}}
schema={submitLogisticsOrderSchema}
>
{
TimeList.map((item, index) => {
return <Option key={index} value={item.value}>{item.label}</Option>
})
}
</Select>
</Space>
</Col>
}
</Row>
</Col>
</Row>
</>
</NiceForm>
}
/>
</Card>
......
......@@ -48,7 +48,7 @@ const layout = {
* @return {type}
*/
const fetchData = async (params) => {
const res = await PublicApi.getProductCommodityCommonGetCommodityListBySeller({ ...params, priceTypeList: [1, 2], environment: 1, shopType: 1 })
const res = await PublicApi.getProductCommodityCommonGetCommodityListBySeller({ ...params, priceTypeList: 2, environment: 1, shopType: 1 })
return res.data
}
......@@ -152,6 +152,7 @@ const comfirmDialog: React.FC<Params> = (props, { onRef }) => {
const handleSelectOk = () => {
const selectRow = productRowCtl.selectRow[0]
if (selectRow) {
let { commodityId, id, customerCategoryName, goodsId, roleId, name, brandName } = selectRow
Curform.setFieldsValue({
productName: name,//商品名称
......@@ -162,6 +163,9 @@ const comfirmDialog: React.FC<Params> = (props, { onRef }) => {
//查询属性
GetCommodityAttribute(id)
setsVisible(false)
}
}
const handleSelectCancel = () => {
setsVisible(false)
......@@ -241,6 +245,7 @@ const comfirmDialog: React.FC<Params> = (props, { onRef }) => {
确定
</Button>
]
const { ...restProps } = props
return (
<>
<Modal
......@@ -415,8 +420,8 @@ const comfirmDialog: React.FC<Params> = (props, { onRef }) => {
tableProps={{
rowKey: 'id'
}}
>
</ModalTable>
forceRender={visible}
/>
</>
)
}
......
......@@ -64,14 +64,14 @@ const List:React.FC<{}> = () => {
key:'quotationNo',
dataIndex:'quotationNo',
align:'center',
render:(text:any, record:any) => <EyePreview type="button" url={`/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/rfq/preview?id=${record.id}`}>{text}</EyePreview>
render:(text:any, record:any) => <EyePreview url={`/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/rfq/preview?id=${record.id}`}>{text}</EyePreview>
},
{
title:'需求单号',
key:'requisitionFormNo',
dataIndex:'requisitionFormNo',
align:'center',
render:(text:any, record:any) => <EyePreview type="button" url={`/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/demand/preview?id=${record.requisitionId}`}>{text}</EyePreview>
render:(text:any, record:any) => <EyePreview url={`/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/demand/preview?id=${record.requisitionId}`}>{text}</EyePreview>
},
{
title:'报价单摘要',
......
......@@ -1034,6 +1034,10 @@ const Detail: React.FC<{}> = () => {
setaddres(option)
}
const disabledDate = (current) => {
return current && current < moment().endOf('day');
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
......@@ -1219,7 +1223,9 @@ const Detail: React.FC<{}> = () => {
]}
name="deliveryTime"
>
<DatePicker style={{ width: '100%' }} />
<DatePicker style={{ width: '100%' }}
disabledDate={disabledDate}
/>
</Form.Item>
<Form.Item
initialValue={initialValues.addresId}
......@@ -1250,7 +1256,12 @@ const Detail: React.FC<{}> = () => {
]}
name="quotationAsTime"
>
<DatePicker showTime format="YYYY-MM-DD HH:mm" style={{ width: '100%' }} />
<DatePicker
showTime
format="YYYY-MM-DD HH:mm"
style={{ width: '100%' }}
disabledDate={disabledDate}
/>
</Form.Item>
<Form.Item
initialValue={initialValues.offer}
......
......@@ -29,15 +29,18 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
};
// 会员添加弹窗控制
const [visibleChannelMember, setVisibleChannelMember] = useState(false);
const [goodsList, setgoodsList] = useState([]);
const [goodsList, setgoodsList] = useState<any>([]);
const [inquiryGoods, setinquiryGoods] = useState<any>([]);
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'id' });
const [customerCategory, setcustomerCategory] = useState([]);
const [brand, setbrand] = useState([]);
const [customerCategory, setcustomerCategory] = useState<any>([]);
const [brand, setbrand] = useState<any>([]);
const handleOkAddMember = () => {
setVisibleChannelMember(false);
const arr: any[] = []
const arr: any[] = [];
const inquiry: any[] = [];
memberRowCtl.selectRow.forEach((v, i) => {
inquiry.push(v)
arr.push({
productId: v.id,
productName: v.name,
......@@ -47,9 +50,10 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
purchaseCount: 1
})
setgoodsList(arr)
getGoodsList(arr)
})
setinquiryGoods(inquiry);
setgoodsList(arr);
getGoodsList(arr);
});
}
const handleCancelAddMember = () => {
setVisibleChannelMember(false)
......@@ -225,8 +229,13 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
newData.splice(colIndex, 1)
// 删除选中的项
memberRowCtl.setSelectRow(newData)
memberRowCtl.setSelectedRowKeys(newData.map(v => v.productId))
const selectData = [...inquiryGoods];
const idx = selectData.findIndex(v => v.id === record.productId);
console.log(newData, selectData);
console.log(colIndex, idx);
selectData.splice(idx, 1)
memberRowCtl.setSelectRow(selectData)
memberRowCtl.setSelectedRowKeys(selectData.map(v => v.id))
setgoodsList(newData)
}
......
......@@ -7,19 +7,6 @@ const AddEnquiryOrderDatails:React.FC<{}> = () => {
//type: 1.待提交询价单,2.待审核询价单1级,3.待审核询价单2级,4.询价单查询,5.询价单查询,6.待新增报价单
//view: 1.询价单号,2.报价单号
const { id } = history.location.query;
const { pathname } = history.location;
const last = pathname.split('/')[pathname.split('/').length - 1];
const type = pathname.split('/')[pathname.split('/').length - 2];
const [view, setview] = useState<Number>(1);
if(last === 'details') {
// 代表是进来提交审核
} else if(type === 'rfq') {
// 代表的是查看询价
} else if(type === 'quote') {
// 代表的是查看报价
}
return(
<Datails
page_type={6}
......
......@@ -33,7 +33,8 @@ const Details: React.FC<parmas> = (props) => {
//view: 1.询价单号,2.报价单号
//action: 审核按钮
const { id, page_type, view, action } = props;
console.log(action)
const { pathname } = history.location;
const last = pathname.split('/')[pathname.split('/').length - 1];
const [headerWrapperData, setheaderWrapperData] = useState<Array<any>>([]);
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
......@@ -314,7 +315,7 @@ const Details: React.FC<parmas> = (props) => {
extra={
<>
{
(action && (Number(page_type) === 2 || Number(page_type) === 3) && (data.interiorState === 2 || data.interiorState === 3)) &&
(last==='details' && (Number(page_type) === 2 || Number(page_type) === 3) && (data.interiorState === 2 || data.interiorState === 3)) &&
<>
<Button type='primary' className={style['saveBtn']} onClick={() => { setvisible(true) }}>
<CheckSquareOutlined />单据审核
......@@ -322,7 +323,7 @@ const Details: React.FC<parmas> = (props) => {
</>
}
{
( action && Number(page_type) === 6 && data.interiorState === 1) &&
( last==='details' && Number(page_type) === 6 && data.interiorState === 1) &&
<Button className={style['saveBtn']} onClick={() => setvisible(true)}>
<CheckSquareOutlined />提交
</Button>
......
......@@ -28,9 +28,7 @@ export const commonEnquieryOfferSchema: ISchema = {
inquiryListNo:{//报价单号
type:'string',
"x-component":"Search",
"x-mega-props":{
},
"x-mega-props":{},
"x-component-props":{
placeholder:'询价单号'
}
......
......@@ -64,7 +64,7 @@ const EnquiryOrder: React.FC<{}> = (props) => {
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button type='link'><Link to={`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/quote?id=${record.id}`}>报价</Link></Button>
render: (text: any, record: any) => <Button disabled={record.externalState!==2 && record.externalState!==5} type='link'><Link to={`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/quote?id=${record.id}`}>报价</Link></Button>
}];
//交易能力 询价报价 询价单查询
const fetchData = (params?: any) => {
......
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