Commit 212229e8 authored by XieZhiXiong's avatar XieZhiXiong
parents 3605e4d7 4469c85a
......@@ -40,6 +40,7 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
const [shopInfo, setShopInfo] = useState<GetTemplateShopFindShopResponse>()
const [query, setQuery] = useState<any>({})
const [mallInfo, setMallInfo] = useState<any>({})
const [loading, setLoading] = useState<boolean>(true)
useEffect(() => {
try {
......@@ -48,6 +49,7 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
setQuery(queryParam)
} catch (error) {
console.log(error)
setLoading(false)
}
getWebMallInfo()
}, [])
......@@ -70,6 +72,9 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
if (res.code === 1000) {
setShopInfo(res.data)
}
setLoading(false)
}).catch(() => {
setLoading(false)
})
}
......@@ -103,7 +108,7 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
<ShopHeader logo={mallInfo.logoUrl} shopId={query.shopId} shopUrlParam={shopId} shopInfo={shopInfo} updateShopInfo={() => handleUpdate()} />
<MainNav menuData={menuData} pathname={location.pathname} type={LAYOUT_TYPE.shop} shopId={query.shopId} shopUrlParam={shopId} />
{
shopInfo ? shopInfo.status === 1 ? children && React.Children.map(children, (child: any) => {
!loading ? shopInfo ? shopInfo.status === 1 ? children && React.Children.map(children, (child: any) => {
return React.cloneElement(child,
{
layoutType: LAYOUT_TYPE.shop,
......@@ -114,7 +119,7 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
updateShopInfo: () => handleUpdate()
},
);
}) : <SearchShopResult search={shopInfo.company} /> : <SearchShopResult />
}) : <SearchShopResult search={shopInfo.company} /> : <SearchShopResult /> : null
}
</div>
<Footer />
......
......@@ -280,9 +280,11 @@ const Order: React.FC<OrderPropsType> = (props) => {
temp.category = orderItem.category
temp.brand = orderItem.brand
temp.logistics = orderItem.logistics
temp.deliveryType = orderItem.logistics.deliveryType
orderProductRequests.push(temp)
}
}
params.supplyMembersName = orderInfo.supplyMembersName
params.supplyMembersId = orderInfo.supplyMembersId
params.supplyMembersRoleId = orderInfo.supplyMembersRoleId
params.deliveryType = orderInfo.logistics.deliveryType
......
......@@ -155,8 +155,8 @@ export const inquiryQuoteOuterState = (text:any) => {
let component: ReactNode = null;
text === 1 ? component = <Tag color="default">提交询价单</Tag>:
text === 2 ? component = <Tag color="default">提交报价单</Tag>:
text === 1 ? component = <Tag color="processing">确认报价单</Tag>:
text === 2 ? component = <Tag color="success">报价通过</Tag>:
text === 3 ? component = <Tag color="processing">确认报价单</Tag>:
text === 4 ? component = <Tag color="success">报价通过</Tag>:
component = <Tag color="error">报价不通过</Tag>
return component;
}
\ No newline at end of file
......@@ -65,29 +65,11 @@ const EnquiryOrder: React.FC<{}> = (props) => {
quoteOrderInternalState(text)
}];
//交易能力 询价报价 询价单查询
const data = {
totalCount: 1,
data: [{
id: 91,
quotationNo: 'BPTY12',
inquiryListNo: 'SD2015PPLJ',
details: '阿珍爱上阿强',
memberName: 'wutiaoren',
memberId: 5,
quotationAsTime: '2020-10-13 15:37:00',
voucherTime: '2020-10-13 15:37:00',
externalState: 1,
interiorState: 2
}]
}
const fetchData = (params?: any) => {
return new Promise((resolve, reject) => {
PublicApi.getOrderNotarizeEnquiryProductQuotationList({...params}).then(res => {
resolve(res.data)
})
// setTimeout(() => {
// resolve(data)
// }, 1000)
})
}
// 搜索
......
......@@ -46,11 +46,11 @@ const comfirmDialog: React.FC<Params> = (props) => {
const handletOk = async () => {
try {
const value = await form.validateFields();
for(let key in value) {
if(key !== 'model' && key !== 'brand' && key !== 'purchaseNuit' && key !== 'purchaseQuantity') {
value[key] = value[key].join('/');
}
}
// for(let key in value) {
// if(key !== 'model' && key !== 'brand' && key !== 'purchaseNuit' && key !== 'purchaseQuantity') {
// value[key] = value[key].join('/');
// }
// }
props.onOK(value)
} catch(err) {
message.error('有必填项没填写请检查!')
......
......@@ -98,31 +98,12 @@ const PendingSubmit: React.FC<{}> = () => {
</Row>
/**列表数据 */
// const data = {
// totalCount: 2,
// data: [{
// id: 1,
// quotationNo: 'BPTY12',
// inquiryListNo: 'SZX125KJS',
// details: '模拟的数据',
// memberName: '冰红茶',
// memberId: 10,
// deliveryTime: '2020-10-13 13:59:00',
// quotationAsTime: '2020-10-13 23:59:00',
// voucherTime: '2020-10-13 13:59:00',
// externalState: 1,
// interiorState: 1
// }]
// }
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
PublicApi.getOrderToSubmitProductQuotationList({ ...params }).then(res => {
resolve(res.data)
})
// setTimeout(() => {
// resolve(data)
// }, 500)
})
}
......@@ -151,7 +132,7 @@ const PendingSubmit: React.FC<{}> = () => {
const handleModalOK = () => {
setvisible(false)
setTimeout(() => {
history.goBack()
ref.current.reload();
}, 1000)
}
......
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