mt-qj-wms-ui/src/views/order/components/current-task-new-table3.vue
2022-09-09 16:48:26 +08:00

106 lines
2.2 KiB
Vue

<!--
* @Author: zwq
* @Date: 2022-09-09 15:19:56
* @LastEditors: zwq
* @LastEditTime: 2022-09-09 15:26:04
* @Description:
-->
<template>
<div style="margin:20px">
<el-table
:data="dataList"
ref="dataList"
size="mini"
height="250"
:header-cell-style="{
background: '#eef1f6',
color: '#606266',
width: '100%'
}"
>
<el-table-column
type="index"
header-align="center"
align="center"
label="序号"
width="50"
>
</el-table-column>
<el-table-column prop="inTime" label="入库时间">
<template slot-scope="scope">
{{
scope.row.inTime ? scope.row.inTime.replace("T", " ") : ""
}}
</template>
</el-table-column>
<el-table-column prop="kilnName" label="工业炉名称"></el-table-column>
<el-table-column prop="locationName" label=" 库位名称"> </el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="80"
label="置顶"
>
<template slot-scope="scope">
<el-button type="text" size="small" @click="topList(scope.row.id)"
>置顶</el-button
>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
// 任务状态列表
const statusList = {
0: '等待执行',
1: '执行中',
2: '执行完成',
3: '追加后完成'
}
export default {
props: {
dataList: {
type: Array,
default: () => {
return []
}
}
},
data () {
return {
statusList
}
},
components: {
},
activated () {},
methods: {
init () {
console.log(3)
},
topList (id) {
this.$http({
url: this.$http.adornUrl('/inStockInfo/top'),
method: 'post',
data: this.$http.adornData({ id })
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500
})
} else {
this.$message.error(data.msg)
}
})
}
}
}
</script>
<style></style>