Commit 1fd98be8 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

🐞 fix(采购门户、物流门户、加工门户): 修复bug

parent 8acdcc76
......@@ -17,6 +17,7 @@ import { UPLOAD_TYPE } from '@/constants'
import CategorySelect from '@/components/CategorySelect'
import { yearProcessAmount, plantArea, staffNum } from '@/constants/procurement';
import UploadFiles from '@/pages/transaction/components/UploadFiles'
import { getTopDomainByHost } from '@/utils'
interface HandlingInfoPropsType {
SiteStore: {
......@@ -223,8 +224,10 @@ const HandlingInfo: React.FC<HandlingInfoPropsType> = (props) => {
if (!checkareaBOList(value.areaBOList)) {
return
}
value.albumName = file[0].name;
value.albumUrl = file[0].url;
if (!isEmpty(file)) {
value.albumName = file[0].name;
value.albumUrl = file[0].url;
}
value.aboutSeo = {
title: value.title,
description: value.description,
......@@ -364,7 +367,7 @@ const HandlingInfo: React.FC<HandlingInfoPropsType> = (props) => {
const handleMallSelectChange = (val, option) => {
setDoor(option.children);
if (option.url) {
checkUrl(option.url) ? setResUrl(`${checkUrl(option.url)}.${siteUrl}`) : setResUrl(`${siteUrl}`)
checkUrl(option.url) ? setResUrl(`${checkUrl(option.url)}.${getTopDomainByHost(siteUrl, true)}`) : setResUrl(`${siteUrl}`)
}
}
......
......@@ -15,6 +15,7 @@ import { getAuth } from '@/utils/auth'
import { isEmpty } from '@formily/antd/esm/shared'
import { UPLOAD_TYPE } from '@/constants'
import InputSelect from '@/components/InputSelect'
import { getTopDomainByHost } from '@/utils'
interface LogisticsInfoPropsType {
SiteStore: {
......@@ -80,7 +81,7 @@ const LogisticsInfo: React.FC<LogisticsInfoPropsType> = (props) => {
// 根据站点获取商城信息
const fetchAllShop = () => {
PublicApi.getManageShopFindByDoorType({doorType: 4}).then(res => {
PublicApi.getManageShopFindByDoorType({ doorType: 4 }).then(res => {
if (res.code === 1000) {
setAllMallList(res.data)
}
......@@ -228,8 +229,10 @@ const LogisticsInfo: React.FC<LogisticsInfoPropsType> = (props) => {
if (!checkareaBOList(value.areaBOList)) {
return
}
value.albumName = file.albumName;
value.albumUrl = file.albumUrl;
if (!isEmpty(file)) {
value.albumName = file.albumName;
value.albumUrl = file.albumUrl;
}
value.aboutSeo = {
title: value.title,
description: value.description,
......@@ -367,7 +370,7 @@ const LogisticsInfo: React.FC<LogisticsInfoPropsType> = (props) => {
const handleMallSelectChange = (val, option) => {
setDoor(option.children);
if (option.url) {
checkUrl(option.url) ? setResUrl(`${checkUrl(option.url)}.${siteUrl}`) : setResUrl(`${siteUrl}`)
checkUrl(option.url) ? setResUrl(`${checkUrl(option.url)}.${getTopDomainByHost(siteUrl, true)}`) : setResUrl(`${siteUrl}`)
}
}
......
......@@ -3,7 +3,7 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card } from 'antd';
import { StandardTable } from 'god';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ColumnType } from 'antd/lib/table/interface';
import { ColumnType, TableRowSelection } from 'antd/lib/table/interface';
import NiceForm from '@/components/NiceForm';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
......@@ -61,7 +61,7 @@ const Table: React.FC<Iprops> = (props: any) => {
/**多选 */
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<number>>([]);
const rowSelection = {
const rowSelection: TableRowSelection<any> = {
selectedRowKeys: selectedRowKeys,
onChange: (rowKeys: any) => {
console.log(rowKeys, 98)
......@@ -69,7 +69,8 @@ const Table: React.FC<Iprops> = (props: any) => {
setSelectedRowKeys(rowKeys);
},
getCheckboxProps: (record: any) => {
console.log(record, 962039)
console.log(record)
return {}
}
}
......
......@@ -14,6 +14,7 @@ import styles from './index.less'
import { getAuth } from '@/utils/auth'
import { isEmpty } from '@formily/antd/esm/shared'
import { UPLOAD_TYPE } from '@/constants'
import { getTopDomainByHost } from '@/utils'
interface PurchasInfoPropsType {
SiteStore: {
......@@ -79,7 +80,7 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
// 根据站点获取商城信息
const fetchAllShop = () => {
PublicApi.getManageShopFindByDoorType({doorType: '3'}).then(res => {
PublicApi.getManageShopFindByDoorType({ doorType: '3' }).then(res => {
if (res.code === 1000) {
setAllMallList(res.data)
}
......@@ -213,8 +214,10 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
if (!checkareaBOList(value.areaBOList)) {
return
}
value.albumName = file.albumName;
value.albumUrl = file.albumUrl;
if (!isEmpty) {
value.albumName = file.albumName;
value.albumUrl = file.albumUrl;
}
delete value.slideshowBOList
value.slideshowBOList = slideshowBOList
delete value.title
......@@ -309,7 +312,7 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
* 采购门户广告图
* @param url
*/
const handleAddadvertPics = (url: string) => {
const handleAddadvertPics = (url: string) => {
setAdvertPics([...advertPics, url])
form.setFieldsValue({
advertPics: [...advertPics, url]
......@@ -359,7 +362,7 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
const handleMallSelectChange = (val, option) => {
setDoor(option.children);
if (option.url) {
checkUrl(option.url) ? setResUrl(`${checkUrl(option.url)}.${siteUrl}`) : setResUrl(`${siteUrl}`)
checkUrl(option.url) ? setResUrl(`${checkUrl(option.url)}.${getTopDomainByHost(siteUrl, true)}`) : setResUrl(`${siteUrl}`)
}
}
......
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