Commit f52ef551 authored by 高宇's avatar 高宇

删除菜单

parent 97d379ec
......@@ -71,6 +71,7 @@
<el-col :span="12">
<el-form-item style="flex-basis: 50%;">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button style="padding: 8px 7px;" icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
</el-form-item>
</el-col>
</el-row>
......@@ -134,6 +135,16 @@ export default {
this.init()
},
methods: {
resetQuery(){
this.form = {
pn: '',
phd: '',
prank: '',
pgx: '',
pissb: ''
}
sessionStorage.setItem('applicationForm', JSON.stringify(this.form))
},
handelTab(i, e) {
const that = this
if (!that.$refs['input' + i]) {
......
......@@ -380,14 +380,11 @@
</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" @close="handleClose">
<div style="text-align: center">
<span style="font-size: 15px">该操作需要权限认证</span>
</div>
<el-form ref="form" :model="loginform" label-width="80px">
<el-form-item class="premissVerificationTitle" style="margin: 0;">
当前选择跨越设备需要权限密码
</el-form-item>
<el-form-item label="密码">
<el-input v-model="loginform.password" type="password" placeholder="请输入密码" />
</el-form-item>
......@@ -413,6 +410,7 @@ export default {
name: 'Draw',
data() {
return {
number: '',
monthDate: false,
// 是否切换库
isCheck: false,
......@@ -524,12 +522,23 @@ export default {
this.getList()
},
methods: {
handleClose() {
this.openLogin = false
this.openHandle = true
this.loadingDetail = false
},
// 判断时间范围 是否是一个月以内的的时间
isWithinLastMonth(dateToCheck) {
var currentDate = new Date() // 当前日期对象
var oneMonthAgo = new Date() // 一个月前的日期对象
oneMonthAgo.setMonth(currentDate.getMonth() - 1) // 将一个月前的日期设置为当前月份减1
return dateToCheck >= oneMonthAgo && dateToCheck <= currentDate
// 获取当前日期
const currentDate = new Date();
// 获取当前日期的年份和月份
const currentYear = currentDate.getFullYear()
const currentMonth = currentDate.getMonth()
// 获取要比较日期的年份和月份
const compareYear = dateToCheck.getFullYear()
const compareMonth = dateToCheck.getMonth()
// 比较年份和月份是否相等
return currentYear === compareYear && currentMonth === compareMonth
},
handlecanceClose() {
this.loadingDetail = false
......@@ -577,13 +586,13 @@ export default {
this.queryParams.page = 1
this.getList()
this.loginform.password = ''
} else if (res.code === null) {
this.$message.warning(res.$message)
this.loginform.password = ''
this.openHandle = true
this.openLogin = false
}
})
} else if (res.code === null) {
this.$message.warning(res.message)
this.loginform.password = ''
this.openHandle = true
this.openLogin = false
}
})
},
......@@ -615,6 +624,12 @@ export default {
this.canceList.push(obj)
})
if (this.canceList.length !== this.number) {
this.openHandle = true
this.loadingDetail = false
return this.$message.warning('您选择的设备数据不符合您申请设备的数量')
}
console.log('canceList', this.canceList)
if (this.monthDate) {
this.openLogin = true
......@@ -671,6 +686,7 @@ export default {
handle(row) {
const id = row.businessId
this.singleDetails = row
this.number = row.pnumber
this.openHandle = true
this.applyId = row.businessId
this.pn = row.pn
......
......@@ -78,6 +78,7 @@
<el-col :span="12">
<el-form-item style="flex-basis: 50%;">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button style="padding: 8px 7px;" icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
</el-form-item>
</el-col>
</el-row>
......@@ -151,6 +152,19 @@ export default {
this.init()
},
methods: {
// 重置
resetQuery() {
this.form = {
pn: '',
lot: '',
plocation: '',
phd: '',
flag: 1,
ptype: 1,
pstatus: 0
}
this.tableData = []
},
handleDelete(row) {
this.form = {
pn: '',
......@@ -289,6 +303,8 @@ export default {
prank: ''
}
this.$refs.form.clearValidate()
sessionStorage.setItem('inComeForm', JSON.stringify(this.form))
sessionStorage.setItem('inComeTableData', JSON.stringify(this.tableData))
},
// 初始化要调的接口
init() {
......
......@@ -56,6 +56,7 @@
<el-col :span="12">
<el-form-item style="flex-basis: 50%;">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button style="padding: 8px 7px;" icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
</el-form-item>
</el-col>
</el-row>
......@@ -131,6 +132,21 @@ export default {
}
},
methods: {
resetQuery() {
this.form = {
pn: '',
lot: '',
plocation: '',
phd: '',
psm: '',
pzl: '',
prank: '',
flag: 1,
ptype: '',
pstatus: 0
}
sessionStorage.setItem('recycleform', JSON.stringify(this.form))
},
// 回车跳转下一个输入框
focusNextInput(form) {
this.$nextTick(() => {
......
......@@ -372,17 +372,10 @@
</el-table-column>
<el-table-column label="入库日期" prop="recycleDate">
<template slot-scope="scope">
{{ scope.row.recycleDate.substring(0, 7) }}
{{ parseTime(scope.row.recycleDate,'{y}-{m}-{d}') }}
</template>
</el-table-column>
</el-table>
<pagination
v-show="totalDetail>0"
:total="totalDetail"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getDeviceList"
/>
<div style="float: right;padding:3px 15px;">
<el-button
type="primary"
......@@ -392,7 +385,7 @@
</div>
</el-dialog>
<el-dialog title="权限校验" :visible.sync="menu" width="500px" append-to-body :close-on-click-modal="false">
<el-dialog title="权限校验" :visible.sync="menu" width="500px" append-to-body :close-on-click-modal="false" @close="handlemenuClose">
<div style="text-align: center">
<span style="font-size: 15px">当前选择跨越设备需要权限密码</span>
</div>
......@@ -406,7 +399,7 @@
</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" @close="handleClose">
<div style="text-align: center">
<span style="font-size: 15px">该操作需要权限认证</span>
</div>
......@@ -429,6 +422,7 @@ export default {
name: 'Draw',
data() {
return {
number: '',
menu: false,
menuform: {
......@@ -560,6 +554,18 @@ export default {
this.getList()
},
methods: {
handlemenuClose() {
this.menu = false
this.loadingDetail = false
this.openHandle = true
this.menuform.passWord = ''
},
handleClose() {
this.openLogin = false
this.loadingDetail = false
this.openHandle = true
this.loginform.password = ''
},
handlemenuConfirm() {
const obj = {
passWord: this.menuform.passWord
......@@ -570,7 +576,6 @@ export default {
if (res.code === 200) {
this.loadingDetail = false
this.openHandle = false
this.radio1 = '2'
this.isCheck = false
this.$message.success('操作成功')
this.queryParams.page = 1
......@@ -579,7 +584,6 @@ export default {
})
this.menuform.password = ''
} else if (res.code === null) {
console.log('111111')
this.$message.warning(res.message)
this.loadingDetail = false
this.multipleSelection = false
......@@ -591,10 +595,16 @@ export default {
},
// 判断时间范围 是否是一个月以内的的时间
isWithinLastMonth(dateToCheck) {
var currentDate = new Date() // 当前日期对象
var oneMonthAgo = new Date() // 一个月前的日期对象
oneMonthAgo.setMonth(currentDate.getMonth() - 1) // 将一个月前的日期设置为当前月份减1
return dateToCheck >= oneMonthAgo && dateToCheck <= currentDate
// 获取当前日期
const currentDate = new Date()
// 获取当前日期的年份和月份
const currentYear = currentDate.getFullYear()
const currentMonth = currentDate.getMonth()
// 获取要比较日期的年份和月份
const compareYear = dateToCheck.getFullYear()
const compareMonth = dateToCheck.getMonth()
// 比较年份和月份是否相等
return currentYear === compareYear && currentMonth === compareMonth
},
handlecanceClose() {
this.loadingDetail = false
......@@ -654,6 +664,7 @@ export default {
if (res.data.createDate !== null) {
res.data.createDate = parseTime(res.data.createDate, '{y}-{m}-{d}')
}
console.log('radio1',this.radio1)
this.loginform.password = ''
this.detailApplyList = res.data
this.loadingDetail = false
......@@ -698,6 +709,12 @@ export default {
}
this.canceList.push(obj)
})
if (this.canceList.length !== this.number) {
console.log('number', this.number)
this.loadingDetail = false
this.openHandle = true
return this.$message.warning('您选择的设备数据不符合您申请设备的数量')
}
console.log('canceList', this.canceList)
console.log('monthDate', this.monthDate)
if (this.monthDate) {
......@@ -758,6 +775,7 @@ export default {
this.singleDetails = row
this.monthDate = false
this.openHandle = true
this.number = row.pnumber
this.applyId = row.businessId
this.pn = row.pn
this.ptype = row.ptype
......@@ -883,9 +901,37 @@ export default {
},
// 登录
login() {
this.title = '权限校验'
this.openLogin = true
this.openHandle = false
console.log('radio1',this.radio1)
if (this.radio1 === '1') {
this.title = '权限认证'
this.openLogin = true
this.openHandle = false
} else {
this.loadingDetail = true
const obj = {
sort: '2',
type: this.radio1,
pn: this.pn,
ptype: this.ptype,
pgx: this.pgx,
prank: this.prank,
pissb: this.pissb,
page: this.queryParamsDetail.page,
rows: this.queryParamsDetail.rows,
tempPn: this.queryParamsDetail.pn,
lot: this.queryParamsDetail.lot,
plocation: this.queryParamsDetail.plocation
}
getEquipment(obj).then(res => {
if (res.code === 200) {
if (res.data.createDate !== null) {
res.data.createDate = parseTime(res.data.createDate, '{y}-{m}-{d}')
}
this.detailApplyList = res.data
this.loadingDetail = false
}
})
}
},
// warehouse的重置按钮
resetQueryWarehouse() {
......
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