手持优化

RS2509
jheng 2026-01-14 19:53:04 +08:00
parent de9e0a207f
commit 86e5fda2ee
6 changed files with 241 additions and 299 deletions

View File

@ -3,6 +3,8 @@ import request from '@/utils/request'
/** 接口 */ /** 接口 */
const Api = { const Api = {
emptyPalletIn: '/api/wms/pda/emptyPalletIn', emptyPalletIn: '/api/wms/pda/emptyPalletIn',
premptyPalletIn: '/api/wms/ProjectPDA/emptyPalletIn',
callEmptyOut: '/api/wms/ProjectPDA/callEmptyRackOut',
} }
/** 空托盘组盘表单提交 */ /** 空托盘组盘表单提交 */
export const emptyPalletIn = data => { export const emptyPalletIn = data => {
@ -12,3 +14,20 @@ export const emptyPalletIn = data => {
method: 'POST' method: 'POST'
}) })
} }
/** 空托盘组盘表单提交 */
export const premptyPalletIn = data => {
return request({
url: Api.premptyPalletIn,
data: data,
method: 'POST'
})
}
/** 空托盘组盘表单提交 */
export const callEmptyRackOut = data => {
return request({
url: Api.callEmptyRackOut,
data: data,
method: 'POST'
})
}

View File

@ -37,7 +37,7 @@
v-if="item.type=='video'"></video> v-if="item.type=='video'"></video>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="grid-body"> <view v-if="false" class="grid-body">
<view class="bodytitle"> <view class="bodytitle">
业务操作 业务操作
</view> </view>
@ -55,7 +55,7 @@
<view style="width: 140rpx;"></view> <view style="width: 140rpx;"></view>
</view> </view>
</view> </view>
<scroll-view v-if="userRoutes.length>0 scroll-x class="bg-white nav work-container" scroll-with-animation :scroll-left="scrollLeft"> <scroll-view v-if="userRoutes.length>0" scroll-x class="bg-white nav work-container" scroll-with-animation :scroll-left="scrollLeft">
<view class="cu-item" :class="index==TabCur?'text-green cur':''" v-for="(item,index) in userRoutes" <view class="cu-item" :class="index==TabCur?'text-green cur':''" v-for="(item,index) in userRoutes"
:key="index" @tap="tabSelect" :data-id="index" :data-routeList="item"> :key="index" @tap="tabSelect" :data-id="index" :data-routeList="item">
{{item.title}} {{item.title}}

View File

