外包材

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

@@ -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,