开始
结束
- 完成
+ 领导批示
异常说明
奇思妙想
@@ -219,7 +241,9 @@ export default {
actionLoading: false,
endDialogVisible: false,
noteDialogVisible: false,
+ canUseLeaderInstruction: false,
tableData: [],
+ categoryOptions: ['实验', '研发', '方案评审', '售前', '售中', '订单', '售后信息确认', '售后问题指导', '售后物料准备', '返修品处理', '其他'],
projectOptions: [],
materialOptions: [],
parentMaterialOptions: [],
@@ -243,11 +267,13 @@ export default {
drawingNo: '',
parentItemCode: '',
category: '',
- status: ''
+ taskSource: '',
+ status: '未完成'
}
}
},
created() {
+ this.loadLeaderInstructionPermission()
this.loadDefaultProjectOptions()
this.loadDefaultMaterialOptions()
this.searchTable()
@@ -272,6 +298,7 @@ export default {
['物料编码', this.searchForm.itemCode || ''],
['图号', this.searchForm.drawingNo || ''],
['类别', this.searchForm.category || ''],
+ ['任务来源', this.searchForm.taskSource || ''],
['关联父件物料编码', this.searchForm.parentItemCode || ''],
['预计开始时间_Start', ''],
['预计开始时间_End', ''],
@@ -328,9 +355,6 @@ export default {
canStart(row) {
return Number(row.当前用户未结束报工数 || 0) === 0
},
- canComplete(row) {
- return row.单据状态 !== '已完成' && Number(row.报工次数 || 0) > 0
- },
async startTask(row) {
const openTask = await this.getCurrentOpenTask()
if (openTask === false) return
@@ -398,36 +422,21 @@ export default {
['说明类型', this.noteForm.说明类型],
['说明内容', content],
['操作人ID', this.currentUserId()],
- ['操作人', this.currentUserName()]
+ ['操作人', this.currentUserName()],
+ ['角色编号', this.currentRoleId()]
], '保存成功')
if (success) this.noteDialogVisible = false
},
- async completeTask(row) {
- const latest = await this.getLatestTask(row.DID)
- if (!latest) return
- Object.assign(row, latest)
- if (Number(latest.未结束报工数 || 0) > 0) {
- const people = latest.未结束报工人员 || '有人员'
- this.$message.warning(`${people} 还未点击结束,不能完成任务`)
- return
+ async loadLeaderInstructionPermission() {
+ this.canUseLeaderInstruction = false
+ const data = this.CreateData('11', '设计报工_领导批示权限_查询', [['角色编号', this.currentRoleId()]])
+ try {
+ const response = await this.ExecDatabase(data)
+ const row = (response.data || [])[0] || {}
+ this.canUseLeaderInstruction = Number(row.有批示权限 || 0) === 1
+ } catch (error) {
+ console.error('领导批示权限查询失败:', error)
}
- if (latest.单据状态 === '已完成') {
- this.$message.warning('任务已完成')
- this.searchTable()
- return
- }
- if (!this.canComplete(latest)) {
- this.$message.warning('任务未产生已结束报工,不能完成')
- return
- }
- this.$confirm(`确定完成设计任务 DID ${latest.DID} 吗?`, '提示', { type: 'warning' })
- .then(() => {
- this.runAction('设计报工_任务_完成', [
- ['DID', latest.DID],
- ['操作人', this.currentUserName()]
- ], '完成成功')
- })
- .catch(() => {})
},
async getLatestTask(did) {
const params = [
@@ -436,6 +445,7 @@ export default {
['物料编码', ''],
['图号', ''],
['类别', ''],
+ ['任务来源', ''],
['关联父件物料编码', ''],
['预计开始时间_Start', ''],
['预计开始时间_End', ''],
@@ -468,6 +478,7 @@ export default {
['物料编码', ''],
['图号', ''],
['类别', ''],
+ ['任务来源', ''],
['关联父件物料编码', ''],
['预计开始时间_Start', ''],
['预计开始时间_End', ''],
@@ -522,6 +533,9 @@ export default {
currentUserName() {
return (this.$store && this.$store.getters && this.$store.getters.name) || ''
},
+ currentRoleId() {
+ return (this.$store && this.$store.getters && this.$store.getters.token) || ''
+ },
formatMaterialLabel(item) {
return item.物料名称 ? `${item.物料编码} | ${item.物料名称}` : item.物料编码
},
@@ -565,19 +579,55 @@ export default {
margin: 0;
padding: 0;
min-width: 32px;
+ font-size: 15px;
}
.design-action-buttons ::v-deep .el-button + .el-button {
margin-left: 0;
}
+.design-data-table ::v-deep .el-table__header th {
+ height: 48px;
+ padding: 8px 0;
+ font-size: 15px;
+}
+
+.design-data-table ::v-deep .el-table__row,
+.design-data-table ::v-deep .el-table__body td {
+ height: 108px;
+}
+
+.design-data-table ::v-deep .el-table__body td {
+ padding: 8px 0;
+ font-size: 16px;
+}
+
+.design-data-table ::v-deep .cell {
+ line-height: 24px;
+}
+
+.design-data-table ::v-deep .el-table__body .cell,
+.design-data-table ::v-deep .el-table__body .cell.el-tooltip {
+ white-space: normal !important;
+ overflow: visible;
+ text-overflow: clip;
+ overflow-wrap: anywhere;
+ word-break: break-word;
+}
+
+.design-data-table ::v-deep .el-tag {
+ height: 30px;
+ line-height: 28px;
+ font-size: 14px;
+}
+
.note-history {
width: 100%;
- min-height: 20px;
- line-height: 20px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
+ min-height: 72px;
+ line-height: 24px;
+ white-space: pre-line;
+ overflow: visible;
+ overflow-wrap: anywhere;
}
.note-tooltip-content {
diff --git a/src/views/ProductionManagement/DesignReportTask/Task/index.vue b/src/views/ProductionManagement/DesignReportTask/Task/index.vue
index 9f80c34..d591179 100644
--- a/src/views/ProductionManagement/DesignReportTask/Task/index.vue
+++ b/src/views/ProductionManagement/DesignReportTask/Task/index.vue
@@ -55,10 +55,15 @@
/>