xiaobo 2 months ago
parent
commit
16ea11796a
5 changed files with 242 additions and 186 deletions
  1. +1
    -1
      api/model/order.js
  2. +5
    -2
      components/cart/CardList.vue
  3. +32
    -64
      pages/index/cart.vue
  4. +43
    -27
      pages_order/invoiceIssuance.vue
  5. +161
    -92
      pages_order/orderEvaluation.vue

+ 1
- 1
api/model/order.js View File

@ -23,7 +23,7 @@ const api = {
method: 'GET',
},
// 订单开具发票
evaluate: {
invoice: {
url: '/order_common/invoice',
method: 'POST',
},


+ 5
- 2
components/cart/CardList.vue View File

@ -21,10 +21,13 @@
<view class="button-sp-area">
<button @click.stop="skip(item,0)" v-if="item.state == 1" :style="{background: '#34312E;', color: '#AFAFAF',margin:'0 30rpx 0 0'}"
class="mini-btn" size="mini">取消活动</button>
<button @click.stop="skip(item,1)" v-if="item.state == 1" :style="{background: '#492623;', color: '#FF3E3F',margin:'0 30rpx 0 0'}"
class="mini-btn" size="mini">活动签到</button>
<button @click.stop="skip(item,2)" v-if="item.state == 2" :style="{background: '#492623;', color: '#FF3E3F',margin:'0 30rpx 0 0'}"
class="mini-btn" size="mini">评价活动</button>
<button @click.stop="skip(item,3)" v-if="item.state == 2" :style="{background: '#49361D;', color: '#FFB245',margin:'0 30rpx 0 0'}"
class="mini-btn" size="mini">开具发票</button>
</view>
@ -57,8 +60,8 @@
},
mounted() {},
methods: {
skip(val) {
this.$emit('btnClick', val)
skip(val, type) {
this.$emit('btnClick', val, type)
},
toOrderDetails(val) {
this.$emit('toOrderDetails', val)


+ 32
- 64
pages/index/cart.vue View File

@ -13,6 +13,7 @@
<cardList :cardListData="cardListData" @btnClick="btnClick" @toOrderDetails="toOrderDetails" />
<uv-load-more :status="status" fontSize="24rpx" dashed line />
</view>
<uv-modal ref="modal" align="center" content='是否取消订单?' @confirm="confirm"></uv-modal>
<tabber select="cart" />
</view>
</template>
@ -33,6 +34,7 @@
Navbar
},
data() {
this.orderId = '';
return {
status:"loading",
params: {
@ -45,9 +47,9 @@
name: '全部'
},
{
id: 0,
name: '未付款'
},
id: 0,
name: '未付款'
},
{
id: 1,
name: '待参加'
@ -62,64 +64,6 @@
},
],
lineBg: require('@/static/image/cart/tabIcon.png'),
// cardListData: [{
// imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
// orderTime: '2024.08.23 12:00',
// state: 'U',
// stateText: '',
// title: '',
// time: '2024.10.28 10:00',
// address: '32',
// totalPrice: '298.00',
// btnObj: [{
// id: '0',
// btnTitle: '',
// color: '#AFAFAF',
// bgColor: '#34312E'
// },
// {
// id: '1',
// btnTitle: '',
// color: '#FF4546',
// bgColor: '#492623'
// }
// ]
// },
// {
// imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
// orderTime: '2024.08.23 12:00',
// state: 'S',
// stateText: '',
// title: '',
// time: '2024.10.28 10:00',
// address: '32',
// totalPrice: '298.00',
// btnObj: [{
// id: '2',
// btnTitle: '',
// color: '#FF4546',
// bgColor: '#492623'
// },
// {
// id: '3',
// btnTitle: '',
// color: '#FFB245',
// bgColor: '#49361D'
// }
// ]
// },
// {
// imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
// orderTime: '2024.08.23 12:00',
// state: 'F',
// stateText: '',
// title: '',
// time: '2024.10.28 10:00',
// address: '32',
// totalPrice: '298.00',
// btnObj: []
// }
// ]
totalPage: 0,
cardListData: []
}
@ -164,17 +108,41 @@
})
},
btnClick(item,type) {//0 1 2 3
this.orderId = item.id;
if (type == 0) {
this.$refs.modal.open();
}
if (type == 1) {
this.$api('signIn', {orderId: item.id}, res=> {
if (res.code == 200) {
this.cardListData = []
this.getOrderPageList()
this.$refs.toast.show({
type: 'success',
message: res.result
})
}
})
}
if (type == 2) {
uni.navigateTo({
url: '/pages_order/orderEvaluation'
url: `/pages_order/orderEvaluation?activityId=${this.orderId}`
})
}
if (type == 3) {
uni.navigateTo({
url: '/pages_order/invoiceIssuance'
url: `/pages_order/invoiceIssuance?orderId=${this.orderId}`
})
}
}
},
confirm() {
this.$api('cancelOrder', {orderId: this.orderId}, res => {
if (res.code == 200) {
this.cardListData = [];
this.getOrderPageList();
}
})
}
}
}
</script>


