代码更新:
1. 功能调整
This commit is contained in:
parent
66030b5573
commit
e723013ec2
|
|
@ -24,8 +24,17 @@ const getStockNumByGoodsId = (params) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getStockUpdateRecord = (params) => {
|
||||||
|
return request({
|
||||||
|
url: '/stock/getStockUpdateRecord',
|
||||||
|
method: 'post',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getAllStocks,
|
getAllStocks,
|
||||||
updateStockInfo,
|
updateStockInfo,
|
||||||
getStockNumByGoodsId
|
getStockNumByGoodsId,
|
||||||
|
getStockUpdateRecord
|
||||||
}
|
}
|
||||||
|
|
@ -197,7 +197,7 @@
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { clcNoPlan, clcNoPlanConfirmBack } from '@/api/task'
|
import { clcNoPlan, clcNoPlanConfirmBack } from '@/api/task'
|
||||||
import { replaceEnglishAndNumberIGAI } from '@/utils/formatter'
|
import { replaceEnglishAndNumberIGAI } from '@/utils/formatter'
|
||||||
import { errorBox } from '@/utils/myMessageBox.js'
|
import { errorBox, successBox } from '@/utils/myMessageBox.js'
|
||||||
import { getStockNumByGoodsId } from '@/api/stock'
|
import { getStockNumByGoodsId } from '@/api/stock'
|
||||||
import { reactive, ref } from 'vue'
|
import { reactive, ref } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
|
|
@ -313,7 +313,7 @@ export default {
|
||||||
clcNoPlan(requestParams).then(res => {
|
clcNoPlan(requestParams).then(res => {
|
||||||
const response = res.data
|
const response = res.data
|
||||||
if (response.code == 0) {
|
if (response.code == 0) {
|
||||||
ElMessage.success(response.message)
|
successBox(response.message)
|
||||||
this.resetForms()
|
this.resetForms()
|
||||||
} else {
|
} else {
|
||||||
errorBox(response.message)
|
errorBox(response.message)
|
||||||
|
|
|
||||||
|
|
@ -49,8 +49,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; margin-top: 20px;">
|
<div style="display: flex; margin-top: 20px;">
|
||||||
<div class="display-form-div-left">
|
<div class="display-form-div-left">
|
||||||
<el-input-number v-model.number="workFormEntity.goodsNum"
|
<el-input v-model="workFormEntity.goodsNum"
|
||||||
controls-position="right" :min="0" :max="9999" ref="goodsNum"
|
controls-position="right" ref="goodsNum" clearable
|
||||||
v-on:keyup.enter="addTempTask()" />
|
v-on:keyup.enter="addTempTask()" />
|
||||||
</div>
|
</div>
|
||||||
<div class="display-form-div-right">
|
<div class="display-form-div-right">
|
||||||
|
|
@ -121,7 +121,7 @@ export default {
|
||||||
workFormEntity: reactive({
|
workFormEntity: reactive({
|
||||||
vehicleId: '',
|
vehicleId: '',
|
||||||
goodsId: '',
|
goodsId: '',
|
||||||
goodsNum: null
|
goodsNum: ''
|
||||||
}),
|
}),
|
||||||
rules: reactive({
|
rules: reactive({
|
||||||
vehicleId: [
|
vehicleId: [
|
||||||
|
|
@ -144,12 +144,28 @@ export default {
|
||||||
this.workFormEntity = reactive({
|
this.workFormEntity = reactive({
|
||||||
vehicleId: '',
|
vehicleId: '',
|
||||||
goodsId: '',
|
goodsId: '',
|
||||||
goodsNum: null
|
goodsNum: ''
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
addTempTask() {
|
addTempTask() {
|
||||||
this.workFormEntity.vehicleId = replaceEnglishAndNumberIGAI(this.workFormEntity.vehicleId)
|
if (this.workFormEntity.vehicleId != '') {
|
||||||
if (this.workFormEntity.vehicleId != '' && this.workFormEntity.goodsId != '' && this.workFormEntity.goodsNum != null && this.workFormEntity.goodsNum > 0) {
|
const vehicleIdString = replaceEnglishAndNumberIGAI(this.workFormEntity.vehicleId)
|
||||||
|
if (!vehicleIdString.startsWith('ASRS') || vehicleIdString.length != 9) {
|
||||||
|
errorBox('料箱格式不正确')
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
this.workFormEntity.vehicleId = vehicleIdString
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.workFormEntity.goodsNum != ''){
|
||||||
|
if (isNaN(Number.parseInt(this.workFormEntity.goodsNum))) {
|
||||||
|
errorBox('数量格式不正确')
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
this.workFormEntity.goodsNum = Number.parseInt(this.workFormEntity.goodsNum)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.workFormEntity.vehicleId != '' && this.workFormEntity.goodsId != '' && this.workFormEntity.goodsNum != '' && this.workFormEntity.goodsNum > 0) {
|
||||||
if (this.workFormEntity.vehicleId == this.workFormEntity.goodsId) {
|
if (this.workFormEntity.vehicleId == this.workFormEntity.goodsId) {
|
||||||
errorBox('料箱号与料号不能相同')
|
errorBox('料箱号与料号不能相同')
|
||||||
return
|
return
|
||||||
|
|
@ -189,12 +205,12 @@ export default {
|
||||||
}
|
}
|
||||||
this.currentVehicleId = this.workFormEntity.vehicleId
|
this.currentVehicleId = this.workFormEntity.vehicleId
|
||||||
this.workFormEntity.goodsId = ''
|
this.workFormEntity.goodsId = ''
|
||||||
this.workFormEntity.goodsNum = null
|
this.workFormEntity.goodsNum = ''
|
||||||
this.$refs.goodsId.focus()
|
this.$refs.goodsId.focus()
|
||||||
return
|
return
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
ElMessage.info('操作取消')
|
ElMessage.info('操作取消')
|
||||||
this.workFormEntity.goodsNum = null
|
this.workFormEntity.goodsNum = ''
|
||||||
this.$refs.goodsNum.focus()
|
this.$refs.goodsNum.focus()
|
||||||
return
|
return
|
||||||
})
|
})
|
||||||
|
|
@ -212,7 +228,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.currentVehicleId = this.workFormEntity.vehicleId
|
this.currentVehicleId = this.workFormEntity.vehicleId
|
||||||
this.workFormEntity.goodsId = ''
|
this.workFormEntity.goodsId = ''
|
||||||
this.workFormEntity.goodsNum = null
|
this.workFormEntity.goodsNum = ''
|
||||||
this.$refs.goodsId.focus()
|
this.$refs.goodsId.focus()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -225,7 +241,7 @@ export default {
|
||||||
this.$refs.goodsId.focus()
|
this.$refs.goodsId.focus()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.workFormEntity.goodsNum == null || this.workFormEntity.goodsNum <= 0) {
|
if (this.workFormEntity.goodsNum == '') {
|
||||||
this.$refs.goodsNum.focus()
|
this.$refs.goodsNum.focus()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
162
src/layout/stockUpdateRecord.vue
Normal file
162
src/layout/stockUpdateRecord.vue
Normal file
|
|
@ -0,0 +1,162 @@
|
||||||
|
<template>
|
||||||
|
<div style="margin-bottom: 10px; height: 100%; padding-left: 1%; padding-right: 1%;">
|
||||||
|
<el-config-provider :locale="zhCn">
|
||||||
|
<div style="display: flex;justify-content: space-between;">
|
||||||
|
<el-row>
|
||||||
|
<el-input v-model="vehicleIdQuery" style="width: 158px; margin-right: 10px;" placeholder="箱号"
|
||||||
|
:suffix-icon="Search" />
|
||||||
|
<el-input v-model="goodsIdQuery" style="width: 158px; margin-right: 10px;" placeholder="料号"
|
||||||
|
:suffix-icon="Search" />
|
||||||
|
<el-input v-model="reasonQuery" style="width: 158px; margin-right: 10px;" placeholder="更新原因"
|
||||||
|
:suffix-icon="Search" />
|
||||||
|
<el-button type="primary" @click="search()">搜索</el-button>
|
||||||
|
<el-button type="warning" @click="reset()">重置</el-button>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<el-table :data="recordList" 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' }">
|
||||||
|
<el-table-column width="65px" fixed="left">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-radio :label="scope.row.recordId" v-model="recordId"> </el-radio>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="recordId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="stockId" label="库存编号" min-width="120px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="vehicleId" label="箱号" min-width="120px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="goodsId" label="料号" show-overflow-tooltip min-width="120px" />
|
||||||
|
<el-table-column prop="goodsName" label="物料名称" min-width="120px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="locationBefore" label="原位置" min-width="120px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="locationAfter" label="新位置" min-width="120px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="quantityBefore" label="原数量" min-width="120px" />
|
||||||
|
<el-table-column prop="quantityAfter" label="新数量" min-width="120px" />
|
||||||
|
<el-table-column prop="reason" label="原因" fixed="right" show-overflow-tooltip
|
||||||
|
min-width="120px" />
|
||||||
|
<el-table-column prop="updateTime" label="完成时间" :formatter="timeFormat" min-width="120px"
|
||||||
|
show-overflow-tooltip />
|
||||||
|
<el-table-column prop="updateUser" label="操作用户" min-width="120px" />
|
||||||
|
</el-table>
|
||||||
|
<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" />
|
||||||
|
</el-config-provider>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import store from '@/store'
|
||||||
|
import { getStockUpdateRecord } from '@/api/stock.js'
|
||||||
|
import { errorBox } from '@/utils/myMessageBox.js'
|
||||||
|
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||||
|
import { Search } from '@element-plus/icons-vue'
|
||||||
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'stockUpdateRecord',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
recordList: [],
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
vehicleIdQuery: '',
|
||||||
|
goodsIdQuery: '',
|
||||||
|
reasonQuery: '',
|
||||||
|
loading: true,
|
||||||
|
recordId: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.search()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
search() {
|
||||||
|
this.loading = true
|
||||||
|
const request = {
|
||||||
|
pageNo: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
vehicleId: this.vehicleIdQuery.trim(),
|
||||||
|
goodsId: this.goodsIdQuery.trim(),
|
||||||
|
reason: this.reasonQuery.trim(),
|
||||||
|
userName: store.getters.getUserName
|
||||||
|
}
|
||||||
|
getStockUpdateRecord(request).then(res => {
|
||||||
|
const tableResponse = res.data
|
||||||
|
if (tableResponse.code == 0) {
|
||||||
|
this.recordList = tableResponse.returnData.lists
|
||||||
|
this.total = tableResponse.returnData.total
|
||||||
|
} else {
|
||||||
|
errorBox(tableResponse.message)
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
errorBox('查询库存更新记录错误')
|
||||||
|
})
|
||||||
|
this.loading = false
|
||||||
|
},
|
||||||
|
timeFormat: (row, column, cellValue, index) => {
|
||||||
|
return timeFormatter(cellValue)
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
this.vehicleIdQuery = ''
|
||||||
|
this.goodsIdQuery = ''
|
||||||
|
this.reasonQuery = ''
|
||||||
|
this.search()
|
||||||
|
},
|
||||||
|
getCurrentRow(row) {
|
||||||
|
this.recordId = row.recordId
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.el-pagination {
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row .el-button {
|
||||||
|
width: 72px;
|
||||||
|
margin-left: 0px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-class {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row .el-form-item {
|
||||||
|
width: 10% inherit;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row .el-form-item .el-select-v2 {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row .el-form-item .el-input-number {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row .el-form-item .el-button {
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-area {
|
||||||
|
display: flex;
|
||||||
|
/* min-height: 10%; */
|
||||||
|
max-height: max-content;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
min-width: inherit;
|
||||||
|
border: solid 1px;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0px 15px 10px -15px #000;
|
||||||
|
overflow: auto;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -59,7 +59,6 @@
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { getWorkSummary } from '@/api/kateWork.js'
|
import { getWorkSummary } from '@/api/kateWork.js'
|
||||||
import { errorBox } from '@/utils/myMessageBox.js'
|
import { errorBox } from '@/utils/myMessageBox.js'
|
||||||
import { ref, reactive } from 'vue'
|
|
||||||
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||||
import { Search } from '@element-plus/icons-vue'
|
import { Search } from '@element-plus/icons-vue'
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,8 @@ const routes = [
|
||||||
{ path: '/goodsToStation', component: () => import('@/layout/goodsToStation.vue') },// 站台要料
|
{ path: '/goodsToStation', component: () => import('@/layout/goodsToStation.vue') },// 站台要料
|
||||||
{ path: '/clcNoPlan', component: () => import('@/layout/clcNoPlan.vue') },// 非计划领料
|
{ path: '/clcNoPlan', component: () => import('@/layout/clcNoPlan.vue') },// 非计划领料
|
||||||
{ path: '/clcKanban', component: () => import('@/layout/clcKanban.vue') },// 需求看板
|
{ path: '/clcKanban', component: () => import('@/layout/clcKanban.vue') },// 需求看板
|
||||||
{ path: '/goodsInQR', component: () => import('@/layout/goodsInQR.vue') },// 需求看板
|
{ path: '/goodsInQR', component: () => import('@/layout/goodsInQR.vue') },// 二维码入库
|
||||||
|
{ path: '/stockUpdateRecord', component: () => import('@/layout/stockUpdateRecord.vue') },// 库存更新记录
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user