Commit 7a9592eb authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

Merge branch 'dev' into test

parents a9f11ed9 f65e49a0
...@@ -34,7 +34,16 @@ export const productModalByMemberSchema: ISchema = { ...@@ -34,7 +34,16 @@ export const productModalByMemberSchema: ISchema = {
"x-component-props": { "x-component-props": {
placeholder: '请选择品类', placeholder: '请选择品类',
className: 'fixed-ant-selected-down', // 该类强制将显示的下拉框出现在select下, 只有这里出现问题, ?? className: 'fixed-ant-selected-down', // 该类强制将显示的下拉框出现在select下, 只有这里出现问题, ??
fetchSearch: PublicApi.getProductSelectGetMemberCategory, fetchSearch: () => {
let merber = sessionStorage.getItem('memberInfo');
let meberInfo = JSON.parse(merber)
return new Promise(resolve => {
PublicApi.getProductSelectGetMemberCategory({ name: '', ...meberInfo}).then(res => {
console.log(res.data, 10086)
resolve(res)
})
})
},
style: { style: {
width: 160 width: 160
} }
...@@ -45,7 +54,16 @@ export const productModalByMemberSchema: ISchema = { ...@@ -45,7 +54,16 @@ export const productModalByMemberSchema: ISchema = {
"x-component": 'SearchSelect', "x-component": 'SearchSelect',
"x-component-props": { "x-component-props": {
placeholder: '请选择品牌', placeholder: '请选择品牌',
fetchSearch: PublicApi.getProductSelectGetMemberBrand, fetchSearch: () => {
let merber = sessionStorage.getItem('memberInfo');
let meberInfo = JSON.parse(merber)
return new Promise(resolve => {
PublicApi.getProductSelectGetMemberBrand({ name: '', ...meberInfo}).then(res => {
console.log(res.data, 10086)
resolve(res)
})
})
},
style: { style: {
width: 160 width: 160
} }
......
...@@ -44,6 +44,11 @@ const BasicInfo: React.FC<queryProps> = (props) => { ...@@ -44,6 +44,11 @@ const BasicInfo: React.FC<queryProps> = (props) => {
memberRoleId: memberRowCtl.selectRow[0].roleId, memberRoleId: memberRowCtl.selectRow[0].roleId,
memberRoleName: memberRowCtl.selectRow[0].roleName memberRoleName: memberRowCtl.selectRow[0].roleName
} }
sessionStorage.setItem('memberInfo', JSON.stringify({
memberId: memberRowCtl.selectRow[0].memberId,
memberRoleId: memberRowCtl.selectRow[0].roleId,
}))
setmemberId(memberRowCtl.selectRow[0].memberId) setmemberId(memberRowCtl.selectRow[0].memberId)
setroleId(memberRowCtl.selectRow[0].roleId) setroleId(memberRowCtl.selectRow[0].roleId)
setmemberName(memberRowCtl.selectRow[0].name); setmemberName(memberRowCtl.selectRow[0].name);
...@@ -95,17 +100,17 @@ const BasicInfo: React.FC<queryProps> = (props) => { ...@@ -95,17 +100,17 @@ const BasicInfo: React.FC<queryProps> = (props) => {
const fetchMemberList = async (params) => { const fetchMemberList = async (params) => {
console.log(params) console.log(params)
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
PublicApi.getMemberManagePlatformProviderPage({...params}).then(res => { PublicApi.getMemberManagePlatformProviderPage({ ...params }).then(res => {
resolve(res.data) resolve(res.data)
}) })
}); });
} }
// 选择会员弹框结束 // 选择会员弹框结束
useEffect(() => { useEffect(() => {
if(memberName) { if (memberName) {
basicform.setFieldsValue({'memberId': memberId ? memberId : undefined}) basicform.setFieldsValue({ 'memberId': memberId ? memberId : undefined })
} }
},[memberName]) }, [memberName])
/************* 页面的一些操作start *************/ /************* 页面的一些操作start *************/
// 拿到表单数据 // 拿到表单数据
...@@ -120,7 +125,7 @@ const BasicInfo: React.FC<queryProps> = (props) => { ...@@ -120,7 +125,7 @@ const BasicInfo: React.FC<queryProps> = (props) => {
} }
}) })
}).catch(errorInfo => { }).catch(errorInfo => {
resolve({state: false}) resolve({ state: false })
}) })
}) })
} }
...@@ -136,10 +141,10 @@ const BasicInfo: React.FC<queryProps> = (props) => { ...@@ -136,10 +141,10 @@ const BasicInfo: React.FC<queryProps> = (props) => {
currentRef.current = userAction; currentRef.current = userAction;
} }
} }
},[]) }, [])
useEffect(() => { useEffect(() => {
if(Object.keys(editData).length > 0) { if (Object.keys(editData).length > 0) {
basicform.setFieldsValue({ basicform.setFieldsValue({
details: editData.details, details: editData.details,
}) })
...@@ -161,8 +166,8 @@ const BasicInfo: React.FC<queryProps> = (props) => { ...@@ -161,8 +166,8 @@ const BasicInfo: React.FC<queryProps> = (props) => {
<Input /> <Input />
</Form.Item> </Form.Item>
<Form.Item label='被询价会员' name='memberId' rules={[{ required: true, message: '请选择被询价会员' }]}> <Form.Item label='被询价会员' name='memberId' rules={[{ required: true, message: '请选择被询价会员' }]}>
<Search disabled={type === 3} value={memberName ? memberName : undefined} readOnly enterButton={<><LinkOutlined /> 选择</>} onSearch={()=>setVisibleChannelMember(true)} /> <Search disabled={type === 3 || type === 2} value={memberName ? memberName : undefined} readOnly enterButton={<><LinkOutlined /> 选择</>} onSearch={() => setVisibleChannelMember(true)} />
{memberName && <Button type='link' onClick={() => window.open(`/shop?shopId=${btoa(JSON.stringify({memberId, roleId}))}`)}>查看会员详情</Button>} {memberName && <Button type='link' onClick={() => window.open(`/shop?shopId=${btoa(JSON.stringify({ memberId, roleId }))}`)}>查看会员详情</Button>}
</Form.Item> </Form.Item>
<Form.Item label='询价单号' name='orderNumber'> <Form.Item label='询价单号' name='orderNumber'>
<span>{(Object.keys(editData).length > 0 && editData.inquiryListNo) ? editData.inquiryListNo : '-'}</span> <span>{(Object.keys(editData).length > 0 && editData.inquiryListNo) ? editData.inquiryListNo : '-'}</span>
...@@ -184,7 +189,7 @@ const BasicInfo: React.FC<queryProps> = (props) => { ...@@ -184,7 +189,7 @@ const BasicInfo: React.FC<queryProps> = (props) => {
cancel={handleCancelAddMember} cancel={handleCancelAddMember}
visible={visibleChannelMember} visible={visibleChannelMember}
forceRender={visibleChannelMember} forceRender={visibleChannelMember}
resetModal={{destroyOnClose: true, forceRender: true}} resetModal={{ destroyOnClose: true, forceRender: true }}
columns={columnsSetMember} columns={columnsSetMember}
rowSelection={memberRowSelection} rowSelection={memberRowSelection}
fetchTableData={params => fetchMemberList(params)} fetchTableData={params => fetchMemberList(params)}
......
...@@ -21,7 +21,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => { ...@@ -21,7 +21,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
const countMoney = (num: any, money: any) => { const countMoney = (num: any, money: any) => {
let price: ReactNode = null; let price: ReactNode = null;
price = (Number(money) * 1) / Number(num); price = (Number(money) * 1) / Number(num);
return Number(price).toFixed(4); return Number(price).toFixed(2);
} }
/**输入框输入 */ /**输入框输入 */
......
...@@ -24,7 +24,7 @@ const TradingConditions: React.FC<queryProps> = (props) => { ...@@ -24,7 +24,7 @@ const TradingConditions: React.FC<queryProps> = (props) => {
state: true, state: true,
data: { data: {
minimumOrder: values.minimumOrder, minimumOrder: values.minimumOrder,
offer: values.offer, deliveryInstructions: values.deliveryInstructions,
paymentType: values.paymentType, paymentType: values.paymentType,
taxes: values.taxes, taxes: values.taxes,
logistics: values.logistics, logistics: values.logistics,
...@@ -61,7 +61,7 @@ const TradingConditions: React.FC<queryProps> = (props) => { ...@@ -61,7 +61,7 @@ const TradingConditions: React.FC<queryProps> = (props) => {
logistics: editData.logistics, logistics: editData.logistics,
packRequire: editData.packRequire, packRequire: editData.packRequire,
otherRequire: editData.otherRequire, otherRequire: editData.otherRequire,
offer: editData.offer, deliveryInstructions: editData.deliveryInstructions,
minimumOrder: editData.minimumOrder minimumOrder: editData.minimumOrder
}) })
} }
...@@ -78,7 +78,7 @@ const TradingConditions: React.FC<queryProps> = (props) => { ...@@ -78,7 +78,7 @@ const TradingConditions: React.FC<queryProps> = (props) => {
<Form.Item label='最小起订' name='minimumOrder' rules={[{ required: true, message: '请输入最小起订' }]}> <Form.Item label='最小起订' name='minimumOrder' rules={[{ required: true, message: '请输入最小起订' }]}>
<Input placeholder='最长100个字符,50个汉字' /> <Input placeholder='最长100个字符,50个汉字' />
</Form.Item> </Form.Item>
<Form.Item label='交付说明' name='offer'> <Form.Item label='交付说明' name='deliveryInstructions'>
<Input.TextArea placeholder='最长100个字符,50个汉字' /> <Input.TextArea placeholder='最长100个字符,50个汉字' />
</Form.Item> </Form.Item>
<Form.Item label='付款说明' name='paymentType'> <Form.Item label='付款说明' name='paymentType'>
......
...@@ -180,7 +180,7 @@ const Details: React.FC<parmas> = (props) => { ...@@ -180,7 +180,7 @@ const Details: React.FC<parmas> = (props) => {
title: '其他报价说明', title: '其他报价说明',
leftElem: [ leftElem: [
{ title: '最小起订', key: '', value: data.minimumOrder }, { title: '最小起订', key: '', value: data.minimumOrder },
{ title: '交付说明', key: '', value: data.fullAddress }, { title: '交付说明', key: '', value: data.deliveryInstructions },
{ title: '付款说明', key: '', value: data.paymentType } { title: '付款说明', key: '', value: data.paymentType }
], ],
centerElem: [ centerElem: [
......
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