commit
5b6492c571
|
@ -71,9 +71,6 @@ export function getOut(){
|
|||
|
||||
export function updateByordersState1(data){
|
||||
return request({
|
||||
|
||||
|
||||
|
||||
url:"/market/orders/updateByordersState1",
|
||||
method: "POST",
|
||||
data: data
|
||||
|
|
|
@ -286,7 +286,7 @@
|
|||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible1 = false">取 消</el-button>
|
||||
<el-button type="primary" @click=" confirmSelection(row)">确 定</el-button>
|
||||
<el-button type="primary" @click="confirmSelection">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
|
@ -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://21.12.0.10:80/prod-api/market/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(){
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="订单款项状态" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==0">待支付</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==1">已付款</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==2">未付款</span>
|
||||
|
@ -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,14 +317,12 @@ 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){}
|
||||
|
||||
})
|
||||
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('付款成功')
|
||||
|
||||
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue