Commit 08028200 authored by 许佳敏's avatar 许佳敏

Merge branch '0518' into 'jinfa-0518'

fix: 修改物料样式 See merge request project/jinfa-platform!37
parents b15cff44 d7f59467
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
'member.modal.selectMaterial.title': '选择会员', 'member.modal.selectMaterial.title': '选择会员',
'material.output.title':'产地与配送', 'material.output.title':'产地与配送',
'material.materialsManufacturer':'生产厂家', 'material.materialsManufacturer':'生产厂家',
'material.materialsOrigin':'地', 'material.materialsOrigin':'地',
'material.materialsDeparture':'起运地', 'material.materialsDeparture':'起运地',
'material.materialsDeliverPeriod':'到货周期', 'material.materialsDeliverPeriod':'到货周期',
'material.materialsDeliveryMethod':'交货方式', 'material.materialsDeliveryMethod':'交货方式',
...@@ -140,4 +140,4 @@ export default { ...@@ -140,4 +140,4 @@ export default {
'material.chargeRoleName':'负责人所属角色', 'material.chargeRoleName':'负责人所属角色',
'material.contactMemberName':'联系人', 'material.contactMemberName':'联系人',
'material.contactMemberPhone':'联系人电话', 'material.contactMemberPhone':'联系人电话',
} }
\ No newline at end of file
...@@ -205,7 +205,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({ ...@@ -205,7 +205,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
<a <a
href={`/memberCenter/afterService/returnApplication/returnPrSubmit/orderDetail?id=${record.orderId}`} href={`/memberCenter/afterService/returnApplication/returnPrSubmit/orderDetail?id=${record.orderId}`}
target="_blank" target="_blank"
        > >
{text} {text}
</a> </a>
), ),
...@@ -238,7 +238,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({ ...@@ -238,7 +238,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
<a <a
href={`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.contractId}`} href={`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.contractId}`}
target="_blank" target="_blank"
        > >
{text} {text}
</a> </a>
), ),
...@@ -253,24 +253,25 @@ const ReturnForm: React.FC<BillsFormProps> = ({ ...@@ -253,24 +253,25 @@ const ReturnForm: React.FC<BillsFormProps> = ({
title: intl.formatMessage({ id: 'afterService.order.query.column.materialNo' }, { default: '物料编号' }), title: intl.formatMessage({ id: 'afterService.order.query.column.materialNo' }, { default: '物料编号' }),
dataIndex: 'productNo', dataIndex: 'productNo',
}, },
isMateriel && { ...(
title: intl.formatMessage({ id: 'afterService.apply.productBrandNo' }, { default: '物料牌号' }), !isMateriel ? [
dataIndex: 'productBrandNo', {
ellipsis: true, title: intl.formatMessage({ id: 'afterService.order.query.column.name' }, { default: '商品名称' }),
}, dataIndex: 'name',
!isMateriel ? { ellipsis: true,
title: intl.formatMessage({ id: 'afterService.order.query.column.name' }, { default: '商品名称' }), }
dataIndex: 'name', ] : [
ellipsis: true, {
} : { title: `${intl.formatMessage({ id: 'afterService.order.query.column.materialName' }, { default: '物料名称' })}/${intl.formatMessage({ id: 'afterService.order.query.column.quotedSpec' }, { default: '规格' })}`,
title: `${intl.formatMessage({ id: 'afterService.order.query.column.materialName' }, { default: '物料名称' })}/${intl.formatMessage({ id: 'afterService.order.query.column.quotedSpec' }, { default: '规格' })}`, dataIndex: 'name',
dataIndex: 'name', render: (text, record) => `${text}/${record.quotedSpec}`,
render: (text, record) => `${text}/${record.quotedSpec}`, },
}, {
{ title: intl.formatMessage({ id: 'afterService.order.query.column.category' }, { default: '品类' }),
title: intl.formatMessage({ id: 'afterService.order.query.column.category' }, { default: '品类' }), dataIndex: 'category',
dataIndex: 'category', }
}, ]
),
{ {
title: intl.formatMessage({ id: 'afterService.order.query.column.brand' }, { default: '品牌' }), title: intl.formatMessage({ id: 'afterService.order.query.column.brand' }, { default: '品牌' }),
dataIndex: 'brand', dataIndex: 'brand',
...@@ -485,12 +486,12 @@ const ReturnForm: React.FC<BillsFormProps> = ({ ...@@ -485,12 +486,12 @@ const ReturnForm: React.FC<BillsFormProps> = ({
setOrderTypeValue(+outerOrderType); setOrderTypeValue(+outerOrderType);
} }
}) })
.catch((err) => { .catch((err) => {
console.warn(err); console.warn(err);
}) })
.finally(() => { .finally(() => {
setInfoLoading(false); setInfoLoading(false);
}); });
}; };
useEffect(() => { useEffect(() => {
...@@ -558,30 +559,30 @@ const ReturnForm: React.FC<BillsFormProps> = ({ ...@@ -558,30 +559,30 @@ const ReturnForm: React.FC<BillsFormProps> = ({
sendAddress: sendAddress:
deliveryType === 1 ? deliveryType === 1 ?
shippingAddress.fullAddress : shippingAddress.fullAddress :
deliveryType === 2 ? deliveryType === 2 ?
pickupAddress.fullAddress : pickupAddress.fullAddress :
'' ''
, ,
sendUserName: sendUserName:
deliveryType === 1 ? deliveryType === 1 ?
shippingAddress.name : shippingAddress.name :
deliveryType === 2 ? deliveryType === 2 ?
pickupAddress.name : pickupAddress.name :
'' ''
, ,
sendUserTel: sendUserTel:
deliveryType === 1 ? deliveryType === 1 ?
shippingAddress.phone : shippingAddress.phone :
deliveryType === 2 ? deliveryType === 2 ?
pickupAddress.phone : pickupAddress.phone :
'' ''
, ,
sendId: sendId:
deliveryType === 1 ? deliveryType === 1 ?
shippingAddress.id : shippingAddress.id :
deliveryType === 2 ? deliveryType === 2 ?
pickupAddress.id : pickupAddress.id :
'' ''
, ,
}, },
proofFileList: proofFileList.filter(item => item.status === 'done').map(item => ({ proofFileList: proofFileList.filter(item => item.status === 'done').map(item => ({
...@@ -683,7 +684,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({ ...@@ -683,7 +684,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
message.warning(intl.formatMessage({ id: 'afterService.apply.upload.legal' }, { default: '图片大小超过20M' })); message.warning(intl.formatMessage({ id: 'afterService.apply.upload.legal' }, { default: '图片大小超过20M' }));
return Upload.LIST_IGNORE; return Upload.LIST_IGNORE;
} }
return Promise.resolve(); return Promise.resolve();
}; };
const handleGoodsConfirm = values => { const handleGoodsConfirm = values => {
...@@ -807,23 +808,23 @@ const ReturnForm: React.FC<BillsFormProps> = ({ ...@@ -807,23 +808,23 @@ const ReturnForm: React.FC<BillsFormProps> = ({
title={ title={
!id ? !id ?
intl.formatMessage({ id: 'returnApplication.returnPrSubmit.add' }, { default: '新建退货申请单' }) : intl.formatMessage({ id: 'returnApplication.returnPrSubmit.add' }, { default: '新建退货申请单' }) :
isEdit ? isEdit ?
intl.formatMessage({ id: 'returnApplication.returnPrSubmit.edit' }, { default: '编辑退货申请单' }) : intl.formatMessage({ id: 'returnApplication.returnPrSubmit.edit' }, { default: '编辑退货申请单' }) :
intl.formatMessage({ id: 'returnApplication.returnPrSubmit.check' }, { default: '查看退货申请单' }) intl.formatMessage({ id: 'returnApplication.returnPrSubmit.check' }, { default: '查看退货申请单' })
} }
extra={ extra={
(isEdit || !id) (isEdit || !id)
? [ ? [
<Button <Button
key="1" key="1"
type="primary" type="primary"
icon={<SaveOutlined />} icon={<SaveOutlined />}
loading={submitLoading} loading={submitLoading}
onClick={() => addSchemaAction.submit()} onClick={() => addSchemaAction.submit()}
> >
{intl.formatMessage({ id: 'afterService.apply.save' }, { default: '保存' })} {intl.formatMessage({ id: 'afterService.apply.save' }, { default: '保存' })}
</Button>, </Button>,
] ]
: [] : []
} }
> >
......
...@@ -84,7 +84,7 @@ export const getSchema = (schema: ISchema | null): any => { ...@@ -84,7 +84,7 @@ export const getSchema = (schema: ISchema | null): any => {
] ]
}, },
materialsOrigin: { materialsOrigin: {
title: intl.formatMessage({ id: 'material.materialsOrigin', defaultMessage: '地' }), title: intl.formatMessage({ id: 'material.materialsOrigin', defaultMessage: '地' }),
type: 'string', type: 'string',
'x-rules': [ 'x-rules': [
{ {
......
...@@ -12,19 +12,21 @@ import { getProductGoodsGetGoodsProcessDetail, GetProductGoodsGetGoodsProcessDet ...@@ -12,19 +12,21 @@ import { getProductGoodsGetGoodsProcessDetail, GetProductGoodsGetGoodsProcessDet
import { useIntl } from 'umi'; import { useIntl } from 'umi';
import { PENDING_ADD_MATERIAL, PENDING_SUBMIT_EXAM } from '@/constants/material'; import { PENDING_ADD_MATERIAL, PENDING_SUBMIT_EXAM } from '@/constants/material';
import { getAuth } from '@/utils/auth'; import { getAuth } from '@/utils/auth';
import { RoleEnum } from '../common/constants';
/** /**
* 详情 * 详情
*/ */
const Detail = () => { const Detail = () => {
const intl = useIntl(); const intl = useIntl();
const roleType = getAuth()?.memberRoleType;
const { id } = usePageStatus(); const { id } = usePageStatus();
const { initialValue, record } = useGetInitialValueDetail<GetProductGoodsGetGoodsProcessDetailResponse, GetProductGoodsGetMaterInnerLogListResponse>({ const { initialValue, record } = useGetInitialValueDetail<GetProductGoodsGetGoodsProcessDetailResponse, GetProductGoodsGetMaterInnerLogListResponse>({
id: id, id: id,
api: getProductGoodsGetGoodsProcessDetail, api: getProductGoodsGetGoodsProcessDetail,
logApi: getProductGoodsGetMaterInnerLogList logApi: getProductGoodsGetMaterInnerLogList
}) })
const { anchorHeader, auditProcess, basicInfoList, tableColumn, recordColumn, properties , outputInfoList,unitInfoList, contactInfoList} = useGetDetailCommon<GetProductGoodsGetGoodsResponse | null>({initialValue: initialValue}) const { anchorHeader, auditProcess, basicInfoList, tableColumn, recordColumn, properties, outputInfoList, unitInfoList, contactInfoList } = useGetDetailCommon<GetProductGoodsGetGoodsResponse | null>({ initialValue: initialValue })
const urls = useMemo(() => { const urls = useMemo(() => {
if (initialValue) { if (initialValue) {
...@@ -64,47 +66,76 @@ const Detail = () => { ...@@ -64,47 +66,76 @@ const Detail = () => {
column={2} column={2}
style={{ marginBottom: '16px' }} style={{ marginBottom: '16px' }}
/> />
<CustomizeColumn <CustomizeColumn
id="output" id="output"
data={outputInfoList} data={outputInfoList}
title={intl.formatMessage({ id: 'material.output.title', defaultMessage: '产地配送' })} title={intl.formatMessage({ id: 'material.output.title', defaultMessage: '产地配送' })}
column={2} column={2}
style={{ marginBottom: '16px' }} style={{ marginBottom: '16px' }}
/> />
<CustomizeColumn <CustomizeColumn
id="unitInfoList" id="unitInfoList"
data={unitInfoList} data={unitInfoList}
title={intl.formatMessage({ id: 'material.unitConversion.title', defaultMessage: '单位换算' })} title={intl.formatMessage({ id: 'material.unitConversion.title', defaultMessage: '单位换算' })}
column={2} column={2}
style={{ marginBottom: '16px' }} style={{ marginBottom: '16px' }}
/> />
<CustomizeColumn <CustomizeColumn
id="contact" id="contact"
data={contactInfoList} data={contactInfoList}
title={intl.formatMessage({ id: 'material.contact.title', defaultMessage: '联系信息' })} title={intl.formatMessage({ id: 'material.contact.title', defaultMessage: '联系信息' })}
column={2} column={2}
style={{ marginBottom: '16px' }} style={{ marginBottom: '16px' }}
/> />
<div style={{ marginBottom: '16px' }} id="images"> <div style={{ marginBottom: '16px' }} id="images">
<Card title={intl.formatMessage({ id: 'material.images.title', defaultMessage: '物料图片' })} bodyStyle={{ paddingTop: '0' }}> <Card title={intl.formatMessage({ id: 'material.images.title', defaultMessage: '物料图片' })} bodyStyle={{ paddingTop: '0' }}>
<ImageList imageUrls={initialValue?.goodsPic} /> <ImageList imageUrls={initialValue?.goodsPic} />
</Card> </Card>
</div> </div>
{roleType === RoleEnum.Purchaser && (
<div style={{ marginBottom: '16px' }} id="files">
<Card title={intl.formatMessage({ id: 'material.enclosure.productInfo', defaultMessage: '商品信息' })}>
<Row>
<Col span={12}>
最小单位(包):{initialValue?.miniUnit}
</Col>
<Col span={12}>
托盘类型(海关):{initialValue?.trayType}
</Col>
<Col span={12}>
包装类型(海关):{initialValue?.packageType}
</Col>
<Col span={12}>
托盘规格(海关):{initialValue?.traySpec}
</Col>
<Col span={12}>
托规格(托):{initialValue?.palmSpec}
</Col>
<Col span={12}>
柜/车规格(柜/车):{initialValue?.cabinetSpec}
</Col>
<Col span={12}>
最小剩余货架寿命:{initialValue?.miniShelfLife} {initialValue?.sapSledTag}
</Col>
</Row>
</Card>
</div>
)}
<div style={{ marginBottom: '16px' }} id="files"> <div style={{ marginBottom: '16px' }} id="files">
<Card title={intl.formatMessage({ id: 'material.enclosure.productInfo', defaultMessage: '商品信息' })}> <Card title={intl.formatMessage({ id: 'material.enclosure.productInfo', defaultMessage: '商品信息' })}>
<Row> <Row>
<Col span={12}> <Col span={12}>
价格:{initialValue?.price} 价格:{initialValue?.materialsPrice}
</Col> </Col>
<Col span={12}> <Col span={12}>
起订量:{initialValue?.price} 起订量:{initialValue?.miniOrder}
</Col> </Col>
<Col span={12}> <Col span={12}>
发货地:{initialValue?.PointOfOrigin} 发货地:{initialValue?.provinceName} {initialValue?.cityName}
</Col> </Col>
<Col span={12}> <Col span={12}>
库存数量:{initialValue?.InventoryQuantity} 库存数量:{initialValue?.materialsStock}
</Col> </Col>
</Row> </Row>
</Card> </Card>
...@@ -131,4 +162,4 @@ const Detail = () => { ...@@ -131,4 +162,4 @@ const Detail = () => {
) )
} }
export default Detail; export default Detail;
\ 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