刻字工序多页面修改

This commit is contained in:
2023-07-26 15:12:54 +08:00
parent eb2c670285
commit 7ce2260d07
8 changed files with 177 additions and 60 deletions

View File

@@ -5,11 +5,18 @@
@switchColor="switchColor"
/>
<div class="body-container">
<div class="main-container">
<keep-alive :include="keepAlive" >
<router-view/>
</keep-alive>
</div>
<div class="tabs_wrap">
<ul class="tabs">
<li v-for="i in menus" :key="i.index">
<router-link :to="i.router" :class="{'router-link-active': i.router === $route.path}">{{i.label}}</router-link>
</li>
</ul>
</div>
<div class="main-container">
<keep-alive :include="keepAlive" >
<router-view/>
</keep-alive>
</div>
</div>
</div>
</template>
@@ -22,11 +29,26 @@ export default {
jxHeader
},
data () {
return {}
return {
menus: [
{
label: '刻字上料',
router: '/letteringload'
},
{
label: '刻字爬坡',
router: '/letteringclimb'
},
{
label: '临时人工刻字上料',
router: '/temporaryletteringload'
}
]
}
},
computed: {
title () {
let res = ['人工倒料', '刻字工序', '刻字上料', '临时人工刻字上料'][Number(this.$route.meta.guidePath) - 1]
let res = ['刻字上料', '刻字爬坡', '临时人工刻字上料'][Number(this.$route.meta.guidePath) - 1]
return res
},
...mapGetters(['keepAlive'])
@@ -58,6 +80,26 @@ export default {
margin 0 auto 10px
padding 5px
border 1px solid #484cce
.tabs_wrap
height 34px
.tabs
height 34px
li
float left
line-height 32px
text-align center
padding-right 10px
a
display inline-block
color #fff
width 100%
padding 0 10px
font-size 14px
border-bottom 1px solid #2aa6f9
.router-link-active
background linear-gradient(#0de0ff 0%,#2aa6f9 100%)
border-top-left-radius 12px
border-top-right-radius 12px
.main-container
_wh(100%, 100%)
_wh(100%, calc(100% - 34px))
</style>

View File

@@ -35,8 +35,8 @@
</div>
</div>
<div class="search-item_3">
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': value2 === ''}" @click="_letterCallVechile">补空框</button>
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': qty === '' || value2 === ''}" @click="toSure">人工倒</button>
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': qty === '' || value2 === ''}" @click="_kzunload">卸料</button>
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': value2 === ''}" @click="toSure">余料上</button>
</div>
</div>
</div>
@@ -44,7 +44,7 @@
</template>
<script>
import {pourDictList, letterDeviceList, pourdeviceinstorQty, letterCallVechile} from '@config/getData2.js'
import {dictDetailByCode, devicelist, kzresidue, kzunload} from '@config/getData1.js'
export default {
data () {
return {
@@ -53,17 +53,18 @@ export default {
options2: [],
value2: '',
qty: '',
disabled1: false
disabled1: false,
disabled2: false
}
},
created () {
this._letterDeviceList()
this._pourDictList()
this._devicelist()
this._dictDetailByCode()
},
methods: {
//
async _letterDeviceList () {
let res = await letterDeviceList('1535144682756116480')
async _devicelist () {
let res = await devicelist('1535144682756116480')
if (res.code === 200) {
this.options2 = [...res.content]
} else {
@@ -71,23 +72,23 @@ export default {
}
},
//
async _pourDictList () {
let res = await pourDictList('product_area')
async _dictDetailByCode () {
let res = await dictDetailByCode('product_area')
if (res.code === 200) {
this.options1 = [...res.content]
} else {
this.toast(res.msg)
}
},
//
//
async toSure () {
this.disabled1 = true
if (this.qty === '' || this.value2 === '') {
if (this.value2 === '') {
this.disabled1 = false
return
}
try {
let res = await pourdeviceinstorQty(this.qty, this.value2)
let res = await kzresidue(this.value2)
this.toast(res.msg)
this.value1 = ''
this.qty = ''
@@ -97,15 +98,15 @@ export default {
this.disabled1 = false
}
},
//
async _letterCallVechile () {
//
async _kzunload () {
this.disabled2 = true
if (this.value2 === '') {
if (this.qty === '' || this.value2 === '') {
this.disabled2 = false
return
}
try {
let res = await letterCallVechile(this.value2)
let res = await kzunload(this.qty, this.value2)
this.toast(res.msg)
this.value1 = ''
this.qty = ''

View File

@@ -35,8 +35,8 @@
</div>
</div>
<div class="search-item_3">
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': qty === '' || value2 === ''}" @click="_kzunload">卸料</button>
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': value2 === ''}" @click="toSure">余料上</button>
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': value2 === ''}" @click="_letterCallVechile">补空框</button>
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': qty === '' || value2 === ''}" @click="toSure">人工倒</button>
</div>
</div>
</div>
@@ -44,7 +44,7 @@
</template>
<script>
import {dictDetailByCode, devicelist, kzresidue, kzunload} from '@config/getData1.js'
import {pourDictList, letterDeviceList, pourdeviceinstorQty, letterCallVechile} from '@config/getData2.js'
export default {
data () {
return {
@@ -53,18 +53,17 @@ export default {
options2: [],
value2: '',
qty: '',
disabled1: false,
disabled2: false
disabled1: false
}
},
created () {
this._devicelist()
this._dictDetailByCode()
this._letterDeviceList()
this._pourDictList()
},
methods: {
// 设备下拉框
async _devicelist () {
let res = await devicelist('1535144682756116480')
async _letterDeviceList () {
let res = await letterDeviceList('1535144682756116480')
if (res.code === 200) {
this.options2 = [...res.content]
} else {
@@ -72,23 +71,23 @@ export default {
}
},
// 车间下拉框
async _dictDetailByCode () {
let res = await dictDetailByCode('product_area')
async _pourDictList () {
let res = await pourDictList('product_area')
if (res.code === 200) {
this.options1 = [...res.content]
} else {
this.toast(res.msg)
}
},
// 余料上料
// 确认入库
async toSure () {
this.disabled1 = true
if (this.value2 === '') {
if (this.qty === '' || this.value2 === '') {
this.disabled1 = false
return
}
try {
let res = await kzresidue(this.value2)
let res = await pourdeviceinstorQty(this.qty, this.value2)
this.toast(res.msg)
this.value1 = ''
this.qty = ''
@@ -98,15 +97,15 @@ export default {
this.disabled1 = false
}
},
// 卸料
async _kzunload () {
// 补空框
async _letterCallVechile () {
this.disabled2 = true
if (this.qty === '' || this.value2 === '') {
if (this.value2 === '') {
this.disabled2 = false
return
}
try {
let res = await kzunload(this.qty, this.value2)
let res = await letterCallVechile(this.value2)
this.toast(res.msg)
this.value1 = ''
this.qty = ''

View File

@@ -1,104 +0,0 @@
<template>
<div class="order-wraper">
<div class="search-confirm-wrap">
<div class="search-wrap">
<div class="search-item">
<div class="search-label">车间</div>
<div class="filter_input_wraper">
<el-select v-model="value1" filterable clearable placeholder="请选择">
<el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-label">设备</div>
<div class="filter_input_wraper">
<el-select v-model="value2" filterable clearable placeholder="请选择">
<el-option
v-for="item in options2"
:key="item.device_code"
:label="item.device_name"
:value="item.device_code">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-label">数量</div>
<div class="filter_input_wraper">
<input type="number" class="filter-input" v-model="qty">
</div>
</div>
<div class="search-item_3">
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': qty === '' || value2 === ''}" @click="toSure">人工倒料</button>
</div>
</div>
</div>
</div>
</template>
<script>
import {pourDictList, pourDeviceList, pourdeviceinstorQty} from '@config/getData2.js'
export default {
data () {
return {
options1: [],
value1: '',
options2: [],
value2: '',
qty: '',
disabled1: false
}
},
created () {
this._pourDeviceList()
this._pourDictList()
},
methods: {
// 设备下拉框
async _pourDeviceList () {
let res = await pourDeviceList()
if (res.code === 200) {
this.options2 = [...res.content]
} else {
this.toast(res.msg)
}
},
// 车间下拉框
async _pourDictList () {
let res = await pourDictList('product_area')
if (res.code === 200) {
this.options1 = [...res.content]
} else {
this.toast(res.msg)
}
},
// 确认入库
async toSure () {
this.disabled1 = true
if (this.qty === '' || this.value2 === '') {
this.disabled1 = false
return
}
try {
let res = await pourdeviceinstorQty(this.qty, this.value2)
this.toast(res.msg)
this.value1 = ''
this.qty = ''
this.value2 = ''
this.disabled1 = false
} catch (e) {
this.disabled1 = false
}
}
}
}
</script>
<style lang="stylus" scoped>
</style>