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

Merge branch 'dev' into test

parents 1a03d339 7dadaf2f
...@@ -3,7 +3,7 @@ import {StandardTable} from 'god' ...@@ -3,7 +3,7 @@ import {StandardTable} from 'god'
import NestTable from '@/components/NestTable' import NestTable from '@/components/NestTable'
import { IStandardTableProps } from 'god/dist/src/standard-table' import { IStandardTableProps } from 'god/dist/src/standard-table'
import { Row, Col, Modal } from 'antd' import { Row, Col, Modal } from 'antd'
import { productModalSchema, productModalByMemberSchema, memberModalSchema, inquirySchema, demandSchema, enquirySchema, mergeOrderSchema, goodsModalSchema } from './schema' import { productModalSchema, productModalByMemberSchema, memberModalSchema, inquirySchema, demandSchema, enquirySchema, mergeOrderSchema, goodsModalSchema, demandNumberSchema } from './schema'
import Search from '../NiceForm/components/Search' import Search from '../NiceForm/components/Search'
import SearchSelect from '../NiceForm/components/SearchSelect' import SearchSelect from '../NiceForm/components/SearchSelect'
import Submit from '../NiceForm/components/Submit' import Submit from '../NiceForm/components/Submit'
...@@ -18,16 +18,17 @@ export interface ModalTableProps extends IStandardTableProps<any> { ...@@ -18,16 +18,17 @@ export interface ModalTableProps extends IStandardTableProps<any> {
cancel?(), cancel?(),
visible?: boolean, visible?: boolean,
resetModal?: object, resetModal?: object,
modalType?: 'productByDefault' | 'productByMember' | 'memberByDefault' | 'inquiryByDefault' | 'demandByDefault' | 'enquiryModel' | 'MergeOrderByDefault' | 'goodsModalSchema' | 'none' , modalType?: 'productByDefault' | 'productByMember' | 'memberByDefault' | 'inquiryByDefault' | 'demandByDefault' | 'enquiryModel' | 'MergeOrderByDefault' | 'goodsModalSchema' | 'demandNumberSchema' | 'none' ,
useNestTable?: boolean, // 是否使用嵌套表格 useNestTable?: boolean, // 是否使用嵌套表格
nestColumns?: any[], nestColumns?: any[],
nestTableProps?: any, nestTableProps?: any,
// fix: 新增参数, 为true时每次开启弹窗都会重新reload接口 // fix: 新增参数, 为true时每次开启弹窗都会重新reload接口
forceRender?: boolean forceRender?: boolean,
searchName?: string
} }
const ModalTable:React.FC<ModalTableProps> = (props) => { const ModalTable:React.FC<ModalTableProps> = (props) => {
const { width = 704, modalTitle, confirm, cancel, visible, currentRef, resetModal, modalType = 'none', forceRender, useNestTable = false, nestColumns, nestTableProps, ...resetTable } = props const { width = 704, modalTitle, confirm, cancel, visible, currentRef, resetModal, modalType = 'none', forceRender, useNestTable = false, nestColumns, nestTableProps,searchName , ...resetTable } = props
const selfRef = currentRef || useRef<any>({}) const selfRef = currentRef || useRef<any>({})
useEffect(() => { useEffect(() => {
if (visible && forceRender) { if (visible && forceRender) {
...@@ -72,6 +73,9 @@ const ModalTable:React.FC<ModalTableProps> = (props) => { ...@@ -72,6 +73,9 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
case 'goodsModalSchema': { case 'goodsModalSchema': {
return goodsModalSchema return goodsModalSchema
} }
case 'demandNumberSchema': {
return demandNumberSchema
}
case 'none': { case 'none': {
return {} return {}
} }
...@@ -111,7 +115,7 @@ const ModalTable:React.FC<ModalTableProps> = (props) => { ...@@ -111,7 +115,7 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
useStateFilterSearchLinkageEffect( useStateFilterSearchLinkageEffect(
$, $,
actions, actions,
'name', searchName ? searchName : 'name',
FORM_FILTER_PATH, FORM_FILTER_PATH,
); );
} }
......
...@@ -467,3 +467,63 @@ export const mergeOrderSchema: ISchema = { ...@@ -467,3 +467,63 @@ export const mergeOrderSchema: ISchema = {
} }
} }
} }
// 需求报价,选择对应需求单号
export const demandNumberSchema: ISchema = {
type: 'object',
properties: {
requisitionFormNo: {
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: {
demandMembers: {
type: 'string',
"x-component-props": {
placeholder: '需求会员',
}
},
details: {
type: 'string',
"x-component-props": {
placeholder: '需求单摘要',
}
},
"[startVoucherTime,endVoucherTime]": {
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
...@@ -304,7 +304,7 @@ const detailInfo: React.FC<{}> = () => { ...@@ -304,7 +304,7 @@ const detailInfo: React.FC<{}> = () => {
</> </>
} }
extra={ extra={
isextraOption && dataInfo.status === 2 &&
<> <>
<Button onClick={() => setvisible(true)}> <Button onClick={() => setvisible(true)}>
<StopOutlined /> <StopOutlined />
......
...@@ -320,6 +320,7 @@ const Deatail: React.FC<{}> = () => { ...@@ -320,6 +320,7 @@ const Deatail: React.FC<{}> = () => {
pageSize: '100000' pageSize: '100000'
}).then(res => { }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
console.log(res.data, 100086)
let v = res.data.data.filter(v => v.id == query.orderDeliveryDetailsId).map(v => v) let v = res.data.data.filter(v => v.id == query.orderDeliveryDetailsId).map(v => v)
let { memberName, fullAddress, deliveryAddresId } = v[0] || {} let { memberName, fullAddress, deliveryAddresId } = v[0] || {}
actions.setFieldValue('receiverName', memberName) actions.setFieldValue('receiverName', memberName)
......
...@@ -31,7 +31,7 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => { ...@@ -31,7 +31,7 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
commodityList.map((item, index) => ( commodityList.map((item, index) => (
<div key={item.id} className={cx(styles.purchase_list_item, styles.row)}> <div key={item.id} className={cx(styles.purchase_list_item, styles.row)}>
<div className={styles.purchase_list_item_title}> <div className={styles.purchase_list_item_title}>
<Link to={`/memberCenter/tranactionAbility/enquirySubmit/viewEnquiryDetail?id=${item.id}`}>{item.details}</Link> <Link to={`/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/rfq/preview?id=${item.id}`}>{item.details}</Link>
</div> </div>
<div className={styles.purchase_list_item_info_box}> <div className={styles.purchase_list_item_info_box}>
<div className={styles.purchase_list_item_info_line}> <div className={styles.purchase_list_item_info_line}>
...@@ -61,7 +61,7 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => { ...@@ -61,7 +61,7 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
<span className={styles.credit_text}>{item.memberCreditDcore || 0}</span> <span className={styles.credit_text}>{item.memberCreditDcore || 0}</span>
</div> </div>
<div className={styles.quoted_price_btn}> <div className={styles.quoted_price_btn}>
<Link to={`/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/add?id=${item.id}`}>立即报价</Link> <Link to={`/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/quote?id=${item.id}`}>立即报价</Link>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -17,7 +17,7 @@ export interface InquiryModalTableProps extends ModalTableProps { ...@@ -17,7 +17,7 @@ export interface InquiryModalTableProps extends ModalTableProps {
* @return {type} * @return {type}
*/ */
const fetchEqData = async (params: any) => { const fetchEqData = async (params: any) => {
const res = await PublicApi.getOrderQuotationRequisitionFormList({...params,externalState: 2}); const res = await PublicApi.getOrderQuotationRequisitionFormNo({...params,externalState: 2});
return res.data return res.data
} }
const formTime = (text) => { const formTime = (text) => {
...@@ -85,6 +85,7 @@ const InquiryModalTable:React.FC<InquiryModalTableProps> = (props) => { ...@@ -85,6 +85,7 @@ const InquiryModalTable:React.FC<InquiryModalTableProps> = (props) => {
props.confirmModal(item) props.confirmModal(item)
setVisible(false) setVisible(false)
} }
return ( return (
<ModalTable <ModalTable
modalTitle='选择需求单' modalTitle='选择需求单'
...@@ -94,7 +95,8 @@ const InquiryModalTable:React.FC<InquiryModalTableProps> = (props) => { ...@@ -94,7 +95,8 @@ const InquiryModalTable:React.FC<InquiryModalTableProps> = (props) => {
cancel={() => setVisible(false)} cancel={() => setVisible(false)}
fetchTableData={(params) => fetchEqData(params)} fetchTableData={(params) => fetchEqData(params)}
rowSelection={rowSelection} rowSelection={rowSelection}
modalType='inquiryByDefault' modalType='demandNumberSchema'
searchName='requisitionFormNo'
tableProps={{ tableProps={{
rowKey: 'id' rowKey: 'id'
}} }}
......
...@@ -570,7 +570,9 @@ const Detail: React.FC<{}> = () => { ...@@ -570,7 +570,9 @@ const Detail: React.FC<{}> = () => {
* @return {type} * @return {type}
*/ */
const pathname = history.location.pathname const pathname = history.location.pathname
if (pathname === "/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/add" && id) { const pathType = pathname.split('/');
const quote = pathType[pathType.length - 1];
if (quote === "quote" && id) {
PublicApi.getOrderQuotationRequisitionFormDetails({ id: id }).then(res => { PublicApi.getOrderQuotationRequisitionFormDetails({ id: id }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
let data = res.data let data = res.data
......
...@@ -152,7 +152,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => { ...@@ -152,7 +152,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
const { value } = e.target const { value } = e.target
goodsList.forEach(v => { goodsList.forEach(v => {
if (v.productId === id) { if (v.productId === id) {
v.purchaseQuantity = value v.purchaseCount = value
} }
}) })
getGoodsList(goodsList) // 返回给父级 getGoodsList(goodsList) // 返回给父级
......
...@@ -314,7 +314,7 @@ const Details: React.FC<parmas> = (props) => { ...@@ -314,7 +314,7 @@ const Details: React.FC<parmas> = (props) => {
extra={ extra={
<> <>
{ {
(action === true && (Number(page_type) === 2 || Number(page_type) === 3) && (data.interiorState === 2 || data.interiorState === 3)) && (action && (Number(page_type) === 2 || Number(page_type) === 3) && (data.interiorState === 2 || data.interiorState === 3)) &&
<> <>
<Button type='primary' className={style['saveBtn']} onClick={() => { setvisible(true) }}> <Button type='primary' className={style['saveBtn']} onClick={() => { setvisible(true) }}>
<CheckSquareOutlined />单据审核 <CheckSquareOutlined />单据审核
...@@ -322,7 +322,7 @@ const Details: React.FC<parmas> = (props) => { ...@@ -322,7 +322,7 @@ const Details: React.FC<parmas> = (props) => {
</> </>
} }
{ {
( action === true && Number(page_type) === 6 && data.interiorState === 1) && ( action && Number(page_type) === 6 && data.interiorState === 1) &&
<Button className={style['saveBtn']} onClick={() => setvisible(true)}> <Button className={style['saveBtn']} onClick={() => setvisible(true)}>
<CheckSquareOutlined />提交 <CheckSquareOutlined />提交
</Button> </Button>
......
...@@ -33,7 +33,7 @@ const AuditModal: React.FC<Params> = (props) => { ...@@ -33,7 +33,7 @@ const AuditModal: React.FC<Params> = (props) => {
const handletOk = (values: any) => { const handletOk = (values: any) => {
let value = { ...values } let value = { ...values }
value.id = props.id value.id = Number(props.id)
switch (props.type) { switch (props.type) {
case 1: case 1:
PublicApi.postOrderProductQuotationtToSubmit(value).then(res => { PublicApi.postOrderProductQuotationtToSubmit(value).then(res => {
...@@ -56,7 +56,7 @@ const AuditModal: React.FC<Params> = (props) => { ...@@ -56,7 +56,7 @@ const AuditModal: React.FC<Params> = (props) => {
} }
}) })
break; break;
case 4: case 6:
PublicApi.postOrderProductQuotationtSubmit(value).then(res => { PublicApi.postOrderProductQuotationtSubmit(value).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
props.onOK() props.onOK()
......
...@@ -38,7 +38,7 @@ const Details: React.FC<parmas> = (props) => { ...@@ -38,7 +38,7 @@ const Details: React.FC<parmas> = (props) => {
const { pathname } = history.location; const { pathname } = history.location;
const type = pathname.split('/')[pathname.split('/').length - 2]; const type = pathname.split('/')[pathname.split('/').length - 2];
const [view, setview] = useState<Number>(1); const [view, setview] = useState<Number>(1);
const [show, setshow] = useState<Boolean>(false)
// 模拟数据 // 模拟数据
const [data, setdata] = useState<any>([]); const [data, setdata] = useState<any>([]);
const format = (text) => { const format = (text) => {
...@@ -257,7 +257,8 @@ const Details: React.FC<parmas> = (props) => { ...@@ -257,7 +257,8 @@ const Details: React.FC<parmas> = (props) => {
} }
// 详情请求 // 详情请求
useEffect(() => { useEffect(() => {
if(type === 'rfq') { console.log(page_type, 10086)
if (type === 'rfq') {
// 代表的是查看询价 // 代表的是查看询价
setview(1) setview(1)
PublicApi.getOrderProductInquiryDetails({ id }).then(res => { PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
...@@ -265,7 +266,7 @@ const Details: React.FC<parmas> = (props) => { ...@@ -265,7 +266,7 @@ const Details: React.FC<parmas> = (props) => {
setdata(res.data) setdata(res.data)
} }
}) })
} else { } else if(type === 'quote') {
// 代表的是查看报价 // 代表的是查看报价
setview(2) setview(2)
PublicApi.getOrderProductQuotationDetails({ id }).then(res => { PublicApi.getOrderProductQuotationDetails({ id }).then(res => {
...@@ -273,6 +274,14 @@ const Details: React.FC<parmas> = (props) => { ...@@ -273,6 +274,14 @@ const Details: React.FC<parmas> = (props) => {
setdata(res.data) setdata(res.data)
} }
}) })
} else {
setshow(true)
setview(2)
PublicApi.getOrderProductQuotationDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
} }
}, []) }, [])
...@@ -347,18 +356,13 @@ const Details: React.FC<parmas> = (props) => { ...@@ -347,18 +356,13 @@ const Details: React.FC<parmas> = (props) => {
extra={ extra={
<> <>
{ {
(Number(page_type) === 4 && data.interiorState === 1) && ((page_type === 2 || page_type === 3 || page_type === 6) && show ) &&
<> <Button type='primary' className={style['saveBtn']} onClick={() => setvisible(true)}>
<Button> <CheckSquareOutlined />单据审核
<StopOutlined />审核不通过
</Button> </Button>
<Button className={style['saveBtn']}>
<CheckSquareOutlined />审核通过
</Button>
</>
} }
{ {
(Number(page_type) === 1 && data.externalState === 1 && data.interiorState === 3) && (page_type === 1 && show ) &&
<Button className={style['saveBtn']} onClick={() => setvisible(true)}> <Button className={style['saveBtn']} onClick={() => setvisible(true)}>
<CheckSquareOutlined />提交 <CheckSquareOutlined />提交
</Button> </Button>
...@@ -382,7 +386,7 @@ const Details: React.FC<parmas> = (props) => { ...@@ -382,7 +386,7 @@ const Details: React.FC<parmas> = (props) => {
{headerWrapperData && headerWrapperData.map(item => ( {headerWrapperData && headerWrapperData.map(item => (
<div key={item.name} className={style['headerMain-left-option']}> <div key={item.name} className={style['headerMain-left-option']}>
<div>{item.label}</div> <div>{item.label}</div>
<div>{analyticalFn(item.name,item.value)}</div> <div>{analyticalFn(item.name, item.value)}</div>
</div> </div>
))} ))}
</div> </div>
...@@ -549,5 +553,4 @@ const Details: React.FC<parmas> = (props) => { ...@@ -549,5 +553,4 @@ const Details: React.FC<parmas> = (props) => {
</PageHeaderWrapper > </PageHeaderWrapper >
) )
} }
export default Details export default Details
\ No newline at end of file
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