Browse Source

产品资料与审批放行界面分开

master
yanyan 4 weeks ago
parent
commit
d64d1c291e
  1. 5
      src/api/part/partInfo.js
  2. 6
      src/views/modules/srmPart/com_part_Suppliers.vue
  3. 835
      src/views/modules/srmPart/partApprovalList.vue
  4. 266
      src/views/modules/srmPart/partInfoList.vue

5
src/api/part/partInfo.js

@ -6,3 +6,8 @@ export const createPart = data => createAPI('/part/save', 'POST', data)
export const updatePart = data => createAPI('/part/save', 'POST', data)
export const searchPartInfo = data => createAPI('part/getPart','POST', data)
export const deletePart = id => createAPI('/part/delete', 'POST', { id: id })
//产品审批
export const partApprove = data => createAPI('/part/partApprove', 'POST', data)
//待审批物料流程
export const searchPartApproveList = data => createAPI('/part/searchPartApproveList', 'POST', data)

6
src/views/modules/srmPart/com_part_Suppliers.vue

@ -70,8 +70,8 @@
<el-col :span="6">
<el-form-item label="是否为主供应商">
<el-select v-model="partSuppliersData.isMainSupplier" placeholder="请选择" >
<el-option label="是" value="N"></el-option>
<el-option label="否" value="Y"></el-option>
<el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -145,7 +145,7 @@ export default {
secondarySupplierName:'',
remark:'',
createdBy:'',
isMainSupplier:'N',
isMainSupplier:'Y',
},
contractModelFlag:false,
visible:false,

835
src/views/modules/srmPart/partApprovalList.vue

