Commit 8513e100 authored by 前端-许冠华's avatar 前端-许冠华

Merge branch '0518' into 'jinfa-0518'

fix: 修改请购单bug See merge request project/jinfa-platform!31
parents 5917406a 57ca3694
......@@ -610,7 +610,7 @@ export default {
'purchaseRequisition.zaicishuruni': '在此输入你的原因, 最多50个汉字',
'purchaseRequisition.qingshuruquxiao': '请输入取消原因',
'purchaseRequisition.zhongzhiyuanyin': '中止原因',
'purchaseRequisition.shenhe': '提交',
'purchaseRequisition.shenhe': '审核',
'purchaseRequisition.tijiaoshenhe': '单据审核',
'purchaseRequisition.xinjian': '新建',
'purchaseRequisition.shifouzhixingshan': '是否执行删除操作?',
......
......@@ -67,7 +67,7 @@ export const useSelfTable = () => {
width: 192,
},
{
title: '预日期',
title: '预日期',
align: 'center',
dataIndex: 'advanceDeliveryDate',
key: 'advanceDeliveryDate',
......
......@@ -158,7 +158,7 @@ const EditSalesman: React.FC<MemberModalTableProps> = (props) => {
{
required: true,
validator: (_rule, value) => {
const pattern = /^[1-9]\d*$/;
const pattern = /^(([1-9][0-9]*)|(([0]\.\d{1,3}|[1-9][0-9]*\.\d{1,3})))$/;
let totalPrice = 0
const requisitionSalesManReqs = form.getFieldValue(`requisitionSalesManReqs`);
requisitionSalesManReqs.forEach(_item => {
......@@ -166,7 +166,7 @@ const EditSalesman: React.FC<MemberModalTableProps> = (props) => {
})
console.log(totalPrice, 'totalPrice')
if (!pattern.test(value)) {
return Promise.reject(new Error('采购数量必须大于0'))
return Promise.reject(new Error('采购数量必须大于0,仅限三位小数'))
}
if (totalPrice > (Number(record?.quantity) || 0)) {
return Promise.reject(new Error('业务员采购数量不可超过请购单采购数量!'))
......
......@@ -243,7 +243,7 @@ const MaterialModalTable: React.FC<MaterialModalTableProps> = (props) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'code',
'materialsTrademark',
FORM_FILTER_PATH,
);
}
......
......@@ -146,7 +146,13 @@ const basicInfo: ISchema = {
currency: {
type: 'string',
title: '币别',
enum: []
enum: [],
"x-rules": [
{
required: true,
message: '请选择业务币别'
},
],
},
//400华中区,401华东区,402华南区,403华西区,404华北区,404EC区
......@@ -235,16 +241,12 @@ const delivery: ISchema = {
type: 'string',
title: "配送方式",
enum: [],
// "x-rules": [
// {
// required: true,
// message: getIntl().formatMessage({ id: 'purchaseRequisition.qingshuruqinggou', defaultMessage: '请输入配送方式' })
// },
// {
// limitByte: true,
// maxByte: 100
// }
// ],
"x-rules": [
{
required: true,
message:'请选择配送方式'
},
],
"x-mega-props": {
span: 1
}
......
......@@ -47,11 +47,11 @@ import { getIntl } from 'umi';
"x-component": 'Checkbox',
title:'只查看供应商可供应物料',
},
code: {
materialsTrademark: {
type: 'string',
'x-component': 'SearchFilter',
'x-component-props': {
placeholder: getIntl().formatMessage({ id: 'purchaseRequisition.qingshuruhuohao', defaultMessage: '请输入物料编号' }),
placeholder: '请输入物料牌号',
},
},
}
......@@ -63,7 +63,7 @@ import { getIntl } from 'umi';
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'wrap',
flexWrap: 'nowrap',
width: '100%',
justifyContent: 'flex-end',
style: {
......@@ -75,6 +75,12 @@ import { getIntl } from 'umi';
},
},
properties: {
code: {
type: 'string',
'x-component-props': {
placeholder: getIntl().formatMessage({ id: 'purchaseRequisition.qingshuruhuohao', defaultMessage: '请输入物料编号' }),
},
},
name: {
type: 'string',
'x-component-props': {
......
......@@ -21,12 +21,12 @@ export const useSelfTable = () => {
/** 参照后台数据生成 */
const renderOptionButton = (record: any) => {
const btnAuthOfOperationTextMap = {
'提交': 'readySubmitBill.shenhe',
'提交': 'saleOrder.tijiao',
}
const buttonGroup = { [intl.formatMessage({ id: 'purchaseRequisition.shenhe', defaultMessage: '提交' })]: true }
const buttonGroup = { [intl.formatMessage({ id: 'saleOrder.tijiao', defaultMessage: '提交' })]: true }
const operationHandler = {
[intl.formatMessage({ id: 'purchaseRequisition.shenhe', defaultMessage: '提交' })]: () => handleSubmit(record.id),
[intl.formatMessage({ id: 'saleOrder.tijiao', defaultMessage: '提交' })]: () => handleSubmit(record.id),
}
return (
......
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