dev_2022-05-11
yujialong 3 years ago
parent b332158556
commit 5575c862d9
  1. 5
      src/router/index.js
  2. 3
      src/utils/api.js
  3. 29
      src/views/customer/AddCustomer.vue
  4. 166
      src/views/customer/Order.vue
  5. 2
      src/views/join/index.vue
  6. 193
      src/views/join1/index.vue
  7. 55
      src/views/order/AddOrder.vue
  8. 5
      src/views/parner/staff.vue
  9. 1
      src/views/serve/projectAdd.vue
  10. 1
      src/views/system/manageLog.vue
  11. 28
      src/views/user/User.vue

@ -26,6 +26,11 @@ let router = new Router({
component: () => import( '../views/customer/AddCustomer.vue'),
// meta: { title: '新增客户' }
},
{
path: '/bmOrder',
component: () => import( '../views/customer/Order.vue'),
// meta: { title: '新增客户' }
},
{
path: '/user',
component: () => import( '../views/user/User.vue'),

@ -2,7 +2,7 @@ import Setting from "@/setting";
const host = Setting.apiBaseURL
const uploadURL = Setting.uploadURL
const host1 = 'http://192.168.31.137:9000/'
const host1 = 'http://39.108.250.202:9000/'
export default {
@ -52,6 +52,7 @@ export default {
queryPhone: `liuwanr/user/queryPhone`,
queryPlatform: `liuwanr/userInfo/queryPlatform`,
getAListOfClientBusinessManagers: `nakadai/nakadai/customer/getAListOfClientBusinessManagers`,
getBusinessManagerOrder: `nakadai/nakadai/customer/getBusinessManagerOrder`,
// 用户管理
delUserAccounts: `users/users/userAccount/delUserAccounts`,

@ -12,11 +12,11 @@
</el-card>
<el-card shadow="hover" :class="customerId ? 'mgb20' : 'card'">
<div class="tabs">
<div class="tabs" v-if="customerId">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{active: i == curTab}" @click="tabChange(i)">{{ item }}</a>
</div>
<el-form v-show="curTab === 'tab1'" :model="form" :rules="rules" ref="form" label-width="120px" class="flex-start-around" :disabled="isDetail">
<el-form v-show="curTab === 'tab1'" style="margin-top: 20px" :model="form" :rules="rules" ref="form" label-width="120px" class="flex-start-around" :disabled="isDetail">
<el-col :span="6" style="margin-right: 60px;">
<el-form-item prop="countries" label="国家">
<el-select v-model="form.countries" clearable placeholder="请选择国家">
@ -229,15 +229,22 @@
</div>
</div>
<el-table :data="bms" class="table" stripe header-align="center">
<el-table-column type="index" width="100" label="序号" align="center">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="userName" label="姓名" width="200" align="center">
<template slot-scope="scope">
{{ scope.row.userName }}{{ scope.row.peopleDel ? '(已被删除)' : '' }}
</template>
</el-table-column>
<el-table-column prop="userName" label="姓名" align="center"></el-table-column>
<el-table-column prop="phone" label="手机号" align="center"></el-table-column>
<el-table-column prop="partnerClassificationName" label="所属团队" align="center"></el-table-column>
<el-table-column prop="quantityOfOrder" label="订单数量" align="center"></el-table-column>
<el-table-column prop="latestTime" label="最近下单时间" align="center"></el-table-column>
<el-table-column prop="productName" label="产品" align="center"></el-table-column>
<el-table-column label="操作" align="center">
<el-table-column prop="phone" label="手机号" width="150" align="center"></el-table-column>
<el-table-column prop="partnerClassificationName" label="所属团队" align="center">
<template slot-scope="scope">
{{ scope.row.partnerClassificationName }}{{ scope.row.teamDel ? '(被解散)' : '' }}
</template>
</el-table-column>
<el-table-column prop="quantityOfOrder" label="订单数量" width="100" align="center"></el-table-column>
<el-table-column prop="latestTime" label="最近下单时间" width="200" align="center"></el-table-column>
<el-table-column prop="productName" label="产品" align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="120" align="center">
<template slot-scope="scope">
<el-button type="text" @click="toOrder(scope.row)">查看</el-button>
</template>
@ -711,7 +718,7 @@ export default {
},
//
toOrder(row) {
this.$router.push(`/bmOrder?businessManagerId=${row.businessManagerId}&customerId=${this.customerId}&customerName=${this.form.customerName}`)
},
tabChange(index) {

@ -0,0 +1,166 @@
<template>
<div>
<el-card shadow="hover" class="mgb20">
<div class="flex-between">
<div class="per_title" v-preventReClick @click="back">
<i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span>
<span class="per_school">商务经理订单</span>
</div>
</div>
</el-card>
<el-card shadow="hover" class="mgb20">
<div>
<div class="flex-center mgb20">
<p class="hr_tag"></p>
<span>筛选</span>
</div>
<div style="text-align: right">
<el-input style="width: 300px" placeholder="请输入订单编号/产品名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</div>
</div>
</el-card>
<el-card shadow="hover" class="card">
<div class="flex-between mgb20">
<div class="flex-center">
<p class="hr_tag"></p>
<span>订单列表</span>
</div>
</div>
<el-table :data="orderData" class="table" ref="table" stripe header-align="center"
@selection-change="handleSelectionChange" :row-key="getRowKeys">
<el-table-column type="index" width="100" label="序号" align="center">
</el-table-column>
<el-table-column prop="orderNumber" label="订单编号" align="center">
</el-table-column>
<el-table-column prop="customerName" label="客户名称" align="center">
<template slot-scope="scope">
{{ customerName }}
</template>
</el-table-column>
<el-table-column prop="productName" label="产品内容" align="center"></el-table-column>
<el-table-column prop="totalAmount" label="订单金额(元)" align="center">
</el-table-column>
<el-table-column prop="createTime" label="订单日期" align="center">
</el-table-column>
<el-table-column prop="orderType" label="订单类型" align="center">
</el-table-column>
<el-table-column prop="orderStatus" label="订单状态" align="center">
</el-table-column>
<el-table-column prop="orderNature" label="订单性质" align="center">
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="toDetail(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next"
@current-change="handleCurrentChange" :current-page="page" :total="totals">
</el-pagination>
</div>
</el-card>
</div>
</template>
<script>
export default {
data() {
return {
businessManagerId: this.$route.query.businessManagerId,
customerId: this.$route.query.customerId,
customerName: this.$route.query.customerName,
keyword: "",
orderData: [],
page: 1,
pageSize: 10,
totals: 0,
searchTimer: null
};
},
watch: {
keyword: function(val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
}
},
created() {
this.getData();
},
methods: {
getData() {
let data = {
businessManagerId: this.businessManagerId,
keywords: this.keyword,
customerId: this.customerId,
pageNum: this.page,
pageSize: this.pageSize,
};
this.$post(this.api.getBusinessManagerOrder, data).then(({ data }) => {
const { records } = data
records.forEach(e => {
e.orderType = this.orderTypeFn(e.orderType);
e.orderStatus = this.orderStatusFn(e.orderStatus);
e.orderNature = this.orderNatureFn(e.orderNature);
});
this.orderData = records
this.totals = data.total
}).catch(res => {})
},
initData() {
this.page = 1
this.getData()
},
toDetail(row) {
this.$router.push({
path:'/AddOrder',
query:{
val: 'watch',
orderId: row.orderId,
orderStatus: row.orderStatus === '已完成' ? 1 : 0
}
})
},
back() {
this.$router.back()
}
}
};
</script>
<style scoped>
.card {
min-height: calc(100vh - 300px);
}
.mag {
margin-right: 20px;
}
.cell{
white-space:pre-wrap;
width: 140px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.tags{
border: none;
background: none;color: #000;
white-space:pre-wrap;
width: 140px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
</style>

@ -1,7 +1,7 @@
<template>
<div class="wrap">
<div class="join">
<h6>{{ userName }} 邀请你加入</h6>
<h6>欢迎加入</h6>
<div class="wel">
<div class="icon">
<img src="@/assets/img/house.png" alt="">

@ -1,193 +0,0 @@
<template>
<div class="join">
<el-form class="form" ref="form" :model="form" :rules="rules">
<el-form-item prop="userName" label="姓名">
<el-input v-model.trim="form.userName" placeholder="请输入姓名"></el-input>
</el-form-item>
<el-form-item prop="account" label="账号">
<el-input v-model.trim="form.account" placeholder="请输入账号"></el-input>
</el-form-item>
<el-form-item prop="phone" label="手机号">
<el-input v-model.trim="form.phone" placeholder="请输入手机号" maxlength="11"></el-input>
</el-form-item>
<el-form-item prop="email" label="邮箱">
<el-input v-model.trim="form.email" placeholder="请输入邮箱"></el-input>
</el-form-item>
</el-form>
<div class="btn-wrap">
<el-button type="primary" @click="submit">提交</el-button>
</div>
</div>
</template>
<script>
import util from "@/libs/util"
import Setting from "@/setting"
export default {
data() {
const accountPass = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入账号'))
} else {
const pattern = /^[A-Za-z0-9]*$/
if(pattern.test(value)){
this.accountChange()
callback()
}else{
callback(new Error('请输入正确账号格式'))
}
}
}
const phonePass = (rule, value, callback) => {
if (value) {
const pattern = /^1[3456789]\d{9}$/
if(pattern.test(value)){
this.phoneChange()
callback()
}else{
callback(new Error('请输入正确手机号格式'))
}
} else {
callback(new Error('请输入手机号'))
}
}
const emailPass = (rule, value, callback) => {
if (value) {
const pattern = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/
if(pattern.test(value)){
// this.emailChange()
callback()
}else{
callback(new Error('请输入正确邮箱格式'))
}
} else {
callback()
}
}
return {
token: window.atob(decodeURI(this.$route.query.token)),
form: {
partnerClassificationId: this.$route.query.id,
isTeam: 0,
account: '',
email: '',
phone: '',
userName: ''
},
rules: {
account: [
{ required: true, validator: accountPass, trigger: 'blur' }
],
userName: [
{ required: true, message: "请输入姓名", trigger: "blur" }
],
phone: [
{ required: true, validator: phonePass, trigger: 'blur' }
],
email: [
{ validator: emailPass, trigger: 'blur' }
]
},
submiting: false //
};
},
mounted() {
sessionStorage.setItem('token', this.token)
this.form.token = this.token
},
methods: {
//
accountChange() {
const form = this.form
const { account } = form
if (account === this.originAccount) {
this.accountReapeat = false
} else {
const { accountId } = form
this.$post(`${this.api.checkWorkNumOrAccount}?platformId=${Setting.platformId}&type=2&account=${account}${accountId ? `&accountId=${accountId}` : ''}`).then(res => {
this.accountReapeat = false
}).catch(err => {
this.accountReapeat = true
})
}
},
//
phoneChange() {
const form = this.form
const { phone } = form
if (phone) {
const { accountId } = form
this.$post(`${this.api.checkEmailOrPhone}?phone=${phone}${accountId ? `&accountId=${accountId}` : ''}`).then(res => {
this.phoneRepeat = false
}).catch(err => {
this.phoneRepeat = true
})
}
},
//
emailChange() {
const form = this.form
const { email } = form
if (email) {
const { accountId } = form
this.$post(`${this.api.checkEmailOrPhone}?email=${email}${accountId ? `&accountId=${accountId}` : ''}`).then(res => {
this.emailRepeat = false
}).catch(err => {
this.emailRepeat = true
})
}
},
//
submit() {
this.$refs.form.validate((valid) => {
if (valid) {
if (this.submiting) return false
if (this.accountReapeat) return util.warningMsg("该账号已存在")
if (this.phoneRepeat) return util.warningMsg("该手机号已存在")
if (this.emailRepeat) return util.warningMsg("该邮箱已存在")
const { form } = this
form.uniqueIdentification = Date.now()
this.submiting = true
this.$post(this.api.savePartnerAccount, form).then(res => {
util.successMsg('加入成功!')
setTimeout(location.reload, 1000)
}).catch(res => {
this.submiting = false
})
}
})
},
}
};
</script>
<style lang="scss" scoped>
.join {
.form{
width: 436px;
padding: 38px 38px 60px;
margin: 0 auto 0;
border-radius: 6px;
background-color: #fff;
.title{
margin-bottom: 25px;
font-size: 26px;
color: #0B1D30;
letter-spacing: 4px;
}
}
/deep/.el-form-item{
margin-bottom: 20px;
}
/deep/.el-input__inner{
position: relative;
height: 52px;
padding: 0 20px 0 34px;
line-height: 50px;
background-color: #FBFBFB;
border: 1px solid #E1E6F2;
border-radius: 4px !important;
}
}
</style>

@ -54,7 +54,7 @@
<el-input disabled v-model="form.email" placeholder="请输入邮箱地址"></el-input>
</el-form-item>
<el-form-item label="商务经理">
<el-select v-model="form.businessManagerId" clearable filterable placeholder="请选择商务经理">
<el-select :disabled="viewDisabled" v-model="form.businessManagerId" clearable filterable placeholder="请选择商务经理">
<el-option v-for="(item, i) in bmList" :key="i" :label="item.userName" :value="item.partnerId"></el-option>
</el-select>
</el-form-item>
@ -359,7 +359,7 @@
:disabled="viewDisabled"
@input="scope.row.accountNum = scope.row.accountNum.replace(/[^0-9.]/g,'')"
v-model="scope.row.accountNum"
@change="[dealComputers($event,scope.row),dealBargain($event,scope.row)]"
@change="[dealComputers($event,scope.row)]"
type="text"></el-input>
</div>
</template>
@ -374,6 +374,7 @@
@input="scope.row.finalPrice = scope.row.finalPrice.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
v-model="scope.row.finalPrice"
type="text"></el-input>
<span style="margin-left:5px"></span>
</div>
</template>
</el-table-column>
@ -930,6 +931,7 @@ export default {
orderAmount: form.orderType === 2 ? 0 : form.orderAmount, // 0
orderId: form.orderId,
options: form.options,
businessManagerId: +form.businessManagerId
};
this.coursePermissions = list.filter(i => i.authority === 1);
this.dataPlatformPermissions = list.filter(i => i.authority === 0);
@ -1322,14 +1324,13 @@ export default {
},
//
calculateDiscountCourse(val, row) {
if (row.finalPrice)
debugger
row.discountRate = (row.finalPrice / row.marketValue * 100).toFixed(2) + "%";
const { finalPrice, marketValue } = row
if (finalPrice) row.discountRate = marketValue == 0 ? '0%' : (finalPrice / marketValue * 100).toFixed(2) + "%";
},
//
calculateDiscount(val, row) {
if (row.finalValue)
row.discountRate = (row.finalValue / row.marketValue * 100).toFixed(2) + "%";
const { finalValue, marketValue } = row
if (finalValue) row.discountRate = marketValue == 0 ? '0%' : (finalValue / marketValue * 100).toFixed(2) + "%";
},
//
contractTimeChange(val) {
@ -1338,28 +1339,18 @@ export default {
this.contract.endTime = val[1];
}
},
//
//
allAmount($event, row) {
this.dealSettlePrice(row)
//
let courseArr = [];
this.coursePermissions.map(e => {
courseArr.push(+e.finalPrice);
});
let courseTotalPrice = courseArr.reduce((a, b) => a + b, 0);
//
let dataArr = [];
this.dataPlatformPermissions.map(e => {
dataArr.push(+e.totalAmount);
});
let dataTotalPrice = dataArr.reduce((a, b) => a + b, 0);
this.form.orderAmount = courseTotalPrice * 10000 + dataTotalPrice;
let total = 0
const list = [...this.coursePermissions, ...this.dataPlatformPermissions]
list.map(e => total += +e.finalPrice)
this.form.orderAmount = total * 10000
},
// ////
dealFinalValue(val, row) {
const { periodOfUse, options, accountNum, finalPrice } = row
if (periodOfUse && accountNum && finalPrice) {
debugger
row.finalValue = (finalPrice / accountNum / periodOfUse * (!options ?
365 :
options === 1 ?
@ -1379,21 +1370,13 @@ export default {
}
this.allAmount(e, row)
},
//
dealBargain(e, row) {
if (row.accountNum && row.totalAmount) {
row.finalPrice = this.handleNaN(Math.round(row.totalAmount / row.accountNum).toFixed(2))
}
},
//
dealSettlePrice(row) {
debugger
const unit = row.options // 使
const useUnit = row.periodOfUse // 使
let sPrice = ''
if (row.settlementMethod === '0') {
// **/**(1)
// **/**(1)
const priceUnit = row.settlementPriceUnit
sPrice = ((!unit ?
priceUnit / 365 * useUnit :
@ -1401,10 +1384,10 @@ export default {
priceUnit / 12 * useUnit :
priceUnit * useUnit) * (row.authority ?
1 :
row.accountNum)).toFixed(2)
row.accountNum) / 10000).toFixed(2)
} else {
// *
sPrice = row.finalPrice * row.businessProportion / 100
// *
sPrice = row.finalPrice * row.businessProportion / 100 / 10000
}
row.settlementPrice = this.handleNaN(sPrice)
},
@ -1437,11 +1420,11 @@ export default {
if (row.authority) {
const price = row.marketPrice //
// //365,/12)
row.marketValue = (!unit ?
row.marketValue = ((!unit ?
price / 365 * useUnit :
unit === 1 ?
price / 12 * useUnit :
price * useUnit).toFixed(2)
price * useUnit) / 10000).toFixed(2)
}
this.dealSettlePrice(row)
// +1

@ -410,10 +410,11 @@ export default {
this.expireTime = `${date.getFullYear()}-${util.preZero(date.getMonth() + 1)}-${util.preZero(date.getDate())} ${util.preZero(date.getHours())}:${util.preZero(date.getMinutes())}:${util.preZero(date.getMinutes())}`
this.parnerVisible = true
const cur = this.$refs.orgTree.getCurrentKey()
this.link = `${location.origin}${Setting.isDev || Setting.isPro ? '' : 'nakadai'}/#/join?accountId=${accountId}&id=${cur ? cur: this.orgList[0].id}&userName=${this.userName}`
const link = `${location.origin}${Setting.isDev || Setting.isPro ? '' : 'nakadai'}/#/join?accountId=${accountId}&id=${cur ? cur: this.orgList[0].id}`
//
axios.get(`${this.api.generationQrCode}?url=${this.link}`, {
this.link = link
axios.get(`${this.api.generationQrCode}?url=${encodeURIComponent(link)}`, {
responseType: 'blob'
}).then(({ data }) => {
this.qrcode = window.URL.createObjectURL(data)

@ -435,6 +435,7 @@ export default {
this.submiting = true
this.$store.dispatch("setSystemId", this.projectManage.systemId);
this.projectManage.state = state;
this.projectManage.ztOpen = state ? 0 : 1
let { systemId } = this.projectManage;
if (this.projectId) {
if (systemId == 2 || systemId == 3) {

@ -199,6 +199,7 @@ export default {
}
/deep/.timeline {
margin-left: 20%;
overflow: hidden;
.el-timeline-item__node--normal {
top: 30px;
}

@ -264,18 +264,26 @@ export default {
}
this.loading = true
this.$post(this.api.queryUserInfoList, data).then(({ page, total }) => {
const promises = []
page.map(e => {
//
this.$get(this.api.viewUserDetailsforNakadai, { userId: e.userId }).then(({ result }) => {
const platList = result.bindingPlatformAndUserList
// 1->0->
e.isEnable = platList.find(e => e.isEnable) ? 1 : 0
e.userIds = platList.map(e => e.userId) // userId
}).catch((res) => {})
promises.push(new Promise((resolve, reject) => {
//
this.$get(this.api.viewUserDetailsforNakadai, { userId: e.userId }).then(({ result }) => {
const platList = result.bindingPlatformAndUserList
// 1->0->
e.isEnable = platList.find(e => e.isEnable) ? 1 : 0
e.userIds = platList.map(e => e.userId) // userId
resolve()
}).catch((res) => {
reject()
})
}))
})
Promise.all(promises).then(_ => {
this.userData = page
this.totals = total
this.loading = false
})
this.userData = page
this.totals = total
this.loading = false
}).catch(res => {
this.loading = false
})

Loading…
Cancel
Save