先货后款完成后订单付款

This commit is contained in:
THK3121 2023-07-07 17:31:44 +08:00
parent 1054b127c4
commit acb22b28da
14 changed files with 1767 additions and 42 deletions

View File

@ -40,6 +40,12 @@ export function setAdminOrderPrice(merId, id, data) {
export function postconfirm(merId, data) {
return request.post("admin/" + merId + "/confirm" , data, { login: true });
}
/**
* 同意先货后款
*/
export function postsettle(merId, data) {
return request.post("admin/" + merId + "/settle" , data, { login: true });
}
/**
* 订单备注
*/

View File

@ -486,6 +486,12 @@
"navigationBarTitleText": "我的订单"
}
},
{
"path": "order_list/order",
"style": {
"navigationBarTitleText": "我的订单"
}
},
{
"path": "order_list/search",
"style": {
@ -674,7 +680,16 @@
}
}
]
,{
"path" : "payment/payment",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
]
},
{
"root": "pages/store",

View File

@ -77,12 +77,59 @@
</view>
</view>
</view>
<view class="public-wrapper">
<view class="public_footer">
<view class="footer_top">
<image src="@/static/images/jiankong.png"></image>
<text>订单监控</text>
</view>
<view class="footer_bon">
<view class="bon_top">
<view class="public_img">
</view>
<view >
<view class="text_top">
<view class="text">
啊十分大师傅但是发sdfsfasfsfs
</view>
<view class="monry">
$ 100.00
</view>
</view>
<view class="text_order">
是的方法
</view>
</view>
</view>
<view class="bon_bon">
<view class="order">
采购数量
<view class="txt">
sdfa
</view>
</view>
<view class="order" style="border-left: 1px solid #999999;border-right: 1px solid #999999;">
已售数量
<view class="txt">
sdfa
</view>
</view>
<view class="order">
库存数量
<view class="txt">
sdfa
</view>
</view>
</view>
</view>
</view>
<button class="footer-bnt" @click="navigator()">查看更多 ></button>
<!-- <view class="public-wrapper">
<navigator class="item" :url="`/pages/admin/order/monitor?merId=${mer_id}`"
hover-class="none">
<view class="num">订单监控</view>
</navigator>
</view>
</view> -->
<Loading :loaded="loaded" :loading="loading"></Loading>
</view>
</view>
@ -170,7 +217,12 @@
})
}
);
}
},
navigator(){
uni.navigateTo({
url:`/pages/admin/order/monitor?merId=${this.mer_id}`
})
}
},
onReachBottom() {
this.getList(this.mer_id)
@ -313,6 +365,13 @@
background-color: #fff;
border-radius: 10upx;
padding-top: 25upx;
.item{
.num{
display: flex;
justify-content: flex-start;
align-items: center;
}
}
}
.public-wrapper .nav {
@ -346,9 +405,90 @@
border-bottom: 1px solid #f7f7f7;
height: 70upx;
font-size: 24upx;
}
.public-wrapper .conter .item .turnover {
color: #d84242;
}
.public_footer{
width: 90%;
margin: auto;
.footer_top{
display: flex;
align-items: center;
margin: 16px 0 16px 0;
image{
width: 22px;
height: 22px;
margin-right: 5px;
}
}
.footer_bon{
width: 100%;
border-radius: 8px;
background-color: #fff;
padding-bottom: 10px;
margin-bottom: 10px;
.bon_top{
display: flex;
justify-content: flex-start;
align-items: center;
.public_img{
width: 60px;
height: 60px;
margin: 12px;
}
.text_top{
display: flex;
justify-content: flex-start;
align-items: center;
margin: 3px 0 3px 0;
.text{
width: 180px;
background-color: #2291f8;
overflow: hidden;
white-space:nowrap;
text-overflow:ellipsis;
}
.monry{
margin-left: 20px;
color: #F84221;
}
}
}
.bon_bon{
width: 90%;
height: 66px;
background: #F5F5F5;
border-radius: 4px 4px 4px 4px;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
margin: auto;
margin-bottom: 10px;
.order{
width: 120px;
.txt{
margin-top: 5px;
}
}
}
}
}
.footer-bnt{
margin-top: 20px;
width: 100px;
height: 40px;
border-radius: 15px;
margin: auto;
line-height: 40px;
border: 1px solid #CCCCCC;
background-color: #f5f5f5;
color: #999999;
font-size: 13px
}
</style>

View File

@ -265,6 +265,7 @@
id:id,
type:number
}
this.getIndex();
postconfirm(this.merId,data).then(res=>{
console.log(res);
})

View File

