|
|
@ -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 |
|
|
|