dev_202304
wangchenguang 2 years ago
parent 24ddbdf2ca
commit ab306e452f
  1. 38
      src/views/order/AddOrder.vue

@ -118,7 +118,8 @@
<!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 --> <!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 -->
<template v-if="!viewDisabled && (dispose || coursePermissions.find(e => e.status == 1) || (isAdd && coursePermissions.length))"> <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="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> </template>
<el-button v-if="!viewDisabled&&!editDisabled&&!renewDisabled" type="primary" round @click="addCourseJurisdiction()">添加</el-button> <el-button v-if="!viewDisabled&&!editDisabled&&!renewDisabled" type="primary" round @click="addCourseJurisdiction()">添加</el-button>
</div> </div>
@ -237,7 +238,7 @@
3处理中的订单显示发货不显示禁用 3处理中的订单显示发货不显示禁用
--> -->
<el-switch <el-switch
v-if="scope.row.status === 1 || dispose || isAdd" v-if="scope.row.ship === 0 || dispose || isAdd "
v-auth="'/order:发货'" v-auth="'/order:发货'"
style="margin-right:10px;" style="margin-right:10px;"
v-model="scope.row.ship" v-model="scope.row.ship"
@ -819,6 +820,7 @@ export default {
}, },
data() { data() {
return { return {
pageTypes: false,
loading: false,// loading: false,//
isAdd: false, // isAdd: false, //
viewDisabled: false,// viewDisabled: false,//
@ -985,7 +987,7 @@ export default {
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.getDataJurisdiction(); this.getDataJurisdiction();
}, 500); }, 500);
} },
}, },
async created() { async created() {
this.getTeam() this.getTeam()
@ -1207,7 +1209,8 @@ export default {
if (this.coursePermissions.length) { if (this.coursePermissions.length) {
let courseVerify = let courseVerify =
this.coursePermissions.some(e => { this.coursePermissions.some(e => {
if (!e.periodOfUse || e.finalPrice === '') { // if (!e.periodOfUse || e.finalPrice === '') {
if (!e.periodOfUse || e.finalPrice === '' || !e.startTime) {
return false; return false;
} else { } else {
const curPurchase = +e.settlementPrice + (e.settlementPrice * (this.rate / 100)) const curPurchase = +e.settlementPrice + (e.settlementPrice * (this.rate / 100))
@ -1292,6 +1295,7 @@ export default {
orderOther: tempArr// orderOther: tempArr//
}; };
this.loading = true; this.loading = true;
console.log(param)
if (this.editDisabled) { if (this.editDisabled) {
this.$post(this.api.orderUpdate, param).then(res => { this.$post(this.api.orderUpdate, param).then(res => {
this.refreshCache() this.refreshCache()
@ -1410,7 +1414,7 @@ export default {
discountRate: "",// discountRate: "",//
accountNum: "",// accountNum: "",//
totalAmount: "",// totalAmount: "",//
isEnable: 1, // 10 isEnable: 0, // 10
ship: 0,// 01 ship: 0,// 01
authority: 1, // 01 authority: 1, // 01
options: 1, options: 1,
@ -1647,16 +1651,28 @@ export default {
}, },
// /- // /-
handleEnable(e, row) { 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) { batchDeliver(ship, data) {
this.pageTypes = !this.pageTypes
const list = data == 1 ? const list = data == 1 ?
this.dataPlatformPermissions : this.dataPlatformPermissions :
data == 2 ? data == 2 ?
this.valuePermissions : this.valuePermissions :
this.coursePermissions this.coursePermissions
list.map(e => e.ship = ship) list.map(e => {
e.ship = ship
if(e.ship === 1) {
e.isEnable = 1
}
})
if (this.editDisabled) { if (this.editDisabled) {
// this.refreshCache() // this.refreshCache()
// this.$post(this.api.bulkShipping, { // this.$post(this.api.bulkShipping, {
@ -1666,9 +1682,11 @@ export default {
}, },
// /- // /-
handleDeliver(e, row) { handleDeliver(e, row) {
if (this.editDisabled) { if(row.ship === 1) {
// this.refreshCache() row.isEnable = 1
// this.$post(this.api.ship,row).then(res => {}); this.pageType = true
}else {
this.pageType = false
} }
}, },
// 0 // 0

Loading…
Cancel
Save