RS2507
杨斌 2026-01-22 16:15:46 +08:00
parent 02593f6a0a
commit 7396f94d85
9 changed files with 402 additions and 32 deletions

View File

@ -21,9 +21,18 @@ export const containerMove = data => {
}
/** 查询货位托盘 */
export const qureyPalletInfoByLocCode = data => {
export const queryPalletInfoByLocCode = data => {
return request({
url: apiPrefix + 'qureyPalletInfoByLocCode',
url: apiPrefix + 'queryPalletInfoByLocCode',
params: data,
method: 'GET'
})
}
/** 查询货位托盘 */
export const queryPalletInfoByPalletCode = data => {
return request({
url: apiPrefix + 'queryPalletInfoByPalletCode',
params: data,
method: 'GET'
})
@ -38,5 +47,21 @@ export const fullCageOut = data => {
})
}
/** 产线换型 */
export const changeModel = data => {
return request({
url: apiPrefix + 'changeModel',
data: data,
method: 'POST'
})
}
/** 获取处理托盘列表 */
export const getOutPltList = data => {
return request({
url: apiPrefix + 'getOutPltList',
data: data,
method: 'POST'
})
}

View File

@ -1,6 +1,6 @@
{
"name" : "WMS_APP_v1.0",
"appid" : "__UNI__9599A70",
"appid" : "__UNI__FED6F04",
"description" : "",
"versionName" : "1.1.0",
"versionCode" : "100",

View File

@ -197,7 +197,7 @@
.login-form-content {
text-align: center;
margin: 20px auto;
margin-top: 400px;
margin-top: clamp(20px, min(360px, calc(100vh - 240px)), 360px);
width: 80%;
.input-item {

View File

@ -2,7 +2,7 @@
<view class="container">
<cu-custom bgColor="bg-gradual-pink" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">自动呼叫空料架</block>
<block slot="content">产线换型</block>
</cu-custom>
<view class="example">
<uni-forms ref="form" :model="formData" labelWidth="80px">
@ -15,7 +15,7 @@
</uni-forms-item>
<uni-forms-item label="上料工位" name="callLocCode">
<view class="fromItem">
<uni-data-select v-model="callLocCode" :localdata="callLocCodeList" placeholder="请选择上料工位" />
<uni-data-select v-model="formData.callLocCode" :localdata="callLocCodeList" placeholder="请选择上料工位" />
<image style="width: 28rpx;" src="/static/images/right.png" mode="widthFix"></image>
</view>
</uni-forms-item>
@ -54,7 +54,7 @@
getDictionary
} from "@/api/wms/dictData.js"
import {
containerMove
changeModel
} from "@/api/wms/project.js"
import {
page,
@ -71,7 +71,7 @@
return {
productLineList: [],
callLocCodeList: [],
callLocCode: "",
// callLocCode: "",
productLineLocList: [],
cacheLoc: null,
@ -138,7 +138,7 @@
},
productLineChange: function(productLine) {
if(!productLine){
this.callLocCode=''
this.formData.callLocCode=''
this.callLocCodeList=[]
this.formData.isAutoCall=false
return
@ -166,10 +166,10 @@
this.$modal.msgError('未找到产线上料工位!')
}
this.callLocCode = this.cacheLoc.ext3
this.formData.callLocCode = this.cacheLoc.ext3
this.formData.isAutoCall = this.cacheLoc.ext4 == 'Y'
console.log("this.callLocCode", this.callLocCode, this.callLocCodeList)
// console.log("this.callLocCode", this.callLocCode, this.callLocCodeList)
});
},
@ -180,9 +180,9 @@
this.$modal.loading("请等待...")
this.$refs.form.validate().then(res => {
this.cacheLoc.ext3 = this.callLocCode
this.cacheLoc.ext4 = this.formData.isAutoCall ? 'Y' : 'N'
edit(this.cacheLoc).then(response => {
// this.formData = this.callLocCode
// this.formData.productLine=this.productLine
changeModel(this.formData).then(response => {
console.log("response", response)
this.$modal.msgSuccess("修改成功," + response.msg)
}).finally(() => {

View File

@ -176,7 +176,11 @@
background: rgb(242, 243, 245);
height: 100vh;
}
@media screen and (max-width: 520px) {
::v-deep .uni-scroll-view, .uni-scroll-view-content {
height: calc(100vh - 350px);
}
}
.uni-forms-item {
border-bottom: 1px solid #E5E6EB;
margin-bottom: 0;

View File

@ -16,11 +16,35 @@
</uni-forms-item>
<uni-forms-item label="容器编号" name="palletCode">
<view class="fromItem">
<uni-easyinput v-model="palletCode" disabled />
<uni-easyinput v-model="palletCode" placeholder="请扫描容器编号" @blur="queryPalleInfo" />
</view>
</uni-forms-item>
<view style="margin-top: 10px;">
<checkbox-group class="block" @change="CheckboxChange">
<checkbox :class="isNoticeAGV ? 'checked':''" value="Y"
:checked="isNoticeAGV ? true: false">
</checkbox>
<label style="margin: 10px;">通知AGV系统</label>
</checkbox-group>
</view>
</uni-forms>
<button class="cu-btn bg-blue " style="position: absolute; right: 20px;" @click="getOutPlts" >刷新</button>
<div>
<!-- 循环渲染 outPltList 列表 -->
<div v-for="(out, index) in outPltList" :key="out.palletCode || index">
<!-- 第一个元素绑定特殊样式类 -->
<p :class="{ 'first-item': index === 0 }">
货位{{out.locCode}} 容器编号{{out.palletCode}}
</p>
<p :class="{ 'first-item': index === 0 }">
入库时间{{out.entryTime}}
</p>
<div class="dashed-line"></div>
</div>
</div>
</view>
<bottomBtn :isSubmit="true" :isWhite="false" position="fixed" :texts="['确认出库解绑']" @onSubmit="handleClear">
</bottomBtn>
@ -29,7 +53,9 @@
<script>
import {
qureyPalletInfoByLocCode,
queryPalletInfoByLocCode,
queryPalletInfoByPalletCode,
getOutPltList,
fullCageOut
} from "@/api/wms/project.js"
import {
@ -40,6 +66,8 @@
return {
locCode: "", //
palletCode:"",
isNoticeAGV:true,
outPltList:[],
rules: {
locCode: {
rules: [{
@ -55,8 +83,18 @@
},
onReady() {
this.$refs.form.setRules(this.rules)
},
mounted() {
this.getOutPlts()
},
methods: {
CheckboxChange(e) {
var items = e.detail.value
this.isNoticeAGV= items.includes('Y')
console.log('isNoticeAGV',this.isNoticeAGV)
},
//
async queryLocInfo() {
if (!this.locCode) return
@ -66,16 +104,47 @@
const {
code,
data
} = await qureyPalletInfoByLocCode({
} = await queryPalletInfoByLocCode({
locCode: this.locCode
})
if (code === 200) {
if (!data) {
this.$modal.msg("该货位未绑定托盘信息")
this.palletCode=""
}else{
this.palletCode = data.palletCode
}
}else{
this.palletCode=""
}
} catch (e) {
console.error(e)
} finally {
this.$modal.closeLoading()
}
},
//
async queryPalleInfo() {
if (!this.palletCode) return
this.$modal.loading("查询中...")
try {
const {
code,
data
} = await queryPalletInfoByPalletCode({
palletCode: this.palletCode
})
if (code === 200) {
if (!data) {
this.$modal.msg("未找的容器信息")
this.locCode=""
}else{
this.locCode = data.locCode
}
}else{
this.locCode=""
}
} catch (e) {
console.error(e)
@ -103,6 +172,14 @@
})
},
async getOutPlts(){
const ret = await getOutPltList()
console.log(ret);
if(!ret.success||!ret.data||ret.data.length<1){
this.$modal.msgError("无容器需要出库解绑")
}
this.outPltList = ret.data
},
//
async handleClear() {
if(!this.locCode){
@ -120,12 +197,15 @@
msg
} = await fullCageOut({
locCode: this.locCode,
containerCode:this.palletCode
containerCode:this.palletCode,
noticeAGV:this.isNoticeAGV
})
if (code === 200) {
this.$modal.msgSuccess("解绑成功")
this.locList = [] //
this.locCode = "" //
this.palletCode=""
this.getOutPlts()
} else {
this.$modal.msgError(msg || "解绑失败")
}
@ -142,6 +222,28 @@
</script>
<style lang="scss">
/* 定义第一个元素的样式:加粗 + 字号变大 */
.first-item {
font-weight: bold; /* 字体加粗 */
font-size: 18px; /* 字号变大,可根据需求调整数值 */
margin: 0; /* 可选:清除默认边距,优化排版 */
}
/* 非第一个元素的默认样式(可选,用于对比) */
p {
font-size: 14px; /* 默认字号 */
margin: 0;
}
/* 内部虚线样式 */
.dashed-line {
width: 100%;
height: 1px;
background: dashed #ccc;
/* 兼容写法:通过渐变实现虚线 */
background: linear-gradient(to right, #ccc 50%, transparent 50%);
background-size: 8px 1px; /* 控制虚线的间距和粗细 */
margin: 5px 0;
}
.container {
background: rgb(242, 243, 245);
height: 100vh;

View File

@ -0,0 +1,239 @@
<!--托盘信息查询-->
<template>
<view class="container">
<cu-custom :isBack="true">
<block slot="backText"></block>
<block slot="content"> 出库解绑</block>
</cu-custom>
<view class="example">
<uni-forms ref="form" labelWidth="80px">
<uni-forms-item label="货位编号" name="locCode">
<view class="fromItem">
<view class="flex-twice padding-0 radius">
<uni-easyinput v-model="locCode" placeholder="请扫描货位编号" @blur="queryLocInfo" />
</view>
</view>
</uni-forms-item>
<uni-forms-item label="容器编号" name="palletCode">
<view class="fromItem">
<uni-easyinput v-model="palletCode" disabled />
</view>
</uni-forms-item>
</uni-forms>
</view>
<bottomBtn :isSubmit="true" :isWhite="false" position="fixed" :texts="['确认出库解绑']" @onSubmit="handleClear">
</bottomBtn>
</view>
</template>
<script>
import {
qureyPalletInfoByLocCode,
fullCageOut
} from "@/api/wms/project.js"
import {
bottomBtn
} from '@/components/bottomBtn/bottomBtn.vue'
export default {
data() {
return {
locCode: "", //
palletCode:"",
rules: {
locCode: {
rules: [{
required: true,
errorMessage: '货位编号不能为空'
}]
}
}
};
},
component: {
bottomBtn
},
onReady() {
this.$refs.form.setRules(this.rules)
},
methods: {
//
async queryLocInfo() {
if (!this.locCode) return
this.$modal.loading("查询中...")
try {
const {
code,
data
} = await qureyPalletInfoByLocCode({
locCode: this.locCode
})
if (code === 200) {
if (!data) {
this.$modal.msg("该货位未绑定托盘信息")
}else{
this.palletCode = data.palletCode
}
}
} catch (e) {
console.error(e)
} finally {
this.$modal.closeLoading()
}
},
//
showClearConfirm() {
if (!this.locCode) {
return this.$modal.msg("请先输入货位编号")
}
uni.showModal({
title: '确认清空',
content: `确定要清空货位【${this.locCode}】下的所有托盘吗?`,
confirmText: '确定清空',
confirmColor: '#DD524D',
cancelText: '取消',
success: res => {
if (res.confirm) {
this.handleClear()
}
}
})
},
//
async handleClear() {
if(!this.locCode){
this.$modal.msgError("请扫码货位编号")
return;
}
if(!this.palletCode){
this.$modal.msgError("当前货位未绑定容器,不用解绑")
return;
}
this.$modal.loading("解绑中...")
try {
const {
code,
msg
} = await fullCageOut({
locCode: this.locCode,
containerCode:this.palletCode
})
if (code === 200) {
this.$modal.msgSuccess("解绑成功")
this.locList = [] //
this.locCode = "" //
} else {
this.$modal.msgError(msg || "解绑失败")
}
} catch (e) {
console.error(e)
this.$modal.msgError("请求失败")
} finally {
this.$modal.closeLoading()
}
}
}
}
</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);
}
page {
background-color: #ffffff;
}
.example {
padding: 15px;
background-color: #fff;
}
.button {
margin: 15px 0;
}
</style>

View File

@ -25,7 +25,7 @@
{
"path": "/pages/work/wms/AutoCallEmptyCage",
"name": "AutoCallEmptyCage",
"title": "自动呼叫空料架",
"title": "产线换型",
"color": "red",
"icon": "/static/images/work/组合 1758.png"
}

View File

@ -100,18 +100,18 @@ const user = {
// commit('SET_ROLES', ['ROLE_DEFAULT'])
// }
//查询用户部门信息
if(user.deptId){
getDeptWarehouse({deptCode:user.deptId}).then((detpData) => {
var dictionary =[];
dictionary = detpData.data.map((item) => ({
warehouseCode: item.houseCode,
warehouseName: item.houseName
}));
commit('SET_WH', dictionary)
}).catch(error1 => {
reject(error1)
});
}
// if(user.deptId){
// getDeptWarehouse({deptCode:user.deptId}).then((detpData) => {
// var dictionary =[];
// dictionary = detpData.data.map((item) => ({
// warehouseCode: item.houseCode,
// warehouseName: item.houseName
// }));
// commit('SET_WH', dictionary)
// }).catch(error1 => {
// reject(error1)
// });
// }
commit('SET_NAME', username)
commit('SET_AVATAR', avatar)
resolve(response)