手持优化
parent
de9e0a207f
commit
86e5fda2ee
|
|
@ -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'
|
||||
})
|
||||
}
|
||||
|
|
@ -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}}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
<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 {
|
||||
|
|
@ -95,12 +106,12 @@
|
|||
errorMessage: '请扫码托盘号'
|
||||
}]
|
||||
},
|
||||
locCode: {
|
||||
/* locCode: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '请扫描货位号'
|
||||
}]
|
||||
},
|
||||
}, */
|
||||
warehouseArea: {
|
||||
rules: [{
|
||||
required: true,
|
||||
|
|
@ -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({
|
||||
|
|
@ -445,7 +456,7 @@
|
|||
userCode: this.userCode,
|
||||
warehouseCode: this.whCode
|
||||
}
|
||||
callEmptyRackIn(requestData).then(response => {
|
||||
premptyPalletIn(requestData).then(response => {
|
||||
console.log("response", response)
|
||||
this.$modal.msgSuccess("呼叫入库成功")
|
||||
}).finally(() => {
|
||||
|
|
@ -521,38 +532,48 @@
|
|||
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;
|
||||
}
|
||||
|
||||
.cu-form-group .title {
|
||||
min-width: calc(4em + 15px);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -333,7 +333,7 @@
|
|||
this.formData.details = details
|
||||
inventoryConfirm(this.formData).then(response => {
|
||||
console.log("response",response)
|
||||
this.$modal.msgSuccess("组盘成功")
|
||||
this.$modal.msgSuccess("盘点确认成功")
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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": "成功"
|
||||
|
|
|
|||
Loading…
Reference in New Issue