修复完bug

dev_202304
wangchenguang 2 years ago
parent b088266bb9
commit d75055662b
  1. 19
      1.html
  2. 9
      src/views/customer/AddCustomer.vue
  3. 80
      src/views/order/AddOrder.vue
  4. 1
      src/views/parnerOperation/learnMg.vue

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
const list = [1,2,3,4]
console.log(111)
list.map(i=>{
const a = i*3
})
console.log(2222)
</script>
</body>
</html>

@ -557,6 +557,7 @@ export default {
const { productTypeList } = this
data.map(e => {
const list = e.startAndEndTimeList
console.log('list=>', list)
if (list) {
let connect = true //
list.map((n, i) => {
@ -626,13 +627,18 @@ export default {
date.setSeconds(0)
e.remain = e.status === '已过期' ? 0 : this.getRemain(date.getTime(), e.endTime) //
e.startAndEndTime = e.status === '已过期' ? '' : e.startTime + ' ~ ' + e.endTime
e.productTypeName = productTypeList.find(n => n.id === e.productType).name
const isHave = productTypeList.find(n => n.id === e.productType)
console.log('ishave=>',isHave)
if (isHave) {
e.productTypeName = isHave.name
}
// 1 0
e.isEnable = (e.status === '未生效' || e.status === '已过期' || !e.orderEnable) ?
0 :
1
}
})
console.log('this.productAll=>',data)
this.productAll = data
this.totalProduct = data.length
this.handlePage()
@ -654,6 +660,7 @@ export default {
//
filterForm2() {
const list = this.productAll
console.log('this.productAll=>', this.productAll)
const { productType, status, keyword } = this.form2
this.products = list.filter(e => (productType === '' || productType === e.productType) && (e.status === status || status === '全部') && e.productName.includes(keyword))
},

@ -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 ) {
this.pageTypes = false
if(type === 1) {
this.pageTypes = false
}else if(type === 2) {
this.dataPageTypes = false
}else {
this.modelPageTypes = false
}
}else {
this.pageTypes = false
if(type === 1) {
this.pageTypes = false
}else if(type === 2) {
this.dataPageTypes = false
}else {
this.modelPageTypes = false
}
}
},
//
batchDeliver(ship, data) {
this.pageTypes = !this.pageTypes
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 {
this.pageType = false
if(type === 1) {
this.pageTypes = true
}else if(type === 2) {
this.dataPageTypes = true
}else {
this.modelPageTypes = true
}
}
},
// 0

@ -656,6 +656,7 @@ export default {
submit(isRelease, next) {
if (this.submiting) return false
const form = JSON.parse(JSON.stringify(this.form))
console.log('form=>',form)
if (!form.title) return Util.errorMsg('请填写标题')
if (this.nameRepeat) return Util.errorMsg('该标题已重复!')
//

Loading…
Cancel
Save