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

fix: 修改物流和商品询价的Bug

parent cf0a8e7d
......@@ -199,7 +199,7 @@ const detailInfo: React.FC<{}> = () => {
setid(id)
//待新增 //物流单处理 物流单查询
if (pathdetail === 'orderSubmitSearchList' || pathdetail === 'orderResultSearchList') {
PublicApi.getLogisticsOrderWaitSubmitGet({ id: id }).then(res => {
PublicApi.getLogisticsOrderWaitSubmitGet({ id: id, code: history.location.query.code }).then(res => {
if (res.code === 1000) {
setdataInfo(res.data)
let current = 0
......@@ -215,7 +215,7 @@ const detailInfo: React.FC<{}> = () => {
//待确认物流单
if (pathdetail === 'toOrderComfirmList' || path[path.length - 1] === 'option') {
PublicApi.getLogisticsOrderWaitConfirmGet({ id: id }).then(res => {
PublicApi.getLogisticsOrderWaitConfirmGet({ id: id, code: history.location.query.code }).then(res => {
setdataInfo(res.data)
setfreightPrice(res.data.freightPrice)
let current = 0
......
......@@ -151,7 +151,7 @@ const orderSearchList: React.FC<listProps> = (props) => {
if (props.type === '1') {
history.push(`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=${id}`)
} else if (props.type === '2') {
history.push(`/memberCenter/logisticsAbility/logisticsResult/orderResultSearchList/detail?id=${id}`)
history.push(`/memberCenter/logisticsAbility/logisticsResult/toOrderComfirmList/detail?id=${id}`)
} else {
history.push(`/memberCenter/logisticsAbility/logisticsResult/toOrderComfirmList/detail?id=${id}`)
}
......
......@@ -26,7 +26,7 @@ import { IFormFilter, IButtonFilter } from 'god/dist/src/standard-table/TableCon
import { PublicApi } from '@/services/api'
import style from '../components/index.less'
import statuStyle from '../colorTag'
import {TimeList,outSideStatusList,statusList} from '../statusList'
import { TimeList, outSideStatusList, statusList } from '../statusList'
import moment from 'moment'
import { timeRange } from '@/utils/index'
import Index from '@/pages';
......@@ -170,7 +170,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, reconds: any) => {
let component: ReactNode = null
if (text == 3) {
......@@ -193,27 +193,29 @@ const OrderList: React.FC<ListProps> = (props) => {
render: (_: any, record: any) => {
return (
<>
{ record.createType === 1 &&
<>
{
(record.status === 1 || record.status === 3) &&
<Button type="link" onClick={() => toEdit(record.id)}>编辑</Button>
{
(record.status === 1 || record.status === 3) &&
<Button type="link" onClick={() => toEdit(record.id)}>编辑</Button>
}
}
{
record.status === 1 &&
<>
<Popconfirm title="确定要删除吗?" okText="是" cancelText="否" onConfirm={() => handleDelete(record.id)}>
<Button type='link'>
删除
{
record.status === 1 &&
<>
<Popconfirm title="确定要删除吗?" okText="是" cancelText="否" onConfirm={() => handleDelete(record.id)}>
<Button type='link'>
删除
</Button>
</Popconfirm>
<Popconfirm title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => handleSubmit(record.id)}>
<Button type='link'>提交</Button>
</Popconfirm>
</Popconfirm>
<Popconfirm title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => handleSubmit(record.id)}>
<Button type='link'>提交</Button>
</Popconfirm>
</>
}
</>
}
</>
)
}
......@@ -256,8 +258,8 @@ const OrderList: React.FC<ListProps> = (props) => {
})
}
const handleSubmit = (id:number) => {
PublicApi.postLogisticsOrderWaitSubmitSubmit({id:id}).then(res => {
const handleSubmit = (id: number) => {
PublicApi.postLogisticsOrderWaitSubmitSubmit({ id: id }).then(res => {
ref.current.reload()
})
}
......@@ -322,7 +324,7 @@ const OrderList: React.FC<ListProps> = (props) => {
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>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push(`/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add`)}>新建</Button>
</Space>
</Col>
</Row>
......@@ -342,7 +344,7 @@ const OrderList: React.FC<ListProps> = (props) => {
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'logisticsOrderNo', FORM_FILTER_PATH)
}}
expressionScope={{controllerBtns}}
expressionScope={{ controllerBtns }}
schema={submitLogisticsOrderSchema}
>
</NiceForm>
......
......@@ -133,6 +133,7 @@ const AddQuotes: React.FC<parmas> = (props) => {
currentRef={basicInfoRef}
getMemberList={getMemberList}
editData={editData}
type={type}
/>
</TabPane>
<TabPane tab="商品报价" key="2" forceRender>
......
......@@ -19,12 +19,13 @@ const { Search } = Input;
interface queryProps {
currentRef?: any,
getMemberList?: Function,
editData: any
editData: any,
type: number,
}
const BasicInfo: React.FC<queryProps> = (props) => {
const [basicform] = Form.useForm();
const { getMemberList, currentRef, editData } = props;
const { getMemberList, currentRef, editData, type } = props;
// 会员添加弹窗控制
const [visibleChannelMember, setVisibleChannelMember] = useState(false);
const [inquiryNo, setinquiryNo] = useState<any>({});
......@@ -138,7 +139,7 @@ const BasicInfo: React.FC<queryProps> = (props) => {
<Input />
</Form.Item>
<Form.Item label='对应询价单号' name='inquiryListNo' rules={[{ required: true, message: '请选择被询价会员' }]}>
<Search value={Object.keys(inquiryNo).length > 0 ? inquiryNo.orderNo : undefined} readOnly enterButton={<><LinkOutlined /> 选择</>} onSearch={() => setVisibleChannelMember(true)} />
<Search disabled={type === 3} value={Object.keys(inquiryNo).length > 0 ? inquiryNo.orderNo : undefined} readOnly enterButton={<><LinkOutlined /> 选择</>} onSearch={() => setVisibleChannelMember(true)} />
{Object.keys(inquiryNo).length > 0 && <Button type='link' onClick={() => window.open(`/memberCenter/tranactionAbility/inquiryQuote/enquiryOrder/rfq/preview?id=${inquiryNo.orderId}`)}>查看询价单详情</Button>}
</Form.Item>
<Form.Item label='报价单号' name='quotationNo'>
......
......@@ -98,7 +98,7 @@ const AddInquiryOrder: React.FC<{}> = () => {
}]
//单个删除
const handleDelete = (id: number) => {
PublicApi.postOrderProductQuotationDelete({ id }).then(res => {
PublicApi.postOrderProductQuotationDelete({ id }, {ctlType: 'none'}).then(res => {
if (res.code === 1000) {
message.success('删除成功!')
ref.current.reload();
......
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