Commit 9cb7b582 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

feat: 加工能力新增加工企业门户

parent a2165aba
......@@ -31,6 +31,29 @@ const ShopRoute: RouterChild = {
name: '渠道模板详情',
hideInMenu: true,
component: '@/pages/channel/templateDetail',
},
{
path: '/memberCenter/channelAbility/channelSeo',
name: '店铺SEO设置',
component: '@/pages/channel/channelSeo',
},
{
path: '/memberCenter/channelAbility/channelSeo/add',
name: '新建SEO',
hideInMenu: true,
component: '@/pages/channel/channelSeo/add',
},
{
path: '/memberCenter/channelAbility/channelSeo/edit',
name: '修改SEO',
hideInMenu: true,
component: '@/pages/channel/channelSeo/add',
},
{
path: '/memberCenter/channelAbility/channelSeo/detail',
name: '查看SEO',
hideInMenu: true,
component: '@/pages/channel/channelSeo/add',
}
]
......
This diff is collapsed.
......@@ -34,6 +34,14 @@ const memberCenterRoute = {
redirect: '/memberCenter/shopAbility/infoManage',
},
{
path: '/memberCenter/logisticsAbility',
redirect: '/memberCenter/logisticsAbility/infoManage',
},
{
path: '/memberCenter/handling',
redirect: '/memberCenter/handling/infoManage',
},
{
path: '/memberCenter/channelAbility',
redirect: '/memberCenter/channelAbility/infoManage',
},
......
......@@ -10,112 +10,118 @@ import { RouterChild } from '../utils/index';
const LogisticsRoute: RouterChild = {
path: '/memberCenter/logisticsAbility',
name: 'logisticsAbility',
name: '物流能力',
icon: 'logistics',
routes: [
/** 物流公司门户 */
{
path: '/memberCenter/logisticsAbility/infoManage',
name: '物流公司门户',
component: '@/pages/logistics/logisticsInfo',
},
{
// 物流管理模块
path: '/memberCenter/logisticsAbility/logistics',
name: 'logistics',
name: '物流管理模块',
routes: [
// // 物流公司管理
{
path: '/memberCenter/logisticsAbility/logistics/company',
name: 'company',
name: '物流公司管理',
component: '@/pages/logistics/list/company'
},
// 物流公司管理-新增
{
path: '/memberCenter/logisticsAbility/logistics/company/add',
name: 'addCompany',
name: '物流公司管理-新增',
component: '@/pages/logistics/logisticsCompany/add',
hideInMenu: true
},
// 物流公司管理-编辑
{
path: '/memberCenter/logisticsAbility/logistics/company/edit',
name: 'editCompany',
name: '物流公司管理-编辑',
component: '@/pages/logistics/logisticsCompany/edit',
hideInMenu: true
},
// 物流公司管理-详情
{
path: '/memberCenter/logisticsAbility/logistics/company/detail',
name: 'companyDetail',
name: '物流公司管理-详情',
component: '@/pages/logistics/logisticsCompany/detail',
hideInMenu: true
},
// 发货地址
{
path: '/memberCenter/logisticsAbility/logistics/deliveryAddress',
name: 'deliveryAddress',
name: '发货地址',
component: '@/pages/logistics/list/deliveryAddress'
},
// 发货地址-新增
{
path: '/memberCenter/logisticsAbility/logistics/deliveryAddress/add',
name: 'addDeliveryAddress',
name: '发货地址-新增',
component: '@/pages/logistics/shippingAddress/add',
hideInMenu: true
},
// 发货地址-编辑
{
path: '/memberCenter/logisticsAbility/logistics/deliveryAddress/edit',
name: 'editDeliveryAddress',
name: '发货地址-编辑',
component: '@/pages/logistics/shippingAddress/edit',
hideInMenu: true
},
// 收货地址
{
path: '/memberCenter/logisticsAbility/logistics/receivingAddress',
name: 'receivingAddress',
name: '收货地址',
component: '@/pages/logistics/list/receivingAddress'
},
// 收货地址-新增
{
path: '/memberCenter/logisticsAbility/logistics/receivingAddress/add',
name: 'addReceivingAddress',
name: '收货地址-新增',
component: '@/pages/logistics/receiptAddress/add',
hideInMenu: true
},
// 收货地址-编辑
{
path: '/memberCenter/logisticsAbility/logistics/receivingAddress/edit',
name: 'editReceivingAddress',
name: '收货地址-编辑',
component: '@/pages/logistics/receiptAddress/edit',
hideInMenu: true
},
// 运费模板
{
path: '/memberCenter/logisticsAbility/logistics/template',
name: 'template',
name: '运费模板',
component: '@/pages/logistics/list/template'
},
// 运费模板-新增
{
path: '/memberCenter/logisticsAbility/logistics/templateForm',
name: 'templateForm',
name: '运费模板-新增',
component: '@/pages/logistics/list/components/templateForm',
hideInMenu: true
},
// 运费模板-新增
{
path: '/memberCenter/logisticsAbility/logistics/template/add',
name: 'addTemplate',
name: '运费模板-新增',
component: '@/pages/logistics/list/components/templateForm',
hideInMenu: true
},
// 运费模板-编辑
{
path: '/memberCenter/logisticsAbility/logistics/template/edit',
name: 'editTemplate',
name: '运费模板-编辑',
component: '@/pages/logistics/list/components/templateForm',
hideInMenu: true
},
// 运费模板-详情
{
path: '/memberCenter/logisticsAbility/logistics/template/detail',
name: 'templateDetail',
name: '运费模板-详情',
component: '@/pages/logistics/list/components/templateForm',
hideInMenu: true
},
......@@ -125,38 +131,38 @@ const LogisticsRoute: RouterChild = {
// 物流单提交
{
path: '/memberCenter/logisticsAbility/logisticsSubmit',
name: 'logisticsSubmit',
name: '物流单提交',
routes: [
// 快递单查询
{
path: '/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList',
name: 'orderSubmitSearchList',
name: '快递单查询',
component: '@/pages/logistics/logisticsSubmit/orderSearchList',
},
// 快递单查询-详情
{
path: '/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail',
name: 'orderSubmitDeatil',
name: '快递单查询-详情',
component: '@/pages/logistics/components/orderSearchDetail',
hideInMenu: true
},
// 待提交物流单
{
path: '/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList',
name: 'toOrderSumitList',
name: '待提交物流单',
component: '@/pages/logistics/logisticsSubmit/toOrderSumitList',
},
// 待提交物流单-新增
{
path: '/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add',
name: 'addToOrderSubmit',
name: '待提交物流单-新增',
component: '@/pages/logistics/addLogistics',
hideInMenu: true
},
// 待提交物流单-编辑
{
path: '/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/edit',
name: 'editToOrderSubmit',
name: '待提交物流单-编辑',
component: '@/pages/logistics/addLogistics',
hideInMenu: true
},
......@@ -166,38 +172,38 @@ const LogisticsRoute: RouterChild = {
// 物流单处理
{
path: '/memberCenter/logisticsAbility/logisticsResult',
name: 'logisticsResult',
name: '物流单处理',
routes: [
// 快递单查询
{
path: '/memberCenter/logisticsAbility/logisticsResult/orderResultSearchList',
name: 'orderResultSearchList',
name: '快递单查询',
component: '@/pages/logistics/logisticsResult/orderSearchList',
},
// 快递单查询-详情
{
path: '/memberCenter/logisticsAbility/logisticsResult/orderResultSearchList/detail',
name: 'orderResultDeatil',
name: '快递单查询-详情',
component: '@/pages/logistics/components/orderSearchDetail',
hideInMenu: true
},
// 待确认物流单
{
path: '/memberCenter/logisticsAbility/logisticsResult/toOrderComfirmList',
name: 'toOrderComfirmList',
name: '待确认物流单',
component: '@/pages/logistics/logisticsResult/toOrderComfirmList',
},
// 待确认物流单-详情
{
path: '/memberCenter/logisticsAbility/logisticsResult/toOrderComfirmList/detail',
name: 'orderResultDeatil',
name: '待确认物流单-详情',
component: '@/pages/logistics/components/orderSearchDetail',
hideInMenu: true
},
// 待确认物流单-详情
{
path: '/memberCenter/logisticsAbility/logisticsResult/toOrderComfirmList/option',
name: 'orderResultDeatil',
name: '待确认物流单-详情',
component: '@/pages/logistics/components/orderSearchDetail',
hideInMenu: true
},
......
.category_select_line {
display: flex;
&:not(:last-child) {
margin-bottom: 16px;
}
.opration_btn {
width: 32px;
height: 32px;
background: rgba(250, 251, 252, 1);
border: 1px solid rgba(235, 236, 240, 1);
color: #909399;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
margin-right: 16px;
cursor: pointer;
&:hover {
opacity: .8;
}
&.add {
background: rgba(0, 179, 122, 1);
border: 1px solid rgba(0, 179, 122, 1);
color: #ffffff;
}
}
}
import React, { forwardRef, Fragment, useState, useEffect } from 'react';
import { Select } from 'antd';
import { PlusOutlined, MinusOutlined } from '@ant-design/icons'
import cx from 'classnames'
import style from './index.less';
import { isEmpty } from '@formily/antd/esm/shared'
import { PublicApi } from '@/services/api';
const { Option } = Select;
interface CategorySelectPropsType {
dataSource: Array<{
firstId: number;
firstName: string;
secondId: number;
secondName: string;
thirdlyId: number,
thirdlyName: string;
index: number;
}>,
onAdded?: Function,
onReduce?: Function,
onChange?: Function,
}
const CategoryCascader: React.FC<CategorySelectPropsType> = (props) => {
const { dataSource, onAdded, onReduce, onChange } = props;
const [firstData, setFirstData] = useState([]);
const [secondData, setSecondData] = useState({});
const [thirdlyData, setThirdlyData] = useState({});
useEffect(() => {
fetchCategoryList()
}, [])
const getFirstById = (id: number) => {
let result = 0
firstData && firstData.map(item => {
if (item.value === id) {
result = item
}
})
return result
}
const getSecondById = (id: number, firstId: string) => {
let result = 0
!isEmpty(secondData) && secondData[firstId].map(item => {
if (item.value === id) {
result = item
}
})
return result
}
const getThirdlyById = (id: number, secondId: string) => {
let result = 0
!isEmpty(thirdlyData) && thirdlyData[secondId].map(item => {
if (item.value === id) {
result = item
}
})
return result
}
const fetchCategoryList = () => {
PublicApi.getProductCustomerGetCustomerCategoryTree().then(res => {
initCategoryData(res.data)
})
}
const initCategoryData = (categoryList: any) => {
if (!categoryList) {
return
}
const tmpfirstData = [];
const tempSecondData = {}
const tempThirdlyData = {}
for (const item of categoryList) {
tmpfirstData.push({
lable: item.title,
value: Number(item.id)
})
if (item.children) {
const tempsecondList = [];
for (const secondItem of item.children) {
tempsecondList.push({
lable: secondItem.title,
value: Number(secondItem.id)
})
if (secondItem.children) {
const tempThirdlyList = [];
for (const thirdlyItem of secondItem.children) {
tempThirdlyList.push({
lable: thirdlyItem.title,
value: Number(thirdlyItem.id)
})
}
tempThirdlyData[secondItem.id] = tempThirdlyList;
}
}
tempSecondData[item.id] = tempsecondList
}
}
console.log(tmpfirstData, tempSecondData, tempSecondData)
setFirstData(tmpfirstData);
setSecondData(tempSecondData);
setThirdlyData(tempThirdlyData);
}
const handleFirstChange = (value: number, index: number) => {
const newData = JSON.parse(JSON.stringify(dataSource));
const firstById: any = getFirstById(value);
newData.map((item: any) => {
if (item.index === index) {
item.firstId = value
item.firstName = firstById.lable
if (!isEmpty(secondData[firstById.value])) {
item.secondId = secondData[firstById.value][0].value
item.secondName = secondData[firstById.value][0].lable
} else {
item.secondId = undefined
item.secondName = ''
}
if (!isEmpty(thirdlyData[secondData[firstById.value][0].value])) {
item.thirdlyId = thirdlyData[secondData[firstById.value][0].value][0].value
item.thirdlyName = thirdlyData[secondData[firstById.value][0].value][0].lable
}else {
item.thirdlyId = undefined
item.thirdlyName = ''
}
}
return item
})
onChange(newData)
}
const onSecondChange = (value: number, firstId: string, index: number) => {
const newData = JSON.parse(JSON.stringify(dataSource))
const secondById: any = getSecondById(value, firstId)
newData.map((item: any) => {
if (item.index === index) {
item.secondId = secondById.value;
item.secondName = secondById.lable;
if (!isEmpty(thirdlyData[secondById.value])) {
item.thirdlyId = thirdlyData[secondById.value][0].value
item.thirdlyName = thirdlyData[secondById.value][0].lable
} else {
item.thirdlyId = undefined
item.thirdlyName = ''
}
}
return item
})
onChange(newData)
}
const onThirdlyChange = (value: number, secondId: string, index: number) => {
const newData = JSON.parse(JSON.stringify(dataSource))
const thirdlyById: any = getThirdlyById(value, secondId)
newData.map((item: any) => {
if (item.index === index) {
item.thirdlyId = thirdlyById.value;
item.thirdlyName = thirdlyById.lable;
}
return item
})
onChange(newData)
}
const handleAddNewSelect = () => {
onAdded({ index: dataSource[dataSource.length - 1].index + 1, firstId: 0, secondId: 0, thirdlyId: 0, firstName: '', secondName: '', thirdlyName: '' })
}
const handleReduceSelect = (index: number) => {
if (dataSource.length > 1) {
onReduce(index)
}
}
return (
<Fragment>
{
dataSource && dataSource.map((item: any, index) => (
<div className={style.category_select_line} key={`dataSourceItem-${index}`}>
<Select
style={{ width: 180 }}
value={item.firstId ? item.firstId : undefined}
onChange={(value) => handleFirstChange(value, item.index)}
placeholder="请选择"
>
{firstData.map(item => (
<Option value={item.value} key={item.value}>{item.lable}</Option>
))}
</Select>
<Select
style={{ marginLeft: 16, width: 180 }}
value={item.secondId ? item.secondId : undefined}
onChange={(value) => onSecondChange(value, item.firstId, item.index)}
placeholder="请选择"
>
{(item.firstId && !isEmpty(secondData)) ? secondData[item.firstId] && secondData[item.firstId].map((item: any) => (
<Option value={item.value} key={item.value}>{item.lable}</Option>
)) : null}
</Select>
<Select
style={{ marginLeft: 16, marginRight: 24, width: 180 }}
value={item.thirdlyId ? item.thirdlyId : undefined}
onChange={(value) => onThirdlyChange(value, item.secondId, item.index)}
placeholder="请选择"
>
{(item.secondId && !isEmpty(thirdlyData)) ? thirdlyData[item.secondId] && thirdlyData[item.secondId].map((item: any) => (
<Option value={item.value} key={item.value}>{item.lable}</Option>
)) : null}
</Select>
{
index === dataSource.length - 1 && (
<div className={cx(style.opration_btn, style.add)} onClick={() => handleAddNewSelect()}>
<PlusOutlined />
</div>
)
}
<div className={style.opration_btn} onClick={() => handleReduceSelect(item.index)}>
<MinusOutlined />
</div>
</div>
))
}
</Fragment>
)
}
const CategorySelect: React.FC<CategorySelectPropsType> = forwardRef((props) => {
const { dataSource, onAdded, onReduce, onChange } = props;
return (
<div className={style.category_select}>
<CategoryCascader
dataSource={dataSource}
onAdded={onAdded}
onReduce={onReduce}
onChange={onChange}
/>
</div>
)
})
CategorySelect.displayName = 'CategorySelect';
export default CategorySelect;
.input_select_line {
display: flex;
&:not(:last-child) {
margin-bottom: 16px;
}
.opration_btn {
width: 32px;
height: 32px;
background: rgba(250, 251, 252, 1);
border: 1px solid rgba(235, 236, 240, 1);
color: #909399;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
margin-right: 16px;
cursor: pointer;
&:hover {
opacity: .8;
}
&.add {
background: rgba(0, 179, 122, 1);
border: 1px solid rgba(0, 179, 122, 1);
color: #ffffff;
}
}
}
import React, { forwardRef, Fragment } from 'react';
import { Input } from 'antd';
import cx from 'classnames'
import style from './index.less';
import { isEmpty } from '@formily/antd/esm/shared'
import { MinusOutlined, PlusOutlined } from '@ant-design/icons';
interface InputSelectPropsType {
dataSource: Array<string>,
onAdded?: Function,
onReduce?: Function,
onChange?: Function,
}
const InputCascader: React.FC<InputSelectPropsType> = (props: any) => {
const { dataSource, onAdded, onReduce, onChange } = props;
const handleAddNewSelect = () => {
onAdded('')
}
const handleReduceSelect = (index: number) => {
if (dataSource.length > 1) {
onReduce(index)
}
}
const handleChangeInput = (e: any, index: number) => {
const { value } = e.target;
const newData = [...dataSource]
newData[index] = value;
onChange(newData);
}
return (
<Fragment>
{
dataSource && dataSource.map((item: any, index: number) => (
<div className={style.input_select_line} key={`inputDataItem-${index}`}>
<Input
placeholder='最长20个字符,10 个汉字'
style={{ width: 572, marginRight: 24 }}
value={item}
onChange={(value) => handleChangeInput(value, index)}
/>
{
index === dataSource.length - 1 && (
<div className={cx(style.opration_btn, style.add)} onClick={() => handleAddNewSelect()}>
<PlusOutlined />
</div>
)
}
<div className={style.opration_btn} onClick={() => handleReduceSelect(index)}>
<MinusOutlined />
</div>
</div>
))
}
</Fragment>
)
}
const InputSelect: React.FC<InputSelectPropsType> = forwardRef((props) => {
const { dataSource, onAdded, onReduce, onChange } = props;
return (
<div>
<InputCascader dataSource={dataSource} onAdded={onAdded} onReduce={onReduce} onChange={onChange} />
</div>
)
})
InputSelect.displayName = "InputSelect";
export default InputSelect
......@@ -521,15 +521,15 @@ export const ORDER_TYPE2_CHANNEL_POINTS = 8;
/**
* 采购询价合同
*/
export const ORDER_TYPE2_ENQUIRY_CONTRACT = 9;
/**
* 采购竞价合同
*/
export const ORDER_TYPE2_BIDDING_CONTRACT = 10;
/**
* 采购招标合同
*/
export const ORDER_TYPE2_TENDER_CONTRACT = 11;
export const ORDER_TYPE2_ENQUIRY_CONTRACT = 9;
/**
* 采购竞价合同
*/
export const ORDER_TYPE2_BIDDING_CONTRACT = 10;
/**
* 采购招标合同
*/
export const ORDER_TYPE2_TENDER_CONTRACT = 11;
export const ORDER_TYPE2 = {
[ORDER_TYPE2_INQUIRY]: '询价采购',
......@@ -660,17 +660,17 @@ export enum OrderModalType {
/**
* 采购询价合同下单
*/
PURCHASE_ENQUIRY_CONTRACT_ORDER = 32,
PURCHASE_ENQUIRY_CONTRACT_ORDER = 32,
/**
* 采购招标合同下单
*/
PURCHASE_TENDER_CONTRACT_ORDER = 33,
PURCHASE_TENDER_CONTRACT_ORDER = 33,
/**
* 采购竞价合同下单
*/
PURCHASE_BIDDING_CONTRACT_ORDER = 34,
PURCHASE_BIDDING_CONTRACT_ORDER = 34,
}
......@@ -1274,11 +1274,11 @@ export const BILL_TRADE_OPERATION_ORDER_PAY = 1;
/**
* 订单退款
*/
export const BILL_TRADE_OPERATION_ORDER_RETURN= 2;
export const BILL_TRADE_OPERATION_ORDER_RETURN = 2;
/**
* 还款
*/
export const BILL_TRADE_OPERATION_REPAYMENT= 3;
export const BILL_TRADE_OPERATION_REPAYMENT = 3;
export const BILL_TRADE_OPERATION = {
[BILL_TRADE_OPERATION_ORDER_PAY]: '订单支付',
[BILL_TRADE_OPERATION_ORDER_RETURN]: '订单退款',
......@@ -1297,7 +1297,7 @@ export const CREDIT_INNER_STATUS_COMMITTED_FAILED = 2;
/**
* 提交审核成功
*/
export const CREDIT_INNER_STATUS_COMMITTED_SUCCESS= 3;
export const CREDIT_INNER_STATUS_COMMITTED_SUCCESS = 3;
/**
* 一级审核失败
*/
......@@ -1955,10 +1955,10 @@ export const PAY_WAY_DEADLINE = 5;
/**
* 月结
*/
export const PAY_WAY_MONTH = 6;
/**
* 合同内清算
*/
export const PAY_WAY_MONTH = 6;
/**
* 合同内清算
*/
export const PAY_WAY_CONTRACT = 7;
/**
......@@ -2084,8 +2084,8 @@ export enum BidInsideWorkState {
Qualifications_Check_Pass = 8,
/** 资格预审审核不通过 */
Qualifications_Check_Not_Pass = 9,
/** 待专家评标 */
Not_Selection_Tender = 10,
/** 待专家评标 */
Not_Selection_Tender = 10,
/** 待提交评标报告 */
Submitted_Selection_Tender = 11,
/** 待提交审核定标 */
......@@ -2297,3 +2297,33 @@ export enum DOORTYPE {
/** 采购门户 */
PROCUREMENT_DOORTYPE
}
/** 年加工额 */
export const yearProcessAmount = [
{ label: '50万以下', value: 1 },
{ label: '50万-100万', value: 2 },
{ label: '101万-500万', value: 3 },
{ label: '501万-1000万', value: 4 },
{ label: '1001万-2000万', value: 5 },
{ label: '2000万以上', value: 6 },
]
/** 厂房面积 */
export const plantArea = [
{ label: '100平以下', value: 1 },
{ label: '100平-200平', value: 2 },
{ label: '201平-500平', value: 3 },
{ label: '501平-1000平', value: 4 },
{ label: '1001平-5000平', value: 5 },
{ label: '5000平以上', value: 6 },
]
/** 员工人数 */
export const staffNum = [
{ label: '10人以下', value: 1 },
{ label: '10-50人', value: 2 },
{ label: '51-100人', value: 3 },
{ label: '101-500人', value: 4 },
{ label: '501-1000人', value: 5 },
{ label: '1000人以上', value: 6 },
]
......@@ -121,3 +121,42 @@
}
}
}
.revise_style {
.upload_data {
width: 575px;
.upload_item {
padding: 5px 8px;
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #ecf7ff;
.upload_left {
display: flex;
align-items: center;
color: #303133;
:global {
.anticon-file-word {
color: #4279df;
font-size: 20px;
margin-right: 8px;
}
}
}
.upload_right {
color: #00B37A;
cursor: pointer;
:global {
.anticon-delete {
margin-left: 19px;
color: #C0C4CC;
}
}
}
}
}
}
import React, { useState, useEffect } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Form, Input, Button, Tooltip, Select, message } from 'antd'
import { Form, Input, Button, Tooltip, Select, message, Upload, Typography } from 'antd'
import { Prompt } from 'umi'
import { inject } from 'mobx-react'
import { QuestionCircleOutlined, DeleteOutlined, CopyOutlined } from '@ant-design/icons'
import { QuestionCircleOutlined, DeleteOutlined, CopyOutlined, LinkOutlined, UploadOutlined } from '@ant-design/icons'
import CitySelect from '@/components/CitySelect'
import RequireItem from '@/components/RequireItem'
import { PublicApi } from '@/services/api'
import UploadImage from '@/components/UploadImage'
import { MALL_TYPE } from '@/constants'
import { MALL_TYPE, UPLOAD_TYPE } from '@/constants'
import copy from 'copy-to-clipboard'
import cx from 'classnames'
import styles from './index.less'
......@@ -41,6 +41,34 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
const [shopInfo, setShopInfo] = useState<GetTemplateWebMemberChannelWebFindCurrMemberChannelResponse>()
const [shopId, setShopId] = useState<number>()
/** 上传公司画册 */
const [file, setFile] = useState<any>({});
const [fileLoading, setFileLoading] = useState<boolean>(false);
const beforeDocUpload = (file: any) => {
const isLt50M = file.size / 1024 / 1024 < 50;
if (!isLt50M) {
message.error('上传文件大小不超过 50M!');
}
return isLt50M;
}
const handleChange = ({ file }) => {
setFileLoading(true);
if (file.response) {
if (file.response.code !== 1000) {
setFileLoading(false);
return
}
setFileLoading(false);
setFile({
albumName: file.name,
albumUrl: file.response.data,
})
}
}
const fileRemove = () => {
setFile({})
}
useEffect(() => {
fetchShopInfo()
fetchAllShop()
......@@ -63,33 +91,41 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
* 获取渠道信息
*/
const fetchShopInfo = () => {
const { memberId } = getAuth() || {}
const { memberId } = getAuth() || {}
const param: any = {
memberId
}
PublicApi.getTemplateWebMemberChannelWebFindCurrMemberChannel(param).then(res => {
const data = res.data
if (res.code === 1000) {
setShopInfo(data)
setSelectCityData(initMemberShopArea(data.memberChannelAreas))
setLogo(data.logo)
setShopId(data.shopId)
setWorkshopPics(data.workshopPics || [])
setHonorPics(data.honorPics || [])
setStoreUrl("")
setPromotionPic(data.promotionPic || "")
form.setFieldsValue({
describe: data.describe,
customerUrl: data.customerUrl,
logo: data.logo,
memberChannelAreas: initMemberShopArea(data.memberChannelAreas),
workshopPics: data.workshopPics || [],
honorPics: data.honorPics || [],
phone: data.phone || "",
address: data.address || "",
lng: data.lng || "",
lat: data.lat || "",
})
if (data) {
setShopInfo(data)
setSelectCityData(initMemberShopArea(data.memberChannelAreas))
setLogo(data.logo)
setShopId(data.shopId)
setWorkshopPics(data.workshopPics || [])
setHonorPics(data.honorPics || [])
setStoreUrl("")
setPromotionPic(data.promotionPic || "")
if (data.albumName && data.albumUrl) {
setFile({
albumName: data.albumName,
albumUrl: data.albumUrl
})
}
form.setFieldsValue({
describe: data.describe,
customerUrl: data.customerUrl,
logo: data.logo,
memberChannelAreas: initMemberShopArea(data.memberChannelAreas),
workshopPics: data.workshopPics || [],
honorPics: data.honorPics || [],
phone: data.phone || "",
address: data.address || "",
lng: data.lng || "",
lat: data.lat || "",
})
}
}
})
}
......@@ -154,14 +190,10 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
if (!checkmemberChannelAreas(value.memberChannelAreas)) {
return
}
// if (!shopId) {
// message.error("店铺链接不能为空")
// return
// }
value.storeUrl = storeUrl || `${siteUrl}/${GlobalConfig.channelRootRoute}`
value.shopId = shopId
value.albumName = file.albumName;
value.albumUrl = file.albumUrl;
setConfirmLoading(true)
setConfirmLoading(true)
PublicApi.postTemplateWebMemberChannelWebSaveCurrMemberChannel(value).then(res => {
if (res.code === 1000) {
fetchShopInfo()
......@@ -284,7 +316,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
if (!shopInfo) {
return null
}
if (shopId && shopInfo.shopId && shopInfo.memberId) {
if (shopId && shopInfo.memberId) {
const resUrl = getMallItemAndSetUrl(shopId)
return resUrl ? (
<div className={styles.shop_url}>
......@@ -402,6 +434,44 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
</Form.Item>
<Form.Item
labelAlign="left"
name="albumName"
label={<RequireItem label="宣传画册" />}
className={styles.revise_style}
>
<div className={styles.upload_data}>
{Object.keys(file).length > 0 && (
<div className={styles.upload_item}>
<div className={styles.upload_left}>
<LinkOutlined style={{ marginRight: '5px'}} />
<Typography.Link
href={`/api/contract/contractTemplate/downloadContract?contractName=${file.albumName}&contractUrl=${file.albumURL}`}
target="_blank"
>
{file.albumName}
</Typography.Link>
</div>
<div className={styles.upload_right} onClick={fileRemove}>
<DeleteOutlined />
</div>
</div>
)}
</div>
{Object.keys(file).length === 0 && (
<Upload
action="/api/file/file/upload"
data={{ fileType: UPLOAD_TYPE }}
showUploadList={false}
accept='.pdf'
beforeUpload={beforeDocUpload}
onChange={handleChange}
>
<Button loading={fileLoading} icon={<UploadOutlined />}>上传文件</Button>
<div style={{ marginTop: '8px' }}>一次上传一个文件,每个附件大小不能超过 50M</div>
</Upload>
)}
</Form.Item>
<Form.Item
labelAlign="left"
name="shopId"
label={<RequireItem label="店铺链接" />}
>
......@@ -417,67 +487,6 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
}
</Form.Item>
<Form.Item
labelAlign="left"
name="promotionPic"
label={<RequireItem label="推广页" />}
>
<div className={styles.form_item_wrap}>
<div className={styles.img_list}>
{
promotionPic && (
<div className={cx(styles.upload_btn, styles.large, styles.upload)}>
<div className={styles.delete_btn} onClick={() => setPromotionPic("")}><DeleteOutlined /></div>
<img className={styles.upload_img} src={promotionPic} />
</div>
)
}
<UploadImage
imgUrl={""}
large={true}
fileMaxSize={1024}
size="106x107"
onChange={(url) => handleAddPromotionPic(url)}
/>
</div>
</div>
</Form.Item>
<Form.Item
labelAlign="left"
name="customerUrl"
label={<RequireItem label="客服链接" />}
rules={[{ pattern: /(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-.,@?^=%&:/~+#]*[\w\-@?^=%&/~+#])?/, message: '请输入正确的客服链接' }]}
>
<Input allowClear autoComplete="off" className={styles.form_item} />
</Form.Item>
<Form.Item
labelAlign="left"
name="phone"
label={<RequireItem label="联系电话" />}
>
<Input allowClear autoComplete="off" className={styles.form_item} />
</Form.Item>
<Form.Item
labelAlign="left"
name="address"
label={<RequireItem label="详细地址" />}
>
<Input allowClear autoComplete="off" className={styles.form_item} />
</Form.Item>
<Form.Item
labelAlign="left"
name="lng"
label={<RequireItem label="经度" />}
>
<Input allowClear autoComplete="off" className={styles.form_item} />
</Form.Item>
<Form.Item
labelAlign="left"
name="lat"
label={<RequireItem label="纬度" />}
>
<Input allowClear autoComplete="off" className={styles.form_item} />
</Form.Item>
<Form.Item
label={<RequireItem label="" />}
>
<Button loading={confirmLoading} type="primary" style={{ marginRight: 16 }} onClick={handleSave}>保存</Button>
......
import React, { useEffect, useState } from 'react';
import { history, Prompt } from 'umi';
import { Card, Button, Tabs, Form, Select, Tooltip, Input, Typography } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ReutrnEle from '@/components/ReturnEle';
import RequireItem from '@/components/RequireItem';
import { QuestionCircleOutlined } from '@ant-design/icons';
import { SELECT_NAME, DOORTYPE } from '@/constants';
import { PublicApi } from '@/services/api';
const { TabPane } = Tabs
const layout: any = {
colon: false,
labelCol: { style: { width: '174px' } },
wrapperCol: { span: 9 },
labelAlign: "left"
}
const ChannelSeoAdded = () => {
const { query: { id }, pathname } = history.location;
const link = pathname.split('/')[pathname.split('/').length - 1];
const [form] = Form.useForm()
const [confirmLoading, setConfirmLoading] = useState<boolean>(false);
const [formIsHalfFilledOut, setFormIsHalfFilledOut] = useState<boolean>(false);
const handleFormValueChange = () => {
setFormIsHalfFilledOut(true)
}
const handleSave = (e: any) => {
e.preventDefault()
const fetch = (link === 'add' ? PublicApi.postTemplateWebSeoWebAdd : PublicApi.postTemplateWebSeoWebUpdate);
form.validateFields().then((value: any) => {
const type: number = value.type;
const link: string = value.link;
const params = {
id,
...value,
link: `http://${link}`,
doorType: DOORTYPE.PLACE_DOORTYPE,
name: SELECT_NAME[type]
}
setConfirmLoading(true)
fetch(params).then(res => {
if (res.code !== 1000) {
setConfirmLoading(false);
return
}
setConfirmLoading(false)
setFormIsHalfFilledOut(false)
history.goBack();
}).catch(() => {
setConfirmLoading(false)
})
})
}
useEffect(() => {
if (id) {
PublicApi.getTemplateWebSeoWebGet({ id }).then(res => {
if (res.code !== 1000) {
return
}
form.setFieldsValue({...res.data})
})
}
}, [])
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
extra={
link !== 'detail' && <Button type="primary" loading={confirmLoading} onClick={handleSave}> 保存</Button>
}
>
<Prompt when={formIsHalfFilledOut} message="您还有未保存的内容,是否确定要离开?" />
<Card>
<Tabs
type="card"
>
<TabPane tab='基本信息' key='1'>
<Form
{...layout}
form={form}
hideRequiredMark={true}
onValuesChange={handleFormValueChange}
>
<Form.Item
name='type'
label={<RequireItem label="页面名称" isRequire={true} />}
rules={[{ required: true, message: "请选择页面名称" }]}
>
<Select disabled={link === 'detail'}>
<Select.Option value={1}>店铺首页</Select.Option>
<Select.Option value={2}>关于我们</Select.Option>
</Select>
</Form.Item>
<Form.Item
name='link'
label={<RequireItem label="访问链接" brief={<Tooltip placement="top" title="访问该页面的链接"><QuestionCircleOutlined /></Tooltip>} />}
>
<Input disabled={link === 'detail'} addonBefore={<Typography.Text type='secondary'>http://</Typography.Text>} />
</Form.Item>
<Form.Item
name='title'
label={<RequireItem label="标题" isRequire={true} brief={<Tooltip placement="top" title="用于显示在页面title标签的内容,便于搜索引擎抓取"><QuestionCircleOutlined /></Tooltip>} />}
rules={[{ required: true, message: "请输入标题" }]}
>
<Input disabled={link === 'detail'} placeholder='最长100个字符,50个汉字' />
</Form.Item>
<Form.Item
name='description'
label={<RequireItem label="描述" isRequire={true} brief={<Tooltip placement="top" title="用于显示在页面Description标签的内容,便于搜索引擎抓取"><QuestionCircleOutlined /></Tooltip>} />}
rules={[{ required: true, message: "请输入描述" }]}
>
<Input.TextArea disabled={link === 'detail'} rows={5} placeholder="最长200个字符,100个汉字" maxLength={200} />
</Form.Item>
<Form.Item
name='keywords'
label={<RequireItem label="关键字" isRequire={true} brief={<Tooltip placement="top" title="用于显示在页面Keywords标签的内容,便于搜索引擎通过关键词搜索时抓取页面,多个关键词用豆号分隔"><QuestionCircleOutlined /></Tooltip>} />}
rules={[{ required: true, message: "请输入关键字" }]}
>
<Input.TextArea disabled={link === 'detail'} rows={5} placeholder="最长200个字符,100个汉字" maxLength={200} />
</Form.Item>
</Form>
</TabPane>
</Tabs>
</Card>
</PageHeaderWrapper>
)
}
export default ChannelSeoAdded;
import React, { ReactNode, useRef } from 'react';
import { ISchema } from '@formily/antd';
import { history } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Row, Col, Button, Popconfirm, Typography } from 'antd';
import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
import { PublicApi } from '@/services/api';
import NiceForm from '@/components/NiceForm';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { searchSelectGetSelectCategoryOptionEffect } from '@/pages/transaction/effect/index';
import { PauseCircleOutlined, PlayCircleOutlined, PlusOutlined } from '@ant-design/icons';
const ChannelSeo = () => {
const ref = useRef<any>({});
const formActions = createFormActions();
/** 修改状态 */
const confirm = (e: any) => {
const status = e.status === 1 ? 0 : 1;
PublicApi.postTemplateWebSeoWebUpdateStatus({ id: e.id, status }).then(res => {
if (res.code !== 1000) {
return
}
ref.current.reload();
})
}
/** 删除 */
const handleDelete = (id: number) => {
PublicApi.postTemplateWebSeoWebDelete({ id }).then(res => {
if (res.code !== 1000) {
return
}
ref.current.reload();
})
}
const columns: ColumnType<any>[] = [
{
title: 'ID',
key: 'id',
dataIndex: 'id',
width: 128,
},
{
title: '页面名称',
key: 'name',
dataIndex: 'name',
render: (text: any,record: any) => <Typography.Link href={`/memberCenter/shopAbility/shopSeo/detail?id=${record.id}`}>{text}</Typography.Link>
},
{
title: '访问链接',
key: 'link',
dataIndex: 'link',
},
{
title: '状态',
key: 'status',
dataIndex: 'status',
width: 256,
render: (text: any, record: any) => {
let component: ReactNode = null
component = (
<Popconfirm
title="确定要执行这个操作?"
onConfirm={() => confirm(record)}
okText="是"
cancelText="否"
>
<Button
type="link"
style={record.status === 1 ? { color: '#00B37A' } : { color: 'red' }}>
{record.status === 1 ? <>有效 <PlayCircleOutlined /></> : <>无效 <PauseCircleOutlined /></>}
</Button>
</Popconfirm>
)
return component
}
},
{
title: '操作',
key: 'action',
dataIndex: 'action',
width: 256,
render: (_text: any, record: any) => (
<>
<Popconfirm
title="确定要执行这个操作?"
onConfirm={() => handleDelete(record.id)}
disabled={record.status === 1}
okText="是"
cancelText="否"
>
<Button disabled={record.status === 1} type='link'>删除</Button>
</Popconfirm>
<Button disabled={record.status === 1} type='link' onClick={() => history.push(`/memberCenter/shopAbility/shopSeo/edit?id=${record.id}`)}>修改</Button>
</>
)
}
]
// 搜索
const search = (values: any) => {
ref.current.reload(values)
}
const fetchData = (params: any) => {
return new Promise(resolve => {
PublicApi.getTemplateWebSeoWebPage({ ...params, doorType: 2 }).then(res => {
resolve(res.data)
})
})
}
const controllerBtns = <Row>
<Col span={6}>
<Button
onClick={() => history.push('/memberCenter/shopAbility/shopSeo/add')}
type="primary"
icon={<PlusOutlined />}
>
新建
</Button>
</Col>
</Row>
const schema: ISchema = {
type: 'object',
properties: {
megalayout: {
type: 'object',
"x-component": 'mega-layout',
"x-component-props": {
grid: true
},
properties: {
ctl: {
type: 'object',
"x-component": "Children",
"x-component-props": {
children: "{{controllerBtns}}"
}
},
name: {
type: 'string',
"x-component": "Search",
"x-mega-props": {
},
"x-component-props": {
placeholder: '页面名称',
advanced: false
}
}
}
}
}
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
expressionScope={{ controllerBtns }}
onSubmit={values => search(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'name', FORM_FILTER_PATH)
FormEffectHooks.onFieldChange$('category').subscribe(state => {
searchSelectGetSelectCategoryOptionEffect(actions, 'category')
})
}}
schema={schema}
>
</NiceForm>
}
/>
</Card>
</PageHeaderWrapper >
)
}
export default ChannelSeo;
.handling_info {
background-color: #ffffff;
padding: 32px 24px;
border-radius: 8px;
.add_template_form {
:global {
.ant-form-item-label>label::after {
display: none;
}
}
}
.form_item {
width: 572px;
resize: none;
}
.form_item_wrap {
display: flex;
flex-wrap: wrap;
align-items: center;
.size_require {
color: #C0C4CC;
}
}
.img_list {
display: flex;
flex-wrap: wrap;
}
.index_pics_list {
display: flex;
align-items: center;
}
.jump_link {
flex: 1;
}
.shop_url {
width: 572px;
color: #909399;
margin-top: 16px;
font-size: 12px;
display: flex;
&>label {
flex: 1;
width: 0;
display: block;
color: #303133;
margin-left: 8px;
margin-right: 15px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.copy_icon {
cursor: pointer;
}
}
.upload_btn {
position: relative;
width: 104px;
height: 104px;
display: flex;
align-items: center;
justify-content: center;
color: #909399;
flex-direction: column;
background: rgba(250, 251, 252, 1);
border-radius: 2px;
border: 1px dashed rgba(223, 225, 230, 1);
cursor: pointer;
margin-right: 24px;
overflow: hidden;
margin-bottom: 12px;
&.upload {
border: 1px solid rgba(223, 225, 230, 1);
background: #ffffff;
}
.upload_img {
height: 100%;
width: 100%;
display: block;
margin: 0 auto;
background-size: auto 100%;
background-position: center center;
background-repeat: no-repeat;
}
&>img {
width: 100%;
height: 100%;
}
&.large {
width: 175px;
height: 120px;
}
&>p {
margin-top: 12px;
}
.delete_btn {
position: absolute;
width: 24px;
height: 24px;
border-radius: 4px;
background: rgba(0, 0, 0, 0.45);
top: 8px;
right: 8px;
color: #ffffff;
text-align: center;
line-height: 24px;
&:hover {
cursor: pointer;
opacity: .8;
}
}
}
}
.revise_style {
.upload_data {
width: 575px;
.upload_item {
padding: 5px 8px;
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #ecf7ff;
.upload_left {
display: flex;
align-items: center;
color: #303133;
:global {
.anticon-file-word {
color: #4279df;
font-size: 20px;
margin-right: 8px;
}
}
}
.upload_right {
color: #00B37A;
cursor: pointer;
:global {
.anticon-delete {
margin-left: 19px;
color: #C0C4CC;
}
}
}
}
}
}
This diff is collapsed.
.logistics_info {
background-color: #ffffff;
padding: 32px 24px;
border-radius: 8px;
.add_template_form {
:global {
.ant-form-item-label>label::after {
display: none;
}
}
}
.form_item {
width: 572px;
resize: none;
}
.form_item_wrap {
display: flex;
flex-wrap: wrap;
align-items: center;
.size_require {
color: #C0C4CC;
}
}
.img_list {
display: flex;
flex-wrap: wrap;
}
.index_pics_list {
display: flex;
align-items: center;
}
.jump_link {
flex: 1;
}
.shop_url {
width: 572px;
color: #909399;
margin-top: 16px;
font-size: 12px;
display: flex;
&>label {
flex: 1;
width: 0;
display: block;
color: #303133;
margin-left: 8px;
margin-right: 15px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.copy_icon {
cursor: pointer;
}
}
.upload_btn {
position: relative;
width: 104px;
height: 104px;
display: flex;
align-items: center;
justify-content: center;
color: #909399;
flex-direction: column;
background: rgba(250, 251, 252, 1);
border-radius: 2px;
border: 1px dashed rgba(223, 225, 230, 1);
cursor: pointer;
margin-right: 24px;
overflow: hidden;
margin-bottom: 12px;
&.upload {
border: 1px solid rgba(223, 225, 230, 1);
background: #ffffff;
}
.upload_img {
height: 100%;
width: 100%;
display: block;
margin: 0 auto;
background-size: auto 100%;
background-position: center center;
background-repeat: no-repeat;
}
&>img {
width: 100%;
height: 100%;
}
&.large {
width: 175px;
height: 120px;
}
&>p {
margin-top: 12px;
}
.delete_btn {
position: absolute;
width: 24px;
height: 24px;
border-radius: 4px;
background: rgba(0, 0, 0, 0.45);
top: 8px;
right: 8px;
color: #ffffff;
text-align: center;
line-height: 24px;
&:hover {
cursor: pointer;
opacity: .8;
}
}
}
}
.revise_style {
.upload_data {
width: 575px;
.upload_item {
padding: 5px 8px;
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #ecf7ff;
.upload_left {
display: flex;
align-items: center;
color: #303133;
:global {
.anticon-file-word {
color: #4279df;
font-size: 20px;
margin-right: 8px;
}
}
}
.upload_right {
color: #00B37A;
cursor: pointer;
:global {
.anticon-delete {
margin-left: 19px;
color: #C0C4CC;
}
}
}
}
}
}
This diff is collapsed.
import React, { useState, useEffect } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Form, Input, Button, Tooltip, Select, message, Upload } from 'antd'
import { Form, Input, Button, Tooltip, Select, message, Upload, Typography } from 'antd'
import { Prompt } from 'umi'
import { inject } from 'mobx-react'
import { QuestionCircleOutlined, DeleteOutlined, CopyOutlined, UploadOutlined, LinkOutlined } from '@ant-design/icons'
......@@ -98,28 +98,36 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
PublicApi.getTemplateWebMemberShopWebFindCurrMemberShop(param).then(res => {
const data: any = res.data
if (res.code === 1000) {
setShopInfo(data)
setSelectCityData(initMemberShopArea(data.memberShopAreas))
setLogo(data.logo)
setShopId(data.shopId)
setWorkshopPics(data.workshopPics || [])
setHonorPics(data.honorPics || [])
setPromotionPic(data.promotionPic || "")
if (data.shopId && data.memberId) {
setStoreUrl(data.storeUrl || "")
if (data) {
setShopInfo(data)
setSelectCityData(initMemberShopArea(data.memberShopAreas))
setLogo(data.logo)
setShopId(data.shopId)
setWorkshopPics(data.workshopPics || [])
setHonorPics(data.honorPics || [])
setPromotionPic(data.promotionPic || "")
if (data.shopId && data.memberId) {
setStoreUrl(data.storeUrl || "")
}
if (data.albumName && data.albumUrl) {
setFile({
albumName: data.albumName,
albumUrl: data.albumUrl
})
}
form.setFieldsValue({
describe: data.describe,
customerUrl: data.customerUrl,
logo: data.logo,
memberShopAreas: initMemberShopArea(data.memberShopAreas),
workshopPics: data.workshopPics || [],
honorPics: data.honorPics || [],
phone: data.phone || "",
address: data.address || "",
lng: data.lng || "",
lat: data.lat || "",
})
}
form.setFieldsValue({
describe: data.describe,
customerUrl: data.customerUrl,
logo: data.logo,
memberShopAreas: initMemberShopArea(data.memberShopAreas),
workshopPics: data.workshopPics || [],
honorPics: data.honorPics || [],
phone: data.phone || "",
address: data.address || "",
lng: data.lng || "",
lat: data.lat || "",
})
}
})
}
......@@ -251,8 +259,6 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
const handleMallSelectChange = (mallId: number) => {
setShopId(mallId)
// let selectItem = allMallList.filter(item => item.id === mallId)
setShopId(mallId)
if (!shopInfo) {
return null
}
......@@ -424,8 +430,13 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
{Object.keys(file).length > 0 && (
<div className={styles.upload_item}>
<div className={styles.upload_left}>
<LinkOutlined />
<span>{file.albumName}</span>
<LinkOutlined style={{ marginRight: '5px' }} />
<Typography.Link
href={`/api/contract/contractTemplate/downloadContract?contractName=${file.albumName}&contractUrl=${file.albumURL}`}
target="_blank"
>
{file.albumName}
</Typography.Link>
</div>
<div className={styles.upload_right} onClick={fileRemove}>
<DeleteOutlined />
......
......@@ -31,9 +31,11 @@ const ShopSeoAdded = () => {
const fetch = (link === 'add' ? PublicApi.postTemplateWebSeoWebAdd : PublicApi.postTemplateWebSeoWebUpdate);
form.validateFields().then((value: any) => {
const type: number = value.type;
const link: string = value.link;
const params = {
id,
...value,
link: `http://${link}`,
doorType: DOORTYPE.STORE_DOORTYPE,
name: SELECT_NAME[type]
}
......
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