Commit 002d9840 authored by Bill's avatar Bill

修改加工bug

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