Browse Source

产品流程审批功能

master
yanyan 4 weeks ago
parent
commit
f1732735c2
  1. 8
      src/views/modules/srmPart/com_part_Approval.vue
  2. 23
      src/views/modules/srmPart/com_part_Suppliers.vue
  3. 93
      src/views/modules/srmPart/partInfoList.vue

8
src/views/modules/srmPart/com_part_Approval.vue

@ -24,7 +24,7 @@
<el-table-column prop="departmentName" label="审批部门" min-width="100" header-align="center" align="center"> <el-table-column prop="departmentName" label="审批部门" min-width="100" header-align="center" align="center">
<template slot-scope="scope">{{ scope.row.departmentName || '-' }}</template> <template slot-scope="scope">{{ scope.row.departmentName || '-' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="approverName" label="要求审批人" min-width="80" header-align="center" align="center"></el-table-column>
<el-table-column prop="assigneeName" label="要求审批人" min-width="80" header-align="center" align="center"></el-table-column>
<!-- <el-table-column prop="attemptNo" label="次数" width="60" header-align="center" align="center"></el-table-column> <!-- <el-table-column prop="attemptNo" label="次数" width="60" header-align="center" align="center"></el-table-column>
<el-table-column prop="approveType" label="审批类型" min-width="100" header-align="center" align="center"> <el-table-column prop="approveType" label="审批类型" min-width="100" header-align="center" align="center">
@ -45,7 +45,7 @@
<el-table-column prop="completeTime" label="审批时间" min-width="150" header-align="center" align="center"> <el-table-column prop="completeTime" label="审批时间" min-width="150" header-align="center" align="center">
<template slot-scope="scope">{{ scope.row.completeTime || '-' }}</template> <template slot-scope="scope">{{ scope.row.completeTime || '-' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="assigneeName" label="实际审批人" min-width="80" header-align="center" align="center"></el-table-column>
<!-- <el-table-column prop="approveName" label="实际审批人" min-width="80" header-align="center" align="center"></el-table-column> -->
<el-table-column prop="comment" label="备注" min-width="150" header-align="center" align="left" show-overflow-tooltip></el-table-column> <el-table-column prop="comment" label="备注" min-width="150" header-align="center" align="left" show-overflow-tooltip></el-table-column>
<!-- <el-table-column fixed="right" header-align="center" align="center" width="100" label="操作"> <!-- <el-table-column fixed="right" header-align="center" align="center" width="100" label="操作">
@ -286,8 +286,8 @@ export default {
case 'TERMINATED': return '已终止' case 'TERMINATED': return '已终止'
default: return status default: return status
} }
},
getNodeStatusColor(status) {
},getNodeStatusColor
(status) {
switch (status) { switch (status) {
case 'PENDING': return '#E6A23C' case 'PENDING': return '#E6A23C'
case 'APPROVED': return '#67C23A' case 'APPROVED': return '#67C23A'

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

@ -51,7 +51,8 @@
<el-form label-position="top" style="margin-top: -5px;"> <el-form label-position="top" style="margin-top: -5px;">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="'供应商编码'" >
<el-form-item >
<span style="cursor: pointer" slot="label" @click="getBaseList(520)"><a href="#">供应商编码</a></span>
<el-input v-model="partSuppliersData.supplierCode" ></el-input> <el-input v-model="partSuppliersData.supplierCode" ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -314,22 +315,20 @@ export default {
this.tagNo1 = type this.tagNo1 = type
this.$nextTick(() => { this.$nextTick(() => {
let strVal = '' let strVal = ''
// if (val === 1013) {
// if(type==1) {
// strVal = this.dataForm.partType
// }
// }
if (val === 520) {
if(type==1) {
strVal = this.partSuppliersData.supplierCode
}
}
this.$refs.baseList.init(val, strVal) this.$refs.baseList.init(val, strVal)
}) })
}, },
/* 列表方法的回调 */ /* 列表方法的回调 */
getBaseData (val) { getBaseData (val) {
// if (this.tagNo === 1013) {
// if(this.tagNo1==1) {
// this.dataForm.partType = val.Base_id
// this.dataForm.partTypeDesc = val.Base_desc
// }
// }
if (this.tagNo === 520) {
this.partSuppliersData.supplierCode = val.supplier_no
}
}, },
// //
init(inData) { init(inData) {

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

@ -144,13 +144,13 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="6"> <el-col :span="6">
<el-form-item > <el-form-item >
<span style="cursor: pointer" slot="label" @click="getBaseList(522)"><a href="#">采购员</a></span>
<span style="cursor: pointer" slot="label" @click="getBaseList(529)"><a href="#">采购员</a></span>
<el-input v-model="currentpart.buyerName" style="width: 130px"></el-input> <el-input v-model="currentpart.buyerName" style="width: 130px"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item > <el-form-item >
<span style="cursor: pointer" slot="label" @click="getBaseList(523)"><a href="#">sourcing专员</a></span>
<span style="cursor: pointer" slot="label" @click="getBaseList(528)"><a href="#">sourcing专员</a></span>
<el-input v-model="currentpart.sourcingName" style="width: 130px"></el-input> <el-input v-model="currentpart.sourcingName" style="width: 130px"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -220,6 +220,16 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> --> </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-form-item label="审批意见">
<el-input type="textarea" v-model="approveData.comment" :rows="3" placeholder="请输入审批意见"></el-input> <el-input type="textarea" v-model="approveData.comment" :rows="3" placeholder="请输入审批意见"></el-input>
</el-form-item> </el-form-item>
@ -254,6 +264,12 @@ import suppliers from './com_part_Suppliers'
import approval from './com_part_Approval' import approval from './com_part_Approval'
import attachments from './com_part_Attachments' import attachments from './com_part_Attachments'
import {
approveNodeInstance,
getFlowPreview,
restartFlowInstance
} from '@/api/workFlow/workFlow.js'
export default { export default {
watch: { watch: {
searchData: { searchData: {
@ -558,6 +574,24 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false 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'), exportName: '产品信息' + this.dayjs().format('YYYYMMDDHHmmss'),
@ -633,10 +667,10 @@ export default {
if (this.tagNo === 510) { if (this.tagNo === 510) {
strVal = this.currentpart.unit strVal = this.currentpart.unit
} }
if (val === 522) {
if (val === 529) {
strVal = this.currentpart.buyerName strVal = this.currentpart.buyerName
} }
if (val === 523) {
if (val === 528) {
strVal = this.currentpart.sourcingName strVal = this.currentpart.sourcingName
} }
@ -660,11 +694,11 @@ export default {
if (this.tagNo === 510) { if (this.tagNo === 510) {
this.currentpart.unit = val.UMID this.currentpart.unit = val.UMID
} }
if (this.tagNo === 522) {
this.currentpart.buyerName = val.buyer_name
if (this.tagNo === 529) {
this.currentpart.buyerName = val.UserName
} }
if (this.tagNo === 523) {
this.currentpart.sourcingName = val.sourcing_name
if (this.tagNo === 528) {
this.currentpart.sourcingName = val.UserName
} }
if (this.tagNo === 527) { if (this.tagNo === 527) {
@ -677,7 +711,23 @@ export default {
this.searchData.page = this.pageIndex this.searchData.page = this.pageIndex
searchPartList(this.searchData).then(({data}) => { searchPartList(this.searchData).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
this.mainDataList = data.page.list
//
this.mainDataList = data.page.list.map(item => {
// 1
if (item.flowNodeInstanceData) {
item.departmentName = item.flowNodeInstanceData.departmentName;
item.assigneeName = item.flowNodeInstanceData.assigneeName;
} else {
item.departmentName = '';
item.assigneeName = '';
}
return item;
});
// this.mainDataList = data.page.list
this.pageIndex = data.page.currPage this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
@ -880,15 +930,13 @@ export default {
openApproveDialog(row) { openApproveDialog(row) {
this.approveData = { this.approveData = {
applyNo: row.flowNodeInstanceData.applyNo, applyNo: row.flowNodeInstanceData.applyNo,
// nodeCode: row.nodeCode,
// nodeName: row.nodeName,
// departmentName: row.departmentName || '', // - rqrq
// assigneeName: row.assigneeName,
site: row.flowNodeInstanceData.site, site: row.flowNodeInstanceData.site,
orderType: row.flowNodeInstanceData.orderType, orderType: row.flowNodeInstanceData.orderType,
comment: '',
flowCode: row.flowNodeInstanceData.flowCode, flowCode: row.flowNodeInstanceData.flowCode,
flowVersion: row.flowNodeInstanceData.flowVersion
flowVersion: row.flowNodeInstanceData.flowVersion,
nodeCode: row.flowNodeInstanceData.nodeCode,
comment: ''
} }
this.approveDialogVisible = true this.approveDialogVisible = true
}, },
@ -900,18 +948,19 @@ export default {
} }
this.approveLoading = true this.approveLoading = true
approveNodeInstance({ approveNodeInstance({
applyNo: row.flowNodeInstanceData.applyNo,
nodeCode: row.flowNodeInstanceData.nodeCode,
site: row.flowNodeInstanceData.site,
orderType: row.flowNodeInstanceData.orderType,
applyNo: this.approveData.applyNo,
nodeCode: this.approveData.nodeCode,
site: this.approveData.site,
orderType: this.approveData.orderType,
specialRelease: this.approveData.specialRelease,
action: action, action: action,
comment: this.approveData.comment comment: this.approveData.comment
}).then(({ data }) => { }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message.success(action === 'APPROVED' ? '审批通过成功' : '驳回成功') this.$message.success(action === 'APPROVED' ? '审批通过成功' : '驳回成功')
this.approveDialogVisible = false this.approveDialogVisible = false
this.getInstanceList()
this.getNodeInstanceList()
//
this.getMainData()
} else { } else {
this.$message.error(data.msg || '操作失败') this.$message.error(data.msg || '操作失败')
} }
@ -934,8 +983,6 @@ export default {
}).then(({ data }) => { }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message.success('重新审批成功') this.$message.success('重新审批成功')
this.getInstanceList()
this.nodeInstanceList = []
this.currentInstance = null this.currentInstance = null
} else { } else {
this.$message.error(data.msg || '操作失败') this.$message.error(data.msg || '操作失败')

Loading…
Cancel
Save