|
|
|
@ -16,7 +16,7 @@ |
|
|
|
|
<view class="form-list"> |
|
|
|
|
<view class="line"> |
|
|
|
|
<view class="name">产品类型</view> |
|
|
|
|
<view class="val">{{ productTypes.find(e => e.id === item.productType).name }}</view> |
|
|
|
|
<view class="val">{{ item.typeName }}</view> |
|
|
|
|
</view> |
|
|
|
|
<view :class="['line', {err: err === 'periodOfUse' + item.dataOrCourseId + item.authority}]"> |
|
|
|
|
<view class="name">使用期限</view> |
|
|
|
@ -86,7 +86,7 @@ |
|
|
|
|
<script> |
|
|
|
|
import { getOrderOtherTime } from '@/apis/modules/order.js' |
|
|
|
|
import { getPartnerTeamRates } from '@/apis/modules/parner.js' |
|
|
|
|
import { productCategoryList } from '@/apis/modules/product.js' |
|
|
|
|
import { productCategoryList, productTypeList } from '@/apis/modules/product.js' |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
@ -133,23 +133,22 @@ |
|
|
|
|
methods: { |
|
|
|
|
// 转换产品列表 |
|
|
|
|
handleProduct() { |
|
|
|
|
// 产品类型 |
|
|
|
|
productTypeList().then(res => { |
|
|
|
|
this.productTypes = res.typeList |
|
|
|
|
}).catch(e => {}) |
|
|
|
|
|
|
|
|
|
const list = uni.getStorageSync('courses') |
|
|
|
|
let courses = {} |
|
|
|
|
// 产品分类 |
|
|
|
|
productCategoryList().then(res => { |
|
|
|
|
const typeList = [] |
|
|
|
|
res.classificationList.forEach(e => { |
|
|
|
|
typeList.push({ |
|
|
|
|
id: e.classificationId, |
|
|
|
|
name: e.classificationName |
|
|
|
|
}) |
|
|
|
|
courses['list' + this.$util.getOrderType(e.classificationId)] = { |
|
|
|
|
shrink: false, |
|
|
|
|
name: e.classificationName, |
|
|
|
|
list: [] |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.productTypes = typeList |
|
|
|
|
list.map(e => { |
|
|
|
|
courses['list' + e.authority].list.push(e) |
|
|
|
|
}) |
|
|
|
@ -249,9 +248,9 @@ |
|
|
|
|
}, |
|
|
|
|
// 计算结算价及平台服务费 |
|
|
|
|
dealSettlePrice(row) { |
|
|
|
|
// 如果是试用,结算价和平台服务费都是0 |
|
|
|
|
// 如果是试用或者没选择,结算价和平台服务费都是0 |
|
|
|
|
console.log('dealSettlePrice=>', row, this.orderType) |
|
|
|
|
if (this.orderType == 2) { |
|
|
|
|
if (this.orderType != 1) { |
|
|
|
|
row.settlementPrice = 0 |
|
|
|
|
row.serviceFee = 0 |
|
|
|
|
} else { |
|
|
|
|