合伙人等

dev_2022-06-14
yujialong 2 years ago
parent 4bf36a5912
commit 6b46057408
  1. 3
      src/utils/api.js
  2. 18
      src/views/customer/AddCustomer.vue
  3. 2
      src/views/customer/Order.vue
  4. 2
      src/views/join/index.vue
  5. 50
      src/views/order/AddOrder.vue
  6. 29
      src/views/parner/staff.vue

@ -1,6 +1,7 @@
import Setting from "@/setting";
const host = Setting.apiBaseURL
const host1 = 'http://192.168.31.151:9000/'
const uploadURL = Setting.uploadURL
export default {
@ -271,4 +272,6 @@ export default {
generateInvitationCode: `nakadai/partnerAccount/generateInvitationCode`,
generationQrCode: `nakadai/partnerAccount/generationQrCode`,
queryUserInfoByPhone: `nakadai/partner-team/queryUserInfoByPhone`,
getAllTeam: `nakadai/partnerClassification/getAllTeam`,
partnerRemoval: `nakadai/partnerAccount/partnerRemoval`,
};

@ -77,7 +77,7 @@
</el-col>
</el-form>
<div v-if="!isDetail" style="margin-top: 20px;text-align: center">
<el-button type="primary" v-preventReClick @click="saveAdd">确定</el-button>
<el-button type="primary" v-preventReClick @click="saveAdd(0)">确定</el-button>
<el-button v-preventReClick @click="$router.back()">取消</el-button>
</div>
</div>
@ -240,9 +240,9 @@
</template>
</el-table-column>
<el-table-column prop="phone" label="手机号" width="150" align="center"></el-table-column>
<el-table-column prop="partnerClassificationName" label="所属团队" align="center">
<el-table-column prop="bmName" label="所属团队" align="center">
<template slot-scope="scope">
{{ scope.row.partnerClassificationName }}{{ scope.row.teamDel ? '(被解散)' : '' }}
<div v-html="scope.row.bmName"></div>
</template>
</el-table-column>
<el-table-column prop="quantityOfOrder" label="订单数量" width="100" align="center"></el-table-column>
@ -733,8 +733,14 @@ export default {
pageNum: this.pageBm,
pageSize: this.pageSizeBm
}).then(({ data }) => {
this.bms = data.records
this.totalBm = data.total
data.records.map(e => {
let name = ''
// teamDel10
e.teamInformationRespList.map(n => name += `${n.partnerClassificationName}${n.teamDel ? '(被解散)' : ''}<br>`)
e.bmName = name
})
this.bms = data.records
this.totalBm = data.total
}).catch(res => {})
},
handleCurrentChangeBm(val) {
@ -744,7 +750,7 @@ export default {
},
//
toOrder(row) {
this.$router.push(`/bmOrder?businessManagerId=${row.businessManagerId}&customerId=${this.customerId}&customerName=${this.form.customerName}&userName=${row.userName}`)
this.$router.push(`/bmOrder?businessManagerId=${row.businessManagerId}&customerId=${this.customerId}&customerName=${this.form.customerName}&userName=${row.userName}&teamId=${row.teamId}`)
},
// tab

@ -60,6 +60,7 @@ export default {
data() {
return {
businessManagerId: this.$route.query.businessManagerId,
teamId: this.$route.query.teamId,
customerId: this.$route.query.customerId,
customerName: this.$route.query.customerName,
keyword: "",
@ -85,6 +86,7 @@ export default {
getData() {
let data = {
businessManagerId: this.businessManagerId,
teamId: this.teamId,
keywords: this.keyword,
customerId: this.customerId,
pageNum: this.page,

@ -126,7 +126,7 @@ export default {
//
phoneChange() {
//
if (!this.form.isTeam) {
if (this.form.isTeam == 0) {
const { form } = this
this.$get(this.api.queryUserInfoByPhone, {
phone: form.phone

@ -53,9 +53,9 @@
<el-form-item label="邮箱">
<el-input disabled v-model="form.email" placeholder="请输入邮箱地址"></el-input>
</el-form-item>
<el-form-item label="商务经理">
<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-form-item label="团队">
<el-select :disabled="viewDisabled" v-model="form.teamId" filterable placeholder="请选择团队" @change="teamChange">
<el-option v-for="(item, i) in teams" :key="i" :label="item.partnerClassificationName" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -96,6 +96,11 @@
type="number" v-model="form.orderAmount"
placeholder="请输入订单金额"></el-input>
</el-form-item>
<el-form-item label="商务经理">
<el-select :disabled="viewDisabled || !form.teamId" 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>
</el-col>
</el-form>
</div>
@ -664,7 +669,10 @@ export default {
orderAmount: 0,
// orderId: this.$store.state.orderId,
customerName: "",//
businessManagerId: ''
teamId: '',
businessManagerId: '',
profit: 0, //
purchaseCost: 0, //
},
coursePermissions: [],//
dataPlatformPermissions: [],//
@ -729,6 +737,7 @@ export default {
provinceList: this.$store.state.provinceList,
cityList: [],
schoolList: [],
teams: [],
bmList: [],
yearList: [
{ name: "1个月", value: 30 },
@ -802,7 +811,7 @@ export default {
}
},
async created() {
this.getBm()
this.getTeam()
this.token = sessionStorage.getItem("token");
//
if (this.$route.query.val == 'isAdd') {
@ -880,10 +889,14 @@ export default {
orderAmount: form.orderType === 2 ? 0 : form.orderAmount, // 0
orderId: form.orderId,
options: form.options,
teamId: form.teamId,
profit: form.profit,
purchaseCost: form.purchaseCost,
businessManagerId: form.businessManagerId ? +form.businessManagerId : ''
};
this.$nextTick(() => {
form.provinceId && this.getCityData()
form.teamId && this.getBm()
});
const { orderOther } = res.orderDetails
const promises = []
@ -959,6 +972,8 @@ export default {
},
//
submitOrder() {
let purchase = 0 //
let profit = 0 //
if (!this.coursePermissions.length && !this.dataPlatformPermissions.length) {
return this.$message.error("请选择课程权限或数据权限后再确认订单");
} else {
@ -969,6 +984,9 @@ export default {
if (!e.periodOfUse || e.finalPrice === '') {
return false;
} else {
const curPurchase = +e.settlementPrice + (e.settlementPrice / 10)
purchase += curPurchase
profit += +e.finalPrice - curPurchase
return true;
}
});
@ -987,6 +1005,9 @@ export default {
if (!e.periodOfUse || e.finalPrice === '' || !e.accountNum || e.settlementPrice === '') {
return false;
} else {
const curPurchase = +e.settlementPrice + (e.settlementPrice / 10)
purchase += curPurchase
profit += +e.finalPrice - curPurchase
return true;
}
});
@ -1016,11 +1037,15 @@ export default {
const time = new Date(e.startTime)
e.startTime = `${time.getFullYear()}-${time.getMonth() + 1}-${time.getDate()}`
})
const { form } = this
form.purchaseCost = Math.round(purchase)
form.profit = Math.round(profit)
let param = {
contractInformation: this.contract,//
order: this.form,//
order: form,//
orderOther: tempArr//
};
debugger
this.loading = true;
if (this.editDisabled) {
this.$post(this.api.orderUpdate, param).then(res => {
@ -1517,10 +1542,21 @@ export default {
}).catch(res => {
});
},
//
getTeam() {
this.$get(this.api.getAllTeam).then(({ team }) => {
this.teams = team
}).catch(err => {})
},
//
teamChange() {
this.form.businessManagerId = ''
this.getBm()
},
//
getBm() {
this.$post(this.api.partnerAccountList, {
partnerClassificationId: '',
partnerClassificationId: this.form.teamId,
keyWord: '',
pageNum: 1,
pageSize: 100000

@ -2,9 +2,20 @@
<div class="wrap">
<!-- 左边的组织 -->
<div class="side">
<div class="m-b-20">
<h6 class="p-title">或然城市合伙人</h6>
<el-radio-group v-model="type" @change="initData">
<div class="m-b-20">
<el-radio :label="1">团队合伙人</el-radio>
</div>
<div>
<el-radio :label="2">未加入团队的合伙人</el-radio>
</div>
</el-radio-group>
</div>
<div>
<div class="flex-between">
<h6 class="p-title" style="margin-bottom: 0;cursor: pointer" @click="getAll">或然城市合伙人</h6>
<div style="text-align: right">
<!-- <h6 class="p-title" style="margin-bottom: 0;cursor: pointer" @click="getAll">或然城市合伙人</h6> -->
<el-button type="text" @click="addOrg">添加分类</el-button>
</div>
@ -103,8 +114,8 @@
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button type="text" v-auth="'/system:后台账号:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button>
<el-button type="text" v-auth="'/system:后台账号:删除'" @click="delStaff(scope.row)">删除</el-button>
<el-button type="text" v-auth="'/system:后台账号:删除'" @click="remove(scope.row)">移除</el-button>
<!-- <el-button v-if="scope.row.isTeam == 1" type="text" v-auth="'/system:后台账号:删除'" @click="del(scope.row)">删除</el-button> -->
<el-button v-if="scope.row.isTeam == 0" type="text" v-auth="'/system:后台账号:删除'" @click="remove(scope.row)">移除</el-button>
</template>
</el-table-column>
</el-table>
@ -179,6 +190,7 @@ export default {
return {
accountId: this.$store.state.accountId,
userName: this.$store.state.userName,
type: 1,
orgList: [],
orgListDia: [],
orgVisible: false, //
@ -379,6 +391,7 @@ export default {
},
//
handleNodeClick(data) {
this.type = 1
this.curTeamId = ''
if (data.isTeam) {
this.curTeamId = data.id
@ -404,6 +417,7 @@ export default {
//
getList() {
this.$post(this.api.partnerAccountList, {
type: this.type,
partnerClassificationId: this.curTeamId,
keyWord: this.keyWord,
pageNum: this.page,
@ -431,7 +445,7 @@ export default {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(`${this.api.delPartnerAccount}?accountIds=${row.accountId}`).then(res => {
this.$post(`${this.api.delPartnerAccount}?teamId=${row.partnerClassificationId}`).then(res => {
util.successMsg("删除成功")
this.getList()
}).catch(res => {})
@ -442,7 +456,10 @@ export default {
this.$confirm("确定要移除吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(`${this.api.delPartnerAccount}?accountIds=${row.accountId}`).then(res => {
this.$get(this.api.partnerRemoval, {
partnerId: row.partnerId,
teamId: row.partnerClassificationId,
}).then(res => {
util.successMsg("移除成功")
this.getList()
}).catch(res => {})

Loading…
Cancel
Save