修正绑定功能和增加单卷查询

This commit is contained in:
彭枝刚 2024-11-01 10:57:42 +08:00
parent 5553adb740
commit a24899af98
5 changed files with 290 additions and 6 deletions

View File

@ -526,8 +526,9 @@ const install = (Vue, vm) => {
selectWmsInventoryByPackageNumber: (packageNumber) => vm.$u.get('/nlv-wms/wmsInventory/selectWmsInventoryByPackageNumber/'+packageNumber),
validateMaterialLot: (materialLot) => vm.$u.get('/nlv-wms/wmsInventory/validateMaterialLot/'+materialLot),
unbindPackageNumber: (wmsInventory) => vm.$u.post('/nlv-wms/wmsInventory/unbindPackageNumber', wmsInventory),
bindPackageNumber: (wmsInventoryList) => vm.$u.post('/nlv-wms/wmsInventory/bindPackageNumber', wmsInventoryList),
changePackageNumber: (wmsInventory) => vm.$u.post('/nlv-wms/wmsInventory/changePackageNumber', wmsInventory)
bindPackageNumber: (wmsInventoryList) => vm.$u.post('/nlv-wms/wmscuttingpackage/bindPackageNumber', wmsInventoryList),
changePackageNumber: (wmsInventory) => vm.$u.post('/nlv-wms/wmsInventory/changePackageNumber', wmsInventory),
unbindMaterialLot: (wmsInventory) => vm.$u.post('/nlv-wms/wmscuttingpackage/unbindMaterialLot', wmsInventory)
}
}
};

View File

@ -698,7 +698,7 @@
"path" : "pages/nlv-wms/cutOffLineWhite/index",
"style" :
{
"navigationBarTitleText" : "纳科达-白包托盘码生成"
"navigationBarTitleText" : "白包单件下线"
}
},
{
@ -766,6 +766,12 @@
"style": {
"navigationBarTitleText": "托盘绑定"
}
},
{
"path": "pages/nlv-wms/wmsInventory/unbindByMaterialLot",
"style": {
"navigationBarTitleText": "单卷查询"
}
}
],
"subPackages": [],

View File

@ -26,7 +26,7 @@
</u-row>
<template>
<u-card title="扫描批次列表" padding="10" margin="10px">
<u-card title="扫描批次列表" padding="10" margin="10px" :body-style="{ overflowY: 'auto', maxHeight: '800rpx' }">
<view slot="body" v-for="(itemObj,index) in materialLotList">
<view class="u-body-item u-border-bottom u-col-between u-p-t-0">
<view class="wrap">
@ -183,7 +183,10 @@
doRemove(row) {
let me = this;
// 移除料件批次信息
me.materialLotList = me.materialLotList.filter(ite=>ite.materialLot === row.materialLot);
let newArr = me.materialLotList.filter(function(ite) {
return ite.materialLot != row.materialLot;
});
me.materialLotList = newArr;
me.focusMaterialLotInput();
},

View File

