作业管理

This commit is contained in:
2025-09-12 13:14:05 +08:00
parent bff95dcce7
commit ac42b84feb
2 changed files with 96 additions and 319 deletions

View File

@@ -1,43 +1,32 @@
<template> <template>
<view class="zd_container"> <view class="zd_container">
<!-- 作业管理 --> <nav-bar title="任务管理"></nav-bar>
<nav-bar :title="title"></nav-bar>
<view class="zd_content"> <view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-5">
<span class="filter_label">关键字</span>
</view>
<view class="zd-col-14">
<input type="text" placeholder="载具号/点位号/作业号" class="filter_input" v-model="keyword" @focus="handleFocus">
</view>
<button class="mini-btn" type="primary" size="mini" @tap="searchList">查询</button>
</view>
</view>
<view class="zd_wrapper grid-wraper"> <view class="zd_wrapper grid-wraper">
<view class="slide_new"> <view class="slide_new">
<table> <table>
<thead> <thead>
<tr> <tr>
<th>载具</th> <th>任务</th>
<th>起点</th> <th>起点</th>
<th>终点</th> <th>终点</th>
<th>状态</th> <th>状态</th>
<th>作业</th> <th>托盘</th>
<th>作业类型</th> <th>物料类型</th>
<th>设备号</th> <th>优先级</th>
<th>当前步骤</th> <th>时间</th>
<th>异常信息</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.material_id === pkId}" @tap="toCheck(e)"> <tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.task_uuid === pkId}">
<td>{{e.material_code}}</td> <td>{{e.task_no}}</td>
<td>{{e.material_name}}</td> <td>{{e.start_devicecode}}</td>
<td>{{e.material_spec}}</td> <td>{{e.next_devicecode}}</td>
<td>{{e.unit_id}}</td> <td>{{e.task_status_name}}</td>
<td>{{e.single_weight}}</td> <td>{{e.vehicle_code}}</td>
<td>{{e.pcsn}}</td> <td>{{e.material_type_name}}</td>
<td>{{e.priority}}</td>
<td>{{e.create_time}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -45,65 +34,93 @@
</view> </view>
</view> </view>
<view class="zd-row submit-bar"> <view class="zd-row submit-bar">
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" :disabled="disabled">重新下发</button> <button class="zd-col-11 button-primary" :class="{'button-info': !pkId}" :disabled="disabled1" @tap="toSure1('1')">重新生成</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" :disabled="disabled">强制完成</button> <button class="zd-col-11 button-primary" :class="{'button-info': !pkId}" :disabled="disabled2" @tap="toSure2('2')">强制完成</button>
<button class="zd-col-7 button-primary" @tap="toJump('operation?title=查询作业')">历史查询</button>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import NavBar from '@/components/NavBar.vue' import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue' import {queryTask, taskOperation} from '@/utils/getData2.js'
import {groupMaterList} from '@/utils/getData2.js'
export default { export default {
components: { components: {
NavBar, NavBar
SearchBox
}, },
data() { data() {
return { return {
title: '', keyword: '',
keyword: null, startPoint: '',
endPoint: '',
dataList: [], dataList: [],
pkId: '', disabled1: false,
pkObj: {}, disabled2: false,
disabled: false disabled3: false,
pkId: ''
}; };
}, },
onLoad (options) { created () {
this.title = options.title this._queryTask(this.keyword, this.startPoint, this.endPoint)
}, },
methods: { methods: {
handleFocus () { async _queryTask () {
this.keyword = null let res = await queryTask(this.keyword, this.startPoint, this.endPoint)
if (res.code === '1') {
this.dataList = [...res.result]
} else {
uni.showToast({
title: res.desc,
icon: 'none'
})
}
}, },
toJump (name) { async _taskOperation (type) {
uni.navigateTo({ try {
url: `/pages/General/${name}` let res = await taskOperation(this.pkId, type)
}) if (res.code === '1') {
}, this.disabled1 = false
searchList () { this.disabled2 = false
this.dataList = [] this.pkId = ''
this.pageNum = 1 this._queryTask()
this._groupMaterList() uni.showToast({
}, title: res.desc,
async _groupMaterList () { icon: 'none'
let res = await groupMaterList() })
if (res.code === '200') { } else {
this.dataList = [...res] uni.showToast({
title: res.desc,
icon: 'none'
})
this.disabled1 = false
this.disabled2 = false
}
} catch (err) {
this.disabled1 = false
this.disabled2 = false
} }
}, },
toCheck (e) { toCheck (e) {
this.pkId = this.pkId === e.material_id ? '' : e.material_id this.pkId = this.pkId === e.task_uuid ? '' : e.task_uuid
this.pkObj = this.pkId === e.material_id ? e : {}
}, },
toSure () { toSure1 (type) {
if (this.pkId) { this.disabled1 = true
this.$store.dispatch('setPublicObj', this.pkObj) if (!this.pkId) {
uni.navigateBack() this.disabled1 = false
return
} }
this._taskOperation(type)
},
toSure2 (type) {
this.disabled2 = true
if (!this.pkId) {
this.disabled2 = false
return
}
this._taskOperation(type)
} }
} }
} }
</script> </script>
<style lang="stylus">
</style>

View File

@@ -150,263 +150,23 @@ export const clearMaterial = (code, scode) => request({
} }
}) })
/**
* 物料组盘入库
*/
export const storList = () => request({
url:'api/pda/common/storList',
data: {}
})
export const groupMaterList = (page, size, search) => request({
url:'api/groupMater/maters',
data: {page: page, size: size, search: search}
})
export const groupMaterIn = (code, item) => request({
url:'api/groupMater/in',
data: {stor_code: code, item: item}
})
/**
* 设备操控
*/
export const switchInOut = (code, mode) => request({
url:'api/deviceManage/changeMode/switchInOut',
data: {device_code: code, mode: mode}
})
export const pinkStartStop = (code, mode) => request({
url:'api/deviceManage/changeMode/pinkStartStop',
data: {device_code: code, mode: mode}
})
export const toCommandTP = (code, mode, vcode, isC) => request({
url:'api/deviceManage/changeMode/toCommandTP',
data: {device_code: code, mode: mode, vehicle_code: vcode, is_check: isC}
})
/**
* 组盘入库
*/
// 单据类型
export const FormTypes = () => request({
method: 'GET',
url:'api/bmFormStruc/getTypes?type=pda'
})
// 单据数据
export const pmFormData = (page, size, form_type, code) => request({
method: 'GET',
url:'api/pmFormData?page=' + page + '&size=' + size + '&form_type=' + form_type + '&vehicle_code=' + code
})
// 组盘确认
export const mdGruopDick = (item, code, type) => request({
url:'api/mdGruopDick',
data: {item: item, stor_code: code, type: type}
})
/**
* 空托盘入库
*/
export const pdaPalletIostorinvIn = (code, id) => request({
url:'api/pdaPalletIostorinv/in',
data: {vehicle_code: code, material_id: id}
})
/**
* 托盘出库
*/
export const targetPoint = () => request({
url:'api/pdaPalletIostorinv/targetPoint',
method: 'GET'
})
export const pdaPalletIostorinvOut = (id, qty, point) => request({
url:'api/pdaPalletIostorinv/out',
data: {material_id: id, qty: qty, pcsn: '1', target_point: point}
})
/**
* 出库确认
*/
export const ioStorageOut = (code) => request({
url:'api/ioStorage/out',
data: {vehicle_code: code}
})
/**
* 拣选单列表
*/
export const pmFormData2 = (page, size, form_type, status, code) => request({
method: 'GET',
url:'api/pmFormData?page=' + page + '&size=' + size + '&form_type=' + form_type + '&status=' + status + '&vehicle_code=' + code
})
// 扫载具查看拣选单信息
export const queryPick = (type, code) => request({
url:'api/pda/pick/queryPick',
data: {form_type: type, vehicle_code: code}
})
export const savePickTask = (data) => request({
url:'api/pda/pick/savePickTask',
data: data
})
/**
* 盘点作业
*/
export const checkByVehicle = (code) => request({
url:'api/pda/check/byVehicle',
data: {vehicle_code: code}
})
export const checkSaveCheckTask = (id, vehicle, qty, cqty) => request({
url:'api/pda/check/saveCheckTask',
data: {children_id: id,children_vehicle: vehicle,check_qty, qty,children_qty: cqty}
})
/** /**
* 任务管理 * 任务管理
*/ */
export const getStatusEnum = () => request({ // 1.1 查询未完成指令
method: 'GET', export const queryTask = (keyword, scode, ncode) => request({
url:'api/dict/getStatusEnum?code=TASK_TYPE' url:'api/hand/tasks',
data: {
keyword: keyword,
start_devicecode: scode,
next_devicecode: ncode
}
}) })
export const schBaseTask = (page, size, sort, code) => request({ // 1.2 指令操作
method: 'GET', export const taskOperation = (uuid, type) => request({
url:'api/schBaseTask?page=' + page + '&size=' + size + '&sort=' + sort + '&vehicle_code=' + code url:'api/hand/taskoperation',
}) data: {
export const saveCheckTask = (code, status) => request({ inst_uuid: uuid,
url:'api/pda/check/saveCheckTask', type: type
data: {task_code: code, status: status} }
})
/**
* 单据出库
*/
export const outStorageOrder = () => request({
method: 'GET',
url:'api/pda/outStorage/order'
})
export const outStorageOrderList = (page, size, type, code) => request({
method: 'GET',
url:'api/pda/outStorage/orderList?page=' + page + '&size=' + size + '&form_type=' + type + '&code=' + code
})
export const outStorageOrderConfirm = (code, scode) => request({
url:'api/pda/outStorage/orderConfirm',
data: {code: code, stor_code: scode}
})
export const outStorageConfirm = (obj) => request({
url:'api/pda/outStorage/confirm',
data: obj
})
// export const outStorageConfirm = (obj) => {
// let res = {
// code: '200',
// msg: 'ok'
// }
// return res
// }
// 扫描合格证获取物料信息
export const getCertificateInfo = (id) => request({
url:'api/pda/inStorage/getCertificateInfo/' + id,
method: 'GET'
})
// export const getCertificateInfo = (id) => {
// let res = {
// moNumber: '订单号',
// material_code: 'material_code',
// material_name: 'material_name',
// material_spec: 'material_spec',
// unit_name: 'unit_name',
// qty: '100',
// stockOrgId: 'StockOrgId',
// ownerId_id: 'OwnerId_Id',
// single_weight: '500',
// pcsn: 'pcsn'
// }
// return res
// }
// 单据入库组盘确认
export const inStorageConfirm = (obj) => request({
url:'api/pda/inStorage/confirm',
data: obj
})
/**
* 托盘转运
*/
export const deviceManageTransf = (start) => request({
url:'api/deviceManage/transf',
data: {start: start}
})
export const transfConfirm = (start, end, code) => request({
url:'api/deviceManage/transfConfirm',
data: {start: start, end: end, vehicle_code: code}
})
/**
* 库存出库
*/
export const structattrPage = (page, size, code, mcode, has, pcsn, vcode, stcode) => request({
url:'api/structattr/checkQuery?page=' + page + '&size=' + size + '&stor_code=' + code + '&material_code=' + mcode + '&has=' + has + '&pcsn=' + pcsn + '&vehicle_code=' + vcode + '&struct_code=' + stcode,
method: 'GET'
})
export const outStorageMaterConfirm = (obj) => request({
url:'api/pda/outStorage/materConfirm',
data: obj
})
/**
* 二楼生产出库
*/
export const queryTargetPoint = (scode) => request({
url:'api/pdaPalletIostorinv/queryTargetPoint',
data: {site_code: scode}
})
export const getCtuOrderList = (scode, bcode) => request({
url:'api/pda/outStorage/getCtuOrderList?site_code=' + scode + '&bill_code=' + bcode,
method: 'GET'
})
export const ctuOutConfirm = (scode, bcode, arr) => request({
url:'api/pda/outStorage/ctuOutConfirm',
data: {site_code: scode, bill_code: bcode, children: arr}
})
/**
* 二楼取货确认
*/
export const takeConfirm = (scode) => request({
url:'api/pda/outStorage/takeConfirm',
data: {site_code: scode}
})
/**
* 二楼货架绑定
*/
export const getPointStatus = (scode) => request({
url:'api/point/getPointStatus',
data: {site_code: scode}
})
export const bindOrUnbind = (scode, bcode, mode) => request({
url:'api/point/bindOrUnbind',
data: {site_code: scode, shelf_code: bcode, mode: mode}
})
export const pointUnbind = (scode, bcode, mode) => request({
url:'api/point/unbind',
data: {site_code: scode, shelf_code: bcode}
})
/**
* 单据入库
*/
export const inStorageOrder = () => request({
method: 'GET',
url:'api/pda/inStorage/order'
})
export const getBillNoInfo = (code, type) => request({
url:'api/pda/inStorage/getBillNoInfo',
data: {code: code, form_type: type}
})
/**
* 盘点入库
*/
export const queryMaterByVehicleCode = (code) => request({
url:'api/structattr/queryMaterByVehicleCode',
data: {vehicle_code: code}
})
export const checkMaterConfirm = (obj) => request({
url:'api/groupMater/checkMaterConfirm',
data: obj
})
/**
* 扫载具码调接口
*/
export const getStructCount = (code) => request({
url:'api/pda/common/getStructCount',
data: {vehicle_code: code}
}) })