作业查询
This commit is contained in:
@@ -398,8 +398,43 @@ export const KzTasks = (area) => post('api/pda/kz/kzTasks', {
|
|||||||
})
|
})
|
||||||
// export const KzTasks = () => {
|
// export const KzTasks = () => {
|
||||||
// let res = {
|
// let res = {
|
||||||
// code: 200,
|
// 'totalElements': 1,
|
||||||
// content: [{task_id: '1', device_code: '1'}, {task_id: '11', device_code: '11'}]
|
// 'content': [
|
||||||
|
// {
|
||||||
|
// 'task_name': '刻字机上料',
|
||||||
|
// 'table_fk_id': '1686261414550966273',
|
||||||
|
// 'is_auto_issue': false,
|
||||||
|
// 'task_id': '1686543508917325824',
|
||||||
|
// 'remark': '{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}',
|
||||||
|
// 'task_step': 2,
|
||||||
|
// 'handle_class': 'org.nl.wms.scheduler_manage.service.extendtask.Engrave.EngraveTranSportTask',
|
||||||
|
// 'update_time': 1690938813000,
|
||||||
|
// 'material_spec': 'CCL15-PX-BZ',
|
||||||
|
// 'create_id': '1',
|
||||||
|
// 'create_mode': '2',
|
||||||
|
// 'is_send': true,
|
||||||
|
// 'task_status': '5',
|
||||||
|
// 'create_time': '2023-08-02 09:04:42.0',
|
||||||
|
// 'task_group_id': '1686543508917325824',
|
||||||
|
// 'qtyArr': '{"A1_KZ_03":"12222.000"}',
|
||||||
|
// 'task_code': '13810',
|
||||||
|
// 'agv_system_type': '1',
|
||||||
|
// 'priority': '1',
|
||||||
|
// 'sort_seq': 1,
|
||||||
|
// 'product_area': 'A1',
|
||||||
|
// 'is_delete': false,
|
||||||
|
// 'material_qty': 12222.000,
|
||||||
|
// 'point_code3': 'A1_KZ_03',
|
||||||
|
// 'point_code1': 'A1_KZ_SL',
|
||||||
|
// 'material_id': '1684134835121164288',
|
||||||
|
// 'task_type': '24',
|
||||||
|
// 'vehicle_qty': 1,
|
||||||
|
// 'create_name': 'acs',
|
||||||
|
// 'material_code': '24026175S'
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// 'code': 200,
|
||||||
|
// 'msg': '查询成功'
|
||||||
// }
|
// }
|
||||||
// return res
|
// return res
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -2,260 +2,189 @@
|
|||||||
<div class="order-wraper">
|
<div class="order-wraper">
|
||||||
<div class="search-confirm-wrap">
|
<div class="search-confirm-wrap">
|
||||||
<div class="search-wrap">
|
<div class="search-wrap">
|
||||||
<div class="search-item_2">
|
<div class="search-item">
|
||||||
<div class="search-label">工单日期</div>
|
<div class="search-label">仓库</div>
|
||||||
<div class="filter_input_wraper">
|
<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
|
<el-date-picker
|
||||||
v-model="value1"
|
v-model="date"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
range-separator="-"
|
range-separator="-"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期">
|
end-placeholder="结束日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<div class="search-label">设备</div>
|
<div class="search-label">业务类型</div>
|
||||||
<div class="filter_input_wraper">
|
<div class="filter_input_wraper">
|
||||||
<el-select v-model="value" filterable placeholder="请选择">
|
<el-select v-model="value2" filterable clearable placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in options2"
|
||||||
:key="item.device_code"
|
:key="item.value"
|
||||||
:label="item.device_name"
|
:label="item.label"
|
||||||
:value="item.device_code">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<div class="search-label">关键字</div>
|
<div class="search-label">物料</div>
|
||||||
<div class="filter_input_wraper">
|
<div class="filter_input_wraper">
|
||||||
<input type="text" class="filter-input filter-input_1" v-model="keyValue" placeholder="工单号、物料编码">
|
<input type="text" class="filter-input" v-model="val1">
|
||||||
<i v-show="closeIcon1" class="iconfont close_icon" @click="clearData(1)"></i>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-item_2">
|
<div class="search-item">
|
||||||
<button class="button button--primary" @click="getDatas">查询</button>
|
<div class="search-label">载具号</div>
|
||||||
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" :disabled="disabled1" @click="showDialog">残次品报工</button>
|
<div class="filter_input_wraper">
|
||||||
</div>
|
<input type="text" class="filter-input" v-model="val2">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="search-item flexend">
|
||||||
|
<button class="button button--primary" @click="_outgetAll">查询</button>
|
||||||
|
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': !pkId}" @click="_inconfirm">强制确认</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid_wraper">
|
<div class="grid_wraper">
|
||||||
<table class="filter-table">
|
<table class="filter-table">
|
||||||
<tr>
|
<thead>
|
||||||
<!-- <th width="4%"></th> -->
|
<tr>
|
||||||
<th width="8%">工单日期</th>
|
<th>序号</th>
|
||||||
<th width="8%">工单号</th>
|
<th>单据号</th>
|
||||||
<th width="7%">设备</th>
|
<th>状态</th>
|
||||||
<th width="5%">状态</th>
|
<th>类型</th>
|
||||||
<th width="9%">物料名称</th>
|
<th>物料编号</th>
|
||||||
<th width="8%">物料规格</th>
|
<th>物料名称</th>
|
||||||
<th width="5%">工序</th>
|
<th>数量(个)</th>
|
||||||
<th width="8%">工单数量</th>
|
<th>单重(g)</th>
|
||||||
<th width="8%">实际数量</th>
|
<th>载具号</th>
|
||||||
<th width="8%">报废数量</th>
|
<th>入库点</th>
|
||||||
<th width="8%">报修数量</th>
|
<th>货位</th>
|
||||||
<th width="9%">开始时间</th>
|
<!-- <th>创建时间</th>
|
||||||
<th width="9%">结束时间</th>
|
<th>创建人</th> -->
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="e in dataList" :key="e.workorder_id" :class="{'selected_icon': pkId === e.workorder_id}" @click="toRadio(e)">
|
</thead>
|
||||||
<!-- <td>
|
<tbody>
|
||||||
<button class="iconfont select_icon" :class="{'selected_icon': pkId === e.workorder_id}" @click="toRadio(e)"></button>
|
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.bill_code}" @click="toRadio(e)">
|
||||||
</td> -->
|
<td>{{i + 1}}</td>
|
||||||
<td>{{e.create_time}}</td>
|
<td>{{e.bill_code}}</td>
|
||||||
<td>{{e.workorder_code}}</td>
|
<td v-if="e.bill_status === '10'">生成</td>
|
||||||
<td>{{e.device_code}}</td>
|
<td v-if="e.bill_status === '20'">分配中</td>
|
||||||
<td>{{e.workorder_status_name}}</td>
|
<td v-if="e.bill_status === '30'">分配完</td>
|
||||||
<td>{{ e.material_name }}</td>
|
<td v-if="e.bill_status === '99'">完成</td>
|
||||||
<td>{{e.material_spec}}</td>
|
<td v-if="e.bill_type === '0001'">生产入库</td>
|
||||||
<td>{{e.workprocedure_name}}</td>
|
<td v-if="e.bill_type === '0009'">手工入库</td>
|
||||||
<td>{{e.plan_qty}}</td>
|
<td>{{e.material_code}}</td>
|
||||||
<td>{{ e.real_qty }}</td>
|
<td>{{e.material_name}}</td>
|
||||||
<td>{{e.nok_qty}}</td>
|
<td>{{e.total_qty | numeric(3)}}</td>
|
||||||
<td>{{e.repare_qty}}</td>
|
<td>{{e.unit_weight | numeric(3)}}</td>
|
||||||
<td>{{ e.realproducestart_date }}</td>
|
<td>{{e.storagevehicle_code}}</td>
|
||||||
<td>{{ e.realproduceend_date }}</td>
|
<td>{{e.point_code}}</td>
|
||||||
</tr>
|
<td>{{e.struct_code}}</td>
|
||||||
|
<!-- <td>{{e.create_time}}</td>
|
||||||
|
<td>{{e.create_name}}</td> -->
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<jxDialog
|
|
||||||
ref="child"
|
|
||||||
title="请输入数量"
|
|
||||||
@toSure="toSureDialog"
|
|
||||||
>
|
|
||||||
<div class="form_wraper">
|
|
||||||
<div class="form">
|
|
||||||
<div class="form_item">
|
|
||||||
<div class="form_item__label">报废数量</div>
|
|
||||||
<div class="form_item__content">
|
|
||||||
<input type="number" class="form_item__input" v-model="nokQty">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form_item">
|
|
||||||
<div class="form_item__label">报修数量</div>
|
|
||||||
<div class="form_item__content">
|
|
||||||
<input type="number" class="form_item__input" v-model="repareQty">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</jxDialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {dateFtt} from '@config/utils.js'
|
import { getBcpStor, getBillType, outgetAll, inconfirm } from '../../../config/getData1.js'
|
||||||
import jxDialog from '@components/dialog.vue'
|
import {dateTimeFtt} from '@config/utils.js'
|
||||||
import { deviceList, getTable, unqualReport, orderStatus } from '../../../config/getData2.js'
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
jxDialog
|
|
||||||
},
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
value1: [new Date((new Date().getTime() - 24 * 60 * 60 * 1000)), new Date((new Date().getTime() + 24 * 60 * 60 * 1000))],
|
val1: '',
|
||||||
options: [],
|
val2: '',
|
||||||
value: '',
|
options1: [],
|
||||||
keyValue: '',
|
value1: '',
|
||||||
disabled1: false,
|
date: [new Date((new Date().getTime() - 6 * 24 * 60 * 60 * 1000)), new Date((new Date().getTime()))],
|
||||||
|
options2: [],
|
||||||
|
value2: '',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
pkId: '',
|
||||||
pkObj: {},
|
pkObj: {},
|
||||||
nokQty: '',
|
disabled1: false
|
||||||
repareQty: '',
|
|
||||||
status: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
closeIcon1 () {
|
|
||||||
return this.keyValue !== ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
keyValue () {
|
|
||||||
this.debouncedgetDatas()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._deviceList()
|
this._getBcpStor()
|
||||||
this.debouncedgetDatas = this.debounce(this.getDatas, 500)
|
this._getBillType()
|
||||||
this._orderStatus()
|
this._outgetAll()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
debounce (fn, delay = 500) {
|
// 仓库下拉框
|
||||||
let timer = null
|
async _getBcpStor () {
|
||||||
return function () {
|
let res = await getBcpStor()
|
||||||
if (timer) {
|
this.options1 = [...res.data]
|
||||||
clearTimeout(timer)
|
|
||||||
}
|
|
||||||
timer = setTimeout(() => {
|
|
||||||
fn.apply(this, arguments)
|
|
||||||
timer = null
|
|
||||||
}, delay)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async _deviceList () {
|
// 单据类型下拉框
|
||||||
let res = await deviceList()
|
async _getBillType () {
|
||||||
if (res.code === 200) {
|
let res = await getBillType()
|
||||||
this.options = [...res.content]
|
this.options2 = [...res.data]
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async _orderStatus () {
|
// 查询
|
||||||
let res = await orderStatus()
|
async _outgetAll () {
|
||||||
this.status = [...res]
|
let res = await outgetAll(this.value1, this.date !== null ? dateTimeFtt(this.date[0]) : '', this.date !== null ? dateTimeFtt(this.date[1]) : '', this.value2, this.val1, this.val2)
|
||||||
this.getDatas()
|
this.dataList = [...res.data]
|
||||||
},
|
|
||||||
async getDatas () {
|
|
||||||
let res = await getTable(this.value, this.keyValue, this.value1 !== null ? dateFtt(this.value1[0]) : '', this.value1 !== null ? dateFtt(this.value1[1]) : '')
|
|
||||||
if (res.code === 200) {
|
|
||||||
res.content.map(el => {
|
|
||||||
this.status.map(e => {
|
|
||||||
if (e.value === Number(el.workorder_status)) {
|
|
||||||
this.$set(el, 'workorder_status_name', e.label)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
this.dataList = [...res.content]
|
|
||||||
}
|
|
||||||
this.dataList = [...res.content]
|
|
||||||
},
|
|
||||||
clearData (e) {
|
|
||||||
switch (e) {
|
|
||||||
case 1:
|
|
||||||
this.keyValue = ''
|
|
||||||
break
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
toRadio (e) {
|
toRadio (e) {
|
||||||
this.pkId = this.pkId === e.workorder_id ? '' : e.workorder_id
|
this.pkId = this.pkId === e.bill_code ? '' : e.bill_code
|
||||||
this.pkObj = this.pkId === e.workorder_id ? e : {}
|
this.pkObj = this.pkId === e.bill_code ? e : {}
|
||||||
},
|
},
|
||||||
showDialog () {
|
toSure () {
|
||||||
if (!this.pkId) {
|
this.$router.push('/finishedinstore')
|
||||||
this.toast('请选择一行')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.nokQty = ''
|
|
||||||
this.repareQty = ''
|
|
||||||
this.$refs.child.active = true
|
|
||||||
},
|
},
|
||||||
toSureDialog () {
|
clear () {
|
||||||
this._unqualReport()
|
this.value1 = ''
|
||||||
|
this.value2 = ''
|
||||||
|
this.pkId = ''
|
||||||
|
this.pkObj = {}
|
||||||
},
|
},
|
||||||
// 残次品报工
|
close () {
|
||||||
async _unqualReport () {
|
this.$router.push('/finishedinstore')
|
||||||
this.$refs.child.disabled = true
|
},
|
||||||
|
async _inconfirm () {
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
if (!this.pkId) {
|
if (!this.pkId) {
|
||||||
this.toast('请选择一行')
|
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await unqualReport(this.pkId, this.nokQty, this.repareQty)
|
let res = await inconfirm(this.pkObj)
|
||||||
this.toast(res.message)
|
this.toast(res.message)
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
this.pkId = ''
|
this.pkId = ''
|
||||||
this.pkObj = {}
|
this.pkObj = {}
|
||||||
this.$refs.child.active = false
|
this._outgetAll()
|
||||||
this.$refs.child.disabled = false
|
|
||||||
this.getDatas()
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
this.$refs.child.active = false
|
|
||||||
this.$refs.child.disabled = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.filter_item
|
.grid_wraper
|
||||||
&:nth-child(1)
|
|
||||||
width 37%
|
|
||||||
&:nth-child(2)
|
|
||||||
width calc(30% - 10px)
|
|
||||||
&:nth-child(3)
|
|
||||||
width calc(33% - 10px)
|
|
||||||
.filter-input_1
|
|
||||||
padding-right 30px
|
|
||||||
.close_icon
|
|
||||||
width 20px
|
|
||||||
height 20px
|
|
||||||
font-size 15px
|
|
||||||
line-height 20px
|
|
||||||
top 5px
|
|
||||||
right 10px
|
|
||||||
.search-item_2
|
|
||||||
margin-left 0
|
|
||||||
&:nth-child(4)
|
|
||||||
margin-left 2%
|
|
||||||
margin-right 0
|
|
||||||
.search-item
|
|
||||||
&:nth-child(2)
|
|
||||||
margin-left 2%
|
|
||||||
margin-right 0
|
|
||||||
.grid_wraper
|
|
||||||
height calc(100% - 1.1rem)
|
height calc(100% - 1.1rem)
|
||||||
</style>
|
.filter_input_wraper_1
|
||||||
|
width calc(100% - 45px)
|
||||||
|
.search-label_1
|
||||||
|
width 45px
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user