diff --git a/src/api/workCenter.js b/src/api/workCenter.js
index d52a3a37..f93533d4 100644
--- a/src/api/workCenter.js
+++ b/src/api/workCenter.js
@@ -196,7 +196,7 @@ const rejectProcurementProcess = (params) => postAction('/process/fb/processFbSt
// 转办
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
diff --git a/src/common/lang/workCenter/zh.js b/src/common/lang/workCenter/zh.js
index dae08eed..12cf4709 100644
--- a/src/common/lang/workCenter/zh.js
+++ b/src/common/lang/workCenter/zh.js
@@ -355,6 +355,15 @@ module.exports = {
// 法规采购流程
standardProcurementProcess: {
reasonForPurchase: '采购理由',
- addAtLeastOne: '请添加至少一条数据'
+ addAtLeastOne: '请添加至少一条数据',
+ legalProcurement: '法规采购流程报表',
+ carbonCopy: '抄送'
+ },
+ // 项目合规评估流程
+ projectComplianceEvaluationProcess: {
+ selectStandard: '选择标准',
+ taskDistributing: '任务分发',
+ nextStep: '下一步',
+ lastStep: '上一步'
}
}
diff --git a/src/enums/commonEnums.js b/src/enums/commonEnums.js
index a524195c..9dab478b 100644
--- a/src/enums/commonEnums.js
+++ b/src/enums/commonEnums.js
@@ -279,6 +279,15 @@ export const ProcurementProcessNodes = new EsEnums({
initiate: { text: '发起人申请', value: 'Activity_0fmr3id', btn: ['save', 'submit'] },
sponsorLeaderApproval: { text: '发起人主管级领导审批', value: 'Activity_1fr1x5i', 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'] }
})
+
+// 项目合规评估流程节点
+export const ProjectComplianceEvaluationProcessNode = new EsEnums({
+ initiate: { text: '法规工程师发起', value: '1', btn: ['save', 'pre', 'next', 'submit'] }
+})
diff --git a/src/views/workCenter/standardProcurementProcess/StandardProcurementProcess.vue b/src/views/workCenter/standardProcurementProcess/StandardProcurementProcess.vue
index bad4f72b..420dce76 100644
--- a/src/views/workCenter/standardProcurementProcess/StandardProcurementProcess.vue
+++ b/src/views/workCenter/standardProcurementProcess/StandardProcurementProcess.vue
@@ -59,9 +59,12 @@
{{ $t('basicServiceInformation') }}
-
{{ $t('newlyAdded') }}
+
{{ $t('newlyAdded') }}
-
{{ $t('batchDelete') }}
+
{{ $t('batchDelete') }}
+
+ {{ $t('export') }}
+
-
- {{ $t('turnTo') }}
+
+ {{ $t('workCenter.standardProcurementProcess.carbonCopy') }}
@@ -164,6 +167,7 @@ import {
} from '../../../api/workCenter'
import UserSelection from '../../../components/selection/UserSelection'
import UserSelectModal from '../../../components/selection/UserSelectModal'
+import { downFile } from '../../../api/manage'
export default {
name: 'StandardProcurementProcess',
@@ -214,22 +218,23 @@ export default {
dataIndex: 'standardName'
},
{ // 采购理由
- title: this.$t('standardName'),
+ title: this.$t('workCenter.standardProcurementProcess.reasonForPurchase'),
width: 380,
dataIndex: 'purchaseReason'
- },
- // 操作
- {
- title: this.$t('operation'),
- fixed: 'right',
- width: 150,
- scopedSlots: { customRender: 'action' }
}
],
+ // 操作
+ operateColumn: {
+ title: this.$t('operation'),
+ fixed: 'right',
+ width: 150,
+ scopedSlots: { customRender: 'action' }
+ },
dataSource: [],
selectedRowKeys: [],
currentNode: '',
- isTransfer: true // 是否转办
+ isTransfer: true, // 是否转办
+ businessId: null
}
},
computed: {
@@ -239,6 +244,10 @@ export default {
// 流程信息部分禁用
processInfoDisabled () {
return !(this.currentNode === ProcurementProcessNodes.initiate.value && !this.$route.query.processInstanceId)
+ },
+ // 表格是否可以增删改
+ canTableOperate () {
+ return this.currentNode === ProcurementProcessNodes.initiate.value
}
},
created () {
@@ -248,6 +257,9 @@ export default {
} else {
this.currentNode = ProcurementProcessNodes.initiate.value
}
+ if (this.currentNode === ProcurementProcessNodes.initiate.value) {
+ this.columns.push(this.operateColumn)
+ }
this.btnList = ProcurementProcessNodes.propertyOfValue('btn', this.currentNode)
this.getPersonInfoStructure(ProcessKey.LEGAL_PROCUREMENT.value, () => {
this.initPersonInfoData(this.currentNode === ProcurementProcessNodes.initiate.value)
@@ -297,9 +309,10 @@ export default {
draftId: this.$route.query.draftId,
taskId: this.$route.query.taskId
}
- initProcurementProcess(params).then(res => {
+ queryProcurementProcessInfo(params).then(res => {
if (res.success) {
const { result } = res
+ this.businessId = result.businessId
this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {})
this.dataSource = result.businessInfoDTO || []
this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO || {})
@@ -308,6 +321,8 @@ export default {
this.approvalInfoForm.setFieldsValue(this.approvalInfo)
})
}
+ }).finally(() => {
+ this.loading = false
})
},
dealFormData (isSave) {
@@ -316,6 +331,7 @@ export default {
processInfo = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
businessInfo = this.dataSource
approvalInfo = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
+ approvalInfo.taskId = approvalInfo.taskId || this.$route.query.taskId
userInfoMap = this.$refs.personnelInfo.getDataObj()
const params = { ...processInfo, ...businessInfo, ...approvalInfo, ...userInfoMap }
if (!Object.values(params).some(tt => !!tt || (tt && tt.length > 0))) {
@@ -342,6 +358,7 @@ export default {
this.approvalInfoForm.validateFields((errors, values) => {
if (!errors) {
approvalInfo = Object.assign(this.approvalInfo, values)
+ approvalInfo.taskId = approvalInfo.taskId || this.$route.query.taskId
} else {
flag = false
}
@@ -382,7 +399,9 @@ export default {
func(params).then(res => {
if (res.success) {
this.$message.success(res.message)
- this.goBack()
+ if (this.isTransfer) {
+ this.goBack()
+ }
} else {
this.$message.warning(res.message)
}
@@ -475,7 +494,52 @@ export default {
}).finally(() => {
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: 正在导出,请稍候 ,
+ 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()
+ })
+ },
}
}