Commit b7c26878 authored by rainbowmorel@163.com's avatar rainbowmorel@163.com

Merge branch 'v2-220418' into 20418order

parents c9fce1ed aa6a3d5e
......@@ -2,10 +2,13 @@
* 订单能力 - 送货通知单管理 - 新增待提交送货通知单B2B
* @author: Gavin
*/
import React, { useRef } from 'react'
import React, { useRef } from 'react'
import { history } from 'umi'
import AddEditContent from './components/AddEditContent'
const DeliveryNoticeManagementAwaitB2BAdd: React.FC = () => {
const [time] = history.location?.query?.time
return (
<AddEditContent type='add' />
)
......
......@@ -2,12 +2,12 @@
* 订单能力 - 送货通知单管理 - 修改待提交送货通知单B2B
* @author: Gavin
*/
import React, { useRef } from 'react'
import { history } from 'umi'
import React, { useRef } from 'react'
import { history } from 'umi'
import AddEditContent from './components/AddEditContent'
const DeliveryNoticeManagementAwaitB2BEdit: React.FC = () => {
const [ id ] = history.location?.query?.id
const [id] = history.location?.query?.id
return (
<AddEditContent
......
......@@ -3,10 +3,13 @@
* @author: Gavin
* @description: 与B2B内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import React, { useRef } from 'react'
import React, { useRef } from 'react'
import { history } from 'umi'
import AddEditContent from './components/AddEditContent'
const DeliveryNoticeManagementAwaitSRMAdd: React.FC = () => {
const [time] = history.location?.query?.time
return (
<AddEditContent type='add' />
)
......
......@@ -3,12 +3,12 @@
* @author: Gavin
* @description: 与B2B内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import React, { useRef } from 'react'
import { history } from 'umi'
import React, { useRef } from 'react'
import { history } from 'umi'
import AddEditContent from './components/AddEditContent'
const DeliveryNoticeManagementAwaitSRMEdit: React.FC = () => {
const [ id ] = history.location?.query?.id
const [id] = history.location?.query?.id
return (
<AddEditContent
......
......@@ -32,9 +32,9 @@ const DemandPlanMaterialLayout: React.FC<IPROPS> = (props: any) => {
key: 'number',
dataIndex: 'number',
render: (text: any, record: any) => (
<Space direction='vertical' size={0}>
<Space size={0}>
<Typography.Text>{text}</Typography.Text>
<Typography.Text>{record.name}</Typography.Text>
<Typography.Text>/{record.name}</Typography.Text>
</Space>
)
},
......
......@@ -296,7 +296,7 @@ const SearchDetail = () => {
switch (pathPci) {
case 'readyAdd':
case 'readyAddShop':
if (button === 1) {
if (button === '1') {
return (
<Popconfirm title={intl.formatMessage({ id: 'table.purchase.popconfirm1' })} okText={intl.formatMessage({ id: 'detail.purchase.okText' })} cancelText={intl.formatMessage({ id: 'detail.purchase.cancelText' })} onConfirm={fetchSubmitBatch}>
<Button type='primary'>
......@@ -321,7 +321,7 @@ const SearchDetail = () => {
case 'readySubmitExamineResult':
return (
<Button onClick={() => setUploadBidResultVisible(true)} type='primary'>
<CheckCircleOutlined /> {button === 1 ? intl.formatMessage({ id: 'table.purchase.eidt' }) : intl.formatMessage({ id: 'table.purchase.submit' })}{intl.formatMessage({ id: 'detail.purchase.bidResultLayout' })}
<CheckCircleOutlined /> {button === '1' ? intl.formatMessage({ id: 'table.purchase.eidt' }) : intl.formatMessage({ id: 'table.purchase.submit' })}{intl.formatMessage({ id: 'detail.purchase.bidResultLayout' })}
</Button>
)
case 'readyConfirm':
......@@ -600,7 +600,7 @@ const SearchDetail = () => {
signUpIdea,
urls
}
const _fetch = button === 1 ? postPurchaseBiddingUpdateBiddingReturn : postPurchaseBiddingSubmitExamineBiddingReturn;
const _fetch = button === '1' ? postPurchaseBiddingUpdateBiddingReturn : postPurchaseBiddingSubmitExamineBiddingReturn;
setConfirmLoading(true)
_fetch(_params).then(res => {
if (res.code === 1000) {
......
......@@ -76,8 +76,8 @@ const Material: React.FC<Iprops> = (props: any) => {
},
{
title: intl.formatMessage({ id: 'detail.purchase.goodsGroup' }),
key: 'goodsGroup',
dataIndex: 'goodsGroup'
key: 'materialGroup',
dataIndex: 'materialGroup'
},
{
title: intl.formatMessage({ id: 'detail.purchase.nameCode' }),
......@@ -162,7 +162,7 @@ const Material: React.FC<Iprops> = (props: any) => {
name: 'material',
data: {
materielMode: res.materielMode,
materiels: { ...dataSource, goodsGroup: dataSource.materialGroup?.name },
materiels: dataSource,
},
})
onBadge(0, 1)
......@@ -186,7 +186,6 @@ const Material: React.FC<Iprops> = (props: any) => {
}
}, [fetchdata])
return (
<>
<Form
......
......@@ -11,6 +11,7 @@ import TableModal from '@/pages/transaction/components/tableModal';
import { ColumnType } from 'rc-table/lib/interface';
import { getProductCustomerGetCustomerCategoryTree, getProductGoodsGetGoodsList, getProductSelectGetSelectBrand, getProductSelectGetSelectCustomerCategory } from '@/services/ProductV2Api';
import { getIntl } from 'umi';
import { useAsyncCascader, fetchTreeData } from '../../../effect';
const layout: any = {
colon: false,
......@@ -121,6 +122,7 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
unit: edit.unit,
ids: edit.ids,
purchaseCount: edit.purchaseCount,
goodsGroup: edit?.materialGroup
})
setFiles(edit.urls)
}
......@@ -162,6 +164,7 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
model: data.type,
brand: data.brand && data.brand.name,
unit: data.unitName,
goodsGroup: data?.materialGroup?.name
})
setProduct(data);
setSearchVisible(false);
......@@ -179,6 +182,8 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
number: Object.keys(product).length > 0 ? product.code : res.number,
name: Object.keys(product).length > 0 ? product.name : res.name,
category: Object.keys(product).length > 0 ? product.customerCategory.name : edit.category,
materialGroup: Object.keys(product).length > 0 ? product?.materialGroup?.name : edit.materialGroup,
goodsGroup: Object.keys(product).length > 0 ? product?.materialGroup?.name : edit.materialGroup,
ids: res.ids,
categoryId: (Object.keys(product).length > 0 && !isEmpty(product.customerCategory.category)) ? product.customerCategory.category.id : edit.categoryId,
memberCategoryId: Object.keys(product).length > 0 ? product.customerCategory.id : edit.memberCategoryId,
......@@ -205,8 +210,9 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
}
const fetchGoodsData = (params: any) => {
const materialGroupId = params.materialGroupId ? params.materialGroupId[params.materialGroupId.length - 1] : undefined
return new Promise(resolve => {
getProductGoodsGetGoodsList(params).then(res => {
getProductGoodsGetGoodsList({ ...params, materialGroupId, ids: [99] }).then(res => {
const { data } = res
resolve(data)
}).catch(error => {
......@@ -229,7 +235,7 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
{
title: intl.formatMessage({ id: 'detail.purchase.goodsGroup' }),
key: 'goodsGroup',
dataIndex: 'goodsGroup'
dataIndex: ['materialGroup', 'name']
},
{
title: intl.formatMessage({ id: 'detail.purchase.nameCode' }),
......@@ -437,6 +443,7 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
columns={columns}
effects={($, actions) => {
actions.reset()
useAsyncCascader('materialGroupId', fetchTreeData)
useStateFilterSearchLinkageEffect($, actions, "name", FORM_FILTER_PATH)
}}
schema={{
......@@ -514,14 +521,14 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
},
materialGroupId: {
type: 'string',
"x-component": 'SearchSelect',
"x-component-props": {
'x-component': 'Cascader',
'x-component-props': {
placeholder: intl.formatMessage({ id: 'detail.purchase.message93' }),
fetchSearch: getProductSelectGetSelectCustomerCategory,
style: {
width: 160
}
}
allowClear: true,
fieldNames: { label: 'title', value: 'id', children: 'children' },
style: { width: '150px' },
showSearch: true
},
},
type: {
type: 'string',
......
......@@ -163,7 +163,7 @@ const Material: React.FC<Iprops> = (props: any) => {
name: 'material',
data: {
materielMode: res.materielMode,
materiels: { ...dataSource, goodsGroup: dataSource.materialGroup?.name },
materiels: dataSource,
},
})
onBadge(0, 1)
......@@ -187,7 +187,6 @@ const Material: React.FC<Iprops> = (props: any) => {
}
}, [fetchdata])
return (
<>
<Form
......
......@@ -122,6 +122,7 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
unit: edit.unit,
ids: edit.ids,
purchaseCount: edit.purchaseCount,
goodsGroup: edit?.materialGroup
})
setFiles(edit.urls)
}
......@@ -530,16 +531,6 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
style: { width: '150px' },
showSearch: true
},
// type: 'string',
// "x-component": 'SearchSelect',
// "x-component-props": {
// placeholder: intl.formatMessage({ id: 'detail.purchase.message93' }),
// fetchSearch: getProductSelectGetSelectCustomerCategory,
// style: {
// width: 160
// }
// }
},
type: {
type: 'string',
......
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