[update] 修改企标更改流程增加授权部门参数
This commit is contained in:
@@ -68,6 +68,22 @@
|
|||||||
dictCode="standard_grade_classify" />
|
dictCode="standard_grade_classify" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 授权部门 -->
|
||||||
|
<div class="box-title-text form-flex-item">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.authorizationDepart')">
|
||||||
|
{{ $t('workCenter.enterpriseInitChangePlan.authorizationDepart') }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="item-model" prop="authDept">
|
||||||
|
<j-select-depart v-model="formInline.authDept"
|
||||||
|
:disabled="disabled || authDeptDisabled"
|
||||||
|
:selectRange="departSelectRange"
|
||||||
|
:multi="true"
|
||||||
|
:backDepart="true"
|
||||||
|
:treeOpera="true" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
<!-- 标准体系 -->
|
<!-- 标准体系 -->
|
||||||
<div class="box-title-text form-flex-item">
|
<div class="box-title-text form-flex-item">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
@@ -256,13 +272,13 @@
|
|||||||
{{ $t('workCenter.enStandardChange.quotedStandard') }}
|
{{ $t('workCenter.enStandardChange.quotedStandard') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="quotedStandard">
|
<a-form-model-item class="item-model" prop="referenceStandard">
|
||||||
<standard-selection :source="StandardSource.ENTERPRISE.value"
|
<standard-selection :source="StandardSource.ENTERPRISE.value"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:disabledSourceSearch="true"
|
:disabledSourceSearch="true"
|
||||||
:exclude-standard-numbers="formInline.standardNumber"
|
:exclude-standard-numbers="formInline.standardNumber"
|
||||||
type="radio"
|
type="radio"
|
||||||
v-model="formInline.quotedStandard" />
|
v-model="formInline.referenceStandard" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<!-- 关联文件 -->
|
<!-- 关联文件 -->
|
||||||
@@ -325,13 +341,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { StandardSource } from '@/enums/commonEnums'
|
import { StandardSource, StandardGradeClassify } from '@/enums/commonEnums'
|
||||||
import { getTreeList, getEnterpriseStandardInfoById } from '@/api/enterpriseStandardLibraryApi'
|
import { getTreeList, getEnterpriseStandardInfoById } from '@/api/enterpriseStandardLibraryApi'
|
||||||
import StandardSelection from '@/components/selection/StandardSelection'
|
import StandardSelection from '@/components/selection/StandardSelection'
|
||||||
import UserSelection from '@/components/selection/UserSelection'
|
import UserSelection from '@/components/selection/UserSelection'
|
||||||
import UploadFile from '@/components/UploadFile'
|
import UploadFile from '@/components/UploadFile'
|
||||||
import TreeSelection from '@/components/selection/TreeSelection'
|
import TreeSelection from '@/components/selection/TreeSelection'
|
||||||
import STreeSelect from '@/components/STreeSelect'
|
import STreeSelect from '@/components/STreeSelect'
|
||||||
|
import { getStandardGradeClassification } from '../../../../api/enterpriseStandardLibraryApi'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'BaseInfoForm',
|
name: 'BaseInfoForm',
|
||||||
@@ -357,12 +374,84 @@ export default {
|
|||||||
// 企标名称监视
|
// 企标名称监视
|
||||||
'formInline.standardName' (value) {
|
'formInline.standardName' (value) {
|
||||||
this.$emit('processNameChange', (this.formInline.standardNumber || '') + '-' + (value || '') + '-' + '企标更改')
|
this.$emit('processNameChange', (this.formInline.standardNumber || '') + '-' + (value || '') + '-' + '企标更改')
|
||||||
}
|
},
|
||||||
|
// 标准等级分类改变后授权部门需要自动带出
|
||||||
|
'formInline.gradeClassification' (val) {
|
||||||
|
if (val && !this.isEditSetData) {
|
||||||
|
if (val === StandardGradeClassify.ZERO_LEVEL.value) {
|
||||||
|
// 选的是0级,授权部门带出不可编辑
|
||||||
|
this.formInline.authDept = this.standardGradeClassification.find(item => item.level + '' === '0').deptIds
|
||||||
|
if (!this.authDeptDisabled) {
|
||||||
|
this.authDeptDisabled = true
|
||||||
|
}
|
||||||
|
} else if (val === StandardGradeClassify.ONE_LEVEL.value) {
|
||||||
|
// 选的是1级
|
||||||
|
// 带出3级的部门:起草部门
|
||||||
|
this.formInline.authDept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds
|
||||||
|
// 设置可选择项
|
||||||
|
this.departSelectRange = this.standardGradeClassification.find(item => item.level + '' === '1').deptIds.split(',')
|
||||||
|
this.formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||||
|
// 设置授权部门可编辑
|
||||||
|
if (this.authDeptDisabled) {
|
||||||
|
this.authDeptDisabled = false
|
||||||
|
}
|
||||||
|
} else if (val === StandardGradeClassify.TWO_LEVEL.value) {
|
||||||
|
// 选的是2级
|
||||||
|
// 带出3级的部门:起草部门
|
||||||
|
this.formInline.authDept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds
|
||||||
|
// 设置可选择项
|
||||||
|
this.departSelectRange = this.standardGradeClassification.find(item => item.level + '' === '2').deptIds.split(',')
|
||||||
|
this.formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||||
|
// 设置授权部门可编辑
|
||||||
|
if (this.authDeptDisabled) {
|
||||||
|
this.authDeptDisabled = false
|
||||||
|
}
|
||||||
|
} else if (val === StandardGradeClassify.THREE_LEVEL.value) {
|
||||||
|
// 选的是3级,授权部门带出不可编辑
|
||||||
|
this.formInline.authDept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds
|
||||||
|
if (!this.authDeptDisabled) {
|
||||||
|
this.authDeptDisabled = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (val && this.isEditSetData) {
|
||||||
|
if (val === StandardGradeClassify.ZERO_LEVEL.value) {
|
||||||
|
// 选的是0级,授权部门带出不可编辑
|
||||||
|
if (!this.authDeptDisabled) {
|
||||||
|
this.authDeptDisabled = true
|
||||||
|
}
|
||||||
|
} else if (val === StandardGradeClassify.ONE_LEVEL.value) {
|
||||||
|
// 选的是1级
|
||||||
|
// 设置可选择项
|
||||||
|
this.departSelectRange = this.standardGradeClassification.find(item => item.level + '' === '1').deptIds.split(',')
|
||||||
|
// 设置授权部门可编辑
|
||||||
|
if (this.authDeptDisabled) {
|
||||||
|
this.authDeptDisabled = false
|
||||||
|
}
|
||||||
|
} else if (val === StandardGradeClassify.TWO_LEVEL.value) {
|
||||||
|
// 选的是2级
|
||||||
|
// 设置可选择项
|
||||||
|
this.departSelectRange = this.standardGradeClassification.find(item => item.level + '' === '2').deptIds.split(',')
|
||||||
|
// 设置授权部门可编辑
|
||||||
|
if (this.authDeptDisabled) {
|
||||||
|
this.authDeptDisabled = false
|
||||||
|
}
|
||||||
|
} else if (val === StandardGradeClassify.THREE_LEVEL.value) {
|
||||||
|
// 选的是3级,授权部门带出不可编辑
|
||||||
|
if (!this.authDeptDisabled) {
|
||||||
|
this.authDeptDisabled = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
StandardSource,
|
StandardSource,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
isEditSetData: false, // 是否正在回显数据
|
||||||
|
authDeptDisabled: false, // 授权部门是否可以更改
|
||||||
|
departSelectRange: [], // 授权部门可选项
|
||||||
|
standardGradeClassification: [], // 企标级别映射
|
||||||
standardSystemOptions: [], // 标准体系下拉框数据
|
standardSystemOptions: [], // 标准体系下拉框数据
|
||||||
formInline: {},
|
formInline: {},
|
||||||
rules: {
|
rules: {
|
||||||
@@ -418,16 +507,20 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
// 获取企标级别映射
|
||||||
|
this.initStandardGradeClassification()
|
||||||
// 获取标准体系下拉框数据
|
// 获取标准体系下拉框数据
|
||||||
this.initStandardSystemOptions()
|
this.initStandardSystemOptions()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||||
initData (data) {
|
initData (data) {
|
||||||
|
this.isEditSetData = true
|
||||||
this.formInline = Object.assign({}, data)
|
this.formInline = Object.assign({}, data)
|
||||||
this.formInline.standardSystem = this.formInline.standardSystem ? this.formInline.standardSystem.split(',').map(item => {
|
this.formInline.standardSystem = this.formInline.standardSystem ? this.formInline.standardSystem.split(',').map(item => {
|
||||||
return { value: item }
|
return { value: item }
|
||||||
}) : []
|
}) : []
|
||||||
|
this.isEditSetData = false
|
||||||
},
|
},
|
||||||
// 外层要获取数据
|
// 外层要获取数据
|
||||||
getData () {
|
getData () {
|
||||||
@@ -456,6 +549,14 @@ export default {
|
|||||||
})
|
})
|
||||||
return formInline
|
return formInline
|
||||||
},
|
},
|
||||||
|
// 获取企标级别映射列表数据
|
||||||
|
initStandardGradeClassification () {
|
||||||
|
getStandardGradeClassification().then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.standardGradeClassification = res.result
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 获取标准体系下拉框数据
|
// 获取标准体系下拉框数据
|
||||||
initStandardSystemOptions () {
|
initStandardSystemOptions () {
|
||||||
getTreeList({ option: 1 }).then(res => {
|
getTreeList({ option: 1 }).then(res => {
|
||||||
|
|||||||
Reference in New Issue
Block a user