|
|
@ -41,11 +41,11 @@ |
|
|
|
<uni-data-picker v-else class="picker-input" placeholder="请选择订单类型" popup-title="请选择订单类型" preload :clear-icon="false" :localdata="orderTypes" v-model="form.orderType" @change="calcTotal(1)"></uni-data-picker> |
|
|
|
<uni-data-picker v-else class="picker-input" placeholder="请选择订单类型" popup-title="请选择订单类型" preload :clear-icon="false" :localdata="orderTypes" v-model="form.orderType" @change="calcTotal(1)"></uni-data-picker> |
|
|
|
</view> --> |
|
|
|
</view> --> |
|
|
|
<template v-if="edited"> |
|
|
|
<template v-if="edited"> |
|
|
|
<view class="line"> |
|
|
|
<view v-if="form.orderNumber" class="line"> |
|
|
|
<view class="name">订单编号</view> |
|
|
|
<view class="name">订单编号</view> |
|
|
|
<view class="val">{{ form.orderNumber }}</view> |
|
|
|
<view class="val">{{ form.orderNumber }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="line"> |
|
|
|
<view v-if="form.createTime" class="line"> |
|
|
|
<view class="name">订单时间</view> |
|
|
|
<view class="name">订单时间</view> |
|
|
|
<view class="val">{{ form.createTime }}</view> |
|
|
|
<view class="val">{{ form.createTime }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -57,82 +57,84 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<template v-for="c in courseList"> |
|
|
|
<view id="products"> |
|
|
|
<view v-if="c.list.length" class="block pro-wrap" id="products"> |
|
|
|
<template v-for="c in courseList"> |
|
|
|
<view class="l-title">{{ c.name }}</view> |
|
|
|
<view v-if="c.list.length" class="block pro-wrap"> |
|
|
|
<uni-icons class="arrow" type="top" size="20" color="#007EFF" @click="toggle(c)"></uni-icons> |
|
|
|
<view class="l-title">{{ c.name }}</view> |
|
|
|
<ul class="pro-list" v-show="!c.shrink"> |
|
|
|
<uni-icons class="arrow" type="top" size="20" color="#007EFF" @click="toggle(c)"></uni-icons> |
|
|
|
<li v-for="(item, i) in c.list"> |
|
|
|
<ul class="pro-list" v-show="!c.shrink"> |
|
|
|
<view class="name"> |
|
|
|
<li v-for="(item, i) in c.list"> |
|
|
|
<view class="left"> |
|
|
|
<view class="name"> |
|
|
|
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image> |
|
|
|
<view class="left"> |
|
|
|
{{ item.productName }} |
|
|
|
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image> |
|
|
|
</view> |
|
|
|
{{ item.productName }} |
|
|
|
<view class="course-action"> |
|
|
|
</view> |
|
|
|
<image v-if="!isDetail" class="del" src="@/static/image/trash.png" mode="widthFix" @click.stop="delCourse(c, i)"></image> |
|
|
|
<view class="course-action"> |
|
|
|
|
|
|
|
<image v-if="!isDetail" class="del" src="@/static/image/trash.png" mode="widthFix" @click.stop="delCourse(c, i)"></image> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="info"> |
|
|
|
<view class="info"> |
|
|
|
<view class="line"> |
|
|
|
<view class="line"> |
|
|
|
<view class="label">起始日期</view> |
|
|
|
<view class="label">起始日期</view> |
|
|
|
<view v-if="isDetail || isEdit" class="ph">{{ item.endTime ? item.startTime + ' - ' + item.endTime : item.startTime}}</view> |
|
|
|
<view v-if="isDetail || isEdit" class="ph">{{ item.endTime ? item.startTime + ' - ' + item.endTime : item.startTime}}</view> |
|
|
|
<uni-datetime-picker v-else type="date" v-model="item.startTime" :border="false" @change="calcDate(item)"> |
|
|
|
<uni-datetime-picker v-else type="date" v-model="item.startTime" :border="false" @change="calcDate(item)"> |
|
|
|
<view :class="['ph', {val: item.startTime}]"> |
|
|
|
<view :class="['ph', {val: item.startTime}]"> |
|
|
|
{{ item.endTime ? item.startTime + ' - ' + item.endTime : item.startTime}} |
|
|
|
{{ item.endTime ? item.startTime + ' - ' + item.endTime : item.startTime}} |
|
|
|
</view> |
|
|
|
|
|
|
|
</uni-datetime-picker> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="line" :class="[ {err: err === 'periodOfUse' + item.dataOrCourseId + item.authority}]"> |
|
|
|
|
|
|
|
<view class="label">使用期限</view> |
|
|
|
|
|
|
|
<view v-if="isDetail" class="ph">{{item.periodOfUse}}{{ units.find(e => e.id === item.options).text }}</view> |
|
|
|
|
|
|
|
<template v-else> |
|
|
|
|
|
|
|
<input class="period" type="number" v-model="item.periodOfUse" placeholder="请输入" @input="calcDate(item, !item.authority)" @change="handleErr(item, 'periodOfUse')"> |
|
|
|
|
|
|
|
<view class="val unit" @click="selectUnit(item)"> |
|
|
|
|
|
|
|
<text>{{ units.find(e => e.id === item.options).text }}</text> |
|
|
|
|
|
|
|
<image class="icon" src="@/static/image/arrow-down.png" mode="widthFix"></image> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view :class="['line req', {err: err === 'accountNum' + item.dataOrCourseId + item.authority}]"> |
|
|
|
|
|
|
|
<view class="label">数量</view> |
|
|
|
|
|
|
|
<view v-if="item.authority || (!item.authority && isDetail)" class="ph">1</view> |
|
|
|
|
|
|
|
<view v-else class="inline"> |
|
|
|
|
|
|
|
<input type="number" v-model="item.accountNum" placeholder="请输入账号数量" @input="calcFinalPrice(item)" @change="handleErr(item, 'accountNum')"> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</uni-datetime-picker> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="line"> |
|
|
|
<view class="line" :class="[ {err: err === 'periodOfUse' + item.dataOrCourseId + item.authority}]"> |
|
|
|
<view class="label">{{ item.authority ? '市场价' : '市场单价' }}</view> |
|
|
|
<view class="label">使用期限</view> |
|
|
|
<view class="ph">{{ item.marketValue && item.marketValue + '元' }}</view> |
|
|
|
<view v-if="isDetail" class="ph">{{item.periodOfUse}}{{ units.find(e => e.id === item.options).text }}</view> |
|
|
|
</view> |
|
|
|
<template v-else> |
|
|
|
<view class="line"> |
|
|
|
<input class="period" type="number" v-model="item.periodOfUse" placeholder="请输入" @input="calcDate(item, !item.authority)" @change="handleErr(item, 'periodOfUse')"> |
|
|
|
<view class="label">结算价</view> |
|
|
|
<view class="val unit" @click="selectUnit(item)"> |
|
|
|
<view class="ph">{{ item.settlementPrice && item.settlementPrice + '元' }}</view> |
|
|
|
<text>{{ units.find(e => e.id === item.options).text }}</text> |
|
|
|
</view> |
|
|
|
<image class="icon" src="@/static/image/arrow-down.png" mode="widthFix"></image> |
|
|
|
<view class="line"> |
|
|
|
|
|
|
|
<view class="label">折扣率</view> |
|
|
|
|
|
|
|
<view class="ph">{{ item.discountRate }}</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="line"> |
|
|
|
|
|
|
|
<view class="label">市场服务费</view> |
|
|
|
|
|
|
|
<view class="ph">{{ item.serviceFee }}元</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view :class="['line req', {err: err === 'finalPrice' + item.dataOrCourseId + item.authority}]"> |
|
|
|
|
|
|
|
<view class="label">成交价</view> |
|
|
|
|
|
|
|
<view v-if="isDetail" class="ph">{{ item.finalPrice }}</view> |
|
|
|
|
|
|
|
<view class="inline" v-else> |
|
|
|
|
|
|
|
<input type="number" v-model="item.finalPrice" placeholder="请输入" @input="calcFinalValue(item)" @change="handleErr(item, 'finalPrice')"> |
|
|
|
|
|
|
|
元 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view :class="['line req', {err: err === 'accountNum' + item.dataOrCourseId + item.authority}]"> |
|
|
|
|
|
|
|
<view class="label">数量</view> |
|
|
|
|
|
|
|
<view v-if="item.authority || (!item.authority && isDetail)" class="ph">1</view> |
|
|
|
|
|
|
|
<view v-else class="inline"> |
|
|
|
|
|
|
|
<input type="number" v-model="item.accountNum" placeholder="请输入账号数量" @input="calcFinalPrice(item)" @change="handleErr(item, 'accountNum')"> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-if="(item.authority == 0 || item.authority == 3 || item.authority == 4) && item.shipInfo" class="line"> |
|
|
|
<view class="line"> |
|
|
|
<view class="label">发货信息</view> |
|
|
|
<view class="label">{{ item.authority ? '市场价' : '市场单价' }}</view> |
|
|
|
<view class="ph ship-info" v-html="item.shipInfo" @click="copy(item)"></view> |
|
|
|
<view class="ph">{{ item.marketValue && item.marketValue + '元' }}</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="line"> |
|
|
|
|
|
|
|
<view class="label">结算价</view> |
|
|
|
|
|
|
|
<view class="ph">{{ item.settlementPrice && item.settlementPrice + '元' }}</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="line"> |
|
|
|
|
|
|
|
<view class="label">折扣率</view> |
|
|
|
|
|
|
|
<view class="ph">{{ item.discountRate }}</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="line"> |
|
|
|
|
|
|
|
<view class="label">市场服务费</view> |
|
|
|
|
|
|
|
<view class="ph">{{ item.serviceFee }}元</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view :class="['line req', {err: err === 'finalPrice' + item.dataOrCourseId + item.authority}]"> |
|
|
|
|
|
|
|
<view class="label">成交价</view> |
|
|
|
|
|
|
|
<view v-if="isDetail" class="ph">{{ item.finalPrice }}</view> |
|
|
|
|
|
|
|
<view class="inline" v-else> |
|
|
|
|
|
|
|
<input type="number" v-model="item.finalPrice" placeholder="请输入" @input="calcFinalValue(item)" @change="handleErr(item, 'finalPrice')"> |
|
|
|
|
|
|
|
元 |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-if="(item.authority == 0 || item.authority == 3 || item.authority == 4) && item.shipInfo" class="line"> |
|
|
|
</li> |
|
|
|
<view class="label">发货信息</view> |
|
|
|
</ul> |
|
|
|
<view class="ph ship-info" v-html="item.shipInfo" @click="copy(item)"></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</li> |
|
|
|
|
|
|
|
</ul> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="bottom"> |
|
|
|
<view class="bottom"> |
|
|
|
<template v-if="!edited && !orderId"> |
|
|
|
<template v-if="!edited && !orderId"> |
|
|
@ -293,6 +295,9 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
this.courseList = store |
|
|
|
this.courseList = store |
|
|
|
this.courses = list |
|
|
|
this.courses = list |
|
|
|
|
|
|
|
uni.pageScrollTo({ |
|
|
|
|
|
|
|
selector: '#products' |
|
|
|
|
|
|
|
}) |
|
|
|
try { |
|
|
|
try { |
|
|
|
uni.removeStorageSync('courses') |
|
|
|
uni.removeStorageSync('courses') |
|
|
|
} catch (e) {} |
|
|
|
} catch (e) {} |
|
|
@ -759,7 +764,18 @@ |
|
|
|
this.delShopCart(courses) |
|
|
|
this.delShopCart(courses) |
|
|
|
uni.hideLoading() |
|
|
|
uni.hideLoading() |
|
|
|
this.$util.sucMsg('添加成功') |
|
|
|
this.$util.sucMsg('添加成功') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// #ifdef MP-WEIXIN |
|
|
|
this.publicNotice() |
|
|
|
this.publicNotice() |
|
|
|
|
|
|
|
// #endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// #ifdef MP-TOUTIAO |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
|
|
uni.switchTab({ |
|
|
|
|
|
|
|
url: '/pages/orders/orders' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, 1500) |
|
|
|
|
|
|
|
// #endif |
|
|
|
}).catch(res => { |
|
|
|
}).catch(res => { |
|
|
|
uni.hideLoading() |
|
|
|
uni.hideLoading() |
|
|
|
}) |
|
|
|
}) |
|
|
|