[update] 修改企标制修订流程
This commit is contained in:
+36
-17
@@ -664,23 +664,42 @@ export default {
|
||||
this.approvalInfoForm.setFieldsValue({ commitText: '同意' })
|
||||
}
|
||||
this.approvalInfoForm.validateFields(async (err, values) => {
|
||||
const data = await this.$refs.baseInfoRef.getDataValidate()
|
||||
if (!err && data) {
|
||||
this.loading = true
|
||||
const param = {}
|
||||
param.common = Object.assign({}, values)
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
param.data = data
|
||||
enStandardEditAgree(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
if (this.currentNode === 4) {
|
||||
const data = await this.$refs.baseInfoRef.getDataValidate()
|
||||
if (!err && data) {
|
||||
this.loading = true
|
||||
const param = {}
|
||||
param.common = Object.assign({}, values)
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
param.data = data
|
||||
enStandardEditAgree(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
} else {
|
||||
if (!err) {
|
||||
this.loading = true
|
||||
const param = {}
|
||||
param.common = Object.assign({}, values)
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
enStandardEditAgree(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -123,6 +123,7 @@ export default {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.advices = this.dataSource
|
||||
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData())
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
|
||||
+18
-21
@@ -39,27 +39,25 @@
|
||||
</div>
|
||||
|
||||
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
||||
<div class="collapsible-panel-form">
|
||||
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
|
||||
<!-- 部门联络人主管级领导 -->
|
||||
<!-- 人员是固定的,通过联络人管理维护后自动带出该领导审批,给该领导自动发送待办,人员离职后,管理员给转办待办任务 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.departLiaisonLeader')">
|
||||
<div class="form-flex-box">
|
||||
<!-- 部门联络人主管级领导 -->
|
||||
<!-- 人员是固定的,通过联络人管理维护后自动带出该领导审批,给该领导自动发送待办,人员离职后,管理员给转办待办任务 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.departLiaisonLeader')">
|
||||
{{ $t('workCenter.enStandardRevision.departLiaisonLeader') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="contactUserLeader">
|
||||
<user-selection v-model="formInline.contactUserLeader"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.departLiaisonLeader')"
|
||||
:disabled="disabled"
|
||||
filedName="contactUserLeader"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.contactUserLeader_dictText"
|
||||
type="radio"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="contactUserLeader">
|
||||
<user-selection v-model="formInline.contactUserLeader"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.departLiaisonLeader')"
|
||||
:disabled="disabled"
|
||||
filedName="contactUserLeader"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.contactUserLeader_dictText"
|
||||
type="radio"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</div>
|
||||
</a-form-model>
|
||||
@@ -214,9 +212,8 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
.collapsible-content-no-head {
|
||||
border-top: 1px solid #E5E6EB;
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
.form-add {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.online-edit-wrapper {
|
||||
|
||||
+39
-41
@@ -3,57 +3,55 @@
|
||||
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
|
||||
|
||||
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
||||
<div class="collapsible-panel-form">
|
||||
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
|
||||
<!-- 发布日期 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.releaseDate')">
|
||||
<div class="form-flex-box">
|
||||
<!-- 发布日期 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.releaseDate')">
|
||||
{{ $t('workCenter.enStandardRevision.releaseDate') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="releaseDate">
|
||||
<a-date-picker
|
||||
v-model="formInline.releaseDate"
|
||||
:showTime="false"
|
||||
:disabled="disabled"
|
||||
value-format="YYYY-MM-DD">
|
||||
</a-date-picker>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 实施日期 至少比发布日期大15天 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.implementationDate')">
|
||||
<a-form-model-item class="item-model" prop="releaseDate">
|
||||
<a-date-picker
|
||||
v-model="formInline.releaseDate"
|
||||
:showTime="false"
|
||||
:disabled="disabled"
|
||||
value-format="YYYY-MM-DD">
|
||||
</a-date-picker>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 实施日期 至少比发布日期大15天 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.implementationDate')">
|
||||
{{ $t('workCenter.enStandardRevision.implementationDate') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="implementDate">
|
||||
<a-date-picker
|
||||
v-model="formInline.implementDate"
|
||||
:showTime="false"
|
||||
:disabled="disabled"
|
||||
value-format="YYYY-MM-DD">
|
||||
</a-date-picker>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 标准文本 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<a-form-model-item class="item-model" prop="implementDate">
|
||||
<a-date-picker
|
||||
v-model="formInline.implementDate"
|
||||
:showTime="false"
|
||||
:disabled="disabled"
|
||||
value-format="YYYY-MM-DD">
|
||||
</a-date-picker>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 标准文本 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.standardText')">
|
||||
{{ $t('workCenter.enStandardRevision.standardText') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<div class="online-edit-wrapper">
|
||||
<!-- todo: 还不确定这里展示的是什么 -->
|
||||
<p>企业标准</p>
|
||||
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
|
||||
</div>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<div class="online-edit-wrapper">
|
||||
<!-- todo: 还不确定这里展示的是什么 -->
|
||||
<p>企业标准</p>
|
||||
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
|
||||
</div>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</div>
|
||||
</a-form-model>
|
||||
|
||||
+8
-3
@@ -29,9 +29,14 @@ export default {
|
||||
initData (data) {
|
||||
// 在线编辑不知道要怎么赋值?
|
||||
// 给表单赋值
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.baseInfoForm.formInline =
|
||||
// })
|
||||
this.$nextTick(() => {
|
||||
this.$refs.baseInfoForm.initData(data)
|
||||
})
|
||||
},
|
||||
getData () {
|
||||
const data = {}
|
||||
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData())
|
||||
return data
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user