@ -8,26 +8,27 @@
<uni-forms ref="form" :model="formData" labelWidth="80px"> <uni-forms ref="form" :model="formData" labelWidth="80px">
<uni-forms-item label="容器类型" name="skuType"> <uni-forms-item label="容器类型" name="skuType">
<uni-data-select v-model="formData.skuType" :localdata="skuTypeList" @change="changeSkuType" <uni-data-select v-model="formData.skuType" :localdata="skuTypeList" @change="changeSkuType"
placeholder="请选择容器类型"> placeholder="请选择容器类型">
</uni-data-select> </uni-data-select>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="托盘编号" name="palletCode"> <uni-forms-item label="托盘编号" name="palletCode">
<uni-easyinput v-model="formData.palletCode" placeholder="请扫描托盘号" @blur="trimPalletInput"/> <uni-easyinput v-model="formData.palletCode" placeholder="请扫描托盘号" @blur="trimPalletInput" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="货位编号" name="locCode"> <uni-forms-item label="货位编号" name="locCode">
<uni-easyinput v-model="formData.locCode" placeholder="请扫描货位编号" @blur="trimLocInput"/> <uni-easyinput v-model="formData.locCode" placeholder="请扫描货位编号" @blur="trimLocInput" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="库区" name="warehouseArea" v-if="showWarehouseArea"> <uni-forms-item label="库区" name="warehouseArea" v-if="showWarehouseArea">
<uni-data-select v-model="formData.warehouseArea" :localdata="warehouseAreaList" placeholder="请选择库区" /> <uni-data-select v-model="formData.warehouseArea" :localdata="warehouseAreaList"
placeholder="请选择库区" />
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
<!-- <view class="button-group"> <!-- <view class="button-group">
<button :disabled="isButtonDisabled" style="width: 100px;" @click="callAgv"></button> <button :disabled="isButtonDisabled" style="width: 100px;" @click="callAgv"></button>
</view> --> </view> -->
</view> </view>
<bottomBtn :isSubmit="true" :isWhite="false" position="fixed" :disable="isButtonDisabled" <bottomBtn :isSubmit="true" :isWhite="false" position="fixed" :disable="isButtonDisabled" :texts="['确认入库']"
:texts="['确认入库']" @onSubmit="callAgv"></bottomBtn> @onSubmit="callAgv"></bottomBtn>
<view class="cu-modal" :class="msgModalName=='Modal'?'show':''"> <view class="cu-modal" :class="msgModalName=='Modal'?'show':''">
<view class="cu-dialog"> <view class="cu-dialog">
<view class="cu-bar bg-white justify-end"> <view class="cu-bar bg-white justify-end">
@ -47,11 +48,19 @@
<script> <script>
import { import {
getSkuDictionary,getSkuTypes,getLineCodes getSkuDictionary,
getSkuTypes,
getLineCodes
} from "@/api/wms/sku.js" } from "@/api/wms/sku.js"
import{queryAreaByLocCode} from "@/api/wms/palletDetailUnBind.js"
import { import {
createPalletBySku, callAgvIn,callEmptyRackIn queryAreaByLocCode
} from "@/api/wms/palletDetailUnBind.js"
import {
premptyPalletIn
} from "@/api/wms/palletIn.js"
import {
createPalletBySku,
callAgvIn
} from "@/api/wms/bill.js" } from "@/api/wms/bill.js"
import { import {
getDictionary getDictionary
@ -59,22 +68,24 @@
import { import {
formatDate formatDate
} from 'tough-cookie'; } from 'tough-cookie';
import {bottomBtn} from '@/components/bottomBtn/bottomBtn.vue' import {
bottomBtn
} from '@/components/bottomBtn/bottomBtn.vue'
export default { export default {
data() { data() {
return { return {
skuInput: '', skuInput: '',
showSkuDropdown: false, showSkuDropdown: false,
filteredSkuList: [], filteredSkuList: [],
originalSkuList: [], originalSkuList: [],
whCode: this.$store.state.user.warehouse[0]?.warehouseCode, whCode: this.$store.state.user.warehouse[0]?.warehouseCode,
userCode:this.$store.state.user.name, userCode: this.$store.state.user.name,
isButtonDisabled:false, isButtonDisabled: false,
autoCall:true, autoCall: true,
skuInfo:"", skuInfo: "",
callStatus:"已开启自动呼叫空容器", callStatus: "已开启自动呼叫空容器",
showWarehouseArea: false, showWarehouseArea: false,
warehouseAreaList: [], warehouseAreaList: [],
// //
formData: { formData: {
palletCode: "", palletCode: "",
@ -95,12 +106,12 @@
errorMessage: '请扫码托盘号' errorMessage: '请扫码托盘号'
}] }]
}, },
locCode: { /* locCode: {
rules: [{ rules: [{
required: true, required: true,
errorMessage: '请扫描货位号' errorMessage: '请扫描货位号'
}] }]
}, }, */
warehouseArea: { warehouseArea: {
rules: [{ rules: [{
required: true, required: true,
@ -167,8 +178,8 @@
warehouseList: [], warehouseList: [],
skuList: [], skuList: [],
skuTypeList: [], skuTypeList: [],
lineCodeList:[], lineCodeList: [],
skuArray: [], skuArray: [],
skushow: false, skushow: false,
invoiceCode: null, invoiceCode: null,
@ -186,9 +197,9 @@
msg: null msg: null
}; };
}, },
component:{ component: {
bottomBtn bottomBtn
}, },
onLoad() { onLoad() {
// //
this.getSkuTypes(); this.getSkuTypes();
@ -217,45 +228,45 @@
}, },
methods: { methods: {
maskClick(e){ maskClick(e) {
console.log('maskClick事件:', e); console.log('maskClick事件:', e);
}, },
onSkuInput(value) { onSkuInput(value) {
this.skuInput = value; this.skuInput = value;
this.filteredSkuList = this.originalSkuList this.filteredSkuList = this.originalSkuList
.filter(item => item.skuCode.includes(value)) .filter(item => item.skuCode.includes(value))
.map(item => ({ .map(item => ({
value: item.skuCode, value: item.skuCode,
text: `${item.skuCode} - ${item.skuName}` text: `${item.skuCode} - ${item.skuName}`
})); }));
this.showSkuDropdown = true; this.showSkuDropdown = true;
}, },
selectSku(item) { selectSku(item) {
this.formData.skuCode = item.value; this.formData.skuCode = item.value;
this.skuInput = item.value; // this.skuInput = item.value; //
this.showSkuDropdown = false; this.showSkuDropdown = false;
this.skuInfo= item.text this.skuInfo = item.text
}, },
handleSkuBlur() { handleSkuBlur() {
setTimeout(() => { setTimeout(() => {
this.showSkuDropdown = false; this.showSkuDropdown = false;
}, 200); }, 200);
}, },
// //
trimPalletInput(event) { trimPalletInput(event) {
this.formData.palletCode = event.target.value.trim(); this.formData.palletCode = event.target.value.trim();
}, },
// //
async trimLocInput(event) { async trimLocInput(event) {
this.formData.locCode = event.target.value.trim(); this.formData.locCode = event.target.value.trim();
if(!this.formData.locCode) { /* if (!this.formData.locCode) {
// //
this.$modal.msgError("请扫描货位编号") this.$modal.msgError("请扫描货位编号")
return; return;
} } */
// //
let res = await queryAreaByLocCode({ let res = await queryAreaByLocCode({
@ -277,12 +288,12 @@
data: response.data.record, data: response.data.record,
}; };
}, },
switchChange(e){ switchChange(e) {
this.autoCall = e.detail.value; this.autoCall = e.detail.value;
if(this.autoCall){ if (this.autoCall) {
this.callStatus="已开启自动呼叫空容器" this.callStatus = "已开启自动呼叫空容器"
}else{ } else {
this.callStatus="已停止自动呼叫空容器" this.callStatus = "已停止自动呼叫空容器"
} }
}, },
// //
@ -292,23 +303,23 @@
//线 //线
async getLineCodes() { async getLineCodes() {
this.lineCodeList = await getLineCodes(); this.lineCodeList = await getLineCodes();
console.log("this.lineCodeList",this.lineCodeList) console.log("this.lineCodeList", this.lineCodeList)
}, },
changeSkuType(){ changeSkuType() {
this.skuInput=''; this.skuInput = '';
this.skuInfo=''; this.skuInfo = '';
}, },
// //
// async getSkus() { // async getSkus() {
// console.log("this.skuType",this.skuType) // console.log("this.skuType",this.skuType)
// if(this.skuType){ // if(this.skuType){
// this.skuList = await getSkuDictionary(this.skuType); // this.skuList = await getSkuDictionary(this.skuType);
// } // }
// }, // },
// //
async getWarehouses() { async getWarehouses() {
this.warehouseList = await getDictionary('warehouseList'); this.warehouseList = await getDictionary('warehouseList');
console.log("this.warehouseList",this.warehouseList) console.log("this.warehouseList", this.warehouseList)
}, },
// //
selectedItems() { selectedItems() {
@ -417,21 +428,21 @@
this.$modal.loading("请等待...") this.$modal.loading("请等待...")
this.$refs.form.validate().then(res => { this.$refs.form.validate().then(res => {
let requestData={ let requestData = {
...this.formData, ...this.formData,
userCode:this.userCode, userCode: this.userCode,
warehouseCode:this.whCode warehouseCode: this.whCode
} }
createPalletBySku(requestData).then(response => { createPalletBySku(requestData).then(response => {
console.log("response", response) console.log("response", response)
this.$modal.msgSuccess("组盘成功") this.$modal.msgSuccess("组盘成功")
}).finally(() => { }).finally(() => {
this.isButtonDisabled = false; // this.isButtonDisabled = false; //
this.$modal.closeLoading() this.$modal.closeLoading()
}); });
}).catch(()=>{ }).catch(() => {
this.isButtonDisabled = false; // this.isButtonDisabled = false; //
this.$modal.closeLoading() this.$modal.closeLoading()
}) })
}, },
//AGV //AGV
@ -440,21 +451,21 @@
this.$modal.loading("请等待...") this.$modal.loading("请等待...")
this.$refs.form.validate().then(res => { this.$refs.form.validate().then(res => {
let requestData={ let requestData = {
...this.formData, ...this.formData,
userCode:this.userCode, userCode: this.userCode,
warehouseCode:this.whCode warehouseCode: this.whCode
} }
callEmptyRackIn(requestData).then(response => { premptyPalletIn(requestData).then(response => {
console.log("response", response) console.log("response", response)
this.$modal.msgSuccess("呼叫入库成功") this.$modal.msgSuccess("呼叫入库成功")
}).finally(() => { }).finally(() => {
this.isButtonDisabled = false; // this.isButtonDisabled = false; //
this.$modal.closeLoading() this.$modal.closeLoading()
}); });
}).catch(()=>{ }).catch(() => {
this.isButtonDisabled = false; // this.isButtonDisabled = false; //
this.$modal.closeLoading() this.$modal.closeLoading()
}) })
}, },
hideMsgModal(e) { hideMsgModal(e) {
@ -494,7 +505,7 @@
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background: rgb(242, 243, 245); background: rgb(242, 243, 245);
height: 100vh; height: 100vh;
@ -521,38 +532,48 @@
font-weight: 400; font-weight: 400;
color: #86909C; color: #86909C;
} }
.textarea{
.textarea {
background-color: #F2F3F5; background-color: #F2F3F5;
width: 100%; width: 100%;
} }
::v-deep.full-width-textarea{
width: 100%!important; ::v-deep.full-width-textarea {
border: unset!important; width: 100% !important;
border: unset !important;
} }
::v-deep .is-input-border{
::v-deep .is-input-border {
border: unset; border: unset;
} }
::v-deep .uni-easyinput__placeholder-class{
::v-deep .uni-easyinput__placeholder-class {
font-size: 28rpx; font-size: 28rpx;
color: #86909C; color: #86909C;
} }
::v-deep .uni-input-input{
::v-deep .uni-input-input {
font-size: 28rpx; font-size: 28rpx;
} }
::v-deep .uni-select__input-placeholder{
::v-deep .uni-select__input-placeholder {
font-size: 28rpx; font-size: 28rpx;
color: #86909C; color: #86909C;
} }
::v-deep .uniui-bottom{
::v-deep .uniui-bottom {
display: none; display: none;
} }
::v-deep .uniui-top{
::v-deep .uniui-top {
display: none; display: none;
} }
.fromItem{
.fromItem {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.cu-form-group .title { .cu-form-group .title {
min-width: calc(4em + 15px); min-width: calc(4em + 15px);
} }

View File

@ -1,222 +1,122 @@
<template> <template>
<view class="container"> <view class="container">
<cu-custom :isBack="true"> <cu-custom bgColor="bg-gradual-pink" :isBack="true">
<block slot="backText"></block> <block slot="backText">返回</block>
<block slot="content">空容器出库</block> <block slot="content">空托盘下架</block>
</cu-custom> </cu-custom>
<view class="example"> <view class="example">
<uni-forms ref="form" :model="formData" labelWidth="80px"> <uni-forms ref="form" :model="formData" labelWidth="80px">
<uni-forms-item label="仓库编号" name="houseCode">
<uni-forms-item label="空容器" name="palletCode"> <uni-easyinput v-model="formData.houseCode" placeholder="请输入仓库编号" />
<view class="fromItem"> </uni-forms-item>
<uni-easyinput v-model="ktpCode" disabled /> <uni-forms-item label="出库站台" name="outStation">
<image style="width: 28rpx;" src="/static/images/right.png" mode="widthFix"></image> <uni-easyinput v-model="formData.outStation" placeholder="请输入出库站台" />
</uni-forms-item>
<uni-forms-item label="下架数量" name="skuQty">
<uni-easyinput v-model="formData.skuQty" placeholder="请输入下架数量" />
</uni-forms-item>
<uni-forms-item label="容器类型" name="skuType">
<picker @change="PickerChange" :value="index" :range="picker">
<uni-easyinput v-model="formData.skuType" placeholder="请输入托盘类型" />
<view class="picker">
</view> </view>
</uni-forms-item> </picker>
<uni-forms-item label="货位编号" name="locCode"> </uni-forms-item>
<view class="fromItem"> </uni-forms>
<uni-easyinput v-model="formData.locCode" placeholder="请扫描货位编号" @blur="trimLocInput" /> <button type="primary" @click="formSubmit"></button>
<image style="width: 28rpx;" src="/static/images/right.png" mode="widthFix"></image> </view>
</view>
</uni-forms-item>
<uni-forms-item label="容器数量" name="skuQty">
<view class="fromItem">
<uni-easyinput v-model="formData.skuQty" disabled type="number" placeholder="请输入物料数量" />
<image style="width: 28rpx;" src="/static/images/right.png" mode="widthFix"></image>
</view>
</uni-forms-item>
</uni-forms>
<!-- <view class="button-group">
<button type="primary" style="width: 200px;" :disabled="isButtonDisabled"
@click="submitPallet">呼叫出库</button>
</view> -->
</view>
<bottomBtn :isSubmit="true" :isWhite="false" position="fixed" :disable="isButtonDisabled"
:texts="['呼叫出库']" @onSubmit="submitPallet"></bottomBtn>
<view class="cu-modal" :class="msgModalName=='Modal'?'show':''">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view class="content">{{msgTitleName}}</view>
<view class="action" @tap="hideMsgModal">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class="padding-xl">
{{msg}}
</view>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
import { import {
getSkuDictionary, emptyPalletOut,
getSkuTypes } from "@/api/wms/palletOut.js"
} from "@/api/wms/sku.js"
import {
callEmptyOut
} from "@/api/wms/bill.js"
import {
getDictionary
} from "@/api/wms/dictData.js"
import { import {
formatDate formatDate
} from 'tough-cookie'; } from 'tough-cookie';
import {bottomBtn} from '@/components/bottomBtn/bottomBtn.vue'
export default { export default {
data() { data() {
return { return {
isButtonDisabled: false,
autoCall: true,
ktpCode: "KTP0001",
msgTitleName: '标题',
msg: '消息',
msgModalName: "",
//
formData: { formData: {
locCode: "", houseCode: "RS2509",
skuQty: "1" outStation: "",
skuQty: 1,
skuType: "KTP002"
}, },
rules: { rules: {
locCode: { houseCode: {
rules: [{ rules: [{
required: true, required: true,
errorMessage: '请扫码货位号' errorMessage: '仓库编号不能为空'
}]
},
outStation: {
rules: [{
required: true,
errorMessage: '出库站台不能为空'
}] }]
}, },
skuQty: { skuQty: {
rules: [{ rules: [{
required: true, required: true,
errorMessage: '请输入物料数量' errorMessage: '下架数量不能为空'
}] }]
} },
skuType: {
rules: [{
required: true,
errorMessage: '下架类型不能为空'
}]
},
}, },
message: '操作提示信息!',
}; index: -1,
}, picker: ['KTP001', 'KTP002'],
onLoad() { }
}, },
onReady() { onReady() {
this.$refs.form.setRules(this.rules) this.$refs.form.setRules(this.rules)
}, },
component:{
bottomBtn
},
watch: {
},
methods: { methods: {
PickerChange(e) {
console.log("PickerChange", e)
console.log("PickerChange", e.detail.value)
this.index = e.detail.value
var picked = this.picker[e.detail.value]
this.formData.skuType = picked;
console.log("picked", picked)
},
//
formSubmit: function(ref) {
// formaData
console.log("formSubmit")
// this.$refs.form.validate().then(res => {
trimLocInput(event) { console.log("数据校验通过", res)
this.formData.locCode = event.target.value.trim();
}, console.log("this.formData", this.formData)
//AGV emptyPalletOut(this.formData).then(response => {
submitPallet: function() { console.log("response", response)
//this.msgModalName='Modal' this.$modal.msgSuccess("下架成功请等待")
this.isButtonDisabled = true; })
this.$modal.loading("请等待...") })
if (!this.formData.locCode) {
this.$modal.closeLoading()
}
const whcode = this.$store.state.user.warehouse[0]?.warehouseCode;
var data = {
locCode: this.formData.locCode,
userCode: this.$store.state.user.name,
warehouseCode: whcode
}
callEmptyOut(data).then(response => {
console.log("response", response)
this.$modal.msgSuccess("呼叫入库成功")
}).finally(() => {
this.isButtonDisabled = false; //
this.$modal.closeLoading()
});
}, },
hideMsgModal(e) { hideMsgModal(e) {
// //
this.msgModalName = null; this.msgModalName = null;
}, },
textareaAInput(e) {
this.textareaAValue = e.detail.value
},
textareaBInput(e) {
this.textareaBValue = e.detail.value
}
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.container {
background: rgb(242, 243, 245);
height: 100vh;
}
.uni-forms-item {
border-bottom: 1px solid #E5E6EB;
margin-bottom: 0;
padding: 24rpx 0;
}
::v-deep .uni-forms-item__label {
color: #1D2129;
font-size: 28rpx;
font-weight: 400;
}
::v-deep .uni-select {
border: 0px;
}
::v-deep.uni-select__input-placeholder {
font-size: 28rpx;
font-weight: 400;
color: #86909C;
}
.textarea{
background-color: #F2F3F5;
width: 100%;
}
::v-deep.full-width-textarea{
width: 100%!important;
border: unset!important;
}
::v-deep .is-input-border{
border: unset;
}
::v-deep .uni-easyinput__placeholder-class{
font-size: 28rpx;
color: #86909C;
}
::v-deep .uni-input-input{
font-size: 28rpx;
}
::v-deep .uni-select__input-placeholder{
font-size: 28rpx;
color: #86909C;
}
::v-deep .uniui-bottom{
display: none;
}
::v-deep .uniui-top{
display: none;
}
.fromItem{
display: flex;
align-items: center;
}
.example {
padding: 0 24rpx;
background-color: #fff;
width: 702rpx;
border-radius: 24rpx;
margin: 24rpx auto;
}
.cu-form-group .title { .cu-form-group .title {
min-width: calc(4em + 15px); min-width: calc(4em + 15px);
} }
@ -225,7 +125,10 @@ component:{
background-color: #ffffff; background-color: #ffffff;
} }
.example {
padding: 15px;
background-color: #fff;
}
.segmented-control { .segmented-control {
margin-bottom: 15px; margin-bottom: 15px;
@ -250,12 +153,4 @@ component:{
line-height: 35px; line-height: 35px;
margin-left: 10px; margin-left: 10px;
} }
.switch-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px;
border-bottom: 1px solid #eee;
}
</style> </style>

View File

@ -333,7 +333,7 @@
this.formData.details = details this.formData.details = details
inventoryConfirm(this.formData).then(response => { inventoryConfirm(this.formData).then(response => {
console.log("response",response) console.log("response",response)
this.$modal.msgSuccess("盘成功") this.$modal.msgSuccess("点确认成功")
}) })
}) })
} }

View File

@ -1,6 +1,6 @@
{ {
"code": 200, "code": 200,
"data": [ "data2": [
{ {
"path": "/pages/work/wms/skuCreatePallet", "path": "/pages/work/wms/skuCreatePallet",
"name": "skuCreatePallet", "name": "skuCreatePallet",
@ -82,6 +82,13 @@
"title": "空容器入库", "title": "空容器入库",
"color": "red", "color": "red",
"icon": "/static/images/work/组合1758.png" "icon": "/static/images/work/组合1758.png"
},
{
"path": "/pages/work/wms/inventoryConfirm",
"name": "inventoryConfirm",
"title": "盘点确认",
"color": "red",
"icon": "/static/images/work/组合1758.png"
} }
], ],
"msg": "成功" "msg": "成功"