Commit 926653cc authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 订单详情添加来源商城,新增时修改b2b订单数量清空支付方式选中

parent 2f187d09
......@@ -48,6 +48,11 @@ export const useOrderDetail = (options: OrderDetailHookProps) => {
span: 8,
render: (text, record) => <StatusColors type={type === 'saleOrder' ? 'saleInside' : 'inside'} status={text} text={record.innerStatusName} />
},
{
label: '来源商城',
name: 'shopName',
span: 8,
},
])
useEffect(() => {
......
......@@ -33,8 +33,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = () => {
const handleSubmitBatch = async () => {
if (rowSelectionCtl.selectRow.length === 0) {
message.error('请先勾选订单')
return ;
return message.error('请先勾选订单')
}
const { code } = await run(rowSelectionCtl.selectedRowKeys.map(item => ({ orderId: item })))
if (code === 1000) {
......
......@@ -64,6 +64,7 @@ export const useProductTableChangeForPay = (ctx: ISchemaFormActions | ISchemaFor
// 请求一次并复制给支付信息
const productItem = value[0]
if(pageStatus === PageStatus.ADD) { // 新增下 需要支付信息生成支付次数
ctx.setFieldValue('payments', []) // 变动后先 清空支付信息
const shopId = ctx.getFieldValue('shopId')
const products = value.map(item => ({ productId: item.commodityId, skuId: item.productId }))
if(shopId && products?.length) {
......
import React from 'react'
import { Card, Button, Space } from 'antd'
import { Card, Button, Space, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
......@@ -31,6 +31,10 @@ const ReadySubmitOrder:React.FC<ReadySubmitOrderProps> = (props) => {
const { run, loading } = useHttpRequest(PublicApi.postOrderBuyerValidateSubmitBatch)
const handleBitchPush = async () => {
if (rowSelectionCtl.selectRow.length === 0) {
return message.error('请先勾选订单')
}
const { code } = await run(rowSelectionCtl.selectedRowKeys.map(item => ({ orderId: item })))
if (code === 1000) {
ref.current.reload()
......
import React from 'react'
import { Card, Button, Space } from 'antd'
import { Card, Button, Space, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
......@@ -30,6 +30,10 @@ const SecondApprovedOrder:React.FC<SecondApprovedOrderProps> = (props) => {
const { run, loading } = useHttpRequest(PublicApi.postOrderBuyerValidateGradeTwoBatch)
const handleSubmitBatch = async () => {
if (rowSelectionCtl.selectRow.length === 0) {
return message.error('请先勾选订单')
}
const { code } = await run(rowSelectionCtl.selectedRowKeys.map(item => ({ orderId: item })))
if (code === 1000) {
......
import React from 'react'
import { Card, Button, Space } from 'antd'
import { Card, Button, Space, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
......@@ -31,6 +31,10 @@ const SecondApprovedOrder:React.FC<SecondApprovedOrderProps> = (props) => {
const { run, loading } = useHttpRequest(PublicApi.postOrderVendorValidateGradeTwoBatch)
const handleSubmitBatch = async () => {
if(rowSelectionCtl.selectRow.length === 0){
return message.error('请勾选要审核的订单')
}
const { code } = await run(rowSelectionCtl.selectedRowKeys.map(item => ({ orderId: item })))
if (code === 1000) {
rowSelectionCtl.setSelectRow([])
......
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