Browse Source

上传

master
前端-胡立永 4 months ago
parent
commit
84dc5fb468
19 changed files with 747 additions and 260 deletions
  1. +17
    -4
      api/api.js
  2. +277
    -0
      components/user/cartSubmitSelect.vue
  3. +191
    -0
      components/user/couponList.vue
  4. +1
    -1
      config.js
  5. +5
    -6
      mixins/order.js
  6. +3
    -0
      pages.json
  7. +22
    -58
      pages/index/cart.vue
  8. +2
    -6
      pages/index/center.vue
  9. +10
    -4
      pages/index/order.vue
  10. +0
    -122
      pages_order/components/order/orderTypeBtn.vue
  11. +74
    -7
      pages_order/components/product/submitUnitSelect.vue
  12. +30
    -0
      pages_order/mine/coupon.vue
  13. +7
    -0
      pages_order/mine/lease.vue
  14. +28
    -4
      pages_order/order/applyLaundryStore.vue
  15. +21
    -37
      pages_order/order/createWash.vue
  16. +33
    -3
      pages_order/order/damageReport.vue
  17. +21
    -5
      pages_order/order/orderDetail.vue
  18. +5
    -3
      pages_order/product/productDetail.vue
  19. BIN
      static/image/coupon/c.png

+ 17
- 4
api/api.js View File

