Commit 07dd6b03 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:

parent 481720ea
// @统一处理 业务表格内不嵌套NiceForm组件的高级筛选 间距异常问题
// .god-schema-form {
// & > .ant-form-item {
// margin-bottom: 0 !important;
// }
// & > .ant-row-end {
// margin-top: 24px !important;
// }
// }
.god-schema-form {
& > .ant-form-item {
margin-bottom: 0 !important;
}
& > .ant-row-end {
margin-top: 24px !important;
}
}
.adjustFormItem {
......
......@@ -10,20 +10,10 @@ const OrderPreview: React.FC = () => {
const { formContext, detailList } = useBillDetail({type: 'requestBill'})
const anchorTitleList = [
// { title: '流转进度', id: 'transferProcess', componentName: "TransferProcess" },
// { title: '基本信息', id: 'baseicInfo', type: "basicInfo" },
// { title: '招标物料', id: 'bidMaterial', componentName: "BidMaterial" },
// { title: '招标要求', id: 'bidNeed', type: "bidNeed" },
// { title: '报名要求', id: 'registerNeed', type: "registerNeed" },
// { title: '报名信息', id: 'registerInfoList', componentName: "RegisterInfoList", type: "registerList" },
// { title: '资格预审要求', id: 'checkNeed', type: "checkNeed" },
// { title: '资格预审信息', id: 'preCheckInfoList', componentName: "RegisterInfoList", type: "preCheckList" },
// { title: '评标要求', id: 'remarkNeed', type: "remarkNeed" },
// { title: '评标报告', id: 'remarkBidReport', componentName: "RemarkBidReport" },
// { title: '其他要求', id: 'otherNeed', type: "otherNeed" },
// { title: '招标方式', id: 'bidWay', componentName: "BidMethod" },
// { title: '招标结果', id: 'bidConfirm', componentName: "BidConfirm" },
// { title: '流转记录', id: 'transferRecord', componentName: "BidTransformRecord" },
{ title: '流转进度', id: 'transferProcess', componentName: "TransferProcess" },
{ title: '基本信息', id: 'baseicInfo', type: "basicInfo" },
{ title: '招标物料', id: 'billMaterial', componentName: "BillMaterial" },
{ title: '流转记录', id: 'transferRecord', componentName: "TransformRecord" },
]
......
import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'
import React, { ReactNode, useEffect, useRef, useState } from 'react'
import { Row, Col, Skeleton, Anchor } from 'antd'
import { history } from 'umi'
import { ArrowLeftOutlined, BugTwoTone } from '@ant-design/icons'
import { ArrowLeftOutlined } from '@ant-design/icons'
import style from './index.less'
const { Link } = Anchor;
......@@ -79,7 +79,7 @@ const BillDetailHeader: React.FC<BillDetailHeaderProps> = ({
<ArrowLeftOutlined onClick={() => backLink ? history.push(backLink) : history.goBack()} />
</Col>
<Col>
<div className={style.titleAvatorText}>{formContext.data.projectName || formContext.data.inviteTender.projectName}&nbsp;|&nbsp;{formContext.data.code || formContext.data.inviteTender.code}</div>
<div className={style.titleAvatorText}>{formContext.data.orderNo}</div>
</Col>
</Row>
<Row>
......
import React, { useEffect } from 'react'
import { findLastIndexFlowState } from '@/utils'
import style from './index.less'
// import TransferProcess from '../transferProcess'
// import DescriptionsInfo from '../descriptionsInfo'
// import BidMaterial from '../bidMaterial'
// import BidMethod from '../bidMethod'
// import BidTransformRecord from '../transferRecord'
// import BidParticulars from '../bidParticulars'
// import RemarkBidReport from '../remarkBidReport'
// import ParticipateInfo from '../participateInfo'
// import BidConfirm from '../bidConfirm'
// import MemberWinInfo from '../memberWinInfo'
// import RegisterInfoList from '../registerInfoList'
import DescriptionsInfo from '../descriptionsInfo'
import BillMaterial from '../billMaterial'
import TransferProcess from '../transferProcess'
import TransformRecord from '../transferRecord'
export interface BillDetailSectionProps {
formContext: any,
type: 'requestBill'
......@@ -24,42 +16,17 @@ const BillDetailSection:React.FC<BillDetailSectionProps> = ({
anchorList = [],
}) => {
useEffect(() => {
// 获取各个子div距父级的高度
let floors = document.querySelectorAll(".anchorContent>div")
let tempArr = []
floors.forEach((floor: any, index: any) => {
tempArr.push(floor.offsetTop)
})
// 各内容div存入context
formContext.ctl.setOffsetTopList(tempArr)
}, [])
// // 名称与组件映射
// const NameMapComponent = {
// // 流转进度组件
// "TransferProcess": TransferProcess,
// // 信息 基本信息组件
// "DescriptionsInfo": DescriptionsInfo,
// // 物料组件
// "BidMaterial": BidMaterial,
// // 招标方式组件
// "BidMethod": BidMethod,
// // 流转记录组件
// "BidTransformRecord": BidTransformRecord,
// // 中标明细组件
// "BidParticulars": BidParticulars,
// // 评标报告
// "RemarkBidReport": RemarkBidReport,
// // 会员参标信息
// "ParticipateInfo": ParticipateInfo,
// // 招标定标
// "BidConfirm": BidConfirm,
// // 会员中标信息
// "MemberWinInfo": MemberWinInfo,
// // 报名信息列表
// "RegisterInfoList": RegisterInfoList,
// }
// 名称与组件映射
const NameMapComponent = {
// 流转进度组件
"TransferProcess": TransferProcess,
// 信息 基本信息组件
"DescriptionsInfo": DescriptionsInfo,
// 请购组件
"BillMaterial": BillMaterial,
// 流转记录组件
"TransformRecord": TransformRecord,
}
const RenderDetailSection = ({ componentList }) => {
if(componentList && componentList.length > 0) {
......@@ -73,63 +40,42 @@ const BillDetailSection:React.FC<BillDetailSectionProps> = ({
const RenderCertainContent = ({ title, type = null, componentName = null }) => {
let RcDom: any = null;
// switch(componentName) {
// //@todo 需另外调用接口获取数据
// case 'TransferProcess':
// RcDom = (<TransferProcess
// cardTitle={title}
// customTitleKey='name'
// customKey='id'
// outerVerifyCurrent={findLastIndexFlowState(formContext.externalWorkflowFlowRecordLogResponses)}
// innerVerifyCurrent={findLastIndexFlowState(formContext.interiorWorkflowFlowRecordLogResponses)}
// outerVerifySteps={
// formContext.externalWorkflowFlowRecordLogResponses ?
// formContext.externalWorkflowFlowRecordLogResponses.map(item => ({
// ...item,
// status: item.isActive ? 'finish' : 'wait',
// })) :
// []
// }
// innerVerifySteps={
// formContext.interiorWorkflowFlowRecordLogResponses ?
// formContext.interiorWorkflowFlowRecordLogResponses.map(item => ({
// ...item,
// status: item.isActive ? 'finish' : 'wait',
// })) :
// []
// }
// ></TransferProcess>)
// break;
// case "BidMaterial":
// RcDom = (<BidMaterial cardTitle={title} />)
// break;
// case "BidMethod":
// RcDom = (<BidMethod cardTitle={title} />)
// break;
// case "BidTransformRecord":
// RcDom = (<BidTransformRecord cardTitle={title} />)
// break;
// case "BidParticulars":
// RcDom = (<BidParticulars cardTitle={title} />)
// break;
// case "RemarkBidReport":
// RcDom = (<RemarkBidReport cardTitle={title} />)
// break;
// case "ParticipateInfo":
// RcDom = (<ParticipateInfo cardTitle={title} />)
// break;
// case "BidConfirm":
// RcDom = (<BidConfirm cardTitle={title} />)
// break;
// case "MemberWinInfo":
// RcDom = (<MemberWinInfo cardTitle={title} />)
// break;
// case "RegisterInfoList":
// RcDom = (<RegisterInfoList cardTitle={title} type={type} />)
// break;
// default:
// RcDom = (<DescriptionsInfo cardTitle={title} type={type} />)
// }
switch(componentName) {
//@todo 需另外调用接口获取数据
case 'TransferProcess':
RcDom = (<TransferProcess
cardTitle={title}
customTitleKey='name'
customKey='id'
outerVerifyCurrent={findLastIndexFlowState(formContext.externalWorkflowFlowRecordLogResponses)}
innerVerifyCurrent={findLastIndexFlowState(formContext.interiorWorkflowFlowRecordLogResponses)}
outerVerifySteps={
formContext.externalWorkflowFlowRecordLogResponses ?
formContext.externalWorkflowFlowRecordLogResponses.map(item => ({
...item,
status: item.isActive ? 'finish' : 'wait',
})) :
[]
}
innerVerifySteps={
formContext.interiorWorkflowFlowRecordLogResponses ?
formContext.interiorWorkflowFlowRecordLogResponses.map(item => ({
...item,
status: item.isActive ? 'finish' : 'wait',
})) :
[]
}
></TransferProcess>)
break;
case "BiillMaterial":
RcDom = (<BillMaterial cardTitle={title} />)
break;
case "TransformRecord":
RcDom = (<TransformRecord cardTitle={title} />)
break;
default:
RcDom = (<DescriptionsInfo cardTitle={title} type={type} />)
}
return RcDom;
}
......
......@@ -4,10 +4,8 @@ import MellowCard from '@/components/MellowCard'
import { BidDetailContext } from '@/pages/procurement/_public/bid/context';
import { QuestionCircleOutlined } from '@ant-design/icons';
import style from './index.less'
import BASE_CONFIG from '../../../../../config/base.config.json'
import { CALLFORBID_TYPE, INVITE_BID } from '@/constants/procurement';
import { CALLFORBID_TYPE } from '@/constants/procurement';
import { ENTERPRISE_CENTER_URL } from '@/constants'
const shopInfo = BASE_CONFIG.web.shopInfo
/**
* 请购单 请购物料
......@@ -83,25 +81,7 @@ const BidMethod: React.FC<BidMethodProps> = ({cardTitle}) => {
<Col><p>{CALLFORBID_TYPE[data.inviteTenderType]}</p></Col>
</Row>
</div>
{
data.inviteTenderType === INVITE_BID ?
<Table dataSource={data.memberList} columns={columns} pagination={{size: "small"}} />
:
<div className={style['card-list']}>
<Row>
<Col span={2}><p className={style['card-list_title']}>发布商城</p></Col>
<Col>
<p>
{
data.inviteTenderShopList.map(item => {
return shopInfo.find(_item => _item.type === item.type && _item.environment === item.environment)['name']
}).join(' / ')
}
</p>
</Col>
</Row>
</div>
}
</MellowCard>)
}
......
......@@ -3,13 +3,11 @@ import { Table, Radio } from 'antd'
import { formatTimeString } from '@/utils'
import { BidDetailContext } from '@/pages/procurement/_public/bid/context';
import MellowCard from '@/components/MellowCard'
import CustomTag from '../customTag';
import { TransferEnum } from '../transferProcess';
import style from './index.less'
import { BidInOpeartTexts, BidOutOpeartTexts } from '@/constants/procurement';
/**
* 招标流转记录
* 请购订单流转记录
*/
export interface BidTransformRecordProps {
......@@ -42,7 +40,6 @@ const BidTransformRecord:React.FC<BidTransformRecordProps> = ({cardTitle}) => {
dataIndex: 'statusValue',
align: 'center',
key: 'statusValue',
render: (text, r) => <CustomTag text={text} color={r.statusColor} />
},
{
title: '操作',
......@@ -95,7 +92,6 @@ const BidTransformRecord:React.FC<BidTransformRecordProps> = ({cardTitle}) => {
dataIndex: 'statusValue',
align: 'center',
key: 'statusValue',
render: (text, r) => <CustomTag text={text} color={r.statusColor} />
},
{
title: '操作',
......
......@@ -110,44 +110,28 @@ export const tableListSchema: any = (align?: String, colStyle?: Object) => {
return {
type: 'object',
properties: {
mageLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
topLayout: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
},
properties: {
orderNo: {
type: 'string',
"x-component": 'Search',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入请购单号',
placeholder: '请输入订单编号',
align: 'flex-end',
},
}
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
},
inline: true,
colStyle: {
marginLeft: 20,
marginLeft: 20
},
},
properties: {
"digest": {
type: 'string',
'x-component-props': {
placeholder: '请输入请购单摘要',
placeholder: '请输入订单摘要',
}
},
"memberName": {
......@@ -156,21 +140,8 @@ export const tableListSchema: any = (align?: String, colStyle?: Object) => {
placeholder: '请输入供应会员名称'
}
},
"department": {
type: 'string',
"x-component-props": {
placeholder: '请输入请购部门'
}
},
"purpose": {
type: 'string',
"x-component-props": {
placeholder: '请输入请购用途'
}
},
"[startDate,endDate]": {
type: 'daterange',
// "x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间','结束时间'],
},
......@@ -181,7 +152,7 @@ export const tableListSchema: any = (align?: String, colStyle?: Object) => {
children: '查询',
},
},
},}}
},
},
}
}
......
......@@ -91,7 +91,7 @@ const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
temp.name = v.name;
temp.type = v.type;
temp.category = v.customerCategory.name;
temp.brand = v.brand.name;
temp.brand = v?.brand?.name || null;
temp.unit = v.unitName;
return temp
})
......@@ -108,8 +108,8 @@ const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
const handleConfirm = async () => {
console.log(rowSelectionCtl, 'rowSelectionCtl')
const materialData = schemaAction.getFieldValue('materials')
schemaAction.setFieldValue('materials', addMaterialProcessField(rowSelectionCtl.selectRow, materialData))
const materialData = schemaAction.getFieldValue('products')
schemaAction.setFieldValue('products', addMaterialProcessField(rowSelectionCtl.selectRow, materialData))
confirmModal && confirmModal()
setVisible(false)
}
......
......@@ -37,13 +37,6 @@ const MemberModalTable:React.FC<MemberModalTableProps> = (props) => {
}
confirmModal && confirmModal()
setVisible(false)
// 清空之前可能存在的商品支付信息数据
schemaAction.setFieldValue('materials', [])
schemaAction.setFieldValue('payments', [])
if(props?.productRef) {
props.productRef.current.rowSelectionCtl.setSelectRow([])
props.productRef.current.rowSelectionCtl.setSelectedRowKeys([])
}
}
return (
<ModalTable
......
import { formatTimeString } from '@/utils'
/** 修改合同下单 初始值转换 */
/** 修改请购单 初始值转换 */
export const procurmentRenderInit = (initValue: any) => {
return {
...initValue.requirement.detail,
vendorMemberId: initValue.vendorMemberId,
vendorMemberName: initValue.vendorMemberName,
vendorRoleId: initValue.vendorRoleId,
product: initValue.product,
deliveryAddresId: initValue.consignee.consigneeId,
hasInvoice: initValue.hasInvoice,
orderId: initValue.orderId,
orderKind: initValue.orderKind,
orderMode: initValue.orderMode,
orderModeName: initValue.orderModeName,
type: initValue.orderTypeName,
digest: initValue.digest,
deliverDate: initValue.consignee.deliverDate,
theInvoiceId: initValue.invoice?.invoiceId || null,
hasContract: initValue.hasContract,
contractNo: initValue.contract.contractNo,
contract: {...initValue.contract},
requisitionNo: initValue.requisitionNo,
innerStatusName: initValue.innerStatusName,
createTime: initValue.createTime,
// 预留字段
shopId: initValue.shopId,
requisitionId: initValue.requisitionId,
}
}
/** 修改采购合同下单 回显商品字段转换 */
/** 修改请购单 回显商品字段转换 */
export const procurementRenderField = (data) => {
const _orderProductRequests = data.product.products
return _orderProductRequests.map(item => {
return {
...item,
relevanceProductId: item.quotedSkuId,
relevanceProductName: item.quotedName,
relevanceProductBrand: item.quotedBrand,
relevanceProductCategory: item.quotedCategory,
relevanceProductSpec: item.quotedSpec,
logistics: item.deliverType,
id: item.productId,
code: item.productNo,
type: item.spec,
......@@ -54,13 +40,7 @@ export const procurementProcessField = (value) => {
...item,
productId: item.id,
productNo: item.code,
// 关联商品信息
// quotedProductId: item.relevanceProductId,
quotedSkuId: item.relevanceProductId,
quotedName: item.relevanceProductName,
quotedSpec: item.relevanceProductType,
quotedCategory: item.relevanceProductCategory,
quotedBrand: item.relevanceProductBrand,
spec: item.type,
}
})
return value
......
......@@ -15,7 +15,7 @@ export const useEditHideField = () => {
}
export const useMaterialTableChangeForAmount = (ctx: ISchemaFormActions | ISchemaFormAsyncActions, update) => {
FormEffectHooks.onFieldValueChange$('materials').subscribe(state => {
FormEffectHooks.onFieldValueChange$('products').subscribe(state => {
// 强制渲染一次, 用于触发金额总数
update()
})
......
......@@ -35,18 +35,12 @@ const RowStyle = styled(props => <Row style={{marginTop: 12}} justify='end' {...
`
// 总计金额联动框
export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
const { form } = useFormSpy({ selector: [['onFieldValueChange', 'materials']], reducer: v => v })
const data = form.getFieldValue('materials')
export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', () => {
const { form } = useFormSpy({ selector: [['onFieldValueChange', 'products']], reducer: v => v })
const data = form.getFieldValue('products')
const sum = data.reduce((prev, next) => (prev*1000 + (next.amount || 0)*1000)/1000, 0)
const total = data.reduce((prev, next) => (prev*1000 + (next.quantity || 0)*1000)/1000, 0)
// useEffect(() => {
// if (sum + freePrice) {
// form.notify('sumPrice', sum + freePrice)
// }
// }, [sum, freePrice])
return <RowStyle>
<Col span={2}>
<div>数量合计</div>
......@@ -59,7 +53,6 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
</RowStyle>
})
/** 采购请购单 新增 */
const IncreaseRequisition:React.FC<{}> = () => {
const departmentRef = useRef<any>({}) // 选部门
......@@ -76,13 +69,12 @@ const IncreaseRequisition:React.FC<{}> = () => {
useEffect(() => {
if (id) {
setFormLoading(true)
PublicApi.getOrderBuyerCreateDetail({ orderId: id }).then(res => {
PublicApi.getPurchaseRequisitionDetail({ id }).then(res => {
const { data } = res
const _orderProductRequests = procurementRenderField(data)
setInitFormValue(() => procurmentRenderInit(data))
setTimeout(() => {
addSchemaAction.setFieldValue('materials', _orderProductRequests)
addSchemaAction.setFieldValue('contract', {...data.contract})
addSchemaAction.setFieldValue('products', _orderProductRequests)
}, 1000)
setFormLoading(false)
})
......@@ -98,7 +90,7 @@ const IncreaseRequisition:React.FC<{}> = () => {
console.log(value)
// 校验采购数量
const judgementByCount = params.materials?.length && params.materials.map(item => {
const judgementByCount = params.products?.length && params.products.map(item => {
if(item.quantity){
return true
} else {
......@@ -108,42 +100,18 @@ const IncreaseRequisition:React.FC<{}> = () => {
if(!judgementByCount || judgementByCount.includes(false)){
throw new Error('请填写商品采购数量')
}
// 使用发票即校验发票id
if(params.hasInvoice && !params.theInvoiceId) {
throw new Error('请新增或选择需要使用的发票')
}
setBtnLoading(true)
/** 字段转换 */
// 合同下单 取供应商默认的发货地址
const { data: deliveryAddress} = await PublicApi.getLogisticsSelectListMemberShipperAddress({
memberId: params.vendorMemberId,
roleId: params.vendorRoleId
})
params.materials = params.materials.map(item => {
const address = deliveryAddress[0]
return {
...item,
spec: item.type,
quotedSpec: item.relevanceProductType,
deliveryType: item.logistics,
addressId: address?.id || null,
address: address?.fullAddress || null,
receiver: address?.shipperName || null,
phone: address?.phone || null,
}
})
const _params = procurementProcessField(params)
console.log(_params)
if(id) {
fnResult = await PublicApi.postOrderBuyerCreateSrmUpdate({..._params, orderId: id})
} else {
fnResult = await PublicApi.postOrderBuyerCreateSrm(_params)
fnResult = await PublicApi.postPurchaseRequisitionCreate(_params)
}
if (fnResult.code === 1000) {
setTimeout(() => {
history.push("/memberCenter/tranactionAbility/purchaseOrder/readyAddSrmOrder")
history.push("/memberCenter/procurementAbility/purchaseRequisition/readyAddBill")
}, 1000)
} else {
setBtnLoading(false)
......
import React, { useRef, useState } from 'react'
import { useRef, useState } from 'react'
import { ISchemaFormActions, ISchemaFormAsyncActions } from '@formily/antd';
import { Button } from 'antd';
import { materialInfoColumns } from '../constant';
......@@ -7,16 +7,6 @@ import { useModalTable } from './useModalTable';
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus';
// 对象按key排序(运用于商城传过来的阶梯价格排序)
export const sortByKey = (params) => {
let keys = Object.keys(params).sort((x,y)=> parseInt(x) - parseInt(y));
let newParams = {};
keys.forEach((key) => {
newParams[key] = params[key];
});
return newParams;
}
export const getUnitPriceTotal = (record) => {
const purchaseCount = Number(record['quantity']) || 0
return Number(((record.price || 0) * purchaseCount).toFixed(2))
......@@ -30,7 +20,7 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
const { visible, setVisible, rowSelection, rowSelectionCtl } = useModalTable({type: 'checkbox'})
const handleDelete = (record) => {
const newData = [...ctx.getFieldValue('materials')]
const newData = [...ctx.getFieldValue('products')]
// 删除formvalue
const colIndex = newData.findIndex(v => v.id === record.id)
newData.splice(colIndex, 1)
......@@ -38,7 +28,7 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
// 删除选中的项
rowSelectionCtl.setSelectRow(newData)
rowSelectionCtl.setSelectedRowKeys(newData.map(v => v.id))
ctx.setFieldValue('materials', newData)
ctx.setFieldValue('products', newData)
}
......@@ -59,10 +49,10 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
return materialInfoColumns
})
const handleShowMaterial = () => {
const materials = ctx.getFieldValue('materials')
const products = ctx.getFieldValue('products')
materialRef.current.setVisible(true)
if(materials && materials.length) {
materialRef.current.rowSelectionCtl.setSelectedRowKeys(() => materials.map(item => item.id))
if(products && products.length) {
materialRef.current.rowSelectionCtl.setSelectedRowKeys(() => products.map(item => item.id))
}
}
......@@ -76,7 +66,7 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
const handleSave = row => {
return new Promise((resolve, reject) => {
const newData = [...ctx.getFieldValue('materials')];
const newData = [...ctx.getFieldValue('products')];
const index = newData.findIndex(item => row.id === item.id);
const item = newData[index];
// 算单行价格
......@@ -85,7 +75,7 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
...item,
...row,
});
ctx.setFieldValue('materials', newData)
ctx.setFieldValue('products', newData)
resolve({item, newData})
})
};
......
......@@ -20,7 +20,7 @@ const basicInfo: ISchema = {
wrapperCol: 10
},
properties: {
orderNo: {
requisitionNo: {
type: 'string',
title: '请购单号',
"x-component": 'text',
......@@ -40,14 +40,14 @@ const basicInfo: ISchema = {
}
]
},
deliverDate: {
deliverTime: {
type: 'string',
"x-component": 'date',
title: '预交日期',
required: true,
"x-component-props": {
showTime: true,
format: 'YYYY-MM-DD HH:mm',
// showTime: true,
format: 'YYYY-MM-DD',
disabledDate: current => {
return current && current < moment().startOf('day')
},
......@@ -103,7 +103,7 @@ const basicInfo: ISchema = {
title: '单据时间',
visible: false
},
interiorState: {
interiorStateName: {
type: 'string',
title: '内部状态',
visible: false
......@@ -123,7 +123,7 @@ export const material: ISchema = {
tab: '订单物料'
},
properties: {
materials: {
products: {
type: 'array',
"x-component": 'MultTable',
"x-component-props": {
......
// @统一处理 业务表格内不嵌套NiceForm组件的高级筛选 间距异常问题
.god-schema-form {
& > .ant-form-item {
margin-bottom: 0 !important;
}
& > .ant-row-end {
margin-top: 24px !important;
}
}
import React from 'react'
import { history } from 'umi'
import { Card, Button, Space } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { PlusCircleOutlined } from '@ant-design/icons'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import '../index.less'
import { tableListSchema } from '../../constant'
import { useSelfTable } from '../model/useRequisitionOrder'
// 请购单转订单 详情
export interface RequesitionOrderDetailProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderBuyerCreatePage(params)
return data
}
const RequesitionOrderDetail:React.FC<RequesitionOrderDetailProps> = () => {
const { columns, ref } = useSelfTable()
import React from 'react';
import PreLoading from '@/components/PreLoading';
import { useBillDetail } from '@/pages/transaction/_public/bill/effects/useBillDetail';
import { BillDetailContext } from '@/pages/transaction/_public/bill/effects/context';
import BillDetailHeader from '../../components/billDetailHeader';
import BillDetailWrapper from '../../components/billDetailWrapper';
import BillDetailSection from '../../components/billDetailSection';
const RequisitionOrderDetail: React.FC = () => {
const { formContext, detailList } = useBillDetail({type: 'requestBill'})
const anchorTitleList = [
{ title: '基本信息', id: 'baseicInfo', type: "basicInfo" },
{ title: '请购物料', id: 'billMaterial', componentName: "BillMaterial" },
]
return (
<div>
<BillDetailContext.Provider value={formContext}>
<BillDetailHeader
formContext={formContext}
anchorList={anchorTitleList}
/>
<BillDetailWrapper>
<PreLoading loading={!formContext.data} active paragraph={{ rows: 6 }}>
<BillDetailSection formContext={formContext} anchorList={anchorTitleList} type="requestBill" />
</PreLoading>
</BillDetailWrapper>
const clickAdd = () => {
history.push(`/memberCenter/procurementAbility/purchaseRequisition/readyAddBill/add`)
}
</BillDetailContext.Provider>
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
columns={columns}
currentRef={ref}
rowKey="orderId"
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema(),
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
Submit
}
},
layouts: {
order: 2,
span: 16
}
}}
formilyChilds={{
children: <Space>
<Button
icon={<PlusCircleOutlined/>}
type='primary'
onClick={clickAdd}
>
新建
</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
</div>
)
}
RequesitionOrderDetail.defaultProps = {}
export default RequesitionOrderDetail
export default RequisitionOrderDetail;
import React from 'react'
import { history } from 'umi'
import { Card, Button, Space } from 'antd'
import { Card } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { PlusCircleOutlined } from '@ant-design/icons'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
......@@ -25,10 +23,6 @@ const fetchTableData = async (params) => {
const RequisitionOrder:React.FC<RequisitionOrderProps> = () => {
const { columns, ref } = useSelfTable()
const clickAdd = () => {
history.push(`/memberCenter/procurementAbility/purchaseRequisition/readyAddBill/add`)
}
return <PageHeaderWrapper>
<Card>
<StandardTable
......@@ -58,21 +52,7 @@ const RequisitionOrder:React.FC<RequisitionOrderProps> = () => {
},
layouts: {
order: 2,
span: 16
}
}}
formilyChilds={{
children: <Space>
<Button
icon={<PlusCircleOutlined/>}
type='primary'
onClick={clickAdd}
>
新建
</Button>
</Space>,
layouts: {
span: 8
span: 24
}
}}
/>
......
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