外包材

This commit is contained in:
2026-01-08 10:57:11 +08:00
parent afc569e771
commit e05a972dbd
17 changed files with 131 additions and 77 deletions

View File

@@ -1,6 +1,6 @@
<template>
<view class="zd_container">
<!-- 产线转运 -->
<!-- 点对点转运 -->
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
@@ -40,8 +40,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
// import {queryVehicleType} from '@/utils/mork2.js'
import {queryVehicleType, createTask} from '@/utils/getData2.js'
import {createTask} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -50,34 +49,18 @@
data() {
return {
title: '',
vehicleCode: null,
code1: '',
code2: '',
options: [],
options: [{text:'普通任务', value: '1'}],
index: '',
disabled: false
};
},
onLoad (options) {
this.title = options.title
this._queryVehicleType()
},
methods: {
/** 下拉框*/
async _queryVehicleType () {
try {
let res = await queryVehicleType()
if (res && res.data.length > 0) {
this.options = [...res.data]
} else {
this.options = []
}
} catch (e) {
this.options = []
}
},
toEmpty () {
this.vehicleCode = null
this.code1 = ''
this.code2 = ''
this.index = ''
@@ -90,7 +73,7 @@
return
}
try {
let res = await createTask(this.vehicleCode, this.code1, this.code2, this.index)
let res = await createTask(this.code1, this.code2, this.index)
if (res) {
uni.showToast({
title: res.message,

View File

@@ -47,12 +47,12 @@
</tr>
</thead>
<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">
<td>{{e.task_time}}</td>
<td>{{e.vehicle_code}}</td>
<td>{{e.point_code1}}</td>
<td>{{e.point_code2}}</td>
<td>{{['生成', '', '', '下发', '执行中', '完成'][Number(e.task_status)]}}</td>
<td>{{['', '', '', '', '', '完成', '取消'][Number(e.task_status)]}}</td>
<td>{{e.task_code}}</td>
<td>{{e.config_name}}</td>
<td>{{e.car_no}}</td>
@@ -73,7 +73,7 @@
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getDate} from '@/utils/utils.js'
import {queryHistoryTask} from '@/utils/getData2.js'
import {queryHistoryTask} from '@/utils/getData3.js'
export default {
components: {
NavBar,

View File

@@ -19,7 +19,7 @@
<view class="zd-col-13">
<search-box v-model="vehicleCode"/>
</view>
<button class="mini-btn" type="primary" @tap="_updatePointqueryPointInfo">查询</button>
<button class="mini-btn" type="primary" @tap="_pdaPointAndPointqueryPointDtl">查询</button>
</view>
</view>
<view class="zd_wrapper grid-wraper">
@@ -28,6 +28,8 @@
<thead>
<tr>
<th>序号</th>
<th>点位编码</th>
<th>载具编码</th>
<th>物料编码</th>
<th>物料名称</th>
<th>批次</th>
@@ -38,6 +40,8 @@
<tbody>
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.material_code === pkId}">
<td>{{i+1}}</td>
<td>{{e.point_code}}</td>
<td>{{e.vehicle_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
@@ -51,7 +55,7 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !pointCode || !vehicleCode}" :disabled="disabled" @tap="_bindVehicle">绑定</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !pointCode || !vehicleCode}" :disabled="disabled" @tap="_bind">绑定</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !pointCode || !vehicleCode}" :disabled="disabled" @tap="_clearVehicle">清载具</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !pointCode || !vehicleCode}" :disabled="disabled" @tap="_clearMaterial">清物料</button>
</view>
@@ -61,8 +65,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
// import {updatePointqueryPointInfo} from '@/utils/mork2.js'
import {updatePointqueryPointInfo, bindVehicle, clearVehicle, clearMaterial} from '@/utils/getData2.js'
import {pdaPointAndPointqueryPointDtl, bind, clearVehicle, clearMaterial} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -81,9 +84,12 @@
this.title = options.title
},
methods: {
async _updatePointqueryPointInfo () {
async _pdaPointAndPointqueryPointDtl () {
if (!this.pointCode && !this.vehicleCode) {
return
}
try {
let res = await updatePointqueryPointInfo(this.pointCode, this.vehicleCode)
let res = await pdaPointAndPointqueryPointDtl(this.pointCode, this.vehicleCode)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
@@ -99,9 +105,9 @@
this.dataList = []
this.disabled = false
},
async _bindVehicle () {
async _bind () {
try {
let res = await bindVehicle(this.pointCode, this.vehicleCode)
let res = await bind(this.pointCode, this.vehicleCode, this.dataList)
if (res) {
uni.showToast({
title: res.message,
@@ -115,7 +121,7 @@
},
async _clearVehicle () {
try {
let res = await clearVehicle(this.pointCode, this.vehicleCode)
let res = await clearVehicle(this.pointCode, this.vehicleCode, this.dataList)
if (res) {
uni.showToast({
title: res.message,
@@ -129,7 +135,7 @@
},
async _clearMaterial () {
try {
let res = await clearMaterial(this.pointCode, this.vehicleCode)
let res = await clearMaterial(this.pointCode, this.vehicleCode, this.dataList)
if (res) {
uni.showToast({
title: res.message,

View File

@@ -34,7 +34,7 @@
<td>{{e.vehicle_code}}</td>
<td>{{e.point_code1}}</td>
<td>{{e.point_code2}}</td>
<td>{{['生成', '', '', '下发', '执行中', '完成'][Number(e.task_status)]}}</td>
<td>{{['生成', '申请', '创建完成', '下发', '执行中'][Number(e.task_status)]}}</td>
<td>{{e.task_code}}</td>
<td>{{e.config_name}}</td>
<td>{{e.car_no}}</td>
@@ -46,7 +46,7 @@
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" :disabled="disabled1" @tap="_taskOperation">重新生成</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" :disabled="disabled1" @tap="_taskOperation">重新下发</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" :disabled="disabled2" @tap="_forceConfirmTask">强制完成</button>
<button class="zd-col-6 button-primary" @tap="toJump('ls-search?title=历史查询')">历史查询</button>
</view>
@@ -56,7 +56,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryTask, taskOperation, forceConfirmTask} from '@/utils/getData2.js'
import {queryTask, taskOperation, forceConfirmTask} from '@/utils/getData3.js'
export default {
components: {
NavBar,