Browse Source

上传

master
前端-胡立永 6 months ago
parent
commit
e18a21d4c2
11 changed files with 427 additions and 58 deletions
  1. +14
    -2
      api/api.js
  2. +32
    -9
      components/user/cartSubmitSelect.vue
  3. +5
    -2
      components/user/couponList.vue
  4. +108
    -0
      components/userShop/deliverGoods.vue
  5. +1
    -1
      mixins/order.js
  6. +2
    -0
      pages/index/cart.vue
  7. +3
    -3
      pages/index/center.vue
  8. +61
    -14
      pages/index/order.vue
  9. +34
    -11
      pages_order/components/product/submitUnitSelect.vue
  10. +120
    -2
      pages_order/order/damageReport.vue
  11. +47
    -14
      pages_order/order/orderDetail.vue

+ 14
- 2
api/api.js View File

@ -299,12 +299,24 @@ const config = {
method: 'POST',
auth: true,
},
// 换货支付
// 酒店换货支付
replacePay: {
url: '/replace/pay',
url: '/order/replace/pay',
method: 'POST',
auth: true,
},
// 水洗店换货发货
sendLogistics: {
url: '/order/send/logistics',
method: 'POST',
auth: true,
},
// 获取全局总金额优惠满减
confCoupon: {
url: '/conf/coupon',
method: 'GET',
auth: true,
},
}


+ 32
- 9
components/user/cartSubmitSelect.vue View File

@ -20,7 +20,7 @@
</view>
<!-- 优惠劵 -->
<view style="padding: 0 20rpx;
<!-- <view style="padding: 0 20rpx;
background-color: #fff;">
<uv-cell
icon="coupon"
@ -31,7 +31,7 @@
@click="$refs.couponPopup.open('bottom')"
isLink>
</uv-cell>
</view>
</view> -->
<!-- 费用明细 -->
<view class="expense-detail">
@ -51,13 +51,24 @@
<view v-if="rentPrice">
租金{{ rentPrice }}
</view>
<view v-if="coupon.price">
优惠-{{ coupon.price }}
<view v-if="coupon.couponCondition <= price">
优惠-{{ coupon.couponPrice }}
</view>
<view v-if="coupon.price">
实付款{{ price - coupon.price }}
<view v-if="coupon.couponCondition <= price">
实付款{{ (price - coupon.couponPrice).toFixed(2) }}
</view>
</view>
<uv-cell
icon="coupon"
title="优惠"
iconStyle="font-size: 34rpx;"
rightIconStyle="font-size: 34rpx;">
<template #value>
<view class="coupon">
{{ coupon.couponCondition }}立减{{ coupon.couponPrice }}
</view>
</template>
</uv-cell>
</view>
<!-- 提交按钮 -->
@ -121,7 +132,7 @@
},
addressTotal: 0,
coupon : {
price : 0,
// price : 0,
},
couponText : '请选择',
}
@ -130,8 +141,9 @@
//
open() {
this.$refs.popup.open('bottom')
this.$refs.couponList.getData()
this.$refs.couponPopup.close()
// this.$refs.couponList.getData()
// this.$refs.couponPopup.close()
this.confCoupon()
//
this.$refs.addressList.getAddressList().then(res => {
@ -190,6 +202,13 @@
couponId : this.coupon.id
})
},
confCoupon(){
this.$api('confCoupon', res => {
if(res.code == 200){
this.coupon = res.result
}
})
},
}
}
</script>
@ -241,6 +260,10 @@
padding: 10rpx 20rpx;
line-height: 50rpx;
}
.coupon{
text-align: center;
color: #5c5;
}
}
.submit-btn {


+ 5
- 2
components/user/couponList.vue View File

@ -63,7 +63,6 @@
},
//
depositPrice : {
},
washPrice: {//
},
@ -84,6 +83,10 @@
},
isSelect(item){
if(!this.depositPrice && !this.rentPrice && !this.washPrice){
return false
}
//
if(this.depositPrice &&
item.useType == 0 &&
@ -185,7 +188,7 @@
left: 0;
width: 100%;
height: 100%;
background-color: #ffffff88;
background-color: #ffffff99;
z-index: 99;
}
}

+ 108
- 0
components/userShop/deliverGoods.vue View File