@ -0,0 +1,274 @@
<template>
<view class="wrap">
<!-- 表单 -->
<view class="page-container">
<u-row class="row">
<u-col span="2">
<view class="title">
批次:
</view>
</u-col>
<u-col span="10">
<u-input v-model="scanMaterialLot" ref="scanMaterialLotInput" :border="true"
@confirm="scanMaterialLotEvent" style="background-color: #FFFF99" :focus="focus.scanMaterialLotInput"/>
</u-col>
</u-row>
<template>
<u-cell-group class="item-head">
<u-cell-item title="工厂" :value="formObj.site" :arrow="false"></u-cell-item>
<u-cell-item title="SAP料号" :value="formObj.sapNumber" :arrow="false"></u-cell-item>
<u-cell-item title="U8料号" :value="formObj.u8Code" :arrow="false"></u-cell-item>
<u-cell-item title="SAP批次号" :value="formObj.sapBatch" :arrow="false"></u-cell-item>
<u-cell-item title="生产日期" :value="formObj.productionDate" :arrow="false"></u-cell-item>
<u-cell-item title="重量" :value="formObj.weight" :arrow="false"></u-cell-item>
<u-cell-item title="长度" :value="formObj.length" :arrow="false"></u-cell-item>
<u-cell-item title="等级" :value="formObj.grade" :arrow="false" v-if="false"></u-cell-item>
<u-cell-item title="阶段" :value="formObj.stage" :arrow="false"></u-cell-item>
<u-cell-item title="类型" :value="formObj.type" :arrow="false"></u-cell-item>
<u-cell-item title="卷号" :value="formObj.batchNumber" :arrow="false"></u-cell-item>
<u-cell-item title="托盘号" :value="formObj.packageNumber" :arrow="false"></u-cell-item>
<u-cell-item title="客户编码" :value="formObj.customerCode" :arrow="false"></u-cell-item>
<u-cell-item title="创建日期" :value="formObj.dateCreate" :arrow="false"></u-cell-item>
<u-cell-item title="创建人员" :value="formObj.creator" :arrow="false"></u-cell-item>
<u-cell-item title="更新日期" :value="formObj.dateUpdate" :arrow="false"></u-cell-item>
<u-cell-item title="更新人员" :value="formObj.updater" :arrow="false"></u-cell-item>
</u-cell-group>
</template>
</view>
<!-- 按钮 -->
<view class="form-footer stay-below">
<u-button type="primary" @click="doSubmit">解拖</u-button>
<u-button type="warning" @click="doClear">清除</u-button>
</view>
</view>
</template>
<script>
import {
inputFocus
} from 'utils/common';
import config from '@/common/config.js';
import {
isBlank
} from "../../../utils/string";
export default {
data() {
return {
site: this.vuex_tenantId,
scanMaterialLot: '',
formObj: {
site: '',
sapNumber: '',
u8Code: '',
sapBatch: '',
productionDate: '',
weight: '',
length: '',
grade: '',
stage: '',
type: '',
batchNumber: '',
packageNumber: '',
customerCode: '',
dateCreate: '',
creator: '',
dateUpdate: '',
updater: ''
},
show: {
stage: false,
grade: false,
},
focus: {
scanMaterialLotInput: true
},
getBatchNumberDetail: this.$u.api.nlvWms.cuttingInventory.getBatchNumberDetail,
unbindMaterialLot: this.$u.api.nlvWms.wmsInventory.unbindMaterialLot
};
},
onLoad(options) {
let me = this;
me.focusScanMaterialLotInputInput();
},
methods: {
// 光标定位到新托盘扫描的输入框事件
focusScanMaterialLotInputInput() {
this.scanMaterialLot = '';
inputFocus(this, "scanMaterialLotInput");
},
// 批次回车事件
scanMaterialLotEvent() {
let me = this;
// 调用后端查询料件批次信息
if (isBlank(me.scanMaterialLot)) {
me.$u.toast('批次号不能为空');
return;
}
const param = me.scanMaterialLot;
uni.showLoading();
me.getBatchNumberDetail(param).then(res => {
uni.hideLoading();
if(res.data == null){
me.$u.toast('未检索到数据');
}else{
me.formObj = res.data;
}
}).catch(e => {
uni.hideLoading();
me.focusMaterialLotInput();
me.$u.toast('错误' + e);
});
},
// 清除
doClear() {
let me = this;
me.focusScanMaterialLotInputInput();
me.formObj = {
site: '',
sapNumber: '',
u8Code: '',
sapBatch: '',
productionDate: '',
weight: '',
length: '',
grade: '',
stage: '',
type: '',
batchNumber: '',
packageNumber: '',
customerCode: '',
dateCreate: '',
creator: '',
dateUpdate: '',
updater: ''
}
},
// 解拖事件
doSubmit() {
let me = this;
// 调用后端提交表格数据
const param = {
materialLot: me.scanMaterialLot
}
uni.showLoading();
me.unbindMaterialLot(param).then(res => {
uni.hideLoading();
me.$u.toast("解绑成功");
// 清除数据防止残留
me.doClear();
}).catch(e => {
uni.hideLoading();
me.focusMaterialLotInput();
});
}
}
};
</script>
<style lang="scss">
.page-container {
padding: 15rpx;
height: 100vh;
background-color: #f6f8fa;
position: relative;
display: flex;
flex-direction: column;
.item-title {
margin-top: 5pt;
margin-left: 2pt;
font-size: 18px;
font-family: "黑体", "SimHei", "Microsoft YaHei", Arial, sans-serif;
font-weight: bold;
}
.item-boby {
background-color: #fff;
padding: 5rpx;
.title {
font-size: 16px;
font-family: "黑体", "SimHei", "Microsoft YaHei", Arial, sans-serif;
font-weight: bold;
color: #999;
}
/deep/ .u-col {
padding: 0px 2rpx;
margin-left: 0%;
flex: 0 0 16.6667%;
align-items: center;
justify-content: flex-start;
text-align: left;
}
.bar {
display: flex;
margin: 10px;
justify-content: center;
align-items: center;
}
/deep/ .primary-icon .u-icon__icon {
background-color: #0f80ff;
color: white;
}
/deep/ .error-icon .u-icon__icon {
background-color: #c50004;
color: white;
}
}
}
.item-head {
/deep/ .u-cell {
display: flex;
flex-direction: row;
align-items: center;
position: relative;
box-sizing: border-box;
width: 100%;
padding: 8px 11px;
line-height: 21px;
background-color: #fff;
color: #999;
}
/deep/ .u-cell__title {
font-size: 10px;
font-weight: 300;
}
/deep/ .u-cell__value {
font-size: 16px;
font-weight: bold;
color: #000000;
}
}
.u-td {
height: 43px; /* 根据需求设置行高的像素值 */
}
.item-footer > > > text {
color: #0f80ff;
line-height: 18px;
font-size: 15px;
margin: 20rpx;
}
.item-button > > > button {
color: #0f80ff;
}
</style>

