|
|
@ -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> |
|
|
|