dev_2022-05-11
yujialong 3 years ago
parent ccc3affa99
commit f4f63e54a6
  1. 2
      src/assets/css/main.css
  2. 8
      src/store/index.js
  3. 14
      src/views/course/AddCurriculum.vue
  4. 58
      src/views/customer/AddCustomer.vue
  5. 2
      src/views/customer/Order.vue
  6. 1
      src/views/customer/customer.vue
  7. 14
      src/views/data/Product.vue
  8. 95
      src/views/order/AddOrder.vue
  9. 2
      src/views/parner/pcRole.vue
  10. 37
      src/views/parner/staff.vue
  11. 2
      src/views/system/role.vue
  12. 23
      src/views/system/staff.vue

@ -162,7 +162,7 @@ li {
width: 60%; width: 60%;
} }
.orderTable td .normal{ .orderTable td .normal{
width: auto; width: 90%;
} }
.orderTable .el-select>.el-input{ .orderTable .el-select>.el-input{

@ -20,7 +20,8 @@ const store = new Vuex.Store({
lastSystemId: null, lastSystemId: null,
projectFields: {}, projectFields: {},
btns: [], btns: [],
routes: [] routes: [],
customerPage: 1
}, },
actions: { actions: {
setSystemId({ state,commit },systemId) { setSystemId({ state,commit },systemId) {
@ -78,7 +79,10 @@ const store = new Vuex.Store({
}, },
addRoutes(state,routes) { addRoutes(state,routes) {
state.routes = routes state.routes = routes
} },
SET_C_PAGE: (state, page) => {
state.customerPage = page
},
} }
}); });

@ -62,11 +62,11 @@
<div class="settlement"> <div class="settlement">
<el-radio v-model="form.settlementMethod" label="1">比例分成</el-radio> <el-radio v-model="form.settlementMethod" label="1">比例分成</el-radio>
<span class="label">商务经理占比</span> <span class="label">商务经理占比</span>
<el-input v-model.trim="form.businessProportion"> <el-input v-model.trim="form.businessProportion" @change="calcProp">
<template slot="append">%</template> <template slot="append">%</template>
</el-input> </el-input>
<span class="label">产品厂商占比</span> <span class="label">产品厂商占比</span>
<el-input v-model.trim="form.manufacturerProportion"> <el-input v-model.trim="form.manufacturerProportion" @change="calcProp">
<template slot="append">%</template> <template slot="append">%</template>
</el-input> </el-input>
</div> </div>
@ -498,6 +498,16 @@ export default {
}).catch(err => { }).catch(err => {
}); });
}, },
//
calcProp() {
const p1 = this.form.businessProportion
const p2 = this.form.manufacturerProportion
if (p1 && p2) {
if(isNaN(p1)) return this.$message.warning('商务经理占比请输入数字')
if(isNaN(p2)) return this.$message.warning('产品厂商占比请输入数字')
if(+p1 + +p2 !== 100) return this.$message.warning('比例分成总和须为100%,请重新修改')
}
},
handleExceed(files, fileList) { // handleExceed(files, fileList) { //
this.$message.warning("当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!"); this.$message.warning("当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!");
}, },

