Compare commits

..

No commits in common. 'master' and 'V1.0.1' have entirely different histories.

  1. 4
      apis/modules/user.js
  2. 25
      apis/request.js
  3. 4
      config/request.js
  4. 10
      libs/util.js
  5. 9
      order/addCourse/addCourse.vue
  6. 5
      order/curClient/curClient.vue
  7. 27
      order/editCourse/editCourse.vue
  8. 80
      order/orderDetail/orderDetail.vue
  9. 5
      order/orders/orders.vue
  10. 8
      order/products/products.vue
  11. 2
      pages/index/index.vue
  12. 6
      pages/login/login.vue
  13. 2
      team/setting/setting.vue

@ -9,10 +9,6 @@ export const userBinding = (data) => {
return post('users/users/user/userBinding', data)
}
export const sendPhoneOrEmailCode = (data) => {
return post('users/users/userAccount/sendPhoneOrEmailCode', data)
}
export const queryProvince = () => {
return get('nakadai/nakadai/province/queryProvince')
}

@ -1,7 +1,16 @@
import config from '@/config/request'
let logouted = 0
let HTTP_COUNT = 0 // loading次数
const request = options => {
HTTP_COUNT++
if (config.showLoading) {
// 请求数据时的loading
// uni.showToast({
// title: '加载中',
// duration: 200,
// icon: 'loading'
// })
}
const header = Object.assign({}, config.headers, {
token: uni.getStorageSync('token')
})
@ -20,7 +29,6 @@ const request = options => {
if (status === 200) {
resolve(data)
} else if (status == 401) {
if (!logouted) {
// 登录过期
uni.clearStorageSync()
uni.showToast({
@ -28,14 +36,11 @@ const request = options => {
icon: 'none'
})
setTimeout(() => {
logouted = 0
uni.reLaunch({
url: '/pages/index/index'
uni.navigateTo({
url: '../login/login'
})
}, 1500)
reject(data)
logouted = 1
}
} else if (!status) {
resolve(data)
} else {
@ -53,6 +58,12 @@ const request = options => {
})
reject(err)
},
complete: () => {
if (config.showLoading) {
// HTTP_COUNT--
// HTTP_COUNT || uni.hideLoading()
}
}
})
})
}

