Commit 41371f61 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 采购销售订单添加按钮权限

parent c82abd22
......@@ -26,7 +26,7 @@ import ProcurementRoute from './procurementRoute'; // todo wuting
// import contracRoute from './contracRoute';
// export const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute, AfterService, PayandSettleRoute, LogisticsRoute, AuthConfigRoute, HandlingRoute, BalaceRoute]
const isDev = process.env.NODE_ENV === "development";
const isDev = process.env.NODE_ENV !== "development";
const homeRoute = {
path: `/memberCenter/home`,
name: 'home',
......
......@@ -591,6 +591,7 @@ export default {
'saleOrder.shouhuoshuliangjin': 'The quantity received is limited to three decimal places only',
'saleOrder.qingtianxiefahuoshuliang': 'Please fill in the delivery quantity',
'saleOrder.quhexiaozitidingdan': 'Go to check the self-pickup order',
'saleOrder.hexiaozitidingdan': 'check the self-pickup order',
// Requisitions
......
......@@ -589,6 +589,7 @@ export default {
'saleOrder.shouhuoshuliangjin': '상품을 받을 수 있는 수량은 세 자리 소수로만 제한한다',
'saleOrder.qingtianxiefahuoshuliang': '발송수량을 기입해 주세요',
'saleOrder.quhexiaozitidingdan': '직접 인수된 주문서를 삭제하다',
'saleOrder.hexiaozitidingdan': '자체 인수 주문서를 심사하여 삭제하다',
// 请购单
......
......@@ -589,6 +589,7 @@ export default {
'saleOrder.shouhuoshuliangjin': '收货数量仅限三位小数',
'saleOrder.qingtianxiefahuoshuliang': '请填写发货数量',
'saleOrder.quhexiaozitidingdan': '去核销自提订单',
'saleOrder.hexiaozitidingdan': '核销自提订单',
// 请购单
......
......@@ -544,6 +544,7 @@ const AddProducts: React.FC<{}> = (props) => {
_params.priceType = productInfoByEdit.priceType
_params.isMemberPrice = productInfoByEdit.isMemberPrice
_params.taxRate = productInfoByEdit.taxRate
_params.type = productInfoByEdit.type
}
if (clickTabIndex.indexOf("6") === -1) // 商品描述
_params.commodityRemark = productInfoByEdit.commodityRemark
......
......@@ -10,6 +10,7 @@ import { history, useIntl } from 'umi'
import { useHttpRequest } from '@/hooks/useHttpRequest';
import OrderDetailSection from '../../../components/orderDetailSection';
import { postOrderBuyerValidateGradeOne } from '@/services/OrderNewV2Api';
import AuthButton from '@/components/AuthButton';
const FirstApprovedOrderDetail: React.FC = () => {
const { formContext, id, detailList } = useOrderDetail({type: 'purchaseOrder'})
......@@ -40,9 +41,11 @@ const FirstApprovedOrderDetail: React.FC = () => {
<div>
<OrderDetailContext.Provider value={formContext}>
<OrderDetailHeader detailList={detailList} detailData={formContext.data} extraRight={
<Button type='primary' onClick={handleClick}>
{intl.formatMessage({ id: 'purchaseOrder.tijiaoshenhe', defaultMessage: '提交审核' })}
</Button>
<AuthButton btnCode="firstApprovedOrderDetail.tijiao">
<Button type='primary' onClick={handleClick}>
{intl.formatMessage({ id: 'purchaseOrder.tijiaoshenhe', defaultMessage: '提交审核' })}
</Button>
</AuthButton>
} />
<OrderDetailWrapper>
......
......@@ -12,6 +12,7 @@ import { useHttpRequest } from '@/hooks/useHttpRequest'
import '../index.less'
import { getOrderBuyerValidateGradeOnePage, postOrderBuyerValidateGradeOneBatch } from '@/services/OrderNewV2Api'
import { useIntl } from 'umi'
import AuthButton from '@/components/AuthButton';
// 一级待审核订单
......@@ -79,7 +80,9 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = () => {
}}
formilyChilds={{
children: <Space>
<Button onClick={handleSubmitBatch} loading={loading}>{intl.formatMessage({ id: 'purchaseOrder.piliangtijiaoshen', defaultMessage: '批量提交审核' })}</Button>
<AuthButton btnCode="firstApprovedOrder.piliangtijiao">
<Button onClick={handleSubmitBatch} loading={loading}>{intl.formatMessage({ id: 'purchaseOrder.piliangtijiaoshen', defaultMessage: '批量提交审核' })}</Button>
</AuthButton>
</Space>,
layouts: {
span: 8
......
......@@ -3,6 +3,7 @@ import { Button } from 'antd'
import { baseOrderListColumns } from '../../constant'
import { history, useIntl } from 'umi'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import AuthButton from '@/components/AuthButton'
export const useSelfTable = () => {
const ref = useRef<any>({})
......@@ -17,7 +18,7 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <Button type='link' onClick={() => handleSubmit(record)}>{intl.formatMessage({ id: 'purchaseOrder.tijiaoshenhe', defaultMessage: '提交审核' })}</Button>
render: (text, record) => <AuthButton btnCode="firstApprovedOrder.tijiao"><Button type='link' onClick={() => handleSubmit(record)}>{intl.formatMessage({ id: 'purchaseOrder.tijiaoshenhe', defaultMessage: '提交审核' })}</Button></AuthButton>
}
])
......
......@@ -31,6 +31,7 @@ import SaleAfter from './components/saleAfter'
import { ExclamationCircleOutlined } from '@ant-design/icons'
import { COLUMNS_LARGE_WIDTH, COLUMNS_ACTION_WIDTH } from '@/constants/table';
import SortableTableHeader, { useSortableColumns, CustomColumnsConfigure, CustomColumnsConfigureRef } from '@/components/SortableTableHeader';
import AuthButton from '@/components/AuthButton';
// 订单查询
......@@ -213,10 +214,19 @@ const PurchaseOrder: React.FC<PurchaseOrderProps> = (props) => {
[intl.formatMessage({id: 'purchaseOrder.operation7'})]: () => handleDelete(record),
}
const buttonPermissionsMap = {
[intl.formatMessage({id: 'purchaseOrder.operation1'})]: 'orderList.quxiao',
[intl.formatMessage({id: 'purchaseOrder.operation2'})]: 'orderList.shouhou',
[intl.formatMessage({id: 'purchaseOrder.operation3'})]: 'orderList.pingjia',
[intl.formatMessage({id: 'purchaseOrder.operation4'})]: 'orderList.tiaozheng',
[intl.formatMessage({id: 'purchaseOrder.operation6'})]: 'orderList.tuikuan',
[intl.formatMessage({id: 'purchaseOrder.operation7'})]: 'orderList.shanchu',
}
return (
<TableOperation
buttonTextFieldMap={buttonGroup}
operationHandler={operationHandler}
buttonPermissionsMap={buttonPermissionsMap}
/>
)
}
......@@ -297,7 +307,7 @@ const PurchaseOrder: React.FC<PurchaseOrderProps> = (props) => {
adjustActions.reset()
}
const controllerBtns = <Button style={{width: 140}} onClick={handleExport} type='default'>{intl.formatMessage({ id: 'purchaseOrder.export' })}</Button>
const controllerBtns = <AuthButton btnCode="orderList.daochu"><Button style={{width: 140}} onClick={handleExport} type='default'>{intl.formatMessage({ id: 'purchaseOrder.export' })}</Button></AuthButton>
const EnhanceCustomColumnsConfigure = useCallback(() => (
<CustomColumnsConfigure
......
......@@ -30,6 +30,7 @@ import { getLogisticsReceiverAddressGet, getLogisticsSelectListMemberShipperAddr
import { getOrderBuyerCreateDetail, postOrderBuyerCreatePurchase, postOrderBuyerCreatePurchaseUpdate } from '@/services/OrderNewV2Api'
import { postManageWebShopWebAll } from '@/services/ManageV2Api'
import { fectchShopListsSource } from '@/utils/type'
import AuthButton from '@/components/AuthButton'
export interface AgentOrderDetailProps {}
......@@ -377,9 +378,11 @@ const AgentOrderDetail:React.FC<AgentOrderDetailProps> = () => {
title={id?intl.formatMessage({id: 'purchaseOrder.edit'}):intl.formatMessage({id: 'purchaseOrder.add'})}
schema={initFormSchema}
extraRight={[
<Button key="1" onClick={() => addSchemaAction.submit()} loading={btnLoading} type="primary" icon={<SaveOutlined />}>
{intl.formatMessage({id: 'purchaseOrder.save'})}
</Button>,
<AuthButton btnCode="readyAddCashOrder.baocun">
<Button key="1" onClick={() => addSchemaAction.submit()} loading={btnLoading} type="primary" icon={<SaveOutlined />}>
{intl.formatMessage({id: 'purchaseOrder.save'})}
</Button>
</AuthButton>,
]}
/>
<FormDetailWrapper>
......
......@@ -26,6 +26,7 @@ import moment from 'moment'
import { getOrderBuyerCreateDetail, postOrderBuyerCreateRequisition, postOrderBuyerUpdateRequisition } from '@/services/OrderNewV2Api'
import { getPurchaseRequisitionTransferPurchaseDetail } from '@/services/PurchaseV2Api'
import { getLogisticsReceiverAddressGet, getLogisticsSelectListMemberShipperAddress } from '@/services/LogisticsV2Api'
import AuthButton from '@/components/AuthButton'
export interface AddRequisitionOrderProps { }
......@@ -305,9 +306,11 @@ const AddRequisitionOrder:React.FC<AddRequisitionOrderProps> = (props) => {
title={id?intl.formatMessage({id: 'purchaseOrder.edit'}):intl.formatMessage({id: 'purchaseOrder.add'})}
schema={initFormSchema}
extraRight={[
<Button key="1" onClick={() => addSchemaAction.submit()} loading={btnLoading} type="primary" icon={<SaveOutlined />}>
{intl.formatMessage({id: 'purchaseOrder.save'})}
</Button>,
<AuthButton btnCode="readyAddRequisitionOrder.baocun">
<Button key="1" onClick={() => addSchemaAction.submit()} loading={btnLoading} type="primary" icon={<SaveOutlined />}>
{intl.formatMessage({id: 'purchaseOrder.save'})}
</Button>
</AuthButton>,
]}
/>
<FormDetailWrapper>
......
......@@ -26,6 +26,7 @@ import FormDetailWrapper from '@/components/FormDetailWrapper'
import { useFormDetail } from '@/formSchema/effects/useFormDetail'
import { getOrderBuyerCreateDetail, getOrderBuyerCreatePageItems, postOrderBuyerCreateSrm, postOrderBuyerCreateSrmUpdate } from '@/services/OrderNewV2Api'
import { getLogisticsReceiverAddressGet, getLogisticsSelectListMemberShipperAddress } from '@/services/LogisticsV2Api'
import AuthButton from '@/components/AuthButton'
export interface PurchaseOrderDetailProps { }
......@@ -275,9 +276,11 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
title={id?intl.formatMessage({id: 'purchaseOrder.edit'}):intl.formatMessage({id: 'purchaseOrder.add'})}
schema={initFormSchema}
extraRight={[
<Button key="1" onClick={() => addSchemaAction.submit()} loading={btnLoading} type="primary" icon={<SaveOutlined />}>
{intl.formatMessage({id: 'purchaseOrder.save'})}
</Button>,
<AuthButton btnCode="readyAddSrmOrder.baocun">
<Button key="1" onClick={() => addSchemaAction.submit()} loading={btnLoading} type="primary" icon={<SaveOutlined />}>
{intl.formatMessage({id: 'purchaseOrder.save'})}
</Button>
</AuthButton>,
]}
/>
<FormDetailWrapper>
......
......@@ -13,6 +13,7 @@ import { useSelfTable } from './model/useReadyAddOrder'
import { useHttpRequest } from '@/hooks/useHttpRequest'
import '../index.less'
import { getOrderBuyerCreateRequisitionPage, postOrderBuyerCreateDeleteBatch, postOrderBuyerCreateSubmitBatch } from '@/services/OrderNewV2Api'
import AuthButton from '@/components/AuthButton';
/**
* 待新增请购采购订单
......@@ -101,27 +102,33 @@ const ReadyAddRequisitionOrder:React.FC<ReadyAddRequisitionOrderProps> = () => {
}}
formilyChilds={{
children: <Space>
<Button
icon={<PlusCircleOutlined/>}
type='primary'
onClick={clickAdd}
>
<AuthButton btnCode="readyAddRequisitionOrder.xinzeng">
<Button
icon={<PlusCircleOutlined/>}
type='primary'
onClick={clickAdd}
>
{
intl.formatMessage({id: 'purchaseOrder.readyAddOrder.button1'})
}
</Button>
</AuthButton>
<AuthButton btnCode="readyAddRequisitionOrder.bianji">
<Button onClick={handleBitchPush} loading={submitLoading}>
{
intl.formatMessage({id: 'purchaseOrder.readyAddOrder.button1'})
intl.formatMessage({id: 'purchaseOrder.readyAddOrder.button2'})
}
</Button>
<Button onClick={handleBitchPush} loading={submitLoading}>
{
intl.formatMessage({id: 'purchaseOrder.readyAddOrder.button2'})
}
</Button>
</Button>
</AuthButton>
<DropDeleteDown>
<Menu onClick={(e) => handleMenuClick(e)}>
<Menu.Item key="1" icon={<DeleteOutlined />}>
{
intl.formatMessage({id: 'purchaseOrder.readyAddOrder.button3'})
}
</Menu.Item>
<AuthButton btnCode="readyAddRequisitionOrder.shanchu">
<Menu.Item key="1" icon={<DeleteOutlined />}>
{
intl.formatMessage({id: 'purchaseOrder.readyAddOrder.button3'})
}
</Menu.Item>
</AuthButton>
</Menu>
</DropDeleteDown>
</Space>,
......
......@@ -39,10 +39,16 @@ export const useSelfTable = () => {
[intl.formatMessage({id: 'purchaseOrder.readyAddOrder.useSelfTableOpeartion3'})]: () => handleDelete(record.orderId),
}
const buttonPermissionsMap = {
[intl.formatMessage({ id: 'purchaseOrder.readyAddOrder.useSelfTableOpeartion1', defaultMessage: '提交' })]: 'readyAddRequisitionOrder.tijiao',
[intl.formatMessage({ id: 'purchaseOrder.readyAddOrder.useSelfTableOpeartion2', defaultMessage: '编辑' })]: 'readyAddRequisitionOrder.bianji',
[intl.formatMessage({ id: 'purchaseOrder.readyAddOrder.useSelfTableOpeartion3', defaultMessage: '删除' })]: 'readyAddRequisitionOrder.shanchu',
}
return (
<TableOperation
buttonTextFieldMap={buttonGroup}
operationHandler={operationHandler}
buttonPermissionsMap={buttonPermissionsMap}
/>
)
}
......
......@@ -14,6 +14,7 @@ import { useHttpRequest } from '@/hooks/useHttpRequest'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import '../index.less'
import { getOrderBuyerCreateSrmPage, postOrderBuyerCreateDeleteBatch, postOrderBuyerCreateSubmitBatch } from '@/services/OrderNewV2Api'
import AuthButton from '@/components/AuthButton';
/**
* 待新增合同采购订单
......@@ -103,27 +104,33 @@ const ReadyAddSrmOrder:React.FC<ReadyAddSrmOrderProps> = () => {
}}
formilyChilds={{
children: <Space>
<Button
icon={<PlusCircleOutlined/>}
type='primary'
onClick={clickAdd}
>
<AuthButton btnCode="readyAddSrmOrder.xinzeng">
<Button
icon={<PlusCircleOutlined/>}
type='primary'
onClick={clickAdd}
>
{
intl.formatMessage({id: 'purchaseOrder.readyAddOrder.button1'})
}
</Button>
</AuthButton>
<AuthButton btnCode="readyAddSrmOrder.piliangtijiao">
<Button onClick={handleBitchPush} loading={submitLoading}>
{
intl.formatMessage({id: 'purchaseOrder.readyAddOrder.button1'})
intl.formatMessage({id: 'purchaseOrder.readyAddOrder.button2'})
}
</Button>
<Button onClick={handleBitchPush} loading={submitLoading}>
{
intl.formatMessage({id: 'purchaseOrder.readyAddOrder.button2'})
}
</Button>
</Button>
</AuthButton>
<DropDeleteDown>
<Menu onClick={(e) => handleMenuClick(e)}>
<Menu.Item key="1" icon={<DeleteOutlined />}>
{
intl.formatMessage({id: 'purchaseOrder.readyAddOrder.button3'})
}
</Menu.Item>
<AuthButton btnCode="readyAddSrmOrder.piliangshanchu">
<Menu.Item key="1" icon={<DeleteOutlined />}>
{
intl.formatMessage({id: 'purchaseOrder.readyAddOrder.button3'})
}
</Menu.Item>
</AuthButton>
</Menu>
</DropDeleteDown>
</Space>,
......
......@@ -38,10 +38,17 @@ export const useSelfTable = () => {
[intl.formatMessage({id: 'purchaseOrder.readyAddOrder.useSelfTableOpeartion2'})]: () => handleEdit(record),
[intl.formatMessage({id: 'purchaseOrder.readyAddOrder.useSelfTableOpeartion3'})]: () => handleDelete(record.orderId),
}
const buttonPermissionsMap = {
[intl.formatMessage({ id: 'purchaseOrder.readyAddOrder.useSelfTableOpeartion1', defaultMessage: '提交' })]: 'readyAddSrmOrder.tijiao',
[intl.formatMessage({ id: 'purchaseOrder.readyAddOrder.useSelfTableOpeartion2', defaultMessage: '编辑' })]: 'readyAddSrmOrder.bianji',
[intl.formatMessage({ id: 'purchaseOrder.readyAddOrder.useSelfTableOpeartion3', defaultMessage: '删除' })]: 'readyAddSrmOrder.shanchu',
}
return (
<TableOperation
buttonTextFieldMap={buttonGroup}
operationHandler={operationHandler}
buttonPermissionsMap={buttonPermissionsMap}
/>
)
}
......
......@@ -205,10 +205,16 @@ const ReadyDelevedOrder:React.FC<ReadyDelevedOrderProps> = () => {
[intl.formatMessage({id: 'purchaseOrder.operation5'})]: () => inviteParticipiteActivity(record),
}
const buttonPermissionsMap = {
[intl.formatMessage({id: 'purchaseOrder.operation2'})]: 'readyDelevedOrder.shouhou',
[intl.formatMessage({id: 'purchaseOrder.operation5'})]: 'readyDelevedOrder.yaoqingpintuan',
}
return (
<TableOperation
buttonTextFieldMap={buttonGroup}
operationHandler={operationHandler}
buttonPermissionsMap={buttonPermissionsMap}
/>
)
}
......
......@@ -9,6 +9,7 @@ import { history, useIntl } from 'umi'
import { useHttpRequest } from '@/hooks/useHttpRequest';
import OrderDetailSection from '../../../components/orderDetailSection';
import { postOrderBuyerValidateSubmit } from '@/services/OrderNewV2Api';
import AuthButton from '@/components/AuthButton';
const ReadySubmitOrderDetail: React.FC = () => {
const { formContext, id, detailList } = useOrderDetail({type: 'purchaseOrder'})
......@@ -30,9 +31,11 @@ const ReadySubmitOrderDetail: React.FC = () => {
<div>
<OrderDetailContext.Provider value={formContext}>
<OrderDetailHeader detailList={detailList} detailData={formContext.data} extraRight={
<Button type='primary' onClick={handleClick} loading={loading}>
{intl.formatMessage({ id: 'purchaseOrder.tijiaodingdan', defaultMessage: '提交订单' })}
</Button>
<AuthButton btnCode="readySubmitOrderDetail.tijiao">
<Button type='primary' onClick={handleClick} loading={loading}>
{intl.formatMessage({ id: 'purchaseOrder.tijiaodingdan', defaultMessage: '提交订单' })}
</Button>
</AuthButton>
} />
<OrderDetailWrapper>
......
......@@ -12,6 +12,7 @@ import { useHttpRequest } from '@/hooks/useHttpRequest'
import '../index.less'
import { getOrderBuyerValidateSubmitPage, postOrderBuyerValidateSubmitBatch } from '@/services/OrderNewV2Api'
import { useIntl } from 'umi'
import AuthButton from '@/components/AuthButton';
// 待提交订单
......@@ -79,8 +80,11 @@ const ReadySubmitOrder:React.FC<ReadySubmitOrderProps> = (props) => {
}}
formilyChilds={{
children: <Space>
<Button onClick={handleBitchPush} loading={loading}>{intl.formatMessage({ id: 'purchaseOrder.piliangtijiao', defaultMessage: '批量提交' })}</Button>
</Space>,
<AuthButton btnCode="readySubmitOrder.piliangtijiao">
<Button onClick={handleBitchPush} loading={loading}>{intl.formatMessage({ id: 'purchaseOrder.piliangtijiao', defaultMessage: '批量提交' })}</Button>
</AuthButton>
</Space>
,
layouts: {
span: 8
}
......
......@@ -3,6 +3,7 @@ import { Button } from 'antd'
import { baseOrderListColumns } from '../../constant'
import { history, useIntl } from 'umi'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import AuthButton from '@/components/AuthButton'
export const useSelfTable = () => {
const ref = useRef<any>({})
......@@ -19,7 +20,7 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <Button type='link' onClick={() => handleSubmit(record.orderId)}>{intl.formatMessage({ id: 'purchaseOrder.tijiaodingdan', defaultMessage: '提交订单' })}</Button>
render: (text, record) => <AuthButton btnCode="readySubmitOrder.tijiao"><Button type='link' onClick={() => handleSubmit(record.orderId)}>{intl.formatMessage({ id: 'purchaseOrder.tijiaodingdan', defaultMessage: '提交订单' })}</Button></AuthButton>
}
])
......
......@@ -10,6 +10,7 @@ import { history, useIntl } from 'umi'
import { useHttpRequest } from '@/hooks/useHttpRequest';
import OrderDetailSection from '../../../components/orderDetailSection';
import { postOrderBuyerValidateGradeTwo } from '@/services/OrderNewV2Api';
import AuthButton from '@/components/AuthButton';
const SecondApprovedOrderDetail: React.FC = () => {
const { formContext, id, detailList } = useOrderDetail({type: 'purchaseOrder'})
......@@ -41,9 +42,11 @@ const SecondApprovedOrderDetail: React.FC = () => {
<div>
<OrderDetailContext.Provider value={formContext}>
<OrderDetailHeader detailList={detailList} detailData={formContext.data} extraRight={
<Button type='primary' onClick={handleClick}>
{intl.formatMessage({ id: 'purchaseOrder.tijiaoshenhe', defaultMessage: '提交审核' })}
</Button>
<AuthButton btnCode="secondApprovedOrderDetail.tijiao">
<Button type='primary' onClick={handleClick}>
{intl.formatMessage({ id: 'purchaseOrder.tijiaoshenhe', defaultMessage: '提交审核' })}
</Button>
</AuthButton>
} />
<OrderDetailWrapper>
......
......@@ -12,6 +12,7 @@ import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { useHttpRequest } from '@/hooks/useHttpRequest'
import { getOrderBuyerValidateGradeTwoPage, postOrderBuyerValidateGradeTwoBatch } from '@/services/OrderNewV2Api'
import { useIntl } from 'umi'
import AuthButton from '@/components/AuthButton';
// 二级待审核订单
......@@ -80,7 +81,9 @@ const SecondApprovedOrder:React.FC<SecondApprovedOrderProps> = (props) => {
}}
formilyChilds={{
children: <Space>
<Button onClick={handleSubmitBatch} loading={loading}>{intl.formatMessage({ id: 'purchaseOrder.piliangtijiaoshen', defaultMessage: '批量提交审核' })}</Button>
<AuthButton btnCode="secondApprovedOrder.piliangtijiao">
<Button onClick={handleSubmitBatch} loading={loading}>{intl.formatMessage({ id: 'purchaseOrder.piliangtijiaoshen', defaultMessage: '批量提交审核' })}</Button>
</AuthButton>
</Space>,
layouts: {
span: 8
......
......@@ -2,6 +2,7 @@ import React, { useRef } from 'react'
import { Button } from 'antd'
import { baseOrderListColumns } from '../../constant'
import { history, useIntl } from 'umi'
import AuthButton from '@/components/AuthButton'
export const useSelfTable = () => {
const ref = useRef<any>({})
......@@ -17,7 +18,9 @@ export const useSelfTable = () => {
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <>
<Button type='link' onClick={() => handleSubmit(record)}>{intl.formatMessage({ id: 'purchaseOrder.tijiaoshenhe', defaultMessage: '提交审核' })}</Button>
<AuthButton btnCode="secondApprovedOrder.tijiao">
<Button type='link' onClick={() => handleSubmit(record)}>{intl.formatMessage({ id: 'purchaseOrder.tijiaoshenhe', defaultMessage: '提交审核' })}</Button>
</AuthButton>
</>
}
])
......
......@@ -30,6 +30,7 @@ import moment from 'moment'
import { getLogisticsReceiverAddressGet, getLogisticsSelectListMemberShipperAddress, postLogisticsFreightTemplateCalFreightPrice } from '@/services/LogisticsV2Api'
import { getOrderBuyerCreateDetail, postOrderVendorCreateAgentOrder } from '@/services/OrderNewV2Api'
import ModalForm from '@/components/ModalForm'
import AuthButton from '@/components/AuthButton'
export interface AgentOrderDetailProps { }
......@@ -456,9 +457,11 @@ const AgentOrderDetail: React.FC<AgentOrderDetailProps> = (props) => {
title={id ? intl.formatMessage({ id: 'purchaseOrder.edit' }) : intl.formatMessage({ id: 'purchaseOrder.add' })}
schema={initFormSchema}
extraRight={[
<Button key="1" onClick={() => addSchemaAction.submit()} loading={btnLoading} type="primary" icon={<SaveOutlined />}>
{intl.formatMessage({ id: 'purchaseOrder.save' })}
</Button>,
<AuthButton btnCode="s.agentOrder.baocun">
<Button key="1" onClick={() => addSchemaAction.submit()} loading={btnLoading} type="primary" icon={<SaveOutlined />}>
{intl.formatMessage({ id: 'purchaseOrder.save' })}
</Button>
</AuthButton>,
]}
/>
<FormDetailWrapper>
......
......@@ -10,6 +10,7 @@ import { history, useIntl } from 'umi'
import { useHttpRequest } from '@/hooks/useHttpRequest';
import OrderDetailSection from '../../../components/orderDetailSection';
import { postOrderVendorValidateGradeOne } from '@/services/OrderNewV2Api';
import AuthButton from '@/components/AuthButton';
const FirstApprovedOrderDetail: React.FC = () => {
const { formContext, id, detailList } = useOrderDetail({type: 'saleOrder'})
......@@ -42,9 +43,11 @@ const FirstApprovedOrderDetail: React.FC = () => {
<div>
<OrderDetailContext.Provider value={formContext}>
<OrderDetailHeader detailList={detailList} detailData={formContext.data} extraRight={
<AuthButton btnCode="s.firstApprovedOrderDetail.tijiao">
<Button type='primary' onClick={handleClick}>
{intl.formatMessage({ id: 'saleOrder.tijiaoshenhe', defaultMessage: '提交审核' })}
</Button>
</AuthButton>
} />
<OrderDetailWrapper>
......
......@@ -12,6 +12,7 @@ import { useHttpRequest } from '@/hooks/useHttpRequest'
import '../index.less'
import { getOrderVendorValidateGradeOnePage, postOrderVendorValidateGradeOneBatch } from '@/services/OrderNewV2Api'
import { useIntl } from 'umi'
import AuthButton from '@/components/AuthButton';
// 一级待审核订单
......@@ -79,7 +80,9 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = () => {
}}
formilyChilds={{
children: <Space>
<Button onClick={handleBitchPush} loading={loading}>{intl.formatMessage({ id: 'saleOrder.piliangtijiaoshen', defaultMessage: '批量提交审核' })}</Button>
<AuthButton btnCode="s.firstApprovedOrder.piliangtijiao">
<Button onClick={handleBitchPush} loading={loading}>{intl.formatMessage({ id: 'saleOrder.piliangtijiaoshen', defaultMessage: '批量提交审核' })}</Button>
</AuthButton>
</Space>,
layouts: {
span: 8
......
......@@ -3,6 +3,7 @@ import { Button } from 'antd'
import { baseOrderListColumns } from '../../constant'
import { history, useIntl } from 'umi'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import AuthButton from '@/components/AuthButton'
export const useSelfTable = () => {
const ref = useRef<any>({})
......@@ -26,7 +27,9 @@ export const useSelfTable = () => {
key: 'ctl',
render: (text, record) => {
return <>
<AuthButton btnCode="s.firstApprovedOrder.tijiao">
<Button type='link' onClick={() => handleSubmit(record)}>{intl.formatMessage({ id: 'saleOrder.tijiaoshenhe', defaultMessage: '提交审核' })}</Button>
</AuthButton>
</>
}
}
......
......@@ -36,6 +36,7 @@ import { h5PageAddressByScan } from '@/constants/order';
import useAgentInfo from '../saleOrder/agentPurchaseOrder/hooks/useAgentInfo'
import { COLUMNS_LARGE_WIDTH, COLUMNS_ACTION_WIDTH } from '@/constants/table';
import SortableTableHeader, { useSortableColumns, CustomColumnsConfigure, CustomColumnsConfigureRef } from '@/components/SortableTableHeader';
import AuthButton from '@/components/AuthButton';
// 销售订单查询
......@@ -121,7 +122,7 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
const fetchParams = useRef<any>({})
const cancelId = useRef()
const customColumnsConfigureRef = useRef<CustomColumnsConfigureRef | null>(null);
const { dispatch, dispatchByOrder } = useAgentInfo()
const loadingTableData = (params) => {
......@@ -353,10 +354,21 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
[intl.formatMessage({ id: 'saleOrder.shengchengzhifulian', defaultMessage: '生成支付链接' })]: () => generatePayChart(record)
}
const buttonPermissionsMap = {
[intl.formatMessage({ id: 'saleOrder.quxiaodingdan', defaultMessage: '取消订单' })]: 's.orderList.quxiao',
[intl.formatMessage({ id: 'saleOrder.zhongzhi', defaultMessage: '中止' })]: 's.orderList.zhongzhi',
[intl.formatMessage({ id: 'saleOrder.pingjia', defaultMessage: '评价' })]: 's.orderList.pingjia',
[intl.formatMessage({ id: 'saleOrder.zhuandan', defaultMessage: '转单' })]: 's.orderList.zhuandan',
[intl.formatMessage({ id: 'saleOrder.xiugaidingdanjia', defaultMessage: '修改订单价格' })]: 's.orderList.xiugaijiage',
[intl.formatMessage({ id: 'saleOrder.xiugaidingdan', defaultMessage: '修改订单' })]: 's.orderList.xiugaidingdan',
[intl.formatMessage({ id: 'saleOrder.shengchengzhifulian', defaultMessage: '生成支付链接' })]: 's.orderList.shengchenglianjie'
}
return (
<TableOperation
buttonTextFieldMap={buttonGroup}
operationHandler={operationHandler}
buttonPermissionsMap={buttonPermissionsMap}
/>
)
}
......@@ -380,8 +392,12 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
}
const controllerBtns = <Space>
<Button style={{width: 140}} onClick={handleExport} type='default'>{intl.formatMessage({ id: 'saleOrder.daochu', defaultMessage: '导出' })}</Button>
<Button type="primary" onClick={() => batchTransform()}>{intl.formatMessage({ id: 'saleOrder.zhuandan', defaultMessage: '转单' })}</Button>
<AuthButton btnCode="s.orderList.daochu">
<Button style={{width: 140}} onClick={handleExport} type='default'>{intl.formatMessage({ id: 'saleOrder.daochu', defaultMessage: '导出' })}</Button>
</AuthButton>
<AuthButton btnCode="s.orderList.zhuandan">
<Button type="primary" onClick={() => batchTransform()}>{intl.formatMessage({ id: 'saleOrder.zhuandan', defaultMessage: '转单' })}</Button>
</AuthButton>
</Space>
......
......@@ -25,10 +25,16 @@ export const useSelfTable = () => {
[intl.formatMessage({ id: 'saleOrder.xinzengfahuodan', defaultMessage: '新增发货单' })]: () => handleAdd(record),
}
const buttonPermissionsMap = {
[intl.formatMessage({ id: 'saleOrder.shenhe', defaultMessage: '审核' })]: 's.readyAddDelevedOrder.shenhe',
[intl.formatMessage({ id: 'saleOrder.xinzengfahuodan', defaultMessage: '新增发货单' })]: 's.readyAddDelevedOrder.xinzeng',
}
return (
<TableOperation
buttonTextFieldMap={buttonGroup}
operationHandler={operationHandler}
buttonPermissionsMap={buttonPermissionsMap}
/>
)
}
......
......@@ -23,10 +23,18 @@ export const useSelfTable = () => {
[intl.formatMessage({ id: 'saleOrder.zhakanwuliudan', defaultMessage: '查看物流单' })]: () => handlePreview(record),
[intl.formatMessage({ id: 'saleOrder.xiugaiwuliudan', defaultMessage: '修改物流单' })]: () => handleModify(record),
}
const buttonPermissionsMap = {
[intl.formatMessage({ id: 'saleOrder.xinzengwuliudan', defaultMessage: '新增物流单' })]: 's.readyAddLogisticsOrder.xinzeng',
[intl.formatMessage({ id: 'saleOrder.zhakanwuliudan', defaultMessage: '查看物流单' })]: 's.readyAddLogisticsOrder.chakan',
[intl.formatMessage({ id: 'saleOrder.xiugaiwuliudan', defaultMessage: '修改物流单' })]: 's.readyAddLogisticsOrder.xiugai',
}
return (
<TableOperation
buttonTextFieldMap={buttonGroup}
operationHandler={operationHandler}
buttonPermissionsMap={buttonPermissionsMap}
/>
)
}
......
......@@ -8,6 +8,7 @@ import { useOrderDetail } from '../../../_public/order/effects/useOrderDetail';
import OrderDetailSection from '../../../components/orderDetailSection';
import CreateOrderElectronModal from '@/pages/transaction/components/createElectronModal';
import { useIntl } from 'umi';
import AuthButton from '@/components/AuthButton';
const ReadyApprovedOrderDetail: React.FC = () => {
const { formContext, id, detailList } = useOrderDetail({type: 'saleOrder'})
......@@ -21,9 +22,11 @@ const ReadyApprovedOrderDetail: React.FC = () => {
<div>
<OrderDetailContext.Provider value={formContext}>
<OrderDetailHeader detailList={detailList} detailData={formContext.data} extraRight={
<Button type='primary' onClick={handleClick}>
{intl.formatMessage({ id: 'saleOrder.tijiaoshenhe', defaultMessage: '提交审核' })}
</Button>
<AuthButton btnCode="s.readyApprovedOrderDetail.tijiao">
<Button type='primary' onClick={handleClick}>
{intl.formatMessage({ id: 'saleOrder.tijiaoshenhe', defaultMessage: '提交审核' })}
</Button>
</AuthButton>
} />
<OrderDetailWrapper>
......
......@@ -2,6 +2,7 @@ import React, { useRef } from 'react'
import { Button } from 'antd'
import { baseOrderListColumns } from '../../constant'
import { history, useIntl } from 'umi'
import AuthButton from '@/components/AuthButton'
export const useSelfTable = () => {
const ref = useRef<any>({})
......@@ -22,7 +23,9 @@ export const useSelfTable = () => {
key: 'ctl',
render: (text, record) => {
return <>
<AuthButton btnCode="s.readyApprovedOrder.tijiao">
<Button type='link' onClick={() => handleSubmit(record.orderId)}>{intl.formatMessage({ id: 'saleOrder.tijiaoshenhe', defaultMessage: '提交审核' })}</Button>
</AuthButton>
</>
}
}
......
......@@ -7,6 +7,7 @@ import PreLoading from '@/components/PreLoading';
import { useOrderDetail } from '../../../_public/order/effects/useOrderDetail';
import OrderDetailSection from '../../../components/orderDetailSection';
import { useIntl } from 'umi';
import AuthButton from '@/components/AuthButton';
const ReadyCheckoutOrderDetail: React.FC = () => {
const intl = useIntl()
......@@ -24,9 +25,11 @@ const ReadyCheckoutOrderDetail: React.FC = () => {
detailList={detailList}
detailData={formContext.data}
extraRight={
<Button type='primary' onClick={handleSubmit}>
{intl.formatMessage({ id: 'saleOrder.quhexiaozitidingdan' })}
</Button>
<AuthButton btnCode="s.readyCheckoutOrderDetail.quhexiao">
<Button type='primary' onClick={handleSubmit}>
{intl.formatMessage({ id: 'saleOrder.quhexiaozitidingdan' })}
</Button>
</AuthButton>
}
/>
......
......@@ -6,6 +6,7 @@ import { formatTimeString } from '@/utils'
import StatusColors from '@/pages/transaction/components/statusColors'
import { FieldTimeOutlined } from '@ant-design/icons'
import { ORDER_TYPE_CHANNEL_POINTS, ORDER_TYPE_POINTS } from '@/constants/order'
import AuthButton from '@/components/AuthButton'
export const useSelfTable = () => {
const intl = useIntl()
......@@ -83,7 +84,7 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <Button type='link' onClick={() => handleConfirm(record)}>核销自提订单</Button>
render: (text, record) => <AuthButton btnCode="s.readyCheckoutOrder.quhexiao"><Button type='link' onClick={() => handleConfirm(record)}>{intl.formatMessage({ id: 'saleOrder.hexiaozitidingdan', defaultMessage: '核销自提订单' })}</Button></AuthButton>
}
]
......
......@@ -9,6 +9,7 @@ import OrderHandDeleved from '../../../components/orderHandDeleved';
import OrderDetailSection from '../../../components/orderDetailSection';
import { usePageStatus } from '@/hooks/usePageStatus';
import { useIntl } from 'umi';
import AuthButton from '@/components/AuthButton';
const ReadyConfirmDelevedOrderDetail: React.FC = () => {
const { formContext, id, detailList } = useOrderDetail({type: 's_readyConfirmDelevedOrder'})
......@@ -41,9 +42,11 @@ const ReadyConfirmDelevedOrderDetail: React.FC = () => {
<div>
<OrderDetailContext.Provider value={formContext}>
<OrderDetailHeader detailList={detailList} detailData={formContext.data} extraRight={
<AuthButton btnCode="s.readyConfirmDelevedOrderDetail.queren">
<Button type='primary' onClick={handleClick}>
{ isHandDeleved ? intl.formatMessage({ id: 'saleOrder.querenshougongfa', defaultMessage: '确认手工发货' }) : intl.formatMessage({ id: 'saleOrder.qufahuo', defaultMessage: '去发货' }) }
</Button>
</AuthButton>
} />
<OrderDetailWrapper>
......
......@@ -6,6 +6,7 @@ import { formatTimeString } from '@/utils'
import StatusColors from '@/pages/transaction/components/statusColors'
import { FieldTimeOutlined } from '@ant-design/icons'
import { ORDER_TYPE_CHANNEL_POINTS, ORDER_TYPE_POINTS } from '@/constants/order'
import AuthButton from '@/components/AuthButton'
// 业务hooks, 待支付订单
export const useSelfTable = () => {
......@@ -91,7 +92,7 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <Button type='link' onClick={() => handleConfirm(record)}>{intl.formatMessage({ id: 'saleOrder.querenfahuo', defaultMessage: '确认发货' })}</Button>
render: (text, record) => <AuthButton btnCode="s.readyConfirmDelevedOrder.queren"><Button type='link' onClick={() => handleConfirm(record)}>{intl.formatMessage({ id: 'saleOrder.querenfahuo', defaultMessage: '确认发货' })}</Button></AuthButton>
}
]
......
......@@ -12,6 +12,7 @@ import OrderDetailSection from '../../../components/orderDetailSection';
import OrderElectronModal from '@/pages/transaction/components/orderElectronModal';
import { postOrderVendorValidateConfirm } from '@/services/OrderNewV2Api';
import { getContractSignatureAuthAuthState } from '@/services/ContractV2Api';
import AuthButton from '@/components/AuthButton';
const ReadyConfirmOrderDetail: React.FC = () => {
const { formContext, id, detailList } = useOrderDetail({type: 'saleOrder'})
......@@ -58,9 +59,11 @@ const ReadyConfirmOrderDetail: React.FC = () => {
<div>
<OrderDetailContext.Provider value={formContext}>
<OrderDetailHeader detailList={detailList} detailData={formContext.data} extraRight={
<Button type='primary' onClick={handleClick}>
{intl.formatMessage({ id: 'saleOrder.querendingdan', defaultMessage: '确认订单' })}
</Button>
<AuthButton btnCode="s.readyConfirmOrderDetail.queren">
<Button type='primary' onClick={handleClick}>
{intl.formatMessage({ id: 'saleOrder.querendingdan', defaultMessage: '确认订单' })}
</Button>
</AuthButton>
} />
<OrderDetailWrapper>
......
import { history, useIntl } from 'umi'
import { Button } from 'antd'
import { baseOrderListColumns } from '../../constant'
import AuthButton from '@/components/AuthButton'
export const useSelfTable = () => {
const intl = useIntl()
......@@ -20,7 +21,9 @@ export const useSelfTable = () => {
key: 'ctl',
render: (text, record) => {
return <>
<AuthButton btnCode="s.readyConfirmOrder.queren">
<Button type='link' onClick={() => handleConfirm(record)}>{intl.formatMessage({ id: 'saleOrder.querendingdan', defaultMessage: '确认订单' })}</Button>
</AuthButton>
</>
}
}
......
......@@ -8,6 +8,7 @@ import { useOrderDetail } from '../../../_public/order/effects/useOrderDetail';
import { useHttpRequest } from '@/hooks/useHttpRequest';
import OrderDetailSection from '../../../components/orderDetailSection';
import { useIntl } from 'umi';
import AuthButton from '@/components/AuthButton';
const ReadyConfirmReturnOrderDetail: React.FC = () => {
const intl = useIntl()
......@@ -25,9 +26,11 @@ const ReadyConfirmReturnOrderDetail: React.FC = () => {
detailList={detailList}
detailData={formContext.data}
extraRight={
<Button type='primary' onClick={handleSubmit}>
{intl.formatMessage({ id: 'saleOrder.ququerenhuidan', defaultMessage: '去确认回单' })}
</Button>
<AuthButton btnCode="s.readyConfirmReturnOrderDetail.ququeren">
<Button type='primary' onClick={handleSubmit}>
{intl.formatMessage({ id: 'saleOrder.ququerenhuidan', defaultMessage: '去确认回单' })}
</Button>
</AuthButton>
}
/>
......
......@@ -6,6 +6,7 @@ import { formatTimeString } from '@/utils'
import StatusColors from '@/pages/transaction/components/statusColors'
import { FieldTimeOutlined } from '@ant-design/icons'
import { ORDER_TYPE_CHANNEL_POINTS, ORDER_TYPE_POINTS } from '@/constants/order'
import AuthButton from '@/components/AuthButton'
// 业务hooks
export const useSelfTable = () => {
......@@ -94,7 +95,7 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <Button type='link' onClick={() => handleConfirm(record)}>{intl.formatMessage({ id: 'saleOrder.querenhuidan', defaultMessage: '确认回单' })}</Button>
render: (text, record) => <AuthButton btnCode="s.readyConfirmReturnOrder.queren"><Button type='link' onClick={() => handleConfirm(record)}>{intl.formatMessage({ id: 'saleOrder.querenhuidan', defaultMessage: '确认回单' })}</Button></AuthButton>
}
]
......
......@@ -12,6 +12,7 @@ import { useHttpRequest } from '@/hooks/useHttpRequest'
import '../index.less'
import { getOrderVendorTakePage, postOrderVendorTakeBatch } from '@/services/OrderNewV2Api'
import { useIntl } from 'umi'
import AuthButton from '@/components/AuthButton';
// 待分配订单
......@@ -81,7 +82,9 @@ const ReadyDistributionOrder:React.FC<ReadyDistributionOrderProps> = () => {
}}
formilyChilds={{
children: <Space>
<Button onClick={handleBitchPush} loading={loading}>{intl.formatMessage({ id: 'purchaseOrder.pilianglingqu', defaultMessage: '批量领取' })}</Button>
<AuthButton btnCode="s.readyDistributionOrder.pilianglingqu">
<Button onClick={handleBitchPush} loading={loading}>{intl.formatMessage({ id: 'purchaseOrder.pilianglingqu', defaultMessage: '批量领取' })}</Button>
</AuthButton>
</Space>,
layouts: {
span: 8
......
......@@ -4,6 +4,7 @@ import { baseOrderListColumns } from '../../constant'
import { useIntl } from 'umi'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { postOrderVendorTake } from '@/services/OrderNewV2Api'
import AuthButton from '@/components/AuthButton'
export const useSelfTable = () => {
const ref = useRef<any>({})
......@@ -44,7 +45,7 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <Button type='link' onClick={() => handleSubmit(record.orderId)}>{intl.formatMessage({ id: 'purchaseOrder.lingqu', defaultMessage: '领取' })}</Button>
render: (text, record) => <AuthButton btnCode="s.readyDistributionOrder.lingqu"><Button type='link' onClick={() => handleSubmit(record.orderId)}>{intl.formatMessage({ id: 'purchaseOrder.lingqu', defaultMessage: '领取' })}</Button></AuthButton>
}
])
}
......
......@@ -8,6 +8,7 @@ import { useOrderDetail } from '../../../_public/order/effects/useOrderDetail';
import OrderDetailSection from '../../../components/orderDetailSection';
import OrderPayResultModal from '@/pages/transaction/components/orderPayResultModal';
import { useIntl } from 'umi';
import AuthButton from '@/components/AuthButton';
const ReadyPayResultOrderDetail: React.FC = () => {
const { formContext, id, detailList } = useOrderDetail({type: 'saleOrder'})
......@@ -21,9 +22,11 @@ const ReadyPayResultOrderDetail: React.FC = () => {
<div>
<OrderDetailContext.Provider value={formContext}>
<OrderDetailHeader detailList={detailList} detailData={formContext.data} extraRight={
<Button type='primary' onClick={handleClick}>
{intl.formatMessage({ id: 'saleOrder.querenzhifujie', defaultMessage: '确认支付结果' })}
</Button>
<AuthButton btnCode="s.readyPayResultDetail.queren">
<Button type='primary' onClick={handleClick}>
{intl.formatMessage({ id: 'saleOrder.querenzhifujie', defaultMessage: '确认支付结果' })}
</Button>
</AuthButton>
} />
<OrderDetailWrapper>
......
......@@ -13,6 +13,7 @@ import {
View
} from 'bizcharts';
import DataSet from "@antv/data-set";
import AuthButton from '@/components/AuthButton'
// 圆形环状金额显示
const CircleChart = props => {
......@@ -124,7 +125,7 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <Button type='link' onClick={() => handleConfirm(record)}>{intl.formatMessage({ id: 'saleOrder.queren', defaultMessage: '确认' })}</Button>
render: (text, record) => <AuthButton btnCode="s.readyPayResult.queren"><Button type='link' onClick={() => handleConfirm(record)}>{intl.formatMessage({ id: 'saleOrder.queren', defaultMessage: '确认' })}</Button></AuthButton>
}
]
......
......@@ -10,6 +10,7 @@ import { history, useIntl } from 'umi'
import { useHttpRequest } from '@/hooks/useHttpRequest';
import OrderDetailSection from '../../../components/orderDetailSection';
import { postOrderVendorValidateGradeTwo } from '@/services/OrderNewV2Api';
import AuthButton from '@/components/AuthButton';
const SecondApprovedOrderDetail: React.FC = () => {
const { formContext, id, detailList } = useOrderDetail({type: 'saleOrder'})
......@@ -40,9 +41,11 @@ const SecondApprovedOrderDetail: React.FC = () => {
<div>
<OrderDetailContext.Provider value={formContext}>
<OrderDetailHeader detailList={detailList} detailData={formContext.data} extraRight={
<Button type='primary' onClick={handleClick}>
{intl.formatMessage({ id: 'saleOrder.tijiaoshenhe', defaultMessage: '提交审核' })}
</Button>
<AuthButton btnCode="s.secondApprovedOrderDetail.tijiao">
<Button type='primary' onClick={handleClick}>
{intl.formatMessage({ id: 'saleOrder.tijiaoshenhe', defaultMessage: '提交审核' })}
</Button>
</AuthButton>
} />
<OrderDetailWrapper>
......
......@@ -13,6 +13,7 @@ import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePicke
import '../index.less'
import { getOrderVendorValidateGradeTwoPage, postOrderVendorValidateGradeTwoBatch } from '@/services/OrderNewV2Api'
import { useIntl } from 'umi'
import AuthButton from '@/components/AuthButton';
// 二级待审核订单
......@@ -80,7 +81,9 @@ const SecondApprovedOrder:React.FC<SecondApprovedOrderProps> = (props) => {
}}
formilyChilds={{
children: <Space>
<Button onClick={handleSubmitBatch} loading={loading}>{intl.formatMessage({ id: 'saleOrder.piliangtijiaoshen', defaultMessage: '批量提交审核' })}</Button>
<AuthButton btnCode="s.secondApprovedOrder.piliangtijiao">
<Button onClick={handleSubmitBatch} loading={loading}>{intl.formatMessage({ id: 'saleOrder.piliangtijiaoshen', defaultMessage: '批量提交审核' })}</Button>
</AuthButton>
</Space>,
layouts: {
span: 8
......
......@@ -2,6 +2,7 @@ import { useRef } from 'react'
import { Button } from 'antd'
import { baseOrderListColumns } from '../../constant'
import { history, useIntl } from 'umi'
import AuthButton from '@/components/AuthButton'
// 业务hooks, 待新增订单
export const useSelfTable = () => {
......@@ -24,7 +25,9 @@ export const useSelfTable = () => {
key: 'ctl',
render: (text, record) => {
return <>
<AuthButton btnCode="s.secondApprovedOrder.tijiao">
<Button type='link' onClick={() => handleSubmit(record)}>{intl.formatMessage({ id: 'saleOrder.tijiaoshenhe', defaultMessage: '提交审核' })}</Button>
</AuthButton>
</>
}
}
......
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