main
fanfan 9 months ago
parent 4058f23cc9
commit beac19d5a0
  1. 2
      config.js
  2. 4
      ext.json
  3. 2
      manifest.json
  4. 4
      pages/goods/detail.vue
  5. 4
      pages/order/detail.vue
  6. 42
      pages/order/index.vue
  7. 973
      pages/refund/detail.vue

@ -15,7 +15,7 @@ export default {
* 可在超管后台-商城列表中查看10025
*/
storeId: wx.getExtConfigSync().store_id? wx.getExtConfigSync().store_id : 10045,
storeId: wx.getExtConfigSync().store_id? wx.getExtConfigSync().store_id : 10048,
// storeId: 10037,

@ -1,7 +1,7 @@
{
"extEnable": true,
"extAppid": "wx9f7e94fe11dc0c23",
"extAppid": "wxa3127ed5c3542a28",
"ext": {
"store_id": 10045
"store_id": 10048
}
}

@ -92,7 +92,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wx9f7e94fe11dc0c23",
"appid" : "wxa3127ed5c3542a28",
"libVersion" : "latest",
"setting" : {
// TLS

@ -941,7 +941,7 @@
.replace(/<img src=/g, '<img style="width: 100%; display:block" src=')
info.contentLink = that.getValueAfterSymbol(that.getLinksFromRichText(info
.content), 'client://')
info.isLink = that.containsLetterMix(info.contentLink, 'jd.com') ? true : false
info.isLink = that.containsLetterMix(info.contentLink, 'http') ? true : false
Object.keys(info).forEach(item => {
this.$set(this.goods, item, info[item])
})
@ -2256,4 +2256,4 @@
text-align: center;
margin-right: 12rpx;
}
</style>
</style>

@ -569,7 +569,7 @@
handleTargetExpress(orderId, item) {
if (item.delivery) {
let url =item.delivery[0].express_no
if (this.containsLetterMix(url, 'jd.com')&&item.delivery.length>0) {
if (this.containsLetterMix(url, 'http')&&item.delivery.length>0) {
uni.navigateTo({
url: '/pages/order/express/webView?src=' + encodeURIComponent(url) //urlh5pageB
})
@ -1561,4 +1561,4 @@
font-size: 36rpx;
}
}
</style>
</style>

@ -259,9 +259,9 @@
this.getOrderList();
}
},
methods: {
handleOk() {
methods: {
handleOk() {
},
meKone() {
this.cdDia = false
@ -272,7 +272,7 @@
app.getOrderList(1)
},
changeMenu(index) {
this.list.forEach((item, ind) => {
this.list.forEach((item, ind) => {
item.menushow = !item.menushow;
});
},
@ -319,7 +319,7 @@
//
onChangeTab(item, index) {
const app = this
app.list = []
app.list = []
app.pageNum = 1
//
app.current = index
@ -345,8 +345,8 @@
.then(result => {
//
app.$toast(result.message)
//
app.list = []
//
app.list = []
app.pageNum = 1
app.getOrderList()
})
@ -369,8 +369,8 @@
//
app.$toast(result.message)
//
app.list = []
app.pageNum = 1
app.list = []
app.pageNum = 1
app.getOrderList()
})
}
@ -397,8 +397,8 @@
//
app.$success(result.message)
//
app.list = []
app.pageNum = 1
app.list = []
app.pageNum = 1
app.getOrderList()
})
}
@ -446,21 +446,21 @@
containsLetterMix(str, mix) {
return new RegExp(mix.split('').join('\\w*')).test(str)
},
//
arrayUnique(arr, name) {
    var hash = {};
    return arr.reduce(function (item, next) {
        hash[next[name]]
            ? ""
            : (hash[next[name]] = true && item.push(next));
        return item;
    }, []);
//
arrayUnique(arr, name) {
    var hash = {};
    return arr.reduce(function (item, next) {
        hash[next[name]]
            ? ""
            : (hash[next[name]] = true && item.push(next));
        return item;
    }, []);
},
//
onLogistics(orderId, item) {
if (item.delivery) {
let url = item.delivery.express_no
if (this.containsLetterMix(url, 'jd.com')) {
if (this.containsLetterMix(url, 'http')) {
uni.navigateTo({
url: '/pages/order/express/webView?src=' + encodeURIComponent(url) //urlh5pageB
})

@ -1,121 +1,121 @@
<template>
<view v-if="!isLoading" class="container p-bottom" :style="appThemeStyle">
<!-- 顶部状态栏 -->
<view class="detail-header dis-flex flex-y-center">
<view class="header-backdrop">
<image class="image" src="/static/order/refund-bg.png"></image>
</view>
<view class="header-state">
<text class="f-32 col-f">{{ detail.state_text }}</text>
</view>
</view>
<!-- 商品详情 -->
<view style="margin-top: 0;" class="detail-goods b-f m-top20 dis-flex flex-dir-row" @click="onRefundDetail(detail.order_refund_id)">
<view class="left">
<image class="goods-image" :src="detail.orderGoods.goods_image"></image>
</view>
<view class="right dis-flex flex-box flex-dir-column flex-x-around">
<view class="goods-name">
<text class="twoline-hide">{{ detail.orderGoods.goods_name }}</text>
</view>
<view class="dis-flex col-9 f-24">
<view class="flex-box">
<view class="goods-props clearfix">
<view class="goods-props-item" v-for="(props, idx) in detail.orderGoods.goods_props"
:key="idx">
<text>{{ props.value.name }}</text>
</view>
</view>
</view>
<text class="t-r">×{{ detail.orderGoods.total_num }}</text>
</view>
</view>
</view>
<!-- 商品金额 -->
<view class="detail-order b-f row-block">
<view class="item dis-flex flex-x-end flex-y-center">
<text class="">商品金额</text>
<text class="col-m">{{ detail.orderGoods.total_pay_price }}</text>
</view>
</view>
<!-- 已退款金额 -->
<view v-if="detail.status == RefundStatusEnum.COMPLETED.value && detail.type == 10"
class="detail-order b-f row-block dis-flex flex-x-end flex-y-center">
<text class="">已退款金额</text>
<text class="col-m">{{ detail.refund_money }}</text>
</view>
<!-- 售后信息 -->
<!-- v-if="detail.status == RefundStatusEnum.REJECTED.value" -->
<view class="detail-refund b-f m-top20">
<view class="detail-refund__row dis-flex">
<view class="text">
<text>售后类型</text>
</view>
<view class="flex-box">
<text>{{ detail.type == 30?'退款':'退货' }}</text>
</view>
</view>
<view class="detail-refund__row dis-flex">
<view class="text">
<text>申请原因</text>
</view>
<view class="flex-box">
<text>{{ detail.apply_desc }}</text>
</view>
</view>
<view v-if="detail.images.length > 0" class="detail-refund__row dis-flex">
<view class="text">
<text>申请凭证</text>
</view>
<view class="image-list flex-box">
<view class="image-preview" v-for="(item, index) in detail.images" :key="index">
<image class="image" mode="aspectFill" :src="item.image_url"
@click="handlePreviewImages(index)"></image>
</view>
</view>
</view>
</view>
<!-- 售后信息 -->
<view v-if="detail.status == RefundStatusEnum.REJECTED.value" class="detail-refund b-f m-top20">
<view class="detail-refund__row dis-flex">
<view class="text">
<text class="col-m">拒绝原因</text>
</view>
<view class="flex-box">
<text>{{ detail.refuse_desc }}</text>
</view>
</view>
</view>
<!-- 退货物流信息 -->
<view v-if="detail.audit_status == AuditStatusEnum.REVIEWED.value && detail.is_user_send"
class="detail-address b-f m-top20">
<view class="detail-address__row address-title">
<text class="col-m">退货物流信息</text>
</view>
<view class="detail-address__row address-details">
<view class="address-details__row">
<text>物流公司{{ detail.express.express_name }}</text>
</view>
<view class="address-details__row">
<text>物流单号{{ detail.express_no }}</text>
</view>
<view class="address-details__row">
<text>发货状态{{ detail.is_user_send ? '已发货' : '未发货' }}</text>
</view>
<view class="address-details__row">
<text>发货时间{{ detail.send_time }}</text>
</view>
</view>
</view>
<!-- 商家收货地址 -->
<template>
<view v-if="!isLoading" class="container p-bottom" :style="appThemeStyle">
<!-- 顶部状态栏 -->
<view class="detail-header dis-flex flex-y-center">
<view class="header-backdrop">
<image class="image" src="/static/order/refund-bg.png"></image>
</view>
<view class="header-state">
<text class="f-32 col-f">{{ detail.state_text }}</text>
</view>
</view>
<!-- 商品详情 -->
<view style="margin-top: 0;" class="detail-goods b-f m-top20 dis-flex flex-dir-row"
@click="onRefundDetail(detail.order_refund_id)">
<view class="left">
<image class="goods-image" :src="detail.orderGoods.goods_image"></image>
</view>
<view class="right dis-flex flex-box flex-dir-column flex-x-around">
<view class="goods-name">
<text class="twoline-hide">{{ detail.orderGoods.goods_name }}</text>
</view>
<view class="dis-flex col-9 f-24">
<view class="flex-box">
<view class="goods-props clearfix">
<view class="goods-props-item" v-for="(props, idx) in detail.orderGoods.goods_props"
:key="idx">
<text>{{ props.value.name }}</text>
</view>
</view>
</view>
<text class="t-r">×{{ detail.orderGoods.total_num }}</text>
</view>
</view>
</view>
<!-- 商品金额 -->
<view class="detail-order b-f row-block">
<view class="item dis-flex flex-x-end flex-y-center">
<text class="">商品金额</text>
<text class="col-m">{{ detail.orderGoods.total_pay_price }}</text>
</view>
</view>
<!-- 已退款金额 -->
<view v-if="detail.status == RefundStatusEnum.COMPLETED.value && detail.type == 10"
class="detail-order b-f row-block dis-flex flex-x-end flex-y-center">
<text class="">已退款金额</text>
<text class="col-m">{{ detail.refund_money }}</text>
</view>
<!-- 售后信息 -->
<!-- v-if="detail.status == RefundStatusEnum.REJECTED.value" -->
<view class="detail-refund b-f m-top20">
<view class="detail-refund__row dis-flex">
<view class="text">
<text>售后类型</text>
</view>
<view class="flex-box">
<text>{{ detail.type == 30?'退款':'退货' }}</text>
</view>
</view>
<view class="detail-refund__row dis-flex">
<view class="text">
<text>申请原因</text>
</view>
<view class="flex-box">
<text>{{ detail.apply_desc }}</text>
</view>
</view>
<view v-if="detail.images.length > 0" class="detail-refund__row dis-flex">
<view class="text">
<text>申请凭证</text>
</view>
<view class="image-list flex-box">
<view class="image-preview" v-for="(item, index) in detail.images" :key="index">
<image class="image" mode="aspectFill" :src="item.image_url"
@click="handlePreviewImages(index)"></image>
</view>
</view>
</view>
</view>
<!-- 售后信息 -->
<view v-if="detail.status == RefundStatusEnum.REJECTED.value" class="detail-refund b-f m-top20">
<view class="detail-refund__row">
<view class="text">
<text class="col-m">拒绝原因</text>
</view>
<view class="flex-box aaa" v-html="detail.refuse_desc">
</view>
</view>
</view>
<!-- 退货物流信息 -->
<view v-if="detail.audit_status == AuditStatusEnum.REVIEWED.value && detail.is_user_send"
class="detail-address b-f m-top20">
<view class="detail-address__row address-title">
<text class="col-m">退货物流信息</text>
</view>
<view class="detail-address__row address-details">
<view class="address-details__row">
<text>物流公司{{ detail.express.express_name }}</text>
</view>
<view class="address-details__row">
<text>物流单号{{ detail.express_no }}</text>
</view>
<view class="address-details__row">
<text>发货状态{{ detail.is_user_send ? '已发货' : '未发货' }}</text>
</view>
<view class="address-details__row">
<text>发货时间{{ detail.send_time }}</text>
</view>
</view>
</view>
<!-- 商家收货地址 -->
<template v-if="detail.address && detail.address.name">
<view v-if="detail.audit_status == AuditStatusEnum.REVIEWED.value" class="detail-address b-f m-top20">
<view class="detail-address__row address-title">
@ -148,366 +148,379 @@
</view>
</view>
</view>
</template>
<!-- 填写物流信息 -->
<form
v-if="detail.type == RefundTypeEnum.RETURN.value && detail.audit_status == AuditStatusEnum.REVIEWED.value && !detail.is_user_send"
@submit="onSubmit()">
<view class="detail-express b-f m-top20">
<view class="form-group dis-flex flex-y-center">
<view class="field">物流公司</view>
<view class="flex-box">
<picker mode="selector" :range="expressList" range-key="express_name" :value="expressIndex"
@change="onChangeExpress">
<text v-if="expressIndex > -1">{{ expressList[expressIndex].express_name }}</text>
<text v-else class="col-80">请选择物流公司</text>
</picker>
</view>
</view>
<view class="form-group dis-flex flex-y-center">
<view class="field">物流单号</view>
<view class="flex-box">
<input class="input" v-model="formData.expressNo" placeholder="请填写物流单号" />
</view>
</view>
</view>
<!-- 操作按钮 -->
<view class="footer">
<view class="btn-wrapper">
<button class="btn-item btn-item-main btn-normal" :class="{ disabled }"
formType="submit">确认发货</button>
</view>
</view>
</form>
</view>
</template>
<script>
import {
AuditStatusEnum,
RefundStatusEnum,
RefundTypeEnum
} from '@/common/enum/order/refund'
import * as RefundApi from '@/api/refund'
import * as ExpressApi from '@/api/express'
export default {
data() {
return {
//
AuditStatusEnum,
RefundStatusEnum,
RefundTypeEnum,
//
isLoading: true,
// ID
orderRefundId: null,
//
detail: {},
//
expressList: [],
//
formData: {
// ID
expressId: null,
//
expressNo: ''
},
//
expressIndex: -1,
//
disabled: false
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad({
orderRefundId
}) {
// ID
this.orderRefundId = orderRefundId
//
this.getPageData()
},
methods: {
//
getPageData() {
const app = this
app.isLoading = true
Promise.all([app.getRefundDetail(), app.getExpressList()])
.then(result => {
app.isLoading = false
})
},
//
getRefundDetail() {
const app = this
return new Promise((resolve, reject) => {
RefundApi.detail(app.orderRefundId)
.then(result => {
app.detail = result.data.detail
resolve()
})
.catch(reject)
})
},
//
getExpressList() {
const app = this
return new Promise((resolve, reject) => {
ExpressApi.list()
.then(result => {
app.expressList = result.data.list
resolve()
})
.catch(reject)
})
},
// 退
onRefundDetail(orderRefundId) {
if (this.detail.status == 20) {
this.$navTo('pages/order/refund/refundDetail', {
orderRefundId
})
} else {
this.$navTo('pages/order/refund/refundDetail1', {
orderRefundId
})
}
},
//
handlePreviewImages(index) {
const {
detail: {
images
}
} = this
const imageUrls = images.map(item => item.image_url)
uni.previewImage({
current: imageUrls[index],
urls: imageUrls
})
},
//
onChangeExpress(e) {
const expressIndex = e.detail.value
const {
expressList
} = this
this.expressIndex = expressIndex
this.formData.expressId = expressList[expressIndex].express_id
},
//
onSubmit() {
const app = this
//
if (app.disabled === true) return false
//
app.disabled = true
//
RefundApi.delivery(app.orderRefundId, app.formData)
.then(result => {
app.$toast(result.message)
setTimeout(() => {
app.disabled = false
uni.navigateBack()
}, 1500)
})
.catch(err => app.disabled = false)
}
}
}
</script>
<style lang="scss" scoped>
//
.detail-header {
position: relative;
width: 100%;
height: 140rpx;
.header-backdrop {
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 0;
.image {
display: block;
width: 100%;
height: 140rpx;
}
}
}
.header-state {
z-index: 1;
padding: 0 50rpx;
}
/* 商品详情 */
.detail-goods {
padding: 24rpx 20rpx;
.left {
.goods-image {
display: block;
width: 150rpx;
height: 150rpx;
}
}
.right {
padding-left: 20rpx;
}
.goods-props {
margin-top: 14rpx;
height: 40rpx;
color: #ababab;
font-size: 24rpx;
overflow: hidden;
.goods-props-item {
display: inline-block;
margin-right: 14rpx;
padding: 4rpx 16rpx;
border-radius: 12rpx;
background-color: #F5F5F5;
width: auto;
}
}
}
.detail-order {
padding: 20rpx;
font-size: 26rpx;
.item {
margin-bottom: 10rpx;
&:last-child {
margin-bottom: 0;
}
}
}
/* 售后详情 */
.detail-refund {
padding: 15rpx 20rpx;
}
.detail-refund__row {
margin: 20rpx 0;
}
/* 申请凭证 */
.image-list {
margin-bottom: -15rpx;
.image-preview {
margin: 0 15rpx 15rpx 0;
float: left;
.image {
display: block;
width: 180rpx;
height: 180rpx;
}
&:nth-child(3n+0) {
margin-right: 0;
}
}
}
/* 商家收货地址 */
.detail-address {
padding: 20rpx 34rpx;
}
.address-details {
padding: 8rpx 0;
border-bottom: 1px solid #eee;
.address-details__row {
margin: 14rpx 0;
}
}
.address-tips {
margin-top: 16rpx;
line-height: 46rpx;
}
.detail-address__row {
// margin: 18rpx 0;
}
/* 填写物流信息 */
.detail-express {
padding: 10rpx 30rpx;
}
.form-group {
height: 60rpx;
margin: 14rpx 0;
.input {
display: block;
height: 100%;
font-size: 28rpx;
padding-left: 0;
}
}
/* 底部操作栏 */
.footer {
margin-top: 60rpx;
.btn-wrapper {
height: 100%;
display: flex;
align-items: center;
padding: 0 20rpx;
}
.btn-item {
flex: 1;
font-size: 28rpx;
height: 80rpx;
color: #fff;
border-radius: 50rpx;
display: flex;
justify-content: center;
align-items: center;
}
.btn-item-main {
background: linear-gradient(to right, $main-bg, $main-bg2);
color: $main-text;
//
&.disabled {
opacity: 0.6;
}
}
}
</template>
<!-- 填写物流信息 -->
<form
v-if="detail.type == RefundTypeEnum.RETURN.value && detail.audit_status == AuditStatusEnum.REVIEWED.value && !detail.is_user_send"
@submit="onSubmit()">
<view class="detail-express b-f m-top20">
<view class="form-group dis-flex flex-y-center">
<view class="field">物流公司</view>
<view class="flex-box">
<picker mode="selector" :range="expressList" range-key="express_name" :value="expressIndex"
@change="onChangeExpress">
<text v-if="expressIndex > -1">{{ expressList[expressIndex].express_name }}</text>
<text v-else class="col-80">请选择物流公司</text>
</picker>
</view>
</view>
<view class="form-group dis-flex flex-y-center">
<view class="field">物流单号</view>
<view class="flex-box">
<input class="input" v-model="formData.expressNo" placeholder="请填写物流单号" />
</view>
</view>
</view>
<!-- 操作按钮 -->
<view class="footer">
<view class="btn-wrapper">
<button class="btn-item btn-item-main btn-normal" :class="{ disabled }"
formType="submit">确认发货</button>
</view>
</view>
</form>
</view>
</template>
<script>
import {
AuditStatusEnum,
RefundStatusEnum,
RefundTypeEnum
} from '@/common/enum/order/refund'
import * as RefundApi from '@/api/refund'
import * as ExpressApi from '@/api/express'
export default {
data() {
return {
//
AuditStatusEnum,
RefundStatusEnum,
RefundTypeEnum,
//
isLoading: true,
// ID
orderRefundId: null,
//
detail: {},
//
expressList: [],
//
formData: {
// ID
expressId: null,
//
expressNo: ''
},
//
expressIndex: -1,
//
disabled: false,
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad({
orderRefundId
}) {
// ID
this.orderRefundId = orderRefundId
//
this.getPageData()
},
methods: {
//
getPageData() {
const app = this
app.isLoading = true
Promise.all([app.getRefundDetail(), app.getExpressList()])
.then(result => {
app.isLoading = false
})
},
//
getRefundDetail() {
const app = this
return new Promise((resolve, reject) => {
RefundApi.detail(app.orderRefundId)
.then(result => {
app.detail = result.data.detail
resolve()
})
.catch(reject)
})
},
//
getExpressList() {
const app = this
return new Promise((resolve, reject) => {
ExpressApi.list()
.then(result => {
app.expressList = result.data.list
resolve()
})
.catch(reject)
})
},
// 退
onRefundDetail(orderRefundId) {
if (this.detail.status == 20) {
this.$navTo('pages/order/refund/refundDetail', {
orderRefundId
})
} else {
this.$navTo('pages/order/refund/refundDetail1', {
orderRefundId
})
}
},
//
handlePreviewImages(index) {
const {
detail: {
images
}
} = this
const imageUrls = images.map(item => item.image_url)
uni.previewImage({
current: imageUrls[index],
urls: imageUrls
})
},
//
onChangeExpress(e) {
const expressIndex = e.detail.value
const {
expressList
} = this
this.expressIndex = expressIndex
this.formData.expressId = expressList[expressIndex].express_id
},
//
onSubmit() {
const app = this
//
if (app.disabled === true) return false
//
app.disabled = true
//
RefundApi.delivery(app.orderRefundId, app.formData)
.then(result => {
app.$toast(result.message)
setTimeout(() => {
app.disabled = false
uni.navigateBack()
}, 1500)
})
.catch(err => app.disabled = false)
}
}
}
</script>
<style lang="scss" scoped>
//
.detail-header {
position: relative;
width: 100%;
height: 140rpx;
.header-backdrop {
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 0;
.image {
display: block;
width: 100%;
height: 140rpx;
}
}
}
.header-state {
z-index: 1;
padding: 0 50rpx;
}
/* 商品详情 */
.detail-goods {
padding: 24rpx 20rpx;
.left {
.goods-image {
display: block;
width: 150rpx;
height: 150rpx;
}
}
.right {
padding-left: 20rpx;
}
.goods-props {
margin-top: 14rpx;
height: 40rpx;
color: #ababab;
font-size: 24rpx;
overflow: hidden;
.goods-props-item {
display: inline-block;
margin-right: 14rpx;
padding: 4rpx 16rpx;
border-radius: 12rpx;
background-color: #F5F5F5;
width: auto;
}
}
}
.detail-order {
padding: 20rpx;
font-size: 26rpx;
.item {
margin-bottom: 10rpx;
&:last-child {
margin-bottom: 0;
}
}
}
/* 售后详情 */
.detail-refund {
padding: 15rpx 20rpx;
}
.detail-refund__row {
margin: 20rpx 0;
}
/* 申请凭证 */
.image-list {
margin-bottom: -15rpx;
.image-preview {
margin: 0 15rpx 15rpx 0;
float: left;
.image {
display: block;
width: 180rpx;
height: 180rpx;
}
&:nth-child(3n+0) {
margin-right: 0;
}
}
}
/* 商家收货地址 */
.detail-address {
padding: 20rpx 34rpx;
}
.address-details {
padding: 8rpx 0;
border-bottom: 1px solid #eee;
.address-details__row {
margin: 14rpx 0;
}
}
.address-tips {
margin-top: 16rpx;
line-height: 46rpx;
}
.detail-address__row {
// margin: 18rpx 0;
}
/* 填写物流信息 */
.detail-express {
padding: 10rpx 30rpx;
}
.form-group {
height: 60rpx;
margin: 14rpx 0;
.input {
display: block;
height: 100%;
font-size: 28rpx;
padding-left: 0;
}
}
/* 底部操作栏 */
.footer {
margin-top: 60rpx;
.btn-wrapper {
height: 100%;
display: flex;
align-items: center;
padding: 0 20rpx;
}
.btn-item {
flex: 1;
font-size: 28rpx;
height: 80rpx;
color: #fff;
border-radius: 50rpx;
display: flex;
justify-content: center;
align-items: center;
}
.btn-item-main {
background: linear-gradient(to right, $main-bg, $main-bg2);
color: $main-text;
//
&.disabled {
opacity: 0.6;
}
}
}
.aaa {
border-radius: 6rpx;
font-size: 28rpx;
line-height: 50rpx;
background-color: #fff;
overflow: hidden;
img {
max-width: 100%;
height: auto
}
}
</style>

Loading…
Cancel
Save