Commit 31e182bd authored by 卢均锐's avatar 卢均锐

Merge branch 'v2' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into v2

* 'v2' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform: fix: 对接销售待分配订单 feat: 完善布局适配 fix: 对接采购待分配订单
parents 5eb3ced8 efdaf2b9
.upload {
flex: 1;
:global {
.ant-upload.ant-upload-select-picture-card {
width: 175px;
height: 120px;
width: 100%;
min-width: 175px;
height: auto;
padding-bottom: 55%;
position: relative;
> .ant-upload {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
}
}
......@@ -15,8 +28,8 @@
}
.img {
width: 175px;
height: 120px;
width: 100%;
height: 100%;
object-fit: cover;
}
}
\ No newline at end of file
......@@ -102,21 +102,24 @@ const QualitiesUploadFormItem = (props) => {
const span = colSpan ? {
span: colSpan,
} : {
sm: 12,
md: 8,
lg: 8,
xs: 24,
sm: 24,
md: 24,
lg: 24,
xl: 12,
xxl: 8,
};
return (
<div style={{ width: '100%' }}>
<ArrayList value={value}>
<Row
gutter={[66, 50]}
gutter={[25, 25]}
>
{toArr(value).map((item, index) => (
<Col key={index} {...span}>
<Row
gutter={50}
gutter={25}
align="middle"
>
<Col flex={1} className={styles['lineage-cell']}>
......
import { getOrderBuyerCreatePageItems, getOrderBuyerPageItems, GetOrderBuyerPageItemsResponse, getOrderBuyerValidatePageItems, getOrderVendorPageItems, getOrderVendorValidatePageItems } from '@/services/OrderNewV2Api'
import { getOrderBuyerCreatePageItems, getOrderBuyerPageItems, GetOrderBuyerPageItemsResponse, getOrderBuyerTakePageItems, getOrderBuyerValidatePageItems, getOrderVendorPageItems, getOrderVendorTakePageItems, getOrderVendorValidatePageItems } from '@/services/OrderNewV2Api'
import { getProductSelectGetSelectCategory } from '@/services/ProductV2Api'
import { getPurchaseRequisitionFindInnerStatusEnum } from '@/services/PurchaseV2Api'
import { useEffect, useState } from 'react'
......@@ -119,3 +119,35 @@ export const getPurchaseRequisitionOrderPageSelectOption = () => {
return state
}
/** (采购待分配订单查询)获取前端页面下拉框列表 */
export const getPurchaseOrderReadyDistributionPageSelectOption = () => {
const [state, setstate] = useState<any>()
useEffect(() => {
getOrderBuyerTakePageItems({}).then(res => {
const { code, data } = res
if (code === 1000) {
setstate(data)
}
})
}, [])
return state
}
/** (销售待分配订单查询)获取前端页面下拉框列表 */
export const getSaleOrderReadyDistributionPageSelectOption = () => {
const [state, setstate] = useState<any>()
useEffect(() => {
getOrderVendorTakePageItems({}).then(res => {
const { code, data } = res
if (code === 1000) {
setstate(data)
}
})
}, [])
return state
}
......@@ -10,7 +10,7 @@ import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { useHttpRequest } from '@/hooks/useHttpRequest'
import '../index.less'
import { getOrderBuyerValidateSubmitPage, postOrderBuyerValidateSubmitBatch } from '@/services/OrderNewV2Api'
import { getOrderBuyerTakePage, postOrderBuyerTakeBatch } from '@/services/OrderNewV2Api'
import { useIntl } from 'umi'
// 待分配订单
......@@ -18,7 +18,7 @@ import { useIntl } from 'umi'
export interface ReadyDistributionOrderProps {}
const fetchTableData = async (params) => {
const { data } = await getOrderBuyerValidateSubmitPage(params)
const { data } = await getOrderBuyerTakePage(params)
return data
}
......@@ -29,8 +29,10 @@ const ReadyDistributionOrder:React.FC<ReadyDistributionOrderProps> = (props) =>
rowSelection,
rowSelectionCtl
} = useSelfTable()
const { run, loading } = useHttpRequest(postOrderBuyerValidateSubmitBatch)
const { run, loading } = useHttpRequest(postOrderBuyerTakeBatch)
const intl = useIntl()
const handleBitchPush = async () => {
if (rowSelectionCtl.selectRow.length === 0) {
return message.error(intl.formatMessage({ id: 'purchaseOrder.qingxiangouxuanding', defaultMessage: '请先勾选订单' }))
......@@ -51,7 +53,7 @@ const ReadyDistributionOrder:React.FC<ReadyDistributionOrderProps> = (props) =>
fetchTableData={params => fetchTableData(params)}
columns={columns}
currentRef={ref}
rowKey={'orderId'}
rowKey='orderId'
formilyLayouts={{
justify: 'space-between'
}}
......
import React, { useRef } from 'react'
import { Button } from 'antd'
import { baseOrderListColumns } from '../../constant'
import { history, useIntl } from 'umi'
import { useIntl } from 'umi'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { postOrderBuyerTake } from '@/services/OrderNewV2Api'
export const useSelfTable = () => {
const ref = useRef<any>({})
......@@ -10,7 +11,10 @@ export const useSelfTable = () => {
const intl = useIntl()
const handleSubmit = async (id) => {
history.push(`/memberCenter/tranactionAbility/purchaseOrder/readySubmitOrder/detail?id=${id}&preview=0`)
const { code } = await postOrderBuyerTake({orderId: id})
if (code === 1000) {
ref.current.reload()
}
}
const secondColumns: any[] = baseOrderListColumns().concat([
......
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { getPurchaseOrderSelectOption } from '@/pages/transaction/effect';
import { getPurchaseOrderReadyDistributionPageSelectOption } from '@/pages/transaction/effect';
import { useIntl } from 'umi';
export const tableListSchema: any = () => {
const intl = useIntl()
const res = getPurchaseOrderSelectOption()
if(res) {
const {
orderTypes: OrderType,
} = res
const data = getPurchaseOrderReadyDistributionPageSelectOption()
if(data) {
return {
type: 'object',
......@@ -48,7 +45,7 @@ export const tableListSchema: any = () => {
"x-component-props": {
placeholder: intl.formatMessage({ id: 'purchaseOrder.qingxuanzedingdanOrderType', defaultMessage: '请选择订单类型' })
},
enum: OrderType.map(item => ({
enum: data.map(item => ({
label: item['text'],
value: item['id'],
}))
......
......@@ -10,7 +10,7 @@ import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { useHttpRequest } from '@/hooks/useHttpRequest'
import '../index.less'
import { getOrderBuyerValidateSubmitPage, postOrderBuyerValidateSubmitBatch } from '@/services/OrderNewV2Api'
import { getOrderVendorTakePage, postOrderVendorTakeBatch } from '@/services/OrderNewV2Api'
import { useIntl } from 'umi'
// 待分配订单
......@@ -18,19 +18,21 @@ import { useIntl } from 'umi'
export interface ReadyDistributionOrderProps {}
const fetchTableData = async (params) => {
const { data } = await getOrderBuyerValidateSubmitPage(params)
const { data } = await getOrderVendorTakePage(params)
return data
}
const ReadyDistributionOrder:React.FC<ReadyDistributionOrderProps> = (props) => {
const ReadyDistributionOrder:React.FC<ReadyDistributionOrderProps> = () => {
const {
columns,
ref,
rowSelection,
rowSelectionCtl
} = useSelfTable()
const { run, loading } = useHttpRequest(postOrderBuyerValidateSubmitBatch)
const { run, loading } = useHttpRequest(postOrderVendorTakeBatch)
const intl = useIntl()
const handleBitchPush = async () => {
if (rowSelectionCtl.selectRow.length === 0) {
return message.error(intl.formatMessage({ id: 'purchaseOrder.qingxiangouxuanding', defaultMessage: '请先勾选订单' }))
......
import React, { useRef } from 'react'
import { Button } from 'antd'
import { baseOrderListColumns } from '../../constant'
import { history, useIntl } from 'umi'
import { useIntl } from 'umi'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { postOrderVendorTake } from '@/services/OrderNewV2Api'
export const useSelfTable = () => {
const ref = useRef<any>({})
......@@ -10,7 +11,10 @@ export const useSelfTable = () => {
const intl = useIntl()
const handleSubmit = async (id) => {
history.push(`/memberCenter/tranactionAbility/purchaseOrder/readySubmitOrder/detail?id=${id}&preview=0`)
const { code } = await postOrderVendorTake({orderId: id})
if (code === 1000) {
ref.current.reload()
}
}
const secondColumns: any[] = baseOrderListColumns().concat([
......
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { getPurchaseOrderSelectOption } from '@/pages/transaction/effect';
import { getSaleOrderReadyDistributionPageSelectOption } from '@/pages/transaction/effect';
import { useIntl } from 'umi';
export const tableListSchema: any = () => {
const intl = useIntl()
const res = getPurchaseOrderSelectOption()
if(res) {
const {
orderTypes: OrderType,
} = res
const data = getSaleOrderReadyDistributionPageSelectOption()
if(data) {
return {
type: 'object',
......@@ -48,7 +45,7 @@ export const tableListSchema: any = () => {
"x-component-props": {
placeholder: intl.formatMessage({ id: 'purchaseOrder.qingxuanzedingdanOrderType', defaultMessage: '请选择订单类型' })
},
enum: OrderType.map(item => ({
enum: data.map(item => ({
label: item['text'],
value: item['id'],
}))
......
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