优化页面使用
This commit is contained in:
@@ -41,21 +41,20 @@
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item label="开始时间" prop="startTime"> <!-- 开始时间 -->
|
||||
<el-form-item label="起始时间" prop="dateStart">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.startTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择开始时间">
|
||||
v-model="queryParams.dateStart"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择起始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="结束时间" prop="finishTime"> <!-- 结束时间 -->
|
||||
<el-form-item label="结束日期" prop="dateEnd">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.finishTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择结束时间">
|
||||
v-model="queryParams.dateEnd"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
@@ -101,12 +100,23 @@
|
||||
v-hasPermi="['job:outmydoJob:OuthandInvalidation']"
|
||||
>手动作废</el-button> <!-- 手动作废 -->
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="openPriorityDialog"
|
||||
>修改优先级</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="mydoJobList" @selection-change="handleSelectionChange" @row-click="handleRowClick" highlight-current-row :current-row="currentRow" max-height="400">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="任务ID" align="left" prop="jobId" /> <!-- 任务ID -->
|
||||
<el-table-column label="任务ID" align="left" prop="jobId" width="160"/> <!-- 任务ID -->
|
||||
<el-table-column label="任务状态" align="left" prop="status"> <!-- 任务状态 -->
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.mydo_job_status" :value="scope.row.status"/>
|
||||
@@ -125,10 +135,10 @@
|
||||
<el-table-column label="任务号" align="left" prop="taskNo" /> <!-- 任务号 -->
|
||||
<!-- <el-table-column :label="$t('outJobManagement.customerId')" align="left" prop="customerId" /> <!– 客户ID –>-->
|
||||
<el-table-column label="托盘码" align="left" prop="trayCode" /> <!-- 托盘码 -->
|
||||
<!-- <el-table-column :label="$t('outJobManagement.roadwayId')" align="left" prop="roadwayId" /> <!– 巷道ID –>-->
|
||||
<el-table-column label="巷道" align="left" prop="roadwayId" /> <!-- 巷道ID -->
|
||||
<el-table-column label="货位" align="left" prop="cargoSpaceName" /> <!-- 货位ID -->
|
||||
<!-- <el-table-column label="订单号" align="left" prop="lineId" /> <!– 结束时间 –>-->
|
||||
<!-- <el-table-column label="优先级" align="left" prop="priority" /> <!– 优先级 –>-->
|
||||
<el-table-column label="优先级" align="left" prop="priority" /> <!-- 优先级 -->
|
||||
<!-- <el-table-column label="执行阶段" align="left" prop="executionPhase"> <!– 执行阶段 –>-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/>-->
|
||||
@@ -136,10 +146,14 @@
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column label="仓库" align="left" prop="warehouseName" />
|
||||
<el-table-column label="出口" align="left" prop="exitId"/> <!-- 出口ID -->
|
||||
<el-table-column label="创建时间" align="left" prop="createTime" width="180"/> <!-- 创建时间 -->
|
||||
<el-table-column label="开始时间" align="left" prop="startTime" width="180"/> <!-- 开始时间 -->
|
||||
<el-table-column label="结束时间" align="left" prop="finishTime" width="180"/> <!-- 结束时间 -->
|
||||
<el-table-column label="出口" align="left" prop="exitId">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.exit_type" :value="scope.row.exitId"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="left" prop="createTime" width="160"/> <!-- 创建时间 -->
|
||||
<el-table-column label="开始时间" align="left" prop="startTime" width="160"/> <!-- 开始时间 -->
|
||||
<el-table-column label="结束时间" align="left" prop="finishTime" width="160"/> <!-- 结束时间 -->
|
||||
<!-- <el-table-column :label="$t('outJobManagement.warehouseId')" align="left" prop="warehouseId" /> <!– 仓库ID –>-->
|
||||
<!-- <el-table-column label="仓库ID" align="left" prop="warehouseName" /> <!– 仓库ID –>-->
|
||||
</el-table>
|
||||
@@ -203,17 +217,32 @@
|
||||
:limit.sync="queryDetailParams.pageSize"
|
||||
@pagination="getDetailList"
|
||||
/>
|
||||
|
||||
<el-dialog title="修改优先级" :visible.sync="priorityDialogVisible" width="400px" append-to-body>
|
||||
<el-form ref="priorityFormRef" :model="priorityForm" :rules="priorityRules" label-width="100px">
|
||||
<el-form-item label="优先级" prop="priority">
|
||||
<el-input-number v-model="priorityForm.priority" :min="1" :max="9999" :step="1" controls-position="right" />
|
||||
<el-tooltip content="数字越大,优先级越高" placement="top" effect="light">
|
||||
<i class="el-icon-question" style="margin-left: 10px; color: #909399;"></i>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitPriority">确 定</el-button>
|
||||
<el-button @click="cancelPriority">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMydoJobOut,handFinish,hangInvalidJob } from "@/api/job/OutmydoJob"
|
||||
import { listMydoJobOut,handFinish,hangInvalidJob,updateOutJobPriority } from "@/api/job/OutmydoJob"
|
||||
import { listMydoJobDetail } from "@/api/job/mydoJobDetail"
|
||||
import {listWarehouse} from "@/api/bas/warehouse";
|
||||
|
||||
export default {
|
||||
name: "MydoJob",
|
||||
dicts: ['execution_phase_type', 'in_job_type', 'on_line_type', 'mydo_job_status','out_job_type','product_type','origin_type','account_type','turnover_type','purpose_type','quality_type'],
|
||||
dicts: ['execution_phase_type', 'in_job_type', 'on_line_type', 'mydo_job_status','out_job_type','exit_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
@@ -271,6 +300,8 @@ export default {
|
||||
classId: null,
|
||||
warehouseId: null,
|
||||
faultFlag: null,
|
||||
dateStart: null,
|
||||
dateEnd: null,
|
||||
inOut:'2'
|
||||
},
|
||||
queryDetailParams:{
|
||||
@@ -291,6 +322,15 @@ export default {
|
||||
taskNo: [
|
||||
{ required: true, message: "任务号不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
priorityDialogVisible: false,
|
||||
priorityForm: {
|
||||
priority: null
|
||||
},
|
||||
priorityRules: {
|
||||
priority: [
|
||||
{ required: true, message: "请输入优先级", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -453,6 +493,37 @@ export default {
|
||||
this.$modal.msgSuccess("手动作废成功");
|
||||
this.getList();
|
||||
}).catch(() => {});
|
||||
},
|
||||
openPriorityDialog() {
|
||||
if (this.ids.length === 0) {
|
||||
this.$modal.msgError("请选择需要修改优先级的任务");
|
||||
return;
|
||||
}
|
||||
if (this.ids.length > 1){
|
||||
this.$modal.msgError("只能选择一个任务");
|
||||
return;
|
||||
}
|
||||
const current = this.mydoJobList.find(item => item.jobId === this.ids[0])
|
||||
this.priorityForm.priority = current ? current.priority : null
|
||||
this.priorityDialogVisible = true
|
||||
},
|
||||
submitPriority() {
|
||||
this.$refs["priorityFormRef"].validate(valid => {
|
||||
if (!valid) return
|
||||
const data = {
|
||||
jobId: this.ids[0],
|
||||
priority: this.priorityForm.priority
|
||||
}
|
||||
updateOutJobPriority(data).then(() => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.priorityDialogVisible = false
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
},
|
||||
cancelPriority() {
|
||||
this.priorityDialogVisible = false
|
||||
this.priorityForm.priority = null
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user