|
|
|
@ -864,14 +864,15 @@ |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="flex-c-c"> |
|
|
|
|
<el-button |
|
|
|
|
style="margin-right: 10px;" |
|
|
|
|
type="text" |
|
|
|
|
@click="showShip(scope.row)" |
|
|
|
|
>编辑发货内容</el-button> |
|
|
|
|
>{{ viewDisabled ? '' : '编辑' }}发货内容</el-button> |
|
|
|
|
<el-button |
|
|
|
|
v-if="!editDisabled&&!viewDisabled" |
|
|
|
|
type="text" |
|
|
|
|
@click="delPracticalCourses(scope.$index)" |
|
|
|
|
style="margin-right:10px;" |
|
|
|
|
style="margin: 0 10px;" |
|
|
|
|
>删除</el-button> |
|
|
|
|
<!-- 1: 未生效,2:生效中,3:已过期 --> |
|
|
|
|
<!-- |
|
|
|
@ -1017,9 +1018,14 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center" width="180"> |
|
|
|
|
<el-table-column label="操作" align="center" width="250"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="flex-c-c"> |
|
|
|
|
<el-button |
|
|
|
|
style="margin-right: 10px;" |
|
|
|
|
type="text" |
|
|
|
|
@click="showShip(scope.row)" |
|
|
|
|
>{{ viewDisabled ? '' : '编辑' }}发货内容</el-button> |
|
|
|
|
<el-button |
|
|
|
|
v-if="!editDisabled&&!viewDisabled" |
|
|
|
|
type="text" |
|
|
|
@ -1130,100 +1136,7 @@ |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<!-- 添加课程权限弹框--> |
|
|
|
|
<el-dialog :visible.sync="courseVisible" width="50%" center :close-on-click-modal="false" @close="closeJCourse"> |
|
|
|
|
<div class="flex-between mgb20"> |
|
|
|
|
<div class="flex-center"> |
|
|
|
|
<p class="addhr_tag"></p> |
|
|
|
|
<span>课程列表</span> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-input placeholder="请输入课程名称" prefix-icon="el-icon-search" v-model.trim="curriculumName" clearable></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<el-table v-loading="dataLoading" :data="courseList" stripe header-align="center" |
|
|
|
|
@selection-change="handleSelectionChange" row-key="cid"> |
|
|
|
|
<el-table-column type="selection" :selectable="courseSelectable" width="55" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="curriculumName" label="课程名称" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="课程类型" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ curriculumTypeKeys[scope.row.curriculumType] }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="配置的实训应用" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span class="ellipsis">{{ scope.row.sysName }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="expectedCourse" label="预计课时" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
<div class="pagination"> |
|
|
|
|
<el-pagination background layout="total, prev, pager, next" :total="courseTotals" |
|
|
|
|
@current-change="handleCurrentChange" :current-page="coursePage"> |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button @click="closeJCourse">取 消</el-button> |
|
|
|
|
<el-button type="primary" v-preventReClick @click="addCourse">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 添加数据平台权限弹框 --> |
|
|
|
|
<el-dialog :visible.sync="showPlatform" width="50%" center> |
|
|
|
|
<div class="flex-between mgb20"> |
|
|
|
|
<div class="flex-center"> |
|
|
|
|
<p class="addhr_tag"></p> |
|
|
|
|
<span>数据产品列表</span> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-input placeholder="请输入产品名称" prefix-icon="el-icon-search" v-model="productName" clearable></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<el-table v-loading="dataLoading" :data="platformList" stripe header-align="center" |
|
|
|
|
@selection-change="dataPlatformSelection" row-key="id"> |
|
|
|
|
<el-table-column type="selection" :selectable="dataSelectable" width="55" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="productName" label="产品名称" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="tableNum" label="数据量(表)" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="userName" label="创建人" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="orderNum" label="订单数量" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="market" label="市场价" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> |
|
|
|
|
<!-- <el-table-column prop="orderNature" label="状态" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<p>{{scope.row.status ? '上架' : '下架'}}</p> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> --> |
|
|
|
|
</el-table> |
|
|
|
|
<div class="pagination"> |
|
|
|
|
<el-pagination background layout="total, prev, pager, next" :total="platfromTotals" |
|
|
|
|
@current-change="platfromCurrentChange" :current-page="platfromPage"> |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button @click="showPlatform = false">取 消</el-button> |
|
|
|
|
<el-button type="primary" v-preventReClick @click="addPlatform()">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 职站增值弹框 --> |
|
|
|
|
<el-dialog :visible.sync="valueVisible" width="50%" center> |
|
|
|
|
<el-checkbox-group v-model="valueCheck"> |
|
|
|
|
<el-checkbox v-for="(item, i) in valueList" :key="i" :label="item.id">{{ item.moduleName }}</el-checkbox> |
|
|
|
|
</el-checkbox-group> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button @click="valueVisible = false">取 消</el-button> |
|
|
|
|
<el-button type="primary" v-preventReClick @click="addValue">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 实训课程弹框--> |
|
|
|
|
<!-- 选择课程弹框--> |
|
|
|
|
<el-dialog :visible.sync="practicalCourseVisible" width="50%" center :close-on-click-modal="false" @close="closeJCourse"> |
|
|
|
|
<div class="flex-between mgb20"> |
|
|
|
|
<div class="flex-center"> |
|
|
|
@ -1253,50 +1166,7 @@ |
|
|
|
|
</div> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button @click="practicalCourseVisible = false">取 消</el-button> |
|
|
|
|
<el-button type="primary" v-preventReClick @click="practicalCourseSubmit">确 定147258</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 实验工具弹框--> |
|
|
|
|
<el-dialog :visible.sync="expToolVisible" width="50%" center :close-on-click-modal="false" @close="closeJCourse"> |
|
|
|
|
<div class="flex-between mgb20"> |
|
|
|
|
<div class="flex-center"> |
|
|
|
|
<p class="addhr_tag"></p> |
|
|
|
|
<span>实验工具列表</span> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-input placeholder="请输入产品名称" prefix-icon="el-icon-search" v-model.trim="practicalCourseName" clearable></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<el-table v-loading="dataLoading" :data="expToolList" stripe header-align="center" |
|
|
|
|
@selection-change="expToolSelection" row-key="cid"> |
|
|
|
|
<el-table-column type="selection" :selectable="expToolSelectable" width="55" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="curriculumName" label="产品名称" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="产品类型" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ curriculumTypeKeys[scope.row.curriculumType] }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="配置的实训应用" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span class="ellipsis">{{ scope.row.sysName }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="expectedCourse" label="预计课时" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
<div class="pagination"> |
|
|
|
|
<el-pagination background layout="total, prev, pager, next" :total="expToolTotals" |
|
|
|
|
@current-change="expToolChange" :current-page="expToolPage"> |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button @click="expToolVisible = false">取 消</el-button> |
|
|
|
|
<el-button type="primary" v-preventReClick @click="expToolSubmit">确 定</el-button> |
|
|
|
|
<el-button type="primary" v-preventReClick @click="practicalCourseSubmit">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
@ -1355,10 +1225,10 @@ |
|
|
|
|
<select-client ref="client" @back="backToOrder" v-show="showSelectClient" :refresh="showSelectClient"></select-client> |
|
|
|
|
|
|
|
|
|
<el-dialog title="发货信息填写" :visible.sync="shipVisible" width="380px" class="dialog" :close-on-click-modal="false"> |
|
|
|
|
<el-input v-model="shipContent" placeholder="请填写需交付的产品登录地址、账号、密码等内容...(300个字以内)" type="textarea" :rows="10" maxlength="300"></el-input> |
|
|
|
|
<span slot="footer" class="dialog-footer" > |
|
|
|
|
<el-input :disabled="viewDisabled" v-model="shipContent" placeholder="请填写需交付的产品登录地址、账号、密码等内容...(300个字以内)" type="textarea" :rows="10" maxlength="300"></el-input> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button @click="shipVisible = false">取消</el-button> |
|
|
|
|
<el-button type="primary" @click="submitShip">确定</el-button> |
|
|
|
|
<el-button v-if="!viewDisabled" type="primary" @click="submitShip">确定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
@ -1375,6 +1245,32 @@ export default { |
|
|
|
|
return { |
|
|
|
|
// authority: 权限。0数据平台,1为课程,2职站增值模块,3实训课程(非集成),4实验工具 |
|
|
|
|
deliverShow: ['pageTypes', 'dataPageTypes', 'modelPageTypes', 'practiceCourseTypes', 'expToolTypes','theoryCourse'], |
|
|
|
|
listName: [ |
|
|
|
|
{ |
|
|
|
|
id: 1, |
|
|
|
|
name: 'coursePermissions' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 2, |
|
|
|
|
name: 'theoryCourseList' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 3, |
|
|
|
|
name: 'valuePermissions' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 4, |
|
|
|
|
name: 'practicalCourses' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 5, |
|
|
|
|
name: 'dataPlatformPermissions' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 6, |
|
|
|
|
name: 'expTools' |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
pageTypes: false, |
|
|
|
|
dataPageTypes: false, |
|
|
|
|
modelPageTypes:false, |
|
|
|
@ -1564,18 +1460,12 @@ export default { |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
curriculumName(n) { |
|
|
|
|
practicalCourseName(n) { |
|
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
|
this.getCourseJurisdiction(); |
|
|
|
|
this.getPracticalCourses(); |
|
|
|
|
}, 500); |
|
|
|
|
}, |
|
|
|
|
productName(n) { |
|
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
|
this.getDataJurisdiction(); |
|
|
|
|
}, 500); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
async created() { |
|
|
|
|
this.getTeam() |
|
|
|
@ -1817,12 +1707,6 @@ export default { |
|
|
|
|
this.valuePermissions = list.filter(i => i.authority === 2); |
|
|
|
|
this.practicalCourses = list.filter(i => i.authority === 3); |
|
|
|
|
this.expTools = list.filter(i => i.authority === 4); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.dataPlatformPermissions = list.filter(i => i.authority === 0); |
|
|
|
|
// this.theoryCourseList = list.filter(i => i.authority === 2); |
|
|
|
|
// this.practicalCourses = list.filter(i => i.authority === 3); |
|
|
|
|
// this.expTools = list.filter(i => i.authority === 4); |
|
|
|
|
}, |
|
|
|
|
// 获取费率 |
|
|
|
|
getRate() { |
|
|
|
@ -1857,7 +1741,7 @@ export default { |
|
|
|
|
submitOrder() { |
|
|
|
|
let purchase = 0 // 总采购成本 |
|
|
|
|
let profit = 0 // 总利润 |
|
|
|
|
if (!this.coursePermissions.length && !this.dataPlatformPermissions.length && !this.valuePermissions.length && !this.practicalCourses.length && !this.expTools.length) { |
|
|
|
|
if (!this.coursePermissions.length && !this.theoryCourseList.length && !this.dataPlatformPermissions.length && !this.valuePermissions.length && !this.practicalCourses.length && !this.expTools.length) { |
|
|
|
|
return this.$message.error("请选择课程权限或数据权限或职站增值模块权限后再确认订单"); |
|
|
|
|
} else { |
|
|
|
|
// 课程权限参数校验 |
|
|
|
@ -1882,6 +1766,27 @@ export default { |
|
|
|
|
return this.$message.error("请把课程参数输入完整"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (this.theoryCourseList.length) { |
|
|
|
|
let courseVerify = |
|
|
|
|
this.theoryCourseList.some(e => { |
|
|
|
|
// if (!e.periodOfUse || e.finalPrice === '') { |
|
|
|
|
if (!e.periodOfUse || e.finalPrice === '' || !e.startTime) { |
|
|
|
|
return false; |
|
|
|
|
} else { |
|
|
|
|
const curPurchase = +e.settlementPrice + (e.settlementPrice * (this.rate / 100)) |
|
|
|
|
purchase += curPurchase |
|
|
|
|
profit += +e.finalPrice - curPurchase |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
if (!courseVerify) { |
|
|
|
|
this.whetherSubmit = true; |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.whetherSubmit = false; |
|
|
|
|
}, 4000); |
|
|
|
|
return this.$message.error("请把课程参数输入完整"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 数据平台权限参数校验 |
|
|
|
|
if (this.dataPlatformPermissions.length) { |
|
|
|
|
let dataVerify = |
|
|
|
@ -2045,120 +1950,10 @@ export default { |
|
|
|
|
this.$forceUpdate(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 获取课程权限列表 |
|
|
|
|
getCourseJurisdiction() { |
|
|
|
|
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理') |
|
|
|
|
let param = { |
|
|
|
|
pageSize: 10, |
|
|
|
|
pageNum: this.coursePage, |
|
|
|
|
isShelves: 1, // 只获取上架的课程 |
|
|
|
|
curriculumName: this.curriculumName, |
|
|
|
|
supplierId: sid ? sid.supplierId : '' |
|
|
|
|
}; |
|
|
|
|
this.dataLoading = true; |
|
|
|
|
this.$post(this.api.curriculumList, param).then(res => { |
|
|
|
|
this.courseList = res.page.records; |
|
|
|
|
this.courseTotals = res.page.total; |
|
|
|
|
this.dataLoading = false; |
|
|
|
|
}).catch(err => { |
|
|
|
|
this.dataLoading = false; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
courseSelectable(row, index) { // 禁止勾选已经选过的课程 |
|
|
|
|
let boolean = true; |
|
|
|
|
this.coursePermissions.length && this.coursePermissions.some(e => { |
|
|
|
|
if (e.dataOrCourseId === row.cid) { |
|
|
|
|
boolean = false; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return boolean; |
|
|
|
|
}, |
|
|
|
|
// 课程--弹框列表选中 |
|
|
|
|
handleSelectionChange(val) { |
|
|
|
|
this.courseSelection = val; |
|
|
|
|
}, |
|
|
|
|
// 课程弹框--页数变更 |
|
|
|
|
handleCurrentChange(val) { |
|
|
|
|
this.coursePage = val; |
|
|
|
|
this.getCourseJurisdiction(); |
|
|
|
|
}, |
|
|
|
|
closeJCourse() { // 关闭课程选择对话框 |
|
|
|
|
this.curriculumName = ""; |
|
|
|
|
this.courseVisible = false; |
|
|
|
|
}, |
|
|
|
|
async addCourse() { |
|
|
|
|
if (this.courseSelection.length > 0) { |
|
|
|
|
let that = this; |
|
|
|
|
const { orderType } = this.form |
|
|
|
|
let fn = function(e) { |
|
|
|
|
let obj = { |
|
|
|
|
dataOrCourseId: e.cid,// id |
|
|
|
|
productName: e.curriculumName,// 名称 |
|
|
|
|
periodOfUse: "",// 使用期限 |
|
|
|
|
startTime: new Date(),// 开始 |
|
|
|
|
endTime: "", // 终止 |
|
|
|
|
remainingPeriod: "",// 剩余期限 |
|
|
|
|
marketValue: '', // 市场价 |
|
|
|
|
marketPrice: e.marketPrice, // 市场单价 |
|
|
|
|
finalPrice: orderType === 2 ? 0 : '',// 成交价 |
|
|
|
|
discountRate: "",// 折扣率 |
|
|
|
|
accountNum: "",// 账号数 |
|
|
|
|
totalAmount: "",// 总价 |
|
|
|
|
isEnable: 0, // 启用否:1启用,0禁用 |
|
|
|
|
ship: 0,// 发货否(0未发货,1已发货,默认不发货) |
|
|
|
|
authority: 1, // 区分权限 0为数据平台权限,1为课程权限 |
|
|
|
|
options: 1, |
|
|
|
|
settlementPrice: orderType === 2 ? 0 : '', // 结算价 |
|
|
|
|
settlementMethod: e.settlementMethod, // 结算方式,0为单价,1为分成 |
|
|
|
|
settlementPriceUnit: e.settlementPrice, // 结算单价 |
|
|
|
|
businessProportion: e.businessProportion, // 商务占比 |
|
|
|
|
}; |
|
|
|
|
that.coursePermissions.push(obj); |
|
|
|
|
}; |
|
|
|
|
let idArr = []; |
|
|
|
|
this.courseSelection.map(e => {// 取得选中的值,进行赋值 |
|
|
|
|
idArr.push(e.cid); |
|
|
|
|
if (this.coursePermissions.length > 0) { |
|
|
|
|
// 比对是否存在该id,若存在,不操作,不存在,则进行push操作 |
|
|
|
|
let find = this.coursePermissions.some(i => e.cid === i.dataOrCourseId);// 判断已有的相同的id不进行处理 |
|
|
|
|
if (!find) { |
|
|
|
|
fn(e); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
fn(e); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.courseVisible = false; |
|
|
|
|
this.curriculumName = ""; |
|
|
|
|
this.platformSelect = []; |
|
|
|
|
/* 调接口,判断是否为客户已有的课程 */ |
|
|
|
|
let params = { |
|
|
|
|
authority: 1, |
|
|
|
|
customerId: this.form.customerId, |
|
|
|
|
productId: idArr |
|
|
|
|
}; |
|
|
|
|
await this.$post(this.api.renew, params).then(res => { |
|
|
|
|
this.coursePermissions.map(e => { |
|
|
|
|
res.orderOthers.map(el => { |
|
|
|
|
if (el.dataOrCourseId === e.dataOrCourseId && el.authority) { |
|
|
|
|
if (el.endTime) { |
|
|
|
|
let time = new Date(el.endTime) |
|
|
|
|
time = new Date(time.setDate(time.getDate() + 1)) |
|
|
|
|
e.startTime = `${time.getFullYear()}-${time.getMonth() + 1}-${time.getDate()}` |
|
|
|
|
} else { |
|
|
|
|
e.startTime = '' |
|
|
|
|
} |
|
|
|
|
e.endTime = ""; |
|
|
|
|
e.periodOfUse = ""; |
|
|
|
|
e.renew = true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
return this.$message.warning("请选择课程"); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 删除课程权限 |
|
|
|
|
delCourseForm(index) { |
|
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
@ -2184,165 +1979,6 @@ export default { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 添加职站增值权限 |
|
|
|
|
addValueJurisdiction() { |
|
|
|
|
if (!this.form.customerId) return this.$message.warning("请先选择客户"); |
|
|
|
|
this.valueVisible = true; |
|
|
|
|
this.getValueJurisdiction(); |
|
|
|
|
}, |
|
|
|
|
getValueJurisdiction() { |
|
|
|
|
this.$post(this.api.getValueModule + '?platformId=1').then(res => { |
|
|
|
|
this.valueList = res.valueList |
|
|
|
|
}).catch(err => { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
addValue() { |
|
|
|
|
const val = this.valueCheck |
|
|
|
|
if (!val.length) return this.$message.warning("请选择模块"); |
|
|
|
|
const data = [] |
|
|
|
|
const { orderType } = this.form |
|
|
|
|
val.map(e => { |
|
|
|
|
data.push({ |
|
|
|
|
dataOrCourseId: e,// id |
|
|
|
|
productName: this.valueList.find(n => n.id === e).moduleName,// 名称 |
|
|
|
|
periodOfUse: "",// 使用期限 |
|
|
|
|
startTime: new Date(),// 开始 |
|
|
|
|
endTime: "", // 终止 |
|
|
|
|
remainingPeriod: "",// 剩余期限 |
|
|
|
|
marketValue: '', // 市场单价(订单里需要保存的) |
|
|
|
|
marketPrice: e.market, // 原始市场单价(产品里添加的) |
|
|
|
|
finalPrice: orderType === 2 ? 0 : '',// 成交价 |
|
|
|
|
finalValue: orderType === 2 ? 0 : '', // 成交单价 |
|
|
|
|
discountRate: "",// 折扣率 |
|
|
|
|
accountNum: "",// 账号数 |
|
|
|
|
totalAmount: orderType === 2 ? 0 : '',// 总价 |
|
|
|
|
isEnable: 1, // 启用否:1启用,0禁用 |
|
|
|
|
ship: 0,// 发货否(0未发货,1已发货,默认不发货) |
|
|
|
|
authority: 2, |
|
|
|
|
options:1, |
|
|
|
|
settlementPrice: orderType === 2 ? 0 : '', // 结算价 |
|
|
|
|
settlementMethod: e.settlementMethod, // 结算方式,0为单价,1为分成 |
|
|
|
|
settlementPriceUnit: e.settlementPrice, // 结算单价 |
|
|
|
|
businessProportion: e.businessProportion, // 商务占比 |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
this.valuePermissions = data |
|
|
|
|
this.valueVisible = false |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 添加数据平台权限 |
|
|
|
|
addDataJurisdiction() { |
|
|
|
|
if (!this.form.customerId) return this.$message.warning("请先选择客户"); |
|
|
|
|
this.showPlatform = true; |
|
|
|
|
this.getDataJurisdiction(); |
|
|
|
|
}, |
|
|
|
|
// 获取数据权限列表 |
|
|
|
|
getDataJurisdiction() { |
|
|
|
|
let param = { |
|
|
|
|
pageSize: 10, |
|
|
|
|
pageNum: this.platfromPage, |
|
|
|
|
status: 1, |
|
|
|
|
productName: this.productName |
|
|
|
|
}; |
|
|
|
|
this.dataLoading = true; |
|
|
|
|
this.$post(this.api.listByEntity, param).then(res => { |
|
|
|
|
this.platformList = res.pageList.records; |
|
|
|
|
this.platfromTotals = res.pageList.total; |
|
|
|
|
this.dataLoading = false; |
|
|
|
|
}).catch(err => { |
|
|
|
|
this.dataLoading = false; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
dataSelectable(row, index) { // 禁止勾选已经选过的数据平台 |
|
|
|
|
let boolean = true; |
|
|
|
|
this.dataPlatformPermissions.length && this.dataPlatformPermissions.some(e => { |
|
|
|
|
if (e.dataOrCourseId === row.id) { |
|
|
|
|
boolean = false; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return boolean; |
|
|
|
|
}, |
|
|
|
|
// 数据平台--弹框列表选中 |
|
|
|
|
dataPlatformSelection(val) { |
|
|
|
|
this.platformSelect = val; |
|
|
|
|
}, |
|
|
|
|
// 数据平台弹框--确定 |
|
|
|
|
async addPlatform() { |
|
|
|
|
if (this.platformSelect.length > 0) { |
|
|
|
|
let that = this; |
|
|
|
|
const { orderType } = this.form |
|
|
|
|
let fn = function(e) { |
|
|
|
|
let obj = { |
|
|
|
|
dataOrCourseId: e.id,// id |
|
|
|
|
productName: e.productName,// 名称 |
|
|
|
|
periodOfUse: "",// 使用期限 |
|
|
|
|
startTime: new Date(),// 开始 |
|
|
|
|
endTime: "", // 终止 |
|
|
|
|
remainingPeriod: "",// 剩余期限 |
|
|
|
|
marketValue: '', // 市场单价(订单里需要保存的) |
|
|
|
|
marketPrice: e.market, // 原始市场单价(产品里添加的) |
|
|
|
|
finalPrice: orderType === 2 ? 0 : '',// 成交价 |
|
|
|
|
finalValue: orderType === 2 ? 0 : '', // 成交单价 |
|
|
|
|
discountRate: "",// 折扣率 |
|
|
|
|
accountNum: "",// 账号数 |
|
|
|
|
totalAmount: orderType === 2 ? 0 : '',// 总价 |
|
|
|
|
isEnable: 1, // 启用否:1启用,0禁用 |
|
|
|
|
ship: 0,// 发货否(0未发货,1已发货,默认不发货) |
|
|
|
|
authority: 0,// 数据平台权限 |
|
|
|
|
options:1, |
|
|
|
|
settlementPrice: orderType === 2 ? 0 : '', // 结算价 |
|
|
|
|
settlementMethod: e.settlementMethod, // 结算方式,0为单价,1为分成 |
|
|
|
|
settlementPriceUnit: e.settlementPrice, // 结算单价 |
|
|
|
|
businessProportion: e.businessProportion, // 商务占比 |
|
|
|
|
}; |
|
|
|
|
that.dataPlatformPermissions.push(obj); |
|
|
|
|
}; |
|
|
|
|
let idArr = []; |
|
|
|
|
this.platformSelect.map(e => {// 取得选中的值,进行赋值 |
|
|
|
|
idArr.push(e.id); |
|
|
|
|
if (this.dataPlatformPermissions.length > 0) { |
|
|
|
|
// 比对是否存在该id,若存在,不操作,不存在,则进行push操作 |
|
|
|
|
let find = this.dataPlatformPermissions.some(i => e.id === i.dataOrCourseId);// 判断已有的相同的id不进行处理 |
|
|
|
|
if (!find) { |
|
|
|
|
fn(e); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
fn(e); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.showPlatform = false; |
|
|
|
|
this.productName = ""; |
|
|
|
|
this.platformSelect = []; |
|
|
|
|
/* 调接口,判断是否为客户已有的产品功能 */ |
|
|
|
|
let params = { |
|
|
|
|
authority: 0, |
|
|
|
|
customerId: this.form.customerId, |
|
|
|
|
productId: idArr |
|
|
|
|
}; |
|
|
|
|
await this.$post(this.api.renew, params).then(res => { |
|
|
|
|
this.dataPlatformPermissions.map(e => { |
|
|
|
|
res.orderOthers.map(el => { |
|
|
|
|
if (el.dataOrCourseId === e.dataOrCourseId && !el.authority) { |
|
|
|
|
let time = new Date(el.endTime) |
|
|
|
|
time = new Date(time.setDate(time.getDate() + 1)) |
|
|
|
|
e.startTime = `${time.getFullYear()}-${time.getMonth() + 1}-${time.getDate()}` |
|
|
|
|
e.endTime = ""; |
|
|
|
|
e.periodOfUse = ""; |
|
|
|
|
e.renew = true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
return this.$message.warning("请选择数据"); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 数据平台弹框--页数变更 |
|
|
|
|
platfromCurrentChange(val) { |
|
|
|
|
this.platfromPage = val; |
|
|
|
|
this.getDataJurisdiction(); |
|
|
|
|
}, |
|
|
|
|
// 删除数据平台权限 |
|
|
|
|
delDataForm(index) { |
|
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
@ -2371,20 +2007,15 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 添加实训课程权限 |
|
|
|
|
addPracticalCourses() { |
|
|
|
|
if (!this.form.customerId) return this.$message.warning("请先选择客户"); |
|
|
|
|
this.practicalCourseVisible = true; |
|
|
|
|
this.getPracticalCourses(); |
|
|
|
|
}, |
|
|
|
|
// 获取实训课程列表 |
|
|
|
|
// 获取选择课程弹框列表 |
|
|
|
|
getPracticalCourses() { |
|
|
|
|
this.dataLoading = true; |
|
|
|
|
this.$post(this.api.listOfGoods, { |
|
|
|
|
pageNum: this.practicalCoursePage, |
|
|
|
|
productClassification: this.classificationId, |
|
|
|
|
pageSize: 10, |
|
|
|
|
isShelves: 0 |
|
|
|
|
isShelves: 0, |
|
|
|
|
productName: this.practicalCourseName |
|
|
|
|
}).then(({ page }) => { |
|
|
|
|
this.practicalCourseList = page.records; |
|
|
|
|
this.practicalCourseTotals = page.total; |
|
|
|
@ -2402,11 +2033,11 @@ export default { |
|
|
|
|
}); |
|
|
|
|
return boolean; |
|
|
|
|
}, |
|
|
|
|
// 实训课程--弹框列表选中 |
|
|
|
|
// 课程--弹框列表选中 |
|
|
|
|
practicalCoursesSelection(val) { |
|
|
|
|
this.practicalCoursesSelect = val; |
|
|
|
|
}, |
|
|
|
|
// 实训课程弹框--确定 |
|
|
|
|
// 课程弹框--确定 |
|
|
|
|
async practicalCourseSubmit() { |
|
|
|
|
if (this.practicalCoursesSelect.length > 0) { |
|
|
|
|
let that = this; |
|
|
|
@ -2434,71 +2065,43 @@ export default { |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
const { orderType } = this.form |
|
|
|
|
const { name } = this.listName.find(e => e.id == that.classificationId) |
|
|
|
|
let fn = function(e) { |
|
|
|
|
let obj = { |
|
|
|
|
dataOrCourseId: e.associatedProduct,// id |
|
|
|
|
mallId: e.mallId, |
|
|
|
|
productName: e.productName,// 名称 |
|
|
|
|
periodOfUse: "",// 使用期限 |
|
|
|
|
startTime: new Date(),// 开始 |
|
|
|
|
endTime: "", // 终止 |
|
|
|
|
remainingPeriod: "",// 剩余期限 |
|
|
|
|
marketValue: '', // 市场价 |
|
|
|
|
marketPrice: '', // 市场单价 |
|
|
|
|
finalPrice: orderType === 2 ? 0 : '',// 成交价 |
|
|
|
|
discountRate: "",// 折扣率 |
|
|
|
|
accountNum: "",// 账号数 |
|
|
|
|
totalAmount: "",// 总价 |
|
|
|
|
isEnable: 0, // 启用否:1启用,0禁用 |
|
|
|
|
ship: 0,// 发货否(0未发货,1已发货,默认不发货) |
|
|
|
|
authority: authority, // 区分权限 0为数据平台权限,1为课程权限 |
|
|
|
|
options: 1, |
|
|
|
|
settlementPrice: orderType === 2 ? 0 : '', // 结算价 |
|
|
|
|
settlementMethod: e.settlementMethod, // 结算方式,0为单价,1为分成 |
|
|
|
|
settlementPriceUnit: e.settlementPrice, // 结算单价 |
|
|
|
|
businessProportion: e.businessProportion, // 商务占比 |
|
|
|
|
}; |
|
|
|
|
switch (that.classificationId) { |
|
|
|
|
case 1: |
|
|
|
|
// 实训课程 |
|
|
|
|
that.coursePermissions.push(obj) |
|
|
|
|
break; |
|
|
|
|
case 2: |
|
|
|
|
// 理论课程 |
|
|
|
|
that.theoryCourseList.push(obj) |
|
|
|
|
break; |
|
|
|
|
case 3: |
|
|
|
|
// 职站增值应用 |
|
|
|
|
that.valuePermissions.push(obj) |
|
|
|
|
break; |
|
|
|
|
case 4: |
|
|
|
|
// 实训课程(非集成) |
|
|
|
|
that.practicalCourses.push(obj) |
|
|
|
|
break; |
|
|
|
|
case 5: |
|
|
|
|
// 数据前瞻 |
|
|
|
|
that.dataPlatformPermissions.push(obj) |
|
|
|
|
break; |
|
|
|
|
case 6: |
|
|
|
|
// 实验工具 |
|
|
|
|
that.expTools.push(obj) |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
// that.practicalCourses.push(obj); |
|
|
|
|
that[name].push({ |
|
|
|
|
dataOrCourseId: e.associatedProduct,// id |
|
|
|
|
mallId: e.mallId, |
|
|
|
|
productName: e.productName,// 名称 |
|
|
|
|
periodOfUse: "",// 使用期限 |
|
|
|
|
startTime: new Date(),// 开始 |
|
|
|
|
endTime: "", // 终止 |
|
|
|
|
remainingPeriod: "",// 剩余期限 |
|
|
|
|
marketValue: '', // 市场价 |
|
|
|
|
marketPrice: e.marketUnitPrice, // 市场单价 |
|
|
|
|
finalPrice: orderType === 2 ? 0 : '',// 成交价 |
|
|
|
|
discountRate: "",// 折扣率 |
|
|
|
|
accountNum: "",// 账号数 |
|
|
|
|
totalAmount: "",// 总价 |
|
|
|
|
isEnable: 0, // 启用否:1启用,0禁用 |
|
|
|
|
ship: 0,// 发货否(0未发货,1已发货,默认不发货) |
|
|
|
|
authority, // 区分权限 0为数据平台权限,1为课程权限 |
|
|
|
|
options: 1, |
|
|
|
|
settlementPrice: orderType === 2 ? 0 : '', // 结算价 |
|
|
|
|
settlementPriceUnit: e.settlementPrice || 0, // 结算单价 |
|
|
|
|
}) |
|
|
|
|
}; |
|
|
|
|
let idArr = []; |
|
|
|
|
console.log("🚀 ~ file: AddOrder.vue:2095 ~ practicalCourseSubmit ~ idArr:", this[name],this.practicalCoursesSelect) |
|
|
|
|
this.practicalCoursesSelect.map(e => {// 取得选中的值,进行赋值 |
|
|
|
|
idArr.push(e.cid); |
|
|
|
|
if (this.practicalCourses.length > 0) { |
|
|
|
|
// 比对是否存在该id,若存在,不操作,不存在,则进行push操作 |
|
|
|
|
let find = this.practicalCourses.some(i => e.cid === i.dataOrCourseId);// 判断已有的相同的id不进行处理 |
|
|
|
|
if (!find) { |
|
|
|
|
fn(e); |
|
|
|
|
idArr.push(e.mallId); |
|
|
|
|
let find = this[name].some(i => e.associatedProduct === i.dataOrCourseId);// 判断已有的相同的id不进行处理 |
|
|
|
|
if (!find) { |
|
|
|
|
this.$post(`${this.api.queryCitySettlementPrice}?mallId=${e.mallId}&provinceId=${this.form.provinceId}&cityId=${this.form.cityId}`).then(res => { |
|
|
|
|
const mall = res.mallPrice |
|
|
|
|
if (mall) { |
|
|
|
|
e.settlementPrice = mall.discountRate |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
fn(e); |
|
|
|
|
}).catch((res) => {}) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.practicalCourseVisible = false; |
|
|
|
@ -2546,121 +2149,6 @@ export default { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 添加实训课程权限 |
|
|
|
|
addExpTool() { |
|
|
|
|
if (!this.form.customerId) return this.$message.warning("请先选择客户"); |
|
|
|
|
this.expToolVisible = true; |
|
|
|
|
this.getExpTool(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 获取数据权限列表 |
|
|
|
|
getExpTool() { |
|
|
|
|
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理') |
|
|
|
|
let param = { |
|
|
|
|
pageSize: 10, |
|
|
|
|
pageNum: this.expToolPage, |
|
|
|
|
isShelves: 1, // 只获取上架的课程 |
|
|
|
|
curriculumName: this.expToolName, |
|
|
|
|
supplierId: sid ? sid.supplierId : '' |
|
|
|
|
}; |
|
|
|
|
this.dataLoading = true; |
|
|
|
|
this.$post(this.api.curriculumList, param).then(res => { |
|
|
|
|
this.expToolList = res.page.records; |
|
|
|
|
this.expToolTotals = res.page.total; |
|
|
|
|
this.dataLoading = false; |
|
|
|
|
}).catch(err => { |
|
|
|
|
this.dataLoading = false; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
expToolSelectable(row, index) { // 禁止勾选已经选过的数据平台 |
|
|
|
|
let boolean = true; |
|
|
|
|
this.expTools.length && this.expTools.some(e => { |
|
|
|
|
if (e.dataOrCourseId === row.cid) { |
|
|
|
|
boolean = false; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return boolean; |
|
|
|
|
}, |
|
|
|
|
// 实训课程--弹框列表选中 |
|
|
|
|
expToolSelection(val) { |
|
|
|
|
this.expToolSelect = val; |
|
|
|
|
}, |
|
|
|
|
// 实训课程弹框--确定 |
|
|
|
|
async expToolSubmit() { |
|
|
|
|
if (this.expToolSelect.length > 0) { |
|
|
|
|
let that = this; |
|
|
|
|
const { orderType } = this.form |
|
|
|
|
let fn = function(e) { |
|
|
|
|
let obj = { |
|
|
|
|
dataOrCourseId: e.cid,// id |
|
|
|
|
productName: e.curriculumName,// 名称 |
|
|
|
|
periodOfUse: "",// 使用期限 |
|
|
|
|
startTime: new Date(),// 开始 |
|
|
|
|
endTime: "", // 终止 |
|
|
|
|
remainingPeriod: "",// 剩余期限 |
|
|
|
|
marketValue: '', // 市场价 |
|
|
|
|
marketPrice: e.marketPrice, // 市场单价 |
|
|
|
|
finalPrice: orderType === 2 ? 0 : '',// 成交价 |
|
|
|
|
discountRate: "",// 折扣率 |
|
|
|
|
accountNum: "",// 账号数 |
|
|
|
|
totalAmount: "",// 总价 |
|
|
|
|
isEnable: 0, // 启用否:1启用,0禁用 |
|
|
|
|
ship: 0,// 发货否(0未发货,1已发货,默认不发货) |
|
|
|
|
authority: 4, // 区分权限 0为数据平台权限,1为课程权限 |
|
|
|
|
options: 1, |
|
|
|
|
settlementPrice: orderType === 2 ? 0 : '', // 结算价 |
|
|
|
|
settlementMethod: e.settlementMethod, // 结算方式,0为单价,1为分成 |
|
|
|
|
settlementPriceUnit: e.settlementPrice, // 结算单价 |
|
|
|
|
businessProportion: e.businessProportion, // 商务占比 |
|
|
|
|
}; |
|
|
|
|
that.expTools.push(obj); |
|
|
|
|
}; |
|
|
|
|
let idArr = []; |
|
|
|
|
this.expToolSelect.map(e => {// 取得选中的值,进行赋值 |
|
|
|
|
idArr.push(e.cid); |
|
|
|
|
if (this.expTools.length > 0) { |
|
|
|
|
// 比对是否存在该id,若存在,不操作,不存在,则进行push操作 |
|
|
|
|
let find = this.expTools.some(i => e.cid === i.dataOrCourseId);// 判断已有的相同的id不进行处理 |
|
|
|
|
if (!find) { |
|
|
|
|
fn(e); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
fn(e); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.expToolVisible = false; |
|
|
|
|
this.expToolName = ""; |
|
|
|
|
this.expToolsSelect = []; |
|
|
|
|
/* 调接口,判断是否为客户已有的产品功能 */ |
|
|
|
|
let params = { |
|
|
|
|
authority: 4, |
|
|
|
|
customerId: this.form.customerId, |
|
|
|
|
productId: idArr |
|
|
|
|
}; |
|
|
|
|
await this.$post(this.api.renew, params).then(res => { |
|
|
|
|
this.dataPlatformPermissions.map(e => { |
|
|
|
|
res.orderOthers.map(el => { |
|
|
|
|
if (el.dataOrCourseId === e.dataOrCourseId && el.authority == 4) { |
|
|
|
|
let time = new Date(el.endTime) |
|
|
|
|
time = new Date(time.setDate(time.getDate() + 1)) |
|
|
|
|
e.startTime = `${time.getFullYear()}-${time.getMonth() + 1}-${time.getDate()}` |
|
|
|
|
e.endTime = ""; |
|
|
|
|
e.periodOfUse = ""; |
|
|
|
|
e.renew = true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
return this.$message.warning("请选择数据"); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 实训课程弹框--页数变更 |
|
|
|
|
expToolChange(val) { |
|
|
|
|
this.expToolPage = val; |
|
|
|
|
this.getExpTool(); |
|
|
|
|
}, |
|
|
|
|
// 删除实训课程权限 |
|
|
|
|
delExpTool(index) { |
|
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
@ -2675,7 +2163,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 课程/数据平台-启用 |
|
|
|
|
// 启用 |
|
|
|
|
handleEnable(e, row,type) { |
|
|
|
|
this[this.deliverShow[type]] = !this[this.deliverShow[type]] |
|
|
|
|
}, |
|
|
|
@ -2708,13 +2196,13 @@ export default { |
|
|
|
|
// }).then(res => {}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 课程/数据平台-发货 |
|
|
|
|
// 发货 |
|
|
|
|
handleDeliver(e, row,type) { |
|
|
|
|
this[this.deliverShow[type]] = row.ship === 1 |
|
|
|
|
if(row.ship === 1) { |
|
|
|
|
row.isEnable = 1 |
|
|
|
|
} |
|
|
|
|
if (type == 3 && row.ship) this.showShip(row) // 非集成课程发货了后显示填写发货信息弹框 |
|
|
|
|
if ((type == 3 || type == 4) && row.ship) this.showShip(row) // 非集成课程发货了后显示填写发货信息弹框 |
|
|
|
|
}, |
|
|
|
|
// 如果非数字,则返回0 |
|
|
|
|
handleNaN(val) { |
|
|
|
@ -2781,21 +2269,17 @@ export default { |
|
|
|
|
const unit = row.options // 使用期限单位 |
|
|
|
|
const useUnit = row.periodOfUse // 使用期限 |
|
|
|
|
if (this.form.orderType !== 2) { |
|
|
|
|
let sPrice = '' |
|
|
|
|
if (row.settlementMethod == 0) { |
|
|
|
|
// 结算单价。计算规则:结算单价(**元/年)*购买时长(单位年)*数量(课程为1,数据为账号数量)(单位是万) |
|
|
|
|
const priceUnit = row.settlementPriceUnit |
|
|
|
|
sPrice = ((!unit ? |
|
|
|
|
// 结算单价。计算规则:结算单价(**元/年)*购买时长(单位年)*数量(课程为1,数据为账号数量)(单位是万) |
|
|
|
|
const priceUnit = row.settlementPriceUnit |
|
|
|
|
const sPrice = ((!unit ? |
|
|
|
|
priceUnit / 365 * useUnit : |
|
|
|
|
unit === 1 ? |
|
|
|
|
priceUnit / 12 * useUnit : |
|
|
|
|
priceUnit * useUnit) * (row.authority ? |
|
|
|
|
1 : |
|
|
|
|
row.accountNum)).toFixed(2) |
|
|
|
|
} else { |
|
|
|
|
// 比例分成。计算规则:成交价*商务分成比例(单位是万) |
|
|
|
|
sPrice = (row.finalPrice * row.businessProportion / 100).toFixed(2) |
|
|
|
|
} |
|
|
|
|
console.log("🚀 ~ file: AddOrder.vue:2287 ~ dealSettlePrice ~ sPrice:", row,sPrice) |
|
|
|
|
|
|
|
|
|
row.settlementPrice = this.handleNaN(sPrice) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -3038,8 +2522,6 @@ export default { |
|
|
|
|
*/ |
|
|
|
|
addCourseJurisdiction(type) { |
|
|
|
|
if (!this.form.customerId) return this.$message.warning("请先选择客户"); |
|
|
|
|
// this.courseVisible = true; |
|
|
|
|
// this.getCourseJurisdiction(); |
|
|
|
|
this.classificationId = type |
|
|
|
|
this.practicalCourseVisible = true; |
|
|
|
|
this.getPracticalCourses(); |
|
|
|
|