+ 43
- 27
pages_order/invoiceIssuance.vue View File

@ -1,7 +1,7 @@
<template>
<view class="invoiceIssuance">
<view class="head-box"></view>
<Navbar title="订单详情" :autoBack="true" :bgColor="bgColor" leftIconSize="18px" height="100rpx" :leftIconColor="leftIconColor" :titleStyle="{color:fontColor}" />
<Navbar title="申请开票" :autoBack="true" :bgColor="bgColor" leftIconSize="18px" height="100rpx" :leftIconColor="leftIconColor" :titleStyle="{color:fontColor}" />
<view class="content contentPosition_">
<view class="info cardStyle_">
<view class="left">
@ -9,11 +9,11 @@
</view>
<view class="right">
<view class="detailed">
<view class="title">夏日去撒野旅游计划</view>
<view class="date">2024.10.28 10:00</view>
<view class="address">成都市东丽湖露营地32号</view>
<view class="title">{{activityItem.title}}</view>
<view class="date">{{activityItem.startTime}}</view>
<view class="address">{{activityItem.address}}</view>
</view>
<view class="price"><text>总计</text>¥800.00</view>
<view class="price"><text>总计</text>¥{{activityItem.price}}</view>
</view>
</view>
<view class="choice">
@ -27,27 +27,26 @@
labelColor="#fff"
activeColor="#FF4546"
iconPlacement="right">
<uv-radio name="个人" label="个人"></uv-radio>
<uv-radio name="企业" label="个人"></uv-radio>
<uv-radio name="0" label="个人"></uv-radio>
<uv-radio name="1" label="企业"></uv-radio>
</uv-radio-group>
</view>
<view class="iptInfo">
<uv-form-item label="企业名称" labelWidth="180rpx" :customStyle="aa" borderBottom>
<uv-input placeholder="请输入内容" fontSize="29rpx" color="#fff" v-model="enterpriseName" border="none"></uv-input>
</uv-form-item>
<uv-form-item label="企业名称" labelWidth="180rpx" :customStyle="aa" borderBottom>
<uv-input placeholder="请输入内容" fontSize="29rpx" color="#fff" v-model="enterpriseName" border="none"></uv-input>
</uv-form-item>
<uv-form-item label="企业名称" labelWidth="180rpx" :customStyle="aa" borderBottom>
<uv-input placeholder="请输入内容" fontSize="29rpx" color="#fff" v-model="enterpriseName" border="none"></uv-input>
</uv-form-item>
<view class="iptInfo" v-if="radioValue">
<uv-form-item label="企业名称" labelWidth="180rpx" borderBottom>
<uv-input placeholder="请输入内容" fontSize="29rpx" color="#fff" v-model="invoicingInfo.name" border="none"></uv-input>
</uv-form-item>
<uv-form-item :label="radioValue === '0' ? '身份证号' : '税号'" labelWidth="180rpx" borderBottom>
<uv-input placeholder="请输入内容" fontSize="29rpx" color="#fff" v-model="invoicingInfo.no" border="none"></uv-input>
</uv-form-item>
<uv-form-item label="邮箱" labelWidth="180rpx" borderBottom>
<uv-input placeholder="请输入内容" fontSize="29rpx" color="#fff" v-model="invoicingInfo.emil" border="none"></uv-input>
</uv-form-item>
</view>
<view style="padding: 65rpx 35rpx;">
<view style="padding: 0 35rpx 65rpx;">
<uv-button @click="toInvoiceRecords" :custom-style="customStyle" type="primary" shape="circle" color="#381615" text="申请"></uv-button>
</view>
<uv-toast ref="toast"></uv-toast>
</view>
</view>
</template>
@ -61,25 +60,42 @@
},
data() {
return {
radioValue: '香蕉',
enterpriseName: '',
aa: {
color: '#f40'
orderId: '',
radioValue: '0',
invoicingInfo: {
name: '',
no: '',
emil: ''
}
}
},
onLoad({orderId}) {
this.orderId = orderId
},
methods: {
toInvoiceRecords() {
uni.navigateTo({
url: '/pages_order/invoiceRecords'
let params = {}
params = this.invoicingInfo;
params.orderId = this.orderId
console.log(params);
this.$api('invoice', params, res=> {
if (res.code == 200) {
this.$refs.toast.show({
type: 'success',
message: res.result
})
uni.navigateTo({
url: '/pages_order/invoiceRecords'
})
}
})
}
}
}
</script>
<style scoped lang="scss">
.invoiceIssuance {
// margin-bottom: 500rpx;
.content {
.info {
margin: 10rpx 32rpx 0rpx;;


+ 161
- 92
pages_order/orderEvaluation.vue View File

@ -1,103 +1,172 @@
<template>
<view class="orderEvaluation">
<Navbar title="活动评价" :autoBack="true" :bgColor="bgColor" leftIconSize="18px" height="100rpx" :leftIconColor="leftIconColor" :titleStyle="{color:fontColor}" />
<view class="content">
<view class="baseInfo cardBackground_">
<view class="statusBox">
<i></i>
<view class="status">主理人评价</view>
</view>
<view class="info grayBg">
<view class="score">
<image src="@/static/image/cart/selectIcon.png" mode=""></image>
<image src="@/static/image/cart/selectIcon.png" mode=""></image>
<image src="@/static/image/cart/selectIcon.png" mode=""></image>
<image src="@/static/image/cart/selectIcon.png" mode=""></image>
<image src="@/static/image/cart/uncheckedIcon.png" mode=""></image>
</view>
<uv-textarea height="376rpx" :textStyle="{color:fontColor}" border="none" v-model="value" :maxlength="-1" placeholder="请输入内容"></uv-textarea>
</view>
</view>
<view class="baseInfo" style="margin-top: 32rpx;">
<view class="statusBox">
<i></i>
<view class="status">活动评价</view>
</view>
<view class="info">
<view class="score">
<image src="@/static/image/cart/selectIcon.png" mode=""></image>
<image src="@/static/image/cart/selectIcon.png" mode=""></image>
<image src="@/static/image/cart/selectIcon.png" mode=""></image>
<image src="@/static/image/cart/selectIcon.png" mode=""></image>
<image src="@/static/image/cart/uncheckedIcon.png" mode=""></image>
</view>
<uv-textarea height="376rpx" :textStyle="{color:fontColor}" border="none" v-model="value1" :maxlength="-1" placeholder="请输入内容"></uv-textarea>
</view>
</view>
</view>
<view style="padding: 65rpx 35rpx;">
<uv-button :custom-style="customStyle" type="primary" shape="circle" color="#381615" text="活动签到"></uv-button>
</view>
</view>
<view class="orderEvaluation">
<Navbar
title="活动评价"
:autoBack="true"
:bgColor="bgColor"
leftIconSize="18px"
height="100rpx"
:leftIconColor="leftIconColor"
:titleStyle="{ color: fontColor }"
/>
<view class="content">
<view class="baseInfo cardBackground_">
<view class="statusBox">
<i></i>
<view class="status">主理人评价</view>
</view>
<view class="info grayBg">
<view class="score">
<uv-rate count="5" size="48" v-model="num"></uv-rate>
</view>
<uv-textarea
height="376rpx"
:textStyle="{ color: fontColor }"
border="none"
v-model="evaluate"
:maxlength="-1"
placeholder="请输入内容"
></uv-textarea>
</view>
</view>
<view class="baseInfo cardBackground_" style="margin-top: 32rpx">
<view class="statusBox">
<i></i>
<view class="status">活动评价</view>
</view>
<view class="info grayBg">
<view class="score">
<uv-rate
count="5"
size="48"
v-model="userNum"
></uv-rate>
</view>
<uv-textarea
height="376rpx"
:textStyle="{ color: fontColor }"
border="none"
v-model="userEvaluate"
:maxlength="-1"
placeholder="请输入内容"
></uv-textarea>
</view>
</view>
</view>
<view style="padding: 65rpx 35rpx">
<uv-button
:custom-style="customStyle"
@click="submit"
type="primary"
shape="circle"
color="#381615"
text="提交评论"
></uv-button>
</view>
<uv-toast ref="toast"></uv-toast>
</view>
</template>
<script>
import Navbar from '@/pages/components/Navbar.vue'
import { globalMixin } from '../pages/mixins/globalMixin';
import Navbar from '@/pages/components/Navbar.vue'
import { globalMixin } from '../pages/mixins/globalMixin';
export default{
mixins: [globalMixin],
components:{
Navbar
},
data() {
return {
value: '',
value1: ''
}
},
methods: {
}
}
export default {
mixins: [globalMixin],
components: {
Navbar
},
data() {
return {
orderId: '',
evaluate: '',
num: 0,
userEvaluate: '',
userNum: 0,
}
},
onLoad({ activityId }) {
this.orderId = activityId;
},
methods: {
submit() {
if (!this.num && !this.userNum) {
this.$refs.toast.show({
type: 'error',
icon: false,
message: '请评分之后再提交!'
})
return;
}
const params = {
orderId: this.orderId,
evaluate: this.evaluate,
num: this.num,
userEvaluate: this.userEvaluate,
userNum: this.userNum
}
this.$api('evaluate', params, res => {
if (res.code == 200) {
const params = {
type: 'success',
message: res.result
}
this.$refs.toast.show({
...params,
complete() {
uni.switchTab({
url:'/pages/index/cart'
})
}
})
}
})
}
}
}
</script>
<style scoped lang="scss">
/deep/.uv-rate__content__item {
padding-right: 10rpx;
}
/deep/.uv-icon__icon--success {
font-size: 32rpx !important;
line-height: 32rpx !important;
}
.orderEvaluation {
margin-top: 40rpx;
.content {
padding: 0 35rpx;
color: #fff;
padding-top: calc(var(--status-bar-height) + 100rpx);
.baseInfo{
.statusBox {
display: flex;
align-items: center;
padding: 33rpx 47rpx 24rpx;
i {
background: url('@/static/image/cart/evaluateIcon.png') no-repeat;
background-size: 100% 100%;
display: block;
width: 33rpx;
height: 29rpx;
margin-right: 15rpx;
}
}
.info {
.score {
image {
width: 30rpx;
height: 30rpx;
margin-right: 30rpx;
margin-bottom: 34rpx;
}
}
/deep/.uv-textarea {
background: #493734;
}
.aa {
color: #fff!important;
}
}
}
margin-top: 40rpx;
.content {
padding: 0 35rpx;
color: #fff;
padding-top: calc(var(--status-bar-height) + 100rpx);
.baseInfo {
.statusBox {
display: flex;
align-items: center;
padding: 33rpx 47rpx 24rpx;
i {
background: url('@/static/image/cart/evaluateIcon.png')
no-repeat;
background-size: 100% 100%;
display: block;
width: 33rpx;
height: 29rpx;
margin-right: 15rpx;
}
}
.info {
.score {
padding: 20rpx 0 35rpx;
}
/deep/.uv-textarea {
background: #493734;
}
.aa {
color: #fff !important;
}
}
}
}
}
</style>

Loading…
Cancel
Save