|
|
|
@ -19,10 +19,12 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<el-form :inline="true" :model="searchData" class="search-form" @keyup.enter.native="queryHandle"> |
|
|
|
<el-form :inline="true" label-position="top" :model="searchData" class="search-form" @keyup.enter.native="queryHandle"> |
|
|
|
<template v-if="searchExpanded"> |
|
|
|
<el-row :gutter="16" class="search-condition-row"> |
|
|
|
<el-col :span="2"> |
|
|
|
<el-form-item label="BU"> |
|
|
|
<el-select v-model="searchData.buNo" clearable filterable placeholder="全部" style="width: 180px"> |
|
|
|
<el-select v-model="searchData.buNo" clearable filterable placeholder="全部"> |
|
|
|
<el-option |
|
|
|
v-for="item in buList" |
|
|
|
:key="item.buNo" |
|
|
|
@ -31,8 +33,10 @@ |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="2"> |
|
|
|
<el-form-item label="是否强制"> |
|
|
|
<el-select v-model="searchData.forceType" clearable placeholder="全部" style="width: 100px"> |
|
|
|
<el-select v-model="searchData.forceType" clearable placeholder="全部"> |
|
|
|
<el-option |
|
|
|
v-for="item in forceTypeOptions" |
|
|
|
:key="item.value" |
|
|
|
@ -41,8 +45,10 @@ |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="2"> |
|
|
|
<el-form-item label="代办状态"> |
|
|
|
<el-select v-model="searchData.todoStatus" clearable placeholder="全部" style="width: 100px"> |
|
|
|
<el-select v-model="searchData.todoStatus" clearable placeholder="全部"> |
|
|
|
<el-option |
|
|
|
v-for="item in todoStatusOptions" |
|
|
|
:key="item.value" |
|
|
|
@ -51,8 +57,10 @@ |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item label="责任部门"> |
|
|
|
<el-select v-model="searchData.responsibilityDept" clearable filterable placeholder="全部" style="width: 140px"> |
|
|
|
<el-select v-model="searchData.responsibilityDept" clearable filterable placeholder="全部"> |
|
|
|
<el-option |
|
|
|
v-for="item in roleList" |
|
|
|
:key="item.roleId" |
|
|
|
@ -61,14 +69,59 @@ |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item label="关键字"> |
|
|
|
<el-input |
|
|
|
v-model="searchData.keyword" |
|
|
|
clearable |
|
|
|
placeholder="信息编码/派工单号/订单号" |
|
|
|
style="width: 200px"> |
|
|
|
placeholder="信息编码/派工单号/订单号"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="审核时间"> |
|
|
|
<el-date-picker |
|
|
|
v-model="searchData.auditTimeStart" |
|
|
|
type="datetime" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
format="yyyy-MM-dd HH:mm:ss" |
|
|
|
placeholder="开始日期" |
|
|
|
style="width: 45%"> |
|
|
|
</el-date-picker> |
|
|
|
<span style="margin: 0 6px; color: #DCDFE6;">~</span> |
|
|
|
<el-date-picker |
|
|
|
v-model="searchData.auditTimeEnd" |
|
|
|
type="datetime" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
format="yyyy-MM-dd HH:mm:ss" |
|
|
|
placeholder="结束日期" |
|
|
|
style="width: 45%"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="触发时间"> |
|
|
|
<el-date-picker |
|
|
|
v-model="searchData.triggerTimeStart" |
|
|
|
type="datetime" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
format="yyyy-MM-dd HH:mm:ss" |
|
|
|
placeholder="开始日期" |
|
|
|
style="width: 45%"> |
|
|
|
</el-date-picker> |
|
|
|
<span style="margin: 0 6px; color: #DCDFE6;">~</span> |
|
|
|
<el-date-picker |
|
|
|
v-model="searchData.triggerTimeEnd" |
|
|
|
type="datetime" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
format="yyyy-MM-dd HH:mm:ss" |
|
|
|
placeholder="结束日期" |
|
|
|
style="width: 45%"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</template> |
|
|
|
|
|
|
|
<div class="search-actions"> |
|
|
|
@ -136,6 +189,14 @@ |
|
|
|
<div class="todo-footer"> |
|
|
|
<span class="todo-time">{{ formatDateTime(item.createdTime) }}</span> |
|
|
|
<div class="todo-action-group"> |
|
|
|
<el-button |
|
|
|
size="mini" |
|
|
|
type="primary" |
|
|
|
plain |
|
|
|
:disabled="item.auditFlag === 'Y' && item.operateFlag === 'Y'" |
|
|
|
@click="showDetail(item)"> |
|
|
|
详情 |
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
size="mini" |
|
|
|
type="warning" |
|
|
|
@ -146,11 +207,11 @@ |
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
size="mini" |
|
|
|
type="primary" |
|
|
|
type="success" |
|
|
|
plain |
|
|
|
:disabled="item.auditFlag === 'Y' && item.operateFlag === 'Y'" |
|
|
|
@click="showDetail(item)"> |
|
|
|
详情 |
|
|
|
:disabled="authChange || item.auditFlag !== 'Y'" |
|
|
|
@click="openTodoChangeModal(item)"> |
|
|
|
变更 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -280,7 +341,8 @@ |
|
|
|
ref="comMrbRegister" |
|
|
|
:visible.sync="showMrbRegisterFlag" |
|
|
|
mode="single" |
|
|
|
:load-history="false" |
|
|
|
:mrb-required="false" |
|
|
|
:load-history="true" |
|
|
|
@confirmed="onTodoMrbConfirmed"> |
|
|
|
</ComMrbRegister> |
|
|
|
</div> |
|
|
|
@ -310,7 +372,11 @@ export default { |
|
|
|
forceType: 'force', |
|
|
|
todoStatus: 'pendingAudit', |
|
|
|
responsibilityDept: '', |
|
|
|
keyword: '' |
|
|
|
keyword: '', |
|
|
|
auditTimeStart: '', |
|
|
|
auditTimeEnd: '', |
|
|
|
triggerTimeStart: '', |
|
|
|
triggerTimeEnd: '' |
|
|
|
}, |
|
|
|
forceTypeOptions: [ |
|
|
|
{ label: '强制', value: 'force' }, |
|
|
|
@ -341,12 +407,16 @@ export default { |
|
|
|
}, |
|
|
|
detailRowList: [], |
|
|
|
showMrbRegisterFlag: false, |
|
|
|
currentAuditTodo: null |
|
|
|
currentAuditTodo: null, |
|
|
|
currentMrbAction: '', |
|
|
|
authChange: false, |
|
|
|
menuId: this.$route && this.$route.meta ? this.$route.meta.menuId : '' |
|
|
|
} |
|
|
|
}, |
|
|
|
created () { |
|
|
|
this.loadBuList() |
|
|
|
this.loadRoleList() |
|
|
|
this.getButtonAuthData() |
|
|
|
this.getTodoStats() |
|
|
|
this.getDataList() |
|
|
|
}, |
|
|
|
@ -388,6 +458,10 @@ export default { |
|
|
|
this.searchData.todoStatus = 'pendingAudit' |
|
|
|
this.searchData.responsibilityDept = '' |
|
|
|
this.searchData.keyword = '' |
|
|
|
this.searchData.auditTimeStart = '' |
|
|
|
this.searchData.auditTimeEnd = '' |
|
|
|
this.searchData.triggerTimeStart = '' |
|
|
|
this.searchData.triggerTimeEnd = '' |
|
|
|
this.queryHandle() |
|
|
|
}, |
|
|
|
getTodoStats () { |
|
|
|
@ -423,7 +497,11 @@ export default { |
|
|
|
forceType: this.searchData.forceType, |
|
|
|
todoStatus: this.searchData.todoStatus, |
|
|
|
responsibilityDept: this.searchData.responsibilityDept, |
|
|
|
keyword: this.searchData.keyword |
|
|
|
keyword: this.searchData.keyword, |
|
|
|
auditTimeStart: this.searchData.auditTimeStart || '', |
|
|
|
auditTimeEnd: this.searchData.auditTimeEnd || '', |
|
|
|
triggerTimeStart: this.searchData.triggerTimeStart || '', |
|
|
|
triggerTimeEnd: this.searchData.triggerTimeEnd || '' |
|
|
|
} |
|
|
|
}, |
|
|
|
sizeChangeHandle (val) { |
|
|
|
@ -527,11 +605,32 @@ export default { |
|
|
|
this.$message.info('该代办已审核') |
|
|
|
return |
|
|
|
} |
|
|
|
this.openTodoMrbModal(row, 'audit') |
|
|
|
}, |
|
|
|
openTodoChangeModal (row) { |
|
|
|
if (!row) { |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.authChange) { |
|
|
|
this.$message.warning('当前用户无变更权限') |
|
|
|
return |
|
|
|
} |
|
|
|
if (row.auditFlag !== 'Y') { |
|
|
|
this.$message.warning('请先完成审核再进行变更') |
|
|
|
return |
|
|
|
} |
|
|
|
this.openTodoMrbModal(row, 'change') |
|
|
|
}, |
|
|
|
openTodoMrbModal (row, action) { |
|
|
|
if (!row) { |
|
|
|
return |
|
|
|
} |
|
|
|
const itemNo = this.toInt(row.itemNo) |
|
|
|
if (itemNo === null) { |
|
|
|
this.$message.warning('未找到工序信息,无法发起审核') |
|
|
|
this.$message.warning('未找到工序信息,无法打开MRB异常登记') |
|
|
|
return |
|
|
|
} |
|
|
|
this.currentMrbAction = action || '' |
|
|
|
this.currentAuditTodo = row |
|
|
|
const scheduleData = { |
|
|
|
site: row.site || this.searchData.site || this.$store.state.user.site, |
|
|
|
@ -554,6 +653,13 @@ export default { |
|
|
|
if (!this.currentAuditTodo) { |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.currentMrbAction === 'change') { |
|
|
|
this.getTodoStats() |
|
|
|
this.getDataList() |
|
|
|
this.currentAuditTodo = null |
|
|
|
this.currentMrbAction = '' |
|
|
|
return |
|
|
|
} |
|
|
|
const todo = this.currentAuditTodo |
|
|
|
const params = { |
|
|
|
site: todo.site || this.searchData.site || this.$store.state.user.site, |
|
|
|
@ -574,8 +680,17 @@ export default { |
|
|
|
this.$message.error('代办审核失败') |
|
|
|
}).finally(() => { |
|
|
|
this.currentAuditTodo = null |
|
|
|
this.currentMrbAction = '' |
|
|
|
}) |
|
|
|
}, |
|
|
|
getButtonAuthData () { |
|
|
|
if (typeof this.isAuth !== 'function' || !this.menuId) { |
|
|
|
this.authChange = false |
|
|
|
return |
|
|
|
} |
|
|
|
const changeFlag = this.isAuth(this.menuId + ':change') |
|
|
|
this.authChange = !changeFlag |
|
|
|
}, |
|
|
|
notifyTodoBadgeRefresh () { |
|
|
|
if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function') { |
|
|
|
window.dispatchEvent(new Event('todo-badge-refresh')) |
|
|
|
@ -727,6 +842,7 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
.search-form /deep/ .el-form-item { |
|
|
|
width: 100%; |
|
|
|
margin-bottom: 12px; |
|
|
|
} |
|
|
|
|
|
|
|
@ -736,6 +852,16 @@ export default { |
|
|
|
padding-bottom: 4px; |
|
|
|
} |
|
|
|
|
|
|
|
.search-condition-row { |
|
|
|
margin-bottom: 0; |
|
|
|
} |
|
|
|
|
|
|
|
.search-form /deep/ .el-select, |
|
|
|
.search-form /deep/ .el-date-editor.el-input, |
|
|
|
.search-form /deep/ .el-date-editor.el-input__inner { |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
|
|
|
|
.search-form /deep/ .el-input__inner, |
|
|
|
.search-form /deep/ .el-textarea__inner { |
|
|
|
border-radius: 6px; |
|
|
|
|