[update] 调年度制修订计划两个流程
This commit is contained in:
+33
-9
@@ -29,13 +29,29 @@ const getEnStandardNo = (params) => postAction('/process/es/initChange/getStanda
|
|||||||
// 根据流程id获取流程信息
|
// 根据流程id获取流程信息
|
||||||
const getProcessDataById = (params) => getAction('/process/center/handle', params)
|
const getProcessDataById = (params) => getAction('/process/center/handle', params)
|
||||||
|
|
||||||
|
// 年度制修订计划(各部门主动上报)
|
||||||
|
// 发起
|
||||||
|
const activelyReportApproval = (params) => postAction('/process/es/annualReport/start', params)
|
||||||
|
// 保存
|
||||||
|
const activelyReportSave = (params) => postAction('', params)
|
||||||
|
// 转办
|
||||||
|
const activelyReportTurnTo = (params) => postAction('', params)
|
||||||
|
// 同意
|
||||||
|
const activelyReportAgree = (params) => postAction('', params)
|
||||||
|
// 拒绝
|
||||||
|
const activelyReportReject = (params) => postAction('', params)
|
||||||
|
|
||||||
// 年度制修订计划(标准化发起)
|
// 年度制修订计划(标准化发起)
|
||||||
// 批量设置联络人
|
// 发起
|
||||||
const standardizationInitBatchSetContact = (params) => getAction('', params)
|
const standardizationInitApproval = (params) => postAction('', params)
|
||||||
// 批量设置审批人
|
// 保存
|
||||||
const standardizationInitBatchSetApprover = (params) => getAction('', params)
|
const standardizationInitSave = (params) => postAction('', params)
|
||||||
// 批量设置主起草人
|
// 转办
|
||||||
const standardizationInitBatchSetDrafter = (params) => getAction('', params)
|
const standardizationInitTurnTo = (params) => postAction('', params)
|
||||||
|
// 同意
|
||||||
|
const standardizationInitAgree = (params) => postAction('', params)
|
||||||
|
// 拒绝
|
||||||
|
const standardizationInitReject = (params) => postAction('', params)
|
||||||
|
|
||||||
// 流程中心
|
// 流程中心
|
||||||
// 待办-转办
|
// 待办-转办
|
||||||
@@ -58,9 +74,17 @@ export {
|
|||||||
getEnStandardNo,
|
getEnStandardNo,
|
||||||
getProcessDataById,
|
getProcessDataById,
|
||||||
|
|
||||||
standardizationInitBatchSetContact,
|
activelyReportApproval,
|
||||||
standardizationInitBatchSetApprover,
|
activelyReportSave,
|
||||||
standardizationInitBatchSetDrafter,
|
activelyReportTurnTo,
|
||||||
|
activelyReportAgree,
|
||||||
|
activelyReportReject,
|
||||||
|
|
||||||
|
standardizationInitApproval,
|
||||||
|
standardizationInitSave,
|
||||||
|
standardizationInitTurnTo,
|
||||||
|
standardizationInitAgree,
|
||||||
|
standardizationInitReject,
|
||||||
|
|
||||||
toDoTurnTo,
|
toDoTurnTo,
|
||||||
compulsoryWithdrawal
|
compulsoryWithdrawal
|
||||||
|
|||||||
@@ -99,7 +99,10 @@ module.exports = {
|
|||||||
batchSetApprover: '批量设置审批人',
|
batchSetApprover: '批量设置审批人',
|
||||||
approver: '审批人',
|
approver: '审批人',
|
||||||
batchSetDrafter: '批量设置主起草人',
|
batchSetDrafter: '批量设置主起草人',
|
||||||
drafter: '主起草人'
|
drafter: '主起草人',
|
||||||
|
pleaseSelectContact: '请选择联络人',
|
||||||
|
pleaseSelectApprover: '请选择审批人',
|
||||||
|
pleaseSelectDrafter: '请选择主起草人'
|
||||||
},
|
},
|
||||||
// 企标制修订流程
|
// 企标制修订流程
|
||||||
enStandardRevision: {
|
enStandardRevision: {
|
||||||
|
|||||||
@@ -99,7 +99,10 @@ module.exports = {
|
|||||||
batchSetApprover: '批量设置审批人',
|
batchSetApprover: '批量设置审批人',
|
||||||
approver: '审批人',
|
approver: '审批人',
|
||||||
batchSetDrafter: '批量设置主起草人',
|
batchSetDrafter: '批量设置主起草人',
|
||||||
drafter: '主起草人'
|
drafter: '主起草人',
|
||||||
|
pleaseSelectContact: '请选择联络人',
|
||||||
|
pleaseSelectApprover: '请选择审批人',
|
||||||
|
pleaseSelectDrafter: '请选择主起草人'
|
||||||
},
|
},
|
||||||
// 企标制修订流程
|
// 企标制修订流程
|
||||||
enStandardRevision: {
|
enStandardRevision: {
|
||||||
|
|||||||
@@ -307,8 +307,8 @@ export default {
|
|||||||
this.$message.warning(this.$t('docTool.split.pleaseSelectUser'))
|
this.$message.warning(this.$t('docTool.split.pleaseSelectUser'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$emit('change', this.selectedRowKeys.join(','))
|
|
||||||
this.$emit('nameChange', this.dataSourceRight.map(item => item.realname + '(' + item.username + ')').join(','))
|
this.$emit('nameChange', this.dataSourceRight.map(item => item.realname + '(' + item.username + ')').join(','))
|
||||||
|
this.$emit('change', this.selectedRowKeys.join(','))
|
||||||
this.close()
|
this.close()
|
||||||
},
|
},
|
||||||
handleCancel () {
|
handleCancel () {
|
||||||
|
|||||||
+120
-49
@@ -14,7 +14,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<!-- 基础信息 -->
|
<!-- 基础信息 -->
|
||||||
<div v-if="switchValue === 'base'" class="detail-page-scroll-content">
|
<div v-show="switchValue === 'base'" class="detail-page-scroll-content">
|
||||||
<!-- 流程信息 -->
|
<!-- 流程信息 -->
|
||||||
<div class="process-part-title">{{ $t('processInformation') }}</div>
|
<div class="process-part-title">{{ $t('processInformation') }}</div>
|
||||||
<a-form :form="processInfoForm">
|
<a-form :form="processInfoForm">
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
|
||||||
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
|
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
|
||||||
@change="event => event.target.value = event.target.value.trim()"
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
:disabled="disabled"
|
:disabled="disabled || processInfoDisabled"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
v-decorator="['processName', validatorRules.processName]" />
|
v-decorator="['processName', validatorRules.processName]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')">
|
||||||
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
|
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:disabled="disabled"
|
:disabled="disabled || processInfoDisabled"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
v-decorator="['expirationDate']" />
|
v-decorator="['expirationDate']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
|
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
|
||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
:disabled="disabled"
|
:disabled="disabled || processInfoDisabled"
|
||||||
v-decorator="['processExplain']" />
|
v-decorator="['processExplain']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -65,19 +65,19 @@
|
|||||||
<!-- 业务基本信息 -->
|
<!-- 业务基本信息 -->
|
||||||
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
||||||
<!-- 节点1、标准工程师发起的基本信息表单 -->
|
<!-- 节点1、标准工程师发起的基本信息表单 -->
|
||||||
<engineer-init-form v-if="currentNode === 1" ref="basicInfoFormRef"></engineer-init-form>
|
<engineer-init-form v-if="currentNode === 1" ref="baseInfoFormRef"></engineer-init-form>
|
||||||
<!-- 节点2、各部所联络人填写/下发任务 -->
|
<!-- 节点2、各部所联络人填写/下发任务 -->
|
||||||
<contact-enter-send-task-form v-if="currentNode === 2" ref="basicInfoFormRef"></contact-enter-send-task-form>
|
<contact-enter-send-task-form v-else-if="currentNode === 2" ref="baseInfoFormRef"></contact-enter-send-task-form>
|
||||||
<!-- 节点3、工作组、所联络人填写企标-->
|
<!-- 节点3、工作组、所联络人填写企标-->
|
||||||
<contact-enter-standard-form v-if="currentNode === 3" ref="basicInfoFormRef"></contact-enter-standard-form>
|
<contact-enter-standard-form v-else-if="currentNode === 3" ref="baseInfoFormRef"></contact-enter-standard-form>
|
||||||
<!-- 节点4、收集联络人主管级领导审批 只有表格,不能操作 -->
|
<!-- 节点4、收集联络人主管级领导审批 只有表格,不能操作 -->
|
||||||
<only-table-form v-if="currentNode === 4" disabled ref="basicInfoFormRef"></only-table-form>
|
<only-table-form v-else-if="currentNode === 4" disabled ref="baseInfoFormRef"></only-table-form>
|
||||||
<!-- 节点5、各部所联络人汇总 只有表格,可操作 -->
|
<!-- 节点5、各部所联络人汇总 只有表格,可操作 -->
|
||||||
<only-table-form v-if="currentNode === 5" ref="basicInfoFormRef"></only-table-form>
|
<only-table-form v-else-if="currentNode === 5" ref="baseInfoFormRef"></only-table-form>
|
||||||
<!-- 节点6、联络人主管级上一级领导审批 表格不可操作,可以查看详情 -->
|
<!-- 节点6、联络人主管级上一级领导审批 表格不可操作,可以查看详情 -->
|
||||||
<only-table-form v-if="currentNode === 6" onlyCanLook ref="basicInfoFormRef"></only-table-form>
|
<only-table-form v-else-if="currentNode === 6" onlyCanLook ref="baseInfoFormRef"></only-table-form>
|
||||||
<!-- 节点7、标准化工程师归档 表格不可新增,可以编辑和查看详情 -->
|
<!-- 节点7、标准化工程师归档 表格不可新增,可以编辑和查看详情 -->
|
||||||
<only-table-form v-if="currentNode === 7" disabled ref="basicInfoFormRef"></only-table-form>
|
<only-table-form v-else-if="currentNode === 7" disabled ref="baseInfoFormRef"></only-table-form>
|
||||||
|
|
||||||
<!-- 流程审批信息 -->
|
<!-- 流程审批信息 -->
|
||||||
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
||||||
@@ -97,9 +97,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 人员信息 -->
|
<!-- 人员信息 -->
|
||||||
<div v-if="switchValue === 'user'" class="detail-page-scroll-content p-0">
|
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0">
|
||||||
<process-detail-list :url="url">
|
<process-detail-list :url="url">
|
||||||
<personnel-info slot="personnelInfo" :data="personnelInfoData" :currentNode="currentNode"></personnel-info>
|
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNode + ''"></personnel-info>
|
||||||
</process-detail-list>
|
</process-detail-list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -151,6 +151,13 @@ import ProcessDetailList from '../../../components/ProcessDetailList'
|
|||||||
import ContactEnterStandardForm from './modules/ContactEnterStandardForm'
|
import ContactEnterStandardForm from './modules/ContactEnterStandardForm'
|
||||||
import OnlyTableForm from './modules/OnlyTableForm'
|
import OnlyTableForm from './modules/OnlyTableForm'
|
||||||
import UserSelectModal from '@/components/selection/UserSelectModal'
|
import UserSelectModal from '@/components/selection/UserSelectModal'
|
||||||
|
import {
|
||||||
|
activelyReportApproval,
|
||||||
|
activelyReportSave,
|
||||||
|
activelyReportTurnTo,
|
||||||
|
activelyReportAgree,
|
||||||
|
activelyReportReject
|
||||||
|
} from '@/api/workCenter'
|
||||||
|
|
||||||
const personData = [
|
const personData = [
|
||||||
{
|
{
|
||||||
@@ -217,6 +224,10 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
pageTitle () {
|
pageTitle () {
|
||||||
return this.$t('flowCenter') + this.$route.meta.title
|
return this.$t('flowCenter') + this.$route.meta.title
|
||||||
|
},
|
||||||
|
// 流程信息不能编辑
|
||||||
|
processInfoDisabled () {
|
||||||
|
return this.currentNode !== 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
@@ -278,7 +289,7 @@ export default {
|
|||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
currentNode: 3,
|
currentNode: 1,
|
||||||
approvalInfoForm: this.$form.createForm(this), // 审批信息表单
|
approvalInfoForm: this.$form.createForm(this), // 审批信息表单
|
||||||
personnelInfoData: [], // 人员信息数据
|
personnelInfoData: [], // 人员信息数据
|
||||||
url: {
|
url: {
|
||||||
@@ -295,15 +306,6 @@ export default {
|
|||||||
// 有任意一项填了即可
|
// 有任意一项填了即可
|
||||||
// 流程信息表单
|
// 流程信息表单
|
||||||
const processInfoForm = this.processInfoForm.getFieldsValue()
|
const processInfoForm = this.processInfoForm.getFieldsValue()
|
||||||
// 业务基本信息
|
|
||||||
let ruleForm = {}
|
|
||||||
if ([1, 2, 3].includes(this.currentNode)) {
|
|
||||||
// 业务基本信息中有表单
|
|
||||||
ruleForm = this.$refs.basicInfoFormRef.formInline
|
|
||||||
}
|
|
||||||
if ([2, 3, 5].includes(this.currentNode)) {
|
|
||||||
// 业务基础信息中有可编辑表格 todo: 看后端要什么格式
|
|
||||||
}
|
|
||||||
// 流程审批信息
|
// 流程审批信息
|
||||||
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
|
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
|
||||||
// 人员信息的数据, 处理成对象
|
// 人员信息的数据, 处理成对象
|
||||||
@@ -315,12 +317,20 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 需要传给后端的
|
// 需要传给后端的
|
||||||
|
let param = {}
|
||||||
// 业务基本信息
|
// 业务基本信息
|
||||||
if (this.$refs.basicInfoFormRef) {
|
if (this.$refs.baseInfoFormRef) {
|
||||||
|
// 业务基本信息
|
||||||
|
let ruleForm = this.$refs.baseInfoFormRef.getData()
|
||||||
|
if ([1, 2, 3].includes(this.currentNode)) {
|
||||||
|
// 业务基本信息中有表单
|
||||||
|
}
|
||||||
|
if ([2, 3, 5].includes(this.currentNode)) {
|
||||||
|
// 业务基础信息中有可编辑表格 todo: 看后端要什么格式
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// 需要外层信息至少填了一项
|
// 需要外层信息至少填了一项
|
||||||
const param = { ...processInfoForm, ...ruleForm, ...approvalInfoForm, ...personnelObj }
|
param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
|
||||||
const flag = Object.values(param).some(v => !!v || v === 0)
|
const flag = Object.values(param).some(v => !!v || v === 0)
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
// 提示至少填写一项
|
// 提示至少填写一项
|
||||||
@@ -328,14 +338,17 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.loading = true
|
||||||
// 保存到草稿
|
// 保存到草稿
|
||||||
// enterprisePlanApprovalSave(arr).then(res => {
|
activelyReportSave(param).then(res => {
|
||||||
// if (res.success) {
|
if (res.success) {
|
||||||
// this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
// } else {
|
} else {
|
||||||
// this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
// }
|
}
|
||||||
// })
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 节点一时候的提交,发起变更
|
// 节点一时候的提交,发起变更
|
||||||
handleStart () {
|
handleStart () {
|
||||||
@@ -353,9 +366,26 @@ export default {
|
|||||||
this.$message.warning(this.$t('pleaseEnterPersonnelInfo'))
|
this.$message.warning(this.$t('pleaseEnterPersonnelInfo'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 流程信息校验
|
||||||
this.processInfoForm.validateFields((err, values) => {
|
this.processInfoForm.validateFields((err, values) => {
|
||||||
|
// 流程审批信息校验
|
||||||
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
||||||
|
// 需要校验业务基本信息中的表单
|
||||||
|
this.$refs.baseInfoFormRef.getDataValidate(data => {
|
||||||
|
if (!err && !approvalErr && data) {
|
||||||
|
this.loading = true
|
||||||
|
const param = {} // 需要给后端的参数
|
||||||
|
activelyReportApproval(param).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -373,29 +403,70 @@ export default {
|
|||||||
const param = Object.assign({}, values)
|
const param = Object.assign({}, values)
|
||||||
param.userId = userIds
|
param.userId = userIds
|
||||||
param.taskId = this.$route.query.taskId
|
param.taskId = this.$route.query.taskId
|
||||||
// enterprisePlanApprovalTurnTo(param).then(res => {
|
activelyReportTurnTo(param).then(res => {
|
||||||
// if (res.success) {
|
if (res.success) {
|
||||||
// this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
// } else {
|
} else {
|
||||||
// this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
// }
|
}
|
||||||
// }).finally(() => {
|
}).finally(() => {
|
||||||
// this.loading = false
|
this.loading = false
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 提交
|
// 提交(节点2,3,5有提交)
|
||||||
handleSubmit () {
|
handleSubmit () {
|
||||||
|
if (this.loading) return
|
||||||
|
// 流程审批信息校验
|
||||||
|
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
||||||
|
this.$refs.baseInfoFormRef.getDataValidate(data => {
|
||||||
|
if (approvalErr && data) {
|
||||||
|
// 节点2,3有表单和表格,节点4只有表格
|
||||||
|
// param =
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 同意
|
// 同意(节点4,6有同意)
|
||||||
handleAgree () {
|
handleAgree () {
|
||||||
|
if (this.loading) return
|
||||||
|
this.approvalInfoForm.validateFields((err, values) => {
|
||||||
|
if (!err) {
|
||||||
|
this.loading = true
|
||||||
|
const param = Object.assign({}, values)
|
||||||
|
param.taskId = this.$route.query.taskId
|
||||||
|
activelyReportAgree(param).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 驳回
|
// 驳回(节点4,6有驳回)
|
||||||
handleReject () {
|
handleReject () {
|
||||||
|
if (this.loading) return
|
||||||
|
this.approvalInfoForm.validateFields((err, values) => {
|
||||||
|
if (!err) {
|
||||||
|
this.loading = true
|
||||||
|
const param = Object.assign({}, values)
|
||||||
|
param.taskId = this.$route.query.taskId
|
||||||
|
activelyReportReject(param).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+41
-1
@@ -120,13 +120,53 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
modalType: '' // 是在新增还是在编辑,编辑的时候放正在编辑的下标
|
modalType: '', // 是在新增还是在编辑,编辑的时候放正在编辑的下标
|
||||||
|
data: undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 选择用户得到用户名
|
// 选择用户得到用户名
|
||||||
userSelectNameChange (value, fieldName) {
|
userSelectNameChange (value, fieldName) {
|
||||||
this.formInline[fieldName + '_dictText'] = value
|
this.formInline[fieldName + '_dictText'] = value
|
||||||
|
},
|
||||||
|
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||||
|
initData (data) {
|
||||||
|
this.data = data
|
||||||
|
// 给表单赋值
|
||||||
|
// this.formInline =
|
||||||
|
// 给表格赋值
|
||||||
|
// this.$nextTick(() => {
|
||||||
|
// this.$refs.tableRef.dataSource =
|
||||||
|
// })
|
||||||
|
},
|
||||||
|
// 外层要获取数据
|
||||||
|
getData () {
|
||||||
|
// 把数据抛出
|
||||||
|
const data = {}
|
||||||
|
data.formInline = this.formInline
|
||||||
|
data.dataSource = this.$refs.tableRef.dataSource
|
||||||
|
return data
|
||||||
|
},
|
||||||
|
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||||
|
getDataValidate (callback) {
|
||||||
|
// 可能是表单,也可能是表格,表单校验一定要填,有是否下发联络人
|
||||||
|
this.$refs.ruleForm.validate(result => {
|
||||||
|
if (result) {
|
||||||
|
if (this.$refs.tableRef.dataSource && this.$refs.tableRef.dataSource.length > 0) {
|
||||||
|
const data = {}
|
||||||
|
data.formInline = this.formInline
|
||||||
|
data.dataSource = this.$refs.tableRef.dataSource
|
||||||
|
callback(data)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||||
|
const data = false
|
||||||
|
callback(data)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const data = false
|
||||||
|
callback(data)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+30
-5
@@ -25,8 +25,9 @@
|
|||||||
<a-form-model-item class="item-model" prop="applicationType">
|
<a-form-model-item class="item-model" prop="applicationType">
|
||||||
<a-select v-model="formInline.applicationType"
|
<a-select v-model="formInline.applicationType"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
:defaultValue="ApplicationCategory.INITIATION.value"
|
||||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.applicationType')">
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.applicationType')">
|
||||||
<a-select-option :value="1">{{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }}</a-select-option>
|
<a-select-option :value="ApplicationCategory.INITIATION.value">{{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -494,6 +495,21 @@
|
|||||||
type="radio" />
|
type="radio" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</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.suitUnit')">
|
||||||
|
{{ $t('workCenter.enterpriseInitChangePlan.suitUnit') }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="item-model" prop="cooperationUnit">
|
||||||
|
<j-select-depart v-model="formInline.cooperationUnit"
|
||||||
|
:disabled="disabled"
|
||||||
|
@back="cooperationUnitBack"
|
||||||
|
:backDepart="true" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
@@ -509,7 +525,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { StandardSource, ProjectType } from '@/enums/commonEnums'
|
import { StandardSource, ProjectType, ApplicationCategory } from '@/enums/commonEnums'
|
||||||
import { getWorkGroupTreeList, getFormDictTreeList } from '@/api/api'
|
import { getWorkGroupTreeList, getFormDictTreeList } from '@/api/api'
|
||||||
import UserSelection from '@/components/selection/UserSelection'
|
import UserSelection from '@/components/selection/UserSelection'
|
||||||
import StandardSelection from '@/components/selection/StandardSelection'
|
import StandardSelection from '@/components/selection/StandardSelection'
|
||||||
@@ -526,6 +542,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
StandardSource,
|
StandardSource,
|
||||||
ProjectType,
|
ProjectType,
|
||||||
|
ApplicationCategory,
|
||||||
workingGroupTreeList: [], // 隶属工作组下拉框数据
|
workingGroupTreeList: [], // 隶属工作组下拉框数据
|
||||||
partNameOptions: [], // 零部件名称下拉框数据
|
partNameOptions: [], // 零部件名称下拉框数据
|
||||||
standardSystemOptions: [], // 企标体系下拉框数据
|
standardSystemOptions: [], // 企标体系下拉框数据
|
||||||
@@ -765,7 +782,12 @@ export default {
|
|||||||
this.visible = true
|
this.visible = true
|
||||||
this.model = Object.assign({}, record)
|
this.model = Object.assign({}, record)
|
||||||
this.formInline = Object.assign({}, record)
|
this.formInline = Object.assign({}, record)
|
||||||
this.formInline.workGroup = { value: this.formInline.workGroup, label: this.formInline.workGroup_dictText }
|
if (this.formInline.workGroup) {
|
||||||
|
this.formInline.workGroup = { value: this.formInline.workGroup, label: this.formInline.workGroup_dictText }
|
||||||
|
}
|
||||||
|
if (!this.formInline.applicationType) {
|
||||||
|
this.formInline.applicationType = this.ApplicationCategory.INITIATION.value
|
||||||
|
}
|
||||||
},
|
},
|
||||||
look (record) {
|
look (record) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
@@ -850,6 +872,10 @@ export default {
|
|||||||
mainDraftingUnitBack (value) {
|
mainDraftingUnitBack (value) {
|
||||||
this.formInline.mainDraftingUnit_dictText = value.map(item => item.text).join(',')
|
this.formInline.mainDraftingUnit_dictText = value.map(item => item.text).join(',')
|
||||||
},
|
},
|
||||||
|
// 配合单位返回参数
|
||||||
|
cooperationUnitBack (value) {
|
||||||
|
this.formInline.cooperationUnit_dictText = value.map(item => item.text).join(',')
|
||||||
|
},
|
||||||
// 标准选择组件返回标准名称的回调
|
// 标准选择组件返回标准名称的回调
|
||||||
nameChange (value) {
|
nameChange (value) {
|
||||||
this.formInline.originEnStandardName = value
|
this.formInline.originEnStandardName = value
|
||||||
@@ -899,7 +925,7 @@ export default {
|
|||||||
const formInline = JSON.parse(JSON.stringify(this.formInline))
|
const formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||||
if (formInline.projectType) {
|
if (formInline.projectType) {
|
||||||
// 翻译项目类别
|
// 翻译项目类别
|
||||||
formInline.projectType_dictText = formInline.projectType === 1 ? ProjectType.ENACT.text : ProjectType.MODIFY.text
|
formInline.projectType_dictText = formInline.projectType === ProjectType.ENACT.value ? ProjectType.ENACT.text : ProjectType.MODIFY.text
|
||||||
// 设置变更状态
|
// 设置变更状态
|
||||||
if (formInline.projectType === 1) {
|
if (formInline.projectType === 1) {
|
||||||
// 是制定,变更状态是新增
|
// 是制定,变更状态是新增
|
||||||
@@ -918,7 +944,6 @@ export default {
|
|||||||
if (formInline.enStandardCode) {
|
if (formInline.enStandardCode) {
|
||||||
formInline.enStandardCode_dictText = this.$refs.enStandardCodeRef.dictOptions.find(item => item.value === formInline.enStandardCode).text
|
formInline.enStandardCode_dictText = this.$refs.enStandardCodeRef.dictOptions.find(item => item.value === formInline.enStandardCode).text
|
||||||
}
|
}
|
||||||
// 配合单位弹框中没有该字段,是否要加??
|
|
||||||
// 主起草单位的回显需要在登录信息中有当前登录人部门的翻译 ??
|
// 主起草单位的回显需要在登录信息中有当前登录人部门的翻译 ??
|
||||||
console.log(formInline)
|
console.log(formInline)
|
||||||
this.$emit('ok', formInline)
|
this.$emit('ok', formInline)
|
||||||
|
|||||||
+41
-1
@@ -63,13 +63,53 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
modalType: '' // 是在新增还是在编辑,编辑的时候放正在编辑的下标
|
modalType: '', // 是在新增还是在编辑,编辑的时候放正在编辑的下标
|
||||||
|
data: undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 选择用户得到用户名
|
// 选择用户得到用户名
|
||||||
userSelectNameChange (value, fieldName) {
|
userSelectNameChange (value, fieldName) {
|
||||||
this.formInline[fieldName + '_dictText'] = value
|
this.formInline[fieldName + '_dictText'] = value
|
||||||
|
},
|
||||||
|
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||||
|
initData (data) {
|
||||||
|
this.data = data
|
||||||
|
// 给表单赋值
|
||||||
|
// this.formInline =
|
||||||
|
// 给表格赋值
|
||||||
|
// this.$nextTick(() => {
|
||||||
|
// this.$refs.tableRef.dataSource =
|
||||||
|
// })
|
||||||
|
},
|
||||||
|
// 外层要获取数据
|
||||||
|
getData () {
|
||||||
|
// 把数据抛出
|
||||||
|
const data = {}
|
||||||
|
data.formInline = this.formInline
|
||||||
|
data.dataSource = this.$refs.tableRef.dataSource
|
||||||
|
return data
|
||||||
|
},
|
||||||
|
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||||
|
getDataValidate (callback) {
|
||||||
|
// 可能是表单,也可能是表格,表单校验一定要填,有是否下发联络人
|
||||||
|
this.$refs.ruleForm.validate(result => {
|
||||||
|
if (result) {
|
||||||
|
if (this.$refs.tableRef.dataSource && this.$refs.tableRef.dataSource.length > 0) {
|
||||||
|
const data = {}
|
||||||
|
data.formInline = this.formInline
|
||||||
|
data.dataSource = this.$refs.tableRef.dataSource
|
||||||
|
callback(data)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||||
|
const data = false
|
||||||
|
callback(data)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const data = false
|
||||||
|
callback(data)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,15 +36,44 @@ export default {
|
|||||||
return {
|
return {
|
||||||
formInline: {},
|
formInline: {},
|
||||||
rules: {
|
rules: {
|
||||||
// 企标编号
|
// 制修订计划说明
|
||||||
enterpriseStandardNum: [
|
revisionPlanDesc: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('workCenter.revisionPlanActivelyReport.revisionPlanDesc') + this.$t('cannotEmpty'),
|
message: this.$t('workCenter.revisionPlanActivelyReport.revisionPlanDesc') + this.$t('cannotEmpty'),
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
data: undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||||
|
initData (data) {
|
||||||
|
this.data = data
|
||||||
|
// 给表单赋值
|
||||||
|
// this.formInline =
|
||||||
|
},
|
||||||
|
// 外层要获取数据
|
||||||
|
getData () {
|
||||||
|
// 把数据抛出
|
||||||
|
const data = {}
|
||||||
|
data.formInline = this.formInline
|
||||||
|
return data
|
||||||
|
},
|
||||||
|
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||||
|
getDataValidate (callback) {
|
||||||
|
this.$refs.ruleForm.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
const data = {}
|
||||||
|
data.formInline = this.formInline
|
||||||
|
callback(data)
|
||||||
|
} else {
|
||||||
|
const data = false
|
||||||
|
callback(data)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
:can-drag="true"
|
:can-drag="true"
|
||||||
:scroll="{x: '100%'}"
|
:scroll="{x: '100%'}"
|
||||||
ref="table"
|
ref="table"
|
||||||
rowKey="enterpriseStandardPlanId"
|
:rowKey="(record, index) => { return index }"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
@@ -392,7 +392,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 编辑
|
// 编辑
|
||||||
handleEdit (record, index) {
|
handleEdit (record, index) {
|
||||||
this.modalType = 'edit' + index
|
this.modalType = 'edit' + ',' + index
|
||||||
this.$refs.contactEnterSendTaskModal.edit(record)
|
this.$refs.contactEnterSendTaskModal.edit(record)
|
||||||
},
|
},
|
||||||
// 查看
|
// 查看
|
||||||
@@ -405,7 +405,11 @@ export default {
|
|||||||
},
|
},
|
||||||
// 批量删除
|
// 批量删除
|
||||||
batchDel () {
|
batchDel () {
|
||||||
this.dataSource = this.dataSource.filter(item => !this.selectedRowKeys.includes(item.enterpriseStandardPlanId))
|
for (let i = 0; i < this.selectedRowKeys.length; i++) {
|
||||||
|
this.dataSource.splice(this.selectedRowKeys[i], 1, false)
|
||||||
|
}
|
||||||
|
this.dataSource = this.dataSource.filter(item => !!item)
|
||||||
|
this.selectedRowKeys = []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+99
-31
@@ -24,7 +24,7 @@
|
|||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
|
||||||
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
|
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
|
||||||
@change="event => event.target.value = event.target.value.trim()"
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
:disabled="disabled"
|
:disabled="disabled || processInfoDisabled"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
v-decorator="['processName', validatorRules.processName]" />
|
v-decorator="['processName', validatorRules.processName]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')">
|
||||||
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
|
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:disabled="disabled"
|
:disabled="disabled || processInfoDisabled"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
v-decorator="['expirationDate']" />
|
v-decorator="['expirationDate']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
|
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
|
||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
:disabled="disabled"
|
:disabled="disabled || processInfoDisabled"
|
||||||
v-decorator="['processExplain']" />
|
v-decorator="['processExplain']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -138,6 +138,13 @@ import EngineerInitBaseInfo from './modules/EngineerInitBaseInfo'
|
|||||||
import ContactSelectApproverBaseInfo from './modules/ContactSelectApproverBaseInfo'
|
import ContactSelectApproverBaseInfo from './modules/ContactSelectApproverBaseInfo'
|
||||||
import LeaderApproveSentBaseInfo from './modules/LeaderApproveSentBaseInfo'
|
import LeaderApproveSentBaseInfo from './modules/LeaderApproveSentBaseInfo'
|
||||||
import TableBaseInfo from './modules/TableBaseInfo'
|
import TableBaseInfo from './modules/TableBaseInfo'
|
||||||
|
import {
|
||||||
|
standardizationInitApproval,
|
||||||
|
standardizationInitSave,
|
||||||
|
standardizationInitTurnTo,
|
||||||
|
standardizationInitAgree,
|
||||||
|
standardizationInitReject
|
||||||
|
} from '@/api/workCenter'
|
||||||
|
|
||||||
const personData = [
|
const personData = [
|
||||||
{
|
{
|
||||||
@@ -199,6 +206,10 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
pageTitle () {
|
pageTitle () {
|
||||||
return this.$t('flowCenter') + this.$route.meta.title
|
return this.$t('flowCenter') + this.$route.meta.title
|
||||||
|
},
|
||||||
|
// 流程信息不能编辑
|
||||||
|
processInfoDisabled () {
|
||||||
|
return this.currentNode !== 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
@@ -277,9 +288,6 @@ export default {
|
|||||||
// 有任意一项填了即可
|
// 有任意一项填了即可
|
||||||
// 流程信息表单
|
// 流程信息表单
|
||||||
const processInfoForm = this.processInfoForm.getFieldsValue()
|
const processInfoForm = this.processInfoForm.getFieldsValue()
|
||||||
// 业务基本信息
|
|
||||||
let ruleForm = {}
|
|
||||||
|
|
||||||
// 流程审批信息
|
// 流程审批信息
|
||||||
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
|
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
|
||||||
// 人员信息的数据, 处理成对象
|
// 人员信息的数据, 处理成对象
|
||||||
@@ -291,12 +299,15 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 需要传给后端的
|
// 需要传给后端的
|
||||||
|
let param = {}
|
||||||
// 业务基本信息
|
// 业务基本信息
|
||||||
if (this.$refs.basicInfoFormRef) {
|
if (this.$refs.basicInfoFormRef) {
|
||||||
|
let ruleForm = this.$refs.baseInfoRef.getData()
|
||||||
|
// 该流程中业务基本信息只有表格
|
||||||
|
// ruleForm.dataSource
|
||||||
} else {
|
} else {
|
||||||
// 需要外层信息至少填了一项
|
// 需要外层信息至少填了一项
|
||||||
const param = { ...processInfoForm, ...ruleForm, ...approvalInfoForm, ...personnelObj }
|
param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
|
||||||
const flag = Object.values(param).some(v => !!v || v === 0)
|
const flag = Object.values(param).some(v => !!v || v === 0)
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
// 提示至少填写一项
|
// 提示至少填写一项
|
||||||
@@ -304,14 +315,17 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.loading = true
|
||||||
// 保存到草稿
|
// 保存到草稿
|
||||||
// enterprisePlanApprovalSave(arr).then(res => {
|
standardizationInitSave(param).then(res => {
|
||||||
// if (res.success) {
|
if (res.success) {
|
||||||
// this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
// } else {
|
} else {
|
||||||
// this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
// }
|
}
|
||||||
// })
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 节点一时候的提交,发起变更
|
// 节点一时候的提交,发起变更
|
||||||
handleStart () {
|
handleStart () {
|
||||||
@@ -331,7 +345,20 @@ export default {
|
|||||||
}
|
}
|
||||||
this.processInfoForm.validateFields((err, values) => {
|
this.processInfoForm.validateFields((err, values) => {
|
||||||
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
||||||
|
this.$refs.baseInfoRef.getDataValidate((data) => {
|
||||||
|
if (!err && !approvalErr && data) {
|
||||||
|
const param = {} // 传给后端的数据
|
||||||
|
standardizationInitApproval(param).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -349,29 +376,70 @@ export default {
|
|||||||
const param = Object.assign({}, values)
|
const param = Object.assign({}, values)
|
||||||
param.userId = userIds
|
param.userId = userIds
|
||||||
param.taskId = this.$route.query.taskId
|
param.taskId = this.$route.query.taskId
|
||||||
// enterprisePlanApprovalTurnTo(param).then(res => {
|
standardizationInitTurnTo(param).then(res => {
|
||||||
// if (res.success) {
|
if (res.success) {
|
||||||
// this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
// } else {
|
} else {
|
||||||
// this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
// }
|
}
|
||||||
// }).finally(() => {
|
}).finally(() => {
|
||||||
// this.loading = false
|
this.loading = false
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 提交
|
// 提交(节点4,5,7有提交)
|
||||||
handleSubmit () {
|
handleSubmit () {
|
||||||
|
if (this.loading) return
|
||||||
|
// 流程审批信息校验
|
||||||
|
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
||||||
|
this.$refs.baseInfoFormRef.getDataValidate(data => {
|
||||||
|
if (approvalErr && data) {
|
||||||
|
// 只有表格
|
||||||
|
// param =
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 同意
|
// 同意(节点2,3,6有同意)
|
||||||
handleAgree () {
|
handleAgree () {
|
||||||
|
if (this.loading) return
|
||||||
|
this.approvalInfoForm.validateFields((err, values) => {
|
||||||
|
if (!err) {
|
||||||
|
this.loading = true
|
||||||
|
const param = Object.assign({}, values)
|
||||||
|
param.taskId = this.$route.query.taskId
|
||||||
|
standardizationInitAgree(param).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 驳回
|
// 驳回(节点2,3,6有驳回)
|
||||||
handleReject () {
|
handleReject () {
|
||||||
|
if (this.loading) return
|
||||||
|
this.approvalInfoForm.validateFields((err, values) => {
|
||||||
|
if (!err) {
|
||||||
|
this.loading = true
|
||||||
|
const param = Object.assign({}, values)
|
||||||
|
param.taskId = this.$route.query.taskId
|
||||||
|
standardizationInitReject(param).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+109
-7
@@ -25,8 +25,9 @@
|
|||||||
<a-form-model-item class="item-model" prop="applicationType">
|
<a-form-model-item class="item-model" prop="applicationType">
|
||||||
<a-select v-model="formInline.applicationType"
|
<a-select v-model="formInline.applicationType"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
defaultValue="ApplicationCategory.INITIATION.value"
|
||||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.applicationType')">
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.applicationType')">
|
||||||
<a-select-option :value="1">{{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }}</a-select-option>
|
<a-select-option :value="ApplicationCategory.INITIATION.value">{{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,13 +44,13 @@
|
|||||||
@change="projectTypeChange"
|
@change="projectTypeChange"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')">
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')">
|
||||||
<a-select-option :value="1">{{ $t('workCenter.enterpriseInitChangePlan.formulate') }}</a-select-option>
|
<a-select-option :value="ProjectType.ENACT.value">{{ $t('workCenter.enterpriseInitChangePlan.formulate') }}</a-select-option>
|
||||||
<a-select-option :value="2">{{ $t('workCenter.enterpriseInitChangePlan.revise') }}</a-select-option>
|
<a-select-option :value="ProjectType.MODIFY.value">{{ $t('workCenter.enterpriseInitChangePlan.revise') }}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<!-- 标准立项-制定 -->
|
<!-- 标准立项-制定 -->
|
||||||
<template v-if="formInline.projectType && formInline.projectType === 1">
|
<template v-if="formInline.projectType && formInline.projectType === ProjectType.ENACT.value">
|
||||||
<!-- 企标编号 -->
|
<!-- 企标编号 -->
|
||||||
<div class="box-title-text form-flex-item-half">
|
<div class="box-title-text form-flex-item-half">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
@@ -92,6 +93,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="enStandardCode">
|
<a-form-model-item class="item-model" prop="enStandardCode">
|
||||||
<j-dict-select-tag class="box-input"
|
<j-dict-select-tag class="box-input"
|
||||||
|
ref="enStandardCodeRef"
|
||||||
v-model="formInline.enStandardCode"
|
v-model="formInline.enStandardCode"
|
||||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode')"
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
@@ -150,12 +152,13 @@
|
|||||||
:default-value="yearNumberDefaultValue"
|
:default-value="yearNumberDefaultValue"
|
||||||
date-format="YYYY"
|
date-format="YYYY"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
@change="decadeCodeChange"
|
||||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.yearNumber')" />
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.yearNumber')" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<!-- 标准立项-修订 -->
|
<!-- 标准立项-修订 -->
|
||||||
<template v-else-if="formInline.projectType && formInline.projectType === 2">
|
<template v-else-if="formInline.projectType && formInline.projectType === ProjectType.MODIFY.value">
|
||||||
<!-- 企标编号 原企标编号 -->
|
<!-- 企标编号 原企标编号 -->
|
||||||
<div class="box-title-text form-flex-item-half">
|
<div class="box-title-text form-flex-item-half">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
@@ -172,7 +175,7 @@
|
|||||||
@nameChange="nameChange"/>
|
@nameChange="nameChange"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<!-- 新企标编号 根据选的企标编号的那三个代号,生成新的编号?? -->
|
<!-- 新企标编号 审批结束后才回显?? -->
|
||||||
<!--<div class="box-title-text form-flex-item-half">-->
|
<!--<div class="box-title-text form-flex-item-half">-->
|
||||||
<!-- <div class="title-text">-->
|
<!-- <div class="title-text">-->
|
||||||
<!-- <span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum')">-->
|
<!-- <span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum')">-->
|
||||||
@@ -396,6 +399,7 @@
|
|||||||
<a-form-model-item class="item-model" prop="authDept">
|
<a-form-model-item class="item-model" prop="authDept">
|
||||||
<j-select-depart v-model="formInline.authDept"
|
<j-select-depart v-model="formInline.authDept"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
@back="authDeptBack"
|
||||||
:backDepart="true" />
|
:backDepart="true" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -428,6 +432,7 @@
|
|||||||
<a-form-model-item class="item-model" prop="mainDraftingUnit">
|
<a-form-model-item class="item-model" prop="mainDraftingUnit">
|
||||||
<j-select-depart v-model="formInline.mainDraftingUnit"
|
<j-select-depart v-model="formInline.mainDraftingUnit"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
@back="mainDraftingUnitBack"
|
||||||
:backDepart="true" />
|
:backDepart="true" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -467,6 +472,21 @@
|
|||||||
type="radio" />
|
type="radio" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</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.suitUnit')">
|
||||||
|
{{ $t('workCenter.enterpriseInitChangePlan.suitUnit') }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="item-model" prop="cooperationUnit">
|
||||||
|
<j-select-depart v-model="formInline.cooperationUnit"
|
||||||
|
:disabled="disabled"
|
||||||
|
@back="cooperationUnitBack"
|
||||||
|
:backDepart="true" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
@@ -482,7 +502,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { StandardSource, ProjectType } from '@/enums/commonEnums'
|
import { StandardSource, ProjectType, ApplicationCategory } from '@/enums/commonEnums'
|
||||||
import { getFormDictTreeList } from '@/api/api'
|
import { getFormDictTreeList } from '@/api/api'
|
||||||
import UserSelection from '@/components/selection/UserSelection'
|
import UserSelection from '@/components/selection/UserSelection'
|
||||||
import StandardSelection from '@/components/selection/StandardSelection'
|
import StandardSelection from '@/components/selection/StandardSelection'
|
||||||
@@ -490,6 +510,7 @@ import UploadFile from '@/components/UploadFile'
|
|||||||
import { getTreeList } from '@/api/enterpriseStandardLibraryApi'
|
import { getTreeList } from '@/api/enterpriseStandardLibraryApi'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { USER_INFO } from '@/store/mutation-types'
|
import { USER_INFO } from '@/store/mutation-types'
|
||||||
|
import { getEnStandardNo } from '@/api/workCenter'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'BaseInfoTableModal',
|
name: 'BaseInfoTableModal',
|
||||||
@@ -518,6 +539,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
StandardSource,
|
StandardSource,
|
||||||
ProjectType,
|
ProjectType,
|
||||||
|
ApplicationCategory,
|
||||||
partNameOptions: [], // 零部件名称下拉框数据
|
partNameOptions: [], // 零部件名称下拉框数据
|
||||||
standardSystemOptions: [], // 企标体系下拉框数据
|
standardSystemOptions: [], // 企标体系下拉框数据
|
||||||
visible: false,
|
visible: false,
|
||||||
@@ -705,6 +727,20 @@ export default {
|
|||||||
return new Date().getFullYear() + ''
|
return new Date().getFullYear() + ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
// 企业标准代号
|
||||||
|
'formInline.enStandardCode' (value) {
|
||||||
|
this.getEnStandardNo()
|
||||||
|
},
|
||||||
|
// 企业名称代号
|
||||||
|
'formInline.enNameCode' (value) {
|
||||||
|
this.getEnStandardNo()
|
||||||
|
},
|
||||||
|
// 标准类别代号
|
||||||
|
'formInline.standardCategoryCode' (value) {
|
||||||
|
this.getEnStandardNo()
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.initPartNameOptions()
|
this.initPartNameOptions()
|
||||||
this.initStandardSystemOptions()
|
this.initStandardSystemOptions()
|
||||||
@@ -780,6 +816,9 @@ export default {
|
|||||||
this.planSubmissionDateDisabled = true
|
this.planSubmissionDateDisabled = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!this.formInline.applicationType) {
|
||||||
|
this.formInline.applicationType = this.ApplicationCategory.INITIATION.value
|
||||||
|
}
|
||||||
},
|
},
|
||||||
look (record) {
|
look (record) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
@@ -787,6 +826,40 @@ export default {
|
|||||||
this.formInline = Object.assign({}, record)
|
this.formInline = Object.assign({}, record)
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
},
|
},
|
||||||
|
// watch监视年代号会滞后
|
||||||
|
decadeCodeChange (value) {
|
||||||
|
this.getEnStandardNo()
|
||||||
|
},
|
||||||
|
// 根据三个代号和一个年代号获取企标编号
|
||||||
|
getEnStandardNo () {
|
||||||
|
// 如果是制定根据填的三个代号和一个年代号获取
|
||||||
|
if (this.formInline.projectType === ProjectType.ENACT.value) {
|
||||||
|
if (!this.formInline.enStandardCode || !this.formInline.enNameCode ||
|
||||||
|
!this.formInline.standardCategoryCode || !this.formInline.decadeCode) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const param = {}
|
||||||
|
param.enStandardCode = this.formInline.enStandardCode
|
||||||
|
param.enNameCode = this.formInline.enNameCode
|
||||||
|
param.standardCategoryCode = this.formInline.standardCategoryCode
|
||||||
|
param.decadeCode = this.formInline.decadeCode
|
||||||
|
getEnStandardNo(param).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$set(this.formInline, 'newEnStandardNo', res.message)
|
||||||
|
this.$forceUpdate()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// 是修订,通过选中的企标编号和年代号拼接新企标编号
|
||||||
|
if (this.formInline.originEnStandardNo && this.formInline.decadeCode) {
|
||||||
|
const standardNo = this.formInline.originEnStandardNo.split('-')[0] + '-' + this.formInline.decadeCode
|
||||||
|
this.$set(this.formInline, 'newEnStandardNo', standardNo)
|
||||||
|
this.$forceUpdate()
|
||||||
|
// 返回流程名称
|
||||||
|
this.returnProcessName()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取零部件名称下拉框数据
|
// 获取零部件名称下拉框数据
|
||||||
initPartNameOptions () {
|
initPartNameOptions () {
|
||||||
getFormDictTreeList({ dictId: '1696821512600637441' }).then(res => {
|
getFormDictTreeList({ dictId: '1696821512600637441' }).then(res => {
|
||||||
@@ -814,6 +887,18 @@ export default {
|
|||||||
this.formInline.decadeCode = new Date().getFullYear() + ''
|
this.formInline.decadeCode = new Date().getFullYear() + ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 授权部门返回参数
|
||||||
|
authDeptBack (value) {
|
||||||
|
this.formInline.authDept_dictText = value.map(item => item.text).join(',')
|
||||||
|
},
|
||||||
|
// 主起草单位返回参数
|
||||||
|
mainDraftingUnitBack (value) {
|
||||||
|
this.formInline.mainDraftingUnit_dictText = value.map(item => item.text).join(',')
|
||||||
|
},
|
||||||
|
// 配合单位返回参数
|
||||||
|
cooperationUnitBack (value) {
|
||||||
|
this.formInline.cooperationUnit_dictText = value.map(item => item.text).join(',')
|
||||||
|
},
|
||||||
// 选择用户得到用户名
|
// 选择用户得到用户名
|
||||||
userSelectNameChange (value, fieldName) {
|
userSelectNameChange (value, fieldName) {
|
||||||
this.formInline[fieldName + '_dictText'] = value
|
this.formInline[fieldName + '_dictText'] = value
|
||||||
@@ -852,6 +937,23 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
const formInline = JSON.parse(JSON.stringify(this.formInline))
|
const formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||||
|
if (formInline.projectType) {
|
||||||
|
// 翻译项目类别
|
||||||
|
formInline.projectType_dictText = formInline.projectType === ProjectType.ENACT.value ? ProjectType.ENACT.text : ProjectType.MODIFY.text
|
||||||
|
// 设置变更状态
|
||||||
|
if (formInline.projectType === ProjectType.ENACT.value) {
|
||||||
|
// 是制定,变更状态是新增
|
||||||
|
formInline.changeStatus_dictText = '新增'
|
||||||
|
} else {
|
||||||
|
// 是修订,变更状态是变更
|
||||||
|
formInline.changeStatus_dictText = '变更'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 翻译企业标准代号
|
||||||
|
if (formInline.enStandardCode) {
|
||||||
|
formInline.enStandardCode_dictText = this.$refs.enStandardCodeRef.dictOptions.find(item => item.value === formInline.enStandardCode).text
|
||||||
|
}
|
||||||
|
// 主起草单位的回显需要在登录信息中有当前登录人部门的翻译 ??
|
||||||
this.$emit('ok', formInline)
|
this.$emit('ok', formInline)
|
||||||
this.close()
|
this.close()
|
||||||
this.confirmLoading = false
|
this.confirmLoading = false
|
||||||
|
|||||||
+49
-15
@@ -17,7 +17,7 @@
|
|||||||
:can-drag="true"
|
:can-drag="true"
|
||||||
:scroll="{x: '100%'}"
|
:scroll="{x: '100%'}"
|
||||||
ref="table"
|
ref="table"
|
||||||
rowKey="enterpriseStandardPlanId"
|
:rowKey="(record, index) => {return index}"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 选人弹框 -->
|
<!-- 选人弹框 -->
|
||||||
<user-select-modal ref="userSelectModal" type="radio" @change="userSelectModalChange"></user-select-modal>
|
<user-select-modal ref="userSelectModal" type="radio" @change="userSelectModalChange" @nameChange="userSelectNameChange"></user-select-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -54,7 +54,6 @@
|
|||||||
import JTable from '@/components/jero/JTable'
|
import JTable from '@/components/jero/JTable'
|
||||||
// 选人弹框
|
// 选人弹框
|
||||||
import UserSelectModal from '@/components/selection/UserSelectModal'
|
import UserSelectModal from '@/components/selection/UserSelectModal'
|
||||||
import { standardizationInitBatchSetApprover } from '@/api/workCenter'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ContactSelectApproverBaseInfo',
|
name: 'ContactSelectApproverBaseInfo',
|
||||||
@@ -199,6 +198,7 @@ export default {
|
|||||||
dataIndex: 'approvalUser',
|
dataIndex: 'approvalUser',
|
||||||
customRender: (value, row, index) => {
|
customRender: (value, row, index) => {
|
||||||
return <user-select-by-contact v-model={this.dataSource[index].approvalUser}
|
return <user-select-by-contact v-model={this.dataSource[index].approvalUser}
|
||||||
|
nameStr={this.dataSource[index].approvalUser_dictText}
|
||||||
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
|
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,10 +208,45 @@ export default {
|
|||||||
selectionRows: [],
|
selectionRows: [],
|
||||||
url: {
|
url: {
|
||||||
list: ''
|
list: ''
|
||||||
}
|
},
|
||||||
|
selectNames: '' // 选完人的名字,批量设置人需要用
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||||
|
initData (data) {
|
||||||
|
this.data = data
|
||||||
|
// 给表格赋值
|
||||||
|
// this.dataSource =
|
||||||
|
},
|
||||||
|
// 外层要获取数据
|
||||||
|
getData () {
|
||||||
|
// 把数据抛出
|
||||||
|
const data = {}
|
||||||
|
data.dataSource = this.dataSource
|
||||||
|
return data
|
||||||
|
},
|
||||||
|
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||||
|
getDataValidate (callback) {
|
||||||
|
// 每行的审批人是否都有
|
||||||
|
let hasErr = false
|
||||||
|
for (const item of this.dataSource) {
|
||||||
|
if (!item.approvalUser) {
|
||||||
|
// 需要选审批人,但是没有选择
|
||||||
|
hasErr = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let data
|
||||||
|
if (hasErr) {
|
||||||
|
this.$message.warning(this.$t('workCenter.revisionPlanActivelyReport.pleaseSelectApprover'))
|
||||||
|
data = false
|
||||||
|
callback(data)
|
||||||
|
} else {
|
||||||
|
data = { dataSource: this.dataSource }
|
||||||
|
callback(data)
|
||||||
|
}
|
||||||
|
},
|
||||||
// 企标编号,企标名称跳转详情,原企标
|
// 企标编号,企标名称跳转详情,原企标
|
||||||
handleGoDetailOld (record) {
|
handleGoDetailOld (record) {
|
||||||
this.$openPageNewSheet({
|
this.$openPageNewSheet({
|
||||||
@@ -248,18 +283,17 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$refs.userSelectModal.open()
|
this.$refs.userSelectModal.open()
|
||||||
},
|
},
|
||||||
// 批量设置联络人选择人后的回调
|
// 批量设置审批人选择人后的回调
|
||||||
userSelectModalChange (value) {
|
userSelectModalChange (value) {
|
||||||
const param = {}
|
for (const item of this.selectedRowKeys) {
|
||||||
param.contact = value
|
this.dataSource[item].approvalUser = value
|
||||||
param.ids = this.selectedRowKeys.join(',')
|
this.dataSource[item].approvalUser_dictText = this.selectNames
|
||||||
standardizationInitBatchSetApprover(param).then(res => {
|
}
|
||||||
if (res.success) {
|
this.dataSource = JSON.parse(JSON.stringify(this.dataSource))
|
||||||
this.$message.success(res.message)
|
},
|
||||||
} else {
|
// 选人的名字获取
|
||||||
this.$message.warning(res.message)
|
userSelectNameChange (value) {
|
||||||
}
|
this.selectNames = value
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+63
-17
@@ -29,7 +29,9 @@
|
|||||||
:can-drag="true"
|
:can-drag="true"
|
||||||
:scroll="{x: '100%'}"
|
:scroll="{x: '100%'}"
|
||||||
ref="table"
|
ref="table"
|
||||||
rowKey="enterpriseStandardPlanId"
|
:rowKey="(record, index) => {
|
||||||
|
return index
|
||||||
|
}"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
@@ -67,7 +69,7 @@
|
|||||||
<base-info-table-modal ref="baseInfoTableModal" @ok="modelFormOk"></base-info-table-modal>
|
<base-info-table-modal ref="baseInfoTableModal" @ok="modelFormOk"></base-info-table-modal>
|
||||||
|
|
||||||
<!-- 选人弹框 -->
|
<!-- 选人弹框 -->
|
||||||
<user-select-modal ref="userSelectModal" type="radio" @change="userSelectModalChange"></user-select-modal>
|
<user-select-modal ref="userSelectModal" type="radio" @change="userSelectModalChange" @nameChange="userSelectNameChange"></user-select-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -79,7 +81,6 @@ import JTable from '@/components/jero/JTable'
|
|||||||
import { downloadFile } from '@/api/manage'
|
import { downloadFile } from '@/api/manage'
|
||||||
import UserSelectByContact from '@/components/selection/UserSelectByContact'
|
import UserSelectByContact from '@/components/selection/UserSelectByContact'
|
||||||
import UserSelectModal from '@/components/selection/UserSelectModal'
|
import UserSelectModal from '@/components/selection/UserSelectModal'
|
||||||
import { standardizationInitBatchSetContact } from '@/api/workCenter'
|
|
||||||
import BaseInfoTableModal from './BaseInfoTableModal'
|
import BaseInfoTableModal from './BaseInfoTableModal'
|
||||||
|
|
||||||
// 导入的加载提示
|
// 导入的加载提示
|
||||||
@@ -246,6 +247,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
// 不是被驳回的待办,可以设置联络人
|
// 不是被驳回的待办,可以设置联络人
|
||||||
return <user-select-by-contact v-model={this.dataSource[index].contactUser}
|
return <user-select-by-contact v-model={this.dataSource[index].contactUser}
|
||||||
|
nameStr={this.dataSource[index].contactUser_dictText}
|
||||||
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
|
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -267,17 +269,58 @@ export default {
|
|||||||
importExcelUrl: '/process/es/annualInit/importExcel'
|
importExcelUrl: '/process/es/annualInit/importExcel'
|
||||||
},
|
},
|
||||||
modalType: '', // 是在新增还是在编辑,编辑的时候放正在编辑的下标
|
modalType: '', // 是在新增还是在编辑,编辑的时候放正在编辑的下标
|
||||||
isRejectedTodo: false // 是否是被驳回的待办,被驳回的待办不可设置联络人
|
isRejectedTodo: false, // 是否是被驳回的待办,被驳回的待办不可设置联络人
|
||||||
|
selectNames: '' // 选完人的名字,批量设置人需要用
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
/**
|
/**
|
||||||
* 需要能判断是否是被驳回,产生的待办点击进入的,是的话需要显示带出被驳回的法规的联络人,
|
* 需要能判断是否是被驳回,产生的待办点击进入的,是的话需要显示带出被驳回的法规的联络人,
|
||||||
* 并且去掉批量设置联络人按钮,如需修改联络人,删除该标准重新走标准化发起流程
|
* 并且去掉批量设置联络人按钮,如需修改联络人,删除该标准重新走标准化发起流程 ??
|
||||||
*/
|
*/
|
||||||
// this.isRejectedTodo = false
|
// this.isRejectedTodo = false
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||||
|
initData (data) {
|
||||||
|
this.data = data
|
||||||
|
// 给表格赋值
|
||||||
|
// this.dataSource =
|
||||||
|
},
|
||||||
|
// 外层要获取数据
|
||||||
|
getData () {
|
||||||
|
// 把数据抛出
|
||||||
|
const data = {}
|
||||||
|
data.dataSource = this.dataSource
|
||||||
|
return data
|
||||||
|
},
|
||||||
|
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||||
|
getDataValidate (callback) {
|
||||||
|
// 校验表格是否每行都有数据,每行的联络人是否都有
|
||||||
|
if (this.dataSource && this.dataSource.length > 0) {
|
||||||
|
const data = {}
|
||||||
|
data.dataSource = this.dataSource
|
||||||
|
let hasErr = false
|
||||||
|
for (const item of this.dataSource) {
|
||||||
|
if (!item.contactUser) {
|
||||||
|
// 需要选联络人,但是没有选择
|
||||||
|
hasErr = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hasErr) {
|
||||||
|
this.$message.warning(this.$t('workCenter.revisionPlanActivelyReport.pleaseSelectContact'))
|
||||||
|
const data = false
|
||||||
|
callback(data)
|
||||||
|
} else {
|
||||||
|
callback(data)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||||
|
const data = false
|
||||||
|
callback(data)
|
||||||
|
}
|
||||||
|
},
|
||||||
// 企标编号,企标名称跳转详情,原企标
|
// 企标编号,企标名称跳转详情,原企标
|
||||||
handleGoDetailOld (record) {
|
handleGoDetailOld (record) {
|
||||||
this.$openPageNewSheet({
|
this.$openPageNewSheet({
|
||||||
@@ -393,7 +436,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 编辑
|
// 编辑
|
||||||
handleEdit (record, index) {
|
handleEdit (record, index) {
|
||||||
this.modalType = 'edit' + index
|
this.modalType = 'edit' + ',' + index
|
||||||
this.$refs.baseInfoTableModal.edit(record)
|
this.$refs.baseInfoTableModal.edit(record)
|
||||||
},
|
},
|
||||||
// 查看
|
// 查看
|
||||||
@@ -406,7 +449,11 @@ export default {
|
|||||||
},
|
},
|
||||||
// 批量删除
|
// 批量删除
|
||||||
batchDel () {
|
batchDel () {
|
||||||
this.dataSource = this.dataSource.filter(item => !this.selectedRowKeys.includes(item.enterpriseStandardPlanId))
|
for (let i = 0; i < this.selectedRowKeys.length; i++) {
|
||||||
|
this.dataSource.splice(this.selectedRowKeys[i], 1, false)
|
||||||
|
}
|
||||||
|
this.dataSource = this.dataSource.filter(item => !!item)
|
||||||
|
this.selectedRowKeys = []
|
||||||
},
|
},
|
||||||
// 批量设置联络人
|
// 批量设置联络人
|
||||||
batchSetContact () {
|
batchSetContact () {
|
||||||
@@ -419,16 +466,15 @@ export default {
|
|||||||
},
|
},
|
||||||
// 批量设置联络人选择人后的回调
|
// 批量设置联络人选择人后的回调
|
||||||
userSelectModalChange (value) {
|
userSelectModalChange (value) {
|
||||||
const param = {}
|
for (const item of this.selectedRowKeys) {
|
||||||
param.contact = value
|
this.dataSource[item].contactUser = value
|
||||||
param.ids = this.selectedRowKeys.join(',')
|
this.dataSource[item].contactUser_dictText = this.selectNames
|
||||||
standardizationInitBatchSetContact(param).then(res => {
|
}
|
||||||
if (res.success) {
|
this.dataSource = JSON.parse(JSON.stringify(this.dataSource))
|
||||||
this.$message.success(res.message)
|
},
|
||||||
} else {
|
// 选人的名字获取
|
||||||
this.$message.warning(res.message)
|
userSelectNameChange (value) {
|
||||||
}
|
this.selectNames = value
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+49
-15
@@ -13,7 +13,7 @@
|
|||||||
:can-drag="true"
|
:can-drag="true"
|
||||||
:scroll="{x: '100%'}"
|
:scroll="{x: '100%'}"
|
||||||
ref="table"
|
ref="table"
|
||||||
rowKey="enterpriseStandardPlanId"
|
:rowKey="(record, index) => {return index}"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 选人弹框 -->
|
<!-- 选人弹框 -->
|
||||||
<user-select-modal ref="userSelectModal" type="radio" @change="userSelectModalChange"></user-select-modal>
|
<user-select-modal ref="userSelectModal" type="radio" @change="userSelectModalChange" @nameChange="userSelectNameChange"></user-select-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -50,7 +50,6 @@
|
|||||||
import JTable from '@/components/jero/JTable'
|
import JTable from '@/components/jero/JTable'
|
||||||
// 选人弹框
|
// 选人弹框
|
||||||
import UserSelectModal from '@/components/selection/UserSelectModal'
|
import UserSelectModal from '@/components/selection/UserSelectModal'
|
||||||
import { standardizationInitBatchSetDrafter } from '@/api/workCenter'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LeaderApproveSentBaseInfo',
|
name: 'LeaderApproveSentBaseInfo',
|
||||||
@@ -195,6 +194,7 @@ export default {
|
|||||||
dataIndex: 'drafter',
|
dataIndex: 'drafter',
|
||||||
customRender: (value, row, index) => {
|
customRender: (value, row, index) => {
|
||||||
return <user-select-by-contact v-model={this.dataSource[index].drafter}
|
return <user-select-by-contact v-model={this.dataSource[index].drafter}
|
||||||
|
nameStr={this.dataSource[index].drafter_dictText}
|
||||||
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
|
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -204,10 +204,45 @@ export default {
|
|||||||
selectionRows: [],
|
selectionRows: [],
|
||||||
url: {
|
url: {
|
||||||
list: ''
|
list: ''
|
||||||
}
|
},
|
||||||
|
selectNames: '' // 选完人的名字,批量设置人需要用
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||||
|
initData (data) {
|
||||||
|
this.data = data
|
||||||
|
// 给表格赋值
|
||||||
|
// this.dataSource =
|
||||||
|
},
|
||||||
|
// 外层要获取数据
|
||||||
|
getData () {
|
||||||
|
// 把数据抛出
|
||||||
|
const data = {}
|
||||||
|
data.dataSource = this.dataSource
|
||||||
|
return data
|
||||||
|
},
|
||||||
|
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||||
|
getDataValidate (callback) {
|
||||||
|
// 每行的主起草人是否都有
|
||||||
|
let hasErr = false
|
||||||
|
for (const item of this.dataSource) {
|
||||||
|
if (!item.drafter) {
|
||||||
|
// 需要选主起草人,但是没有选择
|
||||||
|
hasErr = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let data
|
||||||
|
if (hasErr) {
|
||||||
|
this.$message.warning(this.$t('workCenter.revisionPlanActivelyReport.pleaseSelectDrafter'))
|
||||||
|
data = false
|
||||||
|
callback(data)
|
||||||
|
} else {
|
||||||
|
data = { dataSource: this.dataSource }
|
||||||
|
callback(data)
|
||||||
|
}
|
||||||
|
},
|
||||||
// 企标编号,企标名称跳转详情,原企标
|
// 企标编号,企标名称跳转详情,原企标
|
||||||
handleGoDetailOld (record) {
|
handleGoDetailOld (record) {
|
||||||
this.$openPageNewSheet({
|
this.$openPageNewSheet({
|
||||||
@@ -240,18 +275,17 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$refs.userSelectModal.open()
|
this.$refs.userSelectModal.open()
|
||||||
},
|
},
|
||||||
// 批量设置联络人选择人后的回调
|
// 批量设置主起草人选择人后的回调
|
||||||
userSelectModalChange (value) {
|
userSelectModalChange (value) {
|
||||||
const param = {}
|
for (const item of this.selectedRowKeys) {
|
||||||
param.contact = value
|
this.dataSource[item].draft = value
|
||||||
param.ids = this.selectedRowKeys.join(',')
|
this.dataSource[item].draft_dictText = this.selectNames
|
||||||
standardizationInitBatchSetDrafter(param).then(res => {
|
}
|
||||||
if (res.success) {
|
this.dataSource = JSON.parse(JSON.stringify(this.dataSource))
|
||||||
this.$message.success(res.message)
|
},
|
||||||
} else {
|
// 选人的名字获取
|
||||||
this.$message.warning(res.message)
|
userSelectNameChange (value) {
|
||||||
}
|
this.selectNames = value
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -228,6 +228,32 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||||
|
initData (data) {
|
||||||
|
this.data = data
|
||||||
|
// 给表格赋值
|
||||||
|
// this.dataSource =
|
||||||
|
},
|
||||||
|
// 外层要获取数据
|
||||||
|
getData () {
|
||||||
|
// 把数据抛出
|
||||||
|
const data = {}
|
||||||
|
data.dataSource = this.dataSource
|
||||||
|
return data
|
||||||
|
},
|
||||||
|
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||||
|
getDataValidate (callback) {
|
||||||
|
// 校验表格是否每行都有数据,每行的联络人是否都有
|
||||||
|
if (this.dataSource && this.dataSource.length > 0) {
|
||||||
|
const data = {}
|
||||||
|
data.dataSource = this.dataSource
|
||||||
|
callback(data)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||||
|
const data = false
|
||||||
|
callback(data)
|
||||||
|
}
|
||||||
|
},
|
||||||
// 企标编号,企标名称跳转详情,原企标
|
// 企标编号,企标名称跳转详情,原企标
|
||||||
handleGoDetailOld (record) {
|
handleGoDetailOld (record) {
|
||||||
this.$openPageNewSheet({
|
this.$openPageNewSheet({
|
||||||
|
|||||||
@@ -749,6 +749,7 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.loading = true
|
||||||
// 保存到草稿
|
// 保存到草稿
|
||||||
enterprisePlanApprovalSave(arr).then(res => {
|
enterprisePlanApprovalSave(arr).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -756,6 +757,8 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 节点一时候的提交,发起立项变更申请(业务基本信息那里是表格的就穿给后端数组里多条数据,是表单的就在数组里放一条数据)
|
// 节点一时候的提交,发起立项变更申请(业务基本信息那里是表格的就穿给后端数组里多条数据,是表单的就在数组里放一条数据)
|
||||||
|
|||||||
Reference in New Issue
Block a user