version/0412
fanfan 1 year ago
parent 0c68ce0aa0
commit 2dae228a00
  1. 16
      pages/news3/ManualEntry.vue
  2. 28
      pages/order/express/index.vue
  3. 6
      pages/order/refund/index.vue
  4. 165
      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(',');
} }
} }
}, },

@ -2,8 +2,8 @@
<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">
@ -26,7 +26,8 @@
<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"
@click.stop="handleCopy(express[curTab].express_no)">
<text>复制</text> <text>复制</text>
</view> </view>
</view> </view>
@ -35,7 +36,8 @@
<!-- 物流轨迹 --> <!-- 物流轨迹 -->
<view class="logis-detail" v-if="express[curTab].traces && express[curTab].traces.length"> <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" :class="{ first: index === 0 }" v-for="(item, index) in express[curTab].traces"
:key="index">
<view class="logis-item-content"> <view class="logis-item-content">
<view class="logis-item-content__describe"> <view class="logis-item-content__describe">
<text class="f-26">{{ item.context }}</text> <text class="f-26">{{ item.context }}</text>
@ -46,6 +48,7 @@
</view> </view>
</view> </view>
</view> </view>
<u-empty text="暂无数据显示哦~" v-else mode="list"></u-empty>
</view> </view>
</template> </template>
@ -70,13 +73,17 @@
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) console.log('test', test)
return this.express.map((item, index) => { return this.express.map((item, index) => {
return { name: `包裹${index + 1}` } return {
name: `包裹${index + 1}`
}
}) })
} }
return [] return []
@ -86,7 +93,9 @@
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad({ orderId }) { onLoad({
orderId
}) {
this.orderId = orderId this.orderId = orderId
// //
this.getExpress() this.getExpress()
@ -111,7 +120,9 @@
uni.setClipboardData({ uni.setClipboardData({
data: value, data: value,
success: () => app.$toast('复制成功'), success: () => app.$toast('复制成功'),
fail: ({ errMsg }) => app.$toast('复制失败 ' + errMsg) fail: ({
errMsg
}) => app.$toast('复制失败 ' + errMsg)
}) })
}, },
@ -125,7 +136,6 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
// //
.i-card { .i-card {
background: #fff; background: #fff;

@ -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">
<image src="/static/news/icon-upload.png"></image>
<view class="1">上传图片</view> <view class="1">上传图片</view>
<view class="1">{{imageList.length>0?imageList.length:0}}/{{maxImageLength}}</view>
</view>
</view> </view>
</template>
</u-upload>
</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) {
//
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)
}
});
},
//
uploadFile() {
const app = this
console.log(this.imageList)
const { const {
imageList response
} = app } = list[0];
// if (response.status == 200) {
return new Promise((resolve, reject) => { uni.showToast({
if (imageList.length > 0) { title: "上传成功"
UploadApi.image(imageList)
.then(fileIds => {
app.imagesId = fileIds;
resolve(fileIds)
}) })
.catch(reject) this.imagesId = this.handleRemove('', list);
} 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) { 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;
image {
width: 80px;
height: 80px;
margin-right: 10rpx;
}
.image-delete { .btn {
position: absolute; width: 630rpx;
top: -10rpx; line-height: 88rpx;
right: -10rpx; background: #F34A40;
height: 42rpx; border-radius: 88rpx;
width: 42rpx; text-align: center;
background: rgba(0, 0, 0, 0.64); font-size: 28rpx;
border-radius: 50%; font-weight: 500;
color: #fff; color: #FFFFFF;
font-weight: bolder; margin: auto;
font-size: 22rpx;
z-index: 10;
display: flex;
justify-content: center;
align-items: center;
} }
} }
</style> </style>

Loading…
Cancel
Save