version/0412
fanfan 1 year ago
parent 0c68ce0aa0
commit 2dae228a00
  1. 16
      pages/news3/ManualEntry.vue
  2. 532
      pages/order/express/index.vue
  3. 6
      pages/order/refund/index.vue
  4. 171
      pages/order/refund/refund.vue

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

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

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

@ -64,26 +64,24 @@
<u-input v-model="contentNotes" maxlength="200" type="textarea" :height="height" <u-input v-model="contentNotes" maxlength="200" type="textarea" :height="height"
placeholder="请您详细填写申请说明" /> placeholder="请您详细填写申请说明" />
</view> </view>
<view class="c" v-if="(deliveryStatus == DeliveryStatusEnum.DELIVERED.value) && (receiptStatus == ReceiptStatusEnum.RECEIVED.value)"> <view class="c"
<view class="photo"> v-if="(deliveryStatus == DeliveryStatusEnum.DELIVERED.value) && (receiptStatus == ReceiptStatusEnum.RECEIVED.value)">
<view class="file_img" v-for="(image, imageIndex) in imageList" :key="imageIndex"> <u-upload :action="action" :header="header" @on-uploaded="onSuccess" @on-remove="onRemove"
<text class="image-delete iconfont icon-shanchu" @click="deleteImage(imageIndex)"></text> width="180" height="180" :file-list="transferList" :custom-btn="true" max-count="6">
<image :src="image.path"></image> <template v-slot:addBtn>
</view> <view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image :src="$picUrl+'/static/news/icon-upload.png'"></image>
<view @click="chooseImage" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150"> <view class="1">上传图片</view>
<image src="/static/news/icon-upload.png"></image> </view>
<view class="1">上传图片</view> </template>
<view class="1">{{imageList.length>0?imageList.length:0}}/{{maxImageLength}}</view> </u-upload>
</view>
</view>
</view> </view>
</view> </view>
<view class="invoice-phone"> <view class="invoice-phone">
联系电话<input type="number" placeholder="" v-model="phone" /> 联系电话<input type="number" placeholder="" v-model="phone" />
</view> </view>
<view class="invoice-fd" @click="toDetail()"> <view class="goods-fd">
提交申请 <view class="btn" @click="toDetail">提交申请</view>
</view> </view>
</view> </view>
</template> </template>
@ -136,8 +134,18 @@
phone: '', phone: '',
imageList: [], imageList: [],
maxImageLength: 6, 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) { onLoad(op) {
this.deliveryStatus = op.deliveryStatus; this.deliveryStatus = op.deliveryStatus;
@ -147,46 +155,30 @@
this.value = this.order.is_user_grade ? this.order.grade_goods_price : this.order.goods_price; this.value = this.order.is_user_grade ? this.order.grade_goods_price : this.order.goods_price;
}, },
methods: { methods: {
deleteImage(imageIndex) { //
this.imageList.splice(imageIndex, 1) onSuccess(list) {
}, if (list.length > 0) {
// const {
chooseImage() { response
const app = this } = list[0];
const oldImageList = app.imageList if (response.status == 200) {
// uni.showToast({
uni.chooseImage({ title: "上传成功"
count: app.maxImageLength - oldImageList.length, })
sizeType: ['original', 'compressed'], // this.imagesId = this.handleRemove('', list);
sourceType: ['album', 'camera'], //
success({
tempFiles
}) {
app.imageList = oldImageList.concat(tempFiles)
} }
}); }
},
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(',')
//
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()
}
})
}, },
onValue(e) { onValue(e) {
if ((Number(e.detail.value) > Number(this.value)) == false) { 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 { &-money {
width: 100%; width: 100%;
background: #FFFFFF; background: #FFFFFF;
@ -563,7 +538,7 @@
margin-top: 20rpx; margin-top: 20rpx;
padding: 26rpx 26rpx 26rpx 48rpx; padding: 26rpx 26rpx 26rpx 48rpx;
box-sizing: border-box; box-sizing: border-box;
margin-bottom: 200rpx;
.a { .a {
display: flex; display: flex;
align-items: center; align-items: center;
@ -636,38 +611,26 @@
} }
} }
.photo { .goods-fd {
display: flex; width: 100%;
justify-content: flex-start; position: fixed;
padding: 20rpx 0; left: 0;
overflow: hidden; bottom: 0;
} padding: 0.9375rem;
z-index: 99;
.file_img { background-color: #fafafa;
overflow: hidden; box-sizing: border-box;
position: relative;
.btn {
image { width: 630rpx;
width: 80px; line-height: 88rpx;
height: 80px; background: #F34A40;
margin-right: 10rpx; border-radius: 88rpx;
} text-align: center;
font-size: 28rpx;
.image-delete { font-weight: 500;
position: absolute; color: #FFFFFF;
top: -10rpx; margin: auto;
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;
} }
} }
</style> </style>

Loading…
Cancel
Save