|
|
|
@ -3,7 +3,7 @@ |
|
|
|
<mescroll-body ref="mescrollRef" :sticky="true" @init="mescrollInit" :down="{ native: true }" @down="downCallback" :up="upOption" @up="upCallback"> |
|
|
|
|
|
|
|
<!-- tab栏 --> |
|
|
|
<u-tabs :list="tabs" :is-scroll="false" :current="curTab" active-color="#FA2209" :duration="0.2" @change="onChangeTab" /> |
|
|
|
<u-tabs :list="tabs" :is-scroll="false" :current="curTab" active-color="#26587b" :duration="0.2" @change="onChangeTab" /> |
|
|
|
|
|
|
|
<!-- 订单列表 --> |
|
|
|
<view class="order-list"> |
|
|
|
@ -27,29 +27,27 @@ |
|
|
|
<!-- 商品信息 --> |
|
|
|
<view class="goods-content"> |
|
|
|
<view class="goods-title"> |
|
|
|
<text class="twoline-hide">{{ goods.goods_name }}</text> |
|
|
|
<text class="twoline-hide"> |
|
|
|
<view class="twoline-hide"> |
|
|
|
<text class="twoline-hide-name">{{ goods.goods_name }}</text> |
|
|
|
</view> |
|
|
|
<view class="twoline-hide-info"> |
|
|
|
<text class="twoline-hide-price"> |
|
|
|
单价: |
|
|
|
<text class="twoline-hide-icon">¥</text> |
|
|
|
<view class="twoline-hide-icon">¥</view> |
|
|
|
{{ goods.price }} |
|
|
|
</text> |
|
|
|
</text> |
|
|
|
<text class="twoline-hide"> |
|
|
|
<text class="twoline-hide-price"> |
|
|
|
购买年限: {{ goods.transaction_count }}年 |
|
|
|
</text> |
|
|
|
</text> |
|
|
|
<text class="twoline-hide"> |
|
|
|
<text class="twoline-hide-price"> |
|
|
|
交易佣金: |
|
|
|
<text class="twoline-hide-icon">¥</text> |
|
|
|
<view class="twoline-hide-icon">¥</view> |
|
|
|
{{ goods.service_charge }} |
|
|
|
<text class="twoline-hide-sum"> |
|
|
|
<view class="twoline-hide-sum"> |
|
|
|
合计:¥{{goods.money}} |
|
|
|
</text> |
|
|
|
</view> |
|
|
|
</text> |
|
|
|
</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 委托方等信息 --> |
|
|
|
@ -58,6 +56,36 @@ |
|
|
|
<view class="goods-props-item"> |
|
|
|
<text>交易方式:{{goods.goods_entrust=="1"?'转让':'授权'}}</text> |
|
|
|
</view> |
|
|
|
<view class="goods-props-item" v-if="item.status == 2 || item.status == '3' || item.status == '4'"> |
|
|
|
<text>交易ISLI编码:{{goods.contract_code ? goods.contract_code :'--'}}</text> |
|
|
|
</view> |
|
|
|
<view class="goods-props-item" v-if="item.status == 2 || item.status == '3' || item.status == '4'"> |
|
|
|
<text>提取期限:{{item.paymenttimeStr}}</text> |
|
|
|
</view> |
|
|
|
<view class="goods-props-bt"><!--v-if="item.status == 2 || item.status == '3' || item.status == '4'"--> |
|
|
|
<view class="goods-props-bt-down" @click="handelDownload(idx,item.batchcode,goods)"> |
|
|
|
下载 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="goods-sum"> |
|
|
|
<view class="goods-sum-date"> |
|
|
|
提交时间:{{item.createtime}} |
|
|
|
</view> |
|
|
|
<view class="goods-sum-time" v-if="item.status == 1"> |
|
|
|
付款倒计时:{{item.createDateTime}} |
|
|
|
</view> |
|
|
|
<view class="goods-sum-time" v-if="item.status == 2 || item.status == '3' || item.status == '4'"> |
|
|
|
支付时间:{{item.paymenttime}} |
|
|
|
</view> |
|
|
|
<view class="goods-sum-amount"> |
|
|
|
订单金额:¥{{item.total_money_str}} |
|
|
|
</view> |
|
|
|
<view v-if="item.status == 1" class="goods-sum-bt"> |
|
|
|
<view class="goods-sum-bt-pay" @click="onGoodsPayment(item.batchcode)"> |
|
|
|
支付 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -69,17 +97,19 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import * as OrderApi from '@/api/order' |
|
|
|
import * as Comment from '@/api/order/comment' |
|
|
|
import { checkLogin } from '@/core/app' |
|
|
|
import { getEmptyPaginateObj, getMoreListData } from '@/core/app' |
|
|
|
import MescrollBody from '@/components/mescroll-uni/mescroll-body.vue' |
|
|
|
import MescrollMixin from '@/components/mescroll-uni/mescroll-mixins' |
|
|
|
import {getSourceNewList} from "../../../api/order"; |
|
|
|
|
|
|
|
// 每页记录数量 |
|
|
|
const pageSize = 10 |
|
|
|
|
|
|
|
// tab栏数据 |
|
|
|
const tabs = [ |
|
|
|
{name: `全部`,value: 'all',key: ''}, |
|
|
|
{name: `全部订单`,value: 'all',key: ''}, |
|
|
|
{name: `待付款`,value: 'payment',key: 1}, |
|
|
|
{name: `待交付`,value: 'delivery',key: 2}, |
|
|
|
{name: `已终止`,value: 'hasabort',key: '3,4'}, |
|
|
|
@ -116,6 +146,7 @@ |
|
|
|
}, |
|
|
|
// 控制onShow事件是否刷新订单列表 |
|
|
|
canReset: false, |
|
|
|
downList: [],// 下载列表数据收集 |
|
|
|
} |
|
|
|
}, |
|
|
|
/** |
|
|
|
@ -206,7 +237,10 @@ |
|
|
|
initList(newList) { |
|
|
|
newList.data.forEach(item => { |
|
|
|
item.total_num = item.order_detail.length |
|
|
|
item.state_text = this.showStateText(item.staus) |
|
|
|
item.state_text = this.showStateText(item.status) |
|
|
|
item.createDateTime = Comment.getDateTime(item.createtime,item.status) |
|
|
|
item.total_money_str = Comment.formatAmount(item.total_money) |
|
|
|
item.paymenttimeStr = Comment.getDateTerm(item.paymenttime,item.status) |
|
|
|
}) |
|
|
|
return newList |
|
|
|
}, |
|
|
|
@ -226,7 +260,123 @@ |
|
|
|
} |
|
|
|
return state_txt; |
|
|
|
}, |
|
|
|
// 跳转支付页面 |
|
|
|
onGoodsPayment(batchcode) { |
|
|
|
this.list.data.forEach(item => { |
|
|
|
if (batchcode == item.batchcode) { |
|
|
|
let newdaimg = Comment.getDefaultImage() |
|
|
|
this.$navTo('pages/goods/payment/orderPayment', { batchcode: batchcode, img: newdaimg }) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 下载 |
|
|
|
handelDownload (index,batchcode,goods) { |
|
|
|
let app = this |
|
|
|
let source_download = goods.source_download |
|
|
|
let isliCode = uni.getStorageSync("isliCode") |
|
|
|
OrderApi.getSourceNewList(batchcode,isliCode,goods.goods_islicode).then(res => { |
|
|
|
if (res.resultCode === "00000000") { |
|
|
|
let sourceData = [],targetData = [],targetData2 = [] |
|
|
|
if (res.data.length > 0) { |
|
|
|
|
|
|
|
res.data[0].singleResource.myForEach(function (item, index, arr) { |
|
|
|
sourceData.push(JSON.parse(item.source_data)) |
|
|
|
}); |
|
|
|
res.data[0].moreResources.myForEach(function (item, index, arr) { |
|
|
|
if (targetData2.indexOf(JSON.parse(item.source_data).isliCode) == -1) { |
|
|
|
targetData2.push(JSON.parse(item.source_data).isliCode); |
|
|
|
targetData.push([]); |
|
|
|
} |
|
|
|
targetData[targetData2.indexOf(JSON.parse(item.source_data).isliCode)].push(item); |
|
|
|
}); |
|
|
|
|
|
|
|
app.query_type(source_download,targetData,sourceData); |
|
|
|
|
|
|
|
} else { |
|
|
|
app.$error('无资源下载') |
|
|
|
} |
|
|
|
} else { |
|
|
|
app.$error(res.resultMsg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
query_type(source_download,targetData,sourceData) { |
|
|
|
const app = this |
|
|
|
let sumSourceData = []; //合并后的数组 |
|
|
|
let unitSource = []; //处理后的单资源数组 |
|
|
|
let bothSource = []; //处理后的资源集 |
|
|
|
if (targetData.length > 0) { |
|
|
|
targetData.myForEach(function (v, index, arr) { |
|
|
|
v.myForEach(function (item, index) { |
|
|
|
item.copyTarget_data = JSON.parse(item.target_data); |
|
|
|
bothSource.push(item); |
|
|
|
}) |
|
|
|
}); |
|
|
|
} |
|
|
|
sourceData.myForEach(function (item, index, arr) { |
|
|
|
item.copyTarget_data = item; |
|
|
|
unitSource.push(item); |
|
|
|
}); |
|
|
|
sumSourceData = unitSource.concat(bothSource); |
|
|
|
let new_sumDate = JSON.parse(source_download); |
|
|
|
let obj = []; |
|
|
|
sumSourceData.myForEach(function (item, index, arr) { |
|
|
|
let new_obj = {}; |
|
|
|
for (let attr in item) { |
|
|
|
new_obj[attr] = item[attr]; |
|
|
|
} |
|
|
|
for (let attr in new_sumDate[index]) { |
|
|
|
new_obj[attr] = new_sumDate[index][attr]; |
|
|
|
} |
|
|
|
return obj.push(new_obj); |
|
|
|
}) |
|
|
|
obj.myForEach(function (v, index, arr) { |
|
|
|
let status_name = ""; |
|
|
|
if (v.status == 1) { |
|
|
|
status_name = "解密中,请稍后再试" |
|
|
|
} else if (v.status == 2) { |
|
|
|
status_name = "获取下载地址失败" |
|
|
|
} else if (v.status == 3) { |
|
|
|
status_name = "获取解密资源地址失败" |
|
|
|
} else if (v.status == 4) { |
|
|
|
status_name = "获取解密资源地址成功" |
|
|
|
} else if (v.status == 5) { |
|
|
|
status_name = "没有解密资源地址" |
|
|
|
} else if (v.status == 6) { |
|
|
|
status_name = "获取资源下载状态失败" |
|
|
|
} else if (v.status == 7) { |
|
|
|
status_name = "资源下载成功" |
|
|
|
} else if (v.status == 8) { |
|
|
|
status_name = "资源下载失败" |
|
|
|
} else if (v.status == 9) { |
|
|
|
status_name = "获取资源下载状态异常" |
|
|
|
} |
|
|
|
if (v.isliCode != "undefined" && v.isliCode != undefined && v.isliCode != null) { |
|
|
|
v.isliCode = v.isliCode; |
|
|
|
} else if (v.linkcode != "undefined" && v.linkcode != undefined && v.linkcode != null) { |
|
|
|
v.isliCode = v.linkcode; |
|
|
|
} else if (v.identifier != "undefined" && v.identifier != undefined && v.identifier != null) { |
|
|
|
v.isliCode = v.identifier; |
|
|
|
} |
|
|
|
if (v.target_data != "undefined" && v.target_data != undefined) { |
|
|
|
v.target_name = v.target_name |
|
|
|
} else { |
|
|
|
v.target_name = v.titleName |
|
|
|
} |
|
|
|
let tempArr = {} |
|
|
|
tempArr.target_name = v.target_name |
|
|
|
tempArr.metadataFileFormat = v.copyTarget_data.metadataFileFormat |
|
|
|
tempArr.status_name = status_name |
|
|
|
tempArr.metadataFileSize = FileSize(v.copyTarget_data.metadataFileSize) |
|
|
|
if (v.status == 4 || v.status == 7) { |
|
|
|
tempArr.isliCode = v.isliCode |
|
|
|
tempArr.show_down = 1 |
|
|
|
} else { |
|
|
|
tempArr.show_down = 0 |
|
|
|
} |
|
|
|
app.downList.push(tempArr) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取当前标签项的值 |
|
|
|
getTabValue() { |
|
|
|
return this.tabs[this.curTab].value |
|
|
|
@ -253,6 +403,9 @@ |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
.u-tabs { |
|
|
|
font-weight: bold; |
|
|
|
} |
|
|
|
// 项目内容 |
|
|
|
.order-item { |
|
|
|
margin: 20rpx auto 20rpx auto; |
|
|
|
@ -267,17 +420,18 @@ |
|
|
|
.item-top { |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
font-size: 26rpx; |
|
|
|
font-size: 28rpx; |
|
|
|
margin-bottom: 20rpx; |
|
|
|
padding-bottom: 20rpx; |
|
|
|
border-bottom: 1rpx #9F9F9F solid; |
|
|
|
|
|
|
|
.order-time { |
|
|
|
color: #777; |
|
|
|
font-weight: 600; |
|
|
|
} |
|
|
|
|
|
|
|
.state-text { |
|
|
|
color: $uni-text-color-active; |
|
|
|
color: #26587b; |
|
|
|
font-weight: 600; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -288,7 +442,9 @@ |
|
|
|
.goods-item { |
|
|
|
display: flex; |
|
|
|
flex-wrap: wrap; |
|
|
|
margin-bottom: 40rpx; |
|
|
|
margin-bottom: 20rpx; |
|
|
|
margin-top: -20rpx; |
|
|
|
border-top: 1rpx #e8e8e8 solid; |
|
|
|
|
|
|
|
// 商品图片 |
|
|
|
.goods-image { |
|
|
|
@ -308,7 +464,7 @@ |
|
|
|
// 商品内容 |
|
|
|
.goods-content { |
|
|
|
padding-left: 16rpx; |
|
|
|
padding-top: 16rpx; |
|
|
|
padding-top: 10rpx; |
|
|
|
flex-basis: calc(66.66% - 10rpx); |
|
|
|
margin-right: 10rpx; |
|
|
|
|
|
|
|
@ -317,18 +473,41 @@ |
|
|
|
max-height: 76rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.twoline-hide-price{ |
|
|
|
font-size: 20rpx; |
|
|
|
color: #979082; |
|
|
|
.twoline-hide { |
|
|
|
height: 70rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.twoline-hide-icon{ |
|
|
|
color: #0b0b0b; |
|
|
|
font-weight: bold; |
|
|
|
} |
|
|
|
.twoline-hide-sum{ |
|
|
|
color: red; |
|
|
|
float: right; |
|
|
|
margin-top: 5rpx; |
|
|
|
.twoline-hide-name { |
|
|
|
font-size: 28rpx; |
|
|
|
font-weight: bold; |
|
|
|
display: -webkit-box; |
|
|
|
-webkit-line-clamp: 2; /* 控制显示的行数 */ |
|
|
|
-webkit-box-orient: vertical; |
|
|
|
overflow: hidden; |
|
|
|
text-overflow: ellipsis; |
|
|
|
} |
|
|
|
|
|
|
|
.twoline-hide-info { |
|
|
|
margin-top: 10rpx; |
|
|
|
position: absolute; |
|
|
|
|
|
|
|
.twoline-hide-price{ |
|
|
|
display: block; |
|
|
|
font-size: 24rpx; |
|
|
|
color: #767285; |
|
|
|
|
|
|
|
.twoline-hide-icon{ |
|
|
|
display: inline-block; |
|
|
|
color: #0b0b0b; |
|
|
|
font-weight: bold; |
|
|
|
} |
|
|
|
.twoline-hide-sum{ |
|
|
|
width: 250rpx; |
|
|
|
color: #c1382d; |
|
|
|
text-align: right; |
|
|
|
font-weight: bold; |
|
|
|
display: inline-block; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -337,15 +516,64 @@ |
|
|
|
// 委托方等信息 |
|
|
|
.goods-props { |
|
|
|
float: left; |
|
|
|
height: 30rpx; |
|
|
|
font-size: 20rpx; |
|
|
|
margin-top: 10rpx; |
|
|
|
flex-basis: 100%; |
|
|
|
color: $uni-text-color-grey; |
|
|
|
color: #767285; |
|
|
|
|
|
|
|
.goods-props-item { |
|
|
|
margin-top: 10rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.goods-props-bt { |
|
|
|
float: right; |
|
|
|
width: 120rpx; |
|
|
|
height: 50rpx; |
|
|
|
margin-top: -50rpx; |
|
|
|
background-color: #26587b; |
|
|
|
color: white; |
|
|
|
border-radius: 50rpx; |
|
|
|
|
|
|
|
.goods-props-bt-down { |
|
|
|
text-align: center; |
|
|
|
margin-top: 14rpx; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.goods-sum { |
|
|
|
border-top: 1rpx #e8e8e8 solid; |
|
|
|
font-size: 20rpx; |
|
|
|
color: #767285; |
|
|
|
font-weight: 600; |
|
|
|
|
|
|
|
.goods-sum-date { |
|
|
|
margin-top: 20rpx; |
|
|
|
} |
|
|
|
.goods-sum-time { |
|
|
|
margin-top: 5rpx; |
|
|
|
} |
|
|
|
.goods-sum-amount { |
|
|
|
color: #c1382d; |
|
|
|
font-size: 28rpx; |
|
|
|
margin-top: 40rpx; |
|
|
|
} |
|
|
|
.goods-sum-bt { |
|
|
|
float: right; |
|
|
|
width: 120rpx; |
|
|
|
height: 50rpx; |
|
|
|
margin-top: -50rpx; |
|
|
|
background-color: #26587b; |
|
|
|
color: white; |
|
|
|
border-radius: 50rpx; |
|
|
|
|
|
|
|
.goods-sum-bt-pay { |
|
|
|
text-align: center; |
|
|
|
margin-top: 14rpx; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|