|
@@ -40,11 +40,11 @@ |
|
@@ -40,11 +40,11 @@ |
40
|
</view>
|
40
|
</view>
|
41
|
<view class="line"></view>
|
41
|
<view class="line"></view>
|
42
|
<view class="botBtn flexA">
|
42
|
<view class="botBtn flexA">
|
43
|
- <view class="flexC" @click="openshowBuyer(item)">买家信息</view>
|
|
|
44
|
- <!-- <view class="flexC">上传转赠证明</view>
|
|
|
45
|
- <view class="flexC">已发货</view>
|
|
|
46
|
- <view class="flexC yellow" @click="show=true">查看交易证明</view>-->
|
|
|
47
|
- <view class="flexC yellow">重新上传证明</view>
|
43
|
+ <view v-if="reseller(item.status)" class="flexC" @click="openshowBuyer(item)">买家信息</view>
|
|
|
44
|
+ <view v-if="!item.license_preview" class="flexC" @click="openimag(item.id,idx)">上传转赠证明</view>
|
|
|
45
|
+ <view v-if="reseller(item.status)" class="flexC" @click="order_send(item.id,idx)">发货</view>
|
|
|
46
|
+ <view v-if="item.license_preview" class="flexC yellow" @click="openshow(item.license_preview)">查看交易证明</view>
|
|
|
47
|
+ <view v-if="item.license_preview" class="flexC yellow" @click="openimag(item.id,idx)">重新上传证明</view>
|
48
|
</view>
|
48
|
</view>
|
49
|
</view>
|
49
|
</view>
|
50
|
</view>
|
50
|
</view>
|
|
@@ -53,7 +53,7 @@ |
|
@@ -53,7 +53,7 @@ |
53
|
<view class="popTitle">
|
53
|
<view class="popTitle">
|
54
|
转赠证明
|
54
|
转赠证明
|
55
|
</view>
|
55
|
</view>
|
56
|
- <image class="popImage" src="/static/logo.png" mode=""></image>
|
56
|
+ <image class="popImage" :src="licenimg" mode=""></image>
|
57
|
<view class="popBtn flexC">
|
57
|
<view class="popBtn flexC">
|
58
|
<view class="btn flexC" @click="show=false">确定</view>
|
58
|
<view class="btn flexC" @click="show=false">确定</view>
|
59
|
</view>
|
59
|
</view>
|
|
@@ -76,7 +76,7 @@ |
|
@@ -76,7 +76,7 @@ |
76
|
<view class="left"><text style="color: #FC4338;">*</text>微信号:</view>
|
76
|
<view class="left"><text style="color: #FC4338;">*</text>微信号:</view>
|
77
|
<view class="right flexA">
|
77
|
<view class="right flexA">
|
78
|
<view class="fw700">{{wechart}}</view>
|
78
|
<view class="fw700">{{wechart}}</view>
|
79
|
- <view style="margin-left: 16rpx;color: rgba(0,0,0,0.4);" @click="copy(code)">复制</view>
|
79
|
+ <view style="margin-left: 16rpx;color: rgba(0,0,0,0.4);" @click="copy(code)">复制</view>
|
80
|
</view>
|
80
|
</view>
|
81
|
</view>
|
81
|
</view>
|
82
|
<view class="list flexA">
|
82
|
<view class="list flexA">
|
|
@@ -104,8 +104,13 @@ |
|
@@ -104,8 +104,13 @@ |
104
|
|
104
|
|
105
|
<script>
|
105
|
<script>
|
106
|
import {
|
106
|
import {
|
107
|
- sellerOrderList
|
107
|
+ sellerOrderList,
|
|
|
108
|
+ order_send,
|
|
|
109
|
+ order_license
|
108
|
} from '@/api/order.js'
|
110
|
} from '@/api/order.js'
|
|
|
111
|
+ import {
|
|
|
112
|
+ baseURL
|
|
|
113
|
+ } from '@/utils/request.js'
|
109
|
export default {
|
114
|
export default {
|
110
|
data() {
|
115
|
data() {
|
111
|
return {
|
116
|
return {
|
|
@@ -133,6 +138,10 @@ |
|
@@ -133,6 +138,10 @@ |
133
|
wechart: "",
|
138
|
wechart: "",
|
134
|
name: "",
|
139
|
name: "",
|
135
|
phone: "",
|
140
|
phone: "",
|
|
|
141
|
+ //证明
|
|
|
142
|
+ imgid: "",
|
|
|
143
|
+ imgindex: "",
|
|
|
144
|
+ licenimg: "",
|
136
|
}
|
145
|
}
|
137
|
},
|
146
|
},
|
138
|
onLoad() {
|
147
|
onLoad() {
|
|
@@ -140,6 +149,15 @@ |
|
@@ -140,6 +149,15 @@ |
140
|
|
149
|
|
141
|
},
|
150
|
},
|
142
|
methods: {
|
151
|
methods: {
|
|
|
152
|
+ // 状态筛选
|
|
|
153
|
+ reseller(s) {
|
|
|
154
|
+ if (s == 2) return true;
|
|
|
155
|
+ },
|
|
|
156
|
+ rechange(s) {
|
|
|
157
|
+ if (s == 3) return true;
|
|
|
158
|
+ if (s == 4) return true;
|
|
|
159
|
+ if (s == 6) return true;
|
|
|
160
|
+ },
|
143
|
openshowBuyer(item) {
|
161
|
openshowBuyer(item) {
|
144
|
this.showBuyer = true
|
162
|
this.showBuyer = true
|
145
|
this.code = item.buyer_name
|
163
|
this.code = item.buyer_name
|
|
@@ -147,6 +165,79 @@ |
|
@@ -147,6 +165,79 @@ |
147
|
this.name = item.buyer_name
|
165
|
this.name = item.buyer_name
|
148
|
this.phone = item.buyer_mobile
|
166
|
this.phone = item.buyer_mobile
|
149
|
},
|
167
|
},
|
|
|
168
|
+ // 查看证明
|
|
|
169
|
+ openshow(img) {
|
|
|
170
|
+ this.show = true
|
|
|
171
|
+ this.licenimg = img
|
|
|
172
|
+ console.log(this.licenimg)
|
|
|
173
|
+ },
|
|
|
174
|
+ //上传证明
|
|
|
175
|
+ openimag(id, imgindex) {
|
|
|
176
|
+ let that = this
|
|
|
177
|
+ that.imgid = id
|
|
|
178
|
+ that.imgindex = imgindex
|
|
|
179
|
+ uni.chooseImage({ // 从本地选择图片或使用相机拍照
|
|
|
180
|
+ success: (res) => {
|
|
|
181
|
+ count: 1, // 最多可以选择的图片张数,默认为9张
|
|
|
182
|
+ console.log(res)
|
|
|
183
|
+ const tempFilePaths = res.tempFilePaths; // 成功的返回图片的本地路径列表
|
|
|
184
|
+ uni.uploadFile({ // 直接上传文件到云储存
|
|
|
185
|
+ url: baseURL + '/common/upload', //仅为示例,非真实的接口地址
|
|
|
186
|
+ filePath: res.tempFilePaths[0], // 要上传文件的对象
|
|
|
187
|
+ name: 'file',
|
|
|
188
|
+ formData: {
|
|
|
189
|
+ token: uni.getStorageSync('token')
|
|
|
190
|
+ },
|
|
|
191
|
+ success: (uploadFileRes) => {
|
|
|
192
|
+ let data = JSON.parse(uploadFileRes.data);
|
|
|
193
|
+ console.log(data);
|
|
|
194
|
+ that.licenimg = data.data.fullurl; // 绝对路径
|
|
|
195
|
+ console.log(that.licenimg)
|
|
|
196
|
+ that.order_license()
|
|
|
197
|
+ }
|
|
|
198
|
+ });
|
|
|
199
|
+ }
|
|
|
200
|
+ })
|
|
|
201
|
+ return;
|
|
|
202
|
+ },
|
|
|
203
|
+ // 卖家上传证明
|
|
|
204
|
+ async order_license() {
|
|
|
205
|
+ let obj = {
|
|
|
206
|
+ order_id: this.imgid,
|
|
|
207
|
+ license: this.licenimg
|
|
|
208
|
+ }
|
|
|
209
|
+ try {
|
|
|
210
|
+ const res = await order_license(obj)
|
|
|
211
|
+ console.log('order_license', res)
|
|
|
212
|
+ this.list[this.imgindex].license_preview = this.licenimg
|
|
|
213
|
+ // 保存数据
|
|
|
214
|
+ } catch (err) {
|
|
|
215
|
+ uni.showToast({
|
|
|
216
|
+ title: err,
|
|
|
217
|
+ icon: 'none'
|
|
|
218
|
+ })
|
|
|
219
|
+ console.log('order_license', err)
|
|
|
220
|
+ }
|
|
|
221
|
+ },
|
|
|
222
|
+ //卖家发货
|
|
|
223
|
+ async order_send(id, idx) {
|
|
|
224
|
+ try {
|
|
|
225
|
+ const res = await order_send(id)
|
|
|
226
|
+ console.log('order_send', res)
|
|
|
227
|
+ if (this.typeindex == 0) {
|
|
|
228
|
+ this.list[idx].status = 3
|
|
|
229
|
+ } else {
|
|
|
230
|
+ this.list.splice(idx, 1)
|
|
|
231
|
+ }
|
|
|
232
|
+ // 保存数据
|
|
|
233
|
+ } catch (err) {
|
|
|
234
|
+ uni.showToast({
|
|
|
235
|
+ title: err,
|
|
|
236
|
+ icon: 'none'
|
|
|
237
|
+ })
|
|
|
238
|
+ console.log('order_send', err)
|
|
|
239
|
+ }
|
|
|
240
|
+ },
|
150
|
//复制
|
241
|
//复制
|
151
|
copy(it) {
|
242
|
copy(it) {
|
152
|
uni.setClipboardData({
|
243
|
uni.setClipboardData({
|