@ -10,12 +10,12 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" :class="customerId ? 'mgb20' : 'card'"> <el-card shadow="hover" class="card">
<div class="tabs" v-if="customerId"> <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> <a class="item" v-for="(item, i) in tabs" :key="i" :class="{active: i == curTab}" @click="tabChange(i)">{{ item }}</a>
</div> </div>
<div v-show="curTab === 'tab1'"> <div v-show="curTab === 'tab1'">
<el-form style="margin-top: 20px" :model="form" :rules="rules" ref="form" label-width="120px" class="flex-start-around" :disabled="isDetail"> <el-form :model="form" :rules="rules" ref="form" label-width="120px" class="flex-start-around info" :disabled="isDetail">
<el-col :span="6" style="margin-right: 60px;"> <el-col :span="6" style="margin-right: 60px;">
<el-form-item prop="countries" label="国家"> <el-form-item prop="countries" label="国家">
<el-select v-model="form.countries" clearable placeholder="请选择国家"> <el-select v-model="form.countries" clearable placeholder="请选择国家">
@ -76,8 +76,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
<div style="text-align: center"> <div v-if="!isDetail" style="margin-top: 20px;text-align: center">
<el-button v-if="!isDetail" type="primary" v-preventReClick @click="saveAdd('form')">确定</el-button> <el-button type="primary" v-preventReClick @click="saveAdd('form')">确定</el-button>
<el-button v-preventReClick @click="$router.back()">取消</el-button>
</div> </div>
</div> </div>
@ -104,7 +105,7 @@
<el-button type="primary" @click="exportList">导出列表</el-button> <el-button type="primary" @click="exportList">导出列表</el-button>
</div> </div>
</div> </div>
<el-table :data="products" class="orderTable" stripe header-align="center" @selection-change="handleSelectionChange" row-key="customerId"> <el-table :data="products" class="orderTable" stripe header-align="center" @selection-change="handleSelectionChange" row-key="dataOrCourseId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<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>
@ -158,7 +159,7 @@
<el-input style="width: 250px;" placeholder="请输入订单编号、内容" prefix-icon="el-icon-search" clearable v-model="form3.keyword"></el-input> <el-input style="width: 250px;" placeholder="请输入订单编号、内容" prefix-icon="el-icon-search" clearable v-model="form3.keyword"></el-input>
</div> </div>
</div> </div>
<el-table :data="orders" class="orderTable" stripe header-align="center" @selection-change="handleSelectionChange" row-key="customerId"> <el-table :data="orders" class="orderTable" stripe header-align="center" @selection-change="handleSelectionChange" row-key="orderId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<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>
@ -277,7 +278,7 @@ export default {
token: sessionStorage.getItem('token'), token: sessionStorage.getItem('token'),
customerId : this.$route.query.id, customerId : this.$route.query.id,
isDetail : Boolean(this.$route.query.show), isDetail : Boolean(this.$route.query.show),
curTab: 'tab1', curTab: this.$route.query.type || 'tab1',
tabs: { tabs: {
tab1: '基本信息', tab1: '基本信息',
tab2: '已订阅产品', tab2: '已订阅产品',
@ -414,7 +415,7 @@ export default {
], ],
products: [], products: [],
productAll: [], productAll: [],
pageProduct: 1, pageProduct: this.$route.query.type === 'tab2' ? (+this.$route.query.page || 1) : 1,
pageSizeProduct: 10, pageSizeProduct: 10,
totalProduct: 0, totalProduct: 0,
@ -449,7 +450,7 @@ export default {
name: '待发货' name: '待发货'
} }
], ],
pageOrder: 1, pageOrder: this.$route.query.type === 'tab3' ? (+this.$route.query.page || 1) : 1,
pageSizeOrder: 10, pageSizeOrder: 10,
totalOrder: 0, totalOrder: 0,
orders: [], orders: [],
@ -457,7 +458,7 @@ export default {
bmsKeyword: '', bmsKeyword: '',
bms: [], bms: [],
pageBm: 1, pageBm: this.$route.query.type === 'tab5' ? (+this.$route.query.page || 1) : 1,
pageSizeBm: 10, pageSizeBm: 10,
totalBm: 0, totalBm: 0,
@ -487,9 +488,10 @@ export default {
},500) },500)
}, },
'form3.keyword': function(val) { 'form3.keyword': function(val) {
this.pageOrder = 1
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.filterOrder() this.handlePageOrder()
},500) },500)
}, },
bmsKeyword: function(val) { bmsKeyword: function(val) {
@ -562,6 +564,15 @@ export default {
e.endTime = connect ? list[list.length - 1].endTime : list[0].endTime e.endTime = connect ? list[list.length - 1].endTime : list[0].endTime
e.status = '未生效' e.status = '未生效'
e.orderEnable = list[0].isEnable e.orderEnable = list[0].isEnable
//
if (!connect && list[1]) {
const notActive = list.slice(1) //
e.other = ''
notActive.map(j => {
e.other += `<br>${j.startTime} ~ ${j.endTime}`
})
}
} else if (now > new Date(list[list.length - 1].endTime).getTime()) { } else if (now > new Date(list[list.length - 1].endTime).getTime()) {
e.status = '已过期' e.status = '已过期'
} else { } else {
@ -609,7 +620,7 @@ export default {
e.startAndEndTime = e.status === '已过期' ? '' : e.startTime + ' ~ ' + e.endTime e.startAndEndTime = e.status === '已过期' ? '' : e.startTime + ' ~ ' + e.endTime
e.productTypeName = productTypeList.find(n => n.id === e.productType).name e.productTypeName = productTypeList.find(n => n.id === e.productType).name
// 1 0 // 1 0
e.isEnable = (e.status === '已过期' || !e.orderEnable) ? e.isEnable = (e.status === '未生效' || e.status === '已过期' || !e.orderEnable) ?
0 : 0 :
1 1
} }
@ -621,7 +632,7 @@ export default {
}, },
// //
getRemain(startTime, endTime) { getRemain(startTime, endTime) {
return parseInt(((new Date(endTime).getTime() - new Date(startTime).getTime()) / 86400000)) + 1 return parseInt(((new Date(endTime).getTime() - new Date(startTime).getTime()) / 86400000))
}, },
// //
handlePage() { handlePage() {
@ -630,6 +641,7 @@ export default {
handleCurrentChangeProduct(val) { handleCurrentChangeProduct(val) {
this.pageProduct = val this.pageProduct = val
this.handlePage() this.handlePage()
this.$router.push(`addcustomer?id=${this.customerId}&type=tab2&page=${val}`)
}, },
// //
filterForm2() { filterForm2() {
@ -670,7 +682,7 @@ export default {
customerName: this.form.customerName, customerName: this.form.customerName,
orderStatus, orderStatus,
orderType, orderType,
pageNo: this.pageOrder, pageNo: 1,
pageSize: 10000, pageSize: 10000,
provinceId: '' provinceId: ''
}).then(({ orderPage }) => { }).then(({ orderPage }) => {
@ -688,7 +700,7 @@ export default {
filterOrder() { filterOrder() {
const { keyword } = this.form3 const { keyword } = this.form3
const { orders } = this const { orders } = this
this.orders = keyword ? orders.filter(e => e.orderNumber.includes(keyword) || e.orderContent.includes(keyword)) : this.orderAll this.orders = keyword ? this.orderAll.filter(e => e.orderNumber.includes(keyword) || e.orderContent.includes(keyword)) : orders
}, },
// //
handlePageOrder() { handlePageOrder() {
@ -698,6 +710,7 @@ export default {
handleCurrentChangeOrder(val) { handleCurrentChangeOrder(val) {
this.pageOrder = val this.pageOrder = val
this.handlePageOrder() this.handlePageOrder()
this.$router.push(`addcustomer?id=${this.customerId}&type=tab3&page=${val}`)
}, },
// //
toOrderDetail(row) { toOrderDetail(row) {
@ -719,6 +732,7 @@ export default {
handleCurrentChangeBm(val) { handleCurrentChangeBm(val) {
this.pageBm = val this.pageBm = val
this.getBm() this.getBm()
this.$router.push(`addcustomer?id=${this.customerId}&type=tab5&page=${val}`)
}, },
// //
toOrder(row) { toOrder(row) {
@ -727,6 +741,11 @@ export default {
tabChange(index) { tabChange(index) {
this.curTab = index this.curTab = index
this.$router.push(`addcustomer?id=${this.customerId}&type=${index}`)
this.pageProduct = 1
this.pageOrder = 1
this.pageBm = 1
index === 'tab3' && this.handlePageOrder()
}, },
// //
getCityData(){ getCityData(){
@ -938,7 +957,7 @@ export default {
}, },
goback(){ goback(){
this.$router.back() this.$router.push(`customer?page=${this.$store.state.customerPage}`)
} }
} }
}; };
@ -950,6 +969,7 @@ export default {
} }
.card { .card {
min-height: calc(100vh - 260px); min-height: calc(100vh - 260px);
margin-bottom: 20px;
} }
.addhr_tag{ .addhr_tag{
background-color: #666; background-color: #666;
@ -976,4 +996,10 @@ export default {
line-clamp: 2; line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.info {
margin-top: 20px;
.el-select {
width: 100%;
}
}
</style> </style>

@ -5,7 +5,7 @@
<div class="per_title" v-preventReClick @click="back"> <div class="per_title" v-preventReClick @click="back">
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span> <span class="per_back">返回</span>
<span class="per_school">{{ $route.query.userName }}</span> <span class="per_school">{{ $route.query.userName }}的订单</span>
</div> </div>
</div> </div>
</el-card> </el-card>

@ -236,6 +236,7 @@ export default {
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val this.page = val
this.$store.commit('SET_C_PAGE', val)
this.$router.push(`customer?page=${val}`) this.$router.push(`customer?page=${val}`)
this.getData() this.getData()
}, },

@ -76,13 +76,13 @@
<div class="settle-item"> <div class="settle-item">
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
<span class="label">商务经理占比</span> <span class="label">商务经理占比</span>
<el-input v-model.trim="businessProportion"> <el-input v-model.trim="businessProportion" @change="calcProp">
<template slot="append">%</template> <template slot="append">%</template>
</el-input> </el-input>
</div> </div>
<div> <div>
<span class="label">产品厂商占比</span> <span class="label">产品厂商占比</span>
<el-input v-model.trim="manufacturerProportion"> <el-input v-model.trim="manufacturerProportion" @change="calcProp">
<template slot="append">%</template> <template slot="append">%</template>
</el-input> </el-input>
</div> </div>
@ -491,6 +491,16 @@ export default {
this.page = val this.page = val
this.getData() this.getData()
}, },
//
calcProp() {
const p1 = this.businessProportion
const p2 = this.manufacturerProportion
if (p1 && p2) {
if(isNaN(p1)) return this.$message.warning('商务经理占比请输入数字')
if(isNaN(p2)) return this.$message.warning('产品厂商占比请输入数字')
if(+p1 + +p2 !== 100) return this.$message.warning('比例分成总和须为100%,请重新修改')
}
},
// //
closeProduct(){ closeProduct(){
this.productName = '' this.productName = ''

@ -174,12 +174,11 @@
<el-table-column label="市场价" align="center" min-width="170"> <el-table-column label="市场价" align="center" min-width="170">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input class="normal" disabled v-model="scope.row.marketValue" placeholder="" <el-input class="normal" disabled v-model="scope.row.marketValue" type="text"></el-input>
type="text"></el-input>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="折扣率 " align="center" min-width="100"> <el-table-column label="折扣率 " align="center" min-width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input class="normal" disabled v-model="scope.row.discountRate" placeholder="" <el-input class="normal" disabled v-model="scope.row.discountRate" placeholder=""
type="text" size="small" style="width: 100%"></el-input> type="text" size="small" style="width: 100%"></el-input>
@ -193,7 +192,7 @@
@input="scope.row.finalPrice = scope.row.finalPrice.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" @input="scope.row.finalPrice = scope.row.finalPrice.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
@change="[allAmount($event,scope.row),calculateDiscountCourse($event,scope.row)]" @change="[allAmount($event,scope.row),calculateDiscountCourse($event,scope.row)]"
v-model="scope.row.finalPrice" v-model="scope.row.finalPrice"
type="text"></el-input> type="text"></el-input>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -204,7 +203,7 @@
:disabled="viewDisabled" :disabled="viewDisabled"
@input="scope.row.settlementPrice = scope.row.settlementPrice.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" @input="scope.row.settlementPrice = scope.row.settlementPrice.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
v-model="scope.row.settlementPrice" v-model="scope.row.settlementPrice"
type="text"></el-input> type="text"></el-input>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -222,18 +221,25 @@
@click="delCourseForm(scope.$index)" @click="delCourseForm(scope.$index)"
style="margin-right:10px;" style="margin-right:10px;"
>删除</el-button> >删除</el-button>
<!-- 1: 未生效2生效中3已过期 -->
<!--
1查看时不可操作
2发货和启用不要同时出现生效前只会显示发货不发货按钮生效后只显示禁启用按钮
3处理中的订单显示发货不显示禁用
-->
<el-switch <el-switch
v-if="scope.row.status === 1 || dispose || isAdd"
style="margin-right:10px;" style="margin-right:10px;"
v-if='dispose || (!editDisabled&&!viewDisabled)'
v-model="scope.row.ship" v-model="scope.row.ship"
:active-value="1" :active-value="1"
:inactive-value="0" :inactive-value="0"
:active-text="scope.row.ship ? '已发货' : '未发货'" :active-text="scope.row.ship ? '已发货' : '未发货'"
:disabled="viewDisabled"
@change="handleDeliver($event,scope.row)"> @change="handleDeliver($event,scope.row)">
</el-switch> </el-switch>
<el-switch <el-switch
v-show="scope.row.ship && editDisabled && !dispose" v-if="!dispose && (scope.row.status === 2 || scope.row.status === 3)"
:disabled="viewDisabled" :disabled="viewDisabled || scope.row.status === 3"
v-model="scope.row.isEnable" v-model="scope.row.isEnable"
:active-value="1" :active-value="1"
:inactive-value="0" :inactive-value="0"
@ -362,26 +368,26 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- 金额自动计算计算方式账号数*成交价且可以手动修改保留两位小数 --> <!-- 金额自动计算计算方式账号数*成交价且可以手动修改保留两位小数 -->
<el-table-column label="成交价" align="center" min-width="180"> <el-table-column label="成交价" align="center" min-width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input :class="['normal', scope.row.finalPrice === '' && whetherSubmit?'red':'']" <el-input style="width: 80%" :class="['normal', scope.row.finalPrice === '' && whetherSubmit?'red':'']"
:disabled="viewDisabled||editDisabled" :disabled="viewDisabled||editDisabled"
@blur="[allAmount($event,scope.row),dealFinalValue($event,scope.row)]" @blur="[allAmount($event,scope.row),dealFinalValue($event,scope.row)]"
@input="scope.row.finalPrice = scope.row.finalPrice.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" @input="scope.row.finalPrice = scope.row.finalPrice.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
v-model="scope.row.finalPrice" v-model="scope.row.finalPrice"
type="text"></el-input> type="text"></el-input>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="结算价" align="center" min-width="130"> <el-table-column label="结算价" align="center" min-width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input :class="['normal', scope.row.settlementPrice === '' && whetherSubmit?'red':'']" <el-input style="width: 80%" :class="['normal', scope.row.settlementPrice === '' && whetherSubmit?'red':'']"
:disabled="viewDisabled" :disabled="viewDisabled"
@input="scope.row.settlementPrice = scope.row.settlementPrice.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" @input="scope.row.settlementPrice = scope.row.settlementPrice.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
v-model="scope.row.settlementPrice" v-model="scope.row.settlementPrice"
type="text"></el-input> type="text"></el-input>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -395,8 +401,8 @@
style="margin-right:10px;" style="margin-right:10px;"
>删除</el-button> >删除</el-button>
<el-switch <el-switch
v-if="scope.row.status === 1 || dispose || isAdd"
style="margin-right:10px;" style="margin-right:10px;"
v-if='dispose || (!editDisabled&&!viewDisabled)'
v-model="scope.row.ship" v-model="scope.row.ship"
:active-value="1" :active-value="1"
:inactive-value="0" :inactive-value="0"
@ -404,7 +410,7 @@
@change="handleDeliver($event,scope.row)"> @change="handleDeliver($event,scope.row)">
</el-switch> </el-switch>
<el-switch <el-switch
v-show="scope.row.ship && editDisabled && !dispose" v-if="!dispose && (scope.row.status === 2 || scope.row.status === 3)"
:disabled="viewDisabled" :disabled="viewDisabled"
v-model="scope.row.isEnable" v-model="scope.row.isEnable"
:active-value="1" :active-value="1"
@ -883,6 +889,7 @@ export default {
const promises = [] const promises = []
const { customerId } = form const { customerId } = form
const list = [] const list = []
//
if (orderOther.find(e => e.authority)) { if (orderOther.find(e => e.authority)) {
promises.push(new Promise((resolve, reject) => { promises.push(new Promise((resolve, reject) => {
this.$post(this.api.renew, { this.$post(this.api.renew, {
@ -913,14 +920,13 @@ export default {
}); });
}, },
setStartDate(renewList, orderOther) { setStartDate(renewList, orderOther) {
console.log(555)
let list = orderOther.map(e => { let list = orderOther.map(e => {
const now = Date.now()
const item = renewList.find(n => n.dataOrCourseId === e.dataOrCourseId && n.authority === e.authority) // renew const item = renewList.find(n => n.dataOrCourseId === e.dataOrCourseId && n.authority === e.authority) // renew
if (item) { if (item) {
// //
if (this.renewDisabled) { if (this.renewDisabled) {
let end = Date.parse(item.endTime); let end = Date.parse(item.endTime);
let now = +new Date();
if (now < end) { if (now < end) {
let time = new Date(item.endTime.split(" ")[0]) let time = new Date(item.endTime.split(" ")[0])
time = new Date(time.setDate(time.getDate() + 1)) time = new Date(time.setDate(time.getDate() + 1))
@ -936,6 +942,15 @@ export default {
e.endTime = item.endTime.split(" ")[0]; e.endTime = item.endTime.split(" ")[0];
} }
} }
const startTime = new Date(e.startTime)
const endTime = new Date(e.endTime)
// 1: 23
e.status = now < startTime ?
1 :
now > startTime && now < endTime ?
2 :
3
if (e.status === 3) e.isEnable = 0 //
return e; return e;
});// });//
@ -1126,7 +1141,7 @@ export default {
ship: 0,// 01 ship: 0,// 01
authority: 1, // 01 authority: 1, // 01
options: 1, options: 1,
settlementPrice: '', // settlementPrice: orderType === 2 ? 0 : '', //
settlementMethod: e.settlementMethod, // 01 settlementMethod: e.settlementMethod, // 01
settlementPriceUnit: e.settlementPrice, // settlementPriceUnit: e.settlementPrice, //
businessProportion: e.businessProportion, // businessProportion: e.businessProportion, //
@ -1234,10 +1249,10 @@ export default {
startTime: new Date(),// startTime: new Date(),//
endTime: "", // endTime: "", //
remainingPeriod: "",// remainingPeriod: "",//
marketValue: e.market, // marketValue: '', //
marketValue: e.market, // marketPrice: e.market, //
finalPrice: '',// finalPrice: orderType === 2 ? 0 : '',//
finalValue: '', // finalValue: orderType === 2 ? 0 : '', //
discountRate: "",// discountRate: "",//
accountNum: "",// accountNum: "",//
totalAmount: orderType === 2 ? 0 : '',// totalAmount: orderType === 2 ? 0 : '',//
@ -1245,7 +1260,7 @@ export default {
ship: 0,// 01 ship: 0,// 01
authority: 0,// authority: 0,//
options:1, options:1,
settlementPrice: '', // settlementPrice: orderType === 2 ? 0 : '', //
settlementMethod: e.settlementMethod, // 01 settlementMethod: e.settlementMethod, // 01
settlementPriceUnit: e.settlementPrice, // settlementPriceUnit: e.settlementPrice, //
businessProportion: e.businessProportion, // businessProportion: e.businessProportion, //
@ -1357,18 +1372,16 @@ export default {
options === 1 ? options === 1 ?
12 : 12 :
1)).toFixed(2) 1)).toFixed(2)
this.calculateDiscount(val, row)
} }
}, },
// **// // **//
dealComputers(e, row) { dealComputers(e, row) {
const { finalValue, accountNum, periodOfUse, options } = row const { finalValue, accountNum, periodOfUse, options } = row
if (finalValue && accountNum) { if (finalValue && accountNum) {
row.finalPrice = ((!options ? row.finalPrice = Math.round(finalValue * periodOfUse * accountNum)
finalValue / 365 * periodOfUse :
options === 1 ?
finalValue / 12 * periodOfUse :
finalValue * periodOfUse) * accountNum).toFixed(2)
} }
this.dealSettlePrice(row)
this.allAmount(e, row) this.allAmount(e, row)
}, },
// //
@ -1376,7 +1389,7 @@ export default {
const unit = row.options // 使 const unit = row.options // 使
const useUnit = row.periodOfUse // 使 const useUnit = row.periodOfUse // 使
let sPrice = '' let sPrice = ''
if (row.settlementMethod === '0') { if (row.settlementMethod == 0) {
// **/**(1) // **/**(1)
const priceUnit = row.settlementPriceUnit const priceUnit = row.settlementPriceUnit
sPrice = ((!unit ? sPrice = ((!unit ?
@ -1388,7 +1401,7 @@ export default {
row.accountNum)).toFixed(2) row.accountNum)).toFixed(2)
} else { } else {
// * // *
sPrice = row.finalPrice * row.businessProportion / 100 sPrice = (row.finalPrice * row.businessProportion / 100).toFixed(2)
} }
row.settlementPrice = this.handleNaN(sPrice) row.settlementPrice = this.handleNaN(sPrice)
}, },
@ -1417,17 +1430,15 @@ export default {
row.remainingPeriod = endYears row.remainingPeriod = endYears
const unit = row.options // 使 const unit = row.options // 使
const useUnit = row.periodOfUse // 使 const useUnit = row.periodOfUse // 使
// let price = row.marketPrice //
if (row.authority) { // //365,/12)
const price = row.marketPrice // row.marketValue = ((!unit ?
// //365,/12) price / 365 * useUnit :
row.marketValue = ((!unit ? unit === 1 ?
price / 365 * useUnit : price / 12 * useUnit :
unit === 1 ? price * useUnit)).toFixed(2)
price / 12 * useUnit :
price * useUnit)).toFixed(2) this.dealComputers(e, row)
}
this.dealSettlePrice(row)
// +1 // +1
if (isDate) { if (isDate) {
const cId = row.dataOrCourseId const cId = row.dataOrCourseId

@ -109,7 +109,7 @@ export default {
methods: { methods: {
getData() { getData() {
// platformId 4setting.js // platformId 4setting.js
this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=${this.platformId}`).then(res => { this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=${this.platformId}&port=0`).then(res => {
this.listData = res.rolePage.records; this.listData = res.rolePage.records;
this.total = res.rolePage.total; this.total = res.rolePage.total;
}).catch(res => {}); }).catch(res => {});

@ -4,7 +4,7 @@
<div class="side"> <div class="side">
<div> <div>
<div class="flex-between"> <div class="flex-between">
<h6 class="p-title" style="margin-bottom: 0">或然城市合伙人</h6> <h6 class="p-title" style="margin-bottom: 0;cursor: pointer" @click="getAll">或然城市合伙人</h6>
<el-button type="text" @click="addOrg">添加分类</el-button> <el-button type="text" @click="addOrg">添加分类</el-button>
</div> </div>
@ -232,13 +232,14 @@ export default {
qrcode: '', qrcode: '',
expireTime: '', expireTime: '',
curTeamId: '', curTeamId: '',
submiting: false // submiting: false, //
setKey: ''
}; };
}, },
watch: { watch: {
keyWord: function(val) { keyWord: function(val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(this.getList, 500); this.searchTimer = setTimeout(this.initData, 500);
} }
}, },
mounted() { mounted() {
@ -250,10 +251,11 @@ export default {
const res = await this.$post(this.api.listParner) const res = await this.$post(this.api.listParner)
const list = res.treeList const list = res.treeList
// children // children
const handleLeaf = list => { const handleLeaf = (list, ids) => {
list.map(e => { list.map(e => {
e.ids = ids ? [...ids, e.id] : [e.id]
if (e.children.length) { if (e.children.length) {
handleLeaf(e.children) handleLeaf(e.children, e.ids)
} else { } else {
delete e.children delete e.children
} }
@ -261,6 +263,10 @@ export default {
} }
handleLeaf(list) handleLeaf(list)
this.orgList = list this.orgList = list
//
this.setKey && this.$nextTick(() => {
this.$refs.orgTree.setCurrentKey(this.setKey)
})
this.getList() this.getList()
}, },
// //
@ -284,7 +290,7 @@ export default {
partnerClassificationName: data.partnerClassificationName partnerClassificationName: data.partnerClassificationName
} }
this.orgVisible = true this.orgVisible = true
const ids = data.ids const { ids } = data
ids.splice(ids.length - 1, 1) ids.splice(ids.length - 1, 1)
this.cascaderValue = ids this.cascaderValue = ids
}, },
@ -332,6 +338,7 @@ export default {
// //
this.$post(this.api.updateParner, form).then(res => { this.$post(this.api.updateParner, form).then(res => {
util.successMsg("编辑成功!") util.successMsg("编辑成功!")
this.setKey = form.id
this.closeOrg() this.closeOrg()
}).catch(err => {}) }).catch(err => {})
} }
@ -342,7 +349,7 @@ export default {
getTeamId(list) { getTeamId(list) {
for (const i in list) { for (const i in list) {
const e = list[i] const e = list[i]
if (e.isTeam) { if (e.isTeam && !this.curTeamId) {
this.curTeamId = e.id this.curTeamId = e.id
break break
} else { } else {
@ -352,16 +359,15 @@ export default {
}, },
// //
handleNodeClick(data) { handleNodeClick(data) {
this.curTeamId = data.id this.curTeamId = ''
if (data.isTeam) { if (data.isTeam) {
this.curTeamId = data.id this.curTeamId = data.id
} else { } else {
this.getTeamId(data.children) this.getTeamId(data.children)
} }
if (this.curTeamId) { if (!this.curTeamId) this.curTeamId = data.id
this.$refs.orgTree.setCurrentKey(this.curTeamId) this.$refs.orgTree.setCurrentKey(this.curTeamId)
this.getList() this.initData()
}
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
}, },
// //
@ -370,6 +376,11 @@ export default {
this.cascaderValue = [] this.cascaderValue = []
this.getOrg() this.getOrg()
}, },
//
getAll() {
this.curTeamId = ''
this.getList()
},
// //
getList() { getList() {
this.$post(this.api.partnerAccountList, { this.$post(this.api.partnerAccountList, {
@ -454,7 +465,7 @@ export default {
border-right: 1px solid rgba(0, 0, 0, 0.06); border-right: 1px solid rgba(0, 0, 0, 0.06);
} }
.right { .right {
width: calc(100% - 374px); flex: 1;
padding: 24px 0; padding: 24px 0;
} }
} }

@ -107,7 +107,7 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=${Setting.platformId}`).then(res => { this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=${Setting.platformId}&port=0`).then(res => {
this.listData = res.rolePage.records; this.listData = res.rolePage.records;
this.total = res.rolePage.total; this.total = res.rolePage.total;
}).catch(res => {}); }).catch(res => {});

@ -555,7 +555,25 @@ export default {
this.$get(`${this.api.staffDetail}?accountId=${row.accountId}`).then(res => { this.$get(`${this.api.staffDetail}?accountId=${row.accountId}`).then(res => {
const { data } = res const { data } = res
const { staffArchitectureId, roleId } = data const { staffArchitectureId, roleId } = data
if (roleId) data.roleList = roleId.split(',').map(e => Number(e)) if (roleId) {
const roleList = roleId.split(',').map(e => Number(e))
const list = this.roleList
if (roleList.length) {
let has = false //
for (const i in roleList) {
if (list.find(n => n.id === roleList[i])) {
has = true
break
}
}
if (!has) {
util.warningMsg('角色被删请重新选择')
data.roleList = []
} else {
data.roleList = roleList
}
}
}
if (staffArchitectureId) { if (staffArchitectureId) {
handleArchId(this.orgList, staffArchitectureId.split(',').map(e => Number(e))) handleArchId(this.orgList, staffArchitectureId.split(',').map(e => Number(e)))
data.staffArchitectureId = archId data.staffArchitectureId = archId
@ -563,12 +581,11 @@ export default {
this.form = data this.form = data
this.originAccount = data.account this.originAccount = data.account
this.originWorkNumber = data.workNumber this.originWorkNumber = data.workNumber
console.log(333, this.orgList)
}).catch(res => {}) }).catch(res => {})
}, },
// //
getRole() { getRole() {
this.$get(`${this.api.roleList}?page=1&size=1000&name=&platformId=${Setting.platformId}`).then(res => { this.$get(`${this.api.roleList}?page=1&size=1000&name=&platformId=${Setting.platformId}&port=0`).then(res => {
this.roleList = res.rolePage.records this.roleList = res.rolePage.records
}).catch(res => {}) }).catch(res => {})
}, },

Loading…
Cancel
Save