刻字工序刻字机选择任务列表

This commit is contained in:
2023-07-26 15:50:28 +08:00
parent 7ce2260d07
commit b2554d05ac
6 changed files with 679 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ import { Dialog } from './utils.js'
import store from '../vuex/store'
import router from '@/router'
axios.defaults.timeout = 5000
axios.defaults.timeout = 50000
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'
axios.interceptors.request.use(

View File

@@ -7,7 +7,10 @@
<div class="body-container">
<div class="tabs_wrap">
<ul class="tabs">
<li v-for="i in menus" :key="i.index">
<li v-show="Number($route.meta.guidePath) < 4" v-for="i in menus1" :key="i.index">
<router-link :to="i.router" :class="{'router-link-active': i.router === $route.path}">{{i.label}}</router-link>
</li>
<li v-show="Number($route.meta.guidePath) >= 4" v-for="i in menus2" :key="i.index">
<router-link :to="i.router" :class="{'router-link-active': i.router === $route.path}">{{i.label}}</router-link>
</li>
</ul>
@@ -30,7 +33,7 @@ export default {
},
data () {
return {
menus: [
menus1: [
{
label: '刻字上料',
router: '/letteringload'
@@ -40,15 +43,29 @@ export default {
router: '/letteringclimb'
},
{
label: '临时人工刻字上料',
label: '临时人工上料',
router: '/temporaryletteringload'
}
],
menus2: [
{
label: '刻字工序',
router: '/letteringprocess'
},
{
label: '刻字机选择',
router: '/letteringmachineselect'
},
{
label: '任务列表',
router: '/letteringtasklist'
}
]
}
},
computed: {
title () {
let res = ['刻字上料', '刻字爬坡', '临时人工刻字上料'][Number(this.$route.meta.guidePath) - 1]
let res = ['刻字上料', '刻字爬坡', '临时人工上料', '刻字工序', '刻字机选择', '任务列表'][Number(this.$route.meta.guidePath) - 1]
return res
},
...mapGetters(['keepAlive'])

View File

@@ -0,0 +1,149 @@
<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">
<input type="text" 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">
<div class="search-label">重量</div>
<div class="filter_input_wraper">
<input type="number" class="filter-input">
</div>
</div>
<div class="search-item_3">
<button class="button button--primary" @click="_washQuery">平均分配</button>
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': checkArr.length === 0}" @click="_washSubmitWash">取消分配</button>
<button class="button button--primary" @click="toJump">确认上料</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>生产数量</th>
<th>物料规格</th>
<th>重量(kg)</th>
<th>数量</th>
<th>物料编号</th>
<th>物料名称</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" @click="toRadio(e)">
<td>
<button class="iconfont select_icon select_square_icon" :class="e.checked ? 'selected_icon' : 'unselect_icon'"></button>
</td>
<td>{{ e.device_code }}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.deviceinstor_weight | unitskg}}</td>
<td>{{ e.deviceinstor_qty | numeric(3) }}</td>
<td>{{ e.task_code }}</td>
<td>{{ e.update_time }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
import {dictAll, washSpecList, washQuery, washSubmitWash} from '@config/getData2.js'
export default {
name: 'cleaningloading',
data () {
return {
options1: [],
value1: '',
options2: [],
value2: '',
dataList: [],
checkArr: [],
disabled1: false
}
},
created () {
this._dictAll()
this._washSpecList()
},
methods: {
// 车间下拉框
async _dictAll () {
let res = await dictAll()
if (res.code === 200) {
this.options1 = [...res.content]
this.value1 = this.options1[0].value
this._washQuery()
}
},
// 规格下拉框
async _washSpecList () {
let res = await washSpecList()
if (res.code === 200) {
this.options2 = [...res.content]
}
},
// grid
async _washQuery () {
let res = await washQuery(this.value1, this.value2)
if (res.code === 200) {
this.checkArr = []
res.content.map(el => {
this.$set(el, 'checked', false)
})
this.dataList = [...res.content]
}
},
// 确认上料
async _washSubmitWash () {
this.disabled1 = true
if (this.checkArr.length === 0) {
this.disabled1 = false
return
}
try {
let arr = []
this.checkArr.map(el => {
arr.push(el.device_code)
})
let res = await washSubmitWash(arr)
if (res.code === 200) {
this.toast(res.msg)
this._washQuery()
}
this.disabled1 = false
} catch (e) {
this.disabled1 = false
}
},
toJump () {
this.$router.push('/manpour')
},
toRadio (e) {
e.checked = !e.checked
this.checkArr = this.dataList.filter(i => { return i.checked === true })
}
}
}
</script>
<style lang="stylus" scoped>
.grid_wraper
height calc(100% - 1.1rem)
</style>

View File

@@ -0,0 +1,238 @@
<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 search-label_1">日期</div>
<div class="filter_input_wraper filter_input_wraper_1">
<el-date-picker
v-model="date"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-label">物料</div>
<div class="filter_input_wraper">
<input type="text" class="filter-input" v-model="material_code">
</div>
</div>
<div class="search-item">
<div class="search-label">载具号</div>
<div class="filter_input_wraper">
<input type="text" class="filter-input" v-model="storagevehicle_code">
</div>
</div>
<div class="search-item">
<div class="search-label">货位号</div>
<div class="filter_input_wraper">
<input type="text" class="filter-input" v-model="struct_code">
</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.point_code"
:label="item.point_name"
:value="item.point_code">
</el-option>
</el-select>
</div>
</div>
<div class="search-item_3">
<button class="button button--primary" @click="_checkGetDtlAll">查询</button>
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': pkId === '' || value2 === ''}" @click="_checkSendTask">确认上料</button>
</div>
</div>
</div>
<div class="grid_wraper">
<table class="filter-table">
<thead>
<tr>
<th>序号</th>
<th>货位</th>
<th>载具号</th>
<th>物料规格</th>
<th>重量(kg)</th>
<th>数量</th>
<th>物料编号</th>
<th>入库时间</th>
<th>是否已挑料</th>
<th>入库类型</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.checkdtl_id}" @click="toRadio(e)">
<td>{{ i + 1 }}</td>
<td>{{e.struct_name}}</td>
<td>{{e.storagevehicle_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.qty | numeric(3)}}</td>
<td>{{e.base_qty | numeric(3)}}</td>
<td><input type="number" class="input" v-model="e.fac_qty"></td>
<td>{{ ['正常', '盘亏', '盘盈'][Number(e.check_result)] }}</td>
<td>生成</td>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
import { checkGetBcpStor, checkGetDtlAll, checkGetPoint, checkSendTask, checkConfirm, checkConfirmOffer, checkConfirmFinance } from '@config/getData2.js'
import {dateTimeFtt} from '@config/utils.js'
export default {
data () {
return {
options1: [],
value1: '',
date: [new Date((new Date().getTime() - 6 * 24 * 60 * 60 * 1000)), new Date((new Date().getTime()))],
options2: [],
value2: '',
material_code: '',
storagevehicle_code: '',
struct_code: '',
dataList: [],
pkId: '',
pkObj: {},
disabled1: false,
disabled2: false,
disabled3: false,
disabled4: false
}
},
computed: {
flag () {
let flag = false
if (this.dataList.length) {
this.dataList.map(el => {
if (el.fac_qty === '' || Number(el.fac_qty) < 0) {
flag = true
}
})
}
return flag
}
},
created () {
this._checkGetBcpStor()
this._checkGetDtlAll()
this._checkGetPoint()
},
methods: {
// 仓库下拉框
async _checkGetBcpStor () {
let res = await checkGetBcpStor()
this.options1 = [...res.data]
},
// grid
async _checkGetDtlAll () {
let res = await checkGetDtlAll(this.value1, this.date !== null ? dateTimeFtt(this.date[0]) : '', this.date !== null ? dateTimeFtt(this.date[1]) : '', this.material_code, this.storagevehicle_code, this.struct_code)
this.dataList = [...res.data]
},
// 盘点位下拉框
async _checkGetPoint () {
let res = await checkGetPoint()
this.options2 = [...res.data]
},
toRadio (e) {
this.pkId = this.pkId === e.checkdtl_id ? '' : e.checkdtl_id
this.pkObj = this.pkId === e.checkdtl_id ? e : {}
},
// 下发(按钮)
async _checkSendTask () {
this.disabled1 = true
if (!this.pkId || !this.value2) {
this.disabled1 = false
return
}
try {
let res = await checkSendTask(this.pkObj, this.value2)
this.toast(res.message)
this._checkGetDtlAll()
this.disabled1 = false
} catch (e) {
this.disabled1 = false
}
},
// 盘点确认
async _checkConfirm () {
this.disabled2 = true
if (this.flag || this.dataList.length === 0) {
this.disabled2 = false
return
}
try {
let res = await checkConfirm(this.dataList)
this.toast(res.message)
this._checkGetDtlAll()
this.disabled2 = false
} catch (e) {
this.disabled2 = false
}
},
// 实盘为准
async _checkConfirmOffer () {
this.disabled3 = true
if (!this.pkId) {
this.disabled3 = false
return
}
try {
let res = await checkConfirmOffer(this.pkObj)
this.toast(res.message)
this._checkGetDtlAll()
this.disabled3 = false
} catch (e) {
this.disabled3 = false
}
},
// 财务为准
async _checkConfirmFinance () {
this.disabled4 = true
if (!this.pkId) {
this.disabled4 = false
return
}
try {
let res = await checkConfirmFinance(this.pkObj)
this.toast(res.message)
this._checkGetDtlAll()
this.disabled4 = false
} catch (e) {
this.disabled4 = false
}
}
}
}
</script>
<style lang="stylus" scoped>
.zd_wrapper
height calc(100% - 1.6rem)
.filter_input_wraper_1
width calc(100% - 45px)
.search-label_1
width 45px
</style>

View File

@@ -0,0 +1,255 @@
<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_2">
<button class="button button--primary" @click="_washWashTasks">快速查询</button>
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': value1 === ''}" @click="_washWashVechileInfo">强制完成</button>
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': pkId === ''}" @click="_washWashFinish('1')">强制取消</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>物料规格</th>
<th>上料重量(kg)</th>
<th>分配重量</th>
<th>任务状态</th>
<th>执行步骤</th>
</tr>
</thead>
<tbody>
<tr v-for="e in dataList" :key="e.task_id" :class="{'selected_icon': pkId === e.task_id}" @click="toRadio(e)">
<td>{{ e.sep_on }}</td>
<td>{{ e.create_time }}</td>
<td>{{e.task_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.material_qty | unitskg}}</td>
<td>{{ e.material_name }}</td>
</tr>
</tbody>
</table>
</div>
<jxDialog
ref="child"
title="提示"
:type="type"
@toSure="toSureDialog"
@toCancle="toCancle"
>
<div class="form_wraper">当前任务号不是第一个任务是否确认下料</div>
</jxDialog>
</div>
</template>
<script>
import jxDialog from '@components/dialog.vue'
import {dictAll, washWashTasks, washWashVechileInfo, washWashFinish, washWashTaskFinish, washWashQzFinish, bcpInCallVehicle} from '@config/getData2.js'
export default {
components: {
jxDialog
},
data () {
return {
options1: [],
value1: '',
weight: '',
vechile_code: '',
dataList: [],
sep_on: '',
pkId: '',
pkObj: {},
type: '',
disabled1: false,
disabled2: false,
disabled3: false,
disabled4: false,
disabled5: false
}
},
created () {
this._dictAll()
},
methods: {
// 车间下拉框
async _dictAll () {
let res = await dictAll()
if (res.code === 200) {
this.options1 = [...res.content]
this.value1 = this.options1[0].value
this._washWashTasks()
}
},
// grid
async _washWashTasks () {
let res = await washWashTasks(this.value1)
if (res.code === 200) {
this.pkId = ''
this.pkObj = {}
this.dataList = [...res.content]
if (this.dataList.length > 0) {
this.sep_on = this.dataList[0].sep_on
}
}
},
toRadio (e) {
this.pkId = this.pkId === e.task_id ? '' : e.task_id
this.pkObj = this.pkId === e.task_id ? e : {}
},
// 获取信息
async _washWashVechileInfo () {
this.disabled1 = true
if (this.value1 === '') {
this.disabled1 = false
return
}
try {
let res = await washWashVechileInfo(this.value1)
if (res.code === 200) {
if (res.content.length > 0) {
this.weight = res.content[0].weight
this.vechile_code = res.content[0].vechile_code
}
}
this.disabled1 = false
} catch (e) {
this.disabled1 = false
}
},
// 确认下料
async _washWashFinish (type) {
this.disabled2 = true
if (this.pkId === '') {
this.disabled2 = false
return
}
if (this.pkObj.sep_on !== this.sep_on) {
this.type = type
this.$refs.child.active = true
return
}
this.__washWashFinish()
},
async __washWashFinish () {
try {
let res = await washWashFinish(this.pkId, this.weight, this.vechile_code)
if (res.code === 200) {
this.toast(res.msg)
this._washWashTasks()
}
this.disabled2 = false
} catch (e) {
this.disabled2 = false
this.$refs.child.active = false
}
},
// 强制完成
async _washWashTaskFinish (type) {
this.disabled3 = true
if (this.pkId === '') {
this.disabled3 = false
return
}
if (this.pkObj.sep_on !== this.sep_on) {
this.type = type
this.$refs.child.active = true
return
}
this.__washWashTaskFinish()
},
async __washWashTaskFinish () {
try {
let res = await washWashTaskFinish(this.pkId)
if (res.code === 200) {
this.toast(res.msg)
this._washWashTasks()
}
this.disabled3 = false
} catch (e) {
this.disabled3 = false
this.$refs.child.active = false
}
},
// 强制下料
async _washWashQzFinish (type) {
this.disabled4 = true
if (this.pkId === '') {
this.disabled4 = false
return
}
if (this.pkObj.sep_on !== this.sep_on) {
this.type = type
this.$refs.child.active = true
return
}
this.__washWashQzFinish()
},
async __washWashQzFinish () {
try {
let res = await washWashQzFinish(this.pkId, this.weight, this.vechile_code)
if (res.code === 200) {
this.toast(res.msg)
this._washWashTasks()
}
this.disabled4 = false
} catch (e) {
this.disabled4 = false
this.$refs.child.active = false
}
},
toSureDialog (type) {
switch (type) {
case '1':
this.__washWashFinish()
break
case '2':
this.__washWashTaskFinish()
break
case '3':
this.__washWashQzFinish()
}
},
toCancle () {
this.disabled2 = false
this.disabled3 = false
this.disabled4 = false
},
async _bcpInCallVehicle () {
this.disabled5 = true
try {
let res = await bcpInCallVehicle()
if (res.code === 200) {
this.toast(res.msg)
}
this.disabled5 = false
} catch (e) {
this.disabled5 = false
}
}
}
}
</script>
<style lang="stylus" scoped>
</style>

View File

@@ -28,6 +28,9 @@ const letteringIndex = r => require.ensure([], () => r(require('@page/modules/le
const letteringLoad = r => require.ensure([], () => r(require('@page/modules/lettering/lettering-load')), 'lettering')
const letteringClimb = r => require.ensure([], () => r(require('@page/modules/lettering/lettering-climb')), 'lettering')
const TemporaryLetteringLoad = r => require.ensure([], () => r(require('@page/modules/lettering/temporary-lettering-load')), 'lettering')
const letteringProcess = r => require.ensure([], () => r(require('@page/modules/lettering/lettering-process')), 'lettering')
const letteringMachineSelect = r => require.ensure([], () => r(require('@page/modules/lettering/lettering-machine-select')), 'lettering')
const letteringTaskList = r => require.ensure([], () => r(require('@page/modules/lettering/lettering-task-list')), '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')
@@ -154,6 +157,18 @@ export default new Router({
path: '/temporaryletteringload',
component: TemporaryLetteringLoad,
meta: {guidePath: '3'}
}, {
path: '/letteringprocess',
component: letteringProcess,
meta: {guidePath: '4'}
}, {
path: '/letteringmachineselect',
component: letteringMachineSelect,
meta: {guidePath: '5'}
}, {
path: '/letteringtasklist',
component: letteringTaskList,
meta: {guidePath: '6'}
}
]
},