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

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

parent 7dadaf2f
......@@ -5,9 +5,9 @@ import {
createFormActions,
FormEffectHooks
} 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 {PATTERN_MAPS} from '@/constants/regExp'
import { PATTERN_MAPS } from '@/constants/regExp'
export interface Params {
id: number | string;
dialogVisible: boolean;
......@@ -46,6 +46,13 @@ const comfirmDialog: React.FC<Params> = (props) => {
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) => {
<SchemaForm
labelCol={3}
components={{
Input, Radio: Radio.Group, TextArea: Input.TextArea
Input, Radio: Radio.Group, TextArea: Input.TextArea, NumberPicker
}}
actions={actions}
effects={() => useFormEffects()}
......@@ -74,6 +81,19 @@ const comfirmDialog: React.FC<Params> = (props) => {
status: 4
}}
>
{props.dontReceive &&
<>
<Field
title='运费'
name='freightPrice'
x-component="numberpicker"
x-mega-prop={{
wrapperWidth: 300,
labelAlign: 'left'
}}
/>
</>
}
<Field
enum={
[
......@@ -96,10 +116,13 @@ const comfirmDialog: React.FC<Params> = (props) => {
x-component-props={{
placeholder: '在此输入你的内容,最多60个汉字'
}}
x-rules ={{
max:60,
x-mega-prop={{
labelAlign: 'left'
}}
x-rules={{
max: 60,
// maximum:10,//最大数值
message:'原因最多60个汉字'
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<{}> = () => {
{
title: '发货单号',
align: 'left',
dataIndex: 'orderNo',
key: 'orderNo',
dataIndex: 'invoicesNo',
key: 'invoicesNo',
},
{
title: '对应订单号',
align: 'center',
dataIndex: 'invoicesNo',
key: 'invoicesNo',
dataIndex: 'orderNo',
key: 'orderNo',
},
{
title: '单据摘要',
......
......@@ -21,14 +21,17 @@ const AddContract: React.FC<parmas> = (props) => {
const [fileExampleUrl, setFileExampleUrl] = useState<any>({});
const [uploadFile, setUploadFile] = useState<any>({});
const [fileUrl, setFileUrl] = useState<string>('');
const [loading, setloading] = useState(false);
const [data, setData] = useState<any>({});
/**判断文件类型和大小 */
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) {
message.error('doc/docx文件!');
message.error('不是doc/docx文件!');
}
const isLt20M = file.size / 1024 / 1024 < 20;
if (!isLt20M) {
message.error('上传文件大小不超过 20M!');
}
......@@ -37,13 +40,15 @@ const AddContract: React.FC<parmas> = (props) => {
/**上传回调 */
const handleChange = ({ fileList }) => {
setloading(true);
if (fileList[0].response) {
const file = {
name: fileList[0].name,
file: fileList[0].response.data
}
setFileUrl(fileList[0].response.data)
setUploadFile(file)
setloading(false);
setFileUrl(fileList[0].response.data);
setUploadFile(file);
}
}
......@@ -129,7 +134,7 @@ const AddContract: React.FC<parmas> = (props) => {
contractName: file.name,
contractUrl: file.file
}).then(res => {
if(res.code === 1000) {
if (res.code === 1000) {
window.open(res.data.contractUrl)
}
})
......@@ -178,7 +183,7 @@ const AddContract: React.FC<parmas> = (props) => {
<span>{uploadFile.name}</span>
</div>
<div className={styles.upload_right}>
<span onClick={()=> onView(uploadFile)}>预览</span>
<span onClick={() => onView(uploadFile)}>预览</span>
{page_type && <DeleteOutlined onClick={delectContract} />}
</div>
</div>
......@@ -194,7 +199,7 @@ const AddContract: React.FC<parmas> = (props) => {
onChange={handleChange}
accept='.doc,.docx'
>
<Button icon={<UploadOutlined />}>上传文件</Button>
<Button loading={loading} disabled={loading} icon={<UploadOutlined />}>上传文件</Button>
<div style={{ marginTop: '8px' }}>支持扩展名:.doc,文件大小不超过 20M</div>
</Upload>
}
......
......@@ -142,7 +142,7 @@ interface AreaParams {
}
const fetchMemberList = async (params) => {
const res = await PublicApi.getMemberManageLowerProviderPage(params)
const res = await PublicApi.getMemberManageUpperProviderPage(params)
return res.data
}
......@@ -1331,16 +1331,8 @@ const Detail: React.FC<{}> = () => {
(platType != 1 && platType != 3) &&
<Table rowKey={"id"} dataSource={dockingList} columns={dockingColumn} pagination={pagination} />
}
</TabPane>
<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'>
<TabPane tab='外部单据' key="1">
<Table rowKey={'id'} dataSource={dataInfo.externalRequisitionForms || []} columns={externalColumn(formTime, externalTextState)} />
......
......@@ -76,7 +76,7 @@ const BasicInfo: React.FC<queryProps> = (props) => {
// 模拟数据
const fetchMemberList = async (params) => {
return new Promise((resolve, reject) => {
PublicApi.postOrderCorrespondingInquiryNumber({...params}).then(res => {
PublicApi.getOrderCorrespondingInquiryNumber({...params}).then(res => {
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