@ -5,8 +5,8 @@
*/
export default {
baseURL: 'https://www.occupationlab.com/',
// baseURL: 'http://192.168.31.51:9000/',
baseURL: 'https://huorantech.cn/',
// baseURL: 'http://192.168.31.151:9000/',
// baseURL: 'http://121.37.12.51/',
headers: {
'Content-Type': 'application/json;charset=UTF-8'

@ -1,11 +1,11 @@
import Product from '@/config/product'
const files = [
'https://huoran.oss-cn-shenzhen.aliyuncs.com/1709798714897.docx', // 用户服务协议
'https://huoran.oss-cn-shenzhen.aliyuncs.com/1709798737175.docx', // 用户隐私协议
'https://huoran.oss-cn-shenzhen.aliyuncs.com/1709798668435.docx', // 人工智能
'https://huoran.oss-cn-shenzhen.aliyuncs.com/1709798621083.docx', // 大数据
'https://huoran.oss-cn-shenzhen.aliyuncs.com/1709798646462.docx', // 金融科技
'https://huorantech.cn/%E7%94%A8%E6%88%B7%E6%9C%8D%E5%8A%A1%E5%8D%8F%E8%AE%AE.docx', // 用户服务协议
'https://huorantech.cn/%E7%94%A8%E6%88%B7%E9%9A%90%E7%A7%81%E5%8D%8F%E8%AE%AE.docx', // 用户隐私协议
'https://huorantech.cn/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD%E5%AE%9E%E9%AA%8C%E5%AE%A4%E5%BB%BA%E8%AE%BE%E6%96%B9%E6%A1%88-2020.1.docx', // 人工智能
'https://huorantech.cn/%E5%A4%A7%E6%95%B0%E6%8D%AE%E7%AE%A1%E7%90%86%E4%B8%8E%E5%BA%94%E7%94%A8%E4%B8%93%E4%B8%9A%E5%BB%BA%E8%AE%BE%E6%96%B9%E6%A1%88.docx', // 大数据
'https://huorantech.cn/%E9%87%91%E8%9E%8D%E7%A7%91%E6%8A%80%E5%AE%9E%E9%AA%8C%E5%AE%A4%E5%BB%BA%E8%AE%BE%E6%96%B9%E6%A1%88V2.0.docx', // 金融科技
]
export default {
// 路由跳转

@ -18,7 +18,7 @@
<li v-for="(item, i) in list">
<uni-data-checkbox v-if="item.check" class="check" multiple :value="[1]" :localdata="item.checkData" @change="e => checkChange(e, i)"></uni-data-checkbox>
<uni-data-checkbox v-else class="check" multiple v-model="item.check" :localdata="item.checkData" @change="e => checkChange(e, i)"></uni-data-checkbox>
<image class="icon" :src="$util.getIcon(item)"></image>
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image>
{{ item.productName }}
</li>
</ul>
@ -214,7 +214,6 @@
dataOrCourseId: e.associatedProduct, // id
mallId: e.mallId,
productName: e.productName, //
typeName: e.typeName, //
periodOfUse: '', // 使
startTime: this.$util.formatDate(new Date(), 'yyyy-MM-dd'), //
endTime: '', //
@ -234,8 +233,7 @@
settlementPrice: trial ? 0 : '', //
settlementPriceUnit: e.settlementPrice || 0, //
serviceFee: 0, //
mallNonAssociatedLinks: e.mallNonAssociatedLinks, //
typeName: e.typeName
mallNonAssociatedLinks: e.mallNonAssociatedLinks //
}
},
//
@ -363,10 +361,7 @@
}
.icon {
width: 80rpx;
min-width: 80rpx;
height: 80rpx;
margin: 0 20rpx;
border-radius: 4px;
}
}
/deep/.check {

@ -134,11 +134,6 @@
this.customerId = options.customerId
this.customerName = options.name
this.initList()
//
try {
uni.removeStorageSync('courses')
uni.removeStorageSync('orderEdited')
} catch (e) {}
},
methods: {
getList() {

@ -1,12 +1,11 @@
<template>
<view class="page">
<template v-for="c in courses">
<view v-if="c.list.length && c.list.filter(e => !e.edited).length" class="block">
<view v-if="c.list.length" class="block">
<view class="l-title">{{ c.name }}</view>
<uni-icons class="arrow" type="top" size="20" color="#007EFF" @click="toggle(c)"></uni-icons>
<view v-show="!c.shrink">
<template v-for="(item, i) in c.list">
<view v-if="!item.edited" :key="i">
<view v-for="(item, i) in c.list">
<view class="pro-name">
<view class="left">
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image>
@ -17,7 +16,7 @@
<view class="form-list">
<view class="line">
<view class="name">产品类型</view>
<view class="val">{{ item.typeName }}</view>
<view class="val">{{ productTypes.find(e => e.id === item.productType).name }}</view>
</view>
<view :class="['line', {err: err === 'periodOfUse' + item.dataOrCourseId + item.authority}]">
<view class="name">使用期限</view>
@ -75,7 +74,6 @@
</view>
</view>
</view>
</template>
</view>
</view>
</template>
@ -88,7 +86,7 @@
<script>
import { getOrderOtherTime } from '@/apis/modules/order.js'
import { getPartnerTeamRates } from '@/apis/modules/parner.js'
import { productCategoryList, productTypeList } from '@/apis/modules/product.js'
import { productCategoryList } from '@/apis/modules/product.js'
export default {
data() {
return {
@ -135,22 +133,23 @@
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)
})
@ -250,9 +249,9 @@
},
//
dealSettlePrice(row) {
// 0
// 0
console.log('dealSettlePrice=>', row, this.orderType)
if (this.orderType != 1) {
if (this.orderType == 2) {
row.settlementPrice = 0
row.serviceFee = 0
} else {
@ -366,12 +365,10 @@
msg = '请输入成交价!'
break
}
e.edited = 1 //
}
if (msg) return this.$util.errMsg(msg)
if (this.orderRepeat.length) return this.$util.errMsg(this.repeatMsg) //
uni.setStorageSync('courses', this.courses)
uni.setStorageSync('orderEdited', 1)
uni.navigateBack()
},
}

