订单等修复

master
yujialong 2 years ago
parent 7bd7775908
commit 2451d46666
  1. 4
      apis/modules/parner.js
  2. 2
      config/request.js
  3. 2
      order/curClient/curClient.vue
  4. 31
      order/editCourse/editCourse.vue
  5. 54
      order/orderDetail/orderDetail.vue
  6. 2
      order/orders/orders.vue
  7. 2
      pages/clients/clients.vue
  8. 9
      pages/index/index.vue
  9. 8
      pages/plans/plans.vue
  10. 70
      pages/send/send.vue
  11. BIN
      static/image/arrow-down.png

@ -19,4 +19,8 @@ export const treeList = (data) => {
export const my = (data) => { export const my = (data) => {
return get('nakadai/partner-team/my', data) return get('nakadai/partner-team/my', data)
}
export const mailFileSend = (data) => {
return post('nakadai/partnerAccount/mailFileSend', data)
} }

@ -5,7 +5,7 @@
*/ */
export default { export default {
baseURL: 'http://192.168.31.151:9000/', baseURL: 'http://192.168.31.137:9000/',
headers: { headers: {
'Content-Type': 'application/json;charset=UTF-8' 'Content-Type': 'application/json;charset=UTF-8'
}, },

@ -28,7 +28,7 @@
</view> </view>
<view class="line"> <view class="line">
<text class="name">订单金额</text> <text class="name">订单金额</text>
<text class="val">{{ item.orderAmount }}</text> <text class="val">{{ item.orderAmount }}</text>
</view> </view>
<view class="line"> <view class="line">
<text class="name">订单内容</text> <text class="name">订单内容</text>

@ -20,11 +20,14 @@
</view> </view>
<view class="line req"> <view class="line req">
<view class="name">使用期限</view> <view class="name">使用期限</view>
<input type="number" v-model="item.periodOfUse" placeholder="请输入" @change="calcDate(item, !item.authority)"> <input class="period" type="number" v-model="item.periodOfUse" placeholder="请输入" @change="calcDate(item, !item.authority)">
</view> <view class="val unit" @click="showUnit(i)">
<view class="line"> <text>{{ units.find(e => e.value === item.options).text }}</text>
<view class="name">使用期限单位</view> <image class="icon" src="@/static/image/arrow-down.png" mode="widthFix"></image>
<uni-data-picker class="picker-input" placeholder="请选择" popup-title="请选择" :clear-icon="false" :localdata="units" v-model="item.options" @change="calcDate(item)"></uni-data-picker> </view>
<uni-data-picker class="unit-picker" ref="unit" popup-title="请选择" :clear-icon="false" :localdata="units" v-model="item.options" @change="calcDate(item)">
<text></text>
</uni-data-picker>
</view> </view>
<view class="line req"> <view class="line req">
<view class="name">起止日期</view> <view class="name">起止日期</view>
@ -146,11 +149,14 @@
}) })
this.courses = courses this.courses = courses
console.log(22, this.courses, this.classes)
try { try {
uni.removeStorageSync('courses') uni.removeStorageSync('courses')
} catch (e) {} } catch (e) {}
}, },
showUnit(i) {
console.log(333, this.$refs, this.$refs.unit[i].show)
this.$refs.unit[i].show()
},
// //
toggle(c) { toggle(c) {
c.shrink = !c.shrink c.shrink = !c.shrink
@ -324,8 +330,6 @@
<style scoped lang="scss"> <style scoped lang="scss">
.page { .page {
padding-bottom: 130rpx; padding-bottom: 130rpx;
// height: calc(100vh - 140rpx - env(safe-area-inset-bottom));
// overflow: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
} }
.block { .block {
@ -362,5 +366,16 @@
.form-list { .form-list {
padding: 0 24rpx; padding: 0 24rpx;
border-top: 0; border-top: 0;
.period {
text-align: center;
}
.unit {
display: inline-flex;
align-items: center;
.icon {
width: 28rpx;
margin-left: 20rpx;
}
}
} }
</style> </style>

@ -35,7 +35,7 @@
<view class="line req"> <view class="line req">
<view class="name">订单类型</view> <view class="name">订单类型</view>
<view v-if="isDetail" class="val">{{ form.industryClassName }}</view> <view v-if="isDetail" class="val">{{ form.industryClassName }}</view>
<uni-data-picker v-else class="picker-input" placeholder="请选择订单类型" popup-title="请选择订单类型" preload :clear-icon="false" :localdata="orderTypes" v-model="form.orderType"></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"></uni-data-picker>
</view> </view>
<view class="line"> <view class="line">
<view class="name">订单编号</view> <view class="name">订单编号</view>
@ -107,12 +107,8 @@
<view :class="['product', isDetail ? 'show' : 'edit']"> <view :class="['product', isDetail ? 'show' : 'edit']">
<view class="text"> <view class="text">
<view class="total"> <view class="total">
{{ isDetail ? '共' : '已' }} <view v-if="isDetail">共选<text class="num">{{ courses.length }}</text>个产品</view>
<text class="num">{{ courses.length }}</text> <view class="column">总成交价合计<text class="num">{{ form.orderAmount }}</text></view>
个产品&emsp;
总成交价合计
<text class="num">{{ form.orderAmount }}</text>
</view> </view>
<view class="info"> <view class="info">
<view class="line"> <view class="line">
@ -123,7 +119,7 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="!isDetail" class="btn" @click="submit">提交</view> <view v-if="!isDetail" class="btn" @click="submit">提交({{ courses.length }})</view>
</view> </view>
</view> </view>
@ -211,6 +207,12 @@
uni.removeStorageSync('courses') uni.removeStorageSync('courses')
} catch (e) {} } catch (e) {}
this.calcTotal() this.calcTotal()
} else {
// id
const { customerId } = options
customerId && this.customerChange({
customerId
})
} }
// //
if (!this.isDetail) { if (!this.isDetail) {
@ -360,6 +362,7 @@
// //
calcTotal() { calcTotal() {
const { form } = this const { form } = this
const isTrial = form.orderType === 2 //
let total = 0 let total = 0
const list = this.courses const list = this.courses
let purchase = 0 // let purchase = 0 //
@ -380,9 +383,9 @@
purchase += curPurchase purchase += curPurchase
profit += +e.finalPrice - curPurchase profit += +e.finalPrice - curPurchase
}) })
form.purchaseCost = Math.round(purchase) form.purchaseCost = isTrial ? 0 : Math.round(purchase)
form.profit = Math.round(profit) form.profit = isTrial ? 0 : Math.round(profit)
form.orderAmount = +form.purchaseCost + +form.profit form.orderAmount = isTrial ? 0 : +form.purchaseCost + +form.profit
}, },
// //
submit() { submit() {
@ -527,41 +530,48 @@
padding: 24rpx; padding: 24rpx;
background-color: #fff; background-color: #fff;
.total { .total {
white-space: nowrap; white-space: nowrap;
} }
.line {
text-align: right;
&:first-child {
margin-bottom: 8px;
}
}
&.show { &.show {
padding: 24rpx 50rpx; padding: 24rpx 50rpx;
.total { .total {
display: flex;
margin-bottom: 30rpx; margin-bottom: 30rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: 600; font-weight: 600;
color: #333; color: #333;
.column {
margin-left: 10rpx;
}
.num { .num {
margin: 0 5rpx;
font-size: 34rpx;
font-weight: 600;
color: #007EFF; color: #007EFF;
} }
} }
.line {
text-align: right;
&:first-child {
margin-bottom: 8px;
}
}
} }
&.edit { &.edit {
.total { .total {
margin-bottom: 10rpx; margin-bottom: 10rpx;
text-align: right;
font-size: 24rpx; font-size: 24rpx;
color: #666; color: #666;
.num {
font-weight: 600;
}
} }
.num { .num {
margin: 0 5rpx; margin: 0 5rpx;
font-size: 34rpx; font-size: 34rpx;
color: #007EFF; color: #007EFF;
} }
.info {
display: flex;
}
} }
.info { .info {
font-size: 24rpx; font-size: 24rpx;
@ -570,7 +580,7 @@
} }
.btn { .btn {
width: 180rpx; width: 180rpx;
margin-left: 10rpx; margin-left: 30rpx;
line-height: 80rpx; line-height: 80rpx;
font-size: 32rpx; font-size: 32rpx;
text-align: center; text-align: center;

@ -32,7 +32,7 @@
</view> </view>
<view class="line"> <view class="line">
<text class="name">订单金额</text> <text class="name">订单金额</text>
<text class="val">{{ item.orderAmount }}</text> <text class="val">{{ item.orderAmount }}</text>
</view> </view>
<view class="line"> <view class="line">
<text class="name">订单内容</text> <text class="name">订单内容</text>

@ -1,7 +1,7 @@
<template> <template>
<view class="page"> <view class="page">
<view class="filter"> <view class="filter">
<uni-search-bar class="search" radius="30" placeholder="请输入112客户名称" v-model="keyword" clearButton="auto" cancelButton="none" /> <uni-search-bar class="search" radius="30" placeholder="请输入客户名称" v-model="keyword" clearButton="auto" cancelButton="none" />
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="popup = true"></uni-icons> <uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="popup = true"></uni-icons>
</view> </view>
<ul class="tab"> <ul class="tab">

@ -9,7 +9,7 @@
<image class="img" src="@/static/image/index/index1.png" mode="widthFix"></image> <image class="img" src="@/static/image/index/index1.png" mode="widthFix"></image>
<view class="info"> <view class="info">
<view class="title">城市合伙人招募中</view> <view class="title">城市合伙人招募中</view>
<view class="text">携手共创教育信息化新未来合伙共享产业互备份</view> <view class="text">携手共创教育信息化新未来合伙共享产业互联领域新红利</view>
</view> </view>
</view> </view>
@ -142,6 +142,10 @@
} }
generateAuth(permissionMenu[0].children, '') generateAuth(permissionMenu[0].children, '')
uni.setStorageSync('auth', auth) uni.setStorageSync('auth', auth)
uni.setStorageSync('reloadAuth', 1)
uni.reLaunch({
url: '../index/index'
})
this.initRole() this.initRole()
}).catch(e => {}) }).catch(e => {})
}, },
@ -160,7 +164,8 @@
uni.setStorageSync('team', data[0]) uni.setStorageSync('team', data[0])
} }
this.list = data this.list = data
this.getAuth() // reloadAuth
uni.getStorageSync('reloadAuth') ? this.initRole() : this.getAuth()
}).catch(e => {}) }).catch(e => {})
}, },
// //

