订单客户等联调

dev_2022-05-11
yujialong 3 years ago
parent 5e64a06a64
commit 49b65c20fc
  1. 16
      src/utils/api.js
  2. 49
      src/views/course/AddCurriculum.vue
  3. 14
      src/views/customer/AddCustomer.vue
  4. 49
      src/views/order/AddOrder.vue

@ -2,7 +2,7 @@ import Setting from "@/setting";
const host = Setting.apiBaseURL const host = Setting.apiBaseURL
const uploadURL = Setting.uploadURL const uploadURL = Setting.uploadURL
const host1 = 'http://192.168.31.151:9000/' const host1 = 'http://192.168.31.137:9000/'
export default { export default {
@ -144,14 +144,14 @@ export default {
courseProfessionalClass: `nakadai/nakadai/subject/courseProfessionalClass`, //课程专业类 courseProfessionalClass: `nakadai/nakadai/subject/courseProfessionalClass`, //课程专业类
courseProfessional: `nakadai/nakadai/subject/courseProfessional`, //课程专业 courseProfessional: `nakadai/nakadai/subject/courseProfessional`, //课程专业
//课程管理 //课程管理
curriculumList: `nakadai/nakadai/curriculum/curriculumList`, //课程列表 curriculumList: `${host1}nakadai/nakadai/curriculum/curriculumList`, //课程列表
createCurriculum: `nakadai/nakadai/curriculum/createCurriculum`, //创建课程 createCurriculum: `${host1}nakadai/nakadai/curriculum/createCurriculum`, //创建课程
curriculumDetail: `nakadai/nakadai/curriculum/curriculumDetail`, //课程详情 curriculumDetail: `${host1}nakadai/nakadai/curriculum/curriculumDetail`, //课程详情
modifyCourse: `nakadai/nakadai/curriculum/modifyCourse`, //编辑课程 modifyCourse: `${host1}nakadai/nakadai/curriculum/modifyCourse`, //编辑课程
delCourse: `nakadai/nakadai/curriculum/delCourse`, //单个、批量删除课程 delCourse: `${host1}nakadai/nakadai/curriculum/delCourse`, //单个、批量删除课程
isShelves: `nakadai/nakadai/curriculum/isShelves`, //上下架课程 isShelves: `${host1}nakadai/nakadai/curriculum/isShelves`, //上下架课程
getInternalProjectBySystemId: `occupationlab/projectManage/getInternalProjectBySystemId`, //根据系统id、项目权限获取系统内置项目 getInternalProjectBySystemId: `occupationlab/projectManage/getInternalProjectBySystemId`, //根据系统id、项目权限获取系统内置项目
checkConfig: `nakadai/nakadai/curriculum/checkConfig`, checkConfig: `${host1}nakadai/nakadai/curriculum/checkConfig`,
// 课程章节管理 // 课程章节管理
addChapter: `nakadai/curriculum/chapter/addChapter`, //添加章节 addChapter: `nakadai/curriculum/chapter/addChapter`, //添加章节
editChapter: `nakadai/curriculum/chapter/editChapter`, //修改章节 editChapter: `nakadai/curriculum/chapter/editChapter`, //修改章节

@ -23,7 +23,7 @@
<div class="border-b-dashed"></div> <div class="border-b-dashed"></div>
<div> <div>
<el-form :model="form" :rules="rules" ref="form" label-width="80px"> <el-form :model="form" :rules="rules" ref="form" label-width="100px">
<el-col :span="6" :offset="5"> <el-col :span="6" :offset="5">
<el-form-item label="课程名称" prop="curriculumName"> <el-form-item label="课程名称" prop="curriculumName">
<el-input placeholder="请输入课程名称" v-model.trim="form.curriculumName"></el-input> <el-input placeholder="请输入课程名称" v-model.trim="form.curriculumName"></el-input>
@ -46,11 +46,27 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="市场价格" prop="marketPrice"> <el-form-item label="市场价格" prop="professionalId">
<el-input placeholder="请输入市场价格" v-model.trim="form.marketPrice"> <el-input placeholder="请输入市场价格" v-model.trim="form.marketPrice">
<template slot="append"></template> <template slot="append">/</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="结算方式" prop="professionalId" style="width: 800px">
<div class="settlement">
<el-radio v-model="form.settlementMethod" label="0">结算单价</el-radio>
<el-input v-model.trim="form.settlementPrice">
<template slot="append">/</template>
</el-input>
</div>
<div class="settlement">
<el-radio v-model="form.settlementMethod" label="1">比例分成</el-radio>
<span class="label">商务经理占比</span>
<el-input v-model.trim="form.businessProportion"></el-input>
<span class="label">产品厂商占比</span>
<el-input v-model.trim="form.manufacturerProportion"></el-input>
</div>
</el-form-item>
</el-col> </el-col>
<el-col :span="6" :offset="2"> <el-col :span="6" :offset="2">
@ -75,6 +91,9 @@
<el-option label="64课时" value="64课时"></el-option> <el-option label="64课时" value="64课时"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="供应厂商" prop="expectedCourse">
<el-input placeholder="请输入供应厂商" v-model.trim="form.supplier"></el-input>
</el-form-item>
</el-col> </el-col>
<el-col :span="14" :offset="5"> <el-col :span="14" :offset="5">
@ -284,7 +303,12 @@ export default {
briefIntroduction: "", briefIntroduction: "",
teachingObjectives: "", teachingObjectives: "",
systemIdByAssessment: [], systemIdByAssessment: [],
systemIdByPractice: [] systemIdByPractice: [],
supplier: '',
businessProportion: '',
manufacturerProportion: '',
settlementPrice: '',
settlementMethod: '0'
}, },
rules: { rules: {
curriculumName: [ curriculumName: [
@ -802,4 +826,19 @@ $avatar-width: 104px;
align-items: center; align-items: center;
padding: 10px 120px; padding: 10px 120px;
} }
.settlement {
display: flex;
align-items: center;
margin-bottom: 10px;
.label {
margin-right: 10px;
white-space: nowrap;
color: #606266;
font-size: 14px;
}
.el-input {
width: 150px;
margin-right: 30px;
}
}
</style> </style>

@ -499,7 +499,7 @@ export default {
// //
getProduct() { getProduct() {
this.$get(this.api.getProductsSubscribedByCustomers, { this.$get(this.api.getProductsSubscribedByCustomers, {
customeId: 19 customeId: this.customerId
}).then(({ data }) => { }).then(({ data }) => {
const { productTypeList } = this const { productTypeList } = this
data.map(e => { data.map(e => {
@ -547,15 +547,17 @@ export default {
} }
} }
} }
e.remain = this.getRemain(e.startTime, e.endTime) // const date = new Date()
e.startTime = e.startTime.replace(' 00:00:00', '') date.setHours(0)
e.endTime = e.endTime.replace(' 00:00:00', '') date.setMinutes(0)
date.setSeconds(0)
e.remain = this.getRemain(date.getTime(), e.endTime) //
e.startAndEndTime = e.startTime + ' ~ ' + e.endTime e.startAndEndTime = e.startTime + ' ~ ' + e.endTime
// //
if (e.notActiveList.length) { if (e.notActiveList.length) {
e.other = '' e.other = ''
e.notActiveList.map(j => { e.notActiveList.map(j => {
e.other += `<br>${j.startTime.replace(' 00:00:00', '')} ~ ${j.endTime.replace(' 00:00:00', '')}` e.other += `<br>${j.startTime} ~ ${j.endTime}`
}) })
} }
e.productTypeName = productTypeList.find(n => n.id === e.productType).name e.productTypeName = productTypeList.find(n => n.id === e.productType).name
@ -570,7 +572,7 @@ export default {
}, },
// //
getRemain(startTime, endTime) { getRemain(startTime, endTime) {
return (new Date(endTime).getTime() - new Date(startTime).getTime()) / 86400000 return parseInt(((new Date(endTime).getTime() - new Date(startTime).getTime()) / 86400000)) + 1
}, },
// //
filterForm2() { filterForm2() {

@ -178,13 +178,10 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="折扣率" align="center" min-width="110"> <el-table-column label="折扣率 " align="center" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <el-input disabled v-model="scope.row.discountRate" placeholder=""
<el-input disabled v-model="scope.row.marketValue" placeholder="" type="text" size="small" style="width: 100%"></el-input>
type="text"></el-input>
<span style="margin-left:5px"></span>
</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="130">
@ -203,9 +200,9 @@
<el-table-column label="结算价" align="center" min-width="130"> <el-table-column label="结算价" align="center" min-width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input :class="scope.row.finalPrice === '' && whetherSubmit?'red':''" <el-input :class="scope.row.settlementPrice === '' && whetherSubmit?'red':''"
:disabled="viewDisabled" :disabled="viewDisabled"
@input="scope.row.finalPrice = scope.row.finalPrice.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" @input="scope.row.settlementPrice = scope.row.settlementPrice.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
@change="[allAmount($event,scope.row),calculateDiscount($event,scope.row)]" @change="[allAmount($event,scope.row),calculateDiscount($event,scope.row)]"
v-model="scope.row.settlementPrice" v-model="scope.row.settlementPrice"
type="text"></el-input> type="text"></el-input>
@ -213,12 +210,6 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="折扣率 " align="center" min-width="100">
<template slot-scope="scope">
<el-input disabled v-model="scope.row.discountRate" placeholder=""
type="text" size="small" style="width: 100%"></el-input>
</template>
</el-table-column>
<el-table-column label="端口地址 " align="center" min-width="100"> <el-table-column label="端口地址 " align="center" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="configure(scope.row)">配置</el-button> <el-button @click="configure(scope.row)">配置</el-button>
@ -333,7 +324,7 @@
<el-table-column label="市场单价" align="center" min-width="160"> <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 disabled v-model="scope.row.marketValue" placeholder="" <el-input disabled v-model="scope.row.marketPrice" placeholder=""
type="text"></el-input> type="text"></el-input>
<span style="margin-left:5px">&nbsp;/&nbsp;</span> <span style="margin-left:5px">&nbsp;/&nbsp;</span>
</div> </div>
@ -389,9 +380,9 @@
<el-table-column label="结算价" align="center" min-width="130"> <el-table-column label="结算价" align="center" min-width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input :class="scope.row.finalPrice === '' && whetherSubmit?'red':''" <el-input :class="scope.row.settlementPrice === '' && whetherSubmit?'red':''"
:disabled="viewDisabled" :disabled="viewDisabled"
@input="scope.row.finalPrice = scope.row.finalPrice.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" @input="scope.row.settlementPrice = scope.row.settlementPrice.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
@change="[allAmount($event,scope.row),calculateDiscount($event,scope.row)]" @change="[allAmount($event,scope.row),calculateDiscount($event,scope.row)]"
v-model="scope.row.settlementPrice" v-model="scope.row.settlementPrice"
type="text"></el-input> type="text"></el-input>
@ -1074,7 +1065,7 @@ export default {
getCourseJurisdiction() { getCourseJurisdiction() {
let param = { let param = {
pageSize: 10, pageSize: 10,
pageNum: this.platfromPage, pageNum: this.coursePage,
isEnable: 0, // isEnable: 0, //
curriculumName: this.curriculumName curriculumName: this.curriculumName
}; };
@ -1121,7 +1112,8 @@ export default {
startTime: new Date(),// startTime: new Date(),//
endTime: "", // endTime: "", //
remainingPeriod: "",// remainingPeriod: "",//
marketValue: e.marketPrice,// marketValue: '', //
marketPrice: e.marketPrice, //
finalPrice: orderType === 2 ? 0 : '',// finalPrice: orderType === 2 ? 0 : '',//
discountRate: "",// discountRate: "",//
accountNum: "",// accountNum: "",//
@ -1130,6 +1122,9 @@ export default {
ship: 0,// 01 ship: 0,// 01
authority: 1, // 01 authority: 1, // 01
options: 1, options: 1,
settlementPrice: '', //
settlementMethod: '', // 01
businessProportion: '', //
}; };
that.coursePermissions.push(obj); that.coursePermissions.push(obj);
}; };
@ -1243,6 +1238,9 @@ export default {
ship: 0,// 01 ship: 0,// 01
authority: 0,// authority: 0,//
options:1, options:1,
settlementPrice: '', //
settlementMethod: '', // 01
businessProportion: '', //
}; };
that.dataPlatformPermissions.push(obj); that.dataPlatformPermissions.push(obj);
}; };
@ -1379,6 +1377,7 @@ export default {
}, },
// 使 // 使
deadLine(e,row,options, isDate) { deadLine(e,row,options, isDate) {
debugger
let optionsData = '' let optionsData = ''
if(e > 0){ if(e > 0){
if (options == 1){ if (options == 1){
@ -1400,6 +1399,18 @@ export default {
let endYear = timestamp - time let endYear = timestamp - time
let endYears = endYear/1000/60/60/24 let endYears = endYear/1000/60/60/24
row.remainingPeriod = endYears row.remainingPeriod = endYears
//
if (row.authority) {
const unit = row.options // 使
const useUnit = row.periodOfUse // 使
const price = row.marketPrice //
// //365,/12)
row.marketValue = (!unit ?
price / 365 * useUnit :
unit === 1 ?
price / 12 * useUnit :
price * useUnit).toFixed(2)
}
// +1 // +1
if (isDate) { if (isDate) {
const cId = row.dataOrCourseId const cId = row.dataOrCourseId

Loading…
Cancel
Save