代码更新:增加库区

This commit is contained in:
梁州 2024-07-24 22:14:25 +08:00
parent 788c4153df
commit 3761fccb25
7 changed files with 56 additions and 12 deletions

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{ {
"name": "WMS", "name": "wms",
"version": "0.1.0", "version": "0.1.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "WMS", "name": "wms",
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"axios": "^1.3.3", "axios": "^1.3.3",

View File

@ -1,5 +1,5 @@
{ {
"name": "WMS", "name": "wms",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {

View File

@ -128,12 +128,13 @@ export default {
name: 'goodsIn', name: 'goodsIn',
data() { data() {
return { return {
areaId: 2,
labelPosition: "top", labelPosition: "top",
tempTasks: [], tempTasks: [],
tempVehicleId: '', tempVehicleId: '',
tempOriginPoint: '', tempOriginPoint: '',
totalWeight: 0, totalWeight: 0,
isEmptyTask: false, isEmptyTask: null,
disabledEmpty: false, disabledEmpty: false,
taskInRequestEntity: reactive({ taskInRequestEntity: reactive({
vehicleId: '', vehicleId: '',
@ -276,6 +277,7 @@ export default {
}, },
submitGoodsInTask(formEl) {// submitGoodsInTask(formEl) {//
const inParams = { const inParams = {
areaId: this.areaId,
vehicleId: this.tempVehicleId, vehicleId: this.tempVehicleId,
originPoint: this.tempOriginPoint, originPoint: this.tempOriginPoint,
totalWeight: this.totalWeight, totalWeight: this.totalWeight,
@ -292,7 +294,7 @@ export default {
this.tempVehicleId = '' this.tempVehicleId = ''
this.tempOriginPoint = '' this.tempOriginPoint = ''
this.totalWeight = 0 this.totalWeight = 0
this.isEmptyTask == false this.isEmptyTask == null
formEl.resetFields() formEl.resetFields()
this.disabledEmpty = false this.disabledEmpty = false
} else { } else {

View File

@ -150,6 +150,7 @@ export default {
name: 'goodsOut', name: 'goodsOut',
data() { data() {
return { return {
areaId: 2,
timer: '', timer: '',
tasks: [], tasks: [],
pageInfo: {}, pageInfo: {},
@ -246,7 +247,7 @@ export default {
}) })
return return
} }
if (formData.vehicleId == '' || formData.goodsId == '' || formData.originPoint == '') { if (formData.vehicleId == '' && formData.goodsId == '' && formData.originPoint == '') {
ElMessage({ ElMessage({
message: '载具号、物料号、起始库位号必须至少输入一个', message: '载具号、物料号、起始库位号必须至少输入一个',
type: 'error', type: 'error',
@ -275,6 +276,7 @@ export default {
return return
} }
const outParams = { const outParams = {
areaId: this.areaId,
goodsId: formData.goodsId, goodsId: formData.goodsId,
goodsNum: formData.goodsNum, goodsNum: formData.goodsNum,
vehicleId: formData.vehicleId, vehicleId: formData.vehicleId,
@ -304,7 +306,8 @@ export default {
const request = { const request = {
taskType: 2, taskType: 2,
isPicking: 1, isPicking: 1,
taskStatus: 8 taskStatus: 8,
areaId: this.areaId,
} }
getTasks(request).then(res1 => { getTasks(request).then(res1 => {
if (res1.data.code == 0) { if (res1.data.code == 0) {
@ -349,6 +352,7 @@ export default {
return return
} }
const confirmParams = { const confirmParams = {
areaId: this.areaId,
taskId: formData.taskId, taskId: formData.taskId,
vehicleId: formData.vehicleId, vehicleId: formData.vehicleId,
goodsId: formData.goodsId, goodsId: formData.goodsId,

View File

@ -2,6 +2,8 @@
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
<el-config-provider :locale="zhCn"> <el-config-provider :locale="zhCn">
<el-row> <el-row>
<el-select-v2 v-model="areaIdQuery" style="width: 128px; margin-right: 10px;" placeholder="请选择库区"
:options="wmsAreaOptions" @change="search()"></el-select-v2>
<el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="物料编号" <el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="物料编号"
:suffix-icon="Search" /> :suffix-icon="Search" />
<el-button type="primary" @click="search()">搜索</el-button> <el-button type="primary" @click="search()">搜索</el-button>
@ -228,6 +230,21 @@ export default {
label: '库存锁定' label: '库存锁定'
} }
], ],
areaIdQuery: 1,
wmsAreaOptions: [
{
value: 0,
label: '全部'
},
{
value: 1,
label: '托盘库'
},
{
value: 2,
label: '箱式库'
}
],
} }
}, },
mounted() { mounted() {
@ -285,7 +302,8 @@ export default {
const request = { const request = {
pageNo: this.currentPage, pageNo: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
goodsId: this.goodsIdQuery.trim() goodsId: this.goodsIdQuery.trim(),
areaId: this.areaIdQuery,
} }
getAllStocks(request).then(res => { getAllStocks(request).then(res => {
const tableResponse = res.data const tableResponse = res.data

View File

@ -3,6 +3,8 @@
<div style="margin-bottom: 15px"> <div style="margin-bottom: 15px">
<el-config-provider :locale="zhCn"> <el-config-provider :locale="zhCn">
<el-row> <el-row>
<el-select-v2 v-model="areaIdQuery" style="width: 128px; margin-right: 10px;" placeholder="请选择库区"
:options="wmsAreaOptions" @change="search()"></el-select-v2>
<el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="物料号" /> <el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="物料号" />
<el-input v-model="vehicleIdQuery" style="width: 256px; margin-right: 10px;" placeholder="载具号" /> <el-input v-model="vehicleIdQuery" style="width: 256px; margin-right: 10px;" placeholder="载具号" />
<el-button type="primary" @click="search()">搜索</el-button> <el-button type="primary" @click="search()">搜索</el-button>
@ -165,7 +167,22 @@ export default {
label: '任务完成' label: '任务完成'
} }
], ],
availableLocationOptions: [] availableLocationOptions: [],
areaIdQuery: 1,
wmsAreaOptions: [
{
value: 0,
label: '全部'
},
{
value: 1,
label: '托盘库'
},
{
value: 2,
label: '箱式库'
}
],
} }
}, },
mounted() { mounted() {
@ -199,7 +216,8 @@ export default {
pageNo: this.currentPage, pageNo: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
goodsId: this.goodsIdQuery.trim(), goodsId: this.goodsIdQuery.trim(),
vehicleId: this.vehicleIdQuery.trim() vehicleId: this.vehicleIdQuery.trim(),
areaId: this.areaIdQuery,
} }
getTasksByPage(tableRequest).then(res => { getTasksByPage(tableRequest).then(res => {
const tableResponse = res.data const tableResponse = res.data

View File

@ -12,8 +12,10 @@ const routes = [
redirect: '/stock', redirect: '/stock',
children: [ children: [
{ path: '/stock', component: stock },// 库存 { path: '/stock', component: stock },// 库存
{ path: '/goodsIn', component: () => import('@/layout/goodsIn.vue') },// 入库 { path: '/goodsIn', component: () => import('@/layout/goodsIn.vue') },// 箱式库入库
{ path: '/goodsOut', component: () => import('@/layout/goodsOut.vue') },// 出库 { path: '/goodsOut', component: () => import('@/layout/goodsOut.vue') },// 箱式库出库
{ path: '/goodsInTP', component: () => import('@/layout/goodsInTP.vue') },// 托盘库入库
{ path: '/goodsOutTP', component: () => import('@/layout/goodsOutTP.vue') },// 托盘库出库
{ path: '/inTaskRecord', component: () => import('@/layout/inTaskRecord.vue') },// 入库记录 { path: '/inTaskRecord', component: () => import('@/layout/inTaskRecord.vue') },// 入库记录
{ path: '/outTaskRecord', component: () => import('@/layout/outTaskRecord.vue') },// 出库记录 { path: '/outTaskRecord', component: () => import('@/layout/outTaskRecord.vue') },// 出库记录
{ path: '/location', component: () => import('@/layout/location.vue') },// 库位 { path: '/location', component: () => import('@/layout/location.vue') },// 库位