手持机功能修改

This commit is contained in:
liuhanqing
2026-01-08 10:29:44 +08:00
parent 6f873fe6b0
commit a7ea6324ca
8 changed files with 89 additions and 86 deletions

View File

@@ -90,8 +90,8 @@ export default {
isConfirming: false,
selectedEntrance: '',
warehouseOptions:[
{ value: '01', text: '仓库1' },
{ value: '02', text: '仓库2' }
{ value: '01', text: '三联' },
{ value: '02', text: '二联' }
],
selectedWarehouseId:""
}

View File

@@ -1,5 +1,15 @@
<template>
<view class="container">
<view class="input-group">
<text class="input-label">仓库</text>
<uni-data-select
v-model="formData.warehouseId"
:localdata="warehouseList"
:clear="false"
placeholder="请选择仓库"
/>
</view>
<view class="input-group">
<text class="input-label">托盘条码:</text>
<uni-easyinput
@@ -16,16 +26,7 @@
</template>
</uni-easyinput>
</view>
<!-- <view class="input-group">
<text class="input-label">仓库</text>
<uni-data-select
v-model="formData.warehouseId"
:localdata="warehouseList"
:clear="false"
placeholder="请选择仓库"
/>
</view> -->
<view class="button-group">
<button class="submit-button" @click="handleSubmit">空托盘入库</button>
</view>
@@ -57,7 +58,7 @@ import { getBasWarehouList,getCargoSpaceList } from '@/api/bas/bas.js'
}, 100)
// 获取仓库列表
// this.getWarehouseList()
this.getWarehouseList()
},
methods: {
// 获取仓库列表
@@ -65,7 +66,8 @@ import { getBasWarehouList,getCargoSpaceList } from '@/api/bas/bas.js'
try {
const response = await getBasWarehouList({
pageNum:1,
pageSize:100
pageSize:100,
warehouseType:1
})
if (response.code === 200) {

View File

@@ -1,5 +1,15 @@
<template>
<view class="container">
<view class="input-group">
<text class="input-label">仓库选择</text>
<uni-data-select
v-model="warehouseId"
:localdata="warehouseOptions"
placeholder="请选择仓库"
class="select-input"
/>
</view>
<view class="input-group">
<uni-easyinput
v-model="trayCode"
@@ -68,8 +78,13 @@
data() {
return {
trayCode: '',
warehouseId:null,
materialList: [],
loading: false
loading: false,
warehouseOptions:[
{ value: '01', text: '三联' },
{ value: '02', text: '二联' }
],
}
},
methods: {
@@ -123,6 +138,13 @@
})
return
}
if (!this.warehouseId) {
uni.showToast({
title: '请选择仓库',
icon: 'none'
})
return
}
if (this.materialList.length === 0) {
uni.showToast({
@@ -134,7 +156,8 @@
try {
const response=await ckMakeSure({
trayCode: this.trayCode
trayCode: this.trayCode,
warehouseId: this.warehouseId
})
if (response.code==200) {
@@ -145,6 +168,7 @@
// 清空数据
this.trayCode = ''
this.materialList = []
this.warehouseId = null
}else{
uni.showToast({
title: response.msg,

View File

@@ -56,6 +56,7 @@ export default {
const res = await getBasWarehouList({
pageNum:1,
pageSize:100,
warehouseType:1
// typeData:['1','2']
})
if (res.code === 200) {

View File

@@ -1,15 +1,15 @@
<template>
<view class="container">
<!-- 出口选择框 -->
<!-- <view class="input-group">
<text class="input-label">选择出口</text>
<view class="input-group">
<text class="input-label">仓库</text>
<uni-data-select
v-model="selectedExit"
:localdata="exitOptions"
placeholder="请选择出口"
class="select-input">
</uni-data-select>
</view> -->
v-model="warehouseId"
:localdata="warehouseList"
:clear="false"
placeholder="请选择仓库"
/>
</view>
<view class="input-group">
<view class="input-label">托盘条码:</view>
@@ -76,67 +76,36 @@
<uni-easyinput v-model="newMaterial.inQuantity" type="number" placeholder="请输入数量" />
</view>
</view>
<view class="form-row">
<view class="form-col">
<text class="form-label">台次</text>
<uni-easyinput v-model="newMaterial.spare5" placeholder="请输入台次" />
</view>
<view class="form-col">
<text class="form-label">件次</text>
<uni-easyinput v-model="newMaterial.spare7" placeholder="请输入件次" />
</view>
</view>
<view class="form-row">
<view class="form-col">
<text class="form-label">合同号</text>
<uni-easyinput v-model="newMaterial.spare6" placeholder="请输入合同号" />
</view>
<view class="form-col">
<text class="form-label">管理号</text>
<uni-easyinput v-model="newMaterial.spare9" placeholder="请输入管理号" />
<text class="form-label">产品号</text>
<uni-easyinput v-model="newMaterial.spare7" placeholder="请输入产品号" />
</view>
</view>
<view class="form-row">
<view class="form-col">
<text class="form-label">代号</text>
<uni-easyinput v-model="newMaterial.spare9" placeholder="请输入代号" />
</view>
<view class="form-col">
<text class="form-label">台次</text>
<uni-easyinput v-model="newMaterial.spare5" placeholder="请输入台次" />
</view>
</view>
<view class="form-row">
<view class="form-col">
<text class="form-label">质量等级</text>
<uni-data-select :localdata="productStatus" v-model="newMaterial.spare8" placeholder="请选择质量等级"></uni-data-select>
</view>
<view class="form-col">
<text class="form-label">批次</text>
<uni-easyinput v-model="newMaterial.lotNo" placeholder="请输入批次" />
</view>
</view>
<!-- 可选扩展项(暂不显示) -->
<view class="form-row">
<view class="form-col">
<text class="form-label">状态</text>
<uni-data-select :localdata="turnover_type" v-model="newMaterial.spare2" placeholder="请选择状态"></uni-data-select>
</view>
<view class="form-col">
<text class="form-label">套账</text>
<uni-data-select :localdata="account_type" v-model="newMaterial.spare3" placeholder="请选择套账"></uni-data-select>
</view>
</view>
<view class="form-row">
<view class="form-col">
<text class="form-label">来源</text>
<uni-data-select :localdata="origin_type" v-model="newMaterial.spare1" placeholder="请选择来源"></uni-data-select>
</view>
<view class="form-col">
<text class="form-label">用途</text>
<uni-data-select :localdata="purpose_type" v-model="newMaterial.spare4" placeholder="请选择用途"></uni-data-select>
</view>
</view>
<view class="form-row">
<view class="form-col">
<text class="form-label">供应商</text>
<uni-easyinput v-model="newMaterial.supplierId" placeholder="请输入供应商"/>
</view>
<view class="form-col">
<text class="form-label">单价</text>
<uni-easyinput v-model="newMaterial.printDate" placeholder="请输入单价"/>
<text class="form-label">规格</text>
<uni-easyinput v-model="newMaterial.spec" placeholder="请输入规格" />
</view>
</view>
</view>
<view class="popup-buttons">
<button class="cancel-btn" @click="hideAddMaterialPopup">取消</button>
@@ -188,7 +157,12 @@
{ value:'2',text:'军用'}
],
trayCode: '',
warehouseId:null,
materialList: [],
warehouseList: [
{ value: '01', text: '三联' },
{ value: '02', text: '二联' }
],
newMaterial: {
productId: '',
inQuantity: '',
@@ -316,18 +290,19 @@
},
// 确认盘点
async handleConfirm() {
// 验证出口选择
// if (!this.selectedExit) {
// uni.showToast({
// title: '请选择出口',
// icon: 'none'
// })
// return
// }
// 验证仓库选择
if (!this.warehouseId) {
uni.showToast({
title: '请选择仓库',
icon: 'none'
})
return
}
try {
const data = {
trayCode: this.trayCode,
warehouseId: this.warehouseId,
// exitId: this.selectedExit,
materials: this.materialList.map(item => ({
stockId: item.stockId,
@@ -358,6 +333,7 @@
this.trayCode = ''
this.materialList = []
this.selectedExit = ''
this.warehouseId=null
}

View File

@@ -302,6 +302,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
basCargoSpace.setStatus("2");
basCargoSpace.setTrayCode(mydoJob.getTrayCode());
basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId());
basCargoSpace.setTheType(mydoJob.getLineId());
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
//插入库存信息
@@ -429,7 +430,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
stock.setDistribution(mydoJobDetail.getSpare9());
stock.setModel(mydoJobDetail.getUnit());
stock.setOrderId(mydoJobDetail.getSpare6());
stock.setNetWeight(mydoJob.getLineId());
//stock.setNetWeight(mydoJob.getLineId());
return stock;
}

View File

@@ -219,9 +219,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="stockStatus != null and stockStatus != ''"> and bs.stock_status = #{stockStatus}</if>
</select>
<select id="selectPlatByWeight" resultType="java.lang.Double">
select sum(CAST(ISNULL(bs.net_weight, 0) AS FLOAT))
select sum(CAST(ISNULL(bcs.the_type, 0) AS FLOAT))
from bas_cargo_space bcs
LEFT join bas_stock bs on bcs.cargo_space_id = bs.cargo_space_id
where bcs.warehouse_id = #{warehouseId}
and bcs.roadway_id = #{roadwayId}
and bcs.the_platoon = #{thePlatoon}

View File

@@ -96,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bs.spare4, --来源
bs.spare1, --用途
bs.distribution, --用途
bs.net_weight --重量
bcs.the_type as net_weight --重量
from bas_stock bs
left join bas_product bp on bs.product_id = bp.product_id
left join bas_warehouse bw on bs.warehouse_id = bw.warehouse_id