人工倒料、刻字工序

This commit is contained in:
2023-07-04 13:52:35 +08:00
parent 72ca8adefb
commit 558d78e078
5 changed files with 319 additions and 0 deletions

View File

@@ -274,3 +274,30 @@ export const bcpShutGetdtl = (id, btime, etime, code, scode, stcode) => post('ap
export const bcpShutConfirm = (row) => post('api/pda/bcp/shut/confirm', {
row: row
})
/**
* 人工倒料
*/
// 1.1设备列表
export const pourDeviceList = () => post('api/device/list', {})
// 1.2车间列表
export const pourDictList = (code) => post('api/dict/dictDetailByCode', {
code: code
})
// 1人工倒料
export const pourdeviceinstorQty = (qty, code) => post('api/pda/deviceinstorQty', {
qty: qty,
device_code: code
})
/**
* 刻字工序
*/
// 设备列表
export const letterDeviceList = (id) => post('api/device/list', {
workprocedure_id: id
})
// 补空框
export const letterCallVechile = (id) => post('api/pda/callVechile', {
device_code: id
})

View File

@@ -0,0 +1,63 @@
<template>
<div class="content blue" ref="content">
<jxHeader
:title="title"
@switchColor="switchColor"
/>
<div class="body-container">
<div class="main-container">
<keep-alive :include="keepAlive" >
<router-view/>
</keep-alive>
</div>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import jxHeader from '@components/header.vue'
export default {
components: {
jxHeader
},
data () {
return {}
},
computed: {
title () {
let res = ['人工倒料', '刻字工序'][Number(this.$route.meta.guidePath) - 1]
return res
},
...mapGetters(['keepAlive'])
},
methods: {
switchColor (type) {
switch (type) {
case 1:
this.$refs.content.classList.value = 'content overall_orange'
break
case 2:
this.$refs.content.classList.value = 'content overall_lightgreen'
break
case 3:
this.$refs.content.classList.value = 'content overall_blue'
break
}
}
}
}
</script>
<style lang="stylus" scoped>
@import '~@style/mixin.styl'
.content
_wh(100%, 100vh)
.body-container
_wh(calc(100% - 30px), calc(100% - 55px))
margin 0 auto 10px
padding 5px
border 1px solid #484cce
.main-container
_wh(100%, 100%)
</style>

View File

@@ -0,0 +1,115 @@
<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="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>
</div>
</template>
<script>
import {pourDictList, letterDeviceList, pourdeviceinstorQty, letterCallVechile} from '@config/getData2.js'
export default {
data () {
return {
options1: [],
value1: '',
options2: [],
value2: '',
qty: '',
disabled1: false
}
},
created () {
this._letterDeviceList()
this._pourDictList()
},
methods: {
// 设备下拉框
async _letterDeviceList () {
let res = await letterDeviceList('1535144682756116480')
this.options2 = [...res.data]
},
// 车间下拉框
async _pourDictList () {
let res = await pourDictList('product_area')
this.options1 = [...res.data]
},
// 确认入库
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.message)
this.value1 = ''
this.qty = ''
this.value2 = ''
this.disabled1 = false
} catch (e) {
this.disabled1 = false
}
},
// 补空框
async _letterCallVechile () {
this.disabled2 = true
if (this.value2 === '') {
this.disabled2 = false
return
}
try {
let res = await letterCallVechile(this.value2)
this.toast(res.message)
this.value1 = ''
this.qty = ''
this.value2 = ''
this.disabled2 = false
} catch (e) {
this.disabled2 = false
}
}
}
}
</script>
<style lang="stylus" scoped>
</style>

View File

@@ -0,0 +1,96 @@
<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()
this.options2 = [...res.data]
},
// 车间下拉框
async _pourDictList () {
let res = await pourDictList('product_area')
this.options1 = [...res.data]
},
// 确认入库
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.message)
this.value1 = ''
this.qty = ''
this.value2 = ''
this.disabled1 = false
} catch (e) {
this.disabled1 = false
}
}
}
}
</script>
<style lang="stylus" scoped>
</style>

View File

@@ -22,6 +22,9 @@ const semiFinishedComposeSearch = r => require.ensure([], () => r(require('@page
const semiFinishedInmaterSearch = r => require.ensure([], () => r(require('@page/modules/semifinished/semi-finished-in-mater-search')), 'semifinished')
const semiFinishedOutMaterSearch = r => require.ensure([], () => r(require('@page/modules/semifinished/semi-finished-out-mater-search')), 'semifinished')
const structMaterSearch = r => require.ensure([], () => r(require('@page/modules/semifinished/struct-mater-search')), 'semifinished')
const letteringIndex = r => require.ensure([], () => r(require('@page/modules/lettering/index')), 'lettering')
const manPouring = r => require.ensure([], () => r(require('@page/modules/lettering/man-pouring')), 'lettering')
const letteringProcess = r => require.ensure([], () => r(require('@page/modules/lettering/lettering-process')), 'lettering')
const Homeset = r => require.ensure([], () => r(require('@page/homeset/index')), 'Homeset')
const Home = r => require.ensure([], () => r(require('@page/homeset/HomePage')), 'HomePage')
@@ -123,6 +126,21 @@ export default new Router({
meta: {guidePath: '10'}
}]
},
{
path: '/letteringindex',
component: letteringIndex,
children: [
{
path: '/manpouring',
component: manPouring,
meta: {guidePath: '1'}
}, {
path: '/letteringprocess',
component: letteringProcess,
meta: {guidePath: '2'}
}
]
},
{
path: '/workordermanage',
component: workordermanage