Commit 41342ba9 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 合同下单隐藏发票,处理支付信息价格显示异常

parent 8ef0085b
......@@ -18,7 +18,6 @@ export interface BidTransformRecordProps {
const BidTransformRecord:React.FC<BidTransformRecordProps> = ({cardTitle}) => {
const { data, externalProcurementOrderLogResponses, interiorProcurementOrderLogResponses, apiType } = useContext(BidDetailContext)
// 根据模式选择对应的状态映射
const insideModel = apiType.indexOf('ender') !== -1 ? 'tenderInside' : 'inside';
......@@ -143,7 +142,7 @@ const BidTransformRecord:React.FC<BidTransformRecordProps> = ({cardTitle}) => {
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}
{interiorProcurementOrderLogResponses?.length && apiType!=='tenderInCallForBid' && apiType!=='callForBidInTender' ? <Radio.Button value={TransferEnum.Interior}>内部流转</Radio.Button> : null}
</Radio.Group>
}
className={style.cardWrap}
......
......@@ -74,6 +74,10 @@ const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => {
{ title: '其他要求:', name: 'restsRequire' },
]
if(data.orderModel > 30) {
otherInfo.shift()
}
return (
<>
<Row style={{ marginTop: 24 }} gutter={24}>
......
......@@ -258,7 +258,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
setPayStep(1)
}
else {
message.error('暂只支持线下支付、授信额度支付、余额支付、货到付款、微信支付方式')
message.error('暂只支持线下支付、授信额度支付、余额支付、货到付款、微信、账期月结支付方式')
}
} else {
message.error('请先选择支付方式')
......
......@@ -137,7 +137,8 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
const [formLoading, setFormLoading] = useState(false)
const [btnLoading, setBtnLoading] = useState(false)
const update = useUpdate()
const [productSumPrice, setProductSumPrice] = useState<number>(0)
// const [productSumPrice, setProductSumPrice] = useState<number>(0)
const productSumPriceRef = useRef<any>(0)
const { pageStatus, id, page_type = '0', modelType, spam_id, lastTypeParams } = usePageStatus()
const [initFormSchema, setInitFormSchema] = useState<any>(() => ({...mergeAllSchemas[page_type]}))
const [initFormValue, setInitFormValue] = useState<any>(() => {
......@@ -444,7 +445,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
forceEdit: col.forceEdit,
handleSave: paymentSave,
handleChange: (record, value = 100) => {
const payPrice = (value / 100 * productSumPrice).toFixed(2)
const payPrice = (value / 100 * productSumPriceRef.current).toFixed(2)
const newData = [...addSchemaAction.getFieldValue('paymentInformationResponses')];
const item = newData[index];
newData.splice(index, 1, {
......@@ -460,8 +461,8 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
const providerValue = {
detailData: initFormValue,
schemaActions: addSchemaAction,
productSumPrice,
setProductSumPrice
// productSumPrice,
// setProductSumPrice
}
// 显示采购下单合同栏目
......@@ -559,7 +560,8 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
})
addSchemaAction.setFieldValue('paymentInformationResponses', newData)
}
setProductSumPrice(payload)
// setProductSumPrice(payload)
productSumPriceRef.current = payload
})
$('onFieldInputChange', 'orderModel').subscribe(state => {
const { editable, value } = state
......@@ -590,6 +592,9 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
state.props.title = orderTypeLabelMap[value]
state.visible = true
})
ctx.setFieldState('needTheInvoice', state => {
state.visible = false
})
showContractColumn()
} else {
ctx.setFieldState('quotationNo', state => {
......@@ -654,24 +659,24 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
value === OrderModalType.PURCHASE_TENDER_CONTRACT_ORDER
) {
// 判断合同下单
setTimeout(() => {
// setTimeout(() => {
addSchemaAction.setFieldState('orderProductRequests', productState => {
productState.props["x-component-props"] = {
...productState.props["x-component-props"],
prefix: editable ? materialAddButton : '',
}
})
}, 300)
// }, 500)
showContractColumn()
} else {
setTimeout(() => {
// setTimeout(() => {
addSchemaAction.setFieldState('orderProductRequests', productState => {
productState.props["x-component-props"] = {
...productState.props["x-component-props"],
prefix: '',
}
})
})
// }, 500)
}
// 选择某种类型时, 需显示对应的订单类型
ctx.setFieldValue('type', orderTypeLabelMap[value])
......
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