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

修改物流能力 物流单提交的BUG,需求对接 指定会员的BUG

parent 7dadaf2f
...@@ -5,9 +5,9 @@ import { ...@@ -5,9 +5,9 @@ import {
createFormActions, createFormActions,
FormEffectHooks FormEffectHooks
} from '@formily/antd' } from '@formily/antd'
import { Input, Radio, FormMegaLayout } from '@formily/antd-components' import { Input, Radio, FormMegaLayout, NumberPicker } from '@formily/antd-components'
import { PublicApi } from '@/services/api' import { PublicApi } from '@/services/api'
import {PATTERN_MAPS} from '@/constants/regExp' import { PATTERN_MAPS } from '@/constants/regExp'
export interface Params { export interface Params {
id: number | string; id: number | string;
dialogVisible: boolean; dialogVisible: boolean;
...@@ -46,6 +46,13 @@ const comfirmDialog: React.FC<Params> = (props) => { ...@@ -46,6 +46,13 @@ const comfirmDialog: React.FC<Params> = (props) => {
state.visible = true state.visible = true
} }
}) })
setFieldState('freightPrice', state => {
if (value != 4) {
state.visible = false
} else {
state.visible = true
}
})
}) })
} }
...@@ -65,7 +72,7 @@ const comfirmDialog: React.FC<Params> = (props) => { ...@@ -65,7 +72,7 @@ const comfirmDialog: React.FC<Params> = (props) => {
<SchemaForm <SchemaForm
labelCol={3} labelCol={3}
components={{ components={{
Input, Radio: Radio.Group, TextArea: Input.TextArea Input, Radio: Radio.Group, TextArea: Input.TextArea, NumberPicker
}} }}
actions={actions} actions={actions}
effects={() => useFormEffects()} effects={() => useFormEffects()}
...@@ -74,6 +81,19 @@ const comfirmDialog: React.FC<Params> = (props) => { ...@@ -74,6 +81,19 @@ const comfirmDialog: React.FC<Params> = (props) => {
status: 4 status: 4
}} }}
> >
{props.dontReceive &&
<>
<Field
title='运费'
name='freightPrice'
x-component="numberpicker"
x-mega-prop={{
wrapperWidth: 300,
labelAlign: 'left'
}}
/>
</>
}
<Field <Field
enum={ enum={
[ [
...@@ -88,20 +108,23 @@ const comfirmDialog: React.FC<Params> = (props) => { ...@@ -88,20 +108,23 @@ const comfirmDialog: React.FC<Params> = (props) => {
{props.dontReceive && {props.dontReceive &&
<> <>
{/* <FormMegaLayout name='remarkOption' label='不接受原因' full required labelCol={2} labelAlign="top"> */} {/* <FormMegaLayout name='remarkOption' label='不接受原因' full required labelCol={2} labelAlign="top"> */}
<Field <Field
title='不接受原因' title='不接受原因'
name="remark" name="remark"
x-component="TextArea" x-component="TextArea"
required required
x-component-props={{ x-component-props={{
placeholder: '在此输入你的内容,最多60个汉字' placeholder: '在此输入你的内容,最多60个汉字'
}} }}
x-rules ={{ x-mega-prop={{
max:60, labelAlign: 'left'
// maximum:10,//最大数值 }}
message:'原因最多60个汉字' x-rules={{
}} max: 60,
/> // maximum:10,//最大数值
message: '原因最多60个汉字'
}}
/>
</> </>
......
import { ISchema } from '@formily/antd';
import { PublicApi } from '@/services/api';
import { FORM_FILTER_PATH } from '@/formSchema/const';
// 选择发货单
export const deliveryNumberSchema: ISchema = {
type: 'object',
properties: {
invoicesNo: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '发货单号',
align: 'flex-left',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
orderNo: {
type: 'string',
"x-component-props": {
placeholder: '对应订单号',
}
},
invoicesAbstract: {
type: 'string',
"x-component-props": {
placeholder: '单据摘要',
}
},
invoicesType: {
type: 'string',
"x-component": 'SearchSelect',
"x-component-props": {
placeholder: '请选择单据类型',
className: 'fixed-ant-selected-down',
fetchSearch: PublicApi.getWarehouseInvoicesTypeAll,
style: {
width: 160
}
}
},
"[startTransactionTime,endTransactionTime]": {
type: 'string',
"x-component": "dateSelect",
"x-component-props": {
placeholder: '单据时间(全部)',
}
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
// 选择订货单
export const orderNumberSchema: ISchema = {
type: 'object',
properties: {
orderNo: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '单据号',
align: 'flex-left',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
supplyMembersName: {
type: 'string',
"x-component-props": {
placeholder: '会员名称',
}
},
orderThe: {
type: 'string',
"x-component-props": {
placeholder: '单据摘要',
}
},
voucherTime: {
type: 'string',
"x-component-props": {
placeholder: '单据选择'
},
enum: [
{label: '询价采购', value: 1},
{label: '需求采购', value: 2},
{label: '现货采购', value: 3},
{label: '集采', value: 4},
{label: '积分兑换', value: 5},
{label: '渠道直采', value: 6},
{label: '渠道现货', value: 7},
{label: '渠道积分兑换', value: 8},
]
},
"[startCreateTime,endCreateTime]": {
type: 'string',
"x-component": "dateSelect",
"x-component-props": {
placeholder: '单据时间(全部)',
}
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
\ No newline at end of file
...@@ -195,14 +195,14 @@ const Deatail: React.FC<{}> = () => { ...@@ -195,14 +195,14 @@ const Deatail: React.FC<{}> = () => {
{ {
title: '发货单号', title: '发货单号',
align: 'left', align: 'left',
dataIndex: 'orderNo', dataIndex: 'invoicesNo',
key: 'orderNo', key: 'invoicesNo',
}, },
{ {
title: '对应订单号', title: '对应订单号',
align: 'center', align: 'center',
dataIndex: 'invoicesNo', dataIndex: 'orderNo',
key: 'invoicesNo', key: 'orderNo',
}, },
{ {
title: '单据摘要', title: '单据摘要',
......
...@@ -11,7 +11,7 @@ import styles from './index.less' ...@@ -11,7 +11,7 @@ import styles from './index.less'
export interface parmas { export interface parmas {
page_type?: string, page_type?: string,
id?: any id?: any
} }
const AddContract: React.FC<parmas> = (props) => { const AddContract: React.FC<parmas> = (props) => {
...@@ -21,14 +21,17 @@ const AddContract: React.FC<parmas> = (props) => { ...@@ -21,14 +21,17 @@ const AddContract: React.FC<parmas> = (props) => {
const [fileExampleUrl, setFileExampleUrl] = useState<any>({}); const [fileExampleUrl, setFileExampleUrl] = useState<any>({});
const [uploadFile, setUploadFile] = useState<any>({}); const [uploadFile, setUploadFile] = useState<any>({});
const [fileUrl, setFileUrl] = useState<string>(''); const [fileUrl, setFileUrl] = useState<string>('');
const [loading, setloading] = useState(false);
const [data, setData] = useState<any>({}); const [data, setData] = useState<any>({});
/**判断文件类型和大小 */ /**判断文件类型和大小 */
const beforeDocUpload = (file: UploadFile) => { const beforeDocUpload = (file: UploadFile) => {
const isJpgOrPng = file.type === 'application/msword' || file.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; const name = file.name.split('.');
const type = name[name.length - 1];
const isJpgOrPng = type === 'doc' || type === 'docx';
const isLt20M = file.size / 1024 / 1024 < 20;
if (!isJpgOrPng) { if (!isJpgOrPng) {
message.error('doc/docx文件!'); message.error('不是doc/docx文件!');
} }
const isLt20M = file.size / 1024 / 1024 < 20;
if (!isLt20M) { if (!isLt20M) {
message.error('上传文件大小不超过 20M!'); message.error('上传文件大小不超过 20M!');
} }
...@@ -37,14 +40,16 @@ const AddContract: React.FC<parmas> = (props) => { ...@@ -37,14 +40,16 @@ const AddContract: React.FC<parmas> = (props) => {
/**上传回调 */ /**上传回调 */
const handleChange = ({ fileList }) => { const handleChange = ({ fileList }) => {
setloading(true);
if (fileList[0].response) { if (fileList[0].response) {
const file = { const file = {
name: fileList[0].name, name: fileList[0].name,
file: fileList[0].response.data file: fileList[0].response.data
} }
setFileUrl(fileList[0].response.data) setloading(false);
setUploadFile(file) setFileUrl(fileList[0].response.data);
} setUploadFile(file);
}
} }
/**合同模板样例查询 */ /**合同模板样例查询 */
...@@ -129,11 +134,11 @@ const AddContract: React.FC<parmas> = (props) => { ...@@ -129,11 +134,11 @@ const AddContract: React.FC<parmas> = (props) => {
contractName: file.name, contractName: file.name,
contractUrl: file.file contractUrl: file.file
}).then(res => { }).then(res => {
if(res.code === 1000) { if (res.code === 1000) {
window.open(res.data.contractUrl) window.open(res.data.contractUrl)
} }
}) })
} }
return ( return (
...@@ -178,7 +183,7 @@ const AddContract: React.FC<parmas> = (props) => { ...@@ -178,7 +183,7 @@ const AddContract: React.FC<parmas> = (props) => {
<span>{uploadFile.name}</span> <span>{uploadFile.name}</span>
</div> </div>
<div className={styles.upload_right}> <div className={styles.upload_right}>
<span onClick={()=> onView(uploadFile)}>预览</span> <span onClick={() => onView(uploadFile)}>预览</span>
{page_type && <DeleteOutlined onClick={delectContract} />} {page_type && <DeleteOutlined onClick={delectContract} />}
</div> </div>
</div> </div>
...@@ -194,7 +199,7 @@ const AddContract: React.FC<parmas> = (props) => { ...@@ -194,7 +199,7 @@ const AddContract: React.FC<parmas> = (props) => {
onChange={handleChange} onChange={handleChange}
accept='.doc,.docx' accept='.doc,.docx'
> >
<Button icon={<UploadOutlined />}>上传文件</Button> <Button loading={loading} disabled={loading} icon={<UploadOutlined />}>上传文件</Button>
<div style={{ marginTop: '8px' }}>支持扩展名:.doc,文件大小不超过 20M</div> <div style={{ marginTop: '8px' }}>支持扩展名:.doc,文件大小不超过 20M</div>
</Upload> </Upload>
} }
......
...@@ -142,7 +142,7 @@ interface AreaParams { ...@@ -142,7 +142,7 @@ interface AreaParams {
} }
const fetchMemberList = async (params) => { const fetchMemberList = async (params) => {
const res = await PublicApi.getMemberManageLowerProviderPage(params) const res = await PublicApi.getMemberManageUpperProviderPage(params)
return res.data return res.data
} }
...@@ -1331,16 +1331,8 @@ const Detail: React.FC<{}> = () => { ...@@ -1331,16 +1331,8 @@ const Detail: React.FC<{}> = () => {
(platType != 1 && platType != 3) && (platType != 1 && platType != 3) &&
<Table rowKey={"id"} dataSource={dockingList} columns={dockingColumn} pagination={pagination} /> <Table rowKey={"id"} dataSource={dockingList} columns={dockingColumn} pagination={pagination} />
} }
</TabPane> </TabPane>
<TabPane tab="流转记录" key='5' forceRender> <TabPane tab="流转记录" key='5' forceRender>
{/* <Radio.Group value={memberType} optionType="button" buttonStyle="solid" onChange={(e) => handleMemberTypeChange(e)}>
<Radio value={0}>外部单据(0)</Radio>
<Radio value={1}>内部单据</Radio>
</Radio.Group> */}
<Tabs type="card" size="small" defaultActiveKey='1'> <Tabs type="card" size="small" defaultActiveKey='1'>
<TabPane tab='外部单据' key="1"> <TabPane tab='外部单据' key="1">
<Table rowKey={'id'} dataSource={dataInfo.externalRequisitionForms || []} columns={externalColumn(formTime, externalTextState)} /> <Table rowKey={'id'} dataSource={dataInfo.externalRequisitionForms || []} columns={externalColumn(formTime, externalTextState)} />
......
...@@ -76,7 +76,7 @@ const BasicInfo: React.FC<queryProps> = (props) => { ...@@ -76,7 +76,7 @@ const BasicInfo: React.FC<queryProps> = (props) => {
// 模拟数据 // 模拟数据
const fetchMemberList = async (params) => { const fetchMemberList = async (params) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
PublicApi.postOrderCorrespondingInquiryNumber({...params}).then(res => { PublicApi.getOrderCorrespondingInquiryNumber({...params}).then(res => {
resolve(res.data) resolve(res.data)
}) })
}); });
......
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