Commit 7cb27114 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 处理新增商品不需要校验发票问题,处理渠道商品详情流程进度没到完成的问题,处理销售订单确认到账弹框重复提交问题

parent 297800e2
......@@ -290,9 +290,10 @@ const AddProducts: React.FC<{}> = (props) => {
// 校验属性单位重量是否提供发票
try {
// if(!_params.commodityAttributeList.length || !_params?.unitId || typeof(_params.isInvoice) !== 'boolean' || !_params?.logistics?.weight){
if(!_params?.unitId || typeof(_params.isInvoice) !== 'boolean' || (_params.logistics.deliveryType === 1 && !_params.logistics?.weight)){
throw new Error('请完善商品其他信息!')
// @5.10去掉发票校验 置为true 120行
// if(!_params?.unitId || typeof(_params.isInvoice) !== 'boolean' || (_params.logistics.deliveryType === 1 && !_params.logistics?.weight)){
if(!_params?.unitId || (_params.logistics.deliveryType === 1 && !_params.logistics?.weight)){
throw new Error('请完善商品其他信息!')
}
} catch (e) {
return e
......@@ -316,6 +317,7 @@ const AddProducts: React.FC<{}> = (props) => {
numberKeys.map(item => delete _params[item])
// console.log(_params, 'params')
_params.isInvoice = true
PublicApi.postProductCommoditySaveOrUpdateCommodity(_params).then(res => {
if (res.code === 1000) {
setIsEnableCheck(false)
......
......@@ -68,7 +68,7 @@ const OtherForm: React.FC<Iprops> = (props) => {
colon={false}
autoComplete="off"
>
<Form.Item
{/* <Form.Item
name="isInvoice"
label="提供发票"
rules={[{
......@@ -81,7 +81,7 @@ const OtherForm: React.FC<Iprops> = (props) => {
<Radio.Button value={true} style={{ width: 100, textAlign: 'center' }}>是</Radio.Button>
<Radio.Button value={false} style={{ width: 100, textAlign: 'center' }}>否</Radio.Button>
</Radio.Group>
</Form.Item>
</Form.Item> */}
<Form.Item
name="marks"
label="唛头"
......
......@@ -63,7 +63,7 @@ const viewProducts: React.FC<{}> = () => {
if(data.status===1) setFixStep(0)
else if(data.status===2) setFixStep(1)
else if(data.status===3) setFixStep(2)
else if(data.status===4) setFixStep(2)
else if(data.status===4) setFixStep(3)
else if(data.status===5) setFixStep(3)
else if(data.status===6) setFixStep(3)
}
......
......@@ -20,8 +20,11 @@ const OrderPayResultModal:React.FC<OrderPayResultModalProps> = ({type, currentRe
const { id } = usePageStatus()
const [visible, setVisible] = useState(false)
const canCtlData = data?.paymentInformationResponses.find(v => v.externalState === PayOutWorkState.READY_CONFIRM_RESULT) || {}
const { run, loading } = useHttpRequest(PublicApi.postOrderConfirmedPaymentResultsOrder)
// const { run, loading } = useHttpRequest(PublicApi.postOrderConfirmedPaymentResultsOrder)
// const transData = canCtlData.payOrderUrls ? canCtlData.payOrderUrls.split(',') : []
const [loading0, setLoading0] = useState(false)
const [loading1, setLoading1] = useState(false)
const transData = canCtlData.payOrderUrls ? canCtlData.payOrderUrls : []
useEffect(() => {
if (currentRef) {
......@@ -42,10 +45,13 @@ const OrderPayResultModal:React.FC<OrderPayResultModalProps> = ({type, currentRe
id: Number(id),
paymentInformationId: canCtlData.id
}
const { code } = await run(params)
isReady ? setLoading1(true) : setLoading0(true)
const { code } = await PublicApi.postOrderConfirmedPaymentResultsOrder(params)
if (code === 1000) {
history.goBack()
} else {
setLoading1(false)
setLoading0(false)
}
}
......@@ -54,11 +60,11 @@ const OrderPayResultModal:React.FC<OrderPayResultModalProps> = ({type, currentRe
title={type === 'default' ? '确认支付结果' : '查看支付结果'}
visible={visible}
onCancel={handleCancel}
confirmLoading={loading}
// confirmLoading={loading}
footer={(type === 'default' && transData) ? <Space>
<Button onClick={handleCancel}>取消</Button>
<Button onClick={() => handleConfirm(0)} type='dashed'>确认未到账</Button>
<Button onClick={() => handleConfirm(1)} type='primary'>确认到账</Button>
<Button onClick={() => handleConfirm(0)} loading={loading0} type='dashed'>确认未到账</Button>
<Button onClick={() => handleConfirm(1)} loading={loading1} type='primary'>确认到账</Button>
</Space> : null}
>
<List
......
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