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

修改支付策略, 修改新增待提交物流单BUG

parent 75a9a23e
...@@ -712,7 +712,6 @@ export const logisticsSelectGoodsSearchSchema: ISchema = { ...@@ -712,7 +712,6 @@ export const logisticsSelectGoodsSearchSchema: ISchema = {
}, },
category: { category: {
type: 'string', type: 'string',
"x-component": 'SearchSelect',
'x-component-props': { 'x-component-props': {
placeholder: '商品品类', placeholder: '商品品类',
style: { style: {
......
...@@ -236,6 +236,8 @@ const AddLogistics: React.FC<{}> = () => { ...@@ -236,6 +236,8 @@ const AddLogistics: React.FC<{}> = () => {
receiverMemberId: res.data.receiveMemberId, receiverMemberId: res.data.receiveMemberId,
receiverRoleId: res.data.receiveRoleId, receiverRoleId: res.data.receiveRoleId,
receiverMemberName: res.data.receiveUserName, receiverMemberName: res.data.receiveUserName,
shipmentOrderCode: res.data.deliveryNo,
shipmentOrderId: res.data.deliveryId,
} }
form.setFieldsValue(obj); form.setFieldsValue(obj);
setQuery({ ...obj }) setQuery({ ...obj })
...@@ -257,6 +259,8 @@ const AddLogistics: React.FC<{}> = () => { ...@@ -257,6 +259,8 @@ const AddLogistics: React.FC<{}> = () => {
receiverMemberId: res.data.receiveMemberId, receiverMemberId: res.data.receiveMemberId,
receiverRoleId: res.data.receiveRoleId, receiverRoleId: res.data.receiveRoleId,
receiverMemberName: res.data.receiveUserName, receiverMemberName: res.data.receiveUserName,
shipmentOrderCode: res.data.deliveryNo,
shipmentOrderId: res.data.deliveryId,
} }
form.setFieldsValue(obj); form.setFieldsValue(obj);
setQuery({ ...obj }) setQuery({ ...obj })
...@@ -278,6 +282,8 @@ const AddLogistics: React.FC<{}> = () => { ...@@ -278,6 +282,8 @@ const AddLogistics: React.FC<{}> = () => {
receiverMemberId: res.data.receiveMemberId, receiverMemberId: res.data.receiveMemberId,
receiverRoleId: res.data.receiveRoleId, receiverRoleId: res.data.receiveRoleId,
receiverMemberName: res.data.receiveUserName, receiverMemberName: res.data.receiveUserName,
shipmentOrderCode: res.data.deliveryNo,
shipmentOrderId: res.data.deliveryId,
} }
form.setFieldsValue(obj); form.setFieldsValue(obj);
setQuery({ ...obj }) setQuery({ ...obj })
...@@ -311,7 +317,9 @@ const AddLogistics: React.FC<{}> = () => { ...@@ -311,7 +317,9 @@ const AddLogistics: React.FC<{}> = () => {
externalState: res.data.status, externalState: res.data.status,
shipperAddressId: res.data.shipperAddressId, shipperAddressId: res.data.shipperAddressId,
shipperFullAddress: res.data.shipperFullAddress, shipperFullAddress: res.data.shipperFullAddress,
logisticsOrderLogList: res.data.logisticsOrderLogList logisticsOrderLogList: res.data.logisticsOrderLogList,
settlementWay: res.data.settlementWay,
freightPrice: res.data.freightPrice
} }
form.setFieldsValue(obj) form.setFieldsValue(obj)
const list = [...res.data.detailList]; const list = [...res.data.detailList];
...@@ -406,7 +414,7 @@ const AddLogistics: React.FC<{}> = () => { ...@@ -406,7 +414,7 @@ const AddLogistics: React.FC<{}> = () => {
const arr: any[] = [] const arr: any[] = []
selectRow.forEach((item: any) => { selectRow.forEach((item: any) => {
arr.push({ arr.push({
productId: item.id, productId: item.id ? item.id : item.productId,
productName: item.productName, productName: item.productName,
categoryName: item.category ? item.category : item.categoryName, categoryName: item.category ? item.category : item.categoryName,
brandName: item.brand ? item.brand : item.brandName, brandName: item.brand ? item.brand : item.brandName,
...@@ -698,7 +706,7 @@ const AddLogistics: React.FC<{}> = () => { ...@@ -698,7 +706,7 @@ const AddLogistics: React.FC<{}> = () => {
} }
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item label="物流单号" name='receiverName1'><span></span></Form.Item> <Form.Item label="物流单号" name='receiverName1'><span>{query.logisticsOrderNo}</span></Form.Item>
<Form.Item label='对应发货单号' name='shipmentOrderCode'> <Form.Item label='对应发货单号' name='shipmentOrderCode'>
<Search disabled={!!history.location.query.createType} readOnly value={Object.keys(query).length > 0 ? query.shipmentOrderCode : undefined} enterButton={<><LinkOutlined /> 选择</>} onSearch={() => setshippingvisible(true)} /> <Search disabled={!!history.location.query.createType} readOnly value={Object.keys(query).length > 0 ? query.shipmentOrderCode : undefined} enterButton={<><LinkOutlined /> 选择</>} onSearch={() => setshippingvisible(true)} />
{query.shipmentOrderCode && <Button type='link' {query.shipmentOrderCode && <Button type='link'
...@@ -748,7 +756,7 @@ const AddLogistics: React.FC<{}> = () => { ...@@ -748,7 +756,7 @@ const AddLogistics: React.FC<{}> = () => {
<TabPane key='tab-3' tab='运费' forceRender> <TabPane key='tab-3' tab='运费' forceRender>
<Form {...layout}> <Form {...layout}>
<Form.Item label='运费'> <Form.Item label='运费'>
<span></span> <span>{query.freightPrice}</span>
</Form.Item> </Form.Item>
<Form.Item label='结算方式'> <Form.Item label='结算方式'>
<span>{query.settlementWay}</span> <span>{query.settlementWay}</span>
......
...@@ -423,6 +423,7 @@ const detailInfo: React.FC<{}> = () => { ...@@ -423,6 +423,7 @@ const detailInfo: React.FC<{}> = () => {
<Input <Input
addonBefore="¥" addonBefore="¥"
onBlur={inputOnchange} onBlur={inputOnchange}
value={item.value}
type='number' type='number'
maxLength={25} maxLength={25}
style={{ width: '300px' }} style={{ width: '300px' }}
......
...@@ -147,12 +147,6 @@ const orderSearchList: React.FC<listProps> = (props) => { ...@@ -147,12 +147,6 @@ const orderSearchList: React.FC<listProps> = (props) => {
} }
}, []) }, [])
useEffect(() => {
ref.current.reload()
return () => {
}
}, [TimeRange])
const handleSee = (id: number) => { const handleSee = (id: number) => {
if (props.type === '1') { if (props.type === '1') {
history.push(`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=${id}`) history.push(`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=${id}`)
...@@ -181,8 +175,8 @@ const orderSearchList: React.FC<listProps> = (props) => { ...@@ -181,8 +175,8 @@ const orderSearchList: React.FC<listProps> = (props) => {
{ {
title: props.type == '1' ? '物流服务商' : '发货方', title: props.type == '1' ? '物流服务商' : '发货方',
align: 'center', align: 'center',
dataIndex: props.type == '1' ? 'companyName' : 'shipperName', dataIndex: props.type == '1' ? 'companyName' : 'shipperMemberName',
key: props.type == '1' ? 'companyName' : 'shipperName', key: props.type == '1' ? 'companyName' : 'shipperMemberName',
// className: props.type == '1' ? '' : style['hidden'] // className: props.type == '1' ? '' : style['hidden']
}, },
......
...@@ -135,8 +135,8 @@ const OrderList: React.FC<ListProps> = (props) => { ...@@ -135,8 +135,8 @@ const OrderList: React.FC<ListProps> = (props) => {
{ {
title: '收货方', title: '收货方',
align: 'center', align: 'center',
dataIndex: 'receiverName', dataIndex: 'receiverMemberName',
key: 'receiverName', key: 'receiverMemberName',
}, },
{ {
title: '总箱数', title: '总箱数',
......
...@@ -18,7 +18,7 @@ interface payWayTableParams { ...@@ -18,7 +18,7 @@ interface payWayTableParams {
const PayWayTable: React.FC<payWayTableParams> = (props) => { const PayWayTable: React.FC<payWayTableParams> = (props) => {
const [modalvisible, setmodalvisible] = useState<boolean>(false); const [modalvisible, setmodalvisible] = useState<boolean>(false);
const [type, setType] = useState<number>(1); // 1. const [type, setType] = useState<number>(); // 1.
const [edit, setedit] = useState<any>({}); const [edit, setedit] = useState<any>({});
const [modifyIndex, setModifyIndex] = useState<any>(0) const [modifyIndex, setModifyIndex] = useState<any>(0)
const [modify, setmodify] = useState<boolean>(false); const [modify, setmodify] = useState<boolean>(false);
...@@ -44,17 +44,29 @@ const PayWayTable: React.FC<payWayTableParams> = (props) => { ...@@ -44,17 +44,29 @@ const PayWayTable: React.FC<payWayTableParams> = (props) => {
key: 'options', key: 'options',
dataIndex: 'options', dataIndex: 'options',
render: (text: any, record: any, index: number) => <> render: (text: any, record: any, index: number) => <>
<Button type='link' onClick={() => {setedit(record); setmodalvisible(true); setModifyIndex(index); setmodify(true)}}>编辑</Button> <Button type='link' onClick={() => { setedit(record); setmodalvisible(true); setModifyIndex(index); setmodify(true) }}>编辑</Button>
<Button type='link' onClick={() => onDel(record.type, index)}>删除</Button> <Button type='link' onClick={() => onDel(record.type, index)}>删除</Button>
</> </>
} }
] ]
const handleOk = (value: any, idx: number) => { const handleOk = (value: any, idx: number) => {
if( !modify ) { let idType = null;
onGet(value, idx) switch (type) {
case 1:
idType = 1
break;
case 2:
idType = 3
break;
case 3:
idType = 2
break;
}
if (!modify) {
onGet(value, idType)
} else { } else {
onEdit(value, idx, modifyIndex) onEdit(value, idType, modifyIndex)
} }
setmodalvisible(false); setmodalvisible(false);
...@@ -73,7 +85,7 @@ const PayWayTable: React.FC<payWayTableParams> = (props) => { ...@@ -73,7 +85,7 @@ const PayWayTable: React.FC<payWayTableParams> = (props) => {
rowKey={(record: any, index: number) => index} rowKey={(record: any, index: number) => index}
pagination={false} pagination={false}
/> />
<Button style={{ marginBottom: 16, marginTop: 24 }} block icon={<PlusOutlined />} onClick={() => { setmodalvisible(true); setType(1); setmodify(false) }} type='dashed'>新增参数配置</Button> <Button style={{ marginBottom: 16, marginTop: 24 }} block icon={<PlusOutlined />} onClick={() => { setmodalvisible(true); setType(id); setmodify(false) }} type='dashed'>新增参数配置</Button>
{ {
id !== 2 && id !== 2 &&
...@@ -85,7 +97,7 @@ const PayWayTable: React.FC<payWayTableParams> = (props) => { ...@@ -85,7 +97,7 @@ const PayWayTable: React.FC<payWayTableParams> = (props) => {
rowKey={(record: any, index: number) => index} rowKey={(record: any, index: number) => index}
pagination={false} pagination={false}
/> />
<Button style={{ marginBottom: 16, marginTop: 24 }} block icon={<PlusOutlined />} onClick={() => { setmodalvisible(true); setType(2); setmodify(false) }} type='dashed'>新增参数配置</Button> <Button style={{ marginBottom: 16, marginTop: 24 }} block icon={<PlusOutlined />} onClick={() => { setmodalvisible(true); setType(3); setmodify(false) }} type='dashed'>新增参数配置</Button>
</> </>
} }
......
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Modal, Form, Select , Input } from 'antd'; import { Modal, Form, Select, Input } from 'antd';
import usePayTypeEnum from './usePayTypeEnum'; import usePayTypeEnum from './usePayTypeEnum';
const { Option } = Select; const { Option } = Select;
const { TextArea } = Input; const { TextArea } = Input;
...@@ -17,20 +17,33 @@ const layout: any = { ...@@ -17,20 +17,33 @@ const layout: any = {
labelCol: { style: { width: '100px' } }, labelCol: { style: { width: '100px' } },
labelAlign: "left" labelAlign: "left"
}; };
const SetUpModal:React.FC<setUpModalParams> = (props) => { const SetUpModal: React.FC<setUpModalParams> = (props) => {
const [form] = Form.useForm(); const [form] = Form.useForm();
const { payTypeEnum } = usePayTypeEnum(); const { payTypeEnum } = usePayTypeEnum();
const { modalvisible, onOK, onCancel, onType, edit} = props; const { modalvisible, onOK, onCancel, type, edit } = props;
const [option, setOption] = useState<any>({}) const [option, setOption] = useState<any>({})
const handleOk = () => { const handleOk = () => {
form.validateFields().then(res => { form.validateFields().then(res => {
console.log(type)
let idType = null;
switch (type) {
case 1:
idType = 1
break;
case 2:
idType = 3
break;
case 3:
idType = 2
break;
}
const obj = { const obj = {
id: edit.id ? edit.id : undefined, id: edit.id ? edit.id : undefined,
code: option.children, code: option.children,
value: res.value, value: res.value,
describe: res.describe, describe: res.describe,
type: onType, type: idType,
payWayCodeTypeEnum: res.code payWayCodeTypeEnum: res.code
} }
onOK(obj) onOK(obj)
...@@ -40,12 +53,12 @@ const SetUpModal:React.FC<setUpModalParams> = (props) => { ...@@ -40,12 +53,12 @@ const SetUpModal:React.FC<setUpModalParams> = (props) => {
}) })
} }
const handleChange = (e:any, option:any) => { const handleChange = (e: any, option: any) => {
setOption(option) setOption(option)
} }
useEffect(() => { useEffect(() => {
if(Object.keys(edit).length > 0) { if (Object.keys(edit).length > 0) {
console.log(edit, 10086) console.log(edit, 10086)
form.setFieldsValue({ form.setFieldsValue({
code: edit.payWayCodeTypeEnum, code: edit.payWayCodeTypeEnum,
...@@ -53,7 +66,7 @@ const SetUpModal:React.FC<setUpModalParams> = (props) => { ...@@ -53,7 +66,7 @@ const SetUpModal:React.FC<setUpModalParams> = (props) => {
describe: edit.edit describe: edit.edit
}) })
} }
},[edit]) }, [edit])
return ( return (
<Modal <Modal
......
...@@ -29,42 +29,6 @@ const PayWaySetTemplate: React.FC<{}> = () => { ...@@ -29,42 +29,6 @@ const PayWaySetTemplate: React.FC<{}> = () => {
}) })
} }
// const initPayWayStart = (id: any) => {
// return new Promise(resolve => {
// PublicApi.getPayMemberQueryPlatformIsStart({ id }).then(res => {
// if (res.code === 1000) {
// if (res.data) {
// resolve(res)
// }
// }
// })
// }).then((res: any) => {
// const data = [...payItem];
// if (data.length > 0) {
// data.forEach((item: any) => {
// if (item.id === res.data.id) {
// item.id = res.data.id;
// item.isPitchOn = res.data.isPitchOn;
// item.payParametersList = res.data.payParametersList;
// item.payParametersAddListRequests = res.data.payParametersListResponses;
// item.payType = res.data.payType;
// item.way = res.data.way;
// }
// })
// setPayItem([...data])
// }
// })
// }
// const handleTabClick = (key: any) => {
// if (!step.includes(Number(key))) {
// initPayWayStart(key);
// }
// const data = [...step, Number(key)];
// let arr = [...new Set(data)]
// setStep(arr);
// }
useEffect(() => { useEffect(() => {
// 支付配置信息 // 支付配置信息
payWayConfigInfo().then((res: any) => { payWayConfigInfo().then((res: any) => {
...@@ -80,25 +44,8 @@ const PayWaySetTemplate: React.FC<{}> = () => { ...@@ -80,25 +44,8 @@ const PayWaySetTemplate: React.FC<{}> = () => {
payParametersAddListRequests: item.payParametersListResponses ? item.payParametersListResponses : [] payParametersAddListRequests: item.payParametersListResponses ? item.payParametersListResponses : []
}) })
}) })
// setStep([...step, id])
setconfig([...res]); setconfig([...res]);
// /**第一次运行 */ setPayItem([...arr]);
// PublicApi.getPayMemberQueryPlatformIsStart({ id }).then(res => {
// arr.forEach((item: any, index: number) => {
// if (res.data) {
// if (item.id === id) {
// item.id = res.data.id;
// item.isPitchOn = res.data.isPitchOn;
// item.payParametersList = res.data.payParametersList;
// item.payParametersAddListRequests = res.data.payParametersListResponses;
// item.payType = res.data.payType;
// item.way = res.data.way;
// }
// }
// })
// console.log(arr)
setPayItem([...arr]);
// })
}) })
}, []) }, [])
...@@ -109,11 +56,12 @@ const PayWaySetTemplate: React.FC<{}> = () => { ...@@ -109,11 +56,12 @@ const PayWaySetTemplate: React.FC<{}> = () => {
} }
const onGet = (value: any, type: number, idx: number) => { const onGet = (value: any, type: number, idx: number) => {
console.log(value, type)
const data = [...payItem]; const data = [...payItem];
if (type === 1) { if (type === 2) {
data[idx].payParametersAddListRequests = [...data[idx].payParametersAddListRequests, value]
} else {
data[idx].payParametersList.push(value) data[idx].payParametersList.push(value)
} else {
data[idx].payParametersAddListRequests = [...data[idx].payParametersAddListRequests, value]
} }
setPayItem(data); setPayItem(data);
} }
...@@ -160,17 +108,23 @@ const PayWaySetTemplate: React.FC<{}> = () => { ...@@ -160,17 +108,23 @@ const PayWaySetTemplate: React.FC<{}> = () => {
/** */ /** */
const handleBlur = (e, name, idx) => { const handleBlur = (e, name, idx) => {
const data = [...payItem]; const data = [...payItem]
const payParametersAddListRequests = data[idx].payParametersAddListRequests; const payParametersAddListRequests = data[idx].payParametersAddListRequests;
if(payParametersAddListRequests.length === 0) {
payParametersAddListRequests.push({code: '', value: '', describe: ''})
}
payParametersAddListRequests.map(item => { payParametersAddListRequests.map(item => {
for(let key in item) { for(let key in item) {
if(key === name) { if(key === name) {
item[key] = e.target.value item[key] = e.target.value
}else {
item[name] = e.target.value
} }
} }
item.type = 6; item.type = 6;
}) })
data[idx].payParametersAddListRequests = [...payParametersAddListRequests] data[idx].payParametersAddListRequests = [...payParametersAddListRequests]
console.log(payParametersAddListRequests, 10086)
setPayItem(data) setPayItem(data)
} }
return ( return (
......
...@@ -31,6 +31,7 @@ const AddQuotes: React.FC<parmas> = (props) => { ...@@ -31,6 +31,7 @@ const AddQuotes: React.FC<parmas> = (props) => {
await PublicApi.getOrderInquiryListDetails({ id }).then(res => { await PublicApi.getOrderInquiryListDetails({ id }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
setgoodsList(res.data.inquiryListProductRequests); setgoodsList(res.data.inquiryListProductRequests);
setenclosureUrls(res.data.enclosureUrls)
setEditData(res.data) setEditData(res.data)
setmember({ setmember({
name: res.data.memberName, name: res.data.memberName,
...@@ -138,7 +139,7 @@ const AddQuotes: React.FC<parmas> = (props) => { ...@@ -138,7 +139,7 @@ const AddQuotes: React.FC<parmas> = (props) => {
} }
// 附件回调 // 附件回调
const handleGetEnclosureUrls = (data: any) => { const handleGetEnclosureUrls = (data: any) => {
setenclosureUrls([...enclosureUrls, ...data]); setenclosureUrls(data);
} }
return ( return (
......
...@@ -175,6 +175,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => { ...@@ -175,6 +175,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
memberRowCtl.setSelectRow(selectData) memberRowCtl.setSelectRow(selectData)
memberRowCtl.setSelectedRowKeys(selectData.map(v => v.id)) memberRowCtl.setSelectedRowKeys(selectData.map(v => v.id))
setgoodsList(newData) setgoodsList(newData)
getGoodsList(newData)
} }
// 编辑时回显的数据 // 编辑时回显的数据
......
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Form, Button, Upload, message } from 'antd'; import { Form, Button, Upload, message } from 'antd';
import { UPLOAD_TYPE } from '@/constants' import { UPLOAD_TYPE } from '@/constants'
import { UploadFile, UploadChangeParam } from 'antd/lib/upload/interface'; import { UploadFile, UploadChangeParam } from 'antd/lib/upload/interface';
import styles from './index.less'; import styles from './index.less';
import { UploadOutlined, DeleteOutlined, LinkOutlined } from '@ant-design/icons'; import { UploadOutlined, DeleteOutlined, LinkOutlined } from '@ant-design/icons';
const layout: any = { const layout: any = {
colon: false, colon: false,
labelCol: { style: { width: '174px' } }, labelCol: { style: { width: '174px' } },
wrapperCol: { span: 9 }, wrapperCol: { span: 9 },
labelAlign: "left" labelAlign: "left"
}; };
export interface parmas { export interface parmas {
handleGetEnclosureUrls?: Function, handleGetEnclosureUrls?: Function,
editData?: any editData?: any
} }
const Attached: React.FC<parmas> = (props) => { const Attached: React.FC<parmas> = (props) => {
const { handleGetEnclosureUrls, editData } = props; const { handleGetEnclosureUrls, editData } = props;
const [files, setFiles] = useState<Array<any>>([]); const [files, setFiles] = useState<Array<any>>([]);
const [loading, setloading] = useState(false); const [loading, setloading] = useState(false);
/**判断文件类型和大小 */ /**判断文件类型和大小 */
const beforeDocUpload = (file: UploadFile) => { const beforeDocUpload = (file: UploadFile) => {
const isLt20M = file.size / 1024 / 1024 < 20; const isLt20M = file.size / 1024 / 1024 < 20;
if (!isLt20M) { if (!isLt20M) {
message.error('上传文件大小不超过 20M!'); message.error('上传文件大小不超过 20M!');
} }
return isLt20M; return isLt20M;
} }
// 上传回调 // 上传回调
const handleChange = ({ file }) => { const handleChange = ({ file }) => {
const arr: any = files; const arr: any = files;
setloading(true); setloading(true);
if (file.response) { if (file.response) {
if (file.response.code === 1000) { if (file.response.code === 1000) {
arr.push({ arr.push({
name: file.name, name: file.name,
url: file.response.data url: file.response.data
}) })
setloading(false); setloading(false);
} }
} }
setFiles([...arr]) setFiles([...arr])
handleGetEnclosureUrls(arr); handleGetEnclosureUrls(arr);
} }
// 删除附件 // 删除附件
const removeFiles = (index: any) => { const removeFiles = (index: any) => {
const arr = [...files]; const arr = [...files];
arr.splice(index, 1); arr.splice(index, 1);
setFiles(arr); setFiles(arr);
handleGetEnclosureUrls(arr); handleGetEnclosureUrls(arr);
} }
useEffect(() => { useEffect(() => {
if (Object.keys(editData).length > 0) { if (Object.keys(editData).length > 0) {
setFiles(editData.enclosureUrls) setFiles(editData.enclosureUrls)
} }
}, [editData]) }, [editData])
console.log(files, 10086) return (
return ( <Form
<Form {...layout}
{...layout} className={styles.revise_style}
className={styles.revise_style} >
> <Form.Item label='附件' name='upload'>
<Form.Item label='附件' name='upload'> <div className={styles.upload_data}>
<div className={styles.upload_data}> {(files && files.length > 0) && files.map((v, index) => (
{(files && files.length > 0) && files.map((v, index) => ( <div key={index} className={styles.upload_item}>
<div key={index} className={styles.upload_item}> <div className={styles.upload_left}>
<div className={styles.upload_left}> <LinkOutlined />
<LinkOutlined /> <span>{v.name}</span>
<span>{v.name}</span> </div>
</div> <div className={styles.upload_right} onClick={() => removeFiles(index)}>
<div className={styles.upload_right} onClick={() => removeFiles(index)}> <DeleteOutlined />
<DeleteOutlined /> </div>
</div> </div>
</div> ))}
))} </div>
</div> <Upload
<Upload action="/api/file/file/upload"
action="/api/file/file/upload" data={{ fileType: UPLOAD_TYPE }}
data={{ fileType: UPLOAD_TYPE }} showUploadList={false}
showUploadList={false} accept='.doc,.docx,.pdf,.ppt,.pptx,.xls,.xlsx'
accept='.doc,.docx,.pdf,.ppt,.pptx,.xls,.xlsx' beforeUpload={beforeDocUpload}
beforeUpload={beforeDocUpload} onChange={handleChange}
onChange={handleChange} >
> <Button loading={loading} icon={<UploadOutlined />}>上传文件</Button>
<Button loading={loading} icon={<UploadOutlined />}>上传文件</Button> <div style={{ marginTop: '8px' }}>一次上传一个文件,每个附件大小不能超过 20M</div>
<div style={{ marginTop: '8px' }}>一次上传一个文件,每个附件大小不能超过 20M</div> </Upload>
</Upload> </Form.Item>
</Form.Item> </Form>
</Form> )
) }
}
export default Attached;
export default Attached;
\ No newline at end of file
import React, { useState, useEffect, ReactNode, useRef } from 'react'; import React, { useState, useEffect, ReactNode, useRef } from 'react';
import style from './index.less' import style from './index.less'
import { history } from 'umi'; import { history } from 'umi';
import { Button, Card, Tabs, Steps, Table } from 'antd'; import { Button, Tabs, Steps, Table, Popconfirm } from 'antd';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { StopOutlined, CheckSquareOutlined, LinkOutlined } from '@ant-design/icons' import { CheckSquareOutlined, LinkOutlined } from '@ant-design/icons'
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god'; import { StandardTable } from 'god';
import { quoteOrderInternalState, inquiryQuoteOuterState } from '../../common/tableStatusList';
import AuditModal from '../components/auditModel'; import AuditModal from '../components/auditModel';
import moment from 'moment'; import moment from 'moment';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
...@@ -374,6 +373,18 @@ const Details: React.FC<parmas> = (props) => { ...@@ -374,6 +373,18 @@ const Details: React.FC<parmas> = (props) => {
}) })
}, []) }, [])
const handleAudit = () => {
const value = {
id,
state: 1
}
PublicApi.postOrderProductQuotationtSubmit(value).then(res => {
if (res.code === 1000) {
history.goBack()
}
})
}
return ( return (
<PageHeaderWrapper <PageHeaderWrapper
className={style.header} className={style.header}
...@@ -392,12 +403,27 @@ const Details: React.FC<parmas> = (props) => { ...@@ -392,12 +403,27 @@ const Details: React.FC<parmas> = (props) => {
extra={ extra={
<> <>
{ {
((page_type === 2 || page_type === 3 || page_type === 6) && show) && ((page_type === 2 || page_type === 3) && show) &&
<Button type='primary' className={style['saveBtn']} onClick={() => setvisible(true)}> <Button type='primary' className={style['saveBtn']} onClick={() => setvisible(true)}>
<CheckSquareOutlined />单据审核 <CheckSquareOutlined />单据审核
</Button> </Button>
} }
{ {
(page_type === 6 && show) &&
<Popconfirm
destroyTooltipOnHide
title="确定提交单据审核吗?"
okText="是"
cancelText="否"
onConfirm={handleAudit}
>
<Button type='primary' className={style['saveBtn']}>
<CheckSquareOutlined />单据审核
</Button>
</Popconfirm>
}
{
(page_type === 1 && show) && (page_type === 1 && show) &&
<Button className={style['saveBtn']} onClick={() => setvisible(true)}> <Button className={style['saveBtn']} onClick={() => setvisible(true)}>
<CheckSquareOutlined />提交 <CheckSquareOutlined />提交
......
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