@ -69,7 +69,7 @@
<image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image>
<text class="text">供货采购</text>
</view>
<view class="examine" @click="navigator('/pages/users/order_list/index?status=-1')">
<view class="examine" @click="navigator('/pages/users/order_list/index?status=-1&product_type=98')">
<image class="icon_img" :src="`${prefix}jhgl.png`" mode="aspectFill"></image>
<text class="text">进货管理</text>
</view>

View File

@ -385,6 +385,8 @@
this.pay_close = true;
this.pay_order_id = this.orderInfo.group_order_id.toString();
this.totalPrice = this.orderInfo.pay_price;
console.log(this.pay_order_id);
console.log(this.totalPrice);
},
/**
* 支付成功回调

View File

@ -125,8 +125,10 @@
<Loading :loaded="loaded" :loading="loading"></Loading>
</view>
<u-popup :show="show" @close="close" mode="center">
<image src="" mode=""></image>
<view class="popen" >
<h4 >线下入库</h4>
<h4 v-if="this.on_line==1">线下入库</h4>
<h4 v-else>线上入库</h4>
<view class="guige">
<u-radio-group v-model="checkboxValue1" placement="column" @change="checkboxChange" >
<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in checkboxList1" @change="radioChange(item)"

View File

@ -105,7 +105,7 @@
<view class="order-wrapper">
<view class="order-hd flex skeleton-rect">
<view class="left">我的订单</view>
<view class="right flex" @click="authTo('/pages/users/order_list/index?status=-1')" hover-class="none"
<view class="right flex" @click="authTo('/pages/users/order_list/index?status=-1&product_type=0')" hover-class="none"
open-type="navigate">
全部订单
<text class="iconfont icon-xiangyou"></text>

View File

@ -1005,6 +1005,9 @@
*/
getConfirm: function(address_id) {
// console.log(address_id, 'address_id')
// console.log(this.take,)
// console.log(this.subCoupon,)
// console.log(this.use_integral, )
let that = this;
// console.log(that.cartId.split(","))
uni.showLoading({
@ -1110,6 +1113,7 @@
real_name: res.data.real_name,
phone: res.data.phone
}
console.log(that.addressId);
this.getConfirm(that.addressId);
})
} else {

View File

@ -21,7 +21,7 @@
<view>全部</view>
<view class='num'>{{orderData.all || 0}}</view>
</view>
<view class='item' :class='orderStatus==0 ? "on": ""' @click="statusClick(0)">
<view class='item' :class='orderStatus==21 ? "on": ""' @click="statusClick(21)">
<view>待付款</view>
<view class='num'>{{orderData.noPay || 0}}</view>
</view>
@ -59,7 +59,7 @@
<view class='list'>
<!-- 代付款 -->
<view v-if="orderList.length > 0">
<block v-if="orderStatus == 0">
<block v-if="orderStatus == 21">
<view class='item' v-for="(item,index) in orderList" :key="index">
<view @click='goOrderDetails(item.group_order_id)'>
<view class='title acea-row row-between-wrapper'>
@ -416,7 +416,8 @@
id: ''
},
//
activity_type: ''
activity_type: '',
product_type:0,
};
},
computed: {
@ -498,7 +499,10 @@
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
if (options.product_type) this.product_type = options.product_type;
if (options.status) this.orderStatus = options.status;
},
/**
* 获取订单统计数据
@ -506,7 +510,9 @@
*/
getOrderData: function() {
let that = this;
orderData().then(res => {
orderData({
product_type:this.product_type
}).then(res => {
that.$set(that, 'orderData', res.data);
})
},
@ -540,10 +546,13 @@
*
*/
goPay: function(pay_price, order_id) {
this.$set(this, 'pay_close', true);
this.order_id = order_id;
this.pay_order_id = order_id.toString()
this.$set(this, 'totalPrice', pay_price);
uni.navigateTo({
url: '/pages/users/payment/payment?order_id=' + order_id
});
// this.$set(this, 'pay_close', true);
// this.order_id = order_id;
// this.pay_order_id = order_id.toString()
// this.$set(this, 'totalPrice', pay_price);
},
/**
* 支付成功回调
@ -659,37 +668,17 @@
that.loadTitle = "加载更多";
if (that.isReady) {
that.isReady = false
if (that.orderStatus == 0) {
groupOrderList({
page: that.page,
limit: that.limit,
}).then(res => {
console.log(res);
that.isReady = true;
let list = res.data.list || [];
let loadend = list.length < that.limit;
// console.log(that.orderList)
that.orderList = that.page == 1 ? list : that.$util.SplitArray(list, that
.orderList);
that.$set(that, 'orderList', that.orderList);
// console.log(that.orderList)
that.getProductCount();
that.loadend = loadend;
that.loading = false;
that.loadTitle = loadend ? "我也是有底线的" : '加载更多';
that.page = that.page + 1
})
} else {
getOrderList({
status: that.orderStatus - 1,
status: that.orderStatus-1,
page: that.page,
limit: that.limit,
product_type:that.product_type
}).then(res => {
console.log(res);
let list = res.data.list || [];
let loadend = list.length < that.limit;
that.orderList = that.page == 1 ? list : that.$util.SplitArray(list, that
.orderList);
that.orderList = that.page == 1 ? list : that.$util.SplitArray(list, that.orderList);
that.$set(that, 'orderList', that.orderList);
that.getProductCount();
that.loadend = loadend;
@ -702,7 +691,7 @@
that.loadTitle = "加载更多";
})
}
}
},
/**
* 获取定金预售订单列表

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,384 @@
<template>
<view class="center">
<view class='wrapper'>
<view class='item'>
<view>支付方式</view>
<view class='list'>
<!-- #ifdef H5 -->
<view class='payItem acea-row row-middle' :class='active==index ?"on":""' @tap='payItem(index)'
v-for="(item,index) in cartArr" :key='index' v-if="item.payStatus==1">
<view class='name acea-row row-center-wrapper'>
<view class='iconfont animated'
:class='(item.icon) + " " + (animated==true&&active==index ?"bounceIn":"")'></view>
{{item.name}}
</view>
<view class='tip'>
{{item.title}}
<block v-if="item.value == 'balance'">
{{userInfo.now_money}}
</block>
</view>
</view>
<!-- #endif -->
<!-- #ifdef MP || APP-PLUS -->
<view class='payItem acea-row row-middle' :class='active==index ?"on":""' @tap='payItem(index)'
v-for="(item,index) in cartArr" :key='index' v-if="item.payStatus==1">
<view class='name acea-row row-center-wrapper'>
<view class='iconfont animated'
:class='(item.icon) + " " + (animated==true&&active==index ?"bounceIn":"")'></view>
{{item.name}}
</view>
<view class='tip'>
{{item.title}}
<block v-if="item.value == 'balance'">
{{userInfo.now_money}}
</block>
</view>
</view>
<!-- #endif -->
</view>
</view>
</view>
<view class="settel">
<view class='settel-t'>
<view>实付款</view>
<view class='conter'> {{couponData.orderList[0].pay_price}}</view>
</view>
</view>
<view class="settel">
<view class='settel-t'>
<view>利息合计:</view>
<view class="conter">
<view class='con_text'> {{couponData.orderList[0].pay_price}}</view>
<view class='con_text' style="color: #F84221;" v-if="couponData.pay_type == 8">已逾期1天)</view>
</view>
</view>
</view>
<view class='footer acea-row row-between-wrapper'>
<view class="footer_count">
<view>
合计:
<text class='pColor' v-if="cartArr[4].payStatus == 1">0.00</text>
<text class='pColor' v-else>{{couponData.orderList[0].pay_price}}</text>
</view>
<view style="font-size: 14px;color: #F84221;" v-if="couponData.pay_type == 8">
可结算周期到期后再付款{{totalPrice}}
</view>
</view>
<view class='settlement' @tap="SubOrder">
提交订单
</view>
</view>
</view>
</template>
<script>
import {
getUserInfo,
} from '@/api/user.js';
import {
groupOrderDetail,
orderPay
} from '@/api/order.js'
export default {
data() {
return {
animated: false,
totalPrice: 0,
couponData: {},
active: 0, // ,
userInfo: {}, //
cartArr: [{
"name": "微信支付",
"icon": "icon-weixin2",
value: 'weixin',
title: '微信快捷支付',
payStatus: 1,
},
{
name: "支付宝支付",
icon: "icon-icon34",
// #ifdef H5 || APP-PLUS
value: 'alipay',
// #endif
// #ifdef MP
value: 'alipayQr',
// #endif
title: '支付宝支付',
payStatus: this.$store.getters.globalData.alipay_open
},
{
"name": "余额支付",
"icon": "icon-icon-test",
value: 'balance',
title: '可用余额:',
payStatus: this.$store.getters.globalData.yue_pay_status,
},
{
"name": "线下支付",
"icon": "icon-yinhangqia",
value: 'offline',
title: '线下支付',
payStatus: 2,
}, {
"name": "先货后款",
"icon": "tan-a-lujing17324",
value: 'creditBuy',
title: `结算周期30天 `,
label: '日利率0.05%',
order_id: '',
},
],
order_id: ''
};
},
onLoad(options) {
this.order_id = options.order_id
this.getOrderInfo(this.order_id)
this.getUserInfo()
},
methods: {
payItem: function(e) {
let that = this;
let active = e;
that.active = active;
that.animated = true;
that.payType = that.cartArr[active].value;
if (that.payType == 'weixin') {
that.payType = that.from
}
console.log(that.payType);
},
getUserInfo() {
getUserInfo().then(res => {
this.userInfo = res.data
})
},
getOrderInfo(order_id) {
groupOrderDetail(order_id).then(res => {
this.couponData = res.data
console.log(res);
})
},
SubOrder() {
orderPay(this.order_id, {
type: this.payType
}).then(res => {
console.log(res);
setTimeout(() => {
uni.navigateBack({
delta: 1
})
}, 1000)
uni.showToast({
title: res.message
})
})
}
}
}
</script>
<style lang="scss" scoped>
.center {
.wrapper .item .discount .placeholder {
color: #ccc;
text-align: right;
}
.wrapper {
margin-bottom: 12rpx;
background-color: #fff;
padding-top: 20px;
}
.wrapper .item {
padding: 27rpx 30rpx;
font-size: 30rpx;
color: #282828;
}
.wrapper .item .discount .iconfont {
color: #515151;
font-size: 30rpx;
margin-left: 15rpx;
}
.wrapper .item .discount .num {
font-size: 32rpx;
margin-right: 20rpx;
}
.wrapper .item .shipping {
font-size: 30rpx;
color: #999;
position: relative;
padding-right: 58rpx;
}
.wrapper .item .shipping .iconfont {
font-size: 35rpx;
color: #707070;
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
margin-left: 30rpx;
}
.wrapper .item input {
flex: 1;
height: 100%;
margin-left: 20rpx;
text-align: right;
}
.wrapper .item .placeholder {
color: #ccc;
}
.wrapper .item .list {
margin-top: 35rpx;
}
.wrapper .item .list .payItem {
border: 1px solid #eee;
border-radius: 6rpx;
height: 86rpx;
width: 100%;
box-sizing: border-box;
margin-top: 20rpx;
font-size: 28rpx;
color: #282828;
}
.wrapper .item .list .payItem.on {
border-color: var(--view-theme);
color: var(--view-theme);
}
.wrapper .item .list .payItem .name {
width: 50%;
text-align: center;
border-right: 1px solid #eee;
justify-content: left;
padding-left: 80rpx;
}
.wrapper .item .list .payItem .name .iconfont {
width: 44rpx;
height: 44rpx;
border-radius: 50%;
text-align: center;
line-height: 44rpx;
background-color: #fe960f;
color: #fff;
font-size: 30rpx;
margin-right: 15rpx;
}
.wrapper .item .list .payItem .name .iconfont.icon-weixin2 {
background-color: #41b035;
}
.wrapper .item .list .payItem .name .iconfont.icon-icon34 {
background-color: #4295D5;
}
.wrapper .item .list .payItem .tip {
width: 49%;
text-align: center;
font-size: 26rpx;
color: #aaa;
}
.footer {
width: 100%;
height: 100rpx;
height: calc(100rpx+ constant(safe-area-inset-bottom)); /// IOS<11.2/
height: calc(100rpx + env(safe-area-inset-bottom)); /// IOS>11.2/
background-color: #fff;
padding: 0 30rpx;
font-size: 28rpx;
color: #333;
box-sizing: border-box;
position: fixed;
bottom: 0;
left: 0;
z-index: 30;
.footer_count {
font-size: 28rpx;
}
.coupon_price {
color: #999999;
font-size: 20rpx;
margin-top: 10rpx;
text {
color: #282828;
padding: 2rpx 10rpx;
background: #F5F5F5;
border-radius: 26rpx;
margin-left: 20rpx;
line-height: 30rpx;
height: 30rpx;
display: inline-block;
}
}
.settlement {
font-size: 30rpx;
color: #fff;
width: 240rpx;
height: 70rpx;
background: linear-gradient(90deg, #F98649 0%, #F34E45 100%);
border-radius: 50rpx;
text-align: center;
line-height: 70rpx;
&.disabled {
background-color: #cccccc;
}
}
.transparent {
opacity: 0
}
}
.settel {
width: 100%;
background-color: #fff;
height: 70px;
padding: 0 15px 0 15px;
line-height: 70px;
.settel-t {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.con_text {
display: flex;
justify-content: flex-end;
height: 35px;
margin: auto;
line-height: 35px;
}
}
}
</style>

View File

@ -4,7 +4,7 @@
<image class="con_img" src="@/static/images/bg1.png" mode=""></image>
<image class="con_ico" src="@/static/images/bgic1.png" mode=""></image>
<view class="con_text">
<h3>款后货</h3>
<h3>款后货</h3>
<span>先付款后发货</span>
</view>
</view>
@ -12,7 +12,7 @@
<image class="con_img" src="@/static/images/bg2.png" mode=""></image>
<image class="con_ico" src="@/static/images/bgic2.png" mode=""></image>
<view class="con_text">
<h3>货后款</h3>
<h3>货后款</h3>
<span>先发货后付款</span>
</view>
</view>

BIN
static/images/jiankong.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B