修改了工作方式,界面增加字段的查询
This commit is contained in:
parent
2d12eac2ed
commit
902964a2cf
|
|
@ -2,8 +2,8 @@
|
|||
<div style="margin-bottom: 10px">
|
||||
<el-config-provider :locale="zhCn">
|
||||
<el-row>
|
||||
<el-input v-model="goodsIdQuery" style="width: 196px; margin-right: 10px;" placeholder="料号" />
|
||||
<el-input v-model="vehicleIdQuery" style="width: 196px; margin-right: 10px;" placeholder="箱号" />
|
||||
<el-input v-model="goodsIdQuery" style="width: 196px; margin-right: 10px;" placeholder="料号"/>
|
||||
<el-input v-model="vehicleIdQuery" style="width: 196px; margin-right: 10px;" placeholder="箱号"/>
|
||||
<el-select-v2 v-model="taskTypeQuery" style="width: 196px; margin-right: 10px;" placeholder="请选择任务类型"
|
||||
:options="taskTypeOptions" @change="search()"></el-select-v2>
|
||||
<el-select-v2 v-model="taskStatusQuery" style="width: 196px; margin-right: 10px;" placeholder="请选择任务状态"
|
||||
|
|
@ -11,75 +11,79 @@
|
|||
<el-button type="primary" @click="search()">搜索</el-button>
|
||||
<el-button type="warning" @click="reset()">重置</el-button>
|
||||
</el-row>
|
||||
<br />
|
||||
<br/>
|
||||
<el-table :data="tasks" stripe border v-loading="loading" style="width: 100%" max-height="684px"
|
||||
class="table-class" :header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }"
|
||||
class="table-class" :header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }"
|
||||
@row-click="getCurrentRow">
|
||||
<el-table-column width="65px" fixed="left">
|
||||
<template v-slot="scope">
|
||||
<el-radio :label="scope.row.taskId" v-model="taskId"> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="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.goodsName" label="料名" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="taskGroup" label="任务组" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="origin" label="起点" min-width="120px" />
|
||||
<el-table-column prop="destination" label="终点" min-width="120px" />
|
||||
<el-table-column prop="goodsRelated.opNum" 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="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="dueFormat" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="userName" label="操作人员姓名" 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="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.goodsName" label="料名" min-width="120px" show-overflow-tooltip/>
|
||||
<el-table-column prop="taskGroup" label="任务组" min-width="120px" show-overflow-tooltip/>
|
||||
<el-table-column prop="origin" label="起点" min-width="120px"/>
|
||||
<el-table-column prop="destination" label="终点" min-width="120px"/>
|
||||
<el-table-column prop="goodsRelated.opNum" 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="preTask" label="前置任务" min-width="120px" show-overflow-tooltip/>
|
||||
<el-table-column prop="pickStand" 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="dueFormat" min-width="120px"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="userName" label="操作人员姓名" min-width="120px"/>
|
||||
<el-table-column prop="taskStatus" label="任务状态" fixed="right" :formatter="taskStatusFormat"
|
||||
min-width="120px" show-overflow-tooltip />
|
||||
min-width="120px" show-overflow-tooltip/>
|
||||
<el-table-column fixed="right" label="操作" width="120px">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="primary" @click="editCurrentRowTask(scope.row)">编辑</el-button>
|
||||
</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">
|
||||
<el-form ref="taskFormRef" :model="taskFormEntity" :label-position="labelPosition" label-width="100px"
|
||||
style="max-width: 100%" :rules="rules" status-icon>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="任务号" prop="taskId">
|
||||
<el-input v-model="taskFormEntity.taskId" disabled />
|
||||
<el-input v-model="taskFormEntity.taskId" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="任务优先级" prop="taskPriority">
|
||||
<el-input-number v-model.number="taskFormEntity.taskPriority" controls-position="right"
|
||||
:min="1" :max="9" disabled />
|
||||
:min="1" :max="9" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="料箱号" prop="vehicleId">
|
||||
<el-input v-model="taskFormEntity.vehicleId" disabled />
|
||||
<el-input v-model="taskFormEntity.vehicleId" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="料号" prop="goodsId">
|
||||
<el-input v-model="taskFormEntity.goodsId" disabled />
|
||||
<el-input v-model="taskFormEntity.goodsId" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="起点" prop="origin">
|
||||
<el-input v-model="taskFormEntity.origin" disabled />
|
||||
<el-input v-model="taskFormEntity.origin" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12" v-if="taskFormEntity.taskType == 1">
|
||||
|
|
@ -95,7 +99,7 @@
|
|||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="终点" prop="destination">
|
||||
<el-input v-model="taskFormEntity.destination" disabled />
|
||||
<el-input v-model="taskFormEntity.destination" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -128,13 +132,13 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getTasksByPage, updateTaskInfo } from '@/api/task.js'
|
||||
import { dateFormatter, taskStatusFormatter, timeFormatter, dueFormatter } from '@/utils/formatter.js'
|
||||
import {getTasksByPage, updateTaskInfo} from '@/api/task.js'
|
||||
import {dateFormatter, taskStatusFormatter, timeFormatter, dueFormatter} from '@/utils/formatter.js'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import { errorBox } from '@/utils/myMessageBox.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import {errorBox} from '@/utils/myMessageBox.js'
|
||||
import {ElMessage} from 'element-plus'
|
||||
import store from '@/store'
|
||||
import { ref, reactive } from 'vue'
|
||||
import {ref, reactive} from 'vue'
|
||||
</script>
|
||||
<script>
|
||||
export default {
|
||||
|
|
@ -242,11 +246,16 @@ export default {
|
|||
},
|
||||
taskTypeFormat: (row, column, cellValue, index) => {
|
||||
switch (cellValue) {
|
||||
case 1: return '入库'
|
||||
case 2: return '出库'
|
||||
case 3: return '盘点'
|
||||
case 9: return '移库'
|
||||
default: return '未知'
|
||||
case 1:
|
||||
return '入库'
|
||||
case 2:
|
||||
return '出库'
|
||||
case 3:
|
||||
return '盘点'
|
||||
case 9:
|
||||
return '移库'
|
||||
default:
|
||||
return '未知'
|
||||
}
|
||||
},
|
||||
dueFormat: (row, column, cellValue, index) => {
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
<el-table-column prop="goodsId" label="料号" min-width="120px" show-overflow-tooltip/>
|
||||
<el-table-column prop="needNum" label="需求数量" min-width="120px"/>
|
||||
<el-table-column prop="pickedNum" label="已拣数量" min-width="120px"/>
|
||||
<el-table-column prop="distributedNum" label="已分配数量" min-width="120px"/>
|
||||
<el-table-column prop="lightStatus" label="亮灯状态" :formatter="lightStatusFormat" min-width="120px"/>
|
||||
<el-table-column prop="workStatus" label="工作状态" :formatter="workStatusFormat" min-width="120px"/>
|
||||
<el-table-column prop="machineType" label="机型" :formatter="machineTypeFormat" min-width="120px"/>
|
||||
|
|
@ -52,7 +53,7 @@
|
|||
show-overflow-tooltip/>
|
||||
<el-table-column prop="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="opUser" label="操作用户" min-width="120px"/>
|
||||
<el-table-column prop="opUser" label="操作用户" min-width="120px" show-overflow-tooltip/>
|
||||
<el-table-column fixed="right" label="操作" width="120px">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
||||
|
|
@ -152,6 +153,13 @@
|
|||
<el-input v-model="workFlowFormEntity.opUser" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="已分配数量" prop="distributedNum">
|
||||
<el-input-number v-model.number="workFlowFormEntity.distributedNum"
|
||||
controls-position="right" :min="0" :max="workFlowFormEntity.needNum"
|
||||
clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
|
@ -344,6 +352,8 @@ export default {
|
|||
},
|
||||
workStatusFormat: (row, column, cellValue, index) => {
|
||||
switch (cellValue) {
|
||||
case -1:
|
||||
return '暂存'
|
||||
case 0:
|
||||
return '未开始'
|
||||
case 1:
|
||||
|
|
@ -382,6 +392,7 @@ export default {
|
|||
goodsId: row.goodsId,
|
||||
pickedNum: row.pickedNum,
|
||||
needNum: row.needNum,
|
||||
distributedNum: row.distributedNum,
|
||||
lightStatus: row.lightStatus,
|
||||
workStatus: row.workStatus,
|
||||
createTime: row.createTime,
|
||||
|
|
@ -394,6 +405,7 @@ export default {
|
|||
const params = {
|
||||
workFlowId: formData.workFlowId,
|
||||
pickedNum: formData.pickedNum,
|
||||
distributedNum: formData.distributedNum,
|
||||
lightStatus: formData.lightStatus,
|
||||
workStatus: formData.workStatus,
|
||||
userName: store.getters.getUserName
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getUser, loginWithAuth, loginWithoutAuth } from '@/api/login.js'
|
||||
import { postToGetToken } from "@/api/kateLogin.js";
|
||||
import { ElMessage, ElLoading } from 'element-plus'
|
||||
import { reactive, onMounted } from 'vue';
|
||||
import {getUser, loginWithAuth, loginWithoutAuth} from '@/api/login.js'
|
||||
import {postToGetToken} from "@/api/kateLogin.js";
|
||||
import {ElMessage, ElLoading} from 'element-plus'
|
||||
import {reactive, onMounted} from 'vue';
|
||||
import store from '@/store'
|
||||
import router from '@/router'
|
||||
import crypto from 'crypto'
|
||||
|
|
@ -35,12 +35,14 @@ function base64URLEncode(str) {
|
|||
.replace(/\//g, '_')
|
||||
.replace(/=/g, '');
|
||||
}
|
||||
|
||||
var verifier = base64URLEncode(crypto.randomBytes(32));
|
||||
// Dependency: Node.js crypto module
|
||||
// https://nodejs.org/api/crypto.html#crypto_crypto
|
||||
function sha256(buffer) {
|
||||
return crypto.createHash('sha256').update(buffer).digest();
|
||||
}
|
||||
|
||||
var challenge = base64URLEncode(sha256(verifier));
|
||||
|
||||
const loginForm = reactive({
|
||||
|
|
@ -78,7 +80,7 @@ const login = () => {
|
|||
store.commit('mutationMenu', res.data.returnData.menuList)// 菜单信息
|
||||
store.commit('mutationStandId', res.data.returnData.standId)
|
||||
// router.replace({ path: '/' })// 直接跳转到主页
|
||||
router.replace({ path: '/systemCenter' })// 跳转到系统选择的界面
|
||||
router.replace({path: '/systemCenter'})// 跳转到系统选择的界面
|
||||
} else {
|
||||
ElMessage.error(res.data.message)
|
||||
}
|
||||
|
|
@ -97,13 +99,17 @@ const loginCate = () => {
|
|||
// window.open(cateLoginUrl)// 不打开新窗口
|
||||
}
|
||||
onMounted(() => {
|
||||
if (router.currentRoute.value.query.code !== undefined) {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const code = urlParams.get('code');
|
||||
console.log(code); // 输出 ?code= 后面的值
|
||||
if (code !== undefined && code !== null && code !== '') {
|
||||
console.log('跳转并尝试登录。code:' + code)
|
||||
loading.open('请求登录中...')
|
||||
const tokenParam = {
|
||||
code_verifier: store.getters.getVerify,
|
||||
client_id: '609f8296-74ab-441e-904f-3a8508030511',
|
||||
client_id: 'f921b5f5-ba70-4bcb-8a4b-f3c7d90ec84e',
|
||||
// scope: 'openid',
|
||||
code: router.currentRoute.value.query.code,
|
||||
code: code,
|
||||
redirect_uri: 'https://csclasrs.ecorp.cat.com/wms',
|
||||
grant_type: 'authorization_code',
|
||||
// client_secret: 'o6h8Q~iLegnIBG.GzJngXk.03FYdBJzIoCtTtcwj',
|
||||
|
|
@ -121,7 +127,7 @@ onMounted(() => {
|
|||
store.commit('mutationUser', res.data.returnData.user)// 用户信息
|
||||
store.commit('mutationMenu', res.data.returnData.menuList)// 菜单信息
|
||||
store.commit('mutationStandId', res.data.returnData.standId)
|
||||
router.replace({ path: '/systemCenter' })
|
||||
router.replace({path: '/systemCenter'})
|
||||
} else {
|
||||
ElMessage.error(res.data.message)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user