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