Commit 8658d600 authored by XieZhiXiong's avatar XieZhiXiong

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

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