From 35b1390c90a61a68444d2860e2bf1217eb5ee318 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B0=A2=E6=AC=A3=E6=82=A6?= <2289014031@qq.com>
Date: Tue, 10 Sep 2024 09:10:04 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=8E=A8=E7=BA=BF=E4=B8=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/market/orders.js | 2 --
src/views/market/apitest/index.vue | 33 ++++++++++++++++++++++++++----
src/views/market/orders/index.vue | 13 +++++++-----
3 files changed, 37 insertions(+), 11 deletions(-)
diff --git a/src/api/market/orders.js b/src/api/market/orders.js
index bcd8bbb..e73d81a 100644
--- a/src/api/market/orders.js
+++ b/src/api/market/orders.js
@@ -72,8 +72,6 @@ export function getOut(){
export function updateByordersState1(data){
return request({
-
-
url:"/market/orders/updateByordersState1",
method: "POST",
data: data
diff --git a/src/views/market/apitest/index.vue b/src/views/market/apitest/index.vue
index e119490..6cf1618 100644
--- a/src/views/market/apitest/index.vue
+++ b/src/views/market/apitest/index.vue
@@ -286,7 +286,7 @@
@@ -307,8 +307,9 @@ import {
} from "@/api/apitest/apitest";
import api from "js-cookie";
import {companyauthentication, ifcompanyauthentication} from "@/api/authentication/authentication";
-import {selectproductspecification} from "@/api/market/product";
+import { selectproductspecification, showByproductId } from '@/api/market/product'
import myapi from "@/views/market/myapi/index.vue";
+import { addordersup, updateOrders } from '@/api/market/orders'
export default {
name: "Apitest",
@@ -327,9 +328,12 @@ export default {
activeName: 'first',
dialogVisible: false,
dialogVisible1: false,
+ productInfo: null,
ruleForm:{},
tableData:[],
newapi:{},
+ products: [],
+ orders: [],
//请求头部
heanderData:[],
//请求参数
@@ -550,15 +554,36 @@ export default {
});
}},
confirmSelection(row) {
- if (this.selectedRow) {
+ if (this.selectedRow) {
// 这里假设你有一个发起支付的方法,传入所选行的数据
// startPayment(this.selectedRow);
console.log(row)
window.open("http://localhost:9701/alipay/pay?ordersPrice=" + row.middlePrice)
this.$message.success('付款成功')
- }
+ showByproductId(row).then(
+ res =>{
+ this.$message.success(res.msg)
+ }
+ ),
+ showByproductId().then(
+ response => {
+ this.productInfo = response.data;
+ const orderData = {
+ ordersProduct:this.productInfo.productId,
+ productName: this.productInfo.productName,
+ ordersPrice: this.productInfo.productPrice,
+ ordersSpecification : this.productInfo.productSpecification
+ };
+ return addordersup(orderData);
+ if (response.code==200){}
+ this.addordersoff=false
+ }).then(() => {
+ this.$message.success('订单添加成功');
+ })
+ location.reload();
+ }
},
show(){
diff --git a/src/views/market/orders/index.vue b/src/views/market/orders/index.vue
index ebb691b..6bcc3a7 100644
--- a/src/views/market/orders/index.vue
+++ b/src/views/market/orders/index.vue
@@ -78,6 +78,7 @@
+
待支付
已付款
未付款
@@ -166,6 +167,7 @@ import {
import { diGui } from "@/api/market/orders";
import axios from 'axios'
import item from '@/layout/components/Sidebar/Item.vue'
+import { showByproductId } from '@/api/market/product'
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
@@ -196,6 +198,7 @@ export default {
addtitle:'',
addordersoff:false,
ordersForm:{},
+ productInfo: null,
options: [{
value: ' ',
@@ -314,16 +317,16 @@ export default {
pay(row){
console.log(row)
- window.open("http://21.12.0.10:80/prod-api/market/alipay/pay?productName="+row.productName +"&ordersNum="+row.ordersNum+"&ordersPrice="+row.ordersPrice)
- this.$message.success('付款成功')
+
updateByordersState1(ordersForm).then(response=>{
- alert(response.msg)
if (response.code==200){}
- this.addordersoff=false
})
+ window.open("http://21.12.0.10:80/prod-api/market/alipay/pay?productName="+row.productName +"&ordersNum="+row.ordersNum+"&ordersPrice="+row.ordersPrice)
+ this.$message.success('付款成功')
- },
+
+ },
getOut(){
this.download('system/operlog/export', {
From 6e8f457939519bf6ae2d946fd8f43f54bc529eea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B0=A2=E6=AC=A3=E6=82=A6?= <2289014031@qq.com>
Date: Tue, 10 Sep 2024 10:09:43 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E6=B5=8B=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/market/orders.js | 1 -
src/views/market/orders/index.vue | 1 -
2 files changed, 2 deletions(-)
diff --git a/src/api/market/orders.js b/src/api/market/orders.js
index e73d81a..97669c5 100644
--- a/src/api/market/orders.js
+++ b/src/api/market/orders.js
@@ -71,7 +71,6 @@ export function getOut(){
export function updateByordersState1(data){
return request({
-
url:"/market/orders/updateByordersState1",
method: "POST",
data: data
diff --git a/src/views/market/orders/index.vue b/src/views/market/orders/index.vue
index 6bcc3a7..75eded5 100644
--- a/src/views/market/orders/index.vue
+++ b/src/views/market/orders/index.vue
@@ -321,7 +321,6 @@ export default {
updateByordersState1(ordersForm).then(response=>{
if (response.code==200){}
})
-
window.open("http://21.12.0.10:80/prod-api/market/alipay/pay?productName="+row.productName +"&ordersNum="+row.ordersNum+"&ordersPrice="+row.ordersPrice)
this.$message.success('付款成功')