...
|
...
|
@@ -40,11 +40,11 @@ |
|
|
</view>
|
|
|
<view class="line"></view>
|
|
|
<view class="botBtn flexA">
|
|
|
<view class="flexC" @click="openshowBuyer(item)">买家信息</view>
|
|
|
<!-- <view class="flexC">上传转赠证明</view>
|
|
|
<view class="flexC">已发货</view>
|
|
|
<view class="flexC yellow" @click="show=true">查看交易证明</view>-->
|
|
|
<view class="flexC yellow">重新上传证明</view>
|
|
|
<view v-if="reseller(item.status)" class="flexC" @click="openshowBuyer(item)">买家信息</view>
|
|
|
<view v-if="!item.license_preview" class="flexC" @click="openimag(item.id,idx)">上传转赠证明</view>
|
|
|
<view v-if="reseller(item.status)" class="flexC" @click="order_send(item.id,idx)">发货</view>
|
|
|
<view v-if="item.license_preview" class="flexC yellow" @click="openshow(item.license_preview)">查看交易证明</view>
|
|
|
<view v-if="item.license_preview" class="flexC yellow" @click="openimag(item.id,idx)">重新上传证明</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
...
|
...
|
@@ -53,7 +53,7 @@ |
|
|
<view class="popTitle">
|
|
|
转赠证明
|
|
|
</view>
|
|
|
<image class="popImage" src="/static/logo.png" mode=""></image>
|
|
|
<image class="popImage" :src="licenimg" mode=""></image>
|
|
|
<view class="popBtn flexC">
|
|
|
<view class="btn flexC" @click="show=false">确定</view>
|
|
|
</view>
|
...
|
...
|
@@ -76,7 +76,7 @@ |
|
|
<view class="left"><text style="color: #FC4338;">*</text>微信号:</view>
|
|
|
<view class="right flexA">
|
|
|
<view class="fw700">{{wechart}}</view>
|
|
|
<view style="margin-left: 16rpx;color: rgba(0,0,0,0.4);" @click="copy(code)">复制</view>
|
|
|
<view style="margin-left: 16rpx;color: rgba(0,0,0,0.4);" @click="copy(code)">复制</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="list flexA">
|
...
|
...
|
@@ -104,8 +104,13 @@ |
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
sellerOrderList
|
|
|
sellerOrderList,
|
|
|
order_send,
|
|
|
order_license
|
|
|
} from '@/api/order.js'
|
|
|
import {
|
|
|
baseURL
|
|
|
} from '@/utils/request.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
...
|
...
|
@@ -133,6 +138,10 @@ |
|
|
wechart: "",
|
|
|
name: "",
|
|
|
phone: "",
|
|
|
//证明
|
|
|
imgid: "",
|
|
|
imgindex: "",
|
|
|
licenimg: "",
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
...
|
...
|
@@ -140,6 +149,15 @@ |
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
// 状态筛选
|
|
|
reseller(s) {
|
|
|
if (s == 2) return true;
|
|
|
},
|
|
|
rechange(s) {
|
|
|
if (s == 3) return true;
|
|
|
if (s == 4) return true;
|
|
|
if (s == 6) return true;
|
|
|
},
|
|
|
openshowBuyer(item) {
|
|
|
this.showBuyer = true
|
|
|
this.code = item.buyer_name
|
...
|
...
|
@@ -147,6 +165,79 @@ |
|
|
this.name = item.buyer_name
|
|
|
this.phone = item.buyer_mobile
|
|
|
},
|
|
|
// 查看证明
|
|
|
openshow(img) {
|
|
|
this.show = true
|
|
|
this.licenimg = img
|
|
|
console.log(this.licenimg)
|
|
|
},
|
|
|
//上传证明
|
|
|
openimag(id, imgindex) {
|
|
|
let that = this
|
|
|
that.imgid = id
|
|
|
that.imgindex = imgindex
|
|
|
uni.chooseImage({ // 从本地选择图片或使用相机拍照
|
|
|
success: (res) => {
|
|
|
count: 1, // 最多可以选择的图片张数,默认为9张
|
|
|
console.log(res)
|
|
|
const tempFilePaths = res.tempFilePaths; // 成功的返回图片的本地路径列表
|
|
|
uni.uploadFile({ // 直接上传文件到云储存
|
|
|
url: baseURL + '/common/upload', //仅为示例,非真实的接口地址
|
|
|
filePath: res.tempFilePaths[0], // 要上传文件的对象
|
|
|
name: 'file',
|
|
|
formData: {
|
|
|
token: uni.getStorageSync('token')
|
|
|
},
|
|
|
success: (uploadFileRes) => {
|
|
|
let data = JSON.parse(uploadFileRes.data);
|
|
|
console.log(data);
|
|
|
that.licenimg = data.data.fullurl; // 绝对路径
|
|
|
console.log(that.licenimg)
|
|
|
that.order_license()
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
return;
|
|
|
},
|
|
|
// 卖家上传证明
|
|
|
async order_license() {
|
|
|
let obj = {
|
|
|
order_id: this.imgid,
|
|
|
license: this.licenimg
|
|
|
}
|
|
|
try {
|
|
|
const res = await order_license(obj)
|
|
|
console.log('order_license', res)
|
|
|
this.list[this.imgindex].license_preview = this.licenimg
|
|
|
// 保存数据
|
|
|
} catch (err) {
|
|
|
uni.showToast({
|
|
|
title: err,
|
|
|
icon: 'none'
|
|
|
})
|
|
|
console.log('order_license', err)
|
|
|
}
|
|
|
},
|
|
|
//卖家发货
|
|
|
async order_send(id, idx) {
|
|
|
try {
|
|
|
const res = await order_send(id)
|
|
|
console.log('order_send', res)
|
|
|
if (this.typeindex == 0) {
|
|
|
this.list[idx].status = 3
|
|
|
} else {
|
|
|
this.list.splice(idx, 1)
|
|
|
}
|
|
|
// 保存数据
|
|
|
} catch (err) {
|
|
|
uni.showToast({
|
|
|
title: err,
|
|
|
icon: 'none'
|
|
|
})
|
|
|
console.log('order_send', err)
|
|
|
}
|
|
|
},
|
|
|
//复制
|
|
|
copy(it) {
|
|
|
uni.setClipboardData({
|
...
|
...
|
|