代码更新:
1. 增加非计划领料的防呆 2. 增加入库界面不合并功能 3. 增加日期筛选功能
This commit is contained in:
parent
11f5414a14
commit
399192c527
|
|
@ -201,6 +201,7 @@ 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'
|
||||||
|
import loading from '@/utils/loading.js'
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -299,6 +300,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 确认完成工作
|
// 确认完成工作
|
||||||
createTask() {
|
createTask() {
|
||||||
|
loading.open('处理中,请稍等...')
|
||||||
if (this.standId == '' || this.workFormEntity.goodsId == '') {
|
if (this.standId == '' || this.workFormEntity.goodsId == '') {
|
||||||
errorBox('站台号和料号不可缺少')
|
errorBox('站台号和料号不可缺少')
|
||||||
return
|
return
|
||||||
|
|
@ -314,6 +316,7 @@ export default {
|
||||||
userName: store.getters.getUserName
|
userName: store.getters.getUserName
|
||||||
}
|
}
|
||||||
clcNoPlan(requestParams).then(res => {
|
clcNoPlan(requestParams).then(res => {
|
||||||
|
loading.close()
|
||||||
const response = res.data
|
const response = res.data
|
||||||
if (response.code == 0) {
|
if (response.code == 0) {
|
||||||
successBox(response.message)
|
successBox(response.message)
|
||||||
|
|
@ -322,6 +325,7 @@ export default {
|
||||||
errorBox(response.message)
|
errorBox(response.message)
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
loading.close()
|
||||||
console.log(err)
|
console.log(err)
|
||||||
errorBox('请求时发生异常。')
|
errorBox('请求时发生异常。')
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -49,9 +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 v-model="workFormEntity.goodsNum"
|
<el-input v-model="workFormEntity.goodsNum" controls-position="right"
|
||||||
controls-position="right" ref="goodsNum" clearable
|
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">
|
||||||
<span class="display-form-text-right">PC</span>
|
<span class="display-form-text-right">PC</span>
|
||||||
|
|
@ -158,7 +157,7 @@ export default {
|
||||||
this.workFormEntity.vehicleId = vehicleIdString
|
this.workFormEntity.vehicleId = vehicleIdString
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.workFormEntity.goodsNum != ''){
|
if (this.workFormEntity.goodsNum != '') {
|
||||||
if (isNaN(Number.parseInt(this.workFormEntity.goodsNum))) {
|
if (isNaN(Number.parseInt(this.workFormEntity.goodsNum))) {
|
||||||
errorBox('数量格式不正确')
|
errorBox('数量格式不正确')
|
||||||
return
|
return
|
||||||
|
|
@ -193,17 +192,22 @@ export default {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
}
|
}
|
||||||
).then(() => {
|
).then(() => {
|
||||||
const sameIndex = this.tempTasks.findIndex(task => task.goodsId == this.workFormEntity.goodsId)
|
// const sameIndex = this.tempTasks.findIndex(task => task.goodsId == this.workFormEntity.goodsId)
|
||||||
if (sameIndex != -1) {// 绑定过相同物料
|
// if (sameIndex != -1) {// 绑定过相同物料
|
||||||
var sameGoods = this.tempTasks[sameIndex]
|
// var sameGoods = this.tempTasks[sameIndex]
|
||||||
sameGoods.goodsNum = sameGoods.goodsNum + this.workFormEntity.goodsNum
|
// sameGoods.goodsNum = sameGoods.goodsNum + this.workFormEntity.goodsNum
|
||||||
} else {
|
// } else {
|
||||||
|
// this.tempTasks.push({
|
||||||
|
// vehicleId: this.workFormEntity.vehicleId,
|
||||||
|
// goodsId: this.workFormEntity.goodsId,
|
||||||
|
// goodsNum: this.workFormEntity.goodsNum
|
||||||
|
// })
|
||||||
|
// }
|
||||||
this.tempTasks.push({
|
this.tempTasks.push({
|
||||||
vehicleId: this.workFormEntity.vehicleId,
|
vehicleId: this.workFormEntity.vehicleId,
|
||||||
goodsId: this.workFormEntity.goodsId,
|
goodsId: this.workFormEntity.goodsId,
|
||||||
goodsNum: this.workFormEntity.goodsNum
|
goodsNum: this.workFormEntity.goodsNum
|
||||||
})
|
})
|
||||||
}
|
|
||||||
this.currentVehicleId = this.workFormEntity.vehicleId
|
this.currentVehicleId = this.workFormEntity.vehicleId
|
||||||
this.workFormEntity.goodsId = ''
|
this.workFormEntity.goodsId = ''
|
||||||
this.workFormEntity.goodsNum = ''
|
this.workFormEntity.goodsNum = ''
|
||||||
|
|
@ -216,17 +220,22 @@ export default {
|
||||||
return
|
return
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
const sameIndex = this.tempTasks.findIndex(task => task.goodsId == this.workFormEntity.goodsId)
|
// const sameIndex = this.tempTasks.findIndex(task => task.goodsId == this.workFormEntity.goodsId)
|
||||||
if (sameIndex != -1) {// 绑定过相同物料
|
// if (sameIndex != -1) {// 绑定过相同物料
|
||||||
var sameGoods = this.tempTasks[sameIndex]
|
// var sameGoods = this.tempTasks[sameIndex]
|
||||||
sameGoods.goodsNum = sameGoods.goodsNum + this.workFormEntity.goodsNum
|
// sameGoods.goodsNum = sameGoods.goodsNum + this.workFormEntity.goodsNum
|
||||||
} else {
|
// } else {
|
||||||
|
// this.tempTasks.push({
|
||||||
|
// vehicleId: this.workFormEntity.vehicleId,
|
||||||
|
// goodsId: this.workFormEntity.goodsId,
|
||||||
|
// goodsNum: this.workFormEntity.goodsNum
|
||||||
|
// })
|
||||||
|
// }
|
||||||
this.tempTasks.push({
|
this.tempTasks.push({
|
||||||
vehicleId: this.workFormEntity.vehicleId,
|
vehicleId: this.workFormEntity.vehicleId,
|
||||||
goodsId: this.workFormEntity.goodsId,
|
goodsId: this.workFormEntity.goodsId,
|
||||||
goodsNum: this.workFormEntity.goodsNum
|
goodsNum: this.workFormEntity.goodsNum
|
||||||
})
|
})
|
||||||
}
|
|
||||||
this.currentVehicleId = this.workFormEntity.vehicleId
|
this.currentVehicleId = this.workFormEntity.vehicleId
|
||||||
this.workFormEntity.goodsId = ''
|
this.workFormEntity.goodsId = ''
|
||||||
this.workFormEntity.goodsNum = ''
|
this.workFormEntity.goodsNum = ''
|
||||||
|
|
@ -251,7 +260,7 @@ export default {
|
||||||
deleteRowTask(row) {// 删除当前行的入库任务
|
deleteRowTask(row) {// 删除当前行的入库任务
|
||||||
this.tempTasks.splice(this.tempTasks.indexOf(row), 1)
|
this.tempTasks.splice(this.tempTasks.indexOf(row), 1)
|
||||||
if (this.tempTasks.length == 0) {
|
if (this.tempTasks.length == 0) {
|
||||||
this.tempVehicleNo = ''
|
this.currentVehicleId = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
confirmTask() {
|
confirmTask() {
|
||||||
|
|
@ -261,10 +270,25 @@ export default {
|
||||||
errorBox('必须输入料箱号')
|
errorBox('必须输入料箱号')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 处理相同料号合并
|
||||||
|
var taskList = []
|
||||||
|
for (var i = 0; i < this.tempTasks.length; i++) {
|
||||||
|
var sameIndex = taskList.findIndex(task => task.goodsId == this.tempTasks[i].goodsId)
|
||||||
|
if (sameIndex != -1) {// 绑定过相同物料
|
||||||
|
var sameGoods = taskList[sameIndex]
|
||||||
|
sameGoods.goodsNum = sameGoods.goodsNum + this.tempTasks[i].goodsNum
|
||||||
|
} else {
|
||||||
|
taskList.push({
|
||||||
|
vehicleId: this.tempTasks[i].vehicleId,
|
||||||
|
goodsId: this.tempTasks[i].goodsId,
|
||||||
|
goodsNum: this.tempTasks[i].goodsNum
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
const request = {
|
const request = {
|
||||||
vehicleId: this.currentVehicleId,
|
vehicleId: this.currentVehicleId,
|
||||||
userName: store.getters.getUserName,
|
userName: store.getters.getUserName,
|
||||||
goodsList: this.tempTasks.length > 0 ? this.tempTasks : [],
|
goodsList: taskList.length > 0 ? taskList : [],
|
||||||
}
|
}
|
||||||
sendGoodsInTask(request).then(res => {
|
sendGoodsInTask(request).then(res => {
|
||||||
loading.close()
|
loading.close()
|
||||||
|
|
|
||||||
|
|
@ -216,17 +216,22 @@ export default {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
}
|
}
|
||||||
).then(() => {
|
).then(() => {
|
||||||
const sameIndex = this.tempTasks.findIndex(task => task.goodsId == this.workFormEntity.goodsId)
|
// const sameIndex = this.tempTasks.findIndex(task => task.goodsId == this.workFormEntity.goodsId)
|
||||||
if (sameIndex != -1) {// 绑定过相同物料
|
// if (sameIndex != -1) {// 绑定过相同物料
|
||||||
var sameGoods = this.tempTasks[sameIndex]
|
// var sameGoods = this.tempTasks[sameIndex]
|
||||||
sameGoods.goodsNum = sameGoods.goodsNum + this.workFormEntity.goodsNum
|
// sameGoods.goodsNum = sameGoods.goodsNum + this.workFormEntity.goodsNum
|
||||||
} else {
|
// } else {
|
||||||
|
// this.tempTasks.push({
|
||||||
|
// vehicleId: this.workFormEntity.vehicleId,
|
||||||
|
// goodsId: this.workFormEntity.goodsId,
|
||||||
|
// goodsNum: this.workFormEntity.goodsNum
|
||||||
|
// })
|
||||||
|
// }
|
||||||
this.tempTasks.push({
|
this.tempTasks.push({
|
||||||
vehicleId: this.workFormEntity.vehicleId,
|
vehicleId: this.workFormEntity.vehicleId,
|
||||||
goodsId: this.workFormEntity.goodsId,
|
goodsId: this.workFormEntity.goodsId,
|
||||||
goodsNum: this.workFormEntity.goodsNum
|
goodsNum: this.workFormEntity.goodsNum
|
||||||
})
|
})
|
||||||
}
|
|
||||||
this.currentVehicleId = this.workFormEntity.vehicleId
|
this.currentVehicleId = this.workFormEntity.vehicleId
|
||||||
this.workFormEntity.goodsId = ''
|
this.workFormEntity.goodsId = ''
|
||||||
this.workFormEntity.goodsNum = null
|
this.workFormEntity.goodsNum = null
|
||||||
|
|
@ -240,17 +245,22 @@ export default {
|
||||||
return
|
return
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
const sameIndex = this.tempTasks.findIndex(task => task.goodsId == this.workFormEntity.goodsId)
|
// const sameIndex = this.tempTasks.findIndex(task => task.goodsId == this.workFormEntity.goodsId)
|
||||||
if (sameIndex != -1) {// 绑定过相同物料
|
// if (sameIndex != -1) {// 绑定过相同物料
|
||||||
var sameGoods = this.tempTasks[sameIndex]
|
// var sameGoods = this.tempTasks[sameIndex]
|
||||||
sameGoods.goodsNum = sameGoods.goodsNum + this.workFormEntity.goodsNum
|
// sameGoods.goodsNum = sameGoods.goodsNum + this.workFormEntity.goodsNum
|
||||||
} else {
|
// } else {
|
||||||
|
// this.tempTasks.push({
|
||||||
|
// vehicleId: this.workFormEntity.vehicleId,
|
||||||
|
// goodsId: this.workFormEntity.goodsId,
|
||||||
|
// goodsNum: this.workFormEntity.goodsNum
|
||||||
|
// })
|
||||||
|
// }
|
||||||
this.tempTasks.push({
|
this.tempTasks.push({
|
||||||
vehicleId: this.workFormEntity.vehicleId,
|
vehicleId: this.workFormEntity.vehicleId,
|
||||||
goodsId: this.workFormEntity.goodsId,
|
goodsId: this.workFormEntity.goodsId,
|
||||||
goodsNum: this.workFormEntity.goodsNum
|
goodsNum: this.workFormEntity.goodsNum
|
||||||
})
|
})
|
||||||
}
|
|
||||||
this.currentVehicleId = this.workFormEntity.vehicleId
|
this.currentVehicleId = this.workFormEntity.vehicleId
|
||||||
this.workFormEntity.goodsId = ''
|
this.workFormEntity.goodsId = ''
|
||||||
this.workFormEntity.goodsNum = null
|
this.workFormEntity.goodsNum = null
|
||||||
|
|
@ -272,7 +282,7 @@ export default {
|
||||||
deleteRowTask(row) {// 删除当前行的入库任务
|
deleteRowTask(row) {// 删除当前行的入库任务
|
||||||
this.tempTasks.splice(this.tempTasks.indexOf(row), 1)
|
this.tempTasks.splice(this.tempTasks.indexOf(row), 1)
|
||||||
if (this.tempTasks.length == 0) {
|
if (this.tempTasks.length == 0) {
|
||||||
this.tempVehicleNo = ''
|
this.currentVehicleId = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
confirmTask() {
|
confirmTask() {
|
||||||
|
|
@ -282,10 +292,25 @@ export default {
|
||||||
errorBox('必须输入料箱号')
|
errorBox('必须输入料箱号')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 处理相同料号合并
|
||||||
|
var taskList = []
|
||||||
|
for (var i = 0; i < this.tempTasks.length; i++) {
|
||||||
|
var sameIndex = taskList.findIndex(task => task.goodsId == this.tempTasks[i].goodsId)
|
||||||
|
if (sameIndex != -1) {// 绑定过相同物料
|
||||||
|
var sameGoods = taskList[sameIndex]
|
||||||
|
sameGoods.goodsNum = sameGoods.goodsNum + this.tempTasks[i].goodsNum
|
||||||
|
} else {
|
||||||
|
taskList.push({
|
||||||
|
vehicleId: this.tempTasks[i].vehicleId,
|
||||||
|
goodsId: this.tempTasks[i].goodsId,
|
||||||
|
goodsNum: this.tempTasks[i].goodsNum
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
const request = {
|
const request = {
|
||||||
vehicleId: this.currentVehicleId,
|
vehicleId: this.currentVehicleId,
|
||||||
userName: store.getters.getUserName,
|
userName: store.getters.getUserName,
|
||||||
goodsList: this.tempTasks.length > 0 ? this.tempTasks : [],
|
goodsList: taskList.length > 0 ? taskList : [],
|
||||||
}
|
}
|
||||||
sendGoodsInTask(request).then(res => {
|
sendGoodsInTask(request).then(res => {
|
||||||
loading.close()
|
loading.close()
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,12 @@
|
||||||
<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-input v-model="vehicleIdQuery" style="width: 256px; margin-right: 10px;" placeholder="箱号" />
|
<el-input v-model="vehicleIdQuery" style="width: 158px; margin-right: 10px;" placeholder="箱号" />
|
||||||
<el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="料号" />
|
<el-input v-model="goodsIdQuery" style="width: 158px; margin-right: 10px;" placeholder="料号" />
|
||||||
|
<el-date-picker v-model="createTimeQuery" type="date" placeholder="选择创建日期" :shortcuts="shortcuts"
|
||||||
|
style="width: 158px; margin-right: 10px;" clearable />
|
||||||
|
<el-date-picker v-model="finishTimeQuery" type="date" placeholder="选择完成日期" :shortcuts="shortcuts"
|
||||||
|
style="width: 158px; margin-right: 10px;" clearable />
|
||||||
<el-button type="primary" @click="search()">搜索</el-button>
|
<el-button type="primary" @click="search()">搜索</el-button>
|
||||||
<el-button type="warning" @click="reset()">重置</el-button>
|
<el-button type="warning" @click="reset()">重置</el-button>
|
||||||
<el-button type="success" @click="exportExcel()">导出记录</el-button>
|
<el-button type="success" @click="exportExcel()">导出记录</el-button>
|
||||||
|
|
@ -13,7 +17,8 @@
|
||||||
class="table-class" :header-cell-style="{ 'text-align': 'center' }"
|
class="table-class" :header-cell-style="{ 'text-align': 'center' }"
|
||||||
:cell-style="{ 'text-align': 'center' }">
|
:cell-style="{ 'text-align': 'center' }">
|
||||||
<el-table-column prop="taskId" label="任务号" fixed="left" show-overflow-tooltip min-width="120px" />
|
<el-table-column prop="taskId" label="任务号" fixed="left" show-overflow-tooltip min-width="120px" />
|
||||||
<el-table-column prop="taskType" label="任务类型" fixed="left" :formatter="taskTypeFormat" min-width="120px" />
|
<el-table-column prop="taskType" label="任务类型" fixed="left" :formatter="taskTypeFormat"
|
||||||
|
min-width="120px" />
|
||||||
<el-table-column prop="vehicleId" label="箱号" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="vehicleId" label="箱号" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="goodsRelated.goodsId" label="料号" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="goodsRelated.goodsId" label="料号" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="goodsRelated.goodsName" label="料名" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="goodsRelated.goodsName" label="料名" min-width="120px" show-overflow-tooltip />
|
||||||
|
|
@ -24,7 +29,10 @@
|
||||||
<el-table-column prop="goodsRelated.originNum" label="库存数量" min-width="120px" />
|
<el-table-column prop="goodsRelated.originNum" label="库存数量" min-width="120px" />
|
||||||
<el-table-column prop="taskPriority" label="任务优先级" min-width="120px" />
|
<el-table-column prop="taskPriority" label="任务优先级" min-width="120px" />
|
||||||
<el-table-column prop="preTask" label="前置任务" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="preTask" label="前置任务" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px"
|
||||||
|
show-overflow-tooltip />
|
||||||
|
<el-table-column prop="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px"
|
||||||
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="userName" label="操作人员姓名" min-width="120px" />
|
<el-table-column prop="userName" label="操作人员姓名" min-width="120px" />
|
||||||
<el-table-column prop="taskStatus" label="任务状态" fixed="right" :formatter="taskStatusFormat"
|
<el-table-column prop="taskStatus" label="任务状态" fixed="right" :formatter="taskStatusFormat"
|
||||||
min-width="120px" />
|
min-width="120px" />
|
||||||
|
|
@ -58,6 +66,22 @@ export default {
|
||||||
goodsIdQuery: '',
|
goodsIdQuery: '',
|
||||||
vehicleIdQuery: '',
|
vehicleIdQuery: '',
|
||||||
loading: true,
|
loading: true,
|
||||||
|
createTimeQuery: null,
|
||||||
|
finishTimeQuery: null,
|
||||||
|
shortcuts: [
|
||||||
|
{
|
||||||
|
text: '今天',
|
||||||
|
value: new Date(),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '昨天',
|
||||||
|
value: () => {
|
||||||
|
const date = new Date()
|
||||||
|
date.setTime(date.getTime() - 3600 * 1000 * 24)
|
||||||
|
return date
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -89,7 +113,9 @@ export default {
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
taskType: 1,
|
taskType: 1,
|
||||||
goodsId: this.goodsIdQuery.trim(),
|
goodsId: this.goodsIdQuery.trim(),
|
||||||
vehicleId: this.vehicleIdQuery.trim()
|
vehicleId: this.vehicleIdQuery.trim(),
|
||||||
|
createTime: timeFormatter(this.createTimeQuery),
|
||||||
|
finishTime: timeFormatter(this.finishTimeQuery),
|
||||||
}
|
}
|
||||||
getTaskRecords(tableRequest).then(res => {
|
getTaskRecords(tableRequest).then(res => {
|
||||||
const tableResponse = res.data
|
const tableResponse = res.data
|
||||||
|
|
@ -108,12 +134,16 @@ export default {
|
||||||
reset() {
|
reset() {
|
||||||
this.goodsIdQuery = ''
|
this.goodsIdQuery = ''
|
||||||
this.vehicleIdQuery = ''
|
this.vehicleIdQuery = ''
|
||||||
|
this.createTimeQuery = null
|
||||||
|
this.finishTimeQuery = null
|
||||||
this.search()
|
this.search()
|
||||||
},
|
},
|
||||||
exportExcel() {
|
exportExcel() {
|
||||||
const params = {
|
const params = {
|
||||||
vehicleId: this.vehicleIdQuery.trim(),
|
vehicleId: this.vehicleIdQuery.trim(),
|
||||||
goodsId: this.goodsIdQuery.trim(),
|
goodsId: this.goodsIdQuery.trim(),
|
||||||
|
createTime: timeFormatter(this.createTimeQuery),
|
||||||
|
finishTime: timeFormatter(this.finishTimeQuery),
|
||||||
userName: store.getters.getUserName
|
userName: store.getters.getUserName
|
||||||
}
|
}
|
||||||
downloadInRecordExcel(params).then(res => {
|
downloadInRecordExcel(params).then(res => {
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,12 @@
|
||||||
<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-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="料号" />
|
<el-input v-model="goodsIdQuery" style="width: 158px; margin-right: 10px;" placeholder="料号" />
|
||||||
<el-input v-model="vehicleIdQuery" style="width: 256px; margin-right: 10px;" placeholder="箱号" />
|
<el-input v-model="vehicleIdQuery" style="width: 158px; margin-right: 10px;" placeholder="箱号" />
|
||||||
|
<el-date-picker v-model="createTimeQuery" type="date" placeholder="选择创建日期" :shortcuts="shortcuts"
|
||||||
|
style="width: 158px; margin-right: 10px;" clearable />
|
||||||
|
<el-date-picker v-model="finishTimeQuery" type="date" placeholder="选择完成日期" :shortcuts="shortcuts"
|
||||||
|
style="width: 158px; margin-right: 10px;" clearable />
|
||||||
<el-button type="primary" @click="search()">搜索</el-button>
|
<el-button type="primary" @click="search()">搜索</el-button>
|
||||||
<el-button type="warning" @click="reset()">重置</el-button>
|
<el-button type="warning" @click="reset()">重置</el-button>
|
||||||
<el-button type="success" @click="exportExcel()">导出记录</el-button>
|
<el-button type="success" @click="exportExcel()">导出记录</el-button>
|
||||||
|
|
@ -25,6 +29,8 @@
|
||||||
<el-table-column prop="taskPriority" label="任务优先级" min-width="120px" />
|
<el-table-column prop="taskPriority" label="任务优先级" min-width="120px" />
|
||||||
<el-table-column prop="preTask" label="前置任务" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="preTask" label="前置任务" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px"
|
||||||
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="userName" label="操作人员姓名" min-width="120px" />
|
<el-table-column prop="userName" label="操作人员姓名" min-width="120px" />
|
||||||
<el-table-column prop="taskStatus" label="任务状态" fixed="right" :formatter="taskStatusFormat"
|
<el-table-column prop="taskStatus" label="任务状态" fixed="right" :formatter="taskStatusFormat"
|
||||||
min-width="120px" />
|
min-width="120px" />
|
||||||
|
|
@ -58,7 +64,23 @@ export default {
|
||||||
total: 0,
|
total: 0,
|
||||||
goodsIdQuery: '',
|
goodsIdQuery: '',
|
||||||
vehicleIdQuery: '',
|
vehicleIdQuery: '',
|
||||||
loading: true
|
loading: true,
|
||||||
|
createTimeQuery: null,
|
||||||
|
finishTimeQuery: null,
|
||||||
|
shortcuts: [
|
||||||
|
{
|
||||||
|
text: '今天',
|
||||||
|
value: new Date(),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '昨天',
|
||||||
|
value: () => {
|
||||||
|
const date = new Date()
|
||||||
|
date.setTime(date.getTime() - 3600 * 1000 * 24)
|
||||||
|
return date
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -90,7 +112,9 @@ export default {
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
taskType: 2,
|
taskType: 2,
|
||||||
goodsId: this.goodsIdQuery.trim(),
|
goodsId: this.goodsIdQuery.trim(),
|
||||||
vehicleId: this.vehicleIdQuery.trim()
|
vehicleId: this.vehicleIdQuery.trim(),
|
||||||
|
createTime: timeFormatter(this.createTimeQuery),
|
||||||
|
finishTime: timeFormatter(this.finishTimeQuery),
|
||||||
}
|
}
|
||||||
getTaskRecords(tableRequest).then(res => {
|
getTaskRecords(tableRequest).then(res => {
|
||||||
const tableResponse = res.data
|
const tableResponse = res.data
|
||||||
|
|
@ -102,19 +126,23 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
ElMessage.error('查询任务记录错误')
|
errorBox('查询任务记录错误')
|
||||||
})
|
})
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
this.goodsTypeQuery = ''
|
this.goodsIdQuery = ''
|
||||||
this.specificationQuery = ''
|
this.vehicleIdQuery = ''
|
||||||
|
this.createTimeQuery = null
|
||||||
|
this.finishTimeQuery = null
|
||||||
this.search()
|
this.search()
|
||||||
},
|
},
|
||||||
exportExcel() {
|
exportExcel() {
|
||||||
const params = {
|
const params = {
|
||||||
vehicleId: this.vehicleIdQuery.trim(),
|
vehicleId: this.vehicleIdQuery.trim(),
|
||||||
goodsId: this.goodsIdQuery.trim(),
|
goodsId: this.goodsIdQuery.trim(),
|
||||||
|
createTime: timeFormatter(this.createTimeQuery),
|
||||||
|
finishTime: timeFormatter(this.finishTimeQuery),
|
||||||
userName: store.getters.userName
|
userName: store.getters.userName
|
||||||
}
|
}
|
||||||
downloadOutRecordExcel(params).then(res => {
|
downloadOutRecordExcel(params).then(res => {
|
||||||
|
|
@ -135,18 +163,12 @@ export default {
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
url.revokeObjectURL(link.href)//移除url对象
|
url.revokeObjectURL(link.href)//移除url对象
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ElMessage({
|
console.log(e)
|
||||||
message: '下载文件失败:: ' + e,
|
errorBox('下载文件失败')
|
||||||
type: 'error',
|
|
||||||
showClose: true
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
ElMessage({
|
console.log(err)
|
||||||
message: '导出失败:: ' + err,
|
errorBox('导出失败')
|
||||||
type: 'error',
|
|
||||||
showClose: true
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@
|
||||||
:suffix-icon="Search" />
|
:suffix-icon="Search" />
|
||||||
<el-input v-model="locationIdQuery" style="width: 196px; margin-right: 10px;" placeholder="库位"
|
<el-input v-model="locationIdQuery" style="width: 196px; margin-right: 10px;" placeholder="库位"
|
||||||
:suffix-icon="Search" />
|
:suffix-icon="Search" />
|
||||||
|
<el-date-picker v-model="createTimeQuery" type="date" placeholder="选择上架日期" :shortcuts="shortcuts"
|
||||||
|
style="width: 158px; margin-right: 10px;" clearable />
|
||||||
<el-button type="primary" @click="search()">搜索</el-button>
|
<el-button type="primary" @click="search()">搜索</el-button>
|
||||||
<el-button type="warning" @click="reset()">重置</el-button>
|
<el-button type="warning" @click="reset()">重置</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -28,14 +30,16 @@
|
||||||
<br />
|
<br />
|
||||||
<el-table id="stock-table" :data="displayStocks" stripe border v-loading="loading" class="table-class"
|
<el-table id="stock-table" :data="displayStocks" stripe border v-loading="loading" class="table-class"
|
||||||
max-height="650px" highlight-current-row @row-click="getCurrentRow" :row-style="rowStyle"
|
max-height="650px" highlight-current-row @row-click="getCurrentRow" :row-style="rowStyle"
|
||||||
:header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }" @sort-change="handleSortChange">
|
:header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }"
|
||||||
|
@sort-change="handleSortChange">
|
||||||
<el-table-column width="65px" fixed="left">
|
<el-table-column width="65px" fixed="left">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-radio :label="scope.row.stockId" v-model="stockId"> </el-radio>
|
<el-radio :label="scope.row.stockId" v-model="stockId"> </el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="stockId" label="库存编号" fixed="left" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="stockId" label="库存编号" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="vehicleId" label="箱号" fixed="left" min-width="120px" sortable="custom" show-overflow-tooltip />
|
<el-table-column prop="vehicleId" label="箱号" fixed="left" min-width="120px" sortable="custom"
|
||||||
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="goodsId" label="物料号" fixed="left" min-width="120px" show-overflow-tooltip />
|
<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="goodsName" label="物料名称" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="locationId" label="库位" :formatter="locationFormat" min-width="120px"
|
<el-table-column prop="locationId" label="库位" :formatter="locationFormat" min-width="120px"
|
||||||
|
|
@ -48,10 +52,10 @@
|
||||||
<el-table-column prop="isInventory" label="是否盘点" :formatter="yesOrNoFormat" min-width="120px" />
|
<el-table-column prop="isInventory" label="是否盘点" :formatter="yesOrNoFormat" min-width="120px" />
|
||||||
<el-table-column prop="inventoryTaskId" label="盘点任务号" min-width="120px" />
|
<el-table-column prop="inventoryTaskId" label="盘点任务号" min-width="120px" />
|
||||||
<el-table-column prop="noUseDays" label="未使用天数" min-width="120px" />
|
<el-table-column prop="noUseDays" label="未使用天数" min-width="120px" />
|
||||||
<el-table-column prop="createTime" label="上架时间" sortable="custom" :formatter="timeFormat" min-width="120px"
|
<el-table-column prop="createTime" label="上架时间" sortable="custom" :formatter="timeFormat"
|
||||||
show-overflow-tooltip />
|
min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="lastUpdateTime" label="最近更新时间" sortable="custom" :formatter="timeFormat" min-width="140px"
|
<el-table-column prop="lastUpdateTime" label="最近更新时间" sortable="custom" :formatter="timeFormat"
|
||||||
show-overflow-tooltip />
|
min-width="140px" show-overflow-tooltip />
|
||||||
<el-table-column prop="lastUpdateUser" label="最近更新用户" min-width="120px" />
|
<el-table-column prop="lastUpdateUser" label="最近更新用户" min-width="120px" />
|
||||||
<el-table-column fixed="right" label="操作" width="120px" v-if="selStock == null">
|
<el-table-column fixed="right" label="操作" width="120px" v-if="selStock == null">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
|
|
@ -207,6 +211,21 @@ export default {
|
||||||
goodsIdQuery: '',
|
goodsIdQuery: '',
|
||||||
vehicleIdQuery: '',
|
vehicleIdQuery: '',
|
||||||
locationIdQuery: '',
|
locationIdQuery: '',
|
||||||
|
createTimeQuery: null,
|
||||||
|
shortcuts: [
|
||||||
|
{
|
||||||
|
text: '今天',
|
||||||
|
value: new Date(),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '昨天',
|
||||||
|
value: () => {
|
||||||
|
const date = new Date()
|
||||||
|
date.setTime(date.getTime() - 3600 * 1000 * 24)
|
||||||
|
return date
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
loading: true,
|
loading: true,
|
||||||
stockId: '',
|
stockId: '',
|
||||||
stockFormRef: ref(),
|
stockFormRef: ref(),
|
||||||
|
|
@ -375,6 +394,7 @@ export default {
|
||||||
goodsId: this.goodsIdQuery.trim(),
|
goodsId: this.goodsIdQuery.trim(),
|
||||||
vehicleId: this.vehicleIdQuery.trim(),
|
vehicleId: this.vehicleIdQuery.trim(),
|
||||||
locationId: this.locationIdQuery.trim(),
|
locationId: this.locationIdQuery.trim(),
|
||||||
|
createTime: timeFormatter(this.createTimeQuery),
|
||||||
userName: store.getters.getUserName
|
userName: store.getters.getUserName
|
||||||
}
|
}
|
||||||
getAllStocks(request).then(res => {
|
getAllStocks(request).then(res => {
|
||||||
|
|
@ -395,6 +415,7 @@ export default {
|
||||||
this.goodsIdQuery = ''
|
this.goodsIdQuery = ''
|
||||||
this.vehicleIdQuery = ''
|
this.vehicleIdQuery = ''
|
||||||
this.locationIdQuery = ''
|
this.locationIdQuery = ''
|
||||||
|
this.createTimeQuery = null
|
||||||
this.search()
|
this.search()
|
||||||
},
|
},
|
||||||
getCurrentRow(row) {
|
getCurrentRow(row) {
|
||||||
|
|
@ -406,6 +427,7 @@ export default {
|
||||||
goodsId: this.goodsIdQuery.trim(),
|
goodsId: this.goodsIdQuery.trim(),
|
||||||
vehicleId: this.vehicleIdQuery.trim(),
|
vehicleId: this.vehicleIdQuery.trim(),
|
||||||
locationId: this.locationIdQuery.trim(),
|
locationId: this.locationIdQuery.trim(),
|
||||||
|
createTime: timeFormatter(this.createTimeQuery),
|
||||||
userName: store.getters.getUserName
|
userName: store.getters.getUserName
|
||||||
}
|
}
|
||||||
downloadStockExcel(params).then(res => {
|
downloadStockExcel(params).then(res => {
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@
|
||||||
:suffix-icon="Search" />
|
:suffix-icon="Search" />
|
||||||
<el-select-v2 v-model="reasonQuery" style="width: 158px; margin-right: 10px;"
|
<el-select-v2 v-model="reasonQuery" style="width: 158px; margin-right: 10px;"
|
||||||
placeholder="请选择更新原因" :options="reasonOptions" @change="search()"></el-select-v2>
|
placeholder="请选择更新原因" :options="reasonOptions" @change="search()"></el-select-v2>
|
||||||
|
<el-date-picker v-model="updateTimeQuery" type="date" placeholder="选择完成日期" :shortcuts="shortcuts"
|
||||||
|
style="width: 158px; margin-right: 10px;" clearable />
|
||||||
<el-button type="primary" @click="search()">搜索</el-button>
|
<el-button type="primary" @click="search()">搜索</el-button>
|
||||||
<el-button type="warning" @click="reset()">重置</el-button>
|
<el-button type="warning" @click="reset()">重置</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -65,6 +67,21 @@ export default {
|
||||||
vehicleIdQuery: '',
|
vehicleIdQuery: '',
|
||||||
goodsIdQuery: '',
|
goodsIdQuery: '',
|
||||||
reasonQuery: '',
|
reasonQuery: '',
|
||||||
|
updateTimeQuery: null,
|
||||||
|
shortcuts: [
|
||||||
|
{
|
||||||
|
text: '今天',
|
||||||
|
value: new Date(),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '昨天',
|
||||||
|
value: () => {
|
||||||
|
const date = new Date()
|
||||||
|
date.setTime(date.getTime() - 3600 * 1000 * 24)
|
||||||
|
return date
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
loading: true,
|
loading: true,
|
||||||
recordId: '',
|
recordId: '',
|
||||||
reasonOptions: [
|
reasonOptions: [
|
||||||
|
|
@ -127,6 +144,7 @@ export default {
|
||||||
vehicleId: this.vehicleIdQuery.trim(),
|
vehicleId: this.vehicleIdQuery.trim(),
|
||||||
goodsId: this.goodsIdQuery.trim(),
|
goodsId: this.goodsIdQuery.trim(),
|
||||||
reason: this.reasonQuery.trim(),
|
reason: this.reasonQuery.trim(),
|
||||||
|
updateTime: timeFormatter(this.updateTimeQuery),
|
||||||
userName: store.getters.getUserName
|
userName: store.getters.getUserName
|
||||||
}
|
}
|
||||||
getStockUpdateRecord(request).then(res => {
|
getStockUpdateRecord(request).then(res => {
|
||||||
|
|
@ -150,6 +168,7 @@ export default {
|
||||||
this.vehicleIdQuery = ''
|
this.vehicleIdQuery = ''
|
||||||
this.goodsIdQuery = ''
|
this.goodsIdQuery = ''
|
||||||
this.reasonQuery = ''
|
this.reasonQuery = ''
|
||||||
|
this.updateTimeQuery = null
|
||||||
this.search()
|
this.search()
|
||||||
},
|
},
|
||||||
getCurrentRow(row) {
|
getCurrentRow(row) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user