界面完善

This commit is contained in:
梁州 2025-12-25 14:05:14 +08:00
parent c33de5c502
commit b64ff96b7b
4 changed files with 745 additions and 703 deletions

View File

@ -104,7 +104,6 @@ export default {
standId: store.getters.getStandId, standId: store.getters.getStandId,
displayGoods: false,// displayGoods: false,//
// displayVehicleType1Selection: false,// // displayVehicleType1Selection: false,//
// timer: '',
labelPosition: 'top', labelPosition: 'top',
workFormRef: ref(), workFormRef: ref(),
workFormEntity: reactive({ workFormEntity: reactive({
@ -131,21 +130,9 @@ export default {
] ]
} }
}, },
mounted() {
// this.timer = setInterval(() => {
// // this.getAllTasks()
// }, 2000)
},
beforeUnmount() {
// clearInterval(this.timer)
},
methods: { methods: {
vehicleType2ChangeHandle() { vehicleType2ChangeHandle() {
if (this.workFormEntity.vehicleType2 == '间接物料') { this.displayGoods = this.workFormEntity.vehicleType2 === '间接物料';
this.displayGoods = true
} else {
this.displayGoods = false
}
}, },
resetForms() { resetForms() {
this.workFormEntity = reactive({ this.workFormEntity = reactive({
@ -156,7 +143,7 @@ export default {
}) })
}, },
confirmTask() { confirmTask() {
if (this.workFormEntity.vehicleType2 == '') { if (this.workFormEntity.vehicleType2 === '') {
errorBox('请选择物料种类') errorBox('请选择物料种类')
return return
} }
@ -173,7 +160,7 @@ export default {
} }
callEmptyVehicle(request).then(res => { callEmptyVehicle(request).then(res => {
const response = res.data const response = res.data
if (response.code == 0) { if (response.code === 0) {
ElMessage.success(response.message) ElMessage.success(response.message)
this.resetForms() this.resetForms()
} else { } else {

View File

@ -5,6 +5,8 @@
<el-row> <el-row>
<el-input v-model="goodsIdQuery" style="width: 158px; margin-right: 10px;" placeholder="料号" <el-input v-model="goodsIdQuery" style="width: 158px; margin-right: 10px;" placeholder="料号"
:suffix-icon="Search"/> :suffix-icon="Search"/>
<el-select-v2 v-model="vehicleTypeQuery" style="width: 158px; margin-right: 10px;"
placeholder="物料类型" :options="vehicleTypeOptions" @change="search()"></el-select-v2>
<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="warning" style="width: 201px; background-color: red; color: #000;" @click="setIndirect()">一键设置间接物料相关信息</el-button> --> <!-- <el-button type="warning" style="width: 201px; background-color: red; color: #000;" @click="setIndirect()">一键设置间接物料相关信息</el-button> -->
@ -248,6 +250,7 @@ export default {
pageSize: 10, pageSize: 10,
total: 0, total: 0,
goodsIdQuery: '', goodsIdQuery: '',
vehicleTypeQuery: '',
loading: true, loading: true,
dialogVisible: false, dialogVisible: false,
uploadDialogVisible: false, uploadDialogVisible: false,
@ -255,7 +258,21 @@ export default {
goodsFormEntity: reactive({}), goodsFormEntity: reactive({}),
labelPosition: 'top', labelPosition: 'top',
goodsFormRef: ref(), goodsFormRef: ref(),
rules: reactive({}) rules: reactive({}),
vehicleTypeOptions: [
{
value: "",
label: '全部'
},
{
value: "直接物料",
label: '直接物料'
},
{
value: "间接物料",
label: '间接物料'
}
],
} }
}, },
mounted() { mounted() {
@ -282,6 +299,7 @@ export default {
pageNo: this.currentPage, pageNo: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
goodsId: this.goodsIdQuery.trim(), goodsId: this.goodsIdQuery.trim(),
goodsType: this.vehicleTypeQuery.trim(),
userName: store.getters.getUserName userName: store.getters.getUserName
} }
getGoodsInfoByPage(request).then(res => { getGoodsInfoByPage(request).then(res => {

View File

@ -9,12 +9,15 @@
:suffix-icon="Search"/> :suffix-icon="Search"/>
<el-input v-model="smallBoxQuery" style="width: 256px; margin-right: 10px;" placeholder="小工位" <el-input v-model="smallBoxQuery" style="width: 256px; margin-right: 10px;" placeholder="小工位"
:suffix-icon="Search"/> :suffix-icon="Search"/>
<el-date-picker v-model="planStartDateQuery" 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>
<el-row> <el-row>
<el-button style="background-color: #00CED1; color: #000;" <el-button style="background-color: #00CED1; color: #000;"
@click="openUploadDialog()">导入</el-button> @click="openUploadDialog()">导入
</el-button>
</el-row> </el-row>
</div> </div>
<br/> <br/>
@ -28,22 +31,28 @@
</el-table-column> </el-table-column>
<el-table-column prop="orderId" label="id" fixed="left" min-width="120px" show-overflow-tooltip/> <el-table-column prop="orderId" label="id" fixed="left" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="workOrder" label="工单" fixed="left" min-width="120px" show-overflow-tooltip/> <el-table-column prop="workOrder" label="工单" fixed="left" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="goodsId" label="料号" min-width="120px" /> <el-table-column prop="goodsId" label="料号" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="supplyArea" label="小工位" fixed="left" min-width="120px" /> <el-table-column prop="supplyArea" label="小工位" fixed="left" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="item" label="Item" min-width="120px" /> <el-table-column prop="item" label="Item" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="description" label="描述" min-width="120px" show-overflow-tooltip/> <el-table-column prop="description" label="描述" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="sLoc" label="SLoc" min-width="120px" /> <el-table-column prop="sLoc" label="SLoc" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="type" label="Type" min-width="120px" /> <el-table-column prop="type" label="Type" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="originStatus" label="Status" min-width="120px" /> <el-table-column prop="originStatus" label="Status" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="sortString" label="SortStrng" min-width="120px" /> <el-table-column prop="sortString" label="SortStrng" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="requirementQuantity" label="需求数量" sortable min-width="120px" /> <el-table-column prop="requirementQuantity" label="需求数量" sortable min-width="120px" show-overflow-tooltip/>
<el-table-column prop="goodsUnit" label="单位" min-width="120px" /> <el-table-column prop="goodsUnit" label="单位" min-width="120px" show-overflow-tooltip/>
<el-table-column v-if="isAddReqmtDate" prop="planStartDate" label="开工时间" min-width="120px" /> <el-table-column prop="planStartDate" label="开工时间" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="orderStatus" label="状态" min-width="120px" /> <el-table-column prop="orderStatus" label="状态" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="lackQuantity" label="缺少数量" min-width="120px" /> <el-table-column prop="lackQuantity" label="缺少数量" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="pickedQuantity" label="已拣数量" min-width="120px" /> <el-table-column prop="pickedQuantity" label="已拣数量" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="finishTime" label="计划完成时间" :formatter="timeFormat" min-width="120px" show-overflow-tooltip /> <el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px"
<el-table-column prop="userName" 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="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px"
show-overflow-tooltip/>
<el-table-column prop="userName" label="操作人员" min-width="120px" show-overflow-tooltip/>
<el-table-column prop="lastUpdateReason" label="来源" min-width="120px" show-overflow-tooltip/>
<el-table-column fixed="right" label="操作" width="240px"> <el-table-column fixed="right" label="操作" width="240px">
<template v-slot="scope"> <template v-slot="scope">
<el-button plain type="primary" @click="editCurrentRowOrders(scope.row)">编辑</el-button> <el-button plain type="primary" @click="editCurrentRowOrders(scope.row)">编辑</el-button>
@ -103,17 +112,19 @@
<el-col :span="12" :offset="0"> <el-col :span="12" :offset="0">
<el-form-item label="缺少数量" prop="lackQuantity"> <el-form-item label="缺少数量" prop="lackQuantity">
<el-input-number v-model.number="ordersFormEntity.lackQuantity" <el-input-number v-model.number="ordersFormEntity.lackQuantity"
controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity" clearable /> controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity"
clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="已拣数量" prop="pickedQuantity"> <el-form-item label="已拣数量" prop="pickedQuantity">
<el-input-number v-model.number="ordersFormEntity.pickedQuantity" <el-input-number v-model.number="ordersFormEntity.pickedQuantity"
controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity" clearable /> controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity"
clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="isAddReqmtDate" :gutter="16"> <el-row :gutter="16">
<el-col :span="12" :offset="0"> <el-col :span="12" :offset="0">
<el-form-item label="计划开工时间" prop="planStartDate"> <el-form-item label="计划开工时间" prop="planStartDate">
<el-date-picker <el-date-picker
@ -205,7 +216,21 @@ export default {
labelPosition: 'top', labelPosition: 'top',
ordersFormRef: ref(), ordersFormRef: ref(),
rules: reactive({}), rules: reactive({}),
isAddReqmtDate: false shortcuts: [
{
text: '今天',
value: new Date(),
},
{
text: '昨天',
value: () => {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24)
return date
},
},
],
planStartDateQuery: null
} }
}, },
mounted() { mounted() {
@ -220,6 +245,7 @@ export default {
workOrder: this.workOrderQuery.trim(), workOrder: this.workOrderQuery.trim(),
goodsId: this.goodsIdQuery.trim(), goodsId: this.goodsIdQuery.trim(),
supplyArea: this.smallBoxQuery.trim(), supplyArea: this.smallBoxQuery.trim(),
planStartDate: dateFormatter(this.planStartDateQuery),
userName: store.getters.getUserName userName: store.getters.getUserName
} }
getOrders(request).then(res => { getOrders(request).then(res => {

View File

@ -5,6 +5,8 @@
<el-row> <el-row>
<el-input v-model="queryKey" style="width: 158px; margin-right: 10px;" placeholder="箱号" <el-input v-model="queryKey" style="width: 158px; margin-right: 10px;" placeholder="箱号"
:suffix-icon="Search"/> :suffix-icon="Search"/>
<el-input v-model="goodsIdQuery" style="width: 158px; margin-right: 10px;" placeholder="料号"
:suffix-icon="Search"/>
<el-input v-model="locationQuery" style="width: 158px; margin-right: 10px;" placeholder="位置" <el-input v-model="locationQuery" style="width: 158px; margin-right: 10px;" placeholder="位置"
:suffix-icon="Search"/> :suffix-icon="Search"/>
<el-select-v2 v-model="isEmptyQuery" style="width: 158px; margin-right: 10px;" placeholder="是否空箱" <el-select-v2 v-model="isEmptyQuery" style="width: 158px; margin-right: 10px;" placeholder="是否空箱"
@ -36,7 +38,7 @@
min-width="120px"/> min-width="120px"/>
<el-table-column prop="vehicleType" label="物料类型" fixed="left" :formatter="vehicleTypeFormat" <el-table-column prop="vehicleType" label="物料类型" fixed="left" :formatter="vehicleTypeFormat"
min-width="120px" show-overflow-tooltip/> min-width="120px" show-overflow-tooltip/>
<el-table-column prop="details" label="绑定关系" :formatter="jsonFormat" min-width="180px" <el-table-column prop="goodsInfo" label="绑定关系" :formatter="jsonFormat" min-width="180px"
show-overflow-tooltip/> show-overflow-tooltip/>
<el-table-column fixed="right" label="操作" width="120px" v-if="selVehicle == null"> <el-table-column fixed="right" label="操作" width="120px" v-if="selVehicle == null">
<template v-slot="scope"> <template v-slot="scope">
@ -86,8 +88,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="绑定关系" prop="details"> <el-form-item label="绑定关系" prop="goodsInfo">
<el-input type="textarea" :rows="2" v-model="vehicleFormEntity.details" placeholder="" <el-input type="textarea" :rows="2" v-model="vehicleFormEntity.goodsInfo" placeholder=""
:maxlength="-1" :show-word-limit="false" :autosize="{ minRows: 2, maxRows: 4 }"> :maxlength="-1" :show-word-limit="false" :autosize="{ minRows: 2, maxRows: 4 }">
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -114,7 +116,13 @@ import { errorBox } from '@/utils/myMessageBox.js'
import {ElMessage} from 'element-plus' import {ElMessage} from 'element-plus'
import {Search} from '@element-plus/icons-vue' import {Search} from '@element-plus/icons-vue'
import {ref, reactive} from 'vue' import {ref, reactive} from 'vue'
import { vehicleStatusFormatter, locationFormatter, dateFormatter, timeFormatter, jsonFormatter } from '@/utils/formatter.js' import {
vehicleStatusFormatter,
locationFormatter,
dateFormatter,
timeFormatter,
jsonFormatter
} from '@/utils/formatter.js'
import {toUnderScoreCase} from '@/utils/stringUtils.js' import {toUnderScoreCase} from '@/utils/stringUtils.js'
// import uploadVehicles from '@/excel/uploadVehicles.vue' // import uploadVehicles from '@/excel/uploadVehicles.vue'
import {downloadVehicleExcel} from '@/api/excel.js' import {downloadVehicleExcel} from '@/api/excel.js'
@ -135,6 +143,7 @@ export default {
isAsc: true, isAsc: true,
queryKey: '', queryKey: '',
locationQuery: '', locationQuery: '',
goodsIdQuery: '',
isEmptyQuery: -99, isEmptyQuery: -99,
vehicleTypeQuery: '', vehicleTypeQuery: '',
loading: true, loading: true,
@ -215,6 +224,7 @@ export default {
vehicleId: this.queryKey.trim(), vehicleId: this.queryKey.trim(),
currentLocation: this.locationQuery.trim(), currentLocation: this.locationQuery.trim(),
vehicleType: this.vehicleTypeQuery.trim(), vehicleType: this.vehicleTypeQuery.trim(),
goodsId: this.goodsIdQuery.trim(),
isEmpty: this.isEmptyQuery == -99 ? null : this.isEmptyQuery, isEmpty: this.isEmptyQuery == -99 ? null : this.isEmptyQuery,
userName: store.getters.getUserName userName: store.getters.getUserName
} }
@ -262,6 +272,7 @@ export default {
} }
}, },
jsonFormat: (row, column, cellValue, index) => { jsonFormat: (row, column, cellValue, index) => {
console.log(cellValue)
return jsonFormatter(cellValue) return jsonFormatter(cellValue)
}, },
reset() { reset() {
@ -276,7 +287,7 @@ export default {
isEmpty: row.isEmpty, isEmpty: row.isEmpty,
vehicleStatus: row.vehicleStatus, vehicleStatus: row.vehicleStatus,
vehicleType: row.vehicleType == "间接物料" ? "间接物料" : "直接物料", vehicleType: row.vehicleType == "间接物料" ? "间接物料" : "直接物料",
details: jsonFormatter(row.details), goodsInfo: jsonFormatter(row.goodsInfo),
lastInTime: row.lastInTime lastInTime: row.lastInTime
} }
this.dialogVisible = true this.dialogVisible = true
@ -288,7 +299,7 @@ export default {
isEmpty: formData.isEmpty, isEmpty: formData.isEmpty,
vehicleStatus: formData.vehicleStatus, vehicleStatus: formData.vehicleStatus,
vehicleType: formData.vehicleType, vehicleType: formData.vehicleType,
details: formData.details, goodsInfo: formData.goodsInfo,
lastInTime: formData.lastInTime, lastInTime: formData.lastInTime,
userName: store.getters.getUserName userName: store.getters.getUserName
} }