Commit 002d9840 authored by Bill's avatar Bill

修改加工bug

parent ff482d7f
registry = "http://10.0.0.19:7001" registry = "http://10.0.0.19:4873"
# registry = "https://registry.npmjs.org/"
...@@ -237,6 +237,13 @@ const HandlingRoute = { ...@@ -237,6 +237,13 @@ const HandlingRoute = {
icon: 'smile', icon: 'smile',
component: '@/pages/handling/assign/processStock', component: '@/pages/handling/assign/processStock',
}, },
{
path: '/memberCenter/handling/confirm/pendingAddLogistics/detail',
name: 'pendingAddLogisticsDetail',
icon: 'smile',
component: '@/pages/handling/assign/detail',
hideInMenu: true,
},
// 确认生产通知单 -> 待发货生产通知单 // 确认生产通知单 -> 待发货生产通知单
{ {
path: '/memberCenter/handling/confirm/pendingDelivered', path: '/memberCenter/handling/confirm/pendingDelivered',
......
...@@ -57,4 +57,4 @@ const memberCenterRoute = { ...@@ -57,4 +57,4 @@ const memberCenterRoute = {
], ],
} }
export default memberCenterRoute export default memberCenterRoute
\ No newline at end of file
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
"bizcharts": "^4.0.14", "bizcharts": "^4.0.14",
"copy-to-clipboard": "^3.3.1", "copy-to-clipboard": "^3.3.1",
"crypto-js": "^4.0.0", "crypto-js": "^4.0.0",
"god": "0.2.2", "god": "^0.2.2",
"immutability-helper": "^3.1.1", "immutability-helper": "^3.1.1",
"lingxi-design": "^1.0.8", "lingxi-design": "^1.0.8",
"lingxi-design-ui": "^1.1.15", "lingxi-design-ui": "^1.1.15",
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
"express": "^4.17.1", "express": "^4.17.1",
"fs-extra": "^9.0.1", "fs-extra": "^9.0.1",
"glob": "^7.1.6", "glob": "^7.1.6",
"god-upload-scp": "^1.2.0", "god-upload-scp": "^1.0.1",
"god-yapi2ts": "1.9.0", "god-yapi2ts": "1.9.0",
"gulp": "^4.0.2", "gulp": "^4.0.2",
"gulp-git": "^2.10.1", "gulp-git": "^2.10.1",
......
...@@ -6,7 +6,7 @@ import ProLayout, { ...@@ -6,7 +6,7 @@ import ProLayout, {
getMenuData, getMenuData,
getPageTitle getPageTitle
} from '@ant-design/pro-layout'; } from '@ant-design/pro-layout';
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect, useLayoutEffect } from 'react';
import { Link, useIntl } from 'umi'; import { Link, useIntl } from 'umi';
import RightContent from './components/RightContent'; import RightContent from './components/RightContent';
// import { ConnectState } from '@/models/connect'; // import { ConnectState } from '@/models/connect';
...@@ -70,7 +70,6 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => { ...@@ -70,7 +70,6 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
const [openKeys, setOpenKeys] = useState<string[]>([]) const [openKeys, setOpenKeys] = useState<string[]>([])
const [collapsed, setCollapsed] = useState(false) const [collapsed, setCollapsed] = useState(false)
const [selectedKeys, setSelectedKeys] = useState<string[] | undefined>([]); const [selectedKeys, setSelectedKeys] = useState<string[] | undefined>([]);
// 获取全局状态 // 获取全局状态
const [globalState, globalDispatch] = useGlobal() const [globalState, globalDispatch] = useGlobal()
...@@ -106,7 +105,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => { ...@@ -106,7 +105,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
const animationFrameId = requestAnimationFrame(() => { const animationFrameId = requestAnimationFrame(() => {
setSelectedKeys(keys); setSelectedKeys(keys);
}); });
return () => return () =>
window.cancelAnimationFrame && window.cancelAnimationFrame &&
window.cancelAnimationFrame(animationFrameId); window.cancelAnimationFrame(animationFrameId);
...@@ -129,7 +128,15 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => { ...@@ -129,7 +128,15 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
} else { } else {
setOpenKeys([]) setOpenKeys([])
} }
}, [currentRouter, collapsed]) }, [currentRouter, collapsed])
useLayoutEffect(() => {
if(location.pathname === '/memberCenter/home') {
setCollapsed(true)
} else {
setCollapsed(false);
}
}, [location.pathname])
return ( return (
<ProLayout <ProLayout
......
...@@ -492,6 +492,7 @@ export default { ...@@ -492,6 +492,7 @@ export default {
'menu.handling.confirm.createLogisticsOrder': '新建物流单', 'menu.handling.confirm.createLogisticsOrder': '新建物流单',
'menu.handling.confirm.pendingReceiptDetail': '待确认回单生产通知单详情', 'menu.handling.confirm.pendingReceiptDetail': '待确认回单生产通知单详情',
'menu.handling.assign.assignProductionEdit': '修改生产通知单', 'menu.handling.assign.assignProductionEdit': '修改生产通知单',
'menu.handling.confirm.pendingAddLogisticsDetail': '待新增物流单详情',
// 售后能力 // 售后能力
'menu.afterService': '售后', 'menu.afterService': '售后',
'menu.afterService.exchangeApplication': '换货申请', 'menu.afterService.exchangeApplication': '换货申请',
......
...@@ -152,8 +152,8 @@ const CorporateAccount = () => { ...@@ -152,8 +152,8 @@ const CorporateAccount = () => {
name: '账号名称', name: '账号名称',
dataIndex: 'name', dataIndex: 'name',
image: company, image: company,
value: data.name, value: data && data.name,
cacheValue: data.name, cacheValue: data && data.name,
isEdit: false, isEdit: false,
canEdit: false canEdit: false
}, },
...@@ -161,19 +161,19 @@ const CorporateAccount = () => { ...@@ -161,19 +161,19 @@ const CorporateAccount = () => {
name: '银行账号', name: '银行账号',
dataIndex: 'bankAccount', dataIndex: 'bankAccount',
image: bank_account, image: bank_account,
value: data.bankAccount, value: data && data.bankAccount,
cacheValue: data.bankAccount, cacheValue: data && data.bankAccount,
isEdit: false, isEdit: false,
canEdit: true, canEdit: true,
pattern: /^([1-9]{1})(\d{14}|\d{18})$/, pattern: /^([1-9]{1})(\d{15}|\d{18})$/,
message: '请输入正确的银行账号' message: '请输入正确的银行账号'
}, },
{ {
name: '开户行', name: '开户行',
dataIndex: 'bankDeposit', dataIndex: 'bankDeposit',
image: bank, image: bank,
value: data.bankDeposit, value: data && data.bankDeposit,
cacheValue: data.bankDeposit, cacheValue: data && data.bankDeposit,
isEdit: false, isEdit: false,
canEdit: true, canEdit: true,
pattern: /^[\u4e00-\u9fa5]{0,50}|[0-9a-zA-Z]{0,100}$/, pattern: /^[\u4e00-\u9fa5]{0,50}|[0-9a-zA-Z]{0,100}$/,
......
...@@ -68,9 +68,11 @@ const Add: React.FC<{}> = () => { ...@@ -68,9 +68,11 @@ const Add: React.FC<{}> = () => {
const orderTableRowSelection = useRowSelection({ const orderTableRowSelection = useRowSelection({
primaryKey: 'fullId', primaryKey: 'fullId',
func: judgeSameWorkFlow, func: judgeSameWorkFlow,
getCheckboxProps: record => ({ getCheckboxProps: (record) => {
disabled: record.purchaseCount - (record.processNum || 0) <= 0, return {
}), disabled: record.restTotal <= 0,
}
},
}); });
const enterpriseTableRowSelection = useRowSelection({primaryKey: 'uniqueId', type: 'radio'}); const enterpriseTableRowSelection = useRowSelection({primaryKey: 'uniqueId', type: 'radio'});
......
...@@ -285,7 +285,7 @@ const detailTab = { ...@@ -285,7 +285,7 @@ const detailTab = {
'x-rules': [ 'x-rules': [
{ {
required: true, required: true,
message: '请选择要加工的商品' message: '请选择要加工的订单'
} }
] ]
}, },
...@@ -322,7 +322,11 @@ const otherRequired = { ...@@ -322,7 +322,11 @@ const otherRequired = {
'x-component-props': { 'x-component-props': {
placeholder: '最长100个字符,50个汉字', placeholder: '最长100个字符,50个汉字',
rows: 5 rows: 5
} },
"x-rules": [{
limitByte: true,
maxByte: 100
}]
}, },
payDesc: { payDesc: {
type: 'string', type: 'string',
...@@ -331,8 +335,11 @@ const otherRequired = { ...@@ -331,8 +335,11 @@ const otherRequired = {
'x-component-props': { 'x-component-props': {
placeholder: '最长100个字符,50个汉字', placeholder: '最长100个字符,50个汉字',
rows: 5 rows: 5
},
} "x-rules": [{
limitByte: true,
maxByte: 100
}]
}, },
taxDesc: { taxDesc: {
type: 'string', type: 'string',
...@@ -341,7 +348,11 @@ const otherRequired = { ...@@ -341,7 +348,11 @@ const otherRequired = {
'x-component-props': { 'x-component-props': {
placeholder: '最长100个字符,50个汉字', placeholder: '最长100个字符,50个汉字',
rows: 5 rows: 5
} },
"x-rules": [{
limitByte: true,
maxByte: 100
}]
}, },
materialDesc: { materialDesc: {
type: 'string', type: 'string',
...@@ -350,7 +361,11 @@ const otherRequired = { ...@@ -350,7 +361,11 @@ const otherRequired = {
'x-component-props': { 'x-component-props': {
placeholder: '最长100个字符,50个汉字', placeholder: '最长100个字符,50个汉字',
rows: 5 rows: 5
} },
"x-rules": [{
limitByte: true,
maxByte: 100
}]
}, },
packingDesc: { packingDesc: {
type: 'string', type: 'string',
...@@ -359,7 +374,11 @@ const otherRequired = { ...@@ -359,7 +374,11 @@ const otherRequired = {
'x-component-props': { 'x-component-props': {
placeholder: '最长100个字符,50个汉字', placeholder: '最长100个字符,50个汉字',
rows: 5 rows: 5
} },
"x-rules": [{
limitByte: true,
maxByte: 100
}]
}, },
otherDesc: { otherDesc: {
type: 'string', type: 'string',
...@@ -368,7 +387,11 @@ const otherRequired = { ...@@ -368,7 +387,11 @@ const otherRequired = {
'x-component-props': { 'x-component-props': {
placeholder: '最长100个字符,50个汉字', placeholder: '最长100个字符,50个汉字',
rows: 5 rows: 5
} },
"x-rules": [{
limitByte: true,
maxByte: 100
}]
} }
} }
} }
......
...@@ -2,6 +2,7 @@ import React from 'react'; ...@@ -2,6 +2,7 @@ import React from 'react';
import moment from 'moment'; import moment from 'moment';
import DrawerProcessDetail from '../../components/ProcessDetail/DrawerProcessDetail'; import DrawerProcessDetail from '../../components/ProcessDetail/DrawerProcessDetail';
import { ColumnsType } from 'antd/es/table'; import { ColumnsType } from 'antd/es/table';
import EyePreview from '@/components/EyePreview'
/** /**
* 通知单明细 * 通知单明细
*/ */
...@@ -9,6 +10,14 @@ export const columns: ColumnsType<any> = [ ...@@ -9,6 +10,14 @@ export const columns: ColumnsType<any> = [
{ {
title: '订单号', title: '订单号',
dataIndex: 'orderNo', dataIndex: 'orderNo',
render: (text, record) => {
// orderId, orderDetailId
return (
<EyePreview url={`/memberCenter/tranactionAbility/saleOrder/orderList/preview?id=${record.orderId}`}>
{text}
</EyePreview>
)
}
}, },
{ {
title: 'ID', title: 'ID',
...@@ -58,16 +67,16 @@ export const columns: ColumnsType<any> = [ ...@@ -58,16 +67,16 @@ export const columns: ColumnsType<any> = [
dataIndex: 'action', dataIndex: 'action',
render: (text, record: any) => { render: (text, record: any) => {
return ( return (
<DrawerProcessDetail <DrawerProcessDetail
type="view" type="view"
id={record.productId} id={record.productId}
brand={record.brand} brand={record.brand}
category={record.category} category={record.category}
name={record.productName} name={record.productName}
productProps={record.property.specs} productProps={record.property.specs}
files={record.property.annex} files={record.property.annex}
unitName={record.unit} unitName={record.unit}
quantity={record.processNum} quantity={record.processNum}
processUnitPrice={record.processPrice} processUnitPrice={record.processPrice}
> >
<a>查看加工明细</a> <a>查看加工明细</a>
...@@ -134,7 +143,7 @@ export const outerWorkflowRecordsColumn: ColumnsType = [ ...@@ -134,7 +143,7 @@ export const outerWorkflowRecordsColumn: ColumnsType = [
}, },
{ {
title: '操作角色', title: '操作角色',
dataIndex: 'roleId', dataIndex: 'roleName',
}, },
{ {
title: '状态', title: '状态',
...@@ -146,7 +155,10 @@ export const outerWorkflowRecordsColumn: ColumnsType = [ ...@@ -146,7 +155,10 @@ export const outerWorkflowRecordsColumn: ColumnsType = [
}, },
{ {
title: '操作时间', title: '操作时间',
dataIndex: 'operateTime' dataIndex: 'operateTime',
render: (text, record) => {
return moment(text).format('YYYY-MM-DD HH:mm:ss');
}
}, },
{ {
title: '审核意见', title: '审核意见',
...@@ -167,6 +179,14 @@ export const receiveColumns = (type: "order" | 'product'): ColumnsType<any> => { ...@@ -167,6 +179,14 @@ export const receiveColumns = (type: "order" | 'product'): ColumnsType<any> => {
{ {
title: '订单号', title: '订单号',
dataIndex: 'orderNo', dataIndex: 'orderNo',
render: (text, record) => {
// orderId, orderDetailId
return (
<EyePreview url={`/memberCenter/tranactionAbility/saleOrder/orderList/preview?id=${record.orderId}`}>
{text}
</EyePreview>
)
}
}, },
{ {
title: 'ID', title: 'ID',
...@@ -226,14 +246,22 @@ export const receiveColumns = (type: "order" | 'product'): ColumnsType<any> => { ...@@ -226,14 +246,22 @@ export const receiveColumns = (type: "order" | 'product'): ColumnsType<any> => {
]; ];
if(type === 'order') { if(type === 'order') {
return temp return temp
} }
return temp.slice(1) return temp.slice(1)
} }
export const pnoReceiveDeliverDetailDOListColumns = [ export const pnoReceiveDeliverDetailDOListColumns = [
{ {
title: '订单号', title: '订单号',
dataIndex: 'orderNo' dataIndex: 'orderNo',
render: (text, record) => {
// orderId, orderDetailId
return (
<EyePreview url={`/memberCenter/tranactionAbility/saleOrder/orderList/preview?id=${record.orderId}`}>
{text}
</EyePreview>
)
}
}, },
{ {
title: 'ID', title: 'ID',
...@@ -263,4 +291,4 @@ export const pnoReceiveDeliverDetailDOListColumns = [ ...@@ -263,4 +291,4 @@ export const pnoReceiveDeliverDetailDOListColumns = [
title: '发货数量', title: '发货数量',
dataIndex: 'deliverNum' dataIndex: 'deliverNum'
} }
] ]
\ No newline at end of file
...@@ -14,7 +14,7 @@ import moment from 'moment'; ...@@ -14,7 +14,7 @@ import moment from 'moment';
import { ReceiptDeliveryDetailsCard, StatisticsTab, DetailTab } from '../../components/ReceiptDeliveryDetails'; import { ReceiptDeliveryDetailsCard, StatisticsTab, DetailTab } from '../../components/ReceiptDeliveryDetails';
import { columns, orderDetailColumn, innerWorkFlowRecordColumn, outerWorkflowRecordsColumn, receiveColumns, pnoReceiveDeliverDetailDOListColumns } from './columns'; import { columns, orderDetailColumn, innerWorkFlowRecordColumn, outerWorkflowRecordsColumn, receiveColumns, pnoReceiveDeliverDetailDOListColumns } from './columns';
import ExamineModal from '../../components/ExamineModal'; import ExamineModal from '../../components/ExamineModal';
import { FormOutlined } from '@ant-design/icons' import { FormOutlined, SaveOutlined } from '@ant-design/icons'
import { import {
ASSIGN_QUERY_DETAIL, ASSIGN_QUERY_DETAIL,
ASSIGN_TO_BE_ADD_QUERY_DETAIL, ASSIGN_TO_BE_ADD_QUERY_DETAIL,
...@@ -28,6 +28,7 @@ import { ...@@ -28,6 +28,7 @@ import {
CONFIRM_PENDING_FIRST_DETAIL, CONFIRM_PENDING_FIRST_DETAIL,
CONFIRM_PENDING_SECOND_DETAIL, CONFIRM_PENDING_SECOND_DETAIL,
CONFIRM_PENDING_CONFIRM_DETAIL, CONFIRM_PENDING_CONFIRM_DETAIL,
PENDING_ADD_LOGISTICS_PATH,
PENDING_DELIVERD_PATH, PENDING_DELIVERD_PATH,
PENDING_RECEIPT_PATH, PENDING_RECEIPT_PATH,
SUPPLIER_DETAIL_INNER_STATUS_COLOR, SUPPLIER_DETAIL_INNER_STATUS_COLOR,
...@@ -54,6 +55,7 @@ const SERVICE_MAP = { ...@@ -54,6 +55,7 @@ const SERVICE_MAP = {
[`${CONFIRM_PENDING_CONFIRM_DETAIL}`]: PublicApi.getEnhanceProcessToBeConfirmDetails, [`${CONFIRM_PENDING_CONFIRM_DETAIL}`]: PublicApi.getEnhanceProcessToBeConfirmDetails,
[`${PENDING_DELIVERD_PATH}/detail`]: PublicApi.getEnhanceProcessToBeDeliveryDetails, [`${PENDING_DELIVERD_PATH}/detail`]: PublicApi.getEnhanceProcessToBeDeliveryDetails,
[`${PENDING_RECEIPT_PATH}/detail`]: PublicApi.getEnhanceProcessToBeConfirmReceiptDetails, [`${PENDING_RECEIPT_PATH}/detail`]: PublicApi.getEnhanceProcessToBeConfirmReceiptDetails,
[`${PENDING_ADD_LOGISTICS_PATH}/detail`]: PublicApi.getEnhanceProcessToBeAddLogisticsDetails,
} }
/** /**
...@@ -225,7 +227,7 @@ const Detail: React.FC<{}> = () => { ...@@ -225,7 +227,7 @@ const Detail: React.FC<{}> = () => {
</ExamineModal> </ExamineModal>
) )
const SubmitBtn = <Button loading={loading} icon={<FormOutlined />} onClick={submit} type="primary"> 提交通知单</Button> const SubmitBtn = <Button loading={loading} icon={<FormOutlined />} onClick={submit} type="primary"> 提交通知单</Button>
const NextBtn = <Button loading={loading} onClick={toNext}>提交</Button> const NextBtn = <Button loading={loading} icon={<SaveOutlined />} onClick={toNext} type="primary">提交</Button>
const AllReceiptReceive = ( const AllReceiptReceive = (
<Space direction={"vertical"}> <Space direction={"vertical"}>
<Popconfirm <Popconfirm
...@@ -325,7 +327,7 @@ const Detail: React.FC<{}> = () => { ...@@ -325,7 +327,7 @@ const Detail: React.FC<{}> = () => {
name: "通知单号:" name: "通知单号:"
}} }}
extra={( extra={(
<span style={{ fontSize: 12, fontWeight: 'normal' }}>{info?.noticeNo}</span> <span style={{ fontSize: 18, fontWeight: 500 }}>{info?.noticeNo}</span>
)} )}
/> />
} }
...@@ -337,7 +339,7 @@ const Detail: React.FC<{}> = () => { ...@@ -337,7 +339,7 @@ const Detail: React.FC<{}> = () => {
style={{padding: '0 32px', fontWeight: 400}} style={{padding: '0 32px', fontWeight: 400}}
colon={false} colon={false}
> >
<Descriptions.Item label="通知单摘要:">{info?.summary}</Descriptions.Item> <Descriptions.Item span={3} label="通知单摘要:" style={{overflow: 'hidden'}}>{info?.summary}我额时代峻峰卡德加弗兰克敬爱的封了就枯鲁杜鹃发大数据觉得封了就艾迪康类父节点拉屎发送到咖啡机的律师费</Descriptions.Item>
<Descriptions.Item label="加工企业:">{info?.processName}</Descriptions.Item> <Descriptions.Item label="加工企业:">{info?.processName}</Descriptions.Item>
<Descriptions.Item label="单据时间:">{info && info.createTime && moment(info.createTime).format('YYYY-MM-DD') || null }</Descriptions.Item> <Descriptions.Item label="单据时间:">{info && info.createTime && moment(info.createTime).format('YYYY-MM-DD') || null }</Descriptions.Item>
<Descriptions.Item label="通知单来源:">{info?.source == '1' ? '订单加工': '商品加工'}</Descriptions.Item> <Descriptions.Item label="通知单来源:">{info?.source == '1' ? '订单加工': '商品加工'}</Descriptions.Item>
...@@ -356,7 +358,7 @@ const Detail: React.FC<{}> = () => { ...@@ -356,7 +358,7 @@ const Detail: React.FC<{}> = () => {
</Descriptions> </Descriptions>
{ {
info?.cause info?.cause
? <div style={{marginLeft: '32px'}}>不通过原因: {info.cause}</div> ? <div style={{marginLeft: '32px'}}>不通过原因: <StatusTag type={"danger"} title={info.cause} /></div>
: null : null
} }
</Col> </Col>
...@@ -450,14 +452,20 @@ const Detail: React.FC<{}> = () => { ...@@ -450,14 +452,20 @@ const Detail: React.FC<{}> = () => {
</div> </div>
<div style={{marginTop: '20px'}}> <div style={{marginTop: '20px'}}>
<Row justify="space-between"> <div style={{display: 'flex', flexDirection: 'row', justifyContent: 'stretch'}}>
<Col flex={4}> <div style={{flex: '1'}}>
<OtherRequirement explain={info.otherAsk?.explain} /> <OtherRequirement explain={info.otherAsk?.explain} />
</div>
<div style={{width: "450px", marginLeft: "15px", height: '100%'}}>
<Appendix files={info.otherAsk?.annex}/>
</div>
</div>
{/* <Row justify="space-between">
<Col flex={8}>
</Col> </Col>
<Col flex={2} style={{marginLeft: '20px'}} > <Col flex={2} style={{marginLeft: '20px'}} >
<Appendix files={info.otherAsk?.annex}/>
</Col> </Col>
</Row> </Row> */}
</div> </div>
<div style={{marginTop: '20px'}} > <div style={{marginTop: '20px'}} >
<Card bodyStyle={{padding: '10px 24px 24px 24px'}}> <Card bodyStyle={{padding: '10px 24px 24px 24px'}}>
......
...@@ -128,7 +128,12 @@ const processStock: React.FC<{}> = () => { ...@@ -128,7 +128,12 @@ const processStock: React.FC<{}> = () => {
return moment(text).format('YYYY-MM-DD HH:mm:ss') return moment(text).format('YYYY-MM-DD HH:mm:ss')
} }
}, },
{ title: '发货批次', dataIndex: 'deliveryBatch'}, { title: '发货批次',
dataIndex: 'deliveryBatch',
render: (text, record) => {
return text ? `第${text}批次` : ''
}
},
{ {
title: () => pathname == PENDING_ADD_PROCESS_PATH ? '入库单号' : '发货单号', title: () => pathname == PENDING_ADD_PROCESS_PATH ? '入库单号' : '发货单号',
dataIndex: 'deliveryNo', dataIndex: 'deliveryNo',
...@@ -139,7 +144,7 @@ const processStock: React.FC<{}> = () => { ...@@ -139,7 +144,7 @@ const processStock: React.FC<{}> = () => {
const url = '/memberCenter/tranactionAbility/stockSellStorage/bills/detail'; const url = '/memberCenter/tranactionAbility/stockSellStorage/bills/detail';
const type = pathname == PENDING_ADD_PROCESS_PATH ? DOC_TYPE_PROCESS_RECEIPT : DOC_TYPE_PROCESS_INVOICE const type = pathname == PENDING_ADD_PROCESS_PATH ? DOC_TYPE_PROCESS_RECEIPT : DOC_TYPE_PROCESS_INVOICE
return ( return (
<EyePreview url={`${url}?relevanceInvoicesId=${record.id}&invoicesTypeId=${type}&relevanceInvoices=${DEPENDENT_DOC_PRODUCTION}`} >{text}</EyePreview> <EyePreview url={`${url}?id=${record.id}`} >{text}</EyePreview>
) )
} }
}, },
......
...@@ -26,7 +26,7 @@ export const useRowSelection = (options) => { ...@@ -26,7 +26,7 @@ export const useRowSelection = (options) => {
newArray = hasSelectedRows.filter((item) => record[primaryKey] !== item[primaryKey] ); newArray = hasSelectedRows.filter((item) => record[primaryKey] !== item[primaryKey] );
} }
if(func) { if(func && selected && newArray.length > 0 ) {
setLoading(true) setLoading(true)
const {isSuccess, data} = await func(newArray); const {isSuccess, data} = await func(newArray);
setLoading(false); setLoading(false);
......
...@@ -24,15 +24,38 @@ const styles = { ...@@ -24,15 +24,38 @@ const styles = {
const AppendixItem = (props) => { const AppendixItem = (props) => {
const handleDownload = (name:string, url: string) => { const handleDownload = (name:string, url: string) => {
let link = document.createElement("a"); console.log(url, name);
link.style.display = "none"; let link = document.createElement("a");
link.href = url; link.style.display = "none";
link.setAttribute("download", name); link.href = url;
link.setAttribute("download", name + '.txt');
document.body.appendChild(link) //a标签插至页面中 document.body.appendChild(link) //a标签插至页面中
link.click(); link.click();
document.body.removeChild(link); document.body.removeChild(link);
} }
const downloadUrlFile = (name, url) => {
const xhr = new XMLHttpRequest()
xhr.open('GET', url, true)
xhr.responseType = 'blob'
xhr.onload = () => {
if (xhr.status === 200) {
saveAs(xhr.response, name)
}
}
xhr.send()
}
const saveAs = (data, name) => {
var urlObject = window.URL
var export_blob = new Blob([data]);
var save_link = document.createElement("a");
save_link.href = urlObject.createObjectURL(export_blob);
save_link.download = name;
save_link.click();
}
return ( return (
<div style={styles}> <div style={styles}>
<img src={pdf_icon} style={{width: '20px', marginRight: '15px'}} /> <img src={pdf_icon} style={{width: '20px', marginRight: '15px'}} />
...@@ -57,10 +80,10 @@ const Appendix: React.FC<Iprops> = (props) => { ...@@ -57,10 +80,10 @@ const Appendix: React.FC<Iprops> = (props) => {
) )
}) })
} }
</Card> </Card>
</> </>
) )
} }
export default Appendix; export default Appendix;
\ No newline at end of file
...@@ -5,6 +5,7 @@ import { createAsyncFormActions, FormEffectHooks } from '@formily/antd'; ...@@ -5,6 +5,7 @@ import { createAsyncFormActions, FormEffectHooks } from '@formily/antd';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'; import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import styles from './index.less'; import styles from './index.less';
import moment from 'moment';
const formActions = createAsyncFormActions(); const formActions = createAsyncFormActions();
interface Iprops { interface Iprops {
...@@ -180,7 +181,7 @@ const DeliverGood: React.FC<Iprops> = (props) => { ...@@ -180,7 +181,7 @@ const DeliverGood: React.FC<Iprops> = (props) => {
</Row> </Row>
<Row className={styles.row}> <Row className={styles.row}>
<Col className={styles.label} span={4}>发货时间:</Col> <Col className={styles.label} span={4}>发货时间:</Col>
<Col>{props.deliveryTime}</Col> <Col>{props.deliveryTime && moment(props.deliveryTime).format('YYYY-MM-DD HH:mm:ss')}</Col>
</Row> </Row>
{ {
props.deliveryType === 1 props.deliveryType === 1
......
...@@ -50,7 +50,7 @@ export const schema = { ...@@ -50,7 +50,7 @@ export const schema = {
name: 'name', name: 'name',
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: "请填写标题名称", placeholder: "请填写会员名称",
"onSearch": "{{search}}", "onSearch": "{{search}}",
} }
}, },
......
...@@ -12,31 +12,31 @@ interface Iprops { ...@@ -12,31 +12,31 @@ interface Iprops {
const OtherRequirement: React.FC<Iprops> = (props) => { const OtherRequirement: React.FC<Iprops> = (props) => {
const { explain = [] } = props; const { explain = [] } = props;
return ( return (
<Card title="其他要求"> <Card title="其他要求">
{ {
[0,1,2].map((item) => { [0,1,2].map((item) => {
return ( return (
<Row style={{marginBottom: '15px'}} key={item}> <div style={{marginBottom: '15px', display: 'flex', flexDirection: 'row', alignItems: 'center'}} key={item}>
{ {
explain.slice(item * 2, item * 2 + 2).map((i) => { explain.slice(item * 2, item * 2 + 2).map((i, key) => {
return ( return (
<React.Fragment key={i.name} > <div key={i.name} style={{display: 'flex', flexDirection: 'row', marginLeft: key == 1 ? '20px' : '0px' }} >
<Col span={3}>{i.name}</Col> <span style={{marginRight: '10px', minWidth: '65px'}}>{i.name}</span>
<Col span={8}>{i.value}</Col> <span style={{minWidth: "200px"}} >{i.value}</span>
</React.Fragment> </div>
) )
}) })
} }
</Row> </div>
) )
}) })
} }
</Card> </Card>
) )
} }
export default OtherRequirement; export default OtherRequirement;
\ No newline at end of file
import { ORDER_TYPE, PurchaseOrderOutWorkStateTexts } from '@/constants'; import { ORDER_TYPE, PurchaseOrderOutWorkStateTexts } from '@/constants';
import { orderTime } from '../../common'; import { orderTime } from '../../common';
import moment from 'moment';
const columns = [ const columns = [
{ title: '订单号', dataIndex: 'orderNo'}, { title: '订单号', dataIndex: 'orderNo'},
{ title: '订单摘要', dataIndex: 'orderThe'}, { title: '订单摘要', dataIndex: 'orderThe'},
{ title: '采购会员', dataIndex: 'supplyMembersName'}, { title: '采购会员', dataIndex: 'membersName'},
{ title: '下单时间', dataIndex: 'createTime'}, {
title: '下单时间',
dataIndex: 'createTime',
render: (text, record) => {
return (
moment(text).format('YYYY-MM-DD HH:mm:ss')
)
}
},
{ {
title: '订单状态', title: '订单状态',
dataIndex: 'externalState', dataIndex: 'externalState',
...@@ -130,9 +139,9 @@ export const schema = { ...@@ -130,9 +139,9 @@ export const schema = {
{label: '需求采购', value: 2}, {label: '需求采购', value: 2},
{label: '现货采购', value: 3}, {label: '现货采购', value: 3},
{label: '集采', value: 4}, {label: '集采', value: 4},
{label: '积分兑换', value: 5}, {label: '渠道直采', value: 5},
{label: '渠道直采', value: 6}, {label: '渠道现货', value: 6},
{label: '渠道现货', value: 7}, {label: '积分兑换', value: 7},
{label: '渠道积分兑换', value: 8}, {label: '渠道积分兑换', value: 8},
], ],
style: { style: {
......
...@@ -138,7 +138,7 @@ const Query: React.FC<{}> = (props) => { ...@@ -138,7 +138,7 @@ const Query: React.FC<{}> = (props) => {
render: (text, record: any) => { render: (text, record: any) => {
const url = pathname + '/detail'; const url = pathname + '/detail';
const actionMap = { const actionMap = {
[ASSIGN_TO_BE_ADD_QUERY]: (<Spin spinning={submitLoadingID === record.id}><a onClick={() => handleUpdateOrDelete('review', {id: record.id})}>{"提交审核"}</a></Spin>), [ASSIGN_TO_BE_ADD_QUERY]:record.outerStatus === 1 && record.innerStatus === 1 ? (<Spin spinning={submitLoadingID === record.id}><a onClick={() => handleUpdateOrDelete('review', {id: record.id})}>{"提交审核"}</a></Spin>) : null,
[ASSIGN_PENDING_FIRST]: <Link to={`${url}?id=${record.id}`}>审核</Link>, [ASSIGN_PENDING_FIRST]: <Link to={`${url}?id=${record.id}`}>审核</Link>,
[ASSIGN_PENDING_SECOND]: <Link to={`${url}?id=${record.id}`}>审核</Link>, [ASSIGN_PENDING_SECOND]: <Link to={`${url}?id=${record.id}`}>审核</Link>,
[ASSIGN_PENDING_SUBMIT]: (<Spin spinning={submitLoadingID === record.id}><a onClick={() => handleUpdateOrDelete('review', {id: record.id})}>{"提交通知单"}</a></Spin>), [ASSIGN_PENDING_SUBMIT]: (<Spin spinning={submitLoadingID === record.id}><a onClick={() => handleUpdateOrDelete('review', {id: record.id})}>{"提交通知单"}</a></Spin>),
...@@ -154,7 +154,11 @@ const Query: React.FC<{}> = (props) => { ...@@ -154,7 +154,11 @@ const Query: React.FC<{}> = (props) => {
pathname === ASSIGN_TO_BE_ADD_QUERY pathname === ASSIGN_TO_BE_ADD_QUERY
? <Space> ? <Space>
<Link to={`${ASSIGN_TO_BE_ADD_QUERY}/edit?id=${record.id}`}>修改</Link> <Link to={`${ASSIGN_TO_BE_ADD_QUERY}/edit?id=${record.id}`}>修改</Link>
<a onClick={() => handleUpdateOrDelete('delete', {id: record.id})}>删除</a> {
record.outerStatus === 1 && record.innerStatus === 3 || record.outerStatus === 0
? null
: <a onClick={() => handleUpdateOrDelete('delete', {id: record.id})}>删除</a>
}
</Space> </Space>
: null : null
} }
......
...@@ -20,7 +20,7 @@ export const querySchema: ISchema = { ...@@ -20,7 +20,7 @@ export const querySchema: ISchema = {
'x-component-props': { 'x-component-props': {
placeholder: '搜索', placeholder: '搜索',
align: 'flex-left', align: 'flex-left',
tip: '输入通知单号s进行搜索', tip: '输入通知单号进行搜索',
}, },
}, },
[FORM_FILTER_PATH]: { [FORM_FILTER_PATH]: {
...@@ -142,24 +142,24 @@ export const tobeAddQuerySchema: ISchema = { ...@@ -142,24 +142,24 @@ export const tobeAddQuerySchema: ISchema = {
allowClear: true, allowClear: true,
}, },
}, },
outerStatus: { // outerStatus: {
type: 'string', // type: 'string',
default: undefined, // default: undefined,
enum: [], // enum: [],
'x-component-props': { // 'x-component-props': {
placeholder: '外部状态(全部)', // placeholder: '外部状态(全部)',
allowClear: true, // allowClear: true,
}, // },
}, // },
innerStatus: { // innerStatus: {
type: 'string', // type: 'string',
default: undefined, // default: undefined,
enum: [], // enum: [],
'x-component-props': { // 'x-component-props': {
placeholder: '内部状态(全部)', // placeholder: '内部状态(全部)',
allowClear: true, // allowClear: true,
}, // },
}, // },
submit: { submit: {
'x-component': 'Submit', 'x-component': 'Submit',
'x-mega-props': { 'x-mega-props': {
...@@ -229,31 +229,31 @@ export const pendingFirstQuerySchema: ISchema = { ...@@ -229,31 +229,31 @@ export const pendingFirstQuerySchema: ISchema = {
}, },
docTime: { docTime: {
type: 'string', type: 'string',
default: undefined, default: 0,
enum: [], enum: docTime,
'x-component-props': { 'x-component-props': {
placeholder: '单据时间(全部)', placeholder: '单据时间(全部)',
allowClear: true, allowClear: true,
}, },
}, },
outerStatus: { // outerStatus: {
type: 'string', // type: 'string',
default: undefined, // default: undefined,
enum: [], // enum: [],
'x-component-props': { // 'x-component-props': {
placeholder: '外部状态(全部)', // placeholder: '外部状态(全部)',
allowClear: true, // allowClear: true,
}, // },
}, // },
innerStatus: { // innerStatus: {
type: 'string', // type: 'string',
default: undefined, // default: undefined,
enum: [], // enum: [],
'x-component-props': { // 'x-component-props': {
placeholder: '内部状态(全部)', // placeholder: '内部状态(全部)',
allowClear: true, // allowClear: true,
}, // },
}, // },
submit: { submit: {
'x-component': 'Submit', 'x-component': 'Submit',
'x-mega-props': { 'x-mega-props': {
......
...@@ -3,7 +3,7 @@ import { ColumnsType } from 'antd/es/table'; ...@@ -3,7 +3,7 @@ import { ColumnsType } from 'antd/es/table';
import { Table, Row, Col, Popconfirm, Radio } from 'antd'; import { Table, Row, Col, Popconfirm, Radio } from 'antd';
import styles from './index.less' import styles from './index.less'
import moment from 'moment'; import moment from 'moment';
import { history } from 'umi' import { history, Link } from 'umi'
import { ASSIGN_PENDING_RECEIVE_DETAIL, PENDING_DELIVERD_PATH, PENDING_RECEIPT_PATH } from '../../common'; import { ASSIGN_PENDING_RECEIVE_DETAIL, PENDING_DELIVERD_PATH, PENDING_RECEIPT_PATH } from '../../common';
interface Iprops { interface Iprops {
...@@ -19,7 +19,7 @@ const format = 'YYYY-MM-DD HH:mm:ss'; ...@@ -19,7 +19,7 @@ const format = 'YYYY-MM-DD HH:mm:ss';
* 只有在待发货生产通知单, 待收货生产通知、待回单生产通知单才能修改他table商品的状态 * 只有在待发货生产通知单, 待收货生产通知、待回单生产通知单才能修改他table商品的状态
* 比如确认发货,确认收货、确认回单 * 比如确认发货,确认收货、确认回单
* 并且上面三个状态的值为1才能修改 * 并且上面三个状态的值为1才能修改
* @param props * @param props
*/ */
const PENDING_DELIVERD_DETAIL_PATH = PENDING_DELIVERD_PATH + '/detail'; const PENDING_DELIVERD_DETAIL_PATH = PENDING_DELIVERD_PATH + '/detail';
...@@ -43,7 +43,7 @@ const CONFIRM_STATUS_TEXT = { ...@@ -43,7 +43,7 @@ const CONFIRM_STATUS_TEXT = {
'1_1_1': '待确认发货', '1_1_1': '待确认发货',
'2_1_1': '已确认发货', '2_1_1': '已确认发货',
'2_2_1': '待确认回单', '2_2_1': '待确认回单',
'2_2_2': '已确认回单' '2_2_2': '已确认回单'
} }
// 如果是 指派通知单 // 如果是 指派通知单
...@@ -96,13 +96,13 @@ const DetailTab: React.FC<Iprops> = (props) => { ...@@ -96,13 +96,13 @@ const DetailTab: React.FC<Iprops> = (props) => {
<Col span={6}> <Col span={6}>
<div className={styles.detailItem}> <div className={styles.detailItem}>
<span className={styles.title}>发货单号</span> <span className={styles.title}>发货单号</span>
<a className={styles.value}>{activeData.deliveryNo}</a> <Link to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${activeData.deliveryId}`} className={styles.value}>{activeData.deliveryNo}</Link>
</div> </div>
<div> <div>
<span className={styles.title}>发货时间</span> <span className={styles.title}>发货时间</span>
<span className={styles.value}> <span className={styles.value}>
{ {
activeData.deliveryTime activeData.deliveryTime
&& moment(activeData.deliveryTime).format(format) && moment(activeData.deliveryTime).format(format)
}</span> }</span>
</div> </div>
...@@ -110,7 +110,7 @@ const DetailTab: React.FC<Iprops> = (props) => { ...@@ -110,7 +110,7 @@ const DetailTab: React.FC<Iprops> = (props) => {
<Col span={6}> <Col span={6}>
<div className={styles.detailItem}> <div className={styles.detailItem}>
<span className={styles.title}>物流单号</span> <span className={styles.title}>物流单号</span>
<a className={styles.value}>{activeData.logisticsOrderNo}</a> <Link to={`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=${activeData.logisticsOrderId}`} className={styles.value}>{activeData.logisticsOrderNo}</Link>
</div> </div>
<div> <div>
<span className={styles.title}>物流公司</span> <span className={styles.title}>物流公司</span>
...@@ -120,13 +120,13 @@ const DetailTab: React.FC<Iprops> = (props) => { ...@@ -120,13 +120,13 @@ const DetailTab: React.FC<Iprops> = (props) => {
<Col span={6}> <Col span={6}>
<div className={styles.detailItem}> <div className={styles.detailItem}>
<span className={styles.title}>入库单号</span> <span className={styles.title}>入库单号</span>
<span className={styles.value}>{activeData.storageNo}</span> <Link to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${activeData.storageId}`} className={styles.value}>{activeData.storageNo}</Link>
</div> </div>
<div> <div>
<span className={styles.title}>入库时间</span> <span className={styles.title}>入库时间</span>
<span className={styles.value}> <span className={styles.value}>
{ {
activeData.storageTime activeData.storageTime
&& moment(activeData.storageTime).format(format) && moment(activeData.storageTime).format(format)
}</span> }</span>
</div> </div>
...@@ -144,13 +144,12 @@ const DetailTab: React.FC<Iprops> = (props) => { ...@@ -144,13 +144,12 @@ const DetailTab: React.FC<Iprops> = (props) => {
<Popconfirm <Popconfirm
title={`是否${TEXT_MAP[`${currentPage}_${activeData[currentPage]}`]}`} title={`是否${TEXT_MAP[`${currentPage}_${activeData[currentPage]}`]}`}
onConfirm={() => confirm( onConfirm={() => confirm(
{ {
produceNoticeOrderId: activeData.produceNoticeOrderId, produceNoticeOrderId: activeData.produceNoticeOrderId,
pnoReceiveDeliverDetailId: activeData.id pnoReceiveDeliverDetailId: activeData.id
}, },
`${currentPage}_${activeData[currentPage]}` `${currentPage}_${activeData[currentPage]}`
) )
} }
okText="是" okText="是"
cancelText="否" cancelText="否"
...@@ -162,13 +161,13 @@ const DetailTab: React.FC<Iprops> = (props) => { ...@@ -162,13 +161,13 @@ const DetailTab: React.FC<Iprops> = (props) => {
</Col> </Col>
</Row> </Row>
</div> </div>
<Table <Table
dataSource={activeData.pnoReceiveDeliverDetailProductBOList} dataSource={activeData.pnoReceiveDeliverDetailProductBOList}
rowKey={"orderNo"} rowKey={"orderNo"}
columns={columns} columns={columns}
/> />
</div> </div>
) )
} }
export default DetailTab; export default DetailTab;
\ No newline at end of file
...@@ -46,7 +46,8 @@ const UploadFile = (props) => { ...@@ -46,7 +46,8 @@ const UploadFile = (props) => {
setLoading(false) setLoading(false)
} }
}, },
beforeUpload // beforeUpload: beforeUpload,
// transformFile: () => {}
}; };
const removeFile = (key) => { const removeFile = (key) => {
......
...@@ -53,7 +53,7 @@ const Home: React.FC<{}> = () => { ...@@ -53,7 +53,7 @@ const Home: React.FC<{}> = () => {
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
<> <div style={{minWidth: '1280px'}}>
<div className={styles.userGuaid} style={{display: visible ? 'none': 'none'}}> <div className={styles.userGuaid} style={{display: visible ? 'none': 'none'}}>
<UseGuaid/> <UseGuaid/>
</div> </div>
...@@ -114,7 +114,7 @@ const Home: React.FC<{}> = () => { ...@@ -114,7 +114,7 @@ const Home: React.FC<{}> = () => {
</div> </div>
</div> </div>
</> </div>
</PageHeaderWrapper> </PageHeaderWrapper>
) )
} }
......
import React, {useState, useEffect} from 'react'; import React, {useState, useEffect} from 'react';
import { history } from 'umi'; import { history } from 'umi';
import { Card, List, Avatar } from 'antd'; import { Card, List, Avatar } from 'antd';
import styles from './index.less' import styles from './index.less'
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import StatusTag from '@/components/StatusTag'; import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import moment from 'moment'; import moment from 'moment';
import msg_system from '@/assets/imgs/msg_system.png' import msg_system from '@/assets/imgs/msg_system.png'
import msg_platform from '@/assets/imgs/msg_platform.png'; import msg_platform from '@/assets/imgs/msg_platform.png';
const Message: React.FC<{}> = () => { const Message: React.FC<{}> = () => {
const [dataSource, setDataSource] = useState<any>([]) const [dataSource, setDataSource] = useState<any>([])
const pagation = { const pagation = {
current: 1, current: 1,
pageSize: 10, pageSize: 10,
} }
useEffect(() => { useEffect(() => {
// @ts-ignore // @ts-ignore
async function init() { async function init() {
const data = await getList(pagation); const data = await getList(pagation);
setDataSource(data); setDataSource(data);
} }
init() init()
}, []) }, [])
const getList = async (params) => { const getList = async (params) => {
///report/message/member/page ///report/message/member/page
const res = await PublicApi.getReportMessageMemberPage(params); const res = await PublicApi.getReportMessageMemberPage(params);
if(res.code === 1000) { if(res.code === 1000) {
return res.data return res.data
} }
return { return {
totalCount: 0, totalCount: 0,
data: [] data: []
} }
} }
const handlePaginationChange = (page, pageSize) => { const handlePaginationChange = (page, pageSize) => {
getList({page, pageSize}) getList({page, pageSize})
.then((data) => { .then((data) => {
console.log(data); console.log(data);
setDataSource(data); setDataSource(data);
}) })
} }
const handleRead = (id, url: string) => { const handleRead = (id, url: string) => {
console.log(url); console.log(url);
PublicApi.getReportMessageMemberRead({id: id}) PublicApi.getReportMessageMemberRead({id: id})
.then((data) => { .then((data) => {
if(url) { if(url) {
if(/http/.test(url)) { if(/http/.test(url)) {
location.href = url location.href = url
} else { } else {
history.push(url); history.push(url);
} }
} }
}) })
} }
const renderMessage = (data) => { const renderMessage = (data) => {
return (
return ( <>
<> <StatusTag type={data.type == 1 ? 'primary' : 'success'} title={data.type == 1 ? '系统消息': '平台消息'} />
<StatusTag type={data.type == 1 ? 'primary' : 'success'} title={data.type == 1 ? '系统消息': '平台消息'} /> <span className={styles.messageTitle} style={{minWidth: '100px', fontWeight: 600, color: !data.status ? '#303133' : '#606266', marginRight: "15px"}}>{data.title}</span>
<span className={styles.messageTitle} style={{minWidth: '100px', color: !data.status ? '#303133' : '#606266'}}>{data.title}</span> <span className={styles.messageText} style={{color: !data.status ? '#303133' : '#606266', marginRight: "15px"}} onClick={() => handleRead(data.id, data.url)}>{data.content}</span>
<span className={styles.messageText} style={{color: !data.status ? '#303133' : '#606266'}} onClick={() => handleRead(data.id, data.url)}>{data.content}</span> </>
</> )
) }
}
const showTotal = (total) => {
const showTotal = (total) => { return `共 ${total} 条`;
return `共 ${total} 条`; }
}
return (
return ( <PageHeaderWrapper>
<PageHeaderWrapper> <Card
<Card title="消息列表"
title="消息列表" >
> <List
<List itemLayout="horizontal"
itemLayout="horizontal" dataSource={dataSource.data}
dataSource={dataSource.data} className={styles.customList}
className={styles.customList} pagination={{
pagination={{ onChange: handlePaginationChange,
onChange: handlePaginationChange, pageSize: 10,
pageSize: 10, size: "small",
size: "small", showQuickJumper: true,
showQuickJumper: true, total: dataSource.totalCount,
total: dataSource.totalCount, showTotal: showTotal
showTotal: showTotal }}
}} renderItem={(item: any) => (
renderItem={(item: any) => ( <List.Item>
<List.Item> <List.Item.Meta
<List.Item.Meta avatar={<Avatar src={item.type == 1 ? msg_system : msg_platform} />}
avatar={<Avatar src={item.type == 1 ? msg_system : msg_platform} />} title={renderMessage(item)}
title={renderMessage(item)} />
/> <div style={{marginLeft: "25px"}}>{moment(item.sendTime).format('YYYY-MM-DD HH:mm:ss')}</div>
<div>{moment(item.sendTime).format('YYYY-MM-DD HH:mm:ss')}</div> </List.Item>
</List.Item> )}
)} />
/> </Card>
</Card> </PageHeaderWrapper>
</PageHeaderWrapper> )
) }
}
export default Message;
export default Message;
const tokenList = [ const tokenList = [
{ name: 'Pass', token: 'b063a0a29fb1a570d9f00eaabbdd8ccfe8e6e10e24739441990cc1098e79b601', categoryIds: [0], }, // 业务中台管理平台 { name: 'Pass', token: 'b063a0a29fb1a570d9f00eaabbdd8ccfe8e6e10e24739441990cc1098e79b601', categoryIds: [0], }, // 业务中台管理平台
{ name: 'Warehouse', token: '7c8f235d95f6224ceb97c4d832b09658f9a75fb8721a95699b230af0733d7fa4', categoryIds: [0], }, // 仓库服务 { name: 'Warehouse', token: '7c8f235d95f6224ceb97c4d832b09658f9a75fb8721a95699b230af0733d7fa4', categoryIds: [0], }, // 仓库服务
{ name: 'Logistics', token: '8d14d945507d1f8cd89afe139ca6d111bbad25f702fafe0aec59d3c9cd2e0ffe', categoryIds: [0], }, // 物流服务 { name: 'Logistics', token: '8d14d945507d1f8cd89afe139ca6d111bbad25f702fafe0aec59d3c9cd2e0ffe', categoryIds: [0], }, // 物流服务
{ name: 'Member', token: 'c0e920f071595a73ba234b6fa6cfe42192d3d740d59f030caa2c7f0f08777d78', categoryIds: [0], }, // 商户会员管理服务 { name: 'Member', token: 'c0e920f071595a73ba234b6fa6cfe42192d3d740d59f030caa2c7f0f08777d78', categoryIds: [0], }, // 商户会员管理服务
{ name: 'Product', token: 'dbfeae0baf614a6dd8f1de2b1403444cdfa9c052a3757da6a0d6d7d52fb26178', categoryIds: [0], }, // 商品服务 { name: 'Product', token: 'dbfeae0baf614a6dd8f1de2b1403444cdfa9c052a3757da6a0d6d7d52fb26178', categoryIds: [0], }, // 商品服务
{ name: 'Template', token: '7ec923520215c7e2f771867cb4d29cafbf823daf0fb2d3d9fa70b57a523c8bfb', categoryIds: [0], }, // 店铺模板服务 { name: 'Template', token: '7ec923520215c7e2f771867cb4d29cafbf823daf0fb2d3d9fa70b57a523c8bfb', categoryIds: [0], }, // 店铺模板服务
{ name: 'Pay', token: '34608cd33222b1650795459d73b8eb0b260eb92cf5e8d1e646f85a4875e36f05', categoryIds: [0], }, // 支付服务 { name: 'Pay', token: '34608cd33222b1650795459d73b8eb0b260eb92cf5e8d1e646f85a4875e36f05', categoryIds: [0], }, // 支付服务
{ name: 'Search', token: 'ca19f532efba91f7773cbfbd526b798c6ac83df670071e97d72c50dca1d53a48', categoryIds: [0], }, // 搜索服务 { name: 'Search', token: 'ca19f532efba91f7773cbfbd526b798c6ac83df670071e97d72c50dca1d53a48', categoryIds: [0], }, // 搜索服务
{ name: 'Order', token: '31b93b223421ca52389b088a7457c651fab7c1bf658fc7dd38d0689d09c8e235', categoryIds: [0], }, //订单服务 { name: 'Order', token: '31b93b223421ca52389b088a7457c651fab7c1bf658fc7dd38d0689d09c8e235', categoryIds: [0], }, //订单服务
{ name: 'Settle', token: 'fffbeeaaa198c285955997c606bc279fc6950fea118580c786f2c73eecccaa6a', categoryIds: [0], }, //结算服务 { name: 'Settle', token: 'fffbeeaaa198c285955997c606bc279fc6950fea118580c786f2c73eecccaa6a', categoryIds: [0], }, //结算服务
{ name: 'AfterService', token: '39db719680bf1b3db21bc1deda933cde16d17559e9676bf848ec96c1320e68df', categoryIds: [0], }, // '售后服务' { name: 'AfterService', token: '39db719680bf1b3db21bc1deda933cde16d17559e9676bf848ec96c1320e68df', categoryIds: [0], }, // '售后服务'
{ name: 'Enhance', token: '594a7e7ff17f6f40fb9fb726c1da9a3f282a926a8d386eb6cbfd668a3f75f251', categoryIds: [0], }, // 加工服务 { name: 'Enhance', token: '594a7e7ff17f6f40fb9fb726c1da9a3f282a926a8d386eb6cbfd668a3f75f251', categoryIds: [0], }, // 加工服务
{ name: 'Report', token: '69ee5a79363c763ded1a2eb42952a5181ffcdfc5ffb93b6e1e22ac92a25b38bf', categoryIds: [0], }, // 报表服务 { name: 'Report', token: '69ee5a79363c763ded1a2eb42952a5181ffcdfc5ffb93b6e1e22ac92a25b38bf', categoryIds: [0], }, // 报表服务
] ]
const getConfigMap = (tokens) => tokens.map(v => ({ const getConfigMap = (tokens) => tokens.map(v => ({
serverUrl: 'http://10.0.0.25:4000/', serverUrl: 'http://10.0.0.25:4000/',
typesOnly: false, typesOnly: false,
reactHooks: { reactHooks: {
enabled: false, enabled: false,
}, },
outputFilePath: `src/services/${v.name}Api`, outputFilePath: `src/services/${v.name}Api`,
requestFunctionFilePath: 'request.ts', requestFunctionFilePath: '@/utils/request.ts',
dataKey: 'data', dataKey: 'data',
projects: [ projects: [
{ {
token: v.token, token: v.token,
categories: [ categories: [
{ {
id: v.categoryIds, id: v.categoryIds,
getRequestFunctionName(interfaceInfo, changeCase) { getRequestFunctionName(interfaceInfo, changeCase) {
return changeCase.camelCase(interfaceInfo.method + interfaceInfo.path) return changeCase.camelCase(interfaceInfo.method + interfaceInfo.path)
}, },
}, },
] ]
} }
], ],
})) }))
export default getConfigMap(tokenList) export default getConfigMap(tokenList)
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