@ -8,6 +8,7 @@
<view v-if="orderId" class="val">{{ form.customerName }}</view>
<view v-else class="customer-wrap">
<view :class="['ph', {val: form.customerName}]" @click="customerVisible = true">{{ form.customerName || '请选择客户' }}</view>
<view class="create" @click="toClient">找不到客户马上创建</view>
</view>
</view>
<view class="line" v-if="form.customerName">
@ -45,7 +46,6 @@
<view v-if="isDetail" class="val">{{ form.businessManagerName }}</view>
<uni-data-picker v-else class="picker-input" placeholder="请选择商务经理" popup-title="请选择商务经理" preload :localdata="bms" :map="{text: 'userName', value: 'partnerId'}" v-model="form.businessManagerId" :readonly="form.teamId ? false : true"></uni-data-picker>
</view>
<template v-if="edited">
<view class="line">
<view class="name">订单编号</view>
<view class="val">{{ form.orderNumber }}</view>
@ -58,7 +58,6 @@
<view class="name">订单金额</view>
<view class="val">{{ form.orderAmount }}</view>
</view>
</template>
</view>
</view>
@ -82,7 +81,7 @@
<button v-if="auth('订单管理:发货')" class="course-btn" type="primary" @click.stop="handleDeliver(n, i)">{{ item.ship ? '取消' : ''}}发货</button>
</template>
<button v-else-if="!isDetail && auth('订单管理:启用')" class="course-btn" type="primary" @click.stop="handleEnable(n, i)">{{ item.isEnable ? '禁用' : '启用'}}</button>
<button v-if="auth('订单管理:发货') && (item.authority == 0 || item.authority == 3 || item.authority == 4) && (!isDetail || (isDetail && item.shipContent))" class="course-btn mg" type="primary" @click.stop="showShip(item)">发货信息</button>
<button v-if="auth('订单管理:发货') && (item.authority == 3 || item.authority == 4) && (!isDetail || (isDetail && item.shipContent))" class="course-btn mg" type="primary" @click.stop="showShip(item)">发货信息</button>
<image v-if="!orderId || isRenew || isHandle" class="del" src="@/static/image/trash.png" mode="widthFix" @click.stop="delCourse(c, i)"></image>
</view>
</view>
@ -138,7 +137,7 @@
</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 v-if="isDetail || (isEdit && !item.authority)" 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')">
@ -151,14 +150,8 @@
</template>
<view class="bottom">
<template v-if="!edited && !orderId">
<view class="next-wrap">
<view class="lg-btn next" @click="toAdd(0)">下一步</view>
</view>
</template>
<template v-else>
<view v-if="!orderId || isHandle" class="add-wrap">
<view class="lg-btn" @click="toAdd">
<view class="add-btn" @click="toAdd">
<uni-icons class="icon" type="plus" color="#007FFF"></uni-icons>
添加产品
</view>
@ -184,7 +177,6 @@
<view v-if="auth('订单管理:发货') && (isHandle || (!orderId && courses.length))" class="btn" @click="batchDeliver">{{ courses.find(e => !e.ship) ? '一键发货' : '取消全部发货' }}</view>
</view>
</view>
</template>
</view>
<view v-if="isDetail" class="action">
@ -194,7 +186,7 @@
<uni-icons class="icon" custom-prefix="iconfont" type="icon-edit" size="30" color="#959595"></uni-icons>
<view class="text">修改</view>
</view>
<view class="item" @click="toAction(`../orderDetail/orderDetail?orderId=${orderId}&action=renew`)">
<view class="item" v-if="auth('订单管理:续费')" @click="toAction(`../orderDetail/orderDetail?orderId=${orderId}&action=renew`)">
<uni-icons class="icon" custom-prefix="iconfont" type="icon-product" size="30" color="#959595"></uni-icons>
<view class="text">续费</view>
</view>
@ -215,7 +207,6 @@
<view class="top">请选择客户</view>
<uni-icons class="close" type="closeempty" size="20" @click="closeCustomer"></uni-icons>
<uni-search-bar class="search" radius="5" placeholder="请输入客户名称" v-model="keyword" clearButton="auto" cancelButton="none" />
<view class="create" @click="toClient">找不到客户马上创建</view>
<view class="list">
<view class="item" v-for="item in customerList" @click="customerChange(item)">{{ item.customerName }}</view>
</view>
@ -251,7 +242,6 @@
isEdit: 0, //
isHandle: 0, //
isRenew: 0, //
edited: false,
orderId: '',
orderTypes: [{
text: '正式',
@ -338,7 +328,6 @@
this.isEdit = action === 'edit'
this.isHandle = action === 'handle'
this.isRenew = action === 'renew'
this.edited = uni.getStorageSync('orderEdited')
const store = uni.getStorageSync('courses')
this.getTeam(!store)
if (store) {
@ -349,11 +338,11 @@
}
this.courseList = store
this.courses = list
// this.$nextTick(() => {
// uni.pageScrollTo({
// selector: '#products',
// })
// })
this.$nextTick(() => {
uni.pageScrollTo({
selector: '#products',
})
})
try {
uni.removeStorageSync('courses')
} catch (e) {}
@ -393,7 +382,7 @@
const item = this.teams.find(e => e.id == teamId)
if (item) this.form.partnerClassificationName = item.partnerClassificationName
if (!this.isDetail) {
if (this.form.businessManagerId) this.form.businessManagerId = +this.form.businessManagerId
this.form.businessManagerId = +this.form.businessManagerId
this.getBm()
}
}
@ -848,8 +837,8 @@
}, 500)
},
dealSettlePrice(row) {
// 0
if (this.form.orderType != 1) {
// 0
if (this.form.orderType == 2) {
row.settlementPrice = 0
row.serviceFee = 0
} else {
@ -1008,12 +997,11 @@
.customer-wrap {
text-align: right;
}
}
.create {
padding: 0 20rpx;
.create {
margin-top: 10rpx;
font-size: 20rpx;
text-align: right;
color: #f00;
}
}
.pro-wrap {
position: relative;
@ -1071,16 +1059,13 @@
.line {
display: flex;
justify-content: space-between;
padding: 28rpx 0;
padding: 12rpx 0;
margin: 5px 0;
font-size: 12px;
border-bottom: 1px solid #E6E8ED;
&:last-child {
border-bottom: 0;
}
}
.label {
font-size: 28rpx;
color: #333;
color: #999;
}
.ph {
font-size: 28rpx;
@ -1101,12 +1086,6 @@
font-size: 32rpx;
color: #007EFF;
}
.period {
flex: none;
width: 100rpx;
font-size: 28rpx;
text-align: center;
}
}
.bottom {
z-index: 2;
@ -1117,14 +1096,12 @@
background-color: #fff;
box-shadow: 0 -2px 2px #f5f5f5;
box-sizing: border-box;
.add-wrap {
}
.add-wrap {
padding: 16rpx 24rpx 40rpx;
background-color: #f5f5f5;
}
.next-wrap {
padding: 24rpx 24rpx 0;
}
/deep/.lg-btn {
}
/deep/.add-btn {
display: flex;
justify-content: center;
align-items: center;
@ -1140,11 +1117,6 @@
.uni-icons {
font-size: 38rpx !important;
}
&.next {
color: #fff;
background-color: #007EFF;
}
}
}
.product {
display: flex;
@ -1248,6 +1220,12 @@
margin-left: 10rpx;
}
}
.period {
flex: none;
width: 100rpx;
font-size: 28rpx;
text-align: center;
}
.ship-info {
height: 400rpx;
padding: 30rpx;

@ -145,10 +145,9 @@
}
},
onShow() {
//
//
try {
uni.removeStorageSync('courses')
uni.removeStorageSync('orderEdited')
} catch (e) {}
this.initList()
},
@ -215,7 +214,7 @@
},
//
toDetail(item) {
// if(!this.auth(':')) return
if(!this.auth('订单管理:查看')) return
this.$util.to(`../orderDetail/orderDetail?orderId=${item.orderId}&show=1`)
},
//

