Commit 74f1a295 authored by 高宇's avatar 高宇

删除菜单

parent 03dd356b
......@@ -20,14 +20,7 @@
<el-input ref="input3" v-model="form.prank" placeholder="请输入prank" :style="{ width: '400px', height: '30px' }" :maxlength="10" @keyup.enter.native="handelTab(3,$event)" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="pnumber" style="flex-basis: 50%;" prop="pnumber">
<el-input ref="input4" v-model="form.pnumber" placeholder="请输入phd" :style="{ width: '400px', height: '30px' }" :maxlength="10" @keyup.enter.native="handelTab(4,$event)" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" style="padding-left: 15.1%;">
<el-col :span="12" >
<el-form-item label="pissb" style="flex-basis: 50%;" prop="pissb">
<el-select
v-model="form.pissb"
......@@ -44,7 +37,9 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" style="padding-left: 1.2%">
</el-row>
<el-row>
<el-col :span="12" style="padding-left: 15.1%;">
<el-form-item label="pgx" style="flex-basis: 50%;" prop="pgx">
<el-select
v-model="form.pgx"
......@@ -61,6 +56,11 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="pnumber" style="flex-basis: 50%;" prop="pnumber">
<el-input ref="input4" v-model="form.pnumber" placeholder="请输入phd" :style="{ width: '400px', height: '30px' }" :maxlength="10" @keyup.enter.native="handelTab(4,$event)" />
</el-form-item>
</el-col>
</el-row>
<div class="button">
<el-button type="primary" @click="submitForm">提交</el-button>
......@@ -153,14 +153,29 @@ export default {
if (res.code === 200) {
if (res.data !== null) {
if (res.data.ptype === '1') {
this.$message.success('申请成功,请稍后去设备库领用')
this.$message({
showClose: true,
message: '申请成功,请稍后去 "设备库" 领用',
type: 'success',
duration: 5000
})
} else if (res.data.ptype === '2') {
this.$message.success('申请成功,请稍后去工序库领用')
this.$message({
showClose: true,
message: '申请成功,请稍后去 "工序库" 领用',
type: 'success',
duration: 5000
})
}
}
this.resetFrom()
} else if (res.code === null) {
this.$message.error(res.message)
this.$message({
showClose: true,
message: res.message,
type: 'error',
duration: 10000
})
}
})
}
......
......@@ -305,19 +305,12 @@
{{ scope.row.psm || '-' }}
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createDate">
<el-table-column label="入库日期" prop="createDate">
<template slot-scope="scope">
{{ parseTime(scope.row.createDate, '{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"
......@@ -355,6 +348,7 @@ export default {
name: 'Draw',
data() {
return {
monthDate: false,
// 是否切换库
isCheck: false,
loginform: {
......@@ -464,6 +458,13 @@ export default {
this.getList()
},
methods: {
// 判断时间范围 是否是一个月以内的的时间
isWithinLastMonth(dateToCheck) {
var currentDate = new Date() // 当前日期对象
var oneMonthAgo = new Date() // 一个月前的日期对象
oneMonthAgo.setMonth(currentDate.getMonth() - 1) // 将一个月前的日期设置为当前月份减1
return dateToCheck >= oneMonthAgo && dateToCheck <= currentDate
},
handlecanceClose() {
this.loadingDetail = false
this.openHandle = false
......@@ -501,38 +502,22 @@ export default {
checkPermission(obj).then(res => {
if (res.code === 200) {
this.openLogin = false
if (this.radio1 === '1') {
this.$message.success('已切换到设备库')
} else {
this.$message.success('已切换到工艺库')
}
const obj = {
pn: this.pn,
type: this.radio1,
pgx: this.pgx,
prank: this.prank,
pissb: this.pissb
}
canceListByType(obj).then(res => {
console.log('res', res)
batchAddition(this.canceList).then(res => {
if (res.code === 200) {
this.isCheck = true
if (res.data.createDate !== null) {
res.data.createDate = parseTime(res.data.createDate, '{y}-{m}-{d}')
}
this.detailApplyList = res.data
this.loadingDetail = false
this.openHandle = true
this.openHandle = false
this.isCheck = false
this.$message.success('操作成功')
this.queryParams.page = 1
this.getList()
this.loginform.password = ''
} else if (res.code === null) {
this.$message.warning(res.message)
this.loadingDetail = false
this.$message.warning(res.$message)
this.loginform.password = ''
this.openHandle = true
this.openLogin = false
}
})
} else if (res.code === null) {
this.$message.warning(res.$message)
} else if (res.code === 500) {
this.$message.warning(res.$message)
}
})
},
......@@ -546,6 +531,10 @@ export default {
this.canceList = []
this.multipleSelection.forEach(item => {
console.log('item', item)
if (!this.isWithinLastMonth(new Date(item.createDate))) {
this.monthDate = true
this.openHandle = false
}
const obj = {
applyId: this.applyId,
pn: item.pn,
......@@ -558,17 +547,23 @@ export default {
}
this.canceList.push(obj)
})
console.log('canceList', this.canceList)
batchAddition(this.canceList).then(res => {
if (res.code === 200) {
this.loadingDetail = false
this.openHandle = false
this.isCheck = false
this.$message.success('操作成功')
this.queryParams.page = 1
this.getList()
}
})
if (this.monthDate) {
this.openLogin = true
}
if (!this.monthDate) {
batchAddition(this.canceList).then(res => {
if (res.code === 200) {
this.loadingDetail = false
this.openHandle = false
this.isCheck = false
this.$message.success('操作成功')
this.queryParams.page = 1
this.getList()
}
})
}
}
},
......@@ -577,6 +572,7 @@ export default {
this.loadingDetail = true
if (!this.isCheck) {
const obj = {
sort: '1',
type: this.radio1,
pn: this.pn,
ptype: this.ptype,
......@@ -613,6 +609,7 @@ export default {
this.prank = row.prank
this.pissb = row.pissb
const obj = {
sort: '1',
type: this.radio1,
pn: row.pn,
pgx: row.pgx,
......
......@@ -540,6 +540,7 @@ export default {
},
handcheckPermissionQuery() {
const obj = {
sort: '2',
pn: this.pn,
type: this.radio1,
pgx: this.pgx,
......@@ -576,6 +577,7 @@ export default {
this.$message.success('已切换到工艺库')
}
const obj = {
sort: '2',
pn: this.pn,
type: this.radio1,
pgx: this.pgx,
......@@ -673,6 +675,7 @@ export default {
this.loadingDetail = true
if (!this.isCheck) {
const obj = {
sort: '2',
type: this.radio1,
pn: this.pn,
ptype: this.ptype,
......@@ -712,6 +715,7 @@ export default {
this.prank = row.prank
this.pissb = row.pissb
const obj = {
sort: '2',
type: this.radio1,
pn: row.pn,
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