2023-05-22 18:09:19 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="order-wraper">
|
|
|
|
|
<div class="wrap-filter-buttons">
|
|
|
|
|
<div class="wrap-filters">
|
|
|
|
|
<div class="filter_item">
|
|
|
|
|
<div class="filter_label">工单日期</div>
|
|
|
|
|
<div class="filter-input-wrap">
|
|
|
|
|
<el-date-picker
|
2023-05-25 13:41:11 +08:00
|
|
|
v-model="value1"
|
|
|
|
|
type="daterange"
|
|
|
|
|
range-separator="-"
|
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
|
end-placeholder="结束日期">
|
2023-05-22 18:09:19 +08:00
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="filter_item">
|
|
|
|
|
<div class="filter_label filter_label_z2">设备</div>
|
|
|
|
|
<div class="filter-input-wrap filter-input-wrap_z2">
|
2023-05-26 19:12:08 +08:00
|
|
|
<el-select v-model="value" filterable placeholder="请选择">
|
2023-05-22 18:09:19 +08:00
|
|
|
<el-option
|
|
|
|
|
v-for="item in options"
|
2023-05-25 13:41:11 +08:00
|
|
|
:key="item.device_code"
|
|
|
|
|
:label="item.device_name"
|
|
|
|
|
:value="item.device_code">
|
2023-05-22 18:09:19 +08:00
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="filter_item">
|
|
|
|
|
<div class="filter_label filter_label_z3">关键字</div>
|
|
|
|
|
<div class="filter-input-wrap filter-input-wrap_z3">
|
2023-05-25 13:41:11 +08:00
|
|
|
<input type="text" class="filter-input filter-input_1" v-model="keyValue" placeholder="请输入工单号、物料编码">
|
2023-05-22 18:09:19 +08:00
|
|
|
<i v-show="closeIcon1" class="iconfont close_icon" @click="clearData(1)"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrap-buttons">
|
|
|
|
|
<button class="button button--primary" @click="getDatas">查询</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="grid_wraper">
|
|
|
|
|
<table class="filter-table">
|
|
|
|
|
<tr>
|
|
|
|
|
<th width="8%">工单日期</th>
|
|
|
|
|
<th width="8%">工单号</th>
|
2023-05-26 19:12:08 +08:00
|
|
|
<th width="7%">设备</th>
|
|
|
|
|
<th width="4%">状态</th>
|
2023-05-22 18:09:19 +08:00
|
|
|
<th width="8%">物料名称</th>
|
2023-05-26 19:12:08 +08:00
|
|
|
<th width="8%">物料规格</th>
|
|
|
|
|
<th width="5%">工序</th>
|
2023-05-22 18:09:19 +08:00
|
|
|
<th width="8%">工单数量</th>
|
|
|
|
|
<th width="8%">实际数量</th>
|
|
|
|
|
<th width="8%">报废数量</th>
|
2023-05-25 13:41:11 +08:00
|
|
|
<th width="8%">报修数量</th>
|
2023-05-22 18:09:19 +08:00
|
|
|
<th width="8%">开始时间</th>
|
|
|
|
|
<th width="8%">开始时间</th>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr v-for="e in dataList" :key="e.workorder_id">
|
2023-05-25 13:41:11 +08:00
|
|
|
<td>{{e.create_time}}</td>
|
2023-05-22 18:09:19 +08:00
|
|
|
<td>{{e.workorder_code}}</td>
|
2023-05-25 13:41:11 +08:00
|
|
|
<td>{{e.device_code}}</td>
|
|
|
|
|
<td>{{['创建','下发','生产中','暂停', '完成'][Number(e.workorder_status) - 1]}}</td>
|
|
|
|
|
<td>{{ e.material_name }}</td>
|
2023-05-26 19:12:08 +08:00
|
|
|
<td>{{e.material_spec}}</td>
|
2023-05-22 18:09:19 +08:00
|
|
|
<td>{{e.workprocedure_name}}</td>
|
|
|
|
|
<td>{{e.plan_qty}}</td>
|
2023-05-25 13:41:11 +08:00
|
|
|
<td>{{ e.real_qty }}</td>
|
|
|
|
|
<td>{{e.nok_qty}}</td>
|
|
|
|
|
<td>{{e.repare_qty}}</td>
|
|
|
|
|
<td>{{ e.realproducestart_date }}</td>
|
|
|
|
|
<td>{{ e.realproduceend_date }}</td>
|
2023-05-22 18:09:19 +08:00
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-05-25 13:41:11 +08:00
|
|
|
import {dateFtt} from '@config/utils.js'
|
|
|
|
|
import { deviceList, getTable } from '../../../config/getData2.js'
|
2023-05-22 18:09:19 +08:00
|
|
|
export default {
|
|
|
|
|
data () {
|
|
|
|
|
return {
|
2023-05-29 10:55:09 +08:00
|
|
|
value1: [],
|
2023-05-22 18:09:19 +08:00
|
|
|
options: [],
|
|
|
|
|
value: '',
|
|
|
|
|
keyValue: '',
|
|
|
|
|
disabled1: false,
|
|
|
|
|
disabled2: false,
|
|
|
|
|
disabled3: false,
|
2023-05-25 13:41:11 +08:00
|
|
|
dataList: [],
|
2023-05-22 18:09:19 +08:00
|
|
|
pkId: '',
|
|
|
|
|
pkObj: {}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
closeIcon1 () {
|
|
|
|
|
return this.keyValue !== ''
|
|
|
|
|
}
|
|
|
|
|
},
|
2023-05-25 13:41:11 +08:00
|
|
|
watch: {
|
|
|
|
|
keyValue () {
|
|
|
|
|
this.debouncedgetDatas()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created () {
|
|
|
|
|
this._deviceList()
|
|
|
|
|
this.debouncedgetDatas = this.debounce(this.getDatas, 500)
|
|
|
|
|
},
|
2023-05-22 18:09:19 +08:00
|
|
|
methods: {
|
2023-05-25 13:41:11 +08:00
|
|
|
debounce (fn, delay = 500) {
|
|
|
|
|
let timer = null
|
|
|
|
|
return function () {
|
|
|
|
|
if (timer) {
|
|
|
|
|
clearTimeout(timer)
|
|
|
|
|
}
|
|
|
|
|
timer = setTimeout(() => {
|
|
|
|
|
fn.apply(this, arguments)
|
|
|
|
|
timer = null
|
|
|
|
|
}, delay)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async _deviceList () {
|
|
|
|
|
let res = await deviceList()
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
this.options = [...res.content]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getDatas () {
|
|
|
|
|
let res = await getTable(this.value, this.keyValue, this.value1 !== null ? dateFtt(this.value1[0]) : '', this.value1 !== null ? dateFtt(this.value1[1]) : '')
|
|
|
|
|
this.dataList = [...res.content]
|
|
|
|
|
},
|
2023-05-22 18:09:19 +08:00
|
|
|
clearData (e) {
|
|
|
|
|
switch (e) {
|
|
|
|
|
case 1:
|
|
|
|
|
this.keyValue = ''
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
toRadio (e) {
|
|
|
|
|
this.pkId = this.pkId === e.workorder_id ? '' : e.workorder_id
|
|
|
|
|
this.pkObj = this.pkId === e.workorder_id ? e : {}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
|
.wrap-filters
|
|
|
|
|
width calc(100% - 60px)
|
|
|
|
|
.wrap-buttons
|
|
|
|
|
width 60px
|
|
|
|
|
.filter_label_z2
|
|
|
|
|
width 32px
|
|
|
|
|
.filter-input-wrap_z2
|
|
|
|
|
width calc(100% - 32px)
|
|
|
|
|
.filter_label_z3
|
|
|
|
|
width 43px
|
|
|
|
|
.filter-input-wrap_z3
|
|
|
|
|
width calc(100% - 43px)
|
|
|
|
|
.filter_item
|
|
|
|
|
&:nth-child(1)
|
|
|
|
|
width 55%
|
|
|
|
|
&:nth-child(2)
|
|
|
|
|
width calc(45% - 10px)
|
2023-05-25 13:41:11 +08:00
|
|
|
.filter-input_1
|
|
|
|
|
padding-right 30px
|
|
|
|
|
.close_icon
|
|
|
|
|
width 20px
|
|
|
|
|
height 20px
|
|
|
|
|
font-size 15px
|
|
|
|
|
line-height 20px
|
|
|
|
|
top 5px
|
|
|
|
|
right 10px
|
2023-05-22 18:09:19 +08:00
|
|
|
</style>
|