|
|
|
@ -118,7 +118,8 @@ |
|
|
|
|
<!-- 处理中 || 有未生效的课程 || (新增订单 && 有课程) --> |
|
|
|
|
<template v-if="!viewDisabled && (dispose || coursePermissions.find(e => e.status == 1) || (isAdd && coursePermissions.length))"> |
|
|
|
|
<el-button v-if="coursePermissions.find(e => !e.ship)" v-auth="'/order:发货'" type="primary" round @click="batchDeliver(1, 0)">一键发货</el-button> |
|
|
|
|
<el-button v-else v-auth="'/order:发货'" type="primary" round @click="batchDeliver(0, 0)">取消全部发货</el-button> |
|
|
|
|
<el-button v-if="pageTypes" v-auth="'/order:发货'" 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> |
|
|
|
@ -237,7 +238,7 @@ |
|
|
|
|
3、处理中的订单显示发货,不显示禁用 |
|
|
|
|
--> |
|
|
|
|
<el-switch |
|
|
|
|
v-if="scope.row.status === 1 || dispose || isAdd" |
|
|
|
|
v-if="scope.row.ship === 0 || dispose || isAdd " |
|
|
|
|
v-auth="'/order:发货'" |
|
|
|
|
style="margin-right:10px;" |
|
|
|
|
v-model="scope.row.ship" |
|
|
|
@ -819,6 +820,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
pageTypes: false, |
|
|
|
|
loading: false,// 页面加载 |
|
|
|
|
isAdd: false, // 是否添加 |
|
|
|
|
viewDisabled: false,// 查看禁用 |
|
|
|
@ -985,7 +987,7 @@ export default { |
|
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
|
this.getDataJurisdiction(); |
|
|
|
|
}, 500); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
async created() { |
|
|
|
|
this.getTeam() |
|
|
|
@ -1207,7 +1209,8 @@ export default { |
|
|
|
|
if (this.coursePermissions.length) { |
|
|
|
|
let courseVerify = |
|
|
|
|
this.coursePermissions.some(e => { |
|
|
|
|
if (!e.periodOfUse || e.finalPrice === '') { |
|
|
|
|
// if (!e.periodOfUse || e.finalPrice === '') { |
|
|
|
|
if (!e.periodOfUse || e.finalPrice === '' || !e.startTime) { |
|
|
|
|
return false; |
|
|
|
|
} else { |
|
|
|
|
const curPurchase = +e.settlementPrice + (e.settlementPrice * (this.rate / 100)) |
|
|
|
@ -1292,6 +1295,7 @@ export default { |
|
|
|
|
orderOther: tempArr//俩列表 |
|
|
|
|
}; |
|
|
|
|
this.loading = true; |
|
|
|
|
console.log(param) |
|
|
|
|
if (this.editDisabled) { |
|
|
|
|
this.$post(this.api.orderUpdate, param).then(res => { |
|
|
|
|
this.refreshCache() |
|
|
|
@ -1410,7 +1414,7 @@ export default { |
|
|
|
|
discountRate: "",// 折扣率 |
|
|
|
|
accountNum: "",// 账号数 |
|
|
|
|
totalAmount: "",// 总价 |
|
|
|
|
isEnable: 1, // 启用否:1启用,0禁用 |
|
|
|
|
isEnable: 0, // 启用否:1启用,0禁用 |
|
|
|
|
ship: 0,// 发货否(0未发货,1已发货,默认不发货) |
|
|
|
|
authority: 1, // 区分权限 0为数据平台权限,1为课程权限 |
|
|
|
|
options: 1, |
|
|
|
@ -1647,16 +1651,28 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 课程/数据平台-启用 |
|
|
|
|
handleEnable(e, row) { |
|
|
|
|
|
|
|
|
|
console.log('1111=>',e) |
|
|
|
|
console.log('row=>',row) |
|
|
|
|
if (row.isEnable === 0 ) { |
|
|
|
|
this.pageTypes = false |
|
|
|
|
}else { |
|
|
|
|
this.pageTypes = false |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 一键发货 |
|
|
|
|
batchDeliver(ship, data) { |
|
|
|
|
this.pageTypes = !this.pageTypes |
|
|
|
|
const list = data == 1 ? |
|
|
|
|
this.dataPlatformPermissions : |
|
|
|
|
data == 2 ? |
|
|
|
|
this.valuePermissions : |
|
|
|
|
this.coursePermissions |
|
|
|
|
list.map(e => e.ship = ship) |
|
|
|
|
list.map(e => { |
|
|
|
|
e.ship = ship |
|
|
|
|
if(e.ship === 1) { |
|
|
|
|
e.isEnable = 1 |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
if (this.editDisabled) { |
|
|
|
|
// this.refreshCache() |
|
|
|
|
// this.$post(this.api.bulkShipping, { |
|
|
|
@ -1666,9 +1682,11 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 课程/数据平台-发货 |
|
|
|
|
handleDeliver(e, row) { |
|
|
|
|
if (this.editDisabled) { |
|
|
|
|
// this.refreshCache() |
|
|
|
|
// this.$post(this.api.ship,row).then(res => {}); |
|
|
|
|
if(row.ship === 1) { |
|
|
|
|
row.isEnable = 1 |
|
|
|
|
this.pageType = true |
|
|
|
|
}else { |
|
|
|
|
this.pageType = false |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 如果非数字,则返回0 |
|
|
|
|