|
|
@ -70,7 +70,6 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="course-action"> |
|
|
|
<view class="course-action"> |
|
|
|
<image v-if="!isDetail" class="del" src="@/static/image/trash.png" mode="widthFix" @click.stop="delCourse(c, i)"></image> |
|
|
|
<image v-if="!isDetail" class="del" src="@/static/image/trash.png" mode="widthFix" @click.stop="delCourse(c, i)"></image> |
|
|
|
<button v-if="(item.authority == 0 || item.authority == 3 || item.authority == 4) && ((!isDetail && item.mallNonAssociatedLinks && item.mallNonAssociatedLinks.length) || (isDetail && item.shipContent))" class="course-btn" type="primary" @click.stop="showShip(item)">发货信息</button> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="info"> |
|
|
|
<view class="info"> |
|
|
@ -107,11 +106,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="line"> |
|
|
|
<view class="line"> |
|
|
|
<view class="label">结算价</view> |
|
|
|
<view class="label">结算价</view> |
|
|
|
<view v-if="isDetail" class="ph">{{ item.settlementPrice }}</view> |
|
|
|
<view class="ph">{{ item.settlementPrice && item.settlementPrice + '元' }}</view> |
|
|
|
<view class="inline" v-else> |
|
|
|
|
|
|
|
<input type="number" v-model="item.settlementPrice" placeholder="请输入" @change="handleErr(item, 'settlementPrice')" @input="updateServiceFee(item)"> |
|
|
|
|
|
|
|
元 |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="line"> |
|
|
|
<view class="line"> |
|
|
|
<view class="label">折扣率</view> |
|
|
|
<view class="label">折扣率</view> |
|
|
@ -129,6 +124,10 @@ |
|
|
|
元 |
|
|
|
元 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view v-if="(item.authority == 0 || item.authority == 3 || item.authority == 4) && item.shipInfo" class="line"> |
|
|
|
|
|
|
|
<view class="label">发货信息</view> |
|
|
|
|
|
|
|
<view class="ph ship-info" v-html="item.shipInfo" @click="copy(item)"></view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
@ -179,16 +178,13 @@ |
|
|
|
<view class="item" v-for="item in customerList" @click="customerChange(item)">{{ item.customerName }}</view> |
|
|
|
<view class="item" v-for="item in customerList" @click="customerChange(item)">{{ item.customerName }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<uni-popup ref="info" type="bottom" background-color="#fff"> |
|
|
|
|
|
|
|
<view class="ship-info" v-html="shipInfo" @click="copy"></view> |
|
|
|
|
|
|
|
</uni-popup> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { productCategoryList, delCart } from '@/apis/modules/product.js' |
|
|
|
import { productCategoryList, delCart } from '@/apis/modules/product.js' |
|
|
|
import { queryCustomer, queryCustomerDetails } from '@/apis/modules/client.js' |
|
|
|
import { queryCustomer, queryCustomerDetails } from '@/apis/modules/client.js' |
|
|
|
import { add, update, getDetail, queryCitySettlementPrice } from '@/apis/modules/order.js' |
|
|
|
import { add, update, getDetail, queryCitySettlementPrice, getOrderOtherTime } from '@/apis/modules/order.js' |
|
|
|
import { getPartnerTeamRates } from '@/apis/modules/parner.js' |
|
|
|
import { getPartnerTeamRates } from '@/apis/modules/parner.js' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
@ -242,7 +238,6 @@ |
|
|
|
customerListAll: [], |
|
|
|
customerListAll: [], |
|
|
|
err: '', |
|
|
|
err: '', |
|
|
|
rate: '', |
|
|
|
rate: '', |
|
|
|
shipInfo: '', |
|
|
|
|
|
|
|
orderRepeat:[], |
|
|
|
orderRepeat:[], |
|
|
|
units: [{ |
|
|
|
units: [{ |
|
|
|
text: '日', |
|
|
|
text: '日', |
|
|
@ -282,10 +277,18 @@ |
|
|
|
if (this.orderId) { |
|
|
|
if (this.orderId) { |
|
|
|
this.getInfo() |
|
|
|
this.getInfo() |
|
|
|
} else if (options.edited && store) { // 不是从购物车进来,并且有产品缓存(即是从当前页面点下一步编辑完产品回来的情况),则处理缓存里的产品 |
|
|
|
} else if (options.edited && store) { // 不是从购物车进来,并且有产品缓存(即是从当前页面点下一步编辑完产品回来的情况),则处理缓存里的产品 |
|
|
|
console.log(11, store) |
|
|
|
|
|
|
|
// 新增取缓存,取了删除 |
|
|
|
// 新增取缓存,取了删除 |
|
|
|
const list = [] |
|
|
|
const list = [] |
|
|
|
for (const i in store) { |
|
|
|
for (const i in store) { |
|
|
|
|
|
|
|
// 发货信息处理 |
|
|
|
|
|
|
|
store[i].list.map(e => { |
|
|
|
|
|
|
|
let val = [] |
|
|
|
|
|
|
|
e.mallNonAssociatedLinks && e.mallNonAssociatedLinks.forEach(e => { |
|
|
|
|
|
|
|
val.push(e.urlName + ':' + e.url) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
e.shipInfo = e.shipContent || val.join('<br>') |
|
|
|
|
|
|
|
e.copyInfo = e.shipContent || val.join(';') |
|
|
|
|
|
|
|
}) |
|
|
|
list.push(...store[i].list) |
|
|
|
list.push(...store[i].list) |
|
|
|
} |
|
|
|
} |
|
|
|
this.courseList = store |
|
|
|
this.courseList = store |
|
|
@ -328,9 +331,6 @@ |
|
|
|
this.form = order.order |
|
|
|
this.form = order.order |
|
|
|
this.courses = order.orderOther |
|
|
|
this.courses = order.orderOther |
|
|
|
this.handleProduct(order.orderOther) |
|
|
|
this.handleProduct(order.orderOther) |
|
|
|
if(!this.orderId) { |
|
|
|
|
|
|
|
this.calcTotal() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
uni.hideLoading() |
|
|
|
uni.hideLoading() |
|
|
|
}).catch(e => { |
|
|
|
}).catch(e => { |
|
|
|
uni.hideLoading() |
|
|
|
uni.hideLoading() |
|
|
@ -350,6 +350,14 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
// 3个分类的课程分别push到不同数组(0->理论 1-实训 2 数据产品) |
|
|
|
// 3个分类的课程分别push到不同数组(0->理论 1-实训 2 数据产品) |
|
|
|
list.map(e => { |
|
|
|
list.map(e => { |
|
|
|
|
|
|
|
// 发货信息处理 |
|
|
|
|
|
|
|
let val = [] |
|
|
|
|
|
|
|
e.mallNonAssociatedLinks && e.mallNonAssociatedLinks.forEach(e => { |
|
|
|
|
|
|
|
val.push(e.urlName + ':' + e.url) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
e.shipInfo = e.shipContent || val.join('<br>') |
|
|
|
|
|
|
|
e.copyInfo = e.shipContent || val.join(';') |
|
|
|
|
|
|
|
|
|
|
|
e.serviceFee = (e.finalPrice * (this.rate / 100)).toFixed(2) // 服务费 != 0 && 才需要算 |
|
|
|
e.serviceFee = (e.finalPrice * (this.rate / 100)).toFixed(2) // 服务费 != 0 && 才需要算 |
|
|
|
courses['list' + e.authority].list.push(e) |
|
|
|
courses['list' + e.authority].list.push(e) |
|
|
|
}) |
|
|
|
}) |
|
|
@ -446,7 +454,7 @@ |
|
|
|
// 前往创建客户 |
|
|
|
// 前往创建客户 |
|
|
|
toClient() { |
|
|
|
toClient() { |
|
|
|
this.shopCart || uni.setStorageSync('courses', this.courses) |
|
|
|
this.shopCart || uni.setStorageSync('courses', this.courses) |
|
|
|
this.$util.to(`/order/clientDetail/clientDetail${this.shopCart ? '?shopCart=1' : ''}`) |
|
|
|
this.$util.to(`/order/clientDetail/clientDetail?order=1${this.shopCart ? '&shopCart=1' : ''}`) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 删除课程 |
|
|
|
// 删除课程 |
|
|
|
delCourse(c, i) { |
|
|
|
delCourse(c, i) { |
|
|
@ -570,12 +578,13 @@ |
|
|
|
const date = new Date(row.startTime) |
|
|
|
const date = new Date(row.startTime) |
|
|
|
const orderRepeat = this.orderRepeat |
|
|
|
const orderRepeat = this.orderRepeat |
|
|
|
getOrderOtherTime({ |
|
|
|
getOrderOtherTime({ |
|
|
|
customerId: this.customerId, |
|
|
|
authority: row.authority, |
|
|
|
|
|
|
|
customerId: this.form.customerId, |
|
|
|
id: cId, |
|
|
|
id: cId, |
|
|
|
startTime: this.$util.formatDate(date, 'yyyy-MM-dd'), |
|
|
|
startTime: this.$util.formatDate(date, 'yyyy-MM-dd'), |
|
|
|
endTime: row.endTime |
|
|
|
endTime: row.endTime |
|
|
|
}).then(res => { |
|
|
|
}).then(res => { |
|
|
|
orderRepeat.includes(cId) && orderRepeat.splice(orderRepeat.findIndex(e => e === cId), 1) |
|
|
|
orderRepeat.includes(cId) && orderRepeat.splice(orderRepeat.findIndex(e => e == cId), 1) |
|
|
|
if (res.endTime) { |
|
|
|
if (res.endTime) { |
|
|
|
let time = new Date(res.endTime) |
|
|
|
let time = new Date(res.endTime) |
|
|
|
time = new Date(time.setDate(time.getDate() + 1)) |
|
|
|
time = new Date(time.setDate(time.getDate() + 1)) |
|
|
@ -672,20 +681,11 @@ |
|
|
|
updateServiceFee(row) { |
|
|
|
updateServiceFee(row) { |
|
|
|
options.serviceFee = (row.finalPrice * (this.rate / 100)).toFixed(2) |
|
|
|
options.serviceFee = (row.finalPrice * (this.rate / 100)).toFixed(2) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 显示发货信息 |
|
|
|
|
|
|
|
showShip(row) { |
|
|
|
|
|
|
|
let val = '' |
|
|
|
|
|
|
|
row.mallNonAssociatedLinks && row.mallNonAssociatedLinks.forEach(e => { |
|
|
|
|
|
|
|
val += e.urlName + ':' + e.url + '\n' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.shipInfo = row.shipContent || val |
|
|
|
|
|
|
|
this.$refs.info.open() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 复制发货信息 |
|
|
|
// 复制发货信息 |
|
|
|
copy() { |
|
|
|
copy(row) { |
|
|
|
const that = this |
|
|
|
const that = this |
|
|
|
uni.setClipboardData({ |
|
|
|
uni.setClipboardData({ |
|
|
|
data: this.shipInfo, |
|
|
|
data: row.copyInfo, |
|
|
|
success() { |
|
|
|
success() { |
|
|
|
that.$util.sucMsg('复制成功') |
|
|
|
that.$util.sucMsg('复制成功') |
|
|
|
} |
|
|
|
} |
|
|
@ -731,6 +731,7 @@ |
|
|
|
return this.$util.errMsg('请选择订单类型!') |
|
|
|
return this.$util.errMsg('请选择订单类型!') |
|
|
|
} |
|
|
|
} |
|
|
|
if (!courses.length) return this.$util.errMsg('请选择课程后再确认订单!') |
|
|
|
if (!courses.length) return this.$util.errMsg('请选择课程后再确认订单!') |
|
|
|
|
|
|
|
if (this.orderRepeat.length) return this.$util.errMsg(this.repeatMsg) // 有重复订单不能提交 |
|
|
|
courses.map(e => { |
|
|
|
courses.map(e => { |
|
|
|
e.startTime = this.$util.formatDate(new Date(e.startTime), 'yyyy-MM-dd') |
|
|
|
e.startTime = this.$util.formatDate(new Date(e.startTime), 'yyyy-MM-dd') |
|
|
|
}) |
|
|
|
}) |
|
|
@ -848,12 +849,17 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.label { |
|
|
|
.label { |
|
|
|
|
|
|
|
margin-right: 20rpx; |
|
|
|
font-size: 28rpx; |
|
|
|
font-size: 28rpx; |
|
|
|
|
|
|
|
white-space: nowrap; |
|
|
|
color: #333; |
|
|
|
color: #333; |
|
|
|
} |
|
|
|
} |
|
|
|
.ph { |
|
|
|
.ph { |
|
|
|
font-size: 28rpx; |
|
|
|
font-size: 28rpx; |
|
|
|
color: #999; |
|
|
|
color: #999; |
|
|
|
|
|
|
|
&.ship-info { |
|
|
|
|
|
|
|
text-align: right; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.val { |
|
|
|
.val { |
|
|
|
font-size: 28rpx; |
|
|
|
font-size: 28rpx; |
|
|
@ -1011,11 +1017,4 @@ |
|
|
|
margin-left: 10rpx; |
|
|
|
margin-left: 10rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.ship-info { |
|
|
|
|
|
|
|
height: 400rpx; |
|
|
|
|
|
|
|
padding: 20rpx; |
|
|
|
|
|
|
|
white-space: pre-wrap; |
|
|
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
|
|
overflow: auto; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|
</style> |
|
|
|