手持机功能修改

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, isConfirming: false,
selectedEntrance: '', selectedEntrance: '',
warehouseOptions:[ warehouseOptions:[
{ value: '01', text: '仓库1' }, { value: '01', text: '三联' },
{ value: '02', text: '仓库2' } { value: '02', text: '二联' }
], ],
selectedWarehouseId:"" selectedWarehouseId:""
} }

View File

@@ -1,5 +1,15 @@
<template> <template>
<view class="container"> <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"> <view class="input-group">
<text class="input-label">托盘条码:</text> <text class="input-label">托盘条码:</text>
<uni-easyinput <uni-easyinput
@@ -16,16 +26,7 @@
</template> </template>
</uni-easyinput> </uni-easyinput>
</view> </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"> <view class="button-group">
<button class="submit-button" @click="handleSubmit">空托盘入库</button> <button class="submit-button" @click="handleSubmit">空托盘入库</button>
</view> </view>
@@ -57,7 +58,7 @@ import { getBasWarehouList,getCargoSpaceList } from '@/api/bas/bas.js'
}, 100) }, 100)
// 获取仓库列表 // 获取仓库列表
// this.getWarehouseList() this.getWarehouseList()
}, },
methods: { methods: {
// 获取仓库列表 // 获取仓库列表
@@ -65,7 +66,8 @@ import { getBasWarehouList,getCargoSpaceList } from '@/api/bas/bas.js'
try { try {
const response = await getBasWarehouList({ const response = await getBasWarehouList({
pageNum:1, pageNum:1,
pageSize:100 pageSize:100,
warehouseType:1
}) })
if (response.code === 200) { if (response.code === 200) {

View File

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

View File

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

View File

@@ -1,15 +1,15 @@
<template> <template>
<view class="container"> <view class="container">
<!-- 出口选择框 --> <view class="input-group">
<!-- <view class="input-group"> <text class="input-label">仓库</text>
<text class="input-label">选择出口</text>
<uni-data-select <uni-data-select
v-model="selectedExit" v-model="warehouseId"
:localdata="exitOptions" :localdata="warehouseList"
placeholder="请选择出口" :clear="false"
class="select-input"> placeholder="请选择仓库"
</uni-data-select>
</view> --> />
</view>
<view class="input-group"> <view class="input-group">
<view class="input-label">托盘条码:</view> <view class="input-label">托盘条码:</view>
@@ -76,67 +76,36 @@
<uni-easyinput v-model="newMaterial.inQuantity" type="number" placeholder="请输入数量" /> <uni-easyinput v-model="newMaterial.inQuantity" type="number" placeholder="请输入数量" />
</view> </view>
</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-row">
<view class="form-col"> <view class="form-col">
<text class="form-label">合同号</text> <text class="form-label">合同号</text>
<uni-easyinput v-model="newMaterial.spare6" placeholder="请输入合同号" /> <uni-easyinput v-model="newMaterial.spare6" placeholder="请输入合同号" />
</view> </view>
<view class="form-col"> <view class="form-col">
<text class="form-label">管理号</text> <text class="form-label">产品号</text>
<uni-easyinput v-model="newMaterial.spare9" placeholder="请输入管理号" /> <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> </view>
<view class="form-row"> <view class="form-row">
<view class="form-col"> <view class="form-col">
<text class="form-label">质量等级</text> <text class="form-label">规格</text>
<uni-data-select :localdata="productStatus" v-model="newMaterial.spare8" placeholder="请选择质量等级"></uni-data-select> <uni-easyinput v-model="newMaterial.spec" placeholder="请输入规格" />
</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="请输入单价"/>
</view> </view>
</view> </view>
</view> </view>
<view class="popup-buttons"> <view class="popup-buttons">
<button class="cancel-btn" @click="hideAddMaterialPopup">取消</button> <button class="cancel-btn" @click="hideAddMaterialPopup">取消</button>
@@ -188,7 +157,12 @@
{ value:'2',text:'军用'} { value:'2',text:'军用'}
], ],
trayCode: '', trayCode: '',
warehouseId:null,
materialList: [], materialList: [],
warehouseList: [
{ value: '01', text: '三联' },
{ value: '02', text: '二联' }
],
newMaterial: { newMaterial: {
productId: '', productId: '',
inQuantity: '', inQuantity: '',
@@ -316,18 +290,19 @@
}, },
// 确认盘点 // 确认盘点
async handleConfirm() { async handleConfirm() {
// 验证出口选择 // 验证仓库选择
// if (!this.selectedExit) { if (!this.warehouseId) {
// uni.showToast({ uni.showToast({
// title: '请选择出口', title: '请选择仓库',
// icon: 'none' icon: 'none'
// }) })
// return return
// } }
try { try {
const data = { const data = {
trayCode: this.trayCode, trayCode: this.trayCode,
warehouseId: this.warehouseId,
// exitId: this.selectedExit, // exitId: this.selectedExit,
materials: this.materialList.map(item => ({ materials: this.materialList.map(item => ({
stockId: item.stockId, stockId: item.stockId,
@@ -358,6 +333,7 @@
this.trayCode = '' this.trayCode = ''
this.materialList = [] this.materialList = []
this.selectedExit = '' this.selectedExit = ''
this.warehouseId=null
} }

View File

@@ -302,6 +302,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
basCargoSpace.setStatus("2"); basCargoSpace.setStatus("2");
basCargoSpace.setTrayCode(mydoJob.getTrayCode()); basCargoSpace.setTrayCode(mydoJob.getTrayCode());
basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId()); basCargoSpace.setCargoSpaceId(mydoJob.getCargoSpaceId());
basCargoSpace.setTheType(mydoJob.getLineId());
basCargoSpaceService.updateBasCargoSpace(basCargoSpace); basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
//插入库存信息 //插入库存信息
@@ -429,7 +430,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
stock.setDistribution(mydoJobDetail.getSpare9()); stock.setDistribution(mydoJobDetail.getSpare9());
stock.setModel(mydoJobDetail.getUnit()); stock.setModel(mydoJobDetail.getUnit());
stock.setOrderId(mydoJobDetail.getSpare6()); stock.setOrderId(mydoJobDetail.getSpare6());
stock.setNetWeight(mydoJob.getLineId()); //stock.setNetWeight(mydoJob.getLineId());
return stock; 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> <if test="stockStatus != null and stockStatus != ''"> and bs.stock_status = #{stockStatus}</if>
</select> </select>
<select id="selectPlatByWeight" resultType="java.lang.Double"> <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 from bas_cargo_space bcs
LEFT join bas_stock bs on bcs.cargo_space_id = bs.cargo_space_id
where bcs.warehouse_id = #{warehouseId} where bcs.warehouse_id = #{warehouseId}
and bcs.roadway_id = #{roadwayId} and bcs.roadway_id = #{roadwayId}
and bcs.the_platoon = #{thePlatoon} and bcs.the_platoon = #{thePlatoon}

View File

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