清洗上料下料
This commit is contained in:
@@ -51,6 +51,14 @@ export const authority = () => {
|
||||
sonTree: [
|
||||
// {menu_id: '1', name: '暂存区管理', path: '/operation'}
|
||||
]
|
||||
},
|
||||
{menu_id: '7',
|
||||
path: 'RF04',
|
||||
name: '清洗管理',
|
||||
sonTree: [
|
||||
{menu_id: '1', name: '清洗上料', path: '/cleaningloading'},
|
||||
{menu_id: '2', name: '清洗下料', path: '/cleaningcutting'}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
178
src/pages/modules/clean/cleaning-cutting.vue
Normal file
178
src/pages/modules/clean/cleaning-cutting.vue
Normal file
@@ -0,0 +1,178 @@
|
||||
<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.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id">
|
||||
</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">
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-label">料框条码</div>
|
||||
<div class="filter_input_wraper">
|
||||
<input type="text" class="filter-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item_3">
|
||||
<button class="button button--primary" @click="searchMater">查询</button>
|
||||
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" @click="delRow">获取信息</button>
|
||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': value1 === '' || dataList.length === 0}" @click="_checkCreate">确认下料</button>
|
||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': value1 === '' || dataList.length === 0}" @click="_checkCreate">强制完成</button>
|
||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': value1 === '' || dataList.length === 0}" @click="_checkCreate">呼叫空框</button>
|
||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': value1 === '' || dataList.length === 0}" @click="_checkCreate">强制下料</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_wraper">
|
||||
<table class="filter-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>日期</th>
|
||||
<th>任务号</th>
|
||||
<th>物料编号</th>
|
||||
<th>物料规格</th>
|
||||
<th>上料重量(kg)</th>
|
||||
<th>单重</th>
|
||||
<th>数量</th>
|
||||
<th>存在任务</th>
|
||||
<th>物料名称</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="e in dataList" :key="e.struct_name" :class="{'selected_icon': pkId === e.struct_name}" @click="toRadio(e)">
|
||||
<td>{{ e.sect_name }}</td>
|
||||
<td>{{e.struct_name}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.canuse_qty | numeric(3)}}</td>
|
||||
<td>{{ e.qty | numeric(3) }}</td>
|
||||
<td>{{ e.storagevehicle_code }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {accMul} from '@config/utils.js'
|
||||
import {checkGetBcpStor, checkCreate} from '@config/getData2.js'
|
||||
export default {
|
||||
name: 'semifinishedcheck',
|
||||
data () {
|
||||
return {
|
||||
options1: [],
|
||||
value1: '',
|
||||
options2: [{device_code: '32', device_name: '临时盘点'}],
|
||||
value2: '32',
|
||||
remark: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled1: false
|
||||
}
|
||||
},
|
||||
beforeRouteLeave (to, from, next) {
|
||||
if (to.path === '/home' || to.path === '/login') {
|
||||
this.$store.dispatch('setKeepAlive', [])
|
||||
}
|
||||
next()
|
||||
},
|
||||
activated () {
|
||||
if (this.$store.getters.materArr.length > 0) {
|
||||
let arr = this.$store.getters.materArr
|
||||
this.removeRepeat(this.dataList, arr)
|
||||
this.dataList = [...this.dataList, ...arr]
|
||||
this.dataList.map(el => {
|
||||
let res = accMul(el.canuse_qty, el.unit_weight)
|
||||
this.$set(el, 'base_qty', res)
|
||||
})
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._checkGetBcpStor()
|
||||
},
|
||||
methods: {
|
||||
// 数组去重
|
||||
removeRepeat (arr1, arr2) {
|
||||
for (let i = 0; i < arr1.length; i++) {
|
||||
for (let j = 0; j < arr2.length; j++) {
|
||||
if (arr1[i].struct_name === arr2[j].struct_name) {
|
||||
arr2.splice(j, 1)
|
||||
j--
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 仓库下拉框
|
||||
async _checkGetBcpStor () {
|
||||
let res = await checkGetBcpStor()
|
||||
this.options1 = [...res.data]
|
||||
},
|
||||
// 生产盘点单
|
||||
async _checkCreate () {
|
||||
this.disabled1 = true
|
||||
if (this.value1 === '' || this.dataList.length === 0) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let from = {
|
||||
stor_id: this.value1,
|
||||
check_type: '32',
|
||||
remark: this.remark,
|
||||
rows: this.dataList
|
||||
}
|
||||
let res = await checkCreate(from)
|
||||
this.toast(res.message)
|
||||
this.valu1 = ''
|
||||
this.remark = ''
|
||||
this.$store.dispatch('setMaterArr', [])
|
||||
this.dataList = []
|
||||
|
||||
this.disabled1 = false
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
searchMater () {
|
||||
this.$store.dispatch('setMaterArr', [])
|
||||
this.$router.push('/structmatersearch')
|
||||
},
|
||||
toJumpSearch () {
|
||||
this.$router.push('/semifinishedchecksearch')
|
||||
},
|
||||
toRadio (e) {
|
||||
this.pkId = this.pkId === e.struct_name ? '' : e.struct_name
|
||||
this.pkObj = this.pkId === e.struct_name ? e : {}
|
||||
},
|
||||
delRow () {
|
||||
if (!this.pkId) {
|
||||
return
|
||||
}
|
||||
this.dataList = this.dataList.filter(el => el.struct_name !== this.pkId)
|
||||
this.$store.dispatch('setMaterArr', this.dataList)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.grid_wraper
|
||||
height calc(100% - 95px)
|
||||
</style>
|
||||
166
src/pages/modules/clean/cleaning-loading.vue
Normal file
166
src/pages/modules/clean/cleaning-loading.vue
Normal file
@@ -0,0 +1,166 @@
|
||||
<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.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-label">规格</div>
|
||||
<div class="filter_input_wraper">
|
||||
<input type="text" class="filter-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item flexend">
|
||||
<button class="button button--primary" @click="searchMater">查询</button>
|
||||
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" @click="delRow">确认上料</button>
|
||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': value1 === '' || dataList.length === 0}" @click="_checkCreate">人工倒料</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_wraper">
|
||||
<table class="filter-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>选择</th>
|
||||
<th>设备号</th>
|
||||
<th>物料编号</th>
|
||||
<th>物料规格</th>
|
||||
<th>重量(g)</th>
|
||||
<th>数量</th>
|
||||
<th>存在任务</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="e in dataList" :key="e.struct_name" :class="{'selected_icon': pkId === e.struct_name}" @click="toRadio(e)">
|
||||
<td>{{ e.sect_name }}</td>
|
||||
<td>{{e.struct_name}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.canuse_qty | numeric(3)}}</td>
|
||||
<td>{{ e.qty | numeric(3) }}</td>
|
||||
<td>{{ e.storagevehicle_code }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {accMul} from '@config/utils.js'
|
||||
import {checkGetBcpStor, checkCreate} from '@config/getData2.js'
|
||||
export default {
|
||||
name: 'semifinishedcheck',
|
||||
data () {
|
||||
return {
|
||||
options1: [],
|
||||
value1: '',
|
||||
options2: [{device_code: '32', device_name: '临时盘点'}],
|
||||
value2: '32',
|
||||
remark: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled1: false
|
||||
}
|
||||
},
|
||||
beforeRouteLeave (to, from, next) {
|
||||
if (to.path === '/home' || to.path === '/login') {
|
||||
this.$store.dispatch('setKeepAlive', [])
|
||||
}
|
||||
next()
|
||||
},
|
||||
activated () {
|
||||
if (this.$store.getters.materArr.length > 0) {
|
||||
let arr = this.$store.getters.materArr
|
||||
this.removeRepeat(this.dataList, arr)
|
||||
this.dataList = [...this.dataList, ...arr]
|
||||
this.dataList.map(el => {
|
||||
let res = accMul(el.canuse_qty, el.unit_weight)
|
||||
this.$set(el, 'base_qty', res)
|
||||
})
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._checkGetBcpStor()
|
||||
},
|
||||
methods: {
|
||||
// 数组去重
|
||||
removeRepeat (arr1, arr2) {
|
||||
for (let i = 0; i < arr1.length; i++) {
|
||||
for (let j = 0; j < arr2.length; j++) {
|
||||
if (arr1[i].struct_name === arr2[j].struct_name) {
|
||||
arr2.splice(j, 1)
|
||||
j--
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 仓库下拉框
|
||||
async _checkGetBcpStor () {
|
||||
let res = await checkGetBcpStor()
|
||||
this.options1 = [...res.data]
|
||||
},
|
||||
// 生产盘点单
|
||||
async _checkCreate () {
|
||||
this.disabled1 = true
|
||||
if (this.value1 === '' || this.dataList.length === 0) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let from = {
|
||||
stor_id: this.value1,
|
||||
check_type: '32',
|
||||
remark: this.remark,
|
||||
rows: this.dataList
|
||||
}
|
||||
let res = await checkCreate(from)
|
||||
this.toast(res.message)
|
||||
this.valu1 = ''
|
||||
this.remark = ''
|
||||
this.$store.dispatch('setMaterArr', [])
|
||||
this.dataList = []
|
||||
|
||||
this.disabled1 = false
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
searchMater () {
|
||||
this.$store.dispatch('setMaterArr', [])
|
||||
this.$router.push('/structmatersearch')
|
||||
},
|
||||
toJumpSearch () {
|
||||
this.$router.push('/semifinishedchecksearch')
|
||||
},
|
||||
toRadio (e) {
|
||||
this.pkId = this.pkId === e.struct_name ? '' : e.struct_name
|
||||
this.pkObj = this.pkId === e.struct_name ? e : {}
|
||||
},
|
||||
delRow () {
|
||||
if (!this.pkId) {
|
||||
return
|
||||
}
|
||||
this.dataList = this.dataList.filter(el => el.struct_name !== this.pkId)
|
||||
this.$store.dispatch('setMaterArr', this.dataList)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.grid_wraper
|
||||
height calc(100% - 95px)
|
||||
</style>
|
||||
63
src/pages/modules/clean/index.vue
Normal file
63
src/pages/modules/clean/index.vue
Normal 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>
|
||||
@@ -27,6 +27,9 @@ const manPouring = r => require.ensure([], () => r(require('@page/modules/letter
|
||||
const letteringProcess = r => require.ensure([], () => r(require('@page/modules/lettering/lettering-process')), 'lettering')
|
||||
const letteringLoad = r => require.ensure([], () => r(require('@page/modules/lettering/lettering-load')), 'lettering')
|
||||
const TemporaryLetteringLoad = r => require.ensure([], () => r(require('@page/modules/lettering/temporary-lettering-load')), 'lettering')
|
||||
const cleanIndex = r => require.ensure([], () => r(require('@page/modules/clean/index')), 'clean')
|
||||
const cleaningLoading = r => require.ensure([], () => r(require('@page/modules/clean/cleaning-loading')), 'clean')
|
||||
const cleaningCutting = r => require.ensure([], () => r(require('@page/modules/clean/cleaning-cutting')), 'clean')
|
||||
|
||||
const Homeset = r => require.ensure([], () => r(require('@page/homeset/index')), 'Homeset')
|
||||
const Home = r => require.ensure([], () => r(require('@page/homeset/HomePage')), 'HomePage')
|
||||
@@ -151,6 +154,19 @@ export default new Router({
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/cleanindex',
|
||||
component: cleanIndex,
|
||||
children: [{
|
||||
path: '/cleaningloading',
|
||||
component: cleaningLoading,
|
||||
meta: {guidePath: '1'}
|
||||
}, {
|
||||
path: '/cleaningcutting',
|
||||
component: cleaningCutting,
|
||||
meta: {guidePath: '2'}
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/workordermanage',
|
||||
component: workordermanage
|
||||
|
||||
Reference in New Issue
Block a user