2023-07-13 09:38:45 +08:00
|
|
|
|
<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"
|
2023-07-13 17:23:38 +08:00
|
|
|
|
:key="item.value"
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
:value="item.value">
|
2023-07-13 09:38:45 +08:00
|
|
|
|
</el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="search-item">
|
|
|
|
|
|
<div class="search-label">下料重量</div>
|
|
|
|
|
|
<div class="filter_input_wraper">
|
2023-07-13 17:02:17 +08:00
|
|
|
|
<input type="number" class="filter-input" v-model="weight">
|
2023-07-13 09:38:45 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="search-item">
|
|
|
|
|
|
<div class="search-label">料框条码</div>
|
|
|
|
|
|
<div class="filter_input_wraper">
|
2023-07-13 17:02:17 +08:00
|
|
|
|
<input type="text" class="filter-input" v-model="vechile_code">
|
2023-07-13 09:38:45 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="search-item_3">
|
2023-07-13 17:02:17 +08:00
|
|
|
|
<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>
|
|
|
|
|
|
<button class="button button--primary" :disabled="disabled3" :class="{'button--defalut': pkId === ''}" @click="_washWashTaskFinish('2')">强制完成</button>
|
|
|
|
|
|
<button class="button button--primary" :disabled="disabled5" @click="_bcpInCallVehicle">呼叫空框</button>
|
|
|
|
|
|
<button class="button button--primary" :disabled="disabled4" :class="{'button--defalut': pkId === ''}" @click="_washWashQzFinish('3')">强制下料</button>
|
2023-07-13 09:38:45 +08:00
|
|
|
|
</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>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
2023-07-13 17:02:17 +08:00
|
|
|
|
<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>
|
2023-07-23 12:56:58 +08:00
|
|
|
|
<td>{{e.task_code}}</td>
|
2023-07-13 09:38:45 +08:00
|
|
|
|
<td>{{e.material_code}}</td>
|
|
|
|
|
|
<td>{{e.material_spec}}</td>
|
2023-07-23 12:56:58 +08:00
|
|
|
|
<td>{{e.material_qty | unitskg}}</td>
|
2023-07-13 17:02:17 +08:00
|
|
|
|
<td>{{ e.material_name }}</td>
|
2023-07-13 09:38:45 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
</div>
|
2023-07-13 17:02:17 +08:00
|
|
|
|
<jxDialog
|
|
|
|
|
|
ref="child"
|
|
|
|
|
|
title="提示"
|
|
|
|
|
|
:type="type"
|
|
|
|
|
|
@toSure="toSureDialog"
|
|
|
|
|
|
@toCancle="toCancle"
|
|
|
|
|
|
>
|
|
|
|
|
|
<div class="form_wraper">当前任务号不是第一个任务是否确认下料?</div>
|
|
|
|
|
|
</jxDialog>
|
2023-07-13 09:38:45 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-07-13 17:02:17 +08:00
|
|
|
|
import jxDialog from '@components/dialog.vue'
|
|
|
|
|
|
import {dictAll, washWashTasks, washWashVechileInfo, washWashFinish, washWashTaskFinish, washWashQzFinish, bcpInCallVehicle} from '@config/getData2.js'
|
2023-07-13 09:38:45 +08:00
|
|
|
|
export default {
|
2023-07-13 17:02:17 +08:00
|
|
|
|
components: {
|
|
|
|
|
|
jxDialog
|
|
|
|
|
|
},
|
2023-07-13 09:38:45 +08:00
|
|
|
|
data () {
|
|
|
|
|
|
return {
|
|
|
|
|
|
options1: [],
|
|
|
|
|
|
value1: '',
|
2023-07-13 17:02:17 +08:00
|
|
|
|
weight: '',
|
|
|
|
|
|
vechile_code: '',
|
2023-07-13 09:38:45 +08:00
|
|
|
|
dataList: [],
|
2023-07-13 17:02:17 +08:00
|
|
|
|
sep_on: '',
|
2023-07-13 09:38:45 +08:00
|
|
|
|
pkId: '',
|
|
|
|
|
|
pkObj: {},
|
2023-07-13 17:02:17 +08:00
|
|
|
|
type: '',
|
|
|
|
|
|
disabled1: false,
|
|
|
|
|
|
disabled2: false,
|
|
|
|
|
|
disabled3: false,
|
|
|
|
|
|
disabled4: false,
|
|
|
|
|
|
disabled5: false
|
2023-07-13 09:38:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
created () {
|
2023-07-13 17:02:17 +08:00
|
|
|
|
this._dictAll()
|
2023-07-13 09:38:45 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2023-07-13 17:02:17 +08:00
|
|
|
|
// 车间下拉框
|
|
|
|
|
|
async _dictAll () {
|
|
|
|
|
|
let res = await dictAll()
|
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
|
this.options1 = [...res.content]
|
2023-07-23 12:56:58 +08:00
|
|
|
|
this.value1 = this.options1[0].value
|
2023-07-13 17:02:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
// 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
|
2023-07-13 09:38:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2023-07-13 17:02:17 +08:00
|
|
|
|
toRadio (e) {
|
|
|
|
|
|
this.pkId = this.pkId === e.task_id ? '' : e.task_id
|
|
|
|
|
|
this.pkObj = this.pkId === e.task_id ? e : {}
|
2023-07-13 09:38:45 +08:00
|
|
|
|
},
|
2023-07-13 17:02:17 +08:00
|
|
|
|
// 获取信息
|
|
|
|
|
|
async _washWashVechileInfo () {
|
2023-07-13 09:38:45 +08:00
|
|
|
|
this.disabled1 = true
|
2023-07-13 17:02:17 +08:00
|
|
|
|
if (this.value1 === '') {
|
2023-07-13 09:38:45 +08:00
|
|
|
|
this.disabled1 = false
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
try {
|
2023-07-13 17:02:17 +08:00
|
|
|
|
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
|
|
|
|
|
|
}
|
2023-07-13 09:38:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
this.disabled1 = false
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
this.disabled1 = false
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2023-07-13 17:02:17 +08:00
|
|
|
|
// 确认下料
|
|
|
|
|
|
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()
|
2023-07-13 09:38:45 +08:00
|
|
|
|
},
|
2023-07-13 17:02:17 +08:00
|
|
|
|
async __washWashFinish () {
|
|
|
|
|
|
try {
|
2023-07-23 12:56:58 +08:00
|
|
|
|
let res = await washWashFinish(this.pkId, this.weight, this.vechile_code)
|
2023-07-13 17:02:17 +08:00
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
|
this.toast(res.msg)
|
|
|
|
|
|
this._washWashTasks()
|
|
|
|
|
|
}
|
|
|
|
|
|
this.disabled2 = false
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
this.disabled2 = false
|
|
|
|
|
|
this.$refs.child.active = false
|
|
|
|
|
|
}
|
2023-07-13 09:38:45 +08:00
|
|
|
|
},
|
2023-07-13 17:02:17 +08:00
|
|
|
|
// 强制完成
|
|
|
|
|
|
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()
|
2023-07-13 09:38:45 +08:00
|
|
|
|
},
|
2023-07-13 17:02:17 +08:00
|
|
|
|
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
|
2023-07-13 09:38:45 +08:00
|
|
|
|
return
|
|
|
|
|
|
}
|
2023-07-13 17:02:17 +08:00
|
|
|
|
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
|
|
|
|
|
|
}
|
2023-07-13 09:38:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
|
|
.grid_wraper
|
2023-07-23 12:56:58 +08:00
|
|
|
|
height calc(100% - 1.1rem)
|
2023-07-13 09:38:45 +08:00
|
|
|
|
</style>
|