[update] 画年度制修订计划(标准化发起)

This commit is contained in:
lideqin
2023-10-18 18:19:44 +08:00
parent 447fe783f9
commit 7bba0b1bb6
26 changed files with 2615 additions and 693 deletions
+12
View File
@@ -29,6 +29,14 @@ const getEnStandardNo = (params) => postAction('/process/es/initChange/getStanda
// 根据流程id获取流程信息
const getProcessDataById = (params) => getAction('/process/center/handle', params)
// 年度制修订计划(标准化发起)
// 批量设置联络人
const standardizationInitBatchSetContact = (params) => getAction('', params)
// 批量设置审批人
const standardizationInitBatchSetApprover = (params) => getAction('', params)
// 批量设置主起草人
const standardizationInitBatchSetDrafter = (params) => getAction('', params)
// 流程中心
// 待办-转办
const toDoTurnTo = (params) => postAction('', params)
@@ -50,6 +58,10 @@ export {
getEnStandardNo,
getProcessDataById,
standardizationInitBatchSetContact,
standardizationInitBatchSetApprover,
standardizationInitBatchSetDrafter,
toDoTurnTo,
compulsoryWithdrawal
}
+17 -15
View File
@@ -813,24 +813,26 @@
/*流程表单样式end*/
/* 按钮中使用自定义图标的样式 */
/deep/ .ant-btn {
.iconfont {
margin-right: 8px;
font-size: 14px;
/* 流程底部按钮中使用自定义图标的样式 */
.detail-page-bottom-operate-box {
/deep/ .ant-btn {
.iconfont {
margin-right: 8px;
font-size: 14px;
}
}
/deep/ .ant-btn-loading {
.iconfont {
display: none;
}
span {
margin-left: 8px;
}
}
}
/deep/ .ant-btn-loading {
.iconfont {
display: none;
}
span {
margin-left: 8px;
}
}
/* 按钮中使用自定义图标的样式 end */
/* 流程底部按钮中使用自定义图标的样式 end */
.detail-page-bottom-operate-box {
height: 52px;
+3
View File
@@ -158,6 +158,9 @@ module.exports = {
mergeStandardInformation: '合并标准信息',
pleaseEnterPersonnelInfo: '请完整填写人员信息',
pleaseEnterRemarks: '请填写备注',
lookDetail: '查看详情',
batchReject: '批量驳回',
pleaseSelectDistributeData: '请选择要分发的数据',
// 树右键
treeRight: {
addFolder: 'Create New Folder',
+9 -2
View File
@@ -84,14 +84,21 @@ module.exports = {
scopeOfApplication: '标准适用范围',
pleaseSelectTwoSameProjectTypePlan: '请选择两个制修订类型一样的企标计划'
},
// 年度制修订计划(各部门主动上报)
// 年度制修订计划
revisionPlanActivelyReport: {
revisionPlanDesc: '制修订计划说明',
whetherToSendAContact: '是否下发联络人',
workingGroupContactPerson: '工作组/所联络人',
contactSupervisorSuperiorLeader: '联络人主管级上一级领导',
affiliatedWorkingGroup: '隶属工作组',
contactsSupervisorLevelLeaders: '收集联络人主管级领导'
contactsSupervisorLevelLeaders: '收集联络人主管级领导',
templateExport: '年度制修订计划(各部门上报)导入模板',
batchSetContact: '批量设置联络人',
contactPerson: '联络人',
batchSetApprover: '批量设置审批人',
approver: '审批人',
batchSetDrafter: '批量设置主起草人',
drafter: '主起草人'
},
// 流程配置
processConfig: {
+9 -2
View File
@@ -84,14 +84,21 @@ module.exports = {
scopeOfApplication: '标准适用范围',
pleaseSelectTwoSameProjectTypePlan: '请选择两个制修订类型一样的企标计划'
},
// 年度制修订计划(各部门主动上报)
// 年度制修订计划
revisionPlanActivelyReport: {
revisionPlanDesc: '制修订计划说明',
whetherToSendAContact: '是否下发联络人',
workingGroupContactPerson: '工作组/所联络人',
contactSupervisorSuperiorLeader: '联络人主管级上一级领导',
affiliatedWorkingGroup: '隶属工作组',
contactsSupervisorLevelLeaders: '收集联络人主管级领导'
contactsSupervisorLevelLeaders: '收集联络人主管级领导',
templateExport: '年度制修订计划(各部门上报)导入模板',
batchSetContact: '批量设置联络人',
contactPerson: '联络人',
batchSetApprover: '批量设置审批人',
approver: '审批人',
batchSetDrafter: '批量设置主起草人',
drafter: '主起草人'
},
// 流程配置
processConfig: {
+3
View File
@@ -161,6 +161,9 @@ module.exports = {
mergeStandardInformation: '合并标准信息',
pleaseEnterPersonnelInfo: '请完整填写人员信息',
pleaseEnterRemarks: '请填写备注',
lookDetail: '查看详情',
batchReject: '批量驳回',
pleaseSelectDistributeData: '请选择要分发的数据',
// 树右键
treeRight: {
addFolder: '新增文件夹',
@@ -3,7 +3,7 @@
<div class="box-title-text">
<a-input class="box-input" :value="standardNumber" :title="standardNumber" @click="standardClick"
disabled readonly :placeholder="placeholder"/>
<a-button v-if="!isDisabled" type="primary" class="button-box" @click="standardClick">
<a-button v-if="!disabled" type="primary" class="button-box" @click="standardClick">
{{this.$t('enterprisePlanSelect.title')}}
</a-button>
</div>
@@ -25,7 +25,7 @@ export default {
type: String,
default: ''
},
isDisabled: {
disabled: {
type: Boolean,
default: false
},
@@ -2,9 +2,9 @@
<div class="selection-wrapper">
<div class="box-title-text">
<a-input class="box-input" :value="value" :title="value" @input="indexClick($event)"
:disabled="isDisabled" readonly
:disabled="disabled" readonly
:placeholder="placeholder"/>
<a-button v-if="!isDisabled" type="primary" class="button-box" @click="standardClick">
<a-button v-if="!disabled" type="primary" class="button-box" @click="standardClick">
{{this.$t('standardSelect.standardSelection')}}
</a-button>
</div>
@@ -27,7 +27,7 @@ export default {
type: String,
default: ''
},
isDisabled: {
disabled: {
type: Boolean,
default: false
}
+1 -1
View File
@@ -59,7 +59,7 @@ export default {
},
{ // 年度制修订计划审批流程(标准化发起)
title: this.$t('workCenter.newProcess.annualRevisionPlanStandardizationInit'),
path: ''
path: '/workCenter/annualRevisionPlanStandardizationInit/revisionPlanStandardizationInitFlow'
},
{ // 企标制修订流程
title: this.$t('workCenter.newProcess.enterpriseStandardSystemRevisionProcess'),
@@ -71,9 +71,13 @@
<!-- 节点3工作组所联络人填写企标-->
<contact-enter-standard-form v-if="currentNode === 3" ref="basicInfoFormRef"></contact-enter-standard-form>
<!-- 节点4收集联络人主管级领导审批 只有表格,不能操作 -->
<only-table-form v-if="[4, 6, 7].includes(currentNode)" disabled ref="basicInfoFormRef"></only-table-form>
<only-table-form v-if="currentNode === 4" disabled ref="basicInfoFormRef"></only-table-form>
<!-- 节点5各部所联络人汇总 只有表格可操作 -->
<only-table-form v-if="currentNode === 5" ref="basicInfoFormRef"></only-table-form>
<!-- 节点6联络人主管级上一级领导审批 表格不可操作可以查看详情 -->
<only-table-form v-if="currentNode === 6" onlyCanLook ref="basicInfoFormRef"></only-table-form>
<!-- 节点7标准化工程师归档 表格不可新增可以编辑和查看详情 -->
<only-table-form v-if="currentNode === 7" disabled ref="basicInfoFormRef"></only-table-form>
<!-- 流程审批信息 -->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
@@ -151,7 +155,7 @@ import UserSelectModal from '@/components/selection/UserSelectModal'
const personData = [
{
id: 1,
nodeName: '主起草人发起',
nodeName: '标准化工程师发起',
nodeRoleName: '发起人',
canChoose: false
},
@@ -166,8 +170,7 @@ const personData = [
id: 3,
nodeName: '工作组/所联络人填写企标',
nodeRoleName: '工作组/所联络人',
canChoose: false,
chooseType: 'checkbox'
canChoose: false
},
{
id: 4,
@@ -262,6 +265,7 @@ export default {
],
validateTrigger: 'blur'
},
// 备注
remarks: {
rules: [
{
@@ -272,11 +276,10 @@ export default {
validateTrigger: 'blur'
}
},
currentNode: 1,
currentNode: 3,
approvalInfoForm: this.$form.createForm(this), // 审批信息表单
personnelInfoData: [], // 人员信息数据
url: {
importExcelUrl: '',
list: '' // 人员信息右侧表的分页查询接口
}
}
@@ -66,72 +66,18 @@
</a-form-model>
<!-- 是否下发联络人选了否不显示完整表单显示表格 -->
<div v-if="formInline.whetherToSendAContact === 2" class="change-base-info-wrapper">
<!-- 操作区域 -->
<div class="table-operator">
<!-- 新增 -->
<a-button icon="plus" type="primary" @click="handleAdd" :disabled="disabled">
{{ $t('newlyAdded') }}
</a-button>
<!-- 导入 -->
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button icon="upload" type="primary" ghost>{{ $t('import') }}</a-button>
</a-upload>
<!-- 批量删除 -->
<a-button icon="delete" type="primary" ghost @click="batchDel" :disabled="disabled">
{{ $t('batchDelete') }}
</a-button>
</div>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="enterpriseStandardPlanId"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
<!-- 企标编号/企标名称 -->
<template v-slot:toDetail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
<!-- 操作栏 -->
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
<a @click="handleEdit(record, index)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleDelete(record.id, index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
</div>
</j-table>
</div>
<only-table-form ref="tableRef"></only-table-form>
</div>
<!-- 表格新增编辑弹框 -->
<contact-enter-send-task-modal ref="contactEnterSendTaskModal" @ok="modelFormOk"></contact-enter-send-task-modal>
</div>
</template>
<script>
import Vue from 'vue'
import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
import store from '@/store'
import UserSelection from '@/components/selection/UserSelection'
import JTable from '@/components/jero/JTable'
import ContactEnterSendTaskModal from './ContactEnterSendTaskModal'
// 导入的加载提示
let importModalLoading
import OnlyTableForm from './OnlyTableForm'
export default {
name: 'ContactEnterSendTaskForm',
components: { ContactEnterSendTaskModal, UserSelection, JTable },
components: { OnlyTableForm, UserSelection },
props: {
disabled: {
type: Boolean,
@@ -144,19 +90,6 @@ export default {
default: 1
}
},
computed: {
tokenHeader () {
const head = { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) }
const tenantid = Vue.ls.get(TENANT_ID)
if (tenantid) {
head['tenant-id'] = tenantid
}
return head
},
importExcelUrl: function () {
return `${window._CONFIG.domianURL}/${this.url.importExcelUrl}`
}
},
data () {
return {
loading: false,
@@ -187,150 +120,6 @@ export default {
}
]
},
columns: [
{
title: this.$t('serialNumber'),
dataIndex: '',
key: 'rowIndex',
align: 'center',
width: 80,
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ // 制修订类型
title: this.$t('enterpriseStandardLibrary.plan.revisionType'),
align: 'center',
width: 180,
dataIndex: 'applicationCategory_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 原企标编号
title: this.$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardNum'),
align: 'center',
width: 180,
dataIndex: 'originEnStandardNo',
scopedSlots: { customRender: 'toDetailOld' }
},
{ // 新企标编号
title: this.$t('enterpriseStandardLibrary.plan.newEnterpriseStandardNum'),
align: 'center',
width: 180,
dataIndex: 'newEnStandardNo',
scopedSlots: { customRender: 'toDetailNew' }
},
{ // 原企标名称
title: this.$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardName'),
align: 'center',
width: 180,
dataIndex: 'originEnStandardName',
scopedSlots: { customRender: 'toDetailOld' }
},
{ // 新企标名称
title: this.$t('enterpriseStandardLibrary.plan.newEnterpriseStandardName'),
align: 'center',
width: 180,
dataIndex: 'newEnStandardName',
scopedSlots: { customRender: 'toDetailNew' }
},
{ // 授权部门
title: this.$t('enterpriseStandardLibrary.plan.authDepartment'),
align: 'center',
width: 180,
dataIndex: 'authDeparts',
scopedSlots: { customRender: 'text' }
},
{ // 企业标准代号
title: this.$t('enterpriseStandardLibrary.plan.enterpriseStandardCode'),
align: 'center',
width: 180,
dataIndex: 'enStandardCode',
scopedSlots: { customRender: 'text' }
},
{ // 配合单位
title: this.$t('enterpriseStandardLibrary.plan.suitUnit'),
align: 'center',
width: 180,
dataIndex: 'cooperateDeparts',
scopedSlots: { customRender: 'text' }
},
{ // 主起草人
title: this.$t('enterpriseStandardLibrary.plan.principalDrafter'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUser',
scopedSlots: { customRender: 'text' }
},
{ // 主起草单位
title: this.$t('enterpriseStandardLibrary.plan.mainDraftingUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUnit',
scopedSlots: { customRender: 'text' }
},
{ // 主起草单位负责人
title: this.$t('enterpriseStandardLibrary.plan.headOfMainDraftingUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUnitResponsiblePerson',
scopedSlots: { customRender: 'text' }
},
{ // 隶属工作组
title: this.$t('workCenter.revisionPlanActivelyReport.affiliatedWorkingGroup'),
align: 'center',
width: 180,
dataIndex: 'affiliatedWorkingGroup',
scopedSlots: { customRender: 'text' }
},
{ // 标准推进人
title: this.$t('enterpriseStandardLibrary.plan.standardPusher'),
align: 'center',
width: 180,
dataIndex: 'standardPromoter',
scopedSlots: { customRender: 'text' }
},
{ // 草稿计划完成日期
title: this.$t('enterpriseStandardLibrary.plan.draftPlanFinishDate'),
align: 'center',
width: 180,
dataIndex: 'draftPlannedCompleteDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 征求意见稿计划完成日期
title: this.$t('enterpriseStandardLibrary.plan.exposureDraftPlanFinishDate'),
align: 'center',
width: 200,
dataIndex: 'solicitationDraftPlanCompleteDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 计划报批日期
title: this.$t('enterpriseStandardLibrary.plan.planSubmissionDate'),
align: 'center',
width: 180,
dataIndex: 'planApprovalDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 变更状态
title: this.$t('enterpriseStandardLibrary.plan.changeState'),
align: 'center',
width: 180,
dataIndex: 'changeStatus_dictText',
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 200
}
],
dataSource: [],
selectedRowKeys: [],
selectionRows: [],
url: {
list: ''
},
modalType: '' // 是在新增还是在编辑,编辑的时候放正在编辑的下标
}
},
@@ -338,115 +127,6 @@ export default {
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
},
// 企标编号,企标名称跳转详情
handleGoDetail (record) {
this.$openPageNewSheet({
path: '/enterpriseStandardLibrary/enterpriseStandardDetail',
query: {
standardNumber: record.standardNo
}
})
},
// 表格选中
onSelectChange (selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys
this.selectionRows = selectionRows
},
// 新增或编辑完成
modelFormOk (value) {
console.log(value, this.modalType)
if (this.modalType === 'add') {
this.dataSource.push(value)
} else if (this.modalType && this.modalType.split(',')[0] === 'edit') {
this.dataSource.splice(Number(this.modalType.split(',')[1]), 1, value)
}
},
// 新增
handleAdd () {
this.modalType = 'add'
this.$refs.contactEnterSendTaskModal.add()
},
// 导入
handleImportExcel (info) {
// 加一个大的提示
if (!this.loading) {
importModalLoading = this.$info({
title: '提示',
content: <span>正在导入请稍候 <a-spin size="small" /></span>,
keyboard: false
})
}
this.loading = true
// 把知道了这个按钮去掉
this.$nextTick(() => {
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
})
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList)
}
if (info.file.status === 'done') {
// 销毁这个提示
importModalLoading && importModalLoading.destroy()
this.loading = false
if (info.file.response.success) {
// this.$message.success(`${info.file.name} 文件上传成功`);
if (info.file.response.code === 201) {
const { message, result: { msg, fileUrl, fileName } } = info.file.response
const href = window._CONFIG.domianURL + fileUrl
this.$warning({
title: message,
content: (<div>
<span>{msg}</span><br />
<span>具体详情请 <a href={href} target="_blank" download={fileName}>点击下载</a> </span>
</div>
)
})
} else {
this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
}
this.loadData()
} else {
this.$message.error(`${info.file.name} ${info.file.response.message}.`)
}
} else if (info.file.status === 'error') {
// 销毁这个提示
importModalLoading && importModalLoading.destroy()
this.loading = false
if (info.file.response.status === 500) {
const data = info.file.response
const token = Vue.ls.get(ACCESS_TOKEN)
if (token && data.message.includes('Token失效')) {
this.error({
title: '登录已过期',
content: '很抱歉,登录已过期,请重新登录',
okText: '重新登录',
mask: false,
onOk: () => {
store.dispatch('Logout').then(() => {
Vue.ls.remove(ACCESS_TOKEN)
window.location.reload()
})
}
})
}
} else {
this.$message.error(`文件上传失败: ${info.file.msg} `)
}
}
},
// 编辑
handleEdit (record, index) {
this.modalType = 'edit' + index
this.$refs.contactEnterSendTaskModal.edit(record)
},
// 删除
handleDelete (id, index) {
this.dataSource.splice(index, 1)
},
// 批量删除
batchDel () {
this.dataSource = this.dataSource.filter(item => !this.selectedRowKeys.includes(item.enterpriseStandardPlanId))
}
}
}
@@ -24,6 +24,7 @@
</div>
<a-form-model-item class="item-model" prop="applicationType">
<a-select v-model="formInline.applicationType"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.applicationType')">
<a-select-option :value="1">{{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }}</a-select-option>
</a-select>
@@ -40,6 +41,7 @@
<a-form-model-item class="item-model" prop="itemCategory">
<a-select v-model="formInline.itemCategory"
@change="itemCategoryChange"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')">
<a-select-option :value="1">{{ $t('workCenter.enterpriseInitChangePlan.formulate') }}</a-select-option>
<a-select-option :value="2">{{ $t('workCenter.enterpriseInitChangePlan.revise') }}</a-select-option>
@@ -76,6 +78,7 @@
<a-input class="box-input"
v-model="formInline.enterpriseStandardName"
:maxLength="50"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
</a-form-model-item>
</div>
@@ -93,6 +96,7 @@
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode')"
:type="'select'"
:triggerChange="false"
:disabled="disabled"
dictCode="enterprise_standard_code" />
</a-form-model-item>
</div>
@@ -110,6 +114,7 @@
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseNameCode')"
:type="'select'"
:triggerChange="false"
:disabled="disabled"
dictCode="enterprise_name_code" />
</a-form-model-item>
</div>
@@ -127,6 +132,7 @@
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardCategoryCode')"
:type="'select'"
:triggerChange="false"
:disabled="disabled"
dictCode="standard_category_code" />
</a-form-model-item>
</div>
@@ -143,7 +149,7 @@
v-model="formInline.yearNumber"
:default-value="yearNumberDefaultValue"
date-format="YYYY"
@change="decadeCodeChange"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.yearNumber')" />
</a-form-model-item>
</div>
@@ -162,6 +168,7 @@
<standard-selection :source="StandardSource.ENTERPRISE.value"
:disabledSourceSearch="true"
type="radio"
:disabled="disabled"
v-model="formInline.enterpriseStandardNum"
@nameChange="nameChange"/>
</a-form-model-item>
@@ -209,6 +216,7 @@
<a-input class="box-input"
v-model="formInline.newEnterpriseStandardName"
:maxLength="50"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName')" />
</a-form-model-item>
</div>
@@ -224,6 +232,7 @@
<a-input class="box-input"
v-model="formInline.standardEnglishName"
:maxLength="50"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.standardEnglishName')" />
</a-form-model-item>
</div>
@@ -244,6 +253,7 @@
tree-checkable
treeCheckStrictly
:label-in-value="false"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardSystem')" />
</a-form-model-item>
</div>
@@ -261,6 +271,7 @@
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardType')"
:type="'select'"
:triggerChange="false"
:disabled="disabled"
dictCode="esp_standard_type" />
</a-form-model-item>
</div>
@@ -278,6 +289,7 @@
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardGradeClassification')"
:type="'select'"
:triggerChange="false"
:disabled="disabled"
dictCode="standard_grade_classify" />
</a-form-model-item>
</div>
@@ -311,6 +323,7 @@
<a-date-picker
v-model="formInline.draftPlanFinishDate"
:showTime="false"
:disabled="disabled"
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
@@ -327,6 +340,7 @@
<a-date-picker
v-model="formInline.exposureDraftPlanFinishDate"
:showTime="false"
:disabled="disabled"
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
@@ -343,6 +357,7 @@
<a-date-picker
v-model="formInline.planSubmissionDate"
:showTime="false"
:disabled="disabled"
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
@@ -364,6 +379,7 @@
:getPopupContainer="triggerNode=> triggerNode.parentNode"
style="width: 100%"
:tree-data="workingGroupTreeList"
:disabled="disabled"
:placeholder="$t('pleaseSelect')"
/>
</a-form-model-item>
@@ -387,6 +403,7 @@
style="width: 100%"
:tree-data="partNameOptions"
:label-in-value="false"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.partName')" />
</a-form-model-item>
</div>
@@ -400,6 +417,7 @@
</div>
<a-form-model-item class="item-model" prop="authorizationDepart">
<j-select-depart v-model="formInline.authorizationDepart"
:disabled="disabled"
:backDepart="true" />
</a-form-model-item>
</div>
@@ -417,6 +435,7 @@
filedName="principalDrafter"
@nameChange="userSelectNameChange"
:nameStr="formInline.principalDrafter_dictText"
:disabled="disabled"
type="radio" />
</a-form-model-item>
</div>
@@ -430,6 +449,7 @@
</div>
<a-form-model-item class="item-model" prop="mainDraftUnit">
<j-select-depart v-model="formInline.mainDraftUnit"
:disabled="disabled"
:backDepart="true" />
</a-form-model-item>
</div>
@@ -447,6 +467,7 @@
filedName="headOfMainDraftingUnit"
@nameChange="userSelectNameChange"
:nameStr="formInline.headOfMainDraftingUnit_dictText"
:disabled="disabled"
type="radio" />
</a-form-model-item>
</div>
@@ -464,6 +485,7 @@
filedName="standardPusher"
@nameChange="userSelectNameChange"
:nameStr="formInline.standardPusher_dictText"
:disabled="disabled"
type="radio" />
</a-form-model-item>
</div>
@@ -475,6 +497,9 @@
<a-button @click="handleCancel">{{ $t('cancel') }}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{ $t('submit') }}</a-button>
</div>
<!-- 文件上传弹框 -->
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :disabled="disabled"></upload-file>
</a-drawer>
</template>
@@ -483,21 +508,23 @@ import { StandardSource } from '@/enums/commonEnums'
import { getWorkGroupTreeList, getFormDictTreeList } from '@/api/api'
import UserSelection from '@/components/selection/UserSelection'
import StandardSelection from '@/components/selection/StandardSelection'
import UploadFile from '@/components/UploadFile'
import { getTreeList } from '@/api/enterpriseStandardLibraryApi'
import Vue from 'vue'
import { USER_INFO } from '@/store/mutation-types'
export default {
name: 'ContactEnterSendTaskModal',
components: { UserSelection, StandardSelection },
components: { UserSelection, StandardSelection, UploadFile },
data () {
return {
StandardSource,
workingGroupTreeList: [], // 隶属工作组下拉框数据
partNameOptions: [], // 零部件名称下拉框数据\
partNameOptions: [], // 零部件名称下拉框数据
standardSystemOptions: [], // 企标体系下拉框数据
visible: false,
confirmLoading: false,
disabled: false,
model: {},
formInline: {},
rules: {
@@ -695,13 +722,13 @@ export default {
const userInfo = Vue.ls.get(USER_INFO)
const formInline = {}
// 初始化主起草人信息
formInline.mainDraftingUser = userInfo.id
formInline.mainDraftingUser_dictText = userInfo.realname
formInline.principalDrafter = userInfo.id
formInline.principalDrafter_dictText = userInfo.realname
// 初始化主起草单位信息
formInline.mainDraftingUnit = userInfo.departIds
formInline.mainDraftUnit = userInfo.departIds
// 初始化起草单位负责人 todo: 看怎么获取当前登录人的上级
// 初始化年代号
formInline.decadeCode = new Date().getFullYear() + ''
formInline.yearNumber = new Date().getFullYear() + ''
this.edit(formInline)
},
edit (record) {
@@ -709,6 +736,12 @@ export default {
this.model = Object.assign({}, record)
this.formInline = Object.assign({}, record)
},
look (record) {
this.visible = true
this.model = Object.assign({}, record)
this.formInline = Object.assign({}, record)
this.disabled = true
},
// 获取零部件名称下拉框数据
initPartNameOptions () {
getFormDictTreeList({ dictId: '1696821512600637441' }).then(res => {
@@ -756,12 +789,29 @@ export default {
} else {
this.rules.enterpriseStandardName[0].required = false
}
this.formInline.decadeCode = new Date().getFullYear() + ''
this.formInline.yesrNumber = new Date().getFullYear() + ''
},
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
},
// 点击文件上传
clickButtonToUpload (fieldName) {
this.$refs.uploadFile.open(this.formInline[fieldName])
this.uploadName = fieldName
},
// 文件上传改变后的回调
uploadFileChange (data) {
const attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id)
})
}
/** 赋值给当前对应的表单文件 */
this.formInline[this.uploadName] = attIdList.join(',')
this.formInline = { ...this.formInline }
},
// 取消
handleCancel () {
this.close()
@@ -24,71 +24,19 @@
</div>
</div>
</a-form-model>
<!-- 操作区域 -->
<div class="table-operator">
<!-- 新增 -->
<a-button icon="plus" type="primary" @click="handleAdd" :disabled="disabled">
{{ $t('newlyAdded') }}
</a-button>
<!-- 导入 -->
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button icon="upload" type="primary" ghost>{{ $t('import') }}</a-button>
</a-upload>
<!-- 批量删除 -->
<a-button icon="delete" type="primary" ghost @click="batchDel" :disabled="disabled">
{{ $t('batchDelete') }}
</a-button>
</div>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="enterpriseStandardPlanId"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
<!-- 企标编号/企标名称 -->
<template v-slot:toDetail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
<!-- 操作栏 -->
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
<a @click="handleEdit(record, index)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleDelete(record.id, index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
</div>
</j-table>
</div>
<!-- 表格新增编辑弹框 -->
<contact-enter-send-task-modal ref="contactEnterSendTaskModal" @ok="modelFormOk"></contact-enter-send-task-modal>
<!-- 表格 -->
<only-table-form ref="tableRef"></only-table-form>
</div>
</template>
<script>
import Vue from 'vue'
import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
import store from '@/store'
import UserSelection from '@/components/selection/UserSelection'
import JTable from '@/components/jero/JTable'
import ContactEnterSendTaskModal from './ContactEnterSendTaskModal'
// 导入的加载提示
let importModalLoading
import OnlyTableForm from './OnlyTableForm'
export default {
name: 'ContactEnterStandardForm',
components: { ContactEnterSendTaskModal, UserSelection, JTable },
components: { UserSelection, OnlyTableForm },
props: {
disabled: {
type: Boolean,
@@ -101,19 +49,6 @@ export default {
default: 1
}
},
computed: {
tokenHeader () {
const head = { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) }
const tenantid = Vue.ls.get(TENANT_ID)
if (tenantid) {
head['tenant-id'] = tenantid
}
return head
},
importExcelUrl: function () {
return `${window._CONFIG.domianURL}/${this.url.importExcelUrl}`
}
},
data () {
return {
loading: false,
@@ -128,150 +63,6 @@ export default {
}
]
},
columns: [
{
title: this.$t('serialNumber'),
dataIndex: '',
key: 'rowIndex',
align: 'center',
width: 80,
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ // 制修订类型
title: this.$t('enterpriseStandardLibrary.plan.revisionType'),
align: 'center',
width: 180,
dataIndex: 'applicationCategory_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 原企标编号
title: this.$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardNum'),
align: 'center',
width: 180,
dataIndex: 'originEnStandardNo',
scopedSlots: { customRender: 'toDetailOld' }
},
{ // 新企标编号
title: this.$t('enterpriseStandardLibrary.plan.newEnterpriseStandardNum'),
align: 'center',
width: 180,
dataIndex: 'newEnStandardNo',
scopedSlots: { customRender: 'toDetailNew' }
},
{ // 原企标名称
title: this.$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardName'),
align: 'center',
width: 180,
dataIndex: 'originEnStandardName',
scopedSlots: { customRender: 'toDetailOld' }
},
{ // 新企标名称
title: this.$t('enterpriseStandardLibrary.plan.newEnterpriseStandardName'),
align: 'center',
width: 180,
dataIndex: 'newEnStandardName',
scopedSlots: { customRender: 'toDetailNew' }
},
{ // 授权部门
title: this.$t('enterpriseStandardLibrary.plan.authDepartment'),
align: 'center',
width: 180,
dataIndex: 'authDeparts',
scopedSlots: { customRender: 'text' }
},
{ // 企业标准代号
title: this.$t('enterpriseStandardLibrary.plan.enterpriseStandardCode'),
align: 'center',
width: 180,
dataIndex: 'enStandardCode',
scopedSlots: { customRender: 'text' }
},
{ // 配合单位
title: this.$t('enterpriseStandardLibrary.plan.suitUnit'),
align: 'center',
width: 180,
dataIndex: 'cooperateDeparts',
scopedSlots: { customRender: 'text' }
},
{ // 主起草人
title: this.$t('enterpriseStandardLibrary.plan.principalDrafter'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUser',
scopedSlots: { customRender: 'text' }
},
{ // 主起草单位
title: this.$t('enterpriseStandardLibrary.plan.mainDraftingUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUnit',
scopedSlots: { customRender: 'text' }
},
{ // 主起草单位负责人
title: this.$t('enterpriseStandardLibrary.plan.headOfMainDraftingUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUnitResponsiblePerson',
scopedSlots: { customRender: 'text' }
},
{ // 隶属工作组
title: this.$t('workCenter.revisionPlanActivelyReport.affiliatedWorkingGroup'),
align: 'center',
width: 180,
dataIndex: 'affiliatedWorkingGroup',
scopedSlots: { customRender: 'text' }
},
{ // 标准推进人
title: this.$t('enterpriseStandardLibrary.plan.standardPusher'),
align: 'center',
width: 180,
dataIndex: 'standardPromoter',
scopedSlots: { customRender: 'text' }
},
{ // 草稿计划完成日期
title: this.$t('enterpriseStandardLibrary.plan.draftPlanFinishDate'),
align: 'center',
width: 180,
dataIndex: 'draftPlannedCompleteDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 征求意见稿计划完成日期
title: this.$t('enterpriseStandardLibrary.plan.exposureDraftPlanFinishDate'),
align: 'center',
width: 200,
dataIndex: 'solicitationDraftPlanCompleteDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 计划报批日期
title: this.$t('enterpriseStandardLibrary.plan.planSubmissionDate'),
align: 'center',
width: 180,
dataIndex: 'planApprovalDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 变更状态
title: this.$t('enterpriseStandardLibrary.plan.changeState'),
align: 'center',
width: 180,
dataIndex: 'changeStatus_dictText',
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 200
}
],
dataSource: [],
selectedRowKeys: [],
selectionRows: [],
url: {
list: ''
},
modalType: '' // 是在新增还是在编辑,编辑的时候放正在编辑的下标
}
},
@@ -279,115 +70,6 @@ export default {
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
},
// 企标编号,企标名称跳转详情
handleGoDetail (record) {
this.$openPageNewSheet({
path: '/enterpriseStandardLibrary/enterpriseStandardDetail',
query: {
standardNumber: record.standardNo
}
})
},
// 表格选中
onSelectChange (selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys
this.selectionRows = selectionRows
},
// 新增或编辑完成
modelFormOk (value) {
console.log(value, this.modalType)
if (this.modalType === 'add') {
this.dataSource.push(value)
} else if (this.modalType && this.modalType.split(',')[0] === 'edit') {
this.dataSource.splice(Number(this.modalType.split(',')[1]), 1, value)
}
},
// 新增
handleAdd () {
this.modalType = 'add'
this.$refs.contactEnterSendTaskModal.add()
},
// 导入
handleImportExcel (info) {
// 加一个大的提示
if (!this.loading) {
importModalLoading = this.$info({
title: '提示',
content: <span>正在导入请稍候 <a-spin size="small" /></span>,
keyboard: false
})
}
this.loading = true
// 把知道了这个按钮去掉
this.$nextTick(() => {
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
})
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList)
}
if (info.file.status === 'done') {
// 销毁这个提示
importModalLoading && importModalLoading.destroy()
this.loading = false
if (info.file.response.success) {
// this.$message.success(`${info.file.name} 文件上传成功`);
if (info.file.response.code === 201) {
const { message, result: { msg, fileUrl, fileName } } = info.file.response
const href = window._CONFIG.domianURL + fileUrl
this.$warning({
title: message,
content: (<div>
<span>{msg}</span><br />
<span>具体详情请 <a href={href} target="_blank" download={fileName}>点击下载</a> </span>
</div>
)
})
} else {
this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
}
this.loadData()
} else {
this.$message.error(`${info.file.name} ${info.file.response.message}.`)
}
} else if (info.file.status === 'error') {
// 销毁这个提示
importModalLoading && importModalLoading.destroy()
this.loading = false
if (info.file.response.status === 500) {
const data = info.file.response
const token = Vue.ls.get(ACCESS_TOKEN)
if (token && data.message.includes('Token失效')) {
this.error({
title: '登录已过期',
content: '很抱歉,登录已过期,请重新登录',
okText: '重新登录',
mask: false,
onOk: () => {
store.dispatch('Logout').then(() => {
Vue.ls.remove(ACCESS_TOKEN)
window.location.reload()
})
}
})
}
} else {
this.$message.error(`文件上传失败: ${info.file.msg} `)
}
}
},
// 编辑
handleEdit (record, index) {
this.modalType = 'edit' + index
this.$refs.contactEnterSendTaskModal.edit(record)
},
// 删除
handleDelete (id, index) {
this.dataSource.splice(index, 1)
},
// 批量删除
batchDel () {
this.dataSource = this.dataSource.filter(item => !this.selectedRowKeys.includes(item.enterpriseStandardPlanId))
}
}
}
@@ -10,6 +10,10 @@
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button icon="upload" type="primary" ghost>{{ $t('import') }}</a-button>
</a-upload>
<!-- 模板下载 -->
<a-button icon="download" type="primary" ghost @click="downTemplate($t('workCenter.revisionPlanActivelyReport.templateExport'))">
{{ $t('templateDownload') }}
</a-button>
<!-- 批量删除 -->
<a-button icon="delete" type="primary" ghost @click="batchDel" :disabled="disabled">
{{ $t('batchDelete') }}
@@ -39,9 +43,19 @@
<!-- 操作栏 -->
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
<a @click="handleEdit(record, index)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleDelete(record.id, index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
<template v-if="!disabled">
<a @click="handleEdit(record, index)" class="table-ope-btn">{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleDelete(record.id, index)" class="table-ope-btn">{{ $t('delete') }}</a>
</template>
<template v-else-if="onlyCanLook">
<a @click="handleLook(record, index)" class="table-ope-btn">{{ $t('lookDetail') }}</a>
</template>
<template v-else-if="editAndLook">
<a @click="handleEdit(record, index)" class="table-ope-btn">{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleLook(record, index)" class="table-ope-btn">{{ $t('lookDetail') }}</a>
</template>
</div>
</j-table>
@@ -57,6 +71,7 @@ import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
import store from '@/store'
import JTable from '@/components/jero/JTable'
import ContactEnterSendTaskModal from './ContactEnterSendTaskModal'
import { downloadFile } from '@/api/manage'
// 导入的加载提示
let importModalLoading
@@ -69,6 +84,18 @@ export default {
type: Boolean,
required: false,
default: false
},
// 只能查看
onlyCanLook: {
type: Boolean,
required: false,
default: false
},
// 可以编辑和查看
editAndLook: {
type: Boolean,
required: false,
default: false
}
},
computed: {
@@ -234,7 +261,8 @@ export default {
selectedRowKeys: [],
selectionRows: [],
url: {
list: ''
list: '',
downTemplateUrl: ''
},
modalType: '' // 是在新增还是在编辑,编辑的时候放正在编辑的下标
}
@@ -254,6 +282,13 @@ export default {
this.selectedRowKeys = selectedRowKeys
this.selectionRows = selectionRows
},
// 下载导入模板
downTemplate (fileName) {
if (!fileName || typeof fileName !== 'string') {
fileName = '模板文件'
}
downloadFile(this.url.downTemplateUrl, fileName + '.xls')
},
// 新增或编辑完成
modelFormOk (value) {
console.log(value, this.modalType)
@@ -341,6 +376,10 @@ export default {
this.modalType = 'edit' + index
this.$refs.contactEnterSendTaskModal.edit(record)
},
// 查看
handleLook (record) {
this.$refs.contactEnterSendTaskModal.look(record)
},
// 删除
handleDelete (id, index) {
this.dataSource.splice(index, 1)
@@ -0,0 +1,382 @@
<template>
<internal-detail-page :title="pageTitle" :content-padding="0">
<!-- 标题右侧tab -->
<template v-slot:titleRightCustom>
<div class="table-operator-tab">
<!-- 基础信息 -->
<a class="switch-item" :class="switchValue === 'base' ? 'table-operator-tab-active' : ''"
@click="switchChange('base')">{{ $t('basicInformation') }}
</a>
<!-- 人员信息 -->
<a class="switch-item" :class="switchValue === 'user' ? 'table-operator-tab-active' : ''"
@click="switchChange('user')">{{ $t('personalInformation') }}
</a>
</div>
</template>
<!-- 基础信息 -->
<div v-if="switchValue === 'base'" class="detail-page-scroll-content">
<!-- 流程信息 -->
<div class="process-part-title">{{ $t('processInformation') }}</div>
<a-form :form="processInfoForm">
<a-row>
<a-col :span="12">
<!-- 流程名称 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
@change="event => event.target.value = event.target.value.trim()"
:disabled="disabled"
:maxLength="50"
v-decorator="['processName', validatorRules.processName]" />
</a-form-item>
</a-col>
<a-col :span="12">
<!-- 截止日期 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')">
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
style="width: 100%"
:disabled="disabled"
value-format="YYYY-MM-DD"
v-decorator="['expirationDate']" />
</a-form-item>
</a-col>
<a-col :span="24">
<!-- 流程说明 -->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('processExplain')">
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
:maxLength="500"
:rows="4"
:disabled="disabled"
v-decorator="['processExplain']" />
</a-form-item>
</a-col>
</a-row>
</a-form>
<!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<!-- 节点1标准工程师发起的基本信息表单 -->
<engineer-init-base-info v-if="currentNode === 1" ref="baseInfoRef"></engineer-init-base-info>
<!-- 节点2部所联络人选取审批人 -->
<contact-select-approver-base-info v-else-if="currentNode === 2" ref="baseInfoRef"></contact-select-approver-base-info>
<!-- 节点3主起草单位主管级领导审批下发 -->
<leader-approve-sent-base-info v-else-if="currentNode === 3" ref="baseInfoRef"></leader-approve-sent-base-info>
<!-- 节点4主起草人填写信息 -->
<!-- 节点5部所联络人汇总 -->
<!-- 节点6主起草单位主管级领导批准 -->
<!-- 节点7标准化归档 -->
<table-base-info v-else ref="baseInfoRef" :current-node="currentNode"></table-base-info>
<!-- 流程审批信息 -->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
<a-form :form="approvalInfoForm">
<!--备注-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('remarks')">
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
:maxLength="500"
:rows="4"
v-decorator="['remarks', validatorRules.remarks]" />
</a-form-item>
<!--附件-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
<j-upload v-decorator="['file']" return-id />
</a-form-item>
</a-form>
</div>
<!-- 人员信息 -->
<div v-if="switchValue === 'user'" class="detail-page-scroll-content p-0">
<process-detail-list :url="url">
<personnel-info slot="personnelInfo" :data="personnelInfoData" :currentNode="currentNode"></personnel-info>
</process-detail-list>
</div>
<!-- 操作按钮 -->
<div class="detail-page-bottom-operate-box" v-if="!onlyLook">
<!-- 发起节点 -->
<template v-if="currentNode === 1">
<!-- 保存 -->
<a-button type="primary" ghost :loading="loading" @click="handleSave"><i class="iconfont icon-save"></i> {{ $t('preservation') }}</a-button>
<!-- 提交 -->
<a-button type="primary" :loading="loading" @click="handleStart" icon="upload">{{ $t('submit') }}</a-button>
</template>
<!-- 各部所联络人填写/下发任务 -->
<template v-else-if="currentNode === 5">
<!-- 转办 -->
<a-button type="primary" ghost :loading="loading" @click="handleTurnTo" icon="arrow-up">{{ $t('turnTo') }}</a-button>
<!-- 保存 -->
<a-button type="primary" ghost :loading="loading" @click="handleSave"><i class="iconfont icon-save"></i> {{ $t('preservation') }}</a-button>
<!-- 提交 -->
<a-button type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('submit') }}</a-button>
</template>
<template v-else-if="currentNode === 4 || currentNode === 7">
<!-- 提交 -->
<a-button type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('submit') }}</a-button>
</template>
<template v-else>
<!-- 转办 -->
<a-button type="primary" ghost :loading="loading" @click="handleTurnTo" icon="arrow-up">{{ $t('turnTo') }}</a-button>
<!-- 保存 -->
<a-button type="primary" ghost :loading="loading" @click="handleSave"><i class="iconfont icon-save"></i> {{ $t('preservation') }}</a-button>
<!-- 同意 -->
<a-button type="primary" :loading="loading" @click="handleAgree" icon="check-circle">{{ $t('agree') }}</a-button>
<!-- 驳回 -->
<a-button type="primary" :loading="loading" @click="handleReject" icon="close-circle">{{ $t('reject') }}</a-button>
</template>
</div>
<!-- 选人弹框 -->
<user-select-modal ref="userSelectModal" type="radio" @change="userSelectModalChange"></user-select-modal>
</internal-detail-page>
</template>
<script>
import InternalDetailPage from '@/components/InternalDetailPage'
import UserSelectModal from '@/components/selection/UserSelectModal'
import ProcessDetailList from '@/components/ProcessDetailList'
import PersonnelInfo from '@/components/PersonnelInfo'
import EngineerInitBaseInfo from './modules/EngineerInitBaseInfo'
import ContactSelectApproverBaseInfo from './modules/ContactSelectApproverBaseInfo'
import LeaderApproveSentBaseInfo from './modules/LeaderApproveSentBaseInfo'
import TableBaseInfo from './modules/TableBaseInfo'
const personData = [
{
id: 1,
nodeName: '标准化工程师发起',
nodeRoleName: '发起人',
canChoose: false
},
{
id: 2,
nodeName: '部所联络人选取审批人',
nodeRoleName: '部所联络人',
canChoose: false
},
{
id: 3,
nodeName: '主起草单位主管级领导审批下发',
nodeRoleName: '主起草单位主管级领导',
canChoose: false
},
{
id: 4,
nodeName: '主起草人填写信息',
nodeRoleName: '主起草人',
canChoose: false
},
{
id: 5,
nodeName: '部所联络人汇总',
nodeRoleName: '部所联络人',
canChoose: false
},
{
id: 6,
nodeName: '主起草单位主管级领导批准',
nodeRoleName: '主起草单位主管级领导',
canChoose: false
},
{
id: 7,
nodeName: '标准化归档',
nodeRoleName: '标准化工程师',
canChoose: false
}
]
export default {
name: 'RevisionPlanStandardizationInitFlow',
components: {
TableBaseInfo,
LeaderApproveSentBaseInfo,
ContactSelectApproverBaseInfo,
EngineerInitBaseInfo,
InternalDetailPage,
UserSelectModal,
ProcessDetailList,
PersonnelInfo
},
computed: {
pageTitle () {
return this.$t('flowCenter') + this.$route.meta.title
}
},
mounted () {
if (this.currentNode === 1) {
this.personnelInfoData = personData
} else {
this.personnelInfoData = personData.map(item => {
return { ...item, canChoose: false }
})
}
// 如果是查看进入的,不可编辑,不可操作
if (this.$route.query.onlyLook) {
this.onlyLook = this.$route.query.onlyLook
this.disabled = this.$route.query.onlyLook
}
},
data () {
return {
loading: false,
switchValue: 'base',
processInfoForm: this.$form.createForm(this),
labelCol: {
xs: { span: 24 },
sm: { span: 4 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 20 }
},
longLabelCol: {
xs: { span: 24 },
sm: { span: 2 }
},
longWrapperCol: {
xs: { span: 24 },
sm: { span: 22 }
},
disabled: false,
onlyLook: false,
validatorRules: {
// 流程名称
processName: {
rules: [
{
required: true,
message: this.$t('pleaseEnter') + this.$t('processName')
}
],
validateTrigger: 'blur'
},
// 备注
remarks: {
rules: [
{
required: false,
message: this.$t('pleaseEnter') + this.$t('remarks')
}
],
validateTrigger: 'blur'
}
},
currentNode: 7,
approvalInfoForm: this.$form.createForm(this), // 审批信息表单
personnelInfoData: [], // 人员信息数据
url: {
list: '' // 人员信息右侧表的分页查询接口
}
}
},
methods: {
switchChange (value) {
this.switchValue = value
},
// 保存
handleSave () {
// 有任意一项填了即可
// 流程信息表单
const processInfoForm = this.processInfoForm.getFieldsValue()
// 业务基本信息
let ruleForm = {}
// 流程审批信息
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
// 人员信息的数据, 处理成对象
const personnelInfo = this.$refs.personnelInfo.stepsData
const personnelObj = {}
for (const item of personnelInfo) {
if (item.fieldName) {
personnelObj[item.fieldName] = item.user
}
}
// 需要传给后端的
// 业务基本信息
if (this.$refs.basicInfoFormRef) {
} else {
// 需要外层信息至少填了一项
const param = { ...processInfoForm, ...ruleForm, ...approvalInfoForm, ...personnelObj }
const flag = Object.values(param).some(v => !!v || v === 0)
if (!flag) {
// 提示至少填写一项
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
return
}
}
// 保存到草稿
// enterprisePlanApprovalSave(arr).then(res => {
// if (res.success) {
// this.$message.success(res.message)
// } else {
// this.$message.warning(res.message)
// }
// })
},
// 节点一时候的提交,发起变更
handleStart () {
if (this.loading) return
// 人员信息的数据, 处理成对象
const personnelInfo = this.$refs.personnelInfo.stepsData
const personnelObj = {}
for (const item of personnelInfo) {
if (item.fieldName) {
personnelObj[item.fieldName] = item.user
}
}
// 校验是否填了所有能填的人员信息
if (!Object.values(personnelObj).every(v => !!v)) {
this.$message.warning(this.$t('pleaseEnterPersonnelInfo'))
return
}
this.processInfoForm.validateFields((err, values) => {
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
})
})
},
// 转办
handleTurnTo () {
if (this.loading) return
// 点击显示选人组件
this.$refs.userSelectModal.open()
},
// 转办选完人的回调
userSelectModalChange (userIds) {
this.approvalInfoForm.validateFields((err, values) => {
if (!err) {
this.loading = true
const param = Object.assign({}, values)
param.userId = userIds
param.taskId = this.$route.query.taskId
// enterprisePlanApprovalTurnTo(param).then(res => {
// if (res.success) {
// this.$message.success(res.message)
// } else {
// this.$message.warning(res.message)
// }
// }).finally(() => {
// this.loading = false
// })
}
})
},
// 提交
handleSubmit () {
},
// 同意
handleAgree () {
},
// 驳回
handleReject () {
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>
@@ -0,0 +1,887 @@
<template>
<a-drawer
:title="$t('standardSelect.standardSelection')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
class="custom-drawer-style">
<div class="custom-drawer-style-scroll">
<a-spin :spinning="confirmLoading">
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
<!-- 基础信息 -->
<div class="header-text">{{ $t('basicInformation') }}</div>
<div class="form-flex-box">
<!-- 申请类型 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span v-if="rules.applicationType[0].required" class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.applicationType')">
{{ $t('workCenter.enterpriseInitChangePlan.applicationType') }}
</span>
</div>
<a-form-model-item class="item-model" prop="applicationType">
<a-select v-model="formInline.applicationType"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.applicationType')">
<a-select-option :value="1">{{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }}</a-select-option>
</a-select>
</a-form-model-item>
</div>
<!-- 项目类别 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span v-if="rules.itemCategory[0].required" class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.itemCategory')">
{{ $t('workCenter.enterpriseInitChangePlan.itemCategory') }}
</span>
</div>
<a-form-model-item class="item-model" prop="itemCategory">
<a-select v-model="formInline.itemCategory"
@change="itemCategoryChange"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')">
<a-select-option :value="1">{{ $t('workCenter.enterpriseInitChangePlan.formulate') }}</a-select-option>
<a-select-option :value="2">{{ $t('workCenter.enterpriseInitChangePlan.revise') }}</a-select-option>
</a-select>
</a-form-model-item>
</div>
<!-- 标准立项-制定 -->
<template v-if="formInline.itemCategory && formInline.itemCategory === 1">
<!-- 企标编号 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span v-if="rules.enterpriseStandardNum[0].required" class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enterpriseStandardNum">
<a-input class="box-input"
v-model="formInline.enterpriseStandardNum"
:maxLength="50"
disabled
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')" />
</a-form-model-item>
</div>
<!-- 企标名称 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span v-if="rules.enterpriseStandardName[0].required" class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enterpriseStandardName">
<a-input class="box-input"
v-model="formInline.enterpriseStandardName"
:maxLength="50"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
</a-form-model-item>
</div>
<!-- 企业标准代号 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span v-if="rules.enterpriseStandardCode[0].required" class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enterpriseStandardCode">
<j-dict-select-tag class="box-input"
v-model="formInline.enterpriseStandardCode"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode')"
:type="'select'"
:triggerChange="false"
:disabled="disabled"
dictCode="enterprise_standard_code" />
</a-form-model-item>
</div>
<!-- 企业名称代号 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span v-if="rules.enterpriseNameCode[0].required" class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseNameCode')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseNameCode') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enterpriseNameCode">
<j-dict-select-tag class="box-input"
v-model="formInline.enterpriseNameCode"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseNameCode')"
:type="'select'"
:triggerChange="false"
:disabled="disabled"
dictCode="enterprise_name_code" />
</a-form-model-item>
</div>
<!-- 标准类别代号 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span v-if="rules.standardCategoryCode[0].required" class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardCategoryCode')">
{{ $t('workCenter.enterpriseInitChangePlan.standardCategoryCode') }}
</span>
</div>
<a-form-model-item class="item-model" prop="standardCategoryCode">
<j-dict-select-tag class="box-input"
v-model="formInline.standardCategoryCode"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardCategoryCode')"
:type="'select'"
:triggerChange="false"
:disabled="disabled"
dictCode="standard_category_code" />
</a-form-model-item>
</div>
<!-- 年代号 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span v-if="rules.yearNumber[0].required" class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.yearNumber')">
{{ $t('workCenter.enterpriseInitChangePlan.yearNumber') }}
</span>
</div>
<a-form-model-item class="item-model" prop="yearNumber">
<j-date show-type="year"
v-model="formInline.yearNumber"
:default-value="yearNumberDefaultValue"
date-format="YYYY"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.yearNumber')" />
</a-form-model-item>
</div>
</template>
<!-- 标准立项-修订 -->
<template v-else-if="formInline.itemCategory && formInline.itemCategory === 2">
<!-- 企标编号 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enterpriseStandardNum">
<standard-selection :source="StandardSource.ENTERPRISE.value"
:disabledSourceSearch="true"
type="radio"
:disabled="disabled"
v-model="formInline.enterpriseStandardNum"
@nameChange="nameChange"/>
</a-form-model-item>
</div>
<!-- 企标名称 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span v-if="rules.enterpriseStandardName[0].required" class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enterpriseStandardName">
<a-input class="box-input"
v-model="formInline.enterpriseStandardName"
:maxLength="50"
disabled
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
</a-form-model-item>
</div>
<!-- 新企标编号 根据选的企标编号的那三个代号生成新的编号 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum')">
{{ $t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum') }}
</span>
</div>
<a-form-model-item class="item-model" prop="newEnterpriseStandardNum">
<a-input class="box-input"
v-model="formInline.newEnterpriseStandardNum"
:maxLength="50"
disabled
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum')" />
</a-form-model-item>
</div>
<!-- 新企标名称 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span v-if="rules.newEnterpriseStandardName[0].required" class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName')">
{{ $t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName') }}
</span>
</div>
<a-form-model-item class="item-model" prop="newEnterpriseStandardName">
<a-input class="box-input"
v-model="formInline.newEnterpriseStandardName"
:maxLength="50"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName')" />
</a-form-model-item>
</div>
</template>
<!-- 标准英文名称 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardEnglishName')">
{{ $t('workCenter.enterpriseInitChangePlan.standardEnglishName') }}
</span>
</div>
<a-form-model-item class="item-model" prop="standardEnglishName">
<a-input class="box-input"
v-model="formInline.standardEnglishName"
:maxLength="50"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.standardEnglishName')" />
</a-form-model-item>
</div>
<!-- 标准体系 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span v-if="rules.standardSystem[0].required" class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardSystem')">
{{ $t('workCenter.enterpriseInitChangePlan.standardSystem') }}
</span>
</div>
<a-form-model-item class="item-model" prop="standardSystem">
<a-tree-select
v-model="formInline.standardSystem"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
style="width: 100%"
:tree-data="standardSystemOptions"
tree-checkable
treeCheckStrictly
:label-in-value="false"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardSystem')" />
</a-form-model-item>
</div>
<!-- 标准类型 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span v-if="rules.standardType[0].required" class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardType')">
{{ $t('workCenter.enterpriseInitChangePlan.standardType') }}
</span>
</div>
<a-form-model-item class="item-model" prop="standardType">
<j-dict-select-tag class="box-input"
v-model="formInline.standardType"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardType')"
:type="'select'"
:triggerChange="false"
:disabled="disabled"
dictCode="esp_standard_type" />
</a-form-model-item>
</div>
<!-- 标准等级分类 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span v-if="rules.standardGradeClassification[0].required" class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardGradeClassification')">
{{ $t('workCenter.enterpriseInitChangePlan.standardGradeClassification') }}
</span>
</div>
<a-form-model-item class="item-model" prop="standardGradeClassification">
<j-dict-select-tag class="box-input"
v-model="formInline.standardGradeClassification"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardGradeClassification')"
:type="'select'"
:triggerChange="false"
:disabled="disabled"
dictCode="standard_grade_classify" />
</a-form-model-item>
</div>
<!-- 编制说明 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.compilationIllustration')">
{{ $t('workCenter.enterpriseInitChangePlan.compilationIllustration') }}
</span>
</div>
<a-form-model-item class="item-model" prop="compilationIllustration">
<a-button type="primary" class="button-text" @click="clickButtonToUpload('compilationIllustration')">
{{
(formInline.compilationIllustration === 'null' || formInline.compilationIllustration === ''
|| formInline.compilationIllustration === null || formInline.compilationIllustration === undefined)
? $t('uploadFile.clickUpload')
: $t('uploadFile.viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
</div>
<!-- 3个日期如果标准化填写了主起草人不能修改标准化未填写联络人必填 -->
<!-- 草稿计划完成日期 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text title-text-long">
<span v-if="rules.draftPlanFinishDate[0].required" class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.draftPlanFinishDate')">
{{ $t('workCenter.enterpriseInitChangePlan.draftPlanFinishDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="draftPlanFinishDate">
<a-date-picker
v-model="formInline.draftPlanFinishDate"
:showTime="false"
:disabled="editRole === 'contact' ? draftPlanFinishDateDisabled : (disabled || draftPlanFinishDateDisabled)"
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
<!-- 征求意见稿计划完成日期 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text title-text-long">
<span v-if="rules.exposureDraftPlanFinishDate[0].required" class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.exposureDraftPlanFinishDate')">
{{ $t('workCenter.enterpriseInitChangePlan.exposureDraftPlanFinishDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="exposureDraftPlanFinishDate">
<a-date-picker
v-model="formInline.exposureDraftPlanFinishDate"
:showTime="false"
:disabled="editRole === 'contact' ? exposureDraftPlanFinishDateDisabled : (disabled || exposureDraftPlanFinishDateDisabled)"
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
<!-- 计划报批日期 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text title-text-long">
<span v-if="rules.planSubmissionDate[0].required" class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.planSubmissionDate')">
{{ $t('workCenter.enterpriseInitChangePlan.planSubmissionDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="planSubmissionDate">
<a-date-picker
v-model="formInline.planSubmissionDate"
:showTime="false"
:disabled="editRole === 'contact' ? planSubmissionDateDisabled : (disabled || planSubmissionDateDisabled)"
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
</div>
<!-- 适用范围 -->
<div class="header-text">{{ $t('rangeOfApplication') }}</div>
<div class="form-flex-box">
<!-- 零部件名称 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.partName')">
{{ $t('workCenter.enterpriseInitChangePlan.partName') }}
</span>
</div>
<a-form-model-item class="item-model" prop="partName">
<a-tree-select v-model="formInline.partName"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
style="width: 100%"
:tree-data="partNameOptions"
:label-in-value="false"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.partName')" />
</a-form-model-item>
</div>
<!-- 授权部门 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.authorizationDepart')">
{{ $t('workCenter.enterpriseInitChangePlan.authorizationDepart') }}
</span>
</div>
<a-form-model-item class="item-model" prop="authorizationDepart">
<j-select-depart v-model="formInline.authorizationDepart"
:disabled="disabled"
:backDepart="true" />
</a-form-model-item>
</div>
<!-- 主起草人 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.principalDrafter')">
{{ $t('workCenter.enterpriseInitChangePlan.principalDrafter') }}
</span>
</div>
<a-form-model-item class="item-model" prop="principalDrafter">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.principalDrafter')"
v-model="formInline.principalDrafter"
filedName="principalDrafter"
@nameChange="userSelectNameChange"
:nameStr="formInline.principalDrafter_dictText"
:disabled="disabled"
type="radio" />
</a-form-model-item>
</div>
<!-- 主起草单位 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.mainDraftUnit')">
{{ $t('workCenter.enterpriseInitChangePlan.mainDraftUnit') }}
</span>
</div>
<a-form-model-item class="item-model" prop="mainDraftUnit">
<j-select-depart v-model="formInline.mainDraftUnit"
:disabled="disabled"
:backDepart="true" />
</a-form-model-item>
</div>
<!-- 起草单位负责人 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.headOfMainDraftingUnit')">
{{ $t('workCenter.enterpriseInitChangePlan.headOfMainDraftingUnit') }}
</span>
</div>
<a-form-model-item class="item-model" prop="headOfMainDraftingUnit">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.headOfMainDraftingUnit')"
v-model="formInline.headOfMainDraftingUnit"
filedName="headOfMainDraftingUnit"
@nameChange="userSelectNameChange"
:nameStr="formInline.headOfMainDraftingUnit_dictText"
:disabled="disabled"
type="radio" />
</a-form-model-item>
</div>
<!-- 标准推进人 -->
<div class="box-title-text form-flex-item-half">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardPusher')">
{{ $t('workCenter.enterpriseInitChangePlan.standardPusher') }}
</span>
</div>
<a-form-model-item class="item-model" prop="standardPusher">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardPusher')"
v-model="formInline.standardPusher"
filedName="standardPusher"
@nameChange="userSelectNameChange"
:nameStr="formInline.standardPusher_dictText"
:disabled="disabled"
type="radio" />
</a-form-model-item>
</div>
</div>
</a-form-model>
</a-spin>
</div>
<div class="custom-drawer-style-bottom-btn">
<a-button @click="handleCancel">{{ $t('cancel') }}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{ $t('submit') }}</a-button>
</div>
<!-- 文件上传弹框 -->
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :disabled="disabled"></upload-file>
</a-drawer>
</template>
<script>
import { StandardSource, ProjectType } from '@/enums/commonEnums'
import { getFormDictTreeList } from '@/api/api'
import UserSelection from '@/components/selection/UserSelection'
import StandardSelection from '@/components/selection/StandardSelection'
import UploadFile from '@/components/UploadFile'
import { getTreeList } from '@/api/enterpriseStandardLibraryApi'
import Vue from 'vue'
import { USER_INFO } from '@/store/mutation-types'
export default {
name: 'BaseInfoTableModal',
components: { UserSelection, StandardSelection, UploadFile },
props: {
/**
* 编辑角色,是主起草人的话三个日期标准化填了的,主起草人不能修改;是联络人的话标准化未填写,联络人必填
* drafter: 主起草人
* contact: 联络人
*/
editRole: {
type: String,
required: false,
default: ''
},
/**
* 来源:是tableBaseInfo的话必填项不一样
*/
source: {
type: String,
required: false,
default: ''
}
},
data () {
return {
StandardSource,
ProjectType,
partNameOptions: [], // 零部件名称下拉框数据
standardSystemOptions: [], // 企标体系下拉框数据
visible: false,
confirmLoading: false,
disabled: false,
draftPlanFinishDateDisabled: false, // 草稿计划完成日期是否不可修改
exposureDraftPlanFinishDateDisabled: false, // 征求意见稿计划完成日期是否不可修改
planSubmissionDateDisabled: false, // 计划报批日期是否不可修改
model: {},
formInline: {},
rules: {
// 申请类型
applicationType: [
{
required: false,
message: this.$t('workCenter.enterpriseInitChangePlan.applicationType') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 项目类别
itemCategory: [
{
required: false,
message: this.$t('workCenter.enterpriseInitChangePlan.itemCategory') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 企标编号
enterpriseStandardNum: [
{
required: false,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 企业标准代号
enterpriseStandardCode: [
{
required: false,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 标准类别代号
standardCategoryCode: [
{
required: false,
message: this.$t('workCenter.enterpriseInitChangePlan.standardCategoryCode') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 企标名称
enterpriseStandardName: [
{
required: false,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// 企业名称代号
enterpriseNameCode: [
{
required: false,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseNameCode') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 年代号
yearNumber: [
{
required: false,
message: this.$t('workCenter.enterpriseInitChangePlan.yearNumber') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 新企标名称
newEnterpriseStandardName: [
{
required: false,
message: this.$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// 标准类型
standardType: [
{
required: false,
message: this.$t('workCenter.enterpriseInitChangePlan.standardType') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 标准体系
standardSystem: [
{
required: false,
message: this.$t('workCenter.enterpriseInitChangePlan.standardSystem') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 标准等级分类
standardGradeClassification: [
{
required: false,
message: this.$t('workCenter.enterpriseInitChangePlan.standardGradeClassification') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 草稿计划完成日期
draftPlanFinishDate: [
{
required: false,
message: this.$t('workCenter.enterpriseInitChangePlan.draftPlanFinishDate') + this.$t('cannotEmpty'),
trigger: ['change', 'blur']
}
],
// 征求意见稿计划完成日期
exposureDraftPlanFinishDate: [
{
required: false,
message: this.$t('workCenter.enterpriseInitChangePlan.exposureDraftPlanFinishDate') + this.$t('cannotEmpty'),
trigger: ['change', 'blur']
}
],
// 计划报批日期
planSubmissionDate: [
{
required: false,
message: this.$t('workCenter.enterpriseInitChangePlan.planSubmissionDate') + this.$t('cannotEmpty'),
trigger: ['change', 'blur']
}
],
// 零部件名称
partName: [
{
required: false,
message: this.$t('workCenter.enterpriseInitChangePlan.partName') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 授权部门
authorizationDepart: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.authorizationDepart') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 主起草人
principalDrafter: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.principalDrafter') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 主起草单位
mainDraftUnit: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.mainDraftUnit') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 起草单位负责人
headOfMainDraftingUnit: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.headOfMainDraftingUnit') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 标准推进人
standardPusher: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.standardPusher') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
}
}
},
computed: {
yearNumberDefaultValue () {
return new Date().getFullYear() + ''
}
},
mounted () {
this.initPartNameOptions()
this.initStandardSystemOptions()
if (this.source === 'tableBaseInfo') {
for (const item of Object.values(this.rules)) {
item[0].required = true
}
this.rules = Object.assign({}, this.rules)
console.log(this.rules)
}
},
methods: {
add () {
const userInfo = Vue.ls.get(USER_INFO)
const formInline = {}
// 初始化主起草人信息
formInline.principalDrafter = userInfo.id
formInline.principalDrafter_dictText = userInfo.realname
// 初始化主起草单位信息
formInline.mainDraftUnit = userInfo.departIds
// 初始化起草单位负责人 todo: 看怎么获取当前登录人的上级
// 初始化年代号
formInline.yearNumber = new Date().getFullYear() + ''
this.edit(formInline)
},
edit (record) {
this.visible = true
this.model = Object.assign({}, record)
this.formInline = Object.assign({}, record)
// 三个日期,如果标准化填写了,主起草人不能修改,标准化未填写,联络人必填
if (this.editRole === 'drafter') {
// 是主起草人的编辑
// 草稿计划完成日期的处理
if (this.formInline.draftPlanFinishDate) {
// 草稿计划完成日期已经填写了, 主起草人不能修改
this.draftPlanFinishDateDisabled = true
}
// 征求意见稿计划完成日期
if (this.formInline.exposureDraftPlanFinishDate) {
// 征求意见稿计划完成日期已经填写了, 主起草人不能修改
this.exposureDraftPlanFinishDateDisabled = true
}
// 计划报批日期
if (this.formInline.planSubmissionDate) {
// 计划报批日期已经填写了, 主起草人不能修改
this.planSubmissionDateDisabled = true
}
} else if (this.editRole === 'contact') {
// 是联络人的编辑,只能编辑3个日期,如果标准化填过了不能修改,未填的话必填
this.disabled = true
// 草稿计划完成日期的处理
if (!this.formInline.draftPlanFinishDate) {
// 草稿计划完成日期没有填写, 联络人必填
this.rules.draftPlanFinishDate[0].required = true
} else {
// 填写了,不能修改
this.draftPlanFinishDateDisabled = true
}
// 征求意见稿计划完成日期
if (!this.formInline.exposureDraftPlanFinishDate) {
// 征求意见稿计划完成日期没有填写, 联络人必填
this.rules.exposureDraftPlanFinishDate[0].required = true
} else {
// 填写了,不能修改
this.exposureDraftPlanFinishDateDisabled = true
}
// 计划报批日期
if (!this.formInline.planSubmissionDate) {
// 计划报批日期没有填写, 联络人必填
this.rules.planSubmissionDate[0].required = true
} else {
// 填写了,不能修改
this.planSubmissionDateDisabled = true
}
}
},
look (record) {
this.visible = true
this.model = Object.assign({}, record)
this.formInline = Object.assign({}, record)
this.disabled = true
},
// 获取零部件名称下拉框数据
initPartNameOptions () {
getFormDictTreeList({ dictId: '1696821512600637441' }).then(res => {
if (res.success) {
this.partNameOptions = res.result
}
})
},
// 获取标准体系下拉框数据
initStandardSystemOptions () {
getTreeList({ option: 1 }).then(res => {
if (res.success) {
this.standardSystemOptions = res.result
}
})
},
// 标准选择组件返回标准名称的回调
nameChange (value) {
this.formInline.enterpriseStandardName = value
},
// 项目类别改变
itemCategoryChange (value) {
if (value === this.ProjectType.ENACT.value) {
// 是制定
this.formInline.decadeCode = new Date().getFullYear() + ''
}
},
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
},
// 点击文件上传
clickButtonToUpload (fieldName) {
this.$refs.uploadFile.open(this.formInline[fieldName])
this.uploadName = fieldName
},
// 文件上传改变后的回调
uploadFileChange (data) {
const attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id)
})
}
/** 赋值给当前对应的表单文件 */
this.formInline[this.uploadName] = attIdList.join(',')
this.formInline = { ...this.formInline }
},
// 取消
handleCancel () {
this.close()
},
close () {
this.model = {}
this.formInline = {}
this.visible = false
this.$refs.ruleForm.clearValidate()
},
// 提交
handleSubmit () {
if (this.confirmLoading) return
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.confirmLoading = true
const formInline = JSON.parse(JSON.stringify(this.formInline))
this.$emit('ok', formInline)
this.close()
this.confirmLoading = false
}
})
}
}
}
</script>
<style scoped lang="less">
/deep/ .ant-form-item-children {
width: 100%;
display: inline-block;
}
.form-flex-box {
display: flex;
flex-wrap: wrap;
}
.form-flex-item-half {
width: 50%;
}
.form-flex-item-line {
width: 100%;
}
.form-flex-item-long {
width: 100%;
}
</style>
@@ -0,0 +1,243 @@
<template>
<div>
<!-- 操作区域 -->
<div class="table-operator">
<!-- 批量驳回 todo批量驳回和流程底部按钮的驳回有什么区别 -->
<a-button icon="close" type="primary" ghost @click="batchReject">
{{ $t('batchReject') }}
</a-button>
<!-- 批量设置审批人 -->
<a-button icon="setting" type="primary" ghost @click="batchSetApprover">
{{ $t('workCenter.revisionPlanActivelyReport.batchSetApprover') }}
</a-button>
</div>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="enterpriseStandardPlanId"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
<!-- 企标编号/企标名称 -->
<template v-slot:toDetail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
</j-table>
</div>
<!-- 选人弹框 -->
<user-select-modal ref="userSelectModal" type="radio" @change="userSelectModalChange"></user-select-modal>
</div>
</template>
<script>
import JTable from '@/components/jero/JTable'
// 选人弹框
import UserSelectModal from '@/components/selection/UserSelectModal'
import { standardizationInitBatchSetApprover } from '@/api/workCenter'
export default {
name: 'ContactSelectApproverBaseInfo',
components: { JTable, UserSelectModal },
props: {
disabled: {
type: Boolean,
required: false,
default: false
}
},
data () {
return {
loading: false,
columns: [
{
title: this.$t('serialNumber'),
dataIndex: '',
key: 'rowIndex',
align: 'center',
width: 80,
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ // 制修订类型
title: this.$t('enterpriseStandardLibrary.plan.revisionType'),
align: 'center',
width: 180,
dataIndex: 'applicationCategory_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 原企标编号
title: this.$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardNum'),
align: 'center',
width: 180,
dataIndex: 'originEnStandardNo',
scopedSlots: { customRender: 'toDetailOld' }
},
{ // 新企标编号
title: this.$t('enterpriseStandardLibrary.plan.newEnterpriseStandardNum'),
align: 'center',
width: 180,
dataIndex: 'newEnStandardNo',
scopedSlots: { customRender: 'toDetailNew' }
},
{ // 原企标名称
title: this.$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardName'),
align: 'center',
width: 180,
dataIndex: 'originEnStandardName',
scopedSlots: { customRender: 'toDetailOld' }
},
{ // 新企标名称
title: this.$t('enterpriseStandardLibrary.plan.newEnterpriseStandardName'),
align: 'center',
width: 180,
dataIndex: 'newEnStandardName',
scopedSlots: { customRender: 'toDetailNew' }
},
{ // 授权部门
title: this.$t('enterpriseStandardLibrary.plan.authDepartment'),
align: 'center',
width: 180,
dataIndex: 'authDeparts',
scopedSlots: { customRender: 'text' }
},
{ // 企业标准代号
title: this.$t('enterpriseStandardLibrary.plan.enterpriseStandardCode'),
align: 'center',
width: 180,
dataIndex: 'enStandardCode',
scopedSlots: { customRender: 'text' }
},
{ // 配合单位
title: this.$t('enterpriseStandardLibrary.plan.suitUnit'),
align: 'center',
width: 180,
dataIndex: 'cooperateDeparts',
scopedSlots: { customRender: 'text' }
},
{ // 主起草人
title: this.$t('enterpriseStandardLibrary.plan.principalDrafter'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUser',
scopedSlots: { customRender: 'text' }
},
{ // 主起草单位
title: this.$t('enterpriseStandardLibrary.plan.mainDraftingUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUnit',
scopedSlots: { customRender: 'text' }
},
{ // 主起草单位负责人
title: this.$t('enterpriseStandardLibrary.plan.headOfMainDraftingUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUnitResponsiblePerson',
scopedSlots: { customRender: 'text' }
},
{ // 标准推进人
title: this.$t('enterpriseStandardLibrary.plan.standardPusher'),
align: 'center',
width: 180,
dataIndex: 'standardPromoter',
scopedSlots: { customRender: 'text' }
},
{ // 草稿计划完成日期
title: this.$t('enterpriseStandardLibrary.plan.draftPlanFinishDate'),
align: 'center',
width: 180,
dataIndex: 'draftPlannedCompleteDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 征求意见稿计划完成日期
title: this.$t('enterpriseStandardLibrary.plan.exposureDraftPlanFinishDate'),
align: 'center',
width: 200,
dataIndex: 'solicitationDraftPlanCompleteDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 计划报批日期
title: this.$t('enterpriseStandardLibrary.plan.planSubmissionDate'),
align: 'center',
width: 180,
dataIndex: 'planApprovalDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 变更状态
title: this.$t('enterpriseStandardLibrary.plan.changeState'),
align: 'center',
width: 180,
dataIndex: 'changeStatus_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 审批人
title: this.$t('workCenter.revisionPlanActivelyReport.approver'),
align: 'center',
width: 300,
dataIndex: 'approver',
customRender: (value, row, index) => {
return <user-select-by-contact v-model={this.dataSource[index].approver}
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
}
}
],
dataSource: [],
selectedRowKeys: [],
selectionRows: [],
url: {
list: ''
}
}
},
methods: {
// 表格选中
onSelectChange (selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys
this.selectionRows = selectionRows
},
// 批量驳回
batchReject () {
},
// 批量设置审批人
batchSetApprover () {
if (this.selectedRowKeys.length <= 0) {
// 请选择要分发的数据
this.$message.warning(this.$t('pleaseSelectDistributeData'))
return
}
this.$refs.userSelectModal.open()
},
// 批量设置联络人选择人后的回调
userSelectModalChange (value) {
const param = {}
param.contact = value
param.ids = this.selectedRowKeys.join(',')
standardizationInitBatchSetApprover(param).then(res => {
if (res.success) {
this.$message.success(res.message)
} else {
this.$message.warning(res.message)
}
})
}
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,420 @@
<template>
<div>
<!-- 操作区域 -->
<div class="table-operator">
<!-- 新增 -->
<a-button icon="plus" type="primary" @click="handleAdd">
{{ $t('newlyAdded') }}
</a-button>
<!-- 导入 -->
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button icon="upload" type="primary" ghost>{{ $t('import') }}</a-button>
</a-upload>
<!-- 模板下载 -->
<a-button icon="download" type="primary" ghost @click="downTemplate($t('workCenter.revisionPlanActivelyReport.templateExport'))">
{{ $t('templateDownload') }}
</a-button>
<!-- 批量删除 -->
<a-button icon="delete" type="primary" ghost @click="batchDel">
{{ $t('batchDelete') }}
</a-button>
<!-- 批量设置联络人 -->
<a-button icon="setting" type="primary" ghost @click="batchSetContact">
{{ $t('workCenter.revisionPlanActivelyReport.batchSetContact') }}
</a-button>
</div>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="enterpriseStandardPlanId"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
<!-- 企标编号/企标名称 -->
<template v-slot:toDetail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
<!-- 操作栏 -->
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
<a @click="handleEdit(record, index)" class="table-ope-btn">{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleDelete(record.id, index)" class="table-ope-btn">{{ $t('delete') }}</a>
</div>
</j-table>
</div>
<!-- 新增编辑的弹框 -->
<base-info-table-modal ref="baseInfoTableModal" @ok="modelFormOk"></base-info-table-modal>
<!-- 选人弹框 -->
<user-select-modal ref="userSelectModal" type="radio" @change="userSelectModalChange"></user-select-modal>
</div>
</template>
<script>
import Vue from 'vue'
import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
import store from '@/store'
import JTable from '@/components/jero/JTable'
import { downloadFile } from '@/api/manage'
import UserSelectByContact from '@/components/selection/UserSelectByContact'
import UserSelectModal from '@/components/selection/UserSelectModal'
import { standardizationInitBatchSetContact } from '@/api/workCenter'
import BaseInfoTableModal from './BaseInfoTableModal'
// 导入的加载提示
let importModalLoading
export default {
name: 'EngineerInitBaseInfo',
components: { BaseInfoTableModal, UserSelectByContact, JTable, UserSelectModal },
props: {
disabled: {
type: Boolean,
required: false,
default: false
}
},
computed: {
tokenHeader () {
const head = { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) }
const tenantid = Vue.ls.get(TENANT_ID)
if (tenantid) {
head['tenant-id'] = tenantid
}
return head
},
importExcelUrl: function () {
return `${window._CONFIG.domianURL}/${this.url.importExcelUrl}`
}
},
data () {
return {
loading: false,
columns: [
{
title: this.$t('serialNumber'),
dataIndex: '',
key: 'rowIndex',
align: 'center',
width: 80,
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ // 制修订类型
title: this.$t('enterpriseStandardLibrary.plan.revisionType'),
align: 'center',
width: 180,
dataIndex: 'applicationCategory_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 原企标编号
title: this.$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardNum'),
align: 'center',
width: 180,
dataIndex: 'originEnStandardNo',
scopedSlots: { customRender: 'toDetailOld' }
},
{ // 新企标编号
title: this.$t('enterpriseStandardLibrary.plan.newEnterpriseStandardNum'),
align: 'center',
width: 180,
dataIndex: 'newEnStandardNo',
scopedSlots: { customRender: 'toDetailNew' }
},
{ // 原企标名称
title: this.$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardName'),
align: 'center',
width: 180,
dataIndex: 'originEnStandardName',
scopedSlots: { customRender: 'toDetailOld' }
},
{ // 新企标名称
title: this.$t('enterpriseStandardLibrary.plan.newEnterpriseStandardName'),
align: 'center',
width: 180,
dataIndex: 'newEnStandardName',
scopedSlots: { customRender: 'toDetailNew' }
},
{ // 授权部门
title: this.$t('enterpriseStandardLibrary.plan.authDepartment'),
align: 'center',
width: 180,
dataIndex: 'authDeparts',
scopedSlots: { customRender: 'text' }
},
{ // 企业标准代号
title: this.$t('enterpriseStandardLibrary.plan.enterpriseStandardCode'),
align: 'center',
width: 180,
dataIndex: 'enStandardCode',
scopedSlots: { customRender: 'text' }
},
{ // 配合单位
title: this.$t('enterpriseStandardLibrary.plan.suitUnit'),
align: 'center',
width: 180,
dataIndex: 'cooperateDeparts',
scopedSlots: { customRender: 'text' }
},
{ // 主起草人
title: this.$t('enterpriseStandardLibrary.plan.principalDrafter'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUser',
scopedSlots: { customRender: 'text' }
},
{ // 主起草单位
title: this.$t('enterpriseStandardLibrary.plan.mainDraftingUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUnit',
scopedSlots: { customRender: 'text' }
},
{ // 主起草单位负责人
title: this.$t('enterpriseStandardLibrary.plan.headOfMainDraftingUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUnitResponsiblePerson',
scopedSlots: { customRender: 'text' }
},
{ // 标准推进人
title: this.$t('enterpriseStandardLibrary.plan.standardPusher'),
align: 'center',
width: 180,
dataIndex: 'standardPromoter',
scopedSlots: { customRender: 'text' }
},
{ // 草稿计划完成日期
title: this.$t('enterpriseStandardLibrary.plan.draftPlanFinishDate'),
align: 'center',
width: 180,
dataIndex: 'draftPlannedCompleteDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 征求意见稿计划完成日期
title: this.$t('enterpriseStandardLibrary.plan.exposureDraftPlanFinishDate'),
align: 'center',
width: 200,
dataIndex: 'solicitationDraftPlanCompleteDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 计划报批日期
title: this.$t('enterpriseStandardLibrary.plan.planSubmissionDate'),
align: 'center',
width: 180,
dataIndex: 'planApprovalDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 变更状态
title: this.$t('enterpriseStandardLibrary.plan.changeState'),
align: 'center',
width: 180,
dataIndex: 'changeStatus_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 联络人
title: this.$t('workCenter.revisionPlanActivelyReport.contactPerson'),
align: 'center',
width: 300,
dataIndex: 'contactPerson',
customRender: (value, row, index) => {
if (this.isRejectedTodo) {
// 是被驳回的待办
return this.dataSource[index].contactPerson_dictText
} else {
// 不是被驳回的待办,可以设置联络人
return <user-select-by-contact v-model={this.dataSource[index].contactPerson}
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
}
}
},
{
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 200
}
],
dataSource: [],
selectedRowKeys: [],
selectionRows: [],
url: {
list: '',
downTemplateUrl: ''
},
modalType: '', // 是在新增还是在编辑,编辑的时候放正在编辑的下标
isRejectedTodo: false // 是否是被驳回的待办,被驳回的待办不可设置联络人
}
},
mounted () {
/**
* 需要能判断是否是被驳回,产生的待办点击进入的,是的话需要显示带出被驳回的法规的联络人,
* 并且去掉批量设置联络人按钮,如需修改联络人,删除该标准重新走标准化发起流程
*/
// this.isRejectedTodo = false
},
methods: {
// 企标编号,企标名称跳转详情
handleGoDetail (record) {
this.$openPageNewSheet({
path: '/enterpriseStandardLibrary/enterpriseStandardDetail',
query: {
standardNumber: record.standardNo
}
})
},
// 表格选中
onSelectChange (selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys
this.selectionRows = selectionRows
},
// 下载导入模板
downTemplate (fileName) {
if (!fileName || typeof fileName !== 'string') {
fileName = '模板文件'
}
downloadFile(this.url.downTemplateUrl, fileName + '.xls')
},
// 新增或编辑完成
modelFormOk (value) {
console.log(value, this.modalType)
if (this.modalType === 'add') {
this.dataSource.push(value)
} else if (this.modalType && this.modalType.split(',')[0] === 'edit') {
this.dataSource.splice(Number(this.modalType.split(',')[1]), 1, value)
}
},
// 新增
handleAdd () {
this.modalType = 'add'
this.$refs.baseInfoTableModal.add()
},
// 导入
handleImportExcel (info) {
// 加一个大的提示
if (!this.loading) {
importModalLoading = this.$info({
title: '提示',
content: <span>正在导入请稍候 <a-spin size="small" /></span>,
keyboard: false
})
}
this.loading = true
// 把知道了这个按钮去掉
this.$nextTick(() => {
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
})
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList)
}
if (info.file.status === 'done') {
// 销毁这个提示
importModalLoading && importModalLoading.destroy()
this.loading = false
if (info.file.response.success) {
// this.$message.success(`${info.file.name} 文件上传成功`);
if (info.file.response.code === 201) {
const { message, result: { msg, fileUrl, fileName } } = info.file.response
const href = window._CONFIG.domianURL + fileUrl
this.$warning({
title: message,
content: (<div>
<span>{msg}</span><br />
<span>具体详情请 <a href={href} target="_blank" download={fileName}>点击下载</a> </span>
</div>
)
})
} else {
this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
}
this.loadData()
} else {
this.$message.error(`${info.file.name} ${info.file.response.message}.`)
}
} else if (info.file.status === 'error') {
// 销毁这个提示
importModalLoading && importModalLoading.destroy()
this.loading = false
if (info.file.response.status === 500) {
const data = info.file.response
const token = Vue.ls.get(ACCESS_TOKEN)
if (token && data.message.includes('Token失效')) {
this.error({
title: '登录已过期',
content: '很抱歉,登录已过期,请重新登录',
okText: '重新登录',
mask: false,
onOk: () => {
store.dispatch('Logout').then(() => {
Vue.ls.remove(ACCESS_TOKEN)
window.location.reload()
})
}
})
}
} else {
this.$message.error(`文件上传失败: ${info.file.msg} `)
}
}
},
// 编辑
handleEdit (record, index) {
this.modalType = 'edit' + index
this.$refs.baseInfoTableModal.edit(record)
},
// 查看
handleLook (record) {
this.$refs.baseInfoTableModal.look(record)
},
// 删除
handleDelete (id, index) {
this.dataSource.splice(index, 1)
},
// 批量删除
batchDel () {
this.dataSource = this.dataSource.filter(item => !this.selectedRowKeys.includes(item.enterpriseStandardPlanId))
},
// 批量设置联络人
batchSetContact () {
if (this.selectedRowKeys.length <= 0) {
// 请选择要分发的数据
this.$message.warning(this.$t('pleaseSelectDistributeData'))
return
}
this.$refs.userSelectModal.open()
},
// 批量设置联络人选择人后的回调
userSelectModalChange (value) {
const param = {}
param.contact = value
param.ids = this.selectedRowKeys.join(',')
standardizationInitBatchSetContact(param).then(res => {
if (res.success) {
this.$message.success(res.message)
} else {
this.$message.warning(res.message)
}
})
}
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,235 @@
<template>
<div>
<!-- 操作区域 -->
<div class="table-operator">
<!-- 批量设置主起草人 -->
<a-button icon="setting" type="primary" ghost @click="batchSetDrafter">
{{ $t('workCenter.revisionPlanActivelyReport.batchSetDrafter') }}
</a-button>
</div>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="enterpriseStandardPlanId"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
<!-- 企标编号/企标名称 -->
<template v-slot:toDetail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
</j-table>
</div>
<!-- 选人弹框 -->
<user-select-modal ref="userSelectModal" type="radio" @change="userSelectModalChange"></user-select-modal>
</div>
</template>
<script>
import JTable from '@/components/jero/JTable'
// 选人弹框
import UserSelectModal from '@/components/selection/UserSelectModal'
import { standardizationInitBatchSetDrafter } from '@/api/workCenter'
export default {
name: 'LeaderApproveSentBaseInfo',
components: { JTable, UserSelectModal },
props: {
disabled: {
type: Boolean,
required: false,
default: false
}
},
data () {
return {
loading: false,
columns: [
{
title: this.$t('serialNumber'),
dataIndex: '',
key: 'rowIndex',
align: 'center',
width: 80,
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ // 制修订类型
title: this.$t('enterpriseStandardLibrary.plan.revisionType'),
align: 'center',
width: 180,
dataIndex: 'applicationCategory_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 原企标编号
title: this.$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardNum'),
align: 'center',
width: 180,
dataIndex: 'originEnStandardNo',
scopedSlots: { customRender: 'toDetailOld' }
},
{ // 新企标编号
title: this.$t('enterpriseStandardLibrary.plan.newEnterpriseStandardNum'),
align: 'center',
width: 180,
dataIndex: 'newEnStandardNo',
scopedSlots: { customRender: 'toDetailNew' }
},
{ // 原企标名称
title: this.$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardName'),
align: 'center',
width: 180,
dataIndex: 'originEnStandardName',
scopedSlots: { customRender: 'toDetailOld' }
},
{ // 新企标名称
title: this.$t('enterpriseStandardLibrary.plan.newEnterpriseStandardName'),
align: 'center',
width: 180,
dataIndex: 'newEnStandardName',
scopedSlots: { customRender: 'toDetailNew' }
},
{ // 授权部门
title: this.$t('enterpriseStandardLibrary.plan.authDepartment'),
align: 'center',
width: 180,
dataIndex: 'authDeparts',
scopedSlots: { customRender: 'text' }
},
{ // 企业标准代号
title: this.$t('enterpriseStandardLibrary.plan.enterpriseStandardCode'),
align: 'center',
width: 180,
dataIndex: 'enStandardCode',
scopedSlots: { customRender: 'text' }
},
{ // 配合单位
title: this.$t('enterpriseStandardLibrary.plan.suitUnit'),
align: 'center',
width: 180,
dataIndex: 'cooperateDeparts',
scopedSlots: { customRender: 'text' }
},
{ // 主起草人
title: this.$t('enterpriseStandardLibrary.plan.principalDrafter'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUser',
scopedSlots: { customRender: 'text' }
},
{ // 主起草单位
title: this.$t('enterpriseStandardLibrary.plan.mainDraftingUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUnit',
scopedSlots: { customRender: 'text' }
},
{ // 主起草单位负责人
title: this.$t('enterpriseStandardLibrary.plan.headOfMainDraftingUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUnitResponsiblePerson',
scopedSlots: { customRender: 'text' }
},
{ // 标准推进人
title: this.$t('enterpriseStandardLibrary.plan.standardPusher'),
align: 'center',
width: 180,
dataIndex: 'standardPromoter',
scopedSlots: { customRender: 'text' }
},
{ // 草稿计划完成日期
title: this.$t('enterpriseStandardLibrary.plan.draftPlanFinishDate'),
align: 'center',
width: 180,
dataIndex: 'draftPlannedCompleteDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 征求意见稿计划完成日期
title: this.$t('enterpriseStandardLibrary.plan.exposureDraftPlanFinishDate'),
align: 'center',
width: 200,
dataIndex: 'solicitationDraftPlanCompleteDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 计划报批日期
title: this.$t('enterpriseStandardLibrary.plan.planSubmissionDate'),
align: 'center',
width: 180,
dataIndex: 'planApprovalDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 变更状态
title: this.$t('enterpriseStandardLibrary.plan.changeState'),
align: 'center',
width: 180,
dataIndex: 'changeStatus_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 主起草人
title: this.$t('workCenter.revisionPlanActivelyReport.drafter'),
align: 'center',
width: 300,
dataIndex: 'drafter',
customRender: (value, row, index) => {
return <user-select-by-contact v-model={this.dataSource[index].drafter}
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
}
}
],
dataSource: [],
selectedRowKeys: [],
selectionRows: [],
url: {
list: ''
}
}
},
methods: {
// 表格选中
onSelectChange (selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys
this.selectionRows = selectionRows
},
// 批量设置主起草人
batchSetDrafter () {
if (this.selectedRowKeys.length <= 0) {
// 请选择要分发的数据
this.$message.warning(this.$t('pleaseSelectDistributeData'))
return
}
this.$refs.userSelectModal.open()
},
// 批量设置联络人选择人后的回调
userSelectModalChange (value) {
const param = {}
param.contact = value
param.ids = this.selectedRowKeys.join(',')
standardizationInitBatchSetDrafter(param).then(res => {
if (res.success) {
this.$message.success(res.message)
} else {
this.$message.warning(res.message)
}
})
}
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,250 @@
<template>
<div>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="enterpriseStandardPlanId"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading">
<!-- 企标编号/企标名称 -->
<template v-slot:toDetail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
<!-- 操作栏 -->
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
<a @click="handleEdit(record, index)" class="table-ope-btn">{{ $t('edit') }}</a>
<a-divider v-if="currentNode === 7" type="vertical" />
<a v-if="currentNode === 7" @click="handleDelete(record.id, index)" class="table-ope-btn">{{ $t('delete') }}</a>
</div>
</j-table>
</div>
<!-- 新增编辑的弹框 -->
<base-info-table-modal ref="baseInfoTableModal" source="tableBaseInfo" :edit-role="editRole" @ok="modelFormOk"></base-info-table-modal>
</div>
</template>
<script>
import JTable from '@/components/jero/JTable'
import BaseInfoTableModal from './BaseInfoTableModal'
export default {
name: 'TableBaseInfo',
components: { JTable, BaseInfoTableModal },
props: {
disabled: {
type: Boolean,
required: false,
default: false
},
// 当前节点
currentNode: {
type: Number,
required: false,
default: 1
}
},
computed: {
// 当前节点编辑的角色,用做弹框中的编辑特殊判断
editRole () {
if (this.currentNode === 4) {
return 'drafter'
} else if (this.currentNode === 5) {
return 'contact'
} else {
return ''
}
}
},
data () {
return {
loading: false,
columns: [
{
title: this.$t('serialNumber'),
dataIndex: '',
key: 'rowIndex',
align: 'center',
width: 80,
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ // 制修订类型
title: this.$t('enterpriseStandardLibrary.plan.revisionType'),
align: 'center',
width: 180,
dataIndex: 'applicationCategory_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 原企标编号
title: this.$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardNum'),
align: 'center',
width: 180,
dataIndex: 'originEnStandardNo',
scopedSlots: { customRender: 'toDetailOld' }
},
{ // 新企标编号
title: this.$t('enterpriseStandardLibrary.plan.newEnterpriseStandardNum'),
align: 'center',
width: 180,
dataIndex: 'newEnStandardNo',
scopedSlots: { customRender: 'toDetailNew' }
},
{ // 原企标名称
title: this.$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardName'),
align: 'center',
width: 180,
dataIndex: 'originEnStandardName',
scopedSlots: { customRender: 'toDetailOld' }
},
{ // 新企标名称
title: this.$t('enterpriseStandardLibrary.plan.newEnterpriseStandardName'),
align: 'center',
width: 180,
dataIndex: 'newEnStandardName',
scopedSlots: { customRender: 'toDetailNew' }
},
{ // 授权部门
title: this.$t('enterpriseStandardLibrary.plan.authDepartment'),
align: 'center',
width: 180,
dataIndex: 'authDeparts',
scopedSlots: { customRender: 'text' }
},
{ // 企业标准代号
title: this.$t('enterpriseStandardLibrary.plan.enterpriseStandardCode'),
align: 'center',
width: 180,
dataIndex: 'enStandardCode',
scopedSlots: { customRender: 'text' }
},
{ // 配合单位
title: this.$t('enterpriseStandardLibrary.plan.suitUnit'),
align: 'center',
width: 180,
dataIndex: 'cooperateDeparts',
scopedSlots: { customRender: 'text' }
},
{ // 主起草人
title: this.$t('enterpriseStandardLibrary.plan.principalDrafter'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUser',
scopedSlots: { customRender: 'text' }
},
{ // 主起草单位
title: this.$t('enterpriseStandardLibrary.plan.mainDraftingUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUnit',
scopedSlots: { customRender: 'text' }
},
{ // 主起草单位负责人
title: this.$t('enterpriseStandardLibrary.plan.headOfMainDraftingUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUnitResponsiblePerson',
scopedSlots: { customRender: 'text' }
},
{ // 标准推进人
title: this.$t('enterpriseStandardLibrary.plan.standardPusher'),
align: 'center',
width: 180,
dataIndex: 'standardPromoter',
scopedSlots: { customRender: 'text' }
},
{ // 草稿计划完成日期
title: this.$t('enterpriseStandardLibrary.plan.draftPlanFinishDate'),
align: 'center',
width: 180,
dataIndex: 'draftPlannedCompleteDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 征求意见稿计划完成日期
title: this.$t('enterpriseStandardLibrary.plan.exposureDraftPlanFinishDate'),
align: 'center',
width: 200,
dataIndex: 'solicitationDraftPlanCompleteDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 计划报批日期
title: this.$t('enterpriseStandardLibrary.plan.planSubmissionDate'),
align: 'center',
width: 180,
dataIndex: 'planApprovalDate',
scopedSlots: { customRender: 'specialDate' }
},
{ // 变更状态
title: this.$t('enterpriseStandardLibrary.plan.changeState'),
align: 'center',
width: 180,
dataIndex: 'changeStatus_dictText',
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 200
}
],
dataSource: [
{
id: 1,
draftPlanFinishDate: '2022-01-09',
exposureDraftPlanFinishDate: '2022-01-09',
// planSubmissionDate: '2022-01-09'
}
],
editIndex: undefined // 编辑的下标
}
},
mounted () {
if (this.currentNode === 6) {
// 是主起草单位主管级领导批准节点,没有操作列
this.columns.pop()
}
},
methods: {
// 企标编号,企标名称跳转详情
handleGoDetail (record) {
this.$openPageNewSheet({
path: '/enterpriseStandardLibrary/enterpriseStandardDetail',
query: {
standardNumber: record.standardNo
}
})
},
// 新增或编辑完成
modelFormOk (value) {
this.dataSource.splice(this.editIndex, 1, value)
},
// 编辑
handleEdit (record, index) {
this.editIndex = index
this.$refs.baseInfoTableModal.edit(record)
},
// 删除
handleDelete (id, index) {
this.dataSource.splice(index, 1)
}
}
}
</script>
<style scoped>
</style>
@@ -628,7 +628,9 @@ export default {
this.$nextTick(() => {
this.$nextTick(() => {
const param = this.model[0]
param.enStandardSystem = param.enStandardSystem.split(',').map(item => { return { value: item } })
if (param.enStandardSystem) {
param.enStandardSystem = param.enStandardSystem.split(',').map(item => { return { value: item } })
}
this.$refs.changeBaseInfo.formInline = param
})
})
@@ -868,7 +868,6 @@ export default {
// 返回流程名称
returnProcessName () {
const processName = (this.formInline.newEnStandardNo || '') + '-' + (this.formInline.newEnStandardName || '') + '-' + '立项'
console.log(processName)
this.$emit('processNameChange', processName)
},
// 根据三个代号和一个年代号获取企标编号
@@ -885,7 +884,6 @@ export default {
param.standardCategoryCode = this.formInline.standardCategoryCode
param.decadeCode = this.formInline.decadeCode
getEnStandardNo(param).then(res => {
console.log(res)
if (res.success) {
this.$set(this.formInline, 'newEnStandardNo', res.message)
this.$forceUpdate()
@@ -18,6 +18,7 @@
:standard-number="formInline.originEnStandardNo"
@standardNumberChange="standardNumberChange"
:searchParam="{ projectType: projectType }"
:disabled="disabled"
@listChange="listChange"/>
</a-form-model-item>
</div>
@@ -142,6 +143,7 @@
<a-form-model-item class="item-model" prop="changeReason">
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.changeReason')"
:maxLength="500"
:disabled="disabled"
v-model="formInline.changeReason" :rows="4" />
</a-form-model-item>
</div>
@@ -1,7 +1,7 @@
<template>
<div class="change-base-info-wrapper">
<!-- 操作区域 -->
<div class="table-operator">
<div v-if="!disabled" class="table-operator">
<!-- 新增 -->
<a-button icon="plus" type="primary" @click="handleAdd" :disabled="disabled">
{{ $t('newlyAdded') }}
@@ -166,6 +166,11 @@ export default {
modalType: '' // 是在新增还是在编辑,编辑的时候放正在编辑的下标
}
},
mounted () {
if (this.disabled) {
this.columns.pop()
}
},
methods: {
// 企标编号,企标名称跳转详情
handleGoDetail (record) {
@@ -1,7 +1,7 @@
<template>
<div class="change-base-info-wrapper">
<!-- 操作区域 -->
<div class="table-operator">
<div v-if="!disabled" class="table-operator">
<!-- 新增 -->
<a-button icon="plus" type="primary" @click="handleAdd" :disabled="disabled">
{{ $t('newlyAdded') }}
@@ -130,6 +130,11 @@ export default {
modalType: '' // 是在新增还是在编辑,编辑的时候放正在编辑的下标
}
},
mounted () {
if (this.disabled) {
this.columns.pop()
}
},
methods: {
// 企标编号,企标名称跳转详情
handleGoDetail (record) {
@@ -739,6 +739,11 @@ export default {
userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
},
// 点击文件上传
clickButtonToUpload (fieldName) {
this.$refs.uploadFile.open(this.formInline[fieldName])
this.uploadName = fieldName
},
// 文件上传改变后的回调
uploadFileChange (data) {
const attIdList = []