({}) // 商品详情数据
+ const getGoodsDetail = async (goodsId: string) => {
+ try {
+ setLoading(true)
+ const res: any = await goodsDetail(goodsId)
+ // console.log(res);
+ setGoodsId(res.goodsId)
+ setGoodsDetailData(res)
+ setLoading(false)
+ } catch (error: any) {
+ // setLoading(false)
+ if (error.response) {
+ const data = error.response.data;
+ messageApi.open({
+ type: 'error',
+ content: data.msg ? data.msg : `${data.path}(${data.status})`,
+ });
+ }
+ }finally {
+ setLoading(false)
+ }
+ }
+ useEffect(() => {
+ // console.log('copyrightKeywords', copyrightKeywords);
+ // console.log('minPrice', minPrice);
+ // console.log('maxPrice', maxPrice);
+ // console.log('sort', sort);
+ // console.log('copyrightDate', copyrightDate);
+ // console.log('copyrightLanguage', copyrightLanguage);
+ // console.log('copyrightType', copyrightType);
+
+ // if (copyrightDate) {
+ // console.log('sellDate', dayjs(copyrightDate).year());
+ // }
setPage(1)
getBuyGoodsList(1)
}, [state])
return (
+
{messageContext}
{/* {contextHolder} */}
@@ -164,9 +236,10 @@ export default function CopyrightGgoods() {
render={(_text, record: any) => (
{
- // console.log(record.goodsId);
- setGoodsId(record.goodsId)
+ // console.log(record);
+
setGoodsDetailModal(true)
+ getGoodsDetail(record.goodsId)
}}>查看详情
)}
@@ -199,22 +272,203 @@ export default function CopyrightGgoods() {
onCancel={() => {
setGoodsDetailModal(false)
}}
- width={1250}
+ width={1200}
centered
-
>
- 商品详情{goodsId}
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
{
+ setBuyTipsModal(false)
+ }}
+ onOk={() => {
+ // alert(goodsId)
+ createOrderFun(goodsId)
+ }}
+ // width={1200}
+ centered
+ >
+ 确定购买该商品吗?
+
+
)
diff --git a/src/route/CopyrightGgoods/copyrightG-goods.css b/src/route/CopyrightGgoods/copyrightG-goods.css
index 8755afe..a79f835 100644
--- a/src/route/CopyrightGgoods/copyrightG-goods.css
+++ b/src/route/CopyrightGgoods/copyrightG-goods.css
@@ -17,4 +17,47 @@
}
.copyrightG-goods-search .css-dev-only-do-not-override-1ae8k9u.ant-input-number .ant-input-number-input{
height: 33px;
+}
+.goodsDetail{
+ display: flex;
+ justify-content: space-between;
+}
+.goodsDetailImg{
+ width: 49%;
+ height: 500px;
+ background-color: #F5F5F5;
+ padding: 30px;
+ box-sizing: border-box;
+ display: flex;
+ /* flex-direction: column; */
+ justify-content: center;
+ align-items: center;
+}
+.goodsDetailInputBox{
+ /* background-color: rgb(212, 212, 212); */
+ width: 49%;
+ height: 500px;
+ padding: 30px;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+
+}
+.detailBox{
+ display: flex;
+ align-items: center;
+ /* background-color: rgb(0, 0, 0); */
+}
+.detailBoxTitle{
+ font-size: 16px;
+ /* background-color: pink; */
+ text-wrap: nowrap;
+ margin-right: 10px;
+}
+.detailBoxRight{
+ margin-left: 10px;
+}
+.detailBoxText{
+ display:flex;
}
\ No newline at end of file
diff --git a/src/route/ProductRelease/ProductRelease.tsx b/src/route/ProductRelease/ProductRelease.tsx
index 4ca9f0f..cf0e919 100644
--- a/src/route/ProductRelease/ProductRelease.tsx
+++ b/src/route/ProductRelease/ProductRelease.tsx
@@ -284,6 +284,8 @@ export default function ProductRelease() {
} else {
console.error(error)
}
+ } finally {
+ setLoading(false)
}
}
@@ -402,7 +404,9 @@ export default function ProductRelease() {
+ }}
+ style={{ maxWidth: '100%' }}
+ >
diff --git a/src/route/ProductRelease/components/EditModal/EditModal.tsx b/src/route/ProductRelease/components/EditModal/EditModal.tsx
index 8b4a59f..7c26c4d 100644
--- a/src/route/ProductRelease/components/EditModal/EditModal.tsx
+++ b/src/route/ProductRelease/components/EditModal/EditModal.tsx
@@ -1040,9 +1040,10 @@ export default function EditModal(props: any) {
placeholder='请选择取得方式'
style={{ width: 498, height: 50 }}
options={[
- { value: '1', label: '平台申请' },
- { value: '2', label: '原始取得' },
- { value: '3', label: '继受取得' },
+ { value: '1', label: '原始取得' },
+ { value: '2', label: '继受取得(受让)' },
+ { value: '3', label: '继受取得(继承)' },
+ { value: '4', label: '继受取得(承受)' },
]}
/>
diff --git a/src/route/TradingGoods/TradingGoods.tsx b/src/route/TradingGoods/TradingGoods.tsx
index 5d33b89..b37200a 100644
--- a/src/route/TradingGoods/TradingGoods.tsx
+++ b/src/route/TradingGoods/TradingGoods.tsx
@@ -3,7 +3,7 @@ import {
// Select, DatePicker, Button,
Table,
// message,
- Space, Pagination,
+ Pagination,
Modal,
Spin
} from 'antd';
@@ -11,16 +11,17 @@ import {
// 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 { getBuyOrderList, confirmPayment } from '../../request/api'
import { useState, useEffect } 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';
export default function TradingGoods() {
const height = window.innerHeight - 180;
- // const [messageApi, contextHolder] = message.useMessage();
+ const [messageApi, contextHolder] = useMessage();
const dateFormat = 'YYYY-MM-DD';
const [page, setPage] = useState(1) //分页
const [total, setTotal] = useState(0) // 总条数
@@ -36,30 +37,70 @@ export default function TradingGoods() {
const [data, setData] = useState([]); // 表格数据
const getDataList = async (page: number) => {
- setLoading(true)
- const res: any = await getBuyOrderList({
- page: page,
- rows: 10,
+ try {
+ setLoading(true)
+ const res: any = await getBuyOrderList({
+ page: page,
+ rows: 10,
+ keywords: tradingKeywords ? tradingKeywords : '', // 关键字
+ startTime: tradingStartTime ? dayjs(tradingStartTime).format(dateFormat) : '', // 开始时间
+ endTime: tradingEndTime ? dayjs(tradingEndTime).format(dateFormat) : '', // 结束时间
+ orderStatus: tradingStatus ? tradingStatus : '' // 订单状态
+
+ })
+ setLoading(false)
+ // console.log(res.rows);
+ setData(res.rows)
+ // console.log(res.rows[0].goodsDTO.goodsName)
+ setPage(res.page)
+ setTotal(res.total)
+ } catch (error: any) {
+ // setLoading(false)
+ 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)
+ }
+ } finally {
+ setLoading(false)
+ }
- })
- setLoading(false)
- // console.log(res.rows);
- setData(res.rows)
- // console.log(res.rows[0].goodsDTO.goodsName)
- setPage(res.page)
- setTotal(res.total)
}
- useEffect(() => {
- console.log('tradingKeywords', tradingKeywords);
- console.log('tradingStartTime', tradingStartTime);
- console.log('tradingEndTime', tradingEndTime);
- console.log('tradingStatus', tradingStatus);
+ // 确认支付
+ const confirmPaymentFun = async (orderId: string) => {
+ try {
+ const res: any = await confirmPayment(orderId)
+ console.log(res);
- if (tradingStartTime) {
- console.log('tradingStartTime', dayjs(tradingStartTime).format(dateFormat));
+ } 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)
+ }
}
+ }
+ useEffect(() => {
+ // console.log('tradingKeywords', tradingKeywords);
+ // console.log('tradingStartTime', tradingStartTime);
+ // console.log('tradingEndTime', tradingEndTime);
+ // console.log('tradingStatus', tradingStatus);
+
+
+ // if (tradingStartTime) {
+ // console.log('tradingStartTime', dayjs(tradingStartTime).format(dateFormat));
+ // }
getDataList(1)
setPage(1)
}, [state])
@@ -73,7 +114,7 @@ export default function TradingGoods() {
return (
- {/* {contextHolder} */}
+ {contextHolder}
@@ -98,28 +139,31 @@ export default function TradingGoods() {
render={(_text, _record, index: number) => (
index + 1
)} align="center" />
-
+
(
{text.goodsName}
)}
/>
(
{text}
)} />
+
+
(
@@ -142,11 +186,15 @@ export default function TradingGoods() {
align="center"
title="操作"
fixed="right"
- width={200}
+ width={400}
render={(_text, record: any) => (
-
- {
+
+ {
// console.log(record.orderId);
setOrderId(record.orderId)
setFileModal(true)
@@ -158,7 +206,37 @@ export default function TradingGoods() {
}}>
订单详情
-
+ {
+
+ confirmPaymentFun(record.orderId)
+ }}
+ style={{
+ display: record.orderStatus == '1' ? 'unset' : 'none'
+ }}
+ >
+ 付款
+
+ {
+
+
+ }}
+ style={{
+ display: record.orderStatus == '2' ? 'unset' : 'none'
+ }}
+ >
+ 填写受让人信息
+
+ {
+
+
+ }}
+ style={{
+ display: record.orderStatus == '0' || record.orderStatus == '1' || record.orderStatus == '2' ? 'unset' : 'none'
+ }}
+ >
+ 取消订单
+
+
)}
/>
diff --git a/src/route/TradingGoods/trading-goods.css b/src/route/TradingGoods/trading-goods.css
index 8e9efd1..560fda9 100644
--- a/src/route/TradingGoods/trading-goods.css
+++ b/src/route/TradingGoods/trading-goods.css
@@ -11,4 +11,5 @@
.trading-goods-table-btn{
color:#888888;
cursor: pointer;
+ margin-left: 10px;
}
\ No newline at end of file
diff --git a/src/route/TransactionOrder/TransactionOrder.tsx b/src/route/TransactionOrder/TransactionOrder.tsx
index df01072..9cd0596 100644
--- a/src/route/TransactionOrder/TransactionOrder.tsx
+++ b/src/route/TransactionOrder/TransactionOrder.tsx
@@ -17,8 +17,10 @@ import File from '../../components/OrderDetailModal/components/File/File'
import { useEffect, useState } from 'react';
import { useLocation } from 'react-router-dom';
const { Column } = Table;
+import useMessage from "antd/es/message/useMessage";
import OrderDetail from '../../components/OrderDetailModal/OrderDetailModal'
export default function TransactionOrder() {
+ const [messageApi, messageContext] = useMessage();
const height = window.innerHeight - 180;
// const [messageApi, contextHolder] = message.useMessage();
const dateFormat = 'YYYY-MM-DD';
@@ -58,21 +60,37 @@ export default function TransactionOrder() {
const [data, setData] = useState([]); // 表格数据
const getDataList = async (page: number) => {
- setLoading(true)
- const res: any = await getSellOrderList({
- page: page,
- rows: 10,
- keywords: sellOrderKeywords ? sellOrderKeywords : '', // 关键字
- startTime: sellStatrtTime ? dayjs(sellStatrtTime).format(dateFormat) : '', // 开始时间
- endTime: sellEndTime ? dayjs(sellEndTime).format(dateFormat) : '', // 结束时间
- orderStatus: sellOrderStatus ? sellOrderStatus : '' // 订单状态
- })
- setLoading(false)
- // console.log(res.rows);
- setData(res.rows)
- // console.log(res.rows[0].goodsDTO.goodsName)
- setPage(res.page)
- setTotal(res.total)
+ try {
+ setLoading(true)
+ const res: any = await getSellOrderList({
+ page: page,
+ rows: 10,
+ keywords: sellOrderKeywords ? sellOrderKeywords : '', // 关键字
+ startTime: sellStatrtTime ? dayjs(sellStatrtTime).format(dateFormat) : '', // 开始时间
+ endTime: sellEndTime ? dayjs(sellEndTime).format(dateFormat) : '', // 结束时间
+ orderStatus: sellOrderStatus ? sellOrderStatus : '' // 订单状态
+ })
+ setLoading(false)
+ // console.log(res.rows);
+ setData(res.rows)
+ // console.log(res.rows[0].goodsDTO.goodsName)
+ setPage(res.page)
+ setTotal(res.total)
+ } 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)
+ }
+ } finally {
+ setLoading(false)
+ }
+
}
useEffect(() => {
@@ -83,7 +101,7 @@ export default function TransactionOrder() {
return (
{/* {contextHolder} */}
-
+ {messageContext}
{/* 表格 */}
{/* {data.length <= 0 ? (
diff --git a/src/util/AjaxUtils.ts b/src/util/AjaxUtils.ts
index 800c9f1..c4da653 100644
--- a/src/util/AjaxUtils.ts
+++ b/src/util/AjaxUtils.ts
@@ -16,6 +16,7 @@ export const WebSocketBaseUrl: string = 'ws://192.168.0.15:7025/copyright';
// export const WebSocketBaseUrl: string = '/copyright';
export const DevUserId: string = '80d3365e-0597-4988-979e-18ef1c3ec671'; // 18634604067
+// export const DevUserId: string = 'a2ab4e3a-fd92-4723-9217-f9955ee92911';
// export const DevUserId: string = '6fb8e783-243c-4eec-8d98-c9b1c8aeaa00'; // 15042810561 密码123456
// export const DevUserId: string = 'c2438eb8-2685-49a9-bf02-5111a5192d96'; // 18647109157
// export const DevUserId: string = '';
|