@ -0,0 +1,108 @@
<template>
<uv-popup ref="popup" :round="30">
<view class="form">
<view class="shopName">
<view>物流名称</view>
<view>
<input v-model="form.logisticsName" placeholder="请输入物流名称" clearable></input>
</view>
</view>
<view class="shopName">
<view>物流单号</view>
<view>
<input v-model="form.logisticsCode" placeholder="请输入物流单号" clearable></input>
</view>
</view>
</view>
<view class="btn" @click="sendLogistics">
<button class="a">发货</button>
</view>
</uv-popup>
</template>
<script>
export default {
data() {
return {
form : {}
}
},
props : ['orderId'],
methods: {
open(){
this.$refs.popup.open('bottom')
},
//
sendLogistics(from, fn){
if (this.$utils.verificationAll(this.form, {
logisticsName : '请输入物流名称',
logisticsCode : '请输入物流单号',
})) {
return
}
this.form.id = this.orderId
this.$api('sendLogistics', this.form, res => {
if (res.code == 200) {
this.$emit('getData')
}
})
},
}
}
</script>
<style scoped lang="scss">
.form{
padding: 20rpx 0;
height: 40vh;
.shopName {
display: flex;
align-items: center;
background-color: #FFF;
margin: 10rpx 0 0 0;
padding: 10rpx 20rpx;
>view:nth-of-type(1) {
width: 30%;
// font-weight: 700;
}
>view:nth-of-type(2) {
width: 70%;
// padding: 0 20rpx 0 0;
border-radius: 10rpx;
overflow: hidden;
input {
background-color: #f5f5f5;
// color: #a4a4a4;
font-size: 28rpx;
padding: 8rpx 8rpx 8rpx 15rpx;
}
}
}
}
.btn {
display: flex;
justify-content: center;
width: 100%;
.a {
display: flex;
justify-content: center;
align-items: center;
width: 90%;
height: 100rpx;
color: #FFF;
background-color: $uni-color;
border: 1px solid red;
border-radius: 100rpx;
font-size: 30rpx;
}
}
</style>

+ 1
- 1
mixins/order.js View File

