mt-qj-wms-ui/src/views/common/home.vue

191 lines
4.7 KiB
Vue
Raw Normal View History

2021-11-15 08:22:01 +08:00
<template>
2021-11-17 10:23:35 +08:00
<div>
<el-row type="flex" justify="space-around">
<el-col :span="6">
<el-card class="box-card" shadow="hover" @click.native="$router.push({ name: 'orderProcess' })">
<icon-svg class="iconClass" name="guolu"></icon-svg>
<h2>进工业炉加工</h2>
</el-card>
</el-col>
<el-col :span="6">
<el-card class="box-card" shadow="hover" @click.native="$router.push({ name: 'exWarehouse' })">
<icon-svg class="iconClass" name="chuku"></icon-svg>
<h2>出库</h2>
</el-card>
</el-col>
<el-col :span="6">
<el-card class="box-card" shadow="hover" @click.native="$router.push({ name: 'addProcess' })">
<icon-svg class="iconClass" name="zaijiagong"></icon-svg>
<h2>追加加工</h2>
</el-card>
</el-col>
</el-row>
<div class="mod-log">
<h3>当前任务列表</h3>
<el-table
:data="dataList"
border
2021-12-08 14:54:13 +08:00
height="500px"
2021-11-17 10:23:35 +08:00
v-loading="dataListLoading"
style="width: 100%"
>
<el-table-column
type="index"
header-align="center"
align="center"
label="序号"
width="50"
></el-table-column>
<el-table-column
2021-12-08 14:54:13 +08:00
prop="taskCode"
2021-11-17 10:23:35 +08:00
header-align="center"
align="center"
label="任务编号"
>
</el-table-column>
<el-table-column
2021-12-08 14:54:13 +08:00
prop="idens"
2021-11-17 10:23:35 +08:00
header-align="center"
align="center"
label="标识卡"
>
2021-12-08 14:54:13 +08:00
<template slot-scope="scope">
<span>{{
scope.row.idens.join("|")
}}</span>
</template>
2021-11-17 10:23:35 +08:00
</el-table-column>
<el-table-column
2021-12-08 14:54:13 +08:00
prop="materials"
2021-11-17 10:23:35 +08:00
header-align="center"
align="center"
label="物料名"
>
2021-12-08 14:54:13 +08:00
<template slot-scope="scope">
<span>{{
scope.row.materials.join("|")
}}</span>
</template>
2021-11-17 10:23:35 +08:00
</el-table-column>
<el-table-column
2021-12-08 14:54:13 +08:00
prop="customers"
2021-11-17 10:23:35 +08:00
header-align="center"
align="center"
label="客户"
>
2021-12-08 14:54:13 +08:00
<template slot-scope="scope">
<span>{{
scope.row.customers.join("|")
}}</span>
</template>
2021-11-17 10:23:35 +08:00
</el-table-column>
<el-table-column
2021-12-08 14:54:13 +08:00
prop="kilnName"
2021-11-17 10:23:35 +08:00
header-align="center"
align="center"
label="窑炉"
>
</el-table-column>
<el-table-column
2021-12-08 14:54:13 +08:00
prop="status"
2021-11-17 10:23:35 +08:00
header-align="center"
align="center"
label="当前状态"
>
</el-table-column>
<el-table-column
2021-12-08 14:54:13 +08:00
prop="taskType"
2021-11-17 10:23:35 +08:00
header-align="center"
align="center"
label="任务类型"
>
2021-12-08 14:54:13 +08:00
<template slot-scope="scope">
<span>{{
scope.row.taskType === 0
? "缓存到窑炉加工"
: scope.row.taskType === 1
? "出炉到缓存"
: scope.row.taskType === 2
? "缓存出库"
: "入库缓存"
}}</span>
</template>
2021-11-17 10:23:35 +08:00
</el-table-column>
<el-table-column
2021-12-08 14:54:13 +08:00
prop="startPosition"
2021-11-17 10:23:35 +08:00
header-align="center"
align="center"
label="开始位置"
>
</el-table-column>
<el-table-column
2021-12-08 14:54:13 +08:00
prop="targetPosition"
2021-11-17 10:23:35 +08:00
header-align="center"
align="center"
label="目标位置"
>
</el-table-column>
<el-table-column
2021-12-08 14:54:13 +08:00
prop="locationName"
2021-11-17 10:23:35 +08:00
header-align="center"
align="center"
label="库位"
>
</el-table-column>
</el-table>
</div>
2021-11-15 08:22:01 +08:00
</div>
</template>
<script>
2021-11-17 10:23:35 +08:00
export default {
data () {
return {
dataList: [],
pageIndex: 1,
2021-12-08 14:54:13 +08:00
pageSize: 500,
2021-11-17 10:23:35 +08:00
dataListLoading: false
}
},
created () {
this.getDataList()
},
methods: {
// 获取数据列表
getDataList () {
this.dataListLoading = true
this.$http({
2021-12-10 17:07:29 +08:00
url: this.$http.adornUrl('/currTask/mainCurrentTaskNow'),
2021-12-08 14:54:13 +08:00
method: 'post',
data: this.$http.adornData({
current: this.pageIndex,
size: this.pageSize
2021-11-17 10:23:35 +08:00
})
}).then(({ data }) => {
if (data && data.code === 0) {
2021-12-08 14:54:13 +08:00
this.dataList = data.data.records
2021-11-17 10:23:35 +08:00
} else {
this.dataList = []
}
this.dataListLoading = false
})
}
2021-11-15 08:22:01 +08:00
}
2021-11-17 10:23:35 +08:00
}
2021-11-15 08:22:01 +08:00
</script>
2021-11-17 10:23:35 +08:00
<style scoped>
.mod-log {
margin-top: 100px;
}
.box-card{
background-color: rgb(235, 254, 255);
text-align: center;
cursor: pointer;
}
.iconClass{
width: 100px;
height: 100px;
}
2021-11-15 08:22:01 +08:00
</style>