Commit 79e0c0d9 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

feat: 交易/采购流程规则、请购单国际化

parent 75c40862
......@@ -18,6 +18,7 @@ import content from './zh-CN/content'
import commodity from './zh-CN/commodity'
import trademark from './zh-CN/trademark'
import repositories from './zh-CN/repositories'
import processRuleSetting from './zh-CN/system/processRuleSetting'
export default {
'global.siteName': '瓴犀',
......@@ -41,4 +42,5 @@ export default {
...activityPages,
...merchantCoupon,
...content,
...processRuleSetting,
}
......@@ -467,4 +467,104 @@ export default {
'saleOrder.querenshenhecao': '确认审核操作',
'saleOrder.shifouquerenshen': '是否确认审核发货单号为',
'saleOrder.dexiaoshoufahuo': '的销售发货单',
// 请购单
'purchaseRequisition.quxiaodingdan': '取消订单',
'purchaseRequisition.zhongzhi': '中止',
'purchaseRequisition.caozuo': '操作',
'purchaseRequisition.quxiaoyuanyin': '取消原因',
'purchaseRequisition.zaicishuruni': '在此输入你的原因, 最多50个汉字',
'purchaseRequisition.qingshuruquxiao': '请输入取消原因',
'purchaseRequisition.zhongzhiyuanyin': '中止原因',
'purchaseRequisition.shenhe': '审核',
'purchaseRequisition.tijiaoshenhe': '提交审核',
'purchaseRequisition.xinjian': '新建',
'purchaseRequisition.shifouzhixingshan': '是否执行删除操作?',
'purchaseRequisition.xiugai': '修改',
'purchaseRequisition.shanchu': '删除',
'purchaseRequisition.jibenxinxi': '基本信息',
'purchaseRequisition.qinggouwuliao': '请购物料',
'purchaseRequisition.zhuancaigoudan': '转采购单',
'purchaseRequisition.zhuancaigoudingdan': '转采购订单',
'purchaseRequisition.liuzhuanjindu': '流转进度',
'purchaseRequisition.liuzhuanjilu': '流转记录',
'purchaseRequisition.qingshuruqinggouNo': '请输入请购单号',
'purchaseRequisition.qingshuruqinggouDigest': '请输入请购单摘要',
'purchaseRequisition.qingshurugongying': '请输入供应会员名称',
'purchaseRequisition.qingshuruqinggouDepartment': '请输入请购部门',
'purchaseRequisition.qingshuruqinggouUse': '请输入请购用途',
'purchaseRequisition.qingxuanzeneibu': '请选择内部状态',
'purchaseRequisition.kaishishijian': '开始时间',
'purchaseRequisition.jieshushijian': '结束时间',
'purchaseRequisition.chaxun': '查询',
'purchaseRequisition.qinggoudanhao': '请购单号',
'purchaseRequisition.qinggoudanzhaiyao': '请购单摘要',
'purchaseRequisition.gongyinghuiyuan': '供应会员',
'purchaseRequisition.yufuriqi': '预付日期',
'purchaseRequisition.qinggoubumen': '请购部门',
'purchaseRequisition.qinggouyongtu': '请购用途',
'purchaseRequisition.qinggoushuliang': '请购数量',
'purchaseRequisition.yizhuandingdanshu': '已转订单数量',
'purchaseRequisition.danjushijian': '单据时间',
'purchaseRequisition.neibuzhuangtai': '内部状态',
'purchaseRequisition.liuzhuanshunxuhao': '流转顺序号',
'purchaseRequisition.caozuojuese': '操作角色',
'purchaseRequisition.zhuangtai': '状态',
'purchaseRequisition.caozuoshijian': '操作时间',
'purchaseRequisition.shenheyijian': '审核意见',
'purchaseRequisition.caozuoren': '操作人',
'purchaseRequisition.bumen': '部门',
'purchaseRequisition.zhiwei': '职位',
'purchaseRequisition.waibuliuzhuan': '外部流转',
'purchaseRequisition.neibuliuzhuan': '内部流转',
'purchaseRequisition.qinggoudanhao:': '请购单号:',
'purchaseRequisition.chuangjianren:': '创建人:',
'purchaseRequisition.danjushijian:': '单据时间:',
'purchaseRequisition.yujiaoriqi:': '预交日期:',
'purchaseRequisition.qinggoubumen:': '请购部门:',
'purchaseRequisition.qinggouyongtu:': '请购用途:',
'purchaseRequisition.gongyinghuiyuan:': '供应会员:',
'purchaseRequisition.wuliaobianhao': '物料编号',
'purchaseRequisition.wuliaomingcheng': '物料名称',
'purchaseRequisition.guigexinghao': '规格型号',
'purchaseRequisition.pinlei': '品类',
'purchaseRequisition.pinpai': '品牌',
'purchaseRequisition.danwei': '单位',
'purchaseRequisition.yugudanjia': '预估单价',
'purchaseRequisition.shuliang': '数量',
'purchaseRequisition.yugujine': '预估金额',
'purchaseRequisition.shuliangheji': '数量合计',
'purchaseRequisition.jinezongji': '金额总计',
'purchaseRequisition.xuanzezuzhiji': '选择组织机构',
'purchaseRequisition.huohao': '货号',
'purchaseRequisition.huopinmingcheng': '货品名称',
'purchaseRequisition.dianjichaxun': '点击查询,列表可显示新增的货品',
'purchaseRequisition.xinzenghuopin': '新增货品',
'purchaseRequisition.xuanzehuopin': '选择货品',
'purchaseRequisition.wuliu': '物流',
'purchaseRequisition.ziti': '自提',
'purchaseRequisition.wuxupeisong': '无需配送',
'purchaseRequisition.shuzhijingduyi': '数值精度溢出',
'purchaseRequisition.bixutianxie': '必须填写',
'purchaseRequisition.caigoushuliangjin': '采购数量仅限三位小数',
'purchaseRequisition.danjiajinxiansi': '单价仅限四位小数',
'purchaseRequisition.zitidizhi': '自提地址',
'purchaseRequisition.xuanzegongyinghui': '选择供应会员',
'purchaseRequisition.xuanzecaigouwu': '选择采购物料',
'purchaseRequisition.dingdanzhaiyao': '订单摘要',
'purchaseRequisition.qingshurudingdan': '请输入订单摘要',
'purchaseRequisition.yujiaoriqi': '预交日期',
'purchaseRequisition.qinggoubumenID': '请购部门ID',
'purchaseRequisition.qingshuruqinggou': '请输入请购用途',
'purchaseRequisition.dingdanwuliao': '订单物料',
'purchaseRequisition.qingshuruhuohao': '请输入货号',
'purchaseRequisition.shangpinpinpai': '商品品牌',
'purchaseRequisition.shangpinpinlei': '商品品类',
'purchaseRequisition.qingwanshandingdan': '请完善订单物料数据',
'purchaseRequisition.qingtianxieshangpin': '请填写商品采购数量',
'purchaseRequisition.xuanze': '选择',
'purchaseRequisition.bianjiqinggoudan': '编辑请购单',
'purchaseRequisition.xinzengqinggoudan': '新增请购单',
'purchaseRequisition.baocun': '保存',
}
export default {
// 采购流程规则配置、交易流程规则配置
'processRuleSetting.bixutianxie': '必须填写',
'processRuleSetting.zhifubilijin': '支付比例仅限两位小数',
'processRuleSetting.dingdanjiaoyiliu': '订单交易流程',
'processRuleSetting.shouhouhuanhuoliu': '售后换货流程',
'processRuleSetting.shouhoutuihuoliu': '售后退货流程',
'processRuleSetting.shouhouweixiuliu': '售后维修流程',
'processRuleSetting.jiagongshengchanliu': '加工生产流程',
'processRuleSetting.zhifakehuzi': '直发客户自动二次发货',
'processRuleSetting.xianshigengduo': '显示更多',
'processRuleSetting.qingxianxuanzeshi': '请先选择适用商城!',
'processRuleSetting.xuanzezhidingshang': '选择指定商品',
'processRuleSetting.shangpinmingcheng': '商品名称',
'processRuleSetting.pinlei': '品类',
'processRuleSetting.pinpai': '品牌',
'processRuleSetting.shangpindingjia': '商品定价',
'processRuleSetting.xianhuojiage': '现货价格',
'processRuleSetting.jiagexuyaoxun': '价格需要询价',
'processRuleSetting.jifenduihuanshang': '积分兑换商品',
'processRuleSetting.caozuo': '操作',
'processRuleSetting.shanchu': '删除',
'processRuleSetting.xiaoshi': '小时',
'processRuleSetting.zhifupici:': '支付批次:',
'processRuleSetting.xuanzeshangpin': '选择商品',
'processRuleSetting.chaxun': '查询',
'processRuleSetting.qingxuanzepinpai': '请选择品牌',
'processRuleSetting.qingxuanzepinlei': '请选择品类',
'processRuleSetting.qingshurushangpin': '请输入商品名称',
'processRuleSetting.zhifucishu': '支付次数',
'processRuleSetting.zhifuhuanjie': '支付环节',
'processRuleSetting.zhifubili': '支付比例',
'processRuleSetting.jibenxinxi': '基本信息',
'processRuleSetting.guizemingcheng': '规则名称',
'processRuleSetting.qingshuruguize': '请输入规则名称',
'processRuleSetting.liuchengxuanze': '流程选择',
'processRuleSetting.qingxuanzeliucheng': '请选择流程配置',
'processRuleSetting.dingdanquxiaoshi': '订单取消时间',
'processRuleSetting.danhouchaoguoduo': '单后超过多少小时未支付后自动取消订单',
'processRuleSetting.qingtianxiedingdan': '请填写订单取消时间',
'processRuleSetting.shuzhijinxianyi': '数值仅限一位小数',
'processRuleSetting.dianzihetong': '电子合同',
'processRuleSetting.shiyongdianzihe': '使用电子合同',
'processRuleSetting.qingxuanzedianzi': '请选择电子合同模板',
'processRuleSetting.zhifupeizhi': '支付配置',
'processRuleSetting.liuchengleixing': '流程类型',
'processRuleSetting.shiyongshangcheng': '适用商城',
'processRuleSetting.shiyongshangpin': '适用商品',
'processRuleSetting.suoyoushangpin': '所有商品(默认)',
'processRuleSetting.zhidingshangpin': '指定商品',
'processRuleSetting.zhifubilizhi': '支付比例之和100',
'processRuleSetting.fanhui': '返回',
'processRuleSetting.zhakanjiaoyigui': '查看交易规则',
'processRuleSetting.bianjijiaoyigui': '编辑交易规则',
'processRuleSetting.xinzengjiaoyigui': '新增交易规则',
'processRuleSetting.baocun': '保存',
'processRuleSetting.xinjian': '新建',
'processRuleSetting.xiugai': '修改',
'processRuleSetting.fou': '否',
'processRuleSetting.shi': '是',
'processRuleSetting.quedingyaozhixing': '确定要执行这个操作?',
'processRuleSetting.youxiao': '有效',
'processRuleSetting.wuxiao': '无效',
'processRuleSetting.zhuangtai': '状态',
'processRuleSetting.caozuoshijian': '操作时间',
'processRuleSetting.jiaoyiliuchengming': '交易流程名称',
'processRuleSetting.liuchengguizeming': '流程规则名称',
'processRuleSetting.jiaoyiguizeID': '交易规则ID',
'processRuleSetting.hetongbianhao': '合同编号',
'processRuleSetting.hetongzhaiyao': '合同摘要',
'processRuleSetting.hetongshengxiao': '合同生效/失效时间',
'processRuleSetting.hetongyifang': '合同乙方',
'processRuleSetting.duiyingdanju': '对应单据',
'processRuleSetting.xunyuanleixing': '寻源类型',
'processRuleSetting.caigouxunjia': '采购询价',
'processRuleSetting.caigouzhaobiao': '采购招标',
'processRuleSetting.caigoujingjia': '采购竞价',
'processRuleSetting.hetongshengxiaoshi': '合同生效时间',
'processRuleSetting.hetongshixiaoshi': '合同失效时间',
'processRuleSetting.xuanzeshiyonghe': '选择适用合同',
'processRuleSetting.shiyonghetong': '适用合同',
'processRuleSetting.suoyouhetong': '所有合同(默认)',
'processRuleSetting.zhidinghetong': '指定合同',
'processRuleSetting.zhakancaigouliu': '查看采购流程规则',
'processRuleSetting.bianjicaigouliu': '编辑采购流程规则',
'processRuleSetting.xinzengcaigouliu': '新增采购流程规则',
'processRuleSetting.liuchengguizeID': '流程规则ID',
}
......@@ -5,15 +5,16 @@ import { BillDetailContext } from '../../_public/bill/effects/context';
import BillDetailWrapper from '../components/billDetailWrapper';
import BillDetailHeader from '../components/billDetailHeader';
import BillDetailSection from '../components/billDetailSection';
import { useIntl } from 'umi';
const OrderPreview: React.FC = () => {
const { formContext } = useBillDetail({type: 'requestBill'})
const intl = useIntl()
const anchorTitleList = [
{ title: '流转进度', id: 'transferProcess', componentName: "TransferProcess" },
{ title: '基本信息', id: 'baseicInfo', type: "basicInfo" },
{ title: '请购物料', id: 'billMaterial', componentName: "BillMaterial" },
{ title: '流转记录', id: 'transferRecord', componentName: "TransformRecord" },
{ title: intl.formatMessage({ id: 'purchaseRequisition.liuzhuanjindu', defaultMessage: '流转进度' }), id: 'transferProcess', componentName: "TransferProcess" },
{ title: intl.formatMessage({ id: 'purchaseRequisition.jibenxinxi', defaultMessage: '基本信息' }), id: 'baseicInfo', type: "basicInfo" },
{ title: intl.formatMessage({ id: 'purchaseRequisition.qinggouwuliao', defaultMessage: '请购物料' }), id: 'billMaterial', componentName: "BillMaterial" },
{ title: intl.formatMessage({ id: 'purchaseRequisition.liuzhuanjilu', defaultMessage: '流转记录' }), id: 'transferRecord', componentName: "TransformRecord" },
]
return (
......
......@@ -2,6 +2,7 @@ import React, { useContext } from 'react'
import { Col, Row, Table } from 'antd'
import MellowCard from '@/components/MellowCard'
import { BillDetailContext } from '@/pages/transaction/_public/bill/effects/context';
import { useIntl } from 'umi';
/**
* 请购单 请购物料
......@@ -14,57 +15,58 @@ export interface BidMaterialProps {
const BidMaterial: React.FC<BidMaterialProps> = ({cardTitle}) => {
const bidDetailContext = useContext(BillDetailContext)
const { data } = bidDetailContext
const intl = useIntl()
const columns = [
{
title: '物料编号',
title: intl.formatMessage({ id: 'purchaseRequisition.wuliaobianhao', defaultMessage: '物料编号' }),
dataIndex: 'productNo',
key: 'productNo',
},
{
title: '物料名称',
title: intl.formatMessage({ id: 'purchaseRequisition.wuliaomingcheng', defaultMessage: '物料名称' }),
dataIndex: 'name',
key: 'name',
},
{
title: '规格型号',
title: intl.formatMessage({ id: 'purchaseRequisition.guigexinghao', defaultMessage: '规格型号' }),
dataIndex: 'spec',
key: 'spec',
},
{
title: '品类',
title: intl.formatMessage({ id: 'purchaseRequisition.pinlei', defaultMessage: '品类' }),
dataIndex: 'category',
key: 'category',
},
{
title: '品牌',
title: intl.formatMessage({ id: 'purchaseRequisition.pinpai', defaultMessage: '品牌' }),
dataIndex: 'brand',
key: 'brand',
},
{
title: '单位',
title: intl.formatMessage({ id: 'purchaseRequisition.danwei', defaultMessage: '单位' }),
dataIndex: 'unit',
key: 'unit',
},
{
title: '预估单价',
title: intl.formatMessage({ id: 'purchaseRequisition.yugudanjia', defaultMessage: '预估单价' }),
dataIndex: 'price',
key: 'price',
render: t => t ? `¥${t}` : null
},
{
title: '数量',
title: intl.formatMessage({ id: 'purchaseRequisition.shuliang', defaultMessage: '数量' }),
dataIndex: 'quantity',
key: 'quantity',
},
{
title: '预估金额',
title: intl.formatMessage({ id: 'purchaseRequisition.yugujine', defaultMessage: '预估金额' }),
dataIndex: 'amount',
key: 'amount',
render: t => t ? `¥${t}` : null
},
{
title: '已转订单数量',
title: intl.formatMessage({ id: 'purchaseRequisition.yizhuandingdanshu', defaultMessage: '已转订单数量' }),
dataIndex: 'transferQuantity',
key: 'transferQuantity',
}
......@@ -80,11 +82,11 @@ const BidMaterial: React.FC<BidMaterialProps> = ({cardTitle}) => {
<Table dataSource={data.product.products} columns={columns} pagination={false} />
<Row justify="end" style={{marginTop: 24}}>
<Col span={2}>
<div>数量合计</div>
<div>{intl.formatMessage({ id: 'purchaseRequisition.shuliangheji', defaultMessage: '数量合计' })}</div>
<div>{Number(data.product.quantity).toFixed(2)}</div>
</Col>
<Col span={2}>
<div>金额总计</div>
<div>{intl.formatMessage({ id: 'purchaseRequisition.jinezongji', defaultMessage: '金额总计' })}</div>
<div>{`¥${Number(data.product.productAmount).toFixed(2)}`}</div>
</Col>
</Row>
......
......@@ -3,6 +3,7 @@ import { Row, Col } from 'antd'
import MellowCard from '@/components/MellowCard'
import style from './index.less'
import { BillDetailContext } from '@/pages/transaction/_public/bill/effects/context';
import { useIntl } from 'umi';
/**
* 描述信息列表
......@@ -23,6 +24,7 @@ export interface BasicInfoProps {
const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type, styles}) => {
const bidDetailContext = useContext(BillDetailContext)
const { data: _data } = bidDetailContext
const intl = useIntl()
// 基本信息——请购单
......@@ -30,19 +32,19 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type, styles}) =
{
span: 8,
fieldList: [
{ title: '请购单号:', name: 'requisitionNo' },
{ title: '请购单摘要:', name: 'digest' },
{ title: '创建人:', name: 'creator' },
{ title: '单据时间:', name: 'createTime' },
{ title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanhao:', defaultMessage: '请购单号:' }), name: 'requisitionNo' },
{ title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanzhaiyao', defaultMessage: '请购单摘要:' }), name: 'digest' },
{ title: intl.formatMessage({ id: 'purchaseRequisition.chuangjianren:', defaultMessage: '创建人:' }), name: 'creator' },
{ title: intl.formatMessage({ id: 'purchaseRequisition.danjushijian:', defaultMessage: '单据时间:' }), name: 'createTime' },
]
},
{
span: 8,
fieldList: [
{ title: '预交日期:', name: 'deliverTime' },
{ title: '请购部门:', name: 'department' },
{ title: '请购用途:', name: 'purpose' },
{ title: '供应会员:', name: 'vendorMemberName' },
{ title: intl.formatMessage({ id: 'purchaseRequisition.yujiaoriqi:', defaultMessage: '预交日期:' }), name: 'deliverTime' },
{ title: intl.formatMessage({ id: 'purchaseRequisition.qinggoubumen:', defaultMessage: '请购部门:' }), name: 'department' },
{ title: intl.formatMessage({ id: 'purchaseRequisition.qinggouyongtu:', defaultMessage: '请购用途:' }), name: 'purpose' },
{ title: intl.formatMessage({ id: 'purchaseRequisition.gongyinghuiyuan:', defaultMessage: '供应会员:' }), name: 'vendorMemberName' },
]
}
]
......
......@@ -9,6 +9,7 @@ import {
} from 'antd';
import MellowCard from '@/components/MellowCard';
import style from './index.less'
import { useIntl } from 'umi';
interface TransferProcessProp {
outerVerifyCurrent?: number;
......@@ -46,7 +47,7 @@ const TransferProcess: React.FC<TransferProcessProp> = ({
customKey,
cardTitle = ''
}) => {
const intl = useIntl()
const [transferRadio, setTransferRadio] = useState<TransferEnum>(TransferEnum.Outer)
useEffect(() => {
......@@ -69,8 +70,8 @@ const TransferProcess: React.FC<TransferProcessProp> = ({
bordered={false}
extra={
<Radio.Group value={transferRadio} buttonStyle="solid" size="small" onChange={handleChangeType}>
{outerVerifySteps?.length ? <Radio.Button value={TransferEnum.Outer}>外部流转</Radio.Button> : null}
{innerVerifySteps?.length ? <Radio.Button value={TransferEnum.Interior}>内部流转</Radio.Button> : null}
{outerVerifySteps?.length ? <Radio.Button value={TransferEnum.Outer}>{intl.formatMessage({ id: 'purchaseRequisition.waibuliuzhuan', defaultMessage: '外部流转' })}</Radio.Button> : null}
{innerVerifySteps?.length ? <Radio.Button value={TransferEnum.Interior}>{intl.formatMessage({ id: 'purchaseRequisition.neibuliuzhuan', defaultMessage: '内部流转' })}</Radio.Button> : null}
</Radio.Group>
}
className={style.cardWrap}
......
......@@ -5,6 +5,7 @@ import MellowCard from '@/components/MellowCard'
import { TransferEnum } from '../transferProcess';
import style from './index.less'
import { BillDetailContext } from '@/pages/transaction/_public/bill/effects/context';
import { useIntl } from 'umi';
/**
* 请购订单流转记录
......@@ -16,46 +17,46 @@ export interface BidTransformRecordProps {
const BidTransformRecord:React.FC<BidTransformRecordProps> = ({cardTitle}) => {
const { data } = useContext(BillDetailContext)
const intl = useIntl()
const {innerHistories: interiorProcurementOrderLogResponses, externalProcurementOrderLogResponses = []} = data
const [transferRadio, setTransferRadio] = useState<TransferEnum>(TransferEnum.Outer)
const outReocrdCols: any[] = [
{
title: '流转顺序号',
title: intl.formatMessage({ id: 'purchaseRequisition.liuzhuanshunxuhao', defaultMessage: '流转顺序号' }),
dataIndex: 'id',
align: 'center',
key: 'id',
render: (_, __, index: number) => index + 1
},
{
title: '操作角色',
title: intl.formatMessage({ id: 'purchaseRequisition.caozuojuese', defaultMessage: '操作角色' }),
dataIndex: 'memberRoleName',
align: 'center',
key: 'memberRoleName',
},
{
title: '状态',
title: intl.formatMessage({ id: 'purchaseRequisition.zhuangtai', defaultMessage: '状态' }),
dataIndex: 'statusValue',
align: 'center',
key: 'statusValue',
},
{
title: '操作',
title: intl.formatMessage({ id: 'purchaseRequisition.caozuo', defaultMessage: '操作' }),
dataIndex: 'operationValue',
align: 'center',
key: 'operationValue',
},
{
title: '操作时间',
title: intl.formatMessage({ id: 'purchaseRequisition.caozuoshijian', defaultMessage: '操作时间' }),
dataIndex: 'createTime',
align: 'center',
key: 'createTime',
render: time => formatTimeString(time)
},
{
title: '审核意见',
title: intl.formatMessage({ id: 'purchaseRequisition.shenheyijian', defaultMessage: '审核意见' }),
dataIndex: 'checkRemark',
align: 'center',
key: 'checkRemark',
......@@ -63,26 +64,26 @@ const BidTransformRecord:React.FC<BidTransformRecordProps> = ({cardTitle}) => {
]
const insideRecordCols: any[] = [
{
title: '流转记录',
title: intl.formatMessage({ id: 'purchaseRequisition.liuzhuanjilu', defaultMessage: '流转记录' }),
dataIndex: 'id',
align: 'center',
key: 'id',
render: (_, __, index: number) => index + 1
},
{
title: '操作人',
title: intl.formatMessage({ id: 'purchaseRequisition.caozuoren', defaultMessage: '操作人' }),
dataIndex: 'operator',
align: 'center',
key: 'operator',
},
{
title: '部门',
title: intl.formatMessage({ id: 'purchaseRequisition.bumen', defaultMessage: '部门' }),
dataIndex: 'department',
align: 'center',
key: 'department',
},
{
title: '职位',
title: intl.formatMessage({ id: 'purchaseRequisition.zhiwei', defaultMessage: '职位' }),
dataIndex: 'jobTitle',
align: 'center',
key: 'jobTitle',
......@@ -94,20 +95,20 @@ const BidTransformRecord:React.FC<BidTransformRecordProps> = ({cardTitle}) => {
key: 'statusName',
},
{
title: '操作',
title: intl.formatMessage({ id: 'purchaseRequisition.caozuo', defaultMessage: '操作' }),
dataIndex: 'operation',
align: 'center',
key: 'operation',
},
{
title: '操作时间',
title: intl.formatMessage({ id: 'purchaseRequisition.caozuoshijian', defaultMessage: '操作时间' }),
dataIndex: 'createTime',
align: 'center',
key: 'createTime',
render: text => formatTimeString(text)
},
{
title: '审核意见',
title: intl.formatMessage({ id: 'purchaseRequisition.shenheyijian', defaultMessage: '审核意见' }),
dataIndex: 'remark',
align: 'center',
key: 'remark',
......@@ -135,8 +136,8 @@ const BidTransformRecord:React.FC<BidTransformRecordProps> = ({cardTitle}) => {
bordered={false}
extra={
<Radio.Group value={transferRadio} buttonStyle="solid" size="small" onChange={handleChangeType}>
{externalProcurementOrderLogResponses?.length ? <Radio.Button value={TransferEnum.Outer}>外部流转</Radio.Button> : null}
{interiorProcurementOrderLogResponses?.length ? <Radio.Button value={TransferEnum.Interior}>内部流转</Radio.Button> : null}
{externalProcurementOrderLogResponses?.length ? <Radio.Button value={TransferEnum.Outer}>{intl.formatMessage({ id: 'purchaseRequisition.waibuliuzhuan', defaultMessage: '外部流转' })}</Radio.Button> : null}
{interiorProcurementOrderLogResponses?.length ? <Radio.Button value={TransferEnum.Interior}>{intl.formatMessage({ id: 'purchaseRequisition.neibuliuzhuan', defaultMessage: '内部流转' })}</Radio.Button> : null}
</Radio.Group>
}
className={style.cardWrap}
......
import { formatTimeString } from '@/utils'
import StatusColors from '@/pages/transaction/components/statusColors'
import EyePreview from '@/components/EyePreview'
import { history } from 'umi'
import { history, useIntl } from 'umi'
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { getPurchaseRequisitionOrderPageSelectOption } from '@/pages/transaction/effect';
/** 采购 请购单查询 带内部状态schmea */
export const tableSearchListSchema: any = (align?: String, colStyle?: Object) => {
const intl = useIntl()
const data = getPurchaseRequisitionOrderPageSelectOption()
if(data) {
......@@ -29,7 +30,7 @@ export const tableSearchListSchema: any = (align?: String, colStyle?: Object) =>
type: 'string',
"x-component": 'Search',
'x-component-props': {
placeholder: '请输入请购单号',
placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingshuruqinggouNo', defaultMessage: '请输入请购单号' }),
align: 'flex-end',
},
}
......@@ -51,31 +52,31 @@ export const tableSearchListSchema: any = (align?: String, colStyle?: Object) =>
"digest": {
type: 'string',
'x-component-props': {
placeholder: '请输入请购单摘要',
placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingshuruqinggouDigest', defaultMessage: '请输入请购单摘要' }),
}
},
"memberName": {
type: 'string',
"x-component-props": {
placeholder: '请输入供应会员名称'
placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingshurugongying', defaultMessage: '请输入供应会员名称' })
}
},
"department": {
type: 'string',
"x-component-props": {
placeholder: '请输入请购部门'
placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingshuruqinggouDepartment', defaultMessage: '请输入请购部门' })
}
},
"purpose": {
type: 'string',
"x-component-props": {
placeholder: '请输入请购用途'
placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingshuruqinggouUse', defaultMessage: '请输入请购用途' })
}
},
"innerStatus": {
type: 'string',
"x-component-props": {
placeholder: '请选择内部状态'
placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingxuanzeneibu', defaultMessage: '请选择内部状态' })
},
enum: data.map(item => ({
label: item['name'],
......@@ -86,13 +87,13 @@ export const tableSearchListSchema: any = (align?: String, colStyle?: Object) =>
type: 'daterange',
// "x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间','结束时间'],
placeholder: [intl.formatMessage({ id: 'purchaseRequisition.kaishishijian', defaultMessage: '开始时间' }),intl.formatMessage({ id: 'purchaseRequisition.jieshushijian', defaultMessage: '结束时间' })],
},
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
children: intl.formatMessage({ id: 'purchaseRequisition.chaxun', defaultMessage: '查询' }),
},
},
},}}
......@@ -104,6 +105,8 @@ export const tableSearchListSchema: any = (align?: String, colStyle?: Object) =>
/** 采购 请购单查询 无内部状态schmea */
export const tableListSchema: any = (align?: String, colStyle?: Object) => {
const intl = useIntl()
return {
type: 'object',
properties: {
......@@ -111,7 +114,7 @@ export const tableListSchema: any = (align?: String, colStyle?: Object) => {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入请购单号',
placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingshuruqinggouNo', defaultMessage: '请输入请购单号' }),
align: 'flex-end',
},
},
......@@ -128,37 +131,37 @@ export const tableListSchema: any = (align?: String, colStyle?: Object) => {
"digest": {
type: 'string',
'x-component-props': {
placeholder: '请输入请购单摘要',
placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingshuruqinggouDigest', defaultMessage: '请输入请购单摘要' }),
}
},
"memberName": {
type: 'string',
"x-component-props": {
placeholder: '请输入供应会员名称'
placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingshurugongying', defaultMessage: '请输入供应会员名称' })
}
},
"department": {
type: 'string',
"x-component-props": {
placeholder: '请输入请购部门'
placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingshuruqinggouDepartment', defaultMessage: '请输入请购部门' })
}
},
"purpose": {
type: 'string',
"x-component-props": {
placeholder: '请输入请购用途'
placeholder: intl.formatMessage({ id: 'purchaseRequisition.qingshuruqinggouUse', defaultMessage: '请输入请购用途' })
}
},
"[startDate,endDate]": {
type: 'daterange',
'x-component-props': {
placeholder: ['开始时间','结束时间'],
placeholder: [intl.formatMessage({ id: 'purchaseRequisition.kaishishijian', defaultMessage: '开始时间' }),intl.formatMessage({ id: 'purchaseRequisition.jieshushijian', defaultMessage: '结束时间' })],
},
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
children: intl.formatMessage({ id: 'purchaseRequisition.chaxun', defaultMessage: '查询' }),
},
},
},
......@@ -169,10 +172,11 @@ export const tableListSchema: any = (align?: String, colStyle?: Object) => {
/** 采购 请购单 公共列 */
export const baseOrderListColumns: any = () => {
const intl = useIntl()
return [
{
title: '请购单号',
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanhao', defaultMessage: '请购单号' }),
align: 'center',
dataIndex: 'requisitionNo',
key: 'requisitionNo',
......@@ -185,56 +189,56 @@ export const baseOrderListColumns: any = () => {
}
},
{
title: '请购单摘要',
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanzhaiyao', defaultMessage: '请购单摘要' }),
align: 'center',
dataIndex: 'digest',
key: 'digest',
},
{
title: '供应会员',
title: intl.formatMessage({ id: 'purchaseRequisition.gongyinghuiyuan', defaultMessage: '供应会员' }),
align: 'center',
dataIndex: 'vendorMemberName',
key: 'vendorMemberName',
},
{
title: '预付日期',
title: intl.formatMessage({ id: 'purchaseRequisition.yufuriqi', defaultMessage: '预付日期' }),
align: 'center',
dataIndex: 'deliverTime',
key: 'deliverTime',
render: (text) => formatTimeString(text, 'YYYY-MM-DD')
},
{
title: '请购部门',
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoubumen', defaultMessage: '请购部门' }),
align: 'center',
dataIndex: 'department',
key: 'department',
},
{
title: '请购用途',
title: intl.formatMessage({ id: 'purchaseRequisition.qinggouyongtu', defaultMessage: '请购用途' }),
align: 'center',
dataIndex: 'purpose',
key: 'purpose',
},
{
title: '请购数量',
title: intl.formatMessage({ id: 'purchaseRequisition.qinggoushuliang', defaultMessage: '请购数量' }),
align: 'center',
dataIndex: 'quantity',
key: 'quantity',
},
{
title: '已转订单数量',
title: intl.formatMessage({ id: 'purchaseRequisition.yizhuandingdanshu', defaultMessage: '已转订单数量' }),
align: 'center',
dataIndex: 'transferQuantity',
key: 'transferQuantity',
},
{
title: '单据时间',
title: intl.formatMessage({ id: 'purchaseRequisition.danjushijian', defaultMessage: '单据时间' }),
align: 'center',
dataIndex: 'createTime',
key: 'createTime',
},
{
title: '内部状态',
title: intl.formatMessage({ id: 'purchaseRequisition.neibuzhuangtai', defaultMessage: '内部状态' }),
align: 'center',
dataIndex: 'innerStatusName',
key: 'innerStatusName',
......
......@@ -7,7 +7,7 @@ import BillDetailHeader from '../../components/billDetailHeader';
import BillDetailSection from '../../components/billDetailSection';
import { Button } from 'antd';
import { useHttpRequest } from '@/hooks/useHttpRequest';
import { history } from 'umi';
import { history, useIntl } from 'umi';
import ApprovedOrderModal from '@/pages/transaction/components/approvedOrderModal';
import { postPurchaseRequisitionFirstAudit } from '@/services/PurchaseV2Api';
......@@ -18,7 +18,7 @@ const FirstOrderPreview: React.FC = () => {
const { run, loading } = useHttpRequest(postPurchaseRequisitionFirstAudit)
const approvedRef = useRef<any>({})
const intl = useIntl()
const handleClick = useCallback(() => {
approvedRef.current.setVisible(true)
}, [])
......@@ -47,7 +47,7 @@ const FirstOrderPreview: React.FC = () => {
anchorList={anchorTitleList}
extraRight={
<Button type='primary' onClick={handleClick} loading={loading}>
提交审核
{intl.formatMessage({ id: 'purchaseRequisition.tijiaoshenhe', defaultMessage: '提交审核' })}
</Button>
}
/>
......
import React from 'react'
import { history } from 'umi'
import { useIntl } from 'umi'
import { Card } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
......@@ -23,7 +23,7 @@ const fetchTableData = async (params) => {
const FirstApprovedBill:React.FC<FirstApprovedBillProps> = () => {
const { columns, ref } = useSelfTable()
const intl = useIntl()
return <PageHeaderWrapper>
<Card>
<StandardTable
......
import { useRef } from 'react'
import { baseOrderListColumns } from '../../constant'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history } from 'umi'
import { history, useIntl } from 'umi'
import TableOperation from '@/components/TableOperation'
// 待审核请购单 一级 Hook
export const useSelfTable = () => {
const ref = useRef<any>({})
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({customKey: 'id'})
const intl = useIntl()
const handleSubmit = (id) => {
history.push(`/memberCenter/procurementAbility/purchaseRequisition/firstApprovedBill/detail?id=${id}`)
}
/** 参照后台数据生成 */
const renderOptionButton = (record: any) => {
const buttonGroup = { '审核': true }
const buttonGroup = { [intl.formatMessage({ id: 'purchaseRequisition.shenhe', defaultMessage: '审核' })]: true }
const operationHandler = {
'审核': () => handleSubmit(record.id),
[intl.formatMessage({ id: 'purchaseRequisition.shenhe', defaultMessage: '审核' })]: () => handleSubmit(record.id),
}
return (
......@@ -34,7 +34,7 @@ export const useSelfTable = () => {
if(alreadyColumns) {
return alreadyColumns.concat([
{
title: '操作',
title: intl.formatMessage({ id: 'purchaseRequisition.caozuo', defaultMessage: '操作' }),
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
......
......@@ -4,6 +4,7 @@ import { useModalTable } from '../../model/useModalTable'
import { ISchemaFormActions, ISchemaFormAsyncActions } from '@formily/antd'
import { departmentColumns } from '../../constant'
import { getMemberBusinessOrganizationPage } from '@/services/MemberV2Api'
import { useIntl } from 'umi'
export interface DepartmentModalTableProps extends ModalTableProps {
type?: 'radio' | 'checkbox',
......@@ -16,7 +17,7 @@ export interface DepartmentModalTableProps extends ModalTableProps {
const DepartmentModalTable:React.FC<DepartmentModalTableProps> = (props) => {
const { type = 'radio', schemaAction, confirmModal, currentRef, ...restProps } = props
const { visible, setVisible, rowSelection, rowSelectionCtl } = useModalTable({type})
const intl = useIntl()
useEffect(() => {
if (currentRef) {
currentRef.current = {
......@@ -45,7 +46,7 @@ const DepartmentModalTable:React.FC<DepartmentModalTableProps> = (props) => {
}
return (
<ModalTable
modalTitle='选择组织机构'
modalTitle={intl.formatMessage({ id: 'purchaseRequisition.xuanzezuzhiji', defaultMessage: '选择组织机构' })}
columns={departmentColumns}
visible={visible}
confirm={handleConfirm}
......
......@@ -14,6 +14,7 @@ import { clearModalParams } from '@/utils'
import CustomCategorySearch from '@/components/NiceForm/components/CustomCategorySearch'
import CustomInputSearch from '@/components/NiceForm/components/CustomInputSearch'
import { searchBrandOptionEffect, searchCustomerCategoryOptionEffect } from '../../effects'
import { useIntl, getIntl } from 'umi'
export interface MaterialModalTableProps extends ModalTableProps {
type?: 'radio' | 'checkbox',
......@@ -33,37 +34,37 @@ export const materialColumns: any[] = [
},
// 货号 货品名称 规格型号 品类 品牌 单位
{
title: '货号',
title: getIntl().formatMessage({ id: 'purchaseRequisition.huohao', defaultMessage: '货号' }),
dataIndex: 'code',
align: 'center',
key: 'code',
},
{
title: '货品名称',
title: getIntl().formatMessage({ id: 'purchaseRequisition.huopinmingcheng', defaultMessage: '货品名称' }),
dataIndex: 'name',
align: 'center',
key: 'name',
},
{
title: '规格型号',
title: getIntl().formatMessage({ id: 'purchaseRequisition.guigexinghao', defaultMessage: '规格型号' }),
dataIndex: 'type',
align: 'center',
key: 'type',
},
{
title: '品类',
title: getIntl().formatMessage({ id: 'purchaseRequisition.pinlei', defaultMessage: '品类' }),
dataIndex: ['customerCategory', 'name'],
align: 'center',
key: ['customerCategory', 'name'],
},
{
title: '品牌',
title: getIntl().formatMessage({ id: 'purchaseRequisition.pinpai', defaultMessage: '品牌' }),
dataIndex: ['brand', 'name'],
align: 'center',
key: ['brand', 'name'],
},
{
title: '单位',
title: getIntl().formatMessage({ id: 'purchaseRequisition.danwei', defaultMessage: '单位' }),
dataIndex: 'unitName',
align: 'center',
key: 'unitName'
......@@ -71,6 +72,7 @@ export const materialColumns: any[] = [
]
const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
const intl = useIntl()
const { type = 'checkbox', schemaAction, confirmModal, currentRef, sectionProps, ...restProps } = props
const { visible, setVisible, rowSelection, rowSelectionCtl } = sectionProps
......@@ -128,15 +130,15 @@ const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
}
const otherHandle = <>
<a className="ant-btn" href="/memberCenter/commodityAbility/commodity/goods/add" target="_blank" style={{marginRight: 16}}>新增货品</a>
<Tooltip title="点击查询,列表可显示新增的货品">
<a className="ant-btn" href="/memberCenter/commodityAbility/commodity/goods/add" target="_blank" style={{marginRight: 16}}>{intl.formatMessage({ id: 'purchaseRequisition.xinzenghuopin', defaultMessage: '新增货品' })}</a>
<Tooltip title={intl.formatMessage({ id: 'purchaseRequisition.dianjichaxun', defaultMessage: '点击查询,列表可显示新增的货品' })}>
<QuestionCircleOutlined />
</Tooltip>
</>
return (
<ModalTable
modalTitle='选择货品'
modalTitle={intl.formatMessage({ id: 'purchaseRequisition.xuanzehuopin', defaultMessage: '选择货品' })}
width={900}
columns={materialColumns}
visible={visible}
......
......@@ -3,6 +3,7 @@ import { Form, Input, Select, Popover, Row } from 'antd';
import { EnvironmentOutlined } from '@ant-design/icons';
import { FormDetailContext } from '@/formSchema/context';
import { getLogisticsSelectListMemberShipperAddress } from '@/services/LogisticsV2Api';
import { useIntl } from 'umi';
export interface MaterialTableCellProps {
title: React.ReactNode;
......@@ -49,7 +50,7 @@ export const MaterialTableCell:React.FC<MaterialTableCellProps> = ({
const formItemRef = useRef<any>();
const { form } = useContext(EditableContext);
const { formContext } = useContext(FormDetailContext);
const intl = useIntl()
// 是否显示地址
const [showAddress, setShowAddress] = useState<boolean>(false)
// 地址信息
......@@ -117,7 +118,7 @@ export const MaterialTableCell:React.FC<MaterialTableCellProps> = ({
onChange={(value, option) => change(value, option, dataIndex)}
id={dataIndex + record.id}
className="purchase_logistic_select"
options={[{ label: '物流', value: 1 }, { label: '自提', value: 2 }, { label: '无需配送', value: 3 }]}
options={[{ label: intl.formatMessage({ id: 'purchaseRequisition.wuliu', defaultMessage: '物流' }), value: 1 }, { label: intl.formatMessage({ id: 'purchaseRequisition.ziti', defaultMessage: '自提' }), value: 2 }, { label: intl.formatMessage({ id: 'purchaseRequisition.wuxupeisong', defaultMessage: '无需配送' }), value: 3 }]}
{...formItemProps}
/>
}
......@@ -129,7 +130,7 @@ export const MaterialTableCell:React.FC<MaterialTableCellProps> = ({
try {
let _value = Number(value)
if(_value > Number.MAX_SAFE_INTEGER) {
throw new Error('数值精度溢出')
throw new Error(intl.formatMessage({ id: 'purchaseRequisition.shuzhijingduyi', defaultMessage: '数值精度溢出' }))
}
callback()
} catch (err) {
......@@ -147,11 +148,11 @@ export const MaterialTableCell:React.FC<MaterialTableCellProps> = ({
rules={dataIndex === 'quantity' ? [
{
required: true,
message: `${title}必须填写`,
message: `${title}${intl.formatMessage({ id: 'purchaseRequisition.bixutianxie', defaultMessage: '必须填写' })}`,
},
{
pattern: /^\d+(\.\d{1,3})?$/,
message: '采购数量仅限三位小数',
message: intl.formatMessage({ id: 'purchaseRequisition.caigoushuliangjin', defaultMessage: '采购数量仅限三位小数' }),
},
{
validator: validatorNumber
......@@ -159,7 +160,7 @@ export const MaterialTableCell:React.FC<MaterialTableCellProps> = ({
] : [
{
pattern: /^\d+(\.\d{1,4})?$/,
message: '单价仅限四位小数',
message: intl.formatMessage({ id: 'purchaseRequisition.danjiajinxiansi', defaultMessage: '单价仅限四位小数' }),
},
{
validator: validatorNumber
......@@ -174,7 +175,7 @@ export const MaterialTableCell:React.FC<MaterialTableCellProps> = ({
<Popover content={
<Row>
<div>
<h3><EnvironmentOutlined/> 自提地址</h3>
<h3><EnvironmentOutlined/> {intl.formatMessage({ id: 'purchaseRequisition.zitidizhi', defaultMessage: '自提地址' })}</h3>
{
receiveInfo && <>
<p>{receiveInfo.shipperName} / {receiveInfo.phone}</p>
......
......@@ -4,6 +4,7 @@ import { fetchOrderApi } from '../../apis'
import { useModalTable } from '../../model/useModalTable'
import { ISchemaFormActions, ISchemaFormAsyncActions } from '@formily/antd'
import { memberColumns } from '../../constant'
import { useIntl } from 'umi'
export interface MemberModalTableProps extends ModalTableProps {
type?: 'radio' | 'checkbox',
......@@ -16,7 +17,7 @@ export interface MemberModalTableProps extends ModalTableProps {
const MemberModalTable:React.FC<MemberModalTableProps> = (props) => {
const { type = 'radio', schemaAction, confirmModal, currentRef, ...restProps } = props
const { visible, setVisible, rowSelection, rowSelectionCtl } = useModalTable({type, customKey: 'memberId'})
const intl = useIntl()
useEffect(() => {
if (currentRef) {
currentRef.current = {
......@@ -47,7 +48,7 @@ const MemberModalTable:React.FC<MemberModalTableProps> = (props) => {
}
return (
<ModalTable
modalTitle='选择供应会员'
modalTitle={intl.formatMessage({ id: 'purchaseRequisition.xuanzegongyinghui', defaultMessage: '选择供应会员' })}
columns={memberColumns}
visible={visible}
confirm={handleConfirm}
......
import { getIntl } from "umi"
/** 修改请购单 初始值转换 */
export const procurmentRenderInit = (initValue: any) => {
......@@ -51,31 +52,31 @@ export const procurementProcessField = (value) => {
// 会员列
export const memberColumns: any[] = [
{
title: '会员ID',
title: getIntl().formatMessage({ id: 'purchaseRequisition.huiyuanID', defaultMessage: '会员ID' }),
dataIndex: 'memberId',
align: 'center',
key: 'memberId',
},
{
title: '会员名称',
title: getIntl().formatMessage({ id: 'purchaseRequisition.huiyuanmingcheng', defaultMessage: '会员名称' }),
dataIndex: 'name',
align: 'center',
key: 'name',
},
{
title: '公司类型',
title: getIntl().formatMessage({ id: 'purchaseRequisition.gongsileixing', defaultMessage: '公司类型' }),
dataIndex: 'memberTypeName',
align: 'center',
key: 'memberTypeName',
},
{
title: '公司角色',
title: getIntl().formatMessage({ id: 'purchaseRequisition.gongsijuese', defaultMessage: '公司角色' }),
dataIndex: 'roleName',
align: 'center',
key: 'roleName',
},
{
title: '公司等级',
title: getIntl().formatMessage({ id: 'purchaseRequisition.gongsidengji', defaultMessage: '公司等级' }),
dataIndex: 'levelTag',
align: 'center',
key: 'levelTag',
......@@ -92,12 +93,12 @@ export const departmentColumns: any[] = [
className: 'commonHide'
},
{
title: '机构代码',
title: getIntl().formatMessage({ id: 'purchaseRequisition.jigoudaima', defaultMessage: '机构代码' }),
dataIndex: 'code',
key: 'code',
},
{
title: '机构名称',
title: getIntl().formatMessage({ id: 'purchaseRequisition.jigoumingcheng', defaultMessage: '机构名称' }),
dataIndex: 'title',
key: 'title',
},
......@@ -113,43 +114,43 @@ export const materialInfoColumns: any[] = [
className: 'commonHide'
},
{
title: '物料编号',
title: getIntl().formatMessage({ id: 'purchaseRequisition.wuliaobianhao', defaultMessage: '物料编号' }),
dataIndex: 'code',
align: 'center',
key: 'code',
},
{
title: '物料名称',
title: getIntl().formatMessage({ id: 'purchaseRequisition.wuliaomingcheng', defaultMessage: '物料名称' }),
dataIndex: 'name',
align: 'center',
key: 'name',
},
{
title: '规格型号',
title: getIntl().formatMessage({ id: 'purchaseRequisition.guigexinghao', defaultMessage: '规格型号' }),
dataIndex: 'type',
align: 'center',
key: 'type',
},
{
title: '品类',
title: getIntl().formatMessage({ id: 'purchaseRequisition.pinlei', defaultMessage: '品类' }),
dataIndex: 'category',
align: 'center',
key: 'category',
},
{
title: '品牌',
title: getIntl().formatMessage({ id: 'purchaseRequisition.pinpai', defaultMessage: '品牌' }),
dataIndex: 'brand',
align: 'center',
key: 'brand',
},
{
title: '单位',
title: getIntl().formatMessage({ id: 'purchaseRequisition.danwei', defaultMessage: '单位' }),
dataIndex: 'unit',
align: 'center',
key: 'unit',
},
{
title: '预估单价(元)',
title: getIntl().formatMessage({ id: 'purchaseRequisition.yugudanjia', defaultMessage: '预估单价(元)' }),
dataIndex: 'price',
align: 'left',
key: 'price',
......@@ -158,7 +159,7 @@ export const materialInfoColumns: any[] = [
// render: (t) => `¥${t.toFixed(2)}`
},
{
title: '数量',
title: getIntl().formatMessage({ id: 'purchaseRequisition.shuliang', defaultMessage: '数量' }),
dataIndex: 'quantity',
align: 'center',
key: 'quantity',
......@@ -166,14 +167,14 @@ export const materialInfoColumns: any[] = [
editable: true,
},
{
title: '预估金额(元)',
title: getIntl().formatMessage({ id: 'purchaseRequisition.yugujine', defaultMessage: '预估金额(元)' }),
dataIndex: 'amount',
align: 'center',
key: 'amount',
// render: (t, r) => t ? `${Number(t).toFixed(2)}` : null
},
{
title: '操作',
title: getIntl().formatMessage({ id: 'purchaseRequisition.caozuo', defaultMessage: '操作' }),
dataIndex: 'ctl',
align: 'center',
key: 'ctl',
......
import React, { useRef, useState, useEffect } from 'react'
import { history } from 'umi'
import { history, useIntl } from 'umi'
import { usePageStatus } from '@/hooks/usePageStatus'
import { Button, Col, message, Row } from 'antd'
import { createFormActions, registerVirtualBox, useFormSpy } from '@formily/antd'
......@@ -36,6 +36,7 @@ const RowStyle = styled(props => <Row style={{marginTop: 12, justifyContent: "fl
// 总计金额联动框
export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', () => {
const intl = useIntl()
const { form } = useFormSpy({ selector: [['onFieldValueChange', 'products']], reducer: v => v })
const data = form.getFieldValue('products')
const sum = data.reduce((prev, next) => (prev*1000 + (next.amount || 0)*1000)/1000, 0)
......@@ -43,11 +44,11 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', () => {
return <RowStyle>
<Col span={2}>
<div>数量合计</div>
<div>{intl.formatMessage({ id: 'purchaseRequisition.shuliangheji', defaultMessage: '数量合计' })}</div>
<div>{total.toFixed(2)}</div>
</Col>
<Col span={2}>
<div>金额总计</div>
<div>{intl.formatMessage({ id: 'purchaseRequisition.jinezongji', defaultMessage: '金额总计' })}</div>
<div>{`¥${(sum).toFixed(2)}`}</div>
</Col>
</RowStyle>
......@@ -63,6 +64,7 @@ const IncreaseRequisition:React.FC<{}> = () => {
const { id } = usePageStatus()
const [initFormValue, setInitFormValue] = useState<any>({})
const { formContext } = useFormDetail()
const intl = useIntl()
// 请购单物料
const { materialAddButton, materialRef, materialColumns, materialComponents, ...surplusProps } = useMaterialTable(addSchemaAction)
......@@ -90,7 +92,7 @@ const IncreaseRequisition:React.FC<{}> = () => {
const params = { ...value }
console.log(value)
if(formContext.innerFormErrors) {
throw new Error('请完善订单物料数据')
throw new Error(intl.formatMessage({ id: 'purchaseRequisition.qingwanshandingdan', defaultMessage: '请完善订单物料数据' }))
}
// 校验采购数量
const judgementByCount = params.products?.length && params.products.map(item => {
......@@ -101,7 +103,7 @@ const IncreaseRequisition:React.FC<{}> = () => {
}
})
if(!judgementByCount || judgementByCount.includes(false)){
throw new Error('请填写商品采购数量')
throw new Error(intl.formatMessage({ id: 'purchaseRequisition.qingtianxieshangpin', defaultMessage: '请填写商品采购数量' }))
}
setBtnLoading(true)
......@@ -131,14 +133,14 @@ const IncreaseRequisition:React.FC<{}> = () => {
memberRef.current.setVisible(true)
}
const memberBtn = <div className='connectBtn' onClick={handleOrderMember}><LinkOutlined style={{marginRight: 4}}/>选择</div>
const memberBtn = <div className='connectBtn' onClick={handleOrderMember}><LinkOutlined style={{marginRight: 4}}/>{intl.formatMessage({ id: 'purchaseRequisition.xuanze', defaultMessage: '选择' })}</div>
// 选择合同
const handleDepartment = () => {
departmentRef.current.setVisible(true)
}
const departmentBtn = <div className='connectBtn' onClick={handleDepartment}><LinkOutlined style={{marginRight: 4}}/>选择</div>
const departmentBtn = <div className='connectBtn' onClick={handleDepartment}><LinkOutlined style={{marginRight: 4}}/>{intl.formatMessage({ id: 'purchaseRequisition.xuanze', defaultMessage: '选择' })}</div>
const providerValue = {
schemaActions: addSchemaAction,
......@@ -148,11 +150,11 @@ const IncreaseRequisition:React.FC<{}> = () => {
return (<div>
<FormDetailContext.Provider value={providerValue}>
<FormDetailHeader
title={id ? '编辑请购单' : '新增请购单'}
title={id ? intl.formatMessage({ id: 'purchaseRequisition.bianjiqinggoudan', defaultMessage: '编辑请购单' }) : intl.formatMessage({ id: 'purchaseRequisition.xinzengqinggoudan', defaultMessage: '新增请购单' })}
schema={increaseSchema}
extraRight={[
<Button key="1" onClick={() => addSchemaAction.submit()} loading={btnLoading} type="primary" icon={<SaveOutlined />}>
保存
{intl.formatMessage({ id: 'purchaseRequisition.baocun', defaultMessage: '保存' })}
</Button>,
]}
/>
......
......@@ -4,6 +4,7 @@ import { Button } from 'antd';
import { materialInfoColumns } from '../constant';
import MaterialTableCell, { MaterialEditableRow } from '../components/materialTableCell';
import { useModalTable } from './useModalTable';
import { useIntl } from 'umi';
export const getUnitPriceTotal = (record) => {
......@@ -16,6 +17,7 @@ export const getUnitPriceTotal = (record) => {
*/
export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActions) => {
const materialRef = useRef<any>({})
const intl = useIntl()
const { visible, setVisible, rowSelection, rowSelectionCtl } = useModalTable({type: 'checkbox'})
const handleDelete = (record) => {
......@@ -33,7 +35,7 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
const [materialColumns, setMaterialColumns] = useState(() => {
// 渲染操作
materialInfoColumns[materialInfoColumns.length - 1].render = (text, record) => <Button type='link' onClick={() => handleDelete(record)}>删除</Button>
materialInfoColumns[materialInfoColumns.length - 1].render = (text, record) => <Button type='link' onClick={() => handleDelete(record)}>{intl.formatMessage({ id: 'purchaseRequisition.shanchu', defaultMessage: '删除' })}</Button>
materialInfoColumns[materialInfoColumns.length - 2].render = (t, r) => r.amount && <span style={{color: 'red'}}>{Number(r.amount).toFixed(2)}</span>
return materialInfoColumns
})
......@@ -45,7 +47,7 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
}
}
const materialAddButton = <Button onClick={handleShowMaterial} block type='default' style={{margin: '24px auto'}}>选择采购物料</Button>
const materialAddButton = <Button onClick={handleShowMaterial} block type='default' style={{margin: '24px auto'}}>{intl.formatMessage({ id: 'purchaseRequisition.xuanzecaigouwu', defaultMessage: '选择采购物料' })}</Button>
const materialComponents = {
body: {
row: MaterialEditableRow,
......
import { ISchema } from '@formily/antd';
import moment from 'moment'
import { getIntl } from 'umi';
// 基本信息
const basicInfo: ISchema = {
......@@ -7,7 +8,7 @@ const basicInfo: ISchema = {
type: 'object',
"x-component": 'MellowCard',
"x-component-props": {
title: '基本信息',
title: getIntl().formatMessage({ id: 'purchaseRequisition.jibenxinxi', defaultMessage: '基本信息' }),
id: 'basicInfo',
},
properties: {
......@@ -26,17 +27,17 @@ const basicInfo: ISchema = {
properties: {
requisitionNo: {
type: 'string',
title: '请购单号',
title: getIntl().formatMessage({ id: 'purchaseRequisition.qinggoudanhao', defaultMessage: '请购单号' }),
"x-component": 'text',
visible: false,
},
digest: {
type: 'string',
title: '订单摘要',
title: getIntl().formatMessage({ id: 'purchaseRequisition.dingdanzhaiyao', defaultMessage: '订单摘要' }),
"x-rules": [
{
required: true,
message: '请输入订单摘要'
message: getIntl().formatMessage({ id: 'purchaseRequisition.qingshurudingdan', defaultMessage: '请输入订单摘要' })
},
{
limitByte: true,
......@@ -50,7 +51,7 @@ const basicInfo: ISchema = {
deliverTime: {
type: 'string',
"x-component": 'date',
title: '预交日期',
title: getIntl().formatMessage({ id: 'purchaseRequisition.yujiaoriqi', defaultMessage: '预交日期' }),
required: true,
"x-component-props": {
disabledDate: current => {
......@@ -64,7 +65,7 @@ const basicInfo: ISchema = {
},
department: {
type: 'string',
title: '请购部门',
title: getIntl().formatMessage({ id: 'purchaseRequisition.qinggoubumen', defaultMessage: '请购部门' }),
required: true,
"x-component-props": {
disabled: true,
......@@ -76,16 +77,16 @@ const basicInfo: ISchema = {
},
departmentId: {
type: 'string',
title: '请购部门ID',
title: getIntl().formatMessage({ id: 'purchaseRequisition.qinggoubumenID', defaultMessage: '请购部门ID' }),
visible: false,
},
purpose: {
type: 'string',
title: '请购用途',
title: getIntl().formatMessage({ id: 'purchaseRequisition.qinggouyongtu', defaultMessage: '请购用途' }),
"x-rules": [
{
required: true,
message: '请输入请购用途'
message: getIntl().formatMessage({ id: 'purchaseRequisition.qingshuruqinggou', defaultMessage: '请输入请购用途' })
},
{
limitByte: true,
......@@ -98,7 +99,7 @@ const basicInfo: ISchema = {
},
vendorMemberName: {
type: 'string',
title: '供应会员',
title: getIntl().formatMessage({ id: 'purchaseRequisition.gongyinghuiyuan', defaultMessage: '供应会员' }),
"x-component-props": {
disabled: true,
addonAfter: "{{memberBtn}}"
......@@ -115,12 +116,12 @@ const basicInfo: ISchema = {
},
createTime: {
type: 'string',
title: '单据时间',
title: getIntl().formatMessage({ id: 'purchaseRequisition.danjushijian', defaultMessage: '单据时间' }),
visible: false
},
interiorStateName: {
type: 'string',
title: '内部状态',
title: getIntl().formatMessage({ id: 'purchaseRequisition.neibuzhuangtai', defaultMessage: '内部状态' }),
visible: false
},
}
......@@ -135,7 +136,7 @@ const material: ISchema = {
type: 'object',
"x-component": 'MellowCard',
"x-component-props": {
title: '订单物料',
title: getIntl().formatMessage({ id: 'purchaseRequisition.dingdanwuliao', defaultMessage: '订单物料' }),
id: 'orderMaterial',
},
properties: {
......
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ISchema } from '@formily/antd';
import { getIntl } from 'umi';
/**
* 新增采购请购单 选择物料的筛选
......@@ -11,7 +12,7 @@ import { ISchema } from '@formily/antd';
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '请输入货号',
placeholder: getIntl().formatMessage({ id: 'purchaseRequisition.qingshuruhuohao', defaultMessage: '请输入货号' }),
align: 'flex-start',
},
},
......@@ -34,7 +35,7 @@ import { ISchema } from '@formily/antd';
name: {
type: 'string',
'x-component-props': {
placeholder: '货品名称',
placeholder: getIntl().formatMessage({ id: 'purchaseRequisition.huopinmingcheng', defaultMessage: '货品名称' }),
style: { width: '174px' },
},
},
......@@ -42,7 +43,7 @@ import { ISchema } from '@formily/antd';
type: 'string',
'x-component': 'CustomInputSearch',
'x-component-props': {
placeholder: '商品品牌',
placeholder: getIntl().formatMessage({ id: 'purchaseRequisition.shangpinpinpai', defaultMessage: '商品品牌' }),
showSearch: true,
showArrow: true,
defaultActiveFirstOption: false,
......@@ -57,7 +58,7 @@ import { ISchema } from '@formily/antd';
type: 'string',
'x-component': 'CustomCategorySearch',
'x-component-props': {
placeholder: '商品品类',
placeholder: getIntl().formatMessage({ id: 'purchaseRequisition.shangpinpinlei', defaultMessage: '商品品类' }),
showSearch: true,
notFoundContent: null,
style: { width: '174px' },
......@@ -68,7 +69,7 @@ import { ISchema } from '@formily/antd';
type: {
type: 'string',
"x-component-props": {
placeholder: '规格型号',
placeholder: getIntl().formatMessage({ id: 'purchaseRequisition.guigexinghao', defaultMessage: '规格型号' }),
style: { width: '174px' },
}
},
......@@ -78,7 +79,7 @@ import { ISchema } from '@formily/antd';
span: 1
},
"x-component-props": {
children: '查询'
children: getIntl().formatMessage({ id: 'purchaseRequisition.chaxun', defaultMessage: '查询' })
}
},
submit1: {
......
......@@ -13,6 +13,7 @@ import ModalForm from '@/components/ModalForm'
import { useHttpRequest } from '@/hooks/useHttpRequest'
import TableOperation from '@/components/TableOperation'
import { getPurchaseRequisitionPage, postPurchaseRequisitionCancel, postPurchaseRequisitionPause } from '@/services/PurchaseV2Api'
import { useIntl } from 'umi'
// 请购单查询
......@@ -28,6 +29,7 @@ const destroyActions = createFormActions();
const pauseActions = createFormActions();
const RequestBill: React.FC<RequestBillProps> = () => {
const intl = useIntl()
const ref = useRef<any>({})
const destoryRef = useRef<any>({})
const pauseRef = useRef<any>({})
......@@ -84,13 +86,13 @@ const RequestBill: React.FC<RequestBillProps> = () => {
/** 参照后台数据生成 */
const renderOptionButton = (record) => {
const buttonGroup = {
'取消订单': record.showCancel,
'中止': record.showPause
[intl.formatMessage({ id: 'purchaseRequisition.quxiaodingdan', defaultMessage: '取消订单' })]: record.showCancel,
[intl.formatMessage({ id: 'purchaseRequisition.zhongzhi', defaultMessage: '中止' })]: record.showPause
}
const operationHandler = {
'取消订单': () => handleCancel(record),
'中止': () => handleSuspend(record),
[intl.formatMessage({ id: 'purchaseRequisition.quxiaodingdan', defaultMessage: '取消订单' })]: () => handleCancel(record),
[intl.formatMessage({ id: 'purchaseRequisition.zhongzhi', defaultMessage: '中止' })]: () => handleSuspend(record),
}
return (
......@@ -106,7 +108,7 @@ const RequestBill: React.FC<RequestBillProps> = () => {
if(alreadyColumns) {
return alreadyColumns.concat([
{
title: '操作',
title: intl.formatMessage({ id: 'purchaseRequisition.caozuo', defaultMessage: '操作' }),
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
......@@ -146,7 +148,7 @@ const RequestBill: React.FC<RequestBillProps> = () => {
</Card>
{/* 取消原因 */}
<ModalForm
modalTitle='取消原因'
modalTitle={intl.formatMessage({ id: 'purchaseRequisition.quxiaoyuanyin', defaultMessage: '取消原因' })}
currentRef={destoryRef}
confirm={handleSubmit}
actions={destroyActions}
......@@ -169,13 +171,13 @@ const RequestBill: React.FC<RequestBillProps> = () => {
type: 'textarea',
"x-component-props": {
rows: 4,
placeholder: '在此输入你的原因, 最多50个汉字'
placeholder: intl.formatMessage({ id: 'purchaseRequisition.zaicishuruni', defaultMessage: '在此输入你的原因, 最多50个汉字' })
},
title: '取消原因',
title: intl.formatMessage({ id: 'purchaseRequisition.quxiaoyuanyin', defaultMessage: '取消原因' }),
"x-rules": [
{
required: true,
message: '请输入取消原因'
message: intl.formatMessage({ id: 'purchaseRequisition.qingshuruquxiao', defaultMessage: '请输入取消原因' })
},
{
limitByte: true,
......@@ -191,7 +193,7 @@ const RequestBill: React.FC<RequestBillProps> = () => {
/>
{/* 中止原因 */}
<ModalForm
modalTitle='中止原因'
modalTitle={intl.formatMessage({ id: 'purchaseRequisition.zhongzhiyuanyin', defaultMessage: '中止原因' })}
currentRef={pauseRef}
confirm={handleSubmitPause}
actions={pauseActions}
......@@ -214,13 +216,13 @@ const RequestBill: React.FC<RequestBillProps> = () => {
type: 'textarea',
"x-component-props": {
rows: 4,
placeholder: '在此输入你的原因, 最多50个汉字'
placeholder: intl.formatMessage({ id: 'purchaseRequisition.zaicishuruni', defaultMessage: '在此输入你的原因, 最多50个汉字' })
},
title: '中止原因',
title: intl.formatMessage({ id: 'purchaseRequisition.zhongzhiyuanyin', defaultMessage: '中止原因' }),
"x-rules": [
{
required: true,
message: '请输入取消原因'
message: intl.formatMessage({ id: 'purchaseRequisition.qingshuruquxiao', defaultMessage: '请输入取消原因' })
},
{
limitByte: true,
......
import React from 'react'
import { history } from 'umi'
import { history, useIntl } from 'umi'
import { Card, Button, Space } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
......@@ -24,7 +24,7 @@ const fetchTableData = async (params) => {
const ReadyAddBill:React.FC<ReadyAddBillProps> = () => {
const { columns, ref } = useSelfTable()
const intl = useIntl()
const clickAdd = () => {
history.push(`/memberCenter/procurementAbility/purchaseRequisition/readyAddBill/add`)
}
......@@ -68,7 +68,7 @@ const ReadyAddBill:React.FC<ReadyAddBillProps> = () => {
type='primary'
onClick={clickAdd}
>
新建
{intl.formatMessage({ id: 'purchaseRequisition.xinjian', defaultMessage: '新建' })}
</Button>
</Space>,
layouts: {
......
import React, { useRef } from 'react'
import { useRef } from 'react'
import { baseOrderListColumns } from '../../constant'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history } from 'umi'
import { history, useIntl } from 'umi'
import TableOperation from '@/components/TableOperation'
import { Modal } from 'antd'
import { postPurchaseRequisitionDelete, postPurchaseRequisitionSubmitAudit } from '@/services/PurchaseV2Api'
......@@ -10,6 +10,7 @@ import { postPurchaseRequisitionDelete, postPurchaseRequisitionSubmitAudit } fro
export const useSelfTable = () => {
const ref = useRef<any>({})
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({customKey: 'id'})
const intl = useIntl()
const handleSubmit = async (id) => {
await postPurchaseRequisitionSubmitAudit({id})
......@@ -18,7 +19,7 @@ export const useSelfTable = () => {
const handleDelete = async (id) => {
Modal.confirm({
title: "是否执行删除操作?",
title: intl.formatMessage({ id: 'purchaseRequisition.shifouzhixingshan', defaultMessage: '是否执行删除操作?' }),
onOk: async () => {
await postPurchaseRequisitionDelete({id})
ref.current.reload()
......@@ -32,12 +33,12 @@ export const useSelfTable = () => {
/** 参照后台数据生成 */
const renderOptionButton = (record: any) => {
const buttonGroup = { '提交审核': record.showSubmit, '修改': true, '删除': record.showDelete }
const buttonGroup = { [intl.formatMessage({ id: 'purchaseRequisition.tijiaoshenhe', defaultMessage: '提交审核' })]: record.showSubmit, [intl.formatMessage({ id: 'purchaseRequisition.xiugai', defaultMessage: '修改' })]: true, [intl.formatMessage({ id: 'purchaseRequisition.shanchu', defaultMessage: '删除' })]: record.showDelete }
const operationHandler = {
'提交审核': () => handleSubmit(record.id),
'修改': () => handleEdit(record),
'删除': () => handleDelete(record.id),
[intl.formatMessage({ id: 'purchaseRequisition.tijiaoshenhe', defaultMessage: '提交审核' })]: () => handleSubmit(record.id),
[intl.formatMessage({ id: 'purchaseRequisition.xiugai', defaultMessage: '修改' })]: () => handleEdit(record),
[intl.formatMessage({ id: 'purchaseRequisition.shanchu', defaultMessage: '删除' })]: () => handleDelete(record.id),
}
return (
......@@ -53,7 +54,7 @@ export const useSelfTable = () => {
if(alreadyColumns) {
return alreadyColumns.concat([
{
title: '操作',
title: intl.formatMessage({ id: 'purchaseRequisition.caozuo', defaultMessage: '操作' }),
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
......
......@@ -7,7 +7,7 @@ import BillDetailHeader from '../../components/billDetailHeader';
import BillDetailSection from '../../components/billDetailSection';
import { Button } from 'antd';
import { useHttpRequest } from '@/hooks/useHttpRequest';
import { history } from 'umi';
import { history, useIntl } from 'umi';
import { postPurchaseRequisitionSubmit } from '@/services/PurchaseV2Api';
......@@ -15,7 +15,7 @@ import { postPurchaseRequisitionSubmit } from '@/services/PurchaseV2Api';
const ReadySubmitBillDetail: React.FC = () => {
const { formContext, id, anchorTitleList } = useBillDetail({type: 'requestBill'})
const intl = useIntl()
const { run, loading } = useHttpRequest(postPurchaseRequisitionSubmit)
const approvedRef = useRef<any>({})
......@@ -34,7 +34,7 @@ const ReadySubmitBillDetail: React.FC = () => {
anchorList={anchorTitleList}
extraRight={
<Button type='primary' onClick={handleClick} loading={loading}>
提交审核
{intl.formatMessage({ id: 'purchaseRequisition.tijiaoshenhe', defaultMessage: '提交审核' })}
</Button>
}
/>
......
import { useRef } from 'react'
import { baseOrderListColumns } from '../../constant'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history } from 'umi'
import { history, useIntl } from 'umi'
import TableOperation from '@/components/TableOperation'
// 待提交请购单 Hook
......@@ -9,16 +9,18 @@ export const useSelfTable = () => {
const ref = useRef<any>({})
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({customKey: 'id'})
const intl = useIntl()
const handleSubmit = (id) => {
history.push(`/memberCenter/procurementAbility/purchaseRequisition/readySubmitBill/detail?id=${id}`)
}
/** 参照后台数据生成 */
const renderOptionButton = (record: any) => {
const buttonGroup = { '审核': true }
const buttonGroup = { [intl.formatMessage({ id: 'purchaseRequisition.shenhe', defaultMessage: '审核' })]: true }
const operationHandler = {
'审核': () => handleSubmit(record.id),
[intl.formatMessage({ id: 'purchaseRequisition.shenhe', defaultMessage: '审核' })]: () => handleSubmit(record.id),
}
return (
......@@ -34,7 +36,7 @@ export const useSelfTable = () => {
if(alreadyColumns) {
return alreadyColumns.concat([
{
title: '操作',
title: intl.formatMessage({ id: 'purchaseRequisition.caozuo', defaultMessage: '操作' }),
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
......
import React from 'react';
import {history} from 'umi'
import {history, useIntl} from 'umi'
import PreLoading from '@/components/PreLoading';
import { useBillDetail } from '@/pages/transaction/_public/bill/effects/useBillDetail';
import { BillDetailContext } from '@/pages/transaction/_public/bill/effects/context';
......@@ -12,10 +12,10 @@ import { usePageStatus } from '@/hooks/usePageStatus';
const RequisitionOrderDetail: React.FC = () => {
const { formContext } = useBillDetail({type: 'transformBill'})
const { id, action } = usePageStatus();
const intl = useIntl()
const anchorTitleList = [
{ title: '基本信息', id: 'baseicInfo', type: "basicInfo", styles: { marginTop: 0 } },
{ title: '请购物料', id: 'billMaterial', componentName: "BillMaterial" },
{ title: intl.formatMessage({ id: 'purchaseRequisition.jibenxinxi', defaultMessage: '基本信息' }), id: 'baseicInfo', type: "basicInfo", styles: { marginTop: 0 } },
{ title: intl.formatMessage({ id: 'purchaseRequisition.qinggouwuliao', defaultMessage: '请购物料' }), id: 'billMaterial', componentName: "BillMaterial" },
]
const handleClick = () => {
......@@ -30,7 +30,7 @@ const RequisitionOrderDetail: React.FC = () => {
anchorList={anchorTitleList}
extraRight={
action && <Button type='primary' onClick={handleClick}>
转采购单
{intl.formatMessage({ id: 'purchaseRequisition.zhuancaigoudan', defaultMessage: '转采购单' })}
</Button>
}
/>
......
import React, { useRef } from 'react'
import { baseOrderListColumns } from '../../constant'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history } from 'umi'
import { history, useIntl } from 'umi'
import TableOperation from '@/components/TableOperation'
// 请购单转订单 Hook
export const useSelfTable = () => {
const ref = useRef<any>({})
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({customKey: 'orderId'})
const intl = useIntl()
const handleSubmit = async (id) => {
history.push(`/memberCenter/procurementAbility/requisitionOrder/readyRequisitionOrder/preview?id=${id}&action=1`)
}
/** 参照后台数据生成 */
const renderOptionButton = (record: any) => {
const buttonGroup = { '转采购订单': true }
const buttonGroup = { [intl.formatMessage({ id: 'purchaseRequisition.zhuancaigoudingdan', defaultMessage: '转采购订单' })]: true }
const operationHandler = {
'转采购订单': () => handleSubmit(record.id),
[intl.formatMessage({ id: 'purchaseRequisition.zhuancaigoudingdan', defaultMessage: '转采购订单' })]: () => handleSubmit(record.id),
}
return (
......@@ -34,7 +34,7 @@ export const useSelfTable = () => {
if(alreadyColumns) {
return alreadyColumns.concat([
{
title: '操作',
title: [intl.formatMessage({ id: 'purchaseRequisition.caozuo', defaultMessage: '操作' })],
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
......
......@@ -7,7 +7,7 @@ import BillDetailHeader from '../../components/billDetailHeader';
import BillDetailSection from '../../components/billDetailSection';
import { Button } from 'antd';
import { useHttpRequest } from '@/hooks/useHttpRequest';
import { history } from 'umi';
import { history, useIntl } from 'umi';
import ApprovedOrderModal from '@/pages/transaction/components/approvedOrderModal';
import { postPurchaseRequisitionTwoAudit } from '@/services/PurchaseV2Api';
......@@ -16,7 +16,7 @@ import { postPurchaseRequisitionTwoAudit } from '@/services/PurchaseV2Api';
const SecondOrderPreview: React.FC = () => {
const { formContext, id, anchorTitleList } = useBillDetail({type: 'requestBill'})
const intl = useIntl()
const { run, loading } = useHttpRequest(postPurchaseRequisitionTwoAudit)
const approvedRef = useRef<any>({})
......@@ -48,7 +48,7 @@ const SecondOrderPreview: React.FC = () => {
anchorList={anchorTitleList}
extraRight={
<Button type='primary' onClick={handleClick} loading={loading}>
提交审核
{intl.formatMessage({ id: 'purchaseRequisition.tijiaoshenhe', defaultMessage: '提交审核' })}
</Button>
}
/>
......
import React from 'react'
import { history } from 'umi'
import { Card } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
......
import { useRef } from 'react'
import { baseOrderListColumns } from '../../constant'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history } from 'umi'
import { history, useIntl } from 'umi'
import TableOperation from '@/components/TableOperation'
// 待审核请购单 二级 Hook
export const useSelfTable = () => {
const intl = useIntl()
const ref = useRef<any>({})
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({customKey: 'id'})
......@@ -15,10 +16,10 @@ export const useSelfTable = () => {
/** 参照后台数据生成 */
const renderOptionButton = (record: any) => {
const buttonGroup = { '审核': true }
const buttonGroup = { [intl.formatMessage({ id: 'purchaseRequisition.shenhe', defaultMessage: '审核' })]: true }
const operationHandler = {
'审核': () => handleSubmit(record.id),
[intl.formatMessage({ id: 'purchaseRequisition.shenhe', defaultMessage: '审核' })]: () => handleSubmit(record.id),
}
return (
......@@ -34,7 +35,7 @@ export const useSelfTable = () => {
if(alreadyColumns) {
return alreadyColumns.concat([
{
title: '操作',
title: intl.formatMessage({ id: 'purchaseRequisition.caozuo', defaultMessage: '操作' }),
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
......
import React, {useState} from 'react'
import { history } from 'umi'
import { history, useIntl } from 'umi'
import { Button, Card } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
......@@ -16,9 +16,9 @@ import { postOrderPurchaseProcessCreate, postOrderPurchaseProcessUpdate } from '
const addSchemaAction = createFormActions()
const AddRule:React.FC<{}> = (props) => {
const AddRule:React.FC<{}> = () => {
const [isDisabled, setIsDisabled] = useState<boolean>(false)
const intl = useIntl()
const {
id,
preview,
......@@ -38,7 +38,7 @@ const AddRule:React.FC<{}> = (props) => {
res = await postOrderPurchaseProcessCreate(params)
}
if(res.code === 1000) {
history.goBack(-1)
history.goBack()
}
setIsDisabled(false)
}
......@@ -46,8 +46,8 @@ const AddRule:React.FC<{}> = (props) => {
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回"/>}
title={pageStatus === PageStatus.PREVIEW ? '查看采购流程规则' : ( pageStatus === PageStatus.EDIT ? '编辑采购流程规则' : '新增采购流程规则' )}
backIcon={<ReutrnEle description={intl.formatMessage({ id: 'processRuleSetting.fanhui', defaultMessage: '返回' })}/>}
title={pageStatus === PageStatus.PREVIEW ? intl.formatMessage({ id: 'processRuleSetting.zhakancaigouliu', defaultMessage: '查看采购流程规则' }) : ( pageStatus === PageStatus.EDIT ? intl.formatMessage({ id: 'processRuleSetting.bianjicaigouliu', defaultMessage: '编辑采购流程规则' }) : intl.formatMessage({ id: 'processRuleSetting.xinzengcaigouliu', defaultMessage: '新增采购流程规则' }) )}
className="addRule"
extra={[
<Button key="1"
......@@ -56,7 +56,7 @@ const AddRule:React.FC<{}> = (props) => {
icon={<SaveOutlined />}
disabled={pageStatus === PageStatus.PREVIEW || isDisabled}
>
保存
{intl.formatMessage({ id: 'processRuleSetting.baocun', defaultMessage: '保存' })}
</Button>,
]}
>
......
......@@ -18,6 +18,7 @@ import Submit from '@/components/NiceForm/components/Submit'
import SelectProcesss from './selectProcesss'
import { getContractManagePageCompleteList } from '@/services/ContractV2Api'
import { getOrderPurchaseProcessContractPage, getOrderPurchaseProcessGet } from '@/services/OrderNewV2Api'
import { useIntl } from 'umi'
export interface RuleSettingProps {
addSchemaAction: ISchemaFormActions,
......@@ -33,6 +34,8 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
const [productsLength, setProductsLength] = useState(0)
const [initValue, setInitialValue] = useState({})
const intl = useIntl()
const {
id,
preview,
......@@ -75,18 +78,18 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
},
{
dataIndex: 'contractNo',
title: '合同编号',
title: intl.formatMessage({ id: 'processRuleSetting.hetongbianhao', defaultMessage: '合同编号' }),
key: 'contractNo',
render: (_, record) => <EyePreview url={`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.contractId}`}>{_}</EyePreview>
},
{
dataIndex: 'digest',
title: '合同摘要',
title: intl.formatMessage({ id: 'processRuleSetting.hetongzhaiyao', defaultMessage: '合同摘要' }),
key: 'digest',
},
{
dataIndex: 'effectTime',
title: '合同生效/失效时间',
title: intl.formatMessage({ id: 'processRuleSetting.hetongshengxiao', defaultMessage: '合同生效/失效时间' }),
key: 'startTime',
render: (t, r) => <>
<div>{t}</div>
......@@ -95,31 +98,31 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
},
{
dataIndex: 'partyB',
title: '合同乙方',
title: intl.formatMessage({ id: 'processRuleSetting.hetongyifang', defaultMessage: '合同乙方' }),
key: 'partyB'
},
{
dataIndex: 'receiptNo',
title: '对应单据',
title: intl.formatMessage({ id: 'processRuleSetting.duiyingdanju', defaultMessage: '对应单据' }),
key: 'receiptNo'
},
{
dataIndex: 'contractType',
title: '寻源类型',
title: intl.formatMessage({ id: 'processRuleSetting.xunyuanleixing', defaultMessage: '寻源类型' }),
key: 'contractType',
render: (text:any, reocrd:any)=>{
if(text===1)
return '采购询价'
return intl.formatMessage({ id: 'processRuleSetting.caigouxunjia', defaultMessage: '采购询价' })
else if(text===2)
return '采购招标'
return intl.formatMessage({ id: 'processRuleSetting.caigouzhaobiao', defaultMessage: '采购招标' })
else if(text===3)
return '采购竞价'
return intl.formatMessage({ id: 'processRuleSetting.caigoujingjia', defaultMessage: '采购竞价' })
},
},
{
dataIndex: 'ctl',
title: '操作',
render: (_, record) => <Button type='link' disabled={pageStatus === PageStatus.PREVIEW} onClick={() => handleDeleteTable(record.contractId)}>删除</Button>
title: intl.formatMessage({ id: 'processRuleSetting.caozuo', defaultMessage: '操作' }),
render: (_, record) => <Button type='link' disabled={pageStatus === PageStatus.PREVIEW} onClick={() => handleDeleteTable(record.contractId)}>{intl.formatMessage({ id: 'processRuleSetting.shanchu', defaultMessage: '删除' })}</Button>
}
]
......@@ -179,17 +182,17 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
},
{
dataIndex: 'contractNo',
title: '合同编号',
title: intl.formatMessage({ id: 'processRuleSetting.hetongbianhao', defaultMessage: '合同编号' }),
key: 'contractNo'
},
{
dataIndex: 'digest',
title: '合同摘要',
title: intl.formatMessage({ id: 'processRuleSetting.hetongzhaiyao', defaultMessage: '合同摘要' }),
key: 'digest'
},
{
dataIndex: 'startTime',
title: '合同生效/失效时间',
title: intl.formatMessage({ id: 'processRuleSetting.hetongshengxiao', defaultMessage: '合同生效/失效时间' }),
key: 'startTime',
render: (t, r) => <>
<div>{formatTimeString(t)}</div>
......@@ -198,25 +201,25 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
},
{
dataIndex: 'partyBName',
title: '合同乙方',
title: intl.formatMessage({ id: 'processRuleSetting.hetongyifang', defaultMessage: '合同乙方' }),
key: 'partyBName'
},
{
dataIndex: 'sourceNo',
title: '对应单据',
title: intl.formatMessage({ id: 'processRuleSetting.duiyingdanju', defaultMessage: '对应单据' }),
key: 'sourceNo'
},
{
dataIndex: 'sourceType',
title: '寻源类型',
title: intl.formatMessage({ id: 'processRuleSetting.xunyuanleixing', defaultMessage: '寻源类型' }),
key: 'sourceType',
render: (text:any, reocrd:any)=>{
if(text===1)
return '采购询价'
return intl.formatMessage({ id: 'processRuleSetting.caigouxunjia', defaultMessage: '采购询价' })
else if(text===2)
return '采购招标'
return intl.formatMessage({ id: 'processRuleSetting.caigouzhaobiao', defaultMessage: '采购招标' })
else if(text===3)
return '采购竞价'
return intl.formatMessage({ id: 'processRuleSetting.caigoujingjia', defaultMessage: '采购竞价' })
},
},
]
......@@ -229,7 +232,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '合同编号',
placeholder: intl.formatMessage({ id: 'processRuleSetting.hetongbianhao', defaultMessage: '合同编号' }),
align: 'flex-left',
},
},
......@@ -251,20 +254,20 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
"contractAbstract": {
type: 'string',
"x-component-props": {
placeholder: '合同摘要'
placeholder: intl.formatMessage({ id: 'processRuleSetting.hetongzhaiyao', defaultMessage: '合同摘要' })
}
},
"partyBName": {
type: 'string',
"x-component-props": {
placeholder: '合同乙方'
placeholder: intl.formatMessage({ id: 'processRuleSetting.hetongyifang', defaultMessage: '合同乙方' })
}
},
"[startTime,endTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['合同生效时间','合同失效时间'],
placeholder: [intl.formatMessage({ id: 'processRuleSetting.hetongshengxiaoshi', defaultMessage: '合同生效时间' }),intl.formatMessage({ id: 'processRuleSetting.hetongshixiaoshi', defaultMessage: '合同失效时间' })],
},
},
submit: {
......@@ -273,7 +276,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
span: 1
},
"x-component-props": {
children: '查询'
children: intl.formatMessage({ id: 'processRuleSetting.chaxun', defaultMessage: '查询' })
}
}
}
......@@ -339,7 +342,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
{/* 选择适用合同 */}
<ModalTable
modalTitle='选择适用合同'
modalTitle={intl.formatMessage({ id: 'processRuleSetting.xuanzeshiyonghe', defaultMessage: '选择适用合同' })}
confirm={handleOkAdd}
cancel={handleCancelAdd}
visible={visibleChannelRroduct}
......
......@@ -5,6 +5,7 @@ import { Row, Col, Tag } from 'antd'
import { CaretUpOutlined, CaretDownOutlined } from '@ant-design/icons'
import cx from 'classnames'
import { getOrderPurchaseProcessBaseList } from '@/services/OrderNewV2Api'
import { useIntl } from 'umi'
const SelectStyles = styled((props) => <div className='select-list' {...props}></div>)`
.select_style_border {
......@@ -43,15 +44,6 @@ enum ProcessTagColor {
'green'
}
enum ProcessTagType {
'订单交易流程',
'售后换货流程',
'售后退货流程',
'售后维修流程',
'加工生产流程',
'直发客户自动二次发货'
}
const SelectProcesss = (props: ISchemaFieldComponentProps) => {
const [formInitValue, setFormInitValue] = useState<any>(null)
const [state, setFieldState] = useFieldState({
......@@ -60,7 +52,7 @@ const SelectProcesss = (props: ISchemaFieldComponentProps) => {
})
const { dataSource, showMore } = state
const { value, mutators, editable } = props
const intl = useIntl()
useEffect(() => {
getOrderPurchaseProcessBaseList().then(res => {
setFieldState({
......@@ -87,7 +79,6 @@ const SelectProcesss = (props: ISchemaFieldComponentProps) => {
const renderProcessType = (v: any) => {
return <Tag color={ProcessTagColor[v.processType - 1]}>
{/* {ProcessTagType[v.processType - 1]} */}
{v.processTypeName}
</Tag>
}
......@@ -113,7 +104,7 @@ const SelectProcesss = (props: ISchemaFieldComponentProps) => {
</SelectStyles>
{dataSource.length > 3 &&
<div onClick={toogleMore} style={{ textAlign: 'center', cursor: 'pointer' }}>
显示更多{showMore ? <CaretDownOutlined /> : <CaretUpOutlined />}
{intl.formatMessage({ id: 'processRuleSetting.xianshigengduo', defaultMessage: '显示更多' })}{showMore ? <CaretDownOutlined /> : <CaretUpOutlined />}
</div>
}
</div>
......
import React, { ReactNode, useRef } from 'react'
import { history } from 'umi'
import { history, useIntl } from 'umi'
import { Button, Popconfirm, Card, Space } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
......@@ -19,7 +19,7 @@ const formActions = createFormActions();
const PurchaseRules: React.FC<{}> = () => {
const ref = useRef<any>({})
const intl = useIntl()
const fetchData = (params: any) => {
if(!params?.name) delete params.name
return new Promise((resolve, reject) => {
......@@ -32,12 +32,12 @@ const PurchaseRules: React.FC<{}> = () => {
const columns: ColumnType<any>[] = [
{
title: '流程规则ID',
title: intl.formatMessage({ id: 'processRuleSetting.liuchengguizeID', defaultMessage: '流程规则ID' }),
dataIndex: 'processId',
key: 'processId',
},
{
title: '流程规则名称',
title: intl.formatMessage({ id: 'processRuleSetting.liuchengguizeming', defaultMessage: '流程规则名称' }),
dataIndex: 'name',
key: 'name',
className: 'commonPickColor',
......@@ -48,35 +48,35 @@ const PurchaseRules: React.FC<{}> = () => {
</EyePreview>
},
{
title: '操作时间',
title: intl.formatMessage({ id: 'processRuleSetting.caozuoshijian', defaultMessage: '操作时间' }),
dataIndex: 'createTime',
key: 'createTime',
render: (text: any, record: any) => text && moment(text).format('YYYY-MM-DD HH:mm:ss')
},
{
title: '状态',
title: intl.formatMessage({ id: 'processRuleSetting.zhuangtai', defaultMessage: '状态' }),
dataIndex: 'status',
key: 'status',
render: (text: any, record: any) => {
let component: ReactNode = null
component = (
<Popconfirm
title="确定要执行这个操作?"
title={intl.formatMessage({ id: 'processRuleSetting.quedingyaozhixing', defaultMessage: '确定要执行这个操作?' })}
onConfirm={() => confirm(record)}
onCancel={cancel}
okText="是"
cancelText="否"
okText={intl.formatMessage({ id: 'processRuleSetting.shi', defaultMessage: '是' })}
cancelText={intl.formatMessage({ id: 'processRuleSetting.fou', defaultMessage: '否' })}
>
<Button
type="link"
style={record.status ? { color: '#00B37A' } : { color: 'red' }}>{record.status ? <>有效 <PlayCircleOutlined /></> : <>无效 <PauseCircleOutlined /></>}</Button>
style={record.status ? { color: '#00B37A' } : { color: 'red' }}>{record.status ? <>{intl.formatMessage({ id: 'processRuleSetting.youxiao', defaultMessage: '有效' })} <PlayCircleOutlined /></> : <>{intl.formatMessage({ id: 'processRuleSetting.wuxiao', defaultMessage: '无效' })} <PauseCircleOutlined /></>}</Button>
</Popconfirm>
)
return component
}
},
{
title: '操作',
title: intl.formatMessage({ id: 'processRuleSetting.caozuo', defaultMessage: '操作' }),
dataIndex: 'option',
render: (text: any, record: any) => {
return (
......@@ -84,15 +84,15 @@ const PurchaseRules: React.FC<{}> = () => {
{
(record.status === 0) ? <>
<Popconfirm
title="确定要执行这个操作?"
title={intl.formatMessage({ id: 'processRuleSetting.quedingyaozhixing', defaultMessage: '确定要执行这个操作' })}
onConfirm={() => handelDelete(record)}
onCancel={cancel}
okText="是"
cancelText="否"
okText={intl.formatMessage({ id: 'processRuleSetting.shi', defaultMessage: '是' })}
cancelText={intl.formatMessage({ id: 'processRuleSetting.fou', defaultMessage: '否' })}
>
<Button type='link'>删除</Button>
<Button type='link'>{intl.formatMessage({ id: 'processRuleSetting.shanchu', defaultMessage: '删除' })}</Button>
</Popconfirm>
<Button type='link' onClick={()=>history.push(`/memberCenter/tranactionAbility/purchaseRules/add?id=${record.processId}`)}>修改</Button>
<Button type='link' onClick={()=>history.push(`/memberCenter/tranactionAbility/purchaseRules/add?id=${record.processId}`)}>{intl.formatMessage({ id: 'processRuleSetting.xiugai', defaultMessage: '修改' })}</Button>
</> : ''
}
</>
......@@ -121,7 +121,7 @@ const PurchaseRules: React.FC<{}> = () => {
const Actions = (
<Space>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push('/memberCenter/tranactionAbility/purchaseRules/add')}>
新建
{intl.formatMessage({ id: 'processRuleSetting.xinjian', defaultMessage: '新建' })}
</Button>
</Space>
);
......@@ -167,7 +167,7 @@ const PurchaseRules: React.FC<{}> = () => {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '规则名称',
placeholder: intl.formatMessage({ id: 'processRuleSetting.guizemingcheng', defaultMessage: '规则名称' }),
advanced: false,
// tip: '输入 单据名称 进行搜索',
},
......
import React from 'react'
import { ISchema } from '@formily/antd';
import { padRequiredMessage } from '@/utils';
import { getIntl } from 'umi'
// 新增规则
export const ruleDetailSchema: ISchema = padRequiredMessage({
......@@ -18,7 +18,7 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
"type": "object",
"x-component": "tabpane",
"x-component-props": {
"tab": "基本信息"
"tab": getIntl().formatMessage({ id: 'processRuleSetting.jibenxinxi', defaultMessage: '基本信息' })
},
"properties": {
MEGA_LAYOUT1: {
......@@ -33,9 +33,9 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
properties: {
"name": {
type: 'string',
title: '规则名称',
title: getIntl().formatMessage({ id: 'processRuleSetting.guizemingcheng', defaultMessage: '规则名称' }),
"x-component-props": {
placeholder: '请输入规则名称'
placeholder: getIntl().formatMessage({ id: 'processRuleSetting.qingshuruguize', defaultMessage: '请输入规则名称' })
},
"x-rules": [
{
......@@ -49,7 +49,7 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
},
"baseProcessId": {
type: 'string',
title: '流程选择',
title: getIntl().formatMessage({ id: 'processRuleSetting.liuchengxuanze', defaultMessage: '流程选择' }),
"x-component": 'SelectProcesss',
"x-mega-props": {
style: {
......@@ -62,13 +62,13 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
"x-rules": [
{
required: true,
message: '请选择流程配置'
message: getIntl().formatMessage({ id: 'processRuleSetting.qingxuanzeliucheng', defaultMessage: '请选择流程配置' })
}
],
},
"type": {
type: 'number',
title: '流程类型',
title: getIntl().formatMessage({ id: 'processRuleSetting.liuchengleixing', defaultMessage: '流程类型' }),
visible: false,
},
}
......@@ -79,7 +79,7 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
type: 'object',
"x-component": 'tabpane',
"x-component-props": {
"tab": "适用合同"
"tab": getIntl().formatMessage({ id: 'processRuleSetting.shiyonghetong', defaultMessage: '适用合同' })
},
properties: {
MEGA_LAYOUT3: {
......@@ -93,10 +93,10 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
"allContracts": {
"type": "radio",
enum: [
{ label: '所有合同(默认)', value: true },
{ label: '指定合同', value: false },
{ label: getIntl().formatMessage({ id: 'processRuleSetting.suoyouhetong', defaultMessage: '所有合同(默认)' }), value: true },
{ label: getIntl().formatMessage({ id: 'processRuleSetting.zhidinghetong', defaultMessage: '指定合同' }), value: false },
],
"title": "适用合同",
"title": getIntl().formatMessage({ id: 'processRuleSetting.shiyonghetong', defaultMessage: '适用合同' }),
default: true,
required: true,
"x-linkages": [
......
import React, {useState} from 'react'
import { history } from 'umi'
import { history, useIntl } from 'umi'
import { Button, Card, message } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
......@@ -16,9 +16,9 @@ import { postOrderTradeProcessCreate, postOrderTradeProcessUpdate } from '@/serv
const addSchemaAction = createFormActions()
const AddRule:React.FC<{}> = (props) => {
const AddRule:React.FC<{}> = () => {
const [isDisabled, setIsDisabled] = useState<boolean>(false)
const intl = useIntl()
const {
pageStatus
} = usePageStatus()
......@@ -59,7 +59,7 @@ const AddRule:React.FC<{}> = (props) => {
const possess = params.payments.reduce((a, b) => a.concat(b['nodes']), [])
if(possess.reduce((a, b) => a + b.payRate, 0) !== 100) {
setIsDisabled(false)
return message.error('支付比例之和100')
return message.error(intl.formatMessage({ id: 'processRuleSetting.zhifubilizhi', defaultMessage: '支付比例之和100' }))
}
}
......@@ -78,7 +78,7 @@ const AddRule:React.FC<{}> = (props) => {
res = await postOrderTradeProcessCreate(_params)
}
if(res.code === 1000){
history.goBack(-1)
history.goBack()
}
setIsDisabled(false)
}
......@@ -86,8 +86,8 @@ const AddRule:React.FC<{}> = (props) => {
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回"/>}
title={pageStatus === PageStatus.PREVIEW ? '查看交易规则' : ( pageStatus === PageStatus.EDIT ? '编辑交易规则' : '新增交易规则' )}
backIcon={<ReutrnEle description={intl.formatMessage({ id: 'processRuleSetting.fanhui', defaultMessage: '返回' })}/>}
title={pageStatus === PageStatus.PREVIEW ? intl.formatMessage({ id: 'processRuleSetting.zhakanjiaoyigui', defaultMessage: '查看交易规则' }) : ( pageStatus === PageStatus.EDIT ? intl.formatMessage({ id: 'processRuleSetting.bianjijiaoyigui', defaultMessage: '编辑交易规则' }) : intl.formatMessage({ id: 'processRuleSetting.xinzengjiaoyigui', defaultMessage: '新增交易规则' }) )}
className="addRule"
extra={[
<Button key="1"
......@@ -96,7 +96,7 @@ const AddRule:React.FC<{}> = (props) => {
icon={<SaveOutlined />}
disabled={pageStatus === PageStatus.PREVIEW || isDisabled}
>
保存
{intl.formatMessage({ id: 'processRuleSetting.baocun', defaultMessage: '保存' })}
</Button>,
]}
>
......
import React, { useRef, useContext, useState } from 'react'
import React, { useRef, useContext } from 'react'
import { Form, Input } from 'antd';
import './index.less'
import { validatorByte } from '@/utils/regExp';
import { useIntl } from 'umi';
export interface PaymentTableCellProps {
title: React.ReactNode;
......@@ -48,7 +49,7 @@ export const PaymentTableCell:React.FC<PaymentTableCellProps> = ({
}) => {
const formItemRef = useRef<any>();
const { form } = useContext(EditableContext);
const intl = useIntl()
const save = async e => {
try {
const values = await form.validateFields();
......@@ -86,13 +87,13 @@ export const PaymentTableCell:React.FC<PaymentTableCellProps> = ({
rules={[
{
required: true,
message: `${title}必须填写`,
message: `${title}${intl.formatMessage({ id: 'processRuleSetting.bixutianxie', defaultMessage: '必须填写' })}`,
},
dataIndex === 'payNode' ? {
validator: (r, v, c) => validatorByte(r, v, c, 24)
} : {
pattern: /^\d+(\.\d{1,2})?$/,
message: `支付比例仅限两位小数`,
message: intl.formatMessage({ id: 'processRuleSetting.zhifubilijin', defaultMessage: '支付比例仅限两位小数' }),
},
]}
>
......
......@@ -21,6 +21,7 @@ import { help } from '../../common'
import { fectchShopListsSource } from '@/utils/type'
import { getProductCommodityCommonGetCommodityListBySeller, getProductSelectGetSelectBrand, getProductSelectGetSelectCustomerCategory } from '@/services/ProductV2Api'
import { getOrderTradeProcessGet, getOrderTradeProcessProductPage } from '@/services/OrderNewV2Api'
import { useIntl } from 'umi'
export interface RuleSettingProps {
addSchemaAction: ISchemaFormActions,
......@@ -36,7 +37,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
const [productsLength, setProductsLength] = useState(0)
const [initValue, setInitialValue] = useState({})
// const [idNotInList, setIdNotInList] = useState([])
const intl = useIntl()
const {
id,
pageStatus
......@@ -59,7 +60,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
})
return res.data
}else{
message.error('请先选择适用商城!')
message.error(intl.formatMessage({ id: 'processRuleSetting.qingxianxuanzeshi', defaultMessage: '请先选择适用商城!' }))
return []
}
}
......@@ -78,7 +79,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
}
// 新增商品
const tableAddButton = <Button style={{marginBottom: 16}} block icon={<PlusOutlined/>} disabled={pageStatus === PageStatus.PREVIEW} onClick={handleAddProductBtn} type='dashed'>选择指定商品</Button>
const tableAddButton = <Button style={{marginBottom: 16}} block icon={<PlusOutlined/>} disabled={pageStatus === PageStatus.PREVIEW} onClick={handleAddProductBtn} type='dashed'>{intl.formatMessage({ id: 'processRuleSetting.xuanzezhidingshang', defaultMessage: '选择指定商品' })}</Button>
const tableColumns = [
{
......@@ -88,37 +89,37 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
},
{
dataIndex: 'name',
title: '商品名称',
title: intl.formatMessage({ id: 'processRuleSetting.shangpinmingcheng', defaultMessage: '商品名称' }),
key: 'name',
render: (_, record) => <EyePreview url={`/memberCenter/commodityAbility/commodity/products/detail?id=${record.commodityId}`}>{_}</EyePreview>
},
{
dataIndex: 'customerCategoryName',
title: '品类',
title: intl.formatMessage({ id: 'processRuleSetting.pinlei', defaultMessage: '品类' }),
key: 'customerCategoryName'
},
{
dataIndex: 'brandName',
title: '品牌',
title: intl.formatMessage({ id: 'processRuleSetting.pinpai', defaultMessage: '品牌' }),
key: 'brandName'
},
{
dataIndex: 'priceType',
title: '商品定价',
title: intl.formatMessage({ id: 'processRuleSetting.shangpindingjia', defaultMessage: '商品定价' }),
key: 'priceType',
render: (text)=>{
if(text===1)
return '现货价格'
return intl.formatMessage({ id: 'processRuleSetting.xianhuojiage', defaultMessage: '现货价格' })
else if(text===2)
return '价格需要询价'
return intl.formatMessage({ id: 'processRuleSetting.jiagexuyaoxun', defaultMessage: '价格需要询价' })
else if(text===3)
return '积分兑换商品'
return intl.formatMessage({ id: 'processRuleSetting.jifenduihuanshang', defaultMessage: '积分兑换商品' })
},
},
{
dataIndex: 'ctl',
title: '操作',
render: (_, record) => <Button type='link' disabled={pageStatus === PageStatus.PREVIEW} onClick={() => handleDeleteTable(record.id)}>删除</Button>
title: intl.formatMessage({ id: 'processRuleSetting.caozuo', defaultMessage: '操作' }),
render: (_, record) => <Button type='link' disabled={pageStatus === PageStatus.PREVIEW} onClick={() => handleDeleteTable(record.id)}>{intl.formatMessage({ id: 'processRuleSetting.shanchu', defaultMessage: '删除' })}</Button>
}
]
......@@ -154,30 +155,30 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
},
{
dataIndex: 'name',
title: '商品名称',
title: intl.formatMessage({ id: 'processRuleSetting.shangpinmingcheng', defaultMessage: '商品名称' }),
key: 'name'
},
{
dataIndex: 'customerCategoryName',
title: '品类',
title: intl.formatMessage({ id: 'processRuleSetting.pinlei', defaultMessage: '品类' }),
key: 'customerCategoryName'
},
{
dataIndex: 'brandName',
title: '品牌',
title: intl.formatMessage({ id: 'processRuleSetting.pinpai', defaultMessage: '品牌' }),
key: 'brandName'
},
{
dataIndex: 'priceType',
title: '商品定价',
title: intl.formatMessage({ id: 'processRuleSetting.shangpindingjia', defaultMessage: '商品定价' }),
key: 'priceType',
render: (text)=>{
if(text===1)
return '现货价格'
return intl.formatMessage({ id: 'processRuleSetting.xianhuojiage', defaultMessage: '现货价格' })
else if(text===2)
return '价格需要询价'
return intl.formatMessage({ id: 'processRuleSetting.jiagexuyaoxun', defaultMessage: '价格需要询价' })
else if(text===3)
return '积分兑换商品'
return intl.formatMessage({ id: 'processRuleSetting.jifenduihuanshang', defaultMessage: '积分兑换商品' })
},
},
]
......@@ -190,7 +191,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '请输入商品名称',
placeholder: intl.formatMessage({ id: 'processRuleSetting.qingshurushangpin', defaultMessage: '请输入商品名称' }),
align: 'flex-left',
},
},
......@@ -213,7 +214,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
type: 'string',
"x-component": 'SearchSelect',
"x-component-props": {
placeholder: '请选择品类',
placeholder: intl.formatMessage({ id: 'processRuleSetting.qingxuanzepinlei', defaultMessage: '请选择品类' }),
className: 'fixed-ant-selected-down',
fetchSearch: getProductSelectGetSelectCustomerCategory,
style: {
......@@ -225,7 +226,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
type: 'string',
"x-component": 'SearchSelect',
"x-component-props": {
placeholder: '请选择品牌',
placeholder: intl.formatMessage({ id: 'processRuleSetting.qingxuanzepinpai', defaultMessage: '请选择品牌' }),
fetchSearch: getProductSelectGetSelectBrand,
style: {
width: 160
......@@ -238,7 +239,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
span: 1
},
"x-component-props": {
children: '查询'
children: intl.formatMessage({ id: 'processRuleSetting.chaxun', defaultMessage: '查询' })
}
}
}
......@@ -282,7 +283,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
})
}
if(pageStatus === PageStatus.PREVIEW) {
data.expireHours = data.expireHours + '小时'
data.expireHours = data.expireHours + intl.formatMessage({ id: 'processRuleSetting.xiaoshi', defaultMessage: '小时' })
}
if(data.hasContract) {
data.contractId = data.contract.contractId
......@@ -334,7 +335,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
value?.length
?
value.map(item => <div key={`out_${item.serialNo}`}>
<p>{`支付批次:${item.serialNo}`}</p>
<p>{`${intl.formatMessage({ id: 'processRuleSetting.zhifupici:', defaultMessage: '支付批次:' })}${item.serialNo}`}</p>
<Table
components={paymentComponents}
dataSource={item.nodes}
......@@ -464,7 +465,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
{/* 选择商品 */}
<ModalTable
modalTitle='选择商品'
modalTitle={intl.formatMessage({ id: 'processRuleSetting.xuanzeshangpin', defaultMessage: '选择商品' })}
confirm={handleOkAddProduct}
cancel={handleCancelAddProduct}
visible={visibleChannelRroduct}
......
......@@ -5,6 +5,7 @@ import { Row, Col, Tag } from 'antd'
import { CaretUpOutlined, CaretDownOutlined } from '@ant-design/icons'
import cx from 'classnames'
import { getOrderTradeProcessBaseList } from '@/services/OrderNewV2Api'
import { useIntl } from 'umi'
const SelectStyles = styled((props) => <div className='select-list' {...props}></div>)`
.select_style_border {
......@@ -43,15 +44,6 @@ enum ProcessTagColor {
'green'
}
enum ProcessTagType {
'订单交易流程',
'售后换货流程',
'售后退货流程',
'售后维修流程',
'加工生产流程',
'直发客户自动二次发货'
}
const SelectProcesss = (props: ISchemaFieldComponentProps) => {
const [formInitValue, setFormInitValue] = useState<any>(null)
const [state, setFieldState] = useFieldState({
......@@ -60,7 +52,7 @@ const SelectProcesss = (props: ISchemaFieldComponentProps) => {
})
const { dataSource, showMore } = state
const { value, mutators, editable } = props
const intl = useIntl()
useEffect(() => {
getOrderTradeProcessBaseList().then(res => {
setFieldState({
......@@ -86,8 +78,9 @@ const SelectProcesss = (props: ISchemaFieldComponentProps) => {
}
const renderProcessType = (v: any) => {
console.log(v)
return <Tag color={ProcessTagColor[v.processType - 1]}>
{ProcessTagType[v.processType - 1]}
{v["processTypeName"]}
</Tag>
}
......@@ -112,7 +105,7 @@ const SelectProcesss = (props: ISchemaFieldComponentProps) => {
</SelectStyles>
{dataSource.length > 3 &&
<div onClick={toogleMore} style={{ textAlign: 'center', cursor: 'pointer' }}>
显示更多{showMore ? <CaretDownOutlined /> : <CaretUpOutlined />}
{intl.formatMessage({ id: 'processRuleSetting.xianshigengduo', defaultMessage: '显示更多' })}{showMore ? <CaretDownOutlined /> : <CaretUpOutlined />}
</div>
}
</div>
......
import React, { ReactNode, useRef } from 'react'
import { history } from 'umi'
import { history, useIntl } from 'umi'
import { Button, Popconfirm, Card, Space } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
......@@ -19,7 +19,7 @@ const formActions = createFormActions();
const TransactionRules: React.FC<{}> = () => {
const ref = useRef<any>({})
const intl = useIntl()
const fetchData = (params: any) => {
if(!params?.name) delete params.name
return new Promise((resolve) => {
......@@ -32,12 +32,12 @@ const TransactionRules: React.FC<{}> = () => {
const columns: ColumnType<any>[] = [
{
title: '交易规则ID',
title: intl.formatMessage({ id: 'processRuleSetting.jiaoyiguizeID', defaultMessage: '交易规则ID' }),
dataIndex: 'processId',
key: 'processId',
},
{
title: '流程规则名称',
title: intl.formatMessage({ id: 'processRuleSetting.liuchengguizeming', defaultMessage: '流程规则名称' }),
dataIndex: 'name',
key: 'name',
className: 'commonPickColor',
......@@ -48,39 +48,39 @@ const TransactionRules: React.FC<{}> = () => {
</EyePreview>
},
{
title: '交易流程名称',
title: intl.formatMessage({ id: 'processRuleSetting.jiaoyiliuchengming', defaultMessage: '交易流程名称' }),
dataIndex: 'processName',
key: 'processName',
},
{
title: '操作时间',
title: intl.formatMessage({ id: 'processRuleSetting.caozuoshijian', defaultMessage: '操作时间' }),
dataIndex: 'createTime',
key: 'createTime',
render: (text) => text && moment(text).format('YYYY-MM-DD HH:mm:ss')
},
{
title: '状态',
title: intl.formatMessage({ id: 'processRuleSetting.zhuangtai', defaultMessage: '状态' }),
dataIndex: 'status',
key: 'status',
render: (text: any, record: any) => {
let component: ReactNode = null
component = (
<Popconfirm
title="确定要执行这个操作?"
title={intl.formatMessage({ id: 'processRuleSetting.quedingyaozhixing', defaultMessage: '确定要执行这个操作' })}
onConfirm={() => confirm(record)}
okText="是"
cancelText="否"
okText={intl.formatMessage({ id: 'processRuleSetting.shi', defaultMessage: '是' })}
cancelText={intl.formatMessage({ id: 'processRuleSetting.fou', defaultMessage: '否' })}
>
<Button
type="link"
style={record.status ? { color: '#00B37A' } : { color: 'red' }}>{record.status ? <>有效 <PlayCircleOutlined /></> : <>无效 <PauseCircleOutlined /></>}</Button>
style={record.status ? { color: '#00B37A' } : { color: 'red' }}>{record.status ? <>{intl.formatMessage({ id: 'processRuleSetting.youxiao', defaultMessage: '有效' })} <PlayCircleOutlined /></> : <>{intl.formatMessage({ id: 'processRuleSetting.wuxiao', defaultMessage: '无效' })} <PauseCircleOutlined /></>}</Button>
</Popconfirm>
)
return component
}
},
{
title: '操作',
title: intl.formatMessage({ id: 'processRuleSetting.caozuo', defaultMessage: '操作' }),
dataIndex: 'option',
render: (text: any, record: any) => {
return (
......@@ -88,14 +88,14 @@ const TransactionRules: React.FC<{}> = () => {
{
(record.status === 0) ? <>
<Popconfirm
title="确定要执行这个操作?"
title={intl.formatMessage({ id: 'processRuleSetting.quedingyaozhixing', defaultMessage: '确定要执行这个操作?' })}
onConfirm={() => handelDelete(record)}
okText="是"
cancelText="否"
okText={intl.formatMessage({ id: 'processRuleSetting.shi', defaultMessage: '是' })}
cancelText={intl.formatMessage({ id: 'processRuleSetting.fou', defaultMessage: '否' })}
>
<Button type='link'>删除</Button>
<Button type='link'>{intl.formatMessage({ id: 'processRuleSetting.shanchu', defaultMessage: '删除' })}</Button>
</Popconfirm>
<Button type='link' onClick={()=>history.push(`/memberCenter/tranactionAbility/transactionRules/add?id=${record.processId}`)}>修改</Button>
<Button type='link' onClick={()=>history.push(`/memberCenter/tranactionAbility/transactionRules/add?id=${record.processId}`)}>{intl.formatMessage({ id: 'processRuleSetting.xiugai', defaultMessage: '修改' })}</Button>
</> : ''
}
</>
......@@ -120,7 +120,7 @@ const TransactionRules: React.FC<{}> = () => {
const Actions = (
<Space>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push('/memberCenter/tranactionAbility/transactionRules/add')}>
新建
{intl.formatMessage({ id: 'processRuleSetting.xinjian', defaultMessage: '新建' })}
</Button>
</Space>
);
......@@ -163,7 +163,7 @@ const TransactionRules: React.FC<{}> = () => {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '规则名称',
placeholder: intl.formatMessage({ id: 'processRuleSetting.guizemingcheng', defaultMessage: '规则名称' }),
advanced: false,
// tip: '输入 单据名称 进行搜索',
},
......
......@@ -2,17 +2,18 @@ import React from 'react'
import { ISchemaFormActions, ISchemaFormAsyncActions } from '@formily/antd';
import PaymentTableCell, { PaymentEditableRow } from '../components/paymentTableCell';
import style from '../index.less'
import { getIntl } from 'umi'
// 支付配置
const paymentColumns = [
{
dataIndex: 'batchNo',
title: '支付次数',
title: getIntl().formatMessage({ id: 'processRuleSetting.zhifucishu', defaultMessage: '支付次数' }),
key: 'batchNo'
},
{
dataIndex: 'payNode',
title: '支付环节',
title: getIntl().formatMessage({ id: 'processRuleSetting.zhifuhuanjie', defaultMessage: '支付环节' }),
key: 'payNode',
formItem: 'input',
editable: true,
......@@ -20,7 +21,7 @@ const paymentColumns = [
},
{
dataIndex: 'payRate',
title: '支付比例',
title: getIntl().formatMessage({ id: 'processRuleSetting.zhifubili', defaultMessage: '支付比例' }),
key: 'payRate',
formItem: 'input',
editable: true,
......
import React from 'react'
import { ISchema } from '@formily/antd';
import { GlobalConfig } from '@/global/config';
import { padRequiredMessage } from '@/utils';
import { getIntl } from 'umi'
// 新增规则
export const ruleDetailSchema: ISchema = padRequiredMessage({
......@@ -19,7 +17,7 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
"type": "object",
"x-component": "tabpane",
"x-component-props": {
"tab": "基本信息"
"tab": getIntl().formatMessage({ id: 'processRuleSetting.jibenxinxi', defaultMessage: '基本信息' })
},
"properties": {
MEGA_LAYOUT1: {
......@@ -34,9 +32,9 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
properties: {
"name": {
type: 'string',
title: '规则名称',
title: getIntl().formatMessage({ id: 'processRuleSetting.guizemingcheng', defaultMessage: '规则名称' }),
"x-component-props": {
placeholder: '请输入规则名称'
placeholder: getIntl().formatMessage({ id: 'processRuleSetting.qingshuruguize', defaultMessage: '请输入规则名称' })
},
"x-rules": [
{
......@@ -50,7 +48,7 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
},
"baseProcessId": {
type: 'string',
title: '流程选择',
title: getIntl().formatMessage({ id: 'processRuleSetting.liuchengxuanze', defaultMessage: '流程选择' }),
"x-component": 'SelectProcesss',
"x-mega-props": {
style: {
......@@ -63,23 +61,23 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
"x-rules": [
{
required: true,
message: '请选择流程配置'
message: getIntl().formatMessage({ id: 'processRuleSetting.qingxuanzeliucheng', defaultMessage: '请选择流程配置' })
}
],
},
"expireHours": {
type: 'string',
title: "{{help('订单取消时间', '单后超过多少小时未支付后自动取消订单')}}",
title: `{{help(${getIntl().formatMessage({ id: 'processRuleSetting.dingdanquxiaoshi', defaultMessage: '订单取消时间' })}, ${getIntl().formatMessage({ id: 'processRuleSetting.danhouchaoguoduo', defaultMessage: '单后超过多少小时未支付后自动取消订单' })})}}`,
"x-component-props": {
placeholder: "请填写订单取消时间",
placeholder: getIntl().formatMessage({ id: 'processRuleSetting.qingtianxiedingdan', defaultMessage: '请填写订单取消时间' }),
style: { width: '100%' },
suffix: '小时'
suffix: getIntl().formatMessage({ id: 'processRuleSetting.xiaoshi', defaultMessage: '小时' })
},
visible: false,
'x-rules': [
{
pattern: /^\d+(\.\d{1})?$/,
message: '数值仅限一位小数',
message: getIntl().formatMessage({ id: 'processRuleSetting.shuzhijinxianyi', defaultMessage: '数值仅限一位小数' }),
}
],
},
......@@ -87,14 +85,14 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
label: '电子合同',
label: getIntl().formatMessage({ id: 'processRuleSetting.dianzihetong', defaultMessage: '电子合同' }),
wrapperCol: 24,
},
properties: {
"hasContract": {
type: 'string',
"x-component-props": {
children: "使用电子合同"
children: getIntl().formatMessage({ id: 'processRuleSetting.shiyongdianzihe', defaultMessage: '使用电子合同' })
},
"x-component": "checkboxsingle",
default: false,
......@@ -111,7 +109,7 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
required: true,
enum: [],
"x-component-props": {
placeholder: '请选择电子合同模板'
placeholder: getIntl().formatMessage({ id: 'processRuleSetting.qingxuanzedianzi', defaultMessage: '请选择电子合同模板' })
},
visible: false
}
......@@ -120,7 +118,7 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
// 处理成多个表格
"payments": {
type: 'array',
title: '支付配置',
title: getIntl().formatMessage({ id: 'processRuleSetting.zhifupeizhi', defaultMessage: '支付配置' }),
'x-component': 'CustomPayments',
visible: false,
},
......@@ -138,7 +136,7 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
// },
"processType": {
type: 'number',
title: '流程类型',
title: getIntl().formatMessage({ id: 'processRuleSetting.liuchengleixing', defaultMessage: '流程类型' }),
visible: false
}
}
......@@ -149,7 +147,7 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
"type": "object",
"x-component": "tabpane",
"x-component-props": {
"tab": "适用商城"
"tab": getIntl().formatMessage({ id: 'processRuleSetting.shiyongshangcheng', defaultMessage: '适用商城' })
},
"properties": {
MEGA_LAYOUT2: {
......@@ -167,7 +165,7 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
dataSource: [],
type: 'radio' // CardCheckBox 单选模式
},
"title": "适用商城",
"title": getIntl().formatMessage({ id: 'processRuleSetting.shiyongshangcheng', defaultMessage: '适用商城' }),
required: true,
}
}
......@@ -178,7 +176,7 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
type: 'object',
"x-component": 'tabpane',
"x-component-props": {
"tab": "适用商品"
"tab": getIntl().formatMessage({ id: 'processRuleSetting.shiyongshangpin', defaultMessage: '适用商品' })
},
properties: {
MEGA_LAYOUT3: {
......@@ -192,10 +190,10 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
"allProducts": {
"type": "radio",
enum: [
{ label: '所有商品(默认)', value: true },
{ label: '指定商品', value: false },
{ label: getIntl().formatMessage({ id: 'processRuleSetting.suoyoushangpin', defaultMessage: '所有商品(默认)' }), value: true },
{ label: getIntl().formatMessage({ id: 'processRuleSetting.zhidingshangpin', defaultMessage: '指定商品' }), value: false },
],
"title": "适用商品",
"title": getIntl().formatMessage({ id: 'processRuleSetting.shiyongshangpin', defaultMessage: '适用商品' }),
default: true,
required: true,
"x-linkages": [
......
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