diff --git a/src/components/AiShopDetail/AiShopDetail.tsx b/src/components/AiShopDetail/AiShopDetail.tsx index 45eabc4..21e4f29 100644 --- a/src/components/AiShopDetail/AiShopDetail.tsx +++ b/src/components/AiShopDetail/AiShopDetail.tsx @@ -75,6 +75,13 @@ export default function AiShopDetail(props: any) { reloadUser(messageApi, globalDispatchContext).then(() => { messageApi.success('扣款成功'); }); + setTimeout(() => { + setBuyTipsModal(false) + props.closeModal() + props.upData() + }, 1000) + // props.closeModal() + // props.upData() } catch (error: any) { if (error.response) { @@ -329,7 +336,7 @@ export default function AiShopDetail(props: any) { // alert(props.orderId) if (props.orderId) { confirmPaymentFun(props.orderId) - + } else { createOrderFun(goodsId) diff --git a/src/components/OrderDetailModal/OrderDetailModal.tsx b/src/components/OrderDetailModal/OrderDetailModal.tsx index b5b4621..5fd5159 100644 --- a/src/components/OrderDetailModal/OrderDetailModal.tsx +++ b/src/components/OrderDetailModal/OrderDetailModal.tsx @@ -70,6 +70,7 @@ export default function OrderDetailModal(props: any) { idcardType: '',//证件类型 idcard: '',//证件号码 }) + // const [waitCorrectionCount, setWaitCorrectionCount] = useState(0) //待补充资料 // tab栏 标题数组 const tapTitleArray = [ { @@ -98,7 +99,13 @@ export default function OrderDetailModal(props: any) { } : {} ), - + // (waitCorrectionCount > 0? + // { + // key: 'file', + // title: '资料补充', + // className: activeKey == 'file'? 'orderDetailTop-title tapActive borderRight' : 'orderDetailTop-title borderRight' + // }:{} + // ) { key: 'file', title: '资料补充', @@ -110,6 +117,7 @@ export default function OrderDetailModal(props: any) { // className: activeKey == 'result' ? 'orderDetailTop-title tapActive borderRight' : 'orderDetailTop-title borderRight' // }, ] + const getOrderDetail = async () => { try { setLoading(true) @@ -128,7 +136,7 @@ export default function OrderDetailModal(props: any) { setAuthorizeInfo({ ...res.buyUserDTO }) - + // setWaitCorrectionCount(res.waitCorrectionCount) } catch (error: any) { @@ -151,8 +159,10 @@ export default function OrderDetailModal(props: any) {
{messageContext} -
- {tapTitleArray.map((item:any,index) => { +
+ {tapTitleArray.map((item: any, index) => { return (
{ setActiveKey(item.key) diff --git a/src/components/OrderDetailModal/components/File/File.tsx b/src/components/OrderDetailModal/components/File/File.tsx index 56b39f4..cbd72f7 100644 --- a/src/components/OrderDetailModal/components/File/File.tsx +++ b/src/components/OrderDetailModal/components/File/File.tsx @@ -32,6 +32,7 @@ export default function File(props: any) { } else if (props.user == 'buy') { getBuySupplementList() } + props.upData() messageApi.open({ type: 'success', content: '已提交', @@ -252,6 +253,8 @@ export default function File(props: any) { setCorrectionId(record.correctionId) getSupplementDetail(record.correctionId) setIsModalVisible(true) + // 清空表单 + form.resetFields(); // setCorrectionType(record.correctionType) }}>查看内容 diff --git a/src/components/OrderDetailModal/order-detail-modal.css b/src/components/OrderDetailModal/order-detail-modal.css index 248ae75..e637a16 100644 --- a/src/components/OrderDetailModal/order-detail-modal.css +++ b/src/components/OrderDetailModal/order-detail-modal.css @@ -1,6 +1,7 @@ .orderDetailTop { margin-top: 21px; display: flex; + /* width: 100%; */ /* background-color: red; */ height: 45px; border-bottom: 1px solid #EFE8E2; @@ -14,6 +15,7 @@ color: #888888; border-left: 1px solid #EFE8E2; border-top: 1px solid #EFE8E2; + /* border-right: 1px solid #EFE8E2; */ cursor: pointer; } diff --git a/src/components/invoice/InvoiceList.tsx b/src/components/invoice/InvoiceList.tsx index d626295..5dcd074 100644 --- a/src/components/invoice/InvoiceList.tsx +++ b/src/components/invoice/InvoiceList.tsx @@ -288,6 +288,8 @@ export default function InvoiceList() { } else { console.error(error) } + }finally { + setLoading(false); } diff --git a/src/layout/head/Head.tsx b/src/layout/head/Head.tsx index 3111c49..f4e747d 100644 --- a/src/layout/head/Head.tsx +++ b/src/layout/head/Head.tsx @@ -153,7 +153,7 @@ export default function Head() { console.log(res); } catch (error: any) { - + setPhoneLoading(false) if (error.response) { const data = error.response.data; messageApi.open({ @@ -165,16 +165,17 @@ export default function Head() { } } } + const [phoneloading, setPhoneLoading] = useState(false) const onFinish = async (values: any) => { - console.log('Success:', values); + // console.log('Success:', values); try { const res = await checkPhone(values.phone) // console.log(res); if (res.data == 'SUCCESS') { + setPhoneLoading(true) submit(values.phone, values.smsCode) - + setPhoneLoading(false) } else { - messageApi.open({ type: 'error', content: '手机号已被绑定,请更换手机号', @@ -922,7 +923,7 @@ export default function Head() { // console.log('嘎嘎嘎哈哈', data); setUserId(data.userId) if (data.isUpdateWxUsernamePhone == 1) { - // if (data.isUpdateWxUsernamePhone != 1) { + // if (data.isUpdateWxUsernamePhone != 1) { setIsUpdateWxUsernamePhone(true); dispath({ type: 'changePhoneModal', @@ -1854,6 +1855,7 @@ export default function Head() {
*/} {/* 绑定手机号 */} +
+
-
-
-
- -
-
- -
-
- -
-
-
-
-
{ - setIsUpdateWxUsernamePhone(false); - dispath({ - type: 'changePhoneModal', - val: false - }) - getUserData() - }}> - + +
+
+
+ +
+
+ +
+
+
-
-
-
您正在绑定手机号
-
绑定手机号后,您可以通过手机号码登录平台
+
-
-
+
{ + setIsUpdateWxUsernamePhone(false); + dispath({ + type: 'changePhoneModal', + val: false + }) + getUserData() + }}> + +
- - - -
-
- - - - - {countdown === 0 ? ( -
- 发送验证码 -
- ) : ( -
- 倒计时 {countdown} 秒 -
- )} -
-
- - - -
- -
-
{ - setIsUpdateWxUsernamePhone(false); - dispath({ - type: 'changePhoneModal', - val: false - }) - getUserData() - }}>跳过,下次再说
+
+
您正在绑定手机号
+
绑定手机号后,您可以通过手机号码登录平台
+
+
+
+ + + + +
+
+ + + + + {countdown === 0 ? ( +
+ 发送验证码 +
+ ) : ( +
+ 倒计时 {countdown} 秒 +
+ )} +
+
+ + + +
+ +
+
+
{ + setIsUpdateWxUsernamePhone(false); + dispath({ + type: 'changePhoneModal', + val: false + }) + getUserData() + }}>跳过,下次再说
+
-
+
diff --git a/src/request/api.ts b/src/request/api.ts index 5d692ec..73a67b9 100644 --- a/src/request/api.ts +++ b/src/request/api.ts @@ -30,6 +30,7 @@ export const cancelInvoice = (invoiceRechargeId: string) => request.put(`/operat export const getInvoiceInfoByinvoiceRechargeId = (invoiceRechargeId: string) => request.get(`/operator-plugin/api/invoicerecharge/get/${invoiceRechargeId}`) // 修改开票信息 export const updateInvoiceInfoByinvoiceRechargeId = (invoiceRechargeId: string, params: any) => request.put(`/operator-plugin/api/invoicerecharge/update/${invoiceRechargeId}`, params) + //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -92,6 +93,10 @@ export const confirmPayment = (orderId: string) => aiShopRequest.put(`/aishop/ap export const getFileTypeByIds = (params:any) => aiShopRequest.get(`/aishop/api/file/list`, { params }) // 补充资料 export const supplementData = (params:any) => aiShopRequest.post(`/aishop/api/correction/save`, params) +// 取消订单 +export const cancelOrder = (orderId: string) => aiShopRequest.put(`/aishop/api/order/save-cancel/${orderId}`) +// 填写过户人信息 +export const fillInputInfo = (orderId: string, params:any) => aiShopRequest.post(`/aishop/api/order/save-input/${orderId}`, params) //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/src/request/request.ts b/src/request/request.ts index 41d6487..e5983da 100644 --- a/src/request/request.ts +++ b/src/request/request.ts @@ -26,8 +26,9 @@ request.interceptors.request.use( const token = sessionStorage.getItem('token') config.headers = config.headers || {} config.headers['Auth'] = token ? `Bearer ${token}` : ''; - config.headers['Content-Type'] = 'application/json'; + // config.headers['Content-Type'] = 'application/json'; // config.data = { unused: 0 } + if (config.method === 'get' ) { if (!config.data) { config.data = { unused: 0 } @@ -75,7 +76,7 @@ aiShopRequest.interceptors.request.use( config.headers = config.headers || {} config.headers['Auth'] = token ? `Bearer ${token}` : ''; - config.headers['Content-Type'] = 'application/json'; + // config.headers['Content-Type'] = 'application/json'; // config.data = { unused: 0 } if (config.method === 'get' ) { if (!config.data) { @@ -122,7 +123,7 @@ phoneRequest.interceptors.request.use( const token = sessionStorage.getItem('token') config.headers = config.headers || {} config.headers['Auth'] = token ? `Bearer ${token}` : ''; - config.headers['Content-Type'] = 'application/json'; + // config.headers['Content-Type'] = 'application/json'; // config.data = { unused: 0 } if (config.method === 'get' ) { if (!config.data) { diff --git a/src/route/CopyrightGgoods/CopyrightGgoods.tsx b/src/route/CopyrightGgoods/CopyrightGgoods.tsx index 0b7d5aa..9f85055 100644 --- a/src/route/CopyrightGgoods/CopyrightGgoods.tsx +++ b/src/route/CopyrightGgoods/CopyrightGgoods.tsx @@ -16,9 +16,11 @@ import { import AiShopDetail from '../../components/AiShopDetail/AiShopDetail' import { useLocation } from 'react-router-dom'; import dayjs, { } from 'dayjs'; -import { buyGoodsList, +import { + buyGoodsList, // goodsDetail, - createOrder, confirmPayment } from '../../request/api' + // createOrder, confirmPayment +} from '../../request/api' // import type { InputNumberProps } from 'antd'; // import type { TableColumnsType } from 'antd'; // import { SearchOutlined, ClearOutlined } from '@ant-design/icons'; @@ -33,7 +35,7 @@ export default function CopyrightGgoods() { const height = window.innerHeight - 180; const [goodsId, setGoodsId] = useState() //商品ID const [goodsDetailModal, setGoodsDetailModal] = useState(false) //订单详情 - const [buyTipsModal, setBuyTipsModal] = useState(false) //卖提示框 + // const [buyTipsModal, setBuyTipsModal] = useState(false) //卖提示框 // const [messageApi, contextHolder] = message.useMessage(); // const dateFormat = 'YYYY-MM-DD'; @@ -59,46 +61,46 @@ export default function CopyrightGgoods() { const [data, setData] = useState([]); // 表格数据 // 确认支付 - const confirmPaymentFun = async (orderId: string) => { - try { - // setLoading(true) - const res: any = await confirmPayment(orderId) - console.log(res); - // setLoading(false) - } catch (error: any) { + // const confirmPaymentFun = async (orderId: string) => { + // try { + // // setLoading(true) + // const res: any = await confirmPayment(orderId) + // console.log(res); + // // setLoading(false) + // } catch (error: any) { - if (error.response) { - const data = error.response.data; - messageApi.open({ - type: 'error', - content: data.msg ? data.msg : `${data.path}(${data.status})`, - }); - } else { - console.error(error) - } - } - } + // if (error.response) { + // const data = error.response.data; + // messageApi.open({ + // type: 'error', + // content: data.msg ? data.msg : `${data.path}(${data.status})`, + // }); + // } else { + // console.error(error) + // } + // } + // } // 创建订单 - const createOrderFun = async (goodsId: string) => { - try { - // setPayLoading(true) - const res: any = await createOrder(goodsId) - // console.log(res); - confirmPaymentFun(res.data) + // const createOrderFun = async (goodsId: string) => { + // try { + // // setPayLoading(true) + // const res: any = await createOrder(goodsId) + // // console.log(res); + // confirmPaymentFun(res.data) - } catch (error: any) { + // } catch (error: any) { - if (error.response) { - const data = error.response.data; - messageApi.open({ - type: 'error', - content: data.msg ? data.msg : `${data.path}(${data.status})`, - }); - } else { - console.error(error) - } - } - } + // if (error.response) { + // const data = error.response.data; + // messageApi.open({ + // type: 'error', + // content: data.msg ? data.msg : `${data.path}(${data.status})`, + // }); + // } else { + // console.error(error) + // } + // } + // } const getBuyGoodsList = async (page: number) => { try { @@ -176,7 +178,7 @@ export default function CopyrightGgoods() { }, [state]) useEffect(() => { getBuyGoodsList(page) - },[page]) + }, [page]) return ( @@ -207,7 +209,7 @@ export default function CopyrightGgoods() { ( - index + 1 + (page - 1) * 10 + index + 1 )} align="center" /> */} { setGoodsDetailModal(false) - }}> + }} + upData={() => { + getBuyGoodsList(page) + }} + > - 确定购买该商品吗? - + */}
diff --git a/src/route/ProductRelease/ProductRelease.tsx b/src/route/ProductRelease/ProductRelease.tsx index 98f154f..471f066 100644 --- a/src/route/ProductRelease/ProductRelease.tsx +++ b/src/route/ProductRelease/ProductRelease.tsx @@ -24,6 +24,8 @@ import { useLocation } from 'react-router-dom'; import React, { useState, useEffect } from 'react'; import dayjs, { } from 'dayjs'; export default function ProductRelease() { + const [reasonModalOpen, setReasonModalOpen] = useState(false) // 未通过原因弹窗 + const [goodsCheckRemark, setGoodsCheckRemark] = useState('') // 未通过原因 const [messageApi, messageContext] = useMessage(); const { state } = useLocation() // const dateFormat = 'YYYY年MM月DD日'; @@ -42,7 +44,7 @@ export default function ProductRelease() { // if (sellDate) { // console.log('sellDate', dayjs(sellDate).year()); // } - + setPage(1) getGoodsDate(1) }, [state]) @@ -61,7 +63,7 @@ export default function ProductRelease() { const [offModalOpen, setOffModalOpen] = useState(false) // 控制下架弹窗 const [id, setId] = useState('') // 编辑id const [loading, setLoading] = useState(false) // 加载 - + const [data, setData] = useState([]) // 点击编辑 @@ -73,12 +75,12 @@ export default function ProductRelease() { // 删除id const [delId, setDelId] = useState('') // 删除商品名字 - const [delName, setDelName] = useState('') + // const [delName, setDelName] = useState('') // 点击删除 const del = (item: any) => { // console.log(item.order); setDelId(item.goodsId) - setDelName(item.goodsName) + // setDelName(item.goodsName) setDelModalOpen(true) }; // 点击确定删除 @@ -243,7 +245,7 @@ export default function ProductRelease() { } } - + const getGoodsDate = async (page: number) => { try { @@ -399,14 +401,14 @@ export default function ProductRelease() { - {index + 1} + {(page - 1) * 10 + index + 1}
@@ -434,7 +436,22 @@ export default function ProductRelease() { fontWeight: 'bold', }}> {item.goodsCheckStatus == '0' ? - 未通过 +
+
{ + setGoodsCheckRemark(item.goodsCheckRemark) + setReasonModalOpen(true) + + }} + > 未通过
+
(点击查看原因)
+
: item.goodsCheckStatus == '1' ? 审核中 : item.goodsCheckStatus == '2' ? @@ -444,9 +461,13 @@ export default function ProductRelease() { width: 250, }}>
- { - edit(item) - }}>编辑 + { + edit(item) + }}>编辑 submit(item)}>提交审核 @@ -460,9 +481,14 @@ export default function ProductRelease() { }} onClick={() => sell(item)}>上架 off(item)}>下架 + + 正在交易中... +
@@ -539,7 +565,9 @@ export default function ProductRelease() { width: 700, marginTop: 20 }}> - 删除后这条信息将不被保存,确定删除{delName}吗? + 删除后这条信息将不被保存,确定删除 + {/* {delName} */} + 吗?
{/* 出售弹窗 */} @@ -622,6 +650,35 @@ export default function ProductRelease() { 确定将{submitName}提交审核吗?
+ { + // submitAuditOk() + + }} + footer={null} + onCancel={() => { + setReasonModalOpen(false) + }} + // okButtonProps={{ style: { background: 'red', color: 'white' } }} + style={{ + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + height: `${height}px`, + }}> +
+ {goodsCheckRemark} + +
+
) } diff --git a/src/route/ProductRelease/components/EditModal/EditModal.tsx b/src/route/ProductRelease/components/EditModal/EditModal.tsx index 27f261e..e0be7bf 100644 --- a/src/route/ProductRelease/components/EditModal/EditModal.tsx +++ b/src/route/ProductRelease/components/EditModal/EditModal.tsx @@ -871,6 +871,8 @@ export default function EditModal(props: any) { onClick={() => { logoImgArray.splice(0); setLogoImgArray([...logoImgArray]); + // 将表单imageUrl值清空 + form.setFieldsValue({ imageUrl: '' }); }} > 删除 @@ -1339,11 +1341,11 @@ export default function EditModal(props: any) { htmlType="submit" // style={{ width: '262px', height: '58px', fontSize: '16px', color: '#FDFDF2', backgroundColor: 'var(--color-primary)' }} size='large' - onClick={() => { - console.log(form.getFieldValue('imageUrl')); - console.log(logoImgArray); + // onClick={() => { + // console.log(form.getFieldValue('imageUrl')); + // console.log(logoImgArray); - }} + // }} > {/* {props.id?'保存':'提交'} */} 保存 diff --git a/src/route/TradingGoods/TradingGoods.tsx b/src/route/TradingGoods/TradingGoods.tsx index e74f727..a4c7672 100644 --- a/src/route/TradingGoods/TradingGoods.tsx +++ b/src/route/TradingGoods/TradingGoods.tsx @@ -5,22 +5,121 @@ import { // message, Pagination, Modal, - Spin + Spin, + Form, + Col, Row, + Select, + Input, + Cascader, + // Flex, + Button } from 'antd'; import AiShopDetail from '../../components/AiShopDetail/AiShopDetail' +import { GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts"; // import type { TableColumnsType } from 'antd'; // import { SearchOutlined, ClearOutlined } from '@ant-design/icons'; // import type { DatePickerProps } from 'antd'; // import locale from 'antd/es/date-picker/locale/zh_CN'; -import { getBuyOrderList } from '../../request/api' -import { useState, useEffect } from 'react'; +import { getBuyOrderList, getProvinceList, getCityList, getCertificateTypeList, cancelOrder, fillInputInfo } from '../../request/api' +import { useState, useEffect, useContext } from 'react'; import { useLocation } from 'react-router-dom'; import File from '../../components/OrderDetailModal/components/File/File' const { Column } = Table; import OrderDetail from '../../components/OrderDetailModal/OrderDetailModal' import useMessage from "antd/es/message/useMessage"; import dayjs, { } from 'dayjs'; +interface Option { + value?: string | number | null; + label: React.ReactNode; + children?: Option[]; + isLeaf?: boolean; + // id: string; + // pId: string; +} export default function TradingGoods() { + const globalDispatchContext = useContext(GlobalDispatchContext); + const [areaArray, setAreaArray] = useState([]); + const getProvinceListDate = async () => { + try { + const res: any = await getProvinceList() + // console.log('省', res); + const provinces = res.map((province: any) => ({ + value: province.areaId, + label: province.areaName, + isLeaf: false, + // id: province.areaId, + children: [], // 初始化 children 属性为空数组 + })); + setAreaArray(provinces); + + } catch (error: any) { + + + if (error.response) { + const data = error.response.data; + messageApi.open({ + type: 'error', + content: data.msg ? data.msg : `${data.path}(${data.status})`, + }); + } else { + console.error(error) + } + } + } + // 加载城市列表 + const loadCityList = async (selectedOptions: Option[]) => { + const targetOption = selectedOptions[selectedOptions.length - 1]; + // console.log('targetOption', targetOption.children); + try { + const res: any = await getCityList(targetOption.value as string); + // console.log('城市列表', res); + + const cities = res.map((city: any) => ({ + value: city.areaId, + label: city.areaName, + + })); + targetOption.children = cities; + // 更新 areaArray 状态 + setAreaArray([...areaArray]); + } catch (error: any) { + + + if (error.response) { + const data = error.response.data; + messageApi.open({ + type: 'error', + content: data.msg ? data.msg : `${data.path}(${data.status})`, + }); + } else { + console.error(error) + } + } + }; + const [certificateTypeList, setCertificateTypeList] = useState([]) // 证书类型列表 + const getCertificateTypeListDate = async () => { + try { + const res: any = await getCertificateTypeList() + setCertificateTypeList(res.map((item: any) => { + return { + value: item.dataId, + label: item.dataName, + } + })) + } catch (error: any) { + + if (error.response) { + const data = error.response.data; + messageApi.open({ + type: 'error', + content: data.msg ? data.msg : `${data.path}(${data.status})`, + }); + } else { + console.error(error) + } + } + } + const [form] = Form.useForm(); const height = window.innerHeight - 180; const [messageApi, contextHolder] = useMessage(); const dateFormat = 'YYYY-MM-DD'; @@ -38,6 +137,7 @@ export default function TradingGoods() { const [loading, setLoading] = useState(false) // 加载中 const [fileModal, setFileModal] = useState(false) //补充资料弹窗 const [data, setData] = useState([]); // 表格数据 + const [buyInfoModal, setBuyInfoModal] = useState(false) // 填写购买人信息弹窗 const getDataList = async (page: number) => { try { @@ -113,7 +213,10 @@ export default function TradingGoods() { // 获取数据 }, [page]) - + useEffect(() => { + getProvinceListDate() + getCertificateTypeListDate() + }, []) return (
@@ -140,7 +243,7 @@ export default function TradingGoods() { fixed="left" width={70} render={(_text, _record, index: number) => ( - index + 1 + (page - 1) * 10 + index + 1 )} align="center" /> ( {text} )} /> @@ -175,7 +278,7 @@ export default function TradingGoods() { }}> 订单已取消 买家待付款 - 待填写资料 + 待填写资料 过户进行中 过户已完成 买家已评价 @@ -183,33 +286,65 @@ export default function TradingGoods() {
)} /> - + ( + <>{text ? text : '未付款'} + )} + /> {/* */} (
- { - // console.log(record.orderId); - setOrderId(record.orderId) - setFileModal(true) - }}>补充资料 - { +
0 ? 'unset' : 'none', + position: 'relative', + // color: 'black' + }} + onClick={() => { + // console.log(record.orderId); + setOrderId(record.orderId) + setFileModal(true) + }}>补充资料 +
+ {record.waitCorrectionCount} +
+
+
{ // console.log(record.orderId); setOrderId(record.orderId) setOrderDetailModal(true) }}> 订单详情 - - { +
+
{ // confirmPaymentFun(record.orderId) // alert(record.goodsId) @@ -222,9 +357,10 @@ export default function TradingGoods() { }} > 付款 - - { - +
+
{ + setBuyInfoModal(true) + setOrderId(record.orderId) }} style={{ @@ -232,17 +368,48 @@ export default function TradingGoods() { }} > 填写受让人信息 - - { +
+
{ + // 取消订单提示弹窗 + Modal.confirm({ + title: '取消订单', + content: '是否确认取消订单?', + okText: '确定', + cancelText: '取消', + centered: true, + onOk: async () => { + try { + await cancelOrder(record.orderId) + // messageApi.open({ + // type: 'success', + // content: '取消订单成功', + // }) + reloadUser(messageApi, globalDispatchContext).then(() => { + messageApi.success('取消订单成功'); + }); + getDataList(page) + } catch (error: any) { + if (error.response) { + const data = error.response.data; + messageApi.open({ + type: 'error', + content: data.msg ? data.msg : `${data.path}(${data.status})`, + }); + } else { + console.error(error) + } + } + } + }) }} style={{ display: record.orderStatus == '1' || record.orderStatus == '2' ? 'unset' : 'none' }} > 取消订单 - +
)} /> @@ -300,29 +467,269 @@ export default function TradingGoods() { width={1150} centered > - + { + // setFileModal(false) + // }} + upData={() => { + getDataList(page) + }} + user={'buy'} orderId={orderId}> - { - // setOrderDetailModal(false) + { + // setOrderDetailModal(false) + // }} + onCancel={() => { + setAiShopDetailModal(false) + }} + width={1200} + centered + > + + { + setAiShopDetailModal(false) + }} + upData={() => { + getDataList(page) + }} + > + + { + // setOrderDetailModal(false) + // }} + onCancel={() => { + setBuyInfoModal(false) + }} + width={700} + centered + > +
{ + try { + await fillInputInfo(orderId, { + buyCity: values.buyCity.join(','), + buyIdcard: values.buyIdcard, + buyIdcardType: values.buyIdcardType, + buyName: values.buyName, + buyPhone: values.buyPhone, + buyType: values.buyType, + }) + messageApi.open({ + type: 'success', + content: '填写信息成功', + }) + setTimeout(() => { + setBuyInfoModal(false) + getDataList(page) + }, 500); + } catch (error: any) { + + + if (error.response) { + const data = error.response.data; + messageApi.open({ + type: 'error', + content: data.msg ? data.msg : `${data.path}(${data.status})`, + }); + } else { + console.error(error) + } + } + // console.log('Success:', values); + + }} + onFinishFailed={() => { + messageApi.open({ + type: 'error', + content: '请完善信息', + }) + }} + > + + + + + + + + + + + + +
+ + { + // const targetOption = selectedOptions[selectedOptions.length - 1]; + // // console.log('111', targetOption); + + // listArea(targetOption.id).then(data => { + // targetOption.children = data.map(item => { + // return { + // value: item.name, + // label: item.name, + // isLeaf: true, //二级判断这个 以前不是 以前是 !item.isParent + // id: item.id, + // pId: item.pId + // } + // }); + // setAreaArray([ + // ...areaArray + // ]) + // }); + + // }} + loadData={loadCityList} + placeholder="请选择省市" + changeOnSelect + /> + +
+ + + + + + + + +
+ + + + + + + + + +
+ + {/* */} + + + + {/* */} + +
+
+ +
) } diff --git a/src/route/TransactionOrder/TransactionOrder.tsx b/src/route/TransactionOrder/TransactionOrder.tsx index 9cd0596..417f238 100644 --- a/src/route/TransactionOrder/TransactionOrder.tsx +++ b/src/route/TransactionOrder/TransactionOrder.tsx @@ -4,7 +4,8 @@ import { // Select, DatePicker, Button, Table, // message, - Space, Pagination, Modal, + // Space, + Pagination, Modal, Spin } from 'antd'; import dayjs, { } from 'dayjs'; @@ -19,6 +20,7 @@ import { useLocation } from 'react-router-dom'; const { Column } = Table; import useMessage from "antd/es/message/useMessage"; import OrderDetail from '../../components/OrderDetailModal/OrderDetailModal' +// import { styleText } from 'util'; export default function TransactionOrder() { const [messageApi, messageContext] = useMessage(); const height = window.innerHeight - 180; @@ -131,7 +133,7 @@ export default function TransactionOrder() { fixed="left" width={70} render={(_text, _record, index: number) => ( - index + 1 + (page - 1) * 10 + index + 1 )} align="center" /> )} /> - + ( + <>{text?text:'未付款'} + )} + /> {/* */} ( - - { - // console.log(record.orderId); - setOrderId(record.orderId) - setFileModal(true) - }}>补充资料 - { +
+
0 ? 'unset' : 'none', + position: 'relative', + // color: 'black' + }} + onClick={() => { + // console.log(record.orderId); + setOrderId(record.orderId) + setFileModal(true) + + }}>补充资料 +
+ {record.waitCorrectionCount} +
+
+
{ // console.log(record.orderId); setOrderId(record.orderId) setOrderDetailModal(true) }}> 订单详情 - - +
+
)} /> @@ -255,7 +292,14 @@ export default function TransactionOrder() { width={1150} centered > - + { + // setFileModal(false) + // }} + upData={() => { + getDataList(page) + }} + orderId={orderId}>
) diff --git a/src/util/AjaxUtils.ts b/src/util/AjaxUtils.ts index bd3ca68..ee525af 100644 --- a/src/util/AjaxUtils.ts +++ b/src/util/AjaxUtils.ts @@ -8,8 +8,9 @@ export const baseUrl = `http://${host}`; export const copyBaseUrl = `${baseUrl}:7025`; export const operatorBaseUrl = `${baseUrl}:8091` export const operatorPluginBaseUrl = `${baseUrl}:8099`; -export const aiShopBaseUrl = `http://192.168.0.115:8099`; +export const aiShopBaseUrl = `http://192.168.0.115:8081`; export const WebSocketBaseUrl: string = `ws://${host}:7025/copyright`; + // ---- prod // export const baseUrl = `https://www.aimzhu.com`; // export const copyBaseUrl = `${baseUrl}`;