Commit f8a6031b authored by 何洋's avatar 何洋

fix: 采购订单bug

parent 557494f6
......@@ -43,7 +43,7 @@ const config: any = {
// layout: {},
esbuild: {},
// 打开msfu会导致样式异常, 无法获得正常的样式变量
// mfsu: {},
mfsu: {},
antd: {},
locale: {
default: 'zh-CN',
......
......@@ -72,6 +72,21 @@ const ContractModalTable:React.FC<ContractModalTableProps> = (props) => {
schemaAction.setFieldValue('vendorMemberId', item.partyBMemberId)
schemaAction.setFieldValue('vendorRoleId', item.partyBRoleId)
schemaAction.setFieldValue('digest', item.contractAbstract)
// 业务类型
schemaAction.setFieldValue('businessType', item.businessType)
schemaAction.setFieldValue('businessTypeName', item.businessTypeName)
// 币别
schemaAction.setFieldValue('currencyType', item.currencyType)
// 付款方式
schemaAction.setFieldValue('paymentType', item.paymentType || 1)
schemaAction.setFieldValue('paymentTypeName', item.paymentTypeName)
// 付款条件
schemaAction.setFieldValue('paymentClauseType', item.paymentClauseType || 1)
schemaAction.setFieldValue('paymentClauseTypeName', item.paymentClauseTypeName)
// 到货区域
schemaAction.setFieldValue('arrivalArea', item.arrivalArea)
// 到货港口
schemaAction.setFieldValue('arrivalPort', item.arrivalPort)
// fillProductsOfContractIntoTable(item)
}
confirmModal && confirmModal()
......
......@@ -252,14 +252,10 @@ export const contractColumns: any[] = [
// 合同下单 物料列表
export const materialInfoColumns: any[] = [
{
title: 'ID',
dataIndex: 'productId',
className: 'commonHide'
},
{
title: getIntl().formatMessage({id: 'purchaseOrder.orderCollect.constant.wuliaopaihao'}),
dataIndex: 'productBrandNo',
key: 'productBrandNo',
width: COLUMNS_ACTION_WIDTH,
},
{
title: getIntl().formatMessage({id: 'purchaseOrder.orderCollect.constant.code'}),
......@@ -343,6 +339,9 @@ export const materialInfoColumns: any[] = [
width: COLUMNS_ACTION_WIDTH,
formItem: 'select',
editable: true,
formItemProps: {
disabled: true,
},
},
{
title: 'ID',
......@@ -363,14 +362,10 @@ export const materialInfoColumns: any[] = [
// 合同下单 物料列表(请购单合同情况下)
export const materialInfoColumnsByRequisition: any[] = [
{
title: 'ID',
dataIndex: 'productId',
className: 'commonHide'
},
{
title: getIntl().formatMessage({id: 'purchaseOrder.orderCollect.constant.wuliaopaihao'}),
dataIndex: 'productBrandNo',
key: 'productBrandNo',
width: COLUMNS_ACTION_WIDTH,
},
{
title: getIntl().formatMessage({id: 'purchaseOrder.orderCollect.constant.code'}),
......@@ -459,6 +454,9 @@ export const materialInfoColumnsByRequisition: any[] = [
width: COLUMNS_ACTION_WIDTH,
formItem: 'select',
editable: true,
formItemProps: {
disabled: true,
},
},
{
title: '关联单据',
......
......@@ -339,9 +339,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
mergeArr = mergeArr.map((item) => ({
...item,
// 兼容之前订单物料数据
// logistics: 1,
deliveryType: contractValue.deliveryType,
deliveryTypeName: contractValue.deliveryTypeName,
logistics: contractValue.deliveryType || 1,
memberId: contractValue.partyBMemberId,
memberRoleId: contractValue.partyBRoleId,
amount: +(item.price * item.quantity).toFixed(2), // 这里应该会出现计算不准的问题
......@@ -430,21 +428,20 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
useContractChange(({ value }) => {
if (value) {
// 业务类型
ctx.setFieldValue('businessType', value.businessType)
ctx.setFieldValue('businessTypeName', value.businessTypeName)
addSchemaAction.setFieldValue('businessType', value.businessType)
addSchemaAction.setFieldValue('businessTypeName', value.businessTypeName)
// 币别
ctx.setFieldValue('currencyType', value.currencyType)
ctx.setFieldValue('currencyTypeName', value.currencyTypeName)
addSchemaAction.setFieldValue('currencyType', value.currencyType)
// 付款方式
ctx.setFieldValue('paymentType', value.paymentType)
ctx.setFieldValue('paymentTypeName', value.paymentTypeName)
addSchemaAction.setFieldValue('paymentType', value.paymentType)
addSchemaAction.setFieldValue('paymentTypeName', value.paymentTypeName)
// 付款条件
ctx.setFieldValue('paymentClauseType', value.paymentClauseType)
ctx.setFieldValue('paymentClauseTypeName', value.paymentClauseTypeName)
addSchemaAction.setFieldValue('paymentClauseType', value.paymentClauseType)
addSchemaAction.setFieldValue('paymentClauseTypeName', value.paymentClauseTypeName)
// 到货区域
ctx.setFieldValue('arrivalArea', value.arrivalArea)
addSchemaAction.setFieldValue('arrivalArea', value.arrivalArea)
// 到货港口
ctx.setFieldValue('arrivalPort', value.arrivalPort)
addSchemaAction.setFieldValue('arrivalPort', value.arrivalPort)
}
})
useEditHideField()
......
......@@ -187,20 +187,13 @@ const paymentInfo: ISchema = {
},
properties: {
currencyType: {
type: 'number',
display: false
},
currencyTypeName: {
type: 'string',
enum: [],
title: '币别',
'x-component-props': {
disabled: true,
},
},
paymentType: {
type: 'number',
display: false
},
paymentTypeName: {
type: 'string',
title: '付款方式',
......@@ -208,10 +201,6 @@ const paymentInfo: ISchema = {
disabled: true,
},
},
paymentClauseType: {
type: 'number',
display: false
},
paymentClauseTypeName: {
type: 'string',
title: '付款条件',
......@@ -219,6 +208,14 @@ const paymentInfo: ISchema = {
disabled: true,
},
},
paymentType: {
type: 'number',
visible: false
},
paymentClauseType: {
type: 'number',
visible: false
},
}
},
}
......
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