Commit 57a54c8f authored by Bill's avatar Bill

Merge branch 'dev' of 10.0.0.22:lingxi/lingxi-business-paltform into dev

parents 9526e17f f1282ef6
import * as React from 'react'; import * as React from 'react';
import { useState, useRef, useEffect } from 'react'; import { useState, useRef, useEffect } from 'react';
import { Row, Col, Tooltip, Form, Input, Select, Popconfirm, Button, Card, message, Modal } from 'antd'; import { Row, Col, Form, Input, Select, Popconfirm, Button, Card } from 'antd';
import { DeleteOutlined, FormOutlined, PlusCircleOutlined, LoadingOutlined, PlusOutlined, LinkOutlined } from '@ant-design/icons'; import { LinkOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { ColumnType } from 'antd/lib/table/interface' import { ColumnType } from 'antd/lib/table/interface'
import { StandardTable } from 'god'
import { history } from 'umi' import { history } from 'umi'
import ReutrnEle from '@/components/ReturnEle'; import ReutrnEle from '@/components/ReturnEle';
import ModalTable from '@/components/ModalTable' import ModalTable from '@/components/ModalTable'
import { PublicApi, CustomApi } from '@/services/api' import { PublicApi } from '@/services/api'
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus' import { PageStatus } from '@/hooks/usePageStatus'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable' import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { addCompany, updateCompany, getCompanyDetail } from '@/services/logistics/index'
import style from "./addCompany.less"
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
export interface companyProps { export interface companyProps {
...@@ -64,19 +61,6 @@ const columns: ColumnType<any>[] = [ ...@@ -64,19 +61,6 @@ const columns: ColumnType<any>[] = [
align: 'center' align: 'center'
} }
] ]
// 模拟请求
// const fetchData = (params: any) => {
// return new Promise((resolve, reject) => {
// const queryResult = data.find(v => v.key === params.keywords)
// setTimeout(() => {
// resolve({
// code: 200,
// message: '',
// data: queryResult ? [queryResult] : data
// })
// }, 1000)
// })
// }
const fetchData = async (params) => { const fetchData = async (params) => {
const res = await PublicApi.getMemberManageLowerPageBynamerole(params) const res = await PublicApi.getMemberManageLowerPageBynamerole(params)
...@@ -108,6 +92,7 @@ const company: React.FC<parmas> = (props) => { ...@@ -108,6 +92,7 @@ const company: React.FC<parmas> = (props) => {
const [selectRow, setSelectRow] = useState<Item[]>([]) // 模态框选择的行数据 const [selectRow, setSelectRow] = useState<Item[]>([]) // 模态框选择的行数据
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([]) const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
useEffect(() => { useEffect(() => {
console.log(id, pageStatus, '100000')
let _title = pageStatus === PageStatus.PREVIEW ? '查看' : id ? '编辑' : '新建' let _title = pageStatus === PageStatus.PREVIEW ? '查看' : id ? '编辑' : '新建'
setHeaderTitle(`${_title}物流公司`) setHeaderTitle(`${_title}物流公司`)
PublicApi.getMemberManageRoleList().then(res => { PublicApi.getMemberManageRoleList().then(res => {
...@@ -136,6 +121,7 @@ const company: React.FC<parmas> = (props) => { ...@@ -136,6 +121,7 @@ const company: React.FC<parmas> = (props) => {
const handleSubmitAllSetting = () => { const handleSubmitAllSetting = () => {
menuForm.validateFields().then((values: any) => { menuForm.validateFields().then((values: any) => {
console.log(values, '嘿嘿嘿')
if (id) { if (id) {
values.id = id values.id = id
setLoading(true) setLoading(true)
...@@ -250,13 +236,9 @@ const company: React.FC<parmas> = (props) => { ...@@ -250,13 +236,9 @@ const company: React.FC<parmas> = (props) => {
(<Form (<Form
form={menuForm} form={menuForm}
colon={false} colon={false}
name="edit_infomation" name="edit_infomation"
layout="horizontal"
labelAlign="left" labelAlign="left"
autoComplete="off"
{...layout} {...layout}
> >
<Row gutter={24}> <Row gutter={24}>
<Col span={18}> <Col span={18}>
...@@ -292,7 +274,7 @@ const company: React.FC<parmas> = (props) => { ...@@ -292,7 +274,7 @@ const company: React.FC<parmas> = (props) => {
} }
]} ]}
> >
<Input disabled={isSee} className="input_addonAfter" disabled maxLength={20} addonAfter={selectBtn} /> <Input disabled={isSee} className="input_addonAfter" maxLength={20} addonAfter={selectBtn} />
</Form.Item> </Form.Item>
: :
<Form.Item <Form.Item
......
...@@ -91,7 +91,7 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -91,7 +91,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
*/ */
const formSubmit = (values) => { const formSubmit = (values) => {
console.log(values) console.log(values)
let id = history.location.query.id //0新建 // let id = history.location.query.id //0新建
let value = { ...values } let value = { ...values }
value.isDefault = values.isDefault ? 1 : 0 value.isDefault = values.isDefault ? 1 : 0
value.provinceCode = value.provinceCode.split('-').length > 1 ? value.provinceCode.split('-')[0] : value.provinceCode value.provinceCode = value.provinceCode.split('-').length > 1 ? value.provinceCode.split('-')[0] : value.provinceCode
...@@ -101,7 +101,7 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -101,7 +101,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
value.cityName = cityName value.cityName = cityName
value.districtName = districtName value.districtName = districtName
if (type == 1) { if (type == 1) {
if (id == 0) { if (!id) {
setloading(true) setloading(true)
PublicApi.postLogisticsShipperAddressAdd(value).then(res => { PublicApi.postLogisticsShipperAddressAdd(value).then(res => {
if (res.code == 1000) { if (res.code == 1000) {
...@@ -118,7 +118,7 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -118,7 +118,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
}) })
} }
} else { } else {
if (id == 0) { if (!id) {
setloading(true) setloading(true)
PublicApi.postLogisticsReceiverAddressAdd(value).then(res => { PublicApi.postLogisticsReceiverAddressAdd(value).then(res => {
if (res.code == 1000) { if (res.code == 1000) {
...@@ -176,8 +176,8 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -176,8 +176,8 @@ const diaLogForm: React.FC<ListProps> = (props) => {
useEffect(() => { useEffect(() => {
const id = Number(history.location.query.id) const id = Number(history.location.query.id)
console.log(typeof(id)) console.log(typeof(id))
let title = id === 0 ? '新建' : '编辑' // let title = id === 0 ? '新建' : '编辑'
type === 1 ? setHeaderTitle(`${title}发货地址`) : setHeaderTitle(`${title}收货地址`) // type === 1 ? setHeaderTitle(`${title}发货地址`) : setHeaderTitle(`${title}收货地址`)
PublicApi.getManageCountryAreaGetTelCode().then(res => { PublicApi.getManageCountryAreaGetTelCode().then(res => {
res.data.forEach((item,index) => { res.data.forEach((item,index) => {
TelCodeList.push({ label: item, value: (index).toString() }) TelCodeList.push({ label: item, value: (index).toString() })
...@@ -306,7 +306,7 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -306,7 +306,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
<PageHeaderWrapper <PageHeaderWrapper
onBack={() => history.goBack()} onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />} backIcon={<ReutrnEle description="返回" />}
title={headerTitle} // title={headerTitle}
> >
<Card> <Card>
<Row> <Row>
...@@ -415,7 +415,7 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -415,7 +415,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
x-component="TextArea" x-component="TextArea"
x-component-props={{ x-component-props={{
placeholder: '请输入详细地址', placeholder: '请输入详细地址',
autocomplete: 'off' autoComplete: 'off'
}} }}
x-rules= {[{ x-rules= {[{
max: 30, max: 30,
......
...@@ -6,7 +6,6 @@ const AddShipingAddress:React.FC<{}> = () => { ...@@ -6,7 +6,6 @@ const AddShipingAddress:React.FC<{}> = () => {
return( return(
<AddressTemplate <AddressTemplate
type={2} type={2}
id={0}
/> />
) )
} }
......
...@@ -14,18 +14,22 @@ interface CollectionPropsType { ...@@ -14,18 +14,22 @@ interface CollectionPropsType {
const Collection: React.FC<CollectionPropsType> = (props) => { const Collection: React.FC<CollectionPropsType> = (props) => {
const { query: { type } } = props.location const { query: { type } } = props.location
const [defaultTab, setDefaultTab] = useState<string>("commodity") const [tabKey, setTabKey] = useState<string>("commodity")
useEffect(() => { useEffect(() => {
if (type) { if (type) {
setDefaultTab(type) setTabKey(type)
} }
}, [type]) }, [type])
const handleChange = (key) => {
setTabKey(key)
}
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
<div className={styles.collection_wrap}> <div className={styles.collection_wrap}>
<Tabs activeKey={defaultTab} className={styles.collection_tabs} > <Tabs activeKey={tabKey} className={styles.collection_tabs} onChange={handleChange} >
<TabPane tab="商品收藏" key="commodity"> <TabPane tab="商品收藏" key="commodity">
<Commodity /> <Commodity />
</TabPane> </TabPane>
......
...@@ -287,3 +287,62 @@ export const searchFilterInteriorState = [ ...@@ -287,3 +287,62 @@ export const searchFilterInteriorState = [
label: '审核不通过', value: 6 label: '审核不通过', value: 6
} }
] ]
/***********************需求报价******************************* */
/**
* @description: 需求报价外部状态筛选
* @param {type} 外部状态:
* @return {type} 1.提交需求单 2.审核需求单 3.提交报价单 4.确认报价单 5.完成 6.审核不通过 7.取消报价单
*/
export const demandQuoteExternalState = [
{
label: '提交需求单', value: 1
},
{
label: '审核需求单', value: 2
},
{
label: '提交报价单', value: 3
},
{
label: '确认报价单', value: 4
},
{
label: '完成', value: 5
},
{
label: '审核不通过', value: 6
},
{
label: '取消报价单', value: 7
}
]
/**
* @description: 需求报价内部状态筛选
* @param {type} 内部状态:
* @return {type} 1.新增需求单 2.审核需求单一级 3.审核需求单二级 4.提交需求单 5.完成 6.审核不通过 7.取消报价单
*/
export const demandQuoteInteriorState = [
{
label: '新增需求单', value: 1
},
{
label: '审核需求单一级', value: 2
},
{
label: '审核需求单二级', value: 3
},
{
label: '提交需求单', value: 4
},
{
label: '完成', value: 5
},
{
label: '审核不通过', value: 6
},
{
label: '取消报价单', value: 7
}
]
\ No newline at end of file
...@@ -17,7 +17,7 @@ export interface InquiryModalTableProps extends ModalTableProps { ...@@ -17,7 +17,7 @@ export interface InquiryModalTableProps extends ModalTableProps {
* @return {type} * @return {type}
*/ */
const fetchEqData = async (params: any) => { const fetchEqData = async (params: any) => {
const res = await PublicApi.getOrderQuotationRequisitionFormList(params); const res = await PublicApi.getOrderQuotationRequisitionFormList({...params,externalState: 2});
return res.data return res.data
} }
const formTime = (text) => { const formTime = (text) => {
......
...@@ -6,13 +6,12 @@ ...@@ -6,13 +6,12 @@
* @LastEditTime: 2020-09-24 11:25:03 * @LastEditTime: 2020-09-24 11:25:03
*/ */
import React, { Component, useState, useRef, useEffect, useImperativeHandle } from 'react'; import React, { Component, useState, useRef, useEffect, useImperativeHandle } from 'react';
import { Modal, Button, Space, Form, Radio, AutoComplete, Badge, Tabs, Input, Select, Checkbox } from 'antd' import { Modal, Button, Space, Form, Radio, AutoComplete, Badge, Tabs, Input, Select, Checkbox, message } from 'antd'
import { PublicApi } from '@/services/api' import { PublicApi } from '@/services/api'
import ModalTable from '@/components/ModalTable' import ModalTable from '@/components/ModalTable'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable' import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PageStatus, usePageStatus } from '@/hooks/usePageStatus' import { PageStatus, usePageStatus } from '@/hooks/usePageStatus'
import { ColumnType } from 'antd/lib/table/interface' import { ColumnType } from 'antd/lib/table/interface'
import { ISchema } from '@formily/antd'
import { LinkOutlined } from '@ant-design/icons' import { LinkOutlined } from '@ant-design/icons'
const { TabPane } = Tabs const { TabPane } = Tabs
const { Option } = Select const { Option } = Select
...@@ -192,7 +191,12 @@ const comfirmDialog: React.FC<Params> = (props, { onRef }) => { ...@@ -192,7 +191,12 @@ const comfirmDialog: React.FC<Params> = (props, { onRef }) => {
Curform.validateFields().then(v => { Curform.validateFields().then(v => {
props.onOK(v, commodityAttributedataSource) props.onOK(v, commodityAttributedataSource)
props.productAttributeJson(commodityAttributedataSource) props.productAttributeJson(commodityAttributedataSource)
setcommodityAttributedataSource({})
productRowCtl.setSelectRow([]);
productRowCtl.setSelectedRowKeys([])
Curform.resetFields() Curform.resetFields()
}).catch(err => {
message.error('有必填选项没选择或填写,请检查!')
}) })
} }
...@@ -228,26 +232,6 @@ const comfirmDialog: React.FC<Params> = (props, { onRef }) => { ...@@ -228,26 +232,6 @@ const comfirmDialog: React.FC<Params> = (props, { onRef }) => {
</Button> </Button>
) )
const formSearch: ISchema = {
type: 'object',
properties: {
name: {
type: 'string',
"x-component": "Search",
"x-component-props": {
placeholder: '输入关键字搜索'
}
},
roleId: {
type: 'string',
"x-component-props": {
placeholder: '选择会员角色'
},
enum: []
}
}
}
const placeholderText = '请先选择对应需求单号' const placeholderText = '请先选择对应需求单号'
let ButtonList = [ let ButtonList = [
<Button onClick={() => props.onCancel()} > <Button onClick={() => props.onCancel()} >
...@@ -262,6 +246,7 @@ const comfirmDialog: React.FC<Params> = (props, { onRef }) => { ...@@ -262,6 +246,7 @@ const comfirmDialog: React.FC<Params> = (props, { onRef }) => {
<Modal <Modal
title={headerTitle} title={headerTitle}
width={800} width={800}
zIndex={999}
visible={props.dialogVisible} visible={props.dialogVisible}
onOk={() => handletOk()} onOk={() => handletOk()}
onCancel={() => props.onCancel()} onCancel={() => props.onCancel()}
...@@ -426,11 +411,7 @@ const comfirmDialog: React.FC<Params> = (props, { onRef }) => { ...@@ -426,11 +411,7 @@ const comfirmDialog: React.FC<Params> = (props, { onRef }) => {
columns={columns} columns={columns}
rowSelection={productRowSelection} rowSelection={productRowSelection}
fetchTableData={params => fetchData(params)} fetchTableData={params => fetchData(params)}
formilyProps={{ modalType='productByMember'
ctx: {
schema: formSearch
}
}}
tableProps={{ tableProps={{
rowKey: 'id' rowKey: 'id'
}} }}
......
...@@ -100,6 +100,12 @@ const List:React.FC<{listParams}> = (props) => { ...@@ -100,6 +100,12 @@ const List:React.FC<{listParams}> = (props) => {
align:'left' align:'left'
}, },
{ {
title:'需求会员',
key:'demandMembers',
dataIndex:'demandMembers',
align:'left'
},
{
title:'交付日期', title:'交付日期',
key:'deliveryTime', key:'deliveryTime',
dataIndex:'deliveryTime', dataIndex:'deliveryTime',
......
import { ISchema} from '@formily/antd' import { ISchema} from '@formily/antd'
import { FORM_FILTER_PATH } from '@/formSchema/const' import { FORM_FILTER_PATH } from '@/formSchema/const'
import {TimeList} from '../../common/statusList' import {TimeList, demandQuoteExternalState , demandQuoteInteriorState} from '../../common/statusList'
import TranactionRoute from 'config/routes/tranactionRoute' import TranactionRoute from 'config/routes/tranactionRoute'
/** /**
...@@ -143,7 +143,7 @@ export const enquierySearchSchema: ISchema = { ...@@ -143,7 +143,7 @@ export const enquierySearchSchema: ISchema = {
}, },
"x-component-props":{ "x-component-props":{
placeholder:'搜索', placeholder:'需求单号',
align: 'flex-left', align: 'flex-left',
} }
} }
...@@ -172,34 +172,42 @@ export const enquierySearchSchema: ISchema = { ...@@ -172,34 +172,42 @@ export const enquierySearchSchema: ISchema = {
inline: true inline: true
}, },
properties:{ properties:{
details: {
type:'string',
"x-component-props":{
placeholder:'需求摘要'
}
},
demandMembers:{ demandMembers:{
type:'string', type:'string',
"x-component-props":{ "x-component-props":{
placeholder:'询价会员' placeholder:'需求会员'
} }
}, },
// category:{ category:{
// type:'string', type:'string',
// 'x-component': 'CustomInputSearch', 'x-component': 'CustomInputSearch',
// 'x-component-props': { 'x-component-props': {
// placeholder: '商品品类', placeholder: '品类',
// showSearch: true, showSearch: true,
// showArrow: true, showArrow: true,
// defaultActiveFirstOption: false, defaultActiveFirstOption: false,
// filterOption: false, filterOption: false,
// notFoundContent: null, notFoundContent: null,
// style: { width: '174px', lineHeight: '32px' }, style: { width: '174px', lineHeight: '32px' },
// searchValue: null, searchValue: null,
// dataoption: [] dataoption: []
// } }
// // "x-component-props":{ },
// // placeholder:'请选择品类' externalState:{
// // }, type:'string',
// // enum:[] "x-component-props":{
// }, placeholder:'外部状态'
},
enum: demandQuoteExternalState
},
voucherTime:{ voucherTime:{
type:'string', type:'string',
default: 0,
"x-component-props":{ "x-component-props":{
placeholder:'请选择单据时间' placeholder:'请选择单据时间'
}, },
...@@ -242,7 +250,7 @@ export const enquieryOfferSearchSchema: ISchema = { ...@@ -242,7 +250,7 @@ export const enquieryOfferSearchSchema: ISchema = {
}, },
"x-component-props":{ "x-component-props":{
placeholder:'搜索', placeholder:'报价单号',
align: 'flex-left', align: 'flex-left',
} }
} }
...@@ -274,43 +282,37 @@ export const enquieryOfferSearchSchema: ISchema = { ...@@ -274,43 +282,37 @@ export const enquieryOfferSearchSchema: ISchema = {
requisitionFormNo:{ requisitionFormNo:{
type:'string', type:'string',
"x-component-props":{ "x-component-props":{
placeholder:'对应需求单号' placeholder:'需求单号'
} }
}, },
quotationSummary:{ quotationSummary:{
type:'string', type:'string',
"x-component-props":{ "x-component-props":{
placeholder:'摘要' placeholder:'报价单摘要'
} }
}, },
demandMembers:{ demandMembers:{
type:'string', type:'string',
"x-component-props":{ "x-component-props":{
placeholder:'报价会员' placeholder:'需求会员'
} }
}, },
// category:{
// type:'string',
// 'x-component': 'CustomInputSearch',
// 'x-component-props': {
// placeholder: '商品品类',
// showSearch: true,
// showArrow: true,
// defaultActiveFirstOption: false,
// filterOption: false,
// notFoundContent: null,
// style: { width: '174px', lineHeight: '32px' },
// searchValue: null,
// dataoption: []
// }
// // "x-component-props":{
// // placeholder:'请选择品类'
// // },
// // enum:[]
// },
voucherTime:{ voucherTime:{
type:'string', type:'string',
default: 0, "x-component-props":{
placeholder:'外部状态'
},
enum: demandQuoteExternalState
},
externalState:{
type:'string',
"x-component-props":{
placeholder:'内部状态'
},
enum: demandQuoteInteriorState
},
interiorState:{
type:'string',
"x-component-props":{ "x-component-props":{
placeholder:'请选择单据时间' placeholder:'请选择单据时间'
}, },
......
...@@ -398,10 +398,9 @@ const Detail: React.FC<{}> = () => { ...@@ -398,10 +398,9 @@ const Detail: React.FC<{}> = () => {
* @return {type} * @return {type}
*/ */
const hanldeDeleteModel = (index) => { const hanldeDeleteModel = (index) => {
let list = productSource.slice(1, index) const list = [...productSource];
// let ol = otherList.slice(1,index) list.splice(index, 1);
// setotherList([...ol]) setproductSource(list)
setproductSource([...list])
} }
const equiryColumns: ColumnType<any>[] = [ const equiryColumns: ColumnType<any>[] = [
...@@ -476,7 +475,15 @@ const Detail: React.FC<{}> = () => { ...@@ -476,7 +475,15 @@ const Detail: React.FC<{}> = () => {
setdialogVisible(true) setdialogVisible(true)
setmode(1) setmode(1)
}}>编辑</Button> }}>编辑</Button>
<Button type="link" onClick={(index) => hanldeDeleteModel(index)}>删除</Button> <Popconfirm
title="确定要删除吗?"
okText="是"
cancelText="否"
onConfirm={() => hanldeDeleteModel(index)}
>
<Button type="link">删除</Button>
</Popconfirm>
</> </>
}, },
] ]
......
...@@ -51,13 +51,15 @@ interface parmas { ...@@ -51,13 +51,15 @@ interface parmas {
freightPrice: number, freightPrice: number,
settlementWay: string, settlementWay: string,
pagetype?: any, pagetype?: any,
operation?: number operation?: any
} }
const detailInfo: React.FC<parmas> = (props) => { const detailInfo: React.FC<parmas> = (props) => {
const ref = useRef<any>({}) const ref = useRef<any>({})
const { pagetype, operation } = props; const { pagetype } = props;
// const [pagetype, setpagetype] = useState(history.location.query.page_type) const { pathname } = history.location;
const type = pathname.split('/')[pathname.split('/').length - 1];
const [operation, setoperation] = useState<Number>(0)
let interiorStateList = [] let interiorStateList = []
let [isextraOption, setIsextraOption] = useState(false) let [isextraOption, setIsextraOption] = useState(false)
const [platType, setplatType] = useState(1) //需求对接类型 const [platType, setplatType] = useState(1) //需求对接类型
...@@ -145,7 +147,7 @@ const detailInfo: React.FC<parmas> = (props) => { ...@@ -145,7 +147,7 @@ const detailInfo: React.FC<parmas> = (props) => {
title: '交易条件', title: '交易条件',
leftElem: [ leftElem: [
{ title: '交付日期', key: 'shipmentOrderNo', value: moment(dataInfo.deliveryTime).format('YYYY-MM-DD HH:mm:ss') }, { title: '交付日期', key: 'shipmentOrderNo', value: moment(dataInfo.deliveryTime).format('YYYY-MM-DD HH:mm:ss') },
{ title: '交付地址', key: '', value: shipperAddress }, { title: '交付地址', key: '', value: dataInfo.addres },
{ title: '物流要求', key: '', value: dataInfo.logistics } { title: '物流要求', key: '', value: dataInfo.logistics }
], ],
centerElem: [ centerElem: [
...@@ -293,8 +295,10 @@ const detailInfo: React.FC<parmas> = (props) => { ...@@ -293,8 +295,10 @@ const detailInfo: React.FC<parmas> = (props) => {
//在这做逻辑判断 判断路由 是由哪个页面进来的 //在这做逻辑判断 判断路由 是由哪个页面进来的
useEffect(() => { useEffect(() => {
let pathname = history.location.pathname
init() init()
if(type === 'detail') {
setoperation(1)
}
}, []) }, [])
const init = () => { const init = () => {
PublicApi.getOrderRequisitionFormDetails({ id: id }).then(res => { PublicApi.getOrderRequisitionFormDetails({ id: id }).then(res => {
...@@ -580,6 +584,7 @@ const detailInfo: React.FC<parmas> = (props) => { ...@@ -580,6 +584,7 @@ const detailInfo: React.FC<parmas> = (props) => {
</div> </div>
<Row className={style['mainCol-rows']}> <Row className={style['mainCol-rows']}>
{ {
dataInfo.requisitionFormAddress &&
dataInfo.requisitionFormAddress.length > 0 ? dataInfo.requisitionFormAddress.length > 0 ?
dataInfo.requisitionFormAddress dataInfo.requisitionFormAddress
......
...@@ -257,7 +257,6 @@ const Details: React.FC<parmas> = (props) => { ...@@ -257,7 +257,6 @@ const Details: React.FC<parmas> = (props) => {
} }
// 详情请求 // 详情请求
useEffect(() => { useEffect(() => {
console.log(type)
if(type === 'rfq') { if(type === 'rfq') {
// 代表的是查看询价 // 代表的是查看询价
setview(1) setview(1)
......
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