工单作业、工单查询、报工查询
This commit is contained in:
@@ -6,11 +6,11 @@
|
||||
<div class="filter_label">工单日期</div>
|
||||
<div class="filter-input-wrap">
|
||||
<el-date-picker
|
||||
v-model="value1"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
v-model="value1"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
@@ -20,9 +20,9 @@
|
||||
<el-select v-model="value" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
:key="item.device_code"
|
||||
:label="item.device_name"
|
||||
:value="item.device_code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="filter_item">
|
||||
<div class="filter_label filter_label_z3">关键字</div>
|
||||
<div class="filter-input-wrap filter-input-wrap_z3">
|
||||
<input type="text" class="filter-input" v-model="keyValue" placeholder="请输入工单号、物料编码">
|
||||
<input type="text" class="filter-input filter-input_1" v-model="keyValue" placeholder="请输入工单号、物料编码">
|
||||
<i v-show="closeIcon1" class="iconfont close_icon" @click="clearData(1)"></i>
|
||||
</div>
|
||||
</div>
|
||||
@@ -42,7 +42,6 @@
|
||||
<div class="grid_wraper">
|
||||
<table class="filter-table">
|
||||
<tr>
|
||||
<th width="4%"></th>
|
||||
<th width="8%">工单日期</th>
|
||||
<th width="8%">工单号</th>
|
||||
<th width="8%">设备</th>
|
||||
@@ -52,27 +51,23 @@
|
||||
<th width="8%">工单数量</th>
|
||||
<th width="8%">实际数量</th>
|
||||
<th width="8%">报废数量</th>
|
||||
<th width="7%">报修数量</th>
|
||||
<th width="8%">报修数量</th>
|
||||
<th width="8%">开始时间</th>
|
||||
<th width="8%">开始时间</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.workorder_id">
|
||||
<td>
|
||||
<button class="iconfont select_icon" :class="pkId === e.workorder_id ? 'selected_icon' : 'unselect_icon'" @click="toRadio(e)"></button>
|
||||
</td>
|
||||
<td>{{e.create_time}}</td>
|
||||
<td>{{e.workorder_code}}</td>
|
||||
<td>{{e.shift_type_scode_name}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.device_code}}</td>
|
||||
<td>{{['创建','下发','生产中','暂停', '完成'][Number(e.workorder_status) - 1]}}</td>
|
||||
<td>{{ e.material_name }}</td>
|
||||
<td>{{e.workprocedure_name}}</td>
|
||||
<td>{{['创建','下发','生产中','暂停', '完成'][Number(e.order_status) - 1]}}</td>
|
||||
<td>{{e.plan_qty}}</td>
|
||||
<td>{{e.real_qty}}</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>{{e.realproducestart_date}}</td>
|
||||
<td>{{e.realproduceend_date}}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<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>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -80,6 +75,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {dateFtt} from '@config/utils.js'
|
||||
import { deviceList, getTable } from '../../../config/getData2.js'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
@@ -90,7 +87,7 @@ export default {
|
||||
disabled1: false,
|
||||
disabled2: false,
|
||||
disabled3: false,
|
||||
dataList: [{workorder_id: '1'}, {workorder_id: '2'}],
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {}
|
||||
}
|
||||
@@ -100,16 +97,44 @@ export default {
|
||||
return this.keyValue !== ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
keyValue () {
|
||||
this.debouncedgetDatas()
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._deviceList()
|
||||
this.debouncedgetDatas = this.debounce(this.getDatas, 500)
|
||||
},
|
||||
methods: {
|
||||
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]
|
||||
},
|
||||
clearData (e) {
|
||||
switch (e) {
|
||||
case 1:
|
||||
this.keyValue = ''
|
||||
break
|
||||
}
|
||||
},
|
||||
getDatas () {
|
||||
|
||||
},
|
||||
toRadio (e) {
|
||||
this.pkId = this.pkId === e.workorder_id ? '' : e.workorder_id
|
||||
@@ -137,4 +162,13 @@ export default {
|
||||
width 55%
|
||||
&:nth-child(2)
|
||||
width calc(45% - 10px)
|
||||
.filter-input_1
|
||||
padding-right 30px
|
||||
.close_icon
|
||||
width 20px
|
||||
height 20px
|
||||
font-size 15px
|
||||
line-height 20px
|
||||
top 5px
|
||||
right 10px
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user