@ -0,0 +1,835 @@
<template>
<div class="customer-css" >
<!-- 查询时间和产品 -->
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;" >
<el-row>
<el-col :span="24" style="">
<el-form-item >
<span style="cursor: pointer" slot="label" @click="getBaseList(1100)"><a href="#">产品编码</a></span>
<el-input v-model="searchData.partNo" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="'NPC货号:'">
<el-input v-model="searchData.npc" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="'产品名称:'">
<el-input v-model="searchData.partDesc" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button class="customer-bun-min" type="primary" @click="getMainData" style="">查询</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:height="height"
:data="mainDataList"
border
ref="mainTable"
highlight-current-row
@row-click="changeData"
v-loading="dataListLoading"
style="margin-top: 0px; width: 100%;">
<el-table-column
v-for="(item,index) in columnArray1" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 100px"/></span>
</template>
</el-table-column>
<!-- 操作列 -->
<el-table-column
fixed="right"
header-align="center"
align="center"
width="160"
label="Action">
<template slot-scope="scope">
<el-link style="cursor: pointer" v-if="scope.row.flowStatus === 'COMPLETED' || scope.row.flowStatus === 'TERMINATED'" @click="handleRestart(scope.row)">重新审批 |</el-link>
<el-link style="cursor: pointer" v-if="scope.row.flowStatus === 'RUNNING'" @click="openApproveDialog(scope.row)">审批 |</el-link>
</template>
</el-table-column>
</el-table>
<!-- 分页插件 -->
<el-pagination style="margin-top: 0px"
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-tabs v-model="activeName" style="margin-top: 0px; width: 99%;" @tab-click="tabClick" class="customer-tab" type="border-card">
<el-tab-pane label="基础信息" name="basicInfo" style="">
<basicInfo ref="basicInfo"></basicInfo>
</el-tab-pane>
<el-tab-pane label="规格参数" name="specParams" style="">
<specParams ref="specParams"></specParams>
</el-tab-pane>
<el-tab-pane label="关联供应商" name="suppliers" style="">
<suppliers ref="suppliers"></suppliers>
</el-tab-pane>
<el-tab-pane label="审批与放行" name="approval" style="">
<approval ref="approval"></approval>
</el-tab-pane>
<el-tab-pane label="附件" name="attachments" style="">
<attachments ref="attachments"></attachments>
</el-tab-pane>
</el-tabs>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 审批对话框 - 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-row :gutter="20">
<el-col :span="12">
<el-form-item label="是否特殊放行">
<el-select v-model="approveData.specialRelease" style="width: 100%">
<el-option label="否" value="N"></el-option>
<el-option label="是" value="Y"></el-option>
</el-select>
</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>
<script>
/* 组件 */
import {
searchPartApproveList,
partApprove
} from '@/api/part/partInfo.js'
import excel from '@/utils/excel-util.js'
import Chooselist from '@/views/modules/common/Chooselist_eam'
import basicInfo from './com_part_BasicInfo'
import specParams from './com_part_SpecParams'
import suppliers from './com_part_Suppliers'
import approval from './com_part_Approval'
import attachments from './com_part_Attachments'
import {
restartFlowInstance
} from '@/api/workFlow/workFlow.js'
export default {
data () {
return {
functionId: this.$route.meta.menuId,
height: 200,
currentRow: {},
searchData: {
partNo: '',
npc: '',
partDesc: '',
partSpec: '',
orderType: '产品资料',
buyerName: '',
sourcingName: '',
category: '',
unit: '',
status: '',
codeNo: '',
createBy: '',
site: this.$store.state.user.site,
page: 1,
limit: 10
},
pageIndex: 1,
pageSize: 50,
totalPage: 0,
tagNo: '',
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,
functionId: this.functionId,
serialNumber: 'partTablePartNo',
tableId: 'partTable',
tableName: '产品信息',
columnProp: 'partNo',
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: 'partTableNpc',
tableId: 'partTable',
tableName: '产品信息',
columnProp: 'npc',
headerAlign: 'center',
align: 'center',
columnLabel: 'NPC货号',
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: 'partTablePartDesc',
tableId: 'partTable',
tableName: '产品信息',
columnProp: 'partDesc',
headerAlign: 'center',
align: 'left',
columnLabel: '产品名称',
columnWidth: '200',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: 'partTablepartSpec',
tableId: 'partTable',
tableName: '产品信息',
columnProp: 'partSpec',
headerAlign: 'center',
align: 'left',
columnLabel: '产品规格',
columnWidth: '150',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: 'partTableBuyerName',
tableId: 'partTable',
tableName: '产品信息',
columnProp: 'buyerName',
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: 'partTableSourcingName',
tableId: 'partTable',
tableName: '产品信息',
columnProp: 'sourcingName',
headerAlign: 'center',
align: 'center',
columnLabel: 'sourcing专员',
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: 'partTableCategory',
tableId: 'partTable',
tableName: '产品信息',
columnProp: 'category',
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: 'partTableUnit',
tableId: 'partTable',
tableName: '产品信息',
columnProp: 'unit',
headerAlign: 'center',
align: 'center',
columnLabel: '计量单位',
columnWidth: '80',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: 'partTableStatus',
tableId: 'partTable',
tableName: '产品信息',
columnProp: 'status',
headerAlign: 'center',
align: 'center',
columnLabel: '状态',
columnWidth: '80',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: 'partTableCodeNo',
tableId: 'partTable',
tableName: '产品信息',
columnProp: 'codeNo',
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: 'partTableCreateBy',
tableId: 'partTable',
tableName: '产品信息',
columnProp: 'createBy',
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: '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
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: 'partTableFlowStatus',
tableId: 'partTable',
tableName: '产品信息',
columnProp: 'flowStatus',
headerAlign: 'center',
align: 'center',
columnLabel: '审批状态',
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
}
],
exportName: '产品信息' + this.dayjs().format('YYYYMMDDHHmmss')
}
},
/* 组件 */
components: {
Chooselist,
basicInfo,
specParams,
suppliers,
approval,
attachments
},
created() {
this.getMainData()
},
mounted () {
this.$nextTick(() => {
this.height = (window.innerHeight - 280) / 2
})
},
methods: {
getBaseList (val, type) {
this.tagNo = val
// this.$nextTick(() => {
// let strVal = ''
// if (val === 1100) {
// strVal = this.searchData.partNo
// }
// this.$refs.baseList.init(val, strVal?strVal:'')
// })
},
/* 列表方法的回调 */
getBaseData (val) {
// if (this.tagNo === 1100) {
// this.searchData.partNo = val.part_no
// }
},
getMainData () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
searchPartApproveList(this.searchData).then(({data}) => {
if (data.code === 0) {
this.mainDataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
//
if (this.mainDataList.length > 0) {
//
this.$refs.mainTable.setCurrentRow(this.mainDataList[0])
this.changeData(this.mainDataList[0])
} else {
this.changeData(null)
}
}
this.dataListLoading = false
})
},
tabClick (tab, event) {
this.refreshCurrentTabTable()
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getMainData()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getMainData()
},
changeData (row) {
this.currentRow = JSON.parse(JSON.stringify(row))
this.refreshCurrentTabTable()
},
refreshCurrentTabTable () {
if (this.currentRow === '' || this.currentRow === null) {
this.currentRow = {site: '', partNo: ''}
}
if (this.activeName === 'basicInfo') {
this.refreshBasicInfo()
}
if (this.activeName === 'specParams') {
this.refreshSpecParams()
}
if (this.activeName === 'suppliers') {
this.refreshSuppliers()
}
if (this.activeName === 'approval') {
this.refreshApproval()
}
if (this.activeName === 'attachments') {
this.refreshAttachments()
}
},
async exportExcel () {
this.searchData.limit = -1
this.searchData.page = 1
excel.exportTable({
url: '/part/searchPartList',
columnMapping: this.columnArray1,
mergeSetting: [],
params: this.searchData,
fileName: this.exportName + '.xlsx',
rowFetcher: res => res.data,
columnFormatter: [],
dropColumns: []
})
},
refreshBasicInfo () {
let inData = {
site: this.currentRow.site,
partNo: this.currentRow.partNo,
partDesc: this.currentRow.partDesc,
height: Number(this.height) - 20
}
this.$refs.basicInfo.init(inData)
},
refreshSpecParams () {
let inData = {
site: this.currentRow.site,
partNo: this.currentRow.partNo,
codeNo: this.currentRow.codeNo,
functionType:"P",
height: Number(this.height) - 20
}
this.$refs.specParams.init(inData)
},
refreshSuppliers () {
let inData = {
site: this.currentRow.site,
partNo: this.currentRow.partNo,
height: Number(this.height) - 20
}
this.$refs.suppliers.init(inData)
},
refreshApproval () {
let inData = {
site: this.currentRow.site,
orderRef1: this.currentRow.partNo,
orderType: '产品资料',
height: Number(this.height) - 20
}
this.$refs.approval.init(inData)
},
refreshAttachments () {
let inData = {
orderRef1: this.currentRow.site,
orderRef2: this.currentRow.partNo,
orderRef3: this.currentRow.partDesc,
height: Number(this.height) - 20
}
this.$refs.attachments.init(inData)
},
//
openApproveDialog(row) {
this.approveData = {
applyNo: row.flowNodeInstanceData.applyNo,
site: row.flowNodeInstanceData.site,
orderType: row.flowNodeInstanceData.orderType,
flowCode: row.flowNodeInstanceData.flowCode,
flowVersion: row.flowNodeInstanceData.flowVersion,
nodeCode: row.flowNodeInstanceData.nodeCode,
comment: ''
}
this.approveDialogVisible = true
},
//
submitApprove(action) {
if (action === 'REJECTED' && !this.approveData.comment) {
this.$message.warning('驳回时必须填写审批意见')
return
}
this.approveLoading = true
partApprove({
applyNo: this.approveData.applyNo,
nodeCode: this.approveData.nodeCode,
site: this.approveData.site,
orderType: this.approveData.orderType,
specialRelease: this.approveData.specialRelease,
action: action,
comment: this.approveData.comment
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message.success(action === 'APPROVED' ? '审批通过成功' : '驳回成功')
this.approveDialogVisible = false
//
this.getMainData()
} else {
this.$message.error(data.msg || '操作失败')
}
}).finally(() => {
this.approveLoading = false
})
},
// - rqrq
handleRestart(row) {
this.$confirm('确定要重新发起审批流程吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
restartFlowInstance({
applyNo: row.applyNo,
site: row.site,
orderType: row.orderType
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message.success('重新审批成功')
this.getMainData()
} else {
this.$message.error(data.msg || '操作失败')
}
})
}).catch(() => {})
}
}
}
</script>
<!--当前页面的标签样式-->
<style scoped lang="scss">
/deep/ .customer-tab .el-tabs__content {
padding: 5px !important;
}
/* 产品对话框整体样式 */
.part-dialog {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.part-dialog .el-dialog {
margin-top: 5vh !important;
margin-bottom: 5vh !important;
}
.part-dialog .el-dialog__header {
padding: 20px 25px 15px 25px;
border-bottom: 1px solid #E4E7ED;
}
.part-dialog .el-dialog__body {
padding: 25px 25px 25px 25px;
max-height: 75vh;
overflow-y: auto;
min-height: 400px;
}
.dialog-content {
width: 100%;
}
/* 产品表单样式 */
.part-form {
width: 100%;
}
.part-form .el-form-item {
margin-bottom: 1px;
}
.part-form .el-form-item__label {
font-weight: 500;
color: #303133;
line-height: 32px;
padding-right: 12px;
}
.part-form .el-form-item__content {
line-height: normal;
}
/* 表单分组样式 */
.form-section {
margin-bottom: 5px;
}
.form-section:last-child {
margin-bottom: 5px;
}
/* 输入框样式 */
.part-form .el-input,
.part-form .el-textarea,
.part-form .el-date-editor {
width: 100%;
}
/* 文本域样式优化 */
.part-form .el-textarea__inner {
resize: none;
font-family: inherit;
line-height: 1.5;
}
/* 对话框底部按钮居中 */
.dialog-footer-center {
text-align: center;
padding: 15px 0 5px 0;
border-top: 1px solid #E4E7ED;
margin-top: 15px;
}
.dialog-footer-center .el-button {
margin: 0 10px;
min-width: 90px;
height: 36px;
padding: 0 20px;
font-size: 14px;
}
/* 响应式调整 */
@media (max-width: 1200px) {
.part-dialog {
width: 95% !important;
}
.part-dialog .el-dialog__body {
padding: 20px 20px 15px 20px;
}
}
@media (max-width: 768px) {
.part-form .el-col {
margin-bottom: 20px;
}
.form-section {
margin-bottom: 35px;
}
.part-form .el-form-item__label {
line-height: 28px;
height: 28px;
}
}
</style>

266
src/views/modules/srmPart/partInfoList.vue

@ -55,8 +55,8 @@
width="160"
label="Action">
<template slot-scope="scope">
<el-link style="cursor: pointer" v-if="scope.row.flowStatus === 'COMPLETED' || scope.row.flowStatus === 'TERMINATED'" @click="handleRestart(scope.row)">重新审批 |</el-link>
<el-link style="cursor: pointer" v-if="scope.row.flowStatus === 'RUNNING'" @click="openApproveDialog(scope.row)">审批 |</el-link>
<!-- <el-link style="cursor: pointer" v-if="scope.row.flowStatus === 'COMPLETED' || scope.row.flowStatus === 'TERMINATED'" @click="handleRestart(scope.row)">重新审批 |</el-link>
<el-link style="cursor: pointer" v-if="scope.row.flowStatus === 'RUNNING'" @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>
@ -190,37 +190,13 @@
</el-dialog>
<!-- 审批对话框 - rqrq -->
<el-dialog
<!-- <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-row :gutter="20">
<el-col :span="12">
<el-form-item label="是否特殊放行">
@ -236,15 +212,11 @@
</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>
</el-dialog> -->
</div>
</template>
@ -538,61 +510,61 @@ 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
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: 'partTableFlowStatus',
tableId: 'partTable',
tableName: '产品信息',
columnProp: 'flowStatus',
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: '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
// },
// {
// userId: this.$store.state.user.name,
// functionId: this.functionId,
// serialNumber: 'partTableFlowStatus',
// tableId: 'partTable',
// tableName: '',
// columnProp: 'flowStatus',
// headerAlign: 'center',
// align: 'center',
// columnLabel: '',
// columnWidth: '100',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: false
// }
],
exportName: '产品信息' + this.dayjs().format('YYYYMMDDHHmmss'),
//
@ -925,71 +897,71 @@ export default {
this.$message.error('删除失败: ' + error.message)
})
})
},
//
openApproveDialog(row) {
this.approveData = {
applyNo: row.flowNodeInstanceData.applyNo,
site: row.flowNodeInstanceData.site,
orderType: row.flowNodeInstanceData.orderType,
flowCode: row.flowNodeInstanceData.flowCode,
flowVersion: row.flowNodeInstanceData.flowVersion,
nodeCode: row.flowNodeInstanceData.nodeCode,
comment: ''
}
this.approveDialogVisible = true
},
//
// openApproveDialog(row) {
// this.approveData = {
// applyNo: row.flowNodeInstanceData.applyNo,
// site: row.flowNodeInstanceData.site,
// orderType: row.flowNodeInstanceData.orderType,
// flowCode: row.flowNodeInstanceData.flowCode,
// flowVersion: row.flowNodeInstanceData.flowVersion,
// nodeCode: row.flowNodeInstanceData.nodeCode,
// comment: ''
// }
// this.approveDialogVisible = true
// },
//
submitApprove(action) {
if (action === 'REJECTED' && !this.approveData.comment) {
this.$message.warning('驳回时必须填写审批意见')
return
}
this.approveLoading = true
approveNodeInstance({
applyNo: this.approveData.applyNo,
nodeCode: this.approveData.nodeCode,
site: this.approveData.site,
orderType: this.approveData.orderType,
specialRelease: this.approveData.specialRelease,
action: action,
comment: this.approveData.comment
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message.success(action === 'APPROVED' ? '审批通过成功' : '驳回成功')
this.approveDialogVisible = false
//
this.getMainData()
} else {
this.$message.error(data.msg || '操作失败')
}
}).finally(() => {
this.approveLoading = false
})
},
// submitApprove(action) {
// if (action === 'REJECTED' && !this.approveData.comment) {
// this.$message.warning('')
// return
// }
// this.approveLoading = true
// approveNodeInstance({
// applyNo: this.approveData.applyNo,
// nodeCode: this.approveData.nodeCode,
// site: this.approveData.site,
// orderType: this.approveData.orderType,
// specialRelease: this.approveData.specialRelease,
// action: action,
// comment: this.approveData.comment
// }).then(({ data }) => {
// if (data && data.code === 0) {
// this.$message.success(action === 'APPROVED' ? '' : '')
// this.approveDialogVisible = false
// //
// this.getMainData()
// } else {
// this.$message.error(data.msg || '')
// }
// }).finally(() => {
// this.approveLoading = false
// })
// },
// - rqrq
handleRestart(row) {
this.$confirm('确定要重新发起审批流程吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
restartFlowInstance({
applyNo: row.applyNo,
site: row.site,
orderType: row.orderType
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message.success('重新审批成功')
this.getMainData()
} else {
this.$message.error(data.msg || '操作失败')
}
})
}).catch(() => {})
}
// handleRestart(row) {
// this.$confirm('', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// restartFlowInstance({
// applyNo: row.applyNo,
// site: row.site,
// orderType: row.orderType
// }).then(({ data }) => {
// if (data && data.code === 0) {
// this.$message.success('')
// this.getMainData()
// } else {
// this.$message.error(data.msg || '')
// }
// })
// }).catch(() => {})
// }
}

Loading…
Cancel
Save