|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<!-- 工单池 -->
|
|
<!-- 工单池 -->
|
|
- <template-page ref="pageRef" :getList="getList" :operation="operation" :exportList="exportList"
|
|
|
|
|
|
+ <template-page ref="pageRef" :getList="getList" :operation="operation()" :exportList="exportList"
|
|
:optionsEvensGroup="optionsEvensGroup" :columnParsing="columnParsing" :tableAttributes="tableAttributes"
|
|
:optionsEvensGroup="optionsEvensGroup" :columnParsing="columnParsing" :tableAttributes="tableAttributes"
|
|
:tableEvents="tableEvents" :moreParameters="moreParameters" :screeningAnalysis="screeningAnalysis"
|
|
:tableEvents="tableEvents" :moreParameters="moreParameters" :screeningAnalysis="screeningAnalysis"
|
|
:filterMethod="filterMethod" :replaceOrNotMap="true" :defaultSearchData="defaultSearchData">
|
|
:filterMethod="filterMethod" :replaceOrNotMap="true" :defaultSearchData="defaultSearchData">
|
|
@@ -37,6 +37,7 @@
|
|
import { EventBus } from '@/utils/eventBus'
|
|
import { EventBus } from '@/utils/eventBus'
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
|
|
+import operation_mixin from '@/components/template/operation_mixin.js'
|
|
import { listPageV2 } from "@/api/workOrder/orderType";
|
|
import { listPageV2 } from "@/api/workOrder/orderType";
|
|
import { orderBaseList, orderBaseListExport, orderBaseStatusCount, orderBaseImport } from "@/api/workOrderPool.js"
|
|
import { orderBaseList, orderBaseListExport, orderBaseStatusCount, orderBaseImport } from "@/api/workOrderPool.js"
|
|
import workOrderInfo from './detailModule/workOrderInfo/index.vue'
|
|
import workOrderInfo from './detailModule/workOrderInfo/index.vue'
|
|
@@ -54,7 +55,7 @@ export default {
|
|
Reassignment,
|
|
Reassignment,
|
|
Reschedule
|
|
Reschedule
|
|
},
|
|
},
|
|
- mixins: [import_mixin],
|
|
|
|
|
|
+ mixins: [import_mixin, operation_mixin],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
id: this.$route.query.id || '',
|
|
id: this.$route.query.id || '',
|
|
@@ -114,26 +115,26 @@ export default {
|
|
return [
|
|
return [
|
|
[
|
|
[
|
|
[
|
|
[
|
|
- {
|
|
|
|
- name: '创建工单',
|
|
|
|
|
|
+ this.optionsEvensAuth("createWorkOrder", {
|
|
click: () => {
|
|
click: () => {
|
|
this.createFormBool = true
|
|
this.createFormBool = true
|
|
}
|
|
}
|
|
- },
|
|
|
|
|
|
+ })
|
|
],
|
|
],
|
|
[
|
|
[
|
|
- {
|
|
|
|
|
|
+ this.optionsEvensAuth(["importTemplate", "downloadImportTemplate"], {
|
|
name: '导入工单',
|
|
name: '导入工单',
|
|
click: () => { }
|
|
click: () => { }
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '导入模板',
|
|
|
|
- render: () => {
|
|
|
|
- return this.importButton(orderBaseImport, '导入模板')
|
|
|
|
|
|
+ }),
|
|
|
|
+ this.optionsEvensAuth("importTemplate", ({ moduleName }) => {
|
|
|
|
+ return {
|
|
|
|
+ name: moduleName,
|
|
|
|
+ render: () => {
|
|
|
|
+ return this.importButton(orderBaseImport, moduleName)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '下载导入模板',
|
|
|
|
|
|
+ }),
|
|
|
|
+ this.optionsEvensAuth("downloadImportTemplate", {
|
|
click: () => {
|
|
click: () => {
|
|
commonTemplateDownload({ name: '工单导入模板.xlsx' }, `${this.$route.meta.title}`)
|
|
commonTemplateDownload({ name: '工单导入模板.xlsx' }, `${this.$route.meta.title}`)
|
|
.then(res => {
|
|
.then(res => {
|
|
@@ -146,15 +147,14 @@ export default {
|
|
this.$message.error('下载失败')
|
|
this.$message.error('下载失败')
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- },
|
|
|
|
|
|
+ }),
|
|
],
|
|
],
|
|
[
|
|
[
|
|
- {
|
|
|
|
|
|
+ this.optionsEvensAuth(["bulkOrder", "lotOrder"], {
|
|
name: '批量操作',
|
|
name: '批量操作',
|
|
click: () => { }
|
|
click: () => { }
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '批量派单',
|
|
|
|
|
|
+ }),
|
|
|
|
+ this.optionsEvensAuth("bulkOrder", {
|
|
click: () => {
|
|
click: () => {
|
|
if (this.recordSelected.length === 0) {
|
|
if (this.recordSelected.length === 0) {
|
|
this.$message.warning('请勾选工单')
|
|
this.$message.warning('请勾选工单')
|
|
@@ -162,9 +162,8 @@ export default {
|
|
}
|
|
}
|
|
this.reassignmentBool = true
|
|
this.reassignmentBool = true
|
|
}
|
|
}
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '批量约单',
|
|
|
|
|
|
+ }),
|
|
|
|
+ this.optionsEvensAuth("lotOrder", {
|
|
click: () => {
|
|
click: () => {
|
|
if (this.recordSelected.length === 0) {
|
|
if (this.recordSelected.length === 0) {
|
|
this.$message.warning('请勾选工单')
|
|
this.$message.warning('请勾选工单')
|
|
@@ -172,7 +171,7 @@ export default {
|
|
}
|
|
}
|
|
this.rescheduleBool = true
|
|
this.rescheduleBool = true
|
|
}
|
|
}
|
|
- },
|
|
|
|
|
|
+ }),
|
|
],
|
|
],
|
|
]
|
|
]
|
|
]
|
|
]
|
|
@@ -231,9 +230,11 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
selectable(row, index) {
|
|
selectable(row, index) {
|
|
return !["YWG", "YJS", "YQX"].includes(Object.entries(row.selectMapData.orderStatus).find(([key, val]) => val == row.orderStatus)?.[0])
|
|
return !["YWG", "YJS", "YQX"].includes(Object.entries(row.selectMapData.orderStatus).find(([key, val]) => val == row.orderStatus)?.[0])
|
|
},
|
|
},
|
|
|
|
+
|
|
screeningAnalysis(jname, val) {
|
|
screeningAnalysis(jname, val) {
|
|
if (jname == 'orderFlags') {
|
|
if (jname == 'orderFlags') {
|
|
return (val || []).map(item => item.tagName).join(',')
|
|
return (val || []).map(item => item.tagName).join(',')
|
|
@@ -241,13 +242,14 @@ export default {
|
|
return val
|
|
return val
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
filterMethod(value, row, column) {
|
|
filterMethod(value, row, column) {
|
|
if (column['property'] == 'orderFlags') {
|
|
if (column['property'] == 'orderFlags') {
|
|
return (row[column['property']] || []).map(item => item.tagName).join(',') === value
|
|
return (row[column['property']] || []).map(item => item.tagName).join(',') === value
|
|
}
|
|
}
|
|
return row[column['property']] === value
|
|
return row[column['property']] === value
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
// 获取统计
|
|
// 获取统计
|
|
getOrderBaseStatusCount(...p) {
|
|
getOrderBaseStatusCount(...p) {
|
|
orderBaseStatusCount(...p).then(res => {
|
|
orderBaseStatusCount(...p).then(res => {
|
|
@@ -361,17 +363,17 @@ export default {
|
|
this.recordSelected = data
|
|
this.recordSelected = data
|
|
},
|
|
},
|
|
|
|
|
|
- operation(h, { row, index, column }) {
|
|
|
|
- return (
|
|
|
|
- <div class='operation-btns'>
|
|
|
|
- <el-button type="text" onClick={() => {
|
|
|
|
|
|
+ operation() {
|
|
|
|
+ return this.operationBtn({
|
|
|
|
+ edit: {
|
|
|
|
+ click: ({ row, index, column }) => {
|
|
this.id = row.id
|
|
this.id = row.id
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.detailFormBool = true
|
|
this.detailFormBool = true
|
|
})
|
|
})
|
|
- }}>编辑</el-button>
|
|
|
|
- </div>
|
|
|
|
- )
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
|
|
handleClose() {
|
|
handleClose() {
|