Commit 5726c027 authored by LeeJiancong's avatar LeeJiancong

'对接物流单新增商品弹窗查询条件schema等'

parent 0fee6d42
...@@ -63,8 +63,8 @@ const detailInfo: React.FC<{}> = () => { ...@@ -63,8 +63,8 @@ const detailInfo: React.FC<{}> = () => {
pageSize: 10 pageSize: 10
}) })
const [detailData, setDetailData] = useState<any>({ const [detailData, setDetailData] = useState<any>({
current: 0,
step: { step: {
current: 0,
title: '外部流转', title: '外部流转',
items: [ items: [
{ {
...@@ -231,7 +231,7 @@ const detailInfo: React.FC<{}> = () => { ...@@ -231,7 +231,7 @@ const detailInfo: React.FC<{}> = () => {
}else if(res.data.status == 3 || res.data.status == 4){ }else if(res.data.status == 3 || res.data.status == 4){
current = 1 current = 1
} }
setDetailData({...detailData,'step.current': current}) setDetailData({...detailData,current: current})
}) })
} }
...@@ -241,11 +241,12 @@ const detailInfo: React.FC<{}> = () => { ...@@ -241,11 +241,12 @@ const detailInfo: React.FC<{}> = () => {
setdataInfo(res.data) setdataInfo(res.data)
let current = 0 let current = 0
if(res.data.status <= 2){ if(res.data.status <= 2){
current = 0
}else if(res.data.status == 3 || res.data.status == 4){
current = 1 current = 1
}else if(res.data.status == 3 || res.data.status == 4){
console.log(2112)
current = 2
} }
setDetailData({...detailData,'step.current': current}) setDetailData({...detailData,current: current})
}) })
} }
...@@ -263,7 +264,7 @@ const detailInfo: React.FC<{}> = () => { ...@@ -263,7 +264,7 @@ const detailInfo: React.FC<{}> = () => {
}else if(res.data.status == 3 || res.data.status == 4){ }else if(res.data.status == 3 || res.data.status == 4){
current = 1 current = 1
} }
setDetailData({...detailData,'step.current': current}) setDetailData({...detailData,current: current})
}) })
} }
...@@ -339,8 +340,8 @@ const detailInfo: React.FC<{}> = () => { ...@@ -339,8 +340,8 @@ const detailInfo: React.FC<{}> = () => {
{ {
dataInfo.status == 1?<><span style={statuStyle.default}>待提交</span></>: dataInfo.status == 1?<><span style={statuStyle.default}>待提交</span></>:
dataInfo.status == 2?<><span style={statuStyle.confirm}>待确认</span></>: dataInfo.status == 2?<><span style={statuStyle.confirm}>待确认</span></>:
dataInfo.status == 3?<><span style={statuStyle.success}>不接受物流单</span></>: dataInfo.status == 3?<><span style={statuStyle.warn}>不接受物流单</span></>:
<><span style={statuStyle.warn}>接受物流单</span></> <><span style={statuStyle.success}>接受物流单</span></>
} }
</div> </div>
</div> </div>
...@@ -357,7 +358,7 @@ const detailInfo: React.FC<{}> = () => { ...@@ -357,7 +358,7 @@ const detailInfo: React.FC<{}> = () => {
<Steps <Steps
style={{ padding: '34px 0' }} style={{ padding: '34px 0' }}
progressDot progressDot
current={detailData.step.current} current={detailData.current}
> >
{detailData.step.items.map((item, index) => { {detailData.step.items.map((item, index) => {
return ( return (
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
* @Date: 2020-07-28 11:25:30 * @Date: 2020-07-28 11:25:30
* @LastEditors: LeeJiancong * @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com * @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-23 16:17:29 * @LastEditTime: 2020-09-24 10:37:51
*/ */
import React, { Component, useEffect, useRef, useState, ReactNode } from 'react' import React, { Component, useEffect, useRef, useState, ReactNode } from 'react'
import { Card, Row, Col, Tabs, Button, Input as SelectInput, Badge } from 'antd' import { Card, Row, Col, Tabs, Button, Input as SelectInput, Badge,message } from 'antd'
import { LinkOutlined, PlusOutlined } from '@ant-design/icons' import { LinkOutlined, PlusOutlined } from '@ant-design/icons'
import ModalTable, { ModalTableProps } from '@/components/ModalTable' import ModalTable, { ModalTableProps } from '@/components/ModalTable'
import { StandardTable } from 'god' import { StandardTable } from 'god'
...@@ -16,6 +16,9 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout' ...@@ -16,6 +16,9 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PATTERN_MAPS } from '@/constants/regExp' import { PATTERN_MAPS } from '@/constants/regExp'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable' import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PageStatus, usePageStatus } from '@/hooks/usePageStatus' import { PageStatus, usePageStatus } from '@/hooks/usePageStatus'
import {FORM_FILTER_PATH} from '@/formSchema/const'
import {useStateFilterSearchLinkageEffect} from '@/formSchema/effects/useFilterSearch'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import ListMadal from '../components/sumbitOrderModal' import ListMadal from '../components/sumbitOrderModal'
import OrderLog from '../components/pageOrderLog' import OrderLog from '../components/pageOrderLog'
import { PublicApi } from '@/services/api' import { PublicApi } from '@/services/api'
...@@ -46,6 +49,7 @@ import ReturnEle from '@/components/ReturnEle' ...@@ -46,6 +49,7 @@ import ReturnEle from '@/components/ReturnEle'
import style from '../components/index.less' import style from '../components/index.less'
import { history } from 'umi' import { history } from 'umi'
import { values, action } from 'mobx' import { values, action } from 'mobx'
import Search from '@/components/NiceForm/components/Search'
const actions = createFormActions() const actions = createFormActions()
const { onFieldChange$, onFieldValueChange$ } = FormEffectHooks const { onFieldChange$, onFieldValueChange$ } = FormEffectHooks
...@@ -288,15 +292,65 @@ const Deatail: React.FC<{}> = () => { ...@@ -288,15 +292,65 @@ const Deatail: React.FC<{}> = () => {
// const detailData;// = form.getFieldValue('detailList') // const detailData;// = form.getFieldValue('detailList')
//具体可以看 formProduct
const formSearch: ISchema = { const formSearch: ISchema = {
type: 'object', type: 'object',
properties: { properties: {
name: { productName: {
type: 'string', type: 'string',
"x-component": 'Search', 'x-component': 'ModalSearch',
"x-component-props": { 'x-component-props': {
placeholder: '请输入会员名称' placeholder: '请输入商品名称',
align: 'flex-left',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
category: {
type: 'string',
"x-component": 'Input',
"x-component-props": {
placeholder: '请输入品类',
// className: 'fixed-ant-selected-down', // 该类强制将显示的下拉框出现在select下, 只有这里出现问题, ??
// fetchSearch: PublicApi.getProductSelectGetSelectCustomerCategory,
style: {
width: 160
}
}
},
brand: {
type: 'string',
"x-component": 'Input',
"x-component-props": {
placeholder: '请输入品牌',
// fetchSearch: PublicApi.getProductSelectGetSelectBrand,
style: {
width: 160
}
}
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
} }
} }
} }
...@@ -503,21 +557,22 @@ const Deatail: React.FC<{}> = () => { ...@@ -503,21 +557,22 @@ const Deatail: React.FC<{}> = () => {
* @return {type} * @return {type}
*/ */
const fetchProductList = async (params) => { const fetchProductList = async (params) => {
// if(shipmentOrderID === null){ if(shipmentOrderID === null){//发货单id
// return // message.error('请先选择发货单')
// } return
// const res = await PublicApi.getOrderProcurementOrderProductList({...params,id: shipmentOrderID }) }
// return res.data const res = await PublicApi.getOrderProcurementOrderProductPageList({...params,id: shipmentOrderID })
return new Promise((resolve, reject) => { return res.data
const queryResult = data.find(v => v.key === params.keywords) // return new Promise((resolve, reject) => {
setTimeout(() => { // const queryResult = data.find(v => v.key === params.keywords)
resolve({ // setTimeout(() => {
code: 200, // resolve({
message: '', // code: 200,
data: queryResult ? [queryResult] : data2 // message: '',
}) // data: queryResult ? [queryResult] : data2
}, 1000) // })
}) // }, 1000)
// })
} }
...@@ -581,6 +636,10 @@ const Deatail: React.FC<{}> = () => { ...@@ -581,6 +636,10 @@ const Deatail: React.FC<{}> = () => {
{({ state, mutators }) => { {({ state, mutators }) => {
// const onAdd = () => mutators.push() // const onAdd = () => mutators.push()
const selectGoods = () => { const selectGoods = () => {
if(!shipmentOrderID){
message.error('请先选择发货单')
return
}
setvisibleObj({ ...visibleObj, ModalSeletOrder3: true }) setvisibleObj({ ...visibleObj, ModalSeletOrder3: true })
} }
return ( return (
...@@ -762,7 +821,18 @@ const Deatail: React.FC<{}> = () => { ...@@ -762,7 +821,18 @@ const Deatail: React.FC<{}> = () => {
fetchTableData={params => fetchProductList(params)} fetchTableData={params => fetchProductList(params)}
formilyProps={ formilyProps={
{ {
ctx: { schema: formSearch } ctx: {
schema: formSearch ,
components:{ModalSearch:Search,SearchSelect,Submit,Input},
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'productName',
FORM_FILTER_PATH,
);
}
}
} }
} }
tableProps={{ tableProps={{
......
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