@ -14,6 +14,11 @@ const config = {
url: '/api/getConfig',
method: 'GET'
},
// 获取客服联系电话
customUser: {
url: '/user/custom',
method: 'get',
},
// banner列表
bannerList: {
@ -133,6 +138,14 @@ const config = {
},
//优惠券分页接口
couponPage: {
url: '/coupon/page',
method: 'GET',
auth: true,
showLoading: true,
},
//分页查询订单
orderPage: {
url: '/order/page',
@ -286,10 +299,10 @@ const config = {
method: 'POST',
auth: true,
},
// 获取客服联系电话
customUser: {
url: '/user/custom',
method: 'get',
// 换货支付
replacePay: {
url: '/replace/pay',
method: 'POST',
auth: true,
},


+ 277
- 0
components/user/cartSubmitSelect.vue View File

@ -0,0 +1,277 @@
<template>
<uv-popup ref="popup"
:round="30"
@change="$refs.couponPopup.close()"
bgColor="#f7f7f7">
<view class="content">
<!-- 地址 -->
<view class="address" @click="openAddress">
<image src="/static/image/address/selectIcon.png" mode=""></image>
<view class="">
{{ address.name }}
</view>
<view class="">
{{ address.addressDetail }}
</view>
<view class="icon">
<uv-icon size="30rpx" name="arrow-right"></uv-icon>
</view>
</view>
<!-- 优惠劵 -->
<view style="padding: 0 20rpx;
background-color: #fff;">
<uv-cell
icon="coupon"
title="优惠劵"
iconStyle="font-size: 34rpx;"
rightIconStyle="font-size: 34rpx;"
:value="couponText"
@click="$refs.couponPopup.open('bottom')"
isLink>
</uv-cell>
</view>
<!-- 费用明细 -->
<view class="expense-detail">
<view class="title">
费用明细
</view>
<view class="detail" v-if="price">
<view>
应付款{{ price }}
</view>
<view v-if="depositPrice">
押金{{ depositPrice }}
</view>
<view v-if="washPrice">
水洗费{{ washPrice }}
</view>
<view v-if="rentPrice">
租金{{ rentPrice }}
</view>
<view v-if="coupon.price">
优惠-{{ coupon.price }}
</view>
<view v-if="coupon.price">
实付款{{ price - coupon.price }}
</view>
</view>
</view>
<!-- 提交按钮 -->
<view class="submit-btn">
<view class="r" @click="orderPay">
{{ submiitTitle }}
</view>
</view>
</view>
<uv-popup ref="couponPopup"
:round="30">
<couponList
ref="couponList"
height="60vh"
:depositPrice="depositPrice"
:washPrice="washPrice"
:rentPrice="rentPrice"
:useType="0"
@select="selectCoupon" />
</uv-popup>
<uv-popup ref="addressPopup" :round="30">
<addressList ref="addressList" height="60vh" @select="selectAddress" />
</uv-popup>
</uv-popup>
</template>
<script>
import addressList from '@/components/address/addressList.vue'
import couponList from './couponList.vue'
export default {
components: {
addressList,
couponList,
},
props: {
submiitTitle: {
default: '立即租赁',
type: String,
},
price : {//
default : 0
},
depositPrice: {//
default: 0
},
washPrice: {//
default: 0
},
rentPrice: {//
default: 0
},
},
data() {
return {
address: {
name: '请选择联系人',
addressDetail: '',
},
addressTotal: 0,
coupon : {
price : 0,
},
couponText : '请选择',
}
},
methods: {
//
open() {
this.$refs.popup.open('bottom')
this.$refs.couponList.getData()
this.$refs.couponPopup.close()
//
this.$refs.addressList.getAddressList().then(res => {
this.addressTotal = res.total
if (this.addressTotal != 0) {
this.address = res.records[0]
}
})
},
//
selectCoupon(e){
this.couponText = e.couponName
this.coupon = e
this.$refs.couponPopup.close()
},
//
close() {
this.$refs.popup.close()
},
//
openAddress() {
if (this.addressTotal == 0) {
this.$refs.popup.close()
return uni.navigateTo({
url: '/pages_order/mine/address?type=back'
})
}
this.$refs.addressPopup.open('bottom')
},
//
selectAddress(e) {
this.address = e
this.$refs.addressPopup.close()
},
//
selectUnit(item, index) {
this.unit = item
this.unitIndex = index
},
addCart() {
this.$api('cartAdd', {
id: this.detail.id,
skuId: this.unit.id,
}, res => {
if (res.code == 200) {
uni.showToast({
title: '添加成功',
});
this.$refs.popup.close()
}
})
},
orderPay() {
this.$emit('submit', {
addressId : this.address.id,
couponId : this.coupon.id
})
},
}
}
</script>
<style scoped lang="scss">
.content {
max-height: 80vh;
overflow: hidden;
overflow-y: auto;
padding-top: 30rpx;
.address {
display: flex;
padding: 20rpx;
background-color: #fff;
margin-bottom: 20rpx;
image {
width: 30rpx;
height: 30rpx;
margin: 20rpx;
}
view {
margin: 20rpx;
overflow: hidden; //
text-overflow: ellipsis; //
white-space: nowrap; //
}
.icon {
margin-left: auto;
}
}
.expense-detail {
padding: 30rpx;
background-color: #fff;
font-size: 28rpx;
.title {
font-weight: 600;
}
.detail {
background-color: #F6F6F6;
color: #717171;
margin: 10rpx 0;
padding: 10rpx 20rpx;
line-height: 50rpx;
}
}
.submit-btn {
width: 600rpx;
height: 80rpx;
color: #fff;
border-radius: 40rpx;
font-size: 28rpx;
margin: 20rpx auto;
display: flex;
justify-content: center;
align-items: center;
border: 1rpx solid $uni-color;
overflow: hidden;
.l {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
color: $uni-color;
}
.r {
background: $uni-color;
flex: 1;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
}
}
</style>

+ 191
- 0
components/user/couponList.vue View File

@ -0,0 +1,191 @@
<template>
<scroll-view
scroll-y="true"
:style="{height: height}"
@scrolltolower="loadMoreData">
<view class="list">
<view class="item"
v-for="(item,index) in list"
@click="select(item)"
:key="index">
<view class="price">
<view class="num">
<view class="icon">
</view>
{{ item.price }}
</view>
<view class="tiao">
{{ item.useType_dictText }}{{ item.conditionPrice }}可用
</view>
</view>
<view class="date">
<view>
有效期{{ item.endTime || '不限' }}
</view>
<view>
{{ item.type_dictText }}使用
</view>
</view>
<view class="status">
<!-- 使 -->
<!-- 使 -->
{{ item.status_dictText }}
</view>
<view class="del"
v-if="isSelect(item)">
</view>
</view>
</view>
<uv-empty
v-if="list.length == 0"
text="空空如也"
textSize="30rpx"
iconSize="200rpx"
icon="list"></uv-empty>
</scroll-view>
</template>
<script>
import mixinList from '@/mixins/list.js'
export default {
name:"couponList",
mixins : [mixinList],
props : {
height : {
default : 'calc(90vh - 180rpx)'
},
//
depositPrice : {
},
washPrice: {//
},
rentPrice: {//
},
},
data() {
return {
mixinsListApi : 'couponPage'
};
},
methods : {
select(item){
if(this.isSelect(item)){
return
}
this.$emit('select', item)
},
isSelect(item){
//
if(this.depositPrice &&
item.useType == 0 &&
this.depositPrice >= item.conditionPrice){
return false
}
//
if(this.rentPrice &&
item.useType == 1 &&
this.rentPrice >= item.conditionPrice){
return false
}
//
if(this.washPrice &&
item.useType == 2 &&
this.washPrice >= item.conditionPrice){
return false
}
return true
},
}
}
</script>
<style scoped lang="scss">
.list{
.item{
color: #4FD3BC;
position: relative;
width: calc(100% - 40rpx);
height: 220rpx;
background: url(../../static/image/coupon/c.png);
background-size: 100% 100%;
margin: 20rpx;
box-sizing: border-box;
padding: 30rpx;
.status{
position: absolute;
right: 20rpx;
top: 20rpx;
height: calc(100% - 40rpx);
width: 60rpx;
writing-mode:vertical-rl;
box-sizing: border-box;
padding: 20rpx;
background-color: #fff;
border-radius: 60rpx;
font-size: 26rpx;
display: flex;
justify-content: center;
align-items: center;
}
.price{
display: flex;
align-items: center;
.num{
color: #4FD3BC;
font-weight: 900;
font-size: 70rpx;
display: flex;
align-items: flex-end;
.icon{
color: #fff;
background-color: #4FD3BC;
width: 30rpx;
height: 30rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 20rpx;
border-radius: 14rpx;
margin-bottom: 14rpx;
margin-right: 10rpx;
}
}
.tiao{
padding: 10rpx 20rpx;
background-color: #9ee3d1;
color: #25a28c;
font-size: 22rpx;
margin-left: 20rpx;
border-radius: 10rpx;
}
}
.date{
display: flex;
font-size: 24rpx;
view{
margin-right: 20rpx;
}
}
}
.del{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #ffffff88;
z-index: 99;
}
}
</style>

+ 1
- 1
config.js View File

@ -7,7 +7,7 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 当前环境
const type = 'prod'
const type = 'dev'
// 环境配置


+ 5
- 6
mixins/order.js View File

@ -3,10 +3,11 @@
export default {
methods: {
// 酒店支付订单
payOrder(id){
payOrder(id, orderId, replacePay){
let self = this
this.$api('orderPay', {
id
this.$api(replacePay ? 'orderPay' : 'replacePay', {
id,
orderId
}, res => {
if (res.code == 200) {
uni.requestPayment({
@ -17,9 +18,7 @@ export default {
signType: res.result.signType, // 签名算法
paySign: res.result.paySign, // 签名
success: function(res) {
self.getData()
},
fail: function(err) {
console.log('支付失败', err);
@ -52,7 +51,7 @@ export default {
}
})
},
// 水洗店确认接单
// 水洗店确认接单 0确认接单 1确认正常 2破损上报
orderConfirmAccept(item){
let self = this
this.$api('orderConfirmAccept', {


+ 3
- 0
pages.json View File

@ -86,6 +86,9 @@
},
{
"path": "order/damageReport"
},
{
"path": "mine/coupon"
}
]
}],


+ 22
- 58
pages/index/cart.vue View File

@ -71,11 +71,6 @@
</view>
</view>
<!-- 地址弹框 -->
<uv-popup ref="addressPopup" :round="30">
<addressList ref="addressList" height="60vh" @select="selectAddress" />
</uv-popup>
<!-- 规格 -->
<uv-popup ref="skuPopup" :round="30" closeable>
<view class="submit-unit">
@ -90,18 +85,24 @@
</view>
</view>
</uv-popup>
<cartSubmitSelect
@submit="ordersPay"
:price="totalPrice"
:depositPrice="totalPrice"
ref="cartSubmitSelect"/>
<tabber select="3" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
import addressList from '@/components/address/addressList.vue'
import cartSubmitSelect from '@/components/user/cartSubmitSelect.vue'
export default {
components: {
tabber,
addressList,
cartSubmitSelect
},
data() {
@ -113,11 +114,6 @@
list: {
records : [],
},
addressTotal: 0,
address: {
name: '请选择联系人',
addressDetail: ''
},
skuList: [],
editSkuForm: {
id: '', //id
@ -148,12 +144,11 @@
price += n.depositPrice * n.num
}
})
return price
return price.toFixed(2)
},
},
onShow() {
this.getData()
this.getAddressListA()
},
//
onReachBottom() {
@ -203,25 +198,12 @@
return
}
if (this.addressTotal == 0) {
return uni.navigateTo({
url: '/pages_order/mine/address?type=back'
})
}
//
this.$refs.addressPopup.open('bottom')
},
//
selectAddress(e) {
this.address = e
this.$refs.addressPopup.close()
this.ordersPay()
//
this.$refs.cartSubmitSelect.open('bottom')
},
//
ordersPay() {
ordersPay({ addressId, couponId }) {
var self = this
var deleteCartIds = this.checkboxValue.join(",") //id
@ -232,7 +214,7 @@
data.push({
id: records[i].goodsId, //id
skuId: records[i].skuId, //id
addressId: this.address.id, //id
addressId, //id
sku: records[i].title, //
num: records[i].num,
})
@ -247,11 +229,13 @@
id: res.result.id
}
if(couponId){
form.couponId = couponId
}
this.$api('orderPay', form, res => {
if (res.code == 200) {
uni.requestPayment({
provider: 'wxpay', //
timeStamp: res.result.timeStamp, //
@ -265,11 +249,13 @@
uni.redirectTo({
url: '/pages/index/order'
})
},
fail: function(err) {
self.delsCart(deleteCartIds)
// self.delsCart(deleteCartIds)
console.log('支付失败', err);
uni.redirectTo({
url:'/pages/index/order'
})
// self.$refs.confirmationPopup.close()
uni.showToast({
icon: 'none',
@ -283,28 +269,6 @@
})
},
//
unitChange(item, e) {
// TODO
// this.$api('goodsOne', this.queryParams, res => {
// if (res.code == 200) {
// this.list = res.result
// }
// })
},
//
getAddressListA() {
this.$refs.addressList.getAddressList().then(res => {
this.addressTotal = res.total
if (this.addressTotal != 0) {
this.address = res.records[0]
}
})
},
valChange(item, e) {
console.log(e.value);
this.$api('cartNum', {


+ 2
- 6
pages/index/center.vue View File

@ -136,9 +136,9 @@
<text class="grid-text">我的物品</text>
</uv-grid-item>
<uv-grid-item @click="$utils.redirectTo('/index/cart')">
<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>
<text class="grid-text">优惠卷</text>
</uv-grid-item>
<uv-grid-item @click="$utils.navigateTo('/pages_order/order/applyLaundryStore')">
@ -248,10 +248,6 @@
this.total = res.result.total
}
})
},
//
setJobTime() {
},
logout(){
this.$store.commit('logout')


+ 10
- 4
pages/index/order.vue View File

@ -93,7 +93,8 @@
>
破损上报
</view> -->
<view @click.stop="orderConfirmedDamage(item, 2)" class="b1"
<view @click.stop="$utils.navigateTo
(`/pages_order/order/damageReport?id=${item.id}`)" class="b1"
>
破损上报
</view>
@ -130,9 +131,13 @@
<!-- 待支付 -->
<view @click.stop="payOrder(item.orderLogId)" class="b2"
v-if="[0, 3, 10].includes(item.status)">
{{ item.status == 10 ? '支付平台损失' : '立即付款' }}
<view class="">
<view
@click.stop="payOrder(item.orderLogId,
item.id, item.status == 10)" class="b2"
v-if="[0, 3, 10].includes(item.status)">
{{ item.status == 10 ? '支付平台损失' : '立即付款' }}
</view>
</view>
<!-- 待收货 -->
@ -359,6 +364,7 @@
.b2 {
background: $uni-color;
color: #fff;
flex-shrink: 0;
}
.b1,.b2 {


+ 0
- 122
pages_order/components/order/orderTypeBtn.vue View File

@ -1,122 +0,0 @@
<template>
<!-- 水洗店的操作按钮 -->
<view class="orderTypeBtn">
<!-- 租赁 -->
<view class="btns" v-if="type == 0">
<view class="btn1"
v-if="status == 2"
@click="confirmReceiveGoods">
确认收货
</view>
<view class="btn2"
v-if="status > 1">
查看物流
</view>
</view>
<!-- 水洗 -->
<view class="btns" v-if="type == 1">
<!--
水洗订单3待支付 4水洗店接单 5水洗店检查 6开始清洗
-->
<view class="btn1">
开始清洗
</view>
<!-- <view class="btn2">
线下配送
</view> -->
</view>
<!-- 破损(换货) -->
<view class="btns" v-if="type==2">
<view class="btn1" @click="confirmReceiveGoods">
<!-- 快递寄回 -->
确认收货
</view>
<view class="btn2">
线下配送
</view>
</view>
<!-- 退货 -->
<view class="btns" v-if="type==3">
<view class="btn1" @click="confirmReceiveGoods">
<!-- 快递寄回 -->
确认收货
</view>
<view class="btn2">
线下配送
</view>
</view>
</view>
</template>
<script>
export default {
props: {
type: {
default : 0,
},
status: {
default : 0,
},
detail : {
default : {}
}
},
data() {
return {
}
},
methods: {
//
confirmReceiveGoods() {
this.$api('orderConfirm', {
id: this.detail.id
}, res => {
if (res.code == 200) {
uni.navigateBack(-1)
}
})
},
}
}
</script>
<style scoped lang="scss">
.orderTypeBtn {
.btns {
margin-top: 50rpx;
display: flex;
view {
margin: 0 20rpx;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
background-color: $uni-color;
padding: 10rpx 30rpx;
border-radius: 40rpx;
font-size: 26rpx;
}
.btn1 {
// background-color: #FFFFFF;
// border: 1px solid #A7A7A7;
// color: #A7A7A7;
}
.btn2 {
background-color: #FFFFFF;
border: 1px solid #A7A7A7;
color: #A7A7A7;
}
}
}
</style>

+ 74
- 7
pages_order/components/product/submitUnitSelect.vue View File

@ -1,5 +1,7 @@
<template>
<uv-popup ref="popup" :round="30" bgColor="#f7f7f7">
<uv-popup ref="popup" :round="30"
@change="$refs.couponPopup.close()"
bgColor="#f7f7f7">
<view class="content">
<!-- 地址 -->
@ -26,13 +28,15 @@
<view class="info">
<view class="price">
<text>{{ unit.depositPrice }}</text>
<text>{{ detail.depositPrice }}</text>
</view>
<view class="unit">
请选择规格
</view>
<view class="">
<uv-number-box v-model="num"></uv-number-box>
<uv-number-box
@change="valChange"
v-model="num"></uv-number-box>
</view>
</view>
</view>
@ -51,6 +55,19 @@
</view>
</view>
<!-- 优惠劵 -->
<view style="padding: 0 20rpx;">
<uv-cell
icon="coupon"
title="优惠劵"
iconStyle="font-size: 34rpx;"
rightIconStyle="font-size: 34rpx;"
:value="couponText"
@click="$refs.couponPopup.open('bottom')"
isLink>
</uv-cell>
</view>
<!-- 费用明细 -->
@ -58,8 +75,19 @@
<view class="title">
费用明细
</view>
<view class="detail">
押金{{ unit.depositPrice }}
<view class="detail" v-if="detail.depositPrice">
<view>
应付款{{ price }}
</view>
<view>
押金{{ price }}
</view>
<view v-if="coupon.price">
优惠-{{ coupon.price }}
</view>
<view v-if="coupon.price">
实付款{{ (price - coupon.price).toFixed(2) }}
</view>
</view>
</view>
@ -75,6 +103,14 @@
</view>
<uv-popup ref="couponPopup" :round="30">
<couponList
ref="couponList"
height="60vh"
:depositPrice="price"
@select="selectCoupon" />
</uv-popup>
<uv-popup ref="addressPopup" :round="30">
<addressList ref="addressList" height="60vh" @select="selectAddress" />
</uv-popup>
@ -82,10 +118,12 @@
</template>
<script>
import addressList from '../../../components/address/addressList.vue'
import addressList from '@/components/address/addressList.vue'
import couponList from '@/components/user/couponList.vue'
export default {
components: {
addressList,
couponList,
},
props: {
submiitTitle: {
@ -94,6 +132,11 @@
},
detail: {
default: {}
},
},
computed : {
price(){
return (this.detail.depositPrice * this.num).toFixed(2)
}
},
data() {
@ -106,12 +149,17 @@
num: 1,
unit: {},
addressTotal: 0,
coupon : {
price : 0,
},
couponText : '请选择',
}
},
methods: {
//
open() {
this.$refs.popup.open('bottom')
this.$refs.couponList.getData()
if (!this.unit.id) {
this.selectUnit(this.detail.hotelGoodsSkuList[0], 0)
}
@ -124,6 +172,18 @@
}
})
},
valChange(){
this.coupon = {
price : 0,
}
this.couponText = '请选择'
},
//
selectCoupon(e){
this.couponText = e.couponName
this.coupon = e
this.$refs.couponPopup.close()
},
//
close() {
this.$refs.popup.close()
@ -184,7 +244,10 @@
this.$api('orderCreate', {req:JSON.stringify(data)}, res => {
if (res.code == 200) {
let form = {
id: res.result.id
id: res.result.id,
}
if(this.coupon.id){
form.couponId = this.coupon.id
}
this.$api('orderPay', form, res => {
if (res.code == 200) {
@ -204,6 +267,9 @@
},
fail: function(err) {
console.log('支付失败', err);
uni.redirectTo({
url:'/pages/index/order'
})
// self.$refs.confirmationPopup.close()
uni.showToast({
icon: 'none',
@ -343,6 +409,7 @@
color: #717171;
margin: 10rpx 0;
padding: 10rpx 20rpx;
line-height: 50rpx;
}
}


+ 30
- 0
pages_order/mine/coupon.vue View File

@ -0,0 +1,30 @@
<template>
<view>
<navbar title="我的优惠劵" leftClick @leftClick="$utils.navigateBack" />
<couponList ref="couponList"/>
</view>
</template>
<script>
import couponList from '@/components/user/couponList.vue'
export default {
components : {
couponList,
},
data() {
return {
}
},
onShow() {
this.$refs.couponList.getData()
},
methods: {
}
}
</script>
<style>
</style>

+ 7
- 0
pages_order/mine/lease.vue View File

@ -95,11 +95,18 @@
wide : '',
},
fileList: [],
type : '',
}
},
computed : {
...mapState(['category']),
},
onLoad(args) {
this.type = args.type
if(this.type == 'add'){
this.$refs.addPopup.open('bottom')
}
},
onShow() {
this.$refs.commoditySelect.getList()
},


+ 28
- 4
pages_order/order/applyLaundryStore.vue View File

@ -9,6 +9,16 @@
style="width: 10rpx;height: 40rpx;background-color: #f78142;border-radius: 10rpx;overflow: hidden;"></span>
<span>店铺信息</span>
</view>
<view class="shopName">
<view>店铺照片</view>
<view>
<uv-upload :fileList="fileList" multiple :maxCount="1" width="180rpx"
height="180rpx" multiple @afterRead="afterRead" @delete="deleteImage">
<image src="../static/help/uploading.png" mode="aspectFill"
style="width: 180rpx;height: 180rpx;" />
</uv-upload>
</view>
</view>
<view class="shopName">
<view>店铺名称</view>
<view>
@ -97,6 +107,7 @@
borderRadius: '100rpx',
bottom: '40rpx'
},
fileList: [],
}
},
computed: {
@ -106,13 +117,27 @@
},
methods: {
deleteImage(e){
this.fileList.splice(e.index, 1)
},
afterRead(e){
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.fileList.push({
url
})
})
})
},
//
submitApplication() {
this.form.pic = this.fileList.map((item) => item.url).join(",")
if (this.$utils.verificationAll(this.form, {
userName: '请输入您的姓名',
pic: '请上传店铺照片',
name: '请输入店铺名称',
userName: '请输入您的姓名',
phone: '请输入联系方式',
currentRegion: '请选择所在地区',
address: '请输入详细地址',
@ -143,7 +168,7 @@
})
Position.getLocationDetail(res => {
console.log(res);
this.form.address = res
// this.form.address = res
})
},
@ -208,7 +233,6 @@
display: flex;
align-items: center;
background-color: #FFF;
height: 80rpx;
// margin: 10rpx 0 0 0;
padding: 10rpx 0 0 20rpx;


+ 21
- 37
pages_order/order/createWash.vue View File

@ -58,11 +58,6 @@
</uv-checkbox-group>
</view>
<!-- 地址弹框 -->
<uv-popup ref="addressPopup" :round="30">
<addressList ref="addressList" height="60vh" @select="selectAddress" />
</uv-popup>
<!-- <view class="btn" @click="submit">
<button class="a">水洗下单<text v-if="price">{{price}}</text></button>
</view> -->
@ -87,16 +82,25 @@
</view>
<view class="btn2" @click="goCleaning">结算</view>
</view>
<cartSubmitSelect
@submit="ordersPay"
:price="price"
:washPrice="washPrice"
:rentPrice="zujin"
submiitTitle="立即水洗"
ref="cartSubmitSelect"/>
</view>
</template>
<script>
import cartSubmitSelect from '@/components/user/cartSubmitSelect.vue'
import mixinsList from '@/mixins/list.js'
import addressList from '@/components/address/addressList.vue'
export default {
mixins : [mixinsList],
components: {
addressList,
cartSubmitSelect,
},
data() {
return {
@ -111,11 +115,6 @@
],
type: 1,
mixinsListApi : 'getLeasePage',
addressTotal: 0,
address: {
name: '请选择联系人',
addressDetail: ''
},
}
},
computed : {
@ -153,7 +152,6 @@
},
onShow() {
this.getData()
this.getAddressListA()
},
methods: {
//tab
@ -189,31 +187,10 @@
return
}
if (this.addressTotal == 0) {
return uni.navigateTo({
url: '/pages_order/mine/address?type=back'
})
}
//
this.$refs.addressPopup.open('bottom')
},//
selectAddress(e) {
this.address = e
this.$refs.addressPopup.close()
this.ordersPay()
},
//
getAddressListA() {
this.$refs.addressList.getAddressList().then(res => {
this.addressTotal = res.total
if (this.addressTotal != 0) {
this.address = res.records[0]
}
})
this.$refs.cartSubmitSelect.open('bottom')
},
//
ordersPay() {
ordersPay({ addressId, couponId }) {
var self = this
// var deleteCartIds = this.checkboxValue.join(",") //id
@ -223,7 +200,7 @@
if (this.checkboxValue.includes(records[i].id)) {
data.push({
leaseId: records[i].id, //id
addressId: this.address.id, //id
addressId, //id
type : 1,
})
}
@ -237,6 +214,10 @@
id: res.result.id
}
if(couponId){
form.couponId = couponId
}
//
// self.$api('cartDel', {
// id: deleteCartIds
@ -267,6 +248,9 @@
fail: function(err) {
console.log('支付失败', err);
// self.$refs.confirmationPopup.close()
uni.redirectTo({
url: '/pages/index/order'
})
uni.showToast({
icon: 'none',
title: "支付失败"


+ 33
- 3
pages_order/order/damageReport.vue View File

@ -58,11 +58,19 @@
data() {
return {
value: "",
fileList: []
fileList: [],
form : {
info : '',
},
order: {},
orderId: 0,
}
},
onLoad(args) {
onLoad(agrs) {
this.orderId = agrs.id
},
onShow() {
this.getData()
},
methods: {
deleteImage(e){
@ -78,6 +86,28 @@
})
})
},
//
getData() {
this.$api('orderOne', {
id: this.orderId
}, res => {
uni.stopPullDownRefresh()
if (res.code == 200) {
this.order = res.result
}
})
},
submit(){
this.form.pic = this.fileList.map(item=>item.url).join(",")
if (this.$utils.verificationAll(this.form, {
id: '请选择租赁物品',
info: '请输入破损的细节部位',
pic: '请选择地址',
})) {
return
}
},
}
}
</script>


+ 21
- 5
pages_order/order/orderDetail.vue View File

@ -42,7 +42,8 @@
确认无破损
</view>
<view @click.stop="orderConfirmedDamage(order, 2)" class="b1"
<view @click.stop="$utils.navigateTo
(`/pages_order/order/damageReport?id=${item.id}`)" class="b1"
>
破损上报
</view>
@ -168,12 +169,20 @@
<!-- 水洗店不展示 -->
<view class="t min_tips" v-if="!userShop && order.orderPay">
<view class="">
付款
付款
</view>
<view class="current-price">
{{ order.orderPay }}
</view>
</view>
<view class="t min_tips" v-if="!userShop && order.originalPrice">
<view class="">
实付款
</view>
<view class="current-price">
{{ order.originalPrice }}
</view>
</view>
<!-- 水洗店不展示 -->
<view class="min_tips" v-if="!userShop && order.rentPay">
@ -192,7 +201,7 @@
<view class="">
{{ order.washPay}}
</view>
</view>
</view>
<!-- <view class="min_tips">
<view class="">
押金
@ -201,6 +210,15 @@
{{ order.price }}
</view>
</view> -->
<view class="min_tips" v-if="order.discountPrice">
<view class="">
已优惠
</view>
<view class="">
{{ order.discountPrice}}
</view>
</view>
</view>
<!-- 订单信息 -->
@ -258,12 +276,10 @@
import {
mapGetters
} from 'vuex'
import orderTypeBtn from "../components/order/orderTypeBtn.vue"
import mixinOrder from '@/mixins/order.js'
import customerServicePopup from '@/components/config/customerServicePopup.vue'
export default {
components: {
orderTypeBtn,
customerServicePopup
},
mixins : [mixinOrder],


+ 5
- 3
pages_order/product/productDetail.vue View File

@ -16,7 +16,7 @@
</view>
<view class="info-line">
<view class="price">
<text>{{ detail.originalPrice }}</text>
<text>{{ detail.depositPrice }}</text>
</view>
<view class="num">
已售{{ detail.soldNum }}+
@ -37,13 +37,15 @@
</view>
<view class="info-unit">
<uv-cell title="是否有桌布" isLink>
<uv-cell title="我有桌布" isLink
@click="$utils.navigateTo('/pages_order/mine/lease?type=add')">
<template #icon>
<text class="text">桌布</text>
</template>
</uv-cell>
<uv-cell title="请选择规格" isLink>
<uv-cell title="请选择规格" isLink
@click="$refs.submitUnitSelect.open('bottom')">
<template #icon>
<text class="text">规格</text>
</template>


BIN
static/image/coupon/c.png View File

Before After
Width: 336  |  Height: 112  |  Size: 8.2 KiB

Loading…
Cancel
Save