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))">
<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, // 10
isEnable: 0, // 10
ship: 0,// 01
authority: 1, // 01
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

Loading…
Cancel
Save