合伙人等

dev_2022-06-14
yujialong 2 years ago
parent 4bf36a5912
commit 6b46057408
  1. 3
      src/utils/api.js
  2. 14
      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"; import Setting from "@/setting";
const host = Setting.apiBaseURL const host = Setting.apiBaseURL
const host1 = 'http://192.168.31.151:9000/'
const uploadURL = Setting.uploadURL const uploadURL = Setting.uploadURL
export default { export default {
@ -271,4 +272,6 @@ export default {
generateInvitationCode: `nakadai/partnerAccount/generateInvitationCode`, generateInvitationCode: `nakadai/partnerAccount/generateInvitationCode`,
generationQrCode: `nakadai/partnerAccount/generationQrCode`, generationQrCode: `nakadai/partnerAccount/generationQrCode`,
queryUserInfoByPhone: `nakadai/partner-team/queryUserInfoByPhone`, queryUserInfoByPhone: `nakadai/partner-team/queryUserInfoByPhone`,
getAllTeam: `nakadai/partnerClassification/getAllTeam`,
partnerRemoval: `nakadai/partnerAccount/partnerRemoval`,
}; };

@ -77,7 +77,7 @@
</el-col> </el-col>
</el-form> </el-form>
<div v-if="!isDetail" style="margin-top: 20px;text-align: center"> <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> <el-button v-preventReClick @click="$router.back()">取消</el-button>
</div> </div>
</div> </div>
@ -240,9 +240,9 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="phone" label="手机号" width="150" align="center"></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"> <template slot-scope="scope">
{{ scope.row.partnerClassificationName }}{{ scope.row.teamDel ? '(被解散)' : '' }} <div v-html="scope.row.bmName"></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="quantityOfOrder" label="订单数量" width="100" align="center"></el-table-column> <el-table-column prop="quantityOfOrder" label="订单数量" width="100" align="center"></el-table-column>
@ -733,6 +733,12 @@ export default {
pageNum: this.pageBm, pageNum: this.pageBm,
pageSize: this.pageSizeBm pageSize: this.pageSizeBm
}).then(({ data }) => { }).then(({ data }) => {
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.bms = data.records
this.totalBm = data.total this.totalBm = data.total
}).catch(res => {}) }).catch(res => {})
@ -744,7 +750,7 @@ export default {
}, },
// //
toOrder(row) { 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 // tab

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

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

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

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

Loading…
Cancel
Save