Commit 9d35d37c authored by XieZhiXiong's avatar XieZhiXiong

Merge branch 'fix418' into 'v2-220418'

fix: 处理请购相关bug See merge request linkseeks-design/pro-platform!513
parents ed4427da 2c07d2e7
......@@ -90,7 +90,8 @@
height: 48px;
position: absolute;
outline: none;
color: transparent;
// color: transparent;
color: '#000';
caret-color: #EBECF0;
font-size: 28px;
padding: 0 14px;
......
......@@ -213,7 +213,7 @@ export const tableListSchema: any = (align?: String, colStyle?: Object) => {
}
/** 采购 请购单 公共列 */
/** 采购 请购单查询 列 */
export const baseOrderListColumns: any = (code: string) => {
const intl = useIntl()
......@@ -223,7 +223,7 @@ export const baseOrderListColumns: any = (code: string) => {
align: 'center',
dataIndex: 'requisitionNo',
key: 'requisitionNo',
width: 96,
width: 112,
render: (text, record) => {
return (
<EyePreview type={AuthUrl(code) ? 'link' : 'button'} url={`${history.location.pathname}/preview?id=${record.id}`}>
......
import { useRef } from 'react'
import { baseOrderListColumns } from '../../constant'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history, useIntl } from 'umi'
import TableOperation from '@/components/TableOperation'
import EyePreview from '@/components/EyePreview'
import { AuthUrl } from '@/components/AuthButton/AuthUrl'
import { formatTimeString } from '@/utils'
import StatusColors from '@/pages/transaction/components/statusColors'
// 待审核请购单 一级 Hook
export const useSelfTable = () => {
......@@ -33,6 +36,97 @@ export const useSelfTable = () => {
)
}
const baseOrderListColumns: any = (code: string) => {
return [
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanhao', defaultMessage: '请购单号' }),
align: 'center',
dataIndex: 'requisitionNo',
key: 'requisitionNo',
width: 128,
render: (text, record) => {
return (
<EyePreview type={AuthUrl(code) ? 'link' : 'button'} url={`${history.location.pathname}/preview?id=${record.id}`}>
{text}
</EyePreview>
)
},
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanzhaiyao', defaultMessage: '请购单摘要' }),
align: 'center',
dataIndex: 'digest',
key: 'digest',
width: 256,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.gongyinghuiyuan', defaultMessage: '供应会员' }),
align: 'center',
dataIndex: 'vendorMemberName',
key: 'vendorMemberName',
width: 192,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.yufuriqi', defaultMessage: '预付日期' }),
align: 'center',
dataIndex: 'advanceDeliveryDate',
key: 'advanceDeliveryDate',
width: 128,
render: (text) => formatTimeString(text, 'YYYY-MM-DD')
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoubumen', defaultMessage: '请购部门' }),
align: 'center',
dataIndex: 'department',
key: 'department',
width: 128,
},
{
title: "请购人",
align: 'center',
dataIndex: 'requisitioner',
key: 'requisitioner',
width: 88,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggouyongtu', defaultMessage: '请购用途' }),
align: 'center',
dataIndex: 'purpose',
key: 'purpose',
width: 216,
},
// {
// title: intl.formatMessage({ id: 'purchaseRequisition.qinggoushuliang', defaultMessage: '请购数量' }),
// align: 'center',
// dataIndex: 'quantity',
// key: 'quantity',
// width: 112,
// },
// {
// title: intl.formatMessage({ id: 'purchaseRequisition.yizhuandingdanshu', defaultMessage: '已转订单数量' }),
// align: 'center',
// dataIndex: 'transferQuantity',
// key: 'transferQuantity',
// width: 112,
// },
{
title: intl.formatMessage({ id: 'purchaseRequisition.danjushijian', defaultMessage: '单据时间' }),
align: 'center',
dataIndex: 'createTime',
key: 'createTime',
width: 160 ,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.neibuzhuangtai', defaultMessage: '内部状态' }),
align: 'center',
dataIndex: 'innerStatus',
key: 'innerStatus',
width: 160,
render: (text, record) => <StatusColors status={text} type='saleInside' mode="Badge" text={record['innerStatusName']} />,
},
]
}
const secondColumns = () => {
const alreadyColumns = baseOrderListColumns("firstApprovedBill.see")
if (alreadyColumns) {
......@@ -42,6 +136,7 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
width: 128,
render: (text: any, record: any) => renderOptionButton(record)
}
])
......
import { useRef } from 'react'
import { baseOrderListColumns } from '../../constant'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history, useIntl } from 'umi'
import TableOperation from '@/components/TableOperation'
import { Modal } from 'antd'
import { postPurchaseRequisitionDelete, postPurchaseRequisitionSubmitAudit } from '@/services/PurchaseV2Api'
import EyePreview from '@/components/EyePreview'
import { AuthUrl } from '@/components/AuthButton/AuthUrl'
import { formatTimeString } from '@/utils'
import StatusColors from '@/pages/transaction/components/statusColors'
// 待新增请购单 Hook
export const useSelfTable = () => {
......@@ -59,6 +62,97 @@ export const useSelfTable = () => {
)
}
const baseOrderListColumns: any = (code: string) => {
return [
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanhao', defaultMessage: '请购单号' }),
align: 'center',
dataIndex: 'requisitionNo',
key: 'requisitionNo',
width: 128,
render: (text, record) => {
return (
<EyePreview type={AuthUrl(code) ? 'link' : 'button'} url={`${history.location.pathname}/preview?id=${record.id}`}>
{text}
</EyePreview>
)
},
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanzhaiyao', defaultMessage: '请购单摘要' }),
align: 'center',
dataIndex: 'digest',
key: 'digest',
width: 256,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.gongyinghuiyuan', defaultMessage: '供应会员' }),
align: 'center',
dataIndex: 'vendorMemberName',
key: 'vendorMemberName',
width: 192,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.yufuriqi', defaultMessage: '预付日期' }),
align: 'center',
dataIndex: 'advanceDeliveryDate',
key: 'advanceDeliveryDate',
width: 128,
render: (text) => formatTimeString(text, 'YYYY-MM-DD')
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoubumen', defaultMessage: '请购部门' }),
align: 'center',
dataIndex: 'department',
key: 'department',
width: 128 ,
},
{
title: "请购人",
align: 'center',
dataIndex: 'requisitioner',
key: 'requisitioner',
width: 88,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggouyongtu', defaultMessage: '请购用途' }),
align: 'center',
dataIndex: 'purpose',
key: 'purpose',
width: 216,
},
// {
// title: intl.formatMessage({ id: 'purchaseRequisition.qinggoushuliang', defaultMessage: '请购数量' }),
// align: 'center',
// dataIndex: 'quantity',
// key: 'quantity',
// width: 112,
// },
// {
// title: intl.formatMessage({ id: 'purchaseRequisition.yizhuandingdanshu', defaultMessage: '已转订单数量' }),
// align: 'center',
// dataIndex: 'transferQuantity',
// key: 'transferQuantity',
// width: 112,
// },
{
title: intl.formatMessage({ id: 'purchaseRequisition.danjushijian', defaultMessage: '单据时间' }),
align: 'center',
dataIndex: 'createTime',
key: 'createTime',
width: 160,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.neibuzhuangtai', defaultMessage: '内部状态' }),
align: 'center',
dataIndex: 'innerStatus',
key: 'innerStatus',
width: 160,
render: (text, record) => <StatusColors status={text} type='saleInside' mode="Badge" text={record['innerStatusName']} />,
},
]
}
const secondColumns = () => {
const alreadyColumns = baseOrderListColumns("readyAddBill.add")
if (alreadyColumns) {
......@@ -68,6 +162,7 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
width: 128,
render: (text: any, record: any) => renderOptionButton(record)
}
])
......
import { useRef } from 'react'
import { baseOrderListColumns } from '../../constant'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history, useIntl } from 'umi'
import TableOperation from '@/components/TableOperation'
import EyePreview from '@/components/EyePreview'
import { AuthUrl } from '@/components/AuthButton/AuthUrl'
import { formatTimeString } from '@/utils'
import StatusColors from '@/pages/transaction/components/statusColors'
// 待提交请购单 Hook
export const useSelfTable = () => {
......@@ -35,6 +38,97 @@ export const useSelfTable = () => {
)
}
const baseOrderListColumns: any = (code: string) => {
return [
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanhao', defaultMessage: '请购单号' }),
align: 'center',
dataIndex: 'requisitionNo',
key: 'requisitionNo',
width: 128,
render: (text, record) => {
return (
<EyePreview type={AuthUrl(code) ? 'link' : 'button'} url={`${history.location.pathname}/preview?id=${record.id}`}>
{text}
</EyePreview>
)
},
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanzhaiyao', defaultMessage: '请购单摘要' }),
align: 'center',
dataIndex: 'digest',
key: 'digest',
width: 256,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.gongyinghuiyuan', defaultMessage: '供应会员' }),
align: 'center',
dataIndex: 'vendorMemberName',
key: 'vendorMemberName',
width: 192,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.yufuriqi', defaultMessage: '预付日期' }),
align: 'center',
dataIndex: 'advanceDeliveryDate',
key: 'advanceDeliveryDate',
width: 128,
render: (text) => formatTimeString(text, 'YYYY-MM-DD')
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoubumen', defaultMessage: '请购部门' }),
align: 'center',
dataIndex: 'department',
key: 'department',
width: 88,
},
{
title: "请购人",
align: 'center',
dataIndex: 'requisitioner',
key: 'requisitioner',
width: 88,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggouyongtu', defaultMessage: '请购用途' }),
align: 'center',
dataIndex: 'purpose',
key: 'purpose',
width: 216 ,
},
// {
// title: intl.formatMessage({ id: 'purchaseRequisition.qinggoushuliang', defaultMessage: '请购数量' }),
// align: 'center',
// dataIndex: 'quantity',
// key: 'quantity',
// width: 112,
// },
// {
// title: intl.formatMessage({ id: 'purchaseRequisition.yizhuandingdanshu', defaultMessage: '已转订单数量' }),
// align: 'center',
// dataIndex: 'transferQuantity',
// key: 'transferQuantity',
// width: 112,
// },
{
title: intl.formatMessage({ id: 'purchaseRequisition.danjushijian', defaultMessage: '单据时间' }),
align: 'center',
dataIndex: 'createTime',
key: 'createTime',
width: 160,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.neibuzhuangtai', defaultMessage: '内部状态' }),
align: 'center',
dataIndex: 'innerStatus',
key: 'innerStatus',
width: 160,
render: (text, record) => <StatusColors status={text} type='saleInside' mode="Badge" text={record['innerStatusName']} />,
},
]
}
const secondColumns = () => {
const alreadyColumns = baseOrderListColumns("readySubmitBill.see")
if (alreadyColumns) {
......@@ -44,6 +138,7 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
width: 128,
render: (text: any, record: any) => renderOptionButton(record)
}
])
......
import React, { useRef } from 'react'
import { baseOrderListColumns } from '../../constant'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history, useIntl } from 'umi'
import TableOperation from '@/components/TableOperation'
import StatusColors from '@/pages/transaction/components/statusColors'
import { formatTimeString } from '@/utils'
import { AuthUrl } from '@/components/AuthButton/AuthUrl'
import EyePreview from '@/components/EyePreview'
// 请购单转订单 Hook
export const useSelfTable = () => {
......@@ -35,6 +38,97 @@ export const useSelfTable = () => {
)
}
const baseOrderListColumns: any = (code: string) => {
return [
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanhao', defaultMessage: '请购单号' }),
align: 'center',
dataIndex: 'requisitionNo',
key: 'requisitionNo',
width: 96,
render: (text, record) => {
return (
<EyePreview type={AuthUrl(code) ? 'link' : 'button'} url={`${history.location.pathname}/preview?id=${record.id}`}>
{text}
</EyePreview>
)
},
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanzhaiyao', defaultMessage: '请购单摘要' }),
align: 'center',
dataIndex: 'digest',
key: 'digest',
width: 160,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.gongyinghuiyuan', defaultMessage: '供应会员' }),
align: 'center',
dataIndex: 'vendorMemberName',
key: 'vendorMemberName',
width: 160,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.yufuriqi', defaultMessage: '预付日期' }),
align: 'center',
dataIndex: 'advanceDeliveryDate',
key: 'advanceDeliveryDate',
width: 104,
render: (text) => formatTimeString(text, 'YYYY-MM-DD')
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoubumen', defaultMessage: '请购部门' }),
align: 'center',
dataIndex: 'department',
key: 'department',
width: 88,
},
{
title: "请购人",
align: 'center',
dataIndex: 'requisitioner',
key: 'requisitioner',
width: 88,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggouyongtu', defaultMessage: '请购用途' }),
align: 'center',
dataIndex: 'purpose',
key: 'purpose',
width: 152,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoushuliang', defaultMessage: '请购数量' }),
align: 'center',
dataIndex: 'quantity',
key: 'quantity',
width: 112,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.yizhuandingdanshu', defaultMessage: '已转订单数量' }),
align: 'center',
dataIndex: 'transferQuantity',
key: 'transferQuantity',
width: 112,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.danjushijian', defaultMessage: '单据时间' }),
align: 'center',
dataIndex: 'createTime',
key: 'createTime',
width: 128,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.neibuzhuangtai', defaultMessage: '内部状态' }),
align: 'center',
dataIndex: 'innerStatus',
key: 'innerStatus',
width: 128,
render: (text, record) => <StatusColors status={text} type='saleInside' mode="Badge" text={record['innerStatusName']} />,
},
]
}
const secondColumns = () => {
const alreadyColumns = baseOrderListColumns('readyRequisitionOrder.see')
if (alreadyColumns) {
......@@ -44,6 +138,7 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
width: 128,
render: (text: any, record: any) => renderOptionButton(record)
}
])
......
import { useRef } from 'react'
import { baseOrderListColumns } from '../../constant'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history, useIntl } from 'umi'
import TableOperation from '@/components/TableOperation'
import EyePreview from '@/components/EyePreview'
import { AuthUrl } from '@/components/AuthButton/AuthUrl'
import StatusColors from '@/pages/transaction/components/statusColors'
import { formatTimeString } from '@/utils'
// 待审核请购单 二级 Hook
export const useSelfTable = () => {
......@@ -34,6 +37,97 @@ export const useSelfTable = () => {
)
}
const baseOrderListColumns: any = (code: string) => {
return [
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanhao', defaultMessage: '请购单号' }),
align: 'center',
dataIndex: 'requisitionNo',
key: 'requisitionNo',
width: 128,
render: (text, record) => {
return (
<EyePreview type={AuthUrl(code) ? 'link' : 'button'} url={`${history.location.pathname}/preview?id=${record.id}`}>
{text}
</EyePreview>
)
},
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanzhaiyao', defaultMessage: '请购单摘要' }),
align: 'center',
dataIndex: 'digest',
key: 'digest',
width: 256,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.gongyinghuiyuan', defaultMessage: '供应会员' }),
align: 'center',
dataIndex: 'vendorMemberName',
key: 'vendorMemberName',
width: 192,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.yufuriqi', defaultMessage: '预付日期' }),
align: 'center',
dataIndex: 'advanceDeliveryDate',
key: 'advanceDeliveryDate',
width: 128,
render: (text) => formatTimeString(text, 'YYYY-MM-DD')
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoubumen', defaultMessage: '请购部门' }),
align: 'center',
dataIndex: 'department',
key: 'department',
width: 128,
},
{
title: "请购人",
align: 'center',
dataIndex: 'requisitioner',
key: 'requisitioner',
width: 88,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggouyongtu', defaultMessage: '请购用途' }),
align: 'center',
dataIndex: 'purpose',
key: 'purpose',
width: 216,
},
// {
// title: intl.formatMessage({ id: 'purchaseRequisition.qinggoushuliang', defaultMessage: '请购数量' }),
// align: 'center',
// dataIndex: 'quantity',
// key: 'quantity',
// width: 112,
// },
// {
// title: intl.formatMessage({ id: 'purchaseRequisition.yizhuandingdanshu', defaultMessage: '已转订单数量' }),
// align: 'center',
// dataIndex: 'transferQuantity',
// key: 'transferQuantity',
// width: 112,
// },
{
title: intl.formatMessage({ id: 'purchaseRequisition.danjushijian', defaultMessage: '单据时间' }),
align: 'center',
dataIndex: 'createTime',
key: 'createTime',
width: 160 ,
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.neibuzhuangtai', defaultMessage: '内部状态' }),
align: 'center',
dataIndex: 'innerStatus',
key: 'innerStatus',
width: 160,
render: (text, record) => <StatusColors status={text} type='saleInside' mode="Badge" text={record['innerStatusName']} />,
},
]
}
const secondColumns = () => {
const alreadyColumns = baseOrderListColumns('secondApprovedBill.see')
if (alreadyColumns) {
......@@ -43,6 +137,7 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
width: 128,
render: (text: any, record: any) => renderOptionButton(record)
}
])
......
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