@ -18,7 +18,7 @@
<ul class="list">
<li v-for="item in list">
<view class="pro-name">
<image class="icon" :src="$util.getIcon(item)"></image>
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image>
{{ item.productName }}
</view>
<view class="info">
@ -188,13 +188,11 @@
align-items: center;
padding: 18rpx 0;
font-size: 30rpx;
font-weight: 600;
color: #333;
border-bottom: 1px solid #E6E8ED;
.icon {
width: 58rpx;
min-width: 58rpx;
height: 58rpx;
width: 52rpx;
height: 52rpx;
margin-right: 20rpx;
}
}

@ -19,7 +19,7 @@
<image class="icon" src="@/static/image/index/index4.png" mode="widthFix"></image>
<view class="text">方案</view>
</li>
<li @click="$util.to('/order/orders/orders')">
<li v-if="auth('订单管理')" @click="$util.to('/order/orders/orders')">
<image class="icon" src="@/static/image/index/index5.png" mode="widthFix"></image>
<view class="text">订单</view>
</li>

@ -9,8 +9,8 @@
</button>
<template v-else>
<view class="btn wechat" @click="login">
<!-- <image src="@/static/image/wechat.png" mode="widthFix"></image> -->
快捷登录
<image src="@/static/image/wechat.png" mode="widthFix"></image>
微信授权登录
</view>
</template>
@ -75,7 +75,7 @@
this.submiting = true
login({
code,
// avatarUrl: userInfo.avatarUrl
avatarUrl: userInfo.avatarUrl
}).then(({ data }) => {
const e = data.sessionKey
this.sessionKey = e.session_key

@ -65,7 +65,7 @@
success(res) {
if (res.confirm) {
uni.clearStorageSync()
that.$util.to('/pages/login/login')
that.$util.to('../login/login')
}
}
})

Loading…
Cancel
Save