课程订单修复

dev_202207
yujialong 2 years ago
parent 4d98052b9a
commit 3ac5c7aba2
  1. 1
      src/utils/api.js
  2. 41
      src/views/course/AddCurriculum.vue
  3. 16
      src/views/match/add/index.vue
  4. 36
      src/views/order/AddOrder.vue

@ -25,6 +25,7 @@ export default {
orderUpdate: `nakadai/nakadai/order/update`,// 订单更新
renew: `nakadai/nakadai/orderOther/renew`,// 续费信息管理-post
ship: `nakadai/nakadai/orderOther/ship`,// 处理时的订单发货管理-post
bulkShipping: `nakadai/nakadai/orderOther/bulkShipping`,
getOrderOtherTime: `nakadai/nakadai/orderOther/getOrderOtherTime`,
// 客户管理

@ -323,7 +323,7 @@
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="55">
<template slot-scope="scope">
<i class="el-icon-delete rm" @click="delProject(scope.$index)"></i>
<i class="el-icon-delete rm" @click="delProject(scope.$index, scope.row)"></i>
</template>
</el-table-column>
</el-table>
@ -613,30 +613,28 @@ export default {
const result = []
list.map(e => {
//
if (!checked.find(n => n.systemId == e.systemId)) {
// if (!checked.find(n => n.systemId == e.systemId)) {
e.check = false
result.push(e)
}
// }
})
this.systems = result
list.length && this.getProject(result[0])
result.length && this.getProject(result[0])
}).catch(err => {})
},
//
getProject(item) {
const { check } = item //
const checked = this.permissions ? this.assessmentData : this.practiceData
const checked = this.checkeds
this.curSystem = item.systemId
this.$get(`${this.api.getInternalProjectBySystemId}?permissions=${this.permissions}&systemId=${item.systemId}`).then(res => {
this.projectAll = JSON.parse(JSON.stringify(res)) //
const result = []
res.map(e => {
//
if (!checked.find(n => n.projectId == e.projectId && n.systemId == e.systemId)) {
e.type = item.type ? '流程类' : '编程类'
e.check = check
//
const include = checked.some(n => n.projectId == e.projectId && n.systemId == e.systemId)
e.check = include
result.push(e)
}
})
this.projects = result
}).catch(err => {})
@ -651,13 +649,19 @@ export default {
//
const { projects, checkeds } = this
if (projects.length && projects[0].systemId == item.systemId) {
projects.map(e => e.check = val)
projects.map(e => {
e.check = val
})
}
this.projectKeyword = ''
this.$get(`${this.api.getInternalProjectBySystemId}?permissions=${this.permissions}&systemId=${item.systemId}`).then(res => {
if (val) {
res.map(e => e.type = item.type ? '流程类' : '编程类')
checkeds.push(...res)
res.map(e => {
if (!checkeds.find(n => n.projectId == e.projectId && n.systemId == e.systemId)) {
e.type = item.type ? '流程类' : '编程类'
checkeds.push(e)
}
})
} else {
res.map(e => {
const i = checkeds.findIndex(n => n.projectId == e.projectId && n.systemId == e.systemId)
@ -688,11 +692,20 @@ export default {
this.checkeds = this.checkedAll.filter(e => e.projectName.includes(val))
},
//
delProject(i) {
delProject(i, e) {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.checkeds.splice(i, 1)
// checkdisabled
if (e.systemId == this.curSystem) {
const { projectId } = e
this.projects.map(n => {
if (n.projectId == projectId) {
n.check = false
}
})
}
}).catch(() => {})
},
//

@ -156,6 +156,7 @@
:before-filter="beforeFilter"
:options="rangeList"
@change="rangeChange"
@visible-change="rangeViChange"
@input.native="rangeSearch"></el-cascader>
<el-tag
v-for="(tag, i) in rangeChecked"
@ -250,7 +251,7 @@ export default {
e.value = e.provinceId
e.label = e.provinceName
e.children = []
e.disabled = !!checked.find(n => n.provinceId == e.provinceId)
e.disabled = !!checked.find(n => n.provinceId == e.provinceId && !n.cityId)
data.push(e)
})
resolve(data)
@ -265,7 +266,7 @@ export default {
e.value = e.cityId
e.label = e.cityName
e.children = []
e.disabled = !!checked.find(n => n.cityId == e.cityId)
e.disabled = !!checked.find(n => n.cityId == e.cityId && n.provinceId == e.provinceId && !n.schoolId)
data.push(e)
})
resolve(data)
@ -282,7 +283,7 @@ export default {
e.value = e.schoolId
e.label = e.schoolName
e.leaf = true
e.disabled = !!checked.find(n => n.schoolId == e.schoolId)
e.disabled = !!checked.find(n => n.schoolId == e.schoolId && n.cityId == e.cityId && n.provinceId == e.provinceId)
data.push(e)
})
resolve(data)
@ -390,10 +391,17 @@ export default {
const name = []
const { rangeChecked } = this
checked.map(e => {
rangeChecked.find(n => n.value === e.value) || name.push(e.data) // push
rangeChecked.find(n => n.value === e.value && n.label == e.label) || name.push(e.data) // push
})
this.rangeChecked.push(...name)
},
//
rangeViChange(e) {
//
if (e) {
this.rangeList = []
}
},
//
getSchool() {
this.$get(this.api.querySchoolData).then(({ list }) => {

@ -114,10 +114,13 @@
<p class="addhr_tag"></p>
<span>课程权限</span>
</div>
<el-button v-if="!viewDisabled&&!editDisabled&&!renewDisabled" type="primary" round
class="mag"
@click="addCourseJurisdiction()">添加
</el-button>
<div>
<template v-if="!viewDisabled && !renewDisabled && coursePermissions.length">
<el-button v-if="coursePermissions.find(e => !e.ship)" type="primary" round @click="batchDeliver(1, 0)">一键发货</el-button>
<el-button v-else type="primary" round @click="batchDeliver(0, 0)">取消全部发货</el-button>
</template>
<el-button v-if="!viewDisabled&&!editDisabled&&!renewDisabled" type="primary" round @click="addCourseJurisdiction()">添加</el-button>
</div>
</div>
<el-table :data="coursePermissions" class="orderTable" stripe header-align="center">
@ -233,7 +236,7 @@
3处理中的订单显示发货不显示禁用
-->
<el-switch
v-if="scope.row.status === 1 || !scope.row.ship"
v-if="scope.row.status === 1 || dispose || isAdd"
style="margin-right:10px;"
v-model="scope.row.ship"
:active-value="1"
@ -266,9 +269,13 @@
<p class="addhr_tag"></p>
<span>数据平台权限</span>
</div>
<el-button v-if="!viewDisabled&&!editDisabled&&!renewDisabled" type="primary"
round class="mag" @click="addDataJurisdiction()">添加
</el-button>
<div>
<template v-if="!viewDisabled && !renewDisabled && dataPlatformPermissions.length">
<el-button v-if="dataPlatformPermissions.find(e => !e.ship)" type="primary" round @click="batchDeliver(1, 1)">一键发货</el-button>
<el-button v-else type="primary" round @click="batchDeliver(0, 1)">取消全部发货</el-button>
</template>
<el-button v-if="!viewDisabled&&!editDisabled&&!renewDisabled" type="primary" round class="mag" @click="addDataJurisdiction()">添加</el-button>
</div>
</div>
<!--:summary-method="getSummaries"-->
@ -406,7 +413,7 @@
style="margin-right:10px;"
>删除</el-button>
<el-switch
v-if="scope.row.status === 1 || !scope.row.ship"
v-if="scope.row.status === 1 || dispose || isAdd"
style="margin-right:10px;"
v-model="scope.row.ship"
:active-value="1"
@ -966,7 +973,6 @@ export default {
if (e.status === 3) e.isEnable = 0 //
return e;
});//
console.log(33, list)
this.coursePermissions = list.filter(i => i.authority === 1);
this.dataPlatformPermissions = list.filter(i => i.authority === 0);
},
@ -1350,6 +1356,16 @@ console.log(33, list)
// /-
handleEnable(e, row) {
},
//
batchDeliver(ship, data) {
const list = data ? this.dataPlatformPermissions : this.coursePermissions
list.map(e => e.ship = ship)
if (this.editDisabled) {
this.$post(this.api.bulkShipping, {
orderOthers: list
}).then(res => {})
}
},
// /-
handleDeliver(e, row) {

Loading…
Cancel
Save