Commit ff7452c4 authored by 高宇's avatar 高宇

删除菜单

parent d9a999ba
...@@ -337,7 +337,17 @@ ...@@ -337,7 +337,17 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 登录验证--> <el-dialog title="菜单权限" :visible.sync="menu" width="500px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="menuform" label-width="80px">
<el-form-item label="密码">
<el-input v-model="menuform.passWord" type="password" placeholder="请输入权限菜单密码" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handlemenuConfirm">确定</el-button>
</el-form-item>
</el-form>
</el-dialog>
<!-- 菜单权限验证-->
<el-dialog :title="title" :visible.sync="openLogin" width="500px" append-to-body :close-on-click-modal="false"> <el-dialog :title="title" :visible.sync="openLogin" width="500px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="loginform" label-width="80px"> <el-form ref="form" :model="loginform" label-width="80px">
<el-form-item label="密码"> <el-form-item label="密码">
...@@ -358,6 +368,11 @@ export default { ...@@ -358,6 +368,11 @@ export default {
name: 'Draw', name: 'Draw',
data() { data() {
return { return {
menu: false,
menuform: {
},
monthDate: false,
// 是否切换库 // 是否切换库
isCheck: false, isCheck: false,
loginform: { loginform: {
...@@ -488,6 +503,41 @@ export default { ...@@ -488,6 +503,41 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
handlemenuConfirm() {
const obj = {
passWord: this.menuform.passWord
}
checkPermission(obj).then(res => {
if (res.code === 200) {
console.log('canceList',this.canceList)
batchAddition(this.canceList).then(res => {
if (res.code === 200) {
this.loadingDetail = false
this.openHandle = false
this.radio1 = '2'
this.isCheck = false
this.$message.success('操作成功')
this.queryParams.page = 1
this.getList()
}
})
this.menuform.password = ''
} else if (res.code === null) {
this.$message.warning(res.message)
this.loadingDetail = false
this.multipleSelection = false
this.monthDate = false
this.menu = false
}
})
},
// 判断时间范围 是否是一个月以内的的时间
isWithinLastMonth(dateToCheck) {
var currentDate = new Date() // 当前日期对象
var oneMonthAgo = new Date() // 一个月前的日期对象
oneMonthAgo.setMonth(currentDate.getMonth() - 1) // 将一个月前的日期设置为当前月份减1
return dateToCheck >= oneMonthAgo && dateToCheck <= currentDate
},
handlecanceClose() { handlecanceClose() {
this.loadingDetail = false this.loadingDetail = false
this.openHandle = false this.openHandle = false
...@@ -584,6 +634,10 @@ export default { ...@@ -584,6 +634,10 @@ export default {
this.canceList = [] this.canceList = []
this.multipleSelection.forEach(item => { this.multipleSelection.forEach(item => {
console.log('item', item) console.log('item', item)
if (!this.isWithinLastMonth(new Date(item.recycleDate))) {
this.monthDate = true
this.openHandle = false
}
const obj = { const obj = {
applyId: this.applyId, applyId: this.applyId,
pn: item.pn, pn: item.pn,
...@@ -597,17 +651,23 @@ export default { ...@@ -597,17 +651,23 @@ export default {
this.canceList.push(obj) this.canceList.push(obj)
}) })
console.log('canceList', this.canceList) console.log('canceList', this.canceList)
batchAddition(this.canceList).then(res => { console.log('monthDate', this.monthDate)
if (res.code === 200) { if (this.monthDate) {
this.loadingDetail = false this.menu = true
this.openHandle = false }
this.radio1 = '2' if (!this.monthDate) {
this.isCheck = false batchAddition(this.canceList).then(res => {
this.$message.success('操作成功') if (res.code === 200) {
this.queryParams.page = 1 this.loadingDetail = false
this.getList() this.openHandle = false
} this.radio1 = '2'
}) this.isCheck = false
this.$message.success('操作成功')
this.queryParams.page = 1
this.getList()
}
})
}
} }
}, },
/** 查询warehouse列表 */ /** 查询warehouse列表 */
...@@ -643,6 +703,7 @@ export default { ...@@ -643,6 +703,7 @@ export default {
}, },
handle(row) { handle(row) {
console.log('row', row) console.log('row', row)
this.monthDate = false
this.applyId = row.businessId this.applyId = row.businessId
this.pn = row.pn this.pn = row.pn
this.ptype = row.ptype this.ptype = row.ptype
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment