|
|
@ -11,7 +11,7 @@ |
|
|
<view class="flex-col-start-start"> |
|
|
<view class="flex-col-start-start"> |
|
|
<text style="font-size: 30rpx; color: #333333; font-weight: 600">{{ orderInfo.customerEnterpriseName }}</text> |
|
|
<text style="font-size: 30rpx; color: #333333; font-weight: 600">{{ orderInfo.customerEnterpriseName }}</text> |
|
|
<text style="font-size: 26rpx; color: #333333; margin-top: 26rpx"> |
|
|
<text style="font-size: 26rpx; color: #333333; margin-top: 26rpx"> |
|
|
联系人: {{ `${orderInfo.deliveryAddress.receiver} ${orderInfo.deliveryAddress.receiverMobile}` }} |
|
|
|
|
|
|
|
|
联系人: {{ `${orderInfo.deliveryAddress.receiver || '-'} ${orderInfo.deliveryAddress.receiverMobile || '-'}` }} |
|
|
</text> |
|
|
</text> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -27,16 +27,14 @@ |
|
|
<!-- 待收货展示 --> |
|
|
<!-- 待收货展示 --> |
|
|
<view v-if="supplierOrder.status == supplierOrderStatusEnum.WAIT_RECEIVE" class="button-item" @click="confirmReceive(supplierOrder)">确认收货</view> |
|
|
<view v-if="supplierOrder.status == supplierOrderStatusEnum.WAIT_RECEIVE" class="button-item" @click="confirmReceive(supplierOrder)">确认收货</view> |
|
|
<!-- 待借款展示 --> |
|
|
<!-- 待借款展示 --> |
|
|
<view v-else-if="supplierOrder.status == supplierOrderStatusEnum.WAIT_CLIENT_LOAN" class="button-item" @click="goBorrowing(supplierOrder)"> |
|
|
|
|
|
去借款 |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<view v-else-if="supplierOrder.status == supplierOrderStatusEnum.WAIT_CLIENT_LOAN" class="button-item" @click="goFsPage()">去借款</view> |
|
|
<!-- 飞算支付且待还款状态 --> |
|
|
<!-- 飞算支付且待还款状态 --> |
|
|
<view |
|
|
<view |
|
|
v-else-if="orderInfo.paymentMethod == paymentMethodEnum.FLY_PAY && supplierOrder.status == supplierOrderStatusEnum.WAIT_CLIENT_REPAY" |
|
|
v-else-if="orderInfo.paymentMethod == paymentMethodEnum.FLY_PAY && supplierOrder.status == supplierOrderStatusEnum.WAIT_CLIENT_REPAY" |
|
|
class="button-item" |
|
|
class="button-item" |
|
|
@click="goRepaying(supplierOrder)" |
|
|
|
|
|
|
|
|
@click="goFsPage()" |
|
|
> |
|
|
> |
|
|
去借款 |
|
|
|
|
|
|
|
|
去还款 |
|
|
</view> |
|
|
</view> |
|
|
<text v-else style="font-size: 30rpx; color: #ff5368; font-weight: 600">{{ supplierOrderStatusMap[supplierOrder.status] }}</text> |
|
|
<text v-else style="font-size: 30rpx; color: #ff5368; font-weight: 600">{{ supplierOrderStatusMap[supplierOrder.status] }}</text> |
|
|
</view> |
|
|
</view> |
|
|
@ -147,7 +145,7 @@ |
|
|
<script> |
|
|
<script> |
|
|
import { go2, back, uploadImage } from '@/utils/hook.js' |
|
|
import { go2, back, uploadImage } from '@/utils/hook.js' |
|
|
import { getClientOrderInfo, clientUploadVoucher, clientDeleteVoucher, clientConfirmOrder } from '@/apis/orderApi.js' |
|
|
import { getClientOrderInfo, clientUploadVoucher, clientDeleteVoucher, clientConfirmOrder } from '@/apis/orderApi.js' |
|
|
import { transformFileToImg } from '@/apis/commonApi.js' |
|
|
|
|
|
|
|
|
import { transformFileToImg, getFeisuanUrl } from '@/apis/commonApi.js' |
|
|
import { orderStatusEnum, supplierOrderStatusMap, supplierOrderStatusEnum, paymentMethodMap, paymentMethodEnum } from '@/enums/index.js' |
|
|
import { orderStatusEnum, supplierOrderStatusMap, supplierOrderStatusEnum, paymentMethodMap, paymentMethodEnum } from '@/enums/index.js' |
|
|
const statusImg = { |
|
|
const statusImg = { |
|
|
[orderStatusEnum.WAIT_SUPPLIER_CONFIRM]: '待供应商确认', |
|
|
[orderStatusEnum.WAIT_SUPPLIER_CONFIRM]: '待供应商确认', |
|
|
@ -210,7 +208,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
transformAddress(address) { |
|
|
transformAddress(address) { |
|
|
let res = '' |
|
|
let res = '' |
|
|
if (address) { |
|
|
|
|
|
|
|
|
if (address.provinceName) { |
|
|
res = `${address.provinceName}${address.cityName}${address.districtName}${address.detail}` |
|
|
res = `${address.provinceName}${address.cityName}${address.districtName}${address.detail}` |
|
|
} |
|
|
} |
|
|
return res |
|
|
return res |
|
|
@ -287,7 +285,21 @@ export default { |
|
|
return showVoucherStatus.includes(status) |
|
|
return showVoucherStatus.includes(status) |
|
|
}, |
|
|
}, |
|
|
// 去借款 |
|
|
// 去借款 |
|
|
goBorrowing(order) {}, |
|
|
|
|
|
|
|
|
goFsPage() { |
|
|
|
|
|
getFeisuanUrl().then((res) => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
// #ifdef APP-PLUS |
|
|
|
|
|
go2('page-view', { |
|
|
|
|
|
title: '飞算申请', |
|
|
|
|
|
url: encodeURIComponent(res) |
|
|
|
|
|
}) |
|
|
|
|
|
// #endif |
|
|
|
|
|
// #ifdef H5 |
|
|
|
|
|
window ? (window.location.href = res) : '' |
|
|
|
|
|
// #endif |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
// 确认收货 |
|
|
// 确认收货 |
|
|
confirmReceive(order) { |
|
|
confirmReceive(order) { |
|
|
uni.showModal({ |
|
|
uni.showModal({ |
|
|
@ -374,10 +386,21 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 查看合同 |
|
|
// 查看合同 |
|
|
viewContract() { |
|
|
viewContract() { |
|
|
let url = this.orderInfo.contractUrl |
|
|
|
|
|
if (url) { |
|
|
|
|
|
transformFileToImg({ fileUrl: url }).then((res) => { |
|
|
|
|
|
uni.previewImage({ urls: [res.imgUrl], current: res.imgUrl }) |
|
|
|
|
|
|
|
|
let urls = this.orderInfo.contractUrls |
|
|
|
|
|
if (urls && urls.length > 0) { |
|
|
|
|
|
let promises = [] |
|
|
|
|
|
urls.forEach((item) => { |
|
|
|
|
|
promises.push(transformFileToImg({ fileUrl: item })) |
|
|
|
|
|
}) |
|
|
|
|
|
Promise.all(promises).then((res) => { |
|
|
|
|
|
let urls = [] |
|
|
|
|
|
res.forEach((item) => { |
|
|
|
|
|
urls.push(item.imgUrl) |
|
|
|
|
|
}) |
|
|
|
|
|
uni.previewImage({ |
|
|
|
|
|
urls, |
|
|
|
|
|
current: urls[0].imgUrl |
|
|
|
|
|
}) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|