Commit 7f03b3be authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:

parent 38453233
......@@ -57,6 +57,14 @@ export const purchaseRequisitionRoute = [
name: 'firstApprovedBill',
component: '@/pages/transaction/purchaseRequisition/firstApprovedBill'
},
// 待审核请购单 一级查看
{
path: '/memberCenter/procurementAbility/purchaseRequisition/firstApprovedBill/preview',
name: 'firstApprovedBillPreview',
component: '@/pages/transaction/purchaseRequisition/billPreview',
hideInMenu: true,
noMargin: true,
},
// 待审核请购单 一级详情
{
path: '/memberCenter/procurementAbility/purchaseRequisition/firstApprovedBill/detail',
......@@ -71,6 +79,14 @@ export const purchaseRequisitionRoute = [
name: 'secondApprovedBill',
component: '@/pages/transaction/purchaseRequisition/secondApprovedBill'
},
// 待审核请购单 二级查看
{
path: '/memberCenter/procurementAbility/purchaseRequisition/secondApprovedBill/preview',
name: 'secondApprovedBillPreview',
component: '@/pages/transaction/purchaseRequisition/billPreview',
hideInMenu: true,
noMargin: true,
},
// 待审核请购单 二级详情
{
path: '/memberCenter/procurementAbility/purchaseRequisition/secondApprovedBill/detail',
......@@ -85,6 +101,14 @@ export const purchaseRequisitionRoute = [
name: 'readySubmitBill',
component: '@/pages/transaction/purchaseRequisition/readySubmitBill'
},
// 待提交请购单 查看
{
path: '/memberCenter/procurementAbility/purchaseRequisition/readySubmitBill/preview',
name: 'readySubmitBillPreview',
component: '@/pages/transaction/purchaseRequisition/billPreview',
hideInMenu: true,
noMargin: true,
},
// 待提交请购单 详情
{
path: '/memberCenter/procurementAbility/purchaseRequisition/readySubmitBill/detail',
......
......@@ -62,7 +62,6 @@ export const useBillDetail = (options: BillDetailHookProps) => {
{ title: '流转记录', id: 'transferRecord', componentName: "TransformRecord" },
]
// 需共享的状态
const formContext = {
data: formData,
......
......@@ -7,7 +7,7 @@ import { Button, Card, Row, Col, message } from 'antd'
import { createFormActions, registerVirtualBox, useFormSpy } from '@formily/antd'
import { SaveOutlined, LinkOutlined, PlusOutlined } from '@ant-design/icons'
import NiceForm from '@/components/NiceForm'
import { mergeAllSchemas } from './schema'
import { orderAddSchema } from './schema'
import { useModelTypeChange, useEditHideField, useOrderFormInitEffect, useProductTableChangeForPay } from './effects'
import { orderCombination, orderTypeLabelMap, procurementProcessField, procurementRenderField, procurmentRenderInit } from './constant'
import CirculationRecord from '../components/circulationRecord'
......@@ -23,8 +23,6 @@ import styles from './index.less'
import { useMaterialTable } from './model/useMaterialTable'
import ContractModalTable from './components/contractModalTable'
import MaterialModalTable from './components/materialModalTable'
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'
import { OrderModalType } from '@/constants/order'
import MemberModalTable from './components/memberModalTable'
export interface AddRequisitionOrderProps { }
......@@ -42,13 +40,6 @@ const RowStyle = styled(props => <Row style={{marginTop: 12}} justify='end' {...
const addSchemaAction = createFormActions()
// // 获取下单模式
// const fetchOrderMode = async () => {
// const { data } = await PublicApi.getOrderBuyerCreatePageItems()
// const { orderModes } = data
// return orderModes.filter(item => item.id !== OrderModalType.INQUIRY_QUOTATION_ORDER)
// }
// 总计金额联动框
export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
const { form } = useFormSpy({ selector: [['onFieldValueChange', 'products']], reducer: v => v })
......@@ -83,7 +74,7 @@ const AddRequisitionOrder:React.FC<AddRequisitionOrderProps> = (props) => {
const [btnLoading, setBtnLoading] = useState(false)
const update = useUpdate()
const { pageStatus, id, page_type = '0', modelType } = usePageStatus()
const [initFormSchema, setInitFormSchema] = useState<any>(() => ({...mergeAllSchemas[page_type]}))
const [initFormSchema, setInitFormSchema] = useState<any>(() => ({...orderAddSchema}))
const [initFormValue, setInitFormValue] = useState<any>(() => {
let resultState = {}
if (modelType) {
......
......@@ -293,41 +293,6 @@ const ortherInfo: ISchema = {
}
}
// 新增订单详情
export const orderDetailSchema: ISchema = {
type: 'object',
properties: {
NO_SUBMIT_TABS: {
type: 'object',
"x-component": 'tab',
properties: {
basicInfo,
submitInfo,
orderMaterial,
ortherInfo,
}
}
}
}
// 一级审核详情
export const auditOneSchema: ISchema = {
type: 'object',
properties: {
NO_SUBMIT_TABS: {
type: 'object',
"x-component": 'tab',
properties: {
basicInfo,
submitInfo,
orderMaterial,
ortherInfo,
}
}
}
}
// 新增时使用的schema
export const orderAddSchema: ISchema = {
type: 'object',
......@@ -344,37 +309,3 @@ export const orderAddSchema: ISchema = {
}
}
}
// 确认电子合同
export const orderElectronicSchema: ISchema = {
type: 'object',
properties: {
NO_SUBMIT_TABS: {
type: 'object',
"x-component": 'tab',
properties: {
basicInfo,
submitInfo,
orderMaterial,
ortherInfo,
}
}
}
}
// 根据传入的query参数 判断当前使用哪个schema
export const mergeAllSchemas = {
// 新增订单详情
"-1": orderDetailSchema,
0: orderAddSchema,
// 一级审核详情
1: auditOneSchema,
// 二级审核详情
2: auditOneSchema,
// 待提交订单详情
3: orderDetailSchema,
// 电子合同详情
4: orderElectronicSchema,
// 订单支付
5: orderDetailSchema
}
......@@ -16,7 +16,6 @@ const OrderPreview: React.FC = () => {
{ title: '流转记录', id: 'transferRecord', componentName: "TransformRecord" },
]
return (
<div>
<BillDetailContext.Provider value={formContext}>
......
......@@ -3,13 +3,14 @@ import { Row, Col, Skeleton, Anchor } from 'antd'
import { history } from 'umi'
import { ArrowLeftOutlined } from '@ant-design/icons'
import style from './index.less'
import { anchorItemProps } from '../billDetailSection'
const { Link } = Anchor;
export interface BillDetailHeaderProps {
extraRight?: ReactNode,
formContext?: any,
anchorList?: any,
anchorList?: anchorItemProps[],
backLink?: string,
contentRef?: any,
}
......
import React, { useEffect } from 'react'
import { findLastIndexFlowState } from '@/utils'
import React from 'react'
import style from './index.less'
import DescriptionsInfo from '../descriptionsInfo'
import BillMaterial from '../billMaterial'
import TransferProcess from '../transferProcess'
import TransformRecord from '../transferRecord'
import AuditProcess from '@/components/AuditProcess'
export interface anchorItemProps {
title: string,
id: string,
componentName?: string,
type?: string,
}
export interface BillDetailSectionProps {
formContext: any,
type: 'requestBill'
anchorList?: any,
anchorList?: anchorItemProps[],
}
const BillDetailSection:React.FC<BillDetailSectionProps> = ({
......
......@@ -77,8 +77,8 @@ const BidMaterial: React.FC<BidMaterialProps> = ({cardTitle}) => {
bordered={false}
fullHeight
>
<Table dataSource={data.product.products} columns={columns} pagination={{size: "small"}} />
<Row justify="end">
<Table dataSource={data.product.products} columns={columns} pagination={false} />
<Row justify="end" style={{marginTop: 24}}>
<Col span={2}>
<div>数量合计</div>
<div>{Number(data.product.productAmount).toFixed(2)}</div>
......
import React, { useContext } from 'react'
import { Row, Col } from 'antd'
import MellowCard from '@/components/MellowCard'
import { formatTimeString } from '@/utils'
import style from './index.less'
import { BillDetailContext } from '@/pages/transaction/_public/bill/effects/context';
......@@ -10,7 +9,9 @@ import { BillDetailContext } from '@/pages/transaction/_public/bill/effects/cont
*/
export interface BasicInfoProps {
/** title标题 */
/**
* title标题
*/
cardTitle?: string;
/** 显示信息类型
* 'basicInfo' 基本信息
......
......@@ -5,7 +5,6 @@
import React, { useEffect, useState } from 'react';
import {
Steps,
Tabs,
Radio
} from 'antd';
import MellowCard from '@/components/MellowCard';
......
......@@ -21,15 +21,6 @@ const BidTransformRecord:React.FC<BidTransformRecordProps> = ({cardTitle}) => {
const [transferRadio, setTransferRadio] = useState<TransferEnum>(TransferEnum.Outer)
// createTime: "2021-10-30 16:38:35"
// department: ""
// id: 6
// jobTitle: "超级管理员"
// operation: "新增订单"
// operator: "133"
// remark: ""
// statusName: "待提交审核"
const outReocrdCols: any[] = [
{
title: '流转顺序号',
......@@ -104,9 +95,9 @@ const BidTransformRecord:React.FC<BidTransformRecordProps> = ({cardTitle}) => {
},
{
title: '操作',
dataIndex: 'operationValue',
dataIndex: 'operation',
align: 'center',
key: 'operationValue',
key: 'operation',
},
{
title: '操作时间',
......
......@@ -201,7 +201,7 @@ export const baseOrderListColumns: any = () => {
align: 'center',
dataIndex: 'deliverTime',
key: 'deliverTime',
render: (text) => formatTimeString(text)
render: (text) => formatTimeString(text, 'YYYY-MM-DD')
},
{
title: '请购部门',
......
......@@ -12,7 +12,6 @@ import { useEditHideField, useMaterialTableChangeForAmount } from './effects'
import { procurementProcessField, procurementRenderField, procurmentRenderInit } from './constant'
import { useUpdate } from '@umijs/hooks'
import { PublicApi } from '@/services/api'
import { changeRouterTitleByStatus } from '../../_public/order/utils'
import { help } from '../../common'
import { useMaterialTable } from './model/useMaterialTable'
import MaterialModalTable from './components/materialModalTable'
......@@ -24,7 +23,6 @@ import FormDetailWrapper from '@/components/FormDetailWrapper'
import { FormDetailContext } from '@/formSchema/context'
import { useFormDetail } from '@/formSchema/effects/useFormDetail'
const addSchemaAction = createFormActions()
const RowStyle = styled(props => <Row style={{marginTop: 12}} justify='end' {...props}>
......@@ -147,7 +145,7 @@ const IncreaseRequisition:React.FC<{}> = () => {
formContext,
}
return (<div style={{}}>
return (<div>
{/* <PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回"/>}
......@@ -163,7 +161,7 @@ const IncreaseRequisition:React.FC<{}> = () => {
title={id ? '编辑请购单' : '新增请购单'}
schema={increaseSchema}
extraRight={[
<Button key="1" onClick={() => addSchemaAction.submit()} loading={formLoading} type="primary" icon={<SaveOutlined />}>
<Button key="1" onClick={() => addSchemaAction.submit()} loading={btnLoading} type="primary" icon={<SaveOutlined />}>
保存
</Button>,
]}
......
......@@ -7,7 +7,7 @@ import BillDetailWrapper from '../../components/billDetailWrapper';
import BillDetailSection from '../../components/billDetailSection';
const RequisitionOrderDetail: React.FC = () => {
const { formContext, detailList } = useBillDetail({type: 'requestBill'})
const { formContext } = useBillDetail({type: 'requestBill'})
const anchorTitleList = [
{ title: '基本信息', id: 'baseicInfo', type: "basicInfo" },
......
......@@ -11,12 +11,12 @@ import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePicke
import '../index.less'
import { tableListSchema } from '../constant'
// 请购单转订单
// 待请购单转采购订单
export interface RequisitionOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderBuyerCreatePage(params)
const { data } = await PublicApi.getPurchaseRequisitionTransferPurchasePage(params)
return data
}
......@@ -29,7 +29,7 @@ const RequisitionOrder:React.FC<RequisitionOrderProps> = () => {
fetchTableData={params => fetchTableData(params)}
columns={columns}
currentRef={ref}
rowKey="orderId"
rowKey="id"
formilyLayouts={{
justify: 'space-between'
}}
......@@ -41,7 +41,7 @@ const RequisitionOrder:React.FC<RequisitionOrderProps> = () => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
'requisitionNo',
FORM_FILTER_PATH,
);
},
......
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