init
This commit is contained in:
68
src/views/orderManage/workOrder/components/monitor-chart.vue
Normal file
68
src/views/orderManage/workOrder/components/monitor-chart.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-03-03 16:39:34
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-04 10:10:45
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div id="monitorChart" :style="{width: '700px', height: '500px'}" style="margin-left:10%" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.chart = echarts.init(document.getElementById('monitorChart'))
|
||||
|
||||
this.chart.setOption({
|
||||
color: '#91cc75',
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['设备1', '设备2', '设备3', '设备4', '设备5', '设备6', '设备7']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
name: '电量消耗',
|
||||
data: [323.234, 323.841, 755.45, 251.453, 454.786, 484.786, 154.786],
|
||||
barWidth: '60%',
|
||||
type: 'bar'
|
||||
}]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
134
src/views/orderManage/workOrder/components/monitor-table.vue
Normal file
134
src/views/orderManage/workOrder/components/monitor-table.vue
Normal file
@@ -0,0 +1,134 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 17:48:35
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
// import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.order.EquipmentName')
|
||||
// filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'consume',
|
||||
label: i18n.t('module.orderManage.order.PowerConsumption'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { BaseTable },
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableProps,
|
||||
list: [],
|
||||
listLoading: false,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.listQuery = {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.list = [
|
||||
{
|
||||
'name': '设备1',
|
||||
'consume': '323,234'
|
||||
},
|
||||
{
|
||||
'name': '设备2',
|
||||
'consume': '323.841'
|
||||
},
|
||||
{
|
||||
'name': '设备3',
|
||||
'consume': '755.45'
|
||||
},
|
||||
{
|
||||
'name': '设备4',
|
||||
'consume': '251.453'
|
||||
},
|
||||
{
|
||||
'name': '设备5',
|
||||
'consume': '454.786'
|
||||
},
|
||||
{
|
||||
'name': '设备6',
|
||||
'consume': '484.786'
|
||||
},
|
||||
{
|
||||
'name': '设备7',
|
||||
'consume': '154.786'
|
||||
}
|
||||
]
|
||||
// this.listLoading = true
|
||||
// staffList(this.listQuery).then(response => {
|
||||
// if (response.data.records) {
|
||||
// this.list = response.data.records
|
||||
// } else {
|
||||
// this.list.splice(0, this.list.length)
|
||||
// }
|
||||
// this.listLoading = false
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
100
src/views/orderManage/workOrder/components/verify-craft.vue
Normal file
100
src/views/orderManage/workOrder/components/verify-craft.vue
Normal file
@@ -0,0 +1,100 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-02-27 14:49:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 19:22:29
|
||||
* @Description: 工单验证
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<div class="text item">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="23"><div class="title">{{ $t('module.orderManage.FalseData.FalseData22') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData23') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData24') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData25') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData26') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData5') }}</div></el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="23"><div class="title">{{ $t('module.orderManage.FalseData.FalseData27') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData23') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData524') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData25') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData28') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData29') }}</div></el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { },
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
// this.listLoading = true
|
||||
// staffList(this.listQuery).then(response => {
|
||||
// if (response.data.records) {
|
||||
// this.list = response.data.records
|
||||
// } else {
|
||||
// this.list.splice(0, this.list.length)
|
||||
// }
|
||||
// this.listLoading = false
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.text {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.box-card {
|
||||
width: 80%;
|
||||
font-size: 30px;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.title{
|
||||
font-size: 40px;
|
||||
color: #1588F5;
|
||||
}
|
||||
</style>
|
||||
138
src/views/orderManage/workOrder/components/verify-equipment.vue
Normal file
138
src/views/orderManage/workOrder/components/verify-equipment.vue
Normal file
@@ -0,0 +1,138 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 19:17:31
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
// import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.order.EquipmentName')
|
||||
// filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t('module.orderManage.VerifyTable.EquipmentCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'abbr',
|
||||
label: i18n.t('module.orderManage.VerifyTable.equipmentAbbreviation')
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: i18n.t('module.orderManage.order.status')
|
||||
},
|
||||
{
|
||||
prop: 'formula',
|
||||
label: i18n.t('module.orderManage.VerifyTable.EquipmentFormula')
|
||||
},
|
||||
{
|
||||
prop: 'formula1',
|
||||
label: i18n.t('module.orderManage.VerifyTable.ProcessFormulaRequir')
|
||||
},
|
||||
{
|
||||
prop: 'same',
|
||||
label: i18n.t('module.orderManage.VerifyTable.IsSame')
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { BaseTable },
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableProps,
|
||||
list: [],
|
||||
listLoading: false,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.listQuery = {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.list = [
|
||||
{
|
||||
'name': '承压机',
|
||||
'code': 'SB001',
|
||||
'abbr': 'CYS',
|
||||
'status': '运行正常'
|
||||
},
|
||||
{
|
||||
'name': '传输线',
|
||||
'code': 'SB002',
|
||||
'abbr': 'TTS',
|
||||
'status': '报警'
|
||||
}
|
||||
]
|
||||
// this.listLoading = true
|
||||
// staffList(this.listQuery).then(response => {
|
||||
// if (response.data.records) {
|
||||
// this.list = response.data.records
|
||||
// } else {
|
||||
// this.list.splice(0, this.list.length)
|
||||
// }
|
||||
// this.listLoading = false
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
139
src/views/orderManage/workOrder/components/verify-group.vue
Normal file
139
src/views/orderManage/workOrder/components/verify-group.vue
Normal file
@@ -0,0 +1,139 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 19:34:39
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
// import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.VerifyTable.teamName')
|
||||
// filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'leader',
|
||||
label: i18n.t('module.orderManage.VerifyTable.teamLeader'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'num',
|
||||
label: i18n.t('module.orderManage.VerifyTable.number')
|
||||
},
|
||||
{
|
||||
prop: 'major',
|
||||
label: i18n.t('module.orderManage.VerifyTable.professional')
|
||||
},
|
||||
{
|
||||
prop: 'wtime',
|
||||
label: i18n.t('module.orderManage.VerifyTable.workingHours')
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { BaseTable },
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableProps,
|
||||
list: [],
|
||||
listLoading: false,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.listQuery = {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.list = [
|
||||
{
|
||||
'name': '班组1',
|
||||
'leader': '张三',
|
||||
'num': '21',
|
||||
'major': '电工,维修工,计划员,仓管员',
|
||||
'wtime': '2020-11-26 19:12:37'
|
||||
},
|
||||
{
|
||||
'name': '班组2',
|
||||
'leader': '卫升',
|
||||
'num': '12',
|
||||
'major': '电工,维修工,仓管员',
|
||||
'wtime': '2020-11-11 06:12:57'
|
||||
},
|
||||
{
|
||||
'name': '班组3',
|
||||
'leader': '李渊',
|
||||
'num': '32',
|
||||
'major': '会计,审核员',
|
||||
'wtime': '2020-11-05 12:10:17'
|
||||
}
|
||||
]
|
||||
// this.listLoading = true
|
||||
// staffList(this.listQuery).then(response => {
|
||||
// if (response.data.records) {
|
||||
// this.list = response.data.records
|
||||
// } else {
|
||||
// this.list.splice(0, this.list.length)
|
||||
// }
|
||||
// this.listLoading = false
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
115
src/views/orderManage/workOrder/components/verify-materiel.vue
Normal file
115
src/views/orderManage/workOrder/components/verify-materiel.vue
Normal file
@@ -0,0 +1,115 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 19:25:55
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
// import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.VerifyTable.materielName')
|
||||
// filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t('module.orderManage.VerifyTable.materielCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'spec',
|
||||
label: i18n.t('module.orderManage.VerifyTable.Spec')
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { BaseTable },
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableProps,
|
||||
list: [],
|
||||
listLoading: false,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.listQuery = {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.list = [
|
||||
{
|
||||
'name': '001油漆',
|
||||
'code': 'YQ-110',
|
||||
'spec': '30D * 11B'
|
||||
}
|
||||
]
|
||||
// this.listLoading = true
|
||||
// staffList(this.listQuery).then(response => {
|
||||
// if (response.data.records) {
|
||||
// this.list = response.data.records
|
||||
// } else {
|
||||
// this.list.splice(0, this.list.length)
|
||||
// }
|
||||
// this.listLoading = false
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
99
src/views/orderManage/workOrder/components/verify-plate.vue
Normal file
99
src/views/orderManage/workOrder/components/verify-plate.vue
Normal file
@@ -0,0 +1,99 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-02-27 14:49:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-03 16:28:15
|
||||
* @Description: 工单验证
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<div class="text item">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="23"><div class="title">{{ $t('module.orderManage.FalseData.FalseData31') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData32') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData33') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData34') }}</div></el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="23"><div class="title">{{ $t('module.orderManage.FalseData.FalseData38') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData35') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData33') }}</div></el-col>
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData36') }}</div></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="23"><div>{{ $t('module.orderManage.FalseData.FalseData37') }}</div></el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { },
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
// this.listLoading = true
|
||||
// staffList(this.listQuery).then(response => {
|
||||
// if (response.data.records) {
|
||||
// this.list = response.data.records
|
||||
// } else {
|
||||
// this.list.splice(0, this.list.length)
|
||||
// }
|
||||
// this.listLoading = false
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.text {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.box-card {
|
||||
width: 80%;
|
||||
font-size: 30px;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.title{
|
||||
font-size: 40px;
|
||||
color: #1588F5;
|
||||
}
|
||||
</style>
|
||||
269
src/views/orderManage/workOrder/components/workOrder-add.vue
Normal file
269
src/views/orderManage/workOrder/components/workOrder-add.vue
Normal file
@@ -0,0 +1,269 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-02-26 15:32:13
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-25 16:33:35
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? 'btn.add' : 'btn.edit' | i18nFilter"
|
||||
:visible.sync="visible"
|
||||
@open="onOpen"
|
||||
@close="onClose"
|
||||
>
|
||||
<el-row :gutter="10">
|
||||
<el-form
|
||||
ref="dataForm"
|
||||
:model="dataForm"
|
||||
:rules="rules"
|
||||
size="medium"
|
||||
label-width="96px"
|
||||
label-position="right"
|
||||
>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.WorkOrderName')" prop="name">
|
||||
<el-input v-model="dataForm.name" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.WorkOrderName')])" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.WorkOrderCode')" prop="workOrderNo">
|
||||
<el-input v-model="dataForm.workOrderNo" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.WorkOrderCode')])" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.WorkOrderType')" prop="gtype">
|
||||
<el-select v-model="dataForm.gtype" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.WorkOrderType')])" clearable :style="{width: '100%'}">
|
||||
<el-option
|
||||
v-for="(item, index) in gtypeOptions"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:disabled="item.disabled"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.PlannedProcessingVolume')" prop="planQuantity">
|
||||
<el-input-number v-model="dataForm.planQuantity" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.PlannedProcessingVolume')])" :step="1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.unit')" prop="unit">
|
||||
<el-input v-model="dataForm.unit" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.unit')])" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.priority')" prop="priority">
|
||||
<el-select v-model="dataForm.priority" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.priority')])" clearable :style="{width: '100%'}">
|
||||
<el-option
|
||||
v-for="(item, index) in youxianjiOptions"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:disabled="item.disabled"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.ProductProcess')" prop="gongyi">
|
||||
<el-select v-model="dataForm.gongyi" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.ProductProcess')])" clearable :style="{width: '100%'}">
|
||||
<el-option
|
||||
v-for="(item, index) in gongyiOptions"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:disabled="item.disabled"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.PlanningStartTime')" prop="planStartProduceTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.planStartProduceTime"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
:style="{width: '100%'}"
|
||||
:placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.PlanningStartTime')])"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.PlanningEndTime')" prop="planFinishProduceTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.planFinishProduceTime"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
:style="{width: '100%'}"
|
||||
:placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.PlanningEndTime')])"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.ProductName')" prop="chanpinname">
|
||||
<el-select v-model="dataForm.chanpinname" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.ProductName')])" clearable :style="{width: '100%'}">
|
||||
<el-option
|
||||
v-for="(item, index) in chanpinnameOptions"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:disabled="item.disabled"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.Remarks')" prop="remark">
|
||||
<el-input v-model="dataForm.remark" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.Remarks')])" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('module.orderManage.order.Description')" prop="description">
|
||||
<el-input v-model="dataForm.description" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.Description')])" clearable :style="{width: '100%'}" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">{{ 'btn.cancel' | i18nFilter }}</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">{{ 'btn.confirm' | i18nFilter }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { workOrderDetail, workOrderUpdate, workOrderAdd, workOrderCode } from '@/api/orderManage/workOrder/workOrder'
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
inheritAttrs: false,
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
name: '',
|
||||
workOrderNo: '',
|
||||
gtype: '',
|
||||
planQuantity: '',
|
||||
unit: '',
|
||||
priority: '',
|
||||
gongyi: '',
|
||||
planStartProduceTime: '',
|
||||
planFinishProduceTime: '',
|
||||
chanpinname: '',
|
||||
remark: '',
|
||||
description: ''
|
||||
},
|
||||
rules: {
|
||||
name: [{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.WorkOrderName')]),
|
||||
trigger: 'blur'
|
||||
}]
|
||||
},
|
||||
gtypeOptions: [{
|
||||
'label': '测试工单',
|
||||
'value': 1
|
||||
}, {
|
||||
'label': '重工工单',
|
||||
'value': 2
|
||||
}, {
|
||||
'label': '正常工单',
|
||||
'value': 0
|
||||
}],
|
||||
youxianjiOptions: [{
|
||||
'label': '正常',
|
||||
'value': 1
|
||||
}, {
|
||||
'label': '高',
|
||||
'value': 2
|
||||
}, {
|
||||
'label': '低',
|
||||
'value': 0
|
||||
}],
|
||||
gongyiOptions: [{
|
||||
'label': '工艺1',
|
||||
'value': 1
|
||||
}, {
|
||||
'label': '工艺2',
|
||||
'value': 2
|
||||
}],
|
||||
chanpinnameOptions: [{
|
||||
'label': '产品1',
|
||||
'value': 1
|
||||
}, {
|
||||
'label': '产品2',
|
||||
'value': 2
|
||||
}]
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || ''
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
workOrderDetail(this.dataForm.id).then(res => {
|
||||
this.dataForm = res.data
|
||||
})
|
||||
} else {
|
||||
workOrderCode().then(res => {
|
||||
this.dataForm.workOrderNo = res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onOpen() {},
|
||||
onClose() {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
},
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = this.dataForm
|
||||
if (this.dataForm.id) {
|
||||
workOrderUpdate(data).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
workOrderAdd(data).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,97 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-04-15 14:00:51
|
||||
* @enName:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="'routerTitle.order.workOrderManage.closeworkorder' | i18nFilter"
|
||||
:visible.sync="visible"
|
||||
>
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="110px" @keyup.enter.native="dataFormSubmit()">
|
||||
<el-form-item :label="$t('module.orderManage.order.CompletionTime')" prop="finishProduceTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.finishProduceTime"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
:style="{width: '50%'}"
|
||||
:placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.CompletionTime')])"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.ActualFinishedProduct')" prop="actualQuantity">
|
||||
<el-input-number v-model="dataForm.actualQuantity" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.ActualFinishedProduct')])" :step="1" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.DamageQuantityPlate')" prop="scrapQuantity">
|
||||
<el-input-number v-model="dataForm.scrapQuantity" :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.DamageQuantityPlate')])" :step="1" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">{{ 'btn.cancel' | i18nFilter }}</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">{{ 'btn.confirm' | i18nFilter }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { workOrderUpdate } from '@/api/orderManage/workOrder/workOrder'
|
||||
export default {
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
finishProduceTime: '',
|
||||
actualQuantity: '',
|
||||
scrapQuantity: ''
|
||||
},
|
||||
closeData: {},
|
||||
dataRule: {
|
||||
finishProduceTime: [
|
||||
{ required: true, message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.CompletionTime')]), trigger: 'change' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(dataForm) {
|
||||
this.visible = true
|
||||
this.closeData = dataForm
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.closeData.status = 9
|
||||
this.closeData.finishProduceTime = this.dataForm.finishProduceTime
|
||||
this.closeData.actualQuantity = this.dataForm.actualQuantity
|
||||
this.closeData.scrapQuantity = this.dataForm.scrapQuantity
|
||||
workOrderUpdate(this.closeData).then(response => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
207
src/views/orderManage/workOrder/components/workOrder-issue.vue
Normal file
207
src/views/orderManage/workOrder/components/workOrder-issue.vue
Normal file
@@ -0,0 +1,207 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-25 16:34:30
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="'routerTitle.order.workOrderManage.issueworkorder' | i18nFilter"
|
||||
:visible.sync="visible"
|
||||
:before-close="goback"
|
||||
:append-to-body="true"
|
||||
width="80%"
|
||||
>
|
||||
<el-form
|
||||
ref="formData"
|
||||
:rules="rules"
|
||||
:model="formData"
|
||||
:inline="true"
|
||||
size="medium"
|
||||
label-width="150px"
|
||||
>
|
||||
<el-form-item :label="$t('module.orderManage.order.destination')" prop="syncTarget">
|
||||
<el-select v-model="formData.syncTarget" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.orderManage.order.destination')])" clearable>
|
||||
<el-option
|
||||
v-for="item in issueDestination"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="issueworkorder()"> {{ 'routerTitle.order.workOrderManage.issueworkorder' | i18nFilter }} </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
/>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="listQuery.current"
|
||||
:limit.sync="listQuery.size"
|
||||
@pagination="getList()"
|
||||
/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { workOrderIssueList, syncAdd } from '@/api/orderManage/workOrder/workOrder'
|
||||
import i18n from '@/lang'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
import { timeFormatter } from '@/filters'
|
||||
import basicData from '@/filters/basicData'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.orderManage.order.initiateTime'),
|
||||
filter: timeFormatter,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'syncTarget',
|
||||
label: i18n.t('module.orderManage.order.destination'),
|
||||
align: 'center',
|
||||
filter: basicData('source')
|
||||
},
|
||||
{
|
||||
prop: 'syncStatus',
|
||||
label: i18n.t('module.orderManage.order.status'),
|
||||
align: 'center',
|
||||
filter: basicData('workStatus')
|
||||
},
|
||||
{
|
||||
prop: 'reason',
|
||||
label: i18n.t('module.orderManage.order.reason'),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { Pagination, BaseTable },
|
||||
props: {
|
||||
workOrderId: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: false,
|
||||
formData: {
|
||||
syncTarget: ''
|
||||
},
|
||||
issueDestination: [
|
||||
{
|
||||
label: '00A',
|
||||
value: 4
|
||||
},
|
||||
{
|
||||
label: 'PID1',
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
label: '00C',
|
||||
value: 5
|
||||
}
|
||||
],
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
workOrderId: ''
|
||||
},
|
||||
rules: {
|
||||
syncTarget: [{
|
||||
required: true,
|
||||
message: this.$i18nForm(['placeholder.input', this.$t('module.orderManage.order.destination')]),
|
||||
trigger: 'change'
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.visible = true
|
||||
this.listQuery.workOrderId = this.workOrderId
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
workOrderIssueList(this.listQuery).then(response => {
|
||||
if (response.data.records) {
|
||||
this.list = response.data.records
|
||||
} else {
|
||||
this.list.splice(0, this.list.length)
|
||||
}
|
||||
this.total = response.data.total
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
issueworkorder() {
|
||||
this.$refs['formData'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = {
|
||||
'wordOrderId': this.workOrderId,
|
||||
'syncTarget': this.formData.syncTarget
|
||||
}
|
||||
syncAdd(data).then(response => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
goback() {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
33
src/views/orderManage/workOrder/components/workOrderBtn.vue
Normal file
33
src/views/orderManage/workOrder/components/workOrderBtn.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<!--
|
||||
* @Date: 2021-01-07 20:09:37
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-12 10:01:59
|
||||
* @FilePath:
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
<el-button type="text" size="small" @click="emitClick">{{ $t('module.orderManage.order.workOrderDetail') }}</el-button>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
emitClick() {
|
||||
this.$router.push({
|
||||
name: 'workOrderOperation',
|
||||
query: {
|
||||
id: this.injectData.id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
134
src/views/orderManage/workOrder/components/workOrderMonitor.vue
Normal file
134
src/views/orderManage/workOrder/components/workOrderMonitor.vue
Normal file
@@ -0,0 +1,134 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-02-23 11:05:06
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 17:45:45
|
||||
* @Description: 工单监控
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span><b>{{ $t('module.orderManage.order.WorkOrderProgress') }}</b></span>
|
||||
<el-button style="float: right;" type="success" @click="goback()">{{ 'btn.back' | i18nFilter }}</el-button>
|
||||
</div>
|
||||
<div class="text item">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData2') }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData3') }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData5') }}</div></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData6') }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData8') }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData9') }}</div></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="width:50%">
|
||||
<el-progress :text-inside="true" :stroke-width="26" :percentage="78" />
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span><b>{{ $t('module.orderManage.order.energyConsumption') }}</b></span>
|
||||
</div>
|
||||
<el-menu
|
||||
:default-active="activeIndex"
|
||||
mode="horizontal"
|
||||
background-color="#545c64"
|
||||
text-color="#fff"
|
||||
active-text-color="#ffd04b"
|
||||
@select="handleSelect"
|
||||
>
|
||||
<el-menu-item index="1">{{ $t('module.orderManage.order.energyConsumptionChart') }}</el-menu-item>
|
||||
<el-menu-item index="2">{{ $t('module.orderManage.order.energyConsumptionTable') }}</el-menu-item>
|
||||
</el-menu>
|
||||
</el-card>
|
||||
<monitor-chart v-if="chartVisible" ref="monitorChart" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
<monitor-table v-if="tableVisible" ref="monitorTable" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import monitorChart from './monitor-chart'
|
||||
import monitorTable from './monitor-table'
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { monitorChart, monitorTable },
|
||||
data() {
|
||||
return {
|
||||
chartVisible: false,
|
||||
tableVisible: false,
|
||||
workOrderId: '',
|
||||
activeIndex: '1'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.workOrderId = this.$route.query.id
|
||||
this.handleSelect('1')
|
||||
},
|
||||
methods: {
|
||||
handleClick() {
|
||||
// this.addOrUpdateVisible = true
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(id)
|
||||
// })
|
||||
},
|
||||
handleSelect(key, keyPath) {
|
||||
this.chartVisible = false
|
||||
this.tableVisible = false
|
||||
switch (key) {
|
||||
case '1':
|
||||
this.chartVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.monitorChart.init()
|
||||
})
|
||||
break
|
||||
case '2':
|
||||
this.tableVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.monitorTable.init()
|
||||
})
|
||||
break
|
||||
}
|
||||
},
|
||||
goback() {
|
||||
this.$router.go(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.text {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both
|
||||
}
|
||||
|
||||
.box-card {
|
||||
width: 70%;
|
||||
font-size: 20px;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.el-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,186 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-02-27 14:39:57
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-07-20 14:56:35
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button style="margin-right:50px" type="success" @click="goback()">{{ 'btn.back' | i18nFilter }}</el-button>
|
||||
<span><b>{{ $t('module.orderManage.order.WorkOrderCode')+':'+stringfilter(dataForm.workOrderNo) }}</b></span>
|
||||
</div>
|
||||
<div class="text item">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.WorkOrderName')+':'+stringfilter(dataForm.name) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.status')+':' }}{{ dataForm.status|commonFilter(basicData('workOrderStatus')) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.workOrderDetail.workOrderSource')+':' }}{{ dataForm.triggerOrigin|commonFilter(basicData('source')) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.createTime')+':'+timefilter(dataForm.createTime) }}</div></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.PlannedProcessingVolume')+':'+stringfilter(dataForm.planQuantity) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.workOrderDetail.processingTechnology')+':'+stringfilter(dataForm.processFlowName) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.StartTime')+':'+timefilter(dataForm.startProduceTime) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.EndTime')+':'+timefilter(dataForm.finishProduceTime) }}</div></el-col>
|
||||
<!-- <el-col :span="6"><div>{{ $t('module.orderManage.order.PlanningEndTime')+':'+timefilter(dataForm.planFinishProduceTime) }}</div></el-col> -->
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.ActualFinishedProduct')+':'+stringfilter(dataForm.actualQuantity) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.NumberOfDamages')+':'+stringfilter(dataForm.scrapQuantity) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.ProductName')+':'+stringfilter(dataForm.productName) }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.priority')+':' }}{{ dataForm.priority | commonFilter(basicData('priority')) }}</div></el-col>
|
||||
</el-row>
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.order.initiateTime')+':'+timefilter(dataForm.startProduceTime) }}</div></el-col>
|
||||
</el-row> -->
|
||||
</div>
|
||||
<el-card class="box-card" style="margin-top:40px">
|
||||
<el-row type="flex" justify="space-around" style="margin:0">
|
||||
<el-col v-if="dataForm.status !==3 && dataForm.status !==9" :span="4.8"><div><el-button type="primary" @click="issueClick()"> {{ 'routerTitle.order.workOrderManage.issueworkorder' | i18nFilter }} </el-button></div></el-col>
|
||||
<el-col v-if="dataForm.status !==3 && dataForm.status !==9" :span="4.8"><div><el-button type="primary" @click="activation()"> {{ $t('module.orderManage.order.activation') }} </el-button></div></el-col>
|
||||
<el-col :span="4.8"><div><el-button :disabled="dataForm.status===9" type="primary" @click="closeClick()"> {{ 'routerTitle.order.workOrderManage.closeworkorder' | i18nFilter }} </el-button></div></el-col>
|
||||
<el-col :span="4.8"><div><el-button type="primary" @click="tagsClick()"> {{ 'routerTitle.order.workOrderManage.viewpackingTags' | i18nFilter }} </el-button></div></el-col>
|
||||
<el-col v-if="false" :span="4.8"><div><el-button type="primary" @click="verifyClick()"> {{ 'routerTitle.order.workOrderManage.workOrderVerify' | i18nFilter }} </el-button></div></el-col>
|
||||
<el-col v-if="false" :span="4.8"><div><el-button type="primary" @click="monitorClick()"> {{ 'routerTitle.order.workOrderManage.workOrderMonitor' | i18nFilter }} </el-button></div></el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-card>
|
||||
<workOrder-close v-if="closeVisible" ref="closeWorkOrder" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
<workOrder-issue v-if="issueVisible" ref="issueWorkOrder" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import workOrderClose from './workOrder-close'
|
||||
import workOrderIssue from './workOrder-issue'
|
||||
import { workOrderDetail, updateForStatus } from '@/api/orderManage/workOrder/workOrder'
|
||||
import { timeFormatter } from '@/filters'
|
||||
import basicData from '@/filters/basicData'
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
filters: {
|
||||
commonFilter: (source, filterType = a => a) => {
|
||||
return filterType(source)
|
||||
}
|
||||
},
|
||||
components: { workOrderClose, workOrderIssue },
|
||||
data() {
|
||||
return {
|
||||
closeVisible: false,
|
||||
issueVisible: false,
|
||||
workOrderId: '',
|
||||
dataForm: {},
|
||||
basicData
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.workOrderId = this.$route.query.id
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.dataForm = {}
|
||||
workOrderDetail(this.workOrderId).then(res => {
|
||||
this.dataForm = res.data
|
||||
})
|
||||
},
|
||||
handleClick() {
|
||||
// this.addOrUpdateVisible = true
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(id)
|
||||
// })
|
||||
},
|
||||
activation() {
|
||||
const data = {}
|
||||
data.status = '3'
|
||||
data.id = this.workOrderId
|
||||
updateForStatus(data).then(res => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500
|
||||
})
|
||||
})
|
||||
},
|
||||
closeClick() {
|
||||
this.closeVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.closeWorkOrder.init(this.dataForm)
|
||||
})
|
||||
},
|
||||
issueClick() {
|
||||
this.issueVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.issueWorkOrder.init()
|
||||
})
|
||||
},
|
||||
tagsClick() {
|
||||
this.$router.push({
|
||||
name: 'packingTags',
|
||||
query: {
|
||||
id: this.workOrderId
|
||||
}
|
||||
})
|
||||
},
|
||||
verifyClick() {
|
||||
this.$router.push({
|
||||
name: 'workOrderVerify',
|
||||
query: {
|
||||
id: this.workOrderId
|
||||
}
|
||||
})
|
||||
},
|
||||
monitorClick() {
|
||||
this.$router.push({
|
||||
name: 'workOrderMonitor',
|
||||
query: {
|
||||
id: this.workOrderId
|
||||
}
|
||||
})
|
||||
},
|
||||
goback() {
|
||||
this.$router.go(-1)
|
||||
},
|
||||
timefilter(obj) {
|
||||
return timeFormatter(obj).substring(0, timeFormatter(obj).lastIndexOf(' '))
|
||||
},
|
||||
stringfilter(objString) {
|
||||
return objString || ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.text {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both
|
||||
}
|
||||
|
||||
.box-card {
|
||||
font-size: 30px;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.el-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
163
src/views/orderManage/workOrder/components/workOrderVerify.vue
Normal file
163
src/views/orderManage/workOrder/components/workOrderVerify.vue
Normal file
@@ -0,0 +1,163 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-02-27 14:49:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-06 17:58:53
|
||||
* @Description: 工单验证
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span><b>{{ $t('module.orderManage.FalseData.FalseData1') }}</b></span>
|
||||
<el-button style="float: right;" type="success" @click="goback()">{{ 'btn.back' | i18nFilter }}</el-button>
|
||||
</div>
|
||||
<div class="text item">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData2') }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData3') }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData5') }}</div></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData6') }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData8') }}</div></el-col>
|
||||
<el-col :span="6"><div>{{ $t('module.orderManage.FalseData.FalseData9') }}</div></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span><b>{{ $t('module.orderManage.order.workOrderVerificationResult') }}</b></span>
|
||||
</div>
|
||||
<el-menu
|
||||
:default-active="activeIndex"
|
||||
mode="horizontal"
|
||||
background-color="#545c64"
|
||||
text-color="#fff"
|
||||
active-text-color="#ffd04b"
|
||||
@select="handleSelect"
|
||||
>
|
||||
<el-menu-item index="1">{{ $t('module.orderManage.order.deviceDetection') }}</el-menu-item>
|
||||
<el-menu-item index="2">{{ $t('module.orderManage.order.process') }}</el-menu-item>
|
||||
<el-menu-item index="3">{{ $t('module.orderManage.order.useMaterial') }}</el-menu-item>
|
||||
<el-menu-item index="4">{{ $t('module.orderManage.order.basePlate') }}</el-menu-item>
|
||||
<el-menu-item index="5">{{ $t('module.orderManage.order.team') }}</el-menu-item>
|
||||
</el-menu>
|
||||
</el-card>
|
||||
<verify-equipment v-if="equipmentVisible" ref="verifyEquipment" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
<verify-craft v-if="craftVisible" ref="verifyCraft" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
<verify-group v-if="groupVisible" ref="verifyGroup" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
<verify-materiel v-if="materielVisible" ref="verifyMateriel" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
<verify-plate v-if="plateVisible" ref="verifyPlate" :work-order-id="workOrderId" @refreshDataList="handleClick" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import verifyEquipment from './verify-equipment'
|
||||
import verifyCraft from './verify-craft'
|
||||
import verifyGroup from './verify-group'
|
||||
import verifyMateriel from './verify-materiel'
|
||||
import verifyPlate from './verify-plate'
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { verifyEquipment, verifyCraft, verifyGroup, verifyMateriel, verifyPlate },
|
||||
data() {
|
||||
return {
|
||||
equipmentVisible: false,
|
||||
craftVisible: false,
|
||||
groupVisible: false,
|
||||
materielVisible: false,
|
||||
plateVisible: false,
|
||||
workOrderId: '',
|
||||
activeIndex: '1'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.workOrderId = this.$route.query.id
|
||||
this.handleSelect('1')
|
||||
},
|
||||
methods: {
|
||||
handleClick() {
|
||||
// this.addOrUpdateVisible = true
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(id)
|
||||
// })
|
||||
},
|
||||
handleSelect(key, keyPath) {
|
||||
this.equipmentVisible = false
|
||||
this.craftVisible = false
|
||||
this.groupVisible = false
|
||||
this.materielVisible = false
|
||||
this.plateVisible = false
|
||||
switch (key) {
|
||||
case '1':
|
||||
this.equipmentVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.verifyEquipment.init()
|
||||
})
|
||||
break
|
||||
case '2':
|
||||
this.craftVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.verifyCraft.init()
|
||||
})
|
||||
break
|
||||
case '3':
|
||||
this.materielVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.verifyMateriel.init()
|
||||
})
|
||||
break
|
||||
case '4':
|
||||
this.plateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.verifyPlate.init()
|
||||
})
|
||||
break
|
||||
case '5':
|
||||
this.groupVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.verifyGroup.init()
|
||||
})
|
||||
break
|
||||
}
|
||||
},
|
||||
goback() {
|
||||
this.$router.go(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.text {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both
|
||||
}
|
||||
|
||||
.box-card {
|
||||
width: 80%;
|
||||
font-size: 30px;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.el-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
269
src/views/orderManage/workOrder/workOrder.vue
Normal file
269
src/views/orderManage/workOrder/workOrder.vue
Normal file
@@ -0,0 +1,269 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2021-07-26 14:13:58
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="formData"
|
||||
:inline="true"
|
||||
size="medium"
|
||||
label-width="130px"
|
||||
>
|
||||
<el-form-item :label="$t('module.orderManage.order.keyword')" prop="key">
|
||||
<el-input v-model="formData.key" :placeholder="$i18nForm(['placeholder.input', this.$t('module.orderManage.order.NameOrCode')])" style="width:200px" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('module.orderManage.order.ActualStartTime')" prop="time">
|
||||
<el-date-picker
|
||||
v-model="formData.timeSlot"
|
||||
type="daterange"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
:start-placeholder="$t('module.orderManage.order.StartTime')"
|
||||
:end-placeholder="$t('module.orderManage.order.StartTime')"
|
||||
:range-separator="$t('module.orderManage.order.To')"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getList()"> {{ 'btn.search' | i18nFilter }} </el-button>
|
||||
<el-button v-if="false" type="primary" @click="addNew()"> {{ 'btn.add' | i18nFilter }} </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<base-table
|
||||
:page="listQuery.current"
|
||||
:limit="listQuery.size"
|
||||
:table-config="tableProps"
|
||||
:table-data="list"
|
||||
:is-loading="listLoading"
|
||||
>
|
||||
<method-btn
|
||||
v-if="false"
|
||||
slot="handleBtn"
|
||||
:width="trueWidth"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="formData.current"
|
||||
:limit.sync="formData.size"
|
||||
@pagination="getList()"
|
||||
/>
|
||||
<workOrder-add v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { workOrderList, workOrderDelete } from '@/api/orderManage/workOrder/workOrder'
|
||||
import i18n from '@/lang'
|
||||
import workOrderAdd from './components/workOrder-add'
|
||||
import workOrderBtn from './components/workOrderBtn'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
|
||||
import { timeFormatter } from '@/filters'
|
||||
import basicData from '@/filters/basicData'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
*
|
||||
* Interface ConfigItem = {
|
||||
* prop: string,
|
||||
* label: string,
|
||||
* width: string,
|
||||
* align: string,
|
||||
* subcomponent: function,
|
||||
* filter: function
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'edit',
|
||||
btnName: 'btn.edit'
|
||||
},
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: 'btn.delete'
|
||||
}
|
||||
]
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.orderManage.order.createTime'),
|
||||
filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.orderManage.order.WorkOrderName'),
|
||||
align: 'center',
|
||||
width: '150px'
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNo',
|
||||
label: i18n.t('module.orderManage.order.WorkOrderCode'),
|
||||
align: 'center',
|
||||
width: '150px'
|
||||
},
|
||||
{
|
||||
prop: 'orderName',
|
||||
label: i18n.t('module.orderManage.order.OrderName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'startProduceTime',
|
||||
label: i18n.t('module.orderManage.order.ActualStartTime'),
|
||||
align: 'center',
|
||||
filter: timeFormatter,
|
||||
width: '150px'
|
||||
},
|
||||
{
|
||||
prop: 'priority',
|
||||
label: i18n.t('module.orderManage.order.priority'),
|
||||
align: 'center',
|
||||
filter: basicData('priority')
|
||||
},
|
||||
// {
|
||||
// prop: 'planStartProduceTime',
|
||||
// label: i18n.t('module.orderManage.order.WorkOrderInitiation'),
|
||||
// align: 'center',
|
||||
// filter: timeFormatter
|
||||
// },
|
||||
{
|
||||
prop: 'triggerOrigin',
|
||||
label: i18n.t('module.orderManage.order.source'),
|
||||
align: 'center',
|
||||
filter: basicData('source')
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: i18n.t('module.orderManage.order.status'),
|
||||
align: 'center',
|
||||
filter: basicData('workOrderStatus')
|
||||
},
|
||||
{
|
||||
prop: 'planQuantity',
|
||||
label: i18n.t('module.orderManage.order.PlannedProcessingVolume'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'actualQuantity',
|
||||
label: i18n.t('module.orderManage.order.ActualFinishedProduct'),
|
||||
align: 'center',
|
||||
width: '200px'
|
||||
},
|
||||
{
|
||||
prop: 'scrapQuantity',
|
||||
label: i18n.t('module.orderManage.order.NumberOfDamages'),
|
||||
align: 'center',
|
||||
width: '200px'
|
||||
},
|
||||
{
|
||||
prop: 'workOrder',
|
||||
label: i18n.t('module.orderManage.order.workOrderDetail'),
|
||||
subcomponent: workOrderBtn,
|
||||
align: 'center',
|
||||
width: '150px'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'ScrapInfo',
|
||||
components: { Pagination, BaseTable, MethodBtn, workOrderAdd },
|
||||
data() {
|
||||
return {
|
||||
addOrUpdateVisible: false,
|
||||
tableBtn,
|
||||
trueWidth: 200,
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: false,
|
||||
formData: {
|
||||
timeSlot: [],
|
||||
key: '',
|
||||
current: 1,
|
||||
size: 10
|
||||
},
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
handleClick(raw) {
|
||||
if (raw.type === 'delete') {
|
||||
this.$confirm(`${this.$t('module.basicData.visual.TipsBefore')}[${raw.data.name}]?`, this.$t('module.basicData.visual.Tips'), {
|
||||
confirmButtonText: this.$t('module.basicData.visual.confirmButtonText'),
|
||||
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
workOrderDelete(raw.data.id).then(response => {
|
||||
this.$message({
|
||||
message: this.$t('module.basicData.visual.success'),
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
}).catch(() => {})
|
||||
} else {
|
||||
this.addNew(raw.data.id)
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
if (this.formData.timeSlot) {
|
||||
this.formData.startTime = this.formData.timeSlot[0]
|
||||
this.formData.endTime = this.formData.timeSlot[1]
|
||||
} else {
|
||||
this.formData.startTime = ''
|
||||
this.formData.endTime = ''
|
||||
}
|
||||
this.formData.name = this.formData.key
|
||||
this.formData.workOrderNo = this.formData.key
|
||||
workOrderList(this.formData).then(response => {
|
||||
if (response.data.records) {
|
||||
this.list = response.data.records
|
||||
} else {
|
||||
this.list.splice(0, this.list.length)
|
||||
}
|
||||
this.total = response.data.total
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 新增 / 修改
|
||||
addNew(id) {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user