1. 盘点增加根据物料信息的二次判断;

2. 物料信息增加盘点指示器,1/3。
This commit is contained in:
梁州 2025-11-24 14:31:44 +08:00
parent c4b8f5eeb4
commit c5c53f30d5
2 changed files with 820 additions and 766 deletions

View File

@ -4,18 +4,19 @@
<div style="display: flex;justify-content: space-between;">
<el-row>
<el-input v-model="goodsIdQuery" style="width: 158px; margin-right: 10px;" placeholder="料号"
:suffix-icon="Search" />
:suffix-icon="Search"/>
<el-button type="primary" @click="search()">搜索</el-button>
<el-button type="warning" @click="reset()">重置</el-button>
<!-- <el-button type="warning" style="width: 201px; background-color: red; color: #000;" @click="setIndirect()">一键设置间接物料相关信息</el-button> -->
</el-row>
<el-row>
<el-button style="background-color: #00CED1; color: #000;"
@click="uploadDialogVisible = true">导入</el-button>
@click="uploadDialogVisible = true">导入
</el-button>
<el-button style="background-color: #32CD32; color: #000;" @click="exportExcel()">导出</el-button>
</el-row>
</div>
<br />
<br/>
<el-table :data="goodsList" stripe border v-loading="loading" class="table-class" highlight-current-row
max-height="650px" @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
:cell-style="{ 'text-align': 'center' }">
@ -24,25 +25,30 @@
<el-radio :label="scope.row.goodsId" v-model="goodsId">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column prop="goodsId" label="料号" fixed="left" min-width="120px" />
<el-table-column prop="goodsName" label="描述" min-width="120px" />
<el-table-column prop="goodsUnit" label="单位" min-width="120px" />
<el-table-column prop="goodsType" label="物料分类" min-width="120px" />
<el-table-column prop="providerType" label="供应商分类" min-width="120px" />
<el-table-column prop="weight" label="重量" min-width="120px" />
<el-table-column prop="weightUnit" label="重量单位" min-width="120px" />
<el-table-column prop="quantityPerBox" label="每盒数量" min-width="120px" />
<el-table-column prop="unpackingType" label="拆包方式" min-width="120px" />
<el-table-column prop="vehicleType" label="料箱类型" min-width="120px" />
<el-table-column prop="vehicleTypeDescription" label="料箱类型描述" min-width="120px" />
<el-table-column prop="goodsInVehicleType" label="料箱类型2" min-width="120px" />
<el-table-column prop="feedingType" label="补料方式" min-width="120px" />
<el-table-column prop="feedingValue" label="补货点" min-width="120px" />
<el-table-column prop="heat" label="热度" min-width="120px" />
<el-table-column prop="releasePoint" label="卸货点" min-width="120px" />
<el-table-column prop="dataSource" label="数据来源" min-width="120px" />
<el-table-column prop="lastUpdateTime" label="最近更新时间" :formatter="timeFormat" min-width="120px" />
<el-table-column prop="lastUpdateUser" label="最近更新用户" min-width="120px" />
<el-table-column prop="goodsId" label="料号" fixed="left" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="goodsName" label="描述" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="goodsUnit" label="单位" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="goodsType" label="物料分类" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="providerType" label="供应商分类" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="weight" label="重量" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="weightUnit" label="重量单位" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="quantityPerBox" label="每盒数量" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="unpackingType" label="拆包方式" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="vehicleType" label="料箱类型" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="vehicleTypeDescription" label="料箱类型描述" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="goodsInVehicleType" label="料箱类型2" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="feedingType" label="补料方式" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="feedingValue" label="补货点" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="heat" label="热度" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="releasePoint" label="卸货点" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="dataSource" label="数据来源" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="needInventory" label="盘点管理" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="haveSled" label="SLED管理" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="sledDays" label="SLED天数" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="indicator" label="盘点指示器" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="lastUpdateTime" label="最近更新时间" :formatter="timeFormat" min-width="120px"
show-overflow-tooltip/>
<el-table-column prop="lastUpdateUser" label="最近更新用户" min-width="120px" show-overflow-tooltip/>
<el-table-column fixed="right" label="操作" width="240px">
<template v-slot="scope">
<el-button plain type="primary" @click="editCurrentRowGoods(scope.row)">编辑</el-button>
@ -50,11 +56,11 @@
</template>
</el-table-column>
</el-table>
<br />
<br/>
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
:small="false" :disabled="false" :background="false" :default-page-size="10"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
@current-change="search" />
@current-change="search"/>
<el-dialog v-model="dialogVisible" title="物料信息" width="40%" draggable :show-close="false">
<div
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
@ -63,106 +69,132 @@
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="料号" prop="goodsId">
<el-input v-model="goodsFormEntity.goodsId" disabled />
<el-input v-model="goodsFormEntity.goodsId" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="goodsName">
<el-input v-model="goodsFormEntity.goodsName" clearable />
<el-input v-model="goodsFormEntity.goodsName" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="单位" prop="goodsUnit">
<el-input v-model="goodsFormEntity.goodsUnit" clearable />
<el-input v-model="goodsFormEntity.goodsUnit" clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料分类" prop="goodsType">
<el-input v-model="goodsFormEntity.goodsType" clearable />
<el-input v-model="goodsFormEntity.goodsType" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="供应商分类" prop="providerType">
<el-input v-model="goodsFormEntity.providerType" clearable />
<el-input v-model="goodsFormEntity.providerType" clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="重量" prop="weight">
<el-input-number v-model.number="goodsFormEntity.weight" controls-position="right"
:precision="3" :step="0.1" :min="0" clearable />
:precision="3" :step="0.1" :min="0" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="重量单位" prop="weightUnit">
<el-input v-model="goodsFormEntity.weightUnit" clearable />
<el-input v-model="goodsFormEntity.weightUnit" clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="每盒数量" prop="quantityPerBox">
<el-input-number v-model.number="goodsFormEntity.quantityPerBox"
controls-position="right" :min="0" clearable />
controls-position="right" :min="0" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="拆包方式" prop="unpackingType">
<el-input v-model="goodsFormEntity.unpackingType" clearable />
<el-input v-model="goodsFormEntity.unpackingType" clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="料箱类型" prop="vehicleType">
<el-input v-model="goodsFormEntity.vehicleType" clearable />
<el-input v-model="goodsFormEntity.vehicleType" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="热度" prop="heat">
<el-input v-model="goodsFormEntity.heat" clearable />
<el-input v-model="goodsFormEntity.heat" clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="卸货点" prop="releasePoint">
<el-input v-model="goodsFormEntity.releasePoint" clearable />
<el-input v-model="goodsFormEntity.releasePoint" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="补料方式" prop="feedingType">
<el-input v-model="goodsFormEntity.feedingType" clearable />
<el-input v-model="goodsFormEntity.feedingType" clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="补货点" prop="feedingValue">
<el-input-number v-model.number="goodsFormEntity.feedingValue"
controls-position="right" :min="0" clearable />
controls-position="right" :min="0" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="盘点管理" prop="needInventory">
<el-input v-model="goodsFormEntity.needInventory" clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="SLED管理" prop="haveSled">
<el-input v-model="goodsFormEntity.haveSled" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="SLED天数" prop="sledDays">
<el-input-number v-model.number="goodsFormEntity.sledDays"
controls-position="right" clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="盘点指示器" prop="indicator">
<el-input-number v-model.number="goodsFormEntity.indicator"
controls-position="right" :min="1" :max="3" :step="2" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="料箱类型描述" prop="vehicleTypeDescription">
<el-input v-model="goodsFormEntity.vehicleTypeDescription" clearable />
<el-input v-model="goodsFormEntity.vehicleTypeDescription" clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="料箱类型2" prop="goodsInVehicleType">
<el-input v-model="goodsFormEntity.goodsInVehicleType" clearable />
<el-input v-model="goodsFormEntity.goodsInVehicleType" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="数据来源" prop="dataSource">
<el-input v-model="goodsFormEntity.dataSource" clearable />
<el-input v-model="goodsFormEntity.dataSource" clearable/>
</el-form-item>
</el-col>
</el-row>
@ -193,17 +225,17 @@
<script setup>
import store from '@/store'
import { getGoodsInfoByPage, deleteGoodsInfo, updateGoodsInfo, updateIndirectInfos } from '@/api/goods.js'
import {getGoodsInfoByPage, deleteGoodsInfo, updateGoodsInfo, updateIndirectInfos} from '@/api/goods.js'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { ElMessageBox, ElMessage } from 'element-plus'
import { ref, reactive } from 'vue'
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
import { errorBox } from '@/utils/myMessageBox.js'
import {ElMessageBox, ElMessage} from 'element-plus'
import {ref, reactive} from 'vue'
import {dateFormatter, timeFormatter} from '@/utils/formatter.js'
import {errorBox} from '@/utils/myMessageBox.js'
// import UploadExcelGoods from '@/excel/UploadExcelGoods.vue'
import UploadExcelBaseGoods from '@/excel/UploadExcelBaseGoods.vue'
import UploadExcelKanban from '@/excel/UploadExcelKanban.vue'
import { downloadGoodsExcel } from '@/api/excel.js'
import { Search } from '@element-plus/icons-vue'
import {downloadGoodsExcel} from '@/api/excel.js'
import {Search} from '@element-plus/icons-vue'
</script>
<script>
export default {
@ -296,6 +328,10 @@ export default {
dataSource: row.dataSource,
heat: row.heat,
releasePoint: row.releasePoint,
needInventory: row.needInventory,
haveSled: row.haveSled,
sledDays: row.sledDays,
indicator: row.indicator,
}
this.dialogVisible = true
},
@ -330,6 +366,9 @@ export default {
})
},
submitGoodsInfo(formData) {
if (formData.indicator !== null && formData.indicator !== 1 && formData.indicator !== 3) {
return errorBox('指示器只能为1或3')
}
const request = {
goodsId: formData.goodsId,
goodsName: formData.goodsName,
@ -348,6 +387,10 @@ export default {
heat: formData.heat,
releasePoint: formData.releasePoint,
dataSource: formData.dataSource,
needInventory: formData.needInventory,
haveSled: formData.haveSled,
sledDays: formData.sledDays,
indicator: formData.indicator,
userName: store.getters.getUserName
}
updateGoodsInfo(request).then(res => {

View File

@ -22,14 +22,15 @@
</legend>
<el-table :data="inventoryGoodsDetails" stripe border max-height="200px"
:header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }">
<el-table-column prop="goodsId" label="料号" min-width="120px" show-overflow-tooltip />
<el-table-column prop="vehiclesQuantity" label="料箱数量" min-width="120px" />
<el-table-column prop="vehicleIds" label="料箱号" min-width="120px" show-overflow-tooltip />
<el-table-column prop="vehicleStatus" label="料箱状态" min-width="120px" show-overflow-tooltip />
<el-table-column prop="feedingWS" label="备料工位" min-width="120px" show-overflow-tooltip />
<el-table-column prop="lastFeedingMachineNo" label="最后一台备料机器序列号" min-width="120px" show-overflow-tooltip />
<el-table-column prop="lastFeedingTime" label="备料最后一台车日期" min-width="120px" show-overflow-tooltip />
<el-table-column prop="isLack" label="是否缺料" min-width="120px" show-overflow-tooltip />
<el-table-column prop="goodsId" label="料号" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="vehiclesQuantity" label="料箱数量" min-width="120px"/>
<el-table-column prop="vehicleIds" label="料箱号" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="vehicleStatus" label="料箱状态" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="feedingWS" label="备料工位" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="lastFeedingMachineNo" label="最后一台备料机器序列号" min-width="120px"
show-overflow-tooltip/>
<el-table-column prop="lastFeedingTime" label="备料最后一台车日期" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="isLack" label="是否缺料" min-width="120px" show-overflow-tooltip/>
</el-table>
</fieldset>
<fieldset class="main-area">
@ -111,7 +112,8 @@
<div style="display: flex; margin-top: 20px;">
<div class="display-form-div-left">
<el-input-number v-model.number="confirmFormEntity.confirmNum"
ref="confirmNum" v-on:keyup.enter="changeFocus()" controls-position="right" :min="0" />
ref="confirmNum" v-on:keyup.enter="changeFocus()" controls-position="right"
:min="0"/>
</div>
<div class="display-form-div-right">
<span class="display-form-text-right">PC</span>
@ -136,11 +138,11 @@
<script setup>
import store from '@/store'
import { inventoryOut, getCurrentGoodsInventory, inventoryConfirmBack } from '@/api/inventory'
import { replaceEnglishAndNumberIGAI } from '@/utils/formatter'
import { reactive, ref } from 'vue'
import { errorBox } from '@/utils/myMessageBox.js'
import { ElMessage } from 'element-plus'
import {inventoryOut, getCurrentGoodsInventory, inventoryConfirmBack} from '@/api/inventory'
import {replaceEnglishAndNumberIGAI} from '@/utils/formatter'
import {reactive, ref} from 'vue'
import {errorBox} from '@/utils/myMessageBox.js'
import {ElMessage} from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>
@ -158,7 +160,7 @@ export default {
}),
rules: reactive({
goodsId: [
{ required: true, message: '请输入料号' }
{required: true, message: '请输入料号'}
]
}),
inventoryGoodsDetails: [],
@ -168,6 +170,7 @@ export default {
vehicleId: '',
confirmNum: null
}),
invIndexMap: new Map(),
}
},
mounted() {
@ -178,7 +181,7 @@ export default {
methods: {
//
getCurrentInvInfo() {
if (this.workFormEntity.goodsId == '') {
if (this.workFormEntity.goodsId === '') {
return
}
const request = {
@ -187,7 +190,7 @@ export default {
}
getCurrentGoodsInventory(request).then(res => {
const response = res.data
if (response.code == 0) {
if (response.code === 0) {
this.inventoryGoodsDetails = response.returnData
} else {
this.inventoryGoodsDetails = []
@ -216,7 +219,7 @@ export default {
this.$refs.confirmGoodsId.focus()
},
invenOut() {
if (this.workFormEntity.goodsId == '') {
if (this.workFormEntity.goodsId === '') {
errorBox('料号不可缺少')
return
}
@ -227,7 +230,7 @@ export default {
}
inventoryOut(request).then(res => {
const response = res.data
if (response.code == 0) {
if (response.code === 0) {
this.resetWorkForms()
ElMessage.success(response.message)
} else {
@ -240,20 +243,29 @@ export default {
},
//
invenConfirm() {
if (this.confirmFormEntity.goodsId == '' || this.confirmFormEntity.vehicleId == '' || this.confirmFormEntity.confirmNum == null || this.confirmFormEntity.confirmNum == '') {
if (this.confirmFormEntity.goodsId === '' || this.confirmFormEntity.vehicleId === '' || this.confirmFormEntity.confirmNum == null || this.confirmFormEntity.confirmNum === '') {
errorBox('料号、箱号、确认数量不可缺少。')
return
}
const invKey = this.confirmFormEntity.goodsId + '_' + this.confirmFormEntity.vehicleId
if (!this.invIndexMap.has(invKey)) {
this.invIndexMap.set(invKey, 1)
} else {
this.invIndexMap.set(invKey, this.invIndexMap.get(invKey) + 1)
}
const confirmParams = {
goodsId: this.confirmFormEntity.goodsId,
vehicleId: this.confirmFormEntity.vehicleId,
confirmNum: this.confirmFormEntity.confirmNum,
invIndex: this.invIndexMap.get(invKey),
userName: store.getters.getUserName
}
inventoryConfirmBack(confirmParams).then(res => {
const response = res.data
if (response.code == 0) {
if (response.code === 0) {
this.resetConfirmForms()
// map
this.invIndexMap.delete(invKey)
ElMessage.success(response.message)
} else {
errorBox(response.message)
@ -265,17 +277,16 @@ export default {
},
changeFocus() {
this.confirmFormEntity.vehicleId = replaceEnglishAndNumberIGAI(this.confirmFormEntity.vehicleId)
if (this.confirmFormEntity.vehicleId == '' || this.confirmFormEntity.vehicleId == null || this.confirmFormEntity.vehicleId == undefined) {
if (this.confirmFormEntity.vehicleId === '' || this.confirmFormEntity.vehicleId == null) {
this.$refs.confirmVehicleId.focus()
return
}
if (this.confirmFormEntity.goodsId == '' || this.confirmFormEntity.goodsId == null || this.confirmFormEntity.goodsId == undefined) {
if (this.confirmFormEntity.goodsId === '' || this.confirmFormEntity.goodsId == null) {
this.$refs.confirmGoodsId.focus()
return
}
if (this.confirmFormEntity.confirmNum == null || this.confirmFormEntity.confirmNum == undefined || this.confirmFormEntity.confirmNum == '') {
if (this.confirmFormEntity.confirmNum == null || this.confirmFormEntity.confirmNum === '') {
this.$refs.confirmNum.focus()
return
}
},
}