version/0412
fanfan 11 months ago
parent 0c68ce0aa0
commit 2dae228a00
  1. 16
      pages/news3/ManualEntry.vue
  2. 534
      pages/order/express/index.vue
  3. 6
      pages/order/refund/index.vue
  4. 173
      pages/order/refund/refund.vue

@ -136,7 +136,7 @@
chatList: [],
expressList: [],
action: '',
action: '',
header: '',
}
},
onReady() {
@ -307,11 +307,7 @@
uni.showToast({
title: "上传成功"
})
let idList = []
list.forEach(item => {
idList.push(item.response.data.fileInfo.file_id)
});
this.form.transfer_image_id = idList.join(',');
this.form.transfer_image_id = this.handleRemove('', list);
}
}
},
@ -327,7 +323,7 @@
},
chatRemove(file, fileList) {
this.form.transfer_image_id = this.handleRemove(file, fileList);
this.form.chat_image_id = this.handleRemove(file, fileList);
},
//
chatSuccess(list) {
@ -339,11 +335,7 @@
uni.showToast({
title: "上传成功"
})
let idList = []
list.forEach(item => {
idList.push(item.response.data.fileInfo.file_id)
});
this.form.chat_image_id = idList.join(',');
this.form.chat_image_id = this.handleRemove('', list);
}
}
},

