You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
500 lines
11 KiB
500 lines
11 KiB
<template>
|
|
|
|
<view class="box">
|
|
<view class="list list-mt" v-for="(item,index) in zuanti?listsui:list" :key="index"
|
|
@click="btn(item.order_id,item.member_id)">
|
|
<view v-if="item.sales_money>0" class="list-Openonbehalf">
|
|
特批价|代开
|
|
</view>
|
|
<view v-if="item.is_first_order" class="list-Openonbehalftwo">
|
|
首单
|
|
</view>
|
|
<view class="list-data df jcsb">
|
|
<div>订单编号: {{item.order_no}}</div>
|
|
{{item.order_status_name}}
|
|
</view>
|
|
<div class="list-Splitline"></div>
|
|
<div class="list-hospital">客户名称<span>{{item.nickname}}</span>
|
|
|
|
<span v-if="item.order_type==1">普通订单</span>
|
|
<span v-if="item.order_type==2">门店订单</span>
|
|
<span v-if="item.order_type==3">本地配送订单</span>
|
|
<span v-if="item.order_type==4">虚拟订单</span>
|
|
|
|
<span v-if="item.order_type==5">代客下单</span>
|
|
</div>
|
|
<view class="list-time">
|
|
下单时间<span>{{item.create_time | time}}</span><span>{{item.time}}</span>
|
|
</view>
|
|
<view class="list-time">
|
|
支付状态<span>{{item.pay_status_name}}</span>
|
|
<span v-if="item.pay.pay_money > 0">剩余未支付金额{{item.pay.pay_money}}</span>
|
|
</view>
|
|
<view class="list-money">
|
|
合计{{item.goods_num}}件商品,
|
|
<span v-if="item.sales_money>0">订单金额¥{{item.sales_money}}</span>
|
|
<span v-else>订单金额¥{{item.order_money}}</span>
|
|
<span v-if="item.wait_status==1">(待收款)</span>
|
|
<span v-if="item.wait_status==2">(已收款)</span>
|
|
</view>
|
|
<view class="list-btn df jcf">
|
|
<div class="df aic jcsa listone" v-if="item.sales_balance==1 "
|
|
@click.stop="increased(item,item.order_id,item.member_id,item.sales_balance,item.sales_status)">新增收款
|
|
</div>
|
|
|
|
<div class="df aic jcsa listtwo" v-if="item.sales_balance==1 "
|
|
@click.stop="affirm(item.order_id,item.member_id,item.sales_balance,item.sales_status)">确认收款</div>
|
|
<div class="df aic jcsa listsui" @click.stop="more(item)">再次订购</div>
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
const timesfm = require('@/common/js/map/message.js')
|
|
import eventBus from '@/common/js/bus.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
show1: false,
|
|
indexa: 0,
|
|
columns: [
|
|
['中国', '美国', '日本']
|
|
],
|
|
value: '',
|
|
listsui: [],
|
|
show: false,
|
|
page: 1,
|
|
list: [],//全部订单数据
|
|
// url:'/page_salesman_order/index/index?index=${index=0}',
|
|
dataList: [],
|
|
zuanti: false
|
|
};
|
|
},
|
|
created() {
|
|
this.getwrongtllist()
|
|
console.log(this.zuanti);
|
|
},
|
|
methods: {
|
|
// queryList(pageNo, pageSize) {
|
|
// this.page += 10
|
|
// this.$api.sendRequest({
|
|
// url: '/api/salasmanorder/lists',
|
|
// data: {
|
|
// page_size: this.page
|
|
// },
|
|
// success: res => {
|
|
// console.log(res, '全部');
|
|
// this.list = res.data.list
|
|
// }
|
|
// })
|
|
// this.$refs.paging.reload();
|
|
// this.$refs.loadingCover.hide();
|
|
// this.$refs.paging.complete(this.list);
|
|
|
|
// },
|
|
getwrong(order_status, member_id, is_today, sales_status, searchText, one, start_time,
|
|
end_time) {
|
|
let obj = {
|
|
order_status,
|
|
member_id,
|
|
is_today,
|
|
sales_status,
|
|
searchText,
|
|
start_time,
|
|
end_time
|
|
}
|
|
if (searchText) {
|
|
delete obj.sales_status
|
|
}
|
|
if (is_today) {
|
|
delete obj.sales_status
|
|
}
|
|
if (!sales_status) {
|
|
delete obj.sales_status
|
|
}
|
|
console.log(one, '开关123');
|
|
this.zuanti = one
|
|
this.$api.sendRequest({
|
|
url: '/api/salasmanorder/lists',
|
|
data: obj,
|
|
success: res => {
|
|
this.listsui = res.data.list
|
|
}
|
|
})
|
|
},
|
|
statusbtn(item) {
|
|
// this.show=true
|
|
console.log('item', item);
|
|
},
|
|
getwrongtllist() {
|
|
this.$api.sendRequest({
|
|
url: '/api/salasmanorder/lists',
|
|
data: {},
|
|
success: res => {
|
|
console.log(res, '全部');
|
|
this.list = res.data.list
|
|
}
|
|
})
|
|
},
|
|
getwrongtllisttwo() {
|
|
this.$api.sendRequest({
|
|
url: '/api/salasmanorder/lists',
|
|
data: {},
|
|
success: res => {
|
|
console.log(res, '全部');
|
|
this.list = res.data.list
|
|
uni.stopPullDownRefresh()
|
|
}
|
|
})
|
|
},
|
|
getwrongtllistsui() {
|
|
this.page += 1
|
|
this.$api.sendRequest({
|
|
url: '/api/salasmanorder/lists',
|
|
data: {
|
|
page: this.page
|
|
},
|
|
success: res => {
|
|
|
|
this.list = [...this.list, ...res.data.list]
|
|
console.log(this.list, '全部');
|
|
uni.stopPullDownRefresh()
|
|
}
|
|
})
|
|
},
|
|
change(e) {
|
|
console.log('change', e);
|
|
},
|
|
btn(order, member) {
|
|
// order 订单id member 下单客户id
|
|
// console.log(this.url,'路径1');
|
|
let _this = this
|
|
setTimeout(() => {
|
|
eventBus.$emit('urlone', 0)
|
|
}, 500)
|
|
uni.navigateTo({
|
|
url: `../Order_details/Order_details?or=${order}&me=${member}`
|
|
})
|
|
},
|
|
click(index) {
|
|
console.log(index.index, 'index');
|
|
this.indexa = index.index
|
|
},
|
|
increased(item, order, member, sales_balance, sales_status) {
|
|
// event.stopPropagation();
|
|
// console.log(item);
|
|
let _this = this
|
|
if (sales_balance == 0) {
|
|
this.$util.showToast({
|
|
title: '无收款记录'
|
|
});
|
|
return
|
|
}
|
|
if (sales_status == 0) {
|
|
this.$util.showToast({
|
|
title: '未审核'
|
|
});
|
|
return
|
|
}
|
|
if (sales_status == 2) {
|
|
this.$util.showToast({
|
|
title: '已驳回'
|
|
});
|
|
return
|
|
}
|
|
setTimeout(() => {
|
|
uni.$emit('Collection', item)
|
|
}, 500)
|
|
uni.navigateTo({
|
|
url: `/page_salesman_order/Customer_payment/Customer_payment?id=${order}&di=${member}`
|
|
})
|
|
},
|
|
affirm(order_id, member_id, sales_balance, sales_status) {
|
|
let _this = this
|
|
if (sales_balance == 0) {
|
|
this.$util.showToast({
|
|
title: '无收款记录'
|
|
});
|
|
return
|
|
}
|
|
if (sales_status == 0) {
|
|
this.$util.showToast({
|
|
title: '未审核'
|
|
});
|
|
return
|
|
}
|
|
if (sales_status == 2) {
|
|
this.$util.showToast({
|
|
title: '已驳回'
|
|
});
|
|
return
|
|
}
|
|
// event.stopPropagation();
|
|
console.log(order_id, member_id);
|
|
this.$api.sendRequest({
|
|
url: '/api/salasmanorder/detail',
|
|
data: {
|
|
order_id: order_id,
|
|
member_id: member_id
|
|
},
|
|
success: res => {
|
|
this.data = res.data
|
|
console.log(res.data, '订单详情');
|
|
// setTimeout(()=>{
|
|
// uni.$emit('CommodityList',res.data.order_goods)
|
|
// },500)
|
|
// uni.navigateTo({
|
|
// // url:this.list[this.current.URL]
|
|
// url:`/page_salesman_index/Commodity_list/Commodity_list`
|
|
// })
|
|
uni.navigateTo({
|
|
// url:this.list[this.current.URL]
|
|
url: `../Collection_record/Collection_record?id=${res.data.member_id}&di=${res.data.order_id}`
|
|
})
|
|
}
|
|
})
|
|
// this.$util.showToast({
|
|
// title: '收款成功'
|
|
// });
|
|
},
|
|
more(item) {
|
|
// event.stopPropagation();
|
|
console.log(item);
|
|
// setTimeout(() => {
|
|
// uni.$emit('zaicidinggou', item.order_goods)
|
|
// }, 500)
|
|
// uni.navigateTo({
|
|
// url: `/page_salesman_index/affirm_order/affirm_order?id=${item.member_id}&shop=${item.store_id}`
|
|
// })
|
|
setTimeout(() => {
|
|
uni.$emit('zaicidinggou', {
|
|
one: item.order_goods,
|
|
two: 1
|
|
})
|
|
}, 500)
|
|
uni.navigateTo({
|
|
url: `/page_salesman_index/Select_item/Select_item?st=${item.member_id}&di=${item.store_id}`
|
|
})
|
|
}
|
|
},
|
|
filters: {
|
|
time(num) {
|
|
return timesfm(num * 1000)
|
|
|
|
}
|
|
},
|
|
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.box {
|
|
margin-top: -28rpx;
|
|
}
|
|
|
|
.box .list:nth-child(1) {
|
|
margin: 34rpx 24rpx 0 24rpx !important;
|
|
// margin: 0 !important;
|
|
}
|
|
|
|
.list {
|
|
margin: 42rpx 24rpx 0 24rpx;
|
|
width: 702rpx;
|
|
height: 424rpx;
|
|
background: #FFFFFF;
|
|
border-radius: 24rpx;
|
|
// padding: 32rpx;
|
|
box-sizing: border-box;
|
|
padding: 24rpx;
|
|
position: relative;
|
|
|
|
.list-Openonbehalf {
|
|
text-align: center;
|
|
background: #00C594;
|
|
border-radius: 30rpx;
|
|
position: absolute;
|
|
top: -10rpx;
|
|
left: 0;
|
|
width: 142rpx;
|
|
height: 34rpx;
|
|
font-size: 24rpx;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #FFFFFF;
|
|
line-height: 34rpx;
|
|
}
|
|
|
|
.list-Openonbehalftwo {
|
|
text-align: center;
|
|
background: #ff5500;
|
|
border-radius: 30rpx;
|
|
position: absolute;
|
|
top: -10rpx;
|
|
left: 140rpx;
|
|
width: 100rpx;
|
|
height: 34rpx;
|
|
font-size: 24rpx;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #FFFFFF;
|
|
line-height: 34rpx;
|
|
}
|
|
|
|
.list-data {}
|
|
|
|
.list-data div:nth-child(1) {
|
|
|
|
font-size: 28rpx;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #222222;
|
|
line-height: 40rpx;
|
|
}
|
|
|
|
.list-data div:nth-child(2) {
|
|
font-size: 28rpx;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
|
|
line-height: 40rpx;
|
|
}
|
|
|
|
.list-Splitline {
|
|
width: 638rpx;
|
|
height: 2rpx;
|
|
background: #F2F2F2;
|
|
border-radius: 16rpx;
|
|
margin-top: 28rpx;
|
|
}
|
|
|
|
.list-hospital {
|
|
font-size: 28rpx;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #999999;
|
|
line-height: 40rpx;
|
|
margin-top: 30rpx;
|
|
}
|
|
|
|
.list-hospital span:nth-child(1) {
|
|
|
|
font-size: 28rpx;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #222222;
|
|
line-height: 40rpx;
|
|
margin-left: 42rpx;
|
|
margin-right: 16rpx;
|
|
}
|
|
|
|
.list-hospital span:nth-child(2) {
|
|
width: 92rpx;
|
|
height: 36rpx;
|
|
font-size: 20rpx;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #FF7D02;
|
|
line-height: 28rpx;
|
|
background-color: rgb(255, 240, 226);
|
|
}
|
|
|
|
.list-time {
|
|
margin-top: 24rpx;
|
|
font-size: 28rpx;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #999999;
|
|
line-height: 40rpx;
|
|
}
|
|
|
|
.list-time span:nth-child(1) {
|
|
font-size: 28rpx;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #222222;
|
|
line-height: 40rpx;
|
|
margin-right: 10rpx;
|
|
margin-left: 42rpx;
|
|
}
|
|
|
|
.list-time span:nth-child(2) {
|
|
font-size: 28rpx;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #222222;
|
|
line-height: 40rpx;
|
|
}
|
|
|
|
.list-money {
|
|
margin-top: 24rpx;
|
|
font-size: 24rpx;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #999999;
|
|
line-height: 34rpx;
|
|
}
|
|
|
|
.list-money span:nth-child(1) {
|
|
color: rgb(58, 58, 58);
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-size: 28rpx;
|
|
}
|
|
|
|
.list-money span:nth-child(2) {
|
|
color: rgb(58, 58, 58);
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-size: 28rpx;
|
|
}
|
|
|
|
.list-btn {
|
|
margin-top: 32rpx;
|
|
|
|
.listone {
|
|
width: 176rpx;
|
|
height: 60rpx;
|
|
border-radius: 30rpx;
|
|
border: 2rpx solid #E8E8E8;
|
|
margin-left: 94rpx;
|
|
font-size: 24rpx;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #333333;
|
|
line-height: 34rpx;
|
|
}
|
|
|
|
.listtwo {
|
|
width: 176rpx;
|
|
height: 60rpx;
|
|
border-radius: 30rpx;
|
|
border: 2rpx solid #E8E8E8;
|
|
margin-left: 24rpx;
|
|
font-size: 24rpx;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: #333333;
|
|
line-height: 34rpx;
|
|
}
|
|
|
|
.listsui {
|
|
width: 176rpx;
|
|
height: 60rpx;
|
|
background: #21BBF3;
|
|
border-radius: 30rpx;
|
|
margin-left: 24rpx;
|
|
|
|
font-size: 24rpx;
|
|
font-family: PingFangSC-Medium, PingFang SC;
|
|
font-weight: 500;
|
|
color: #FFFFFF;
|
|
line-height: 34rpx;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
.list-mt {
|
|
// margin-top: 28rpx;
|
|
}
|
|
</style>
|