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

修改物流显示的问提

parent ea6b1c9f
......@@ -13,6 +13,12 @@
.mega-layout-item-content {
line-height: normal !important;
}
.formily-mega-item-before {
margin-left: 108px;
}
.preview-text {
line-height: 32px;
}
}
}
}
\ No newline at end of file
......@@ -202,7 +202,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
>
<FormTab name="tabs" defaultActiveKey={'tab-1'}>
<FormTab.TabPane name="tab-1" tab="基本信息">
<FormMegaLayout wrapperWidth={570} labelCol={2} labelAlign="left">
<FormMegaLayout wrapperWidth={570} labelWidth={174} labelCol={2} labelAlign="left">
<Field
required
title="模板名称"
......@@ -232,7 +232,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
]}
/>
</FormMegaLayout>
<FormMegaLayout label="默认运费" required labelCol={2} wrapperWidth={570} labelAlign="left">
<FormMegaLayout label="默认运费" required labelAlign="left">
<FormMegaLayout inline>
<Field
name="weight"
......@@ -240,7 +240,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
x-props={{
style: {
width: 160,
marginLeft: 51
marginLeft: 49
}
}}
x-component="Input"
......@@ -263,7 +263,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
x-props={{
style: {
width: 160,
marginLeft: 40
marginLeft: 32
}
}}
x-component="Input"
......@@ -322,8 +322,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
/>
</FormMegaLayout>
</FormMegaLayout>
<FormMegaLayout wrapperWidth={570} labelCol={2} labelAlign="left">
<FormMegaLayout wrapperWidth={570} labelWidth={174} labelCol={2} labelAlign="left">
<Field
title="运费说明"
name="explain"
......
import React, { useState, useEffect } from 'react'
import React, { useState, useEffect, ReactNode } from 'react'
import { QuestionCircleOutlined } from '@ant-design/icons'
import { Tooltip, message, Button } from 'antd'
import cx from 'classnames'
......@@ -522,17 +522,26 @@ const CommodityDetail = (props) => {
if (!checkoutUserInfo()) {
return
}
const values: Array<any>[] = [];
attrAndValList.attributeAndValueList.forEach((item:any, i:number) => {
values.push(item.customerAttributeValue.value);
})
const JoinValue = values.reverse().join('/');
let inquiryParam = {
id: selectCommodityId,
brand: commodityDetail.brand,
logistics: commodityDetail.logistics,
memberId: commodityDetail.memberId,
memberName: commodityDetail.memberName,
memberRoleId: commodityDetail.memberRoleId,
memberRoleName: commodityDetail.memberRoleName,
name: commodityDetail.name,
name: `${commodityDetail.name}/${JoinValue}`,
packing: commodityDetail.packing,
unitName: commodityDetail.unitName,
attribute: attrAndValList.attributeAndValueList
attribute: attrAndValList.attributeAndValueList,
category: commodityDetail.customerCategory.name
}
let sessionKey = `inquiry${selectCommodityId}${new Date().getTime()}`
......
......@@ -14,9 +14,10 @@ const { TabPane } = Tabs;
export interface parmas {
id?: any,
type?: any, // 1. 新增, 2.编辑, 3.立即询价
spam_id?: any
}
const AddQuotes: React.FC<parmas> = (props) => {
const {id, type} = props
const {id, type, spam_id} = props
const [count, setCount] = useState<string>('1');
const [member, setmember] = useState<any>({}); //存放用户信息
const [goodsList, setgoodsList] = useState([]); //存放商品
......@@ -38,9 +39,35 @@ const AddQuotes: React.FC<parmas> = (props) => {
})
}
useEffect(() => {
if (id) {
if (id && type === 2) {
handleGetDetails();
setCount('3');
} else if(id && type === 3) {
const data = JSON.parse(sessionStorage.getItem(spam_id));
const inquiryGoods: any[] = [];
inquiryGoods.push({
productId: data.id,
productName: data.name,
category: data.category,
brand: data.brand.name,
unit: data.unitName,
purchaseCount: 1,
logistics: data.logistics,
memberId: data.memberId,
memberRoleId: data.memberRoleId
})
setgoodsList(inquiryGoods);
setmember({
name: data.memberName,
memberId: data.memberId
})
setEditData({
inquiryListProductRequests: inquiryGoods,
memberId: data.memberId,
memberName: data.memberName,
enclosureUrls: []
})
}
}, [])
//提交
......@@ -123,6 +150,7 @@ const AddQuotes: React.FC<parmas> = (props) => {
currentRef={basicInfoRef}
getMemberList={getMemberList}
editData={editData}
type={type}
/>
</TabPane>
<TabPane tab="询价商品" key="2" forceRender>
......@@ -130,6 +158,7 @@ const AddQuotes: React.FC<parmas> = (props) => {
member={member}
getGoodsList={getGoodsList}
editData={editData}
type={type}
/>
</TabPane>
<TabPane tab="交易条件" key="3" forceRender>
......
......@@ -20,11 +20,12 @@ interface queryProps {
currentRef?: any,
getMemberList?: Function,
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 [memberName, setmemberName] = useState<any>();
......@@ -151,20 +152,20 @@ const BasicInfo: React.FC<queryProps> = (props) => {
<Input />
</Form.Item>
<Form.Item label='被询价会员' name='memberId' rules={[{ required: true, message: '请选择被询价会员' }]}>
<Search value={memberName ? memberName : undefined} readOnly enterButton={<><LinkOutlined /> 选择</>} onSearch={()=>setVisibleChannelMember(true)} />
<Search disabled={type === 3} value={memberName ? memberName : undefined} readOnly enterButton={<><LinkOutlined /> 选择</>} onSearch={()=>setVisibleChannelMember(true)} />
{memberName && <Button type='link' onClick={() => window.open(`/shop?shopId=${btoa(JSON.stringify({memberId}))}`)}>查看会员详情</Button>}
</Form.Item>
<Form.Item label='询价单号' name='orderNumber'>
<span>{Object.keys(editData).length > 0 ? editData.inquiryListNo : '-'}</span>
<span>{(Object.keys(editData).length > 0 && editData.inquiryListNo) ? editData.inquiryListNo : '-'}</span>
</Form.Item>
<Form.Item label='单据时间' name='time'>
<span>{Object.keys(editData).length > 0 ? editData.voucherTime : '-'}</span>
<span>{(Object.keys(editData).length > 0 && editData.voucherTime) ? editData.voucherTime : '-'}</span>
</Form.Item>
<Form.Item label='外部状态' name='external'>
<span>{Object.keys(editData).length > 0 ? inquiryQuoteOuterState(editData.externalState) : '-'}</span>
<span>{(Object.keys(editData).length > 0 && editData.externalState) ? inquiryQuoteOuterState(editData.externalState) : '-'}</span>
</Form.Item>
<Form.Item label='内部状态' name='internal'>
<span>{Object.keys(editData).length > 0 ? quoteOrderInternalState(editData.interiorState) : '-'}</span>
<span>{(Object.keys(editData).length > 0 && editData.interiorState) ? quoteOrderInternalState(editData.interiorState) : '-'}</span>
</Form.Item>
</Form>
{/* 选择会员弹框 */}
......
......@@ -17,11 +17,12 @@ interface queryProps extends ModalTableProps {
member?: any,
schemaAction?: ISchemaFormActions | ISchemaFormAsyncActions,
getGoodsList: Function,
editData: any
editData: any,
type?: number
}
const EnquiryGoods: React.FC<queryProps> = (props) => {
const { member, schemaAction, getGoodsList, editData, ...restProps } = props
const { member, schemaAction, getGoodsList, editData, type, ...restProps } = props
const [value, setValue] = useState<any>('')
const productFormActions = createAsyncFormActions()
const onChange = (value) => {
......@@ -266,7 +267,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
return (
<div className={styles.revise_style}>
<Button block type='dashed' onClick={addGoods}><PlusOutlined />添加商品</Button>
<Button disabled={type === 3} block type='dashed' onClick={addGoods}><PlusOutlined />添加商品</Button>
<Form>
<Table rowKey={'productId'} style={{ marginTop: '16px' }} columns={columns} dataSource={goodsList} pagination={false} />
</Form>
......
......@@ -2,12 +2,12 @@ import React from 'react';
import AddForm from './addForm';
import { history } from 'umi';
const RfqEnquiryOrder:React.FC<{}> = () => {
const { id } = history.location.query;
console.log(id)
const { id, spam_id } = history.location.query;
return(
<AddForm
id={id}
type={3}
spam_id={spam_id}
/>
)
}
......
......@@ -411,7 +411,7 @@ const Details: React.FC<parmas> = (props) => {
<Steps
style={{ padding: '20px 0' }}
progressDot
current={1}
current={Number(data.externalState - 1)}
>
{detailData.externalStateStep.items.map((item, index) => {
return (
......@@ -447,7 +447,7 @@ const Details: React.FC<parmas> = (props) => {
<Steps
style={{ padding: '20px 0' }}
progressDot
current={0}
current={Number(data.interiorState - 1)}
>
{detailData.interiorStateStep.items.map((item, index) => {
return (
......
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