@ -5,7 +5,7 @@ export default {
// 酒店支付订单
payOrder(id, orderId, replacePay){
let self = this
this.$api(replacePay ? 'orderPay' : 'replacePay', {
this.$api(replacePay ? 'replacePay' : 'orderPay', {
id,
orderId
}, res => {


+ 2
- 0
pages/index/cart.vue View File

@ -477,6 +477,8 @@
.submit-unit {
padding: 30rpx;
background-color: #fff;
height: 60vh;
overflow: auto;
.title {
font-size: 28rpx;


+ 3
- 3
pages/index/center.vue View File

@ -136,10 +136,10 @@
<text class="grid-text">我的物品</text>
</uv-grid-item>
<uv-grid-item @click="$utils.navigateTo('/pages_order/mine/coupon')">
<!-- <uv-grid-item @click="$utils.navigateTo('/pages_order/mine/coupon')">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">优惠</text>
</uv-grid-item>
<text class="grid-text">优惠</text>
</uv-grid-item> -->
<uv-grid-item @click="$utils.navigateTo('/pages_order/order/applyLaundryStore')">
<image class="image" src="/static/image/center/7.png" mode=""></image>


+ 61
- 14
pages/index/order.vue View File

@ -29,14 +29,16 @@
</view>
</view>
<view class="content">
<view class="content"
v-for="(p, i) in item.orderDetails"
:key="i">
<view class="left">
<image mode="aspectFill" :src="item.pic"></image>
<image mode="aspectFill" :src="p.pic"></image>
</view>
<view class="right">
<view class="text-hidden-1">
<!-- <view class="text-hidden-1">
客户姓名{{item.userName}}
</view>
<view class="text-hidden-1">
@ -47,11 +49,27 @@
</view>
<view class="text-hidden-1">
数量{{ item.num }}
</view> -->
<view class="text-hidden-1">
产品名称{{p.goodsName}}
</view>
<view class="text-hidden-1">
产品规格{{p.sku}}
</view>
<view class="text-hidden-1">
数量{{ p.num }}
</view>
</view>
</view>
<view class="userInfo">
<text>{{ item.userName }}</text>
<text>{{ item.userPhone }}</text>
<text>{{ item.userAddress }}</text>
</view>
<!-- 水洗店按钮 -->
<view class="bottom" v-if="userShop">
@ -100,6 +118,12 @@
</view>
</template>
<view
v-if="[8, 12].includes(item.status)"
@click.stop="orderId = item.id;$refs.deliverGoods.open()" class="b2">
发货填写单号
</view>
<view
v-if="[6].includes(item.status)"
@click.stop="orderFinishedWashing(item)" class="b2">
@ -113,13 +137,8 @@
v-else>
<view class="pay">
<!-- <view class="price"
v-if="item.type != 0 && item.type != 1 && item.orderPay">
总金额<text class="num">{{ item.orderPay }}</text>
</view> -->
<view
v-if="item.washPay && item.type == 1">
<!-- <view
v-if="item.washPay">
水洗费用{{ item.washPay }}
</view>
@ -127,6 +146,16 @@
v-if="item.rentPay">
租赁费用{{ item.rentPay }}
</view>
<view
v-if="item.deposit">
押金{{ item.deposit }}
</view> -->
<view class="price"
v-if="item.orderPay">
合计<text class="num">{{ item.orderPay }}</text>
</view>
</view>
@ -162,6 +191,11 @@
iconSize="200rpx"
icon="list"></uv-empty>
<deliverGoods
ref="deliverGoods"
:orderId="orderId"
@getData="getData"/>
<tabber select="2" v-if="!uid"/>
</view>
</template>
@ -180,9 +214,11 @@
import tabber from '@/components/base/tabbar.vue'
import { mapGetters } from 'vuex'
import mixinOrder from '@/mixins/order.js'
import deliverGoods from '@/components/userShop/deliverGoods.vue'
export default {
components : {
tabber,
deliverGoods,
},
mixins : [mixinOrder],
computed : {
@ -227,6 +263,7 @@
},
type : -1,
uid : 0,
orderId : 0,
}
},
onLoad(args) {
@ -316,13 +353,13 @@
margin: 10rpx 0;
.left {
width: 150rpx;
height: 150rpx;
width: 130rpx;
height: 130rpx;
border-radius: 10rpx;
image {
width: 150rpx;
height: 150rpx;
width: 130rpx;
height: 130rpx;
border-radius: 10rpx;
}
}
@ -336,6 +373,13 @@
background-color: #F8F8F8;
}
}
.userInfo{
font-size: 24rpx;
text{
margin-right: 26rpx;
}
}
.bottom {
display: flex;
@ -365,6 +409,9 @@
background: $uni-color;
color: #fff;
flex-shrink: 0;
display: flex;
justify-content: center;
align-items: center;
}
.b1,.b2 {


+ 34
- 11
pages_order/components/product/submitUnitSelect.vue View File

@ -56,7 +56,7 @@
</view>
<!-- 优惠劵 -->
<view style="padding: 0 20rpx;">
<!-- <view style="padding: 0 20rpx;">
<uv-cell
icon="coupon"
title="优惠劵"
@ -66,7 +66,7 @@
@click="$refs.couponPopup.open('bottom')"
isLink>
</uv-cell>
</view>
</view> -->
@ -82,13 +82,24 @@
<view>
押金{{ price }}
</view>
<view v-if="coupon.price">
优惠-{{ coupon.price }}
<view v-if="coupon.couponCondition <= price">
优惠-{{ coupon.couponPrice }}
</view>
<view v-if="coupon.price">
实付款{{ (price - coupon.price).toFixed(2) }}
<view v-if="coupon.couponCondition <= price">
实付款{{ (price - coupon.couponPrice).toFixed(2) }}
</view>
</view>
<uv-cell
icon="coupon"
title="优惠"
iconStyle="font-size: 34rpx;"
rightIconStyle="font-size: 34rpx;">
<template #value>
<view class="coupon">
{{ coupon.couponCondition }}立减{{ coupon.couponPrice }}
</view>
</template>
</uv-cell>
</view>
<!-- 提交按钮 -->
@ -159,7 +170,8 @@
//
open() {
this.$refs.popup.open('bottom')
this.$refs.couponList.getData()
// this.$refs.couponList.getData()
this.confCoupon()
if (!this.unit.id) {
this.selectUnit(this.detail.hotelGoodsSkuList[0], 0)
}
@ -172,11 +184,18 @@
}
})
},
confCoupon(){
this.$api('confCoupon', res => {
if(res.code == 200){
this.coupon = res.result
}
})
},
valChange(){
this.coupon = {
price : 0,
}
this.couponText = '请选择'
// this.coupon = {
// price : 0,
// }
// this.couponText = ''
},
//
selectCoupon(e){
@ -411,6 +430,10 @@
padding: 10rpx 20rpx;
line-height: 50rpx;
}
.coupon{
text-align: center;
color: #5c5;
}
}
.submit-btn {


+ 120
- 2
pages_order/order/damageReport.vue View File

@ -3,15 +3,42 @@
<view class="help">
<navbar title="破损上报" leftClick @leftClick="$utils.navigateBack" />
<view class="flex">
<view class="server-item"
v-for="(p, i) in order.orderDetails"
:key="i">
<view class="type">
<view class="img-box">
<image :src="p.pic" mode="aspectFill"></image>
</view>
<view class="server-info">
<view class="server-title">
产品名称{{p.goodsName}}
</view>
<view class="sales-volume" style="margin-top: 5px;">
<view class="desc">规格{{p.sku}}</view>
</view>
<view class="sales-volume" style="margin-top: 5px;">
<view class="desc">数量{{p.num}}</view>
</view>
</view>
</view>
</view>
<!-- <view class="type">
<span>破损数量</span>
<span>
<uv-number-box
v-model="form.num" :min="1"
:max="order.num"></uv-number-box>
</span>
</view>
</view> -->
<view class="help-box">
<view>
@ -113,6 +140,97 @@
<style scoped lang="scss">
.help {
.server-item {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
background: white;
border-radius: 15rpx;
box-sizing: border-box;
margin: 30rpx;
width: 690rpx;
.img-box {
width: 180rpx;
height: 180rpx;
border-radius: 10rpx;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
.server-info {
display: flex;
flex-direction: column;
justify-content: space-around;
width: calc(100% - 180rpx);
box-sizing: border-box;
padding: 10rpx 15rpx;
.server-title {
display: flex;
margin-bottom: 10rpx;
}
.coupon {
display: flex;
justify-content: center;
align-items: center;
background: #F29E45;
color: white;
width: 120rpx;
height: 40rpx;
border-radius: 10rpx;
margin-left: 10rpx;
font-size: 22rpx;
}
.time-coupon,
.price {
display: flex;
flex-wrap: wrap;
align-items: center;
}
.time-coupon {
margin: 10rpx 0rpx;
font-size: 26rpx;
justify-content: space-between;
width: 100%;
.flex {
justify-content: center;
align-items: center;
}
image {
width: 25rpx;
height: 25rpx;
}
.time {
color: #B8B8B8;
margin-left: 6rpx;
}
}
.sales-volume {
display: flex;
align-items: center;
color: #B8B8B8;
font-size: 24rpx;
image {
width: 25rpx;
height: 25rpx;
}
}
}
}
.type {
display: flex;
align-items: center;


+ 47
- 14
pages_order/order/orderDetail.vue View File

@ -50,6 +50,12 @@
</view>
</template>
<view
v-if="[8, 12].includes(order.status)"
@click.stop="$refs.deliverGoods.open()" class="b2">
发货填写单号
</view>
<view
v-if="[6].includes(order.status)"
@click.stop="orderFinishedWashing(order)">
@ -80,29 +86,49 @@
</view>
<view class="flex">
<view class="server-item">
<view class="server-item"
v-for="(p, i) in order.orderDetails"
:key="i">
<view class="img-box">
<image :src="order.pic" mode="aspectFill"></image>
<image :src="p.pic" mode="aspectFill"></image>
</view>
<view class="server-info">
<view class="server-title">
{{order.goodsName}}
{{p.goodsName}}
<!-- <view class="coupon">领券立减</view> -->
</view>
<view class="current-price" v-if="order.orderPay">
<!-- <view class="current-price" v-if="order.orderPay">
<text class="unit"></text>{{order.orderPay}}
</view> -->
<view
class="current-price"
v-if="p.washPay">
水洗费用{{ p.washPay }}
</view>
<view
class="current-price"
v-if="p.rentPay">
租赁费用{{ p.rentPay }}
</view>
<view
class="current-price"
v-if="p.deposit">
押金{{ p.deposit }}
</view>
<view class="sales-volume" style="margin-top: 5px;">
<view class="desc">规格{{order.sku}}</view>
<view class="desc">规格{{p.sku}}</view>
</view>
<view class="sales-volume" style="margin-top: 5px;">
<view class="desc">数量{{order.num}}</view>
<view class="desc">数量{{p.num}}</view>
</view>
<view class="time-coupon">
@ -170,22 +196,22 @@
<view class="line">
<!-- 水洗店不展示 -->
<view class="t min_tips" v-if="!userShop && order.orderPay">
<view class="t min_tips" v-if="!userShop && order.originalPrice">
<view class="">
应付款
</view>
<view class="current-price">
{{ order.orderPay }}
{{ order.originalPrice }}
</view>
</view>
<view class="t min_tips" v-if="!userShop && order.originalPrice">
<!-- 水洗店不展示 -->
<view class="t min_tips" v-if="!userShop && order.orderPay">
<view class="">
实付款
</view>
<view class="current-price">
{{ order.originalPrice }}
{{ order.orderPay }}
</view>
</view>
@ -271,6 +297,11 @@
</view>
<deliverGoods
ref="deliverGoods"
:orderId="orderId"
@getData="getData"/>
<!-- 联系客服弹框 -->
<customerServicePopup ref="customerServicePopup" />
@ -283,9 +314,11 @@
} from 'vuex'
import mixinOrder from '@/mixins/order.js'
import customerServicePopup from '@/components/config/customerServicePopup.vue'
import deliverGoods from '@/components/userShop/deliverGoods.vue'
export default {
components: {
customerServicePopup
customerServicePopup,
deliverGoods,
},
mixins : [mixinOrder],
computed: {
@ -613,7 +646,7 @@
}
.current-price {
font-size: 30rpx;
font-size: 22rpx;
color: $uni-color;
}


Loading…
Cancel
Save