订单等修复

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. 29
      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

@ -20,3 +20,7 @@ export const treeList = (data) => {
export const 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 {
baseURL: 'http://192.168.31.151:9000/',
baseURL: 'http://192.168.31.137:9000/',
headers: {
'Content-Type': 'application/json;charset=UTF-8'
},

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

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

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

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

@ -1,7 +1,7 @@
<template>
<view class="page">
<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>
</view>
<ul class="tab">

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

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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Loading…
Cancel
Save