update 会后管理流程
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<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="form-flex-box">
|
||||
<!-- 紧急程度 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
@@ -10,13 +10,13 @@
|
||||
{{ $t('workCenter.standardPromotionProcess.urgency') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="urgency">
|
||||
<a-form-model-item class="item-model" prop="emergencyDegree">
|
||||
<j-dict-select-tag :disabled="disabled"
|
||||
v-model="formInline.urgency"
|
||||
v-model="formInline.emergencyDegree"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.urgency')"
|
||||
:triggerChange="false"
|
||||
type="radio"
|
||||
dictCode="yn" />
|
||||
dictCode="emergency_degree" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 企标编号 -->
|
||||
@@ -27,13 +27,13 @@
|
||||
{{ $t('workCenter.standardPromotionProcess.esNumber') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="esNumber">
|
||||
<standard-selection source="3"
|
||||
<a-form-model-item class="item-model" prop="standardNo">
|
||||
<standard-selection source="3" type="radio"
|
||||
:disabledSourceSearch="true"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.esNumber')"
|
||||
@nameChange="changeStandardName"
|
||||
v-model="formInline.esNumber" />
|
||||
v-model="formInline.standardNo" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 企标名称 -->
|
||||
@@ -43,9 +43,9 @@
|
||||
{{ $t('workCenter.standardPromotionProcess.esName') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="esName">
|
||||
<a-form-model-item class="item-model" prop="standardName">
|
||||
<a-input disabled
|
||||
v-model="formInline.esName"
|
||||
v-model="formInline.standardName"
|
||||
:maxLength="50"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.esName')" />
|
||||
</a-form-model-item>
|
||||
@@ -58,9 +58,10 @@
|
||||
{{ $t('workCenter.standardPromotionProcess.promoter') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="promoter">
|
||||
<a-form-model-item class="item-model" prop="declareUser">
|
||||
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.promoter')"
|
||||
v-model="formInline.promoter"
|
||||
v-model="formInline.declareUser"
|
||||
:name-str="formInline.declareUserDictText"
|
||||
:disabled="disabled"
|
||||
type="radio" />
|
||||
</a-form-model-item>
|
||||
@@ -73,8 +74,8 @@
|
||||
{{ $t('workCenter.standardPromotionProcess.mainDeliveryDepart') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="mainDeliveryDepart">
|
||||
<a-input v-model="formInline.mainDeliveryDepart"
|
||||
<a-form-model-item class="item-model" prop="mainDepart">
|
||||
<a-input v-model="formInline.mainDepart"
|
||||
:maxLength="50"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.mainDeliveryDepart')" />
|
||||
</a-form-model-item>
|
||||
@@ -87,8 +88,8 @@
|
||||
{{ $t('workCenter.standardPromotionProcess.subject') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="subject">
|
||||
<a-input v-model="formInline.subject"
|
||||
<a-form-model-item class="item-model" prop="declareTopic">
|
||||
<a-input v-model="formInline.declareTopic"
|
||||
:maxLength="50"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.subject')" />
|
||||
</a-form-model-item>
|
||||
@@ -101,10 +102,10 @@
|
||||
{{ $t('workCenter.standardPromotionProcess.promotionDate') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="promotionDate">
|
||||
<a-form-model-item class="item-model" prop="declareDate">
|
||||
<j-date date-format="YYYY-MM-DD" style="width: 100%" showType="day" :disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.standardPromotionProcess.promotionDate')"
|
||||
v-model="formInline.promotionDate" />
|
||||
v-model="formInline.declareDate" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 参宣单位 -->
|
||||
@@ -115,13 +116,14 @@
|
||||
{{ $t('workCenter.standardPromotionProcess.participatingUnits') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="participatingUnits">
|
||||
<a-form-model-item class="item-model" prop="attendUnit">
|
||||
<j-select-depart
|
||||
:disabled="disabled"
|
||||
v-model="formInline.participatingUnits"
|
||||
v-model="formInline.attendUnit"
|
||||
:multi="true"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.standardPromotionProcess.participatingUnits')"
|
||||
:backDepart="true"
|
||||
@change="changeParticipatingUnits"
|
||||
:treeOpera="true">>
|
||||
</j-select-depart>
|
||||
</a-form-model-item>
|
||||
@@ -134,9 +136,9 @@
|
||||
{{ $t('workCenter.standardPromotionProcess.contactPerson') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="contactPerson">
|
||||
<a-form-model-item class="item-model" prop="initiator">
|
||||
<a-input disabled
|
||||
v-model="formInline.contactPerson"
|
||||
v-model="formInline.initiator"
|
||||
:maxLength="50"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.contactPerson')" />
|
||||
</a-form-model-item>
|
||||
@@ -149,24 +151,24 @@
|
||||
{{ $t('workCenter.standardPromotionProcess.content') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="content">
|
||||
<a-form-model-item class="item-model" prop="declareContent">
|
||||
<a-textarea :maxLength="500"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.content')"
|
||||
:rows="4"
|
||||
v-model="formInline.content" />
|
||||
v-model="formInline.declareContent" />
|
||||
</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.standardPromotionProcess.promotionalMaterials')">
|
||||
{{ $t('workCenter.standardPromotionProcess.promotionalMaterials') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="promotionalMaterials">
|
||||
<a-button type="primary" class="button-text" @click="clickButtonToUpload" :disabled="disabled">
|
||||
<a-form-model-item class="item-model" prop="declareFile">
|
||||
<a-button type="primary" class="button-text" @click="clickButtonToUpload" style="width: 100%;">
|
||||
{{
|
||||
(formInline.promotionalMaterials === 'null' || formInline.promotionalMaterials === '' || formInline.promotionalMaterials === null || formInline.promotionalMaterials === undefined)
|
||||
(formInline.declareFile === 'null' || formInline.declareFile === '' || formInline.declareFile === null || formInline.declareFile === undefined)
|
||||
? $t('uploadFile.clickUpload')
|
||||
: $t('uploadFile.viewUploadedFiles')
|
||||
}}
|
||||
@@ -176,7 +178,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 上传 -->
|
||||
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false"></upload-file>
|
||||
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :disabled="disabled"></upload-file>
|
||||
</a-form-model>
|
||||
</template>
|
||||
|
||||
@@ -184,6 +186,7 @@
|
||||
import StandardSelection from '@comp/selection/StandardSelection'
|
||||
import UserSelection from '@comp/selection/UserSelection'
|
||||
import UploadFile from '@comp/UploadFile'
|
||||
import { getLiaisonList } from '@api/workCenter'
|
||||
export default {
|
||||
name: 'BaseInfoForm',
|
||||
components: { UploadFile, UserSelection, StandardSelection },
|
||||
@@ -197,6 +200,8 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
formInline: {},
|
||||
// 当前数据
|
||||
model: {},
|
||||
// 操作类型
|
||||
operationType: null,
|
||||
rules: {
|
||||
@@ -238,34 +243,36 @@ export default {
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
this.model = Object.assign({}, data)
|
||||
// 给表单赋值
|
||||
// this.formInline =
|
||||
this.formInline = {
|
||||
...data
|
||||
}
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.formInline = this.formInline
|
||||
return data
|
||||
return { ...this.formInline }
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate (callback) {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
const data = {}
|
||||
data.formInline = this.formInline
|
||||
callback(data)
|
||||
}
|
||||
// 获取数据并验证
|
||||
getDataValidate () {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
const data = { ...this.formInline }
|
||||
resolve(data)
|
||||
} else {
|
||||
reject(new Error('base'))
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 选择标准带出名称
|
||||
changeStandardName (val) {
|
||||
this.formInline.esName = val
|
||||
this.formInline.standardName = val
|
||||
},
|
||||
// 点击点击上传按钮
|
||||
clickButtonToUpload (item) {
|
||||
this.$refs.uploadFile.open(item.fileId)
|
||||
clickButtonToUpload () {
|
||||
this.$refs.uploadFile.open(this.formInline.declareFile)
|
||||
// this.uploadName = item.dbFieldName
|
||||
},
|
||||
// 文件上传改变后的回调
|
||||
@@ -277,7 +284,17 @@ export default {
|
||||
})
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.form.file = attIdList.join(',')
|
||||
this.$set(this.formInline, 'declareFile', attIdList.join(','))
|
||||
// this.formInline.attachment = attIdList.join(',')
|
||||
},
|
||||
// 选择参宣单位,回显联络人
|
||||
changeParticipatingUnits (val) {
|
||||
getLiaisonList({ deptIds: val }).then(res => {
|
||||
if (res.success) {
|
||||
const data = res.result || ''
|
||||
this.$set(this.formInline, 'initiator', data)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -285,8 +302,5 @@ 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;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user