@ -9,7 +9,7 @@
</ul> </ul>
<view v-if="list.length" class="list"> <view v-if="list.length" class="list">
<view v-for="(item, i) in list" class="item"> <view v-for="(item, i) in list" class="item" @click="toDetail(i + 2)">
<view class="c-name">{{ item.name }}</view> <view class="c-name">{{ item.name }}</view>
<view class="content"> <view class="content">
<view class="info"> <view class="info">
@ -29,7 +29,7 @@
<view class="val">{{ item.major }}</view> <view class="val">{{ item.major }}</view>
</view> </view>
</view> </view>
<view class="detail" @click="toDetail(i + 2)">详情</view> <view class="detail" @click.stop="toEmail(i)">下载</view>
</view> </view>
</view> </view>
</view> </view>
@ -132,6 +132,10 @@
toDetail(id) { toDetail(id) {
this.$util.openFile(id) this.$util.openFile(id)
}, },
//
toEmail(id) {
this.$util.to(`../send/send?id=${id}`)
},
// //
toggle(item) { toggle(item) {
item.toggle = !item.toggle item.toggle = !item.toggle

@ -1,67 +1,81 @@
<template> <template>
<view class="container"> <view class="container">
<uni-card :is-shadow="false" :border="false" is-full> <uni-card :is-shadow="false" :border="false" padding="0" is-full>
<view class="form"> <view class="form">
<view class="line"> <view class="line">
<uni-data-checkbox v-model="myVal" :localdata="checkList" @change="myChange"></uni-data-checkbox> <uni-data-checkbox v-model="myVal" :localdata="checkList" @change="myChange"></uni-data-checkbox>
<text>我的邮箱</text> <text>我的邮箱</text>
<uni-easyinput v-model="form.contact" disabled /> <uni-easyinput v-model="email" disabled />
</view> </view>
<view class="line"> <view class="line">
<uni-data-checkbox v-model="otherVal" :localdata="checkList" @change="otherChange"></uni-data-checkbox> <uni-data-checkbox v-model="otherVal" :localdata="checkList" @change="otherChange"></uni-data-checkbox>
<text>其他邮箱</text> <text>其他邮箱</text>
<uni-easyinput v-model="form.contact" placeholder="请输入其他邮箱" /> <uni-easyinput v-model="otherEmail" placeholder="请输入其他邮箱" />
</view> </view>
<button type="primary" @click="submit('valiForm')">确认</button> <button type="primary" @click="submit">确认</button>
</view> </view>
</uni-card> </uni-card>
</view> </view>
</template> </template>
<script> <script>
import { mailFileSend } from '@/apis/modules/parner.js'
import { my } from '@/apis/modules/parner.js'
export default { export default {
data() { data() {
return { return {
id: '',
email: '',
otherEmail: '',
myVal: 1, myVal: 1,
otherVal: 2, otherVal: 2,
checkList: [{ checkList: [{
text: '', text: '',
value: 1 value: 1
}], }],
form: { files: [
name: '', '人工智能实验室建设方案-2020.1.docx',
provience: '', '大数据管理与应用专业建设方案.docx',
city: '', '金融科技实验室建设方案V2.0.docx'
industryId: '', ]
age: '',
introduction: '',
sex: 2,
hobby: [5],
datetimesingle: 1627529992399
}
} }
}, },
onLoad() { onShow() {
console.log(getApp()) const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.id = options.id
this.getInfo()
}, },
methods: { methods: {
//
getInfo() {
const team = uni.getStorageSync('team')
my({
partnerId: team.partnerId,
teamId: team.teamId
}).then(({ my }) => {
this.email = my.info.email
}).catch(e => {})
},
myChange(e) { myChange(e) {
this.otherVal = '' this.otherVal = ''
console.log('---------onchange:', e);
}, },
otherChange(e) { otherChange(e) {
this.myVal = '' this.myVal = ''
console.log('---------onchange:', e);
}, },
submit(ref) { //
this.$refs[ref].validate().then(res => { submit() {
console.log('success', res); const { otherEmail } = this
uni.showToast({ if (this.otherVal && !otherEmail) return this.$util.errMsg('请输入邮箱!')
title: `校验通过` mailFileSend({
}) copyWriting: this.files[this.id],
}).catch(err => { mail: this.myVal ? this.email : otherEmail
console.log('err', err); }).then(res => {
}) this.$util.sucMsg('发送成功!')
setTimeout(() => {
uni.navigateBack()
}, 1000)
}).catch(e => {})
}, },
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Loading…
Cancel
Save