update 法规采购流程
This commit is contained in:
@@ -196,7 +196,7 @@ const rejectProcurementProcess = (params) => postAction('/process/fb/processFbSt
|
|||||||
// 转办
|
// 转办
|
||||||
const transferProcurementProcess = (params) => postAction('/process/fb/processFbStandardPurchase/transfer', params)
|
const transferProcurementProcess = (params) => postAction('/process/fb/processFbStandardPurchase/transfer', params)
|
||||||
// 抄送
|
// 抄送
|
||||||
const carbonCopyProcurementProcess = (params) => postAction('/process/fb/processFbStandardPurchase/carbonCopy', params)
|
const carbonCopyProcurementProcess = (params) => getAction('/process/fb/processFbStandardPurchase/carbonCopy', params)
|
||||||
|
|
||||||
/* 企标稽查计划 */
|
/* 企标稽查计划 */
|
||||||
// 生成项目id
|
// 生成项目id
|
||||||
|
|||||||
@@ -355,6 +355,15 @@ module.exports = {
|
|||||||
// 法规采购流程
|
// 法规采购流程
|
||||||
standardProcurementProcess: {
|
standardProcurementProcess: {
|
||||||
reasonForPurchase: '采购理由',
|
reasonForPurchase: '采购理由',
|
||||||
addAtLeastOne: '请添加至少一条数据'
|
addAtLeastOne: '请添加至少一条数据',
|
||||||
|
legalProcurement: '法规采购流程报表',
|
||||||
|
carbonCopy: '抄送'
|
||||||
|
},
|
||||||
|
// 项目合规评估流程
|
||||||
|
projectComplianceEvaluationProcess: {
|
||||||
|
selectStandard: '选择标准',
|
||||||
|
taskDistributing: '任务分发',
|
||||||
|
nextStep: '下一步',
|
||||||
|
lastStep: '上一步'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -279,6 +279,15 @@ export const ProcurementProcessNodes = new EsEnums({
|
|||||||
initiate: { text: '发起人申请', value: 'Activity_0fmr3id', btn: ['save', 'submit'] },
|
initiate: { text: '发起人申请', value: 'Activity_0fmr3id', btn: ['save', 'submit'] },
|
||||||
sponsorLeaderApproval: { text: '发起人主管级领导审批', value: 'Activity_1fr1x5i', btn: ['return', 'save', 'agree', 'reject'] },
|
sponsorLeaderApproval: { text: '发起人主管级领导审批', value: 'Activity_1fr1x5i', btn: ['return', 'save', 'agree', 'reject'] },
|
||||||
standardLeaderApproval: { text: '标准化主管级领导审批', value: 'Activity_06jy4oo', btn: ['return', 'save', 'agree', 'reject'] },
|
standardLeaderApproval: { text: '标准化主管级领导审批', value: 'Activity_06jy4oo', btn: ['return', 'save', 'agree', 'reject'] },
|
||||||
standardSuperiorLeaderApproval: { text: '标准化主管级上一级领导审批', value: 'Activity_1u5337a', btn: ['return', 'save', 'agree', 'reject'] },
|
standardSuperiorLeaderApproval: {
|
||||||
|
text: '标准化主管级上一级领导审批',
|
||||||
|
value: 'Activity_1u5337a',
|
||||||
|
btn: ['return', 'save', 'agree', 'reject']
|
||||||
|
},
|
||||||
regulatoryEngineerConfirmation: { text: '法规工程师确认', value: 'Activity_1q01zfq', btn: ['carbonCopy', 'submit'] }
|
regulatoryEngineerConfirmation: { text: '法规工程师确认', value: 'Activity_1q01zfq', btn: ['carbonCopy', 'submit'] }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 项目合规评估流程节点
|
||||||
|
export const ProjectComplianceEvaluationProcessNode = new EsEnums({
|
||||||
|
initiate: { text: '法规工程师发起', value: '1', btn: ['save', 'pre', 'next', 'submit'] }
|
||||||
|
})
|
||||||
|
|||||||
@@ -59,9 +59,12 @@
|
|||||||
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<!-- 新增-->
|
<!-- 新增-->
|
||||||
<a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button>
|
<a-button icon="plus" type="primary" @click="handleAdd" v-if="canTableOperate">{{ $t('newlyAdded') }}</a-button>
|
||||||
<!-- 批量删除-->
|
<!-- 批量删除-->
|
||||||
<a-button type="primary" icon="delete" ghost @click="batchDel">{{ $t('batchDelete') }}</a-button>
|
<a-button type="primary" icon="delete" ghost @click="batchDel" v-if="canTableOperate">{{ $t('batchDelete') }}</a-button>
|
||||||
|
<a-button icon="upload" type="primary" ghost @click="handleExportXls" v-if="!canTableOperate">
|
||||||
|
{{ $t('export') }}
|
||||||
|
</a-button>
|
||||||
<div>
|
<div>
|
||||||
<j-table
|
<j-table
|
||||||
:can-drag="true"
|
:can-drag="true"
|
||||||
@@ -117,8 +120,8 @@
|
|||||||
{{ $t('turnTo') }}
|
{{ $t('turnTo') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<!--抄送-->
|
<!--抄送-->
|
||||||
<a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleCarbonCopy">
|
<a-button type="primary" :loading="loading" ghost v-if="btnList.includes('carbonCopy')" @click="handleCarbonCopy">
|
||||||
{{ $t('turnTo') }}
|
{{ $t('workCenter.standardProcurementProcess.carbonCopy') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<!--保存 发起节点、审批节点都存在-->
|
<!--保存 发起节点、审批节点都存在-->
|
||||||
<a-button type="primary" :loading="loading" ghost v-if="btnList.includes('save')" @click="handleSave">
|
<a-button type="primary" :loading="loading" ghost v-if="btnList.includes('save')" @click="handleSave">
|
||||||
@@ -164,6 +167,7 @@ import {
|
|||||||
} from '../../../api/workCenter'
|
} from '../../../api/workCenter'
|
||||||
import UserSelection from '../../../components/selection/UserSelection'
|
import UserSelection from '../../../components/selection/UserSelection'
|
||||||
import UserSelectModal from '../../../components/selection/UserSelectModal'
|
import UserSelectModal from '../../../components/selection/UserSelectModal'
|
||||||
|
import { downFile } from '../../../api/manage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandardProcurementProcess',
|
name: 'StandardProcurementProcess',
|
||||||
@@ -214,22 +218,23 @@ export default {
|
|||||||
dataIndex: 'standardName'
|
dataIndex: 'standardName'
|
||||||
},
|
},
|
||||||
{ // 采购理由
|
{ // 采购理由
|
||||||
title: this.$t('standardName'),
|
title: this.$t('workCenter.standardProcurementProcess.reasonForPurchase'),
|
||||||
width: 380,
|
width: 380,
|
||||||
dataIndex: 'purchaseReason'
|
dataIndex: 'purchaseReason'
|
||||||
},
|
}
|
||||||
|
],
|
||||||
// 操作
|
// 操作
|
||||||
{
|
operateColumn: {
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
width: 150,
|
width: 150,
|
||||||
scopedSlots: { customRender: 'action' }
|
scopedSlots: { customRender: 'action' }
|
||||||
}
|
},
|
||||||
],
|
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
currentNode: '',
|
currentNode: '',
|
||||||
isTransfer: true // 是否转办
|
isTransfer: true, // 是否转办
|
||||||
|
businessId: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -239,6 +244,10 @@ export default {
|
|||||||
// 流程信息部分禁用
|
// 流程信息部分禁用
|
||||||
processInfoDisabled () {
|
processInfoDisabled () {
|
||||||
return !(this.currentNode === ProcurementProcessNodes.initiate.value && !this.$route.query.processInstanceId)
|
return !(this.currentNode === ProcurementProcessNodes.initiate.value && !this.$route.query.processInstanceId)
|
||||||
|
},
|
||||||
|
// 表格是否可以增删改
|
||||||
|
canTableOperate () {
|
||||||
|
return this.currentNode === ProcurementProcessNodes.initiate.value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@@ -248,6 +257,9 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.currentNode = ProcurementProcessNodes.initiate.value
|
this.currentNode = ProcurementProcessNodes.initiate.value
|
||||||
}
|
}
|
||||||
|
if (this.currentNode === ProcurementProcessNodes.initiate.value) {
|
||||||
|
this.columns.push(this.operateColumn)
|
||||||
|
}
|
||||||
this.btnList = ProcurementProcessNodes.propertyOfValue('btn', this.currentNode)
|
this.btnList = ProcurementProcessNodes.propertyOfValue('btn', this.currentNode)
|
||||||
this.getPersonInfoStructure(ProcessKey.LEGAL_PROCUREMENT.value, () => {
|
this.getPersonInfoStructure(ProcessKey.LEGAL_PROCUREMENT.value, () => {
|
||||||
this.initPersonInfoData(this.currentNode === ProcurementProcessNodes.initiate.value)
|
this.initPersonInfoData(this.currentNode === ProcurementProcessNodes.initiate.value)
|
||||||
@@ -297,9 +309,10 @@ export default {
|
|||||||
draftId: this.$route.query.draftId,
|
draftId: this.$route.query.draftId,
|
||||||
taskId: this.$route.query.taskId
|
taskId: this.$route.query.taskId
|
||||||
}
|
}
|
||||||
initProcurementProcess(params).then(res => {
|
queryProcurementProcessInfo(params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
const { result } = res
|
const { result } = res
|
||||||
|
this.businessId = result.businessId
|
||||||
this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {})
|
this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {})
|
||||||
this.dataSource = result.businessInfoDTO || []
|
this.dataSource = result.businessInfoDTO || []
|
||||||
this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO || {})
|
this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO || {})
|
||||||
@@ -308,6 +321,8 @@ export default {
|
|||||||
this.approvalInfoForm.setFieldsValue(this.approvalInfo)
|
this.approvalInfoForm.setFieldsValue(this.approvalInfo)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
dealFormData (isSave) {
|
dealFormData (isSave) {
|
||||||
@@ -316,6 +331,7 @@ export default {
|
|||||||
processInfo = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
|
processInfo = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
|
||||||
businessInfo = this.dataSource
|
businessInfo = this.dataSource
|
||||||
approvalInfo = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
|
approvalInfo = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
|
||||||
|
approvalInfo.taskId = approvalInfo.taskId || this.$route.query.taskId
|
||||||
userInfoMap = this.$refs.personnelInfo.getDataObj()
|
userInfoMap = this.$refs.personnelInfo.getDataObj()
|
||||||
const params = { ...processInfo, ...businessInfo, ...approvalInfo, ...userInfoMap }
|
const params = { ...processInfo, ...businessInfo, ...approvalInfo, ...userInfoMap }
|
||||||
if (!Object.values(params).some(tt => !!tt || (tt && tt.length > 0))) {
|
if (!Object.values(params).some(tt => !!tt || (tt && tt.length > 0))) {
|
||||||
@@ -342,6 +358,7 @@ export default {
|
|||||||
this.approvalInfoForm.validateFields((errors, values) => {
|
this.approvalInfoForm.validateFields((errors, values) => {
|
||||||
if (!errors) {
|
if (!errors) {
|
||||||
approvalInfo = Object.assign(this.approvalInfo, values)
|
approvalInfo = Object.assign(this.approvalInfo, values)
|
||||||
|
approvalInfo.taskId = approvalInfo.taskId || this.$route.query.taskId
|
||||||
} else {
|
} else {
|
||||||
flag = false
|
flag = false
|
||||||
}
|
}
|
||||||
@@ -382,7 +399,9 @@ export default {
|
|||||||
func(params).then(res => {
|
func(params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
|
if (this.isTransfer) {
|
||||||
this.goBack()
|
this.goBack()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
@@ -475,7 +494,52 @@ export default {
|
|||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
handleExportXls () {
|
||||||
|
const fileName = this.$t('workCenter.standardProcurementProcess.legalProcurement') + '.xls'
|
||||||
|
const param = {
|
||||||
|
businessId: this.businessId
|
||||||
}
|
}
|
||||||
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||||
|
const selectedRowsIds = this.dataSource.map((tt, index) => {
|
||||||
|
return this.selectedRowKeys.includes(index) ? tt.id : null
|
||||||
|
}).filter(tt => !!tt)
|
||||||
|
param.selections = selectedRowsIds.join(',')
|
||||||
|
}
|
||||||
|
console.log('导出参数', param)
|
||||||
|
// 加一个大的提示
|
||||||
|
const modalLoading = this.$info({
|
||||||
|
title: '提示',
|
||||||
|
content: <span>正在导出,请稍候 <a-spin size="small" /></span>,
|
||||||
|
keyboard: false
|
||||||
|
})
|
||||||
|
// 把知道了这个按钮去掉
|
||||||
|
this.$nextTick(() => {
|
||||||
|
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
|
||||||
|
})
|
||||||
|
downFile('/process/fb/processFbStandardPurchase/exportXls', param).then((data) => {
|
||||||
|
if (!data) {
|
||||||
|
this.$message.warning('文件下载失败')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||||
|
window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName)
|
||||||
|
} else {
|
||||||
|
const url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.style.display = 'none'
|
||||||
|
link.href = url
|
||||||
|
link.setAttribute('download', fileName)
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
document.body.removeChild(link) // 下载完成移除元素
|
||||||
|
window.URL.revokeObjectURL(url) // 释放掉blob对象
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
// 销毁这个提示
|
||||||
|
modalLoading.destroy()
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user