Compare commits
No commits in common. "902964a2cffea831912e32a81d48cd32542d75f3" and "a698ec0e840859921e1a077d208eda689bb42635" have entirely different histories.
902964a2cf
...
a698ec0e84
|
|
@ -188,15 +188,6 @@ const downloadWorkSummaryExcel = (data) => {
|
||||||
timeout: 600000
|
timeout: 600000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const downloadWorkFlowExcel = (data) => {
|
|
||||||
return request({
|
|
||||||
url: '/excel/downloadWorkFlowExcel',
|
|
||||||
method: 'post',
|
|
||||||
responseType: 'blob',
|
|
||||||
data: data,
|
|
||||||
timeout: 600000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
uploadExcelStock,
|
uploadExcelStock,
|
||||||
|
|
@ -218,6 +209,5 @@ export {
|
||||||
uploadExcelBaseGoods,
|
uploadExcelBaseGoods,
|
||||||
uploadExcelKanban,
|
uploadExcelKanban,
|
||||||
uploadWorkFlow,
|
uploadWorkFlow,
|
||||||
uploadExcelWorkDate,
|
uploadExcelWorkDate
|
||||||
downloadWorkFlowExcel
|
|
||||||
}
|
}
|
||||||
|
|
@ -68,36 +68,36 @@
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="小盒子" prop="smallBox">
|
<el-form-item label="小盒子" prop="smallBox">
|
||||||
<el-input v-model="configFormEntity.smallBox" />
|
<el-input v-model="configFormEntity.smallBox" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="机型" prop="model">
|
<el-form-item label="机型" prop="model">
|
||||||
<el-input v-model="configFormEntity.model" />
|
<el-input v-model="configFormEntity.model" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="工位" prop="workCenter">
|
<el-form-item label="工位" prop="workCenter">
|
||||||
<el-input v-model="configFormEntity.workCenter" />
|
<el-input v-model="configFormEntity.workCenter" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="工位大盒子" prop="bigBox">
|
<el-form-item label="工位大盒子" prop="bigBox">
|
||||||
<el-input v-model="configFormEntity.bigBox" />
|
<el-input v-model="configFormEntity.bigBox" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="车辆" prop="vehicle">
|
<el-form-item label="车辆" prop="vehicle">
|
||||||
<el-input v-model="configFormEntity.vehicle" />
|
<el-input v-model="configFormEntity.vehicle" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="线边架/车位置" prop="vehicleLocation">
|
<el-form-item label="线边架/车位置" prop="vehicleLocation">
|
||||||
<el-input v-model="configFormEntity.vehicleLocation" />
|
<el-input v-model="configFormEntity.vehicleLocation" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,6 @@
|
||||||
:suffix-icon="Search" />
|
:suffix-icon="Search" />
|
||||||
<el-select-v2 v-model="goodsTypeQuery" style="width: 158px; margin-right: 10px;" placeholder="物料类型"
|
<el-select-v2 v-model="goodsTypeQuery" style="width: 158px; margin-right: 10px;" placeholder="物料类型"
|
||||||
:options="goodsTypeOptions" @change="search()"></el-select-v2>
|
:options="goodsTypeOptions" @change="search()"></el-select-v2>
|
||||||
<el-select-v2 v-model="stockStatusQuery" style="width: 158px; margin-right: 10px;" placeholder="库存状态"
|
|
||||||
:options="stockStatusSearchOptions" @change="search()"></el-select-v2>
|
|
||||||
<el-date-picker v-model="createTimeQuery" type="date" placeholder="选择上架日期" :shortcuts="shortcuts"
|
<el-date-picker v-model="createTimeQuery" type="date" placeholder="选择上架日期" :shortcuts="shortcuts"
|
||||||
style="width: 158px; margin-right: 10px;" clearable />
|
style="width: 158px; margin-right: 10px;" clearable />
|
||||||
<el-button type="primary" @click="search()">搜索</el-button>
|
<el-button type="primary" @click="search()">搜索</el-button>
|
||||||
|
|
@ -224,7 +222,6 @@ export default {
|
||||||
vehicleIdQuery: '',
|
vehicleIdQuery: '',
|
||||||
locationIdQuery: '',
|
locationIdQuery: '',
|
||||||
goodsTypeQuery: '',
|
goodsTypeQuery: '',
|
||||||
stockStatusQuery: -99,
|
|
||||||
createTimeQuery: null,
|
createTimeQuery: null,
|
||||||
shortcuts: [
|
shortcuts: [
|
||||||
{
|
{
|
||||||
|
|
@ -299,40 +296,6 @@ export default {
|
||||||
label: '库存锁定'
|
label: '库存锁定'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
stockStatusSearchOptions: [
|
|
||||||
{
|
|
||||||
value: -99,
|
|
||||||
label: '全部'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 0,
|
|
||||||
label: '库存正常'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 1,
|
|
||||||
label: '出库中'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 2,
|
|
||||||
label: '盘点中'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 3,
|
|
||||||
label: '移库中'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 4,
|
|
||||||
label: '拣选中'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 5,
|
|
||||||
label: '回库中'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 9,
|
|
||||||
label: '库存锁定'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
goodsList: [],
|
goodsList: [],
|
||||||
goodsTypeOptions: [
|
goodsTypeOptions: [
|
||||||
{
|
{
|
||||||
|
|
@ -464,7 +427,6 @@ export default {
|
||||||
vehicleId: this.vehicleIdQuery.trim(),
|
vehicleId: this.vehicleIdQuery.trim(),
|
||||||
locationId: this.locationIdQuery.trim(),
|
locationId: this.locationIdQuery.trim(),
|
||||||
goodsType: this.goodsTypeQuery.trim(),
|
goodsType: this.goodsTypeQuery.trim(),
|
||||||
stockStatus: this.stockStatusQuery == -99 ? null : this.stockStatusQuery,
|
|
||||||
createTime: timeFormatter(this.createTimeQuery),
|
createTime: timeFormatter(this.createTimeQuery),
|
||||||
userName: store.getters.getUserName
|
userName: store.getters.getUserName
|
||||||
}
|
}
|
||||||
|
|
@ -486,8 +448,6 @@ export default {
|
||||||
this.goodsIdQuery = ''
|
this.goodsIdQuery = ''
|
||||||
this.vehicleIdQuery = ''
|
this.vehicleIdQuery = ''
|
||||||
this.locationIdQuery = ''
|
this.locationIdQuery = ''
|
||||||
this.goodsTypeQuery = ''
|
|
||||||
this.stockStatusQuery = -99
|
|
||||||
this.createTimeQuery = null
|
this.createTimeQuery = null
|
||||||
this.search()
|
this.search()
|
||||||
},
|
},
|
||||||
|
|
@ -501,7 +461,6 @@ export default {
|
||||||
vehicleId: this.vehicleIdQuery.trim(),
|
vehicleId: this.vehicleIdQuery.trim(),
|
||||||
locationId: this.locationIdQuery.trim(),
|
locationId: this.locationIdQuery.trim(),
|
||||||
goodsType: this.goodsTypeQuery.trim(),
|
goodsType: this.goodsTypeQuery.trim(),
|
||||||
stockStatus: this.stockStatusQuery == -99 ? null : this.stockStatusQuery,
|
|
||||||
createTime: timeFormatter(this.createTimeQuery),
|
createTime: timeFormatter(this.createTimeQuery),
|
||||||
userName: store.getters.getUserName
|
userName: store.getters.getUserName
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,388 +1,379 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="margin-bottom: 10px">
|
<div style="margin-bottom: 10px">
|
||||||
<el-config-provider :locale="zhCn">
|
<el-config-provider :locale="zhCn">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-input v-model="goodsIdQuery" 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-input v-model="vehicleIdQuery" style="width: 196px; margin-right: 10px;" placeholder="箱号" />
|
||||||
<el-select-v2 v-model="taskTypeQuery" 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>
|
:options="taskTypeOptions" @change="search()"></el-select-v2>
|
||||||
<el-select-v2 v-model="taskStatusQuery" style="width: 196px; margin-right: 10px;" placeholder="请选择任务状态"
|
<el-select-v2 v-model="taskStatusQuery" style="width: 196px; margin-right: 10px;" placeholder="请选择任务状态"
|
||||||
:options="taskStatusOptions" @change="search()"></el-select-v2>
|
:options="taskStatusOptions" @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-row>
|
</el-row>
|
||||||
<br/>
|
<br />
|
||||||
<el-table :data="tasks" stripe border v-loading="loading" style="width: 100%" max-height="684px"
|
<el-table :data="tasks" stripe border v-loading="loading" style="width: 100%" max-height="684px"
|
||||||
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' }"
|
|
||||||
@row-click="getCurrentRow">
|
@row-click="getCurrentRow">
|
||||||
<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.taskId" v-model="taskId"> </el-radio>
|
<el-radio :label="scope.row.taskId" v-model="taskId"> </el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<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 />
|
||||||
<el-table-column prop="taskGroup" 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="origin" label="起点" min-width="120px" />
|
||||||
<el-table-column prop="destination" 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.opNum" label="操作数量" min-width="120px" />
|
||||||
<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="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="timeFormat" min-width="120px"
|
<el-table-column prop="createTime" label="运行时长" :formatter="dueFormat" min-width="120px" show-overflow-tooltip />
|
||||||
show-overflow-tooltip/>
|
<el-table-column prop="userName" label="操作人员姓名" min-width="120px" />
|
||||||
<el-table-column prop="createTime" label="运行时长" :formatter="dueFormat" min-width="120px"
|
<el-table-column prop="taskStatus" label="任务状态" fixed="right" :formatter="taskStatusFormat"
|
||||||
show-overflow-tooltip/>
|
min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="userName" label="操作人员姓名" min-width="120px"/>
|
<el-table-column fixed="right" label="操作" width="120px">
|
||||||
<el-table-column prop="taskStatus" label="任务状态" fixed="right" :formatter="taskStatusFormat"
|
<template v-slot="scope">
|
||||||
min-width="120px" show-overflow-tooltip/>
|
<el-button plain type="primary" @click="editCurrentRowTask(scope.row)">编辑</el-button>
|
||||||
<el-table-column fixed="right" label="操作" width="120px">
|
</template>
|
||||||
<template v-slot="scope">
|
</el-table-column>
|
||||||
<el-button plain type="primary" @click="editCurrentRowTask(scope.row)">编辑</el-button>
|
</el-table>
|
||||||
</template>
|
<br />
|
||||||
</el-table-column>
|
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
|
||||||
</el-table>
|
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
||||||
<br/>
|
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
||||||
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
|
@current-change="search" />
|
||||||
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
<el-dialog v-model="dialogVisible" title="任务信息" width="40%" draggable :show-close="false">
|
||||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
<el-form ref="taskFormRef" :model="taskFormEntity" :label-position="labelPosition" label-width="100px"
|
||||||
@current-change="search"/>
|
style="max-width: 100%" :rules="rules" status-icon>
|
||||||
<el-dialog v-model="dialogVisible" title="任务信息" width="40%" draggable :show-close="false">
|
<el-row :gutter="16">
|
||||||
<el-form ref="taskFormRef" :model="taskFormEntity" :label-position="labelPosition" label-width="100px"
|
<el-col :span="12" :offset="0">
|
||||||
style="max-width: 100%" :rules="rules" status-icon>
|
<el-form-item label="任务号" prop="taskId">
|
||||||
<el-row :gutter="16">
|
<el-input v-model="taskFormEntity.taskId" disabled />
|
||||||
<el-col :span="12" :offset="0">
|
</el-form-item>
|
||||||
<el-form-item label="任务号" prop="taskId">
|
</el-col>
|
||||||
<el-input v-model="taskFormEntity.taskId" disabled/>
|
<el-col :span="12">
|
||||||
</el-form-item>
|
<el-form-item label="任务优先级" prop="taskPriority">
|
||||||
</el-col>
|
<el-input-number v-model.number="taskFormEntity.taskPriority" controls-position="right"
|
||||||
<el-col :span="12">
|
:min="1" :max="9" disabled />
|
||||||
<el-form-item label="任务优先级" prop="taskPriority">
|
</el-form-item>
|
||||||
<el-input-number v-model.number="taskFormEntity.taskPriority" controls-position="right"
|
</el-col>
|
||||||
:min="1" :max="9" disabled/>
|
</el-row>
|
||||||
</el-form-item>
|
<el-row :gutter="16">
|
||||||
</el-col>
|
<el-col :span="12" :offset="0">
|
||||||
</el-row>
|
<el-form-item label="料箱号" prop="vehicleId">
|
||||||
<el-row :gutter="16">
|
<el-input v-model="taskFormEntity.vehicleId" disabled />
|
||||||
<el-col :span="12" :offset="0">
|
</el-form-item>
|
||||||
<el-form-item label="料箱号" prop="vehicleId">
|
</el-col>
|
||||||
<el-input v-model="taskFormEntity.vehicleId" disabled/>
|
<el-col :span="12">
|
||||||
</el-form-item>
|
<el-form-item label="料号" prop="goodsId">
|
||||||
</el-col>
|
<el-input v-model="taskFormEntity.goodsId" disabled />
|
||||||
<el-col :span="12">
|
</el-form-item>
|
||||||
<el-form-item label="料号" prop="goodsId">
|
</el-col>
|
||||||
<el-input v-model="taskFormEntity.goodsId" disabled/>
|
</el-row>
|
||||||
</el-form-item>
|
<el-row :gutter="16">
|
||||||
</el-col>
|
<el-col :span="12" :offset="0">
|
||||||
</el-row>
|
<el-form-item label="起点" prop="origin">
|
||||||
<el-row :gutter="16">
|
<el-input v-model="taskFormEntity.origin" disabled />
|
||||||
<el-col :span="12" :offset="0">
|
</el-form-item>
|
||||||
<el-form-item label="起点" prop="origin">
|
</el-col>
|
||||||
<el-input v-model="taskFormEntity.origin" disabled/>
|
<!-- <el-col :span="12" v-if="taskFormEntity.taskType == 1">
|
||||||
</el-form-item>
|
<el-form-item label="终点" prop="destination">
|
||||||
</el-col>
|
<el-select-v2 v-model="taskFormEntity.destination"
|
||||||
<!-- <el-col :span="12" v-if="taskFormEntity.taskType == 1">
|
:options="availableLocationOptions"></el-select-v2>
|
||||||
<el-form-item label="终点" prop="destination">
|
</el-form-item>
|
||||||
<el-select-v2 v-model="taskFormEntity.destination"
|
</el-col>
|
||||||
:options="availableLocationOptions"></el-select-v2>
|
<el-col :span="12" v-if="taskFormEntity.taskType == 2">
|
||||||
</el-form-item>
|
<el-form-item label="终点" prop="destination">
|
||||||
</el-col>
|
<el-input v-model="taskFormEntity.destination" disabled />
|
||||||
<el-col :span="12" v-if="taskFormEntity.taskType == 2">
|
</el-form-item>
|
||||||
<el-form-item label="终点" prop="destination">
|
</el-col> -->
|
||||||
<el-input v-model="taskFormEntity.destination" disabled />
|
<el-col :span="12">
|
||||||
</el-form-item>
|
<el-form-item label="终点" prop="destination">
|
||||||
</el-col> -->
|
<el-input v-model="taskFormEntity.destination" disabled />
|
||||||
<el-col :span="12">
|
</el-form-item>
|
||||||
<el-form-item label="终点" prop="destination">
|
</el-col>
|
||||||
<el-input v-model="taskFormEntity.destination" disabled/>
|
</el-row>
|
||||||
</el-form-item>
|
<el-row :gutter="16">
|
||||||
</el-col>
|
<el-col :span="12" :offset="0">
|
||||||
</el-row>
|
<el-form-item label="任务类型" prop="taskType">
|
||||||
<el-row :gutter="16">
|
<el-select-v2 v-model="taskFormEntity.taskType" placeholder="请选择任务类型" disabled
|
||||||
<el-col :span="12" :offset="0">
|
:options="taskTypeOptions"></el-select-v2>
|
||||||
<el-form-item label="任务类型" prop="taskType">
|
</el-form-item>
|
||||||
<el-select-v2 v-model="taskFormEntity.taskType" placeholder="请选择任务类型" disabled
|
</el-col>
|
||||||
:options="taskTypeOptions"></el-select-v2>
|
<el-col :span="12">
|
||||||
</el-form-item>
|
<el-form-item label="任务状态" prop="taskStatus">
|
||||||
</el-col>
|
<el-select-v2 v-model="taskFormEntity.taskStatus" placeholder="请选择任务状态"
|
||||||
<el-col :span="12">
|
:options="taskStatusOptions"></el-select-v2>
|
||||||
<el-form-item label="任务状态" prop="taskStatus">
|
</el-form-item>
|
||||||
<el-select-v2 v-model="taskFormEntity.taskStatus" placeholder="请选择任务状态"
|
</el-col>
|
||||||
:options="taskStatusOptions"></el-select-v2>
|
</el-row>
|
||||||
</el-form-item>
|
</el-form>
|
||||||
</el-col>
|
<template #footer>
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="submitTaskInfo(taskFormEntity)">
|
<el-button type="primary" @click="submitTaskInfo(taskFormEntity)">
|
||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-config-provider>
|
</el-config-provider>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {getTasksByPage, updateTaskInfo} from '@/api/task.js'
|
import { getTasksByPage, updateTaskInfo } from '@/api/task.js'
|
||||||
import {dateFormatter, taskStatusFormatter, timeFormatter, dueFormatter} from '@/utils/formatter.js'
|
import { dateFormatter, taskStatusFormatter, timeFormatter, dueFormatter } from '@/utils/formatter.js'
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
import {errorBox} from '@/utils/myMessageBox.js'
|
import { errorBox } from '@/utils/myMessageBox.js'
|
||||||
import {ElMessage} from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import {ref, reactive} from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'taskMonitor',
|
name: 'taskMonitor',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tasks: [],
|
tasks: [],
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
goodsIdQuery: '',
|
goodsIdQuery: '',
|
||||||
vehicleIdQuery: '',
|
vehicleIdQuery: '',
|
||||||
taskTypeQuery: -99,
|
taskTypeQuery: -99,
|
||||||
taskStatusQuery: -99,
|
taskStatusQuery: -99,
|
||||||
loading: true,
|
loading: true,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
taskFormEntity: reactive({}),
|
taskFormEntity: reactive({}),
|
||||||
labelPosition: 'top',
|
labelPosition: 'top',
|
||||||
taskFormRef: ref(),
|
taskFormRef: ref(),
|
||||||
rules: reactive({}),
|
rules: reactive({}),
|
||||||
taskId: '',
|
taskId: '',
|
||||||
taskTypeOptions: [
|
taskTypeOptions: [
|
||||||
{
|
{
|
||||||
value: -99,
|
value: -99,
|
||||||
label: '所有类型'
|
label: '所有类型'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
label: '入库'
|
label: '入库'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 2,
|
value: 2,
|
||||||
label: '出库'
|
label: '出库'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 3,
|
value: 3,
|
||||||
label: '盘点'
|
label: '盘点'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 9,
|
value: 9,
|
||||||
label: '移库'
|
label: '移库'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
taskStatusOptions: [
|
taskStatusOptions: [
|
||||||
{
|
{
|
||||||
value: -99,
|
value: -99,
|
||||||
label: '所有状态'
|
label: '所有状态'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: -2,
|
value: -2,
|
||||||
label: '重复入库'
|
label: '重复入库'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: -1,
|
value: -1,
|
||||||
label: '暂存'
|
label: '暂存'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 0,
|
value: 0,
|
||||||
label: '新建待下发'
|
label: '新建待下发'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
label: '已下发'
|
label: '已下发'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 2,
|
value: 2,
|
||||||
label: '开始执行'
|
label: '开始执行'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 8,
|
value: 8,
|
||||||
label: '拣选中'
|
label: '拣选中'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 9,
|
value: 9,
|
||||||
label: '盘点中'
|
label: '盘点中'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 100,
|
value: 100,
|
||||||
label: '任务完成'
|
label: '任务完成'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 998,
|
value: 998,
|
||||||
label: '任务取消'
|
label: '任务取消'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 999,
|
value: 999,
|
||||||
label: '任务异常'
|
label: '任务异常'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
availableLocationOptions: []
|
||||||
}
|
}
|
||||||
],
|
|
||||||
availableLocationOptions: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.search()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
dateFormat: (row, column, cellValue, index) => {
|
|
||||||
return dateFormatter(cellValue)
|
|
||||||
},
|
},
|
||||||
timeFormat: (row, column, cellValue, index) => {
|
mounted() {
|
||||||
return timeFormatter(cellValue)
|
this.search()
|
||||||
},
|
},
|
||||||
taskStatusFormat: (row, column, cellValue, index) => {
|
methods: {
|
||||||
return taskStatusFormatter(cellValue)
|
dateFormat: (row, column, cellValue, index) => {
|
||||||
},
|
return dateFormatter(cellValue)
|
||||||
taskTypeFormat: (row, column, cellValue, index) => {
|
},
|
||||||
switch (cellValue) {
|
timeFormat: (row, column, cellValue, index) => {
|
||||||
case 1:
|
return timeFormatter(cellValue)
|
||||||
return '入库'
|
},
|
||||||
case 2:
|
taskStatusFormat: (row, column, cellValue, index) => {
|
||||||
return '出库'
|
return taskStatusFormatter(cellValue)
|
||||||
case 3:
|
},
|
||||||
return '盘点'
|
taskTypeFormat: (row, column, cellValue, index) => {
|
||||||
case 9:
|
switch (cellValue) {
|
||||||
return '移库'
|
case 1: return '入库'
|
||||||
default:
|
case 2: return '出库'
|
||||||
return '未知'
|
case 3: return '盘点'
|
||||||
}
|
case 9: return '移库'
|
||||||
},
|
default: return '未知'
|
||||||
dueFormat: (row, column, cellValue, index) => {
|
}
|
||||||
return dueFormatter(cellValue)
|
},
|
||||||
},
|
dueFormat: (row, column, cellValue, index) => {
|
||||||
search() {
|
return dueFormatter(cellValue)
|
||||||
this.loading = true
|
},
|
||||||
const tableRequest = {
|
search() {
|
||||||
pageNo: this.currentPage,
|
this.loading = true
|
||||||
pageSize: this.pageSize,
|
const tableRequest = {
|
||||||
taskType: this.taskTypeQuery == -99 ? null : this.taskTypeQuery,
|
pageNo: this.currentPage,
|
||||||
taskStatus: this.taskStatusQuery == -99 ? null : this.taskStatusQuery,
|
pageSize: this.pageSize,
|
||||||
goodsId: this.goodsIdQuery.trim(),
|
taskType: this.taskTypeQuery == -99 ? null : this.taskTypeQuery,
|
||||||
vehicleId: this.vehicleIdQuery.trim(),
|
taskStatus: this.taskStatusQuery == -99 ? null : this.taskStatusQuery,
|
||||||
userName: store.getters.getUserName
|
goodsId: this.goodsIdQuery.trim(),
|
||||||
}
|
vehicleId: this.vehicleIdQuery.trim(),
|
||||||
getTasksByPage(tableRequest).then(res => {
|
userName: store.getters.getUserName
|
||||||
const tableResponse = res.data
|
}
|
||||||
if (tableResponse.code == 0) {
|
getTasksByPage(tableRequest).then(res => {
|
||||||
this.tasks = tableResponse.returnData.lists
|
const tableResponse = res.data
|
||||||
this.total = tableResponse.returnData.total
|
if (tableResponse.code == 0) {
|
||||||
console.log(this.tasks)
|
this.tasks = tableResponse.returnData.lists
|
||||||
} else {
|
this.total = tableResponse.returnData.total
|
||||||
errorBox(tableResponse.message)
|
console.log(this.tasks)
|
||||||
|
} else {
|
||||||
|
errorBox(tableResponse.message)
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
errorBox('查询任务错误')
|
||||||
|
})
|
||||||
|
this.loading = false
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
this.goodsIdQuery = ''
|
||||||
|
this.vehicleIdQuery = ''
|
||||||
|
},
|
||||||
|
editCurrentRowTask(row) {
|
||||||
|
console.log(row)
|
||||||
|
// if (row.taskType == 1) {
|
||||||
|
// this.availableLocationOptions = []
|
||||||
|
// var currentOption = {
|
||||||
|
// value: row.destination,
|
||||||
|
// label: locationFormatter(row.destination)
|
||||||
|
// }
|
||||||
|
// this.availableLocationOptions.push(currentOption)
|
||||||
|
// // 生成可用库位列表
|
||||||
|
// const requestParam = {
|
||||||
|
// areaId: 1
|
||||||
|
// }
|
||||||
|
// getAvailableLocations(requestParam).then(res => {
|
||||||
|
// if (res.data.code == 0) {
|
||||||
|
// for (const location of res.data.returnData) {
|
||||||
|
// var newOption = {}
|
||||||
|
// newOption.value = location.locationId
|
||||||
|
// newOption.label = locationFormatter(location.locationId)
|
||||||
|
// this.availableLocationOptions.push(newOption)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }).catch(err => {
|
||||||
|
// errorBox('查找可用库位失败:' + err)
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
this.taskFormEntity = {
|
||||||
|
taskId: row.taskId,
|
||||||
|
taskPriority: row.taskPriority,
|
||||||
|
vehicleId: row.vehicleId,
|
||||||
|
goodsId: row.goodsRelated == null ? '' : row.goodsRelated.goodsId,
|
||||||
|
origin: row.origin,
|
||||||
|
destination: row.destination,
|
||||||
|
taskType: row.taskType,
|
||||||
|
taskStatus: row.taskStatus,
|
||||||
|
}
|
||||||
|
this.dialogVisible = true
|
||||||
|
},
|
||||||
|
submitTaskInfo() {
|
||||||
|
if (this.taskFormEntity.taskStatus == null || this.taskFormEntity.taskStatus == undefined) {
|
||||||
|
errorBox('请选择任务状态')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const request = {
|
||||||
|
taskId: this.taskFormEntity.taskId,
|
||||||
|
taskStatus: this.taskFormEntity.taskStatus,
|
||||||
|
userName: store.getters.getUserName
|
||||||
|
}
|
||||||
|
updateTaskInfo(request).then(res => {
|
||||||
|
if (res.data.code == 0) {
|
||||||
|
this.dialogVisible = false
|
||||||
|
ElMessage.success('修改任务成功')
|
||||||
|
this.search()
|
||||||
|
} else {
|
||||||
|
errorBox(res.data.message)
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
errorBox('修改任务失败')
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getCurrentRow(row) {
|
||||||
|
this.taskId = row.taskId
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
|
||||||
console.log(err)
|
|
||||||
errorBox('查询任务错误')
|
|
||||||
})
|
|
||||||
this.loading = false
|
|
||||||
},
|
},
|
||||||
reset() {
|
|
||||||
this.goodsIdQuery = ''
|
|
||||||
this.vehicleIdQuery = ''
|
|
||||||
},
|
|
||||||
editCurrentRowTask(row) {
|
|
||||||
console.log(row)
|
|
||||||
// if (row.taskType == 1) {
|
|
||||||
// this.availableLocationOptions = []
|
|
||||||
// var currentOption = {
|
|
||||||
// value: row.destination,
|
|
||||||
// label: locationFormatter(row.destination)
|
|
||||||
// }
|
|
||||||
// this.availableLocationOptions.push(currentOption)
|
|
||||||
// // 生成可用库位列表
|
|
||||||
// const requestParam = {
|
|
||||||
// areaId: 1
|
|
||||||
// }
|
|
||||||
// getAvailableLocations(requestParam).then(res => {
|
|
||||||
// if (res.data.code == 0) {
|
|
||||||
// for (const location of res.data.returnData) {
|
|
||||||
// var newOption = {}
|
|
||||||
// newOption.value = location.locationId
|
|
||||||
// newOption.label = locationFormatter(location.locationId)
|
|
||||||
// this.availableLocationOptions.push(newOption)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }).catch(err => {
|
|
||||||
// errorBox('查找可用库位失败:' + err)
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
this.taskFormEntity = {
|
|
||||||
taskId: row.taskId,
|
|
||||||
taskPriority: row.taskPriority,
|
|
||||||
vehicleId: row.vehicleId,
|
|
||||||
goodsId: row.goodsRelated == null ? '' : row.goodsRelated.goodsId,
|
|
||||||
origin: row.origin,
|
|
||||||
destination: row.destination,
|
|
||||||
taskType: row.taskType,
|
|
||||||
taskStatus: row.taskStatus,
|
|
||||||
}
|
|
||||||
this.dialogVisible = true
|
|
||||||
},
|
|
||||||
submitTaskInfo() {
|
|
||||||
if (this.taskFormEntity.taskStatus == null || this.taskFormEntity.taskStatus == undefined) {
|
|
||||||
errorBox('请选择任务状态')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const request = {
|
|
||||||
taskId: this.taskFormEntity.taskId,
|
|
||||||
taskStatus: this.taskFormEntity.taskStatus,
|
|
||||||
userName: store.getters.getUserName
|
|
||||||
}
|
|
||||||
updateTaskInfo(request).then(res => {
|
|
||||||
if (res.data.code == 0) {
|
|
||||||
this.dialogVisible = false
|
|
||||||
ElMessage.success('修改任务成功')
|
|
||||||
this.search()
|
|
||||||
} else {
|
|
||||||
errorBox(res.data.message)
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
console.log(err)
|
|
||||||
errorBox('修改任务失败')
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getCurrentRow(row) {
|
|
||||||
this.taskId = row.taskId
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.el-pagination {
|
.el-pagination {
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-row .el-button {
|
.el-row .el-button {
|
||||||
width: 72px;
|
width: 72px;
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-class {
|
.table-class {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-row .el-form-item .el-select-v2 {
|
.el-row .el-form-item .el-select-v2 {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-row .el-form-item .el-input-number {
|
.el-row .el-form-item .el-input-number {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-row .el-form-item .el-button {
|
.el-row .el-form-item .el-button {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -3,13 +3,13 @@
|
||||||
<el-config-provider :locale="zhCn">
|
<el-config-provider :locale="zhCn">
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-input v-model="workOrderQuery" style="width: 158px; margin-right: 10px; height: 32px;" placeholder="工单号"
|
<el-input v-model="workOrderQuery" style="width: 158px; margin-right: 10px;" placeholder="工单号"
|
||||||
:suffix-icon="Search"/>
|
:suffix-icon="Search"/>
|
||||||
<el-input v-model="workCenterQuery" style="width: 158px; margin-right: 10px; height: 32px;" placeholder="工位/小盒子"
|
<el-input v-model="workCenterQuery" style="width: 158px; margin-right: 10px;" placeholder="工位/小盒子"
|
||||||
:suffix-icon="Search"/>
|
:suffix-icon="Search"/>
|
||||||
<el-input v-model="goodsIdQuery" type="textarea" :rows="1" style="width: 158px; margin-right: 10px; height: 32px;"
|
<el-input v-model="goodsIdQuery" style="width: 158px; margin-right: 10px;" placeholder="料号"
|
||||||
placeholder="请输入料号,多个料号请换行输入" class="goods-id-textarea" />
|
:suffix-icon="Search"/>
|
||||||
<el-input v-model="standIdQuery" style="width: 158px; margin-right: 10px; height: 32px;" placeholder="站台号"
|
<el-input v-model="standIdQuery" style="width: 158px; margin-right: 10px;" placeholder="站台号"
|
||||||
:suffix-icon="Search"/>
|
:suffix-icon="Search"/>
|
||||||
<el-select-v2 v-model="lightStatusQuery" style="width: 158px; margin-right: 10px;"
|
<el-select-v2 v-model="lightStatusQuery" style="width: 158px; margin-right: 10px;"
|
||||||
placeholder="请选择灯光状态" :options="lightStatusOptions" @change="search()"></el-select-v2>
|
placeholder="请选择灯光状态" :options="lightStatusOptions" @change="search()"></el-select-v2>
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
<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: #32CD32; color: #000;" @click="exportExcel()">导出</el-button>
|
|
||||||
<el-button style="background-color: #00CED1; color: #000;"
|
<el-button style="background-color: #00CED1; color: #000;"
|
||||||
@click="openUploadDialog()">导入
|
@click="openUploadDialog()">导入
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -44,7 +43,6 @@
|
||||||
<el-table-column prop="goodsId" label="料号" min-width="120px" show-overflow-tooltip/>
|
<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="needNum" label="需求数量" min-width="120px"/>
|
||||||
<el-table-column prop="pickedNum" 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="lightStatus" label="亮灯状态" :formatter="lightStatusFormat" min-width="120px"/>
|
||||||
<el-table-column prop="workStatus" label="工作状态" :formatter="workStatusFormat" 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"/>
|
<el-table-column prop="machineType" label="机型" :formatter="machineTypeFormat" min-width="120px"/>
|
||||||
|
|
@ -53,7 +51,7 @@
|
||||||
show-overflow-tooltip/>
|
show-overflow-tooltip/>
|
||||||
<el-table-column prop="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px"
|
<el-table-column prop="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px"
|
||||||
show-overflow-tooltip/>
|
show-overflow-tooltip/>
|
||||||
<el-table-column prop="opUser" label="操作用户" min-width="120px" show-overflow-tooltip/>
|
<el-table-column prop="opUser" label="操作用户" min-width="120px"/>
|
||||||
<el-table-column fixed="right" label="操作" width="120px">
|
<el-table-column fixed="right" label="操作" width="120px">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
||||||
|
|
@ -123,7 +121,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="亮灯状态" prop="lightStatus">
|
<el-form-item label="任务状态" prop="lightStatus">
|
||||||
<el-select-v2 v-model="workFlowFormEntity.lightStatus" placeholder="请选择亮灯状态"
|
<el-select-v2 v-model="workFlowFormEntity.lightStatus" placeholder="请选择亮灯状态"
|
||||||
:options="lightStatusOptions"></el-select-v2>
|
:options="lightStatusOptions"></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -153,13 +151,6 @@
|
||||||
<el-input v-model="workFlowFormEntity.opUser" disabled/>
|
<el-input v-model="workFlowFormEntity.opUser" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -212,7 +203,7 @@ 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 UploadExcelWorkFlow from '@/excel/UploadExcelWorkFlow.vue'
|
import UploadExcelWorkFlow from '@/excel/UploadExcelWorkFlow.vue'
|
||||||
import {queryUploadRecord, downloadWorkFlowExcel} from '@/api/excel.js'
|
import {queryUploadRecord} from '@/api/excel.js'
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -312,7 +303,7 @@ export default {
|
||||||
workStation: this.standIdQuery.trim(),
|
workStation: this.standIdQuery.trim(),
|
||||||
workOrder: this.workOrderQuery.trim(),
|
workOrder: this.workOrderQuery.trim(),
|
||||||
workCenter: this.workCenterQuery.trim(),
|
workCenter: this.workCenterQuery.trim(),
|
||||||
goodsId: this.goodsIdQuery.trim().split('\n').filter(id => id.trim() !== '').join(','),
|
goodsId: this.goodsIdQuery.trim(),
|
||||||
lightStatus: this.lightStatusQuery == -99 ? null : this.lightStatusQuery,
|
lightStatus: this.lightStatusQuery == -99 ? null : this.lightStatusQuery,
|
||||||
workStatus: this.workStatusQuery == -99 ? null : this.workStatusQuery,
|
workStatus: this.workStatusQuery == -99 ? null : this.workStatusQuery,
|
||||||
machineType: this.machineTypeQuery == -99 ? null : this.machineTypeQuery,
|
machineType: this.machineTypeQuery == -99 ? null : this.machineTypeQuery,
|
||||||
|
|
@ -352,8 +343,6 @@ export default {
|
||||||
},
|
},
|
||||||
workStatusFormat: (row, column, cellValue, index) => {
|
workStatusFormat: (row, column, cellValue, index) => {
|
||||||
switch (cellValue) {
|
switch (cellValue) {
|
||||||
case -1:
|
|
||||||
return '暂存'
|
|
||||||
case 0:
|
case 0:
|
||||||
return '未开始'
|
return '未开始'
|
||||||
case 1:
|
case 1:
|
||||||
|
|
@ -392,7 +381,6 @@ export default {
|
||||||
goodsId: row.goodsId,
|
goodsId: row.goodsId,
|
||||||
pickedNum: row.pickedNum,
|
pickedNum: row.pickedNum,
|
||||||
needNum: row.needNum,
|
needNum: row.needNum,
|
||||||
distributedNum: row.distributedNum,
|
|
||||||
lightStatus: row.lightStatus,
|
lightStatus: row.lightStatus,
|
||||||
workStatus: row.workStatus,
|
workStatus: row.workStatus,
|
||||||
createTime: row.createTime,
|
createTime: row.createTime,
|
||||||
|
|
@ -405,7 +393,6 @@ export default {
|
||||||
const params = {
|
const params = {
|
||||||
workFlowId: formData.workFlowId,
|
workFlowId: formData.workFlowId,
|
||||||
pickedNum: formData.pickedNum,
|
pickedNum: formData.pickedNum,
|
||||||
distributedNum: formData.distributedNum,
|
|
||||||
lightStatus: formData.lightStatus,
|
lightStatus: formData.lightStatus,
|
||||||
workStatus: formData.workStatus,
|
workStatus: formData.workStatus,
|
||||||
userName: store.getters.getUserName
|
userName: store.getters.getUserName
|
||||||
|
|
@ -458,41 +445,6 @@ export default {
|
||||||
})
|
})
|
||||||
this.uploadDialogVisible = true
|
this.uploadDialogVisible = true
|
||||||
},
|
},
|
||||||
exportExcel() {
|
|
||||||
const request = {
|
|
||||||
workStation: this.standIdQuery.trim(),
|
|
||||||
workOrder: this.workOrderQuery.trim(),
|
|
||||||
workCenter: this.workCenterQuery.trim(),
|
|
||||||
goodsId: this.goodsIdQuery.trim().split('\n').filter(id => id.trim() !== '').join(','),
|
|
||||||
lightStatus: this.lightStatusQuery == -99 ? null : this.lightStatusQuery,
|
|
||||||
workStatus: this.workStatusQuery == -99 ? null : this.workStatusQuery,
|
|
||||||
machineType: this.machineTypeQuery == -99 ? null : this.machineTypeQuery,
|
|
||||||
userName: store.getters.getUserName
|
|
||||||
}
|
|
||||||
downloadWorkFlowExcel(request).then(res => {
|
|
||||||
const link = document.createElement('a');//创建a标签
|
|
||||||
try {
|
|
||||||
let blob = res.data //如果后台返回的直接是blob对象类型,直接获取数据
|
|
||||||
let _fileName = "工作流报表" + dateFormatter(new Date) + ".xlsx"
|
|
||||||
link.style.display = 'none'//隐藏
|
|
||||||
|
|
||||||
// 兼容不同浏览器的URL对象
|
|
||||||
const url = window.URL || window.webkitURL || window.moxURL
|
|
||||||
link.href = url.createObjectURL(blob)
|
|
||||||
link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_') + 1))
|
|
||||||
document.body.appendChild(link)
|
|
||||||
link.click()
|
|
||||||
document.body.removeChild(link)
|
|
||||||
url.revokeObjectURL(link.href)//移除url对象
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e)
|
|
||||||
errorBox('下载文件失败')
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
console.log(err)
|
|
||||||
errorBox('导出失败')
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -542,28 +494,4 @@ export default {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 专门为料号文本域添加样式 */
|
|
||||||
.goods-id-textarea {
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods-id-textarea :deep(.el-textarea__inner) {
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 1.2;
|
|
||||||
padding: 5px;
|
|
||||||
height: 32px !important;
|
|
||||||
min-height: 32px !important;
|
|
||||||
resize: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 确保其他输入框保持一致的高度 */
|
|
||||||
.el-input {
|
|
||||||
height: 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-input :deep(.el-input__wrapper) {
|
|
||||||
height: 32px;
|
|
||||||
line-height: 32px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -3,13 +3,13 @@
|
||||||
<el-config-provider :locale="zhCn">
|
<el-config-provider :locale="zhCn">
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-input v-model="workOrderQuery" style="width: 158px; margin-right: 10px; height: 32px;" placeholder="工单号"
|
<el-input v-model="workOrderQuery" style="width: 158px; margin-right: 10px;" placeholder="工单号"
|
||||||
:suffix-icon="Search" />
|
:suffix-icon="Search" />
|
||||||
<el-input v-model="workCenterQuery" style="width: 158px; margin-right: 10px; height: 32px;" placeholder="工位/小盒子"
|
<el-input v-model="workCenterQuery" style="width: 158px; margin-right: 10px;" placeholder="工位/小盒子"
|
||||||
:suffix-icon="Search" />
|
:suffix-icon="Search" />
|
||||||
<el-input v-model="goodsIdQuery" type="textarea" :rows="1" style="width: 158px; margin-right: 10px; height: 32px;"
|
<el-input v-model="goodsIdQuery" style="width: 158px; margin-right: 10px;" placeholder="料号"
|
||||||
placeholder="请输入料号,多个料号请换行输入" class="goods-id-textarea" />
|
:suffix-icon="Search" />
|
||||||
<el-input v-model="standIdQuery" style="width: 158px; margin-right: 10px; height: 32px;" placeholder="站台号"
|
<el-input v-model="standIdQuery" style="width: 158px; margin-right: 10px;" placeholder="站台号"
|
||||||
:suffix-icon="Search" />
|
:suffix-icon="Search" />
|
||||||
<el-date-picker v-model="workDateQuery" type="date" placeholder="工作起始日期" :shortcuts="shortcuts"
|
<el-date-picker v-model="workDateQuery" type="date" placeholder="工作起始日期" :shortcuts="shortcuts"
|
||||||
style="width: 158px; margin-right: 10px;" clearable />
|
style="width: 158px; margin-right: 10px;" clearable />
|
||||||
|
|
@ -129,7 +129,7 @@ export default {
|
||||||
workStation: this.standIdQuery.trim(),
|
workStation: this.standIdQuery.trim(),
|
||||||
workOrder: this.workOrderQuery.trim(),
|
workOrder: this.workOrderQuery.trim(),
|
||||||
workCenter: this.workCenterQuery.trim(),
|
workCenter: this.workCenterQuery.trim(),
|
||||||
goodsId: this.goodsIdQuery.trim().split('\n').filter(id => id.trim() !== '').join(','),
|
goodsId: this.goodsIdQuery.trim(),
|
||||||
lackStatus: this.lackStatusQuery == -99 ? null : this.lackStatusQuery,
|
lackStatus: this.lackStatusQuery == -99 ? null : this.lackStatusQuery,
|
||||||
workDate: timeFormatter(this.workDateQuery),
|
workDate: timeFormatter(this.workDateQuery),
|
||||||
workEndDate: timeFormatter(this.workEndDateQuery),
|
workEndDate: timeFormatter(this.workEndDateQuery),
|
||||||
|
|
@ -193,10 +193,10 @@ export default {
|
||||||
workStation: this.standIdQuery.trim(),
|
workStation: this.standIdQuery.trim(),
|
||||||
workOrder: this.workOrderQuery.trim(),
|
workOrder: this.workOrderQuery.trim(),
|
||||||
workCenter: this.workCenterQuery.trim(),
|
workCenter: this.workCenterQuery.trim(),
|
||||||
goodsId: this.goodsIdQuery.trim().split('\n').filter(id => id.trim() !== '').join(','),
|
goodsId: this.goodsIdQuery.trim(),
|
||||||
lackStatus: this.lackStatusQuery == -99 ? null : this.lackStatusQuery,
|
lackStatus: this.lackStatusQuery == -99 ? null : this.lackStatusQuery,
|
||||||
workDate: timeFormatter(this.workDateQuery),
|
workDate: timeFormatter(this.workDateQuery),
|
||||||
workEndDate: timeFormatter(this.workEndDateQuery),
|
workEndDate: timeFormatter(this.workEndDateQuery),
|
||||||
userName: store.getters.getUserName
|
userName: store.getters.getUserName
|
||||||
}
|
}
|
||||||
downloadWorkSummaryExcel(request).then(res => {
|
downloadWorkSummaryExcel(request).then(res => {
|
||||||
|
|
@ -274,33 +274,4 @@ export default {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 专门为料号文本域添加样式 */
|
|
||||||
.goods-id-container {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods-id-textarea {
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods-id-textarea :deep(.el-textarea__inner) {
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 1.2;
|
|
||||||
padding: 5px;
|
|
||||||
height: 32px !important;
|
|
||||||
min-height: 32px !important;
|
|
||||||
resize: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 确保其他输入框保持一致的高度 */
|
|
||||||
.el-input {
|
|
||||||
height: 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-input :deep(.el-input__wrapper) {
|
|
||||||
height: 32px;
|
|
||||||
line-height: 32px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -1,28 +1,28 @@
|
||||||
<template>
|
<template>
|
||||||
<body id="login-page">
|
<body id="login-page">
|
||||||
<el-form class="login-container" :model="loginForm" label-position="left" label-width="0px">
|
<el-form class="login-container" :model="loginForm" label-position="left" label-width="0px">
|
||||||
<h3 class="login_title">系统登录</h3>
|
<h3 class="login_title">系统登录</h3>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input type="text" v-model="loginForm.loginAccount" auto-complete="off" placeholder="账号"></el-input>
|
<el-input type="text" v-model="loginForm.loginAccount" auto-complete="off" placeholder="账号"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input type="password" v-model="loginForm.loginPassword" auto-complete="off" placeholder="密码"></el-input>
|
<el-input type="password" v-model="loginForm.loginPassword" auto-complete="off" placeholder="密码"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="width: 100%">
|
<el-form-item style="width: 100%">
|
||||||
<el-button type="primary" style="width: 100%; border: none" @click="login">登录</el-button>
|
<el-button type="primary" style="width: 100%; border: none" @click="login">登录</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="width: 100%">
|
<el-form-item style="width: 100%">
|
||||||
<el-button type="primary" style="width: 100%; border: none" @click="loginCate">卡特账号登录</el-button>
|
<el-button type="primary" style="width: 100%; border: none" @click="loginCate">卡特账号登录</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</body>
|
</body>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {getUser, loginWithAuth, loginWithoutAuth} from '@/api/login.js'
|
import { getUser, loginWithAuth, loginWithoutAuth } from '@/api/login.js'
|
||||||
import {postToGetToken} from "@/api/kateLogin.js";
|
import { postToGetToken } from "@/api/kateLogin.js";
|
||||||
import {ElMessage, ElLoading} from 'element-plus'
|
import { ElMessage, ElLoading } from 'element-plus'
|
||||||
import {reactive, onMounted} from 'vue';
|
import { reactive, onMounted } from 'vue';
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import crypto from 'crypto'
|
import crypto from 'crypto'
|
||||||
|
|
@ -30,37 +30,35 @@ import loading from "@/utils/loading";
|
||||||
// Dependency: Node.js crypto module
|
// Dependency: Node.js crypto module
|
||||||
// https://nodejs.org/api/crypto.html#crypto_crypto
|
// https://nodejs.org/api/crypto.html#crypto_crypto
|
||||||
function base64URLEncode(str) {
|
function base64URLEncode(str) {
|
||||||
return str.toString('base64')
|
return str.toString('base64')
|
||||||
.replace(/\+/g, '-')
|
.replace(/\+/g, '-')
|
||||||
.replace(/\//g, '_')
|
.replace(/\//g, '_')
|
||||||
.replace(/=/g, '');
|
.replace(/=/g, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
var verifier = base64URLEncode(crypto.randomBytes(32));
|
var verifier = base64URLEncode(crypto.randomBytes(32));
|
||||||
// Dependency: Node.js crypto module
|
// Dependency: Node.js crypto module
|
||||||
// https://nodejs.org/api/crypto.html#crypto_crypto
|
// https://nodejs.org/api/crypto.html#crypto_crypto
|
||||||
function sha256(buffer) {
|
function sha256(buffer) {
|
||||||
return crypto.createHash('sha256').update(buffer).digest();
|
return crypto.createHash('sha256').update(buffer).digest();
|
||||||
}
|
}
|
||||||
|
|
||||||
var challenge = base64URLEncode(sha256(verifier));
|
var challenge = base64URLEncode(sha256(verifier));
|
||||||
|
|
||||||
const loginForm = reactive({
|
const loginForm = reactive({
|
||||||
loginAccount: "",
|
loginAccount: "",
|
||||||
loginPassword: "",
|
loginPassword: "",
|
||||||
})
|
})
|
||||||
// todo 参数待设置
|
// todo 参数待设置
|
||||||
const oauthConstants = {
|
const oauthConstants = {
|
||||||
client_id: 'f921b5f5-ba70-4bcb-8a4b-f3c7d90ec84e',// 客户端id,卡特提供
|
client_id: 'f921b5f5-ba70-4bcb-8a4b-f3c7d90ec84e',// 客户端id,卡特提供
|
||||||
// client_id: 'ASRS_ac_client',
|
// client_id: 'ASRS_ac_client',
|
||||||
response_type: 'code',// 授权类型,固定为code
|
response_type: 'code',// 授权类型,固定为code
|
||||||
state: '001',// 客户端当前状态,任意值
|
state: '001',// 客户端当前状态,任意值
|
||||||
scope: 'openid%20profile',// 权限范围,固定为openid
|
scope: 'openid%20profile',// 权限范围,固定为openid
|
||||||
grant_type: 'authorization_code',
|
grant_type: 'authorization_code',
|
||||||
code_challenge: challenge,
|
code_challenge: challenge,
|
||||||
code_challenge_method: 'S256',
|
code_challenge_method: 'S256',
|
||||||
// response_mode: "form_post",
|
// response_mode: "form_post",
|
||||||
redirect_uri: 'https://csclasrs.ecorp.cat.com/wms'
|
redirect_uri: 'https://csclasrs.ecorp.cat.com/wms'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -68,112 +66,108 @@ const oauthConstants = {
|
||||||
const cateLoginUrl = `https://login.microsoftonline.com/caterpillar.onmicrosoft.com/oauth2/v2.0/authorize?client_id=${oauthConstants.client_id}&response_type=${oauthConstants.response_type}&code_challenge=${oauthConstants.code_challenge}&code_challenge_method=S256&grant_type=${oauthConstants.grant_type}&scope=${oauthConstants.scope}&state=${oauthConstants.state}&redirect_uri=${oauthConstants.redirect_uri}`
|
const cateLoginUrl = `https://login.microsoftonline.com/caterpillar.onmicrosoft.com/oauth2/v2.0/authorize?client_id=${oauthConstants.client_id}&response_type=${oauthConstants.response_type}&code_challenge=${oauthConstants.code_challenge}&code_challenge_method=S256&grant_type=${oauthConstants.grant_type}&scope=${oauthConstants.scope}&state=${oauthConstants.state}&redirect_uri=${oauthConstants.redirect_uri}`
|
||||||
// 登录
|
// 登录
|
||||||
const login = () => {
|
const login = () => {
|
||||||
const loading = ElLoading.service({
|
const loading = ElLoading.service({
|
||||||
lock: true,
|
lock: true,
|
||||||
text: 'Loading',
|
text: 'Loading',
|
||||||
background: 'rgba(0, 0, 0, 0.7)',
|
background: 'rgba(0, 0, 0, 0.7)',
|
||||||
})
|
})
|
||||||
loginWithAuth(loginForm).then(res => {
|
loginWithAuth(loginForm).then(res => {
|
||||||
loading.close()
|
loading.close()
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
store.commit('mutationUser', res.data.returnData.user)// 用户信息
|
store.commit('mutationUser', res.data.returnData.user)// 用户信息
|
||||||
store.commit('mutationMenu', res.data.returnData.menuList)// 菜单信息
|
store.commit('mutationMenu', res.data.returnData.menuList)// 菜单信息
|
||||||
store.commit('mutationStandId', res.data.returnData.standId)
|
store.commit('mutationStandId', res.data.returnData.standId)
|
||||||
// router.replace({ path: '/' })// 直接跳转到主页
|
// router.replace({ path: '/' })// 直接跳转到主页
|
||||||
router.replace({path: '/systemCenter'})// 跳转到系统选择的界面
|
router.replace({ path: '/systemCenter' })// 跳转到系统选择的界面
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(res.data.message)
|
ElMessage.error(res.data.message)
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
loading.close()
|
loading.close()
|
||||||
ElMessage.error('登录失败!')
|
ElMessage.error('登录失败!')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 跳转卡特登录接口
|
// 跳转卡特登录接口
|
||||||
const loginCate = () => {
|
const loginCate = () => {
|
||||||
store.commit('mutationAddVerify', verifier)// 添加认证信息
|
store.commit('mutationAddVerify', verifier)// 添加认证信息
|
||||||
// console.log(cateLoginUrl)
|
// console.log(cateLoginUrl)
|
||||||
window.location.href = cateLoginUrl// 打开新窗口
|
window.location.href = cateLoginUrl// 打开新窗口
|
||||||
// window.open(cateLoginUrl)// 不打开新窗口
|
// window.open(cateLoginUrl)// 不打开新窗口
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
if (router.currentRoute.value.query.code !== undefined) {
|
||||||
const code = urlParams.get('code');
|
loading.open('请求登录中...')
|
||||||
console.log(code); // 输出 ?code= 后面的值
|
const tokenParam = {
|
||||||
if (code !== undefined && code !== null && code !== '') {
|
code_verifier: store.getters.getVerify,
|
||||||
console.log('跳转并尝试登录。code:' + code)
|
client_id: '609f8296-74ab-441e-904f-3a8508030511',
|
||||||
loading.open('请求登录中...')
|
// scope: 'openid',
|
||||||
const tokenParam = {
|
code: router.currentRoute.value.query.code,
|
||||||
code_verifier: store.getters.getVerify,
|
redirect_uri: 'https://csclasrs.ecorp.cat.com/wms',
|
||||||
client_id: 'f921b5f5-ba70-4bcb-8a4b-f3c7d90ec84e',
|
grant_type: 'authorization_code',
|
||||||
// scope: 'openid',
|
// client_secret: 'o6h8Q~iLegnIBG.GzJngXk.03FYdBJzIoCtTtcwj',
|
||||||
code: code,
|
// response_type: 'id_token',
|
||||||
redirect_uri: 'https://csclasrs.ecorp.cat.com/wms',
|
// response_mode: 'form_post'
|
||||||
grant_type: 'authorization_code',
|
|
||||||
// client_secret: 'o6h8Q~iLegnIBG.GzJngXk.03FYdBJzIoCtTtcwj',
|
|
||||||
// response_type: 'id_token',
|
|
||||||
// response_mode: 'form_post'
|
|
||||||
}
|
|
||||||
postToGetToken(tokenParam).then(res => {
|
|
||||||
store.commit('mutationClearVerify', verifier)// 删除认证信息
|
|
||||||
if (res.data.id_token !== undefined) {
|
|
||||||
const codeInfo = {
|
|
||||||
id_token: res.data.id_token
|
|
||||||
}
|
}
|
||||||
getUser(codeInfo).then(res => {
|
postToGetToken(tokenParam).then(res => {
|
||||||
if (res.data.code === 0) {
|
store.commit('mutationClearVerify', verifier)// 删除认证信息
|
||||||
store.commit('mutationUser', res.data.returnData.user)// 用户信息
|
if (res.data.id_token !== undefined) {
|
||||||
store.commit('mutationMenu', res.data.returnData.menuList)// 菜单信息
|
const codeInfo = {
|
||||||
store.commit('mutationStandId', res.data.returnData.standId)
|
id_token: res.data.id_token
|
||||||
router.replace({path: '/systemCenter'})
|
}
|
||||||
} else {
|
getUser(codeInfo).then(res => {
|
||||||
ElMessage.error(res.data.message)
|
if (res.data.code === 0) {
|
||||||
}
|
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' })
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.data.message)
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
ElMessage.error('登录失败!')
|
||||||
|
})
|
||||||
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
ElMessage.error('登录失败!')
|
ElMessage.error('登录错误')
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
|
||||||
console.log(err)
|
|
||||||
ElMessage.error('登录错误')
|
|
||||||
}).finally(() => {
|
|
||||||
loading.close()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
#login-page {
|
#login-page {
|
||||||
/* background: url("../assets/img/bg.jpg") no-repeat; */
|
/* background: url("../assets/img/bg.jpg") no-repeat; */
|
||||||
background-position: center;
|
background-position: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-container {
|
.login-container {
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
background-clip: padding-box;
|
background-clip: padding-box;
|
||||||
margin: 90px auto;
|
margin: 90px auto;
|
||||||
width: 350px;
|
width: 350px;
|
||||||
padding: 35px 35px 15px 35px;
|
padding: 35px 35px 15px 35px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: 1px solid #eaeaea;
|
border: 1px solid #eaeaea;
|
||||||
box-shadow: 0 0 25px #cac6c6;
|
box-shadow: 0 0 25px #cac6c6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login_title {
|
.login_title {
|
||||||
margin: 0px auto 40px auto;
|
margin: 0px auto 40px auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #505458;
|
color: #505458;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user