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

删除菜单

parent 03dd356b
...@@ -20,14 +20,7 @@ ...@@ -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-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-form-item>
</el-col> </el-col>
<el-col :span="12"> <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-form-item label="pissb" style="flex-basis: 50%;" prop="pissb"> <el-form-item label="pissb" style="flex-basis: 50%;" prop="pissb">
<el-select <el-select
v-model="form.pissb" v-model="form.pissb"
...@@ -44,7 +37,9 @@ ...@@ -44,7 +37,9 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </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-form-item label="pgx" style="flex-basis: 50%;" prop="pgx">
<el-select <el-select
v-model="form.pgx" v-model="form.pgx"
...@@ -61,6 +56,11 @@ ...@@ -61,6 +56,11 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </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>
<div class="button"> <div class="button">
<el-button type="primary" @click="submitForm">提交</el-button> <el-button type="primary" @click="submitForm">提交</el-button>
...@@ -153,14 +153,29 @@ export default { ...@@ -153,14 +153,29 @@ export default {
if (res.code === 200) { if (res.code === 200) {
if (res.data !== null) { if (res.data !== null) {
if (res.data.ptype === '1') { if (res.data.ptype === '1') {
this.$message.success('申请成功,请稍后去设备库领用') this.$message({
showClose: true,
message: '申请成功,请稍后去 "设备库" 领用',
type: 'success',
duration: 5000
})
} else if (res.data.ptype === '2') { } else if (res.data.ptype === '2') {
this.$message.success('申请成功,请稍后去工序库领用') this.$message({
showClose: true,
message: '申请成功,请稍后去 "工序库" 领用',
type: 'success',
duration: 5000
})
} }
} }
this.resetFrom() this.resetFrom()
} else if (res.code === null) { } 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 @@ ...@@ -305,19 +305,12 @@
{{ scope.row.psm || '-' }} {{ scope.row.psm || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="createDate"> <el-table-column label="入库日期" prop="createDate">
<template slot-scope="scope"> <template slot-scope="scope">
{{ parseTime(scope.row.createDate, '{y}-{m}-{d}') || '-' }} {{ parseTime(scope.row.createDate, '{y}-{m}-{d}') || '-' }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </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;"> <div style="float: right;padding:3px 15px;">
<el-button <el-button
type="primary" type="primary"
...@@ -355,6 +348,7 @@ export default { ...@@ -355,6 +348,7 @@ export default {
name: 'Draw', name: 'Draw',
data() { data() {
return { return {
monthDate: false,
// 是否切换库 // 是否切换库
isCheck: false, isCheck: false,
loginform: { loginform: {
...@@ -464,6 +458,13 @@ export default { ...@@ -464,6 +458,13 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
// 判断时间范围 是否是一个月以内的的时间
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
...@@ -501,38 +502,22 @@ export default { ...@@ -501,38 +502,22 @@ export default {
checkPermission(obj).then(res => { checkPermission(obj).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.openLogin = false this.openLogin = false
if (this.radio1 === '1') { batchAddition(this.canceList).then(res => {
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)
if (res.code === 200) { 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.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) { } else if (res.code === null) {
this.$message.warning(res.message) this.$message.warning(res.$message)
this.loadingDetail = false this.loginform.password = ''
this.openHandle = true 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 { ...@@ -546,6 +531,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.createDate))) {
this.monthDate = true
this.openHandle = false
}
const obj = { const obj = {
applyId: this.applyId, applyId: this.applyId,
pn: item.pn, pn: item.pn,
...@@ -558,17 +547,23 @@ export default { ...@@ -558,17 +547,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 => { if (this.monthDate) {
if (res.code === 200) { this.openLogin = true
this.loadingDetail = false }
this.openHandle = false 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.isCheck = false
}) this.$message.success('操作成功')
this.queryParams.page = 1
this.getList()
}
})
}
} }
}, },
...@@ -577,6 +572,7 @@ export default { ...@@ -577,6 +572,7 @@ export default {
this.loadingDetail = true this.loadingDetail = true
if (!this.isCheck) { if (!this.isCheck) {
const obj = { const obj = {
sort: '1',
type: this.radio1, type: this.radio1,
pn: this.pn, pn: this.pn,
ptype: this.ptype, ptype: this.ptype,
...@@ -613,6 +609,7 @@ export default { ...@@ -613,6 +609,7 @@ export default {
this.prank = row.prank this.prank = row.prank
this.pissb = row.pissb this.pissb = row.pissb
const obj = { const obj = {
sort: '1',
type: this.radio1, type: this.radio1,
pn: row.pn, pn: row.pn,
pgx: row.pgx, pgx: row.pgx,
......
...@@ -540,6 +540,7 @@ export default { ...@@ -540,6 +540,7 @@ export default {
}, },
handcheckPermissionQuery() { handcheckPermissionQuery() {
const obj = { const obj = {
sort: '2',
pn: this.pn, pn: this.pn,
type: this.radio1, type: this.radio1,
pgx: this.pgx, pgx: this.pgx,
...@@ -576,6 +577,7 @@ export default { ...@@ -576,6 +577,7 @@ export default {
this.$message.success('已切换到工艺库') this.$message.success('已切换到工艺库')
} }
const obj = { const obj = {
sort: '2',
pn: this.pn, pn: this.pn,
type: this.radio1, type: this.radio1,
pgx: this.pgx, pgx: this.pgx,
...@@ -673,6 +675,7 @@ export default { ...@@ -673,6 +675,7 @@ export default {
this.loadingDetail = true this.loadingDetail = true
if (!this.isCheck) { if (!this.isCheck) {
const obj = { const obj = {
sort: '2',
type: this.radio1, type: this.radio1,
pn: this.pn, pn: this.pn,
ptype: this.ptype, ptype: this.ptype,
...@@ -712,6 +715,7 @@ export default { ...@@ -712,6 +715,7 @@ export default {
this.prank = row.prank this.prank = row.prank
this.pissb = row.pissb this.pissb = row.pissb
const obj = { const obj = {
sort: '2',
type: this.radio1, type: this.radio1,
pn: row.pn, pn: row.pn,
ptype: row.ptype, 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