Commit 6bbc17fa authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 商品新增详情添加SEO显示,处理采购合同下单取默认地址异常

parent 97458e51
......@@ -25,6 +25,9 @@ export interface IOtherParam {
marks: string;
packing: string;
afterService: string;
title: string;
keywords: string;
description: string;
}
interface InnerAttributeValueList {
......
......@@ -120,7 +120,7 @@ const OtherForm: React.FC<Iprops> = (props) => {
<span className="ant-form-text"></span>
</Form.Item>
<Form.Item
name="seoTitle"
name="title"
label={
<span>
Title&nbsp;
......@@ -133,7 +133,7 @@ const OtherForm: React.FC<Iprops> = (props) => {
<Input placeholder="最长50个汉字" />
</Form.Item>
<Form.Item
name="seoDescription"
name="description"
label={
<span>
Description&nbsp;
......@@ -146,7 +146,7 @@ const OtherForm: React.FC<Iprops> = (props) => {
<TextArea rows={4} placeholder="最长200个汉字" />
</Form.Item>
<Form.Item
name="seoKeywords"
name="keywords"
label={
<span>
Keywords&nbsp;
......
import React, { useState, useRef, ReactNode, useEffect } from 'react'
import { history } from 'umi'
import { Button, Steps, Card, Space, Radio, Row, Col, Descriptions, Table, Tabs, Tag, Divider } from 'antd'
import { Button, Steps, Card, Space, Tooltip, Row, Col, Descriptions, Table, Tabs, Tag, Divider } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
QuestionCircleOutlined,
......@@ -728,6 +728,40 @@ const viewProducts: React.FC<{}> = () => {
</Card>
</Space>
<Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="SEO优化">
<Row>
<Col span={3}>
<p>Title:<Tooltip title="用于显示在页面title标签的内容,便于搜索引擎抓取">
<QuestionCircleOutlined />
</Tooltip></p>
</Col>
<Col span={21}>
<p>{productDetail?.title}</p>
</Col>
</Row>
<Row>
<Col span={3}>
<p>Description:<Tooltip title="用于显示在页面Description标签的内容,便于搜索引擎抓取">
<QuestionCircleOutlined />
</Tooltip></p>
</Col>
<Col span={21}>
<p>{productDetail?.description}</p>
</Col>
</Row>
<Row>
<Col span={3}>
<p>Keywords:<Tooltip title="用于显示在页面Keywords标签的内容,便于搜索引擎通过关键词搜索时抓取页面,多个关键词用豆号分隔">
<QuestionCircleOutlined />
</Tooltip></p>
</Col>
<Col span={21}>
<p>{productDetail?.keywords}</p>
</Col>
</Row>
</Card>
</Space>
<Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="审核历史">
<Table dataSource={checkRecord} columns={columns} pagination={{ size: 'small' }} />
</Card>
......
......@@ -58,7 +58,8 @@ export const MaterialTableCell:React.FC<MaterialTableCellProps> = ({
memberId: record.memberId,
roleId: record.memberRoleId
})
setReceiveInfo(() => deliveryAddress.filter(item => item.isDefault)[0])
// setReceiveInfo(() => deliveryAddress.filter(item => item.isDefault)[0])
setReceiveInfo(() => deliveryAddress[0])
}
const save = async e => {
......
......@@ -318,7 +318,8 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
roleId: params.supplyMembersRoleId
})
params.orderProductRequests = params.orderProductRequests.map(item => {
const address = deliveryAddress.filter(item => item.isDefault)[0]
// const address = deliveryAddress.filter(item => item.isDefault)[0]
const address = deliveryAddress[0]
let logistics: any = {
deliveryType: item.logistics,
sendAddress: address.id,
......
......@@ -65,7 +65,7 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
// 渲染操作
materialInfoColumns[materialInfoColumns.length - 1].render = (text, record) => <Button type='link' onClick={() => handleDelete(record)}>删除</Button>
// 渲染单价
materialInfoColumns[5].render = (t, r) => {
materialInfoColumns[7].render = (t, r) => {
if(orderModel === OrderModalType["HAND_ORDER"]) {
return <PriceComp priceSection={r.unitPrice}/>
} else {
......@@ -83,7 +83,7 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
} else {
// 渲染单价
materialInfoColumns[5].render = (t, r) => <span style={{color: 'red'}}>{r.price}</span>
materialInfoColumns[7].render = (t, r) => <span style={{color: 'red'}}>{r.price}</span>
// 渲染商品ID
materialInfoColumns[0].render = (t, r) => r.productId
......
......@@ -84,6 +84,9 @@ class ProductStore implements IProductModule {
marks: this.productInfoByEdit?.marks,
packing: this.productInfoByEdit?.packing,
afterService: this.productInfoByEdit?.afterService,
title: this.productInfoByEdit?.title,
keywords: this.productInfoByEdit?.keywords,
description: this.productInfoByEdit?.description,
}
}
......
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