手持优化

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 = {
emptyPalletIn: '/api/wms/pda/emptyPalletIn',
premptyPalletIn: '/api/wms/ProjectPDA/emptyPalletIn',
callEmptyOut: '/api/wms/ProjectPDA/callEmptyRackOut',
}
/** 空托盘组盘表单提交 */
export const emptyPalletIn = data => {
@ -12,3 +14,20 @@ export const emptyPalletIn = data => {
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>
</swiper-item>
</swiper>
<view class="grid-body">
<view v-if="false" class="grid-body">
<view class="bodytitle">
业务操作
</view>
@ -55,7 +55,7 @@
<view style="width: 140rpx;"></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"
:key="index" @tap="tabSelect" :data-id="index" :data-routeList="item">
{{item.title}}

View File

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

View File

@ -1,222 +1,122 @@
<template>
<view class="container">
<cu-custom :isBack="true">
<block slot="backText"></block>
<block slot="content">容器出库</block>
<cu-custom bgColor="bg-gradual-pink" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">托盘下架</block>
</cu-custom>
<view class="example">
<uni-forms ref="form" :model="formData" labelWidth="80px">
<uni-forms-item label="空容器" name="palletCode">
<view class="fromItem">
<uni-easyinput v-model="ktpCode" disabled />
<image style="width: 28rpx;" src="/static/images/right.png" mode="widthFix"></image>
</view>
<uni-forms-item label="仓库编号" name="houseCode">
<uni-easyinput v-model="formData.houseCode" placeholder="请输入仓库编号" />
</uni-forms-item>
<uni-forms-item label="货位编号" name="locCode">
<view class="fromItem">
<uni-easyinput v-model="formData.locCode" placeholder="请扫描货位编号" @blur="trimLocInput" />
<image style="width: 28rpx;" src="/static/images/right.png" mode="widthFix"></image>
</view>
<uni-forms-item label="出库站台" name="outStation">
<uni-easyinput v-model="formData.outStation" placeholder="请输入出库站台" />
</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 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>
</picker>
</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>
<button type="primary" @click="formSubmit"></button>
</view>
</view>
<view class="padding-xl">
{{msg}}
</view>
</view>
</view>
</view>
</template>
<script>
import {
getSkuDictionary,
getSkuTypes
} from "@/api/wms/sku.js"
import {
callEmptyOut
} from "@/api/wms/bill.js"
import {
getDictionary
} from "@/api/wms/dictData.js"
emptyPalletOut,
} from "@/api/wms/palletOut.js"
import {
formatDate
} from 'tough-cookie';
import {bottomBtn} from '@/components/bottomBtn/bottomBtn.vue'
export default {
data() {
return {
isButtonDisabled: false,
autoCall: true,
ktpCode: "KTP0001",
msgTitleName: '标题',
msg: '消息',
msgModalName: "",
//
formData: {
locCode: "",
skuQty: "1"
houseCode: "RS2509",
outStation: "",
skuQty: 1,
skuType: "KTP002"
},
rules: {
locCode: {
houseCode: {
rules: [{
required: true,
errorMessage: '请扫码货位号'
errorMessage: '仓库编号不能为空'
}]
},
outStation: {
rules: [{
required: true,
errorMessage: '出库站台不能为空'
}]
},
skuQty: {
rules: [{
required: true,
errorMessage: '请输入物料数量'
errorMessage: '下架数量不能为空'
}]
},
skuType: {
rules: [{
required: true,
errorMessage: '下架类型不能为空'
}]
},
},
message: '操作提示信息!',
index: -1,
picker: ['KTP001', 'KTP002'],
}
},
};
},
onLoad() {
},
onReady() {
this.$refs.form.setRules(this.rules)
},
component:{
bottomBtn
},
watch: {
},
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")
//
trimLocInput(event) {
this.formData.locCode = event.target.value.trim();
},
//AGV
submitPallet: function() {
//this.msgModalName='Modal'
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 => {
this.$refs.form.validate().then(res => {
console.log("数据校验通过", res)
console.log("this.formData", this.formData)
emptyPalletOut(this.formData).then(response => {
console.log("response", response)
this.$modal.msgSuccess("呼叫入库成功")
}).finally(() => {
this.isButtonDisabled = false; //
this.$modal.closeLoading()
});
this.$modal.msgSuccess("下架成功请等待")
})
})
},
hideMsgModal(e) {
//
this.msgModalName = null;
},
textareaAInput(e) {
this.textareaAValue = e.detail.value
},
textareaBInput(e) {
this.textareaBValue = e.detail.value
}
}
}
</script>
<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 {
min-width: calc(4em + 15px);
}
@ -225,7 +125,10 @@ component:{
background-color: #ffffff;
}
.example {
padding: 15px;
background-color: #fff;
}
.segmented-control {
margin-bottom: 15px;
@ -250,12 +153,4 @@ component:{
line-height: 35px;
margin-left: 10px;
}
.switch-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px;
border-bottom: 1px solid #eee;
}
</style>

View File

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

View File

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