|
|
|
@ -118,9 +118,8 @@ |
|
|
|
|
<div> |
|
|
|
|
<!-- 处理中 || 有未生效的课程 || (新增订单 && 有课程) --> |
|
|
|
|
<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-if="pageTypes" v-auth="'/order:发货'" type="primary" round @click="batchDeliver(0, 0)">取消全部发货</el-button> |
|
|
|
|
|
|
|
|
|
<el-button v-if="coursePermissions.find(e => !e.ship)" v-auth="'/order:发货'" type="primary" round @click="batchDeliver(1, 0,1)">一键发货</el-button> |
|
|
|
|
<el-button v-if="pageTypes" v-auth="'/order:发货'" type="primary" round @click="batchDeliver(0, 0,1)">取消全部发货</el-button> |
|
|
|
|
</template> |
|
|
|
|
<el-button v-if="!viewDisabled&&!editDisabled&&!renewDisabled" type="primary" round @click="addCourseJurisdiction()">添加</el-button> |
|
|
|
|
</div> |
|
|
|
@ -247,7 +246,7 @@ |
|
|
|
|
:inactive-value="0" |
|
|
|
|
:active-text="scope.row.ship ? '已发货' : '未发货'" |
|
|
|
|
:disabled="viewDisabled" |
|
|
|
|
@change="handleDeliver($event,scope.row)"> |
|
|
|
|
@change="handleDeliver($event,scope.row,1)"> |
|
|
|
|
</el-switch> |
|
|
|
|
<el-switch |
|
|
|
|
v-else |
|
|
|
@ -256,7 +255,7 @@ |
|
|
|
|
:active-value="1" |
|
|
|
|
:inactive-value="0" |
|
|
|
|
:active-text="scope.row.isEnable ? '启用' : '禁用'" |
|
|
|
|
@change="handleEnable($event,scope.row)"> |
|
|
|
|
@change="handleEnable($event,scope.row,1)"> |
|
|
|
|
</el-switch> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
@ -276,8 +275,8 @@ |
|
|
|
|
<div> |
|
|
|
|
<!-- 处理中 || 有未生效的课程 || (新增订单 && 有课程) --> |
|
|
|
|
<template v-if="!viewDisabled && (dispose || dataPlatformPermissions.find(e => e.status == 1) || (isAdd && dataPlatformPermissions.length))"> |
|
|
|
|
<el-button v-if="dataPlatformPermissions.find(e => !e.ship)" v-auth="'/order:发货'" type="primary" round @click="batchDeliver(1, 1)">一键发货</el-button> |
|
|
|
|
<el-button v-else v-auth="'/order:发货'" type="primary" round @click="batchDeliver(0, 1)">取消全部发货</el-button> |
|
|
|
|
<el-button v-if="dataPlatformPermissions.find(e => !e.ship)" v-auth="'/order:发货'" type="primary" round @click="batchDeliver(1, 1,2)">一键发货</el-button> |
|
|
|
|
<el-button v-if="dataPageTypes" v-auth="'/order:发货'" type="primary" round @click="batchDeliver(0, 1,2)">取消全部发货</el-button> |
|
|
|
|
</template> |
|
|
|
|
<el-button v-if="!viewDisabled&&!editDisabled&&!renewDisabled" type="primary" round class="mag" @click="addDataJurisdiction()">添加</el-button> |
|
|
|
|
</div> |
|
|
|
@ -418,14 +417,14 @@ |
|
|
|
|
style="margin-right:10px;" |
|
|
|
|
>删除</el-button> |
|
|
|
|
<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" |
|
|
|
|
:active-value="1" |
|
|
|
|
:inactive-value="0" |
|
|
|
|
:active-text="scope.row.ship ? '已发货' : '未发货'" |
|
|
|
|
@change="handleDeliver($event,scope.row)"> |
|
|
|
|
@change="handleDeliver($event,scope.row,2)"> |
|
|
|
|
</el-switch> |
|
|
|
|
<el-switch |
|
|
|
|
v-else |
|
|
|
@ -434,7 +433,7 @@ |
|
|
|
|
:active-value="1" |
|
|
|
|
:inactive-value="0" |
|
|
|
|
:active-text="scope.row.isEnable ? '启用' : '禁用'" |
|
|
|
|
@change="handleEnable($event,scope.row)"> |
|
|
|
|
@change="handleEnable($event,scope.row,2)"> |
|
|
|
|
</el-switch> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
@ -454,8 +453,8 @@ |
|
|
|
|
<div> |
|
|
|
|
<!-- 处理中 || 有未生效的课程 || (新增订单 && 有课程) --> |
|
|
|
|
<template v-if="!viewDisabled && (dispose || valuePermissions.find(e => e.status == 1) || (isAdd && valuePermissions.length))"> |
|
|
|
|
<el-button v-if="valuePermissions.find(e => !e.ship)" v-auth="'/order:发货'" type="primary" round @click="batchDeliver(1, 2)">一键发货</el-button> |
|
|
|
|
<el-button v-else v-auth="'/order:发货'" type="primary" round @click="batchDeliver(0, 2)">取消全部发货</el-button> |
|
|
|
|
<el-button v-if="valuePermissions.find(e => !e.ship)" v-auth="'/order:发货'" type="primary" round @click="batchDeliver(1, 2,3)">一键发货</el-button> |
|
|
|
|
<el-button v-if="modelPageTypes" v-auth="'/order:发货'" type="primary" round @click="batchDeliver(0, 2,3)">取消全部发货</el-button> |
|
|
|
|
</template> |
|
|
|
|
<el-button v-if="!viewDisabled&&!editDisabled&&!renewDisabled" type="primary" round class="mag" @click="addValueJurisdiction()">添加</el-button> |
|
|
|
|
</div> |
|
|
|
@ -568,14 +567,14 @@ |
|
|
|
|
style="margin-right:10px;" |
|
|
|
|
>删除</el-button> |
|
|
|
|
<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" |
|
|
|
|
:active-value="1" |
|
|
|
|
:inactive-value="0" |
|
|
|
|
:active-text="scope.row.ship ? '已发货' : '未发货'" |
|
|
|
|
@change="handleDeliver($event,scope.row)"> |
|
|
|
|
@change="handleDeliver($event,scope.row,3)"> |
|
|
|
|
</el-switch> |
|
|
|
|
<el-switch |
|
|
|
|
v-else |
|
|
|
@ -584,7 +583,7 @@ |
|
|
|
|
:active-value="1" |
|
|
|
|
:inactive-value="0" |
|
|
|
|
:active-text="scope.row.isEnable ? '启用' : '禁用'" |
|
|
|
|
@change="handleEnable($event,scope.row)"> |
|
|
|
|
@change="handleEnable($event,scope.row,3)"> |
|
|
|
|
</el-switch> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
@ -822,6 +821,8 @@ export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
pageTypes: false, |
|
|
|
|
dataPageTypes: false, |
|
|
|
|
modelPageTypes:false, |
|
|
|
|
loading: false,// 页面加载 |
|
|
|
|
isAdd: false, // 是否添加 |
|
|
|
|
viewDisabled: false,// 查看禁用 |
|
|
|
@ -1652,18 +1653,35 @@ export default { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 课程/数据平台-启用 |
|
|
|
|
handleEnable(e, row) { |
|
|
|
|
console.log('1111=>',e) |
|
|
|
|
console.log('row=>',row) |
|
|
|
|
handleEnable(e, row,type) { |
|
|
|
|
if (row.isEnable === 0 ) { |
|
|
|
|
if(type === 1) { |
|
|
|
|
this.pageTypes = false |
|
|
|
|
}else if(type === 2) { |
|
|
|
|
this.dataPageTypes = false |
|
|
|
|
}else { |
|
|
|
|
this.modelPageTypes = false |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
if(type === 1) { |
|
|
|
|
this.pageTypes = false |
|
|
|
|
}else if(type === 2) { |
|
|
|
|
this.dataPageTypes = false |
|
|
|
|
}else { |
|
|
|
|
this.modelPageTypes = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 一键发货 |
|
|
|
|
batchDeliver(ship, data) { |
|
|
|
|
batchDeliver(ship, data,type) { |
|
|
|
|
if (type === 1) { |
|
|
|
|
this.pageTypes = !this.pageTypes |
|
|
|
|
}else if (type ==2) { |
|
|
|
|
this.dataPageTypes = !this.dataPageTypes |
|
|
|
|
}else { |
|
|
|
|
this.modelPageTypes = !this.modelPageTypes |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const list = data == 1 ? |
|
|
|
|
this.dataPlatformPermissions : |
|
|
|
|
data == 2 ? |
|
|
|
@ -1683,12 +1701,24 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 课程/数据平台-发货 |
|
|
|
|
handleDeliver(e, row) { |
|
|
|
|
handleDeliver(e, row,type) { |
|
|
|
|
if(row.ship === 1) { |
|
|
|
|
row.isEnable = 1 |
|
|
|
|
this.pageType = true |
|
|
|
|
if(type === 1) { |
|
|
|
|
this.pageTypes = true |
|
|
|
|
}else if(type === 2) { |
|
|
|
|
this.dataPageTypes = true |
|
|
|
|
}else { |
|
|
|
|
this.modelPageTypes = true |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
if(type === 1) { |
|
|
|
|
this.pageTypes = true |
|
|
|
|
}else if(type === 2) { |
|
|
|
|
this.dataPageTypes = true |
|
|
|
|
}else { |
|
|
|
|
this.pageType = false |
|
|
|
|
this.modelPageTypes = true |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 如果非数字,则返回0 |
|
|
|
|