Compare commits

...

9 Commits

Author SHA1 Message Date
zwq
84359c8e43 更新 2022-12-13 16:37:14 +08:00
zwq
6f547d5dc5 更新 2022-11-21 15:38:44 +08:00
b0faacd37b Merge pull request '更新' (#23) from zwq into master
Reviewed-on: #23
2022-09-09 16:53:51 +08:00
zwq
9492b471dc 更新 2022-09-09 16:48:26 +08:00
344261e302 Merge pull request '更新' (#22) from zwq into master
Reviewed-on: #22
2022-08-19 15:00:00 +08:00
zwq
e2c12e3fd8 更新 2022-08-19 14:59:26 +08:00
2021b8b076 Merge pull request '更新' (#21) from zwq into master
Reviewed-on: #21
2022-07-18 14:58:20 +08:00
zwq
8e69c8d31b 更新 2022-07-18 14:57:53 +08:00
2faa500456 Merge pull request '更新' (#20) from zwq into master
Reviewed-on: #20
2022-07-18 09:35:58 +08:00
27 changed files with 3006 additions and 322 deletions

View File

@@ -5,7 +5,6 @@
<script>
import * as echarts from 'echarts'
import resize from './mixins/resize'
import moment from 'moment'
export default {
mixins: [resize],
@@ -100,22 +99,15 @@ export default {
})
}
if (this.chartType.indexOf('折线') >= 0) {
this.series.push({
name: this.title + 'line',
type: 'line',
symbolSize: 10,
symbol: 'circle',
colorBy: 'data',
color: '#5B8FF9',
label: {
show: true,
position: 'top',
formatter (p) {
return p.value > 0 ? p.value : ''
}
},
data: this.dataList.map(item => {
return item.value
this.dataList.forEach(item => {
this.series.push({
name: item[0].code,
type: 'line',
symbolSize: 5,
symbol: 'circle',
data: item.map(item1 => {
return item1
})
})
})
}
@@ -131,7 +123,6 @@ export default {
},
chartType: {
handler (val) {
console.log(val)
if (val.length) {
this.series = []
if (val.indexOf('柱状') >= 0) {
@@ -155,23 +146,15 @@ export default {
})
}
if (val.indexOf('折线') >= 0) {
this.series.push({
name: this.title + 'line',
type: 'line',
symbolSize: 10,
symbol: 'circle',
color: '#5B8FF9',
colorBy: 'data',
barBorderRadius: 0,
label: {
show: true,
position: 'top',
formatter (p) {
return p.value > 0 ? p.value : ''
}
},
data: this.dataList.map(item => {
return item.value
this.dataList.forEach(item => {
this.series.push({
name: item[0].code,
type: 'line',
symbolSize: 5,
symbol: 'circle',
data: item.map(item1 => {
return item1
})
})
})
}
@@ -204,22 +187,15 @@ export default {
})
}
if (this.chartType.indexOf('折线') >= 0) {
this.series.push({
name: this.title + 'line',
type: 'line',
symbolSize: 10,
symbol: 'circle',
color: '#5B8FF9',
colorBy: 'data',
label: {
show: true,
position: 'top',
formatter (p) {
return p.value > 0 ? p.value : ''
}
},
data: this.dataList.map(item => {
return item.value
this.dataList.forEach(item => {
this.series.push({
name: item[0].code,
type: 'line',
symbolSize: 5,
symbol: 'circle',
data: item.map(item1 => {
return item1
})
})
})
}
@@ -231,9 +207,6 @@ export default {
this.chart.dispose()
}
this.chart = echarts.init(document.getElementById(this.id))
const xData = this.dataList.map(item => {
return moment(item.time).format('M-D HH:mm')
})
this.chart.setOption({
title: {
text: this.title === 'Mix-Chart' ? 'Mix-Chart' : this.titleHeader + this.title + this.titleFooter,
@@ -247,10 +220,18 @@ export default {
},
tooltip: {
trigger: 'axis',
confine: true,
axisPointer: {
textStyle: {
color: '#fff'
}
},
formatter: function (params) {
let info = params[0].dataIndex + 1 + '<br/>'
params.forEach(item => {
info += item.marker + item.data.code + '<br/>' + '值: ' + item.value + '<br/>' + '时间: ' + item.data.time.split('T')[0] + ' ' + item.data.time.split('T')[1] + '<br/>'
})
return info
}
},
grid: {
@@ -268,11 +249,7 @@ export default {
top: 55,
textStyle: {
color: '#90979c'
},
data: this.series.map(item => {
console.log(item)
return this.title + item.type
})
}
},
calculable: true,
xAxis: [
@@ -293,10 +270,8 @@ export default {
show: false
},
axisLabel: {
interval: 0,
rotate: 45
},
data: xData
show: false
}
}
],
yAxis: [
@@ -328,7 +303,7 @@ export default {
xAxisIndex: [0],
bottom: 10,
start: 0,
end: 100,
end: 20,
handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
handleSize: '110%',
handleStyle: {
@@ -344,7 +319,7 @@ export default {
show: true,
height: 15,
start: 1,
end: 35
end: 20
}
],
series: this.series

View File

@@ -346,7 +346,7 @@ export default {
xAxisIndex: [0],
bottom: 10,
start: 0,
end: 100,
end: 10,
handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
handleSize: '110%',
handleStyle: {
@@ -361,8 +361,8 @@ export default {
type: 'inside',
show: true,
height: 15,
start: 1,
end: 35
start: 0,
end: 10
}
],
series: this.series

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-15 08:20:28
* @LastEditors: zwq
* @LastEditTime: 2022-07-07 09:48:49
* @LastEditTime: 2022-11-23 09:42:21
* @Description:
*/
/**
@@ -40,7 +40,8 @@ const mainRoutes = {
// 2. iframeUrl: 是否通过iframe嵌套展示内容, '以http[s]://开头': 是, '': 否
// 提示: 如需要通过iframe嵌套展示内容, 但不通过tab打开, 请自行创建组件使用iframe处理!
{ path: '/home', component: _import('common/home'), name: 'home', meta: { title: '首页', isTab: true } },
{ path: '/orderProcess', component: _import('common/order-process'), name: 'orderProcess', meta: { title: '订单加工', isTab: true } },
{ path: '/Problem', component: _import('common/Problem'), name: 'Problem', meta: { title: '常见问题汇总', isTab: true } },
{ path: '/orderProcess', component: _import('common/order-process'), name: 'orderProcess', meta: { title: '单步骤任务', isTab: true } },
{ path: '/orderAuto', component: _import('common/order-auto'), name: 'orderAuto', meta: { title: '自动任务', isTab: true } },
{ path: '/exWarehouse', component: _import('common/ex-warehouse'), name: 'exWarehouse', meta: { title: '货物出库', isTab: true } },
{ path: '/addProcess', component: _import('common/add-process'), name: 'addProcess', meta: { title: '追加加工', isTab: true } },
@@ -56,10 +57,13 @@ const mainRoutes = {
{ path: '/order-current-order', component: _import('order/current-order'), name: 'order-current-order', meta: { title: '当前订单列表', isTab: true } },
{ path: '/order-current-order-task', component: _import('order/components/current-order-task'), name: 'order-current-order-task', meta: { title: '当前订单任务详情', isTab: true } },
{ path: '/order-current-task', component: _import('order/current-task'), name: 'order-current-task', meta: { title: '当前任务列表', isTab: true } },
{ path: '/order-current-task-new', component: _import('order/current-task-new'), name: 'order-current-task-new', meta: { title: '任务列表', isTab: true } },
{ path: '/order-current-task-detail', component: _import('order/components/current-task-detail'), name: 'order-current-task-detail', meta: { title: '当前执行任务详情', isTab: true } },
{ path: '/report-kiln-alarm', component: _import('report/kiln-alarm'), name: 'report-kiln-alarm', meta: { title: '工业炉报警', isTab: true } },
{ path: '/report-car-alarm', component: _import('report/car-alarm'), name: 'report-car-alarm', meta: { title: '车辆运行报警', isTab: true } },
{ path: '/report-order-history', component: _import('report/order-history'), name: 'report-order-history', meta: { title: '订单历史列表', isTab: true } },
{ path: '/report-APMS-table', component: _import('report/APMS-table'), name: 'report-APMS-table', meta: { title: 'APMS报工', isTab: true } },
{ path: '/report-APMS-work', component: _import('report/APMS-work'), name: 'report-APMS-work', meta: { title: 'APMS未出单报工', isTab: true } },
{ path: '/report-order-history-task', component: _import('report/components/order-history-task'), name: 'report-order-history-task', meta: { title: '订单历史任务详情', isTab: true } },
{ path: '/report-task-history', component: _import('report/task-history'), name: 'report-task-history', meta: { title: '执行任务历史列表', isTab: true } },
{ path: '/report-task-history-detail', component: _import('report/components/task-history-detail'), name: 'report-task-history-detail', meta: { title: '执行任务历史详情', isTab: true } },

View File

@@ -1,3 +1,10 @@
/*
* @Author: zwq
* @Date: 2021-11-15 08:20:28
* @LastEditors: zwq
* @LastEditTime: 2022-11-30 15:44:44
* @Description:
*/
/**
* 邮箱
* @param {*} s
@@ -29,3 +36,11 @@ export function isPhone (s) {
export function isURL (s) {
return /^http[s]?:\/\/.*/.test(s)
}
/**
* 配炉号
* @param {*} s
*/
export function isStoveCode (s) {
return /^[A-Z]{3}\d{1}\W{1}\d{2}\W{1}\d{10}$/.test(s)
}

View File

@@ -0,0 +1,96 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2022-08-11 16:51:45
* @Description:
-->
<template>
<el-dialog title="新增" :visible.sync="visible">
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="80px"
>
<el-form-item label="问题" prop="question">
<el-input
type="textarea"
:rows="3"
v-model="dataForm.question"
placeholder="问题"
></el-input>
</el-form-item>
<el-form-item label="解答" prop="answer">
<el-input
type="textarea"
:rows="5"
v-model="dataForm.answer"
placeholder="解答"
></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data () {
return {
visible: false,
dataForm: {
question: '',
answer: ''
},
dataRule: {
question: [
{ required: true, message: '问题不能为空', trigger: 'blur' }
],
answer: [{ required: true, message: '解答不能为空', trigger: 'blur' }]
}
}
},
methods: {
init () {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
})
},
// 表单提交
dataFormSubmit () {
this.$refs['dataForm'].validate(valid => {
if (valid) {
this.$http({
url: this.$http.adornUrl('/questionAnswer/add'),
method: 'post',
data: this.$http.adornData({
question: this.dataForm.question,
answer: this.dataForm.answer
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
} else {
this.$message.error(data.msg)
}
})
}
})
}
}
}
</script>

View File

@@ -0,0 +1,106 @@
<!--
* @Author: zwq
* @Date: 2022-08-11 16:22:07
* @LastEditors: zwq
* @LastEditTime: 2022-08-11 16:48:39
* @Description:
-->
<template>
<div class="mod-config">
<el-form
:inline="true"
style="display: flex; align-items: center; justify-content: right;"
@keyup.enter.native="getDataList()"
>
<el-form-item>
<el-input
size="small"
v-model="key"
placeholder="搜索问题"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" @click="getDataList()">
<icon-svg class="iconClass" name="sousuo"></icon-svg>
查询
</el-button>
<el-button size="small" type="primary" @click="addOrUpdateHandle()">
<icon-svg class="iconClass" name="新建"></icon-svg>
新增
</el-button>
</el-form-item>
</el-form>
<el-collapse v-model="activeNames">
<el-collapse-item
v-for="(item, index) in problemArr"
:key="index"
:name="index"
>
<template slot="title">
<span style="color:#409EFF">
{{ item.question }}<i class="el-icon-question"></i>
</span>
</template>
<div>
{{ item.answer }}
</div>
</el-collapse-item>
</el-collapse>
<!-- 弹窗, 新增 / 修改 -->
<problem-add
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList"
></problem-add>
</div>
</template>
<script>
import ProblemAdd from './Problem-add'
export default {
data () {
return {
key: '',
addOrUpdateVisible: false,
activeNames: [],
problemArr: []
}
},
components: {
ProblemAdd
},
created () {
this.getDataList()
},
methods: {
getDataList () {
this.$http({
url: this.$http.adornUrl('/questionAnswer/page'),
method: 'post',
data: this.$http.adornData({
current: 1,
size: 200,
key: this.key
// paramKey: this.dataForm.paramKey
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.problemArr = data.data.records
} else {
this.problemArr = []
}
})
},
// 新增
addOrUpdateHandle () {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init()
})
}
}
}
</script>
<style></style>

View File

@@ -134,7 +134,11 @@ export default {
},
init (row, idx) {
this.visible = true
this.row = null
this.editIndex = null
this.formLoading = false
this.dataForm.targetQuantity = null
this.dataForm.targetWeight = null
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (row) {
@@ -181,7 +185,8 @@ export default {
} else if (sessionStorage.getItem('autoTaskList')) {
const taskList = JSON.parse(sessionStorage.getItem('autoTaskList'))
taskList.push(this.dataForm)
sessionStorage.setItem('autoTaskList', JSON.stringify(taskList))
const taskList1 = taskList.reduce((all, next) => all.some((item) => item.idenCardNum === next.idenCardNum) ? all : [...all, next], [])
sessionStorage.setItem('autoTaskList', JSON.stringify(taskList1))
} else {
const arr = [this.dataForm]
sessionStorage.setItem('autoTaskList', JSON.stringify(arr))

View File

@@ -2,14 +2,14 @@
* @Author: gtz
* @Date: 2022-03-04 10:22:13
* @LastEditors: zwq
* @LastEditTime: 2022-07-13 10:11:05
* @LastEditTime: 2022-08-05 09:05:08
* @Description: file content
* @FilePath: \mt-qj-wms-ui\src\views\common\order-auto-submit.vue
-->
<template>
<el-dialog
:title="!row ? '新增' : '修改'"
title="提交任务"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" v-loading="formLoading" :rules="dataRule" ref="dataForm" label-width="120px">
@@ -140,7 +140,6 @@
},
dataList: [],
formLoading: false,
row: null,
editIndex: null,
processDis: {
secProcess: false,

View File

@@ -159,7 +159,8 @@
} else if (sessionStorage.getItem('taskList')) {
const taskList = JSON.parse(sessionStorage.getItem('taskList'))
taskList.push(this.dataForm)
sessionStorage.setItem('taskList', JSON.stringify(taskList))
const taskList1 = taskList.reduce((all, next) => all.some((item) => item.idenCardNum === next.idenCardNum) ? all : [...all, next], [])
sessionStorage.setItem('taskList', JSON.stringify(taskList1))
} else {
const arr = [this.dataForm]
sessionStorage.setItem('taskList', JSON.stringify(arr))

View File

@@ -0,0 +1,144 @@
<!--
* @Author: gtz
* @Date: 2022-03-04 10:22:13
* @LastEditors: zwq
* @LastEditTime: 2022-08-05 09:29:56
* @Description: file content
* @FilePath: \mt-qj-wms-ui\src\views\common\order-auto-submit.vue
-->
<template>
<el-dialog
title="提交任务"
:visible.sync="visible">
<el-form :model="dataForm" v-loading="formLoading" :rules="dataRule" ref="dataForm" label-width="120px">
<el-form-item label="加工类型" prop="processType">
<el-select v-model="dataForm.processType" size="small" placeholder="加工类型" clearable>
<el-option :value="0" label="初始加工" />
<el-option :value="1" label="复加工" />
</el-select>
</el-form-item>
<el-form-item label="加工起点" prop="startPosition" style="margin-bottom: 24px">
<el-select v-model="dataForm.startPosition" size="small" placeholder="任务起点位置" clearable>
<el-option value="YYT001" label="液压台1" />
<el-option value="YYT002" label="液压台2" />
<el-option value="YYT003" label="液压台3" />
<el-option value="YYT004" label="液压台4" />
</el-select>
<!-- <el-button style="margin-left:10px" type="primary" @click="getPoint(0)">{{startPosition}}</el-button> -->
</el-form-item>
<el-form-item label="加工炉" prop="kilnId" style="margin-bottom: 24px">
<el-select v-model="dataForm.kilnId" size="small" @change="handleChange($event)" placeholder="加工炉" clearable>
<el-option v-for="item in kilnList" :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 label="工艺" prop="craftCode" style="margin-bottom: 24px">
<el-select v-model="dataForm.craftCode" placeholder="工艺">
<el-option v-for="item in processList" :key="item.id" :value="item.code" :label="item.craftCode" />
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" :loading="btnLoad" @click="dataFormSubmit()">确定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
props: {
kilnList: {
type: Array,
default: () => []
},
processList: {
type: Array,
default: () => []
}
},
data () {
return {
visible: false,
btnLoad: false,
dataForm: {
craftCode: null,
processType: null,
startPosition: null,
kilnId: null
},
dataRule: {
craftCode: [
{ required: true, message: '工艺不能为空', trigger: 'blur' }
],
processType: [
{ required: true, message: '加工类型不能为空', trigger: 'blur' }
],
startPosition: [
{ required: true, message: '加工起点不能为空', trigger: 'blur' }
],
kilnId: [
{ required: true, message: '工业炉不能为空', trigger: 'blur' }
]
},
dataList: [],
formLoading: false
}
},
methods: {
handleChange (e) {
this.dataForm.craftCode = null
this.kilnList.find(item => {
if (item.id === e) {
if (item.type === 4) {
this.dataForm.craftCode = 1
}
}
}
)
},
init (list) {
this.dataList.splice(0, this.dataList.length)
this.dataList = list
this.btnLoad = false
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
})
},
// 表单提交
dataFormSubmit () {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.btnLoad = true
this.$http({
url: this.$http.adornUrl(`/currTask/createProcessTask`),
method: 'post',
data: this.$http.adornData({
craftCode: this.dataForm.craftCode,
detParams: this.dataList,
kilnId: this.dataForm.kilnId,
processType: this.dataForm.processType,
startPosition: this.dataForm.startPosition,
targetPosition: this.dataForm.kilnId
// this.targetPosition
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message.success('任务提交成功')
this.btnLoad = false
this.visible = false
sessionStorage.setItem('taskList', '')
this.$emit('refreshDataList')
} else {
this.btnLoad = false
this.$message.warning(data.msg)
}
})
}
})
}
}
}
</script>

View File

@@ -7,34 +7,8 @@
新增
</el-button>
</el-form-item>
<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:1%">
<el-select v-model="startPosition" size="small" placeholder="任务起点位置" clearable>
<el-option value="YYT001" label="液压台1" />
<el-option value="YYT002" label="液压台2" />
<el-option value="YYT003" label="液压台3" />
<el-option value="YYT004" 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: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>
<el-select v-model="craftCode" placeholder="工艺">
<el-option v-for="item in processList" :key="item.id" :value="item.code" :label="item.craftCode" />
</el-select>
</el-form-item>
<el-form-item style="margin-left:1%">
<el-button type="primary" size="small" :loading="btnLoad" @click="submitTask()">提交任务</el-button>
<el-button type="primary" size="small" @click="submitTask()">提交任务</el-button>
</el-form-item>
</el-form>
<el-table
@@ -110,22 +84,24 @@
</el-table>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
<submit-form v-if="submitFormVisible" ref="submitForm" :kilnList="eqList" :processList="processList" @refreshDataList="getDataList" />
<process-point v-if="processPointVisible" ref="processPoint" @refreshPoint="setPoint"></process-point>
</div>
</template>
<script>
import AddOrUpdate from './order-process-add'
import SubmitForm from './order-process-submit'
import ProcessPoint from './order-process-point'
export default {
data () {
return {
btnLoad: false,
startPosition: '',
kilnId: '',
craftCode: '',
targetPosition: '',
dataList: [],
submitFormVisible: false,
processType: null,
dataListLoading: false,
addOrUpdateVisible: false,
@@ -136,7 +112,8 @@
},
components: {
AddOrUpdate,
ProcessPoint
ProcessPoint,
SubmitForm
},
activated () {
this.getEqList()
@@ -207,62 +184,13 @@
}
},
submitTask () {
if (this.dataList.length === 0) {
this.$message({
message: '任务为空,请新增一条托盘信息',
type: 'warning'
if (this.dataList.length) {
this.submitFormVisible = true
this.$nextTick(() => {
this.$refs.submitForm.init(this.dataList)
})
} else if (!this.startPosition) {
this.$message({
message: '请选择任务起点',
type: 'warning'
})
} else if (!this.kilnId) {
this.$message({
message: '请选择工业炉',
type: 'warning'
})
} else if (!this.craftCode) {
this.$message({
message: '请选择工艺',
type: 'warning'
})
} else if (this.processType !== 0 && this.processType !== 1) {
this.$message.warning('请选择加工类型')
} else {
this.btnLoad = true
this.$confirm(`确定提交任务?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl(`/currTask/createProcessTask`),
method: 'post',
data: this.$http.adornData({
craftCode: this.craftCode,
detParams: this.dataList,
kilnId: this.kilnId,
processType: this.processType,
startPosition: this.startPosition,
targetPosition: this.kilnId
// this.targetPosition
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message.success('任务提交成功')
this.btnLoad = false
this.dataList = []
sessionStorage.setItem('taskList', '')
this.startPosition = '选择起点'
this.kilnId = '选择工业炉'
this.targetPosition = null
} else {
this.btnLoad = false
this.$message.warning(data.msg)
}
})
}).catch(() => {})
this.$message.warning('请至少添加一条任务!')
}
},
// 删除

View File

@@ -34,7 +34,7 @@
@click="$router.push({ name: 'orderProcess' })"
>
<icon-svg name="tubiao" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">订单加工</span>
<span slot="title">单步骤任务</span>
</el-menu-item>
<el-menu-item
index="exWarehouse"
@@ -134,6 +134,13 @@
<icon-svg name="editor" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">当前任务列表</span>
</el-menu-item>
<el-menu-item
index="current-task"
@click="$router.push({ name: 'order-current-task-new' })"
>
<icon-svg name="editor" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">任务列表</span>
</el-menu-item>
</el-submenu>
<!-- <el-submenu index="energy">
<template slot="title">
@@ -332,7 +339,25 @@
<icon-svg name="job" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">执行任务历史列表</span>
</el-menu-item>
<el-menu-item
index="report-APMS-table"
@click="$router.push({ name: 'report-APMS-table' })"
>
<icon-svg name="job" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">APMS报工</span>
</el-menu-item>
<el-menu-item
index="report-APMS-work"
@click="$router.push({ name: 'report-APMS-work' })"
>
<icon-svg name="job" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">APMS未出单报工</span>
</el-menu-item>
</el-submenu>
<el-menu-item index="Problem" @click="$router.push({ name: 'Problem' })">
<icon-svg name="log" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">常见问题汇总</span>
</el-menu-item>
<!-- <sub-menu
v-for="menu in menuList"
:key="menu.menuId"

View File

@@ -0,0 +1,150 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2022-09-09 16:26:17
* @Description:
-->
<template>
<el-dialog title="修改"
:before-close="handleClose"
:visible.sync="visible">
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="80px"
>
<el-form-item label="加工炉" prop="kilnId">
<el-select
v-model="dataForm.kilnId"
filterable
placeholder="请选择加工炉"
>
<el-option
v-for="item in kilnInfoArr"
:key="item.id"
:label="item.kilnName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select
v-model="dataForm.status"
filterable
placeholder="请选择状态"
>
<el-option
v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" :loading="btnLoad" @click="dataFormSubmit()">确定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
props: {
kilnInfoArr: {
type: Array,
default: () => {
return []
}
}
},
data () {
return {
visible: false,
btnLoad: false,
dataForm: {
id: '',
kilnId: '',
status: ''
},
statusList: [
{
value: 0,
label: '等待执行'
},
{
value: 1,
label: '执行中'
},
{
value: 2,
label: '执行完成'
}
],
dataRule: {
kilnId: [
{ required: true, message: '加工炉不能为空', trigger: 'change' }
],
status: [{ required: true, message: '状态不能为空', trigger: 'change' }]
}
}
},
methods: {
init (id, status, kilnId) {
this.btnLoad = false
this.dataForm = {
id: '',
kilnId: '',
status: ''
}
this.dataForm.id = id
this.dataForm.status = status
this.dataForm.kilnId = kilnId
this.visible = true
},
// 表单提交
dataFormSubmit () {
this.$refs['dataForm'].validate(valid => {
if (valid) {
this.btnLoad = true
this.$http({
url: this.$http.adornUrl('/currTask/updateCurrTaskStatus'),
method: 'post',
data: this.$http.adornData({
id: this.dataForm.id || undefined,
kilnId: this.dataForm.kilnId,
status: this.dataForm.status
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.btnLoad = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
} else {
this.btnLoad = false
this.$message.error(data.msg)
}
})
}
})
},
handleClose () {
this.visible = false
this.$refs['dataForm'].resetFields()
}
}
}
</script>

View File

@@ -0,0 +1,158 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2022-11-21 14:43:03
* @Description:
-->
<template>
<el-dialog title="修改" :before-close="handleClose" :visible.sync="visible">
<el-form
:rules="dataRule"
v-if="showForm"
ref="dataForm"
>
<el-form-item
:label="
item.idenCardNum + '--' + item.customer + '--' + item.productName
"
v-for="(item, index) in subList"
:key="item.id"
>
<el-input v-model="item.quantity" placeholder="数量"
><template slot="prepend"
>数量:</template
></el-input
>
<el-input v-model="item.weight" placeholder="重量"
><template slot="prepend"
>重量:</template
></el-input
>
<el-button
type="text"
style="color:red"
size="small"
@click="deleteHandle(index)"
>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<icon-svg class="iconClass" name="删除"></icon-svg>
</el-tooltip>
</el-button>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" :loading="btnLoad" @click="dataFormSubmit()"
>确定</el-button
>
</span>
</el-dialog>
</template>
<script>
export default {
data () {
return {
visible: false,
btnLoad: false,
showForm: false,
subList: [],
updataList: [],
autoExeTaskId: '',
dataRule: {}
}
},
methods: {
init (allStep, autoExeTaskId, dataList, updataList) {
this.btnLoad = false
this.showForm = false
this.autoExeTaskId = autoExeTaskId
this.updataList = updataList
const list = JSON.parse(JSON.stringify(dataList))
this.subList = list.filter(item => {
if (item.allStep === allStep) {
this.showForm = true
return item
}
})
this.visible = true
},
// 表单提交
dataFormSubmit () {
const arr = this.updataList.filter(item => {
if (item.autoExeTaskId === this.autoExeTaskId) {
item.currTaskDetVoList.forEach(item1 => {
const index = this.subList.findIndex(value => { return value.id === item1.id })
item1.weight = this.subList[index].weight
item1.quantity = this.subList[index].quantity
})
return item
}
})
if (this.showForm) {
this.btnLoad = true
this.$http({
url: this.$http.adornUrl('/currTask/oneStepToApms'),
method: 'post',
data: this.$http.adornData(
arr[0], false
)
}).then(({ data }) => {
if (data && data.code === 0) {
this.btnLoad = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
} else {
this.btnLoad = false
this.$message.error(data.msg)
}
})
}
// this.$refs['dataForm'].validate(valid => {
// if (valid) {
// this.btnLoad = true
// this.$http({
// url: this.$http.adornUrl('/currTask/updateCurrTaskStatus'),
// method: 'post',
// data: this.$http.adornData({
// id: this.dataForm.id || undefined,
// kilnId: this.dataForm.kilnId,
// status: this.dataForm.status
// })
// }).then(({ data }) => {
// if (data && data.code === 0) {
// this.btnLoad = false
// this.$message({
// message: '操作成功',
// type: 'success',
// duration: 1500,
// onClose: () => {
// this.visible = false
// this.$emit('refreshDataList')
// }
// })
// } else {
// this.btnLoad = false
// this.$message.error(data.msg)
// }
// })
// }
// })
},
deleteHandle (index) {
this.subList.splice(index, 1)
},
handleClose () {
this.visible = false
}
}
}
</script>

View File

@@ -0,0 +1,251 @@
<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="taskCode" label="任务编码"> </el-table-column>
<el-table-column align="center" width="180" prop="stoveCode" label="炉号">
</el-table-column>
<el-table-column prop="createTime" label="发起时间">
<template slot-scope="scope">
{{
scope.row.createTime ? scope.row.createTime.replace("T", " ") : ""
}}
</template>
</el-table-column>
<el-table-column prop="kilnName" label="工业炉">
<template slot-scope="scope">
<span>{{
kilnInfoArr.find(item => {
return item.id === scope.row.kilnId;
})
? kilnInfoArr.find(item => {
return item.id === scope.row.kilnId;
}).kilnName
: ""
}}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="任务状态">
<template slot-scope="scope">
{{ scope.row.status >= 0 ? statusList[scope.row.status] : "" }}
</template>
</el-table-column>
<!-- <el-table-column prop="taskType" label="任务类型">
<template slot-scope="scope">
<span>{{
scope.row.taskType === 0
? "入库到工业炉"
: scope.row.taskType === 1
? "入库到缓存"
: scope.row.taskType === 2
? "工业炉出库到缓存区"
: "缓存区出库"
}}</span>
</template>
</el-table-column> -->
<el-table-column prop="isAuto" label="多步骤">
<template slot-scope="scope">
<span>{{ scope.row.isAuto === 1 ? "是" : "否" }}</span>
</template>
</el-table-column>
<el-table-column prop="craftCodeId" label="工艺"> </el-table-column>
<el-table-column prop="startPosition" label="开始位置"> </el-table-column>
<el-table-column prop="targetPosition" label="目标位置">
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="150"
label="操作"
>
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click="
addOrUpdateHandle(
scope.row.id,
scope.row.status,
scope.row.kilnId
)
"
>
<el-tooltip
class="item"
effect="dark"
content="修改"
placement="top"
>
<icon-svg class="iconClass" name="编辑"></icon-svg>
</el-tooltip>
</el-button>
<el-button
type="text"
:disabled="scope.row.status === 1"
:loading="btnLoading"
size="small"
@click="runTask(scope.row.id)"
>
<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.row.id)"
>
<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>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update
v-if="addOrUpdateVisible"
ref="addOrUpdate"
:kiln-info-arr="kilnInfoArr"
@refreshDataList="reDataList"
></add-or-update>
</div>
</template>
<script>
import AddOrUpdate from './current-task-new-add'
// 任务状态列表
const statusList = {
0: '等待执行',
1: '执行中',
2: '执行完成'
}
export default {
props: {
dataList: {
type: Array,
default: () => {
return []
}
},
kilnInfoArr: {
type: Array,
default: () => {
return []
}
}
},
data () {
return {
statusList,
btnLoading: false,
addOrUpdateVisible: false
}
},
components: {
AddOrUpdate
},
activated () {},
methods: {
init () {
this.btnLoading = false
console.log(1)
},
// 新增 / 修改
addOrUpdateHandle (id, status, kilnId) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id, status, kilnId)
})
},
reDataList () {
this.$emit('refreshDataList')
},
// 删除
deleteHandle (id) {
this.$confirm(`确定对[${id}]进行删除操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$http({
url: this.$http.adornUrl('/currTask/deleteById'),
method: 'post',
data: this.$http.adornData({ id })
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.reDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
})
.catch(() => {})
},
// 执行
runTask (id) {
this.btnLoading = true
this.$http({
url: this.$http.adornUrl('/currTask/runTask'),
method: 'post',
data: this.$http.adornData({ id })
// params: this.$http.adornParams({ id }, false)
}).then(({ data }) => {
if (data && data.code === 0) {
this.btnLoading = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.reDataList()
}
})
} else {
this.btnLoading = false
this.$message.error(data.msg)
}
})
}
}
}
</script>
<style></style>

View File

@@ -0,0 +1,78 @@
<!--
* @Author: zwq
* @Date: 2022-09-09 14:35:52
* @LastEditors: zwq
* @LastEditTime: 2022-09-09 15:25:54
* @Description:
-->
<template>
<div style="margin:20px">
<el-table
:data="detDataList"
:stripe="true"
size="mini"
ref="detDataList"
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="idenCardNum" label="标识卡号"> </el-table-column>
<el-table-column prop="orderNo" label="订单名"> </el-table-column>
<el-table-column prop="customer" label="客户名称"> </el-table-column>
<el-table-column prop="productName" label="产品名称"> </el-table-column>
<el-table-column prop="productModel" label="产品型号"> </el-table-column>
<el-table-column prop="materialDes" label="材料号牌"> </el-table-column>
<el-table-column prop="craftIll" width="120" label="生产工艺要求">
</el-table-column>
<el-table-column prop="unit" label="单位"> </el-table-column>
<el-table-column prop="quantity" label="数量"> </el-table-column>
<el-table-column prop="weight" label="重量"> </el-table-column>
</el-table>
</div>
</template>
<script>
// 任务状态列表
const statusList = {
0: '等待执行',
1: '执行中',
2: '执行完成',
3: '追加后完成'
}
export default {
props: {
detDataList: {
type: Array,
default: () => {
return []
}
}
},
data () {
return {
statusList
}
},
components: {
},
activated () {},
methods: {
init () {
console.log(2)
}
}
}
</script>
<style></style>

View File

@@ -0,0 +1,105 @@
<!--
* @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>

View File

@@ -2,10 +2,13 @@
<div class="mod-config">
<el-form style="display: flex; align-items: center; justify-content: right;" :inline="true" ref="dataForm" :rules="dataRule" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-input size="small" v-model="dataForm.idenCardNum" placeholder="标识卡号" />
<el-input size="small" v-model="dataForm.idenCardNum" clearable placeholder="标识卡号" />
</el-form-item>
<el-form-item>
<el-input size="small" v-model="dataForm.idenCardNum" placeholder="订单号" />
<el-input size="small" v-model="dataForm.orderNo" clearable placeholder="订单号" />
</el-form-item>
<el-form-item>
<el-input size="small" v-model="dataForm.customerName" clearable placeholder="客户名称" />
</el-form-item>
<el-form-item>
<el-button size="small" @click="getDataList()">查询</el-button>
@@ -24,21 +27,10 @@
label="序号"
width="50">
</el-table-column>
<el-table-column
prop="createTime"
label="获取时间">
<template slot-scope="scope">
{{ scope.row.createTime ? scope.row.createTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<el-table-column
prop="idenCardNum"
label="标识卡号">
</el-table-column>
<el-table-column
prop="orderNo"
label="订单号">
</el-table-column>
<el-table-column
prop="status"
label="任务状态">
@@ -69,10 +61,29 @@
prop="quantity"
label="物料数量">
</el-table-column>
<el-table-column
prop="targetQuantity"
label="剩余数量">
</el-table-column>
<el-table-column
prop="weight"
label="物料重量">
</el-table-column>
<el-table-column
prop="targetWeight"
label="剩余重量">
</el-table-column>
<el-table-column
prop="orderNo"
label="订单号">
</el-table-column>
<el-table-column
prop="createTime"
label="获取时间">
<template slot-scope="scope">
{{ scope.row.createTime ? scope.row.createTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
@@ -145,7 +156,8 @@
return {
dataForm: {
idenCardNum: '',
orderNo: ''
orderNo: '',
customerName: ''
},
dataList: [],
options1: [],
@@ -156,12 +168,6 @@
dataListLoading: false,
orderDetailVisible: false,
dataRule: {
idenCardNum: [
{ required: true, message: '标识卡号不能为空', trigger: 'change' }
],
orderNo: [
{ required: true, message: '订单号不能为空', trigger: 'change' }
]
},
statusList,
orderVoidList
@@ -184,11 +190,16 @@
'current': this.pageIndex,
'size': this.pageSize,
'orderNo': this.dataForm.orderNo,
'idenCardNum': this.dataForm.idenCardNum
'idenCardNum': this.dataForm.idenCardNum,
'customerName': this.dataForm.customerName
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.data.records
this.dataList.forEach(item => {
item.targetQuantity = item.quantity - item.finishQuantity - item.waitQuantity
item.targetWeight = item.weight - item.finishWeight - item.waitWeight
})
this.totalPage = data.data.total
} else {
this.dataList = []

View File

@@ -0,0 +1,196 @@
<template>
<div class="mod-config">
<el-table
:data="dataList"
:row-class-name="tableRowClassName"
:header-cell-style="{
background: '#eef1f6',
color: '#606266',
height: '56px'
}"
v-loading="dataListLoading"
style="width: 100%;"
ref="dataList"
>
<el-table-column type="expand">
<template slot-scope="props">
<div style="height:300px">
<el-tabs @tab-click="val => handleClick(val, props.row)">
<el-tab-pane label="任务步骤详情">
<tab-table1
:data-list="props.row.currTaskVoList"
:kiln-info-arr="kilnInfoArr"
ref="tab1Ref"
@refreshDataList="getDataList"
>
</tab-table1>
</el-tab-pane>
<el-tab-pane label="缓存详情">
<tab-table3
:data-list="props.row.inStockInfoVoList"
ref="tab3Ref"
@refreshDataList="getDataList"
>
</tab-table3>
</el-tab-pane>
<el-tab-pane label="标识卡详情">
<tab-table2
:det-data-list="props.row.currTaskDetVoList"
ref="tab2Ref"
@refreshDataList="getDataList"
>
</tab-table2>
</el-tab-pane>
</el-tabs>
</div>
</template>
</el-table-column>
<el-table-column
type="index"
header-align="center"
align="center"
label="序号"
width="50"
>
</el-table-column>
<el-table-column prop="status" label="状态">
<template slot-scope="scope">
<span>{{
scope.row.status === 0
? "等待执行"
: scope.row.status === 1
? "执行中"
: "缓存中"
}}</span>
</template>
</el-table-column>
<el-table-column prop="allStep" width="250" label="所有步骤">
</el-table-column>
<el-table-column prop="nowStep" label="当前步骤"> </el-table-column>
<el-table-column prop="isAuto" label="多步骤">
<template slot-scope="scope">
<span>{{ scope.row.isAuto === 0 ? "" : "" }}</span>
</template>
</el-table-column>
<el-table-column prop="sheetNo" label="生产单号"> </el-table-column>
<el-table-column prop="startPosition" label="开始位置"> </el-table-column>
<el-table-column
prop="createTime"
header-align="center"
align="center"
label="添加时间"
>
<template slot-scope="scope">
{{
scope.row.createTime ? scope.row.createTime.replace("T", " ") : ""
}}
</template>
</el-table-column>
</el-table>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList"
></add-or-update>
</div>
</template>
<script>
import AddOrUpdate from './components/current-task-new-add'
import tabTable1 from './components/current-task-new-table1'
import tabTable2 from './components/current-task-new-table2'
import tabTable3 from './components/current-task-new-table3'
export default {
data () {
return {
dataList: [],
kilnInfoArr: [],
dataListLoading: false,
addOrUpdateVisible: false
}
},
components: {
AddOrUpdate,
tabTable1,
tabTable2,
tabTable3
},
activated () {
this.getDataList()
},
created () {
this.$http({
url: this.$http.adornUrl('/kilnInfo/list'),
method: 'post',
data: this.$http.adornData({
current: 1,
size: 500
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.kilnInfoArr = data.data
} else {
this.kilnInfoArr = []
}
})
},
methods: {
// 获取数据列表
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/currTask/currentTaskInfo'),
method: 'post',
data: this.$http.adornData({
current: 1,
size: 500
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.data
} else {
this.dataList = []
}
this.dataListLoading = false
})
},
// 新增 / 修改
addOrUpdateHandle (id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id)
})
},
handleClick (tab) {
if (tab.index === '0') {
this.$nextTick(() => {
this.$refs.tab1Ref.init()
})
} else {
this.$nextTick(() => {
this.$refs.tab2Ref.init()
})
}
},
tableRowClassName ({ row, rowIndex }) {
if (row.status === 1) {
return 'success-row'
} else if (row.status === 2) {
return 'warning-row'
}
return ''
}
}
}
</script>
<style>
.el-table .warning-row {
background-color: oldlace;
}
.el-table .success-row {
background-color: #f0f9eb;
}
</style>

View File

@@ -1,5 +1,9 @@
<template>
<div class="mod-config">
<div style="margin-bottom:10px;float:right">
<el-tag type="success">加工中</el-tag>
<el-tag type="warning">缓存中</el-tag>
</div>
<!-- <el-form style="display: flex; align-items: center; justify-content: right;" :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-select size="small" v-model="dataForm.vehicleId" filterable placeholder="车辆名称">
@@ -19,12 +23,12 @@
</el-form> -->
<el-table
:data="dataList"
:stripe="true"
:header-cell-style="{
background: '#eef1f6',
color: '#606266',
height: '56px'
}"
:row-class-name="tableRowClassName"
v-loading="dataListLoading"
style="width: 100%;"
>
@@ -64,14 +68,10 @@
</el-table-column>
<el-table-column prop="isAuto" label="多步骤">
<template slot-scope="scope">
<span>{{
scope.row.isAuto === 1
? "是"
: "否"
}}</span>
<span>{{ scope.row.isAuto === 1 ? "是" : "否" }}</span>
</template>
</el-table-column>
<el-table-column prop="craftName" label="工艺"> </el-table-column>
<el-table-column prop="craftCodeId" label="工艺"> </el-table-column>
<el-table-column prop="startPosition" label="开始位置"> </el-table-column>
<el-table-column prop="targetPosition" label="目标位置">
</el-table-column>
@@ -112,6 +112,7 @@
<el-button
type="text"
:disabled="scope.row.status === 1"
:loading="btnLoading"
size="small"
@click="addOrUpdateHandle(scope.row.id)"
>
@@ -121,7 +122,7 @@
content="执行"
placement="top"
>
<icon-svg class="iconClass" name="维护开始"></icon-svg>
<icon-svg class="iconClass" name="维护开始"></icon-svg>
</el-tooltip>
</el-button>
<el-button
@@ -147,7 +148,7 @@
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[10, 20, 30, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"
@@ -174,8 +175,9 @@ export default {
dataList: [],
options: [],
pageIndex: 1,
pageSize: 10,
pageSize: 30,
totalPage: 0,
btnLoading: false,
dataListLoading: false,
statusList,
processList: []
@@ -184,25 +186,26 @@ export default {
activated () {
this.getDataList()
this.timer = setInterval(this.getDataList, 180000)
this.$http({
url: this.$http.adornUrl('/craftInfo/page'),
method: 'post',
data: this.$http.adornData({
current: 1,
size: 999
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.processList = data.data.records
} else {
this.processList.splice(0, this.processList.length)
}
})
// this.$http({
// url: this.$http.adornUrl('/craftInfo/page'),
// method: 'post',
// data: this.$http.adornData({
// current: 1,
// size: 999
// })
// }).then(({ data }) => {
// if (data && data.code === 0) {
// this.processList = data.data.records
// } else {
// this.processList.splice(0, this.processList.length)
// }
// })
},
methods: {
// 获取数据列表
getDataList () {
this.dataListLoading = true
this.btnLoading = false
this.$http({
url: this.$http.adornUrl('/currTask/currentTaskNow'),
method: 'post',
@@ -214,13 +217,13 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
const resData = data.data.records
resData.forEach(item => {
if (item.craftCodeId) {
this.processList.find(item1 => {
if (item1.id === item.craftCodeId) { item.craftName = item1.craftCode }
})
}
})
// resData.forEach(item => {
// if (item.craftCodeId) {
// this.processList.find(item1 => {
// if (item1.id === item.craftCodeId) { item.craftName = item1.craftCode }
// })
// }
// })
this.dataList = resData
this.totalPage = data.data.total
} else {
@@ -249,6 +252,7 @@ export default {
},
// 执行
addOrUpdateHandle (id) {
this.btnLoading = true
this.$http({
url: this.$http.adornUrl('/currTask/runTask'),
method: 'post',
@@ -256,6 +260,7 @@ export default {
// params: this.$http.adornParams({ id }, false)
}).then(({ data }) => {
if (data && data.code === 0) {
this.btnLoading = false
this.$message({
message: '操作成功',
type: 'success',
@@ -265,6 +270,7 @@ export default {
}
})
} else {
this.btnLoading = false
this.$message.error(data.msg)
}
})
@@ -317,6 +323,14 @@ export default {
})
})
.catch(() => {})
},
tableRowClassName ({ row, rowIndex }) {
if (row.status === 1) {
return 'success-row'
} else if (row.isCache === 1) {
return 'warning-row'
}
return ''
}
},
beforeDestroy () {
@@ -324,3 +338,13 @@ export default {
}
}
</script>
<style>
.el-table .warning-row {
background-color: oldlace;
}
.el-table .success-row {
background-color: #f0f9eb;
}
</style>

View File

@@ -0,0 +1,200 @@
<template>
<div class="mod-config">
<el-table
:data="dataList"
:span-method="objectSpanMethod"
:header-cell-style="{background:'#eef1f6',color:'#606266',height: '56px'}"
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 prop="allStep" width="250" label="所有步骤"></el-table-column>
<el-table-column prop="idenCardNum" label="标识卡号"> </el-table-column>
<el-table-column prop="orderNo" label="订单名"> </el-table-column>
<el-table-column prop="customer" label="客户名称"> </el-table-column>
<el-table-column prop="productName" label="产品名称"> </el-table-column>
<el-table-column prop="productModel" label="产品型号"> </el-table-column>
<el-table-column prop="materialDes" label="材料号牌"> </el-table-column>
<el-table-column prop="craftIll" width="120" label="生产工艺要求">
</el-table-column>
<el-table-column prop="unit" label="单位"> </el-table-column>
<el-table-column prop="quantity" label="数量"> </el-table-column>
<el-table-column prop="weight" label="重量"> </el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="150"
label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.allStep,scope.row.autoExeTaskId)">
<el-tooltip class="item" effect="dark" content="修改" placement="top">
<icon-svg class="iconClass" name="编辑"></icon-svg>
</el-tooltip>
</el-button>
<el-button type="text" size="small" @click="completeOrder(scope.row.autoExeTaskId)">
报工
</el-button>
</template>
</el-table-column>
</el-table>
<tableEdit
v-if="tableEditVisible"
ref="tableEdit"
@refreshDataList="getDataList"
></tableEdit>
</div>
</template>
<script>
import tableEdit from './components/APMS-table-edit'
export default {
data () {
return {
dataList: [],
updataList: [],
dataListLoading: false,
tableEditVisible: false
}
},
components: {
tableEdit
},
activated () {
this.getDataList()
},
created () {
},
methods: {
// 获取数据列表
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/currTask/taskInfoNotToApms'),
method: 'post',
data: this.$http.adornData({
current: 1,
size: 500
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = []
this.updataList = JSON.parse(JSON.stringify(data.data))
data.data.forEach(item => {
if (item.currTaskDetVoList.length > 0) {
item.currTaskDetVoList.forEach(item1 => {
item1.allStep = item.allStep
item1.autoExeTaskId = item.autoExeTaskId
})
} else {
let arr = {'allStep': item.allStep}
item.currTaskDetVoList.push(arr)
}
this.dataList = [...this.dataList, ...item.currTaskDetVoList]
})
this.setSpan()
} else {
this.dataList = []
}
this.dataListLoading = false
})
},
setSpan () {
this.dataList.forEach(item => {
item.rowspan = 1
})
// 双层循环
for (let i = 0; i < this.dataList.length; i++) {
for (let j = i + 1; j < this.dataList.length; j++) {
// 此处可根据相同字段进行合并此处是根据的id
if (this.dataList[i].allStep === this.dataList[j].allStep) {
this.dataList[i].rowspan++
this.dataList[j].rowspan--
}
}
// 这里跳过已经重复的数据
i = i + this.dataList[i].rowspan - 1
}
},
objectSpanMethod ({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 1) {
return {
rowspan: row.rowspan,
colspan: 1
}
}
if (columnIndex === 12) {
return {
rowspan: row.rowspan,
colspan: 1
}
}
},
// 新增 / 修改
addOrUpdateHandle (allStep, autoExeTaskId) {
this.tableEditVisible = true
this.$nextTick(() => {
this.$refs.tableEdit.init(allStep, autoExeTaskId, this.dataList, this.updataList)
})
},
handleClick (tab) {
if (tab.index === '0') {
this.$nextTick(() => {
this.$refs.tab1Ref.init()
})
} else {
this.$nextTick(() => {
this.$refs.tab2Ref.init()
})
}
},
tableRowClassName ({ row, rowIndex }) {
if (row.status === 1) {
return 'success-row'
} else if (row.status === 2) {
return 'warning-row'
}
return ''
},
completeOrder (autoExeTaskId) {
const arr = this.updataList.filter(item => {
if (item.autoExeTaskId === autoExeTaskId) {
return item
}
})
this.$http({
url: this.$http.adornUrl('/currTask/oneStepToApms'),
method: 'post',
data: this.$http.adornData(
arr[0], false
)
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500
})
} else {
this.$message.error(data.msg)
}
})
}
}
}
</script>
<style>
.el-table .warning-row {
background-color: oldlace;
}
.el-table .success-row {
background-color: #f0f9eb;
}
</style>

View File

@@ -0,0 +1,331 @@
<template>
<div class="mod-config">
<el-button type="primary" @click="submit()" size="small">提交</el-button>
<el-form
ref="dataForm"
:model="dataForm"
:rules="rules"
size="medium"
label-width="110px"
>
<div>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="开始加工时间" prop="startTime">
<el-date-picker
v-model="dataForm.startTime"
value-format="yyyy-MM-dd HH:mm:ss"
:style="{ width: '100%' }"
type="datetime"
placeholder="请选择开始加工时间"
clearable
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="账号" prop="startUser">
<el-input
v-model="dataForm.startUser"
placeholder="请输入账号"
readonly
prefix-icon="el-icon-user-solid"
:style="{ width: '100%' }"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="配炉号" prop="stoveCode">
<el-input
v-model="dataForm.stoveCode"
placeholder="请输入配炉号"
clearable
:style="{ width: '100%' }"
></el-input>
<!-- <el-select
v-model="dataForm.stoveCode"
:style="{ width: '100%' }"
filterable
placeholder="请选择配炉号"
>
<el-option
v-for="item in stoveCodeArr"
:key="item.id"
:label="item.code"
:value="item.code"
>
</el-option>
</el-select> -->
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="车间编码" prop="workShopCode">
<el-input
v-model="dataForm.workShopCode"
placeholder="请输入车间编码"
readonly
:style="{ width: '100%' }"
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="工艺号" prop="techCode">
<el-select
v-model="dataForm.techCode"
:style="{ width: '100%' }"
filterable
placeholder="请选择工艺号"
>
<el-option
v-for="item in techCodeArr"
:key="item.id"
:label="item.craftCode"
:value="item.craftCode"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="炉号备注" prop="stoveRemark">
<el-input
v-model="dataForm.stoveRemark"
placeholder="请输入炉号备注"
clearable
:style="{ width: '100%' }"
>
</el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="8">
<el-form-item label="备注" prop="remark">
<el-input
v-model="dataForm.remark"
placeholder="请输入备注"
clearable
:style="{ width: '100%' }"
></el-input>
</el-form-item>
</el-col> -->
</el-row>
</div>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>生产单</span>
<el-tooltip effect="dark" content="新增" placement="top">
<el-button
style="float: right; padding: 0px;color:#409EFF;font-size:20px;border:none"
icon="el-icon-circle-plus"
@click="itemsPlus()"
></el-button>
</el-tooltip>
</div>
<div v-for="(item, index) in dataForm.items" :key="index">
<el-row :gutter="20">
<el-col :span="1">
<el-tooltip effect="dark" content="删除" placement="top">
<el-button
style="color:red"
icon="el-icon-delete"
@click="itemsDelete(index)"
></el-button>
</el-tooltip>
</el-col>
<el-col :span="7">
<el-form-item label="标识卡号" prop="itemCode">
<el-input
v-model="item.itemCode"
placeholder="请输入标识卡号"
clearable
:style="{ width: '100%' }"
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="加工数量" prop="quantity">
<el-input-number
v-model="item.quantity"
placeholder="加工数量"
:step="1"
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="加工重量" prop="weight">
<el-input-number
v-model="item.weight"
placeholder="加工重量"
:step="1"
></el-input-number>
</el-form-item>
</el-col>
</el-row>
</div>
</el-card>
</el-form>
</div>
</template>
<script>
import { isStoveCode } from '@/utils/validate'
export default {
components: {},
props: [],
data () {
var validateMobile = (rule, value, callback) => {
if (!isStoveCode(value)) {
callback(new Error('配炉号格式错误'))
} else {
callback()
}
}
return {
stoveCodeArr: [],
techCodeArr: [],
dataForm: {
startTime: null,
startUser: 'QJJP03',
stoveCode: undefined,
workShopCode: 'BM',
techCode: undefined,
stoveRemark: undefined,
remark: undefined,
items: [
{
itemCode: undefined,
quantity: 0,
weight: 0
}
]
},
rules: {
startTime: [
{
required: true,
message: '请选择开始加工时间',
trigger: 'change'
}
],
startUser: [
{
required: true,
message: '请输入账号',
trigger: 'blur'
}
],
stoveCode: [
{
required: true,
message: '请输入配炉号',
trigger: 'blur'
},
{ validator: validateMobile, trigger: 'blur' }
],
workShopCode: [
{
required: true,
message: '请输入车间编码',
trigger: 'blur'
}
],
techCode: [],
stoveRemark: [
{
required: true,
message: '请输入炉号备注',
trigger: 'blur'
}
],
remark: [],
itemCode: []
}
}
},
created () {
this.init()
},
methods: {
init () {
this.$http({
url: this.$http.adornUrl('/kilnInfo/page'),
method: 'post',
data: this.$http.adornData({
current: 1,
size: 200
// paramKey: this.dataForm.paramKey
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.stoveCodeArr = data.data.records
} else {
this.stoveCodeArr = []
}
})
this.$http({
url: this.$http.adornUrl('/craftInfo/page'),
method: 'post',
data: this.$http.adornData({
current: 1,
size: 200
// paramKey: this.dataForm.paramKey
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.techCodeArr = data.data.records
} else {
this.techCodeArr = []
}
})
},
itemsPlus () {
const obj = {
itemCode: undefined,
quantity: 0,
weight: 0
}
this.dataForm.items.push(obj)
},
itemsDelete (index) {
this.dataForm.items.splice(index, 1)
},
submit () {
this.$refs['dataForm'].validate(valid => {
if (valid) {
let scheck = true
this.dataForm.items.find(item => {
if (!item.itemCode) {
scheck = false
}
})
if (scheck) {
this.$http({
url: this.$http.adornUrl('/apms/createProcessSheet'),
method: 'post',
data: this.$http.adornData(this.dataForm)
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 3000,
onClose: () => {
this.$refs['dataForm'].resetFields()
this.dataForm.items.splice(0, this.dataForm.items.length)
this.itemsPlus()
}
})
} else {
this.$message.error(data.msg)
}
})
} else {
this.$message.info('请填写完整生产单')
}
}
})
}
}
}
</script>
<style scoped></style>

View File

@@ -0,0 +1,134 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2022-11-21 16:26:53
* @Description:
-->
<template>
<el-dialog title="修改" :before-close="handleClose" :visible.sync="visible">
<el-form
:rules="dataRule"
v-if="showForm"
ref="dataForm"
>
<el-form-item
:label="
item.idenCardNum + '--' + item.customer + '--' + item.productName
"
v-for="(item, index) in subList"
:key="item.id"
>
<el-input v-model="item.quantity" placeholder="数量"
><template slot="prepend"
>数量:</template
></el-input
>
<el-input v-model="item.weight" placeholder="重量"
><template slot="prepend"
>重量:</template
></el-input
>
<el-button
type="text"
style="color:red"
size="small"
@click="deleteHandle(index)"
>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<icon-svg class="iconClass" name="删除"></icon-svg>
</el-tooltip>
</el-button>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" :loading="btnLoad" @click="dataFormSubmit()"
>确定</el-button
>
</span>
</el-dialog>
</template>
<script>
export default {
data () {
return {
visible: false,
btnLoad: false,
showForm: false,
subList: [],
updataList: [],
autoExeTaskId: '',
dataRule: {}
}
},
methods: {
init (allStep, autoExeTaskId, dataList, updataList) {
this.btnLoad = false
this.showForm = false
this.autoExeTaskId = autoExeTaskId
this.updataList = JSON.parse(JSON.stringify(updataList))
const list = JSON.parse(JSON.stringify(dataList))
this.subList = list.filter(item => {
if (item.allStep === allStep) {
return item
}
})
if (this.subList[0].id) {
this.showForm = true
}
this.visible = true
},
// 表单提交
dataFormSubmit () {
const arr = this.updataList.filter(item => {
if (item.autoExeTaskId === this.autoExeTaskId) {
item.currTaskDetVoList.forEach(item1 => {
const index = this.subList.findIndex(value => { return value.id === item1.id })
if (index >= 0) {
item1.weight = this.subList[index].weight
item1.quantity = this.subList[index].quantity
}
})
return item
}
})
if (this.showForm) {
this.btnLoad = true
this.$http({
url: this.$http.adornUrl('/currTask/oneStepToApms'),
method: 'post',
data: this.$http.adornData(
arr[0], false
)
}).then(({ data }) => {
if (data && data.code === 0) {
this.btnLoad = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
} else {
this.btnLoad = false
this.$message.error(data.msg)
}
})
} else {
this.visible = false
}
},
deleteHandle (index) {
this.subList.splice(index, 1)
},
handleClose () {
this.visible = false
}
}
}
</script>

View File

@@ -1,63 +1,341 @@
<!--
* @Author: gtz
* @Date: 2022-03-05 16:06:02
* @LastEditors: gtz
* @LastEditTime: 2022-03-05 17:59:47
* @LastEditors: zwq
* @LastEditTime: 2022-11-30 15:12:05
* @Description: file content
* @FilePath: \mt-qj-wms-ui\src\views\report\components\task-ele.vue
-->
<template>
<div class="chart-container">
<el-row :gutter="20">
<el-col :span="12" v-for="(item, index) in dataList.ele" v-if="item.length" :key="'ele' + index">
<el-card class="base-container" style="height: 444px; position: relative; margin: 10px 0">
<el-row style="position: absolute; z-index: 10; right: 20px">
<el-checkbox-group size="small" :min="1" v-model="chartTypeEle[index]" style="float: left">
<el-checkbox-button label="折线" />
<el-checkbox-button label="柱状" />
</el-checkbox-group>
</el-row>
<el-col>
<el-card
class="base-container"
style="height: 444px; position: relative; margin: 10px 0"
>
<el-table
:data="checkResultList"
border
height="400"
style="width: 100%;"
>
<el-table-column
prop="createTime"
header-align="center"
align="center"
width="95"
label="添加时间"
>
<template slot-scope="scope">
{{ scope.row.createTime ? scope.row.createTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<el-table-column
prop="stoveCode"
header-align="center"
align="center"
label="炉号"
>
</el-table-column>
<el-table-column
prop="sheetNo"
header-align="center"
align="center"
label="生产单号"
>
</el-table-column>
<el-table-column
prop="idenCardNum"
header-align="center"
align="center"
label="标识卡号"
>
</el-table-column>
<el-table-column
prop="hardness"
header-align="center"
align="center"
label="硬度检验"
>
</el-table-column>
<el-table-column
prop="metallography"
header-align="center"
align="center"
label="金相检验"
>
</el-table-column>
<el-table-column
prop="heartHardness"
header-align="center"
align="center"
label="心部硬度"
>
</el-table-column>
<el-table-column
prop="remake"
header-align="center"
align="center"
label="备注"
>
</el-table-column>
<el-table-column
header-align="center"
label="硬度检验">
<el-table-column
prop="hardnessValueOne"
header-align="center"
align="center"
label="结果1"
>
</el-table-column>
<el-table-column
prop="hardnessValueTwo"
header-align="center"
align="center"
label="结果2"
>
</el-table-column>
<el-table-column
prop="hardnessValueThree"
header-align="center"
align="center"
label="结果3"
>
</el-table-column>
</el-table-column>
<el-table-column
header-align="center"
label="金相检验渗碳淬火">
<el-table-column
prop="metallographyStchStccsd"
header-align="center"
align="center"
label="渗碳层深度"
>
</el-table-column>
<el-table-column
prop="metallographyStchMstost"
header-align="center"
align="center"
label="表面为马氏体、残余奥氏体(级)"
>
</el-table-column>
<el-table-column
prop="metallographyStchXxklzthw"
header-align="center"
align="center"
label="细小颗粒状碳化物"
>
</el-table-column>
<el-table-column
prop="metallographyStchDtmstyltst"
header-align="center"
align="center"
label="心部为低碳马氏体加游离铁素体(级)"
>
</el-table-column>
</el-table-column>
<el-table-column
header-align="center"
label="金相检验整体淬火">
<el-table-column
prop="metallographyZtchHhmst"
header-align="center"
align="center"
label="基体为回火马氏体(级)"
>
</el-table-column>
<el-table-column
prop="metallographyZtchHhtst"
header-align="center"
align="center"
label="基体为回火托式体(级)"
>
</el-table-column>
<el-table-column
prop="metallographyXchHhsst"
header-align="center"
align="center"
label="基体为回火素式体(级)"
>
</el-table-column>
</el-table-column>
<el-table-column
header-align="center"
label="金相检验氮化">
<el-table-column
prop="metallographyDhDhhwcs"
header-align="center"
align="center"
label="表面亮白色的为氮化合物层深"
>
</el-table-column>
<el-table-column
prop="metallographyDhKscs"
header-align="center"
align="center"
label="向内为扩散层深"
>
</el-table-column>
<el-table-column
prop="metallographyDhXb"
header-align="center"
align="center"
label="心部"
>
</el-table-column>
</el-table-column>
<el-table-column
header-align="center"
label="金相检验表面淬火">
<el-table-column
prop="metallographyBmchBtmst"
header-align="center"
align="center"
label="表面为板条马氏体(级)"
>
</el-table-column>
<el-table-column
prop="metallographyBmchXb"
header-align="center"
align="center"
label="心部"
>
</el-table-column>
</el-table-column>
<el-table-column
header-align="center"
label="金相检验">
<el-table-column
prop="metallographyBz"
header-align="center"
align="center"
label="备注"
>
</el-table-column>
<el-table-column
prop="metallographyXbydXbydjyjg"
header-align="center"
align="center"
label="心部硬度"
>
</el-table-column>
</el-table-column>
</el-table>
</el-card>
</el-col>
<el-col
:span="24"
v-for="(item,index) in eleName"
:key="item"
>
<el-card
class="base-container"
v-if="Array.isArray(eleList[item])&&eleList[item].length>0"
style="height: 444px; position: relative; margin: 10px 0"
>
<el-row style="height: 400px">
<chart height="100%" width="100%" :title="item[0].name" :id="'ele' + index" :dataList="item" :chartType="chartTypeEle[index]" />
<chart
height="100%"
width="100%"
:title="eleList[item][0][0]?eleList[item][0][0].name + '/' + eleList[item][0][0].unit : ''"
:id="item + index"
:task-ids="taskIds"
:dataList="eleList[item]"
:chartType="['折线']"
/>
</el-row>
</el-card>
</el-col>
<el-col :span="12" v-for="(item, index) in dataList.gas" v-if="item.length" :key="'gas' + index">
<el-card class="base-container" style="height: 444px; position: relative; margin: 10px 0">
<el-row style="position: absolute; z-index: 10; right: 20px">
<el-checkbox-group size="small" :min="1" v-model="chartTypeGas[index]" style="float: left">
<el-checkbox-button label="折线" />
<el-checkbox-button label="柱状" />
</el-checkbox-group>
</el-row>
</el-row>
<el-row :gutter="20" v-if="false">
<el-col
:span="24"
v-for="(item, index) in dataList.temp"
:key="'temp' + index"
>
<el-card
class="base-container"
style="height: 444px; position: relative; margin: 10px 0"
>
<el-row style="height: 400px">
<chart height="100%" width="100%" :title="item[0].name" :id="'gas' + index" :dataList="item" :chartType="chartTypeGas[index]" />
<chart
height="100%"
width="100%"
:title="item[taskIds[0]][0].name + '/' + item[taskIds[0]][0].unit"
:id="'temp' + index"
:task-ids="taskIds"
:dataList="item"
:chartType="['折线']"
/>
</el-row>
</el-card>
</el-col>
<el-col :span="12" v-for="(item, index) in dataList.rot" v-if="item.length" :key="'rot' + index">
<el-card class="base-container" style="height: 444px; position: relative; margin: 10px 0">
<el-row style="position: absolute; z-index: 10; right: 20px">
<el-checkbox-group size="small" :min="1" v-model="chartTypeRot[index]" style="float: left">
<el-checkbox-button label="折线" />
<el-checkbox-button label="柱状" />
</el-checkbox-group>
</el-row>
<el-col
:span="24"
v-for="(item, index) in dataList.gas"
:key="'gas' + index"
>
<el-card
class="base-container"
style="height: 444px; position: relative; margin: 10px 0"
>
<el-row style="height: 400px">
<chart height="100%" width="100%" :title="item[0].name" :id="'rot' + index" :dataList="item" :chartType="chartTypeRot[index]" />
<chart
height="100%"
width="100%"
:title="item[taskIds[0]][0].name + '/' + item[taskIds[0]][0].unit"
:id="'gas' + index"
:task-ids="taskIds"
:dataList="item"
:chartType="['折线']"
/>
</el-row>
</el-card>
</el-col>
<el-col :span="12" v-for="(item, index) in dataList.temp" v-if="item.length" :key="'temp' + index">
<el-card class="base-container" style="height: 444px; position: relative; margin: 10px 0">
<el-row style="position: absolute; z-index: 10; right: 20px">
<el-checkbox-group size="small" :min="1" v-model="chartTypeTemp[index]" style="float: left">
<el-checkbox-button label="折线" />
<el-checkbox-button label="柱状" />
</el-checkbox-group>
</el-row>
<el-col
:span="24"
v-for="(item, index) in dataList.rot"
:key="'rot' + index"
>
<el-card
class="base-container"
style="height: 444px; position: relative; margin: 10px 0"
>
<el-row style="height: 400px">
<chart height="100%" width="100%" :title="item[0].name" :id="'temp' + index" :dataList="item" :chartType="chartTypeTemp[index]" />
<chart
height="100%"
width="100%"
:title="item[taskIds[0]][0].name + '/' + item[taskIds[0]][0].unit"
:id="'rot' + index"
:task-ids="taskIds"
:dataList="item"
:chartType="['折线']"
/>
</el-row>
</el-card>
</el-col>
<el-col
:span="24"
v-for="(item, index) in dataList.ele"
:key="'ele' + index"
>
<el-card
class="base-container"
style="height: 444px; position: relative; margin: 10px 0"
>
<el-row style="height: 400px">
<chart
height="100%"
width="100%"
:title="item[taskIds[0]][0].name + '/' + item[taskIds[0]][0].unit"
:id="'ele' + index"
:task-ids="taskIds"
:dataList="item"
:chartType="['折线']"
/>
</el-row>
</el-card>
</el-col>
@@ -80,14 +358,39 @@ export default {
rot: [],
temp: []
},
chartTypeEle: [],
chartTypeGas: [],
chartTypeRot: [],
chartTypeTemp: [],
showId: 0
eleName: [
'temp',
'carbon',
'met',
'propane',
'ammon',
'nit',
'ele',
'car',
'oilTemp',
'outer1Temp',
'outer2Temp',
'rot1',
'rot2',
'aCurr',
'aVol',
'bCurr',
'bVol',
'cCurr',
'cVol'
],
eleList: [],
checkResultList: [],
chartTypeEle: ['折线'],
chartTypeGas: ['折线'],
chartTypeRot: ['折线'],
chartTypeTemp: ['折线'],
showId: 0,
taskIds: []
}
},
activated () {
this.taskIds = this.$route.query.taskIds
this.getEleList()
},
mounted () {},
@@ -95,29 +398,87 @@ export default {
// 获取能源信息
getEleList () {
this.$http({
url: this.$http.adornUrl('/electric/energyList'),
url: this.$http.adornUrl('/electric/eletric'),
method: 'post',
data: this.$http.adornData({
'taskId': this.$route.query.taskId
taskIds: this.taskIds
})
}).then(({data}) => {
}).then(({ data }) => {
if (data.code === 0 && data.data) {
console.log(JSON.parse(data.data))
this.dataList = JSON.parse(data.data)
this.dataList.ele.map(item => {
this.chartTypeEle.push(['柱状'])
})
this.dataList.gas.map(item => {
this.chartTypeGas.push(['柱状'])
})
this.dataList.rot.map(item => {
this.chartTypeRot.push(['柱状'])
})
this.dataList.temp.map(item => {
this.chartTypeTemp.push(['柱状'])
this.eleList = data.data
this.checkResultList = []
this.eleList.checkResult.forEach(item => {
this.checkResultList = [...this.checkResultList, ...item]
})
}
})
// this.$http({
// url: this.$http.adornUrl('/electric/energyList'),
// method: 'post',
// data: this.$http.adornData({
// 'taskIds': this.taskIds
// })
// }).then(({data}) => {
// if (data.code === 0 && data.data) {
// console.log(JSON.parse(data.data))
// this.taskIds.forEach((objId, index) => {
// console.log(objId)
// if (JSON.parse(data.data)[objId].ele) {
// if (index === 0) {
// JSON.parse(data.data)[objId].ele.forEach(item => {
// const obj = {}
// obj[objId] = item
// this.dataList.ele.push(obj)
// })
// } else {
// JSON.parse(data.data)[objId].ele.forEach((item, i) => {
// this.dataList.ele[i][objId] = item
// })
// }
// }
// if (JSON.parse(data.data)[objId].gas) {
// if (index === 0) {
// JSON.parse(data.data)[objId].gas.forEach(item => {
// const obj = {}
// obj[objId] = item
// this.dataList.gas.push(obj)
// })
// } else {
// JSON.parse(data.data)[objId].gas.forEach((item, i) => {
// this.dataList.gas[i][objId] = item
// })
// }
// }
// if (JSON.parse(data.data)[objId].rot) {
// if (index === 0) {
// JSON.parse(data.data)[objId].rot.forEach(item => {
// const obj = {}
// obj[objId] = item
// this.dataList.rot.push(obj)
// })
// } else {
// JSON.parse(data.data)[objId].rot.forEach((item, i) => {
// this.dataList.rot[i][objId] = item
// })
// }
// }
// if (JSON.parse(data.data)[objId].temp) {
// if (index === 0) {
// JSON.parse(data.data)[objId].temp.forEach(item => {
// const obj = {}
// obj[objId] = item
// this.dataList.temp.push(obj)
// })
// } else {
// JSON.parse(data.data)[objId].temp.forEach((item, i) => {
// this.dataList.temp[i][objId] = item
// })
// }
// }
// })
// console.log(this.dataList)
// }
// })
}
}
}
@@ -133,10 +494,11 @@ export default {
<style lang="scss">
.chart-container {
.el-tabs__item{
.el-tabs__item {
height: 120px;
}
.el-tabs__nav-next, .el-tabs__nav-prev {
.el-tabs__nav-next,
.el-tabs__nav-prev {
line-height: 120px;
}
}

View File

@@ -85,11 +85,10 @@
}
},
activated () {
this.id = this.$route.query.id
this.getDataList()
},
created () {
console.log(this.$route.query.id)
this.id = this.$route.query.id
},
methods: {
// 获取数据列表

View File

@@ -0,0 +1,256 @@
<!--
* @Author: zwq
* @Date: 2022-07-29 09:56:45
* @LastEditors: zwq
* @LastEditTime: 2022-07-29 11:23:47
* @Description:
-->
<template>
<el-dialog
title="检验结果"
:visible.sync="visible"
width="85%"
>
<el-table
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;"
>
<el-table-column
prop="createTime"
header-align="center"
align="center"
width="95"
label="添加时间"
>
<template slot-scope="scope">
{{ scope.row.createTime ? scope.row.createTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<el-table-column
prop="sheetNo"
header-align="center"
align="center"
label="生产单号"
>
</el-table-column>
<el-table-column
prop="idenCardNum"
header-align="center"
align="center"
label="标识卡号"
>
</el-table-column>
<el-table-column
prop="hardness"
header-align="center"
align="center"
label="硬度检验"
>
</el-table-column>
<el-table-column
prop="metallography"
header-align="center"
align="center"
label="金相检验"
>
</el-table-column>
<el-table-column
prop="heartHardness"
header-align="center"
align="center"
label="心部硬度"
>
</el-table-column>
<el-table-column
prop="remake"
header-align="center"
align="center"
label="备注"
>
</el-table-column>
<el-table-column
header-align="center"
label="硬度检验">
<el-table-column
prop="hardnessValueOne"
header-align="center"
align="center"
label="结果1"
>
</el-table-column>
<el-table-column
prop="hardnessValueTwo"
header-align="center"
align="center"
label="结果2"
>
</el-table-column>
<el-table-column
prop="hardnessValueThree"
header-align="center"
align="center"
label="结果3"
>
</el-table-column>
</el-table-column>
<el-table-column
header-align="center"
label="金相检验渗碳淬火">
<el-table-column
prop="metallographyStchStccsd"
header-align="center"
align="center"
label="渗碳层深度"
>
</el-table-column>
<el-table-column
prop="metallographyStchMstost"
header-align="center"
align="center"
label="表面为马氏体、残余奥氏体(级)"
>
</el-table-column>
<el-table-column
prop="metallographyStchXxklzthw"
header-align="center"
align="center"
label="细小颗粒状碳化物"
>
</el-table-column>
<el-table-column
prop="metallographyStchDtmstyltst"
header-align="center"
align="center"
label="心部为低碳马氏体加游离铁素体(级)"
>
</el-table-column>
</el-table-column>
<el-table-column
header-align="center"
label="金相检验整体淬火">
<el-table-column
prop="metallographyZtchHhmst"
header-align="center"
align="center"
label="基体为回火马氏体(级)"
>
</el-table-column>
<el-table-column
prop="metallographyZtchHhtst"
header-align="center"
align="center"
label="基体为回火托式体(级)"
>
</el-table-column>
<el-table-column
prop="metallographyXchHhsst"
header-align="center"
align="center"
label="基体为回火素式体(级)"
>
</el-table-column>
</el-table-column>
<el-table-column
header-align="center"
label="金相检验氮化">
<el-table-column
prop="metallographyDhDhhwcs"
header-align="center"
align="center"
label="表面亮白色的为氮化合物层深"
>
</el-table-column>
<el-table-column
prop="metallographyDhKscs"
header-align="center"
align="center"
label="向内为扩散层深"
>
</el-table-column>
<el-table-column
prop="metallographyDhXb"
header-align="center"
align="center"
label="心部"
>
</el-table-column>
</el-table-column>
<el-table-column
header-align="center"
label="金相检验表面淬火">
<el-table-column
prop="metallographyBmchBtmst"
header-align="center"
align="center"
label="表面为板条马氏体(级)"
>
</el-table-column>
<el-table-column
prop="metallographyBmchXb"
header-align="center"
align="center"
label="心部"
>
</el-table-column>
</el-table-column>
<el-table-column
header-align="center"
label="金相检验">
<el-table-column
prop="metallographyBz"
header-align="center"
align="center"
label="备注"
>
</el-table-column>
<el-table-column
prop="metallographyXbydXbydjyjg"
header-align="center"
align="center"
label="心部硬度"
>
</el-table-column>
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
export default {
data () {
return {
visible: false,
sheetNo: '',
dataList: [],
dataListLoading: false
}
},
methods: {
init (sheetNo) {
this.sheetNo = sheetNo || ''
this.visible = true
this.getDataList()
},
// 获取数据列表
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/electric/checkResultList'),
method: 'post',
data: this.$http.adornData(
{sheetNo: this.sheetNo}
)
}).then(({ data }) => {
if (data) {
this.dataList = data
} else {
this.dataList = []
}
this.dataListLoading = false
})
}
}
}
</script>

View File

@@ -4,7 +4,6 @@
style="display: flex; align-items: center; justify-content: right;"
:inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()"
>
<!-- <el-form-item>
<el-select
@@ -22,12 +21,35 @@
</el-option>
</el-select>
</el-form-item> -->
<el-form-item prop="stoveCode">
<el-input
v-model="dataForm.stoveCode"
placeholder="炉号"
clearable
></el-input>
</el-form-item>
<el-form-item prop="kilnId">
<el-select
size="small"
v-model="dataForm.kilnId"
clearable
filterable
placeholder="加工炉"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.code"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-date-picker
size="small"
v-model="dataForm.time"
type="daterange"
value-format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
@@ -35,16 +57,35 @@
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button size="small" @click="getDataList()">查询</el-button>
<el-button size="small" @click="getDataList(1)">查询</el-button>
</el-form-item>
</el-form>
<el-table
:data="dataList"
ref="dataTable"
:stripe="true"
:header-cell-style="{background:'#eef1f6',color:'#606266',height: '56px'}"
:header-cell-style="{
background: '#eef1f6',
color: '#606266',
height: '56px'
}"
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
:row-key="
row => {
return row.id;
}
"
style="width: 100%;"
>
<el-table-column
type="selection"
header-align="center"
reserve-selection
align="center"
width="50"
>
</el-table-column>
<el-table-column
type="index"
header-align="center"
@@ -53,36 +94,38 @@
width="50"
>
</el-table-column>
<el-table-column
<!-- <el-table-column
prop="taskCode"
label="任务编码"
>
</el-table-column> -->
<el-table-column align="center" width="180" prop="stoveCode" label="炉号">
</el-table-column>
<el-table-column
prop="createTime"
label="发起时间"
>
<el-table-column align="center" prop="sheetNo" label="生产单号">
</el-table-column>
<el-table-column align="center" prop="targetPosition" label="加工炉">
</el-table-column>
<el-table-column align="center" prop="plcValue" label="工艺号">
</el-table-column>
<el-table-column align="center" prop="beginTime" label="进炉时间">
<template slot-scope="scope">
{{ scope.row.createTime ? scope.row.createTime.replace('T', ' ') : '' }}
{{
scope.row.beginTime ? scope.row.beginTime.replace("T", " ") : ""
}}
</template>
</el-table-column>
<el-table-column
<!-- <el-table-column
align="center"
prop="taskSource"
label="任务来源"
>
</el-table-column> -->
<el-table-column align="center" prop="status" label="任务状态">
<template slot-scope="scope">
{{ scope.row.status >= 0 ? statusList[scope.row.status] : "" }}
</template>
</el-table-column>
<el-table-column
prop="status"
label="任务状态"
>
<template slot-scope="scope">
{{ scope.row.status >= 0 ? statusList[scope.row.status] : '' }}
</template>
</el-table-column>
<el-table-column
prop="taskType"
label="任务类型"
>
<el-table-column align="center" prop="taskType" label="任务类型">
<template slot-scope="scope">
<span>{{
scope.row.taskType === 0
@@ -95,41 +138,58 @@
}}</span>
</template>
</el-table-column>
<el-table-column
prop="startPosition"
label="开始位置"
>
</el-table-column>
<el-table-column
prop="targetPosition"
label="目标位置"
>
<el-table-column align="center" prop="startPosition" label="开始位置">
</el-table-column>
<!-- <el-table-column
prop="vehicleName"
label="车辆名称"
> -->
</el-table-column>
>
</el-table-column> -->
<el-table-column
fixed="right"
header-align="center"
align="center"
width="80"
label="能耗情况">
width="100"
label="检验"
>
<template slot-scope="scope">
<el-button type="text" size="small" @click="eleHandle(scope.row.id)">详情</el-button>
<el-button
type="text"
size="small"
@click="checkResult(scope.row.sheetNo)"
>检验结果</el-button
>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="80"
label="订单详情"
width="100"
label="能耗情况"
>
<template slot-scope="scope">
<el-button type="text" size="small" @click="LocationBtn(scope.row.id)"
>订单详情</el-button
<el-button
type="text"
size="small"
@click="eleHandle(scope.row.taskId, scope.row.targetPosition)"
>详情</el-button
>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="100"
label="生产单详情"
>
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click="LocationBtn(scope.row.taskId)"
>生产单详情</el-button
>
</template>
</el-table-column>
@@ -144,10 +204,15 @@
layout="total, sizes, prev, pager, next, jumper"
>
</el-pagination>
<task-history-result
v-if="taskHistoryResultVisible"
ref="addOrUpdate"
></task-history-result>
</div>
</template>
<script>
import taskHistoryResult from './components/task-history-result'
// 任务状态列表
const statusList = {
0: '等待执行',
@@ -161,10 +226,15 @@ export default {
return {
dataForm: {
vehicleId: '',
stoveCode: '',
kilnId: '',
time: []
},
taskHistoryResultVisible: false,
dataList: [],
options2: [],
options: [],
dataListSelections: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
@@ -173,14 +243,34 @@ export default {
statusList
}
},
components: {
taskHistoryResult
},
activated () {
this.getDataList()
this.$http({
url: this.$http.adornUrl('/kilnInfo/page'),
method: 'post',
data: this.$http.adornData({
current: 1,
size: 500
// paramKey: this.dataForm.paramKey
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.options = data.data.records
} else {
this.options = []
}
})
this.getDataList(1)
},
methods: {
// 获取数据列表
getDataList () {
getDataList (val) {
this.dataListLoading = true
console.log(this.dataForm.time)
if (val) {
this.$refs.dataTable.clearSelection()
}
this.$http({
url: this.$http.adornUrl('/taskHis/taskHis'),
method: 'post',
@@ -188,6 +278,8 @@ export default {
current: this.pageIndex,
size: this.pageSize,
vehicleId: this.dataForm.vehicleId,
stoveCode: this.dataForm.stoveCode,
kilnId: this.dataForm.kilnId,
startTime:
this.dataForm.time && this.dataForm.time.length > 0
? this.dataForm.time[0]
@@ -222,11 +314,50 @@ export default {
LocationBtn (id) {
this.$router.push({ name: 'report-task-history-detail', query: { id } })
},
eleHandle (taskId) {
this.$router.push({
name: 'report-task-ele',
query: { taskId }
eleHandle (taskId, targetPosition) {
const a = this.dataListSelections.findIndex(
item => item.targetPosition !== targetPosition
)
if (a !== 0) {
const taskIdArr = this.dataListSelections.map(item => {
return item.taskId
})
const taskIds = [...new Set([...taskIdArr, taskId])]
this.$router.push({
name: 'report-task-ele',
query: { taskIds }
})
} else {
this.$message({
message: '加工炉必须一致',
type: 'info',
duration: 1500
})
}
},
checkResult (sheetNo) {
this.taskHistoryResultVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(sheetNo)
})
},
// 多选
selectionChangeHandle (val) {
let targetPosition = val[0] ? val[0].targetPosition : ''
let arr = []
val.forEach(item => {
if (targetPosition === item.targetPosition) {
arr.push(item)
} else {
this.$message({
message: '加工炉必须一致',
type: 'info',
duration: 1500
})
this.$refs.dataTable.toggleRowSelection(item, false)
}
})
this.dataListSelections = arr
}
}
}