View File

@ -1 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__6D4FE09","name":"MES","version":{"name":"1","code":1},"description":"MES","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Camera":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#f8f8f8"},"compatible":{"ignoreVersion":true},"optimization":{"subPackages":true},"safearea":{"bottom":{"offset":"none"}},"usingComponents":true,"nvueCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common","useOriginalMsgbox":true},"google":{"permissions":["<uses-feature android:name=\"android.hardware.camera\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"abiFilters":["armeabi-v7a","arm64-v8a","x86"]},"apple":{"idfa":false,"dSYMs":false},"plugins":{"ad":{},"oauth":{},"push":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"nativePlugins":{},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"4.14","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#909399","selectedColor":"#303133","backgroundColor":"#ffffff","borderStyle":"rgba(255,255,255,0.4)","list":[{"pagePath":"pages/sys/home/index","iconPath":"static/custom/tabbar/home_1.png","selectedIconPath":"static/custom/tabbar/home_2.png","text":"工作台"},{"pagePath":"pages/sys/user/index","iconPath":"static/custom/tabbar/my_1.png","selectedIconPath":"static/custom/tabbar/my_2.png","text":"我的"}],"height":"50px"},"launch_path":"__uniappview.html"},"locale":"zh-Hans"}
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__C949EA1","name":"MES","version":{"name":"6","code":6},"description":"MES","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Camera":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#f8f8f8"},"compatible":{"ignoreVersion":true},"optimization":{"subPackages":true},"safearea":{"bottom":{"offset":"none"}},"usingComponents":true,"nvueCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common","useOriginalMsgbox":true},"google":{"permissions":["<uses-feature android:name=\"android.hardware.camera\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"abiFilters":["armeabi-v7a","arm64-v8a","x86"]},"apple":{"idfa":false,"dSYMs":false},"plugins":{"ad":{},"oauth":{},"push":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"nativePlugins":{},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"4.14","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#909399","selectedColor":"#303133","backgroundColor":"#ffffff","borderStyle":"rgba(255,255,255,0.4)","list":[{"pagePath":"pages/sys/home/index","iconPath":"static/custom/tabbar/home_1.png","selectedIconPath":"static/custom/tabbar/home_2.png","text":"工作台"},{"pagePath":"pages/sys/user/index","iconPath":"static/custom/tabbar/my_1.png","selectedIconPath":"static/custom/tabbar/my_2.png","text":"我的"}],"height":"50px"},"launch_path":"__uniappview.html"},"locale":"zh-Hans"}