update
This commit is contained in:
@@ -1,52 +1,57 @@
|
||||
<template>
|
||||
<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-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-card :style="{height: boxHeight + 'px'}" class="box-card box-card-jg" shadow="hover" @click.native="$router.push({ name: 'orderProcess' })">
|
||||
<p class="box-card-header">
|
||||
<icon-svg class="iconClass" name="进工业炉加工"></icon-svg>
|
||||
进工业炉加工
|
||||
</p>
|
||||
<p class="box-card-footer">Processing</p>
|
||||
</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-col :span="8">
|
||||
<el-card :style="{height: boxHeight + 'px'}" class="box-card box-card-ck" shadow="hover" @click.native="$router.push({ name: 'exWarehouse' })">
|
||||
<p class="box-card-header">
|
||||
<icon-svg class="iconClass" name="出库"></icon-svg>
|
||||
出库
|
||||
</p>
|
||||
<p class="box-card-footer">Warehouse</p>
|
||||
</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-col :span="8">
|
||||
<el-card :style="{height: boxHeight + 'px'}" class="box-card box-card-zj" shadow="hover" @click.native="$router.push({ name: 'addProcess' })">
|
||||
<p class="box-card-header">
|
||||
<icon-svg class="iconClass" name="追加加工"></icon-svg>
|
||||
追加加工
|
||||
</p>
|
||||
<p class="box-card-footer">Append</p>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="mod-log">
|
||||
<el-card class="mod-log">
|
||||
<h3>当前任务列表</h3>
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
height="500px"
|
||||
:stripe="true"
|
||||
:header-cell-style="{background:'#eef1f6',color:'#606266',height: '56px'}"
|
||||
v-loading="dataListLoading"
|
||||
style="width: 100%"
|
||||
style="width: 100%; min-height: 500px"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="序号"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="taskCode"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="任务编号"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="idens"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="标识卡"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
@@ -57,8 +62,6 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="materials"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="物料名"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
@@ -69,8 +72,6 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="customers"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="客户"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
@@ -81,22 +82,19 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="kilnName"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="窑炉"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="status"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="当前状态"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.status >= 0 ? statusList[scope.row.status] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="taskType"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="任务类型"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
@@ -113,42 +111,59 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="startPosition"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="开始位置"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="targetPosition"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="目标位置"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="locationName"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="库位"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// 任务状态列表
|
||||
const statusList = {
|
||||
0: '等待执行',
|
||||
1: '执行中',
|
||||
2: '执行完成',
|
||||
3: '追加后完成'
|
||||
}
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
dataList: [],
|
||||
pageIndex: 1,
|
||||
pageSize: 500,
|
||||
dataListLoading: false
|
||||
dataListLoading: false,
|
||||
statusList,
|
||||
boxHeight: 0
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getDataList()
|
||||
if (document.body.offsetWidth > 1180) {
|
||||
this.boxHeight = (document.body.offsetWidth - 330) * 40 / 183
|
||||
// * 320 / (3 * 488)
|
||||
} else {
|
||||
this.boxHeight = 186
|
||||
}
|
||||
window.addEventListener('resize', () => {
|
||||
if (document.body.offsetWidth > 1180) {
|
||||
this.boxHeight = (document.body.offsetWidth - 330) * 40 / 183
|
||||
} else {
|
||||
this.boxHeight = 186
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
@@ -174,17 +189,43 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style lang="scss" scoped>
|
||||
.mod-log {
|
||||
margin-top: 100px;
|
||||
margin-top: 20px;
|
||||
border-radius: 15px;
|
||||
}
|
||||
.box-card{
|
||||
background-color: rgb(235, 254, 255);
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background-color: transparent;
|
||||
border-radius: 25px;
|
||||
padding-left: 20px;
|
||||
padding-top: 40px;
|
||||
.box-card-header{
|
||||
font-size: 18px;
|
||||
letter-spacing: 3px;
|
||||
}
|
||||
.box-card-footer{
|
||||
font-size: 24px;
|
||||
}
|
||||
p {
|
||||
margin: 10px 0;
|
||||
}
|
||||
}
|
||||
.box-card-jg{
|
||||
background-image: url('../../assets/img/进工业炉加工.png');
|
||||
}
|
||||
.box-card-ck{
|
||||
background-image: url('../../assets/img/出库.png');
|
||||
}
|
||||
.box-card-zj{
|
||||
background-image: url('../../assets/img/追加加工.png');
|
||||
}
|
||||
.iconClass{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
/* width: 20px;
|
||||
height: 20px; */
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,30 +1,41 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true">
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-form :inline="true" style="display: flex; align-items: center; justify-content: right;">
|
||||
<el-form-item style="flex: 1;float: left">
|
||||
<el-button size="small" type="primary" @click="addOrUpdateHandle()">
|
||||
<icon-svg class="iconClass" name="新建"></icon-svg>
|
||||
新增
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="加工类型">
|
||||
<el-select v-model="processType" clearable>
|
||||
<el-form-item>
|
||||
<el-select v-model="processType" size="small" placeholder="加工类型" clearable>
|
||||
<el-option :value="0" label="初始加工" />
|
||||
<el-option :value="1" label="复加工" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-left:2%">
|
||||
任务起点位置 :
|
||||
<el-button style="margin-left:10px" type="primary" @click="getPoint(0)">{{startPosition}}</el-button>
|
||||
<el-form-item style="margin-left:1%">
|
||||
<el-select v-model="startPosition" size="small" placeholder="任务起点位置" clearable>
|
||||
<el-option :value="1" label="提升平台1" />
|
||||
<el-option :value="2" label="提升平台2" />
|
||||
<el-option :value="3" label="提升平台3" />
|
||||
<el-option :value="4" label="提升平台4" />
|
||||
</el-select>
|
||||
<!-- <el-button style="margin-left:10px" type="primary" @click="getPoint(0)">{{startPosition}}</el-button> -->
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-left:2%">
|
||||
窑炉 :
|
||||
<el-button style="margin-left:10px" type="primary" @click="getPoint(1)">{{kilnId}}</el-button>
|
||||
<el-form-item style="margin-left:1%">
|
||||
<el-select v-model="kilnId" size="small" placeholder="窑炉" clearable>
|
||||
<el-option v-for="item in eqList" :key="item.id" :value="item.id" :label="item.kilnName" />
|
||||
</el-select>
|
||||
<!-- <el-button style="margin-left:10px" type="primary" @click="getPoint(1)">{{kilnId}}</el-button> -->
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-left:2%">
|
||||
<el-button type="primary" @click="submitTask()">提交任务</el-button>
|
||||
<el-form-item style="margin-left:1%">
|
||||
<el-button type="primary" size="small" @click="submitTask()">提交任务</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
:stripe="true"
|
||||
:header-cell-style="{background:'#eef1f6',color:'#606266',height: '56px'}"
|
||||
v-loading="dataListLoading"
|
||||
style="width: 100%;">
|
||||
<el-table-column
|
||||
@@ -36,38 +47,26 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="idenCardNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="标识卡">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="customerName"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="客户名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orderNo"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="订单号">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="productName"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="产品名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="materialDes"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="材料号牌">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="finishQuantity"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="已完成数">
|
||||
<template slot-scope="scope">
|
||||
{{ `${scope.row.finishQuantity}/${scope.row.targetQuantity}` }}
|
||||
@@ -75,20 +74,14 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="quantity"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="数量">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="weight"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="重量">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="unit"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="单位">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -97,8 +90,16 @@
|
||||
align="center"
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row, scope.$index)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.$index)">删除</el-button>
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row, scope.$index)">
|
||||
<el-tooltip class="item" effect="dark" content="修改" placement="top">
|
||||
<icon-svg class="iconClass" name="编辑"></icon-svg>
|
||||
</el-tooltip>
|
||||
</el-button>
|
||||
<el-button type="text" style="color:red" size="small" @click="deleteHandle(scope.$index)">
|
||||
<el-tooltip class="item" effect="dark" content="删除" placement="top">
|
||||
<icon-svg class="iconClass" name="删除"></icon-svg>
|
||||
</el-tooltip>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -114,14 +115,15 @@
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
startPosition: '选择起点',
|
||||
kilnId: '选择窑炉',
|
||||
startPosition: '',
|
||||
kilnId: '',
|
||||
targetPosition: '',
|
||||
dataList: [],
|
||||
processType: null,
|
||||
dataListLoading: false,
|
||||
addOrUpdateVisible: false,
|
||||
processPointVisible: false
|
||||
processPointVisible: false,
|
||||
eqList: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -129,9 +131,27 @@
|
||||
ProcessPoint
|
||||
},
|
||||
activated () {
|
||||
this.getDataList()
|
||||
this.getEqList()
|
||||
},
|
||||
methods: {
|
||||
// 获取窑炉列表
|
||||
getEqList () {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/kilnInfo/page'),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({
|
||||
current: 1,
|
||||
size: 999
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.eqList = data.data.records
|
||||
} else {
|
||||
this.eqList = []
|
||||
}
|
||||
this.getDataList()
|
||||
})
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList () {
|
||||
this.dataList = sessionStorage.getItem('taskList') ? JSON.parse(sessionStorage.getItem('taskList')) : []
|
||||
@@ -169,12 +189,12 @@
|
||||
message: '任务为空,请新增一条托盘信息',
|
||||
type: 'warning'
|
||||
})
|
||||
} else if (this.startPosition === '选择起点') {
|
||||
} else if (!this.startPosition) {
|
||||
this.$message({
|
||||
message: '请选择任务起点',
|
||||
type: 'warning'
|
||||
})
|
||||
} else if (this.kilnId === '选择窑炉') {
|
||||
} else if (!this.kilnId) {
|
||||
this.$message({
|
||||
message: '请选择窑炉',
|
||||
type: 'warning'
|
||||
@@ -196,7 +216,8 @@
|
||||
kilnId: this.kilnId,
|
||||
processType: this.processType,
|
||||
startPosition: this.startPosition,
|
||||
targetPosition: this.targetPosition
|
||||
targetPosition: this.kilnId
|
||||
// this.targetPosition
|
||||
})
|
||||
}).then(({data}) => {
|
||||
console.log(data)
|
||||
|
||||
Reference in New Issue
Block a user