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',
......
...@@ -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()
...@@ -131,6 +130,14 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => { ...@@ -131,6 +130,14 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
} }
}, [currentRouter, collapsed]) }, [currentRouter, collapsed])
useLayoutEffect(() => {
if(location.pathname === '/memberCenter/home') {
setCollapsed(true)
} else {
setCollapsed(false);
}
}, [location.pathname])
return ( return (
<ProLayout <ProLayout
pageTitleRender={() => currentRouter ? currentRouter.name : window.location.href} pageTitleRender={() => currentRouter ? currentRouter.name : window.location.href}
......
...@@ -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',
...@@ -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',
...@@ -233,7 +253,15 @@ export const receiveColumns = (type: "order" | 'product'): ColumnsType<any> => { ...@@ -233,7 +253,15 @@ export const receiveColumns = (type: "order" | 'product'): ColumnsType<any> => {
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',
......
...@@ -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) => {
console.log(url, name);
let link = document.createElement("a"); let link = document.createElement("a");
link.style.display = "none"; link.style.display = "none";
link.href = url; link.href = url;
link.setAttribute("download", name); 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'}} />
......
...@@ -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}}",
} }
}, },
......
...@@ -18,18 +18,18 @@ const OtherRequirement: React.FC<Iprops> = (props) => { ...@@ -18,18 +18,18 @@ const OtherRequirement: React.FC<Iprops> = (props) => {
{ {
[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>
) )
}) })
} }
......
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 {
...@@ -96,7 +96,7 @@ const DetailTab: React.FC<Iprops> = (props) => { ...@@ -96,7 +96,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.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>
...@@ -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,7 +120,7 @@ const DetailTab: React.FC<Iprops> = (props) => { ...@@ -120,7 +120,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>
<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>
...@@ -150,7 +150,6 @@ const DetailTab: React.FC<Iprops> = (props) => { ...@@ -150,7 +150,6 @@ const DetailTab: React.FC<Iprops> = (props) => {
}, },
`${currentPage}_${activeData[currentPage]}` `${currentPage}_${activeData[currentPage]}`
) )
} }
okText="是" okText="是"
cancelText="否" cancelText="否"
......
...@@ -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>
) )
} }
......
...@@ -61,12 +61,11 @@ const Message: React.FC<{}> = () => { ...@@ -61,12 +61,11 @@ const Message: React.FC<{}> = () => {
} }
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', color: !data.status ? '#303133' : '#606266'}}>{data.title}</span> <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'}} onClick={() => handleRead(data.id, data.url)}>{data.content}</span> <span className={styles.messageText} style={{color: !data.status ? '#303133' : '#606266', marginRight: "15px"}} onClick={() => handleRead(data.id, data.url)}>{data.content}</span>
</> </>
) )
} }
...@@ -98,7 +97,7 @@ const Message: React.FC<{}> = () => { ...@@ -98,7 +97,7 @@ const Message: React.FC<{}> = () => {
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>{moment(item.sendTime).format('YYYY-MM-DD HH:mm:ss')}</div> <div style={{marginLeft: "25px"}}>{moment(item.sendTime).format('YYYY-MM-DD HH:mm:ss')}</div>
</List.Item> </List.Item>
)} )}
/> />
......
...@@ -21,7 +21,7 @@ const getConfigMap = (tokens) => tokens.map(v => ({ ...@@ -21,7 +21,7 @@ const getConfigMap = (tokens) => tokens.map(v => ({
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: [
{ {
......
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