Commit 8658d600 authored by XieZhiXiong's avatar XieZhiXiong

feat: 完成售后维修申请 CN国际化

parent d7f37116
...@@ -26,6 +26,8 @@ export default { ...@@ -26,6 +26,8 @@ export default {
'afterService.common.productColumns.purchaseAmount-integral': '所需积分小计', 'afterService.common.productColumns.purchaseAmount-integral': '所需积分小计',
'afterService.common.productColumns.replaceCount': '换货数量', 'afterService.common.productColumns.replaceCount': '换货数量',
'afterService.common.productColumns.replaceReason': '换货原因', 'afterService.common.productColumns.replaceReason': '换货原因',
'afterService.common.productColumns.repairCount': '维修数量',
'afterService.common.productColumns.repairReason': '维修原因',
// 售后退货相关流转进度 // 售后退货相关流转进度
'afterService.common.return.anchors.taskList': '流转进度', 'afterService.common.return.anchors.taskList': '流转进度',
...@@ -40,6 +42,8 @@ export default { ...@@ -40,6 +42,8 @@ export default {
'afterService.common.return.anchors.replaceProducts': '换货商品', 'afterService.common.return.anchors.replaceProducts': '换货商品',
'afterService.common.return.anchors.replaceGoodsAddress': '换货收货地址', 'afterService.common.return.anchors.replaceGoodsAddress': '换货收货地址',
'afterService.common.return.anchors.replaceDeliveryGoodsList': '换货收货信息', 'afterService.common.return.anchors.replaceDeliveryGoodsList': '换货收货信息',
'afterService.common.return.anchors.repairProducts': '维修商品',
'afterService.common.return.anchors.repairAddress': '维修地址',
'afterService.common.return.refundAmount': '退款金额', 'afterService.common.return.refundAmount': '退款金额',
'afterService.common.return.returnBatch': '退货批次', 'afterService.common.return.returnBatch': '退货批次',
...@@ -50,9 +54,11 @@ export default { ...@@ -50,9 +54,11 @@ export default {
'afterService.common.return.products': '退货商品', 'afterService.common.return.products': '退货商品',
'afterService.common.return.refunded': '已退款', 'afterService.common.return.refunded': '已退款',
'afterService.common.replace.products': '换货商品', 'afterService.common.replace.products': '换货商品',
'afterService.common.repair.products': '维修商品',
'afterService.common.basicInfo.applyNo': '申请单号', 'afterService.common.basicInfo.applyNo': '申请单号',
'afterService.common.basicInfo.orderType': '售后订单类型', 'afterService.common.basicInfo.orderType': '售后订单类型',
'afterService.common.basicInfo.applyTime': '单据时间', 'afterService.common.basicInfo.applyTime': '单据时间',
...@@ -120,6 +126,7 @@ export default { ...@@ -120,6 +126,7 @@ export default {
'afterService.order.query.column.returnCount': '已退货数量', 'afterService.order.query.column.returnCount': '已退货数量',
'afterService.order.query.column.returnAmount': '已退款金额', 'afterService.order.query.column.returnAmount': '已退款金额',
'afterService.order.query.column.exchangeCount': '已换货数量', 'afterService.order.query.column.exchangeCount': '已换货数量',
'afterService.order.query.column.maintainCount': '已维修数量',
'afterService.apply.supplierMember.nothing': '请先选择供应会员', 'afterService.apply.supplierMember.nothing': '请先选择供应会员',
'afterService.apply.orderType.nothing': '请先选择售后订单类型', 'afterService.apply.orderType.nothing': '请先选择售后订单类型',
...@@ -127,6 +134,8 @@ export default { ...@@ -127,6 +134,8 @@ export default {
'afterService.apply.product.add.refund.material': '选择退货物料', 'afterService.apply.product.add.refund.material': '选择退货物料',
'afterService.apply.product.add.replace.normal': '选择换货商品', 'afterService.apply.product.add.replace.normal': '选择换货商品',
'afterService.apply.product.add.replace.material': '选择换货物料', 'afterService.apply.product.add.replace.material': '选择换货物料',
'afterService.apply.product.add.repair.normal': '选择维修商品',
'afterService.apply.product.add.repair.material': '选择维修物料',
'afterService.apply.upload.legal': '图片大小超过20M', 'afterService.apply.upload.legal': '图片大小超过20M',
'afterService.apply.back': '返回', 'afterService.apply.back': '返回',
'afterService.apply.save': '保存', 'afterService.apply.save': '保存',
...@@ -156,6 +165,8 @@ export default { ...@@ -156,6 +165,8 @@ export default {
'afterService.apply.product.refund.material': '请选择退货物料', 'afterService.apply.product.refund.material': '请选择退货物料',
'afterService.apply.product.replace.normal': '请选择换货商品', 'afterService.apply.product.replace.normal': '请选择换货商品',
'afterService.apply.product.replace.material': '请选择换货物料', 'afterService.apply.product.replace.material': '请选择换货物料',
'afterService.apply.product.repair.normal': '请选择维修商品',
'afterService.apply.product.repair.material': '请选择维修物料',
'afterService.apply.orderNo': '订单号', 'afterService.apply.orderNo': '订单号',
'afterService.apply.productId': '商品ID', 'afterService.apply.productId': '商品ID',
'afterService.apply.productName': '商品名称', 'afterService.apply.productName': '商品名称',
...@@ -200,4 +211,11 @@ export default { ...@@ -200,4 +211,11 @@ export default {
'afterService.apply.pickupAddress-replace.required': '请选择换货自提地址', 'afterService.apply.pickupAddress-replace.required': '请选择换货自提地址',
'afterService.apply.purchaser.nothing': '请先选择采购会员', 'afterService.apply.purchaser.nothing': '请先选择采购会员',
'afterService.apply.purchaser': '采购会员', 'afterService.apply.purchaser': '采购会员',
'afterService.apply.repairCount': '维修数量',
'afterService.apply.repairCount.required': '请填写维修数量',
'afterService.apply.repairCount.legal': '请填写正数,最多保留3位小数',
'afterService.apply.repairReason': '维修原因',
'afterService.apply.repairReason.required': '请填写维修原因',
'afterService.apply.shippingAddress.repair': '维修地址',
'afterService.apply.shippingAddress.repair.required': '请选择维修地址',
} }
\ No newline at end of file
...@@ -3,6 +3,7 @@ import returnApplication from './returnApplication'; ...@@ -3,6 +3,7 @@ import returnApplication from './returnApplication';
import returnManage from './returnManage'; import returnManage from './returnManage';
import exchangeApplication from './exchangeApplication'; import exchangeApplication from './exchangeApplication';
import exchangeManage from './exchangeManage'; import exchangeManage from './exchangeManage';
import repairApplication from './repairApplication';
import components from './components'; import components from './components';
export default { export default {
...@@ -11,5 +12,6 @@ export default { ...@@ -11,5 +12,6 @@ export default {
...returnManage, ...returnManage,
...exchangeApplication, ...exchangeApplication,
...exchangeManage, ...exchangeManage,
...repairApplication,
...components, ...components,
}; };
\ No newline at end of file
export default {
'repairApplication.repairPrSubmit.add': '新建维修申请单',
'repairApplication.repairPrSubmit.edit': '编辑维修申请单',
'repairApplication.repairPrSubmit.check': '查看维修申请单',
}
\ No newline at end of file
import React, { Suspense, useEffect, useState } from 'react'; import React, { Suspense, useEffect, useState } from 'react';
import { useIntl } from 'umi';
import { import {
Spin, Spin,
Row, Row,
...@@ -64,9 +65,11 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -64,9 +65,11 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
const isMateriel = isMaterialOrder(detailInfo?.orderType); const isMateriel = isMaterialOrder(detailInfo?.orderType);
const intl = useIntl();
const productColumns: EditableColumns[] = [ const productColumns: EditableColumns[] = [
{ {
title: '订单号', title: intl.formatMessage({ id: 'afterService.common.productColumns.orderNo' }, { default: '订单号' }),
dataIndex: 'orderNo', dataIndex: 'orderNo',
render: (text, record) => ( render: (text, record) => (
<a <a
...@@ -81,68 +84,68 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -81,68 +84,68 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
!isMateriel !isMateriel
? [ ? [
{ {
title: '商品ID', title: intl.formatMessage({ id: 'afterService.common.productColumns.productId' }, { default: '商品ID' }),
dataIndex: 'productId', dataIndex: 'productId',
}, },
{ {
title: '商品名称', title: intl.formatMessage({ id: 'afterService.common.productColumns.productName' }, { default: '商品名称' }),
dataIndex: 'productName', dataIndex: 'productName',
ellipsis: true, ellipsis: true,
}, },
{ {
title: '品类', title: intl.formatMessage({ id: 'afterService.common.productColumns.category' }, { default: '品类' }),
dataIndex: 'category', dataIndex: 'category',
}, },
{ {
title: '品牌', title: intl.formatMessage({ id: 'afterService.common.productColumns.brand' }, { default: '品牌' }),
dataIndex: 'brand', dataIndex: 'brand',
}, },
{ {
title: '单位', title: intl.formatMessage({ id: 'afterService.common.productColumns.unit' }, { default: '单位' }),
dataIndex: 'unit', dataIndex: 'unit',
} }
] ]
: [ : [
{ {
title: '物料编号', title: intl.formatMessage({ id: 'afterService.common.productColumns.materialNo' }, { default: '物料编号' }),
dataIndex: 'productId', dataIndex: 'productId',
}, },
{ {
title: '物料名称、规格', title: `${intl.formatMessage({ id: 'afterService.common.productColumns.materialName' }, { default: '物料名称' })}${intl.formatMessage({ id: 'afterService.common.productColumns.materialSpec' }, { default: '规格' })}`,
dataIndex: 'productName', dataIndex: 'productName',
render: (text, record) => `${text}${record.type ? '/' + record.type : ''}`, render: (text, record) => `${text}${record.type ? '/' + record.type : ''}`,
}, },
{ {
title: '品类', title: intl.formatMessage({ id: 'afterService.common.productColumns.category' }, { default: '品类' }),
dataIndex: 'category', dataIndex: 'category',
}, },
{ {
title: '品牌', title: intl.formatMessage({ id: 'afterService.common.productColumns.brand' }, { default: '品牌' }),
dataIndex: 'brand', dataIndex: 'brand',
}, },
{ {
title: '单位', title: intl.formatMessage({ id: 'afterService.common.productColumns.unit' }, { default: '单位' }),
dataIndex: 'unit', dataIndex: 'unit',
}, },
{ {
title: detailInfo?.orderType !== ORDER_TYPE_TENDER_CONTRACT ? '关联报价商品ID、名称、规格、品类、品牌' : '关联投标商品ID、名称、规格、品类、品牌', title: detailInfo?.orderType !== ORDER_TYPE_TENDER_CONTRACT ? intl.formatMessage({ id: 'afterService.common.productColumns.materialMergeInfo1' }, { default: '关联报价商品ID、名称、规格、品类、品牌' }) : intl.formatMessage({ id: 'afterService.common.productColumns.materialMergeInfo2' }, { default: '关联投标商品ID、名称、规格、品类、品牌' }),
dataIndex: 'associatedProductId', dataIndex: 'associatedProductId',
render: (text, record) => `${text || ''}/${record.associatedProductName || ''}/${record.associatedType || ''}/${record.associatedCategory || ''}/${record.associatedBrand || ''}`, render: (text, record) => `${text || ''}/${record.associatedProductName || ''}/${record.associatedType || ''}/${record.associatedCategory || ''}/${record.associatedBrand || ''}`,
}, },
] ]
), ),
{ {
title: '采购数量', title: intl.formatMessage({ id: 'afterService.common.productColumns.purchaseCount' }, { default: '采购数量' }),
dataIndex: 'purchaseCount', dataIndex: 'purchaseCount',
align: 'center', align: 'center',
}, },
{ {
title: '维修数量', title: intl.formatMessage({ id: 'afterService.common.productColumns.repairCount' }, { default: '维修数量' }),
dataIndex: 'repairCount', dataIndex: 'repairCount',
align: 'center', align: 'center',
}, },
{ {
title: '维修原因', title: intl.formatMessage({ id: 'afterService.common.productColumns.repairReason' }, { default: '维修原因' }),
dataIndex: 'repairReason', dataIndex: 'repairReason',
align: 'center', align: 'center',
}, },
...@@ -171,7 +174,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -171,7 +174,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
faultFileList, faultFileList,
supplierName, supplierName,
...rest, ...rest,
fileList: faultFileList.map(item => normalizeFiledata(item.filePath)), fileList: faultFileList ? faultFileList.map(item => normalizeFiledata(item.filePath)) : [],
repairAddress: isJSONStr(repairAddress) || null, repairAddress: isJSONStr(repairAddress) || null,
}); });
} }
...@@ -211,64 +214,64 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -211,64 +214,64 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
const anchorsArr = [ const anchorsArr = [
{ {
key: 'taskList', key: 'taskList',
name: '流转进度', name: intl.formatMessage({ id: 'afterService.common.return.anchors.taskList' }, { default: '流转进度' }),
}, },
{ {
key: 'basicInfo', key: 'basicInfo',
name: '基本信息', name: intl.formatMessage({ id: 'afterService.common.return.anchors.basicInfo' }, { default: '基本信息' }),
}, },
{ {
key: 'repairGoodsList', key: 'repairGoodsList',
name: '维修商品', name: intl.formatMessage({ id: 'afterService.common.return.anchors.repairProducts' }, { default: '维修商品' }),
}, },
{ {
key: 'faultFileList', key: 'faultFileList',
name: '附件', name: intl.formatMessage({ id: 'afterService.common.return.anchors.faultFileList' }, { default: '附件' }),
}, },
{ {
key: 'repairAddress', key: 'repairAddress',
name: '维修地址', name: intl.formatMessage({ id: 'afterService.common.return.anchors.repairAddress' }, { default: '维修地址' }),
}, },
( (
isFinished isFinished
? { ? {
key: 'evaluate', key: 'evaluate',
name: '售后评价', name: intl.formatMessage({ id: 'afterService.common.return.anchors.evaluate' }, { default: '售后评价' }),
} }
: null : null
), ),
{ {
key: 'workflowRecord', key: 'workflowRecord',
name: '流转记录', name: intl.formatMessage({ id: 'afterService.common.return.anchors.workflowRecord' }, { default: '流转记录' }),
}, },
].filter(Boolean); ].filter(Boolean);
const BasicInfoData = [ const BasicInfoData = [
{ {
title: '申请单号', title: intl.formatMessage({ id: 'afterService.common.basicInfo.applyNo' }, { default: '申请单号' }),
value: detailInfo && detailInfo.applyNo ? detailInfo.applyNo : '', value: detailInfo && detailInfo.applyNo ? detailInfo.applyNo : '',
}, },
{ {
title: '售后订单类型', title: intl.formatMessage({ id: 'afterService.common.basicInfo.orderType' }, { default: '售后订单类型' }),
value: detailInfo && detailInfo.orderType ? ORDER_TYPE[detailInfo.orderType] : '', value: detailInfo && detailInfo.orderType ? ORDER_TYPE[detailInfo.orderType] : '',
}, },
{ {
title: '单据时间', title: intl.formatMessage({ id: 'afterService.common.basicInfo.applyTime' }, { default: '单据时间' }),
value: detailInfo && detailInfo.applyTime ? detailInfo.applyTime : '', value: detailInfo && detailInfo.applyTime ? detailInfo.applyTime : '',
}, },
{ {
title: '申请摘要', title: intl.formatMessage({ id: 'afterService.common.basicInfo.applyAbstract' }, { default: '申请摘要' }),
value: detailInfo && detailInfo.applyAbstract ? detailInfo.applyAbstract : '', value: detailInfo && detailInfo.applyAbstract ? detailInfo.applyAbstract : '',
}, },
{ {
title: '供应会员', title: intl.formatMessage({ id: 'afterService.common.basicInfo.supplierName' }, { default: '供应会员' }),
value: detailInfo && detailInfo.supplierName ? detailInfo.supplierName : '', value: detailInfo && detailInfo.supplierName ? detailInfo.supplierName : '',
columnProps: { columnProps: {
span: 2, span: 2,
}, },
}, },
{ {
title: '外部状态', title: intl.formatMessage({ id: 'afterService.common.basicInfo.outerStatus' }, { default: '外部状态' }),
value: ( value: (
<StatusTag type={REPAIR_OUTER_STATUS_TAG_MAP[detailInfo?.outerStatus]} title={detailInfo?.outerStatusName} /> <StatusTag type={REPAIR_OUTER_STATUS_TAG_MAP[detailInfo?.outerStatus]} title={detailInfo?.outerStatusName} />
), ),
...@@ -277,7 +280,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -277,7 +280,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
}, },
}, },
{ {
title: '内部状态', title: intl.formatMessage({ id: 'afterService.common.basicInfo.innerStatus' }, { default: '内部状态' }),
value: ( value: (
<Badge color={REPAIR_INNER_STATUS_BADGE_MAP[detailInfo?.innerStatus] || '#606266'} text={detailInfo?.innerStatusName} /> <Badge color={REPAIR_INNER_STATUS_BADGE_MAP[detailInfo?.innerStatus] || '#606266'} text={detailInfo?.innerStatusName} />
), ),
...@@ -328,7 +331,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -328,7 +331,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<Col span={24}> <Col span={24}>
<Suspense fallback={null}> <Suspense fallback={null}>
<ProductList <ProductList
title="维修商品" title={intl.formatMessage({ id: 'afterService.common.repair.products' }, { default: '维修商品' })}
rowKey="orderRecordId" rowKey="orderRecordId"
columns={productColumns} columns={productColumns}
dataSource={repairGoodsList.data} dataSource={repairGoodsList.data}
......
...@@ -7,7 +7,7 @@ import { ...@@ -7,7 +7,7 @@ import {
Popconfirm, Popconfirm,
Space, Space,
} from 'antd'; } from 'antd';
import { history } from 'umi'; import { history, useIntl } from 'umi';
import { import {
ClockCircleOutlined, ClockCircleOutlined,
PlusOutlined, PlusOutlined,
...@@ -35,9 +35,11 @@ const formActions = createFormActions(); ...@@ -35,9 +35,11 @@ const formActions = createFormActions();
const RepairPrFinished: React.FC = () => { const RepairPrFinished: React.FC = () => {
const ref = useRef<any>({}); const ref = useRef<any>({});
const intl = useIntl();
const defaultColumns: ColumnType<any>[] = [ const defaultColumns: ColumnType<any>[] = [
{ {
title: '申请单号', title: intl.formatMessage({ id: 'afterService.common.basicInfo.applyNo' }, { default: '申请单号' }),
dataIndex: 'applyNo', dataIndex: 'applyNo',
align: 'center', align: 'center',
render: (text, record) => ( render: (text, record) => (
...@@ -51,23 +53,23 @@ const RepairPrFinished: React.FC = () => { ...@@ -51,23 +53,23 @@ const RepairPrFinished: React.FC = () => {
), ),
}, },
{ {
title: '申请单摘要', title: intl.formatMessage({ id: 'afterService.common.basicInfo.applyAbstract' }, { default: '申请单摘要' }),
dataIndex: 'applyAbstract', dataIndex: 'applyAbstract',
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
}, },
{ {
title: '供应会员', title: intl.formatMessage({ id: 'afterService.common.basicInfo.supplierName' }, { default: '供应会员' }),
dataIndex: 'supplierName', dataIndex: 'supplierName',
align: 'center', align: 'center',
}, },
{ {
title: '单据时间', title: intl.formatMessage({ id: 'afterService.common.basicInfo.applyTime' }, { default: '单据时间' }),
dataIndex: 'applyTime', dataIndex: 'applyTime',
align: 'center', align: 'center',
}, },
{ {
title: '外部状态', title: intl.formatMessage({ id: 'afterService.common.basicInfo.outerStatus' }, { default: '外部状态' }),
dataIndex: 'outerStatusName', dataIndex: 'outerStatusName',
align: 'center', align: 'center',
render: (text, record) => ( render: (text, record) => (
...@@ -75,13 +77,13 @@ const RepairPrFinished: React.FC = () => { ...@@ -75,13 +77,13 @@ const RepairPrFinished: React.FC = () => {
), ),
}, },
{ {
title: '内部状态', title: intl.formatMessage({ id: 'afterService.common.basicInfo.innerStatus' }, { default: '内部状态' }),
dataIndex: 'innerStatusName', dataIndex: 'innerStatusName',
align: 'center', align: 'center',
render: (text, record) => <Badge color={REPAIR_INNER_STATUS_BADGE_MAP[record.innerStatus] || '#606266'} text={text} />, render: (text, record) => <Badge color={REPAIR_INNER_STATUS_BADGE_MAP[record.innerStatus] || '#606266'} text={text} />,
}, },
{ {
title: '操作', title: intl.formatMessage({ id: 'common.table.action' }),
dataIndex: 'option', dataIndex: 'option',
align: 'center', align: 'center',
render: (text, record) => ( render: (text, record) => (
...@@ -90,7 +92,7 @@ const RepairPrFinished: React.FC = () => { ...@@ -90,7 +92,7 @@ const RepairPrFinished: React.FC = () => {
type="link" type="link"
onClick={() => history.push(`/memberCenter/afterService/repairApplication/repairPrFinished/verify?id=${record.applyId}`)} onClick={() => history.push(`/memberCenter/afterService/repairApplication/repairPrFinished/verify?id=${record.applyId}`)}
> >
确认售后完成 {intl.formatMessage({ id: 'returnApplication.returnPrConfirmFinish.finish' }, { default: '确认售后完成' })}
</Button> </Button>
</> </>
), ),
......
...@@ -6,9 +6,12 @@ ...@@ -6,9 +6,12 @@
* @Description: * @Description:
*/ */
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
import { getIntl } from 'umi';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { UPLOAD_TYPE } from '@/constants'; import { UPLOAD_TYPE } from '@/constants';
const intl = getIntl();
export const listSearchSchema: ISchema = { export const listSearchSchema: ISchema = {
type: 'object', type: 'object',
properties: { properties: {
...@@ -20,9 +23,9 @@ export const listSearchSchema: ISchema = { ...@@ -20,9 +23,9 @@ export const listSearchSchema: ISchema = {
type: 'string', type: 'string',
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '搜索', placeholder: intl.formatMessage({ id: 'afterService.common.query.applyNo.placeholder' }, { default: '搜索' }),
align: 'flex-left', align: 'flex-left',
tip: '输入 申请单号 进行搜索', tip: intl.formatMessage({ id: 'afterService.common.query.applyNo.tip' }, { default: '输入 申请单号 进行搜索' }),
}, },
}, },
[FORM_FILTER_PATH]: { [FORM_FILTER_PATH]: {
...@@ -38,14 +41,14 @@ export const listSearchSchema: ISchema = { ...@@ -38,14 +41,14 @@ export const listSearchSchema: ISchema = {
applyAbstract: { applyAbstract: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '申请单摘要', placeholder: intl.formatMessage({ id: 'afterService.common.query.applyAbstract.placeholder' }, { default: '申请单摘要' }),
allowClear: true, allowClear: true,
}, },
}, },
supplierName: { supplierName: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '供应会员', placeholder: intl.formatMessage({ id: 'afterService.common.query.supplierName.placeholder' }, { default: '供应会员' }),
allowClear: true, allowClear: true,
}, },
}, },
...@@ -54,7 +57,7 @@ export const listSearchSchema: ISchema = { ...@@ -54,7 +57,7 @@ export const listSearchSchema: ISchema = {
default: '', default: '',
'x-component': 'dateSelect', 'x-component': 'dateSelect',
'x-component-props': { 'x-component-props': {
placeholder: '单据时间(全部)', placeholder: intl.formatMessage({ id: 'afterService.common.query.date.placeholder' }, { default: '单据时间(全部)' }),
allowClear: true, allowClear: true,
}, },
}, },
...@@ -64,7 +67,7 @@ export const listSearchSchema: ISchema = { ...@@ -64,7 +67,7 @@ export const listSearchSchema: ISchema = {
span: 1, span: 1,
}, },
'x-component-props': { 'x-component-props': {
children: '查询', children: intl.formatMessage({ id: 'afterService.common.query.submit' }, { default: '查询' }),
}, },
}, },
}, },
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
*/ */
import React, { useState } from 'react'; import React, { useState } from 'react';
import { Button } from 'antd'; import { Button } from 'antd';
import { history } from 'umi'; import { history, useIntl } from 'umi';
import { postAsRepairGoodsConfirmComplete } from '@/services/AfterServiceV2Api'; import { postAsRepairGoodsConfirmComplete } from '@/services/AfterServiceV2Api';
import { FormOutlined } from '@ant-design/icons'; import { FormOutlined } from '@ant-design/icons';
import { usePageStatus } from '@/hooks/usePageStatus'; import { usePageStatus } from '@/hooks/usePageStatus';
...@@ -19,6 +19,8 @@ const RepairPrFinishedDetailVerify: React.FC = () => { ...@@ -19,6 +19,8 @@ const RepairPrFinishedDetailVerify: React.FC = () => {
const [visible, setVisible] = useState(false); const [visible, setVisible] = useState(false);
const [confirmLoading, setConfirmLoading] = useState(false); const [confirmLoading, setConfirmLoading] = useState(false);
const intl = useIntl();
const handleSubmit = values => { const handleSubmit = values => {
if (!id) { if (!id) {
return; return;
...@@ -47,7 +49,7 @@ const RepairPrFinishedDetailVerify: React.FC = () => { ...@@ -47,7 +49,7 @@ const RepairPrFinishedDetailVerify: React.FC = () => {
icon={<FormOutlined />} icon={<FormOutlined />}
onClick={() => setVisible(true)} onClick={() => setVisible(true)}
> >
提交 {intl.formatMessage({ id: 'afterService.common.commit' }, { default: '提交' })}
</Button> </Button>
)} )}
isEdit isEdit
......
...@@ -3,7 +3,7 @@ import { Button, Card, Spin, Badge, message, Upload } from 'antd'; ...@@ -3,7 +3,7 @@ import { Button, Card, Spin, Badge, message, Upload } from 'antd';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { DeleteOutlined } from '@ant-design/icons'; import { DeleteOutlined } from '@ant-design/icons';
import { ArrayTable } from '@formily/antd-components'; import { ArrayTable } from '@formily/antd-components';
import { history, Prompt, Link } from 'umi'; import { history, Prompt, Link, useIntl } from 'umi';
import moment from 'moment'; import moment from 'moment';
import { findLastIndex } from 'lodash'; import { findLastIndex } from 'lodash';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
...@@ -119,9 +119,11 @@ const RepairForm: React.FC<BillsFormProps> = ({ ...@@ -119,9 +119,11 @@ const RepairForm: React.FC<BillsFormProps> = ({
const isMateriel = isMaterialOrder(orderTypeValue); const isMateriel = isMaterialOrder(orderTypeValue);
const intl = useIntl();
const tableColumn: ColumnType<any>[] = [ const tableColumn: ColumnType<any>[] = [
{ {
title: '订单号', title: intl.formatMessage({ id: 'afterService.order.query.column.orderNo' }, { default: '订单号' }),
dataIndex: 'orderNo', dataIndex: 'orderNo',
render: (text, record) => ( render: (text, record) => (
<a <a
...@@ -133,28 +135,28 @@ const RepairForm: React.FC<BillsFormProps> = ({ ...@@ -133,28 +135,28 @@ const RepairForm: React.FC<BillsFormProps> = ({
), ),
}, },
{ {
title: '订单摘要', title: intl.formatMessage({ id: 'afterService.order.query.column.digest' }, { default: '订单摘要' }),
dataIndex: 'digest', dataIndex: 'digest',
ellipsis: true, ellipsis: true,
}, },
{ {
title: '供应会员', title: intl.formatMessage({ id: 'afterService.order.query.column.vendorMemberName' }, { default: '供应会员' }),
dataIndex: 'vendorMemberName', dataIndex: 'vendorMemberName',
}, },
{ {
title: '下单时间', title: intl.formatMessage({ id: 'afterService.order.query.column.createTime' }, { default: '下单时间' }),
dataIndex: 'createTime', dataIndex: 'createTime',
}, },
{ {
title: '订单状态', title: intl.formatMessage({ id: 'afterService.order.query.column.outerStatusName' }, { default: '订单状态' }),
dataIndex: 'outerStatusName', dataIndex: 'outerStatusName',
}, },
{ {
title: '订单类型', title: intl.formatMessage({ id: 'afterService.order.query.column.orderTypeName' }, { default: '订单类型' }),
dataIndex: 'orderTypeName', dataIndex: 'orderTypeName',
}, },
isMateriel ? { isMateriel ? {
title: '合同编号', title: intl.formatMessage({ id: 'afterService.order.query.column.contractNo' }, { default: '合同编号' }),
dataIndex: 'contractNo', dataIndex: 'contractNo',
render: (text, record) => ( render: (text, record) => (
<a <a
...@@ -169,38 +171,38 @@ const RepairForm: React.FC<BillsFormProps> = ({ ...@@ -169,38 +171,38 @@ const RepairForm: React.FC<BillsFormProps> = ({
const childTableColumn: ColumnType<any>[] = [ const childTableColumn: ColumnType<any>[] = [
!isMateriel ?{ !isMateriel ?{
title: '商品ID', title: intl.formatMessage({ id: 'afterService.order.query.column.productNo' }, { default: '商品ID' }),
dataIndex: 'productNo', dataIndex: 'productNo',
} : { } : {
title: '物料编号', title: intl.formatMessage({ id: 'afterService.order.query.column.materialNo' }, { default: '物料编号' }),
dataIndex: 'productNo', dataIndex: 'productNo',
}, },
!isMateriel ? { !isMateriel ? {
title: '商品名称', title: intl.formatMessage({ id: 'afterService.order.query.column.name' }, { default: '商品名称' }),
dataIndex: 'name', dataIndex: 'name',
} : { } : {
title: '物料名称、规格', title: `${intl.formatMessage({ id: 'afterService.order.query.column.materialName' }, { default: '物料名称' })}${intl.formatMessage({ id: 'afterService.order.query.column.quotedSpec' }, { default: '规格' })}`,
dataIndex: 'name', dataIndex: 'name',
render: (text, record) => `${text}/${record.quotedSpec}`, render: (text, record) => `${text}/${record.quotedSpec}`,
}, },
{ {
title: '品类', title: intl.formatMessage({ id: 'afterService.order.query.column.category' }, { default: '品类' }),
dataIndex: 'category', dataIndex: 'category',
}, },
{ {
title: '品牌', title: intl.formatMessage({ id: 'afterService.order.query.column.brand' }, { default: '品牌' }),
dataIndex: 'brand', dataIndex: 'brand',
}, },
{ {
title: '单位', title: intl.formatMessage({ id: 'afterService.order.query.column.unit' }, { default: '单位' }),
dataIndex: 'unit', dataIndex: 'unit',
}, },
{ {
title: '订单数量', title: intl.formatMessage({ id: 'afterService.order.query.column.quantity' }, { default: '订单数量' }),
dataIndex: 'quantity', dataIndex: 'quantity',
}, },
{ {
title: '已维修数量', title: intl.formatMessage({ id: 'afterService.order.query.column.maintainCount' }, { default: '已维修数量' }),
dataIndex: 'maintainCount', dataIndex: 'maintainCount',
}, },
]; ];
...@@ -399,11 +401,11 @@ const RepairForm: React.FC<BillsFormProps> = ({ ...@@ -399,11 +401,11 @@ const RepairForm: React.FC<BillsFormProps> = ({
const orderTypeVal = addSchemaAction.getFieldValue('orderType'); const orderTypeVal = addSchemaAction.getFieldValue('orderType');
if (!supplierMemberVal || !supplierMemberVal.length) { if (!supplierMemberVal || !supplierMemberVal.length) {
message.error('请先选择供应会员'); message.error(intl.formatMessage({ id: 'afterService.apply.supplierMember.nothing' }, { default: '请先选择供应会员' }));
return; return;
} }
if (!orderTypeVal) { if (!orderTypeVal) {
message.error('请先选择售后订单类型'); message.error(intl.formatMessage({ id: 'afterService.apply.orderType.nothing' }, { default: '请先选择售后订单类型' }));
return; return;
} }
setVisibleDrawer(true); setVisibleDrawer(true);
...@@ -417,7 +419,7 @@ const RepairForm: React.FC<BillsFormProps> = ({ ...@@ -417,7 +419,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
type="dashed" type="dashed"
block block
> >
{!isMateriel ? '选择维修商品' : '选择维修物料'} {!isMateriel ? intl.formatMessage({ id: 'afterService.apply.product.add.repair.normal' }, { default: '选择维修商品' }) : intl.formatMessage({ id: 'afterService.apply.product.add.repair.material' }, { default: '选择维修物料' })}
</Button> </Button>
); );
...@@ -508,7 +510,7 @@ const RepairForm: React.FC<BillsFormProps> = ({ ...@@ -508,7 +510,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
const beforeUpload = file => { const beforeUpload = file => {
if (file.size / 1024 / 1024 > 20) { if (file.size / 1024 / 1024 > 20) {
message.warning('图片大小超过20M'); message.warning(intl.formatMessage({ id: 'afterService.apply.upload.legal' }, { default: '图片大小超过20M' }));
return Upload.LIST_IGNORE; return Upload.LIST_IGNORE;
} }
return Promise.resolve(); return Promise.resolve();
...@@ -584,13 +586,13 @@ const RepairForm: React.FC<BillsFormProps> = ({ ...@@ -584,13 +586,13 @@ const RepairForm: React.FC<BillsFormProps> = ({
padding: 24, padding: 24,
}} }}
onBack={() => history.goBack()} onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />} backIcon={<ReutrnEle description={intl.formatMessage({ id: 'afterService.apply.back' }, { default: '返回' })} />}
title={ title={
!id ? !id ?
'新建维修申请单' : intl.formatMessage({ id: 'repairApplication.repairPrSubmit.add' }, { default: '新建维修申请单' }) :
isEdit ? isEdit ?
'编辑维修申请单' : intl.formatMessage({ id: 'repairApplication.repairPrSubmit.edit' }, { default: '编辑维修申请单' }) :
'查看维修申请单' intl.formatMessage({ id: 'repairApplication.repairPrSubmit.check' }, { default: '查看维修申请单' })
} }
extra={ extra={
(isEdit || !id) (isEdit || !id)
...@@ -602,7 +604,7 @@ const RepairForm: React.FC<BillsFormProps> = ({ ...@@ -602,7 +604,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
loading={submitLoading} loading={submitLoading}
onClick={() => addSchemaAction.submit()} onClick={() => addSchemaAction.submit()}
> >
保存 {intl.formatMessage({ id: 'afterService.apply.save' }, { default: '保存' })}
</Button>, </Button>,
] ]
: [] : []
...@@ -656,7 +658,7 @@ const RepairForm: React.FC<BillsFormProps> = ({ ...@@ -656,7 +658,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
</Card> </Card>
<GoodsDrawer <GoodsDrawer
title={!isMateriel ? '选择维修商品' : '选择维修物料'} title={!isMateriel ? intl.formatMessage({ id: 'afterService.apply.product.add.repair.normal' }, { default: '选择维修商品' }) : intl.formatMessage({ id: 'afterService.apply.product.add.repair.material' }, { default: '选择维修物料' })}
afterType={4} afterType={4}
visible={visibleDrawer} visible={visibleDrawer}
fetchOrderList={getOrderList} fetchOrderList={getOrderList}
...@@ -671,7 +673,7 @@ const RepairForm: React.FC<BillsFormProps> = ({ ...@@ -671,7 +673,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
orderType={orderTypeValue} orderType={orderTypeValue}
/> />
<Prompt when={unsaved} message="您还有未保存的内容,是否确定要离开?" /> <Prompt when={unsaved} message={intl.formatMessage({ id: 'common.tip.save.confirm' }, { default: '您还有未保存的内容,是否确定要离开?' })} />
</PageHeaderWrapper> </PageHeaderWrapper>
</Spin> </Spin>
); );
......
...@@ -8,7 +8,7 @@ import { ...@@ -8,7 +8,7 @@ import {
Space, Space,
message, message,
} from 'antd'; } from 'antd';
import { history } from 'umi'; import { history, useIntl } from 'umi';
import { import {
ClockCircleOutlined, ClockCircleOutlined,
PlusOutlined, PlusOutlined,
...@@ -40,9 +40,11 @@ const formActions = createFormActions(); ...@@ -40,9 +40,11 @@ const formActions = createFormActions();
const RepairPrSubmit: React.FC = () => { const RepairPrSubmit: React.FC = () => {
const ref = useRef<any>({}); const ref = useRef<any>({});
const intl = useIntl();
const handleDelete = record => { const handleDelete = record => {
const msg = message.loading({ const msg = message.loading({
content: '正在删除', content: intl.formatMessage({ id: 'afterService.common.delete.message' }, { default: '正在删除' }),
duration: 0, duration: 0,
}); });
postAsRepairGoodsDelete({ postAsRepairGoodsDelete({
...@@ -58,7 +60,7 @@ const RepairPrSubmit: React.FC = () => { ...@@ -58,7 +60,7 @@ const RepairPrSubmit: React.FC = () => {
const handleSubmit = record => { const handleSubmit = record => {
const msg = message.loading({ const msg = message.loading({
content: '正在提交', content: intl.formatMessage({ id: 'afterService.common.commit.message' }, { default: '正在提交' }),
duration: 0, duration: 0,
}); });
postAsRepairGoodsSubmit({ postAsRepairGoodsSubmit({
...@@ -74,7 +76,7 @@ const RepairPrSubmit: React.FC = () => { ...@@ -74,7 +76,7 @@ const RepairPrSubmit: React.FC = () => {
const defaultColumns: ColumnType<any>[] = [ const defaultColumns: ColumnType<any>[] = [
{ {
title: '申请单号', title: intl.formatMessage({ id: 'afterService.common.basicInfo.applyNo' }, { default: '申请单号' }),
dataIndex: 'applyNo', dataIndex: 'applyNo',
align: 'center', align: 'center',
render: (text, record) => ( render: (text, record) => (
...@@ -88,23 +90,23 @@ const RepairPrSubmit: React.FC = () => { ...@@ -88,23 +90,23 @@ const RepairPrSubmit: React.FC = () => {
), ),
}, },
{ {
title: '申请单摘要', title: intl.formatMessage({ id: 'afterService.common.basicInfo.applyAbstract' }, { default: '申请单摘要' }),
dataIndex: 'applyAbstract', dataIndex: 'applyAbstract',
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
}, },
{ {
title: '供应会员', title: intl.formatMessage({ id: 'afterService.common.basicInfo.supplierName' }, { default: '供应会员' }),
dataIndex: 'supplierName', dataIndex: 'supplierName',
align: 'center', align: 'center',
}, },
{ {
title: '单据时间', title: intl.formatMessage({ id: 'afterService.common.basicInfo.applyTime' }, { default: '单据时间' }),
dataIndex: 'applyTime', dataIndex: 'applyTime',
align: 'center', align: 'center',
}, },
{ {
title: '外部状态', title: intl.formatMessage({ id: 'afterService.common.basicInfo.outerStatus' }, { default: '外部状态' }),
dataIndex: 'outerStatusName', dataIndex: 'outerStatusName',
align: 'center', align: 'center',
render: (text, record) => ( render: (text, record) => (
...@@ -112,13 +114,13 @@ const RepairPrSubmit: React.FC = () => { ...@@ -112,13 +114,13 @@ const RepairPrSubmit: React.FC = () => {
), ),
}, },
{ {
title: '内部状态', title: intl.formatMessage({ id: 'afterService.common.basicInfo.innerStatus' }, { default: '内部状态' }),
dataIndex: 'innerStatusName', dataIndex: 'innerStatusName',
align: 'center', align: 'center',
render: (text, record) => <Badge color={REPAIR_INNER_STATUS_BADGE_MAP[record.innerStatus] || '#606266'} text={text} />, render: (text, record) => <Badge color={REPAIR_INNER_STATUS_BADGE_MAP[record.innerStatus] || '#606266'} text={text} />,
}, },
{ {
title: '操作', title: intl.formatMessage({ id: 'common.table.action' }),
dataIndex: 'option', dataIndex: 'option',
align: 'center', align: 'center',
render: (text, record) => ( render: (text, record) => (
...@@ -128,7 +130,7 @@ const RepairPrSubmit: React.FC = () => { ...@@ -128,7 +130,7 @@ const RepairPrSubmit: React.FC = () => {
type="link" type="link"
onClick={() => handleSubmit(record)} onClick={() => handleSubmit(record)}
> >
提交 {intl.formatMessage({ id: 'afterService.common.commit' }, { default: '提交' })}
</Button> </Button>
)} )}
{/* 外部状态为不接受申请 或者 内部状态为 待提交申请 都可以进行编辑 */} {/* 外部状态为不接受申请 或者 内部状态为 待提交申请 都可以进行编辑 */}
...@@ -140,21 +142,21 @@ const RepairPrSubmit: React.FC = () => { ...@@ -140,21 +142,21 @@ const RepairPrSubmit: React.FC = () => {
type="link" type="link"
onClick={() => history.push(`/memberCenter/afterService/repairApplication/repairPrSubmit/edit?id=${record.applyId}`)} onClick={() => history.push(`/memberCenter/afterService/repairApplication/repairPrSubmit/edit?id=${record.applyId}`)}
> >
编辑 {intl.formatMessage({ id: 'afterService.common.edit' }, { default: '编辑' })}
</Button> </Button>
)} )}
{record.innerStatus === REPAIR_INNER_STATUS_UNCOMMITTED && ( {record.innerStatus === REPAIR_INNER_STATUS_UNCOMMITTED && (
<Popconfirm <Popconfirm
title="确定要删除吗?" title={intl.formatMessage({ id: 'afterService.common.delete.tip' }, { default: '确定要删除吗?' })}
okText="是" okText={intl.formatMessage({ id: 'afterService.common.delete.okText' }, { default: '是' })}
cancelText="否" cancelText={intl.formatMessage({ id: 'afterService.common.delete.cancelText' }, { default: '否' })}
onConfirm={() => handleDelete(record)} onConfirm={() => handleDelete(record)}
> >
<Button <Button
type="link" type="link"
danger danger
> >
删除 {intl.formatMessage({ id: 'afterService.common.delete' }, { default: '删除' })}
</Button> </Button>
</Popconfirm> </Popconfirm>
)} )}
...@@ -195,7 +197,7 @@ const RepairPrSubmit: React.FC = () => { ...@@ -195,7 +197,7 @@ const RepairPrSubmit: React.FC = () => {
} }
> >
<PlusOutlined /> <PlusOutlined />
新建 {intl.formatMessage({ id: 'afterService.common.add' }, { default: '新建' })}
</Button> </Button>
</Space> </Space>
</> </>
......
...@@ -6,9 +6,12 @@ ...@@ -6,9 +6,12 @@
* @Description: * @Description:
*/ */
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
import { getIntl } from 'umi';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { UPLOAD_TYPE } from '@/constants'; import { UPLOAD_TYPE } from '@/constants';
const intl = getIntl();
export const listSearchSchema: ISchema = { export const listSearchSchema: ISchema = {
type: 'object', type: 'object',
properties: { properties: {
...@@ -34,8 +37,8 @@ export const listSearchSchema: ISchema = { ...@@ -34,8 +37,8 @@ export const listSearchSchema: ISchema = {
type: 'string', type: 'string',
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '搜索', placeholder: intl.formatMessage({ id: 'afterService.common.query.applyNo.placeholder' }, { default: '搜索' }),
tip: '输入 申请单号 进行搜索', tip: intl.formatMessage({ id: 'afterService.common.query.applyNo.tip' }, { default: '输入 申请单号 进行搜索' }),
}, },
}, },
}, },
...@@ -52,7 +55,7 @@ export const listSearchSchema: ISchema = { ...@@ -52,7 +55,7 @@ export const listSearchSchema: ISchema = {
applyAbstract: { applyAbstract: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '申请单摘要', placeholder: intl.formatMessage({ id: 'afterService.common.query.applyAbstract.placeholder' }, { default: '申请单摘要' }),
allowClear: true, allowClear: true,
style: { style: {
width: 160, width: 160,
...@@ -62,7 +65,7 @@ export const listSearchSchema: ISchema = { ...@@ -62,7 +65,7 @@ export const listSearchSchema: ISchema = {
supplierName: { supplierName: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '供应会员', placeholder: intl.formatMessage({ id: 'afterService.common.query.supplierName.placeholder' }, { default: '供应会员' }),
allowClear: true, allowClear: true,
style: { style: {
width: 160, width: 160,
...@@ -73,7 +76,7 @@ export const listSearchSchema: ISchema = { ...@@ -73,7 +76,7 @@ export const listSearchSchema: ISchema = {
type: 'string', type: 'string',
'x-component': 'dateSelect', 'x-component': 'dateSelect',
'x-component-props': { 'x-component-props': {
placeholder: '单据时间(全部)', placeholder: intl.formatMessage({ id: 'afterService.common.query.date.placeholder' }, { default: '单据时间(全部)' }),
allowClear: true, allowClear: true,
style: { style: {
width: 160, width: 160,
...@@ -86,7 +89,7 @@ export const listSearchSchema: ISchema = { ...@@ -86,7 +89,7 @@ export const listSearchSchema: ISchema = {
span: 1, span: 1,
}, },
'x-component-props': { 'x-component-props': {
children: '查询', children: intl.formatMessage({ id: 'afterService.common.query.submit' }, { default: '查询' }),
}, },
}, },
}, },
......
import React, { useState, useRef } from 'react'; import React, { useState, useRef } from 'react';
import { useIntl } from 'umi';
import { Card, Badge, Progress, Button } from 'antd'; import { Card, Badge, Progress, Button } from 'antd';
import { import {
ClockCircleOutlined, ClockCircleOutlined,
...@@ -28,9 +29,11 @@ const formActions = createFormActions(); ...@@ -28,9 +29,11 @@ const formActions = createFormActions();
const RepairQuery: React.FC = () => { const RepairQuery: React.FC = () => {
const ref = useRef<any>({}); const ref = useRef<any>({});
const intl = useIntl();
const defaultColumns: ColumnType<any>[] = [ const defaultColumns: ColumnType<any>[] = [
{ {
title: '申请单号', title: intl.formatMessage({ id: 'afterService.common.basicInfo.applyNo' }, { default: '申请单号' }),
dataIndex: 'applyNo', dataIndex: 'applyNo',
align: 'center', align: 'center',
render: (text, record) => ( render: (text, record) => (
...@@ -44,23 +47,23 @@ const RepairQuery: React.FC = () => { ...@@ -44,23 +47,23 @@ const RepairQuery: React.FC = () => {
), ),
}, },
{ {
title: '申请单摘要', title: intl.formatMessage({ id: 'afterService.common.basicInfo.applyAbstract' }, { default: '申请单摘要' }),
dataIndex: 'applyAbstract', dataIndex: 'applyAbstract',
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
}, },
{ {
title: '供应会员', title: intl.formatMessage({ id: 'afterService.common.basicInfo.supplierName' }, { default: '供应会员' }),
dataIndex: 'supplierName', dataIndex: 'supplierName',
align: 'center', align: 'center',
}, },
{ {
title: '单据时间', title: intl.formatMessage({ id: 'afterService.common.basicInfo.applyTime' }, { default: '单据时间' }),
dataIndex: 'applyTime', dataIndex: 'applyTime',
align: 'center', align: 'center',
}, },
{ {
title: '外部状态', title: intl.formatMessage({ id: 'afterService.common.basicInfo.outerStatus' }, { default: '外部状态' }),
dataIndex: 'outerStatusName', dataIndex: 'outerStatusName',
align: 'center', align: 'center',
filters: [], filters: [],
...@@ -70,7 +73,7 @@ const RepairQuery: React.FC = () => { ...@@ -70,7 +73,7 @@ const RepairQuery: React.FC = () => {
), ),
}, },
{ {
title: '内部状态', title: intl.formatMessage({ id: 'afterService.common.basicInfo.innerStatus' }, { default: '内部状态' }),
dataIndex: 'innerStatusName', dataIndex: 'innerStatusName',
align: 'center', align: 'center',
filters: [], filters: [],
......
...@@ -6,9 +6,12 @@ ...@@ -6,9 +6,12 @@
* @Description: * @Description:
*/ */
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
import { getIntl } from 'umi';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { UPLOAD_TYPE } from '@/constants'; import { UPLOAD_TYPE } from '@/constants';
const intl = getIntl();
export const listSearchSchema: ISchema = { export const listSearchSchema: ISchema = {
type: 'object', type: 'object',
properties: { properties: {
...@@ -20,9 +23,9 @@ export const listSearchSchema: ISchema = { ...@@ -20,9 +23,9 @@ export const listSearchSchema: ISchema = {
type: 'string', type: 'string',
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '搜索', placeholder: intl.formatMessage({ id: 'afterService.common.query.applyNo.placeholder' }, { default: '搜索' }),
align: 'flex-left', align: 'flex-left',
tip: '输入 申请单号 进行搜索', tip: intl.formatMessage({ id: 'afterService.common.query.applyNo.tip' }, { default: '输入 申请单号 进行搜索' }),
}, },
}, },
[FORM_FILTER_PATH]: { [FORM_FILTER_PATH]: {
...@@ -38,14 +41,14 @@ export const listSearchSchema: ISchema = { ...@@ -38,14 +41,14 @@ export const listSearchSchema: ISchema = {
applyAbstract: { applyAbstract: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '申请单摘要', placeholder: intl.formatMessage({ id: 'afterService.common.query.applyAbstract.placeholder' }, { default: '申请单摘要' }),
allowClear: true, allowClear: true,
}, },
}, },
supplierName: { supplierName: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '供应会员', placeholder: intl.formatMessage({ id: 'afterService.common.query.supplierName.placeholder' }, { default: '供应会员' }),
allowClear: true, allowClear: true,
}, },
}, },
...@@ -54,7 +57,7 @@ export const listSearchSchema: ISchema = { ...@@ -54,7 +57,7 @@ export const listSearchSchema: ISchema = {
default: '', default: '',
'x-component': 'dateSelect', 'x-component': 'dateSelect',
'x-component-props': { 'x-component-props': {
placeholder: '单据时间(全部)', placeholder: intl.formatMessage({ id: 'afterService.common.query.date.placeholder' }, { default: '单据时间(全部)' }),
allowClear: true, allowClear: true,
}, },
}, },
...@@ -63,7 +66,7 @@ export const listSearchSchema: ISchema = { ...@@ -63,7 +66,7 @@ export const listSearchSchema: ISchema = {
default: undefined, default: undefined,
enum: [], enum: [],
'x-component-props': { 'x-component-props': {
placeholder: '外部状态(全部)', placeholder: intl.formatMessage({ id: 'afterService.common.query.outerStatus.placeholder' }, { default: '外部状态(全部)' }),
allowClear: true, allowClear: true,
}, },
}, },
...@@ -72,7 +75,7 @@ export const listSearchSchema: ISchema = { ...@@ -72,7 +75,7 @@ export const listSearchSchema: ISchema = {
default: undefined, default: undefined,
enum: [], enum: [],
'x-component-props': { 'x-component-props': {
placeholder: '内部状态(全部)', placeholder: intl.formatMessage({ id: 'afterService.common.query.innerStatus.placeholder' }, { default: '内部状态(全部)' }),
allowClear: true, allowClear: true,
}, },
}, },
...@@ -82,7 +85,7 @@ export const listSearchSchema: ISchema = { ...@@ -82,7 +85,7 @@ export const listSearchSchema: ISchema = {
span: 1, span: 1,
}, },
'x-component-props': { 'x-component-props': {
children: '查询', children: intl.formatMessage({ id: 'afterService.common.query.submit' }, { default: '查询' }),
}, },
}, },
}, },
......
...@@ -90,7 +90,7 @@ const ReturnPrConfirmFinish: React.FC = () => { ...@@ -90,7 +90,7 @@ const ReturnPrConfirmFinish: React.FC = () => {
render: (text, record) => <Badge color={RETURN_INNER_STATUS_BADGE_MAP[record.innerStatus] || '#606266'} text={text} />, render: (text, record) => <Badge color={RETURN_INNER_STATUS_BADGE_MAP[record.innerStatus] || '#606266'} text={text} />,
}, },
{ {
title: '操作', title: intl.formatMessage({ id: 'common.table.action' }),
dataIndex: 'option', dataIndex: 'option',
align: 'center', align: 'center',
render: (text, record) => ( render: (text, 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