@ -1,269 +1,279 @@
<template>
<view v-if="!isLoading && express.length" class="container">
<!-- 标签栏 -->
<u-tabs v-if="tabs.length > 1" :list="tabs" :isScroll="true" :current="curTab" :active-color="appTheme.mainBg" :duration="0.2" bar-width="60"
@change="onChangeTab"></u-tabs>
<!-- 商品列表 -->
<view v-show="tabs.length > 1" class="deliver-goods-list i-card clearfix">
<view class="goods-item" v-for="(goods, idx) in express[curTab].goods" :key="idx">
<image class="goods-img" :src="goods.goods.goods_image" alt="商品图片" />
<view class="title">{{ goods.delivery_num }}</view>
</view>
</view>
<!-- 物流信息 -->
<view class="express i-card">
<view class="info-item">
<view class="item-lable">物流公司</view>
<view class="item-content">
<text v-if="express[curTab].delivery_method == 20">无需物流</text>
<text v-else>{{ express[curTab].express ? express[curTab].express.express_name : '--' }}</text>
</view>
</view>
<view class="info-item">
<view class="item-lable">物流单号</view>
<view class="item-content">
<text>{{ express[curTab].express_no ? express[curTab].express_no : '--' }}</text>
<view v-show="express[curTab].express_no" class="act-copy" @click.stop="handleCopy(express[curTab].express_no)">
<text>复制</text>
</view>
</view>
</view>
</view>
<!-- 物流轨迹 -->
<view class="logis-detail" v-if="express[curTab].traces && express[curTab].traces.length">
<view class="logis-item" :class="{ first: index === 0 }" v-for="(item, index) in express[curTab].traces" :key="index">
<view class="logis-item-content">
<view class="logis-item-content__describe">
<text class="f-26">{{ item.context }}</text>
</view>
<view class="logis-item-content__time">
<text class="f-22">{{ item.time }}</text>
</view>
</view>
</view>
</view>
</view>
<view v-if="!isLoading && express.length" class="container">
<!-- 标签栏 -->
<u-tabs v-if="tabs.length > 1" :list="tabs" :isScroll="true" :current="curTab" :active-color="appTheme.mainBg"
:duration="0.2" bar-width="60" @change="onChangeTab"></u-tabs>
<!-- 商品列表 -->
<view v-show="tabs.length > 1" class="deliver-goods-list i-card clearfix">
<view class="goods-item" v-for="(goods, idx) in express[curTab].goods" :key="idx">
<image class="goods-img" :src="goods.goods.goods_image" alt="商品图片" />
<view class="title">{{ goods.delivery_num }}</view>
</view>
</view>
<!-- 物流信息 -->
<view class="express i-card">
<view class="info-item">
<view class="item-lable">物流公司</view>
<view class="item-content">
<text v-if="express[curTab].delivery_method == 20">无需物流</text>
<text v-else>{{ express[curTab].express ? express[curTab].express.express_name : '--' }}</text>
</view>
</view>
<view class="info-item">
<view class="item-lable">物流单号</view>
<view class="item-content">
<text>{{ express[curTab].express_no ? express[curTab].express_no : '--' }}</text>
<view v-show="express[curTab].express_no" class="act-copy"
@click.stop="handleCopy(express[curTab].express_no)">
<text>复制</text>
</view>
</view>
</view>
</view>
<!-- 物流轨迹 -->
<view class="logis-detail" v-if="express[curTab].traces && express[curTab].traces.length">
<view class="logis-item" :class="{ first: index === 0 }" v-for="(item, index) in express[curTab].traces"
:key="index">
<view class="logis-item-content">
<view class="logis-item-content__describe">
<text class="f-26">{{ item.context }}</text>
</view>
<view class="logis-item-content__time">
<text class="f-22">{{ item.time }}</text>
</view>
</view>
</view>
</view>
<u-empty text="暂无数据显示哦~" v-else mode="list"></u-empty>
</view>
</template>
<script>
import * as OrderApi from '@/api/order'
export default {
data() {
return {
//
isLoading: true,
//
curTab: 0,
// ID
orderId: null,
//
express: {}
}
},
computed: {
tabs() {
if (this.express && this.express.length) {
const test = this.express.map((item, index) => {
return { name: `包裹${index + 1}` }
})
console.log('test', test)
return this.express.map((item, index) => {
return { name: `包裹${index + 1}` }
})
}
return []
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad({ orderId }) {
this.orderId = orderId
//
this.getExpress()
},
methods: {
//
getExpress() {
const app = this
app.isLoading = true
OrderApi.express(app.orderId)
.then(result => {
app.express = result.data.express
app.isLoading = false
})
},
//
handleCopy(value) {
const app = this
uni.setClipboardData({
data: value,
success: () => app.$toast('复制成功'),
fail: ({ errMsg }) => app.$toast('复制失败 ' + errMsg)
})
},
//
onChangeTab(index) {
this.curTab = index
},
}
}
import * as OrderApi from '@/api/order'
export default {
data() {
return {
//
isLoading: true,
//
curTab: 0,
// ID
orderId: null,
//
express: {}
}
},
computed: {
tabs() {
if (this.express && this.express.length) {
const test = this.express.map((item, index) => {
return {
name: `包裹${index + 1}`
}
})
console.log('test', test)
return this.express.map((item, index) => {
return {
name: `包裹${index + 1}`
}
})
}
return []
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad({
orderId
}) {
this.orderId = orderId
//
this.getExpress()
},
methods: {
//
getExpress() {
const app = this
app.isLoading = true
OrderApi.express(app.orderId)
.then(result => {
app.express = result.data.express
app.isLoading = false
})
},
//
handleCopy(value) {
const app = this
uni.setClipboardData({
data: value,
success: () => app.$toast('复制成功'),
fail: ({
errMsg
}) => app.$toast('复制失败 ' + errMsg)
})
},
//
onChangeTab(index) {
this.curTab = index
},
}
}
</script>
<style lang="scss" scoped>
//
.i-card {
background: #fff;
padding: 24rpx 24rpx;
}
//
.express {
margin-bottom: 20rpx;
.info-item {
display: flex;
margin-bottom: 24rpx;
&:last-child {
margin-bottom: 0;
}
.item-lable {
display: flex;
align-items: center;
font-size: 24rpx;
color: #999;
margin-right: 6rpx;
}
.item-content {
flex: 1;
display: flex;
align-items: center;
font-size: 26rpx;
color: #333;
.act-copy {
margin-left: 20rpx;
padding: 2rpx 20rpx;
font-size: 22rpx;
color: #666;
border: 1rpx solid #c1c1c1;
border-radius: 16rpx;
}
}
}
}
//
.deliver-goods-list {
margin-top: 20rpx;
margin-bottom: -30rpx;
.goods-item {
position: relative;
border-radius: 8rpx;
overflow: hidden;
width: 130rpx;
height: 130rpx;
float: left;
margin-right: 30rpx;
margin-bottom: 30rpx;
}
.goods-img {
display: block;
width: 100%;
height: 100%;
}
.title {
position: absolute;
bottom: 0;
width: 100%;
text-align: center;
background: rgba(0, 0, 0, 0.6);
color: #fff;
padding: 4rpx 0;
font-size: 24rpx;
}
}
//
.logis-detail {
padding: 30rpx;
background-color: #fff;
.logis-item {
position: relative;
padding: 10px 0 10px 25px;
box-sizing: border-box;
border-left: 2px solid #ccc;
&.first {
border-left: 2px solid #f40;
&:after {
background: #f40;
}
.logis-item-content {
background: #ff6e39;
color: #fff;
&:after {
border-bottom-color: #ff6e39;
}
}
}
&:after {
content: ' ';
display: inline-block;
position: absolute;
left: -6px;
top: 30px;
width: 6px;
height: 6px;
border-radius: 10px;
background: #bdbdbd;
border: 2px solid #fff;
}
.logis-item-content {
position: relative;
background: #f9f9f9;
padding: 10rpx 20rpx;
box-sizing: border-box;
color: #666;
&:after {
content: '';
display: inline-block;
position: absolute;
left: -10px;
top: 18px;
border-left: 10px solid #fff;
border-bottom: 10px solid #f3f3f3;
}
}
}
}
</style>
//
.i-card {
background: #fff;
padding: 24rpx 24rpx;
}
//
.express {
margin-bottom: 20rpx;
.info-item {
display: flex;
margin-bottom: 24rpx;
&:last-child {
margin-bottom: 0;
}
.item-lable {
display: flex;
align-items: center;
font-size: 24rpx;
color: #999;
margin-right: 6rpx;
}
.item-content {
flex: 1;
display: flex;
align-items: center;
font-size: 26rpx;
color: #333;
.act-copy {
margin-left: 20rpx;
padding: 2rpx 20rpx;
font-size: 22rpx;
color: #666;
border: 1rpx solid #c1c1c1;
border-radius: 16rpx;
}
}
}
}
//
.deliver-goods-list {
margin-top: 20rpx;
margin-bottom: -30rpx;
.goods-item {
position: relative;
border-radius: 8rpx;
overflow: hidden;
width: 130rpx;
height: 130rpx;
float: left;
margin-right: 30rpx;
margin-bottom: 30rpx;
}
.goods-img {
display: block;
width: 100%;
height: 100%;
}
.title {
position: absolute;
bottom: 0;
width: 100%;
text-align: center;
background: rgba(0, 0, 0, 0.6);
color: #fff;
padding: 4rpx 0;
font-size: 24rpx;
}
}
//
.logis-detail {
padding: 30rpx;
background-color: #fff;
.logis-item {
position: relative;
padding: 10px 0 10px 25px;
box-sizing: border-box;
border-left: 2px solid #ccc;
&.first {
border-left: 2px solid #f40;
&:after {
background: #f40;
}
.logis-item-content {
background: #ff6e39;
color: #fff;
&:after {
border-bottom-color: #ff6e39;
}
}
}
&:after {
content: ' ';
display: inline-block;
position: absolute;
left: -6px;
top: 30px;
width: 6px;
height: 6px;
border-radius: 10px;
background: #bdbdbd;
border: 2px solid #fff;
}
.logis-item-content {
position: relative;
background: #f9f9f9;
padding: 10rpx 20rpx;
box-sizing: border-box;
color: #666;
&:after {
content: '';
display: inline-block;
position: absolute;
left: -10px;
top: 18px;
border-left: 10px solid #fff;
border-bottom: 10px solid #f3f3f3;
}
}
}
}
</style>

@ -13,21 +13,21 @@
</view>
<view class="refund-bd">
<view class="item" @click="openPage(1)">
<image class="icon" src="/static/news/icon-refund-01.png"></image>
<image class="icon" :src="$picUrl+'/static/news/icon-refund-01.png'"></image>
<view class="info">
<view class="a">我要退货退款</view>已收到货需要退还已收到的货物
</view>
<image class="arrow" src="/static/news/icon-arrow.png"></image>
</view>
<view class="item" @click="openPage(2)">
<image class="icon" src="/static/news/icon-refund-02.png"></image>
<image class="icon" :src="$picUrl+'/static/news/icon-refund-03.png'"></image>
<view class="info">
<view class="a">我要退款无需退货</view>未收到货或与商家协商之后申请
</view>
<image class="arrow" src="/static/news/icon-arrow.png"></image>
</view>
<view class="item" @click="openPage(3)">
<image class="icon" src="/static/news/icon-refund-03.png"></image>
<image class="icon" :src="$picUrl+'/static/news/icon-refund-03.png'"></image>
<view class="info">
<view class="a">我要换货</view>对收到的商品不满意可与商家协商换货
</view>

@ -64,26 +64,24 @@
<u-input v-model="contentNotes" maxlength="200" type="textarea" :height="height"
placeholder="请您详细填写申请说明" />
</view>
<view class="c" v-if="(deliveryStatus == DeliveryStatusEnum.DELIVERED.value) && (receiptStatus == ReceiptStatusEnum.RECEIVED.value)">
<view class="photo">
<view class="file_img" v-for="(image, imageIndex) in imageList" :key="imageIndex">
<text class="image-delete iconfont icon-shanchu" @click="deleteImage(imageIndex)"></text>
<image :src="image.path"></image>
</view>
<view @click="chooseImage" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image src="/static/news/icon-upload.png"></image>
<view class="1">上传图片</view>
<view class="1">{{imageList.length>0?imageList.length:0}}/{{maxImageLength}}</view>
</view>
</view>
<view class="c"
v-if="(deliveryStatus == DeliveryStatusEnum.DELIVERED.value) && (receiptStatus == ReceiptStatusEnum.RECEIVED.value)">
<u-upload :action="action" :header="header" @on-uploaded="onSuccess" @on-remove="onRemove"
width="180" height="180" :file-list="transferList" :custom-btn="true" max-count="6">
<template v-slot:addBtn>
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image :src="$picUrl+'/static/news/icon-upload.png'"></image>
<view class="1">上传图片</view>
</view>
</template>
</u-upload>
</view>
</view>
<view class="invoice-phone">
联系电话<input type="number" placeholder="" v-model="phone" />
</view>
<view class="invoice-fd" @click="toDetail()">
提交申请
<view class="goods-fd">
<view class="btn" @click="toDetail">提交申请</view>
</view>
</view>
</template>
@ -136,8 +134,18 @@
phone: '',
imageList: [],
maxImageLength: 6,
imagesId: ''
};
imagesId: '',
action: '',
header: '',
}
},
onReady() {
this.action = (Config.get('apiUrl') + 'upload/image').replace("index.php?s=/", "")
this.header = {
'Storeid': uni.getStorageSync('Store').storeInfo.store_id,
'Access-Token': uni.getStorageSync('AccessToken'),
'platform': "MP-WEIXIN",
}
},
onLoad(op) {
this.deliveryStatus = op.deliveryStatus;
@ -147,46 +155,30 @@
this.value = this.order.is_user_grade ? this.order.grade_goods_price : this.order.goods_price;
},
methods: {
deleteImage(imageIndex) {
this.imageList.splice(imageIndex, 1)
},
//
chooseImage() {
const app = this
const oldImageList = app.imageList
//
uni.chooseImage({
count: app.maxImageLength - oldImageList.length,
sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'], //
success({
tempFiles
}) {
app.imageList = oldImageList.concat(tempFiles)
//
onSuccess(list) {
if (list.length > 0) {
const {
response
} = list[0];
if (response.status == 200) {
uni.showToast({
title: "上传成功"
})
this.imagesId = this.handleRemove('', list);
}
});
}
},
//
uploadFile() {
const app = this
console.log(this.imageList)
const {
imageList
} = app
//
return new Promise((resolve, reject) => {
if (imageList.length > 0) {
UploadApi.image(imageList)
.then(fileIds => {
app.imagesId = fileIds;
resolve(fileIds)
})
.catch(reject)
} else {
resolve()
}
})
onRemove(file, fileList) {
this.imagesId = this.handleRemove(file, fileList);
},
handleRemove: function(file, fileList) {
let idList = []
fileList.forEach(item => {
idList.push(item.response.data.fileInfo.file_id)
});
return idList.join(',')
},
onValue(e) {
if ((Number(e.detail.value) > Number(this.value)) == false) {
@ -481,23 +473,6 @@
}
}
&-fd {
width: 664rpx;
height: 104rpx;
background: #F55349;
border-radius: 8rpx;
text-align: center;
margin: 0 auto;
margin-top: 60rpx;
font-size: 32rpx;
font-weight: 500;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
&-money {
width: 100%;
background: #FFFFFF;
@ -563,7 +538,7 @@
margin-top: 20rpx;
padding: 26rpx 26rpx 26rpx 48rpx;
box-sizing: border-box;
margin-bottom: 200rpx;
.a {
display: flex;
align-items: center;
@ -636,38 +611,26 @@
}
}
.photo {
display: flex;
justify-content: flex-start;
padding: 20rpx 0;
overflow: hidden;
}
.file_img {
overflow: hidden;
position: relative;
image {
width: 80px;
height: 80px;
margin-right: 10rpx;
}
.image-delete {
position: absolute;
top: -10rpx;
right: -10rpx;
height: 42rpx;
width: 42rpx;
background: rgba(0, 0, 0, 0.64);
border-radius: 50%;
color: #fff;
font-weight: bolder;
font-size: 22rpx;
z-index: 10;
display: flex;
justify-content: center;
align-items: center;
.goods-fd {
width: 100%;
position: fixed;
left: 0;
bottom: 0;
padding: 0.9375rem;
z-index: 99;
background-color: #fafafa;
box-sizing: border-box;
.btn {
width: 630rpx;
line-height: 88rpx;
background: #F34A40;
border-radius: 88rpx;
text-align: center;
font-size: 28rpx;
font-weight: 500;
color: #FFFFFF;
margin: auto;
}
}
</style>

Loading…
Cancel
Save