|
|
|
@ -55,6 +55,7 @@ |
|
|
|
width="160" |
|
|
|
label="Action"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-link style="cursor: pointer" @click="openApproveDialog(scope.row)">审批 |</el-link> |
|
|
|
<el-link style="cursor: pointer" @click="editPart(scope.row)">编辑 |</el-link> |
|
|
|
<el-link style="cursor: pointer" @click="deletePart(scope.row)">删除</el-link> |
|
|
|
</template> |
|
|
|
@ -187,6 +188,52 @@ |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 审批对话框 - rqrq --> |
|
|
|
<el-dialog |
|
|
|
title="审批" |
|
|
|
:visible.sync="approveDialogVisible" |
|
|
|
width="550px" |
|
|
|
:close-on-click-modal="false" |
|
|
|
v-drag> |
|
|
|
<el-form :model="approveData" label-position="top"> |
|
|
|
<!-- <el-row :gutter="20"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="单据号"> |
|
|
|
<el-input v-model="approveData.applyNo" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="当前节点"> |
|
|
|
<el-input v-model="approveData.nodeName" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="审批部门"> |
|
|
|
<el-input v-model="approveData.departmentName" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="审批人"> |
|
|
|
<el-input v-model="approveData.assigneeName" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> --> |
|
|
|
<el-form-item label="审批意见"> |
|
|
|
<el-input type="textarea" v-model="approveData.comment" :rows="3" placeholder="请输入审批意见"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;margin-top: 60px;text-align:center"> |
|
|
|
|
|
|
|
<el-button type="success" @click="submitApprove('APPROVED')" :loading="approveLoading">同意</el-button> |
|
|
|
<el-button type="danger" @click="submitApprove('REJECTED')" :loading="approveLoading">驳回</el-button> |
|
|
|
<!-- <el-button type="info" @click="openFlowPreview">流程预览</el-button> --> |
|
|
|
<el-button @click="approveDialogVisible = false" :disabled="approveLoading">取消</el-button> |
|
|
|
|
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -262,6 +309,21 @@ export default { |
|
|
|
mainDataList: [], |
|
|
|
dataListLoading: false, |
|
|
|
activeName: 'basicInfo', |
|
|
|
// 审批对话框 |
|
|
|
approveDialogVisible: false, |
|
|
|
approveLoading: false, |
|
|
|
approveData: { |
|
|
|
applyNo: '', |
|
|
|
// nodeCode: '', |
|
|
|
// nodeName: '', |
|
|
|
// departmentName: '', // 审批部门 - rqrq |
|
|
|
// assigneeName: '', |
|
|
|
site: '', |
|
|
|
orderType: '', |
|
|
|
comment: '', |
|
|
|
flowCode: '', |
|
|
|
flowVersion: null |
|
|
|
}, |
|
|
|
columnArray1: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -460,6 +522,42 @@ export default { |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: this.functionId, |
|
|
|
serialNumber: 'partTableDepartmentName', |
|
|
|
tableId: 'partTable', |
|
|
|
tableName: '产品信息', |
|
|
|
columnProp: 'departmentName', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '审批部门', |
|
|
|
columnWidth: '100', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: this.functionId, |
|
|
|
serialNumber: 'partTableApproverName', |
|
|
|
tableId: 'partTable', |
|
|
|
tableName: '产品信息', |
|
|
|
columnProp: 'assigneeName', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '要求审批人', |
|
|
|
columnWidth: '100', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
} |
|
|
|
], |
|
|
|
exportName: '产品信息' + this.dayjs().format('YYYYMMDDHHmmss'), |
|
|
|
@ -559,7 +657,7 @@ export default { |
|
|
|
this.currentpart.category = val.family_id |
|
|
|
} |
|
|
|
|
|
|
|
if (this.tagNo === 525) { |
|
|
|
if (this.tagNo === 510) { |
|
|
|
this.currentpart.unit = val.UMID |
|
|
|
} |
|
|
|
if (this.tagNo === 522) { |
|
|
|
@ -687,7 +785,8 @@ export default { |
|
|
|
refreshApproval () { |
|
|
|
let inData = { |
|
|
|
site: this.currentRow.site, |
|
|
|
partNo: this.currentRow.partNo, |
|
|
|
orderRef1: this.currentRow.partNo, |
|
|
|
orderType: '产品资料', |
|
|
|
height: Number(this.height) - 20 |
|
|
|
} |
|
|
|
this.$refs.approval.init(inData) |
|
|
|
@ -776,6 +875,73 @@ export default { |
|
|
|
this.$message.error('删除失败: ' + error.message) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 打开审批对话框 |
|
|
|
openApproveDialog(row) { |
|
|
|
this.approveData = { |
|
|
|
applyNo: row.flowNodeInstanceData.applyNo, |
|
|
|
// nodeCode: row.nodeCode, |
|
|
|
// nodeName: row.nodeName, |
|
|
|
// departmentName: row.departmentName || '', // 审批部门 - rqrq |
|
|
|
// assigneeName: row.assigneeName, |
|
|
|
site: row.flowNodeInstanceData.site, |
|
|
|
orderType: row.flowNodeInstanceData.orderType, |
|
|
|
comment: '', |
|
|
|
flowCode: row.flowNodeInstanceData.flowCode, |
|
|
|
flowVersion: row.flowNodeInstanceData.flowVersion |
|
|
|
} |
|
|
|
this.approveDialogVisible = true |
|
|
|
}, |
|
|
|
// 提交审批 |
|
|
|
submitApprove(action) { |
|
|
|
if (action === 'REJECTED' && !this.approveData.comment) { |
|
|
|
this.$message.warning('驳回时必须填写审批意见') |
|
|
|
return |
|
|
|
} |
|
|
|
this.approveLoading = true |
|
|
|
approveNodeInstance({ |
|
|
|
applyNo: row.flowNodeInstanceData.applyNo, |
|
|
|
nodeCode: row.flowNodeInstanceData.nodeCode, |
|
|
|
site: row.flowNodeInstanceData.site, |
|
|
|
orderType: row.flowNodeInstanceData.orderType, |
|
|
|
action: action, |
|
|
|
comment: this.approveData.comment |
|
|
|
}).then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success(action === 'APPROVED' ? '审批通过成功' : '驳回成功') |
|
|
|
this.approveDialogVisible = false |
|
|
|
this.getInstanceList() |
|
|
|
this.getNodeInstanceList() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '操作失败') |
|
|
|
} |
|
|
|
}).finally(() => { |
|
|
|
this.approveLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 重新审批 - rqrq |
|
|
|
handleRestart(row) { |
|
|
|
this.$confirm('确定要重新发起审批流程吗?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
restartFlowInstance({ |
|
|
|
applyNo: row.flowNodeInstanceData.applyNo, |
|
|
|
site: row.flowNodeInstanceData.site, |
|
|
|
orderType: row.flowNodeInstanceData.orderType |
|
|
|
}).then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success('重新审批成功') |
|
|
|
this.getInstanceList() |
|
|
|
this.nodeInstanceList = [] |
|
|
|
this.currentInstance = null |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '操作失败') |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => {}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|